From 5d1ed2592d59fef7b30a79984410e7593af0cca6 Mon Sep 17 00:00:00 2001 From: elena-shostak <165678770+elena-shostak@users.noreply.github.com> Date: Mon, 8 Jul 2024 13:17:23 +0200 Subject: [PATCH 001/103] Disabled http2 FTR configs for saml and oidc (#187462) ## Summary Since initial tests were flaky only for http2 configuration, disabled its FTR configs for saml and oidc (see https://github.com/elastic/kibana/issues/186780, https://github.com/elastic/kibana/issues/186780). Unskiped the original test. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Elastic Machine --- .buildkite/ftr_configs.yml | 6 ++++-- x-pack/test/security_functional/tests/oidc/url_capture.ts | 3 +-- x-pack/test/security_functional/tests/saml/url_capture.ts | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.buildkite/ftr_configs.yml b/.buildkite/ftr_configs.yml index 730b3aa460f4b1..e0faadd77091c6 100644 --- a/.buildkite/ftr_configs.yml +++ b/.buildkite/ftr_configs.yml @@ -91,6 +91,10 @@ disabled: - x-pack/test_serverless/api_integration/test_suites/security/config.feature_flags.ts - x-pack/test_serverless/functional/test_suites/security/config.feature_flags.ts + # http/2 security muted tests + - x-pack/test/security_functional/saml.http2.config.ts + - x-pack/test/security_functional/oidc.http2.config.ts + defaultQueue: 'n2-4-spot' enabled: - test/accessibility/config.ts @@ -401,8 +405,6 @@ enabled: - x-pack/test/security_functional/login_selector.config.ts - x-pack/test/security_functional/oidc.config.ts - x-pack/test/security_functional/saml.config.ts - - x-pack/test/security_functional/saml.http2.config.ts - - x-pack/test/security_functional/oidc.http2.config.ts - x-pack/test/security_functional/insecure_cluster_warning.config.ts - x-pack/test/security_functional/user_profiles.config.ts - x-pack/test/security_functional/expired_session.config.ts diff --git a/x-pack/test/security_functional/tests/oidc/url_capture.ts b/x-pack/test/security_functional/tests/oidc/url_capture.ts index 359034681b6d35..6553ef193fc3b6 100644 --- a/x-pack/test/security_functional/tests/oidc/url_capture.ts +++ b/x-pack/test/security_functional/tests/oidc/url_capture.ts @@ -16,8 +16,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const PageObjects = getPageObjects(['common']); - // Failing: See https://github.com/elastic/kibana/issues/186780 - describe.skip('URL capture', function () { + describe('URL capture', function () { this.tags('includeFirefox'); before(async () => { diff --git a/x-pack/test/security_functional/tests/saml/url_capture.ts b/x-pack/test/security_functional/tests/saml/url_capture.ts index 71b62eb2b2aa3f..0193d3d8707013 100644 --- a/x-pack/test/security_functional/tests/saml/url_capture.ts +++ b/x-pack/test/security_functional/tests/saml/url_capture.ts @@ -16,8 +16,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const PageObjects = getPageObjects(['common']); - // Failing: See https://github.com/elastic/kibana/issues/186675 - describe.skip('URL capture', function () { + describe('URL capture', function () { this.tags('includeFirefox'); before(async () => { From 0ba6746ad6d25bcbe4de670c1ffd5131283bd0b0 Mon Sep 17 00:00:00 2001 From: Ignacio Rivas Date: Mon, 8 Jul 2024 13:40:42 +0200 Subject: [PATCH 002/103] [Index management] Link component templates (#187360) --- .../component_template_details.test.ts | 33 ++++++++ .../component_template_details.helpers.ts | 1 + .../helpers/setup_environment.tsx | 14 +++- .../component_template_details.tsx | 81 +++++++++++++++---- .../template_details/tabs/tab_summary.tsx | 9 ++- 5 files changed, 120 insertions(+), 18 deletions(-) diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_details.test.ts b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_details.test.ts index 49b4e1b201a191..858bd44781683a 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_details.test.ts +++ b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_details.test.ts @@ -33,6 +33,10 @@ const COMPONENT_TEMPLATE_ONLY_REQUIRED_FIELDS: ComponentTemplateDeserialized = { _kbnMeta: { usedBy: [], isManaged: false }, }; +const CUSTOM_COMPONENT_TEMPLATE = { + name: 'test@custom', +}; + describe('', () => { const { httpSetup, httpRequestsMockHelpers } = setupEnvironment(); let testBed: ComponentTemplateDetailsTestBed; @@ -204,6 +208,35 @@ describe('', () => { }); }); + describe('Error handling for @custom templates', () => { + const error = { + statusCode: 404, + error: 'Not Found', + message: 'Not Found', + }; + + beforeEach(async () => { + httpRequestsMockHelpers.setLoadComponentTemplateResponse( + encodeURIComponent(CUSTOM_COMPONENT_TEMPLATE.name), + undefined, + error + ); + + await act(async () => { + testBed = setup(httpSetup, { + componentTemplateName: CUSTOM_COMPONENT_TEMPLATE.name, + onClose: () => {}, + }); + }); + + testBed.component.update(); + }); + + test('shows custom callout to create missing @custom template', () => { + expect(testBed.exists('missingCustomComponentTemplate')).toBe(true); + }); + }); + describe('Error handling', () => { const error = { statusCode: 500, diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/component_template_details.helpers.ts b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/component_template_details.helpers.ts index 98d9003dc307d4..f0513dce68abdf 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/component_template_details.helpers.ts +++ b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/component_template_details.helpers.ts @@ -89,4 +89,5 @@ export type ComponentTemplateDetailsTestSubjects = | 'deprecatedComponentTemplateBadge' | 'manageComponentTemplateButton' | 'manageComponentTemplateContextMenu' + | 'missingCustomComponentTemplate' | 'manageComponentTemplateContextMenu.action'; diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx index ee3c359a8195a7..00554b9ec1a146 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx @@ -6,11 +6,17 @@ */ import React from 'react'; +import { LocationDescriptorObject } from 'history'; import type { CoreStart, HttpSetup } from '@kbn/core/public'; import { docLinksServiceMock } from '@kbn/core-doc-links-browser-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-browser-mocks'; -import { notificationServiceMock, applicationServiceMock, coreMock } from '@kbn/core/public/mocks'; +import { + notificationServiceMock, + applicationServiceMock, + coreMock, + scopedHistoryMock, +} from '@kbn/core/public/mocks'; import { GlobalFlyout } from '@kbn/es-ui-shared-plugin/public'; import { breadcrumbService } from '../../../../../services/breadcrumbs'; @@ -23,10 +29,16 @@ import { API_BASE_PATH } from './constants'; const { GlobalFlyoutProvider } = GlobalFlyout; +const history = scopedHistoryMock.create(); +history.createHref.mockImplementation((location: LocationDescriptorObject) => { + return `${location.pathname}?${location.search}`; +}); + // We provide the minimum deps required to make the tests pass const appDependencies = { docLinks: {} as any, plugins: { ml: {} as any }, + history, } as any; export const componentTemplatesDependencies = (httpSetup: HttpSetup, coreStart?: CoreStart) => { diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_details/component_template_details.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_details/component_template_details.tsx index 60324997ab11bd..0db0c9dd0f7c92 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_details/component_template_details.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_details/component_template_details.tsx @@ -19,6 +19,8 @@ import { EuiSpacer, EuiCallOut, EuiBadge, + EuiButton, + EuiCode, } from '@elastic/eui'; import { @@ -27,7 +29,9 @@ import { TabAliases, TabMappings, attemptToURIDecode, + reactRouterNavigate, } from '../shared_imports'; +import { useAppContext } from '../../../app_context'; import { useComponentTemplatesContext } from '../component_templates_context'; import { DeprecatedBadge } from '../components'; import { TabSummary } from './tab_summary'; @@ -46,12 +50,18 @@ export const defaultFlyoutProps = { 'aria-labelledby': 'componentTemplateDetailsFlyoutTitle', }; +// All component templates for integrations end in @custom +const isIntegrationsComponentTemplate = (name: string) => { + return name.toLowerCase().endsWith('@custom'); +}; + export const ComponentTemplateDetailsFlyoutContent: React.FunctionComponent = ({ componentTemplateName, onClose, actions, showSummaryCallToAction, }) => { + const { history } = useAppContext(); const { api } = useComponentTemplatesContext(); const decodedComponentTemplateName = attemptToURIDecode(componentTemplateName)!; @@ -76,21 +86,62 @@ export const ComponentTemplateDetailsFlyoutContent: React.FunctionComponent ); } else if (error) { - content = ( - - } - color="danger" - iconType="warning" - data-test-subj="sectionError" - > -

{error.message}

-
- ); + if ( + error?.error === 'Not Found' && + isIntegrationsComponentTemplate(decodedComponentTemplateName) + ) { + content = ( + + } + color="warning" + iconType="warning" + data-test-subj="missingCustomComponentTemplate" + > +

+ {decodedComponentTemplateName}, + }} + /> +

+ + + +
+ ); + } else { + content = ( + + } + color="danger" + iconType="warning" + data-test-subj="sectionError" + > +

{error.message}

+
+ ); + } } else if (componentTemplateDetails) { const { template: { settings, mappings, aliases }, diff --git a/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/tabs/tab_summary.tsx b/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/tabs/tab_summary.tsx index 3f451217f84137..c2aa548100b577 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/tabs/tab_summary.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/tabs/tab_summary.tsx @@ -20,6 +20,8 @@ import { EuiCodeBlock, EuiSpacer, } from '@elastic/eui'; +import { reactRouterNavigate } from '../../../../../../shared_imports'; +import { useAppContext } from '../../../../../app_context'; import { serializeAsESLifecycle } from '../../../../../../../common/lib/data_stream_serialization'; import { getLifecycleValue } from '../../../../../lib/data_streams'; import { TemplateDeserialized } from '../../../../../../../common'; @@ -59,6 +61,7 @@ export const TabSummary: React.FunctionComponent = ({ templateDetails }) const numIndexPatterns = indexPatterns.length; + const { history } = useAppContext(); const ilmPolicyLink = useIlmLocator(ILM_PAGES_POLICY_EDIT, ilmPolicy?.name); return ( @@ -135,9 +138,11 @@ export const TabSummary: React.FunctionComponent = ({ templateDetails })
    {composedOf.map((component) => (
  • - + {component} - +
  • ))}
From 6f609921ee9b6acc5d132ac2e1bc0180eb82141a Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Mon, 8 Jul 2024 13:56:48 +0200 Subject: [PATCH 003/103] [ES|QL] Fixes FROM suggestions (#187657) ## Summary Closes https://github.com/elastic/kibana/issues/187414 image --- .../src/autocomplete/autocomplete.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts index 727335fe6d9613..add47e4a5547b5 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts @@ -858,7 +858,7 @@ async function getExpressionSuggestionsByType( } else { const index = getSourcesFromCommands(commands, 'index'); // This is going to be empty for simple indices, and not empty for integrations - if (index && index.text) { + if (index && index.text && index.text !== EDITOR_MARKER) { const source = index.text.replace(EDITOR_MARKER, ''); const dataSource = await getDatastreamsForIntegration(source); const newDefinitions = buildSourcesDefinitions( From 548becfa61ee1dc26cca6145943a785a17af2ad1 Mon Sep 17 00:00:00 2001 From: Achyut Jhunjhunwala Date: Mon, 8 Jul 2024 14:41:47 +0200 Subject: [PATCH 004/103] [Dataset Quality] Remove unit test from server side (#187635) ## Summary This PR removed almost all API level Units tests from the Server folder of our code. Server Side code should always be tested using API test, Functional test and Integration test. Units test only when there is complex logic which does post processing of data fetched from the DB. Unnecessary Unit tests on Server side comes with the cost of maintenance which is not worth. Hence removing them here. i kept 1 Unit test file which was testing a scenario around `uncategorizedOnly` scenario which is not exposed via API. I am not sure why it was added, but then i didn't see any compelling reason to remove them. --- .../get_data_stream_details.test.ts | 427 ------------------ .../get_data_stream_settings.test.ts | 267 ----------- .../get_data_streams/get_data_streams.test.ts | 68 +-- .../get_data_streams_stats.test.ts | 149 ------ 4 files changed, 1 insertion(+), 910 deletions(-) delete mode 100644 x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/get_data_stream_details.test.ts delete mode 100644 x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/get_data_stream_settings.test.ts delete mode 100644 x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_streams_stats/get_data_streams_stats.test.ts diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/get_data_stream_details.test.ts b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/get_data_stream_details.test.ts deleted file mode 100644 index c3758a4b2100c5..00000000000000 --- a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/get_data_stream_details.test.ts +++ /dev/null @@ -1,427 +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 { - IndicesDataStreamsStatsResponse, - SearchTotalHitsRelation, -} from '@elastic/elasticsearch/lib/api/types'; -import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; -import { - findInventoryFields, - InventoryItemType, - inventoryModels, -} from '@kbn/metrics-data-access-plugin/common'; -import { DataStreamDetails } from '../../../../common/api_types'; - -import { getDataStreamDetails } from '.'; -const accessLogsDataStream = 'logs-nginx.access-default'; -const errorLogsDataStream = 'logs-nginx.error-default'; -const nonExistentDataStream = 'non-existent'; - -const defaultSummaryStats: DataStreamDetails = { - degradedDocsCount: 98841, - docsCount: 617680, - hosts: { - 'aws.rds.db_instance.arn': [], - 'aws.s3.bucket.name': [], - 'aws.sqs.queue.name': [], - 'cloud.instance.id': ['0000000000009121', '0000000000009127', '0000000000009133'], - 'container.id': [], - 'host.name': ['synth-host'], - 'kubernetes.pod.uid': [], - }, - services: { - 'service.name': ['synth-service-0', 'synth-service-1', 'synth-service-2'], - }, - sizeBytes: 72596354, - lastActivity: 1715941303175, - userPrivileges: { - canMonitor: true, - }, -}; - -const start = Number(new Date('2020-01-01T00:00:00.000Z')); -const end = Number(new Date('2020-01-30T00:00:00.000Z')); - -describe('getDataStreamDetails', () => { - afterAll(() => { - jest.clearAllMocks(); - }); - - it('returns {} if index is not found', async () => { - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - esClientMock.indices.getSettings.mockRejectedValue(MOCK_INDEX_ERROR); - esClientMock.search.mockRejectedValue(MOCK_INDEX_ERROR); - esClientMock.security.hasPrivileges.mockResolvedValue(MOCK_HAS_PRIVILEGES_RESPONSE); - - const dataStreamDetails = await getDataStreamDetails({ - esClient: esClientMock, - dataStream: nonExistentDataStream, - start, - end, - }); - - expect(dataStreamDetails).toEqual({}); - }); - - it('returns summary of a data stream', async () => { - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - esClientMock.indices.stats.mockReturnValue(Promise.resolve(MOCK_STATS_RESPONSE)); - esClientMock.indices.dataStreamsStats.mockReturnValue( - Promise.resolve(MOCK_DATA_STREAM_RESPONSE as IndicesDataStreamsStatsResponse) - ); - esClientMock.search.mockReturnValue(Promise.resolve(MOCK_SEARCH_RESPONSE)); - esClientMock.security.hasPrivileges.mockResolvedValue(MOCK_HAS_PRIVILEGES_RESPONSE); - - const dataStreamDetails = await getDataStreamDetails({ - esClient: esClientMock, - dataStream: errorLogsDataStream, - start, - end, - }); - - expect(dataStreamDetails).toEqual(defaultSummaryStats); - }); - - it('returns the correct service.name list', async () => { - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - esClientMock.indices.stats.mockReturnValue(Promise.resolve(MOCK_STATS_RESPONSE)); - esClientMock.indices.dataStreamsStats.mockReturnValue( - Promise.resolve(MOCK_DATA_STREAM_RESPONSE as IndicesDataStreamsStatsResponse) - ); - esClientMock.security.hasPrivileges.mockResolvedValue(MOCK_HAS_PRIVILEGES_RESPONSE); - - const serviceName = 'service.name'; - const testServiceName = ['tst-srv-0', 'tst-srv-1']; - const mockSearchResponse = { ...MOCK_SEARCH_RESPONSE }; - mockSearchResponse.aggregations[serviceName].buckets = testServiceName.map((name) => ({ - key: name, - doc_count: 1, - })); - esClientMock.search.mockReturnValue(Promise.resolve(MOCK_SEARCH_RESPONSE)); - - const dataStreamDetails = await getDataStreamDetails({ - esClient: esClientMock, - dataStream: accessLogsDataStream, - start, - end, - }); - expect(dataStreamDetails.services).toEqual({ [serviceName]: testServiceName }); - }); - - it('returns the correct host.name list', async () => { - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - esClientMock.indices.stats.mockReturnValue(Promise.resolve(MOCK_STATS_RESPONSE)); - esClientMock.security.hasPrivileges.mockResolvedValue(MOCK_HAS_PRIVILEGES_RESPONSE); - esClientMock.indices.dataStreamsStats.mockReturnValue( - Promise.resolve(MOCK_DATA_STREAM_RESPONSE as IndicesDataStreamsStatsResponse) - ); - - const hostName = 'host.name'; - const testHostName = ['tst-host-0', 'tst-host-1']; - const hostFields = inventoryModels.map( - (model) => findInventoryFields(model.id as InventoryItemType).id - ); - const mockSearchResponse = { ...MOCK_SEARCH_RESPONSE }; - // Make all hosts buckets to [] - hostFields.forEach((field) => { - mockSearchResponse.aggregations[field as 'host.name'] = { buckets: [] } as any; - }); - - // Set the host.name buckets to testHostName - mockSearchResponse.aggregations[hostName].buckets = testHostName.map((name) => ({ - key: name, - doc_count: 1, - })); - - esClientMock.search.mockReturnValue(Promise.resolve(MOCK_SEARCH_RESPONSE)); - - const dataStreamDetails = await getDataStreamDetails({ - esClient: esClientMock, - dataStream: accessLogsDataStream, - start, - end, - }); - - // Expect all host fields to be empty - const emptyHosts = hostFields.reduce((acc, field) => ({ ...acc, [field]: [] }), {}); - - expect(dataStreamDetails.hosts).toEqual({ ...emptyHosts, [hostName]: testHostName }); - }); - - it('returns correct size in bytes', async () => { - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - esClientMock.security.hasPrivileges.mockResolvedValue(MOCK_HAS_PRIVILEGES_RESPONSE); - esClientMock.indices.dataStreamsStats.mockReturnValue( - Promise.resolve(MOCK_DATA_STREAM_RESPONSE as IndicesDataStreamsStatsResponse) - ); - - const docsCount = 536; - const storeDocsCount = 1220; - const storeSizeInBytes = 2048; - const expectedSizeInBytes = Math.ceil((storeSizeInBytes / storeDocsCount) * docsCount); - - const testStatsResponse = { ...MOCK_STATS_RESPONSE }; - testStatsResponse._all.total.docs.count = storeDocsCount; - testStatsResponse._all.total.store.size_in_bytes = storeSizeInBytes; - esClientMock.indices.stats.mockReturnValue(Promise.resolve(testStatsResponse)); - - const mockSearchResponse = { ...MOCK_SEARCH_RESPONSE }; - mockSearchResponse.aggregations.total_count.value = docsCount; - esClientMock.search.mockReturnValue(Promise.resolve(mockSearchResponse)); - - const dataStreamDetails = await getDataStreamDetails({ - esClient: esClientMock, - dataStream: accessLogsDataStream, - start, - end, - }); - expect(dataStreamDetails.sizeBytes).toEqual(expectedSizeInBytes); - }); - - // This covers https://github.com/elastic/kibana/issues/178954 - it('returns size as NaN for when sizeStatsAvailable is false (serverless mode)', async () => { - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - esClientMock.security.hasPrivileges.mockResolvedValue(MOCK_HAS_PRIVILEGES_RESPONSE); - - esClientMock.indices.stats.mockReturnValue(Promise.resolve(MOCK_STATS_RESPONSE)); - esClientMock.search.mockReturnValue(Promise.resolve(MOCK_SEARCH_RESPONSE)); - esClientMock.indices.dataStreamsStats.mockReturnValue( - Promise.resolve(MOCK_DATA_STREAM_RESPONSE as IndicesDataStreamsStatsResponse) - ); - - const dataStreamDetails = await getDataStreamDetails({ - esClient: esClientMock, - dataStream: accessLogsDataStream, - start, - end, - sizeStatsAvailable: false, - }); - expect(dataStreamDetails.sizeBytes).toBeNaN(); - }); - - it('returns empty lastActivity and correct user privileges for an underprivileged user', async () => { - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - esClientMock.security.hasPrivileges.mockResolvedValue({ - ...MOCK_HAS_PRIVILEGES_RESPONSE, - index: { - [accessLogsDataStream]: { - monitor: false, - }, - }, - }); - esClientMock.search.mockReturnValue(Promise.resolve(MOCK_SEARCH_RESPONSE)); - esClientMock.indices.dataStreamsStats.mockReturnValue( - Promise.resolve(MOCK_DATA_STREAM_RESPONSE as IndicesDataStreamsStatsResponse) - ); - - const dataStreamDetails = await getDataStreamDetails({ - esClient: esClientMock, - dataStream: accessLogsDataStream, - start, - end, - }); - - expect(dataStreamDetails.userPrivileges?.canMonitor ?? true).toBe(false); - }); -}); - -const MOCK_INDEX_ERROR = { - error: { - root_cause: [ - { - type: 'index_not_found_exception', - reason: 'no such index [logs-nginx.error-default-01]', - 'resource.type': 'index_or_alias', - 'resource.id': 'logs-nginx.error-default-01', - index_uuid: '_na_', - index: 'logs-nginx.error-default-01', - }, - ], - type: 'index_not_found_exception', - reason: 'no such index [logs-nginx.error-default-01]', - 'resource.type': 'index_or_alias', - 'resource.id': 'logs-nginx.error-default-01', - index_uuid: '_na_', - index: 'logs-nginx.error-default-01', - }, - statusCode: 404, -}; - -const MOCK_SEARCH_RESPONSE = { - took: 2, - timed_out: false, - _shards: { - total: 1, - successful: 1, - skipped: 0, - failed: 0, - }, - hits: { - total: { - value: 10000, - relation: 'gte' as SearchTotalHitsRelation, - }, - max_score: null, - hits: [], - }, - aggregations: { - total_count: { - value: 617680, - }, - degraded_count: { - doc_count: 98841, - }, - 'service.name': { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [ - { - key: 'synth-service-0', - doc_count: 206116, - }, - { - key: 'synth-service-1', - doc_count: 206012, - }, - { - key: 'synth-service-2', - doc_count: 205552, - }, - ], - }, - 'host.name': { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [ - { - key: 'synth-host', - doc_count: 617680, - }, - ], - }, - 'kubernetes.pod.uid': { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [], - }, - 'container.id': { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [], - }, - 'cloud.instance.id': { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 614630, - buckets: [ - { - key: '0000000000009121', - doc_count: 61, - }, - { - key: '0000000000009127', - doc_count: 61, - }, - { - key: '0000000000009133', - doc_count: 61, - }, - ], - }, - 'aws.s3.bucket.name': { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [], - }, - 'aws.rds.db_instance.arn': { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [], - }, - 'aws.sqs.queue.name': { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [], - }, - }, -}; - -const MOCK_STATS_RESPONSE = { - _shards: { - total: 2, - successful: 2, - failed: 0, - }, - _all: { - primaries: {}, - total: { - docs: { - count: 1235360, - deleted: 0, - }, - shard_stats: { - total_count: 2, - }, - store: { - size_in_bytes: 145192707, - total_data_set_size_in_bytes: 145192707, - reserved_in_bytes: 0, - }, - indexing: { - index_total: 1235059, - index_time_in_millis: 98509, - index_current: 0, - index_failed: 0, - delete_total: 0, - delete_time_in_millis: 0, - delete_current: 0, - noop_update_total: 0, - is_throttled: false, - throttle_time_in_millis: 0, - write_load: 0.00022633763414114222, - }, - }, - }, - indices: {}, -}; - -const MOCK_DATA_STREAM_RESPONSE = { - data_streams: [ - { - data_stream: errorLogsDataStream, - backing_indices: 1, - store_size: '19.1mb', - store_size_bytes: 20070975, - maximum_timestamp: 1715941303175, - }, - { - data_stream: accessLogsDataStream, - backing_indices: 1, - store_size: '11.3mb', - store_size_bytes: 20078875, - maximum_timestamp: 1715941304573, - }, - ], -}; - -const MOCK_HAS_PRIVILEGES_RESPONSE = { - username: 'elastic', - has_all_requested: true, - cluster: {}, - index: { - [nonExistentDataStream]: { - monitor: false, - }, - [accessLogsDataStream]: { - monitor: true, - }, - [errorLogsDataStream]: { - monitor: true, - }, - }, - application: {}, -}; diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/get_data_stream_settings.test.ts b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/get_data_stream_settings.test.ts deleted file mode 100644 index 1a4ce17fbce3bd..00000000000000 --- a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/get_data_stream_settings.test.ts +++ /dev/null @@ -1,267 +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 { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; - -import { getDataStreamSettings } from '.'; -import { IndicesGetDataStreamResponse } from '@elastic/elasticsearch/lib/api/types'; -const accessLogsDataStream = 'logs-nginx.access-default'; -const errorLogsDataStream = 'logs-nginx.error-default'; -const dateStr1 = '1702998651925'; // .ds-logs-nginx.access-default-2023.12.19-000001 -const dateStr2 = '1703110671019'; // .ds-logs-nginx.access-default-2023.12.20-000002 -const dateStr3 = '1702998866744'; // .ds-logs-nginx.error-default-2023.12.19-000001 - -describe('getDataStreamSettings', () => { - afterAll(() => { - jest.clearAllMocks(); - }); - - it('throws error if index is not found', async () => { - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - esClientMock.indices.getSettings.mockRejectedValue(MOCK_INDEX_ERROR); - - try { - await getDataStreamSettings({ - esClient: esClientMock, - dataStream: 'non-existent', - }); - } catch (e) { - expect(e).toBe(MOCK_INDEX_ERROR); - } - }); - - it('returns creation date of a data stream', async () => { - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - esClientMock.indices.getSettings.mockReturnValue( - Promise.resolve(MOCK_NGINX_ERROR_INDEX_SETTINGS) - ); - esClientMock.indices.getDataStream.mockReturnValue(Promise.resolve(MOCK_NGINX_DATA_STREAM)); - - const dataStreamSettings = await getDataStreamSettings({ - esClient: esClientMock, - dataStream: errorLogsDataStream, - }); - expect(dataStreamSettings).toEqual({ createdOn: Number(dateStr3), integration: 'apache' }); - }); - - it('returns the earliest creation date of a data stream with multiple backing indices', async () => { - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - esClientMock.indices.getSettings.mockReturnValue( - Promise.resolve(MOCK_NGINX_ACCESS_INDEX_SETTINGS) - ); - esClientMock.indices.getDataStream.mockReturnValue(Promise.resolve(MOCK_NGINX_DATA_STREAM)); - - const dataStreamSettings = await getDataStreamSettings({ - esClient: esClientMock, - dataStream: accessLogsDataStream, - }); - expect(dataStreamSettings).toEqual({ createdOn: Number(dateStr1), integration: 'apache' }); - }); -}); - -const MOCK_NGINX_ACCESS_INDEX_SETTINGS = { - [`.ds-${accessLogsDataStream}-2023.12.19-000001`]: { - settings: { - index: { - mapping: { - total_fields: { - limit: 10000, - }, - ignore_malformed: true, - }, - hidden: true, - provided_name: '.ds-logs-nginx.access-default-2023.12.19-000001', - final_pipeline: '.fleet_final_pipeline-1', - query: { - default_field: [ - 'cloud.account.id', - 'cloud.availability_zone', - 'cloud.instance.id', - 'cloud.instance.name', - 'cloud.machine.type', - 'cloud.provider', - 'cloud.region', - ], - }, - creation_date: dateStr1, - number_of_replicas: '1', - uuid: 'uml9fMQqQUibZi2pKkc5sQ', - version: { - created: '8500007', - }, - lifecycle: { - name: 'logs', - indexing_complete: true, - }, - codec: 'best_compression', - routing: { - allocation: { - include: { - _tier_preference: 'data_hot', - }, - }, - }, - number_of_shards: '1', - default_pipeline: 'logs-nginx.access-1.17.0', - }, - }, - }, - [`.ds-${accessLogsDataStream}-2023.12.20-000002`]: { - settings: { - index: { - mapping: { - total_fields: { - limit: 10000, - }, - ignore_malformed: true, - }, - hidden: true, - provided_name: '.ds-logs-nginx.access-default-2023.12.20-000002', - final_pipeline: '.fleet_final_pipeline-1', - query: { - default_field: [ - 'user.name', - 'user_agent.device.name', - 'user_agent.name', - 'user_agent.original', - 'user_agent.os.full', - 'user_agent.os.name', - 'user_agent.os.version', - 'user_agent.version', - 'nginx.access.remote_ip_list', - ], - }, - creation_date: dateStr2, - number_of_replicas: '1', - uuid: 'il9vJlOXRdiv44wU6WNtUQ', - version: { - created: '8500007', - }, - lifecycle: { - name: 'logs', - }, - codec: 'best_compression', - routing: { - allocation: { - include: { - _tier_preference: 'data_hot', - }, - }, - }, - number_of_shards: '1', - default_pipeline: 'logs-nginx.access-1.17.0', - }, - }, - }, -}; - -const MOCK_NGINX_ERROR_INDEX_SETTINGS = { - [`.ds-${errorLogsDataStream}-2023.12.19-000001`]: { - settings: { - index: { - mapping: { - total_fields: { - limit: 10000, - }, - ignore_malformed: true, - }, - hidden: true, - provided_name: '.ds-logs-nginx.error-default-2023.12.19-000001', - final_pipeline: '.fleet_final_pipeline-1', - query: { - default_field: [ - 'host.type', - 'input.type', - 'log.file.path', - 'log.level', - 'ecs.version', - 'message', - 'tags', - ], - }, - creation_date: dateStr3, - number_of_replicas: '1', - uuid: 'fGPYUppSRU62MZ3toF0MkQ', - version: { - created: '8500007', - }, - lifecycle: { - name: 'logs', - }, - codec: 'best_compression', - routing: { - allocation: { - include: { - _tier_preference: 'data_hot', - }, - }, - }, - number_of_shards: '1', - default_pipeline: 'logs-nginx.error-1.17.0', - }, - }, - }, -}; - -const MOCK_INDEX_ERROR = { - error: { - root_cause: [ - { - type: 'index_not_found_exception', - reason: 'no such index [logs-nginx.error-default-01]', - 'resource.type': 'index_or_alias', - 'resource.id': 'logs-nginx.error-default-01', - index_uuid: '_na_', - index: 'logs-nginx.error-default-01', - }, - ], - type: 'index_not_found_exception', - reason: 'no such index [logs-nginx.error-default-01]', - 'resource.type': 'index_or_alias', - 'resource.id': 'logs-nginx.error-default-01', - index_uuid: '_na_', - index: 'logs-nginx.error-default-01', - }, - status: 404, -}; - -const MOCK_NGINX_DATA_STREAM: IndicesGetDataStreamResponse = { - data_streams: [ - { - name: 'logs-apache.access-production', - timestamp_field: { - name: '@timestamp', - }, - indices: [ - { - index_name: '.ds-logs-apache.access-production-2024.07.03-000001', - index_uuid: 'xrGjQ-GFSeqAlUbyS0Fx-A', - prefer_ilm: true, - ilm_policy: 'logs', - managed_by: 'Index Lifecycle Management', - }, - ], - generation: 1, - _meta: { - package: { - name: 'apache', - }, - managed: true, - managed_by: 'fleet', - }, - status: 'YELLOW', - template: 'logs-apache.access', - ilm_policy: 'logs', - next_generation_managed_by: 'Index Lifecycle Management', - prefer_ilm: true, - hidden: false, - system: false, - allow_custom_routing: false, - replicated: false, - }, - ], -}; diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_streams/get_data_streams.test.ts b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_streams/get_data_streams.test.ts index 13e889cefc684e..ae28384e7a160b 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_streams/get_data_streams.test.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_streams/get_data_streams.test.ts @@ -36,26 +36,6 @@ describe('getDataStreams', () => { jest.restoreAllMocks(); }); - it('Returns empty list when user doesnt have access to dataset', async () => { - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - mockGetDatasetPrivileges.mockImplementationOnce(() => ({ - canRead: false, - canMonitor: false, - canViewIntegrations: false, - })); - - const result = await getDataStreams({ - esClient: esClientMock, - type: 'logs', - datasetQuery: 'nginx', - uncategorisedOnly: false, - }); - expect(result.items).toEqual([]); - expect(result.datasetUserPrivileges.canMonitor).toBe(false); - - expect(dataStreamService.getMatchingDataStreams).not.toHaveBeenCalled(); - }); - it('Passes the correct parameters to the DataStreamService', async () => { const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); const result = await getDataStreams({ @@ -72,53 +52,7 @@ describe('getDataStreams', () => { expect(result.datasetUserPrivileges.canMonitor).toBe(true); }); - it('Formats the items correctly', async () => { - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - - const results = await getDataStreams({ - esClient: esClientMock, - type: 'logs', - uncategorisedOnly: false, - }); - expect(results.items.sort()).toEqual([ - { - name: 'logs-elastic_agent-default', - integration: 'elastic_agent', - userPrivileges: { - canMonitor: true, - }, - }, - { - name: 'logs-elastic_agent.filebeat-default', - integration: 'elastic_agent', - userPrivileges: { - canMonitor: true, - }, - }, - { - name: 'logs-elastic_agent.fleet_server-default', - integration: 'elastic_agent', - userPrivileges: { - canMonitor: true, - }, - }, - { - name: 'logs-elastic_agent.metricbeat-default', - integration: 'elastic_agent', - userPrivileges: { - canMonitor: true, - }, - }, - { - name: 'logs-test.test-default', - userPrivileges: { - canMonitor: true, - }, - }, - ]); - }); - - describe('uncategorisedOnly option', () => { + describe('uncategorized only option', () => { it('Returns the correct number of results when true', async () => { const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); const results = await getDataStreams({ diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_streams_stats/get_data_streams_stats.test.ts b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_streams_stats/get_data_streams_stats.test.ts deleted file mode 100644 index 5aa429ea52f9a8..00000000000000 --- a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_streams_stats/get_data_streams_stats.test.ts +++ /dev/null @@ -1,149 +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 { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; -import { dataStreamService } from '../../../services'; - -import { getDataStreamsStats } from '.'; - -jest.mock('../../../services/data_stream', () => { - return { - dataStreamService: { - getStreamsStats: jest.fn().mockImplementation(() => { - return [ - { - data_stream: 'logs-elastic_agent-default', - backing_indices: 1, - store_size: '1gb', - store_size_bytes: 1170805528, - maximum_timestamp: 1698916071000, - }, - { - data_stream: 'logs-elastic_agent.filebeat-default', - backing_indices: 1, - store_size: '1.3mb', - store_size_bytes: 1459100, - maximum_timestamp: 1698902209996, - }, - { - data_stream: 'logs-elastic_agent.fleet_server-default', - backing_indices: 1, - store_size: '2.9mb', - store_size_bytes: 3052148, - maximum_timestamp: 1698914110010, - }, - { - data_stream: 'logs-elastic_agent.metricbeat-default', - backing_indices: 1, - store_size: '1.6mb', - store_size_bytes: 1704807, - maximum_timestamp: 1698672046707, - }, - { - data_stream: 'logs-test.test-default', - backing_indices: 1, - store_size: '6.2mb', - store_size_bytes: 6570447, - maximum_timestamp: 1698913802000, - }, - ]; - }), - }, - }; -}); -jest.mock('../../../services/index_stats', () => { - return { - indexStatsService: { - getIndicesDocCounts: jest.fn().mockImplementation(() => { - return { - docsCountPerDataStream: { - 'logs-elastic_agent-default': 100, - 'logs-elastic_agent.filebeat-default': 200, - 'logs-elastic_agent.fleet_server-default': 0, - 'logs-elastic_agent.metricbeat-default': 245, - }, - }; - }), - }, - }; -}); - -const dataStream = 'logs-nginx.access-default'; - -describe('getDataStreams', () => { - it('Passes the correct parameters to the DataStreamService', async () => { - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - await getDataStreamsStats({ - esClient: esClientMock, - dataStreams: [dataStream], - }); - expect(dataStreamService.getStreamsStats).toHaveBeenCalledWith(expect.anything(), [dataStream]); - }); - - it('returns an empty list when no dataStreams are provided', async () => { - jest.clearAllMocks(); - - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - const results = await getDataStreamsStats({ - esClient: esClientMock, - dataStreams: [], - }); - expect(dataStreamService.getStreamsStats).not.toHaveBeenCalled(); - expect(results.items).toEqual([]); - }); - - it('Formats the items correctly', async () => { - const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - const results = await getDataStreamsStats({ - esClient: esClientMock, - dataStreams: [ - 'logs-elastic_agent-default', - 'logs-elastic_agent.filebeat-default', - 'logs-elastic_agent.fleet_server-default', - 'logs-elastic_agent.metricbeat-default', - 'logs-test.test-default', - ], - }); - expect(results.items.sort()).toEqual([ - { - name: 'logs-elastic_agent-default', - size: '1gb', - sizeBytes: 1170805528, - lastActivity: 1698916071000, - totalDocs: 100, - }, - { - name: 'logs-elastic_agent.filebeat-default', - size: '1.3mb', - sizeBytes: 1459100, - lastActivity: 1698902209996, - totalDocs: 200, - }, - { - name: 'logs-elastic_agent.fleet_server-default', - size: '2.9mb', - sizeBytes: 3052148, - lastActivity: 1698914110010, - totalDocs: 0, - }, - { - name: 'logs-elastic_agent.metricbeat-default', - size: '1.6mb', - sizeBytes: 1704807, - lastActivity: 1698672046707, - totalDocs: 245, - }, - { - name: 'logs-test.test-default', - size: '6.2mb', - sizeBytes: 6570447, - lastActivity: 1698913802000, - totalDocs: 0, - }, - ]); - }); -}); From 6c1e955e8ba2bbbff9701f002a8cdb11999cfd18 Mon Sep 17 00:00:00 2001 From: Connor Yager Date: Mon, 8 Jul 2024 08:51:22 -0400 Subject: [PATCH 005/103] Remove unused code for redundant groupBy field in custom threshold and metric threshold rules (#184787) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Closes #184712 Previously, when a user tries to create an alert with a `groupBy` with a field that is already filtered down to just one match by the KQL query, the UI would warn them that the filter query already contains an exact match. However, this is not desirable behavior, as adding "redundant" groupBy fields can be used to trigger alerts for data storage scenarios. Regardless, this warning is not currently being enforced by the UI and the warning was never enforced by the API, so this change removes the logic. Change that had initially implemented this logic: https://github.com/elastic/kibana/pull/111891 This screenshot shows an example alert configuration that would previously have gotten a warning: ![Screenshot 2024-06-04 at 4 48 37 PM](https://github.com/elastic/kibana/assets/29263108/aa160f4f-b7e6-493f-a551-a6995cffedb5) ### Checklist Delete any items that are not applicable to this PR. - [X] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [X] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [X] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [X] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) ### 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: Maryam Saeidi --- .../components/expression.tsx | 54 ------------------- .../metrics_explorer/components/group_by.tsx | 15 ++---- .../custom_threshold/components/group_by.tsx | 15 ++---- .../custom_threshold_rule_expression.tsx | 54 ------------------- .../translations/translations/fr-FR.json | 4 -- .../translations/translations/ja-JP.json | 4 -- .../translations/translations/zh-CN.json | 4 -- 7 files changed, 6 insertions(+), 144 deletions(-) diff --git a/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/expression.tsx b/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/expression.tsx index 9eaf5e2bd7b459..798a0db85e2f07 100644 --- a/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/expression.tsx +++ b/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/expression.tsx @@ -12,7 +12,6 @@ import { EuiFieldSearch, EuiFormRow, EuiIconTip, - EuiLink, EuiPanel, EuiSpacer, EuiText, @@ -35,7 +34,6 @@ import { useSourceContext, withSourceProvider, } from '../../../containers/metrics_source'; -import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; import { MetricsExplorerGroupBy } from '../../../pages/metrics/metrics_explorer/components/group_by'; import { MetricsExplorerKueryBar } from '../../../pages/metrics/metrics_explorer/components/kuery_bar'; import { MetricsExplorerOptions } from '../../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options'; @@ -66,7 +64,6 @@ export { defaultExpression }; export const Expressions: React.FC = (props) => { const { setRuleParams, ruleParams, errors, metadata } = props; - const { docLinks } = useKibanaContextForPlugin().services; const { source } = useSourceContext(); const { metricsView } = useMetricsDataViewContext(); const [timeSize, setTimeSize] = useState(1); @@ -267,30 +264,6 @@ export const Expressions: React.FC = (props) => { [ruleParams.criteria] ); - // Test to see if any of the group fields in groupBy are already filtered down to a single - // group by the filterQuery. If this is the case, then a groupBy is unnecessary, as it would only - // ever produce one group instance - const groupByFilterTestPatterns = useMemo(() => { - if (!ruleParams.groupBy) return null; - const groups = !Array.isArray(ruleParams.groupBy) ? [ruleParams.groupBy] : ruleParams.groupBy; - return groups.map((group: string) => ({ - groupName: group, - pattern: new RegExp(`{"match(_phrase)?":{"${group}":"(.*?)"}}`), - })); - }, [ruleParams.groupBy]); - - const redundantFilterGroupBy = useMemo(() => { - const { filterQuery } = ruleParams; - if (typeof filterQuery !== 'string' || !groupByFilterTestPatterns) return []; - return groupByFilterTestPatterns - .map(({ groupName, pattern }) => { - if (pattern.test(filterQuery)) { - return groupName; - } - }) - .filter((g) => typeof g === 'string') as string[]; - }, [ruleParams, groupByFilterTestPatterns]); - return ( <> @@ -465,35 +438,8 @@ export const Expressions: React.FC = (props) => { ...options, groupBy: ruleParams.groupBy || undefined, }} - errorOptions={redundantFilterGroupBy} /> - {redundantFilterGroupBy.length > 0 && ( - <> - - - {redundantFilterGroupBy.join(', ')}, - groupCount: redundantFilterGroupBy.length, - filteringAndGroupingLink: ( - - {i18n.translate( - 'xpack.infra.metrics.alertFlyout.alertPerRedundantFilterError.docsLink', - { defaultMessage: 'the docs' } - )} - - ), - }} - /> - - - )} void; - errorOptions?: string[]; } -export const MetricsExplorerGroupBy = ({ options, onChange, errorOptions }: Props) => { +export const MetricsExplorerGroupBy = ({ options, onChange }: Props) => { const { metricsView } = useMetricsDataViewContext(); const handleChange = useCallback( (selectedOptions: Array<{ label: string }>) => { @@ -28,17 +27,9 @@ export const MetricsExplorerGroupBy = ({ options, onChange, errorOptions }: Prop ); const selectedOptions = Array.isArray(options.groupBy) - ? options.groupBy.map((field) => ({ - label: field, - color: errorOptions?.includes(field) ? 'danger' : undefined, - })) + ? options.groupBy.map((field) => ({ label: field })) : options.groupBy - ? [ - { - label: options.groupBy, - color: errorOptions?.includes(options.groupBy) ? 'danger' : undefined, - }, - ] + ? [{ label: options.groupBy }] : []; const comboOptions = (metricsView?.fields ?? []) diff --git a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/group_by.tsx b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/group_by.tsx index 199f5357fbea47..54047f42971f21 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/group_by.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/group_by.tsx @@ -22,10 +22,9 @@ interface Props { options: GroupByOptions; onChange: (groupBy: GroupBy) => void; fields: MetricsExplorerFields; - errorOptions?: string[]; } -export function GroupBy({ options, onChange, fields, errorOptions, ...rest }: Props) { +export function GroupBy({ options, onChange, fields, ...rest }: Props) { const handleChange = useCallback( (selectedOptions: Array<{ label: string }>) => { const groupBy = selectedOptions.map((option) => option.label); @@ -35,17 +34,9 @@ export function GroupBy({ options, onChange, fields, errorOptions, ...rest }: Pr ); const selectedOptions = Array.isArray(options.groupBy) - ? options.groupBy.map((field) => ({ - label: field, - color: errorOptions?.includes(field) ? 'danger' : undefined, - })) + ? options.groupBy.map((field) => ({ label: field })) : options.groupBy - ? [ - { - label: options.groupBy, - color: errorOptions?.includes(options.groupBy) ? 'danger' : undefined, - }, - ] + ? [{ label: options.groupBy }] : []; return ( diff --git a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/custom_threshold_rule_expression.tsx b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/custom_threshold_rule_expression.tsx index 0db9c2f048e113..061805a709ea69 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/custom_threshold_rule_expression.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/custom_threshold_rule_expression.tsx @@ -16,10 +16,8 @@ import { EuiFormRow, EuiHorizontalRule, EuiIconTip, - EuiLink, EuiLoadingSpinner, EuiSpacer, - EuiText, EuiTitle, } from '@elastic/eui'; import { ISearchSource, Query } from '@kbn/data-plugin/common'; @@ -72,7 +70,6 @@ export default function Expressions(props: Props) { data, dataViews, dataViewEditor, - docLinks, unifiedSearch: { ui: { SearchBar }, }, @@ -331,30 +328,6 @@ export default function Expressions(props: Props) { [ruleParams.groupBy] ); - // Test to see if any of the group fields in groupBy are already filtered down to a single - // group by the filterQuery. If this is the case, then a groupBy is unnecessary, as it would only - // ever produce one group instance - const groupByFilterTestPatterns = useMemo(() => { - if (!ruleParams.groupBy) return null; - const groups = !Array.isArray(ruleParams.groupBy) ? [ruleParams.groupBy] : ruleParams.groupBy; - return groups.map((group: string) => ({ - groupName: group, - pattern: new RegExp(`{"match(_phrase)?":{"${group}":"(.*?)"}}`), - })); - }, [ruleParams.groupBy]); - - const redundantFilterGroupBy = useMemo(() => { - const { filterQuery } = ruleParams; - if (typeof filterQuery !== 'string' || !groupByFilterTestPatterns) return []; - return groupByFilterTestPatterns - .map(({ groupName, pattern }) => { - if (pattern.test(filterQuery)) { - return groupName; - } - }) - .filter((g) => typeof g === 'string') as string[]; - }, [ruleParams, groupByFilterTestPatterns]); - if (paramsError) { return ( <> @@ -562,35 +535,8 @@ export default function Expressions(props: Props) { options={{ groupBy: ruleParams.groupBy || null, }} - errorOptions={redundantFilterGroupBy} /> - {redundantFilterGroupBy.length > 0 && ( - <> - - - {redundantFilterGroupBy.join(', ')}, - groupCount: redundantFilterGroupBy.length, - filteringAndGroupingLink: ( - - {i18n.translate( - 'xpack.observability.customThreshold.rule.alertFlyout.alertPerRedundantFilterError.docsLink', - { defaultMessage: 'the docs' } - )} - - ), - }} - /> - - - )} Date: Mon, 8 Jul 2024 14:22:42 +0100 Subject: [PATCH 006/103] [FTR](index management) update common serverless api tests to use api keys (#184105) ## Summary Use api keys for api calls, to act as a real user **not the operator user,** within: `x-pack/test_serverless/api_integration/test_suites/common/index_management/` Update `test_serverless/README.md` ## Important (More helpers) In order to create severless versions of statefull helpers that require role credentials, the pr adds a number of helpers to `x-pack/test_serverless/api_integration/services/index_management/svl_*.ts` With these additions, any given serverless api integration test can call the serverless version of a helper, and the stateful version of the helper, is left untouched. Further, the type checker is satisfied (cant share code across boundaries, etc. mostly within the tsconfig.json files). ## For Reviewers ### Issues raised: index_templates: https://github.com/elastic/kibana/issues/187368 datastreams: https://github.com/elastic/kibana/issues/187372 settings: https://github.com/elastic/kibana/issues/187369 Contributes to: https://github.com/elastic/kibana/issues/180834 --------- Co-authored-by: Elastic Machine --- .../index_management/component_templates.ts | 64 +++--- .../index_management/enrich_policies.ts | 12 +- .../management/index_management/mapping.ts | 10 +- .../management/index_management/settings.ts | 3 +- x-pack/test_serverless/README.md | 9 +- .../api_integration/services/index.ts | 25 +++ .../services/index_management/constants.ts | 34 +++ .../index_management/svl_cluster_nodes.api.ts | 25 +++ .../svl_component_templates.api.ts | 77 +++++++ .../svl_component_templates.helpers.ts | 90 ++++++++ .../svl_datastreams.helpers.ts | 96 ++++++++ .../svl_enrich_policies.api.ts | 39 ++++ .../svl_enrich_policies.helpers.ts | 51 +++++ .../index_management/svl_indices.api.ts | 88 ++++++++ .../index_management/svl_indices.helpers.ts | 35 +++ .../index_management/svl_mappings.api.ts | 33 +++ .../services/index_management/svl_random.ts | 13 ++ .../index_management/svl_settings.api.ts | 38 ++++ .../index_management/svl_templates.api.ts | 81 +++++++ .../index_management/svl_templates.helpers.ts | 95 ++++++++ .../common/index_management/cluster_nodes.ts | 24 +- .../create_enrich_policies.ts | 33 ++- .../common/index_management/datastreams.ts | 160 ++++++-------- .../index_management/enrich_policies.ts | 42 ++-- .../common/index_management/index.ts | 2 +- .../index_component_templates.ts | 205 +++++++++++------- .../index_management/index_templates.ts | 165 +++++++------- .../common/index_management/indices.ts | 95 ++++---- .../index_management/inference_endpoints.ts | 16 +- .../common/index_management/mappings.ts | 28 +-- .../common/index_management/settings.ts | 44 ++-- 31 files changed, 1306 insertions(+), 426 deletions(-) create mode 100644 x-pack/test_serverless/api_integration/services/index_management/constants.ts create mode 100644 x-pack/test_serverless/api_integration/services/index_management/svl_cluster_nodes.api.ts create mode 100644 x-pack/test_serverless/api_integration/services/index_management/svl_component_templates.api.ts create mode 100644 x-pack/test_serverless/api_integration/services/index_management/svl_component_templates.helpers.ts create mode 100644 x-pack/test_serverless/api_integration/services/index_management/svl_datastreams.helpers.ts create mode 100644 x-pack/test_serverless/api_integration/services/index_management/svl_enrich_policies.api.ts create mode 100644 x-pack/test_serverless/api_integration/services/index_management/svl_enrich_policies.helpers.ts create mode 100644 x-pack/test_serverless/api_integration/services/index_management/svl_indices.api.ts create mode 100644 x-pack/test_serverless/api_integration/services/index_management/svl_indices.helpers.ts create mode 100644 x-pack/test_serverless/api_integration/services/index_management/svl_mappings.api.ts create mode 100644 x-pack/test_serverless/api_integration/services/index_management/svl_random.ts create mode 100644 x-pack/test_serverless/api_integration/services/index_management/svl_settings.api.ts create mode 100644 x-pack/test_serverless/api_integration/services/index_management/svl_templates.api.ts create mode 100644 x-pack/test_serverless/api_integration/services/index_management/svl_templates.helpers.ts diff --git a/x-pack/test/api_integration/apis/management/index_management/component_templates.ts b/x-pack/test/api_integration/apis/management/index_management/component_templates.ts index bb37e04941b78a..fb57f0813d843a 100644 --- a/x-pack/test/api_integration/apis/management/index_management/component_templates.ts +++ b/x-pack/test/api_integration/apis/management/index_management/component_templates.ts @@ -81,8 +81,8 @@ export default function ({ getService }: FtrProviderContext) { describe('all component templates', () => { it('should return an array of component templates', async () => { - const { body: componentTemplates } = await getAllComponentTemplates().expect(200); - + const { status, body: componentTemplates } = await getAllComponentTemplates(); + expect(status).to.eql(200); const testComponentTemplate = componentTemplates.find( ({ name }: { name: string }) => name === COMPONENT_NAME ); @@ -101,8 +101,8 @@ export default function ({ getService }: FtrProviderContext) { describe('one component template', () => { it('should return a single component template', async () => { - const { body } = await getOneComponentTemplate(COMPONENT_NAME).expect(200); - + const { status, body } = await getOneComponentTemplate(COMPONENT_NAME); + expect(status).to.eql(200); expect(body).to.eql({ name: COMPONENT_NAME, ...COMPONENT, @@ -130,7 +130,7 @@ export default function ({ getService }: FtrProviderContext) { }); it('should create a component template', async () => { - const { body } = await createComponentTemplate(COMPONENT_NAME, { + const { status, body } = await createComponentTemplate(COMPONENT_NAME, { version: 1, template: { settings: { @@ -163,22 +163,23 @@ export default function ({ getService }: FtrProviderContext) { usedBy: [], isManaged: false, }, - }).expect(200); - + }); + expect(status).to.eql(200); expect(body).to.eql({ acknowledged: true, }); }); it('should create a component template with only required fields', async () => { - const { body } = await createComponentTemplate(REQUIRED_FIELDS_COMPONENT_NAME, { + const { status, body } = await createComponentTemplate(REQUIRED_FIELDS_COMPONENT_NAME, { // Excludes version and _meta fields template: {}, _kbnMeta: { usedBy: [], isManaged: false, }, - }).expect(200); + }); + expect(status).to.eql(200); expect(body).to.eql({ acknowledged: true, @@ -186,13 +187,14 @@ export default function ({ getService }: FtrProviderContext) { }); it('should not allow creation of a component template with the same name of an existing one', async () => { - const { body } = await createComponentTemplate(COMPONENT_NAME, { + const { status, body } = await createComponentTemplate(COMPONENT_NAME, { template: {}, _kbnMeta: { usedBy: [], isManaged: false, }, - }).expect(409); + }); + expect(status).to.eql(409); expect(body).to.eql({ statusCode: 409, @@ -239,29 +241,30 @@ export default function ({ getService }: FtrProviderContext) { }); it('should allow an existing component template to be updated', async () => { - const { body } = await updateComponentTemplate(COMPONENT_NAME, { + const { status, body } = await updateComponentTemplate(COMPONENT_NAME, { ...COMPONENT, version: 1, _kbnMeta: { usedBy: [], isManaged: false, }, - }).expect(200); - + }); + expect(status).to.eql(200); expect(body).to.eql({ acknowledged: true, }); }); it('should not allow a non-existing component template to be updated', async () => { - const { body } = await updateComponentTemplate('component_does_not_exist', { + const { status, body } = await updateComponentTemplate('component_does_not_exist', { ...COMPONENT, version: 1, _kbnMeta: { usedBy: [], isManaged: false, }, - }).expect(404); + }); + expect(status).to.eql(404); expect(body).to.eql({ statusCode: 404, @@ -297,18 +300,17 @@ export default function ({ getService }: FtrProviderContext) { log.debug('[Setup error] Error creating component template'); throw err; } - const { body } = await updateComponentTemplate(deprecatedTemplateName, { + const { status, body } = await updateComponentTemplate(deprecatedTemplateName, { ...deprecatedTemplate, version: 1, _kbnMeta: { usedBy: [], isManaged: false, }, - }).expect(200); - - expect(body).to.eql({ - acknowledged: true, }); + expect(status).to.eql(200); + + expect(body).to.eql({ acknowledged: true }); }); }); @@ -342,7 +344,8 @@ export default function ({ getService }: FtrProviderContext) { it('should delete a component template', async () => { const { name } = componentTemplateA; - const { body } = await deleteComponentTemplate(name).expect(200); + const { status, body } = await deleteComponentTemplate(name); + expect(status).to.eql(200); expect(body).to.eql({ itemsDeleted: [name], @@ -355,10 +358,10 @@ export default function ({ getService }: FtrProviderContext) { const { name: componentTemplate2Name } = componentTemplateC; const { + status, body: { itemsDeleted, errors }, - } = await deleteComponentTemplate( - `${componentTemplate1Name},${componentTemplate2Name}` - ).expect(200); + } = await deleteComponentTemplate(`${componentTemplate1Name},${componentTemplate2Name}`); + expect(status).to.eql(200); expect(errors).to.eql([]); @@ -372,9 +375,10 @@ export default function ({ getService }: FtrProviderContext) { const COMPONENT_DOES_NOT_EXIST = 'component_does_not_exist'; const { name: componentTemplateName } = componentTemplateD; - const { body } = await deleteComponentTemplate( + const { status, body } = await deleteComponentTemplate( `${componentTemplateName},${COMPONENT_DOES_NOT_EXIST}` - ).expect(200); + ); + expect(status).to.eql(200); expect(body.itemsDeleted).to.eql([componentTemplateName]); expect(body.errors[0].name).to.eql(COMPONENT_DOES_NOT_EXIST); @@ -452,7 +456,8 @@ export default function ({ getService }: FtrProviderContext) { describe('without datastreams', () => { it('should return no datastreams', async () => { - const { body } = await getComponentTemplateDatastreams(COMPONENT_NAME).expect(200); + const { status, body } = await getComponentTemplateDatastreams(COMPONENT_NAME); + expect(status).to.eql(200); expect(body).to.eql({ data_streams: [] }); }); @@ -463,7 +468,8 @@ export default function ({ getService }: FtrProviderContext) { await addDatastream(DATASTREAM_NAME, CACHE_TEMPLATES); }); it('should return datastreams', async () => { - const { body } = await getComponentTemplateDatastreams(COMPONENT_NAME).expect(200); + const { status, body } = await getComponentTemplateDatastreams(COMPONENT_NAME); + expect(status).to.eql(200); expect(body).to.eql({ data_streams: ['logs-test-component-template-default'] }); }); diff --git a/x-pack/test/api_integration/apis/management/index_management/enrich_policies.ts b/x-pack/test/api_integration/apis/management/index_management/enrich_policies.ts index 9fe4bd67baceb8..4cdb5da7a937b1 100644 --- a/x-pack/test/api_integration/apis/management/index_management/enrich_policies.ts +++ b/x-pack/test/api_integration/apis/management/index_management/enrich_policies.ts @@ -5,7 +5,7 @@ * 2.0. */ -import expect from 'expect'; +import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; import { enrichPoliciesApi } from './lib/enrich_policies.api'; @@ -43,9 +43,10 @@ export default function ({ getService }: FtrProviderContext) { }); it('should list all policies', async () => { - const { body } = await getAllEnrichPolicies().expect(200); + const { status, body } = await getAllEnrichPolicies(); + expect(status).to.eql(200); - expect(body).toStrictEqual([ + expect(body).to.eql([ { enrichFields: ['firstName'], matchField: 'email', @@ -57,7 +58,8 @@ export default function ({ getService }: FtrProviderContext) { }); it('should be able to execute a policy', async () => { - await executeEnrichPolicy(POLICY_NAME).expect(200); + const { status } = await executeEnrichPolicy(POLICY_NAME); + expect(status).to.eql(200); // Wait for a little bit for the policy to be executed, so that it can // be deleted in the next test. @@ -69,7 +71,7 @@ export default function ({ getService }: FtrProviderContext) { // In the odd case that the policy is somehow still being executed, the delete // method might return a 429 so we need to account for that. - expect([200, 429]).toContain(status); + expect([200, 429]).to.contain(status); }); }); } diff --git a/x-pack/test/api_integration/apis/management/index_management/mapping.ts b/x-pack/test/api_integration/apis/management/index_management/mapping.ts index 9fd638329d1f5c..8515e2be308f0a 100644 --- a/x-pack/test/api_integration/apis/management/index_management/mapping.ts +++ b/x-pack/test/api_integration/apis/management/index_management/mapping.ts @@ -50,13 +50,17 @@ export default function ({ getService }: FtrProviderContext) { }); it('should get the index mappings', async () => { - const { body } = await getMapping(indexName).expect(200); + const { status, body } = await getMapping(indexName); + expect(status).to.eql(200); expect(body.mappings).to.eql(mappings); }); it('show update the index mappings', async () => { - await updateMappings(indexName).expect(200); - const { body } = await getMapping(indexName).expect(200); + const { status } = await updateMappings(indexName); + expect(status).to.eql(200); + const { status: getStatus, body } = await getMapping(indexName); + expect(getStatus).to.eql(200); + expect(body.mappings).to.eql({ ...mappings, properties: { ...mappings.properties, name: { type: 'text' } }, diff --git a/x-pack/test/api_integration/apis/management/index_management/settings.ts b/x-pack/test/api_integration/apis/management/index_management/settings.ts index 573a0374e9c25d..e6986dfca86227 100644 --- a/x-pack/test/api_integration/apis/management/index_management/settings.ts +++ b/x-pack/test/api_integration/apis/management/index_management/settings.ts @@ -21,7 +21,8 @@ export default function ({ getService }: FtrProviderContext) { it('should fetch an index settings', async () => { const index = await createIndex(); - const { body } = await getIndexSettings(index).expect(200); + const { status, body } = await getIndexSettings(index); + expect(status).to.eql(200); // Verify we fetch the corret index settings expect(body.settings.index.provided_name).to.be(index); diff --git a/x-pack/test_serverless/README.md b/x-pack/test_serverless/README.md index 6fb7551859e5bc..2ea645c1d9ae2c 100644 --- a/x-pack/test_serverless/README.md +++ b/x-pack/test_serverless/README.md @@ -54,9 +54,10 @@ configurations. **If you add a new `api_integration` or `functional` `common` sub-directory, remember to add it to the corresponding `common_configs` of all projects (`x-pack/test_serverless/[api_integration|functional]/test_suites/[observability|search|security]/common_configs`).** -In case a common test needs to be skipped for one of the projects, there are the following -suite tags available to do so: `skipSvlOblt`, `skipSvlSearch`, `skipSvlSec`, which can be -added like this to a test suite: +In case a common test needs to be skipped for one of the projects +(in both regular pipelines that start KBN in serverless mode [against serverless ES] & pipelines creating serverless projects in MKI [Cloud]), +there are the following suite tags available to do so: +`skipSvlOblt`, `skipSvlSearch`, `skipSvlSec`, which can be added like this to a test suite: ``` describe('my test suite', function () { @@ -258,4 +259,4 @@ describe("my test suite", async function() { }); ``` -If you are running tests from your local against MKI projects, make sure to add `--exclude-tag=skipMKI` to your FTR command. +If you are running tests from your local against MKI projects, make sure to add `--exclude-tag=skipMKI` to your FTR command. \ No newline at end of file diff --git a/x-pack/test_serverless/api_integration/services/index.ts b/x-pack/test_serverless/api_integration/services/index.ts index 69040d96218f3a..347fc1f68b0cab 100644 --- a/x-pack/test_serverless/api_integration/services/index.ts +++ b/x-pack/test_serverless/api_integration/services/index.ts @@ -14,7 +14,20 @@ import { SamlToolsProvider } from './saml_tools'; import { SvlCasesServiceProvider } from './svl_cases'; import { SloApiProvider } from './slo_api'; import { TransformProvider } from './transform'; + +import { SvlEnrichPoliciesApi } from './index_management/svl_enrich_policies.api'; +import { SvlSettingsApi } from './index_management/svl_settings.api'; +import { SvlIndicesApi } from './index_management/svl_indices.api'; +import { SvlIndicesHelpers } from './index_management/svl_indices.helpers'; +import { SvlEnrichPoliciesHelpers } from './index_management/svl_enrich_policies.helpers'; +import { SvlDatastreamsHelpers } from './index_management/svl_datastreams.helpers'; +import { SvlComponentTemplatesApi } from './index_management/svl_component_templates.api'; +import { SvlComponentTemplateHelpers } from './index_management/svl_component_templates.helpers'; +import { SvlTemplatesHelpers } from './index_management/svl_templates.helpers'; +import { SvlTemplatesApi } from './index_management/svl_templates.api'; +import { SvlMappingsApi } from './index_management/svl_mappings.api'; import { SynthtraceProvider } from './synthtrace'; +import { SvlClusterNodesApi } from './index_management/svl_cluster_nodes.api'; export const services = { // deployment agnostic FTR services @@ -28,6 +41,18 @@ export const services = { sloApi: SloApiProvider, transform: TransformProvider, synthtrace: SynthtraceProvider, + svlEnrichPoliciesApi: SvlEnrichPoliciesApi, + svlSettingsApi: SvlSettingsApi, + svlIndicesApi: SvlIndicesApi, + svlIndicesHelpers: SvlIndicesHelpers, + svlEnrichPoliciesHelpers: SvlEnrichPoliciesHelpers, + svlDatastreamsHelpers: SvlDatastreamsHelpers, + svlComponentTemplatesApi: SvlComponentTemplatesApi, + svlComponentTemplateHelpers: SvlComponentTemplateHelpers, + svlTemplatesHelpers: SvlTemplatesHelpers, + svlTemplatesApi: SvlTemplatesApi, + svlMappingsApi: SvlMappingsApi, + svlClusterNodesApi: SvlClusterNodesApi, }; export type InheritedFtrProviderContext = GenericFtrProviderContext; diff --git a/x-pack/test_serverless/api_integration/services/index_management/constants.ts b/x-pack/test_serverless/api_integration/services/index_management/constants.ts new file mode 100644 index 00000000000000..6d080a1eb95ff6 --- /dev/null +++ b/x-pack/test_serverless/api_integration/services/index_management/constants.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const API_BASE_PATH = '/api/index_management'; +export const INTERNAL_API_BASE_PATH = '/internal/index_management'; + +export const INDEX_PATTERNS = ['test*']; + +const expectedIndexKeys = [ + 'health', + 'hidden', + 'status', + 'name', + 'uuid', + 'primary', + 'replica', + 'documents', + 'documents_deleted', + 'size', + 'primary_size', + 'isFrozen', + 'aliases', + // Cloud disables CCR, so wouldn't expect follower indices. + 'isFollowerIndex', // data enricher + 'ilm', // data enricher + 'isRollupIndex', // data enricher +]; +// We need to sort the keys before comparing then, because race conditions +// can cause enrichers to register in non-deterministic order. +export const sortedExpectedIndexKeys = expectedIndexKeys.sort(); diff --git a/x-pack/test_serverless/api_integration/services/index_management/svl_cluster_nodes.api.ts b/x-pack/test_serverless/api_integration/services/index_management/svl_cluster_nodes.api.ts new file mode 100644 index 00000000000000..f66876ba70e9b6 --- /dev/null +++ b/x-pack/test_serverless/api_integration/services/index_management/svl_cluster_nodes.api.ts @@ -0,0 +1,25 @@ +/* + * Copyright 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 { API_BASE_PATH } from './constants'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { RoleCredentials } from '../../../shared/services'; + +export function SvlClusterNodesApi({ getService }: FtrProviderContext) { + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const svlCommonApi = getService('svlCommonApi'); + + const getNodesPlugins = (roleAuthc: RoleCredentials) => + supertestWithoutAuth + .get(`${API_BASE_PATH}/nodes/plugins`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader); + + return { + getNodesPlugins, + }; +} diff --git a/x-pack/test_serverless/api_integration/services/index_management/svl_component_templates.api.ts b/x-pack/test_serverless/api_integration/services/index_management/svl_component_templates.api.ts new file mode 100644 index 00000000000000..21d197d27209b9 --- /dev/null +++ b/x-pack/test_serverless/api_integration/services/index_management/svl_component_templates.api.ts @@ -0,0 +1,77 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ClusterPutComponentTemplateRequest } from '@elastic/elasticsearch/lib/api/types'; + +import { API_BASE_PATH } from './constants'; +import { RoleCredentials } from '../../../shared/services'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +type Options = Partial | { _kbnMeta: Record }; + +export function SvlComponentTemplatesApi({ getService }: FtrProviderContext) { + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const svlCommonApi = getService('svlCommonApi'); + + const createComponentTemplate = async ( + name: string, + options: Options, + roleAuthc: RoleCredentials + ) => + await supertestWithoutAuth + .post(`${API_BASE_PATH}/component_templates`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send({ name, ...options }); + + const getAllComponentTemplates = async (roleAuthc: RoleCredentials) => + await supertestWithoutAuth + .get(`${API_BASE_PATH}/component_templates`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader); + + const getOneComponentTemplate = async (name: string, roleAuthc: RoleCredentials) => + await supertestWithoutAuth + .get(`${API_BASE_PATH}/component_templates/${name}`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader); + + const updateComponentTemplate = async ( + name: string, + options: Options, + roleAuthc: RoleCredentials + ) => + await supertestWithoutAuth + .get(`${API_BASE_PATH}/component_templates/${name}`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send({ + name, + ...options, + }); + + const deleteComponentTemplate = async (name: string, roleAuthc: RoleCredentials) => + await supertestWithoutAuth + .delete(`${API_BASE_PATH}/component_templates/${name}`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader); + + const getComponentTemplateDatastreams = async (name: string, roleAuthc: RoleCredentials) => + await supertestWithoutAuth + .get(`${API_BASE_PATH}/component_templates/${name}/datastreams`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader); + + return { + createComponentTemplate, + getAllComponentTemplates, + getOneComponentTemplate, + updateComponentTemplate, + deleteComponentTemplate, + getComponentTemplateDatastreams, + }; +} diff --git a/x-pack/test_serverless/api_integration/services/index_management/svl_component_templates.helpers.ts b/x-pack/test_serverless/api_integration/services/index_management/svl_component_templates.helpers.ts new file mode 100644 index 00000000000000..32ad2b7181cc2d --- /dev/null +++ b/x-pack/test_serverless/api_integration/services/index_management/svl_component_templates.helpers.ts @@ -0,0 +1,90 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function SvlComponentTemplateHelpers({ getService }: FtrProviderContext) { + const log = getService('log'); + const es = getService('es'); + + let componentTemplatesCreated: string[] = []; + let indexTemplatesCreated: string[] = []; + let datastreamCreated: string[] = []; + + const removeComponentTemplate = (name: string) => es.cluster.deleteComponentTemplate({ name }); + + const removeDatastream = (datastream: string) => + es.indices.deleteDataStream({ name: datastream }); + + const removeIndexTemplate = (name: string) => + es.indices.deleteIndexTemplate({ name }, { meta: true }); + + const addComponentTemplate = (componentTemplate: any, shouldCacheTemplate: boolean) => { + if (shouldCacheTemplate) { + componentTemplatesCreated.push(componentTemplate.name); + } + + return es.cluster.putComponentTemplate(componentTemplate, { meta: true }); + }; + + const addIndexTemplate = (indexTemplate: any, shouldCacheTemplate: boolean) => { + if (shouldCacheTemplate) { + indexTemplatesCreated.push(indexTemplate.name); + } + + return es.indices.putIndexTemplate(indexTemplate, { meta: true }); + }; + + const addDatastream = (datastream: string, shouldCacheTemplate: boolean) => { + if (shouldCacheTemplate) { + datastreamCreated.push(datastream); + } + + return es.indices.createDataStream({ name: datastream }); + }; + + const cleanUpComponentTemplates = () => + Promise.all(componentTemplatesCreated.map(removeComponentTemplate)) + .then(() => { + componentTemplatesCreated = []; + }) + .catch((err) => { + log.debug(`[Cleanup error] Error deleting ES resources: ${err.message}`); + }); + + const cleanUpIndexTemplates = () => + Promise.all(indexTemplatesCreated.map(removeIndexTemplate)) + .then(() => { + indexTemplatesCreated = []; + }) + .catch((err) => { + log.debug(`[Cleanup error] Error deleting ES resources: ${err.message}`); + }); + + const cleanupDatastreams = () => + Promise.all(datastreamCreated.map(removeDatastream)) + .then(() => { + datastreamCreated = []; + }) + .catch((err) => { + log.debug(`[Cleanup error] Error deleting ES resources: ${err.message}`); + }); + + return { + addDatastream, + addIndexTemplate, + addComponentTemplate, + + removeDatastream, + removeIndexTemplate, + removeComponentTemplate, + + cleanupDatastreams, + cleanUpIndexTemplates, + cleanUpComponentTemplates, + }; +} diff --git a/x-pack/test_serverless/api_integration/services/index_management/svl_datastreams.helpers.ts b/x-pack/test_serverless/api_integration/services/index_management/svl_datastreams.helpers.ts new file mode 100644 index 00000000000000..2ec16de0efd2e6 --- /dev/null +++ b/x-pack/test_serverless/api_integration/services/index_management/svl_datastreams.helpers.ts @@ -0,0 +1,96 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function SvlDatastreamsHelpers({ getService }: FtrProviderContext) { + const es = getService('es'); + + const createDataStream = async (name: string) => { + // A data stream requires an index template before it can be created. + await es.indices.putIndexTemplate({ + name, + body: { + // We need to match the names of backing indices with this template. + index_patterns: [name + '*'], + template: { + mappings: { + properties: { + '@timestamp': { + type: 'date', + }, + }, + }, + lifecycle: { + // @ts-expect-error @elastic/elasticsearch enabled prop is not typed yet + enabled: true, + }, + }, + data_stream: {}, + }, + }); + + await es.indices.createDataStream({ name }); + }; + + const updateIndexTemplateMappings = async (name: string, mappings: any) => { + await es.indices.putIndexTemplate({ + name, + body: { + // We need to match the names of backing indices with this template. + index_patterns: [name + '*'], + template: { + mappings, + }, + data_stream: {}, + }, + }); + }; + + const getDatastream = async (name: string) => { + const { + data_streams: [datastream], + } = await es.indices.getDataStream({ name }); + return datastream; + }; + + const getMapping = async (name: string) => { + const res = await es.indices.getMapping({ index: name }); + + return Object.values(res)[0]!.mappings; + }; + + const deleteComposableIndexTemplate = async (name: string) => { + await es.indices.deleteIndexTemplate({ name }); + }; + + const deleteDataStream = async (name: string) => { + await es.indices.deleteDataStream({ name }); + await deleteComposableIndexTemplate(name); + }; + + const assertDataStreamStorageSizeExists = (storageSize: string, storageSizeBytes: number) => { + // Storage size of a document doesn't look like it would be deterministic (could vary depending + // on how ES, Lucene, and the file system interact), so we'll just assert its presence and + // type. + expect(storageSize).to.be.ok(); + expect(typeof storageSize).to.be('string'); + expect(storageSizeBytes).to.be.ok(); + expect(typeof storageSizeBytes).to.be('number'); + }; + + return { + createDataStream, + updateIndexTemplateMappings, + getDatastream, + getMapping, + deleteComposableIndexTemplate, + deleteDataStream, + assertDataStreamStorageSizeExists, + }; +} diff --git a/x-pack/test_serverless/api_integration/services/index_management/svl_enrich_policies.api.ts b/x-pack/test_serverless/api_integration/services/index_management/svl_enrich_policies.api.ts new file mode 100644 index 00000000000000..3ec9faa1c533bb --- /dev/null +++ b/x-pack/test_serverless/api_integration/services/index_management/svl_enrich_policies.api.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { INTERNAL_API_BASE_PATH } from './constants'; +import { RoleCredentials } from '../../../shared/services'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function SvlEnrichPoliciesApi({ getService }: FtrProviderContext) { + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const svlCommonApi = getService('svlCommonApi'); + + const getAllEnrichPolicies = async (roleAuthc: RoleCredentials) => + await supertestWithoutAuth + .get(`${INTERNAL_API_BASE_PATH}/enrich_policies`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader); + + const executeEnrichPolicy = async (name: string, roleAuthc: RoleCredentials) => + await supertestWithoutAuth + .put(`${INTERNAL_API_BASE_PATH}/enrich_policies/${name}`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader); + + const removeEnrichPolicy = async (name: string, roleAuthc: RoleCredentials) => + await supertestWithoutAuth + .delete(`${INTERNAL_API_BASE_PATH}/enrich_policies/${name}`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader); + + return { + getAllEnrichPolicies, + removeEnrichPolicy, + executeEnrichPolicy, + }; +} diff --git a/x-pack/test_serverless/api_integration/services/index_management/svl_enrich_policies.helpers.ts b/x-pack/test_serverless/api_integration/services/index_management/svl_enrich_policies.helpers.ts new file mode 100644 index 00000000000000..53f498f2fe53ba --- /dev/null +++ b/x-pack/test_serverless/api_integration/services/index_management/svl_enrich_policies.helpers.ts @@ -0,0 +1,51 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function SvlEnrichPoliciesHelpers({ getService }: FtrProviderContext) { + const es = getService('es'); + + const createEnrichPolicy = async (policyName: string, indexName: string) => { + await es.enrich.putPolicy({ + name: policyName, + match: { + match_field: 'email', + enrich_fields: ['firstName'], + indices: [indexName], + }, + }); + }; + + const createIndex = async (indexName: string) => { + await es.indices.create({ + index: indexName, + body: { + mappings: { + properties: { + email: { + type: 'text', + }, + firstName: { + type: 'text', + }, + }, + }, + }, + }); + }; + + const deleteIndex = async (indexName: string) => { + await es.indices.delete({ index: indexName }); + }; + + return { + createEnrichPolicy, + createIndex, + deleteIndex, + }; +} diff --git a/x-pack/test_serverless/api_integration/services/index_management/svl_indices.api.ts b/x-pack/test_serverless/api_integration/services/index_management/svl_indices.api.ts new file mode 100644 index 00000000000000..93f523494a2dc6 --- /dev/null +++ b/x-pack/test_serverless/api_integration/services/index_management/svl_indices.api.ts @@ -0,0 +1,88 @@ +/* + * Copyright 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 { API_BASE_PATH } from './constants'; +import { RoleCredentials } from '../../../shared/services'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function SvlIndicesApi({ getService }: FtrProviderContext) { + const svlCommonApi = getService('svlCommonApi'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + + const executeActionOnIndices = + (roleAuthc: RoleCredentials) => + async ({ + index, + urlParam, + args, + }: { + index?: string | string[]; + urlParam: string; + args?: any; + }) => { + const indices = Array.isArray(index) ? index : [index]; + + return await supertestWithoutAuth + .post(`${API_BASE_PATH}/indices/${urlParam}`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send({ indices, ...args }); + }; + + const closeIndex = async (index: string, roleAuthc: RoleCredentials) => + await executeActionOnIndices(roleAuthc)({ index, urlParam: 'close' }); + + const openIndex = async (index: string, roleAuthc: RoleCredentials) => + await executeActionOnIndices(roleAuthc)({ index, urlParam: 'open' }); + + const deleteIndex = async (roleAuthc: RoleCredentials, index?: string) => + await executeActionOnIndices(roleAuthc)({ index, urlParam: 'delete' }); + + const flushIndex = async (index: string, roleAuthc: RoleCredentials) => + await executeActionOnIndices(roleAuthc)({ index, urlParam: 'flush' }); + + const refreshIndex = async (index: string, roleAuthc: RoleCredentials) => + await executeActionOnIndices(roleAuthc)({ index, urlParam: 'refresh' }); + + const forceMerge = async ( + index: string, + roleAuthc: RoleCredentials, + args?: { maxNumSegments: number } + ) => await executeActionOnIndices(roleAuthc)({ index, urlParam: 'forcemerge', args }); + + const unfreeze = async (index: string, roleAuthc: RoleCredentials) => + await executeActionOnIndices(roleAuthc)({ index, urlParam: 'unfreeze' }); + + const clearCache = async (index: string, roleAuthc: RoleCredentials) => + await executeActionOnIndices(roleAuthc)({ index, urlParam: 'clear_cache' }); + + const list = async (roleAuthc: RoleCredentials) => + supertestWithoutAuth + .get(`${API_BASE_PATH}/indices`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader); + + const reload = async (roleAuthc: RoleCredentials, indexNames?: string[]) => + await supertestWithoutAuth + .post(`${API_BASE_PATH}/indices/reload`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send({ indexNames }); + + return { + closeIndex, + openIndex, + deleteIndex, + flushIndex, + refreshIndex, + forceMerge, + unfreeze, + list, + reload, + clearCache, + }; +} diff --git a/x-pack/test_serverless/api_integration/services/index_management/svl_indices.helpers.ts b/x-pack/test_serverless/api_integration/services/index_management/svl_indices.helpers.ts new file mode 100644 index 00000000000000..4be1d12d0619ab --- /dev/null +++ b/x-pack/test_serverless/api_integration/services/index_management/svl_indices.helpers.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 { getRandomString } from './svl_random'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function SvlIndicesHelpers({ getService }: FtrProviderContext) { + const es = getService('es'); + const esDeleteAllIndices = getService('esDeleteAllIndices'); + + let indicesCreated: string[] = []; + + const createIndex = async (index: string = getRandomString(), mappings?: any) => { + indicesCreated.push(index); + await es.indices.create({ index, mappings }); + return index; + }; + + const deleteAllIndices = async () => { + await esDeleteAllIndices(indicesCreated); + indicesCreated = []; + }; + + const catIndex = (index?: string, h?: any) => + es.cat.indices({ index, format: 'json', h }, { meta: true }); + + const indexStats = (index: string, metric: string) => + es.indices.stats({ index, metric }, { meta: true }); + + return { createIndex, deleteAllIndices, catIndex, indexStats }; +} diff --git a/x-pack/test_serverless/api_integration/services/index_management/svl_mappings.api.ts b/x-pack/test_serverless/api_integration/services/index_management/svl_mappings.api.ts new file mode 100644 index 00000000000000..7c82319eebb1b9 --- /dev/null +++ b/x-pack/test_serverless/api_integration/services/index_management/svl_mappings.api.ts @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { API_BASE_PATH } from './constants'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { RoleCredentials } from '../../../shared/services'; + +export function SvlMappingsApi({ getService }: FtrProviderContext) { + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const svlCommonApi = getService('svlCommonApi'); + + const getMapping = async (index: string, roleAuthc: RoleCredentials) => + await supertestWithoutAuth + .get(`${API_BASE_PATH}/mapping/${index}`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader); + + const updateMappings = async (index: string, roleAuthc: RoleCredentials) => + await supertestWithoutAuth + .put(`${API_BASE_PATH}/mapping/${index}`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send({ name: { type: 'text' } }); + + return { + getMapping, + updateMappings, + }; +} diff --git a/x-pack/test_serverless/api_integration/services/index_management/svl_random.ts b/x-pack/test_serverless/api_integration/services/index_management/svl_random.ts new file mode 100644 index 00000000000000..9c8a4cc5ff9d38 --- /dev/null +++ b/x-pack/test_serverless/api_integration/services/index_management/svl_random.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import Chance from 'chance'; + +const chance = new Chance(); +const CHARS_POOL = 'abcdefghijklmnopqrstuvwxyz'; + +export const getRandomString = () => `${chance.string({ pool: CHARS_POOL })}-${Date.now()}`; diff --git a/x-pack/test_serverless/api_integration/services/index_management/svl_settings.api.ts b/x-pack/test_serverless/api_integration/services/index_management/svl_settings.api.ts new file mode 100644 index 00000000000000..aca8c659c7952b --- /dev/null +++ b/x-pack/test_serverless/api_integration/services/index_management/svl_settings.api.ts @@ -0,0 +1,38 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { IndexSettings } from '@kbn/index-management-plugin/common'; +import { RoleCredentials } from '../../../shared/services'; +import { API_BASE_PATH } from './constants'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function SvlSettingsApi({ getService }: FtrProviderContext) { + const svlCommonApi = getService('svlCommonApi'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + + const getIndexSettings = async (index: string, roleAuthc: RoleCredentials) => + await supertestWithoutAuth + .get(`${API_BASE_PATH}/settings/${index}`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader); + + const updateIndexSettings = async ( + index: string, + settings: IndexSettings, + roleAuthc: RoleCredentials + ) => + await supertestWithoutAuth + .put(`${API_BASE_PATH}/settings/${index}`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send(settings); + + return { + getIndexSettings, + updateIndexSettings, + }; +} diff --git a/x-pack/test_serverless/api_integration/services/index_management/svl_templates.api.ts b/x-pack/test_serverless/api_integration/services/index_management/svl_templates.api.ts new file mode 100644 index 00000000000000..10a95efbcd9f82 --- /dev/null +++ b/x-pack/test_serverless/api_integration/services/index_management/svl_templates.api.ts @@ -0,0 +1,81 @@ +/* + * Copyright 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 { TemplateDeserialized, TemplateSerialized } from '@kbn/index-management-plugin/common'; +import { API_BASE_PATH } from './constants'; +import { InternalRequestHeader, RoleCredentials } from '../../../shared/services'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function SvlTemplatesApi({ getService }: FtrProviderContext) { + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const svlCommonApi = getService('svlCommonApi'); + + let templatesCreated: Array<{ name: string; isLegacy?: boolean }> = []; + + const getAllTemplates = (internalReqHeader: InternalRequestHeader, roleAuthc: RoleCredentials) => + supertestWithoutAuth.get(`${API_BASE_PATH}/index_templates`).set(roleAuthc.apiKeyHeader); + + const getOneTemplate = (name: string, isLegacy: boolean = false) => + supertestWithoutAuth.get(`${API_BASE_PATH}/index_templates/${name}?legacy=${isLegacy}`); + + const createTemplate = (template: TemplateDeserialized, roleAuthc: RoleCredentials) => { + templatesCreated.push({ name: template.name, isLegacy: template._kbnMeta.isLegacy }); + return supertestWithoutAuth + .post(`${API_BASE_PATH}/index_templates`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send(template); + }; + + const deleteTemplates = async ( + templates: Array<{ name: string; isLegacy?: boolean }>, + roleAuthc: RoleCredentials + ) => + await supertestWithoutAuth + .post(`${API_BASE_PATH}/delete_index_templates`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send({ templates }); + + const updateTemplate = async ( + payload: TemplateDeserialized, + templateName: string, + roleAuthc: RoleCredentials + ) => + await supertestWithoutAuth + .put(`${API_BASE_PATH}/index_templates/${templateName}`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send(payload); + + // Delete all templates created during tests + const cleanUpTemplates = async (roleAuthc: RoleCredentials) => { + try { + await deleteTemplates(templatesCreated, roleAuthc); + templatesCreated = []; + } catch (e) { + // Silently swallow errors + } + }; + + const simulateTemplate = async (payload: TemplateSerialized, roleAuthc: RoleCredentials) => + await supertestWithoutAuth + .post(`${API_BASE_PATH}/index_templates/simulate`) + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send(payload); + + return { + getAllTemplates, + getOneTemplate, + createTemplate, + updateTemplate, + deleteTemplates, + cleanUpTemplates, + simulateTemplate, + }; +} diff --git a/x-pack/test_serverless/api_integration/services/index_management/svl_templates.helpers.ts b/x-pack/test_serverless/api_integration/services/index_management/svl_templates.helpers.ts new file mode 100644 index 00000000000000..16e453e10edf5a --- /dev/null +++ b/x-pack/test_serverless/api_integration/services/index_management/svl_templates.helpers.ts @@ -0,0 +1,95 @@ +/* + * Copyright 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 { TemplateDeserialized, TemplateSerialized } from '@kbn/index-management-plugin/common'; +import { INDEX_PATTERNS } from './constants'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +const templateMock = { + settings: { + number_of_shards: 1, + }, + mappings: { + properties: { + host_name: { + type: 'keyword', + }, + created_at: { + type: 'date', + format: 'EEE MMM dd HH:mm:ss Z yyyy', + }, + }, + }, + aliases: { + alias1: {}, + }, +}; + +const getTemplateMock = (isMappingsSourceFieldEnabled: boolean) => { + if (isMappingsSourceFieldEnabled) { + return { + ...templateMock, + mappings: { + ...templateMock.mappings, + _source: { + enabled: false, + }, + }, + }; + } + return templateMock; +}; + +export function SvlTemplatesHelpers({ getService }: FtrProviderContext) { + const es = getService('es'); + + const catTemplate = (name: string) => es.cat.templates({ name, format: 'json' }, { meta: true }); + + const getTemplatePayload = ( + name: string, + indexPatterns: string[] = INDEX_PATTERNS, + isLegacy: boolean = false, + isMappingsSourceFieldEnabled: boolean = true + ) => { + const baseTemplate: TemplateDeserialized = { + name, + indexPatterns, + version: 1, + template: { ...getTemplateMock(isMappingsSourceFieldEnabled) }, + _kbnMeta: { + isLegacy, + type: 'default', + hasDatastream: false, + }, + allowAutoCreate: 'NO_OVERWRITE', + }; + + if (isLegacy) { + baseTemplate.order = 1; + } else { + baseTemplate.priority = 1; + } + + return baseTemplate; + }; + + const getSerializedTemplate = ( + indexPatterns: string[] = INDEX_PATTERNS, + isMappingsSourceFieldEnabled: boolean = true + ): TemplateSerialized => { + return { + index_patterns: indexPatterns, + template: { ...getTemplateMock(isMappingsSourceFieldEnabled) }, + }; + }; + + return { + catTemplate, + getTemplatePayload, + getSerializedTemplate, + }; +} diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/cluster_nodes.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/cluster_nodes.ts index 60110dd5af3fcd..fda205cf3b7818 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/cluster_nodes.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/cluster_nodes.ts @@ -8,25 +8,27 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; +import { RoleCredentials } from '../../../../shared/services'; export default function ({ getService }: FtrProviderContext) { - const indexManagementService = getService('indexManagement'); + const svlClusterNodesApi = getService('svlClusterNodesApi'); + const svlUserManager = getService('svlUserManager'); - describe('nodes', () => { - let getNodesPlugins: typeof indexManagementService['clusterNodes']['api']['getNodesPlugins']; + let roleAuthc: RoleCredentials; + describe('nodes', () => { before(async () => { - ({ - clusterNodes: { - api: { getNodesPlugins }, - }, - } = indexManagementService); + roleAuthc = await svlUserManager.createApiKeyForRole('admin'); + }); + after(async () => { + await svlUserManager.invalidateApiKeyForRole(roleAuthc); }); - it('should fetch the nodes plugins', async () => { - const { body } = await getNodesPlugins().expect(200); + it('should NOT fetch the nodes plugins in serverless', async () => { + const { body, status } = await svlClusterNodesApi.getNodesPlugins(roleAuthc); + expect(status).to.eql(410); - expect(Array.isArray(body)).to.be(true); + expect(Array.isArray(body)).to.be(false); }); }); } diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/create_enrich_policies.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/create_enrich_policies.ts index e2bfa9cdb35ef7..a4cfd731f9a790 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/create_enrich_policies.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/create_enrich_policies.ts @@ -7,20 +7,28 @@ import expect from 'expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; +import { InternalRequestHeader, RoleCredentials } from '../../../../shared/services'; const INTERNAL_API_BASE_PATH = '/internal/index_management'; export default function ({ getService }: FtrProviderContext) { - const supertest = getService('supertest'); const es = getService('es'); const log = getService('log'); + const svlCommonApi = getService('svlCommonApi'); + const svlUserManager = getService('svlUserManager'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + let roleAuthc: RoleCredentials; + let internalReqHeader: InternalRequestHeader; + describe('Create enrich policy', function () { const INDEX_A_NAME = `index-${Math.random()}`; const INDEX_B_NAME = `index-${Math.random()}`; const POLICY_NAME = `policy-${Math.random()}`; before(async () => { + roleAuthc = await svlUserManager.createApiKeyForRole('admin'); + internalReqHeader = svlCommonApi.getInternalRequestHeader(); try { await es.indices.create({ index: INDEX_A_NAME, @@ -66,13 +74,14 @@ export default function ({ getService }: FtrProviderContext) { log.debug('[Cleanup error] Error deleting test index'); throw err; } + await svlUserManager.invalidateApiKeyForRole(roleAuthc); }); it('Allows to create an enrich policy', async () => { - const { body } = await supertest + const { body } = await supertestWithoutAuth .post(`${INTERNAL_API_BASE_PATH}/enrich_policies`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader) .send({ policy: { name: POLICY_NAME, @@ -88,10 +97,10 @@ export default function ({ getService }: FtrProviderContext) { }); it('Can retrieve fields from indices', async () => { - const { body } = await supertest + const { body } = await supertestWithoutAuth .post(`${INTERNAL_API_BASE_PATH}/enrich_policies/get_fields_from_indices`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader) .send({ indices: [INDEX_A_NAME, INDEX_B_NAME] }) .expect(200); @@ -117,12 +126,12 @@ export default function ({ getService }: FtrProviderContext) { }); it('Can retrieve matching indices', async () => { - const { body } = await supertest + const { body, status } = await supertestWithoutAuth .post(`${INTERNAL_API_BASE_PATH}/enrich_policies/get_matching_indices`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') - .send({ pattern: 'index-' }) - .expect(200); + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader) + .send({ pattern: 'index-' }); + svlCommonApi.assertResponseStatusCode(200, status, body); expect( body.indices.every((value: string) => [INDEX_A_NAME, INDEX_B_NAME].includes(value)) diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/datastreams.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/datastreams.ts index 7c3f56f9c190df..b5f51258c8df46 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/datastreams.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/datastreams.ts @@ -9,46 +9,41 @@ import expect from '@kbn/expect'; import { DataStream } from '@kbn/index-management-plugin/common'; import { FtrProviderContext } from '../../../ftr_provider_context'; +import { InternalRequestHeader, RoleCredentials } from '../../../../shared/services'; const API_BASE_PATH = '/api/index_management'; export default function ({ getService }: FtrProviderContext) { - const supertest = getService('supertest'); - const indexManagementService = getService('indexManagement'); - let helpers: typeof indexManagementService['datastreams']['helpers']; - let createDataStream: typeof helpers['createDataStream']; - let deleteDataStream: typeof helpers['deleteDataStream']; - let deleteComposableIndexTemplate: typeof helpers['deleteComposableIndexTemplate']; - let updateIndexTemplateMappings: typeof helpers['updateIndexTemplateMappings']; - let getMapping: typeof helpers['getMapping']; - let getDatastream: typeof helpers['getDatastream']; + const svlCommonApi = getService('svlCommonApi'); + const svlUserManager = getService('svlUserManager'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + let roleAuthc: RoleCredentials; + let internalReqHeader: InternalRequestHeader; + const svlDatastreamsHelpers = getService('svlDatastreamsHelpers'); describe('Data streams', function () { + // see details: https://github.com/elastic/kibana/issues/187372 + this.tags(['skipSvlSec']); before(async () => { - ({ - datastreams: { helpers }, - } = indexManagementService); - ({ - createDataStream, - deleteDataStream, - deleteComposableIndexTemplate, - updateIndexTemplateMappings, - getMapping, - getDatastream, - } = helpers); + roleAuthc = await svlUserManager.createApiKeyForRole('admin'); + internalReqHeader = svlCommonApi.getInternalRequestHeader(); + }); + after(async () => { + await svlUserManager.invalidateApiKeyForRole(roleAuthc); }); describe('Get', () => { const testDataStreamName = 'test-data-stream'; - before(async () => await createDataStream(testDataStreamName)); - after(async () => await deleteDataStream(testDataStreamName)); + before(async () => await svlDatastreamsHelpers.createDataStream(testDataStreamName)); + after(async () => await svlDatastreamsHelpers.deleteDataStream(testDataStreamName)); it('returns an array of data streams', async () => { - const { body: dataStreams } = await supertest + const { body: dataStreams, status } = await supertestWithoutAuth .get(`${API_BASE_PATH}/data_streams`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') - .expect(200); + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader); + + svlCommonApi.assertResponseStatusCode(200, status, dataStreams); expect(dataStreams).to.be.an('array'); @@ -89,11 +84,12 @@ export default function ({ getService }: FtrProviderContext) { }); it('returns a single data stream by ID', async () => { - const { body: dataStream } = await supertest + const { body: dataStream, status } = await supertestWithoutAuth .get(`${API_BASE_PATH}/data_streams/${testDataStreamName}`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') - .expect(200); + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader); + + svlCommonApi.assertResponseStatusCode(200, status, dataStream); // ES determines these values so we'll just echo them back. const { name: indexName, uuid } = dataStream.indices[0]; @@ -129,49 +125,35 @@ export default function ({ getService }: FtrProviderContext) { describe('Update', () => { const testDataStreamName = 'test-data-stream'; - before(async () => await createDataStream(testDataStreamName)); - after(async () => await deleteDataStream(testDataStreamName)); + before(async () => await svlDatastreamsHelpers.createDataStream(testDataStreamName)); + after(async () => await svlDatastreamsHelpers.deleteDataStream(testDataStreamName)); it('updates the data retention of a DS', async () => { - const { body } = await supertest + const { body, status } = await supertestWithoutAuth .put(`${API_BASE_PATH}/data_streams/${testDataStreamName}/data_retention`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader) .send({ dataRetention: '7d', - }) - .expect(200); + }); + svlCommonApi.assertResponseStatusCode(200, status, body); expect(body).to.eql({ success: true }); }); it('sets data retention to infinite', async () => { - const { body } = await supertest + const { body, status } = await supertestWithoutAuth .put(`${API_BASE_PATH}/data_streams/${testDataStreamName}/data_retention`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') - .send({}) - .expect(200); + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader) + .send({}); + svlCommonApi.assertResponseStatusCode(200, status, body); // Providing an infinite retention might not be allowed for a given project, // due to it having an existing max retention period. Because of this // we will only check whether the request was recieved by ES. expect(body.success).to.eql(true); }); - - it('can disable lifecycle for a given policy', async () => { - const { body } = await supertest - .put(`${API_BASE_PATH}/data_streams/${testDataStreamName}/data_retention`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') - .send({ enabled: false }) - .expect(200); - - expect(body).to.eql({ success: true }); - - const datastream = await getDatastream(testDataStreamName); - expect(datastream.lifecycle).to.be(undefined); - }); }); describe('Delete', () => { @@ -180,8 +162,8 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { await Promise.all([ - createDataStream(testDataStreamName1), - createDataStream(testDataStreamName2), + svlDatastreamsHelpers.createDataStream(testDataStreamName1), + svlDatastreamsHelpers.createDataStream(testDataStreamName2), ]); }); @@ -189,32 +171,32 @@ export default function ({ getService }: FtrProviderContext) { // The Delete API only deletes the data streams, so we still need to manually delete their // related index patterns to clean up. await Promise.all([ - deleteComposableIndexTemplate(testDataStreamName1), - deleteComposableIndexTemplate(testDataStreamName2), + svlDatastreamsHelpers.deleteComposableIndexTemplate(testDataStreamName1), + svlDatastreamsHelpers.deleteComposableIndexTemplate(testDataStreamName2), ]); }); it('deletes multiple data streams', async () => { - await supertest + const { body: b1, status: s1 } = await supertestWithoutAuth .post(`${API_BASE_PATH}/delete_data_streams`) - .set('x-elastic-internal-origin', 'xxx') - .set('kbn-xsrf', 'xxx') + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader) .send({ dataStreams: [testDataStreamName1, testDataStreamName2], - }) - .expect(200); + }); + svlCommonApi.assertResponseStatusCode(200, s1, b1); - await supertest + const { body: b2, status: s2 } = await supertestWithoutAuth .get(`${API_BASE_PATH}/data_streams/${testDataStreamName1}`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') - .expect(404); + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader); + svlCommonApi.assertResponseStatusCode(404, s2, b2); - await supertest + const { body: b3, status: s3 } = await supertestWithoutAuth .get(`${API_BASE_PATH}/data_streams/${testDataStreamName2}`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') - .expect(404); + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader); + svlCommonApi.assertResponseStatusCode(404, s3, b3); }); }); @@ -222,30 +204,31 @@ export default function ({ getService }: FtrProviderContext) { const testDataStreamName1 = 'test-data-stream-mappings-1'; before(async () => { - await createDataStream(testDataStreamName1); + await svlDatastreamsHelpers.createDataStream(testDataStreamName1); }); after(async () => { - await deleteDataStream(testDataStreamName1); + await svlDatastreamsHelpers.deleteDataStream(testDataStreamName1); }); it('Apply mapping from index template', async () => { - const beforeMapping = await getMapping(testDataStreamName1); + const beforeMapping = await svlDatastreamsHelpers.getMapping(testDataStreamName1); expect(beforeMapping.properties).eql({ '@timestamp': { type: 'date' }, }); - await updateIndexTemplateMappings(testDataStreamName1, { + await svlDatastreamsHelpers.updateIndexTemplateMappings(testDataStreamName1, { properties: { test: { type: 'integer' }, }, }); - await supertest + const { body, status } = await supertestWithoutAuth .post(`${API_BASE_PATH}/data_streams/${testDataStreamName1}/mappings_from_template`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') - .expect(200); + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader); + + svlCommonApi.assertResponseStatusCode(200, status, body); - const afterMapping = await getMapping(testDataStreamName1); + const afterMapping = await svlDatastreamsHelpers.getMapping(testDataStreamName1); expect(afterMapping.properties).eql({ '@timestamp': { type: 'date' }, test: { type: 'integer' }, @@ -257,21 +240,22 @@ export default function ({ getService }: FtrProviderContext) { const testDataStreamName1 = 'test-data-stream-rollover-1'; before(async () => { - await createDataStream(testDataStreamName1); + await svlDatastreamsHelpers.createDataStream(testDataStreamName1); }); after(async () => { - await deleteDataStream(testDataStreamName1); + await svlDatastreamsHelpers.deleteDataStream(testDataStreamName1); }); it('Rollover datastreams', async () => { - await supertest + const { body, status } = await supertestWithoutAuth .post(`${API_BASE_PATH}/data_streams/${testDataStreamName1}/rollover`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader) .expect(200); + svlCommonApi.assertResponseStatusCode(200, status, body); - const datastream = await getDatastream(testDataStreamName1); + const datastream = await svlDatastreamsHelpers.getDatastream(testDataStreamName1); expect(datastream.generation).equal(2); }); diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/enrich_policies.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/enrich_policies.ts index d3b8f655cab2c0..3762f5b87adcff 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/enrich_policies.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/enrich_policies.ts @@ -7,34 +7,26 @@ import expect from 'expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; +import { RoleCredentials } from '../../../../shared/services'; export default function ({ getService }: FtrProviderContext) { const log = getService('log'); - const indexManagementService = getService('indexManagement'); + const svlCommonApi = getService('svlCommonApi'); + const svlUserManager = getService('svlUserManager'); + const svlEnrichPoliciesApi = getService('svlEnrichPoliciesApi'); + const svlEnrichPoliciesHelpers = getService('svlEnrichPoliciesHelpers'); + let roleAuthc: RoleCredentials; describe('Enrich policies', function () { const INDEX_NAME = `index-${Math.random()}`; const POLICY_NAME = `policy-${Math.random()}`; - let createIndex: typeof indexManagementService['enrichPolicies']['helpers']['createIndex']; - let deleteIndex: typeof indexManagementService['enrichPolicies']['helpers']['deleteIndex']; - let createEnrichPolicy: typeof indexManagementService['enrichPolicies']['helpers']['createEnrichPolicy']; - - let getAllEnrichPolicies: typeof indexManagementService['enrichPolicies']['api']['getAllEnrichPolicies']; - let removeEnrichPolicy: typeof indexManagementService['enrichPolicies']['api']['removeEnrichPolicy']; - let executeEnrichPolicy: typeof indexManagementService['enrichPolicies']['api']['executeEnrichPolicy']; - before(async () => { - ({ - enrichPolicies: { - helpers: { createIndex, deleteIndex, createEnrichPolicy }, - api: { getAllEnrichPolicies, removeEnrichPolicy, executeEnrichPolicy }, - }, - } = indexManagementService); + roleAuthc = await svlUserManager.createApiKeyForRole('admin'); try { - await createIndex(INDEX_NAME); - await createEnrichPolicy(POLICY_NAME, INDEX_NAME); + await svlEnrichPoliciesHelpers.createIndex(INDEX_NAME); + await svlEnrichPoliciesHelpers.createEnrichPolicy(POLICY_NAME, INDEX_NAME); } catch (err) { log.debug('[Setup error] Error creating test index and policy'); throw err; @@ -43,15 +35,18 @@ export default function ({ getService }: FtrProviderContext) { after(async () => { try { - await deleteIndex(INDEX_NAME); + await svlEnrichPoliciesHelpers.deleteIndex(INDEX_NAME); } catch (err) { log.debug('[Cleanup error] Error deleting test index'); throw err; } + await svlUserManager.invalidateApiKeyForRole(roleAuthc); }); it('should list all policies', async () => { - const { body } = await getAllEnrichPolicies().expect(200); + const { status, body } = await svlEnrichPoliciesApi.getAllEnrichPolicies(roleAuthc); + + svlCommonApi.assertResponseStatusCode(200, status, body); expect(body).toContainEqual({ enrichFields: ['firstName'], @@ -63,7 +58,12 @@ export default function ({ getService }: FtrProviderContext) { }); it('should be able to execute a policy', async () => { - await executeEnrichPolicy(POLICY_NAME).expect(200); + const { status, body } = await svlEnrichPoliciesApi.executeEnrichPolicy( + POLICY_NAME, + roleAuthc + ); + + svlCommonApi.assertResponseStatusCode(200, status, body); // Wait for a little bit for the policy to be executed, so that it can // be deleted in the next test. @@ -71,7 +71,7 @@ export default function ({ getService }: FtrProviderContext) { }); it('should be able to delete a policy', async () => { - const { status } = await removeEnrichPolicy(POLICY_NAME); + const { status } = await svlEnrichPoliciesApi.removeEnrichPolicy(POLICY_NAME, roleAuthc); // In the odd case that the policy is somehow still being executed, the delete // method might return a 429 so we need to account for that. diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/index.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/index.ts index 608530a51e72aa..db96dbf0e80c75 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/index.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/index.ts @@ -8,7 +8,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { - describe('Index Management APIs', function () { + describe('Serverless Index Management APIs', function () { this.tags(['esGate']); loadTestFile(require.resolve('./index_templates')); diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_component_templates.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_component_templates.ts index b1f26ac5624144..a5b72736a11c43 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_component_templates.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_component_templates.ts @@ -8,57 +8,31 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; +import { RoleCredentials } from '../../../../shared/services'; const CACHE_TEMPLATES = true; export default function ({ getService }: FtrProviderContext) { const log = getService('log'); - const indexManagementService = getService('indexManagement'); + const svlCommonApi = getService('svlCommonApi'); + const svlUserManager = getService('svlUserManager'); + let roleAuthc: RoleCredentials; + const svlComponentTemplatesApi = getService('svlComponentTemplatesApi'); + const svlComponentTemplateHelpers = getService('svlComponentTemplateHelpers'); // Failing: See https://github.com/elastic/kibana/issues/182792 // Failing: See https://github.com/elastic/kibana/issues/182797 // Failing: See https://github.com/elastic/kibana/issues/182791 describe.skip('component templates', () => { - // Api methods - let getAllComponentTemplates: typeof indexManagementService['componentTemplates']['api']['getAllComponentTemplates']; - let getOneComponentTemplate: typeof indexManagementService['componentTemplates']['api']['getOneComponentTemplate']; - let updateComponentTemplate: typeof indexManagementService['componentTemplates']['api']['updateComponentTemplate']; - let deleteComponentTemplate: typeof indexManagementService['componentTemplates']['api']['deleteComponentTemplate']; - let getComponentTemplateDatastreams: typeof indexManagementService['componentTemplates']['api']['getComponentTemplateDatastreams']; - // Helpers - let addDatastream: typeof indexManagementService['componentTemplates']['helpers']['addDatastream']; - let addIndexTemplate: typeof indexManagementService['componentTemplates']['helpers']['addIndexTemplate']; - let addComponentTemplate: typeof indexManagementService['componentTemplates']['helpers']['addComponentTemplate']; - let cleanupDatastreams: typeof indexManagementService['componentTemplates']['helpers']['cleanupDatastreams']; - let cleanUpIndexTemplates: typeof indexManagementService['componentTemplates']['helpers']['cleanUpIndexTemplates']; - let cleanUpComponentTemplates: typeof indexManagementService['componentTemplates']['helpers']['cleanUpComponentTemplates']; - before(async () => { - ({ - componentTemplates: { - api: { - getAllComponentTemplates, - getOneComponentTemplate, - updateComponentTemplate, - deleteComponentTemplate, - getComponentTemplateDatastreams, - }, - helpers: { - addDatastream, - addIndexTemplate, - addComponentTemplate, - cleanupDatastreams, - cleanUpIndexTemplates, - cleanUpComponentTemplates, - }, - }, - } = indexManagementService); + roleAuthc = await svlUserManager.createApiKeyForRole('admin'); }); after(async () => { - await cleanUpIndexTemplates(); - await cleanUpComponentTemplates(); - await cleanupDatastreams(); + await svlComponentTemplateHelpers.cleanUpIndexTemplates(); + await svlComponentTemplateHelpers.cleanUpComponentTemplates(); + await svlComponentTemplateHelpers.cleanupDatastreams(); + await svlUserManager.invalidateApiKeyForRole(roleAuthc); }); describe('Get', () => { @@ -87,7 +61,10 @@ export default function ({ getService }: FtrProviderContext) { // Create component template to verify GET requests before(async () => { try { - await addComponentTemplate({ body: COMPONENT, name: COMPONENT_NAME }, CACHE_TEMPLATES); + await svlComponentTemplateHelpers.addComponentTemplate( + { body: COMPONENT, name: COMPONENT_NAME }, + CACHE_TEMPLATES + ); } catch (err) { log.debug('[Setup error] Error creating component template'); throw err; @@ -96,7 +73,10 @@ export default function ({ getService }: FtrProviderContext) { describe('all component templates', () => { it('should return an array of component templates', async () => { - const { body: componentTemplates } = await getAllComponentTemplates().expect(200); + const { body: componentTemplates, status } = + await svlComponentTemplatesApi.getAllComponentTemplates(roleAuthc); + + svlCommonApi.assertResponseStatusCode(200, status, { componentTemplates }); const testComponentTemplate = componentTemplates.find( ({ name }: { name: string }) => name === COMPONENT_NAME @@ -116,7 +96,12 @@ export default function ({ getService }: FtrProviderContext) { describe('one component template', () => { it('should return a single component template', async () => { - const { body } = await getOneComponentTemplate(COMPONENT_NAME).expect(200); + const { body, status } = await svlComponentTemplatesApi.getOneComponentTemplate( + COMPONENT_NAME, + roleAuthc + ); + + svlCommonApi.assertResponseStatusCode(200, status, body); expect(body).to.eql({ name: COMPONENT_NAME, @@ -156,7 +141,10 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { // Create component template that can be used to test PUT request try { - await addComponentTemplate({ body: COMPONENT, name: COMPONENT_NAME }, CACHE_TEMPLATES); + await svlComponentTemplateHelpers.addComponentTemplate( + { body: COMPONENT, name: COMPONENT_NAME }, + CACHE_TEMPLATES + ); } catch (err) { log.debug('[Setup error] Error creating component template'); throw err; @@ -164,14 +152,20 @@ export default function ({ getService }: FtrProviderContext) { }); it('should allow an existing component template to be updated', async () => { - const { body } = await updateComponentTemplate(COMPONENT_NAME, { - ...COMPONENT, - version: 1, - _kbnMeta: { - usedBy: [], - isManaged: false, + const { body, status } = await svlComponentTemplatesApi.updateComponentTemplate( + COMPONENT_NAME, + { + ...COMPONENT, + version: 1, + _kbnMeta: { + usedBy: [], + isManaged: false, + }, }, - }).expect(200); + roleAuthc + ); + + svlCommonApi.assertResponseStatusCode(200, status, body); expect(body).to.eql({ acknowledged: true, @@ -179,14 +173,20 @@ export default function ({ getService }: FtrProviderContext) { }); it('should not allow a non-existing component template to be updated', async () => { - const { body } = await updateComponentTemplate('component_does_not_exist', { - ...COMPONENT, - version: 1, - _kbnMeta: { - usedBy: [], - isManaged: false, + const { body, status } = await svlComponentTemplatesApi.updateComponentTemplate( + 'component_does_not_exist', + { + ...COMPONENT, + version: 1, + _kbnMeta: { + usedBy: [], + isManaged: false, + }, }, - }).expect(404); + roleAuthc + ); + + svlCommonApi.assertResponseStatusCode(400, status, body); expect(body).to.eql({ statusCode: 404, @@ -234,7 +234,10 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { // Create component template that can be used to test PUT request try { - await addComponentTemplate({ body: COMPONENT, name: COMPONENT_NAME }, CACHE_TEMPLATES); + await svlComponentTemplateHelpers.addComponentTemplate( + { body: COMPONENT, name: COMPONENT_NAME }, + CACHE_TEMPLATES + ); } catch (err) { log.debug('[Setup error] Error creating component template'); throw err; @@ -242,14 +245,20 @@ export default function ({ getService }: FtrProviderContext) { }); it('should allow an existing component template to be updated', async () => { - const { body } = await updateComponentTemplate(COMPONENT_NAME, { - ...COMPONENT, - version: 1, - _kbnMeta: { - usedBy: [], - isManaged: false, + const { body, status } = await svlComponentTemplatesApi.updateComponentTemplate( + COMPONENT_NAME, + { + ...COMPONENT, + version: 1, + _kbnMeta: { + usedBy: [], + isManaged: false, + }, }, - }).expect(200); + roleAuthc + ); + + svlCommonApi.assertResponseStatusCode(200, status, body); expect(body).to.eql({ acknowledged: true, @@ -257,14 +266,19 @@ export default function ({ getService }: FtrProviderContext) { }); it('should not allow a non-existing component template to be updated', async () => { - const { body } = await updateComponentTemplate('component_does_not_exist', { - ...COMPONENT, - version: 1, - _kbnMeta: { - usedBy: [], - isManaged: false, + const { body, status } = await svlComponentTemplatesApi.updateComponentTemplate( + 'component_does_not_exist', + { + ...COMPONENT, + version: 1, + _kbnMeta: { + usedBy: [], + isManaged: false, + }, }, - }).expect(404); + roleAuthc + ); + svlCommonApi.assertResponseStatusCode(404, status, body); expect(body).to.eql({ statusCode: 404, @@ -306,7 +320,8 @@ export default function ({ getService }: FtrProviderContext) { // Create several component templates that can be used to test deletion await Promise.all( [componentTemplateA, componentTemplateB, componentTemplateC, componentTemplateD].map( - (template) => addComponentTemplate(template, !CACHE_TEMPLATES) + (template) => + svlComponentTemplateHelpers.addComponentTemplate(template, !CACHE_TEMPLATES) ) ).catch((err) => { log.debug(`[Setup error] Error creating component templates: ${err.message}`); @@ -316,7 +331,11 @@ export default function ({ getService }: FtrProviderContext) { it('should delete a component template', async () => { const { name } = componentTemplateA; - const { body } = await deleteComponentTemplate(name).expect(200); + const { status, body } = await svlComponentTemplatesApi.deleteComponentTemplate( + name, + roleAuthc + ); + svlCommonApi.assertResponseStatusCode(200, status, body); expect(body).to.eql({ itemsDeleted: [name], @@ -329,10 +348,13 @@ export default function ({ getService }: FtrProviderContext) { const { name: componentTemplate2Name } = componentTemplateC; const { + status, body: { itemsDeleted, errors }, - } = await deleteComponentTemplate( - `${componentTemplate1Name},${componentTemplate2Name}` - ).expect(200); + } = await svlComponentTemplatesApi.deleteComponentTemplate( + `${componentTemplate1Name},${componentTemplate2Name}`, + roleAuthc + ); + svlCommonApi.assertResponseStatusCode(200, status, { itemsDeleted, errors }); expect(errors).to.eql([]); @@ -346,9 +368,12 @@ export default function ({ getService }: FtrProviderContext) { const COMPONENT_DOES_NOT_EXIST = 'component_does_not_exist'; const { name: componentTemplateName } = componentTemplateD; - const { body } = await deleteComponentTemplate( - `${componentTemplateName},${COMPONENT_DOES_NOT_EXIST}` - ).expect(200); + const { body, status } = await svlComponentTemplatesApi.deleteComponentTemplate( + `${componentTemplateName},${COMPONENT_DOES_NOT_EXIST}`, + roleAuthc + ); + svlCommonApi.assertResponseStatusCode(200, status, body); + expect(body.itemsDeleted).to.eql([componentTemplateName]); expect(body.errors[0].name).to.eql(COMPONENT_DOES_NOT_EXIST); @@ -398,8 +423,14 @@ export default function ({ getService }: FtrProviderContext) { // Create component template to verify GET requests before(async () => { try { - await addComponentTemplate({ body: COMPONENT, name: COMPONENT_NAME }, CACHE_TEMPLATES); - await addIndexTemplate({ body: TEMPLATE, name: TEMPLATE_NAME }, CACHE_TEMPLATES); + await svlComponentTemplateHelpers.addComponentTemplate( + { body: COMPONENT, name: COMPONENT_NAME }, + CACHE_TEMPLATES + ); + await svlComponentTemplateHelpers.addIndexTemplate( + { body: TEMPLATE, name: TEMPLATE_NAME }, + CACHE_TEMPLATES + ); } catch (err) { log.debug('[Setup error] Error creating component template'); throw err; @@ -408,7 +439,11 @@ export default function ({ getService }: FtrProviderContext) { describe('without datastreams', () => { it('should return no datastreams', async () => { - const { body } = await getComponentTemplateDatastreams(COMPONENT_NAME).expect(200); + const { body, status } = await svlComponentTemplatesApi.getComponentTemplateDatastreams( + COMPONENT_NAME, + roleAuthc + ); + svlCommonApi.assertResponseStatusCode(200, status, body); expect(body).to.eql({ data_streams: [] }); }); @@ -416,10 +451,14 @@ export default function ({ getService }: FtrProviderContext) { describe('with datastreams', () => { before(async () => { - await addDatastream(DATASTREAM_NAME, CACHE_TEMPLATES); + await svlComponentTemplateHelpers.addDatastream(DATASTREAM_NAME, CACHE_TEMPLATES); }); it('should return datastreams', async () => { - const { body } = await getComponentTemplateDatastreams(COMPONENT_NAME).expect(200); + const { body, status } = await svlComponentTemplatesApi.getComponentTemplateDatastreams( + COMPONENT_NAME, + roleAuthc + ); + svlCommonApi.assertResponseStatusCode(200, status, body); expect(body).to.eql({ data_streams: ['logs-test-component-template-default'] }); }); diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_templates.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_templates.ts index 65095121713208..923d9818d0ff19 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_templates.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_templates.ts @@ -7,44 +7,36 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; +import type { InternalRequestHeader, RoleCredentials } from '../../../../shared/services'; const API_BASE_PATH = '/api/index_management'; export default function ({ getService }: FtrProviderContext) { - const supertest = getService('supertest'); + const svlCommonApi = getService('svlCommonApi'); + const svlUserManager = getService('svlUserManager'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const svlTemplatesHelpers = getService('svlTemplatesHelpers'); + const svlTemplatesApi = getService('svlTemplatesApi'); + + let roleAuthc: RoleCredentials; + let internalReqHeader: InternalRequestHeader; + const es = getService('es'); const log = getService('log'); const randomness = getService('randomness'); - const indexManagementService = getService('indexManagement'); - let getTemplatePayload: typeof indexManagementService['templates']['helpers']['getTemplatePayload']; - let catTemplate: typeof indexManagementService['templates']['helpers']['catTemplate']; - let getSerializedTemplate: typeof indexManagementService['templates']['helpers']['getSerializedTemplate']; - let createTemplate: typeof indexManagementService['templates']['api']['createTemplate']; - let updateTemplate: typeof indexManagementService['templates']['api']['updateTemplate']; - let deleteTemplates: typeof indexManagementService['templates']['api']['deleteTemplates']; - let simulateTemplate: typeof indexManagementService['templates']['api']['simulateTemplate']; - let cleanUpTemplates: typeof indexManagementService['templates']['api']['cleanUpTemplates']; - - let getRandomString: () => string; - describe('Index templates', function () { + + const getRandomString: () => string = () => randomness.string({ casing: 'lower', alpha: true }); + + // see details: https://github.com/elastic/kibana/issues/187368 + describe.skip('Index templates', function () { before(async () => { - ({ - templates: { - helpers: { getTemplatePayload, catTemplate, getSerializedTemplate }, - api: { - createTemplate, - updateTemplate, - deleteTemplates, - simulateTemplate, - cleanUpTemplates, - }, - }, - } = indexManagementService); - getRandomString = () => randomness.string({ casing: 'lower', alpha: true }); + roleAuthc = await svlUserManager.createApiKeyForRole('admin'); + internalReqHeader = svlCommonApi.getInternalRequestHeader(); }); after(async () => { - await cleanUpTemplates({ 'x-elastic-internal-origin': 'xxx' }); + await svlTemplatesApi.cleanUpTemplates(roleAuthc); + await svlUserManager.invalidateApiKeyForRole(roleAuthc); }); describe('get', () => { @@ -81,11 +73,11 @@ export default function ({ getService }: FtrProviderContext) { describe('all', () => { it('should list all the index templates with the expected parameters', async () => { - const { body: allTemplates } = await supertest + const { status, body: allTemplates } = await supertestWithoutAuth .get(`${API_BASE_PATH}/index_templates`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') - .expect(200); + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader); + expect(status).to.eql(200); // Legacy templates are not applicable on serverless expect(allTemplates.legacyTemplates.length).to.eql(0); @@ -114,11 +106,11 @@ export default function ({ getService }: FtrProviderContext) { describe('one', () => { it('should return an index template with the expected parameters', async () => { - const { body } = await supertest + const { body, status } = await supertestWithoutAuth .get(`${API_BASE_PATH}/index_templates/${templateName}`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') - .expect(200); + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader); + expect(status).to.eql(200); const expectedKeys = [ 'name', @@ -138,28 +130,36 @@ export default function ({ getService }: FtrProviderContext) { describe('create', () => { it('should create an index template', async () => { - const payload = getTemplatePayload( + const payload = svlTemplatesHelpers.getTemplatePayload( `template-${getRandomString()}`, [getRandomString()], undefined, false ); - await createTemplate(payload).set('x-elastic-internal-origin', 'xxx').expect(200); + const { status } = await svlTemplatesApi.createTemplate(payload, roleAuthc); + expect(status).to.eql(200); }); it('should throw a 409 conflict when trying to create 2 templates with the same name', async () => { const templateName = `template-${getRandomString()}`; - const payload = getTemplatePayload(templateName, [getRandomString()], undefined, false); + const payload = svlTemplatesHelpers.getTemplatePayload( + templateName, + [getRandomString()], + undefined, + false + ); - await createTemplate(payload).set('x-elastic-internal-origin', 'xxx'); + await svlTemplatesApi.createTemplate(payload, roleAuthc); - await createTemplate(payload).set('x-elastic-internal-origin', 'xxx').expect(409); + const { status } = await svlTemplatesApi.createTemplate(payload, roleAuthc); + + expect(status).to.eql(409); }); it('should validate the request payload', async () => { const templateName = `template-${getRandomString()}`; // need to cast as any to avoid errors after deleting index patterns - const payload = getTemplatePayload( + const payload = svlTemplatesHelpers.getTemplatePayload( templateName, [getRandomString()], undefined, @@ -168,7 +168,7 @@ export default function ({ getService }: FtrProviderContext) { delete payload.indexPatterns; // index patterns are required - const { body } = await createTemplate(payload).set('x-elastic-internal-origin', 'xxx'); + const { body } = await svlTemplatesApi.createTemplate(payload, roleAuthc); expect(body.message).to.contain( '[request body.indexPatterns]: expected value of type [array] ' ); @@ -176,7 +176,7 @@ export default function ({ getService }: FtrProviderContext) { it('should parse the ES error and return the cause', async () => { const templateName = `template-create-parse-es-error`; - const payload = getTemplatePayload( + const payload = svlTemplatesHelpers.getTemplatePayload( templateName, ['create-parse-es-error'], undefined, @@ -191,9 +191,8 @@ export default function ({ getService }: FtrProviderContext) { }, }; payload.template!.mappings = { ...payload.template!.mappings, runtime }; - const { body } = await createTemplate(payload) - .set('x-elastic-internal-origin', 'xxx') - .expect(400); + const { body, status } = await svlTemplatesApi.createTemplate(payload, roleAuthc); + expect(status).to.eql(400); expect(body.attributes).an('object'); expect(body.attributes.error.reason).contain('template after composition is invalid'); @@ -205,30 +204,33 @@ export default function ({ getService }: FtrProviderContext) { describe('update', () => { it('should update an index template', async () => { const templateName = `template-${getRandomString()}`; - const indexTemplate = getTemplatePayload( + const indexTemplate = svlTemplatesHelpers.getTemplatePayload( templateName, [getRandomString()], undefined, false ); - await createTemplate(indexTemplate).set('x-elastic-internal-origin', 'xxx').expect(200); + const { status } = await svlTemplatesApi.createTemplate(indexTemplate, roleAuthc); + expect(status).to.eql(200); - let { body: catTemplateResponse } = await catTemplate(templateName); + let { body: catTemplateResponse } = await svlTemplatesHelpers.catTemplate(templateName); const { name, version } = indexTemplate; - expect( catTemplateResponse.find(({ name: catTemplateName }) => catTemplateName === name)?.version ).to.equal(version?.toString()); // Update template with new version const updatedVersion = 2; - await updateTemplate({ ...indexTemplate, version: updatedVersion }, templateName) - .set('x-elastic-internal-origin', 'xxx') - .expect(200); + const { status: updateStatus } = await svlTemplatesApi.updateTemplate( + { ...indexTemplate, version: updatedVersion }, + templateName, + roleAuthc + ); + expect(updateStatus).to.eql(200); - ({ body: catTemplateResponse } = await catTemplate(templateName)); + ({ body: catTemplateResponse } = await svlTemplatesHelpers.catTemplate(templateName)); expect( catTemplateResponse.find(({ name: catTemplateName }) => catTemplateName === name)?.version @@ -237,7 +239,7 @@ export default function ({ getService }: FtrProviderContext) { it('should parse the ES error and return the cause', async () => { const templateName = `template-update-parse-es-error`; - const payload = getTemplatePayload( + const payload = svlTemplatesHelpers.getTemplatePayload( templateName, ['update-parse-es-error'], undefined, @@ -255,13 +257,17 @@ export default function ({ getService }: FtrProviderContext) { // Add runtime field payload.template!.mappings = { ...payload.template!.mappings, runtime }; - await createTemplate(payload).set('x-elastic-internal-origin', 'xxx').expect(200); + const { status: createStatus } = await svlTemplatesApi.createTemplate(payload, roleAuthc); + expect(createStatus).to.eql(200); // Update template with an error in the runtime field script payload.template!.mappings.runtime.myRuntimeField.script = 'emit("hello with error'; - const { body } = await updateTemplate(payload, templateName) - .set('x-elastic-internal-origin', 'xxx') - .expect(400); + const { status: updateStatus, body } = await svlTemplatesApi.updateTemplate( + payload, + templateName, + roleAuthc + ); + expect(updateStatus).to.eql(404); expect(body.attributes).an('object'); // one of the item of the cause array should point to our script @@ -272,35 +278,39 @@ export default function ({ getService }: FtrProviderContext) { describe('delete', () => { it('should delete an index template', async () => { const templateName = `template-${getRandomString()}`; - const payload = getTemplatePayload(templateName, [getRandomString()], undefined, false); + const payload = svlTemplatesHelpers.getTemplatePayload( + templateName, + [getRandomString()], + undefined, + false + ); - const { status: createStatus, body: createBody } = await createTemplate(payload).set( - 'x-elastic-internal-origin', - 'xxx' + const { status: createStatus, body: createBody } = await svlTemplatesApi.createTemplate( + payload, + roleAuthc ); - if (createStatus !== 200) { + if (createStatus !== 200) throw new Error(`Error creating template: ${createStatus} ${createBody.message}`); - } - let { body: catTemplateResponse } = await catTemplate(templateName); + const { body: catTemplateResponse } = await svlTemplatesHelpers.catTemplate(templateName); expect( catTemplateResponse.find((template) => template.name === payload.name)?.name ).to.equal(templateName); - const { status: deleteStatus, body: deleteBody } = await deleteTemplates([ - { name: templateName }, - ]).set('x-elastic-internal-origin', 'xxx'); - if (deleteStatus !== 200) { - throw new Error(`Error deleting template: ${deleteBody.message}`); - } + const { status: deleteStatus, body: deleteBody } = await svlTemplatesApi.deleteTemplates( + [{ name: templateName }], + roleAuthc + ); + + if (deleteStatus !== 200) throw new Error(`Error deleting template: ${deleteBody.message}`); expect(deleteBody.errors).to.be.empty(); expect(deleteBody.templatesDeleted[0]).to.equal(templateName); - ({ body: catTemplateResponse } = await catTemplate(templateName)); + const { body: catTemplateResponse2 } = await svlTemplatesHelpers.catTemplate(templateName); - expect(catTemplateResponse.find((template) => template.name === payload.name)).to.equal( + expect(catTemplateResponse2.find((template) => template.name === payload.name)).to.equal( undefined ); }); @@ -308,11 +318,10 @@ export default function ({ getService }: FtrProviderContext) { describe('simulate', () => { it('should simulate an index template', async () => { - const payload = getSerializedTemplate([getRandomString()], false); + const payload = svlTemplatesHelpers.getSerializedTemplate([getRandomString()], false); - const { body } = await simulateTemplate(payload) - .set('x-elastic-internal-origin', 'xxx') - .expect(200); + const { status, body } = await svlTemplatesApi.simulateTemplate(payload, roleAuthc); + expect(status).to.eql(200); expect(body.template).to.be.ok(); }); }); diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/indices.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/indices.ts index 70de83c949cf59..6f279ac0838ff2 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/indices.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/indices.ts @@ -6,36 +6,32 @@ */ import expect from '@kbn/expect'; +import { InternalRequestHeader, RoleCredentials } from '../../../../shared/services'; import { FtrProviderContext } from '../../../ftr_provider_context'; const INTERNAL_API_BASE_PATH = '/internal/index_management'; -const expectedKeys = ['aliases', 'hidden', 'isFrozen', 'primary', 'replica', 'name'].sort(); export default function ({ getService }: FtrProviderContext) { - const supertest = getService('supertest'); const es = getService('es'); const log = getService('log'); - const indexManagementService = getService('indexManagement'); + const svlCommonApi = getService('svlCommonApi'); + const svlUserManager = getService('svlUserManager'); + const svlIndicesApi = getService('svlIndicesApi'); + const svlIndicesHelpers = getService('svlIndicesHelpers'); + + const supertestWithoutAuth = getService('supertestWithoutAuth'); + let roleAuthc: RoleCredentials; + let internalReqHeader: InternalRequestHeader; describe('Indices', function () { let indexName: string; - let reload: typeof indexManagementService['indices']['api']['reload']; - let list: typeof indexManagementService['indices']['api']['list']; - let deleteIndex: typeof indexManagementService['indices']['api']['deleteIndex']; - let createIndex: typeof indexManagementService['indices']['helpers']['createIndex']; - let deleteAllIndices: typeof indexManagementService['indices']['helpers']['deleteAllIndices']; - let catIndex: typeof indexManagementService['indices']['helpers']['catIndex']; before(async () => { - ({ - indices: { - api: { reload, list, deleteIndex }, - helpers: { createIndex, deleteAllIndices, catIndex }, - }, - } = indexManagementService); + roleAuthc = await svlUserManager.createApiKeyForRole('admin'); + internalReqHeader = svlCommonApi.getInternalRequestHeader(); log.debug(`Creating index: '${indexName}'`); try { - indexName = await createIndex(); + indexName = await svlIndicesHelpers.createIndex(); } catch (err) { log.debug('[Setup error] Error creating index'); throw err; @@ -45,48 +41,50 @@ export default function ({ getService }: FtrProviderContext) { after(async () => { // Cleanup index created for testing purposes try { - await deleteAllIndices(); + await svlIndicesHelpers.deleteAllIndices(); } catch (err) { log.debug('[Cleanup error] Error deleting index'); throw err; } + await svlUserManager.invalidateApiKeyForRole(roleAuthc); }); describe('list', () => { it('should list all the indices with the expected properties', async function () { // Create an index that we can assert against - await createIndex('test_index'); + await svlIndicesHelpers.createIndex('test_index'); // Verify indices request - const { body: indices } = await list().set('x-elastic-internal-origin', 'xxx').expect(200); + const { status, body: indices } = await svlIndicesApi.list(roleAuthc); + expect(status).to.eql(200); // Find the "test_index" created to verify expected keys const indexCreated = indices.find((index: { name: string }) => index.name === 'test_index'); const sortedReceivedKeys = Object.keys(indexCreated).sort(); - expect(sortedReceivedKeys).to.eql(expectedKeys); + expect(sortedReceivedKeys).to.eql(['aliases', 'hidden', 'isFrozen', 'name']); }); }); describe('get index', () => { it('returns index details for the specified index name', async () => { - const { body: index } = await supertest + const { body: index } = await supertestWithoutAuth .get(`${INTERNAL_API_BASE_PATH}/indices/${indexName}`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader) .expect(200); expect(index).to.be.ok(); - expect(Object.keys(index).sort()).to.eql(expectedKeys); + expect(Object.keys(index).sort()).to.eql(['aliases', 'hidden', 'isFrozen', 'name']); }); it('throws 404 for a non-existent index', async () => { - await supertest + await supertestWithoutAuth .get(`${INTERNAL_API_BASE_PATH}/indices/non_existent`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader) .expect(404); }); }); @@ -106,31 +104,31 @@ export default function ({ getService }: FtrProviderContext) { }); it('can create a new index', async () => { - await supertest + await supertestWithoutAuth .put(`${INTERNAL_API_BASE_PATH}/indices/create`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader) .send({ indexName: createIndexName, }) .expect(200); - const { body: index } = await supertest + const { body: index } = await supertestWithoutAuth .get(`${INTERNAL_API_BASE_PATH}/indices/${createIndexName}`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader) .expect(200); expect(index).to.be.ok(); - expect(Object.keys(index).sort()).to.eql(expectedKeys); + expect(Object.keys(index).sort()).to.eql(['aliases', 'hidden', 'isFrozen', 'name']); }); it('fails to re-create the same index', async () => { - await supertest + await supertestWithoutAuth .put(`${INTERNAL_API_BASE_PATH}/indices/create`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader) .send({ indexName: createIndexName, }) @@ -141,20 +139,21 @@ export default function ({ getService }: FtrProviderContext) { describe('reload', function () { it('should list all the indices with the expected properties', async function () { // create an index to assert against, otherwise the test is flaky - await createIndex('reload-test-index'); - const { body } = await reload().set('x-elastic-internal-origin', 'xxx').expect(200); + await svlIndicesHelpers.createIndex('reload-test-index'); + const { status, body } = await svlIndicesApi.reload(roleAuthc); + svlCommonApi.assertResponseStatusCode(200, status, body); const indexCreated = body.find( (index: { name: string }) => index.name === 'reload-test-index' ); const sortedReceivedKeys = Object.keys(indexCreated).sort(); - expect(sortedReceivedKeys).to.eql(expectedKeys); + expect(sortedReceivedKeys).to.eql(['aliases', 'hidden', 'isFrozen', 'name']); expect(body.length > 1).to.be(true); // to contrast it with the next test }); it('should allow reloading only certain indices', async () => { - const index = await createIndex(); - const { body } = await reload([index]).set('x-elastic-internal-origin', 'xxx'); + const index = await svlIndicesHelpers.createIndex(); + const { body } = await svlIndicesApi.reload(roleAuthc, [index]); expect(body.length === 1).to.be(true); expect(body[0].name).to.be(index); @@ -163,19 +162,21 @@ export default function ({ getService }: FtrProviderContext) { describe('delete indices', () => { it('should delete an index', async () => { - const index = await createIndex(); + const index = await svlIndicesHelpers.createIndex(); - const { body: indices1 } = await catIndex(undefined, 'i'); + const { body: indices1 } = await svlIndicesHelpers.catIndex(undefined, 'i'); expect(indices1.map((indexItem) => indexItem.i)).to.contain(index); - await deleteIndex(index).set('x-elastic-internal-origin', 'xxx').expect(200); + const { status } = await svlIndicesApi.deleteIndex(roleAuthc, index); + expect(status).to.eql(200); - const { body: indices2 } = await catIndex(undefined, 'i'); + const { body: indices2 } = await svlIndicesHelpers.catIndex(undefined, 'i'); expect(indices2.map((indexItem) => indexItem.i)).not.to.contain(index); }); it('should require index or indices to be provided', async () => { - const { body } = await deleteIndex().set('x-elastic-internal-origin', 'xxx').expect(400); + const { status, body } = await svlIndicesApi.deleteIndex(roleAuthc); + expect(status).to.eql(400); expect(body.message).to.contain('expected value of type [string]'); }); }); diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/inference_endpoints.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/inference_endpoints.ts index 87b760d84540c8..3a075c85466607 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/inference_endpoints.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/inference_endpoints.ts @@ -6,23 +6,30 @@ */ import expect from '@kbn/expect'; +import { InternalRequestHeader, RoleCredentials } from '../../../../shared/services'; import { FtrProviderContext } from '../../../ftr_provider_context'; const API_BASE_PATH = '/api/index_management'; export default function ({ getService }: FtrProviderContext) { - const supertest = getService('supertest'); const log = getService('log'); const ml = getService('ml'); const inferenceId = 'my-elser-model'; const taskType = 'sparse_embedding'; const service = 'elser'; + const svlCommonApi = getService('svlCommonApi'); + const svlUserManager = getService('svlUserManager'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + let roleAuthc: RoleCredentials; + let internalReqHeader: InternalRequestHeader; // FLAKY: https://github.com/elastic/kibana/issues/185216 describe.skip('Inference endpoints', function () { // test adds new trained model '.elser_model_2_linux-x86_64', but does not clean it. Follow up tests are affected this.tags(['failsOnMKI']); before(async () => { + roleAuthc = await svlUserManager.createApiKeyForRole('admin'); + internalReqHeader = svlCommonApi.getInternalRequestHeader(); log.debug(`Creating inference endpoint`); try { await ml.api.createInferenceEndpoint(inferenceId, taskType, { @@ -47,14 +54,15 @@ export default function ({ getService }: FtrProviderContext) { log.debug('[Cleanup error] Error deleting inference endpoint'); throw err; } + await svlUserManager.invalidateApiKeyForRole(roleAuthc); }); describe('get inference endpoints', () => { it('returns the existing inference endpoints', async () => { - const { body: inferenceEndpoints } = await supertest + const { body: inferenceEndpoints } = await supertestWithoutAuth .get(`${API_BASE_PATH}/inference/all`) - .set('kbn-xsrf', 'xxx') - .set('x-elastic-internal-origin', 'xxx') + .set(internalReqHeader) + .set(roleAuthc.apiKeyHeader) .expect(200); expect(inferenceEndpoints).to.be.ok(); diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/mappings.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/mappings.ts index eb28c77fc44096..f3eb908babbb33 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/mappings.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/mappings.ts @@ -8,16 +8,18 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; +import { RoleCredentials } from '../../../../shared/services'; export default function ({ getService }: FtrProviderContext) { const log = getService('log'); - const indexManagementService = getService('indexManagement'); + const svlCommonApi = getService('svlCommonApi'); + const svlUserManager = getService('svlUserManager'); + let roleAuthc: RoleCredentials; + const svlMappingsApi = getService('svlMappingsApi'); + const svlIndicesHelpers = getService('svlIndicesHelpers'); describe('mappings', () => { let indexName: string; - let getMapping: typeof indexManagementService['mappings']['api']['getMapping']; - let createIndex: typeof indexManagementService['indices']['helpers']['createIndex']; - let deleteAllIndices: typeof indexManagementService['indices']['helpers']['deleteAllIndices']; const mappings = { properties: { @@ -28,18 +30,10 @@ export default function ({ getService }: FtrProviderContext) { }; before(async () => { - ({ - indices: { - helpers: { createIndex, deleteAllIndices }, - }, - mappings: { - api: { getMapping }, - }, - } = indexManagementService); - + roleAuthc = await svlUserManager.createApiKeyForRole('admin'); log.debug('Creating index'); try { - indexName = await createIndex(undefined, mappings); + indexName = await svlIndicesHelpers.createIndex(undefined, mappings); } catch (err) { log.debug('[Setup error] Error creating index'); throw err; @@ -48,15 +42,17 @@ export default function ({ getService }: FtrProviderContext) { after(async () => { try { - await deleteAllIndices(); + await svlIndicesHelpers.deleteAllIndices(); } catch (err) { log.debug('[Cleanup error] Error deleting index'); throw err; } + await svlUserManager.invalidateApiKeyForRole(roleAuthc); }); it('should get the index mappings', async () => { - const { body } = await getMapping(indexName).expect(200); + const { body, status } = await svlMappingsApi.getMapping(indexName, roleAuthc); + svlCommonApi.assertResponseStatusCode(200, status, body); expect(body.mappings).to.eql(mappings); }); diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/settings.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/settings.ts index d5cd93060737c9..733104d33b6a4d 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/settings.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/settings.ts @@ -8,33 +8,31 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; +import { RoleCredentials } from '../../../../shared/services'; export default function ({ getService }: FtrProviderContext) { - const indexManagementService = getService('indexManagement'); - - describe('settings', () => { - let getIndexSettings: typeof indexManagementService['settings']['api']['getIndexSettings']; - let updateIndexSettings: typeof indexManagementService['settings']['api']['updateIndexSettings']; - let createIndex: typeof indexManagementService['indices']['helpers']['createIndex']; - let deleteAllIndices: typeof indexManagementService['indices']['helpers']['deleteAllIndices']; + const svlCommonApi = getService('svlCommonApi'); + const svlUserManager = getService('svlUserManager'); + const svlSettingsApi = getService('svlSettingsApi'); + const svlIndicesHelpers = getService('svlIndicesHelpers'); + let roleAuthc: RoleCredentials; + // see details: https://github.com/elastic/kibana/issues/187369 + describe.skip('settings', function () { before(async () => { - ({ - settings: { - api: { getIndexSettings, updateIndexSettings }, - }, - indices: { - helpers: { createIndex, deleteAllIndices }, - }, - } = indexManagementService); + roleAuthc = await svlUserManager.createApiKeyForRole('admin'); }); - after(async () => await deleteAllIndices()); + after(async () => { + await svlIndicesHelpers.deleteAllIndices(); + await svlUserManager.invalidateApiKeyForRole(roleAuthc); + }); it('should fetch an index settings', async () => { - const index = await createIndex(); + const index = await svlIndicesHelpers.createIndex(); - const { body } = await getIndexSettings(index).expect(200); + const { status, body } = await svlSettingsApi.getIndexSettings(index, roleAuthc); + svlCommonApi.assertResponseStatusCode(200, status, body); // Verify we fetch the corret index settings expect(body.settings.index.provided_name).to.be(index); @@ -96,7 +94,7 @@ export default function ({ getService }: FtrProviderContext) { // Make sure none of the settings have been removed from ES API expectedSettings.forEach((setting) => { try { - expect(body.defaults.index.hasOwnProperty(setting)).to.be(true); + expect(body.defaults.index.hasOwnProperty(setting)).to.eql(true); } catch { throw new Error(`Expected setting "${setting}" not found.`); } @@ -104,9 +102,9 @@ export default function ({ getService }: FtrProviderContext) { }); it('should update an index settings', async () => { - const index = await createIndex(); + const index = await svlIndicesHelpers.createIndex(); - const { body: body1 } = await getIndexSettings(index); + const { body: body1 } = await svlSettingsApi.getIndexSettings(index, roleAuthc); expect(body1.settings.index.number_of_replicas).to.be('1'); const settings = { @@ -114,9 +112,9 @@ export default function ({ getService }: FtrProviderContext) { number_of_replicas: 2, }, }; - await updateIndexSettings(index, settings); + await svlSettingsApi.updateIndexSettings(index, settings, roleAuthc); - const { body: body2 } = await getIndexSettings(index); + const { body: body2 } = await svlSettingsApi.getIndexSettings(index, roleAuthc); expect(body2.settings.index.number_of_replicas).to.be('2'); }); }); From b6fcfac9c104bbaacb7e9f3250b55c7f5e13eeae Mon Sep 17 00:00:00 2001 From: Pierre Gayvallet Date: Mon, 8 Jul 2024 15:53:02 +0200 Subject: [PATCH 007/103] [Kibana logging system] Add conditional evaluation based on level for logging APIs (#187225) ## Summary *(Yeah, the title is pretty bad I apologize, I couldn't find something sexy. OTOH, "sexy" and "logging" are usually antonyms, like "sport car" and "fiat panda", or "server language" and "javascript")* ### 1. Provide a more developer-friendly alternative to `Logger.isLevelEnabled`. **With `isLevelEnabled`** ```ts if(logger.isLevelEnabled('info')) { const message = someExpensiveMessageProbablyBasedOnJsonStringifyOrSomething(); logger.info(message); } ``` **With this PR:** ```ts logger.info(() => someExpensiveMessageProbablyBasedOnJsonStringifyOrSomething()); ``` ### 2. Adapt calls to `log.debug` (arguably) costly to use this syntax Aka any call relying on `JSON.stringify` or function calls. I used the new syntax for those, except when the tests were too complicated to fix or when the code did not allow it (e.g. untyped let variables infered from return from assignations don't play well with closures) --- .../fullstory/src/fullstory_shipper.ts | 8 +- .../src/logger.test.ts | 70 ++++++-- .../src/logger.ts | 80 +++++++-- packages/kbn-cli-dev-mode/src/log_adapter.ts | 8 +- .../src/kibana/handlers/status.ts | 2 +- packages/kbn-logging-mocks/src/logger.mock.ts | 38 ++++- packages/kbn-logging/index.ts | 2 +- packages/kbn-logging/src/logger.ts | 68 ++++++-- .../eql_search/eql_search_strategy.ts | 2 +- .../ese_search/ese_search_strategy.ts | 2 +- .../esql_async_search_strategy.ts | 2 +- .../sql_search/sql_search_strategy.ts | 2 +- .../server/language_models/chat_openai.ts | 7 +- .../server/language_models/llm.ts | 7 +- .../language_models/simple_chat_model.ts | 7 +- .../actions_client/actions_client.test.ts | 47 +++-- .../server/actions_client/actions_client.ts | 32 ++-- .../sub_action_connector.ts | 2 +- .../server/alerts_client/alerts_client.ts | 7 +- .../alerts_service/lib/data_stream_adapter.ts | 7 +- .../lib/wrap_scoped_cluster_client.test.ts | 24 +-- .../server/lib/wrap_scoped_cluster_client.ts | 33 ++-- .../lib/wrap_search_source_client.test.ts | 10 +- .../server/lib/wrap_search_source_client.ts | 11 +- .../task_runner/ad_hoc_task_runner.test.ts | 1 + .../lib/process_run_result.test.ts | 5 +- .../task_runner/lib/process_run_result.ts | 2 +- .../server/task_runner/log_alerts.test.ts | 1 + .../alerting/server/task_runner/log_alerts.ts | 4 +- .../server/task_runner/task_runner.test.ts | 1 + .../server/task_runner/task_runner.ts | 12 +- .../task_runner/task_runner_cancel.test.ts | 1 + .../usage/lib/get_telemetry_from_event_log.ts | 10 +- .../usage/lib/get_telemetry_from_kibana.ts | 8 +- .../lib/get_telemetry_from_task_manager.ts | 4 +- .../cases/cases_connector_executor.ts | 160 ++++++++++-------- .../cases/server/services/cases/index.ts | 2 +- .../knowledge_base/index.ts | 14 +- .../elasticsearch_store.ts | 13 +- .../execute_custom_llm_chain/index.ts | 4 +- .../nodes/execute_tools.ts | 2 +- .../nodes/generate_chat_title.ts | 2 +- .../nodes/run_agent.ts | 2 +- .../nodes/should_continue.ts | 2 +- .../lib/langchain/tracers/apm_tracer.ts | 24 +-- .../entries/bulk_actions_route.ts | 3 +- .../knowledge_base/entries/create_route.ts | 2 +- .../server/services/app_context.ts | 14 +- .../crypto/encrypted_saved_objects_service.ts | 29 ++-- .../server/es/cluster_client_adapter.ts | 18 +- .../agents/update_agent_tags_action_runner.ts | 4 +- .../server/services/artifacts/artifacts.ts | 5 +- .../epm/elasticsearch/transform/install.ts | 7 +- .../services/epm/kibana/assets/install.ts | 14 +- .../server/services/fleet_usage_logger.ts | 4 +- .../fleet/server/services/package_policy.ts | 11 +- .../fleet/server/services/preconfiguration.ts | 13 +- x-pack/plugins/fleet/server/services/setup.ts | 4 +- .../services/telemetry/fleet_usage_sender.ts | 10 +- .../plugins/fleet/server/telemetry/sender.ts | 8 +- x-pack/plugins/licensing/server/plugin.ts | 3 +- .../monitoring/server/rules/base_rule.ts | 3 +- .../lib/entities/install_entity_definition.ts | 2 +- .../server/lib/manage_index_templates.ts | 4 +- .../parse_inline_function_calls.ts | 2 +- .../server/service/client/index.ts | 8 +- .../service/knowledge_base_service/index.ts | 6 +- .../server/utils/recall/score_suggestions.ts | 4 +- .../server/functions/query/index.ts | 33 ++-- .../server/services/status/index.ts | 4 +- .../synthetics/server/telemetry/sender.ts | 8 +- .../integration_tests/downloads.test.ts | 6 +- .../server/authentication/providers/basic.ts | 4 +- .../server/authentication/providers/http.ts | 9 +- .../authentication/providers/kerberos.ts | 2 +- .../server/authentication/providers/oidc.ts | 8 +- .../server/authentication/providers/pki.ts | 13 +- .../server/authentication/providers/saml.ts | 15 +- .../server/authentication/providers/token.ts | 2 +- .../security/server/authentication/tokens.ts | 10 +- .../routes/deprecations/kibana_user_role.ts | 14 +- .../server/session_management/session.ts | 7 +- .../knowledge_base_retrieval_tool.ts | 4 +- .../knowledge_base_write_tool.ts | 6 +- .../server/endpoint/lib/artifacts/task.ts | 7 +- .../migrations/turn_off_policy_protections.ts | 2 +- .../routes/actions/response_actions.ts | 2 +- .../crowdstrike/crowdstrike_actions_client.ts | 5 +- .../lib/base_response_actions_client.ts | 6 +- .../normalized_external_connector_client.ts | 2 +- .../sentinel_one_actions_client.ts | 54 +++--- .../signals/open_close_signals_route.ts | 2 +- ...dule_throttle_notification_actions.test.ts | 8 +- .../schedule_throttle_notification_actions.ts | 4 +- .../asset_criticality/routes/bulk_upload.ts | 2 +- .../asset_criticality/routes/upload_csv.ts | 4 +- .../utils/create_datastream.ts | 7 +- .../product_features.ts | 2 +- .../server/usage/queries/get_alerts.ts | 2 +- .../server/usage/queries/get_case_comments.ts | 2 +- .../usage/queries/get_detection_rules.ts | 2 +- .../get_event_log_by_type_and_status.ts | 25 ++- .../usage/queries/legacy_get_rule_actions.ts | 2 +- .../task_manager/usage_reporting_task.ts | 2 +- .../rule_types/es_query/lib/fetch_es_query.ts | 5 +- .../es_query/lib/fetch_esql_query.ts | 2 +- .../es_query/lib/fetch_search_source_query.ts | 7 +- .../rule_types/index_threshold/rule_type.ts | 11 +- .../server/lib/log_health_metrics.test.ts | 25 ++- .../metrics/task_run_metrics_aggregator.ts | 3 +- .../task_manager/server/routes/metrics.ts | 9 +- .../server/data/lib/time_series_query.ts | 4 +- .../server/data/routes/fields.ts | 4 +- .../server/data/routes/indices.ts | 2 +- .../server/data/routes/time_series_query.ts | 4 +- .../server/routes/health.ts | 2 +- 116 files changed, 812 insertions(+), 483 deletions(-) diff --git a/packages/analytics/ebt/shippers/fullstory/src/fullstory_shipper.ts b/packages/analytics/ebt/shippers/fullstory/src/fullstory_shipper.ts index a091076236a80e..23ce46a560ca33 100644 --- a/packages/analytics/ebt/shippers/fullstory/src/fullstory_shipper.ts +++ b/packages/analytics/ebt/shippers/fullstory/src/fullstory_shipper.ts @@ -130,7 +130,7 @@ export class FullStoryShipper implements IShipper { ) .subscribe((pageVars) => { this.initContext.logger.debug( - `Calling FS.setVars with context ${JSON.stringify(pageVars)}` + () => `Calling FS.setVars with context ${JSON.stringify(pageVars)}` ); this.fullStoryApi.setVars('page', { ...formatPayload(pageVars), @@ -145,7 +145,7 @@ export class FullStoryShipper implements IShipper { * @param newContext The full new context to set {@link EventContext} */ public extendContext(newContext: EventContext): void { - this.initContext.logger.debug(`Received context ${JSON.stringify(newContext)}`); + this.initContext.logger.debug(() => `Received context ${JSON.stringify(newContext)}`); // FullStory requires different APIs for different type of contexts: // User-level context. @@ -226,7 +226,9 @@ export class FullStoryShipper implements IShipper { cloudIsElasticStaffOwned, cloudTrialEndDate, }; - this.initContext.logger.debug(`Calling FS.setUserVars with ${JSON.stringify(userVars)}`); + this.initContext.logger.debug( + () => `Calling FS.setUserVars with ${JSON.stringify(userVars)}` + ); this.fullStoryApi.setUserVars(formatPayload(userVars)); } } diff --git a/packages/core/logging/core-logging-common-internal/src/logger.test.ts b/packages/core/logging/core-logging-common-internal/src/logger.test.ts index 613c0cbde93da1..2f256c257d94d9 100644 --- a/packages/core/logging/core-logging-common-internal/src/logger.test.ts +++ b/packages/core/logging/core-logging-common-internal/src/logger.test.ts @@ -186,7 +186,7 @@ describe('AbstractLogger', () => { }); describe('log level', () => { - it('does not calls appenders for records with unsupported levels', () => { + it('does not call appender for records with unsupported levels', () => { logger = new TestLogger(context, LogLevel.Warn, appenderMocks, factory); logger.trace('some trace message'); @@ -215,19 +215,49 @@ describe('AbstractLogger', () => { ); } }); + + it('does not call appender for records with unsupported levels for closure syntax', () => { + logger = new TestLogger(context, LogLevel.Warn, appenderMocks, factory); + + logger.trace(() => 'some trace message'); + logger.debug(() => 'some debug message'); + logger.info(() => 'some info message'); + logger.warn(() => 'some warn message'); + logger.error(() => 'some error message'); + logger.fatal(() => 'some fatal message'); + + for (const appenderMock of appenderMocks) { + expect(appenderMock.append).toHaveBeenCalledTimes(3); + expect(appenderMock.append).toHaveBeenCalledWith( + expect.objectContaining({ + level: LogLevel.Warn, + }) + ); + expect(appenderMock.append).toHaveBeenCalledWith( + expect.objectContaining({ + level: LogLevel.Error, + }) + ); + expect(appenderMock.append).toHaveBeenCalledWith( + expect.objectContaining({ + level: LogLevel.Fatal, + }) + ); + } + }); }); - describe('isLevelEnabled', () => { - const orderedLogLevels = [ - LogLevel.Fatal, - LogLevel.Error, - LogLevel.Warn, - LogLevel.Info, - LogLevel.Debug, - LogLevel.Trace, - LogLevel.All, - ]; + const orderedLogLevels = [ + LogLevel.Fatal, + LogLevel.Error, + LogLevel.Warn, + LogLevel.Info, + LogLevel.Debug, + LogLevel.Trace, + LogLevel.All, + ]; + describe('isLevelEnabled', () => { for (const logLevel of orderedLogLevels) { it(`returns the correct value for a '${logLevel.id}' level logger`, () => { const levelLogger = new TestLogger(context, logLevel, appenderMocks, factory); @@ -238,4 +268,22 @@ describe('AbstractLogger', () => { }); } }); + + describe('closure syntax', () => { + for (const logLevel of orderedLogLevels) { + it(`evaluates the log function for '${logLevel.id}' level if enabled`, () => { + logger = new TestLogger(context, LogLevel.All, appenderMocks, factory); + const logFn = jest.fn(() => 'some message'); + logger.trace(logFn); + expect(logFn).toHaveBeenCalledTimes(1); + }); + + it(`does not evaluate the log function for '${logLevel.id}' level if not enabled`, () => { + logger = new TestLogger(context, LogLevel.Off, appenderMocks, factory); + const logFn = jest.fn(() => 'some message'); + logger.trace(logFn); + expect(logFn).not.toHaveBeenCalled(); + }); + } + }); }); diff --git a/packages/core/logging/core-logging-common-internal/src/logger.ts b/packages/core/logging/core-logging-common-internal/src/logger.ts index 69d00ed57f39f8..df1b991b440429 100644 --- a/packages/core/logging/core-logging-common-internal/src/logger.ts +++ b/packages/core/logging/core-logging-common-internal/src/logger.ts @@ -13,6 +13,7 @@ import { LoggerFactory, LogMeta, Logger, + LogMessageSource, LogLevelId, } from '@kbn/logging'; @@ -43,28 +44,73 @@ export abstract class AbstractLogger implements Logger { meta?: Meta ): LogRecord; - public trace(message: string, meta?: Meta): void { - this.log(this.createLogRecord(LogLevel.Trace, message, meta)); + public trace(message: LogMessageSource, meta?: Meta): void { + if (!this.level.supports(LogLevel.Trace)) { + return; + } + if (typeof message === 'function') { + message = message(); + } + this.performLog(this.createLogRecord(LogLevel.Trace, message, meta)); } - public debug(message: string, meta?: Meta): void { - this.log(this.createLogRecord(LogLevel.Debug, message, meta)); + public debug(message: LogMessageSource, meta?: Meta): void { + if (!this.level.supports(LogLevel.Debug)) { + return; + } + if (typeof message === 'function') { + message = message(); + } + this.performLog(this.createLogRecord(LogLevel.Debug, message, meta)); } - public info(message: string, meta?: Meta): void { - this.log(this.createLogRecord(LogLevel.Info, message, meta)); + public info(message: LogMessageSource, meta?: Meta): void { + if (!this.level.supports(LogLevel.Info)) { + return; + } + if (typeof message === 'function') { + message = message(); + } + this.performLog(this.createLogRecord(LogLevel.Info, message, meta)); } - public warn(errorOrMessage: string | Error, meta?: Meta): void { - this.log(this.createLogRecord(LogLevel.Warn, errorOrMessage, meta)); + public warn( + errorOrMessage: LogMessageSource | Error, + meta?: Meta + ): void { + if (!this.level.supports(LogLevel.Warn)) { + return; + } + if (typeof errorOrMessage === 'function') { + errorOrMessage = errorOrMessage(); + } + this.performLog(this.createLogRecord(LogLevel.Warn, errorOrMessage, meta)); } - public error(errorOrMessage: string | Error, meta?: Meta): void { - this.log(this.createLogRecord(LogLevel.Error, errorOrMessage, meta)); + public error( + errorOrMessage: LogMessageSource | Error, + meta?: Meta + ): void { + if (!this.level.supports(LogLevel.Error)) { + return; + } + if (typeof errorOrMessage === 'function') { + errorOrMessage = errorOrMessage(); + } + this.performLog(this.createLogRecord(LogLevel.Error, errorOrMessage, meta)); } - public fatal(errorOrMessage: string | Error, meta?: Meta): void { - this.log(this.createLogRecord(LogLevel.Fatal, errorOrMessage, meta)); + public fatal( + errorOrMessage: LogMessageSource | Error, + meta?: Meta + ): void { + if (!this.level.supports(LogLevel.Fatal)) { + return; + } + if (typeof errorOrMessage === 'function') { + errorOrMessage = errorOrMessage(); + } + this.performLog(this.createLogRecord(LogLevel.Fatal, errorOrMessage, meta)); } public isLevelEnabled(levelId: LogLevelId): boolean { @@ -75,12 +121,16 @@ export abstract class AbstractLogger implements Logger { if (!this.level.supports(record.level)) { return; } - for (const appender of this.appenders) { - appender.append(record); - } + this.performLog(record); } public get(...childContextPaths: string[]): Logger { return this.factory.get(...[this.context, ...childContextPaths]); } + + private performLog(record: LogRecord) { + for (const appender of this.appenders) { + appender.append(record); + } + } } diff --git a/packages/kbn-cli-dev-mode/src/log_adapter.ts b/packages/kbn-cli-dev-mode/src/log_adapter.ts index 58260939a6dae3..eb76594036fcaa 100644 --- a/packages/kbn-cli-dev-mode/src/log_adapter.ts +++ b/packages/kbn-cli-dev-mode/src/log_adapter.ts @@ -10,8 +10,12 @@ import { Logger } from '@kbn/logging'; import { Log } from './log'; export const convertToLogger = (cliLog: Log): Logger => { - const getErrorMessage = (msgOrError: string | Error): string => { - return typeof msgOrError === 'string' ? msgOrError : msgOrError.message; + const getErrorMessage = (msgOrError: string | (() => string) | Error): string => { + return typeof msgOrError === 'function' + ? msgOrError() + : typeof msgOrError === 'string' + ? msgOrError + : msgOrError.message; }; const adapter: Logger = { diff --git a/packages/kbn-health-gateway-server/src/kibana/handlers/status.ts b/packages/kbn-health-gateway-server/src/kibana/handlers/status.ts index 51da98dfed0f74..0ce8ccbdd3cf7c 100644 --- a/packages/kbn-health-gateway-server/src/kibana/handlers/status.ts +++ b/packages/kbn-health-gateway-server/src/kibana/handlers/status.ts @@ -57,7 +57,7 @@ export class StatusHandler { const body = await this.poll(); const code = StatusHandler.STATUS_CODE[body.status]; - this.logger.debug(`Returning ${code} response with body: ${JSON.stringify(body)}`); + this.logger.debug(() => `Returning ${code} response with body: ${JSON.stringify(body)}`); return toolkit.response(body).type('application/json').code(code); } diff --git a/packages/kbn-logging-mocks/src/logger.mock.ts b/packages/kbn-logging-mocks/src/logger.mock.ts index 90436fb4516d20..f63f0fa0535726 100644 --- a/packages/kbn-logging-mocks/src/logger.mock.ts +++ b/packages/kbn-logging-mocks/src/logger.mock.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { Logger } from '@kbn/logging'; +import type { Logger, LogMeta, LogMessageSource } from '@kbn/logging'; export type MockedLogger = jest.Mocked & { context: string[] }; @@ -43,15 +43,39 @@ const clearLoggerMock = (logger: MockedLogger) => { logger.log.mockClear(); }; +const convertMessageSource = ( + value: [message: LogMessageSource, meta?: LogMeta | undefined] +): [string] | [string, LogMeta | undefined] => { + const message = typeof value[0] === 'function' ? value[0]() : value[0]; + const meta = value[1]; + if (meta) { + return [message, meta]; + } else { + return [message]; + } +}; + +const convertMessageSourceOrError = ( + value: [message: LogMessageSource | Error, meta?: LogMeta | undefined] +): [string | Error] | [string | Error, LogMeta | undefined] => { + const message = typeof value[0] === 'function' ? value[0]() : value[0]; + const meta = value[1]; + if (meta) { + return [message, meta]; + } else { + return [message]; + } +}; + const collectLoggerMock = (logger: MockedLogger) => { return { - debug: logger.debug.mock.calls, - error: logger.error.mock.calls, - fatal: logger.fatal.mock.calls, - info: logger.info.mock.calls, + debug: logger.debug.mock.calls.map(convertMessageSource), + error: logger.error.mock.calls.map(convertMessageSourceOrError), + fatal: logger.fatal.mock.calls.map(convertMessageSourceOrError), + info: logger.info.mock.calls.map(convertMessageSource), log: logger.log.mock.calls, - trace: logger.trace.mock.calls, - warn: logger.warn.mock.calls, + trace: logger.trace.mock.calls.map(convertMessageSource), + warn: logger.warn.mock.calls.map(convertMessageSourceOrError), }; }; diff --git a/packages/kbn-logging/index.ts b/packages/kbn-logging/index.ts index b6915b73a26bc8..a7082d96972323 100644 --- a/packages/kbn-logging/index.ts +++ b/packages/kbn-logging/index.ts @@ -9,7 +9,7 @@ export type { LogLevelId } from './src/log_level'; export { LogLevel } from './src/log_level'; export type { LogRecord } from './src/log_record'; -export type { Logger } from './src/logger'; +export type { Logger, LogMessageSource } from './src/logger'; export type { LogMeta } from './src/log_meta'; export type { LoggerFactory } from './src/logger_factory'; export type { Layout } from './src/layout'; diff --git a/packages/kbn-logging/src/logger.ts b/packages/kbn-logging/src/logger.ts index bd31d4c42f8057..45f215abaef637 100644 --- a/packages/kbn-logging/src/logger.ts +++ b/packages/kbn-logging/src/logger.ts @@ -10,6 +10,11 @@ import type { LogMeta } from './log_meta'; import type { LogRecord } from './log_record'; import type { LogLevelId } from './log_level'; +/** + * @public + */ +export type LogMessageSource = string | (() => string); + /** * Logger exposes all the necessary methods to log any type of information and * this is the interface used by the logging consumers including plugins. @@ -20,47 +25,74 @@ export interface Logger { /** * Log messages at the most detailed log level * - * @param message - The log message - * @param meta - + * @param message - The log message, or a function returning the log message + * @param meta - The ECS meta to attach to the log entry + * + * @remark If a function is provided for the message, it will only be evaluated if the logger's level is high enough for this level. + * This can be used as an alternative to {@link Logger.isLevelEnabled} to wrap expensive logging operations into a conditional blocks. */ - trace(message: string, meta?: Meta): void; + trace(message: LogMessageSource, meta?: Meta): void; /** * Log messages useful for debugging and interactive investigation - * @param message - The log message - * @param meta - + * + * @param message - The log message, or a function returning the log message + * @param meta - The ECS meta to attach to the log entry + * + * @remark If a function is provided for the message, it will only be evaluated if the logger's level is high enough for this level. + * This can be used as an alternative to {@link Logger.isLevelEnabled} to wrap expensive logging operations into a conditional blocks. */ - debug(message: string, meta?: Meta): void; + debug(message: LogMessageSource, meta?: Meta): void; /** * Logs messages related to general application flow - * @param message - The log message - * @param meta - + * + * @param message - The log message, or a function returning the log message + * @param meta - The ECS meta to attach to the log entry + * + * @remark If a function is provided for the message, it will only be evaluated if the logger's level is high enough for this level. + * This can be used as an alternative to {@link Logger.isLevelEnabled} to wrap expensive logging operations into a conditional blocks. */ - info(message: string, meta?: Meta): void; + info(message: LogMessageSource, meta?: Meta): void; /** * Logs abnormal or unexpected errors or messages - * @param errorOrMessage - An Error object or message string to log - * @param meta - + * + * @param errorOrMessage - An Error object, message string, or function returning the log message + * @param meta - The ECS meta to attach to the log entry + * + * @remark If a function is provided for the message, it will only be evaluated if the logger's level is high enough for this level. + * This can be used as an alternative to {@link Logger.isLevelEnabled} to wrap expensive logging operations into a conditional blocks. */ - warn(errorOrMessage: string | Error, meta?: Meta): void; + warn(errorOrMessage: LogMessageSource | Error, meta?: Meta): void; /** * Logs abnormal or unexpected errors or messages that caused a failure in the application flow * - * @param errorOrMessage - An Error object or message string to log - * @param meta - + * @param errorOrMessage - An Error object, message string, or function returning the log message + * @param meta - The ECS meta to attach to the log entry + * + * @remark If a function is provided for the message, it will only be evaluated if the logger's level is high enough for this level. + * This can be used as an alternative to {@link Logger.isLevelEnabled} to wrap expensive logging operations into a conditional blocks. */ - error(errorOrMessage: string | Error, meta?: Meta): void; + error( + errorOrMessage: LogMessageSource | Error, + meta?: Meta + ): void; /** * Logs abnormal or unexpected errors or messages that caused an unrecoverable failure * - * @param errorOrMessage - An Error object or message string to log - * @param meta - + * @param errorOrMessage - An Error object, message string, or function returning the log message + * @param meta - The ECS meta to attach to the log entry + * + * @remark If a function is provided for the message, it will only be evaluated if the logger's level is high enough for this level. + * This can be used as an alternative to {@link Logger.isLevelEnabled} to wrap expensive logging operations into a conditional blocks. */ - fatal(errorOrMessage: string | Error, meta?: Meta): void; + fatal( + errorOrMessage: LogMessageSource | Error, + meta?: Meta + ): void; /** @internal */ log(record: LogRecord): void; diff --git a/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.ts b/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.ts index 5ad9d2a6617be0..9db01189ff66dc 100644 --- a/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.ts +++ b/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.ts @@ -44,7 +44,7 @@ export const eqlSearchStrategyProvider = ( }, search: ({ id, ...request }, options: IAsyncSearchOptions, { esClient, uiSettingsClient }) => { - logger.debug(`_eql/search ${JSON.stringify(request.params) || id}`); + logger.debug(() => `_eql/search ${JSON.stringify(request.params) || id}`); const client = esClient.asCurrentUser.eql; diff --git a/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.ts b/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.ts index bd7aaa4656737f..8c5a8ad204a72e 100644 --- a/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.ts +++ b/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.ts @@ -204,7 +204,7 @@ export const enhancedEsSearchStrategyProvider = ( * @throws `KbnSearchError` */ search: (request, options: IAsyncSearchOptions, deps) => { - logger.debug(`search ${JSON.stringify(request.params) || request.id}`); + logger.debug(() => `search ${JSON.stringify(request.params) || request.id}`); if (request.indexType === DataViewType.ROLLUP && deps.rollupsEnabled) { return from(rollupSearch(request, options, deps)); diff --git a/src/plugins/data/server/search/strategies/esql_async_search/esql_async_search_strategy.ts b/src/plugins/data/server/search/strategies/esql_async_search/esql_async_search_strategy.ts index a58572f078bfc6..a204b6ca69ccad 100644 --- a/src/plugins/data/server/search/strategies/esql_async_search/esql_async_search_strategy.ts +++ b/src/plugins/data/server/search/strategies/esql_async_search/esql_async_search_strategy.ts @@ -134,7 +134,7 @@ export const esqlAsyncSearchStrategyProvider = ( * @throws `KbnSearchError` */ search: (request, options: IAsyncSearchOptions, deps) => { - logger.debug(`search ${JSON.stringify(request) || request.id}`); + logger.debug(() => `search ${JSON.stringify(request) || request.id}`); return asyncSearch(request, options, deps); }, diff --git a/src/plugins/data/server/search/strategies/sql_search/sql_search_strategy.ts b/src/plugins/data/server/search/strategies/sql_search/sql_search_strategy.ts index bd4442afa1aba6..55ed1bfecb9952 100644 --- a/src/plugins/data/server/search/strategies/sql_search/sql_search_strategy.ts +++ b/src/plugins/data/server/search/strategies/sql_search/sql_search_strategy.ts @@ -120,7 +120,7 @@ export const sqlSearchStrategyProvider = ( * @throws `KbnSearchError` */ search: (request, options: IAsyncSearchOptions, deps) => { - logger.debug(`sql search: search request=${JSON.stringify(request)}`); + logger.debug(() => `sql search: search request=${JSON.stringify(request)}`); return asyncSearch(request, options, deps); }, diff --git a/x-pack/packages/kbn-langchain/server/language_models/chat_openai.ts b/x-pack/packages/kbn-langchain/server/language_models/chat_openai.ts index 391609db21565d..c20de3be57e079 100644 --- a/x-pack/packages/kbn-langchain/server/language_models/chat_openai.ts +++ b/x-pack/packages/kbn-langchain/server/language_models/chat_openai.ts @@ -138,9 +138,10 @@ export class ActionsClientChatOpenAI extends ChatOpenAI { return this.caller.call(async () => { const requestBody = this.formatRequestForActionsClient(completionRequest); this.#logger.debug( - `${LLM_TYPE}#completionWithRetry ${this.#traceId} assistantMessage:\n${JSON.stringify( - requestBody.params.subActionParams - )} ` + () => + `${LLM_TYPE}#completionWithRetry ${this.#traceId} assistantMessage:\n${JSON.stringify( + requestBody.params.subActionParams + )} ` ); const actionResult = await this.#actionsClient.execute(requestBody); diff --git a/x-pack/packages/kbn-langchain/server/language_models/llm.ts b/x-pack/packages/kbn-langchain/server/language_models/llm.ts index bad538821ff1d9..8ebf62e8c31f0d 100644 --- a/x-pack/packages/kbn-langchain/server/language_models/llm.ts +++ b/x-pack/packages/kbn-langchain/server/language_models/llm.ts @@ -84,9 +84,10 @@ export class ActionsClientLlm extends LLM { // convert the Langchain prompt to an assistant message: const assistantMessage = getMessageContentAndRole(prompt); this.#logger.debug( - `ActionsClientLlm#_call\ntraceId: ${this.#traceId}\nassistantMessage:\n${JSON.stringify( - assistantMessage - )} ` + () => + `ActionsClientLlm#_call\ntraceId: ${this.#traceId}\nassistantMessage:\n${JSON.stringify( + assistantMessage + )} ` ); // create a new connector request body with the assistant message: const requestBody = { diff --git a/x-pack/packages/kbn-langchain/server/language_models/simple_chat_model.ts b/x-pack/packages/kbn-langchain/server/language_models/simple_chat_model.ts index ed387239938769..4bd77919d9fce9 100644 --- a/x-pack/packages/kbn-langchain/server/language_models/simple_chat_model.ts +++ b/x-pack/packages/kbn-langchain/server/language_models/simple_chat_model.ts @@ -102,9 +102,10 @@ export class ActionsClientSimpleChatModel extends SimpleChatModel { formattedMessages.push(getMessageContentAndRole(message.content, message._getType())); }); this.#logger.debug( - `ActionsClientSimpleChatModel#_call\ntraceId: ${ - this.#traceId - }\nassistantMessage:\n${JSON.stringify(formattedMessages)} ` + () => + `ActionsClientSimpleChatModel#_call\ntraceId: ${ + this.#traceId + }\nassistantMessage:\n${JSON.stringify(formattedMessages)} ` ); // create a new connector request body with the assistant message: const requestBody = { diff --git a/x-pack/plugins/actions/server/actions_client/actions_client.test.ts b/x-pack/plugins/actions/server/actions_client/actions_client.test.ts index 8f08bbb4b2d5a0..46e73f7bb35915 100644 --- a/x-pack/plugins/actions/server/actions_client/actions_client.test.ts +++ b/x-pack/plugins/actions/server/actions_client/actions_client.test.ts @@ -8,6 +8,7 @@ import { schema } from '@kbn/config-schema'; import moment from 'moment'; import { ByteSizeValue } from '@kbn/config-schema'; +import { MockedLogger, loggerMock } from '@kbn/logging-mocks'; import { DEFAULT_MICROSOFT_EXCHANGE_URL, DEFAULT_MICROSOFT_GRAPH_API_SCOPE, @@ -47,7 +48,7 @@ import { actionsAuthorizationMock } from '../authorization/actions_authorization import { trackLegacyRBACExemption } from '../lib/track_legacy_rbac_exemption'; import { ConnectorTokenClient } from '../lib/connector_token_client'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; -import { Logger, SavedObject } from '@kbn/core/server'; +import { SavedObject } from '@kbn/core/server'; import { connectorTokenClientMock } from '../lib/connector_token_client.mock'; import { inMemoryMetricsMock } from '../monitoring/in_memory_metrics.mock'; import { getOAuthJwtAccessToken } from '../lib/get_oauth_jwt_access_token'; @@ -108,7 +109,6 @@ const request = httpServerMock.createKibanaRequest(); const auditLogger = auditLoggerMock.create(); const mockUsageCountersSetup = usageCountersServiceMock.createSetupContract(); const mockUsageCounter = mockUsageCountersSetup.createUsageCounter('test'); -const logger = loggingSystemMock.create().get() as jest.Mocked; const mockTaskManager = taskManagerMock.createSetup(); const configurationUtilities = actionsConfigMock.create(); const eventLogClient = eventLogClientMock.create(); @@ -133,8 +133,11 @@ const actionTypeIdFromSavedObjectMock = (actionTypeId: string = 'my-action-type' } as SavedObject; }; +let logger: MockedLogger; + beforeEach(() => { jest.resetAllMocks(); + logger = loggerMock.create(); mockedLicenseState = licenseStateMock.create(); actionTypeRegistryParams = { licensing: licensingMock.createSetup(), @@ -1853,9 +1856,13 @@ describe('getOAuthAccessToken()', () => { tokenUrl: 'https://testurl.service-now.com/oauth_token.do', }); expect(getOAuthClientCredentialsAccessToken).not.toHaveBeenCalled(); - expect(logger.debug).toHaveBeenCalledWith( - `Successfully retrieved access token using JWT OAuth with tokenUrl https://testurl.service-now.com/oauth_token.do and config {\"clientId\":\"abc\",\"jwtKeyId\":\"def\",\"userIdentifierValue\":\"userA\"}` - ); + expect(loggingSystemMock.collect(logger).debug).toMatchInlineSnapshot(` + Array [ + Array [ + "Successfully retrieved access token using JWT OAuth with tokenUrl https://testurl.service-now.com/oauth_token.do and config {\\"clientId\\":\\"abc\\",\\"jwtKeyId\\":\\"def\\",\\"userIdentifierValue\\":\\"userA\\"}", + ], + ] + `); }); test('calls getOAuthClientCredentialsAccessToken when type="client"', async () => { @@ -1892,9 +1899,13 @@ describe('getOAuthAccessToken()', () => { oAuthScope: 'https://graph.microsoft.com/.default', }); expect(getOAuthJwtAccessToken).not.toHaveBeenCalled(); - expect(logger.debug).toHaveBeenCalledWith( - `Successfully retrieved access token using Client Credentials OAuth with tokenUrl https://login.microsoftonline.com/98765/oauth2/v2.0/token, scope https://graph.microsoft.com/.default and config {\"clientId\":\"abc\",\"tenantId\":\"def\"}` - ); + expect(loggingSystemMock.collect(logger).debug).toMatchInlineSnapshot(` + Array [ + Array [ + "Successfully retrieved access token using Client Credentials OAuth with tokenUrl https://login.microsoftonline.com/98765/oauth2/v2.0/token, scope https://graph.microsoft.com/.default and config {\\"clientId\\":\\"abc\\",\\"tenantId\\":\\"def\\"}", + ], + ] + `); }); test('throws when getOAuthJwtAccessToken throws error', async () => { @@ -1919,9 +1930,13 @@ describe('getOAuthAccessToken()', () => { ).rejects.toMatchInlineSnapshot(`[Error: Failed to retrieve access token]`); expect(getOAuthJwtAccessToken as jest.Mock).toHaveBeenCalled(); - expect(logger.debug).toHaveBeenCalledWith( - `Failed to retrieve access token using JWT OAuth with tokenUrl https://testurl.service-now.com/oauth_token.do and config {\"clientId\":\"abc\",\"jwtKeyId\":\"def\",\"userIdentifierValue\":\"userA\"} - Something went wrong!` - ); + expect(loggingSystemMock.collect(logger).debug).toMatchInlineSnapshot(` + Array [ + Array [ + "Failed to retrieve access token using JWT OAuth with tokenUrl https://testurl.service-now.com/oauth_token.do and config {\\"clientId\\":\\"abc\\",\\"jwtKeyId\\":\\"def\\",\\"userIdentifierValue\\":\\"userA\\"} - Something went wrong!", + ], + ] + `); }); test('throws when getOAuthClientCredentialsAccessToken throws error', async () => { @@ -1947,9 +1962,13 @@ describe('getOAuthAccessToken()', () => { ).rejects.toMatchInlineSnapshot(`[Error: Failed to retrieve access token]`); expect(getOAuthClientCredentialsAccessToken as jest.Mock).toHaveBeenCalled(); - expect(logger.debug).toHaveBeenCalledWith( - `Failed to retrieved access token using Client Credentials OAuth with tokenUrl https://login.microsoftonline.com/98765/oauth2/v2.0/token, scope https://graph.microsoft.com/.default and config {\"clientId\":\"abc\",\"tenantId\":\"def\"} - Something went wrong!` - ); + expect(loggingSystemMock.collect(logger).debug).toMatchInlineSnapshot(` + Array [ + Array [ + "Failed to retrieved access token using Client Credentials OAuth with tokenUrl https://login.microsoftonline.com/98765/oauth2/v2.0/token, scope https://graph.microsoft.com/.default and config {\\"clientId\\":\\"abc\\",\\"tenantId\\":\\"def\\"} - Something went wrong!", + ], + ] + `); }); }); diff --git a/x-pack/plugins/actions/server/actions_client/actions_client.ts b/x-pack/plugins/actions/server/actions_client/actions_client.ts index 1187898006f9ec..10c47731ef0045 100644 --- a/x-pack/plugins/actions/server/actions_client/actions_client.ts +++ b/x-pack/plugins/actions/server/actions_client/actions_client.ts @@ -557,15 +557,17 @@ export class ActionsClient { }); this.context.logger.debug( - `Successfully retrieved access token using JWT OAuth with tokenUrl ${ - tokenOpts.tokenUrl - } and config ${JSON.stringify(tokenOpts.config)}` + () => + `Successfully retrieved access token using JWT OAuth with tokenUrl ${ + tokenOpts.tokenUrl + } and config ${JSON.stringify(tokenOpts.config)}` ); } catch (err) { this.context.logger.debug( - `Failed to retrieve access token using JWT OAuth with tokenUrl ${ - tokenOpts.tokenUrl - } and config ${JSON.stringify(tokenOpts.config)} - ${err.message}` + () => + `Failed to retrieve access token using JWT OAuth with tokenUrl ${ + tokenOpts.tokenUrl + } and config ${JSON.stringify(tokenOpts.config)} - ${err.message}` ); throw Boom.badRequest(`Failed to retrieve access token`); } @@ -584,17 +586,19 @@ export class ActionsClient { }); this.context.logger.debug( - `Successfully retrieved access token using Client Credentials OAuth with tokenUrl ${ - tokenOpts.tokenUrl - }, scope ${tokenOpts.scope} and config ${JSON.stringify(tokenOpts.config)}` + () => + `Successfully retrieved access token using Client Credentials OAuth with tokenUrl ${ + tokenOpts.tokenUrl + }, scope ${tokenOpts.scope} and config ${JSON.stringify(tokenOpts.config)}` ); } catch (err) { this.context.logger.debug( - `Failed to retrieved access token using Client Credentials OAuth with tokenUrl ${ - tokenOpts.tokenUrl - }, scope ${tokenOpts.scope} and config ${JSON.stringify(tokenOpts.config)} - ${ - err.message - }` + () => + `Failed to retrieved access token using Client Credentials OAuth with tokenUrl ${ + tokenOpts.tokenUrl + }, scope ${tokenOpts.scope} and config ${JSON.stringify(tokenOpts.config)} - ${ + err.message + }` ); throw Boom.badRequest(`Failed to retrieve access token`); } diff --git a/x-pack/plugins/actions/server/sub_action_framework/sub_action_connector.ts b/x-pack/plugins/actions/server/sub_action_framework/sub_action_connector.ts index 19cc7e90d6254f..d5ad5391628bcc 100644 --- a/x-pack/plugins/actions/server/sub_action_framework/sub_action_connector.ts +++ b/x-pack/plugins/actions/server/sub_action_framework/sub_action_connector.ts @@ -107,7 +107,7 @@ export abstract class SubActionConnector { responseSchema.validate(data); } catch (resValidationError) { const err = new Error(`Response validation failed (${resValidationError})`); - this.logger.debug(`${err.message}:\n${inspect(data, { depth: 10 })}`); + this.logger.debug(() => `${err.message}:\n${inspect(data, { depth: 10 })}`); throw err; } } diff --git a/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts b/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts index 66cc1a30774818..136d7dd73d32a3 100644 --- a/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts +++ b/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts @@ -520,9 +520,10 @@ export class AlertsClient< ); } else { this.options.logger.debug( - `Could not find alert document to update for recovered alert with id ${id} and uuid ${currentRecoveredAlerts[ - id - ].getUuid()}` + () => + `Could not find alert document to update for recovered alert with id ${id} and uuid ${currentRecoveredAlerts[ + id + ].getUuid()}` ); } } diff --git a/x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts b/x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts index 0a3710ecf11599..98cd0b67ff05a2 100644 --- a/x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts +++ b/x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts @@ -152,9 +152,10 @@ async function createAliasStream(opts: CreateConcreteWriteIndexOpts): Promise + `Found ${concreteIndices.length} concrete indices for ${ + indexPatterns.name + } - ${JSON.stringify(concreteIndices)}` ); } catch (error) { // 404 is expected if no concrete write indices have been created diff --git a/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.test.ts b/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.test.ts index da0b65f550debf..bc5cc108dba2bb 100644 --- a/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.test.ts +++ b/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.test.ts @@ -25,7 +25,7 @@ const esqlQueryRequest = { }, }; -const logger = loggingSystemMock.create().get(); +let logger = loggingSystemMock.create().get(); const rule = { name: 'test-rule', @@ -43,6 +43,10 @@ describe('wrapScopedClusterClient', () => { jest.useRealTimers(); }); + beforeEach(() => { + logger = loggingSystemMock.create().get(); + }); + afterEach(() => { jest.resetAllMocks(); }); @@ -68,7 +72,7 @@ describe('wrapScopedClusterClient', () => { }); expect(scopedClusterClient.asInternalUser.search).not.toHaveBeenCalled(); expect(scopedClusterClient.asCurrentUser.search).not.toHaveBeenCalled(); - expect(logger.debug).toHaveBeenCalledWith( + expect(loggingSystemMock.collect(logger).debug[0][0]).toEqual( `executing query for rule .test-rule-type:abcdefg in space my-space - {\"body\":{\"query\":{\"bool\":{\"filter\":{\"range\":{\"@timestamp\":{\"gte\":0}}}}}}} - with options {} and 5000ms requestTimeout` ); }); @@ -93,7 +97,7 @@ describe('wrapScopedClusterClient', () => { }); expect(scopedClusterClient.asInternalUser.search).not.toHaveBeenCalled(); expect(scopedClusterClient.asCurrentUser.search).not.toHaveBeenCalled(); - expect(logger.debug).toHaveBeenCalledWith( + expect(loggingSystemMock.collect(logger).debug[0][0]).toEqual( `executing query for rule .test-rule-type:abcdefg in space my-space - {\"body\":{\"query\":{\"bool\":{\"filter\":{\"range\":{\"@timestamp\":{\"gte\":0}}}}}}} - with options {} and 5000ms requestTimeout` ); }); @@ -193,7 +197,7 @@ describe('wrapScopedClusterClient', () => { expect(stats.numSearches).toEqual(3); expect(stats.esSearchDurationMs).toEqual(999); - expect(logger.debug).toHaveBeenCalledWith( + expect(loggingSystemMock.collect(logger).debug[0][0]).toEqual( `executing query for rule .test-rule-type:abcdefg in space my-space - {\"body\":{\"query\":{\"bool\":{\"filter\":{\"range\":{\"@timestamp\":{\"gte\":0}}}}}}} - with options {}` ); }); @@ -241,7 +245,7 @@ describe('wrapScopedClusterClient', () => { }); expect(scopedClusterClient.asInternalUser.search).not.toHaveBeenCalled(); expect(scopedClusterClient.asCurrentUser.search).not.toHaveBeenCalled(); - expect(logger.debug).toHaveBeenCalledWith( + expect(loggingSystemMock.collect(logger).debug[0][0]).toEqual( 'executing eql query for rule .test-rule-type:abcdefg in space my-space - {"index":"foo","query":"process where process.name == \\"regsvr32.exe\\""} - with options {} and 5000ms requestTimeout' ); }); @@ -266,7 +270,7 @@ describe('wrapScopedClusterClient', () => { }); expect(scopedClusterClient.asInternalUser.search).not.toHaveBeenCalled(); expect(scopedClusterClient.asCurrentUser.search).not.toHaveBeenCalled(); - expect(logger.debug).toHaveBeenCalledWith( + expect(loggingSystemMock.collect(logger).debug[0][0]).toEqual( 'executing eql query for rule .test-rule-type:abcdefg in space my-space - {"index":"foo","query":"process where process.name == \\"regsvr32.exe\\""} - with options {} and 5000ms requestTimeout' ); }); @@ -340,7 +344,7 @@ describe('wrapScopedClusterClient', () => { expect(stats.numSearches).toEqual(3); expect(stats.esSearchDurationMs).toEqual(999); - expect(logger.debug).toHaveBeenCalledWith( + expect(loggingSystemMock.collect(logger).debug[0][0]).toEqual( `executing eql query for rule .test-rule-type:abcdefg in space my-space - {\"index\":\"foo\",\"query\":\"process where process.name == \\\"regsvr32.exe\\\"\"} - with options {}` ); }); @@ -391,7 +395,7 @@ describe('wrapScopedClusterClient', () => { }); expect(scopedClusterClient.asInternalUser.search).not.toHaveBeenCalled(); expect(scopedClusterClient.asCurrentUser.search).not.toHaveBeenCalled(); - expect(logger.debug).toHaveBeenCalledWith( + expect(loggingSystemMock.collect(logger).debug[0][0]).toEqual( 'executing ES|QL query for rule .test-rule-type:abcdefg in space my-space - {"method":"POST","path":"/_query","body":{"query":"from .kibana_task_manager"}} - with options {} and 5000ms requestTimeout' ); }); @@ -416,7 +420,7 @@ describe('wrapScopedClusterClient', () => { }); expect(scopedClusterClient.asInternalUser.search).not.toHaveBeenCalled(); expect(scopedClusterClient.asCurrentUser.search).not.toHaveBeenCalled(); - expect(logger.debug).toHaveBeenCalledWith( + expect(loggingSystemMock.collect(logger).debug[0][0]).toEqual( 'executing ES|QL query for rule .test-rule-type:abcdefg in space my-space - {"method":"POST","path":"/_query","body":{"query":"from .kibana_task_manager"}} - with options {} and 5000ms requestTimeout' ); }); @@ -490,7 +494,7 @@ describe('wrapScopedClusterClient', () => { expect(stats.numSearches).toEqual(3); expect(stats.totalSearchDurationMs).toBeGreaterThan(-1); - expect(logger.debug).toHaveBeenCalledWith( + expect(loggingSystemMock.collect(logger).debug[0][0]).toEqual( `executing ES|QL query for rule .test-rule-type:abcdefg in space my-space - {\"method\":\"POST\",\"path\":\"/_query\",\"body\":{\"query\":\"from .kibana_task_manager\"}} - with options {}` ); }); diff --git a/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.ts b/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.ts index ac5b407e4029ca..fb7575891dfc8d 100644 --- a/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.ts +++ b/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.ts @@ -167,11 +167,12 @@ function getWrappedTransportRequestFn(opts: WrapEsClientOpts) { const requestOptions = options ?? {}; const start = Date.now(); opts.logger.debug( - `executing ES|QL query for rule ${opts.rule.alertTypeId}:${opts.rule.id} in space ${ - opts.rule.spaceId - } - ${JSON.stringify(params)} - with options ${JSON.stringify(requestOptions)}${ - requestTimeout ? ` and ${requestTimeout}ms requestTimeout` : '' - }` + () => + `executing ES|QL query for rule ${opts.rule.alertTypeId}:${opts.rule.id} in space ${ + opts.rule.spaceId + } - ${JSON.stringify(params)} - with options ${JSON.stringify(requestOptions)}${ + requestTimeout ? ` and ${requestTimeout}ms requestTimeout` : '' + }` ); const result = (await originalRequestFn.call(opts.esClient.transport, params, { ...requestOptions, @@ -235,11 +236,12 @@ function getWrappedEqlSearchFn(opts: WrapEsClientOpts) { const searchOptions = options ?? {}; const start = Date.now(); opts.logger.debug( - `executing eql query for rule ${opts.rule.alertTypeId}:${opts.rule.id} in space ${ - opts.rule.spaceId - } - ${JSON.stringify(params)} - with options ${JSON.stringify(searchOptions)}${ - requestTimeout ? ` and ${requestTimeout}ms requestTimeout` : '' - }` + () => + `executing eql query for rule ${opts.rule.alertTypeId}:${opts.rule.id} in space ${ + opts.rule.spaceId + } - ${JSON.stringify(params)} - with options ${JSON.stringify(searchOptions)}${ + requestTimeout ? ` and ${requestTimeout}ms requestTimeout` : '' + }` ); const result = (await originalEqlSearch.call(opts.esClient, params, { ...searchOptions, @@ -316,11 +318,12 @@ function getWrappedSearchFn(opts: WrapEsClientOpts) { const searchOptions = options ?? {}; const start = Date.now(); opts.logger.debug( - `executing query for rule ${opts.rule.alertTypeId}:${opts.rule.id} in space ${ - opts.rule.spaceId - } - ${JSON.stringify(params)} - with options ${JSON.stringify(searchOptions)}${ - requestTimeout ? ` and ${requestTimeout}ms requestTimeout` : '' - }` + () => + `executing query for rule ${opts.rule.alertTypeId}:${opts.rule.id} in space ${ + opts.rule.spaceId + } - ${JSON.stringify(params)} - with options ${JSON.stringify(searchOptions)}${ + requestTimeout ? ` and ${requestTimeout}ms requestTimeout` : '' + }` ); const result = (await originalSearch.call(opts.esClient, params, { ...searchOptions, diff --git a/x-pack/plugins/alerting/server/lib/wrap_search_source_client.test.ts b/x-pack/plugins/alerting/server/lib/wrap_search_source_client.test.ts index 21fe0e7ecb02f4..2eb51cfd06f7ae 100644 --- a/x-pack/plugins/alerting/server/lib/wrap_search_source_client.test.ts +++ b/x-pack/plugins/alerting/server/lib/wrap_search_source_client.test.ts @@ -11,7 +11,7 @@ import { createSearchSourceMock } from '@kbn/data-plugin/common/search/search_so import { of, throwError } from 'rxjs'; import { wrapSearchSourceClient } from './wrap_search_source_client'; -const logger = loggingSystemMock.create().get(); +let logger: ReturnType; const rule = { name: 'test-rule', @@ -38,6 +38,10 @@ describe('wrapSearchSourceClient', () => { jest.useFakeTimers({ legacyFakeTimers: true }); }); + beforeEach(() => { + logger = loggingSystemMock.createLogger(); + }); + afterAll(() => { jest.useRealTimers(); }); @@ -84,7 +88,7 @@ describe('wrapSearchSourceClient', () => { requestTimeout: 5000, }, }); - expect(logger.debug).toHaveBeenCalledWith( + expect(loggingSystemMock.collect(logger).debug.map((params) => params[0])).toContain( `executing query for rule .test-rule-type:abcdefg in space my-space - with options {} and 5000ms requestTimeout` ); }); @@ -136,7 +140,7 @@ describe('wrapSearchSourceClient', () => { expect(stats.numSearches).toEqual(3); expect(stats.esSearchDurationMs).toEqual(999); - expect(logger.debug).toHaveBeenCalledWith( + expect(loggingSystemMock.collect(logger).debug.map((params) => params[0])).toContain( `executing query for rule .test-rule-type:abcdefg in space my-space - with options {}` ); }); diff --git a/x-pack/plugins/alerting/server/lib/wrap_search_source_client.ts b/x-pack/plugins/alerting/server/lib/wrap_search_source_client.ts index 77d08a969fae03..e1cf3cba0bd246 100644 --- a/x-pack/plugins/alerting/server/lib/wrap_search_source_client.ts +++ b/x-pack/plugins/alerting/server/lib/wrap_search_source_client.ts @@ -153,11 +153,12 @@ function wrapFetch$({ const start = Date.now(); logger.debug( - `executing query for rule ${rule.alertTypeId}:${rule.id} in space ${ - rule.spaceId - } - with options ${JSON.stringify(searchOptions)}${ - requestTimeout ? ` and ${requestTimeout}ms requestTimeout` : '' - }` + () => + `executing query for rule ${rule.alertTypeId}:${rule.id} in space ${ + rule.spaceId + } - with options ${JSON.stringify(searchOptions)}${ + requestTimeout ? ` and ${requestTimeout}ms requestTimeout` : '' + }` ); return pureSearchSource diff --git a/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.test.ts b/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.test.ts index f768f85d17748e..f3551f04477fdc 100644 --- a/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.test.ts @@ -366,6 +366,7 @@ describe('Ad Hoc Task Runner', () => { triggeredActionsStatus: 'complete', }); (RuleRunMetricsStore as jest.Mock).mockImplementation(() => ruleRunMetricsStore); + logger.isLevelEnabled.mockReturnValue(true); logger.get.mockImplementation(() => logger); taskRunnerFactoryInitializerParams.executionContext.withContext.mockImplementation((ctx, fn) => fn() diff --git a/x-pack/plugins/alerting/server/task_runner/lib/process_run_result.test.ts b/x-pack/plugins/alerting/server/task_runner/lib/process_run_result.test.ts index e30865028867af..615a0416c85714 100644 --- a/x-pack/plugins/alerting/server/task_runner/lib/process_run_result.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/lib/process_run_result.test.ts @@ -6,12 +6,12 @@ */ import { processRunResults } from './process_run_result'; -import { loggingSystemMock } from '@kbn/core/server/mocks'; +import { loggerMock } from '@kbn/logging-mocks'; import { ruleResultServiceMock } from '../../monitoring/rule_result_service.mock'; import { asErr, asOk } from '../../lib/result_type'; import { ActionsCompletion } from '@kbn/alerting-state-types'; -const logger = loggingSystemMock.create().get(); +const logger = loggerMock.create(); const ruleResultService = ruleResultServiceMock.create(); const executionMetrics = { @@ -32,6 +32,7 @@ const executionMetrics = { describe('processRunResults', () => { beforeEach(() => { jest.resetAllMocks(); + logger.isLevelEnabled.mockReturnValue(true); }); test('should process results as expected when results are successful', () => { diff --git a/x-pack/plugins/alerting/server/task_runner/lib/process_run_result.ts b/x-pack/plugins/alerting/server/task_runner/lib/process_run_result.ts index d419ffeb72a3a8..b1d898b1ec0749 100644 --- a/x-pack/plugins/alerting/server/task_runner/lib/process_run_result.ts +++ b/x-pack/plugins/alerting/server/task_runner/lib/process_run_result.ts @@ -69,7 +69,7 @@ export function processRunResults({ (err: ElasticsearchError) => lastRunFromError(err) ); - if (logger) { + if (logger && logger.isLevelEnabled('debug')) { logger.debug(`deprecated ruleRunStatus for ${logPrefix}: ${JSON.stringify(executionStatus)}`); logger.debug(`ruleRunStatus for ${logPrefix}: ${JSON.stringify(lastRun)}`); if (executionMetrics) { diff --git a/x-pack/plugins/alerting/server/task_runner/log_alerts.test.ts b/x-pack/plugins/alerting/server/task_runner/log_alerts.test.ts index 8bde8e3abf4032..aabd657289e75a 100644 --- a/x-pack/plugins/alerting/server/task_runner/log_alerts.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/log_alerts.test.ts @@ -27,6 +27,7 @@ describe('logAlerts', () => { beforeEach(() => { jest.resetAllMocks(); + logger.isLevelEnabled.mockReturnValue(true); ruleRunMetricsStore = new RuleRunMetricsStore(); }); diff --git a/x-pack/plugins/alerting/server/task_runner/log_alerts.ts b/x-pack/plugins/alerting/server/task_runner/log_alerts.ts index 10d3f06dd0de5c..a83f8ebb74ac45 100644 --- a/x-pack/plugins/alerting/server/task_runner/log_alerts.ts +++ b/x-pack/plugins/alerting/server/task_runner/log_alerts.ts @@ -58,7 +58,7 @@ export function logAlerts< }); } - if (activeAlertIds.length > 0) { + if (activeAlertIds.length > 0 && logger.isLevelEnabled('debug')) { logger.debug( `rule ${ruleLogPrefix} has ${activeAlertIds.length} active alerts: ${JSON.stringify( activeAlertIds.map((alertId) => ({ @@ -68,7 +68,7 @@ export function logAlerts< )}` ); } - if (recoveredAlertIds.length > 0) { + if (recoveredAlertIds.length > 0 && logger.isLevelEnabled('debug')) { logger.debug( `rule ${ruleLogPrefix} has ${recoveredAlertIds.length} recovered alerts: ${JSON.stringify( recoveredAlertIds diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts b/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts index d87dbf17f2d892..d6f4e4942da1b1 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts @@ -220,6 +220,7 @@ describe('Task Runner', () => { beforeEach(() => { jest.resetAllMocks(); + logger.isLevelEnabled.mockReturnValue(true); jest .requireMock('../lib/wrap_scoped_cluster_client') .createWrappedScopedClusterClientFactory.mockReturnValue({ diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner.ts b/x-pack/plugins/alerting/server/task_runner/task_runner.ts index d5da0a3a8a2269..fadd0a944acc8c 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner.ts @@ -630,11 +630,13 @@ export class TaskRunner< if (outcome === 'failure') { this.inMemoryMetrics.increment(IN_MEMORY_METRICS.RULE_FAILURES); } - this.logger.debug( - `Updating rule task for ${this.ruleType.id} rule with id ${ruleId} - ${JSON.stringify( - executionStatus - )} - ${JSON.stringify(lastRun)}` - ); + if (this.logger.isLevelEnabled('debug')) { + this.logger.debug( + `Updating rule task for ${this.ruleType.id} rule with id ${ruleId} - ${JSON.stringify( + executionStatus + )} - ${JSON.stringify(lastRun)}` + ); + } await this.updateRuleSavedObjectPostRun(ruleId, namespace, { executionStatus: ruleExecutionStatusToRaw(executionStatus), nextRun, diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner_cancel.test.ts b/x-pack/plugins/alerting/server/task_runner/task_runner_cancel.test.ts index 0e95ad588eda10..b41b26bd1ea498 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner_cancel.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner_cancel.test.ts @@ -198,6 +198,7 @@ describe('Task Runner Cancel', () => { alertingEventLogger.getStartAndDuration.mockImplementation(() => ({ start: new Date() })); (AlertingEventLogger as jest.Mock).mockImplementation(() => alertingEventLogger); logger.get.mockImplementation(() => logger); + logger.isLevelEnabled.mockReturnValue(true); actionsClient.bulkEnqueueExecution.mockResolvedValue({ errors: false, items: [] }); }); diff --git a/x-pack/plugins/alerting/server/usage/lib/get_telemetry_from_event_log.ts b/x-pack/plugins/alerting/server/usage/lib/get_telemetry_from_event_log.ts index 49b7c7374213d0..df76929ca5d509 100644 --- a/x-pack/plugins/alerting/server/usage/lib/get_telemetry_from_event_log.ts +++ b/x-pack/plugins/alerting/server/usage/lib/get_telemetry_from_event_log.ts @@ -156,10 +156,10 @@ export async function getExecutionsPerDayCount({ }, }; - logger.debug(`query for getExecutionsPerDayCount - ${JSON.stringify(query)}`); + logger.debug(() => `query for getExecutionsPerDayCount - ${JSON.stringify(query)}`); const results = await esClient.search(query); - logger.debug(`results for getExecutionsPerDayCount query - ${JSON.stringify(results)}`); + logger.debug(() => `results for getExecutionsPerDayCount query - ${JSON.stringify(results)}`); const totalRuleExecutions = typeof results.hits.total === 'number' ? results.hits.total : results.hits.total?.value; @@ -242,10 +242,12 @@ export async function getExecutionTimeoutsPerDayCount({ }, }; - logger.debug(`query for getExecutionTimeoutsPerDayCount - ${JSON.stringify(query)}`); + logger.debug(() => `query for getExecutionTimeoutsPerDayCount - ${JSON.stringify(query)}`); const results = await esClient.search(query); - logger.debug(`results for getExecutionTimeoutsPerDayCount query - ${JSON.stringify(results)}`); + logger.debug( + () => `results for getExecutionTimeoutsPerDayCount query - ${JSON.stringify(results)}` + ); const aggregations = results.aggregations as { by_rule_type_id: AggregationsTermsAggregateBase; diff --git a/x-pack/plugins/alerting/server/usage/lib/get_telemetry_from_kibana.ts b/x-pack/plugins/alerting/server/usage/lib/get_telemetry_from_kibana.ts index ecaf99ffc44a36..fdfdbf1dbcfe67 100644 --- a/x-pack/plugins/alerting/server/usage/lib/get_telemetry_from_kibana.ts +++ b/x-pack/plugins/alerting/server/usage/lib/get_telemetry_from_kibana.ts @@ -272,10 +272,10 @@ export async function getTotalCountAggregations({ }, }; - logger.debug(`query for getTotalCountAggregations - ${JSON.stringify(query)}`); + logger.debug(() => `query for getTotalCountAggregations - ${JSON.stringify(query)}`); const results = await esClient.search(query); - logger.debug(`results for getTotalCountAggregations query - ${JSON.stringify(results)}`); + logger.debug(() => `results for getTotalCountAggregations query - ${JSON.stringify(results)}`); const aggregations = results.aggregations as { by_rule_type_id: AggregationsTermsAggregateBase; @@ -445,10 +445,10 @@ export async function getTotalCountInUse({ }, }; - logger.debug(`query for getTotalCountInUse - ${JSON.stringify(query)}`); + logger.debug(() => `query for getTotalCountInUse - ${JSON.stringify(query)}`); const results = await esClient.search(query); - logger.debug(`results for getTotalCountInUse query - ${JSON.stringify(results)}`); + logger.debug(() => `results for getTotalCountInUse query - ${JSON.stringify(results)}`); const aggregations = results.aggregations as { by_rule_type_id: AggregationsTermsAggregateBase; diff --git a/x-pack/plugins/alerting/server/usage/lib/get_telemetry_from_task_manager.ts b/x-pack/plugins/alerting/server/usage/lib/get_telemetry_from_task_manager.ts index 9b37051db5baff..f3741a086bf9b4 100644 --- a/x-pack/plugins/alerting/server/usage/lib/get_telemetry_from_task_manager.ts +++ b/x-pack/plugins/alerting/server/usage/lib/get_telemetry_from_task_manager.ts @@ -99,11 +99,11 @@ export async function getFailedAndUnrecognizedTasksPerDay({ }, }; - logger.debug(`query for getFailedAndUnrecognizedTasksPerDay - ${JSON.stringify(query)}`); + logger.debug(() => `query for getFailedAndUnrecognizedTasksPerDay - ${JSON.stringify(query)}`); const results = await esClient.search(query); logger.debug( - `results for getFailedAndUnrecognizedTasksPerDay query - ${JSON.stringify(results)}` + () => `results for getFailedAndUnrecognizedTasksPerDay query - ${JSON.stringify(results)}` ); const aggregations = results.aggregations as { diff --git a/x-pack/plugins/cases/server/connectors/cases/cases_connector_executor.ts b/x-pack/plugins/cases/server/connectors/cases/cases_connector_executor.ts index 15435cc8be76c5..ac9490a814a616 100644 --- a/x-pack/plugins/cases/server/connectors/cases/cases_connector_executor.ts +++ b/x-pack/plugins/cases/server/connectors/cases/cases_connector_executor.ts @@ -173,10 +173,15 @@ export class CasesConnectorExecutor { }: Pick & { params: CasesConnectorRunParams; }): GroupedAlerts[] { - this.logger.debug( - `[CasesConnector][CasesConnectorExecutor][groupAlerts] Grouping ${alerts.length} alerts`, - this.getLogMetadata(params, { labels: { groupingBy }, tags: ['case-connector:groupAlerts'] }) - ); + if (this.logger.isLevelEnabled('debug')) { + this.logger.debug( + `[CasesConnector][CasesConnectorExecutor][groupAlerts] Grouping ${alerts.length} alerts`, + this.getLogMetadata(params, { + labels: { groupingBy }, + tags: ['case-connector:groupAlerts'], + }) + ); + } const uniqueGroupingByFields = Array.from(new Set(groupingBy)); const groupingMap = new Map(); @@ -190,19 +195,23 @@ export class CasesConnectorExecutor { uniqueGroupingByFields.every((groupingByField) => Boolean(get(alert, groupingByField, null))) ); - this.logger.debug( - `[CasesConnector][CasesConnectorExecutor][groupAlerts] Total alerts to be grouped: ${alertsWithAllGroupingFields.length} out of ${alerts.length}`, - this.getLogMetadata(params, { tags: ['case-connector:groupAlerts'] }) - ); + if (this.logger.isLevelEnabled('debug')) { + this.logger.debug( + `[CasesConnector][CasesConnectorExecutor][groupAlerts] Total alerts to be grouped: ${alertsWithAllGroupingFields.length} out of ${alerts.length}`, + this.getLogMetadata(params, { tags: ['case-connector:groupAlerts'] }) + ); + } for (const alert of alertsWithAllGroupingFields) { const alertWithOnlyTheGroupingFields = pick(alert, uniqueGroupingByFields); const groupingKey = stringify(alertWithOnlyTheGroupingFields); - this.logger.debug( - `[CasesConnector][CasesConnectorExecutor][groupAlerts] Alert ${alert._id} got grouped into bucket with ID ${groupingKey}`, - this.getLogMetadata(params, { tags: ['case-connector:groupAlerts', groupingKey] }) - ); + if (this.logger.isLevelEnabled('debug')) { + this.logger.debug( + `[CasesConnector][CasesConnectorExecutor][groupAlerts] Alert ${alert._id} got grouped into bucket with ID ${groupingKey}`, + this.getLogMetadata(params, { tags: ['case-connector:groupAlerts', groupingKey] }) + ); + } if (groupingMap.has(groupingKey)) { groupingMap.get(groupingKey)?.alerts.push(alert); @@ -261,10 +270,12 @@ export class CasesConnectorExecutor { params: CasesConnectorRunParams, groupedAlerts: GroupedAlerts[] ): Map { - this.logger.debug( - `[CasesConnector][CasesConnectorExecutor][generateOracleKeys] Generating ${groupedAlerts.length} oracle keys`, - this.getLogMetadata(params, { tags: ['case-connector:generateOracleKeys'] }) - ); + if (this.logger.isLevelEnabled('debug')) { + this.logger.debug( + `[CasesConnector][CasesConnectorExecutor][generateOracleKeys] Generating ${groupedAlerts.length} oracle keys`, + this.getLogMetadata(params, { tags: ['case-connector:generateOracleKeys'] }) + ); + } const { rule, owner } = params; @@ -280,21 +291,25 @@ export class CasesConnectorExecutor { const oracleKey = this.casesOracleService.getRecordId(getRecordIdParams); - this.logger.debug( - `[CasesConnector][CasesConnectorExecutor][generateOracleKeys] Oracle key ${oracleKey} generated`, - this.getLogMetadata(params, { - labels: { params: getRecordIdParams }, - tags: ['case-connector:generateOracleKeys', oracleKey], - }) - ); + if (this.logger.isLevelEnabled('debug')) { + this.logger.debug( + `[CasesConnector][CasesConnectorExecutor][generateOracleKeys] Oracle key ${oracleKey} generated`, + this.getLogMetadata(params, { + labels: { params: getRecordIdParams }, + tags: ['case-connector:generateOracleKeys', oracleKey], + }) + ); + } oracleMap.set(oracleKey, { oracleKey, grouping, alerts }); } - this.logger.debug( - `[CasesConnector][CasesConnectorExecutor][generateOracleKeys] Total of oracles keys generated ${oracleMap.size}`, - this.getLogMetadata(params, { tags: ['case-connector:generateOracleKeys'] }) - ); + if (this.logger.isLevelEnabled('debug')) { + this.logger.debug( + `[CasesConnector][CasesConnectorExecutor][generateOracleKeys] Total of oracles keys generated ${oracleMap.size}`, + this.getLogMetadata(params, { tags: ['case-connector:generateOracleKeys'] }) + ); + } return oracleMap; } @@ -303,11 +318,12 @@ export class CasesConnectorExecutor { params: CasesConnectorRunParams, groupedAlertsWithOracleKey: Map ): Promise> { - this.logger.debug( - `[CasesConnector][CasesConnectorExecutor][upsertOracleRecords] Upserting ${groupedAlertsWithOracleKey.size} oracle records`, - this.getLogMetadata(params, { tags: ['case-connector:upsertOracleRecords'] }) - ); - + if (this.logger.isLevelEnabled('debug')) { + this.logger.debug( + `[CasesConnector][CasesConnectorExecutor][upsertOracleRecords] Upserting ${groupedAlertsWithOracleKey.size} oracle records`, + this.getLogMetadata(params, { tags: ['case-connector:upsertOracleRecords'] }) + ); + } const bulkCreateReq: BulkCreateOracleRecordRequest = []; const oracleRecordMap = new Map(); @@ -322,25 +338,29 @@ export class CasesConnectorExecutor { const ids = Array.from(groupedAlertsWithOracleKey.values()).map(({ oracleKey }) => oracleKey); - this.logger.debug( - `[CasesConnector][CasesConnectorExecutor][upsertOracleRecords] Getting oracle records with ids ${ids}`, - this.getLogMetadata(params, { tags: ['case-connector:upsertOracleRecords', ...ids] }) - ); + if (this.logger.isLevelEnabled('debug')) { + this.logger.debug( + `[CasesConnector][CasesConnectorExecutor][upsertOracleRecords] Getting oracle records with ids ${ids}`, + this.getLogMetadata(params, { tags: ['case-connector:upsertOracleRecords', ...ids] }) + ); + } const bulkGetRes = await this.casesOracleService.bulkGetRecords(ids); const [bulkGetValidRecords, bulkGetRecordsErrors] = partitionRecordsByError(bulkGetRes); - this.logger.debug( - `[CasesConnector][CasesConnectorExecutor][upsertOracleRecords] The total number of valid oracle records is ${bulkGetValidRecords.length} and the total number of errors while getting the records is ${bulkGetRecordsErrors.length}`, - this.getLogMetadata(params, { - labels: { - total: ids.length, - success: bulkGetValidRecords.length, - errors: bulkGetRecordsErrors.length, - }, - tags: ['case-connector:upsertOracleRecords'], - }) - ); + if (this.logger.isLevelEnabled('debug')) { + this.logger.debug( + `[CasesConnector][CasesConnectorExecutor][upsertOracleRecords] The total number of valid oracle records is ${bulkGetValidRecords.length} and the total number of errors while getting the records is ${bulkGetRecordsErrors.length}`, + this.getLogMetadata(params, { + labels: { + total: ids.length, + success: bulkGetValidRecords.length, + errors: bulkGetRecordsErrors.length, + }, + tags: ['case-connector:upsertOracleRecords'], + }) + ); + } addRecordToMap(bulkGetValidRecords); @@ -350,16 +370,18 @@ export class CasesConnectorExecutor { const [nonFoundErrors, restOfErrors] = partitionByNonFoundErrors(bulkGetRecordsErrors); - this.logger.debug( - `[CasesConnector][CasesConnectorExecutor][upsertOracleRecords] The total number of non found oracle records is ${nonFoundErrors.length} and the total number of the rest of errors while getting the records is ${restOfErrors.length}`, - this.getLogMetadata(params, { - labels: { - nonFoundErrors: nonFoundErrors.length, - restOfErrors: restOfErrors.length, - }, - tags: ['case-connector:upsertOracleRecords'], - }) - ); + if (this.logger.isLevelEnabled('debug')) { + this.logger.debug( + `[CasesConnector][CasesConnectorExecutor][upsertOracleRecords] The total number of non found oracle records is ${nonFoundErrors.length} and the total number of the rest of errors while getting the records is ${restOfErrors.length}`, + this.getLogMetadata(params, { + labels: { + nonFoundErrors: nonFoundErrors.length, + restOfErrors: restOfErrors.length, + }, + tags: ['case-connector:upsertOracleRecords'], + }) + ); + } this.handleAndThrowErrors(restOfErrors); @@ -1073,17 +1095,19 @@ export class CasesConnectorExecutor { * attachments.bulkCreate throws an error on errors */ async (req: BulkCreateAlertsReq) => { - this.logger.debug( - `[CasesConnector][CasesConnectorExecutor][attachAlertsToCases] Attaching ${req.attachments.length} alerts to case with ID ${req.caseId}`, - this.getLogMetadata(params, { - labels: { caseId: req.caseId }, - tags: [ - 'case-connector:attachAlertsToCases', - req.caseId, - ...(req.attachments as Array<{ alertId: string }>).map(({ alertId }) => alertId), - ], - }) - ); + if (this.logger.isLevelEnabled('debug')) { + this.logger.debug( + `[CasesConnector][CasesConnectorExecutor][attachAlertsToCases] Attaching ${req.attachments.length} alerts to case with ID ${req.caseId}`, + this.getLogMetadata(params, { + labels: { caseId: req.caseId }, + tags: [ + 'case-connector:attachAlertsToCases', + req.caseId, + ...(req.attachments as Array<{ alertId: string }>).map(({ alertId }) => alertId), + ], + }) + ); + } await this.casesClient.attachments.bulkCreate(req); }, diff --git a/x-pack/plugins/cases/server/services/cases/index.ts b/x-pack/plugins/cases/server/services/cases/index.ts index d53cbc2edd8679..034e369b1c7000 100644 --- a/x-pack/plugins/cases/server/services/cases/index.ts +++ b/x-pack/plugins/cases/server/services/cases/index.ts @@ -274,7 +274,7 @@ export class CasesService { options?: SavedObjectsBulkDeleteOptions; }) { try { - this.log.debug(`Attempting to bulk delete case entities ${JSON.stringify(entities)}`); + this.log.debug(() => `Attempting to bulk delete case entities ${JSON.stringify(entities)}`); await this.unsecuredSavedObjectsClient.bulkDelete(entities, options); } catch (error) { this.log.error(`Error bulk deleting case entities ${JSON.stringify(entities)}: ${error}`); diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/index.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/index.ts index 680ab17672f61e..0360f93b15ee65 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/index.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/knowledge_base/index.ts @@ -260,7 +260,7 @@ export class AIAssistantKnowledgeBaseDataClient extends AIAssistantDataClient { }) : undefined; this.options.logger.debug(`created: ${created?.data.hits.hits.length ?? '0'}`); - this.options.logger.debug(`errors: ${JSON.stringify(errors, null, 2)}`); + this.options.logger.debug(() => `errors: ${JSON.stringify(errors, null, 2)}`); return created?.data ? transformESSearchToKnowledgeBaseEntry(created?.data) : []; }; @@ -314,12 +314,14 @@ export class AIAssistantKnowledgeBaseDataClient extends AIAssistantDataClient { ); this.options.logger.debug( - `getKnowledgeBaseDocuments() - Similarity Search Query:\n ${JSON.stringify( - vectorSearchQuery - )}` + () => + `getKnowledgeBaseDocuments() - Similarity Search Query:\n ${JSON.stringify( + vectorSearchQuery + )}` ); this.options.logger.debug( - `getKnowledgeBaseDocuments() - Similarity Search Results:\n ${JSON.stringify(results)}` + () => + `getKnowledgeBaseDocuments() - Similarity Search Results:\n ${JSON.stringify(results)}` ); return results; @@ -347,7 +349,7 @@ export class AIAssistantKnowledgeBaseDataClient extends AIAssistantDataClient { } this.options.logger.debug( - `Creating Knowledge Base Entry:\n ${JSON.stringify(knowledgeBaseEntry, null, 2)}` + () => `Creating Knowledge Base Entry:\n ${JSON.stringify(knowledgeBaseEntry, null, 2)}` ); this.options.logger.debug(`kbIndex: ${this.indexTemplateAndPattern.alias}`); const esClient = await this.options.elasticsearchClientPromise; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/elasticsearch_store/elasticsearch_store.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/elasticsearch_store/elasticsearch_store.ts index e076c90526a53b..5398abcb8a78e3 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/elasticsearch_store/elasticsearch_store.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/elasticsearch_store/elasticsearch_store.ts @@ -127,7 +127,7 @@ export class ElasticsearchStore extends VectorStore { try { const response = await this.esClient.bulk({ refresh: true, operations }); - this.logger.debug(`Add Documents Response:\n ${JSON.stringify(response)}`); + this.logger.debug(() => `Add Documents Response:\n ${JSON.stringify(response)}`); const errorIds = response.items.filter((i) => i.index?.error != null); operations.forEach((op, i) => { @@ -268,11 +268,12 @@ export class ElasticsearchStore extends VectorStore { }); this.logger.debug( - `Similarity search metadata source:\n${JSON.stringify( - results.map((r) => r?.metadata?.source ?? '(missing metadata.source)'), - null, - 2 - )}` + () => + `Similarity search metadata source:\n${JSON.stringify( + results.map((r) => r?.metadata?.source ?? '(missing metadata.source)'), + null, + 2 + )}` ); return results; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts index b6a624b368d828..86e01a93ddcdcc 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts @@ -119,7 +119,9 @@ export const callAgentExecutor: AgentExecutor = async ({ (tool) => tool.getTool(assistantToolParams) ?? [] ); - logger.debug(`applicable tools: ${JSON.stringify(tools.map((t) => t.name).join(', '), null, 2)}`); + logger.debug( + () => `applicable tools: ${JSON.stringify(tools.map((t) => t.name).join(', '), null, 2)}` + ); const executorArgs = { memory, diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/execute_tools.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/execute_tools.ts index b42455e14f6f1e..ae33faee3e227b 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/execute_tools.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/execute_tools.ts @@ -30,7 +30,7 @@ export const TOOLS_NODE = 'tools'; * @param tools - The tools available to execute */ export const executeTools = async ({ config, logger, state, tools }: ExecuteToolsParams) => { - logger.debug(`Node state:\n${JSON.stringify(state, null, 2)}`); + logger.debug(() => `Node state:\n${JSON.stringify(state, null, 2)}`); const toolExecutor = new ToolExecutor({ tools }); const agentAction = state.agentOutcome; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/generate_chat_title.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/generate_chat_title.ts index d1d60e9bed9b48..105b625cd5f367 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/generate_chat_title.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/generate_chat_title.ts @@ -35,7 +35,7 @@ export const generateChatTitle = async ({ model, state, }: GenerateChatTitleParams) => { - logger.debug(`Node state:\n ${JSON.stringify(state, null, 2)}`); + logger.debug(() => `Node state:\n ${JSON.stringify(state, null, 2)}`); if (state.messages.length !== 0) { logger.debug('No need to generate chat title, messages already exist'); diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/run_agent.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/run_agent.ts index 0a6ee3b79087c1..aeca4dca21ea60 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/run_agent.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/run_agent.ts @@ -38,7 +38,7 @@ export const runAgent = async ({ logger, state, }: RunAgentParams) => { - logger.debug(`Node state:\n${JSON.stringify(state, null, 2)}`); + logger.debug(() => `Node state:\n${JSON.stringify(state, null, 2)}`); const knowledgeHistory = await dataClients?.kbDataClient?.getKnowledgeBaseDocuments({ kbResource: 'user', diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/should_continue.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/should_continue.ts index 046c4a86d4c7a7..57fcb5510318b8 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/should_continue.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/nodes/should_continue.ts @@ -19,7 +19,7 @@ export interface ShouldContinueParams extends NodeParamsBase { * @param state - The current state of the graph */ export const shouldContinue = ({ logger, state }: ShouldContinueParams) => { - logger.debug(`Node state:\n${JSON.stringify(state, null, 2)}`); + logger.debug(() => `Node state:\n${JSON.stringify(state, null, 2)}`); if (state.agentOutcome && 'returnValues' in state.agentOutcome) { return 'end'; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/apm_tracer.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/apm_tracer.ts index ba4baef0433ad1..b0843c1c50d8d2 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/apm_tracer.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/apm_tracer.ts @@ -77,12 +77,12 @@ export class APMTracer extends BaseTracer implements LangChainTracerFields { } async onRetrieverStart(run: Run): Promise { - this.logger.debug(`onRetrieverStart: run:\n${JSON.stringify(run, null, 2)}`); + this.logger.debug(() => `onRetrieverStart: run:\n${JSON.stringify(run, null, 2)}`); this.createAndAddSpanFromRun(run, this.retrieverSpans); } async onRetrieverEnd(run: Run): Promise { - this.logger.debug(`onRetrieverEnd: run:\n${JSON.stringify(run, null, 2)}`); + this.logger.debug(() => `onRetrieverEnd: run:\n${JSON.stringify(run, null, 2)}`); const span = this.retrieverSpans.pop(); if (span != null) { span.addLabels(this._getLabelsFromRun(run)); @@ -91,16 +91,16 @@ export class APMTracer extends BaseTracer implements LangChainTracerFields { } async onRetrieverError(run: Run): Promise { - this.logger.debug(`onRetrieverError: run:\n${JSON.stringify(run, null, 2)}`); + this.logger.debug(() => `onRetrieverError: run:\n${JSON.stringify(run, null, 2)}`); } async onLLMStart(run: Run): Promise { - this.logger.debug(`onLLMStart: run:\n${JSON.stringify(run, null, 2)}`); + this.logger.debug(() => `onLLMStart: run:\n${JSON.stringify(run, null, 2)}`); this.createAndAddSpanFromRun(run, this.llmSpans); } async onLLMEnd(run: Run): Promise { - this.logger.debug(`onLLMEnd: run:\n${JSON.stringify(run, null, 2)}`); + this.logger.debug(() => `onLLMEnd: run:\n${JSON.stringify(run, null, 2)}`); const span = this.llmSpans.pop(); if (span != null) { span.addLabels(this._getLabelsFromRun(run)); @@ -109,16 +109,16 @@ export class APMTracer extends BaseTracer implements LangChainTracerFields { } async onLLMError(run: Run): Promise { - this.logger.debug(`onLLMError: run:\n${JSON.stringify(run, null, 2)}`); + this.logger.debug(() => `onLLMError: run:\n${JSON.stringify(run, null, 2)}`); } async onChainStart(run: Run): Promise { - this.logger.debug(`onChainStart: run:\n${JSON.stringify(run, null, 2)}`); + this.logger.debug(() => `onChainStart: run:\n${JSON.stringify(run, null, 2)}`); this.createAndAddSpanFromRun(run, this.chainSpans); } async onChainEnd(run: Run): Promise { - this.logger.debug(`onChainEnd: run:\n${JSON.stringify(run, null, 2)}`); + this.logger.debug(() => `onChainEnd: run:\n${JSON.stringify(run, null, 2)}`); const span = this.chainSpans.pop(); if (span != null) { span.addLabels(this._getLabelsFromRun(run)); @@ -127,16 +127,16 @@ export class APMTracer extends BaseTracer implements LangChainTracerFields { } async onChainError(run: Run): Promise { - this.logger.debug(`onChainError: run:\n${JSON.stringify(run, null, 2)}`); + this.logger.debug(() => `onChainError: run:\n${JSON.stringify(run, null, 2)}`); } async onToolStart(run: Run): Promise { - this.logger.debug(`onToolStart: run:\n${JSON.stringify(run, null, 2)}`); + this.logger.debug(() => `onToolStart: run:\n${JSON.stringify(run, null, 2)}`); this.createAndAddSpanFromRun(run, this.toolSpans); } async onToolEnd(run: Run): Promise { - this.logger.debug(`onToolEnd: run:\n${JSON.stringify(run, null, 2)}`); + this.logger.debug(() => `onToolEnd: run:\n${JSON.stringify(run, null, 2)}`); const span = this.toolSpans.pop(); if (span != null) { span.addLabels(this._getLabelsFromRun(run)); @@ -145,6 +145,6 @@ export class APMTracer extends BaseTracer implements LangChainTracerFields { } async onToolError(run: Run): Promise { - this.logger.debug(`onToolError: run:\n${JSON.stringify(run, null, 2)}`); + this.logger.debug(() => `onToolError: run:\n${JSON.stringify(run, null, 2)}`); } } diff --git a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/entries/bulk_actions_route.ts b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/entries/bulk_actions_route.ts index dbd9d83bae3aca..f5fd6305c8b4bb 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/entries/bulk_actions_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/entries/bulk_actions_route.ts @@ -144,7 +144,8 @@ export const bulkActionKnowledgeBaseEntriesRoute = (router: ElasticAssistantPlug } logger.debug( - `Performing bulk action on Knowledge Base Entries:\n${JSON.stringify(request.body)}` + () => + `Performing bulk action on Knowledge Base Entries:\n${JSON.stringify(request.body)}` ); const { body } = request; diff --git a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/entries/create_route.ts b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/entries/create_route.ts index b93ab4e894c8bb..2d7bdb93ad2e15 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/entries/create_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/knowledge_base/entries/create_route.ts @@ -60,7 +60,7 @@ export const createKnowledgeBaseEntryRoute = (router: ElasticAssistantPluginRout return checkResponse; } - logger.debug(`Creating KB Entry:\n${JSON.stringify(request.body)}`); + logger.debug(() => `Creating KB Entry:\n${JSON.stringify(request.body)}`); const documents: Array> = [ { metadata: request.body.metadata, diff --git a/x-pack/plugins/elastic_assistant/server/services/app_context.ts b/x-pack/plugins/elastic_assistant/server/services/app_context.ts index cb425540635d98..6648b12ddb02ef 100644 --- a/x-pack/plugins/elastic_assistant/server/services/app_context.ts +++ b/x-pack/plugins/elastic_assistant/server/services/app_context.ts @@ -80,9 +80,10 @@ class AppContextService { this.logger?.debug('AppContextService:registerFeatures'); this.logger?.debug(`pluginName: ${pluginName}`); this.logger?.debug( - `features: ${Object.entries(features) - .map(([feature, enabled]) => `${feature}:${enabled}`) - .join(', ')}` + () => + `features: ${Object.entries(features) + .map(([feature, enabled]) => `${feature}:${enabled}`) + .join(', ')}` ); if (!this.registeredFeatures.has(pluginName)) { @@ -107,9 +108,10 @@ class AppContextService { this.logger?.debug('AppContextService:getRegisteredFeatures'); this.logger?.debug(`pluginName: ${pluginName}`); this.logger?.debug( - `features: ${Object.entries(features) - .map(([feature, enabled]) => `${feature}:${enabled}`) - .join(', ')}` + () => + `features: ${Object.entries(features) + .map(([feature, enabled]) => `${feature}:${enabled}`) + .join(', ')}` ); return features; diff --git a/x-pack/plugins/encrypted_saved_objects/server/crypto/encrypted_saved_objects_service.ts b/x-pack/plugins/encrypted_saved_objects/server/crypto/encrypted_saved_objects_service.ts index 7e4f28bbd20939..44072a0828d48f 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/crypto/encrypted_saved_objects_service.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/crypto/encrypted_saved_objects_service.ts @@ -308,11 +308,12 @@ export class EncryptedSavedObjectsService { const encryptedAttributesKeys = Object.keys(encryptedAttributes); if (encryptedAttributesKeys.length !== typeDefinition.attributesToEncrypt.size) { this.options.logger.debug( - `The following attributes of saved object "${descriptorToArray( - descriptor - )}" should have been encrypted: ${Array.from( - typeDefinition.attributesToEncrypt - )}, but found only: ${encryptedAttributesKeys}` + () => + `The following attributes of saved object "${descriptorToArray( + descriptor + )}" should have been encrypted: ${Array.from( + typeDefinition.attributesToEncrypt + )}, but found only: ${encryptedAttributesKeys}` ); } @@ -569,11 +570,12 @@ export class EncryptedSavedObjectsService { const decryptedAttributesKeys = Object.keys(decryptedAttributes); if (decryptedAttributesKeys.length !== typeDefinition.attributesToEncrypt.size) { this.options.logger.debug( - `The following attributes of saved object "${descriptorToArray( - descriptor - )}" should have been decrypted: ${Array.from( - typeDefinition.attributesToEncrypt - )}, but found only: ${decryptedAttributesKeys}` + () => + `The following attributes of saved object "${descriptorToArray( + descriptor + )}" should have been decrypted: ${Array.from( + typeDefinition.attributesToEncrypt + )}, but found only: ${decryptedAttributesKeys}` ); } @@ -605,9 +607,10 @@ export class EncryptedSavedObjectsService { if (Object.keys(attributesAAD).length === 0) { this.options.logger.debug( - `The AAD for saved object "${descriptorToArray( - descriptor - )}" does not include any attributes.` + () => + `The AAD for saved object "${descriptorToArray( + descriptor + )}" does not include any attributes.` ); } 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 6009c87fcde99c..25e67c6857154d 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 @@ -529,10 +529,11 @@ export function getQueryBodyWithAuthFilter( dslFilterQuery = queryFilter ? toElasticsearchQuery(queryFilter) : undefined; } catch (err) { logger.debug( - `esContext: Invalid kuery syntax for the filter (${filter}) error: ${JSON.stringify({ - message: err.message, - statusCode: err.statusCode, - })}` + () => + `esContext: Invalid kuery syntax for the filter (${filter}) error: ${JSON.stringify({ + message: err.message, + statusCode: err.statusCode, + })}` ); throw err; } @@ -691,10 +692,11 @@ export function getQueryBody( dslFilterQuery = filterKueryNode ? toElasticsearchQuery(filterKueryNode) : undefined; } catch (err) { logger.debug( - `esContext: Invalid kuery syntax for the filter (${filter}) error: ${JSON.stringify({ - message: err.message, - statusCode: err.statusCode, - })}` + () => + `esContext: Invalid kuery syntax for the filter (${filter}) error: ${JSON.stringify({ + message: err.message, + statusCode: err.statusCode, + })}` ); throw err; } diff --git a/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts b/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts index 1c8db8451ccfa0..0a8232d6e57153 100644 --- a/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts +++ b/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts @@ -131,7 +131,9 @@ export async function updateTagsBatch( ); } - appContextService.getLogger().debug(JSON.stringify(res).slice(0, 1000)); + if (appContextService.getLogger().isLevelEnabled('debug')) { + appContextService.getLogger().debug(JSON.stringify(res).slice(0, 1000)); + } // creating unique ids to use as agentId, as we don't have all agent ids in case of action by kuery const getUuidArray = (count: number) => Array.from({ length: count }, () => uuidv4()); diff --git a/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts b/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts index 43cf3f745cc6c1..c6173f1eb8e893 100644 --- a/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts +++ b/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts @@ -146,9 +146,10 @@ export const bulkCreateArtifacts = async ( for (let batchN = 0; batchN < batches.length; batchN++) { logger.debug( - `Creating artifacts for batch ${batchN + 1} with ${batches[batchN].length / 2} artifacts` + () => + `Creating artifacts for batch ${batchN + 1} with ${batches[batchN].length / 2} artifacts` ); - logger.debug(`Artifacts in current batch: ${JSON.stringify(batches[batchN])}`); + logger.debug(() => `Artifacts in current batch: ${JSON.stringify(batches[batchN])}`); // Generate a bulk create for the current batch of artifacts const res = await withPackageSpan(`Bulk create fleet artifacts batch [${batchN}]`, () => esClient.bulk({ diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts index 740ea2af537e95..c7472c268e29c0 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts @@ -648,9 +648,10 @@ export const installTransforms = async ({ ); if (previousInstalledTransformEsAssets.length > 0) { logger.debug( - `Found previous transform references:\n ${JSON.stringify( - previousInstalledTransformEsAssets - )}` + () => + `Found previous transform references:\n ${JSON.stringify( + previousInstalledTransformEsAssets + )}` ); } } diff --git a/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts b/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts index e7e453648a5961..2096820e82dade 100644 --- a/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts @@ -387,9 +387,10 @@ async function retryImportOnConflictError( const retryDelayMs = 1000 + Math.floor(Math.random() * 3000); // 1s + 0-3s of jitter logger?.debug( - `Retrying import operation after [${ - retryDelayMs * 1000 - }s] due to conflict errors: ${JSON.stringify(errors)}` + () => + `Retrying import operation after [${ + retryDelayMs * 1000 + }s] due to conflict errors: ${JSON.stringify(errors)}` ); await setTimeout(retryDelayMs); @@ -458,9 +459,10 @@ export async function installKibanaSavedObjects({ the integrations team. */ if (referenceErrors.length) { logger.debug( - `Resolving ${ - referenceErrors.length - } reference errors creating saved objects: ${formatImportErrorsForLog(referenceErrors)}` + () => + `Resolving ${ + referenceErrors.length + } reference errors creating saved objects: ${formatImportErrorsForLog(referenceErrors)}` ); const retries = toBeSavedObjects.map(({ id, type }) => { diff --git a/x-pack/plugins/fleet/server/services/fleet_usage_logger.ts b/x-pack/plugins/fleet/server/services/fleet_usage_logger.ts index 76c4aba77038c7..9d36020e4655fd 100644 --- a/x-pack/plugins/fleet/server/services/fleet_usage_logger.ts +++ b/x-pack/plugins/fleet/server/services/fleet_usage_logger.ts @@ -32,7 +32,9 @@ export function registerFleetUsageLogger( try { const usageData = await fetchUsage(); if (appContextService.getLogger().isLevelEnabled('debug')) { - appContextService.getLogger().debug(`Fleet Usage: ${JSON.stringify(usageData)}`); + appContextService + .getLogger() + .debug(() => `Fleet Usage: ${JSON.stringify(usageData)}`); } else { appContextService.getLogger().info(`Fleet Usage: ${JSON.stringify(usageData)}`); } diff --git a/x-pack/plugins/fleet/server/services/package_policy.ts b/x-pack/plugins/fleet/server/services/package_policy.ts index 976dac243cfff9..e244be59b80126 100644 --- a/x-pack/plugins/fleet/server/services/package_policy.ts +++ b/x-pack/plugins/fleet/server/services/package_policy.ts @@ -1678,7 +1678,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { .info( `Package policy upgrade dry run ${hasErrors ? 'resulted in errors' : 'ran successfully'}` ); - appContextService.getLogger().debug(JSON.stringify(upgradeTelemetry)); + appContextService.getLogger().debug(() => JSON.stringify(upgradeTelemetry)); } } @@ -2716,9 +2716,10 @@ export function _validateRestrictedFieldsNotModifiedOrThrow(opts: { appContextService .getLogger() .debug( - `Rejecting package policy update due to dataset change, old val '${ - oldStream?.vars[DATASET_VAR_NAME]?.value - }, new val '${JSON.stringify(stream?.vars?.[DATASET_VAR_NAME]?.value)}'` + () => + `Rejecting package policy update due to dataset change, old val '${ + oldStream.vars![DATASET_VAR_NAME].value + }, new val '${JSON.stringify(stream?.vars?.[DATASET_VAR_NAME]?.value)}'` ); throw new PackagePolicyValidationError( i18n.translate('xpack.fleet.updatePackagePolicy.datasetCannotBeModified', { @@ -2781,7 +2782,7 @@ export function sendUpdatePackagePolicyTelemetryEvent( upgradeTelemetry ); appContextService.getLogger().info(`Package policy upgraded successfully`); - appContextService.getLogger().debug(JSON.stringify(upgradeTelemetry)); + appContextService.getLogger().debug(() => JSON.stringify(upgradeTelemetry)); } } }); diff --git a/x-pack/plugins/fleet/server/services/preconfiguration.ts b/x-pack/plugins/fleet/server/services/preconfiguration.ts index 0616f15c180f41..a0b633efa3746a 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration.ts @@ -296,12 +296,13 @@ export async function ensurePreconfiguredPackagesAndPolicies( ); }); logger.debug( - `Adding preconfigured package policies ${JSON.stringify( - packagePoliciesToAdd.map((pol) => ({ - name: pol.packagePolicy.name, - package: pol.installedPackage.name, - })) - )}` + () => + `Adding preconfigured package policies ${JSON.stringify( + packagePoliciesToAdd.map((pol) => ({ + name: pol.packagePolicy.name, + package: pol.installedPackage.name, + })) + )}` ); const s = apm.startSpan('Add preconfigured package policies', 'preconfiguration'); await addPreconfiguredPolicyPackages( diff --git a/x-pack/plugins/fleet/server/services/setup.ts b/x-pack/plugins/fleet/server/services/setup.ts index d1e29147a21043..a1df9c7d9d609f 100644 --- a/x-pack/plugins/fleet/server/services/setup.ts +++ b/x-pack/plugins/fleet/server/services/setup.ts @@ -133,7 +133,9 @@ async function createLock( }, { id: FLEET_SETUP_LOCK_TYPE } ); - logger.debug(`Fleet setup lock created: ${JSON.stringify(created)}`); + if (logger.isLevelEnabled('debug')) { + logger.debug(`Fleet setup lock created: ${JSON.stringify(created)}`); + } } catch (error) { logger.info(`Could not create fleet setup lock, abort setup: ${error}`); return { created: false, toReturn: { isInitialized: false, nonFatalErrors: [] } }; diff --git a/x-pack/plugins/fleet/server/services/telemetry/fleet_usage_sender.ts b/x-pack/plugins/fleet/server/services/telemetry/fleet_usage_sender.ts index 17444a44a6f6b9..41c560084e0506 100644 --- a/x-pack/plugins/fleet/server/services/telemetry/fleet_usage_sender.ts +++ b/x-pack/plugins/fleet/server/services/telemetry/fleet_usage_sender.ts @@ -93,27 +93,27 @@ export class FleetUsageSender { } = usageData; appContextService .getLogger() - .debug('Fleet usage telemetry: ' + JSON.stringify(fleetUsageData)); + .debug(() => 'Fleet usage telemetry: ' + JSON.stringify(fleetUsageData)); core.analytics.reportEvent(FLEET_USAGES_EVENT_TYPE, fleetUsageData); appContextService .getLogger() - .debug('Agents per privileges telemetry: ' + JSON.stringify(agentsPerPrivileges)); + .debug(() => 'Agents per privileges telemetry: ' + JSON.stringify(agentsPerPrivileges)); core.analytics.reportEvent(FLEET_AGENTS_EVENT_TYPE, { agents_per_privileges: agentsPerPrivileges, }); appContextService .getLogger() - .debug('Agents per version telemetry: ' + JSON.stringify(agentsPerVersion)); + .debug(() => 'Agents per version telemetry: ' + JSON.stringify(agentsPerVersion)); agentsPerVersion.forEach((byVersion) => { core.analytics.reportEvent(FLEET_AGENTS_EVENT_TYPE, { agents_per_version: byVersion }); }); appContextService .getLogger() - .debug('Agents per output type telemetry: ' + JSON.stringify(agentsPerOutputType)); + .debug(() => 'Agents per output type telemetry: ' + JSON.stringify(agentsPerOutputType)); agentsPerOutputType.forEach((byOutputType) => { core.analytics.reportEvent(FLEET_AGENTS_EVENT_TYPE, { agents_per_output_type: byOutputType, @@ -122,7 +122,7 @@ export class FleetUsageSender { appContextService .getLogger() - .debug('Agents upgrade details telemetry: ' + JSON.stringify(upgradeDetails)); + .debug(() => 'Agents upgrade details telemetry: ' + JSON.stringify(upgradeDetails)); upgradeDetails.forEach((upgradeDetailsObj) => { core.analytics.reportEvent(FLEET_AGENTS_EVENT_TYPE, { upgrade_details: upgradeDetailsObj }); }); diff --git a/x-pack/plugins/fleet/server/telemetry/sender.ts b/x-pack/plugins/fleet/server/telemetry/sender.ts index a31f97b57fbd5d..8fb71683b2c9c2 100644 --- a/x-pack/plugins/fleet/server/telemetry/sender.ts +++ b/x-pack/plugins/fleet/server/telemetry/sender.ts @@ -154,7 +154,7 @@ export class TelemetryEventsSender { deployment_id: appContextService.getCloud()?.deploymentId, })); - this.logger.debug(JSON.stringify(toSend)); + this.logger.debug(() => JSON.stringify(toSend)); await this.send( toSend, @@ -199,10 +199,12 @@ export class TelemetryEventsSender { }, timeout: 5000, }); - this.logger.debug(`Events sent!. Response: ${resp.status} ${JSON.stringify(resp.data)}`); + this.logger.debug( + () => `Events sent!. Response: ${resp.status} ${JSON.stringify(resp.data)}` + ); } catch (err) { this.logger.debug( - `Error sending events: ${err?.response?.status} ${JSON.stringify(err.response.data)}` + () => `Error sending events: ${err?.response?.status} ${JSON.stringify(err.response.data)}` ); } } diff --git a/x-pack/plugins/licensing/server/plugin.ts b/x-pack/plugins/licensing/server/plugin.ts index b38128e838fab5..60bf0d7d1d210f 100644 --- a/x-pack/plugins/licensing/server/plugin.ts +++ b/x-pack/plugins/licensing/server/plugin.ts @@ -134,7 +134,8 @@ export class LicensingPlugin implements Plugin this.logger.debug( - 'Imported license information from Elasticsearch:' + + () => + 'Imported license information from Elasticsearch:' + [ `type: ${license.type}`, `status: ${license.status}`, diff --git a/x-pack/plugins/monitoring/server/rules/base_rule.ts b/x-pack/plugins/monitoring/server/rules/base_rule.ts index da9f8edb94b2ec..f04ca15be27dd7 100644 --- a/x-pack/plugins/monitoring/server/rules/base_rule.ts +++ b/x-pack/plugins/monitoring/server/rules/base_rule.ts @@ -264,7 +264,8 @@ export class BaseRule { DefaultAlert >): Promise { this.scopedLogger.debug( - `Executing alert with params: ${JSON.stringify(params)} and state: ${JSON.stringify(state)}` + () => + `Executing alert with params: ${JSON.stringify(params)} and state: ${JSON.stringify(state)}` ); const { alertsClient } = services; diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.ts index 2b3ab240b2ef81..980c743575fe25 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.ts @@ -55,7 +55,7 @@ export async function installEntityDefinition({ }; try { - logger.debug(`Installing definition ${JSON.stringify(definition)}`); + logger.debug(() => `Installing definition ${JSON.stringify(definition)}`); validateDefinitionCanCreateValidTransformIds(definition); diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/manage_index_templates.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/manage_index_templates.ts index f3591d82e0d258..0f73ba7715bfd9 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/manage_index_templates.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/manage_index_templates.ts @@ -34,7 +34,7 @@ export async function upsertTemplate({ esClient, template, logger }: TemplateMan logger.info( `Entity manager index template is up to date (use debug logging to see what was installed)` ); - logger.debug(`Entity manager index template: ${JSON.stringify(template)}`); + logger.debug(() => `Entity manager index template: ${JSON.stringify(template)}`); } export async function upsertComponent({ esClient, component, logger }: ComponentManagementOptions) { @@ -48,5 +48,5 @@ export async function upsertComponent({ esClient, component, logger }: Component logger.info( `Entity manager component template is up to date (use debug logging to see what was installed)` ); - logger.debug(`Entity manager component template: ${JSON.stringify(component)}`); + logger.debug(() => `Entity manager component template: ${JSON.stringify(component)}`); } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/simulate_function_calling/parse_inline_function_calls.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/simulate_function_calling/parse_inline_function_calls.ts index 49fc87b908112b..82a613ef0b4f87 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/simulate_function_calling/parse_inline_function_calls.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/simulate_function_calling/parse_inline_function_calls.ts @@ -58,7 +58,7 @@ export function parseInlineFunctionCalls({ logger }: { logger: Logger }) { input?: unknown; }; - logger.debug('Parsed function call:\n ' + JSON.stringify(parsedFunctionCall)); + logger.debug(() => 'Parsed function call:\n ' + JSON.stringify(parsedFunctionCall)); if (!parsedFunctionCall.name) { throw createInternalServerError(`Missing name for tool use`); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts index 9fe66af73cb6fc..e0a9e3be684d33 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts @@ -437,18 +437,20 @@ export class ObservabilityAIAssistantClient { if (this.dependencies.logger.isLevelEnabled('debug')) { switch (event.type) { case StreamingChatResponseEventType.MessageAdd: - this.dependencies.logger.debug(`Added message: ${JSON.stringify(event.message)}`); + this.dependencies.logger.debug( + () => `Added message: ${JSON.stringify(event.message)}` + ); break; case StreamingChatResponseEventType.ConversationCreate: this.dependencies.logger.debug( - `Created conversation: ${JSON.stringify(event.conversation)}` + () => `Created conversation: ${JSON.stringify(event.conversation)}` ); break; case StreamingChatResponseEventType.ConversationUpdate: this.dependencies.logger.debug( - `Updated conversation: ${JSON.stringify(event.conversation)}` + () => `Updated conversation: ${JSON.stringify(event.conversation)}` ); break; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts index 28343f054f0379..86a18d5a8efa46 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts @@ -107,7 +107,7 @@ export class KnowledgeBaseService { }); this.dependencies.logger.debug( - 'Model definition status:\n' + JSON.stringify(getResponse.trained_model_configs[0]) + () => 'Model definition status:\n' + JSON.stringify(getResponse.trained_model_configs[0]) ); return Boolean(getResponse.trained_model_configs[0]?.fully_defined); @@ -160,7 +160,7 @@ export class KnowledgeBaseService { } this.dependencies.logger.debug('Model is not allocated yet'); - this.dependencies.logger.debug(JSON.stringify(response)); + this.dependencies.logger.debug(() => JSON.stringify(response)); throw gatewayTimeout(); }, retryOptions); @@ -368,7 +368,7 @@ export class KnowledgeBaseService { entries: RecalledEntry[]; }> => { this.dependencies.logger.debug( - `Recalling entries from KB for queries: "${JSON.stringify(queries)}"` + () => `Recalling entries from KB for queries: "${JSON.stringify(queries)}"` ); const modelId = await this.dependencies.getModelId(); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/utils/recall/score_suggestions.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/utils/recall/score_suggestions.ts index b6a16d6329aecf..009b91a7a8c2c8 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/utils/recall/score_suggestions.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/utils/recall/score_suggestions.ts @@ -101,7 +101,7 @@ export async function scoreSuggestions({ properties: { scores: { description: `The document IDs and their scores, as CSV. Example: - + my_id,7 my_other_id,3 my_third_id,4 @@ -155,7 +155,7 @@ export async function scoreSuggestions({ relevantDocumentIds.includes(suggestion.id) ); - logger.debug(`Relevant documents: ${JSON.stringify(relevantDocuments, null, 2)}`); + logger.debug(() => `Relevant documents: ${JSON.stringify(relevantDocuments, null, 2)}`); return { relevantDocuments, diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/index.ts index cd1aa806b9f316..797d85fc103413 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/index.ts @@ -174,7 +174,7 @@ export function registerQueryFunction({ functions, resources }: FunctionRegistra to classify the user's request in the user message before this ("${abbreviatedUserQuestion}..."). and get more information about specific functions and commands you think are candidates for answering the question. - + Examples for functions and commands: Do you need to group data? Request \`STATS\`. Extract data? Request \`DISSECT\` AND \`GROK\`. @@ -216,7 +216,7 @@ export function registerQueryFunction({ functions, resources }: FunctionRegistra "I want a query that ..." => ${VisualizeESQLUserIntention.generateQueryOnly} "... Just show me the query" => ${VisualizeESQLUserIntention.generateQueryOnly} "Create a query that ..." => ${VisualizeESQLUserIntention.generateQueryOnly} - + "Show me the avg of x" => ${VisualizeESQLUserIntention.executeAndReturnResults} "Show me the results of y" => ${VisualizeESQLUserIntention.executeAndReturnResults} "Display the sum of z" => ${VisualizeESQLUserIntention.executeAndReturnResults} @@ -276,9 +276,10 @@ export function registerQueryFunction({ functions, resources }: FunctionRegistra if (!response.message.function_call.arguments) { resources.logger.debug( - `LLM should have called "classify_esql", but instead responded with the following message: ${JSON.stringify( - response.message - )}` + () => + `LLM should have called "classify_esql", but instead responded with the following message: ${JSON.stringify( + response.message + )}` ); throw new Error( 'LLM did not call classify_esql function during query generation, execute the "query" function and try again' @@ -374,41 +375,41 @@ export function registerQueryFunction({ functions, resources }: FunctionRegistra \`\`\` Respond in plain text. Do not attempt to use a function. - + You must use commands and functions for which you have requested documentation. - + ${ args.intention !== VisualizeESQLUserIntention.generateQueryOnly ? `DO NOT UNDER ANY CIRCUMSTANCES generate more than a single query. If multiple queries are needed, do it as a follow-up step. Make this clear to the user. For example: - + Human: plot both yesterday's and today's data. - + Assistant: Here's how you can plot yesterday's data: \`\`\`esql \`\`\` - + Let's see that first. We'll look at today's data next. - + Human: - + Assistant: Let's look at today's data: - + \`\`\`esql \`\`\` ` : '' } - + ${userIntentionMessage} - + DO NOT UNDER ANY CIRCUMSTANCES use commands or functions that are not a capability of ES|QL as mentioned in the system message and documentation. When converting queries from one language to ES|QL, make sure that the functions are available and documented in ES|QL. E.g., for SPL's LEN, use LENGTH. For IF, use CASE. - + `, }, }, diff --git a/x-pack/plugins/observability_solution/profiling_data_access/server/services/status/index.ts b/x-pack/plugins/observability_solution/profiling_data_access/server/services/status/index.ts index a2ad969847da7a..b7f791a1663859 100644 --- a/x-pack/plugins/observability_solution/profiling_data_access/server/services/status/index.ts +++ b/x-pack/plugins/observability_solution/profiling_data_access/server/services/status/index.ts @@ -23,7 +23,9 @@ export function createGetStatusService(params: RegisterServicesParams) { try { const { type, setupState } = await getSetupState({ ...params, esClient, soClient, spaceId }); - params.logger.debug(`Set up state for: ${type}: ${JSON.stringify(setupState, null, 2)}`); + params.logger.debug( + () => `Set up state for: ${type}: ${JSON.stringify(setupState, null, 2)}` + ); return { has_setup: diff --git a/x-pack/plugins/observability_solution/synthetics/server/telemetry/sender.ts b/x-pack/plugins/observability_solution/synthetics/server/telemetry/sender.ts index e495181781fe00..be60d3ca2a1273 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/telemetry/sender.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/telemetry/sender.ts @@ -140,7 +140,7 @@ export class TelemetryEventsSender { queue.clearEvents(); - this.logger.debug(JSON.stringify(events)); + this.logger.debug(() => JSON.stringify(events)); await this.send(events, telemetryUrl); } catch (err) { @@ -186,10 +186,12 @@ export class TelemetryEventsSender { }, timeout: 5000, }); - this.logger.debug(`Events sent!. Response: ${resp.status} ${JSON.stringify(resp.data)}`); + this.logger.debug( + () => `Events sent!. Response: ${resp.status} ${JSON.stringify(resp.data)}` + ); } catch (err) { this.logger.debug( - `Error sending events: ${err.response.status} ${JSON.stringify(err.response.data)}` + () => `Error sending events: ${err.response.status} ${JSON.stringify(err.response.data)}` ); } } diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/integration_tests/downloads.test.ts b/x-pack/plugins/screenshotting/server/browsers/chromium/integration_tests/downloads.test.ts index a2c331e039389d..d6f215df9bef4f 100644 --- a/x-pack/plugins/screenshotting/server/browsers/chromium/integration_tests/downloads.test.ts +++ b/x-pack/plugins/screenshotting/server/browsers/chromium/integration_tests/downloads.test.ts @@ -17,13 +17,13 @@ import { install } from '../../install'; /* eslint-disable no-console */ const mockLogger = loggingSystemMock.create().get(); -mockLogger.warn = jest.fn((message: string | Error) => { +mockLogger.warn = jest.fn((message: string | (() => string) | Error) => { console.warn(message); }); -mockLogger.debug = jest.fn((message: string | Error) => { +mockLogger.debug = jest.fn((message: string | (() => string) | Error) => { console.log(message); }); -mockLogger.error = jest.fn((message: string | Error) => { +mockLogger.error = jest.fn((message: string | (() => string) | Error) => { console.error(message); }); diff --git a/x-pack/plugins/security/server/authentication/providers/basic.ts b/x-pack/plugins/security/server/authentication/providers/basic.ts index fad94f6b34a57b..3664bd14a23db9 100644 --- a/x-pack/plugins/security/server/authentication/providers/basic.ts +++ b/x-pack/plugins/security/server/authentication/providers/basic.ts @@ -87,7 +87,7 @@ export class BasicAuthenticationProvider extends BaseAuthenticationProvider { state: authHeaders, }); } catch (err) { - this.logger.debug(`Failed to perform a login: ${getDetailedErrorMessage(err)}`); + this.logger.debug(() => `Failed to perform a login: ${getDetailedErrorMessage(err)}`); return AuthenticationResult.failed(err); } } @@ -172,7 +172,7 @@ export class BasicAuthenticationProvider extends BaseAuthenticationProvider { return AuthenticationResult.succeeded(user, { authHeaders }); } catch (err) { this.logger.debug( - `Failed to authenticate request via state: ${getDetailedErrorMessage(err)}` + () => `Failed to authenticate request via state: ${getDetailedErrorMessage(err)}` ); return AuthenticationResult.failed(err); } diff --git a/x-pack/plugins/security/server/authentication/providers/http.ts b/x-pack/plugins/security/server/authentication/providers/http.ts index 630ae7ea59de78..e23ec826ed2e14 100644 --- a/x-pack/plugins/security/server/authentication/providers/http.ts +++ b/x-pack/plugins/security/server/authentication/providers/http.ts @@ -116,9 +116,12 @@ export class HTTPAuthenticationProvider extends BaseAuthenticationProvider { return AuthenticationResult.succeeded(user); } catch (err) { this.logger.debug( - `Failed to authenticate request to ${request.url.pathname} via authorization header with "${ - authorizationHeader.scheme - }" scheme: ${getDetailedErrorMessage(err)}` + () => + `Failed to authenticate request to ${ + request.url.pathname + } via authorization header with "${ + authorizationHeader.scheme + }" scheme: ${getDetailedErrorMessage(err)}` ); return AuthenticationResult.failed(err); } diff --git a/x-pack/plugins/security/server/authentication/providers/kerberos.ts b/x-pack/plugins/security/server/authentication/providers/kerberos.ts index 6ffd7a82e79c68..d28acef624c07f 100644 --- a/x-pack/plugins/security/server/authentication/providers/kerberos.ts +++ b/x-pack/plugins/security/server/authentication/providers/kerberos.ts @@ -122,7 +122,7 @@ export class KerberosAuthenticationProvider extends BaseAuthenticationProvider { await this.options.tokens.invalidate(state); } catch (err) { this.logger.debug( - `Failed invalidating access and/or refresh tokens: ${getDetailedErrorMessage(err)}` + () => `Failed invalidating access and/or refresh tokens: ${getDetailedErrorMessage(err)}` ); return DeauthenticationResult.failed(err); } diff --git a/x-pack/plugins/security/server/authentication/providers/oidc.ts b/x-pack/plugins/security/server/authentication/providers/oidc.ts index 273641f40b4716..ef4df3acb86632 100644 --- a/x-pack/plugins/security/server/authentication/providers/oidc.ts +++ b/x-pack/plugins/security/server/authentication/providers/oidc.ts @@ -268,7 +268,7 @@ export class OIDCAuthenticationProvider extends BaseAuthenticationProvider { })) as any; } catch (err) { this.logger.debug( - `Failed to authenticate request via OpenID Connect: ${getDetailedErrorMessage(err)}` + () => `Failed to authenticate request via OpenID Connect: ${getDetailedErrorMessage(err)}` ); return AuthenticationResult.failed(err); } @@ -319,7 +319,7 @@ export class OIDCAuthenticationProvider extends BaseAuthenticationProvider { ); } catch (err) { this.logger.debug( - `Failed to initiate OpenID Connect authentication: ${getDetailedErrorMessage(err)}` + () => `Failed to initiate OpenID Connect authentication: ${getDetailedErrorMessage(err)}` ); return AuthenticationResult.failed(err); } @@ -349,7 +349,7 @@ export class OIDCAuthenticationProvider extends BaseAuthenticationProvider { return AuthenticationResult.succeeded(user, { authHeaders }); } catch (err) { this.logger.debug( - `Failed to authenticate request via state: ${getDetailedErrorMessage(err)}` + () => `Failed to authenticate request via state: ${getDetailedErrorMessage(err)}` ); return AuthenticationResult.failed(err); } @@ -448,7 +448,7 @@ export class OIDCAuthenticationProvider extends BaseAuthenticationProvider { return DeauthenticationResult.redirectTo(redirect); } } catch (err) { - this.logger.debug(`Failed to deauthenticate user: ${getDetailedErrorMessage(err)}`); + this.logger.debug(() => `Failed to deauthenticate user: ${getDetailedErrorMessage(err)}`); return DeauthenticationResult.failed(err); } } diff --git a/x-pack/plugins/security/server/authentication/providers/pki.ts b/x-pack/plugins/security/server/authentication/providers/pki.ts index 8ec86795c16f5b..662f7632fff40d 100644 --- a/x-pack/plugins/security/server/authentication/providers/pki.ts +++ b/x-pack/plugins/security/server/authentication/providers/pki.ts @@ -171,7 +171,9 @@ export class PKIAuthenticationProvider extends BaseAuthenticationProvider { try { await this.options.tokens.invalidate({ accessToken: state.accessToken }); } catch (err) { - this.logger.debug(`Failed invalidating access token: ${getDetailedErrorMessage(err)}`); + this.logger.debug( + () => `Failed invalidating access token: ${getDetailedErrorMessage(err)}` + ); return DeauthenticationResult.failed(err); } } @@ -241,7 +243,7 @@ export class PKIAuthenticationProvider extends BaseAuthenticationProvider { return AuthenticationResult.succeeded(user, { authHeaders }); } catch (err) { this.logger.debug( - `Failed to authenticate request via state: ${getDetailedErrorMessage(err)}` + () => `Failed to authenticate request via state: ${getDetailedErrorMessage(err)}` ); return AuthenticationResult.failed(err); } @@ -291,9 +293,10 @@ export class PKIAuthenticationProvider extends BaseAuthenticationProvider { })) as any; } catch (err) { this.logger.debug( - `Failed to exchange peer certificate chain to an access token: ${getDetailedErrorMessage( - err - )}` + () => + `Failed to exchange peer certificate chain to an access token: ${getDetailedErrorMessage( + err + )}` ); return AuthenticationResult.failed(err); } diff --git a/x-pack/plugins/security/server/authentication/providers/saml.ts b/x-pack/plugins/security/server/authentication/providers/saml.ts index bda606843f4620..56dbd78b2ef343 100644 --- a/x-pack/plugins/security/server/authentication/providers/saml.ts +++ b/x-pack/plugins/security/server/authentication/providers/saml.ts @@ -187,9 +187,10 @@ export class SAMLAuthenticationProvider extends BaseAuthenticationProvider { this.logger.debug('Login has been successfully performed.'); } else { this.logger.debug( - `Failed to perform a login: ${ - authenticationResult.error && getDetailedErrorMessage(authenticationResult.error) - }` + () => + `Failed to perform a login: ${ + authenticationResult.error && getDetailedErrorMessage(authenticationResult.error) + }` ); } @@ -286,7 +287,7 @@ export class SAMLAuthenticationProvider extends BaseAuthenticationProvider { return DeauthenticationResult.redirectTo(redirect); } } catch (err) { - this.logger.debug(`Failed to deauthenticate user: ${getDetailedErrorMessage(err)}`); + this.logger.debug(() => `Failed to deauthenticate user: ${getDetailedErrorMessage(err)}`); return DeauthenticationResult.failed(err); } } @@ -467,7 +468,7 @@ export class SAMLAuthenticationProvider extends BaseAuthenticationProvider { }); } catch (err) { this.logger.debug( - `Failed to perform IdP initiated local logout: ${getDetailedErrorMessage(err)}` + () => `Failed to perform IdP initiated local logout: ${getDetailedErrorMessage(err)}` ); return AuthenticationResult.failed(err); } @@ -500,7 +501,7 @@ export class SAMLAuthenticationProvider extends BaseAuthenticationProvider { return AuthenticationResult.succeeded(user, { authHeaders }); } catch (err) { this.logger.debug( - `Failed to authenticate request via state: ${getDetailedErrorMessage(err)}` + () => `Failed to authenticate request via state: ${getDetailedErrorMessage(err)}` ); return AuthenticationResult.failed(err); } @@ -593,7 +594,7 @@ export class SAMLAuthenticationProvider extends BaseAuthenticationProvider { state: { requestId, redirectURL, realm }, }); } catch (err) { - this.logger.debug(`Failed to initiate SAML handshake: ${getDetailedErrorMessage(err)}`); + this.logger.debug(() => `Failed to initiate SAML handshake: ${getDetailedErrorMessage(err)}`); return AuthenticationResult.failed(err); } } diff --git a/x-pack/plugins/security/server/authentication/providers/token.ts b/x-pack/plugins/security/server/authentication/providers/token.ts index baf5b48c82e57a..bc2ec0dd15a878 100644 --- a/x-pack/plugins/security/server/authentication/providers/token.ts +++ b/x-pack/plugins/security/server/authentication/providers/token.ts @@ -94,7 +94,7 @@ export class TokenAuthenticationProvider extends BaseAuthenticationProvider { } ); } catch (err) { - this.logger.debug(`Failed to perform a login: ${getDetailedErrorMessage(err)}`); + this.logger.debug(() => `Failed to perform a login: ${getDetailedErrorMessage(err)}`); return AuthenticationResult.failed(err); } } diff --git a/x-pack/plugins/security/server/authentication/tokens.ts b/x-pack/plugins/security/server/authentication/tokens.ts index 90e0d74e61bcd7..2cb644dd5caeca 100644 --- a/x-pack/plugins/security/server/authentication/tokens.ts +++ b/x-pack/plugins/security/server/authentication/tokens.ts @@ -77,7 +77,7 @@ export class Tokens { authenticationInfo: authenticationInfo as AuthenticationInfo, }; } catch (err) { - this.logger.debug(`Failed to refresh access token: ${getDetailedErrorMessage(err)}`); + this.logger.debug(() => `Failed to refresh access token: ${getDetailedErrorMessage(err)}`); // There are at least two common cases when refresh token request can fail: // 1. Refresh token is valid only for 24 hours and if it hasn't been used it expires. @@ -123,7 +123,9 @@ export class Tokens { }) ).invalidated_tokens; } catch (err) { - this.logger.debug(`Failed to invalidate refresh token: ${getDetailedErrorMessage(err)}`); + this.logger.debug( + () => `Failed to invalidate refresh token: ${getDetailedErrorMessage(err)}` + ); // When using already deleted refresh token, Elasticsearch responds with 404 and a body that // shows that no tokens were invalidated. @@ -155,7 +157,9 @@ export class Tokens { }) ).invalidated_tokens; } catch (err) { - this.logger.debug(`Failed to invalidate access token: ${getDetailedErrorMessage(err)}`); + this.logger.debug( + () => `Failed to invalidate access token: ${getDetailedErrorMessage(err)}` + ); // When using already deleted access token, Elasticsearch responds with 404 and a body that // shows that no tokens were invalidated. diff --git a/x-pack/plugins/security/server/routes/deprecations/kibana_user_role.ts b/x-pack/plugins/security/server/routes/deprecations/kibana_user_role.ts index e7c2e06abbb8e0..638a8f8a1bc7d2 100644 --- a/x-pack/plugins/security/server/routes/deprecations/kibana_user_role.ts +++ b/x-pack/plugins/security/server/routes/deprecations/kibana_user_role.ts @@ -53,9 +53,10 @@ export function defineKibanaUserRoleDeprecationRoutes({ router, logger }: RouteD logger.debug(`No users with "${KIBANA_USER_ROLE_NAME}" role found.`); } else { logger.debug( - `The following users with "${KIBANA_USER_ROLE_NAME}" role found and will be migrated to "${KIBANA_ADMIN_ROLE_NAME}" role: ${usersWithKibanaUserRole - .map((user) => user.username) - .join(', ')}.` + () => + `The following users with "${KIBANA_USER_ROLE_NAME}" role found and will be migrated to "${KIBANA_ADMIN_ROLE_NAME}" role: ${usersWithKibanaUserRole + .map((user) => user.username) + .join(', ')}.` ); } @@ -107,9 +108,10 @@ export function defineKibanaUserRoleDeprecationRoutes({ router, logger }: RouteD logger.debug(`No role mappings with "${KIBANA_USER_ROLE_NAME}" role found.`); } else { logger.debug( - `The following role mappings with "${KIBANA_USER_ROLE_NAME}" role found and will be migrated to "${KIBANA_ADMIN_ROLE_NAME}" role: ${roleMappingsWithKibanaUserRole - .map(([mappingName]) => mappingName) - .join(', ')}.` + () => + `The following role mappings with "${KIBANA_USER_ROLE_NAME}" role found and will be migrated to "${KIBANA_ADMIN_ROLE_NAME}" role: ${roleMappingsWithKibanaUserRole + .map(([mappingName]) => mappingName) + .join(', ')}.` ); } diff --git a/x-pack/plugins/security/server/session_management/session.ts b/x-pack/plugins/security/server/session_management/session.ts index afc917bde78beb..b4af54e5afea96 100644 --- a/x-pack/plugins/security/server/session_management/session.ts +++ b/x-pack/plugins/security/server/session_management/session.ts @@ -468,9 +468,10 @@ export class Session { invalidateIndexValueFilter = filter; } else { sessionLogger.debug( - `Invalidating sessions that match query: ${JSON.stringify( - filter.query.username ? { ...filter.query, username: '[REDACTED]' } : filter.query - )}.` + () => + `Invalidating sessions that match query: ${JSON.stringify( + filter.query.username ? { ...filter.query, username: '[REDACTED]' } : filter.query + )}.` ); invalidateIndexValueFilter = filter.query.username ? { diff --git a/x-pack/plugins/security_solution/server/assistant/tools/knowledge_base/knowledge_base_retrieval_tool.ts b/x-pack/plugins/security_solution/server/assistant/tools/knowledge_base/knowledge_base_retrieval_tool.ts index 47cb35e244d511..7908d817e13ff9 100644 --- a/x-pack/plugins/security_solution/server/assistant/tools/knowledge_base/knowledge_base_retrieval_tool.ts +++ b/x-pack/plugins/security_solution/server/assistant/tools/knowledge_base/knowledge_base_retrieval_tool.ts @@ -41,7 +41,9 @@ export const KNOWLEDGE_BASE_RETRIEVAL_TOOL: AssistantTool = { query: z.string().describe(`Summary of items/things to search for in the knowledge base`), }), func: async (input, _, cbManager) => { - logger.debug(`KnowledgeBaseRetrievalToolParams:input\n ${JSON.stringify(input, null, 2)}`); + logger.debug( + () => `KnowledgeBaseRetrievalToolParams:input\n ${JSON.stringify(input, null, 2)}` + ); const docs = await kbDataClient.getKnowledgeBaseDocuments({ query: input.query, diff --git a/x-pack/plugins/security_solution/server/assistant/tools/knowledge_base/knowledge_base_write_tool.ts b/x-pack/plugins/security_solution/server/assistant/tools/knowledge_base/knowledge_base_write_tool.ts index addb2a5580dfc2..5d37d230d87a35 100644 --- a/x-pack/plugins/security_solution/server/assistant/tools/knowledge_base/knowledge_base_write_tool.ts +++ b/x-pack/plugins/security_solution/server/assistant/tools/knowledge_base/knowledge_base_write_tool.ts @@ -47,14 +47,16 @@ export const KNOWLEDGE_BASE_WRITE_TOOL: AssistantTool = { ), }), func: async (input, _, cbManager) => { - logger.debug(`KnowledgeBaseWriteToolParams:input\n ${JSON.stringify(input, null, 2)}`); + logger.debug( + () => `KnowledgeBaseWriteToolParams:input\n ${JSON.stringify(input, null, 2)}` + ); const knowledgeBaseEntry: KnowledgeBaseEntryCreateProps = { metadata: { kbResource: 'user', source: 'conversation', required: input.required }, text: input.query, }; - logger.debug(`knowledgeBaseEntry\n ${JSON.stringify(knowledgeBaseEntry, null, 2)}`); + logger.debug(() => `knowledgeBaseEntry\n ${JSON.stringify(knowledgeBaseEntry, null, 2)}`); const resp = await kbDataClient.createKnowledgeBaseEntry({ knowledgeBaseEntry }); diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts index d0c4d825d57d64..b1bb21dfbf261e 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts @@ -185,9 +185,10 @@ export class ManifestTask { const diff = newManifest.diff(oldManifest); this.logger.debug( - `New -vs- old manifest diff counts: ${Object.entries(diff).map( - ([diffType, diffItems]) => `${diffType}: ${diffItems.length}` - )}` + () => + `New -vs- old manifest diff counts: ${Object.entries(diff).map( + ([diffType, diffItems]) => `${diffType}: ${diffItems.length}` + )}` ); const persistErrors = await manifestManager.pushArtifacts( diff --git a/x-pack/plugins/security_solution/server/endpoint/migrations/turn_off_policy_protections.ts b/x-pack/plugins/security_solution/server/endpoint/migrations/turn_off_policy_protections.ts index ec469fad233d48..fa93e8c0b62f69 100644 --- a/x-pack/plugins/security_solution/server/endpoint/migrations/turn_off_policy_protections.ts +++ b/x-pack/plugins/security_solution/server/endpoint/migrations/turn_off_policy_protections.ts @@ -135,7 +135,7 @@ export const turnOffPolicyProtectionsIfNotSupported = async ( } ); - log.debug(`Bulk update response:\n${JSON.stringify(bulkUpdateResponse, null, 2)}`); + log.debug(() => `Bulk update response:\n${JSON.stringify(bulkUpdateResponse, null, 2)}`); if (bulkUpdateResponse.failedPolicies.length > 0) { log.error( diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts index cf8a5325b9f9a5..2bbe35f9747b49 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts @@ -319,7 +319,7 @@ function responseActionRequestHandler { - logger.debug(`response action [${command}]:\n${stringify(req.body)}`); + logger.debug(() => `response action [${command}]:\n${stringify(req.body)}`); // Note: because our API schemas are defined as module static variables (as opposed to a // `getter` function), we need to include this additional validation here, since diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts index b4b11610e5c021..72994508ebc222 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts @@ -98,7 +98,8 @@ export class CrowdstrikeActionsClient extends ResponseActionsClientImpl { }; this.log.debug( - `calling connector actions 'execute()' for Crowdstrike with:\n${stringify(executeOptions)}` + () => + `calling connector actions 'execute()' for Crowdstrike with:\n${stringify(executeOptions)}` ); const actionSendResponse = await this.connectorActionsClient.execute(executeOptions); @@ -114,7 +115,7 @@ export class CrowdstrikeActionsClient extends ResponseActionsClientImpl { actionSendResponse ); } else { - this.log.debug(`Response:\n${stringify(actionSendResponse)}`); + this.log.debug(() => `Response:\n${stringify(actionSendResponse)}`); } return actionSendResponse; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.ts index 163ea887da398d..677165519796bd 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.ts @@ -242,7 +242,7 @@ export abstract class ResponseActionsClientImpl implements ResponseActionsClient return; } - this.log.debug(`Updating cases:\n${stringify(allCases)}`); + this.log.debug(() => `Updating cases:\n${stringify(allCases)}`); const attachments: CaseAttachments = [ { @@ -283,7 +283,7 @@ export abstract class ResponseActionsClientImpl implements ResponseActionsClient }) ); - this.log.debug(`Update to cases done:\n${stringify(casesUpdateResponse)}`); + this.log.debug(() => `Update to cases done:\n${stringify(casesUpdateResponse)}`); } protected getMethodOptions< @@ -527,7 +527,7 @@ export abstract class ResponseActionsClientImpl implements ResponseActionsClient ): Promise> { const doc = this.buildActionResponseEsDoc(options); - this.log.debug(`Writing response action response:\n${stringify(doc)}`); + this.log.debug(() => `Writing response action response:\n${stringify(doc)}`); await this.options.esClient .index>({ diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/normalized_external_connector_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/normalized_external_connector_client.ts index 9d998a4b137b04..43c07f0050b801 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/normalized_external_connector_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/normalized_external_connector_client.ts @@ -57,7 +57,7 @@ export class NormalizedExternalConnectorClient { }); if (!connector) { - this.log.debug(stringify(connectorList)); + this.log.debug(() => stringify(connectorList)); throw new ResponseActionsConnectorNotConfiguredError(connectorTypeId); } diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.ts index 470bb8f4d49141..f1f36e993e8a0c 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.ts @@ -181,7 +181,8 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { }; this.log.debug( - `calling connector actions 'execute()' for SentinelOne with:\n${stringify(executeOptions)}` + () => + `calling connector actions 'execute()' for SentinelOne with:\n${stringify(executeOptions)}` ); const actionSendResponse = await this.connectorActionsClient.execute(executeOptions); @@ -198,7 +199,7 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { ); } - this.log.debug(`Response:\n${stringify(actionSendResponse)}`); + this.log.debug(() => `Response:\n${stringify(actionSendResponse)}`); return actionSendResponse as ActionTypeExecutorResult; } @@ -227,7 +228,7 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { )) as ActionTypeExecutorResult; this.log.debug( - `Response for SentinelOne agent id [${agentUUID}] returned:\n${stringify(response)}` + () => `Response for SentinelOne agent id [${agentUUID}] returned:\n${stringify(response)}` ); s1ApiResponse = response.data; @@ -439,9 +440,10 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { >(SUB_ACTION.GET_ACTIVITIES, activitySearchCriteria); this.log.debug( - `Search of activity log with:\n${stringify( - activitySearchCriteria - )}\n returned:\n${stringify(activityLogSearchResponse.data)}` + () => + `Search of activity log with:\n${stringify( + activitySearchCriteria + )}\n returned:\n${stringify(activityLogSearchResponse.data)}` ); if (activityLogSearchResponse.data?.data.length) { @@ -771,10 +773,11 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { }; this.log.debug( - `searching for ${command} responses from [${SENTINEL_ONE_ACTIVITY_INDEX_PATTERN}] index with:\n${stringify( - searchRequestOptions, - 15 - )}` + () => + `searching for ${command} responses from [${SENTINEL_ONE_ACTIVITY_INDEX_PATTERN}] index with:\n${stringify( + searchRequestOptions, + 15 + )}` ); const searchResults = await this.options.esClient @@ -782,7 +785,10 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { .catch(catchAndWrapError); this.log.debug( - `Search results for SentinelOne ${command} activity documents:\n${stringify(searchResults)}` + () => + `Search results for SentinelOne ${command} activity documents:\n${stringify( + searchResults + )}` ); for (const searchResultHit of searchResults.hits.hits) { @@ -831,9 +837,10 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { } this.log.debug( - `${completedResponses.length} ${command} action responses generated:\n${stringify( - completedResponses - )}` + () => + `${completedResponses.length} ${command} action responses generated:\n${stringify( + completedResponses + )}` ); if (warnings.length > 0) { @@ -928,10 +935,11 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { if (Object.keys(actionsByAgentAndBatchId).length) { this.log.debug( - `searching for get-file responses from [${SENTINEL_ONE_ACTIVITY_INDEX_PATTERN}] index with:\n${stringify( - searchRequestOptions, - 15 - )}` + () => + `searching for get-file responses from [${SENTINEL_ONE_ACTIVITY_INDEX_PATTERN}] index with:\n${stringify( + searchRequestOptions, + 15 + )}` ); const searchResults = await this.options.esClient @@ -939,7 +947,8 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { .catch(catchAndWrapError); this.log.debug( - `Search results for SentinelOne get-file activity documents:\n${stringify(searchResults)}` + () => + `Search results for SentinelOne get-file activity documents:\n${stringify(searchResults)}` ); for (const s1Hit of searchResults.hits.hits) { @@ -1008,9 +1017,10 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { } this.log.debug( - `${completedResponses.length} get-file action responses generated:\n${stringify( - completedResponses - )}` + () => + `${completedResponses.length} get-file action responses generated:\n${stringify( + completedResponses + )}` ); if (warnings.length > 0) { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts index 5db7cc16b05ec1..a92f3a54ebac70 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts @@ -91,7 +91,7 @@ export const setSignalsStatusRoute = ( DETECTION_ENGINE_SIGNALS_STATUS_URL, status ); - logger.debug(`Sending Insights Payloads ${JSON.stringify(insightsPayloads)}`); + logger.debug(() => `Sending Insights Payloads ${JSON.stringify(insightsPayloads)}`); await sender.sendOnDemand(INSIGHTS_CHANNEL, insightsPayloads); } } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/notifications/schedule_throttle_notification_actions.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/notifications/schedule_throttle_notification_actions.test.ts index a5381504e98fd1..cabb7b002667b5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/notifications/schedule_throttle_notification_actions.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/notifications/schedule_throttle_notification_actions.test.ts @@ -246,11 +246,11 @@ describe('schedule_throttle_notification_actions', () => { logger, signals: [], }); + + const debugMessages = loggingSystemMock.collect(logger).debug.map((values) => values[0]); // We only test the first part since it has date math using math - expect(logger.debug.mock.calls[0][0]).toMatch( - /The notification throttle resultsLink created is/ - ); - expect(logger.debug.mock.calls[1][0]).toEqual( + expect(debugMessages[0]).toMatch(/The notification throttle resultsLink created is/); + expect(debugMessages[1]).toEqual( 'The notification throttle query result size before deconflicting duplicates is: 1. The notification throttle passed in signals size before deconflicting duplicates is: 0. The deconflicted size and size of the signals sent into throttle notification is: 1. The signals count from results size is: 1. The final signals count being sent to the notification is: 1.' ); // error should not have been called in this case. diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/notifications/schedule_throttle_notification_actions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/notifications/schedule_throttle_notification_actions.ts index 27ffd575029c5e..19922f5a53b30c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/notifications/schedule_throttle_notification_actions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/notifications/schedule_throttle_notification_actions.ts @@ -69,7 +69,7 @@ export const scheduleThrottledNotificationActions = async ({ kibanaSiemAppUrl, }); - logger.debug( + logger.debug(() => [ `The notification throttle resultsLink created is: ${resultsLink}.`, ' Notification throttle is querying the results using', @@ -117,7 +117,7 @@ export const scheduleThrottledNotificationActions = async ({ // Subtract any deconflicted differences from the total count. const signalsCount = signalsCountFromResults + signals.length - deconflictedDiff; - logger.debug( + logger.debug(() => [ `The notification throttle query result size before deconflicting duplicates is: ${resultsFlattened.length}.`, ` The notification throttle passed in signals size before deconflicting duplicates is: ${signals.length}.`, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/bulk_upload.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/bulk_upload.ts index efc03a4adacd0e..e1eb6872d3a337 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/bulk_upload.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/bulk_upload.ts @@ -87,7 +87,7 @@ export const assetCriticalityPublicBulkUploadRoute = ( const tookMs = end.getTime() - start.getTime(); logger.debug( - `Asset criticality Bulk upload completed in ${tookMs}ms ${JSON.stringify(stats)}` + () => `Asset criticality Bulk upload completed in ${tookMs}ms ${JSON.stringify(stats)}` ); const resBody: AssetCriticalityBulkUploadResponse = { errors, stats }; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/upload_csv.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/upload_csv.ts index 9c9fa19ca3cbd0..28c8333c5f5963 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/upload_csv.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/upload_csv.ts @@ -85,7 +85,9 @@ const handler: ( const end = new Date(); const tookMs = end.getTime() - start.getTime(); - logger.debug(`Asset criticality CSV upload completed in ${tookMs}ms ${JSON.stringify(stats)}`); + logger.debug( + () => `Asset criticality CSV upload completed in ${tookMs}ms ${JSON.stringify(stats)}` + ); // type assignment here to ensure that the response body stays in sync with the API schema const resBody: AssetCriticalityBulkUploadResponse = { errors, stats }; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/utils/create_datastream.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/utils/create_datastream.ts index 491cb5e61122b6..8c97e69e0555a4 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/utils/create_datastream.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/utils/create_datastream.ts @@ -147,9 +147,10 @@ export const createDataStream = async ({ dataStreams = response.data_streams.map((dataStream) => dataStream.name); logger.debug( - `Found ${dataStreams.length} concrete indices for ${indexPatterns.alias} - ${JSON.stringify( - dataStreams - )}` + () => + `Found ${dataStreams.length} concrete indices for ${indexPatterns.alias} - ${JSON.stringify( + dataStreams + )}` ); } catch (error) { // 404 is expected if no datastream have been created diff --git a/x-pack/plugins/security_solution/server/lib/product_features_service/product_features.ts b/x-pack/plugins/security_solution/server/lib/product_features_service/product_features.ts index dbe60614d08b3c..cee8559d8b6932 100644 --- a/x-pack/plugins/security_solution/server/lib/product_features_service/product_features.ts +++ b/x-pack/plugins/security_solution/server/lib/product_features_service/product_features.ts @@ -50,7 +50,7 @@ export class ProductFeatures JSON.stringify(completeProductFeatureConfig)); this.featuresSetup.registerKibanaFeature(completeProductFeatureConfig); this.addRegisteredActions(completeProductFeatureConfig); } diff --git a/x-pack/plugins/security_solution/server/usage/queries/get_alerts.ts b/x-pack/plugins/security_solution/server/usage/queries/get_alerts.ts index e80cd4aa88a850..c19cb3971380ea 100644 --- a/x-pack/plugins/security_solution/server/usage/queries/get_alerts.ts +++ b/x-pack/plugins/security_solution/server/usage/queries/get_alerts.ts @@ -82,7 +82,7 @@ export const getAlerts = async ({ size: 0, }; logger.debug( - `Getting alerts with point in time (PIT) query: ${JSON.stringify(ruleSearchOptions)}` + () => `Getting alerts with point in time (PIT) query: ${JSON.stringify(ruleSearchOptions)}` ); const body = await esClient.search(ruleSearchOptions); if (body.aggregations?.buckets?.buckets != null) { diff --git a/x-pack/plugins/security_solution/server/usage/queries/get_case_comments.ts b/x-pack/plugins/security_solution/server/usage/queries/get_case_comments.ts index f74642507de34a..77f4e22b3b1629 100644 --- a/x-pack/plugins/security_solution/server/usage/queries/get_case_comments.ts +++ b/x-pack/plugins/security_solution/server/usage/queries/get_case_comments.ts @@ -34,7 +34,7 @@ export const getCaseComments = async ({ namespaces: ['*'], filter: `${CASE_COMMENT_SAVED_OBJECT}.attributes.type: alert`, }; - logger.debug(`Getting cases with point in time (PIT) query:', ${JSON.stringify(query)}`); + logger.debug(() => `Getting cases with point in time (PIT) query:', ${JSON.stringify(query)}`); const finder = savedObjectsClient.createPointInTimeFinder(query); let responses: Array> = []; for await (const response of finder.find()) { diff --git a/x-pack/plugins/security_solution/server/usage/queries/get_detection_rules.ts b/x-pack/plugins/security_solution/server/usage/queries/get_detection_rules.ts index ae0cb67e024230..b92cf4fd64f77f 100644 --- a/x-pack/plugins/security_solution/server/usage/queries/get_detection_rules.ts +++ b/x-pack/plugins/security_solution/server/usage/queries/get_detection_rules.ts @@ -57,7 +57,7 @@ export const getDetectionRules = async ({ filter, }; logger.debug( - `Getting detection rules with point in time (PIT) query:', ${JSON.stringify(query)}` + () => `Getting detection rules with point in time (PIT) query:', ${JSON.stringify(query)}` ); const finder = savedObjectsClient.createPointInTimeFinder(query); let responses: Array> = []; diff --git a/x-pack/plugins/security_solution/server/usage/queries/get_event_log_by_type_and_status.ts b/x-pack/plugins/security_solution/server/usage/queries/get_event_log_by_type_and_status.ts index 2ec434ec2566b7..103fa154115c94 100644 --- a/x-pack/plugins/security_solution/server/usage/queries/get_event_log_by_type_and_status.ts +++ b/x-pack/plugins/security_solution/server/usage/queries/get_event_log_by_type_and_status.ts @@ -107,11 +107,12 @@ const _getEventLogByTypeAndStatus = async ({ const queryForElasticRules = getSearchForElasticRules({ eventLogIndex, aggs, elasticRuleIds }); const queryForCustomRules = getSearchForCustomRules({ eventLogIndex, aggs, elasticRuleIds }); logger.debug( - `Getting event logs by type and status with query for total: ${JSON.stringify( - queryForTotal - )}, elastic_rules: ${JSON.stringify(queryForElasticRules)} custom_rules: ${JSON.stringify( - queryForCustomRules - )}` + () => + `Getting event logs by type and status with query for total: ${JSON.stringify( + queryForTotal + )}, elastic_rules: ${JSON.stringify(queryForElasticRules)} custom_rules: ${JSON.stringify( + queryForCustomRules + )}` ); const [totalRules, elasticRules, customRules] = await Promise.all([ @@ -121,9 +122,12 @@ const _getEventLogByTypeAndStatus = async ({ ]); logger.debug( - `Raw search results of event logs by type and status for total: ${JSON.stringify( - totalRules - )} elastic_rules: ${JSON.stringify(elasticRules)}, custom_rules: ${JSON.stringify(customRules)}` + () => + `Raw search results of event logs by type and status for total: ${JSON.stringify( + totalRules + )} elastic_rules: ${JSON.stringify(elasticRules)}, custom_rules: ${JSON.stringify( + customRules + )}` ); const totalRulesTransformed = transformEventLogTypeStatus({ @@ -145,7 +149,10 @@ const _getEventLogByTypeAndStatus = async ({ custom_rules: customRulesTransformed, }; logger.debug( - `Metrics transformed for event logs of type and status are: ${JSON.stringify(logStatusMetric)}` + () => + `Metrics transformed for event logs of type and status are: ${JSON.stringify( + logStatusMetric + )}` ); return logStatusMetric; diff --git a/x-pack/plugins/security_solution/server/usage/queries/legacy_get_rule_actions.ts b/x-pack/plugins/security_solution/server/usage/queries/legacy_get_rule_actions.ts index c4b795b608466a..70c4e7d73d0e8e 100644 --- a/x-pack/plugins/security_solution/server/usage/queries/legacy_get_rule_actions.ts +++ b/x-pack/plugins/security_solution/server/usage/queries/legacy_get_rule_actions.ts @@ -40,7 +40,7 @@ export const legacyGetRuleActions = async ({ namespaces: ['*'], }; logger.debug( - `Getting legacy rule actions with point in time (PIT) query:', ${JSON.stringify(query)}` + () => `Getting legacy rule actions with point in time (PIT) query:', ${JSON.stringify(query)}` ); const finder = savedObjectsClient.createPointInTimeFinder( diff --git a/x-pack/plugins/security_solution_serverless/server/task_manager/usage_reporting_task.ts b/x-pack/plugins/security_solution_serverless/server/task_manager/usage_reporting_task.ts index 86c94674828ad0..8b965cb5971534 100644 --- a/x-pack/plugins/security_solution_serverless/server/task_manager/usage_reporting_task.ts +++ b/x-pack/plugins/security_solution_serverless/server/task_manager/usage_reporting_task.ts @@ -155,7 +155,7 @@ export class SecurityUsageReportingTask { return { state: taskInstance.state, runAt: new Date() }; } - this.logger.debug(`received usage records: ${JSON.stringify(usageRecords)}`); + this.logger.debug(() => `received usage records: ${JSON.stringify(usageRecords)}`); let usageReportResponse: Response | undefined; diff --git a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_es_query.ts b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_es_query.ts index fdff3356faab72..f1548abb7fcc7a 100644 --- a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_es_query.ts +++ b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_es_query.ts @@ -124,13 +124,14 @@ export async function fetchEsQuery({ }); logger.debug( - `es query rule ${ES_QUERY_ID}:${ruleId} "${name}" query - ${JSON.stringify(sortedQuery)}` + () => `es query rule ${ES_QUERY_ID}:${ruleId} "${name}" query - ${JSON.stringify(sortedQuery)}` ); const { body: searchResult } = await esClient.search(sortedQuery, { meta: true }); logger.debug( - ` es query rule ${ES_QUERY_ID}:${ruleId} "${name}" result - ${JSON.stringify(searchResult)}` + () => + ` es query rule ${ES_QUERY_ID}:${ruleId} "${name}" result - ${JSON.stringify(searchResult)}` ); const link = `${publicBaseUrl}${spacePrefix}/app/management/insightsAndAlerting/triggersActions/rule/${ruleId}`; diff --git a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_esql_query.ts b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_esql_query.ts index 2731268727aa6b..2f6a750fc2de66 100644 --- a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_esql_query.ts +++ b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_esql_query.ts @@ -43,7 +43,7 @@ export async function fetchEsqlQuery({ const esClient = scopedClusterClient.asCurrentUser; const query = getEsqlQuery(params, alertLimit, dateStart, dateEnd); - logger.debug(`ES|QL query rule (${ruleId}) query: ${JSON.stringify(query)}`); + logger.debug(() => `ES|QL query rule (${ruleId}) query: ${JSON.stringify(query)}`); let response: EsqlTable; try { diff --git a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_search_source_query.ts b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_search_source_query.ts index e0f6613fb5a101..1a48fbef1adc42 100644 --- a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_search_source_query.ts +++ b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_search_source_query.ts @@ -70,9 +70,10 @@ export async function fetchSearchSourceQuery({ ); logger.debug( - `search source query rule (${ruleId}) query: ${JSON.stringify( - searchSource.getSearchRequestBody() - )}` + () => + `search source query rule (${ruleId}) query: ${JSON.stringify( + searchSource.getSearchRequestBody() + )}` ); const searchResult = await searchSource.fetch(); diff --git a/x-pack/plugins/stack_alerts/server/rule_types/index_threshold/rule_type.ts b/x-pack/plugins/stack_alerts/server/rule_types/index_threshold/rule_type.ts index f4d236fe4f9957..7a2e0109ea28be 100644 --- a/x-pack/plugins/stack_alerts/server/rule_types/index_threshold/rule_type.ts +++ b/x-pack/plugins/stack_alerts/server/rule_types/index_threshold/rule_type.ts @@ -290,7 +290,7 @@ export function getRuleType( }, useCalculatedDateRange: false, }); - logger.debug(`rule ${ID}:${ruleId} "${name}" query result: ${JSON.stringify(result)}`); + logger.debug(() => `rule ${ID}:${ruleId} "${name}" query result: ${JSON.stringify(result)}`); const isGroupAgg = isGroupAggregation(queryParams.termField); @@ -307,9 +307,10 @@ export function getRuleType( if (value === null || value === undefined) { logger.debug( - `rule ${ID}:${ruleId} "${name}": no metrics found for group ${alertId}} from groupResult ${JSON.stringify( - groupResult - )}` + () => + `rule ${ID}:${ruleId} "${name}": no metrics found for group ${alertId}} from groupResult ${JSON.stringify( + groupResult + )}` ); continue; } @@ -348,7 +349,7 @@ export function getRuleType( [ALERT_EVALUATION_VALUE]: `${actionContext.value}`, }, }); - logger.debug(`scheduled actionGroup: ${JSON.stringify(actionContext)}`); + logger.debug(() => `scheduled actionGroup: ${JSON.stringify(actionContext)}`); } alertsClient.setAlertLimitReached(result.truncated); diff --git a/x-pack/plugins/task_manager/server/lib/log_health_metrics.test.ts b/x-pack/plugins/task_manager/server/lib/log_health_metrics.test.ts index cd9728c1e839e5..ea0793b60266b4 100644 --- a/x-pack/plugins/task_manager/server/lib/log_health_metrics.test.ts +++ b/x-pack/plugins/task_manager/server/lib/log_health_metrics.test.ts @@ -135,7 +135,10 @@ describe('logHealthMetrics', () => { logHealthMetrics(health, logger, config, true, docLinks); const firstDebug = JSON.parse( - (logger as jest.Mocked).debug.mock.calls[0][0].replace('Latest Monitored Stats: ', '') + ((logger as jest.Mocked).debug.mock.calls[0][0] as string).replace( + 'Latest Monitored Stats: ', + '' + ) ); expect(firstDebug).toMatchObject(health); }); @@ -154,7 +157,10 @@ describe('logHealthMetrics', () => { logHealthMetrics(health, logger, config, true, docLinks); const firstInfo = JSON.parse( - (logger as jest.Mocked).info.mock.calls[0][0].replace('Latest Monitored Stats: ', '') + ((logger as jest.Mocked).info.mock.calls[0][0] as string).replace( + 'Latest Monitored Stats: ', + '' + ) ); expect(firstInfo).toMatchObject(health); }); @@ -173,7 +179,10 @@ describe('logHealthMetrics', () => { logHealthMetrics(health, logger, config, true, docLinks); const firstDebug = JSON.parse( - (logger as jest.Mocked).debug.mock.calls[0][0].replace('Latest Monitored Stats: ', '') + ((logger as jest.Mocked).debug.mock.calls[0][0] as string).replace( + 'Latest Monitored Stats: ', + '' + ) ); expect(firstDebug).toMatchObject(health); }); @@ -342,7 +351,10 @@ describe('logHealthMetrics', () => { logHealthMetrics(health, logger, config, true, docLinks); const firstDebug = JSON.parse( - (logger as jest.Mocked).debug.mock.calls[0][0].replace('Latest Monitored Stats: ', '') + ((logger as jest.Mocked).debug.mock.calls[0][0] as string).replace( + 'Latest Monitored Stats: ', + '' + ) ); expect(firstDebug).toMatchObject(health); }); @@ -379,7 +391,10 @@ describe('logHealthMetrics', () => { logHealthMetrics(health, logger, config, false, docLinks); const firstDebug = JSON.parse( - (logger as jest.Mocked).debug.mock.calls[0][0].replace('Latest Monitored Stats: ', '') + ((logger as jest.Mocked).debug.mock.calls[0][0] as string).replace( + 'Latest Monitored Stats: ', + '' + ) ); expect(firstDebug).toMatchObject(health); }); diff --git a/x-pack/plugins/task_manager/server/metrics/task_run_metrics_aggregator.ts b/x-pack/plugins/task_manager/server/metrics/task_run_metrics_aggregator.ts index 1cd9fdf09cfd51..8fb7a32e2987a7 100644 --- a/x-pack/plugins/task_manager/server/metrics/task_run_metrics_aggregator.ts +++ b/x-pack/plugins/task_manager/server/metrics/task_run_metrics_aggregator.ts @@ -102,7 +102,8 @@ export class TaskRunMetricsAggregator implements ITaskMetricsAggregator + `Collected metrics after processing lifecycle event - ${JSON.stringify(this.collect())}` ); } else if (isTaskManagerStatEvent(taskEvent)) { this.processTaskManagerStatEvent(taskEvent); diff --git a/x-pack/plugins/task_manager/server/routes/metrics.ts b/x-pack/plugins/task_manager/server/routes/metrics.ts index 4172e3deb1155c..490cb869ba1095 100644 --- a/x-pack/plugins/task_manager/server/routes/metrics.ts +++ b/x-pack/plugins/task_manager/server/routes/metrics.ts @@ -45,7 +45,7 @@ export function metricsRoute(params: MetricsRouteParams) { metrics$.subscribe((metrics) => { lastMetrics = { process_uuid: taskManagerId, timestamp: new Date().toISOString(), ...metrics }; - additionalDebugLogger.debug(`subscribed metrics ${JSON.stringify(metrics)}`); + additionalDebugLogger.debug(() => `subscribed metrics ${JSON.stringify(metrics)}`); }); router.get( @@ -69,9 +69,10 @@ export function metricsRoute(params: MetricsRouteParams) { res: KibanaResponseFactory ): Promise { debugLogger.debug( - `/api/task_manager/metrics route accessed with reset=${req.query.reset} - metrics ${ - lastMetrics ? JSON.stringify(lastMetrics) : 'not available' - }` + () => + `/api/task_manager/metrics route accessed with reset=${req.query.reset} - metrics ${ + lastMetrics ? JSON.stringify(lastMetrics) : 'not available' + }` ); if (req.query.reset) { resetMetrics$.next(true); diff --git a/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.ts b/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.ts index 74d96112e7abb4..c08720991238a0 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.ts @@ -111,7 +111,7 @@ export async function timeSeriesQuery( const includeConditionInQuery = !!conditionParams; const logPrefix = 'indexThreshold timeSeriesQuery: callCluster'; - logger.debug(`${logPrefix} call: ${JSON.stringify(esQuery)}`); + logger.debug(() => `${logPrefix} call: ${JSON.stringify(esQuery)}`); let esResult: estypes.SearchResponse; // note there are some commented out console.log()'s below, which are left // in, as they are VERY useful when debugging these queries; debug logging @@ -127,7 +127,7 @@ export async function timeSeriesQuery( } // console.log('time_series_query.ts response\n', JSON.stringify(esResult, null, 4)); - logger.debug(`${logPrefix} result: ${JSON.stringify(esResult)}`); + logger.debug(() => `${logPrefix} result: ${JSON.stringify(esResult)}`); return getResultFromEs({ isCountAgg, isGroupAgg, diff --git a/x-pack/plugins/triggers_actions_ui/server/data/routes/fields.ts b/x-pack/plugins/triggers_actions_ui/server/data/routes/fields.ts index bf45b702a84ec1..2b18bd45672430 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/routes/fields.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/routes/fields.ts @@ -41,7 +41,7 @@ export function createFieldsRoute(logger: Logger, router: IRouter, baseRoute: st req: KibanaRequest, res: KibanaResponseFactory ): Promise { - logger.debug(`route ${path} request: ${JSON.stringify(req.body)}`); + logger.debug(() => `route ${path} request: ${JSON.stringify(req.body)}`); let rawFields: RawFields; @@ -63,7 +63,7 @@ export function createFieldsRoute(logger: Logger, router: IRouter, baseRoute: st const result = { fields: getFieldsFromRawFields(rawFields) }; - logger.debug(`route ${path} response: ${JSON.stringify(result)}`); + logger.debug(() => `route ${path} response: ${JSON.stringify(result)}`); return res.ok({ body: result }); } } diff --git a/x-pack/plugins/triggers_actions_ui/server/data/routes/indices.ts b/x-pack/plugins/triggers_actions_ui/server/data/routes/indices.ts index 54d18dbb5d3058..a75853be1a3e44 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/routes/indices.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/routes/indices.ts @@ -46,7 +46,7 @@ export function createIndicesRoute(logger: Logger, router: IRouter, baseRoute: s ): Promise { const pattern = req.body.pattern; const esClient = (await ctx.core).elasticsearch.client.asCurrentUser; - logger.debug(`route ${path} request: ${JSON.stringify(req.body)}`); + logger.debug(() => `route ${path} request: ${JSON.stringify(req.body)}`); if (pattern.trim() === '') { return res.ok({ body: { indices: [] } }); diff --git a/x-pack/plugins/triggers_actions_ui/server/data/routes/time_series_query.ts b/x-pack/plugins/triggers_actions_ui/server/data/routes/time_series_query.ts index 1fb7f2217d11b4..24a0eaf13f7710 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/routes/time_series_query.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/routes/time_series_query.ts @@ -39,7 +39,7 @@ export function createTimeSeriesQueryRoute( req: KibanaRequest, res: KibanaResponseFactory ): Promise { - logger.debug(`route ${path} request: ${JSON.stringify(req.body)}`); + logger.debug(() => `route ${path} request: ${JSON.stringify(req.body)}`); const esClient = (await ctx.core).elasticsearch.client.asCurrentUser; const result = await timeSeriesQuery({ @@ -48,7 +48,7 @@ export function createTimeSeriesQueryRoute( query: req.body, }); - logger.debug(`route ${path} response: ${JSON.stringify(result)}`); + logger.debug(() => `route ${path} response: ${JSON.stringify(result)}`); return res.ok({ body: result }); } } diff --git a/x-pack/plugins/triggers_actions_ui/server/routes/health.ts b/x-pack/plugins/triggers_actions_ui/server/routes/health.ts index 1ea2ce9eb04be8..679026ab56f2b2 100644 --- a/x-pack/plugins/triggers_actions_ui/server/routes/health.ts +++ b/x-pack/plugins/triggers_actions_ui/server/routes/health.ts @@ -36,7 +36,7 @@ export function createHealthRoute( ): Promise { const result = { isAlertsAvailable }; - logger.debug(`route ${path} response: ${JSON.stringify(result)}`); + logger.debug(() => `route ${path} response: ${JSON.stringify(result)}`); return res.ok({ body: result }); } } From dddcf2ef434bb1c8a1df7bea3d4bbd3566fe4923 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Mon, 8 Jul 2024 06:54:52 -0700 Subject: [PATCH 008/103] [HTTP/OAS] Add tags and summaries for saved object APIs (#184184) Co-authored-by: Jean-Louis Leysens --- .../src/routes/bulk_create.ts | 3 ++- .../src/routes/bulk_delete.ts | 3 ++- .../src/routes/bulk_get.ts | 3 ++- .../src/routes/bulk_resolve.ts | 3 ++- .../src/routes/bulk_update.ts | 3 ++- .../core-saved-objects-server-internal/src/routes/create.ts | 3 ++- .../core-saved-objects-server-internal/src/routes/delete.ts | 3 ++- .../core-saved-objects-server-internal/src/routes/export.ts | 3 ++- .../core-saved-objects-server-internal/src/routes/find.ts | 3 ++- .../core-saved-objects-server-internal/src/routes/get.ts | 3 ++- .../core-saved-objects-server-internal/src/routes/import.ts | 3 ++- .../core-saved-objects-server-internal/src/routes/resolve.ts | 3 ++- .../src/routes/resolve_import_errors.ts | 3 ++- .../core-saved-objects-server-internal/src/routes/update.ts | 3 ++- .../server/routes/key_rotation.test.ts | 5 ++++- .../encrypted_saved_objects/server/routes/key_rotation.ts | 3 ++- 16 files changed, 34 insertions(+), 16 deletions(-) diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_create.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_create.ts index 62b253e64f2e31..35c8fc305d0626 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_create.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_create.ts @@ -34,8 +34,9 @@ export const registerBulkCreateRoute = ( { path: '/_bulk_create', options: { + summary: `Create saved objects`, + tags: ['oas-tag:saved objects'], access, - description: `Create saved objects`, }, validate: { query: schema.object({ diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_delete.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_delete.ts index ad8a087f5cfddb..0f7219386a07b3 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_delete.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_delete.ts @@ -34,8 +34,9 @@ export const registerBulkDeleteRoute = ( { path: '/_bulk_delete', options: { + summary: `Delete saved objects`, + tags: ['oas-tag:saved objects'], access, - description: `Remove saved objects`, }, validate: { body: schema.arrayOf( diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_get.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_get.ts index 2e9798d56f3b13..c54069c0aae5c8 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_get.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_get.ts @@ -34,8 +34,9 @@ export const registerBulkGetRoute = ( { path: '/_bulk_get', options: { + summary: `Get saved objects`, + tags: ['oas-tag:saved objects'], access, - description: `Get saved objects`, }, validate: { body: schema.arrayOf( diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_resolve.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_resolve.ts index 786af996dc6289..d59c5e096aa2e0 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_resolve.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_resolve.ts @@ -34,8 +34,9 @@ export const registerBulkResolveRoute = ( { path: '/_bulk_resolve', options: { + summary: `Resolve saved objects`, + tags: ['oas-tag:saved objects'], access, - description: `Resolve saved objects`, }, validate: { body: schema.arrayOf( diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_update.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_update.ts index ef6609358a782d..cd401ba4f2061b 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_update.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_update.ts @@ -34,8 +34,9 @@ export const registerBulkUpdateRoute = ( { path: '/_bulk_update', options: { + summary: `Update saved objects`, + tags: ['oas-tag:saved objects'], access, - description: `Update saved objects`, }, validate: { body: schema.arrayOf( diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/create.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/create.ts index 54db933dea814e..5fb3a2964c701c 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/create.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/create.ts @@ -34,8 +34,9 @@ export const registerCreateRoute = ( { path: '/{type}/{id?}', options: { + summary: `Create a saved object`, + tags: ['oas-tag:saved objects'], access, - description: `Create a saved object`, }, validate: { params: schema.object({ diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/delete.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/delete.ts index 5d18aa5763663f..eb01f092ba5859 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/delete.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/delete.ts @@ -34,8 +34,9 @@ export const registerDeleteRoute = ( { path: '/{type}/{id}', options: { + summary: `Delete a saved object`, + tags: ['oas-tag:saved objects'], access, - description: `Delete a saved object`, }, validate: { params: schema.object({ diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/export.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/export.ts index e6ec6f7caa5be7..ea2adb976d07f4 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/export.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/export.ts @@ -144,8 +144,9 @@ export const registerExportRoute = ( { path: '/_export', options: { + summary: `Export saved objects`, + tags: ['oas-tag:saved objects'], access: 'public', - description: `Export saved objects`, }, validate: { body: schema.object({ diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/find.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/find.ts index 8efc647573d69c..525e80e7637b67 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/find.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/find.ts @@ -38,8 +38,9 @@ export const registerFindRoute = ( { path: '/_find', options: { + summary: `Search for saved objects`, + tags: ['oas-tag:saved objects'], access, - description: `Search for saved objects`, }, validate: { query: schema.object({ diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/get.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/get.ts index caaae77da9568f..5d0ffb9a119647 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/get.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/get.ts @@ -34,8 +34,9 @@ export const registerGetRoute = ( { path: '/{type}/{id}', options: { + summary: `Get a saved object`, + tags: ['oas-tag:saved objects'], access, - description: `Get a saved object`, }, validate: { params: schema.object({ diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/import.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/import.ts index 7b4181a76507e4..69042c7ce6a315 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/import.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/import.ts @@ -36,8 +36,9 @@ export const registerImportRoute = ( { path: '/_import', options: { + summary: `Import saved objects`, + tags: ['oas-tag:saved objects'], access: 'public', - description: `Import saved objects`, body: { maxBytes: maxImportPayloadBytes, output: 'stream', diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve.ts index 866e6d47e83901..2139deda867dc4 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve.ts @@ -30,8 +30,9 @@ export const registerResolveRoute = ( { path: '/resolve/{type}/{id}', options: { + summary: `Resolve a saved object`, + tags: ['oas-tag:saved objects'], access, - description: `Resolve a saved object`, }, validate: { params: schema.object({ diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve_import_errors.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve_import_errors.ts index 770b3af978f1eb..e9020b200b048e 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve_import_errors.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve_import_errors.ts @@ -37,8 +37,9 @@ export const registerResolveImportErrorsRoute = ( { path: '/_resolve_import_errors', options: { + summary: `Resolve import errors`, + tags: ['oas-tag:saved objects'], access: 'public', - description: `Resolve import errors`, body: { maxBytes: maxImportPayloadBytes, output: 'stream', diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/update.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/update.ts index cda03f99c4ad14..c0b5b9ae26d3bf 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/update.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/update.ts @@ -35,8 +35,9 @@ export const registerUpdateRoute = ( { path: '/{type}/{id}', options: { + summary: `Update a saved object`, + tags: ['oas-tag:saved objects'], access, - description: `Update a saved object`, }, validate: { params: schema.object({ diff --git a/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.test.ts b/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.test.ts index edcf522987115e..83d56a133ea161 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.test.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.test.ts @@ -43,7 +43,10 @@ describe('Key rotation routes', () => { }); it('correctly defines route.', () => { - expect(routeConfig.options).toEqual({ tags: ['access:rotateEncryptionKey'] }); + expect(routeConfig.options).toEqual({ + tags: ['access:rotateEncryptionKey', 'oas-tag:saved objects'], + description: `Rotate a key for encrypted saved objects`, + }); expect(routeConfig.validate).toEqual({ body: undefined, query: expect.any(Type), diff --git a/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.ts b/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.ts index 9305446767e9dc..c9c452cf9a0311 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.ts @@ -39,7 +39,8 @@ export function defineKeyRotationRoutes({ }), }, options: { - tags: ['access:rotateEncryptionKey'], + tags: ['access:rotateEncryptionKey', 'oas-tag:saved objects'], + description: `Rotate a key for encrypted saved objects`, }, }, async (context, request, response) => { From ae802a5776e8f64e43ef7c6d26024d7cd8117745 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Mon, 8 Jul 2024 16:31:42 +0200 Subject: [PATCH 009/103] [OTel Onboarding] Adjust linux snippet and warning (#187691) Address https://github.com/elastic/observability-dev/issues/3217#issuecomment-2210741356 Screenshot 2024-07-05 at 17 30 47 --- .../quickstart_flows/otel_logs/index.tsx | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_logs/index.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_logs/index.tsx index b1413643e32c10..5fcdb8d20a38b2 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_logs/index.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_logs/index.tsx @@ -69,7 +69,7 @@ export const OtelLogsPanel: React.FC = () => { } = useKibana(); const AGENT_CDN_BASE_URL = isServerless - ? 'snapshots.elastic.co/8.15.0-474afc1d/downloads/beats/elastic-agent' + ? 'snapshots.elastic.co/8.15.0-dd63864e/downloads/beats/elastic-agent' : 'artifacts.elastic.co/downloads/beats/elastic-agent'; // TODO change once otel flow is shown on serverless // const agentVersion = isServerless ? setup?.elasticAgentVersion : stackVersion; @@ -545,6 +545,8 @@ spec: content: `arch=$(if ([[ $(arch) == "arm" || $(arch) == "aarch64" ]]); then echo "arm64"; else echo $(arch); fi) curl --output elastic-distro-${agentVersion}-linux-$arch.tar.gz --url https://${AGENT_CDN_BASE_URL}/elastic-agent-${agentVersion}-linux-$arch.tar.gz --proto '=https' --tlsv1.2 -fOL && mkdir elastic-distro-${agentVersion}-linux-$arch && tar -xvf elastic-distro-${agentVersion}-linux-$arch.tar.gz -C "elastic-distro-${agentVersion}-linux-$arch" --strip-components=1 && cd elastic-distro-${agentVersion}-linux-$arch + +sudo setcap 'cap_dac_read_search=ep' ./data/elastic-agent-*/elastic-agent rm ./otel.yml && cp ./otel_samples/platformlogs_hostmetrics.yml ./otel.yml && mkdir -p ./data/otelcol && sed -i 's#\\\${env:STORAGE_DIR}#'"$PWD"/data/otelcol'#g' ./otel.yml && sed -i 's#\\\${env:ELASTIC_ENDPOINT}#${setup?.elasticsearchUrl}#g' ./otel.yml && sed -i 's/\\\${env:ELASTIC_API_KEY}/${apiKeyData?.apiKeyEncoded}/g' ./otel.yml`, start: './otelcol --config otel.yml', @@ -721,8 +723,8 @@ rm ./otel.yml && cp ./otel_samples/platformlogs_hostmetrics.yml ./otel.yml && mk + {selectedTab !== 'kubernetes' && ( +

+ {i18n.translate( + 'xpack.observability_onboarding.otelLogsPanel.historicalDataDescription2', + { + defaultMessage: + 'The default log path is /var/log/*. You can change this path in the otel.yml file if needed.', + } + )} +

+ )}
{selectedContent.prompt} From 6590457792143880d12f2f62fd0f5aaf2d4927a8 Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Mon, 8 Jul 2024 10:33:18 -0400 Subject: [PATCH 010/103] [Fleet] Fix privileges to delete request diagnostics (#187678) --- .../components/agent_diagnostics/index.tsx | 57 +++++++------ .../fleet/server/routes/agent/index.ts | 2 +- .../apis/agents/privileges.ts | 80 +++++++++++++++++++ 3 files changed, 113 insertions(+), 26 deletions(-) diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_diagnostics/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_diagnostics/index.tsx index 1bb7e1ee0ad006..437051f03398f0 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_diagnostics/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_diagnostics/index.tsx @@ -232,32 +232,39 @@ export const AgentDiagnosticsTab: React.FunctionComponent ); }, }, - { - name: i18n.translate('xpack.fleet.requestDiagnostics.tableColumns.actionsLabelText', { - defaultMessage: 'Actions', - }), - width: '70px', - actions: [ - { - type: 'icon', - icon: 'trash', - color: 'danger', - name: i18n.translate('xpack.fleet.requestDiagnostics.tableColumns.deleteButtonText', { - defaultMessage: 'Delete', - }), - available: (item: AgentDiagnostics) => item.status === 'READY', - description: i18n.translate( - 'xpack.fleet.requestDiagnostics.tableColumns.deleteButtonDesc', - { - defaultMessage: 'Delete diagnostics file', - } - ), - onClick: (item: AgentDiagnostics) => { - deleteFile(item.id); + ...((authz.fleet.allAgents + ? [ + { + name: i18n.translate('xpack.fleet.requestDiagnostics.tableColumns.actionsLabelText', { + defaultMessage: 'Actions', + }), + width: '70px', + actions: [ + { + type: 'icon', + icon: 'trash', + color: 'danger', + name: i18n.translate( + 'xpack.fleet.requestDiagnostics.tableColumns.deleteButtonText', + { + defaultMessage: 'Delete', + } + ), + available: (item: AgentDiagnostics) => item.status === 'READY', + description: i18n.translate( + 'xpack.fleet.requestDiagnostics.tableColumns.deleteButtonDesc', + { + defaultMessage: 'Delete diagnostics file', + } + ), + onClick: (item: AgentDiagnostics) => { + deleteFile(item.id); + }, + }, + ], }, - }, - ], - }, + ] + : []) as Array>), ]; const requestDiagnosticsButton = ( diff --git a/x-pack/plugins/fleet/server/routes/agent/index.ts b/x-pack/plugins/fleet/server/routes/agent/index.ts index 640a9f69ed4d62..6c55835a1ed949 100644 --- a/x-pack/plugins/fleet/server/routes/agent/index.ts +++ b/x-pack/plugins/fleet/server/routes/agent/index.ts @@ -338,7 +338,7 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT .delete({ path: AGENT_API_ROUTES.DELETE_UPLOAD_FILE_PATTERN, fleetAuthz: { - fleet: { readAgents: true }, + fleet: { allAgents: true }, }, }) .addVersion( diff --git a/x-pack/test/fleet_api_integration/apis/agents/privileges.ts b/x-pack/test/fleet_api_integration/apis/agents/privileges.ts index 82999acd9f7c6d..b244500a9463fb 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/privileges.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/privileges.ts @@ -10,12 +10,18 @@ import { AGENTS_INDEX, PACKAGE_POLICY_SAVED_OBJECT_TYPE, } from '@kbn/fleet-plugin/common'; +import { + FILE_STORAGE_DATA_AGENT_INDEX, + FILE_STORAGE_METADATA_AGENT_INDEX, +} from '@kbn/fleet-plugin/server/constants'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { generateAgent } from '../../helpers'; import { runPrivilegeTests } from '../../privileges_helpers'; import { testUsers } from '../test_users'; +const ES_INDEX_OPTIONS = { headers: { 'X-elastic-product-origin': 'fleet' } }; + export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; const esArchiver = getService('esArchiver'); @@ -177,6 +183,66 @@ export default function (providerContext: FtrProviderContext) { }); }; + const createFileBeforeEach = async () => { + await es.index( + { + id: 'file1.0', + refresh: 'wait_for', + op_type: 'create', + index: FILE_STORAGE_DATA_AGENT_INDEX, + document: { + bid: 'file1', + '@timestamp': new Date().toISOString(), + last: true, + data: 'test', + }, + }, + ES_INDEX_OPTIONS + ); + + await es.index( + { + index: FILE_STORAGE_METADATA_AGENT_INDEX, + id: 'file1', + refresh: true, + op_type: 'create', + body: { + '@timestamp': new Date().toISOString(), + upload_id: 'file1', + action_id: `fleet_uploads_test-file1-action`, + agent_id: 'agent1', + file: { + ChunkSize: 4194304, + extension: 'zip', + hash: {}, + mime_type: 'application/zip', + mode: '0644', + name: `elastic-agent-diagnostics-file-name.zip`, + path: `/agent/elastic-agent-diagnostics-file-name.zip`, + size: 24917, + Status: 'READY', + type: 'file', + }, + }, + }, + ES_INDEX_OPTIONS + ); + }; + + const deleteFileAfterEach = async () => { + await es.deleteByQuery( + { + index: `${FILE_STORAGE_DATA_AGENT_INDEX},${FILE_STORAGE_METADATA_AGENT_INDEX}`, + refresh: true, + ignore_unavailable: true, + query: { + match_all: {}, + }, + }, + ES_INDEX_OPTIONS + ); + }; + const ROUTES = [ // READ scenarios { @@ -204,6 +270,13 @@ export default function (providerContext: FtrProviderContext) { path: '/api/fleet/agents/agent1/request_diagnostics', scenarios: READ_SCENARIOS, }, + { + method: 'GET', + path: '/api/fleet/agents/files/file1/elastic-agent-diagnostics-file-name.zip', + scenarios: READ_SCENARIOS, + beforeEach: createFileBeforeEach, + afterEach: deleteFileAfterEach, + }, // ALL scenarios { @@ -238,6 +311,13 @@ export default function (providerContext: FtrProviderContext) { beforeEach: updateAgentBeforeEach, afterEach: updateAgentAfterEach, }, + { + method: 'DELETE', + path: '/api/fleet/agents/files/file1', + scenarios: ALL_SCENARIOS, + beforeEach: createFileBeforeEach, + afterEach: deleteFileAfterEach, + }, ]; before(async () => { // Make agent 1 upgradeable From bac808a690d58237b3302c706701a81215d963cf Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Mon, 8 Jul 2024 17:11:27 +0200 Subject: [PATCH 011/103] Make it clear log stream panels shouldn't be used (#187548) As discussed, I looked into making it clearer how to handle the log stream embeddable panel on dashboards. It's not possible to show an info icon or a badge without bigger changes, but there is already a tooltip which can be used for the same purpose: Screenshot 2024-07-04 at 11 30 27 Screenshot 2024-07-04 at 11 31 31 I added the "deprecated" to the title instead. There is code to show a "deprecated" badge, but it only works for visualization types, not for actions (which is how log stream is integrated here). Actions currently don't have a notion of deprecation. It would be possible to add that, but it doesn't seem worth it to slightly change how the "deprecated" text is rendered. --- .../apps/dashboard/group1/create_and_add_embeddables.ts | 2 +- x-pack/plugins/observability_solution/infra/public/plugin.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts b/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts index 1219fb03fd1c26..e1941ab08a850d 100644 --- a/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts +++ b/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts @@ -34,7 +34,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.clickNewDashboard(); await PageObjects.dashboard.switchToEditMode(); await dashboardAddPanel.clickEditorMenuButton(); - await dashboardAddPanel.clickAddNewPanelFromUIActionLink('Log stream'); + await dashboardAddPanel.clickAddNewPanelFromUIActionLink('Log stream (deprecated)'); await dashboardAddPanel.expectEditorMenuClosed(); }); diff --git a/x-pack/plugins/observability_solution/infra/public/plugin.ts b/x-pack/plugins/observability_solution/infra/public/plugin.ts index f323d7adb62970..6a4e813064eefa 100644 --- a/x-pack/plugins/observability_solution/infra/public/plugin.ts +++ b/x-pack/plugins/observability_solution/infra/public/plugin.ts @@ -405,11 +405,12 @@ export class Plugin implements InfraClientPluginClass { order: 30, getDisplayName: () => i18n.translate('xpack.infra.logStreamEmbeddable.displayName', { - defaultMessage: 'Log stream', + defaultMessage: 'Log stream (deprecated)', }), getDisplayNameTooltip: () => i18n.translate('xpack.infra.logStreamEmbeddable.description', { - defaultMessage: 'Add a table of live streaming logs.', + defaultMessage: + 'Add a table of live streaming logs. For a more efficient experience, we recommend using the Discover Page to create a saved search instead of using Log stream.', }), getIconType: () => 'logsApp', isCompatible: async ({ embeddable }) => { From 5c85569dd1eab80e5c7cb6118a9903bcf83ed47a Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Mon, 8 Jul 2024 17:30:10 +0200 Subject: [PATCH 012/103] [Docs] Added callout to docs team to OAS tutorial (#187750) Screenshot 2024-07-08 at 16 03 41 --- dev_docs/tutorials/generating_oas_for_http_apis.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev_docs/tutorials/generating_oas_for_http_apis.mdx b/dev_docs/tutorials/generating_oas_for_http_apis.mdx index f9490a1e2867a4..f47031887db804 100644 --- a/dev_docs/tutorials/generating_oas_for_http_apis.mdx +++ b/dev_docs/tutorials/generating_oas_for_http_apis.mdx @@ -44,6 +44,10 @@ Other useful query parameters for filtering are: * `pluginId` - get the OAS for a specific plugin, for example: `@kbn/data-views-plugin` * `access` - filter for specific access levels: `public` or `internal` are supported + + For assistance with the writing docs or any other questions about the docs impact, check out https://docs.elastic.dev/content-architecture/oas or chat with writers on **#docs** or **#next-api-reference** + + ### Some good practices to consider #### 1. Runtime schema definitions @@ -172,7 +176,7 @@ OAS for public routes are written to the Kibana repo as a snapshot that will ult #### What about runtime validation libary X? Teams have adopted different runtime validation libraries for their HTTP APIs. Kibana core does not intend to support all runtime validation libraries. -Reach out to #kibana-core with questions, concerns or issues you may be facing with `@kbn/config-schema` and we will help you find a solution. +Reach out to **#kibana-core** with questions, concerns or issues you may be facing with `@kbn/config-schema` and we will help you find a solution. #### What about internal HTTP APIs? It's possible to generate OpenAPI specification for `access: 'internal'` routes but it is not required. The benefit will largely be for your team's internal reference and for other teams to discover your APIs. If you follow the practices outlined in this tutorial it should be simple to generate OAS for internal routes as well. From c313edf685605e1262fb1e65ddf3095221e6a4a3 Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Mon, 8 Jul 2024 19:02:40 +0300 Subject: [PATCH 013/103] fix: [Obs Applications > Service Detail][SCREEN READER]: Tooltips must be able to take keyboard focus: 0002 (#187579) Closes: https://github.com/elastic/observability-dev/issues/3596 ## Summary This issue was partially fixed in the scope of [PR #187063](https://github.com/elastic/kibana/pull/187063). This PR updates only the table title part. image --- .../index.tsx | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx index 301e01662090d6..1327a58cc0e867 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiIcon, EuiToolTip } from '@elastic/eui'; +import { EuiIconTip } from '@elastic/eui'; import { METRIC_TYPE } from '@kbn/analytics'; import { i18n } from '@kbn/i18n'; import React, { ReactNode } from 'react'; @@ -131,20 +131,22 @@ export function ServiceOverviewDependenciesTable({ dependencies={dependencies} fixedHeight={fixedHeight} title={ - + {i18n.translate('xpack.apm.serviceOverview.dependenciesTableTitle', { + defaultMessage: 'Dependencies', })} - > - <> - {i18n.translate('xpack.apm.serviceOverview.dependenciesTableTitle', { - defaultMessage: 'Dependencies', +   + - - + /> + } nameColumnTitle={i18n.translate('xpack.apm.serviceOverview.dependenciesTableColumn', { defaultMessage: 'Dependency', From 129ad61c769ea61cce918df90dc6f74d2d80962c Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Mon, 8 Jul 2024 19:03:13 +0300 Subject: [PATCH 014/103] fix: [Obs content] Decorative images should be ignored by screen readers (#187677) Closes: https://github.com/elastic/observability-dev/issues/3654 Closes: https://github.com/elastic/observability-dev/issues/3655 Closes: https://github.com/elastic/observability-dev/issues/3656 Closes: https://github.com/elastic/observability-dev/issues/3657 Closes: https://github.com/elastic/observability-dev/issues/3664 Closes: https://github.com/elastic/observability-dev/issues/3665 ## Description Observability has a lot of service icons (Go, Node, Python, Postgresql, et al) that are used to help identify the service visually. These are excellent visual flourishes but do not offer additional information for screen readers. We should update these icons' alt attribute to be `alt=""` to notify screen readers these are decorative images and should be ignored. ### Steps to recreate Turn on a screen reader of your choosing and navigate through views identified in screenshots that have these service images. Navigate node to node (not using the `TAB` key) and listen to the image being announced as a repeat of the text or just as "image". ### What was done?: 1. For the mentioned cases, the attribute `role="presentation"` was added to address the accessibility (a11y) issue. 2. Updated [observability_solution/infra/public/pages/metrics/hosts/components/table/entry_title.tsx](https://github.com/elastic/kibana/pull/187677/files#diff-dfc0d2e9d12156217b6f7d886eb07e861152ec0ff75615520163dc33438c6ee6) The tooltip for `CloudProviderIcon` showed `HostName` instead of `CloudProviderName`. It should be updated to show a single tooltip with the format `{cloudProviderName}: {hostName}`. This change will improve accessibility (a11y) and remove any confusion. image --- .../service_list_preview.tsx | 2 +- .../agent_explorer/agent_list/index.tsx | 2 +- .../agent_instructions_accordion.tsx | 2 +- .../templates/dependency_detail_template.tsx | 6 +- .../critical_path_flamegraph_tooltip.tsx | 8 ++- .../shared/links/apm/service_link/index.tsx | 2 +- .../shared/links/dependency_link.tsx | 2 +- .../components/shared/span_icon/index.tsx | 8 +-- .../links/link_to_apm_service.tsx | 7 ++- .../hosts/components/table/entry_title.tsx | 55 +++++++++++-------- 10 files changed, 59 insertions(+), 35 deletions(-) diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_group_save/service_list_preview.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_group_save/service_list_preview.tsx index f5c87a8d17f4b0..77694d60c84e8f 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_group_save/service_list_preview.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_group_save/service_list_preview.tsx @@ -84,7 +84,7 @@ export function ServiceListPreview({ items, isLoading }: Props) { content={ - + {serviceName} diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_explorer/agent_list/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_explorer/agent_list/index.tsx index ddabc454cf072a..7c3210dabbfea3 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_explorer/agent_list/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_explorer/agent_list/index.tsx @@ -87,7 +87,7 @@ export function getAgentsColumns({ content={ - + {serviceName} diff --git a/x-pack/plugins/observability_solution/apm/public/components/fleet_integration/apm_agents/agent_instructions_accordion.tsx b/x-pack/plugins/observability_solution/apm/public/components/fleet_integration/apm_agents/agent_instructions_accordion.tsx index 3433f099070703..bd87c7b6163121 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/fleet_integration/apm_agents/agent_instructions_accordion.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/fleet_integration/apm_agents/agent_instructions_accordion.tsx @@ -38,7 +38,7 @@ function AccordionButtonContent({ agentName, title }: { agentName: AgentName; ti return ( - + diff --git a/x-pack/plugins/observability_solution/apm/public/components/routing/templates/dependency_detail_template.tsx b/x-pack/plugins/observability_solution/apm/public/components/routing/templates/dependency_detail_template.tsx index 1095162bd854a2..3881558557316a 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/routing/templates/dependency_detail_template.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/routing/templates/dependency_detail_template.tsx @@ -92,7 +92,11 @@ export function DependencyDetailTemplate({ children }: Props) { - + ), diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/critical_path_flamegraph/critical_path_flamegraph_tooltip.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/critical_path_flamegraph/critical_path_flamegraph_tooltip.tsx index 7e80a102c649be..da4e98922785a5 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/critical_path_flamegraph/critical_path_flamegraph_tooltip.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/critical_path_flamegraph/critical_path_flamegraph_tooltip.tsx @@ -63,7 +63,11 @@ export function CriticalPathFlamegraphTooltip({ alignItems="center" > - + {metadata[SPAN_NAME]} @@ -75,7 +79,7 @@ export function CriticalPathFlamegraphTooltip({ - + {metadata[SERVICE_NAME]} diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/links/apm/service_link/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/links/apm/service_link/index.tsx index 4526312660566a..992dda3d88fbd6 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/links/apm/service_link/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/links/apm/service_link/index.tsx @@ -91,7 +91,7 @@ export function ServiceLink({ > - + {serviceName} diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/links/dependency_link.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/links/dependency_link.tsx index 824e08752e0952..696f987ea2b63f 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/links/dependency_link.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/links/dependency_link.tsx @@ -35,7 +35,7 @@ export function DependencyLink({ query, subtype, type, onClick }: Props) { > - + {query.dependencyName} diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/span_icon/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/span_icon/index.tsx index 42be10d1468d40..34e0b88d235f86 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/span_icon/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/span_icon/index.tsx @@ -6,16 +6,16 @@ */ import React from 'react'; -import { EuiIcon } from '@elastic/eui'; +import { EuiIcon, type EuiIconProps } from '@elastic/eui'; import { getSpanIcon } from './get_span_icon'; -interface Props { +interface Props extends Omit { type?: string; subtype?: string; } -export function SpanIcon({ type, subtype }: Props) { +export function SpanIcon({ type, subtype, ...props }: Props) { const icon = getSpanIcon(type, subtype); - return ; + return ; } diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_apm_service.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_apm_service.tsx index b4e2ea57c9eaaf..92424d85f18616 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_apm_service.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/links/link_to_apm_service.tsx @@ -39,7 +39,12 @@ export const LinkToApmService = ({ serviceName, agentName, dateRange }: LinkToAp })} > {agentName ? ( - + ) : null} {serviceName} diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/table/entry_title.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/table/entry_title.tsx index 8bd22bde907160..a88a2c30c6eac1 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/table/entry_title.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/table/entry_title.tsx @@ -5,6 +5,7 @@ * 2.0. */ import React from 'react'; +import { i18n } from '@kbn/i18n'; import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiToolTip } from '@elastic/eui'; import { CloudProviderIcon } from '@kbn/custom-icons'; import { useNodeDetailsRedirect } from '../../../../link_to/use_node_details_redirect'; @@ -34,28 +35,38 @@ export const EntryTitle = ({ onClick, title }: EntryTitleProps) => { const providerName = cloudProvider ?? 'Unknown'; return ( - - - - - - - - - - {name} - - - - + + + + + + + {name} + + + + ); }; From e3cc2e0cc04affbd7711b8fa8848fe6591860751 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Mon, 8 Jul 2024 10:07:43 -0600 Subject: [PATCH 015/103] decouple 'Add to case' action from legacy embeddable framework (#187293) Part of https://github.com/elastic/kibana/issues/175138 PR decouples "Add to case" action from legacy embeddable framework. PR also cleans up page load bundle size by moving `isCompatible` and `execute` implemenations behind async imports. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine --- .../presentation_publishing/index.ts | 1 + .../interfaces/publishes_blocking_error.ts | 4 + .../actions/action_wrapper.test.tsx | 9 +- .../visualizations/actions/action_wrapper.tsx | 36 +-- .../actions/add_to_existing_case.test.tsx | 221 ------------------ .../actions/add_to_existing_case.tsx | 121 ++-------- .../actions/is_compatible.test.ts | 58 +++++ .../visualizations/actions/is_compatible.ts | 30 +++ .../visualizations/actions/mocks.ts | 85 +++---- .../actions/open_modal.test.tsx | 126 ++++++++++ .../visualizations/actions/open_modal.tsx | 89 +++++++ .../visualizations/actions/register.ts | 36 +-- .../visualizations/actions/types.ts | 13 +- .../visualizations/actions/utils.test.ts | 44 +--- .../visualizations/actions/utils.ts | 12 - x-pack/plugins/cases/public/plugin.ts | 16 +- x-pack/plugins/cases/tsconfig.json | 1 + .../public/embeddable/interfaces/lens_api.ts | 4 +- .../open_in_discover_action.test.ts | 1 + 19 files changed, 412 insertions(+), 495 deletions(-) delete mode 100644 x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx create mode 100644 x-pack/plugins/cases/public/components/visualizations/actions/is_compatible.test.ts create mode 100644 x-pack/plugins/cases/public/components/visualizations/actions/is_compatible.ts create mode 100644 x-pack/plugins/cases/public/components/visualizations/actions/open_modal.test.tsx create mode 100644 x-pack/plugins/cases/public/components/visualizations/actions/open_modal.tsx diff --git a/packages/presentation/presentation_publishing/index.ts b/packages/presentation/presentation_publishing/index.ts index 669baa06f677f9..8d90462c8a1bd7 100644 --- a/packages/presentation/presentation_publishing/index.ts +++ b/packages/presentation/presentation_publishing/index.ts @@ -85,6 +85,7 @@ export { export { apiHasUniqueId, type HasUniqueId } from './interfaces/has_uuid'; export { apiPublishesBlockingError, + hasBlockingError, type PublishesBlockingError, } from './interfaces/publishes_blocking_error'; export { diff --git a/packages/presentation/presentation_publishing/interfaces/publishes_blocking_error.ts b/packages/presentation/presentation_publishing/interfaces/publishes_blocking_error.ts index 68bea175bce8c9..90a86b20c95663 100644 --- a/packages/presentation/presentation_publishing/interfaces/publishes_blocking_error.ts +++ b/packages/presentation/presentation_publishing/interfaces/publishes_blocking_error.ts @@ -17,3 +17,7 @@ export const apiPublishesBlockingError = ( ): unknownApi is PublishesBlockingError => { return Boolean(unknownApi && (unknownApi as PublishesBlockingError)?.blockingError !== undefined); }; + +export function hasBlockingError(api: unknown) { + return apiPublishesBlockingError(api) && api.blockingError?.value !== undefined; +} diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/action_wrapper.test.tsx b/x-pack/plugins/cases/public/components/visualizations/actions/action_wrapper.test.tsx index 31f34de24d5edf..8437da2f28b9c5 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/action_wrapper.test.tsx +++ b/x-pack/plugins/cases/public/components/visualizations/actions/action_wrapper.test.tsx @@ -11,7 +11,8 @@ import { SECURITY_SOLUTION_OWNER } from '../../../../common'; import { canUseCases } from '../../../client/helpers/can_use_cases'; import CasesProvider from '../../cases_context'; import { ActionWrapper } from './action_wrapper'; -import { getMockCaseUiActionProps } from './mocks'; +import { getMockServices } from './mocks'; +import type { CasesActionContextProps } from './types'; jest.mock('../../cases_context', () => jest.fn().mockImplementation(({ children, ...props }) =>
{children}
) @@ -28,7 +29,11 @@ jest.mock('../../../client/helpers/can_use_cases', () => { const mockCasePermissions = jest.fn().mockReturnValue({ create: true, update: true }); describe('ActionWrapper', () => { - const props = { ...getMockCaseUiActionProps(), currentAppId: 'securitySolutionUI' }; + const props = { + casesActionContextProps: {} as unknown as CasesActionContextProps, + currentAppId: 'securitySolutionUI', + services: getMockServices(), + }; beforeEach(() => { jest.clearAllMocks(); diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/action_wrapper.tsx b/x-pack/plugins/cases/public/components/visualizations/actions/action_wrapper.tsx index 543969c731d362..add06a7badb22f 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/action_wrapper.tsx +++ b/x-pack/plugins/cases/public/components/visualizations/actions/action_wrapper.tsx @@ -11,7 +11,7 @@ import { Router } from '@kbn/shared-ux-router'; import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { SECURITY_SOLUTION_OWNER } from '../../../../common'; -import type { CasesUIActionProps } from './types'; +import type { CasesActionContextProps, Services } from './types'; import { KibanaContextProvider, useKibana } from '../../../common/lib/kibana'; import CasesProvider from '../../cases_context'; import { getCaseOwnerByAppId } from '../../../../common/utils/owner'; @@ -20,13 +20,13 @@ import { canUseCases } from '../../../client/helpers/can_use_cases'; export const DEFAULT_DARK_MODE = 'theme:darkMode' as const; interface Props { - caseContextProps: CasesUIActionProps['caseContextProps']; + casesActionContextProps: CasesActionContextProps; currentAppId?: string; } const ActionWrapperWithContext: React.FC> = ({ children, - caseContextProps, + casesActionContextProps, currentAppId, }) => { const { application, i18n, theme } = useKibana().services; @@ -40,7 +40,7 @@ const ActionWrapperWithContext: React.FC> = ({ > = ({ ActionWrapperWithContext.displayName = 'ActionWrapperWithContext'; -type ActionWrapperComponentProps = PropsWithChildren< - CasesUIActionProps & { currentAppId?: string } ->; +type ActionWrapperComponentProps = PropsWithChildren<{ + casesActionContextProps: CasesActionContextProps; + currentAppId?: string; + services: Services; +}>; const ActionWrapperComponent: React.FC = ({ - core, - plugins, - storage, - history, + casesActionContextProps, children, - caseContextProps, currentAppId, + services, }) => { return ( - - + + {children} diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx deleted file mode 100644 index 07d05f292d7229..00000000000000 --- a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx +++ /dev/null @@ -1,221 +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 { LENS_EMBEDDABLE_TYPE, type Embeddable as LensEmbeddable } from '@kbn/lens-plugin/public'; -import { ErrorEmbeddable } from '@kbn/embeddable-plugin/public'; -import type { Action } from '@kbn/ui-actions-plugin/public'; -import ReactDOM, { unmountComponentAtNode } from 'react-dom'; - -import { createAddToExistingCaseLensAction } from './add_to_existing_case'; -import type { ActionContext } from './types'; -import { useCasesAddToExistingCaseModal } from '../../all_cases/selector_modal/use_cases_add_to_existing_case_modal'; -import type { PropsWithChildren } from 'react'; -import React from 'react'; -import { toMountPoint } from '@kbn/react-kibana-mount'; -import { - getMockApplications$, - getMockCaseUiActionProps, - getMockCurrentAppId$, - mockAttributes, - MockEmbeddable, - mockTimeRange, -} from './mocks'; -import { useKibana } from '../../../common/lib/kibana'; -import { waitFor } from '@testing-library/react'; -import { canUseCases } from '../../../client/helpers/can_use_cases'; -import { getCaseOwnerByAppId } from '../../../../common/utils/owner'; - -const element = document.createElement('div'); -document.body.appendChild(element); - -jest.mock('../../all_cases/selector_modal/use_cases_add_to_existing_case_modal', () => ({ - useCasesAddToExistingCaseModal: jest.fn(), -})); - -jest.mock('../../../client/helpers/can_use_cases', () => { - const actual = jest.requireActual('../../../client/helpers/can_use_cases'); - return { - ...actual, - canUseCases: jest.fn(), - }; -}); - -jest.mock('@kbn/kibana-react-plugin/public', () => ({ - KibanaThemeProvider: jest - .fn() - .mockImplementation(({ children }: PropsWithChildren) => <>{children}), -})); - -jest.mock('@kbn/react-kibana-mount', () => ({ - toMountPoint: jest.fn(), -})); - -jest.mock('../../../common/lib/kibana', () => { - return { - useKibana: jest.fn(), - KibanaContextProvider: jest - .fn() - .mockImplementation(({ children, ...props }) =>
{children}
), - }; -}); - -jest.mock('react-dom', () => { - const original = jest.requireActual('react-dom'); - return { ...original, unmountComponentAtNode: jest.fn() }; -}); - -jest.mock('./action_wrapper'); - -jest.mock('../../../../common/utils/owner', () => ({ - getCaseOwnerByAppId: jest.fn().mockReturnValue('securitySolution'), -})); - -describe('createAddToExistingCaseLensAction', () => { - const mockEmbeddable = new MockEmbeddable(LENS_EMBEDDABLE_TYPE, { - id: 'mockId', - attributes: mockAttributes, - timeRange: mockTimeRange, - }) as unknown as LensEmbeddable; - - const context = { - embeddable: mockEmbeddable, - } as unknown as ActionContext; - - const caseUiActionProps = getMockCaseUiActionProps(); - - const mockUseCasesAddToExistingCaseModal = useCasesAddToExistingCaseModal as jest.Mock; - const mockOpenModal = jest.fn(); - const mockMount = jest.fn(); - let action: Action; - const mockCasePermissions = jest.fn(); - beforeEach(() => { - mockUseCasesAddToExistingCaseModal.mockReturnValue({ - open: mockOpenModal, - }); - (useKibana as jest.Mock).mockReturnValue({ - services: { - application: { - currentAppId$: getMockCurrentAppId$(), - applications$: getMockApplications$(), - }, - }, - }); - (canUseCases as jest.Mock).mockReturnValue( - mockCasePermissions.mockReturnValue({ create: true, update: true }) - ); - (toMountPoint as jest.Mock).mockImplementation((node) => { - ReactDOM.render(node, element); - return mockMount; - }); - jest.clearAllMocks(); - action = createAddToExistingCaseLensAction(caseUiActionProps); - }); - - test('it should return display name', () => { - expect(action.getDisplayName(context)).toEqual('Add to case'); - }); - - it('should return icon type', () => { - expect(action.getIconType(context)).toEqual('casesApp'); - }); - - describe('isCompatible', () => { - it('should return false if error embeddable', async () => { - expect( - await action.isCompatible({ - ...context, - embeddable: new ErrorEmbeddable('some error', { - id: '123', - }) as unknown as LensEmbeddable, - }) - ).toEqual(false); - }); - - it('should return false if not lens embeddable', async () => { - expect( - await action.isCompatible({ - ...context, - embeddable: new MockEmbeddable('not_lens') as unknown as LensEmbeddable, - }) - ).toEqual(false); - }); - - it('should return false if no permission', async () => { - mockCasePermissions.mockReturnValue({ create: false, update: false }); - expect(await action.isCompatible(context)).toEqual(false); - }); - - it('should return true if is lens embeddable', async () => { - expect(await action.isCompatible(context)).toEqual(true); - }); - - it('should check permission with undefined if owner is not found', async () => { - (getCaseOwnerByAppId as jest.Mock).mockReturnValue(undefined); - await action.isCompatible(context); - expect(mockCasePermissions).toBeCalledWith(undefined); - }); - }); - - describe('execute', () => { - beforeEach(async () => { - await action.execute(context); - }); - - it('should execute', () => { - expect(toMountPoint).toHaveBeenCalled(); - expect(mockMount).toHaveBeenCalled(); - }); - }); - - describe('Add to existing case modal', () => { - beforeEach(async () => { - await action.execute(context); - }); - - it('should open modal with an attachment', async () => { - await waitFor(() => { - expect(mockOpenModal).toHaveBeenCalled(); - - const getAttachments = mockOpenModal.mock.calls[0][0].getAttachments; - expect(getAttachments()).toEqual([ - { - persistableStateAttachmentState: { - attributes: mockAttributes, - timeRange: mockTimeRange, - }, - persistableStateAttachmentTypeId: '.lens', - type: 'persistableState', - }, - ]); - }); - }); - - it('should have correct onClose handler - when close modal clicked', () => { - const onClose = mockUseCasesAddToExistingCaseModal.mock.calls[0][0].onClose; - onClose(); - expect(unmountComponentAtNode as jest.Mock).toHaveBeenCalled(); - }); - - it('should have correct onClose handler - when case selected', () => { - const onClose = mockUseCasesAddToExistingCaseModal.mock.calls[0][0].onClose; - onClose({ id: 'case-id', title: 'case-title' }); - expect(unmountComponentAtNode as jest.Mock).toHaveBeenCalled(); - }); - - it('should have correct onClose handler - when case created', () => { - const onClose = mockUseCasesAddToExistingCaseModal.mock.calls[0][0].onClose; - onClose(null, true); - expect(unmountComponentAtNode as jest.Mock).not.toHaveBeenCalled(); - }); - - it('should have correct onSuccess handler', () => { - const onSuccess = mockUseCasesAddToExistingCaseModal.mock.calls[0][0].onSuccess; - onSuccess(); - expect(unmountComponentAtNode as jest.Mock).toHaveBeenCalled(); - }); - }); -}); diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.tsx b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.tsx index 647abe8b41f2a8..95654171411789 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.tsx +++ b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.tsx @@ -4,130 +4,39 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React, { useEffect, useMemo } from 'react'; -import { unmountComponentAtNode } from 'react-dom'; -import type { Embeddable as LensEmbeddable } from '@kbn/lens-plugin/public'; -import { createAction } from '@kbn/ui-actions-plugin/public'; -import { isErrorEmbeddable } from '@kbn/embeddable-plugin/public'; -import { toMountPoint } from '@kbn/react-kibana-mount'; +import { createAction, IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; -import type { CaseUI } from '../../../../common'; -import { isLensEmbeddable, hasInput, getLensCaseAttachment } from './utils'; - -import type { ActionContext, CasesUIActionProps } from './types'; -import { useCasesAddToExistingCaseModal } from '../../all_cases/selector_modal/use_cases_add_to_existing_case_modal'; +import type { EmbeddableApiContext } from '@kbn/presentation-publishing'; +import type { CasesActionContextProps, Services } from './types'; import { ADD_TO_EXISTING_CASE_DISPLAYNAME } from './translations'; -import { ActionWrapper } from './action_wrapper'; -import { canUseCases } from '../../../client/helpers/can_use_cases'; -import { getCaseOwnerByAppId } from '../../../../common/utils/owner'; export const ACTION_ID = 'embeddable_addToExistingCase'; -export const DEFAULT_DARK_MODE = 'theme:darkMode' as const; - -interface Props { - embeddable: LensEmbeddable; - onSuccess: () => void; - onClose: (theCase?: CaseUI) => void; -} - -const AddExistingCaseModalWrapper: React.FC = ({ embeddable, onClose, onSuccess }) => { - const modal = useCasesAddToExistingCaseModal({ - onClose, - onSuccess, - }); - - const attachments = useMemo(() => { - const { timeRange } = embeddable.getInput(); - const attributes = embeddable.getFullAttributes(); - // we've checked attributes exists before rendering (isCompatible), attributes should not be undefined here - return attributes != null ? [getLensCaseAttachment({ attributes, timeRange })] : []; - }, [embeddable]); - useEffect(() => { - modal.open({ getAttachments: () => attachments }); - }, [attachments, modal]); - - return null; -}; - -AddExistingCaseModalWrapper.displayName = 'AddExistingCaseModalWrapper'; - -export const createAddToExistingCaseLensAction = ({ - core, - plugins, - storage, - history, - caseContextProps, -}: CasesUIActionProps) => { - const { application: applicationService, i18n, theme } = core; +export const createAddToExistingCaseLensAction = ( + casesActionContextProps: CasesActionContextProps, + services: Services +) => { let currentAppId: string | undefined; - applicationService?.currentAppId$.subscribe((appId) => { + services.core.application?.currentAppId$.subscribe((appId) => { currentAppId = appId; }); - return createAction({ + return createAction({ id: ACTION_ID, type: 'actionButton', getIconType: () => 'casesApp', getDisplayName: () => ADD_TO_EXISTING_CASE_DISPLAYNAME, isCompatible: async ({ embeddable }) => { - const owner = getCaseOwnerByAppId(currentAppId); - const casePermissions = canUseCases(applicationService.capabilities)( - owner ? [owner] : undefined - ); - - return ( - !isErrorEmbeddable(embeddable) && - isLensEmbeddable(embeddable) && - casePermissions.update && - casePermissions.create && - hasInput(embeddable) - ); + const { isCompatible } = await import('./is_compatible'); + return isCompatible(embeddable, currentAppId, services.core); }, execute: async ({ embeddable }) => { - const targetDomElement = document.createElement('div'); - - const cleanupDom = (shouldCleanup?: boolean) => { - if (targetDomElement != null && shouldCleanup) { - unmountComponentAtNode(targetDomElement); - } - }; - - const onClose = (theCase?: CaseUI, isCreateCase?: boolean) => { - const closeModalClickedScenario = theCase == null && !isCreateCase; - const caseSelectedScenario = theCase != null; - // When `Creating` a case from the `add to existing case modal`, - // we close the modal and then open the flyout. - // If we clean up dom when closing the modal, then the flyout won't open. - // Thus we do not clean up dom when `Creating` a case. - const shouldCleanup = closeModalClickedScenario || caseSelectedScenario; - cleanupDom(shouldCleanup); - }; - - const onSuccess = () => { - cleanupDom(true); - }; - const mount = toMountPoint( - - - , - { i18n, theme } - ); - - mount(targetDomElement); + const { isLensApi } = await import('@kbn/lens-plugin/public'); + if (!isLensApi(embeddable)) throw new IncompatibleActionError(); + const { openModal } = await import('./open_modal'); + openModal(embeddable, currentAppId, casesActionContextProps, services); }, }); }; diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/is_compatible.test.ts b/x-pack/plugins/cases/public/components/visualizations/actions/is_compatible.test.ts new file mode 100644 index 00000000000000..1169ec14648b40 --- /dev/null +++ b/x-pack/plugins/cases/public/components/visualizations/actions/is_compatible.test.ts @@ -0,0 +1,58 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { BehaviorSubject } from 'rxjs'; +import { coreMock } from '@kbn/core/public/mocks'; +import { isCompatible } from './is_compatible'; +import { canUseCases } from '../../../client/helpers/can_use_cases'; +import { mockLensApi } from './mocks'; + +jest.mock('../../../../common/utils/owner', () => ({ + getCaseOwnerByAppId: () => 'securitySolution', +})); + +jest.mock('../../../client/helpers/can_use_cases', () => { + const actual = jest.requireActual('../../../client/helpers/can_use_cases'); + return { + ...actual, + canUseCases: jest.fn(), + }; +}); + +describe('isCompatible', () => { + const appId = 'myAppId'; + const mockCoreStart = coreMock.createStart(); + + const mockCasePermissions = jest.fn(); + beforeEach(() => { + (canUseCases as jest.Mock).mockReturnValue( + mockCasePermissions.mockReturnValue({ create: true, update: true }) + ); + jest.clearAllMocks(); + }); + + test('should return false if error embeddable', async () => { + const errorApi = { + ...mockLensApi, + blockingError: new BehaviorSubject(new Error('Simulated blocking error')), + }; + expect(isCompatible(errorApi, appId, mockCoreStart)).toBe(false); + }); + + test('should return false if not lens embeddable', async () => { + expect(isCompatible({}, appId, mockCoreStart)).toBe(false); + }); + + test('should return false if no permission', async () => { + mockCasePermissions.mockReturnValue({ create: false, update: false }); + expect(isCompatible(mockLensApi, appId, mockCoreStart)).toBe(false); + }); + + test('should return true if is lens embeddable', async () => { + expect(isCompatible(mockLensApi, appId, mockCoreStart)).toBe(true); + }); +}); diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/is_compatible.ts b/x-pack/plugins/cases/public/components/visualizations/actions/is_compatible.ts new file mode 100644 index 00000000000000..64becf44e266ea --- /dev/null +++ b/x-pack/plugins/cases/public/components/visualizations/actions/is_compatible.ts @@ -0,0 +1,30 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { CoreStart } from '@kbn/core-lifecycle-browser'; +import { isLensApi } from '@kbn/lens-plugin/public'; +import { hasBlockingError } from '@kbn/presentation-publishing'; +import { canUseCases } from '../../../client/helpers/can_use_cases'; +import { getCaseOwnerByAppId } from '../../../../common/utils/owner'; + +export function isCompatible( + embeddable: unknown, + currentAppId: string | undefined, + core: CoreStart +) { + if (!isLensApi(embeddable) || hasBlockingError(embeddable)) return false; + if (!embeddable.getFullAttributes()) { + return false; + } + const timeRange = embeddable.timeRange$?.value ?? embeddable.parentApi?.timeRange$?.value; + if (!timeRange) { + return false; + } + const owner = getCaseOwnerByAppId(currentAppId); + const casePermissions = canUseCases(core.application.capabilities)(owner ? [owner] : undefined); + return casePermissions.update && casePermissions.create; +} diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/mocks.ts b/x-pack/plugins/cases/public/components/visualizations/actions/mocks.ts index aee3b128d554bd..4d28bf6728e0ff 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/mocks.ts +++ b/x-pack/plugins/cases/public/components/visualizations/actions/mocks.ts @@ -10,36 +10,13 @@ import { BehaviorSubject } from 'rxjs'; import type { PublicAppInfo } from '@kbn/core/public'; import { coreMock } from '@kbn/core/public/mocks'; -import type { TypedLensByValueInput } from '@kbn/lens-plugin/public'; -import type { CasesUIActionProps } from './types'; +import type { LensApi, LensSavedObjectAttributes } from '@kbn/lens-plugin/public'; +import type { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query'; +import type { Services } from './types'; const coreStart = coreMock.createStart(); -export class MockEmbeddable { - public type; - private input; - constructor( - type: string, - input?: { - attributes: TypedLensByValueInput['attributes']; - id: string; - timeRange: { from: string; to: string; fromStr: string; toStr: string }; - } - ) { - this.type = type; - this.input = input; - } - getFilters() {} - getQuery() {} - getInput() { - return this.input; - } - getFullAttributes() { - return this.input?.attributes; - } -} - -export const mockAttributes = { +export const mockLensAttributes = { title: 'mockTitle', description: 'mockDescription', references: [], @@ -57,9 +34,26 @@ export const mockAttributes = { }, }, }, -} as unknown as TypedLensByValueInput['attributes']; +} as unknown as LensSavedObjectAttributes; -export const mockTimeRange = { from: '', to: '', fromStr: '', toStr: '' }; +export const mockLensApi = { + type: 'lens', + getSavedVis: () => {}, + canViewUnderlyingData: () => {}, + getViewUnderlyingDataArgs: () => {}, + getFullAttributes: () => { + return mockLensAttributes; + }, + panelTitle: new BehaviorSubject('myPanel'), + hidePanelTitle: new BehaviorSubject('false'), + timeslice$: new BehaviorSubject<[number, number] | undefined>(undefined), + timeRange$: new BehaviorSubject({ + from: 'now-24h', + to: 'now', + }), + filters$: new BehaviorSubject(undefined), + query$: new BehaviorSubject(undefined), +} as unknown as LensApi; export const getMockCurrentAppId$ = () => new BehaviorSubject('securitySolutionUI'); export const getMockApplications$ = () => @@ -67,26 +61,17 @@ export const getMockApplications$ = () => new Map([['securitySolutionUI', { category: { label: 'Test' } } as unknown as PublicAppInfo]]) ); -export const getMockCaseUiActionProps = () => { - const core = { - ...coreStart, - application: { currentAppId$: getMockCurrentAppId$(), capabilities: {} }, - uiSettings: { - get: jest.fn().mockReturnValue(true), +export const getMockServices = () => { + return { + core: { + ...coreStart, + application: { currentAppId$: getMockCurrentAppId$(), capabilities: {} }, + uiSettings: { + get: jest.fn().mockReturnValue(true), + }, }, - }; - const plugins = {}; - const storage = {}; - const history = createBrowserHistory(); - const caseContextProps = {}; - - const caseUiActionProps = { - core, - plugins, - storage, - history, - caseContextProps, - } as unknown as CasesUIActionProps; - - return caseUiActionProps; + plugins: {}, + storage: {}, + history: createBrowserHistory(), + } as unknown as Services; }; diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/open_modal.test.tsx b/x-pack/plugins/cases/public/components/visualizations/actions/open_modal.test.tsx new file mode 100644 index 00000000000000..ac38056b9321ef --- /dev/null +++ b/x-pack/plugins/cases/public/components/visualizations/actions/open_modal.test.tsx @@ -0,0 +1,126 @@ +/* + * Copyright 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 ReactDOM, { unmountComponentAtNode } from 'react-dom'; +import { useCasesAddToExistingCaseModal } from '../../all_cases/selector_modal/use_cases_add_to_existing_case_modal'; +import type { PropsWithChildren } from 'react'; +import React from 'react'; +import { toMountPoint } from '@kbn/react-kibana-mount'; +import { + getMockApplications$, + getMockCurrentAppId$, + mockLensApi, + mockLensAttributes, + getMockServices, +} from './mocks'; +import { useKibana } from '../../../common/lib/kibana'; +import { waitFor } from '@testing-library/react'; +import { openModal } from './open_modal'; +import type { CasesActionContextProps } from './types'; + +const element = document.createElement('div'); +document.body.appendChild(element); + +jest.mock('../../all_cases/selector_modal/use_cases_add_to_existing_case_modal', () => ({ + useCasesAddToExistingCaseModal: jest.fn(), +})); + +jest.mock('@kbn/kibana-react-plugin/public', () => ({ + KibanaThemeProvider: jest + .fn() + .mockImplementation(({ children }: PropsWithChildren) => <>{children}), +})); + +jest.mock('@kbn/react-kibana-mount', () => ({ + toMountPoint: jest.fn(), +})); + +jest.mock('../../../common/lib/kibana', () => { + return { + useKibana: jest.fn(), + KibanaContextProvider: jest + .fn() + .mockImplementation(({ children, ...props }) =>
{children}
), + }; +}); + +jest.mock('react-dom', () => { + const original = jest.requireActual('react-dom'); + return { ...original, unmountComponentAtNode: jest.fn() }; +}); + +jest.mock('./action_wrapper'); + +describe('openModal', () => { + const mockUseCasesAddToExistingCaseModal = useCasesAddToExistingCaseModal as jest.Mock; + const mockOpenModal = jest.fn(); + const mockMount = jest.fn(); + beforeEach(() => { + mockUseCasesAddToExistingCaseModal.mockReturnValue({ + open: mockOpenModal, + }); + (useKibana as jest.Mock).mockReturnValue({ + services: { + application: { + currentAppId$: getMockCurrentAppId$(), + applications$: getMockApplications$(), + }, + }, + }); + (toMountPoint as jest.Mock).mockImplementation((node) => { + ReactDOM.render(node, element); + return mockMount; + }); + jest.clearAllMocks(); + openModal(mockLensApi, 'myAppId', {} as unknown as CasesActionContextProps, getMockServices()); + }); + + test('should open modal with an attachment', async () => { + await waitFor(() => { + expect(mockOpenModal).toHaveBeenCalled(); + + const getAttachments = mockOpenModal.mock.calls[0][0].getAttachments; + expect(getAttachments()).toEqual([ + { + persistableStateAttachmentState: { + attributes: mockLensAttributes, + timeRange: { + from: 'now-24h', + to: 'now', + }, + }, + persistableStateAttachmentTypeId: '.lens', + type: 'persistableState', + }, + ]); + }); + }); + + test('should have correct onClose handler - when close modal clicked', () => { + const onClose = mockUseCasesAddToExistingCaseModal.mock.calls[0][0].onClose; + onClose(); + expect(unmountComponentAtNode as jest.Mock).toHaveBeenCalled(); + }); + + test('should have correct onClose handler - when case selected', () => { + const onClose = mockUseCasesAddToExistingCaseModal.mock.calls[0][0].onClose; + onClose({ id: 'case-id', title: 'case-title' }); + expect(unmountComponentAtNode as jest.Mock).toHaveBeenCalled(); + }); + + test('should have correct onClose handler - when case created', () => { + const onClose = mockUseCasesAddToExistingCaseModal.mock.calls[0][0].onClose; + onClose(null, true); + expect(unmountComponentAtNode as jest.Mock).not.toHaveBeenCalled(); + }); + + test('should have correct onSuccess handler', () => { + const onSuccess = mockUseCasesAddToExistingCaseModal.mock.calls[0][0].onSuccess; + onSuccess(); + expect(unmountComponentAtNode as jest.Mock).toHaveBeenCalled(); + }); +}); diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/open_modal.tsx b/x-pack/plugins/cases/public/components/visualizations/actions/open_modal.tsx new file mode 100644 index 00000000000000..e0871e0710e683 --- /dev/null +++ b/x-pack/plugins/cases/public/components/visualizations/actions/open_modal.tsx @@ -0,0 +1,89 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useEffect, useMemo } from 'react'; +import { unmountComponentAtNode } from 'react-dom'; +import type { LensApi } from '@kbn/lens-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; +import { useStateFromPublishingSubject } from '@kbn/presentation-publishing'; +import { ActionWrapper } from './action_wrapper'; +import type { CasesActionContextProps, Services } from './types'; +import type { CaseUI } from '../../../../common'; +import { getLensCaseAttachment } from './utils'; +import { useCasesAddToExistingCaseModal } from '../../all_cases/selector_modal/use_cases_add_to_existing_case_modal'; + +interface Props { + lensApi: LensApi; + onSuccess: () => void; + onClose: (theCase?: CaseUI) => void; +} + +const AddExistingCaseModalWrapper: React.FC = ({ lensApi, onClose, onSuccess }) => { + const modal = useCasesAddToExistingCaseModal({ + onClose, + onSuccess, + }); + + const timeRange = useStateFromPublishingSubject(lensApi.timeRange$); + const parentTimeRange = useStateFromPublishingSubject(lensApi.parentApi?.timeRange$); + + const attachments = useMemo(() => { + const appliedTimeRange = timeRange ?? parentTimeRange; + const attributes = lensApi.getFullAttributes(); + return !attributes || !appliedTimeRange + ? [] + : [getLensCaseAttachment({ attributes, timeRange: appliedTimeRange })]; + }, [lensApi, timeRange, parentTimeRange]); + useEffect(() => { + modal.open({ getAttachments: () => attachments }); + }, [attachments, modal]); + + return null; +}; +AddExistingCaseModalWrapper.displayName = 'AddExistingCaseModalWrapper'; + +export function openModal( + lensApi: LensApi, + currentAppId: string | undefined, + casesActionContextProps: CasesActionContextProps, + services: Services +) { + const targetDomElement = document.createElement('div'); + + const cleanupDom = (shouldCleanup?: boolean) => { + if (targetDomElement != null && shouldCleanup) { + unmountComponentAtNode(targetDomElement); + } + }; + + const onClose = (theCase?: CaseUI, isCreateCase?: boolean) => { + const closeModalClickedScenario = theCase == null && !isCreateCase; + const caseSelectedScenario = theCase != null; + // When `Creating` a case from the `add to existing case modal`, + // we close the modal and then open the flyout. + // If we clean up dom when closing the modal, then the flyout won't open. + // Thus we do not clean up dom when `Creating` a case. + const shouldCleanup = closeModalClickedScenario || caseSelectedScenario; + cleanupDom(shouldCleanup); + }; + + const onSuccess = () => { + cleanupDom(true); + }; + const mount = toMountPoint( + + + , + { i18n: services.core.i18n, theme: services.core.theme } + ); + + mount(targetDomElement); +} diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/register.ts b/x-pack/plugins/cases/public/components/visualizations/actions/register.ts index 70d0d6d7a84d4d..d2f3d68e737a58 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/register.ts +++ b/x-pack/plugins/cases/public/components/visualizations/actions/register.ts @@ -8,31 +8,15 @@ import { CONTEXT_MENU_TRIGGER } from '@kbn/embeddable-plugin/public'; import { createAddToExistingCaseLensAction } from './add_to_existing_case'; -import type { CasesUIActionProps } from './types'; +import type { CasesActionContextProps, Services } from './types'; -export const registerUIActions = ({ - core, - plugins, - caseContextProps, - history, - storage, -}: CasesUIActionProps) => { - registerLensActions({ core, plugins, caseContextProps, history, storage }); -}; - -const registerLensActions = ({ - core, - plugins, - caseContextProps, - history, - storage, -}: CasesUIActionProps) => { - const addToExistingCaseAction = createAddToExistingCaseLensAction({ - core, - plugins, - caseContextProps, - history, - storage, - }); - plugins.uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, addToExistingCaseAction); +export const registerUIActions = ( + casesActionContextProps: CasesActionContextProps, + services: Services +) => { + const addToExistingCaseAction = createAddToExistingCaseLensAction( + casesActionContextProps, + services + ); + services.plugins.uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, addToExistingCaseAction); }; diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/types.ts b/x-pack/plugins/cases/public/components/visualizations/actions/types.ts index 8cbe7fd93585d9..b1ccf7bad921ce 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/types.ts +++ b/x-pack/plugins/cases/public/components/visualizations/actions/types.ts @@ -5,30 +5,23 @@ * 2.0. */ -import type { CoreStart } from '@kbn/core-lifecycle-browser'; -import type { Embeddable } from '@kbn/lens-plugin/public'; +import type { CoreStart } from '@kbn/core/public'; import type * as H from 'history'; import type { Storage } from '@kbn/kibana-utils-plugin/public'; -import type { ActionExecutionContext } from '@kbn/ui-actions-plugin/public'; import type { CasesPublicStartDependencies } from '../../../types'; import type { CasesContextProps } from '../../cases_context'; -export type CasesUIActionContextProps = Pick< +export type CasesActionContextProps = Pick< CasesContextProps, | 'externalReferenceAttachmentTypeRegistry' | 'persistableStateAttachmentTypeRegistry' | 'getFilesClient' >; -export interface CasesUIActionProps { +export interface Services { core: CoreStart; plugins: CasesPublicStartDependencies; - caseContextProps: CasesUIActionContextProps; history: H.History; storage: Storage; } - -export type ActionContext = ActionExecutionContext<{ - embeddable: Embeddable; -}>; diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/utils.test.ts b/x-pack/plugins/cases/public/components/visualizations/actions/utils.test.ts index 591e12dd7a7127..d643a668553d38 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/utils.test.ts +++ b/x-pack/plugins/cases/public/components/visualizations/actions/utils.test.ts @@ -5,51 +5,9 @@ * 2.0. */ -import { LENS_EMBEDDABLE_TYPE } from '@kbn/lens-plugin/public'; -import { isLensEmbeddable, hasInput, getLensCaseAttachment } from './utils'; +import { getLensCaseAttachment } from './utils'; describe('utils', () => { - describe('isLensEmbeddable', () => { - it('return true if it is a lens embeddable', () => { - // @ts-expect-error: extra attributes are not needed - expect(isLensEmbeddable({ type: LENS_EMBEDDABLE_TYPE })).toBe(true); - }); - - it('return false if it is not a lens embeddable', () => { - // @ts-expect-error: extra attributes are not needed - expect(isLensEmbeddable({ type: 'not-exist' })).toBe(false); - }); - }); - - describe('hasInput', () => { - it('return true if it has correct input', () => { - const embeddable = { - getInput: () => ({ timeRange: {} }), - getFullAttributes: jest.fn().mockReturnValue({}), - }; - - // @ts-expect-error: extra attributes are not needed - expect(hasInput(embeddable)).toBe(true); - }); - - it('return false if attributes are null', () => { - const embeddable = { - getInput: () => ({ timeRange: {} }), - getFullAttributes: jest.fn().mockReturnValue(null), - }; - - // @ts-expect-error: extra attributes are not needed - expect(hasInput(embeddable)).toBe(false); - }); - - it('return false if timeRange is null', () => { - const embeddable = { getInput: () => ({ timeRange: null }), getFullAttributes: () => ({}) }; - - // @ts-expect-error: extra attributes are not needed - expect(hasInput(embeddable)).toBe(false); - }); - }); - describe('getLensCaseAttachment', () => { it('create a case lens attachment correctly', () => { const embeddable = { attributes: {}, timeRange: {} }; diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/utils.ts b/x-pack/plugins/cases/public/components/visualizations/actions/utils.ts index aaabd73dfc884d..e51f1fb13bdeea 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/utils.ts +++ b/x-pack/plugins/cases/public/components/visualizations/actions/utils.ts @@ -4,24 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { IEmbeddable } from '@kbn/embeddable-plugin/public'; import type { LensSavedObjectAttributes } from '@kbn/lens-plugin/public'; -import { LENS_EMBEDDABLE_TYPE, type Embeddable as LensEmbeddable } from '@kbn/lens-plugin/public'; import { LENS_ATTACHMENT_TYPE } from '../../../../common/constants/visualizations'; import type { PersistableStateAttachmentPayload } from '../../../../common/types/domain'; import { AttachmentType } from '../../../../common/types/domain'; import type { LensProps } from '../types'; -export const isLensEmbeddable = (embeddable: IEmbeddable): embeddable is LensEmbeddable => { - return embeddable.type === LENS_EMBEDDABLE_TYPE; -}; - -export const hasInput = (embeddable: LensEmbeddable) => { - const { timeRange } = embeddable.getInput(); - const attributes = embeddable.getFullAttributes(); - return attributes != null && timeRange != null; -}; - type PersistableStateAttachmentWithoutOwner = Omit; export const getLensCaseAttachment = ({ diff --git a/x-pack/plugins/cases/public/plugin.ts b/x-pack/plugins/cases/public/plugin.ts index 12308fcc2f8b6a..67295a29437db1 100644 --- a/x-pack/plugins/cases/public/plugin.ts +++ b/x-pack/plugins/cases/public/plugin.ts @@ -149,17 +149,19 @@ export class CasesUiPlugin getFilesClient: plugins.files.filesClientFactory.asScoped, }); - registerActions({ - core, - plugins, - caseContextProps: { + registerActions( + { externalReferenceAttachmentTypeRegistry: this.externalReferenceAttachmentTypeRegistry, persistableStateAttachmentTypeRegistry: this.persistableStateAttachmentTypeRegistry, getFilesClient: plugins.files.filesClientFactory.asScoped, }, - history: createBrowserHistory(), - storage: this.storage, - }); + { + core, + plugins, + history: createBrowserHistory(), + storage: this.storage, + } + ); return { api: createClientAPI({ http: core.http }), diff --git a/x-pack/plugins/cases/tsconfig.json b/x-pack/plugins/cases/tsconfig.json index 535f4e5e106dc2..6bbc5cfd4e421a 100644 --- a/x-pack/plugins/cases/tsconfig.json +++ b/x-pack/plugins/cases/tsconfig.json @@ -75,6 +75,7 @@ "@kbn/core-logging-browser-mocks", "@kbn/data-views-plugin", "@kbn/core-http-router-server-internal", + "@kbn/presentation-publishing", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/lens/public/embeddable/interfaces/lens_api.ts b/x-pack/plugins/lens/public/embeddable/interfaces/lens_api.ts index d61ddf0448415e..3a03e63ded311b 100644 --- a/x-pack/plugins/lens/public/embeddable/interfaces/lens_api.ts +++ b/x-pack/plugins/lens/public/embeddable/interfaces/lens_api.ts @@ -22,12 +22,13 @@ export type HasLensConfig = HasType<'lens'> & { getSavedVis: () => Readonly; canViewUnderlyingData: () => Promise; getViewUnderlyingDataArgs: () => ViewUnderlyingDataArgs; + getFullAttributes: () => LensSavedObjectAttributes | undefined; }; export type LensApi = HasLensConfig & PublishesPanelTitle & PublishesUnifiedSearch & - Partial>; + Partial>>; export const isLensApi = (api: unknown): api is LensApi => { return Boolean( @@ -36,6 +37,7 @@ export const isLensApi = (api: unknown): api is LensApi => { typeof (api as HasLensConfig).getSavedVis === 'function' && typeof (api as HasLensConfig).canViewUnderlyingData === 'function' && typeof (api as HasLensConfig).getViewUnderlyingDataArgs === 'function' && + typeof (api as HasLensConfig).getFullAttributes === 'function' && apiPublishesPanelTitle(api) && apiPublishesUnifiedSearch(api) ); diff --git a/x-pack/plugins/lens/public/trigger_actions/open_in_discover_action.test.ts b/x-pack/plugins/lens/public/trigger_actions/open_in_discover_action.test.ts index fca5e37ccc2004..45dc8cbe32898f 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_in_discover_action.test.ts +++ b/x-pack/plugins/lens/public/trigger_actions/open_in_discover_action.test.ts @@ -23,6 +23,7 @@ describe('open in discover action', () => { timeRange$: new BehaviorSubject({ from: 'now-15m', to: 'now' }), getSavedVis: jest.fn(() => undefined), canViewUnderlyingData: () => Promise.resolve(true), + getFullAttributes: jest.fn(() => undefined), getViewUnderlyingDataArgs: jest.fn(() => ({ dataViewSpec: { id: 'index-pattern-id' }, timeRange: { from: 'now-7d', to: 'now' }, From 5fc84c427f004b28a2a0dfb6adae1956b1ef255e Mon Sep 17 00:00:00 2001 From: Alex Szabo Date: Mon, 8 Jul 2024 18:11:45 +0200 Subject: [PATCH 016/103] [CI] skipping jest test (#187769) ## Summary Manually skipping, because /skip didn't work https://github.com/elastic/kibana/issues/187714 --- .../components/field_list_filters/field_name_search.test.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/kbn-unified-field-list/src/components/field_list_filters/field_name_search.test.tsx b/packages/kbn-unified-field-list/src/components/field_list_filters/field_name_search.test.tsx index a36aed1a5d3eac..e5a5a4bb82a5f0 100644 --- a/packages/kbn-unified-field-list/src/components/field_list_filters/field_name_search.test.tsx +++ b/packages/kbn-unified-field-list/src/components/field_list_filters/field_name_search.test.tsx @@ -11,7 +11,8 @@ import userEvent from '@testing-library/user-event'; import { FieldNameSearch, type FieldNameSearchProps } from './field_name_search'; import { render, screen, waitFor } from '@testing-library/react'; -describe('UnifiedFieldList ', () => { +// Flaky: https://github.com/elastic/kibana/issues/187714 +describe.skip('UnifiedFieldList ', () => { it('should render correctly', async () => { const props: FieldNameSearchProps = { nameFilter: '', From a7447439dfc856309971efd7f6fe7b3ebeb74523 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Mon, 8 Jul 2024 10:14:15 -0600 Subject: [PATCH 017/103] [Embeddables Rebuild] [Range Slider] fix invalid step size by default (#187721) Fixes https://github.com/elastic/kibana/issues/187380 --------- Co-authored-by: Elastic Machine --- .../control_group/serialization_utils.ts | 4 +-- .../get_range_slider_control_factory.test.tsx | 32 +++++++++++++++++++ .../get_range_slider_control_factory.tsx | 2 +- .../public/react_controls/types.ts | 7 ++-- 4 files changed, 40 insertions(+), 5 deletions(-) diff --git a/examples/controls_example/public/react_controls/control_group/serialization_utils.ts b/examples/controls_example/public/react_controls/control_group/serialization_utils.ts index 0488e3f46a5722..4d0f2eb0f749a3 100644 --- a/examples/controls_example/public/react_controls/control_group/serialization_utils.ts +++ b/examples/controls_example/public/react_controls/control_group/serialization_utils.ts @@ -10,7 +10,7 @@ import { Reference } from '@kbn/content-management-utils'; import { DEFAULT_CONTROL_GROW, DEFAULT_CONTROL_WIDTH } from '@kbn/controls-plugin/common'; import { SerializedPanelState } from '@kbn/presentation-containers'; import { omit } from 'lodash'; -import { DefaultControlApi, DefaultControlState } from '../types'; +import { DefaultControlApi } from '../types'; import { ControlGroupRuntimeState, ControlGroupSerializedState } from './types'; export const deserializeControlGroup = ( @@ -75,7 +75,7 @@ export const serializeControlGroup = ( const { rawState: { grow, width, ...rest }, references: childReferences, - } = (child.serializeState as () => SerializedPanelState)(); + } = child.serializeState(); if (childReferences && childReferences.length > 0) { references = [...references, ...childReferences]; diff --git a/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx b/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx index 98ce7619dda99b..0dcaeece09873c 100644 --- a/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx +++ b/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx @@ -19,6 +19,7 @@ import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { ControlApiRegistration } from '../../types'; import { RangesliderControlApi, RangesliderControlState } from './types'; import { StateComparators } from '@kbn/presentation-publishing'; +import { SerializedPanelState } from '@kbn/presentation-containers'; const DEFAULT_TOTAL_RESULTS = 20; const DEFAULT_MIN = 0; @@ -207,4 +208,35 @@ describe('RangesliderControlApi', () => { }); }); }); + + describe('step state', () => { + test('default value provided when state.step is undefined', () => { + const { api } = factory.buildControl( + { + dataViewId: 'myDataViewId', + fieldName: 'myFieldName', + }, + buildApiMock, + uuid, + controlGroupApi + ); + const serializedState = api.serializeState() as SerializedPanelState; + expect(serializedState.rawState.step).toBe(1); + }); + + test('retains value from initial state', () => { + const { api } = factory.buildControl( + { + dataViewId: 'myDataViewId', + fieldName: 'myFieldName', + step: 1024, + }, + buildApiMock, + uuid, + controlGroupApi + ); + const serializedState = api.serializeState() as SerializedPanelState; + expect(serializedState.rawState.step).toBe(1024); + }); + }); }); diff --git a/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.tsx b/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.tsx index 79670226c6666f..6f477bbc4159ab 100644 --- a/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.tsx +++ b/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.tsx @@ -64,7 +64,7 @@ export const getRangesliderControlFactory = ( const loadingMinMax$ = new BehaviorSubject(false); const loadingHasNoResults$ = new BehaviorSubject(false); const dataLoading$ = new BehaviorSubject(undefined); - const step$ = new BehaviorSubject(initialState.step); + const step$ = new BehaviorSubject(initialState.step ?? 1); const value$ = new BehaviorSubject(initialState.value); function setValue(nextValue: RangeValue | undefined) { value$.next(nextValue); diff --git a/examples/controls_example/public/react_controls/types.ts b/examples/controls_example/public/react_controls/types.ts index ec4299e7176317..bbbd7584e2049e 100644 --- a/examples/controls_example/public/react_controls/types.ts +++ b/examples/controls_example/public/react_controls/types.ts @@ -9,7 +9,7 @@ import { BehaviorSubject } from 'rxjs'; import { CanClearSelections, ControlWidth } from '@kbn/controls-plugin/public/types'; -import { HasSerializableState } from '@kbn/presentation-containers'; +import { SerializedPanelState } from '@kbn/presentation-containers'; import { PanelCompatibleComponent } from '@kbn/presentation-panel-plugin/public/panel_component/types'; import { HasParentApi, @@ -43,8 +43,11 @@ export type DefaultControlApi = PublishesDataLoading & CanClearSelections & HasType & HasUniqueId & - HasSerializableState & HasParentApi & { + // Can not use HasSerializableState interface + // HasSerializableState types serializeState as function returning 'MaybePromise' + // Controls serializeState is sync + serializeState: () => SerializedPanelState; /** TODO: Make these non-public as part of https://github.com/elastic/kibana/issues/174961 */ setDataLoading: (loading: boolean) => void; setBlockingError: (error: Error | undefined) => void; From 62a2faab53a18b0f107e458963bceea897393878 Mon Sep 17 00:00:00 2001 From: Justin Kambic Date: Mon, 8 Jul 2024 12:47:19 -0400 Subject: [PATCH 018/103] [Observability Onboarding] Fix onboarding nav (#187498) ## Summary Addresses some issues with navigation in the Observability solution related to onboarding. ### Overview page add data link ![Untitled](https://github.com/elastic/kibana/assets/18429259/e9fe603c-510b-4bec-87ae-da56337811dd) ### Overview get started link Doesn't render as an anchor because there's a telemetry call inside the handler ![Untitled](https://github.com/elastic/kibana/assets/18429259/d179721d-d2f7-49dc-bd2c-43ba0f14c1eb) ### Install Metricbeat link Takes user to overview page pre-filtered for `infra`. --------- Co-authored-by: Joe Reuter --- .../components/header_menu/header_menu.tsx | 19 ++++++++++++------- .../observability_onboarding_callout.tsx | 9 +++++++-- .../sections/empty/empty_sections.tsx | 18 ++++++++++++++---- 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/x-pack/plugins/observability_solution/observability/public/pages/overview/components/header_menu/header_menu.tsx b/x-pack/plugins/observability_solution/observability/public/pages/overview/components/header_menu/header_menu.tsx index 52ca08e40c031d..67fba37eece458 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/overview/components/header_menu/header_menu.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/overview/components/header_menu/header_menu.tsx @@ -6,6 +6,10 @@ */ import { EuiFlexGroup, EuiFlexItem, EuiHeaderLink, EuiHeaderLinks } from '@elastic/eui'; +import { + ObservabilityOnboardingLocatorParams, + OBSERVABILITY_ONBOARDING_LOCATOR, +} from '@kbn/deeplinks-observability'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { usePluginContext } from '../../../../hooks/use_plugin_context'; @@ -14,7 +18,12 @@ import { useKibana } from '../../../../utils/kibana_react'; import HeaderMenuPortal from './header_menu_portal'; export function HeaderMenu(): React.ReactElement | null { - const { http, theme } = useKibana().services; + const { share, theme } = useKibana().services; + + const onboardingLocator = share?.url.locators.get( + OBSERVABILITY_ONBOARDING_LOCATOR + ); + const href = onboardingLocator?.useUrl({}); const { appMountParameters } = usePluginContext(); @@ -26,13 +35,9 @@ export function HeaderMenu(): React.ReactElement | null { - + {i18n.translate('xpack.observability.home.addData', { - defaultMessage: 'Add integrations', + defaultMessage: 'Add data', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/overview/components/observability_onboarding_callout.tsx b/x-pack/plugins/observability_solution/observability/public/pages/overview/components/observability_onboarding_callout.tsx index 15af235a7fa098..3dd91aff925b6c 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/overview/components/observability_onboarding_callout.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/overview/components/observability_onboarding_callout.tsx @@ -14,14 +14,19 @@ import { EuiText, EuiTitle, } from '@elastic/eui'; +import { ObservabilityOnboardingLocatorParams } from '@kbn/deeplinks-observability'; import { FormattedMessage } from '@kbn/i18n-react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; import React, { useCallback } from 'react'; +import { ObservabilityPublicPluginsStart } from '../../../plugin'; import { useObservabilityOnboarding } from '../../../hooks/use_observability_onboarding'; export function ObservabilityOnboardingCallout() { - const { application } = useKibana().services; + const { application, share } = useKibana().services; + const onboardingHref = share?.url.locators + .get('OBSERVABILITY_ONBOARDING_LOCATOR') + ?.useUrl({ category: 'logs' }); const trackMetric = useUiTracker({ app: 'observability-overview' }); const { isObservabilityOnboardingDismissed, dismissObservabilityOnboarding } = @@ -34,7 +39,7 @@ export function ObservabilityOnboardingCallout() { const getStarted = () => { trackMetric({ metric: 'observability_onboarding_get_started' }); - application?.navigateToApp('observabilityOnboarding'); + application?.navigateToUrl(onboardingHref!); }; return !isObservabilityOnboardingDismissed ? ( diff --git a/x-pack/plugins/observability_solution/observability/public/pages/overview/components/sections/empty/empty_sections.tsx b/x-pack/plugins/observability_solution/observability/public/pages/overview/components/sections/empty/empty_sections.tsx index 886f9ae4d42ed1..d03f1570496c11 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/overview/components/sections/empty/empty_sections.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/overview/components/sections/empty/empty_sections.tsx @@ -10,6 +10,7 @@ import React, { useContext } from 'react'; import { ThemeContext } from 'styled-components'; import { i18n } from '@kbn/i18n'; import { HttpSetup } from '@kbn/core/public'; +import { OBSERVABILITY_ONBOARDING_LOCATOR } from '@kbn/deeplinks-observability'; import { FETCH_STATUS } from '@kbn/observability-shared-plugin/public'; import { useKibana } from '../../../../../utils/kibana_react'; @@ -18,11 +19,14 @@ import { useHasData } from '../../../../../hooks/use_has_data'; import { EmptySection, Section } from './empty_section'; export function EmptySections() { - const { http } = useKibana().services; + const { http, share } = useKibana().services; + const onboardingMetricsHref = share?.url.locators + .get(OBSERVABILITY_ONBOARDING_LOCATOR) + ?.useUrl({ category: 'metrics' }); const theme = useContext(ThemeContext); const { hasDataMap } = useHasData(); - const appEmptySections = getEmptySections({ http }).filter(({ id }) => { + const appEmptySections = getEmptySections({ http, onboardingMetricsHref }).filter(({ id }) => { const app = hasDataMap[id]; if (app) { return app.status === FETCH_STATUS.FAILURE || !app.hasData; @@ -57,7 +61,13 @@ export function EmptySections() { ); } -const getEmptySections = ({ http }: { http: HttpSetup }): Section[] => { +const getEmptySections = ({ + http, + onboardingMetricsHref, +}: { + http: HttpSetup; + onboardingMetricsHref?: string; +}): Section[] => { return [ { id: 'infra_logs', @@ -101,7 +111,7 @@ const getEmptySections = ({ http }: { http: HttpSetup }): Section[] => { linkTitle: i18n.translate('xpack.observability.emptySection.apps.metrics.link', { defaultMessage: 'Install Metricbeat', }), - href: http.basePath.prepend('/app/home#/tutorial_directory/metrics'), + href: onboardingMetricsHref ?? http.basePath.prepend('/app/home#/tutorial_directory/metrics'), }, { id: 'uptime', From 0be5528f21fd0442076d3f331c15cc3f34098d17 Mon Sep 17 00:00:00 2001 From: Joe McElroy Date: Mon, 8 Jul 2024 18:18:12 +0100 Subject: [PATCH 019/103] [Search] [Playground] Gemini search playground + Robustness for Question Rewriting (#187559) ## Summary Work largely based off the work @stephmilovic really nicely put together in this [draft PR](https://github.com/elastic/kibana/pull/186934) - Introduce Google Gemini Model support - Updated bedrock to use the ActionsSimpleChatModel - Updated the tests - Made the rewrite question chain more robust - the prompt is now uses the model specific tags - the system instruction has been updated to be less wordy, better for BM25 retrieval https://github.com/elastic/kibana/assets/49480/4558bc5d-e0c1-4ff6-b68c-800441f7835e ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [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) --------- Co-authored-by: Steph Milovic Co-authored-by: Elastic Machine --- .../search_playground/common/models.ts | 18 +++++-- .../search_playground/common/prompt.ts | 30 ++++++++++- .../plugins/search_playground/common/types.ts | 1 + .../public/hooks/use_llms_models.test.ts | 10 ++-- .../public/hooks/use_llms_models.ts | 11 +++- .../public/hooks/use_load_connectors.ts | 12 +++++ .../server/lib/conversational_chain.test.ts | 3 +- .../server/lib/conversational_chain.ts | 25 +++++----- .../server/lib/get_chat_params.test.ts | 50 +++++++++++++++++-- .../server/lib/get_chat_params.ts | 50 ++++++++++++++++--- .../search_playground/server/routes.ts | 5 +- .../stack_connectors/public/common/index.ts | 4 ++ .../server/connector_types/gemini/gemini.ts | 13 +---- .../server/connector_types/gemini/index.ts | 10 +++- 14 files changed, 190 insertions(+), 52 deletions(-) diff --git a/x-pack/plugins/search_playground/common/models.ts b/x-pack/plugins/search_playground/common/models.ts index 590f241c2e580c..ca27c29e20533f 100644 --- a/x-pack/plugins/search_playground/common/models.ts +++ b/x-pack/plugins/search_playground/common/models.ts @@ -27,15 +27,27 @@ export const MODELS: ModelProvider[] = [ provider: LLMs.openai, }, { - name: 'Claude 3 Haiku', + name: 'Anthropic Claude 3 Haiku', model: 'anthropic.claude-3-haiku-20240307-v1:0', promptTokenLimit: 200000, provider: LLMs.bedrock, }, { - name: 'Claude 3 Sonnet', - model: 'anthropic.claude-3-haiku-20240307-v1:0', + name: 'Anthropic Claude 3.5 Sonnet', + model: 'anthropic.claude-3-5-sonnet-20240620-v1:0', promptTokenLimit: 200000, provider: LLMs.bedrock, }, + { + name: 'Google Gemini 1.5 Pro', + model: 'gemini-1.5-pro-001', + promptTokenLimit: 2097152, + provider: LLMs.gemini, + }, + { + name: 'Google Gemini 1.5 Flash', + model: 'gemini-1.5-flash-001', + promptTokenLimit: 2097152, + provider: LLMs.gemini, + }, ]; diff --git a/x-pack/plugins/search_playground/common/prompt.ts b/x-pack/plugins/search_playground/common/prompt.ts index 0f528be26bf3ad..9d9ffa6a001865 100644 --- a/x-pack/plugins/search_playground/common/prompt.ts +++ b/x-pack/plugins/search_playground/common/prompt.ts @@ -45,10 +45,23 @@ const AnthropicPrompt = (systemInstructions: string) => { `; }; +const GeminiPrompt = (systemInstructions: string) => { + return ` + Instructions: + ${systemInstructions} + + Context: + {context} + + Question: {question} + Answer: + `; +}; + interface PromptTemplateOptions { citations?: boolean; context?: boolean; - type?: 'openai' | 'mistral' | 'anthropic'; + type?: 'openai' | 'mistral' | 'anthropic' | 'gemini'; } export const Prompt = (instructions: string, options: PromptTemplateOptions): string => { @@ -73,5 +86,20 @@ export const Prompt = (instructions: string, options: PromptTemplateOptions): st openai: OpenAIPrompt, mistral: MistralPrompt, anthropic: AnthropicPrompt, + gemini: GeminiPrompt, + }[options.type || 'openai'](systemInstructions); +}; + +interface QuestionRewritePromptOptions { + type: 'openai' | 'mistral' | 'anthropic' | 'gemini'; +} + +export const QuestionRewritePrompt = (options: QuestionRewritePromptOptions): string => { + const systemInstructions = `Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question. Rewrite the question in the question language. Keep the answer to a single sentence. Do not use quotes.`; + return { + openai: OpenAIPrompt, + mistral: MistralPrompt, + anthropic: AnthropicPrompt, + gemini: GeminiPrompt, }[options.type || 'openai'](systemInstructions); }; diff --git a/x-pack/plugins/search_playground/common/types.ts b/x-pack/plugins/search_playground/common/types.ts index 00bfde68ec2eab..9331599786cede 100644 --- a/x-pack/plugins/search_playground/common/types.ts +++ b/x-pack/plugins/search_playground/common/types.ts @@ -40,6 +40,7 @@ export enum LLMs { openai = 'openai', openai_azure = 'openai_azure', bedrock = 'bedrock', + gemini = 'gemini', } export interface ChatRequestData { diff --git a/x-pack/plugins/search_playground/public/hooks/use_llms_models.test.ts b/x-pack/plugins/search_playground/public/hooks/use_llms_models.test.ts index cb21721c3240a0..d6610843065838 100644 --- a/x-pack/plugins/search_playground/public/hooks/use_llms_models.test.ts +++ b/x-pack/plugins/search_playground/public/hooks/use_llms_models.test.ts @@ -88,8 +88,8 @@ describe('useLLMsModels Hook', () => { connectorType: LLMs.bedrock, disabled: false, icon: expect.any(Function), - id: 'connectorId2Claude 3 Haiku', - name: 'Claude 3 Haiku', + id: 'connectorId2Anthropic Claude 3 Haiku', + name: 'Anthropic Claude 3 Haiku', showConnectorName: false, value: 'anthropic.claude-3-haiku-20240307-v1:0', promptTokenLimit: 200000, @@ -100,10 +100,10 @@ describe('useLLMsModels Hook', () => { connectorType: LLMs.bedrock, disabled: false, icon: expect.any(Function), - id: 'connectorId2Claude 3 Sonnet', - name: 'Claude 3 Sonnet', + id: 'connectorId2Anthropic Claude 3.5 Sonnet', + name: 'Anthropic Claude 3.5 Sonnet', showConnectorName: false, - value: 'anthropic.claude-3-haiku-20240307-v1:0', + value: 'anthropic.claude-3-5-sonnet-20240620-v1:0', promptTokenLimit: 200000, }, ]); diff --git a/x-pack/plugins/search_playground/public/hooks/use_llms_models.ts b/x-pack/plugins/search_playground/public/hooks/use_llms_models.ts index e0b26dcee3c7bb..7a9b01e085a6d3 100644 --- a/x-pack/plugins/search_playground/public/hooks/use_llms_models.ts +++ b/x-pack/plugins/search_playground/public/hooks/use_llms_models.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { BedrockLogo, OpenAILogo } from '@kbn/stack-connectors-plugin/public/common'; +import { BedrockLogo, OpenAILogo, GeminiLogo } from '@kbn/stack-connectors-plugin/public/common'; import { ComponentType, useMemo } from 'react'; import { LLMs } from '../../common/types'; import { LLMModel } from '../types'; @@ -52,6 +52,15 @@ const mapLlmToModels: Record< promptTokenLimit: model.promptTokenLimit, })), }, + [LLMs.gemini]: { + icon: GeminiLogo, + getModels: () => + MODELS.filter(({ provider }) => provider === LLMs.gemini).map((model) => ({ + label: model.name, + value: model.model, + promptTokenLimit: model.promptTokenLimit, + })), + }, }; export const useLLMsModels = (): LLMModel[] => { diff --git a/x-pack/plugins/search_playground/public/hooks/use_load_connectors.ts b/x-pack/plugins/search_playground/public/hooks/use_load_connectors.ts index 6e66ece073cc22..94bb2da37b1ed0 100644 --- a/x-pack/plugins/search_playground/public/hooks/use_load_connectors.ts +++ b/x-pack/plugins/search_playground/public/hooks/use_load_connectors.ts @@ -16,6 +16,7 @@ import { OPENAI_CONNECTOR_ID, OpenAiProviderType, BEDROCK_CONNECTOR_ID, + GEMINI_CONNECTOR_ID, } from '@kbn/stack-connectors-plugin/public/common'; import { UserConfiguredActionConnector } from '@kbn/triggers-actions-ui-plugin/public/types'; import { useKibana } from './use_kibana'; @@ -73,6 +74,17 @@ const connectorTypeToLLM: Array<{ type: LLMs.bedrock, }), }, + { + actionId: GEMINI_CONNECTOR_ID, + match: (connector) => connector.actionTypeId === GEMINI_CONNECTOR_ID, + transform: (connector) => ({ + ...connector, + title: i18n.translate('xpack.searchPlayground.geminiConnectorTitle', { + defaultMessage: 'Gemini', + }), + type: LLMs.gemini, + }), + }, ]; type PlaygroundConnector = ActionConnector & { title: string; type: LLMs }; diff --git a/x-pack/plugins/search_playground/server/lib/conversational_chain.test.ts b/x-pack/plugins/search_playground/server/lib/conversational_chain.test.ts index fa6ee8e6e1abdd..5885802428d5e9 100644 --- a/x-pack/plugins/search_playground/server/lib/conversational_chain.test.ts +++ b/x-pack/plugins/search_playground/server/lib/conversational_chain.test.ts @@ -97,6 +97,7 @@ describe('conversational chain', () => { inputTokensLimit: modelLimit, }, prompt: 'you are a QA bot {question} {chat_history} {context}', + questionRewritePrompt: 'rewrite question {question} using {chat_history}"', }); const stream = await conversationalChain.stream(aiClient, chat); @@ -442,7 +443,7 @@ describe('conversational chain', () => { type: 'retrieved_docs', }, ], - // Even with body_content of 1000, the token count should be below the model limit of 100 + // Even with body_content of 1000, the token count should be below or equal to model limit of 100 expectedTokens: [ { type: 'context_token_count', count: 70 }, { type: 'prompt_token_count', count: 97 }, diff --git a/x-pack/plugins/search_playground/server/lib/conversational_chain.ts b/x-pack/plugins/search_playground/server/lib/conversational_chain.ts index 96756848797df9..0a8f26efca163c 100644 --- a/x-pack/plugins/search_playground/server/lib/conversational_chain.ts +++ b/x-pack/plugins/search_playground/server/lib/conversational_chain.ts @@ -37,6 +37,7 @@ interface RAGOptions { interface ConversationalChainOptions { model: BaseLanguageModel; prompt: string; + questionRewritePrompt: string; rag?: RAGOptions; } @@ -46,16 +47,6 @@ interface ContextInputs { question: string; } -const CONDENSE_QUESTION_TEMPLATE = `Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question, in its original language. Be verbose in your answer. - -Chat History: -{chat_history} - -Follow Up Input: {question} -Standalone question:`; - -const condenseQuestionPrompt = PromptTemplate.fromTemplate(CONDENSE_QUESTION_TEMPLATE); - const formatVercelMessages = (chatHistory: VercelChatMessage[]) => { const formattedDialogueTurns = chatHistory.map((message) => { if (message.role === 'user') { @@ -160,11 +151,21 @@ class ConversationalChainFn { retrievalChain = retriever.pipe(buildContext); } - let standaloneQuestionChain: Runnable = RunnableLambda.from((input) => input.question); + let standaloneQuestionChain: Runnable = RunnableLambda.from((input) => { + return input.question; + }); if (previousMessages.length > 0) { + const questionRewritePromptTemplate = PromptTemplate.fromTemplate( + this.options.questionRewritePrompt + ); standaloneQuestionChain = RunnableSequence.from([ - condenseQuestionPrompt, + { + context: () => '', + chat_history: (input) => input.chat_history, + question: (input) => input.question, + }, + questionRewritePromptTemplate, this.options.model, new StringOutputParser(), ]).withConfig({ diff --git a/x-pack/plugins/search_playground/server/lib/get_chat_params.test.ts b/x-pack/plugins/search_playground/server/lib/get_chat_params.test.ts index b05ac4a75c0adf..cbc696a50085e4 100644 --- a/x-pack/plugins/search_playground/server/lib/get_chat_params.test.ts +++ b/x-pack/plugins/search_playground/server/lib/get_chat_params.test.ts @@ -6,12 +6,13 @@ */ import { getChatParams } from './get_chat_params'; -import { ActionsClientChatOpenAI, ActionsClientLlm } from '@kbn/langchain/server'; +import { ActionsClientChatOpenAI, ActionsClientSimpleChatModel } from '@kbn/langchain/server'; import { OPENAI_CONNECTOR_ID, BEDROCK_CONNECTOR_ID, + GEMINI_CONNECTOR_ID, } from '@kbn/stack-connectors-plugin/public/common'; -import { Prompt } from '../../common/prompt'; +import { Prompt, QuestionRewritePrompt } from '../../common/prompt'; import { KibanaRequest, Logger } from '@kbn/core/server'; import { PluginStartContract as ActionsPluginStartContract } from '@kbn/actions-plugin/server'; @@ -20,12 +21,13 @@ jest.mock('@kbn/langchain/server', () => { return { ...original, ActionsClientChatOpenAI: jest.fn(), - ActionsClientLlm: jest.fn(), + ActionsClientSimpleChatModel: jest.fn(), }; }); jest.mock('../../common/prompt', () => ({ Prompt: jest.fn((instructions) => instructions), + QuestionRewritePrompt: jest.fn((instructions) => instructions), })); jest.mock('uuid', () => ({ @@ -64,10 +66,45 @@ describe('getChatParams', () => { context: true, type: 'openai', }); + expect(QuestionRewritePrompt).toHaveBeenCalledWith({ + type: 'openai', + }); expect(ActionsClientChatOpenAI).toHaveBeenCalledWith(expect.anything()); expect(result.chatPrompt).toContain('Hello, world!'); }); + it('returns the correct chat model and prompt for Gemeni', async () => { + mockActionsClient.get.mockResolvedValue({ id: '1', actionTypeId: GEMINI_CONNECTOR_ID }); + + const result = await getChatParams( + { + connectorId: '1', + model: 'gemini-1.5-pro', + prompt: 'Hello, world!', + citations: true, + }, + { actions, request, logger } + ); + expect(Prompt).toHaveBeenCalledWith('Hello, world!', { + citations: true, + context: true, + type: 'gemini', + }); + expect(QuestionRewritePrompt).toHaveBeenCalledWith({ + type: 'gemini', + }); + expect(ActionsClientSimpleChatModel).toHaveBeenCalledWith({ + temperature: 0, + llmType: 'gemini', + logger: expect.anything(), + model: 'gemini-1.5-pro', + connectorId: '1', + actionsClient: expect.anything(), + streaming: true, + }); + expect(result.chatPrompt).toContain('Hello, world!'); + }); + it('returns the correct chat model and prompt for BEDROCK_CONNECTOR_ID', async () => { mockActionsClient.get.mockResolvedValue({ id: '2', actionTypeId: BEDROCK_CONNECTOR_ID }); @@ -86,14 +123,17 @@ describe('getChatParams', () => { context: true, type: 'anthropic', }); - expect(ActionsClientLlm).toHaveBeenCalledWith({ + expect(QuestionRewritePrompt).toHaveBeenCalledWith({ + type: 'anthropic', + }); + expect(ActionsClientSimpleChatModel).toHaveBeenCalledWith({ temperature: 0, llmType: 'bedrock', - traceId: 'test-uuid', logger: expect.anything(), model: 'custom-model', connectorId: '2', actionsClient: expect.anything(), + streaming: true, }); expect(result.chatPrompt).toContain('How does it work?'); }); diff --git a/x-pack/plugins/search_playground/server/lib/get_chat_params.ts b/x-pack/plugins/search_playground/server/lib/get_chat_params.ts index 9740988c3e1e25..d2c4bb1afaa9db 100644 --- a/x-pack/plugins/search_playground/server/lib/get_chat_params.ts +++ b/x-pack/plugins/search_playground/server/lib/get_chat_params.ts @@ -14,10 +14,11 @@ import { BaseLanguageModel } from '@langchain/core/language_models/base'; import type { Connector } from '@kbn/actions-plugin/server/application/connector/types'; import { ActionsClientChatOpenAI, - ActionsClientLlm, + ActionsClientSimpleChatModel, getDefaultArguments, } from '@kbn/langchain/server'; -import { Prompt } from '../../common/prompt'; +import { GEMINI_CONNECTOR_ID } from '@kbn/stack-connectors-plugin/common/gemini/constants'; +import { Prompt, QuestionRewritePrompt } from '../../common/prompt'; export const getChatParams = async ( { @@ -35,13 +36,20 @@ export const getChatParams = async ( logger: Logger; request: KibanaRequest; } -): Promise<{ chatModel: BaseLanguageModel; chatPrompt: string; connector: Connector }> => { +): Promise<{ + chatModel: BaseLanguageModel; + chatPrompt: string; + questionRewritePrompt: string; + connector: Connector; +}> => { const abortController = new AbortController(); const abortSignal = abortController.signal; const actionsClient = await actions.getActionsClientWithRequest(request); const connector = await actionsClient.get({ id: connectorId }); let chatModel; let chatPrompt; + let questionRewritePrompt; + let llmType; switch (connector.actionTypeId) { case OPENAI_CONNECTOR_ID: @@ -62,31 +70,57 @@ export const getChatParams = async ( context: true, type: 'openai', }); + questionRewritePrompt = QuestionRewritePrompt({ + type: 'openai', + }); break; case BEDROCK_CONNECTOR_ID: - const llmType = 'bedrock'; - chatModel = new ActionsClientLlm({ + llmType = 'bedrock'; + chatModel = new ActionsClientSimpleChatModel({ actionsClient, logger, connectorId, model, - traceId: uuidv4(), llmType, temperature: getDefaultArguments(llmType).temperature, + streaming: true, }); chatPrompt = Prompt(prompt, { citations, context: true, type: 'anthropic', }); + questionRewritePrompt = QuestionRewritePrompt({ + type: 'anthropic', + }); + break; + case GEMINI_CONNECTOR_ID: + llmType = 'gemini'; + chatModel = new ActionsClientSimpleChatModel({ + actionsClient, + logger, + connectorId, + model, + llmType, + temperature: getDefaultArguments(llmType).temperature, + streaming: true, + }); + chatPrompt = Prompt(prompt, { + citations, + context: true, + type: 'gemini', + }); + questionRewritePrompt = QuestionRewritePrompt({ + type: 'gemini', + }); break; default: break; } - if (!chatModel || !chatPrompt) { + if (!chatModel || !chatPrompt || !questionRewritePrompt) { throw new Error('Invalid connector id'); } - return { chatModel, chatPrompt, connector }; + return { chatModel, chatPrompt, questionRewritePrompt, connector }; }; diff --git a/x-pack/plugins/search_playground/server/routes.ts b/x-pack/plugins/search_playground/server/routes.ts index 8421122f72e6f0..de26776816f337 100644 --- a/x-pack/plugins/search_playground/server/routes.ts +++ b/x-pack/plugins/search_playground/server/routes.ts @@ -27,7 +27,7 @@ import { MODELS } from '../common/models'; export function createRetriever(esQuery: string) { return (question: string) => { try { - const replacedQuery = esQuery.replace(/{query}/g, question.replace(/"/g, '\\"')); + const replacedQuery = esQuery.replace(/\"{query}\"/g, JSON.stringify(question)); const query = JSON.parse(replacedQuery); return query; } catch (e) { @@ -96,7 +96,7 @@ export function defineRoutes({ es_client: client.asCurrentUser, } as AssistClientOptionsWithClient); const { messages, data } = await request.body; - const { chatModel, chatPrompt, connector } = await getChatParams( + const { chatModel, chatPrompt, questionRewritePrompt, connector } = await getChatParams( { connectorId: data.connector_id, model: data.summarization_model, @@ -133,6 +133,7 @@ export function defineRoutes({ inputTokensLimit: modelPromptLimit, }, prompt: chatPrompt, + questionRewritePrompt, }); let stream: ReadableStream; diff --git a/x-pack/plugins/stack_connectors/public/common/index.ts b/x-pack/plugins/stack_connectors/public/common/index.ts index 51c434f7416c71..f4ef0e02d6c375 100644 --- a/x-pack/plugins/stack_connectors/public/common/index.ts +++ b/x-pack/plugins/stack_connectors/public/common/index.ts @@ -7,9 +7,13 @@ import OpenAILogo from '../connector_types/openai/logo'; import BedrockLogo from '../connector_types/bedrock/logo'; +import GeminiLogo from '../connector_types/bedrock/logo'; + +export { GEMINI_CONNECTOR_ID } from '../../common/gemini/constants'; export { OPENAI_CONNECTOR_ID, OpenAiProviderType } from '../../common/openai/constants'; export { OpenAILogo }; +export { GeminiLogo }; import SentinelOneLogo from '../connector_types/sentinelone/logo'; diff --git a/x-pack/plugins/stack_connectors/server/connector_types/gemini/gemini.ts b/x-pack/plugins/stack_connectors/server/connector_types/gemini/gemini.ts index 323b13d3b768e3..31ec65bca08596 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/gemini/gemini.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/gemini/gemini.ts @@ -11,9 +11,8 @@ import { PassThrough } from 'stream'; import { IncomingMessage } from 'http'; import { SubActionRequestParams } from '@kbn/actions-plugin/server/sub_action_framework/types'; import { getGoogleOAuthJwtAccessToken } from '@kbn/actions-plugin/server/lib/get_gcp_oauth_access_token'; -import { Logger } from '@kbn/core/server'; import { ConnectorTokenClientContract } from '@kbn/actions-plugin/server/types'; -import { ActionsConfigurationUtilities } from '@kbn/actions-plugin/server/actions_config'; + import { RunActionParamsSchema, RunApiResponseSchema, @@ -39,16 +38,6 @@ import { DEFAULT_TOKEN_LIMIT, } from '../../../common/gemini/constants'; import { DashboardActionParamsSchema } from '../../../common/gemini/schema'; - -export interface GetAxiosInstanceOpts { - connectorId: string; - logger: Logger; - credentials: string; - snServiceUrl: string; - connectorTokenClient: ConnectorTokenClientContract; - configurationUtilities: ActionsConfigurationUtilities; -} - /** Interfaces to define Gemini model response type */ interface MessagePart { diff --git a/x-pack/plugins/stack_connectors/server/connector_types/gemini/index.ts b/x-pack/plugins/stack_connectors/server/connector_types/gemini/index.ts index 6859cb82e672c1..91cfbaf1151ea9 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/gemini/index.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/gemini/index.ts @@ -10,7 +10,10 @@ import { SubActionConnectorType, ValidatorType, } from '@kbn/actions-plugin/server/sub_action_framework/types'; -import { GenerativeAIForSecurityConnectorFeatureId } from '@kbn/actions-plugin/common'; +import { + GenerativeAIForSearchPlaygroundConnectorFeatureId, + GenerativeAIForSecurityConnectorFeatureId, +} from '@kbn/actions-plugin/common'; import { urlAllowListValidator } from '@kbn/actions-plugin/server'; import { ValidatorServices } from '@kbn/actions-plugin/server/types'; import { assertURL } from '@kbn/actions-plugin/server/sub_action_framework/helpers/validators'; @@ -29,7 +32,10 @@ export const getConnectorType = (): SubActionConnectorType => ( secrets: SecretsSchema, }, validators: [{ type: ValidatorType.CONFIG, validator: configValidator }], - supportedFeatureIds: [GenerativeAIForSecurityConnectorFeatureId], + supportedFeatureIds: [ + GenerativeAIForSecurityConnectorFeatureId, + GenerativeAIForSearchPlaygroundConnectorFeatureId, + ], minimumLicenseRequired: 'enterprise' as const, renderParameterTemplates, }); From f99f83428c1a4cd909a42a86e47600a41fa45381 Mon Sep 17 00:00:00 2001 From: Umberto Pepato Date: Mon, 8 Jul 2024 19:23:49 +0200 Subject: [PATCH 020/103] [ResponseOps][Alerts] Implement platform alerts grouping components (#184635) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Adds solution-agnostic components to create hierarchical alerts grouping UIs, adapting the original implementation from Security Solution. Closes #184398 ## To Verify For existing usages of the `@kbn/grouping` package: verify that the grouped UIs work correctly (Security Alerts, Cloud Security Posture). New alerting UI components: checkout https://github.com/elastic/kibana/pull/183114 (PoC PR), where the updated `@kbn/grouping` package and these new components are used in Observability's main Alerts page. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Gerard Soldevila Co-authored-by: Vadim Kibana <82822460+vadimkibana@users.noreply.github.com> Co-authored-by: Alex Szabo Co-authored-by: Tre --- .github/CODEOWNERS | 1 + .i18nrc.json | 1 + package.json | 1 + packages/kbn-alerts-grouping/README.md | 3 + packages/kbn-alerts-grouping/index.ts | 11 + packages/kbn-alerts-grouping/jest.config.js | 14 + packages/kbn-alerts-grouping/kibana.jsonc | 5 + packages/kbn-alerts-grouping/package.json | 6 + .../setup_tests.ts} | 0 .../src/components/alerts_grouping.test.tsx | 495 ++++++ .../src/components/alerts_grouping.tsx | 285 ++++ .../components/alerts_grouping_level.test.tsx | 121 ++ .../src/components/alerts_grouping_level.tsx | 173 +++ .../src/constants.ts} | 6 +- .../src/contexts/alerts_grouping_context.tsx | 76 + packages/kbn-alerts-grouping/src/index.ts | 11 + .../src/mocks/grouping_props.mock.tsx | 59 + .../src/mocks/grouping_query.mock.ts | 1382 +++++++++++++++++ packages/kbn-alerts-grouping/src/types.ts | 98 ++ packages/kbn-alerts-grouping/tsconfig.json | 28 + packages/kbn-alerts-ui-shared/index.ts | 3 +- .../src/alerts_search_bar/constants.ts | 3 +- .../src/alerts_search_bar/index.tsx | 4 +- .../apis/fetch_aad_fields.ts | 0 .../apis/fetch_alert_fields.ts | 0 .../apis/fetch_alert_index_names.ts | 0 .../src/common/constants.ts | 3 + .../src/common/hooks/index.ts | 3 + .../hooks/use_alert_data_view.ts | 2 + .../src/common/hooks/use_find_alerts_query.ts | 56 + .../hooks/use_rule_aad_fields.ts | 0 packages/kbn-alerts-ui-shared/tsconfig.json | 1 + packages/kbn-grouping/index.tsx | 4 +- packages/kbn-grouping/jest.config.js | 2 +- .../index.ts => kbn-grouping/setup_tests.ts} | 5 +- .../accordion_panel/group_stats.test.tsx | 23 +- .../accordion_panel/group_stats.tsx | 107 +- .../src/components/accordion_panel/index.tsx | 6 +- .../src/components/grouping.test.tsx | 2 +- .../kbn-grouping/src/components/grouping.tsx | 18 +- .../kbn-grouping/src/components/styles.tsx | 3 - packages/kbn-grouping/src/components/types.ts | 8 +- .../kbn-grouping/src/hooks/use_grouping.tsx | 2 +- tsconfig.base.json | 2 + .../cloud_security_grouping.tsx | 7 - .../use_cloud_security_grouping.ts | 8 +- .../latest_findings_container.tsx | 4 +- .../latest_findings_group_renderer.tsx | 38 +- .../use_latest_findings_grouping.tsx | 8 +- .../use_latest_vulnerabilities_grouping.tsx | 8 +- .../latest_vulnerabilities_container.tsx | 4 +- .../latest_vulnerabilities_group_renderer.tsx | 26 +- x-pack/plugins/rule_registry/common/types.ts | 17 + .../server/alert_data_client/alerts_client.ts | 12 +- .../get_alerts_group_aggregations.test.ts | 2 +- .../rule_registry/server/routes/find.ts | 6 +- .../alerts_table/alerts_grouping.tsx | 2 +- .../alerts_table/alerts_sub_grouping.tsx | 2 +- .../grouping_settings/group_stats.tsx | 4 +- yarn.lock | 4 + 60 files changed, 3023 insertions(+), 162 deletions(-) create mode 100644 packages/kbn-alerts-grouping/README.md create mode 100644 packages/kbn-alerts-grouping/index.ts create mode 100644 packages/kbn-alerts-grouping/jest.config.js create mode 100644 packages/kbn-alerts-grouping/kibana.jsonc create mode 100644 packages/kbn-alerts-grouping/package.json rename packages/{kbn-grouping/setup_test.ts => kbn-alerts-grouping/setup_tests.ts} (100%) create mode 100644 packages/kbn-alerts-grouping/src/components/alerts_grouping.test.tsx create mode 100644 packages/kbn-alerts-grouping/src/components/alerts_grouping.tsx create mode 100644 packages/kbn-alerts-grouping/src/components/alerts_grouping_level.test.tsx create mode 100644 packages/kbn-alerts-grouping/src/components/alerts_grouping_level.tsx rename packages/{kbn-alerts-ui-shared/src/alerts_search_bar/apis/index.ts => kbn-alerts-grouping/src/constants.ts} (75%) create mode 100644 packages/kbn-alerts-grouping/src/contexts/alerts_grouping_context.tsx create mode 100644 packages/kbn-alerts-grouping/src/index.ts create mode 100644 packages/kbn-alerts-grouping/src/mocks/grouping_props.mock.tsx create mode 100644 packages/kbn-alerts-grouping/src/mocks/grouping_query.mock.ts create mode 100644 packages/kbn-alerts-grouping/src/types.ts create mode 100644 packages/kbn-alerts-grouping/tsconfig.json rename packages/kbn-alerts-ui-shared/src/{alerts_search_bar => common}/apis/fetch_aad_fields.ts (100%) rename packages/kbn-alerts-ui-shared/src/{alerts_search_bar => common}/apis/fetch_alert_fields.ts (100%) rename packages/kbn-alerts-ui-shared/src/{alerts_search_bar => common}/apis/fetch_alert_index_names.ts (100%) rename packages/kbn-alerts-ui-shared/src/{alerts_search_bar => common}/hooks/use_alert_data_view.ts (98%) create mode 100644 packages/kbn-alerts-ui-shared/src/common/hooks/use_find_alerts_query.ts rename packages/kbn-alerts-ui-shared/src/{alerts_search_bar => common}/hooks/use_rule_aad_fields.ts (100%) rename packages/{kbn-alerts-ui-shared/src/alerts_search_bar/hooks/index.ts => kbn-grouping/setup_tests.ts} (78%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2dd7f2a8c6aeea..0be536182eabd7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -28,6 +28,7 @@ x-pack/plugins/alerting @elastic/response-ops x-pack/packages/kbn-alerting-state-types @elastic/response-ops packages/kbn-alerting-types @elastic/response-ops packages/kbn-alerts-as-data-utils @elastic/response-ops +packages/kbn-alerts-grouping @elastic/response-ops x-pack/test/alerting_api_integration/common/plugins/alerts_restricted @elastic/response-ops packages/kbn-alerts-ui-shared @elastic/response-ops packages/kbn-ambient-common-types @elastic/kibana-operations diff --git a/.i18nrc.json b/.i18nrc.json index 0053dc5d2ad51f..63adc5c5aae2bf 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -59,6 +59,7 @@ "flot": "packages/kbn-flot-charts/lib", "generateCsv": "packages/kbn-generate-csv", "grouping": "packages/kbn-grouping/src", + "alertsGrouping": "packages/kbn-alerts-grouping", "guidedOnboarding": "src/plugins/guided_onboarding", "guidedOnboardingPackage": "packages/kbn-guided-onboarding", "home": "src/plugins/home", diff --git a/package.json b/package.json index c86e3062dd2ea9..8b21bc2735362c 100644 --- a/package.json +++ b/package.json @@ -163,6 +163,7 @@ "@kbn/alerting-state-types": "link:x-pack/packages/kbn-alerting-state-types", "@kbn/alerting-types": "link:packages/kbn-alerting-types", "@kbn/alerts-as-data-utils": "link:packages/kbn-alerts-as-data-utils", + "@kbn/alerts-grouping": "link:packages/kbn-alerts-grouping", "@kbn/alerts-restricted-fixtures-plugin": "link:x-pack/test/alerting_api_integration/common/plugins/alerts_restricted", "@kbn/alerts-ui-shared": "link:packages/kbn-alerts-ui-shared", "@kbn/analytics": "link:packages/kbn-analytics", diff --git a/packages/kbn-alerts-grouping/README.md b/packages/kbn-alerts-grouping/README.md new file mode 100644 index 00000000000000..65629e708fc991 --- /dev/null +++ b/packages/kbn-alerts-grouping/README.md @@ -0,0 +1,3 @@ +# @kbn/alerts-grouping + +Platform components to create hierarchical alerts grouping UIs diff --git a/packages/kbn-alerts-grouping/index.ts b/packages/kbn-alerts-grouping/index.ts new file mode 100644 index 00000000000000..e9e2476dde7a76 --- /dev/null +++ b/packages/kbn-alerts-grouping/index.ts @@ -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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { AlertsGrouping } from './src/components/alerts_grouping'; +export { type AlertsGroupingProps } from './src/types'; +export { useAlertsGroupingState } from './src/contexts/alerts_grouping_context'; diff --git a/packages/kbn-alerts-grouping/jest.config.js b/packages/kbn-alerts-grouping/jest.config.js new file mode 100644 index 00000000000000..540837079010f7 --- /dev/null +++ b/packages/kbn-alerts-grouping/jest.config.js @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../..', + roots: ['/packages/kbn-alerts-grouping'], + setupFilesAfterEnv: ['/packages/kbn-alerts-grouping/setup_tests.ts'], +}; diff --git a/packages/kbn-alerts-grouping/kibana.jsonc b/packages/kbn-alerts-grouping/kibana.jsonc new file mode 100644 index 00000000000000..b98a1f0779eb31 --- /dev/null +++ b/packages/kbn-alerts-grouping/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-browser", + "id": "@kbn/alerts-grouping", + "owner": "@elastic/response-ops" +} diff --git a/packages/kbn-alerts-grouping/package.json b/packages/kbn-alerts-grouping/package.json new file mode 100644 index 00000000000000..9f490fbb2ec101 --- /dev/null +++ b/packages/kbn-alerts-grouping/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/alerts-grouping", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} \ No newline at end of file diff --git a/packages/kbn-grouping/setup_test.ts b/packages/kbn-alerts-grouping/setup_tests.ts similarity index 100% rename from packages/kbn-grouping/setup_test.ts rename to packages/kbn-alerts-grouping/setup_tests.ts diff --git a/packages/kbn-alerts-grouping/src/components/alerts_grouping.test.tsx b/packages/kbn-alerts-grouping/src/components/alerts_grouping.test.tsx new file mode 100644 index 00000000000000..c60ef03ca35e57 --- /dev/null +++ b/packages/kbn-alerts-grouping/src/components/alerts_grouping.test.tsx @@ -0,0 +1,495 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * Adapted from x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_grouping.test.tsx + */ +import React from 'react'; +import { render, within, screen, waitFor } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import type { Filter } from '@kbn/es-query'; + +import { AlertsGrouping } from './alerts_grouping'; + +import { useGetAlertsGroupAggregationsQuery } from '@kbn/alerts-ui-shared'; +import useResizeObserver from 'use-resize-observer/polyfilled'; +import { groupingSearchResponse } from '../mocks/grouping_query.mock'; +import { useAlertsGroupingState } from '../contexts/alerts_grouping_context'; +import { I18nProvider } from '@kbn/i18n-react'; +import { + mockFeatureIds, + mockDate, + mockGroupingProps, + mockGroupingId, + mockOptions, +} from '../mocks/grouping_props.mock'; + +jest.mock('@kbn/alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query', () => ({ + useGetAlertsGroupAggregationsQuery: jest.fn(), +})); + +jest.mock('@kbn/alerts-ui-shared/src/common/hooks/use_alert_data_view', () => ({ + useAlertDataView: jest.fn().mockReturnValue({ dataViews: [{ fields: [] }] }), +})); + +jest.mock('../contexts/alerts_grouping_context', () => { + const original = jest.requireActual('../contexts/alerts_grouping_context'); + return { + ...original, + useAlertsGroupingState: jest.fn(), + }; +}); + +const mockUseAlertsGroupingState = useAlertsGroupingState as jest.Mock; + +jest.mock('uuid', () => ({ + v4: jest.fn().mockReturnValue('test-uuid'), +})); + +const mockUseGetAlertsGroupAggregationsQuery = useGetAlertsGroupAggregationsQuery as jest.Mock; + +const mockUseResizeObserver: jest.Mock = useResizeObserver as jest.Mock; +jest.mock('use-resize-observer/polyfilled'); +mockUseResizeObserver.mockImplementation(() => ({})); + +const renderChildComponent = (_groupingFilters: Filter[]) =>

; + +const getMockStorageState = (groups: string[] = ['none']) => + JSON.stringify({ + [mockGroupingId]: { + activeGroups: groups, + options: mockOptions, + }, + }); + +const mockQueryResponse = { + loading: false, + data: { + aggregations: { + groupsCount: { + value: 0, + }, + }, + }, +}; + +const TestProviders = ({ children }: { children: React.ReactNode }) => ( + {children} +); + +const mockAlertsGroupingState = { + grouping: { + options: mockOptions, + activeGroups: ['kibana.alert.rule.name'], + }, + updateGrouping: jest.fn(), +}; + +describe('AlertsGrouping', () => { + beforeEach(() => { + window.localStorage.clear(); + mockUseGetAlertsGroupAggregationsQuery.mockImplementation(() => ({ + loading: false, + data: groupingSearchResponse, + })); + mockUseAlertsGroupingState.mockReturnValue(mockAlertsGroupingState); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + it('renders empty grouping table when group is selected without data', () => { + mockUseGetAlertsGroupAggregationsQuery.mockReturnValue(mockQueryResponse); + window.localStorage.setItem( + `grouping-table-${mockGroupingId}`, + getMockStorageState(['kibana.alert.rule.name']) + ); + + render( + + {renderChildComponent} + + ); + expect(screen.queryByTestId('alerts-table')).not.toBeInTheDocument(); + expect(screen.getByTestId('empty-results-panel')).toBeInTheDocument(); + }); + + it('renders grouping table in first accordion level when single group is selected', () => { + render( + + {renderChildComponent} + + ); + + userEvent.click( + within(screen.getByTestId('level-0-group-0')).getByTestId('group-panel-toggle') + ); + expect( + within(screen.getByTestId('level-0-group-0')).getByTestId('alerts-table') + ).toBeInTheDocument(); + }); + + it('Query gets passed correctly', () => { + render( + + {renderChildComponent} + + ); + expect(mockUseGetAlertsGroupAggregationsQuery).toHaveBeenLastCalledWith( + expect.objectContaining({ + params: { + aggregations: {}, + featureIds: mockFeatureIds, + groupByField: 'kibana.alert.rule.name', + filters: [ + { + bool: { + filter: [], + must: [], + must_not: [], + should: [], + }, + }, + { + range: { + '@timestamp': { + gte: mockDate.from, + lte: mockDate.to, + }, + }, + }, + ], + pageIndex: 0, + pageSize: 25, + }, + }) + ); + }); + + it('renders grouping table in second accordion level when 2 groups are selected', () => { + mockUseAlertsGroupingState.mockReturnValue({ + ...mockAlertsGroupingState, + grouping: { + ...mockAlertsGroupingState.grouping, + activeGroups: ['kibana.alert.rule.name', 'user.name'], + }, + }); + render( + + {renderChildComponent} + + ); + userEvent.click( + within(screen.getByTestId('level-0-group-0')).getByTestId('group-panel-toggle') + ); + expect( + within(screen.getByTestId('level-0-group-0')).queryByTestId('alerts-table') + ).not.toBeInTheDocument(); + userEvent.click( + within(screen.getByTestId('level-1-group-0')).getByTestId('group-panel-toggle') + ); + expect( + within(screen.getByTestId('level-1-group-0')).getByTestId('alerts-table') + ).toBeInTheDocument(); + }); + + it('resets all levels pagination when selected group changes', async () => { + mockUseAlertsGroupingState.mockReturnValue({ + ...mockAlertsGroupingState, + grouping: { + ...mockAlertsGroupingState.grouping, + activeGroups: ['kibana.alert.rule.name', 'host.name', 'user.name'], + }, + }); + render( + + {renderChildComponent} + + ); + + userEvent.click(screen.getByTestId('pagination-button-1')); + userEvent.click( + within(screen.getByTestId('level-0-group-0')).getByTestId('group-panel-toggle') + ); + + userEvent.click( + within(screen.getByTestId('level-0-group-0')).getByTestId('pagination-button-1') + ); + userEvent.click( + within(screen.getByTestId('level-1-group-0')).getByTestId('group-panel-toggle') + ); + + userEvent.click( + within(screen.getByTestId('level-1-group-0')).getByTestId('pagination-button-1') + ); + + [ + screen.getByTestId('grouping-level-0-pagination'), + screen.getByTestId('grouping-level-1-pagination'), + screen.getByTestId('grouping-level-2-pagination'), + ].forEach((pagination) => { + expect( + within(pagination).getByTestId('pagination-button-0').getAttribute('aria-current') + ).toEqual(null); + expect( + within(pagination).getByTestId('pagination-button-1').getAttribute('aria-current') + ).toEqual('true'); + }); + + userEvent.click(screen.getAllByTestId('group-selector-dropdown')[0]); + // Wait for element to have pointer events enabled + await waitFor(() => userEvent.click(screen.getAllByTestId('panel-user.name')[0])); + + [ + screen.getByTestId('grouping-level-0-pagination'), + screen.getByTestId('grouping-level-1-pagination'), + // level 2 has been removed with the group selection change + ].forEach((pagination) => { + expect( + within(pagination).getByTestId('pagination-button-0').getAttribute('aria-current') + ).toEqual('true'); + expect( + within(pagination).getByTestId('pagination-button-1').getAttribute('aria-current') + ).toEqual(null); + }); + }); + + it('resets all levels pagination when global query updates', () => { + mockUseAlertsGroupingState.mockReturnValue({ + ...mockAlertsGroupingState, + grouping: { + ...mockAlertsGroupingState.grouping, + activeGroups: ['kibana.alert.rule.name', 'host.name', 'user.name'], + }, + }); + + const { rerender } = render( + + {renderChildComponent} + + ); + + userEvent.click(screen.getByTestId('pagination-button-1')); + userEvent.click( + within(screen.getByTestId('level-0-group-0')).getByTestId('group-panel-toggle') + ); + userEvent.click( + within(screen.getByTestId('level-0-group-0')).getByTestId('pagination-button-1') + ); + userEvent.click( + within(screen.getByTestId('level-1-group-0')).getByTestId('group-panel-toggle') + ); + userEvent.click( + within(screen.getByTestId('level-1-group-0')).getByTestId('pagination-button-1') + ); + + rerender( + + + {renderChildComponent} + + + ); + + [ + screen.getByTestId('grouping-level-0-pagination'), + screen.getByTestId('grouping-level-1-pagination'), + screen.getByTestId('grouping-level-2-pagination'), + ].forEach((pagination) => { + expect( + within(pagination).getByTestId('pagination-button-0').getAttribute('aria-current') + ).toEqual('true'); + expect( + within(pagination).getByTestId('pagination-button-1').getAttribute('aria-current') + ).toEqual(null); + }); + }); + + it('resets only most inner group pagination when its parent groups open/close', () => { + mockUseAlertsGroupingState.mockReturnValue({ + ...mockAlertsGroupingState, + grouping: { + ...mockAlertsGroupingState.grouping, + activeGroups: ['kibana.alert.rule.name', 'host.name', 'user.name'], + }, + }); + + render( + + {renderChildComponent} + + ); + + // set level 0 page to 2 + userEvent.click(screen.getByTestId('pagination-button-1')); + userEvent.click( + within(screen.getByTestId('level-0-group-0')).getByTestId('group-panel-toggle') + ); + + // set level 1 page to 2 + userEvent.click( + within(screen.getByTestId('level-0-group-0')).getByTestId('pagination-button-1') + ); + userEvent.click( + within(screen.getByTestId('level-1-group-0')).getByTestId('group-panel-toggle') + ); + + // set level 2 page to 2 + userEvent.click( + within(screen.getByTestId('level-1-group-0')).getByTestId('pagination-button-1') + ); + userEvent.click( + within(screen.getByTestId('level-2-group-0')).getByTestId('group-panel-toggle') + ); + + // open different level 1 group + + // level 0, 1 pagination is the same + userEvent.click( + within(screen.getByTestId('level-1-group-1')).getByTestId('group-panel-toggle') + ); + [ + screen.getByTestId('grouping-level-0-pagination'), + screen.getByTestId('grouping-level-1-pagination'), + ].forEach((pagination) => { + expect( + within(pagination).getByTestId('pagination-button-0').getAttribute('aria-current') + ).toEqual(null); + expect( + within(pagination).getByTestId('pagination-button-1').getAttribute('aria-current') + ).toEqual('true'); + }); + + // level 2 pagination is reset + expect( + within(screen.getByTestId('grouping-level-2-pagination')) + .getByTestId('pagination-button-0') + .getAttribute('aria-current') + ).toEqual('true'); + expect( + within(screen.getByTestId('grouping-level-2-pagination')) + .getByTestId('pagination-button-1') + .getAttribute('aria-current') + ).toEqual(null); + }); + + it(`resets innermost level's current page when that level's page size updates`, async () => { + mockUseAlertsGroupingState.mockReturnValue({ + ...mockAlertsGroupingState, + grouping: { + ...mockAlertsGroupingState.grouping, + activeGroups: ['kibana.alert.rule.name', 'host.name', 'user.name'], + }, + }); + + render( + + {renderChildComponent} + + ); + + userEvent.click(await screen.findByTestId('pagination-button-1')); + userEvent.click( + within(await screen.findByTestId('level-0-group-0')).getByTestId('group-panel-toggle') + ); + userEvent.click( + within(await screen.findByTestId('level-0-group-0')).getByTestId('pagination-button-1') + ); + userEvent.click( + within(await screen.findByTestId('level-1-group-0')).getByTestId('group-panel-toggle') + ); + + userEvent.click( + within(await screen.findByTestId('level-1-group-0')).getByTestId('pagination-button-1') + ); + userEvent.click( + within(await screen.findByTestId('grouping-level-2')).getByTestId( + 'tablePaginationPopoverButton' + ) + ); + userEvent.click(await screen.findByTestId('tablePagination-100-rows')); + + [ + await screen.findByTestId('grouping-level-0-pagination'), + await screen.findByTestId('grouping-level-1-pagination'), + await screen.findByTestId('grouping-level-2-pagination'), + ].forEach((pagination, i) => { + if (i !== 2) { + expect( + within(pagination).getByTestId('pagination-button-0').getAttribute('aria-current') + ).toEqual(null); + expect( + within(pagination).getByTestId('pagination-button-1').getAttribute('aria-current') + ).toEqual('true'); + } else { + expect( + within(pagination).getByTestId('pagination-button-0').getAttribute('aria-current') + ).toEqual('true'); + expect(within(pagination).queryByTestId('pagination-button-1')).not.toBeInTheDocument(); + } + }); + }); + + it(`resets outermost level's current page when that level's page size updates`, async () => { + mockUseAlertsGroupingState.mockReturnValue({ + ...mockAlertsGroupingState, + grouping: { + ...mockAlertsGroupingState.grouping, + activeGroups: ['kibana.alert.rule.name', 'host.name', 'user.name'], + }, + }); + + render( + + {renderChildComponent} + + ); + + userEvent.click(screen.getByTestId('pagination-button-1')); + userEvent.click( + within(await screen.findByTestId('level-0-group-0')).getByTestId('group-panel-toggle') + ); + + userEvent.click( + within(await screen.findByTestId('level-0-group-0')).getByTestId('pagination-button-1') + ); + userEvent.click( + within(await screen.findByTestId('level-1-group-0')).getByTestId('group-panel-toggle') + ); + + userEvent.click( + within(await screen.findByTestId('level-1-group-0')).getByTestId('pagination-button-1') + ); + const tablePaginations = await screen.findAllByTestId('tablePaginationPopoverButton'); + userEvent.click(tablePaginations[tablePaginations.length - 1]); + await waitFor(() => userEvent.click(screen.getByTestId('tablePagination-100-rows'))); + + [ + screen.getByTestId('grouping-level-0-pagination'), + screen.getByTestId('grouping-level-1-pagination'), + screen.getByTestId('grouping-level-2-pagination'), + ].forEach((pagination, i) => { + if (i !== 0) { + expect( + within(pagination).getByTestId('pagination-button-0').getAttribute('aria-current') + ).toEqual(null); + expect( + within(pagination).getByTestId('pagination-button-1').getAttribute('aria-current') + ).toEqual('true'); + } else { + expect( + within(pagination).getByTestId('pagination-button-0').getAttribute('aria-current') + ).toEqual('true'); + expect(within(pagination).queryByTestId('pagination-button-1')).not.toBeInTheDocument(); + } + }); + }); +}); diff --git a/packages/kbn-alerts-grouping/src/components/alerts_grouping.tsx b/packages/kbn-alerts-grouping/src/components/alerts_grouping.tsx new file mode 100644 index 00000000000000..130997dd393ce6 --- /dev/null +++ b/packages/kbn-alerts-grouping/src/components/alerts_grouping.tsx @@ -0,0 +1,285 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { + Dispatch, + memo, + SetStateAction, + useCallback, + useEffect, + useMemo, + useRef, + useState, +} from 'react'; +import type { Filter } from '@kbn/es-query'; +import { isNoneGroup, useGrouping } from '@kbn/grouping'; +import { isEqual } from 'lodash/fp'; +import { i18n } from '@kbn/i18n'; +import { useAlertDataView } from '@kbn/alerts-ui-shared'; +import useLocalStorage from 'react-use/lib/useLocalStorage'; +import { AlertsGroupingLevel, AlertsGroupingLevelProps } from './alerts_grouping_level'; +import { AlertsGroupingProps } from '../types'; +import { + AlertsGroupingContextProvider, + useAlertsGroupingState, +} from '../contexts/alerts_grouping_context'; +import { DEFAULT_PAGE_INDEX, DEFAULT_PAGE_SIZE, MAX_GROUPING_LEVELS } from '../constants'; + +/** + * Handles recursive rendering of grouping levels + */ +const NextLevel = ({ + level, + selectedGroups, + children, + parentGroupingFilter, + groupingFilters, + getLevel, +}: Pick & { + level: number; + selectedGroups: string[]; + groupingFilters: Filter[]; + getLevel: (level: number, selectedGroup: string, parentGroupingFilter?: Filter[]) => JSX.Element; +}): JSX.Element => { + const nextGroupingFilters = useMemo( + () => [...groupingFilters, ...(parentGroupingFilter ?? [])], + [groupingFilters, parentGroupingFilter] + ); + if (level < selectedGroups.length - 1) { + return getLevel(level + 1, selectedGroups[level + 1], nextGroupingFilters)!; + } + return children(nextGroupingFilters)!; +}; + +const AlertsGroupingInternal = (props: AlertsGroupingProps) => { + const { + groupingId, + services, + featureIds, + defaultGroupingOptions, + defaultFilters, + globalFilters, + globalQuery, + renderGroupPanel, + getGroupStats, + children, + } = props; + const { dataViews, notifications, http } = services; + const { grouping, updateGrouping } = useAlertsGroupingState(groupingId); + + const { dataViews: alertDataViews } = useAlertDataView({ + featureIds, + dataViewsService: dataViews, + http, + toasts: notifications.toasts, + }); + const dataView = useMemo(() => alertDataViews?.[0], [alertDataViews]); + const [pageSize, setPageSize] = useLocalStorage( + `grouping-table-${groupingId}`, + Array(MAX_GROUPING_LEVELS).fill(DEFAULT_PAGE_SIZE) + ) as [number[], Dispatch>, () => void]; + + const onOptionsChange = useCallback( + (options) => { + // useGrouping > useAlertsGroupingState options sync + // the available grouping options change when the user selects + // a new field not in the default ones + updateGrouping({ + options, + }); + }, + [updateGrouping] + ); + + const { getGrouping, selectedGroups, setSelectedGroups } = useGrouping({ + componentProps: { + groupPanelRenderer: renderGroupPanel, + getGroupStats, + unit: (totalCount) => + i18n.translate('alertsGrouping.unit', { + values: { totalCount }, + defaultMessage: `{totalCount, plural, =1 {alert} other {alerts}}`, + }), + }, + defaultGroupingOptions, + fields: dataView?.fields ?? [], + groupingId, + maxGroupingLevels: MAX_GROUPING_LEVELS, + onOptionsChange, + }); + + useEffect(() => { + // The `none` grouping is managed from the internal selector state + if (isNoneGroup(selectedGroups)) { + // Set active groups from selected groups + updateGrouping({ + activeGroups: selectedGroups, + }); + } + }, [selectedGroups, updateGrouping]); + + useEffect(() => { + if (!isNoneGroup(grouping.activeGroups)) { + // Set selected groups from active groups + setSelectedGroups(grouping.activeGroups); + } + }, [grouping.activeGroups, setSelectedGroups]); + + const [pageIndex, setPageIndex] = useState( + Array(MAX_GROUPING_LEVELS).fill(DEFAULT_PAGE_INDEX) + ); + + const resetAllPagination = useCallback(() => { + setPageIndex((curr) => curr.map(() => DEFAULT_PAGE_INDEX)); + }, []); + + const setPageVar = useCallback( + (newNumber: number, groupingLevel: number, pageType: 'index' | 'size') => { + if (pageType === 'index') { + setPageIndex((currentIndex) => { + const newArr = [...currentIndex]; + newArr[groupingLevel] = newNumber; + return newArr; + }); + } + + if (pageType === 'size') { + setPageSize((currentIndex) => { + const newArr = [...currentIndex]; + newArr[groupingLevel] = newNumber; + return newArr; + }); + // set page index to 0 when page size is changed + setPageIndex((currentIndex) => { + const newArr = [...currentIndex]; + newArr[groupingLevel] = 0; + return newArr; + }); + } + }, + [setPageSize] + ); + + const paginationResetTriggers = useRef({ + defaultFilters, + globalFilters, + globalQuery, + selectedGroups, + }); + + useEffect(() => { + const triggers = { + defaultFilters, + globalFilters, + globalQuery, + selectedGroups, + }; + if (!isEqual(paginationResetTriggers.current, triggers)) { + resetAllPagination(); + paginationResetTriggers.current = triggers; + } + }, [defaultFilters, globalFilters, globalQuery, resetAllPagination, selectedGroups]); + + const getLevel = useCallback( + (level: number, selectedGroup: string, parentGroupingFilter?: Filter[]) => { + const resetGroupChildrenPagination = (parentLevel: number) => { + setPageIndex((allPages) => { + const resetPages = allPages.splice(parentLevel + 1, allPages.length); + return [...allPages, ...resetPages.map(() => DEFAULT_PAGE_INDEX)]; + }); + }; + + return ( + resetGroupChildrenPagination(level)} + pageIndex={pageIndex[level] ?? DEFAULT_PAGE_INDEX} + pageSize={pageSize[level] ?? DEFAULT_PAGE_SIZE} + parentGroupingFilter={parentGroupingFilter} + selectedGroup={selectedGroup} + setPageIndex={(newIndex: number) => setPageVar(newIndex, level, 'index')} + setPageSize={(newSize: number) => setPageVar(newSize, level, 'size')} + > + {(groupingFilters) => ( + + {children} + + )} + + ); + }, + [children, getGrouping, pageIndex, pageSize, props, selectedGroups, setPageVar] + ); + + if (!dataView) { + return null; + } + + return getLevel(0, selectedGroups[0]); +}; + +/** + * A coordinator component to show multiple alert tables grouped by one or more fields + * + * @example Basic grouping + * ```ts + * const { + * notifications, + * dataViews, + * http, + * } = useKibana().services; + * + * + * return ( + * + * {(groupingFilters) => { + * const query = buildEsQuery({ + * filters: groupingFilters, + * }); + * return ( + * + * ); + * }} + * + * ); + * ``` + */ +export const AlertsGrouping = memo((props: AlertsGroupingProps) => { + return ( + + + + ); +}); diff --git a/packages/kbn-alerts-grouping/src/components/alerts_grouping_level.test.tsx b/packages/kbn-alerts-grouping/src/components/alerts_grouping_level.test.tsx new file mode 100644 index 00000000000000..45424f34d9cb4b --- /dev/null +++ b/packages/kbn-alerts-grouping/src/components/alerts_grouping_level.test.tsx @@ -0,0 +1,121 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { render, waitFor } from '@testing-library/react'; +import { AlertsGroupingLevel, type AlertsGroupingLevelProps } from './alerts_grouping_level'; +import { useGetAlertsGroupAggregationsQuery } from '@kbn/alerts-ui-shared'; +import * as buildEsQueryModule from '@kbn/es-query/src/es_query/build_es_query'; +import { mockGroupingProps } from '../mocks/grouping_props.mock'; +import { groupingSearchResponse } from '../mocks/grouping_query.mock'; + +jest.mock('@kbn/alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query', () => ({ + useGetAlertsGroupAggregationsQuery: jest.fn(), +})); + +const mockUseGetAlertsGroupAggregationsQuery = useGetAlertsGroupAggregationsQuery as jest.Mock; +mockUseGetAlertsGroupAggregationsQuery.mockReturnValue({ + loading: false, + data: groupingSearchResponse, +}); + +jest.mock('@kbn/alerts-ui-shared/src/common/hooks/use_alert_data_view', () => ({ + useAlertDataView: jest.fn().mockReturnValue({ dataViews: [{ fields: [] }] }), +})); + +jest.mock('../contexts/alerts_grouping_context', () => { + const original = jest.requireActual('../contexts/alerts_grouping_context'); + return { + ...original, + useAlertsGroupingState: jest.fn(), + }; +}); + +const getGrouping = jest + .fn() + .mockImplementation(({ renderChildComponent }) => {renderChildComponent()}); + +const mockGroupingLevelProps: Omit = { + ...mockGroupingProps, + getGrouping, + onGroupClose: jest.fn(), + pageIndex: 0, + pageSize: 10, + selectedGroup: 'selectedGroup', + setPageIndex: jest.fn(), + setPageSize: jest.fn(), +}; + +describe('AlertsGroupingLevel', () => { + let buildEsQuerySpy: jest.SpyInstance; + + beforeAll(() => { + buildEsQuerySpy = jest.spyOn(buildEsQueryModule, 'buildEsQuery'); + }); + + it('should render', () => { + const { getByTestId } = render( + + {() => } + + ); + expect(getByTestId('grouping-level')).toBeInTheDocument(); + }); + + it('should account for global, default and parent filters', async () => { + const globalFilter = { meta: { value: 'global', disabled: false } }; + const defaultFilter = { meta: { value: 'default' } }; + const parentFilter = { meta: { value: 'parent' } }; + render( + + {() => } + + ); + await waitFor(() => + expect(buildEsQuerySpy).toHaveBeenLastCalledWith(undefined, expect.anything(), [ + globalFilter, + defaultFilter, + parentFilter, + ]) + ); + }); + + it('should discard disabled global filters', async () => { + const globalFilters = [ + { meta: { value: 'global1', disabled: false } }, + { meta: { value: 'global2', disabled: true } }, + ]; + render( + + {() => } + + ); + await waitFor(() => + expect(buildEsQuerySpy).toHaveBeenLastCalledWith(undefined, expect.anything(), [ + globalFilters[0], + ]) + ); + }); + + it('should call getGrouping with the right aggregations', () => { + render( + + {() => } + + ); + + expect(Object.keys(getGrouping.mock.calls[0][0].data)).toMatchObject( + Object.keys(groupingSearchResponse.aggregations) + ); + }); +}); diff --git a/packages/kbn-alerts-grouping/src/components/alerts_grouping_level.tsx b/packages/kbn-alerts-grouping/src/components/alerts_grouping_level.tsx new file mode 100644 index 00000000000000..e4511e8dea774e --- /dev/null +++ b/packages/kbn-alerts-grouping/src/components/alerts_grouping_level.tsx @@ -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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { memo, ReactElement, useMemo } from 'react'; +import { v4 as uuidv4 } from 'uuid'; +import type { Filter } from '@kbn/es-query'; +import { buildEsQuery } from '@kbn/es-query'; +import { type GroupingAggregation } from '@kbn/grouping'; +import { isNoneGroup } from '@kbn/grouping'; +import type { DynamicGroupingProps } from '@kbn/grouping/src'; +import { parseGroupingQuery } from '@kbn/grouping/src'; +import { + useGetAlertsGroupAggregationsQuery, + UseGetAlertsGroupAggregationsQueryProps, +} from '@kbn/alerts-ui-shared'; +import { AlertsGroupingProps } from '../types'; + +export interface AlertsGroupingLevelProps = {}> + extends AlertsGroupingProps { + getGrouping: ( + props: Omit, 'groupSelector' | 'pagination'> + ) => ReactElement; + groupingLevel?: number; + onGroupClose: () => void; + pageIndex: number; + pageSize: number; + parentGroupingFilter?: Filter[]; + selectedGroup: string; + setPageIndex: (newIndex: number) => void; + setPageSize: (newSize: number) => void; +} + +const DEFAULT_FILTERS: Filter[] = []; + +/** + * Renders an alerts grouping level + */ +export const AlertsGroupingLevel = memo( + = {}>({ + featureIds, + defaultFilters = DEFAULT_FILTERS, + from, + getGrouping, + globalFilters, + globalQuery, + groupingLevel, + loading = false, + onGroupClose, + pageIndex, + pageSize, + parentGroupingFilter, + children, + selectedGroup, + setPageIndex, + setPageSize, + to, + takeActionItems, + getAggregationsByGroupingField, + services: { http, notifications }, + }: AlertsGroupingLevelProps) => { + const filters = useMemo(() => { + try { + return [ + buildEsQuery(undefined, globalQuery != null ? [globalQuery] : [], [ + ...(globalFilters?.filter((f) => f.meta.disabled === false) ?? []), + ...(defaultFilters ?? []), + ...(parentGroupingFilter ?? []), + ]), + ]; + } catch (e) { + return []; + } + }, [defaultFilters, globalFilters, globalQuery, parentGroupingFilter]); + + // Create a unique, but stable (across re-renders) value + const uniqueValue = useMemo(() => `alerts-grouping-level-${uuidv4()}`, []); + + const aggregationsQuery = useMemo(() => { + return { + featureIds, + groupByField: selectedGroup, + aggregations: getAggregationsByGroupingField(selectedGroup)?.reduce( + (acc, val) => Object.assign(acc, val), + {} + ), + filters: [ + ...filters, + { + range: { + '@timestamp': { + gte: from, + lte: to, + }, + }, + }, + ], + pageIndex, + pageSize, + }; + }, [ + featureIds, + filters, + from, + getAggregationsByGroupingField, + pageIndex, + pageSize, + selectedGroup, + to, + ]); + + const { data: alertGroupsData, isLoading: isLoadingGroups } = + useGetAlertsGroupAggregationsQuery>({ + http, + toasts: notifications.toasts, + enabled: aggregationsQuery && !isNoneGroup([selectedGroup]), + params: aggregationsQuery, + }); + + const queriedGroup = useMemo( + () => (!isNoneGroup([selectedGroup]) ? selectedGroup : null), + [selectedGroup] + ); + + const aggs = useMemo( + // queriedGroup because `selectedGroup` updates before the query response + () => + parseGroupingQuery( + // fallback to selectedGroup if queriedGroup.current is null, this happens in tests + queriedGroup === null ? selectedGroup : queriedGroup, + uniqueValue, + alertGroupsData?.aggregations + ), + [alertGroupsData?.aggregations, queriedGroup, selectedGroup, uniqueValue] + ); + + return useMemo( + () => + getGrouping({ + activePage: pageIndex, + data: aggs, + groupingLevel, + isLoading: loading || isLoadingGroups, + itemsPerPage: pageSize, + onChangeGroupsItemsPerPage: (size: number) => setPageSize(size), + onChangeGroupsPage: (index) => setPageIndex(index), + onGroupClose, + renderChildComponent: children, + selectedGroup, + takeActionItems, + }), + [ + getGrouping, + pageIndex, + aggs, + groupingLevel, + loading, + isLoadingGroups, + pageSize, + onGroupClose, + children, + selectedGroup, + takeActionItems, + setPageSize, + setPageIndex, + ] + ); + } +); diff --git a/packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/index.ts b/packages/kbn-alerts-grouping/src/constants.ts similarity index 75% rename from packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/index.ts rename to packages/kbn-alerts-grouping/src/constants.ts index 4f4cae09d5d3a4..d42678e64520c4 100644 --- a/packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/index.ts +++ b/packages/kbn-alerts-grouping/src/constants.ts @@ -6,6 +6,6 @@ * Side Public License, v 1. */ -export * from './fetch_aad_fields'; -export * from './fetch_alert_fields'; -export * from './fetch_alert_index_names'; +export const DEFAULT_PAGE_SIZE = 25; +export const DEFAULT_PAGE_INDEX = 0; +export const MAX_GROUPING_LEVELS = 3; diff --git a/packages/kbn-alerts-grouping/src/contexts/alerts_grouping_context.tsx b/packages/kbn-alerts-grouping/src/contexts/alerts_grouping_context.tsx new file mode 100644 index 00000000000000..cc5e06e652cd46 --- /dev/null +++ b/packages/kbn-alerts-grouping/src/contexts/alerts_grouping_context.tsx @@ -0,0 +1,76 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { + createContext, + Dispatch, + PropsWithChildren, + SetStateAction, + useCallback, + useContext, + useMemo, + useState, +} from 'react'; +import { AlertsGroupingState, GroupModel } from '../types'; + +const initialActiveGroups = ['none']; + +export const AlertsGroupingContext = createContext({ + groupingState: {} as AlertsGroupingState, + setGroupingState: (() => {}) as Dispatch>, +}); + +export const AlertsGroupingContextProvider = ({ children }: PropsWithChildren<{}>) => { + const [groupingState, setGroupingState] = useState({}); + return ( + ({ groupingState, setGroupingState }), + [groupingState, setGroupingState] + )} + > + {children} + + ); +}; + +export const useAlertsGroupingState = (groupingId: string) => { + const { groupingState, setGroupingState } = useContext(AlertsGroupingContext); + const updateGrouping = useCallback( + (groupModel: Partial | null) => { + if (groupModel === null) { + setGroupingState((prevState) => { + const newState = { ...prevState }; + delete newState[groupingId]; + return newState; + }); + return; + } + setGroupingState((prevState) => ({ + ...prevState, + [groupingId]: { + // @ts-expect-error options might not be defined + options: [], + // @ts-expect-error activeGroups might not be defined + activeGroups: initialActiveGroups, + ...prevState[groupingId], + ...groupModel, + }, + })); + }, + [setGroupingState, groupingId] + ); + const grouping = useMemo( + () => groupingState[groupingId] ?? { activeGroups: ['none'] }, + [groupingState, groupingId] + ); + return { + grouping, + updateGrouping, + }; +}; diff --git a/packages/kbn-alerts-grouping/src/index.ts b/packages/kbn-alerts-grouping/src/index.ts new file mode 100644 index 00000000000000..db8b9dc84f8f60 --- /dev/null +++ b/packages/kbn-alerts-grouping/src/index.ts @@ -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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './components/alerts_grouping'; +export * from './contexts/alerts_grouping_context'; +export * from './types'; diff --git a/packages/kbn-alerts-grouping/src/mocks/grouping_props.mock.tsx b/packages/kbn-alerts-grouping/src/mocks/grouping_props.mock.tsx new file mode 100644 index 00000000000000..ac8e55bfb02225 --- /dev/null +++ b/packages/kbn-alerts-grouping/src/mocks/grouping_props.mock.tsx @@ -0,0 +1,59 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { AlertConsumers } from '@kbn/rule-data-utils'; +import { AlertsGroupingProps } from '../types'; + +export const mockGroupingId = 'test'; + +export const mockFeatureIds = [AlertConsumers.STACK_ALERTS]; + +export const mockDate = { + from: '2020-07-07T08:20:18.966Z', + to: '2020-07-08T08:20:18.966Z', +}; + +export const mockOptions = [ + { label: 'ruleName', key: 'kibana.alert.rule.name' }, + { label: 'userName', key: 'user.name' }, + { label: 'hostName', key: 'host.name' }, + { label: 'sourceIP', key: 'source.ip' }, +]; + +export const mockGroupingProps: Omit = { + ...mockDate, + groupingId: mockGroupingId, + featureIds: mockFeatureIds, + defaultGroupingOptions: mockOptions, + getAggregationsByGroupingField: () => [], + getGroupStats: () => [{ title: 'Stat', component: }], + renderGroupPanel: () => , + takeActionItems: undefined, + defaultFilters: [], + globalFilters: [], + globalQuery: { + query: 'query', + language: 'language', + }, + loading: false, + services: { + dataViews: { + clearInstanceCache: jest.fn(), + create: jest.fn(), + } as unknown as AlertsGroupingProps['services']['dataViews'], + http: { + get: jest.fn(), + } as unknown as AlertsGroupingProps['services']['http'], + notifications: { + toasts: { + addDanger: jest.fn(), + }, + } as unknown as AlertsGroupingProps['services']['notifications'], + }, +}; diff --git a/packages/kbn-alerts-grouping/src/mocks/grouping_query.mock.ts b/packages/kbn-alerts-grouping/src/mocks/grouping_query.mock.ts new file mode 100644 index 00000000000000..3cdf07ec8c31f7 --- /dev/null +++ b/packages/kbn-alerts-grouping/src/mocks/grouping_query.mock.ts @@ -0,0 +1,1382 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export const getQuery = ({ + selectedGroup, + uniqueValue, + timeRange, + featureIds, +}: { + selectedGroup: string; + uniqueValue: string; + timeRange: { from: string; to: string }; + featureIds: string[]; +}) => ({ + _source: false, + aggs: { + unitsCount: { + value_count: { + field: 'groupByField', + }, + }, + groupsCount: { + cardinality: { + field: 'groupByField', + }, + }, + groupByFields: { + aggs: { + bucket_truncate: { + bucket_sort: { + from: 0, + size: 25, + sort: [ + { + unitsCount: { + order: 'desc', + }, + }, + ], + }, + }, + }, + terms: { + field: 'groupByField', + size: 10000, + }, + }, + }, + feature_ids: featureIds, + query: { + bool: { + filter: [ + { bool: { filter: [], must: [], must_not: [], should: [] } }, + { + range: { + '@timestamp': { + gte: timeRange.from, + lte: timeRange.to, + }, + }, + }, + ], + }, + }, + runtime_mappings: { + groupByField: { + type: 'keyword', + script: { + source: + "if (doc[params['selectedGroup']].size()==0) { emit(params['uniqueValue']) } else { emit(doc[params['selectedGroup']].join(params['uniqueValue']))}", + params: { + selectedGroup, + uniqueValue, + }, + }, + }, + }, + size: 0, +}); + +export const groupingSearchResponse = { + hits: { + total: { + value: 6048, + relation: 'eq', + }, + max_score: null, + hits: [], + }, + aggregations: { + groupsCount: { + value: 32, + }, + groupByFields: { + buckets: [ + { + key: ['critical hosts [Duplicate]'], + key_as_string: 'critical hosts [Duplicate]', + doc_count: 300, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 300, + }, + { + key: 'rule', + doc_count: 300, + }, + ], + }, + unitsCount: { + value: 300, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'critical', + doc_count: 300, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['critical hosts [Duplicate] [Duplicate]'], + key_as_string: 'critical hosts [Duplicate] [Duplicate]', + doc_count: 300, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 300, + }, + { + key: 'rule', + doc_count: 300, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 300, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'critical', + doc_count: 300, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['high hosts [Duplicate]'], + key_as_string: 'high hosts [Duplicate]', + doc_count: 300, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 300, + }, + { + key: 'rule', + doc_count: 300, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 300, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'high', + doc_count: 300, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['high hosts [Duplicate] [Duplicate]'], + key_as_string: 'high hosts [Duplicate] [Duplicate]', + doc_count: 300, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 300, + }, + { + key: 'rule', + doc_count: 300, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 300, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'high', + doc_count: 300, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['low hosts [Duplicate]'], + key_as_string: 'low hosts [Duplicate]', + doc_count: 300, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 300, + }, + { + key: 'rule', + doc_count: 300, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 300, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'low', + doc_count: 300, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['low hosts [Duplicate] [Duplicate]'], + key_as_string: 'low hosts [Duplicate] [Duplicate]', + doc_count: 300, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 300, + }, + { + key: 'rule', + doc_count: 300, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 300, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'low', + doc_count: 300, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['medium hosts [Duplicate]'], + key_as_string: 'medium hosts [Duplicate]', + doc_count: 300, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 300, + }, + { + key: 'rule', + doc_count: 300, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 300, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'medium', + doc_count: 300, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['medium hosts [Duplicate] [Duplicate]'], + key_as_string: 'medium hosts [Duplicate] [Duplicate]', + doc_count: 300, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 300, + }, + { + key: 'rule', + doc_count: 300, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 300, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'medium', + doc_count: 300, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['critical users [Duplicate]'], + key_as_string: 'critical users [Duplicate]', + doc_count: 273, + hostsCountAggregation: { + value: 10, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 273, + }, + { + key: 'rule', + doc_count: 273, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 273, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'critical', + doc_count: 273, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 91, + }, + }, + { + key: ['critical users [Duplicate] [Duplicate]'], + key_as_string: 'critical users [Duplicate] [Duplicate]', + doc_count: 273, + hostsCountAggregation: { + value: 10, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 273, + }, + { + key: 'rule', + doc_count: 273, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 273, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'critical', + doc_count: 273, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 91, + }, + }, + { + key: ['high users [Duplicate]'], + key_as_string: 'high users [Duplicate]', + doc_count: 273, + hostsCountAggregation: { + value: 10, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 273, + }, + { + key: 'rule', + doc_count: 273, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 273, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'high', + doc_count: 273, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 91, + }, + }, + { + key: ['high users [Duplicate] [Duplicate]'], + key_as_string: 'high users [Duplicate] [Duplicate]', + doc_count: 273, + hostsCountAggregation: { + value: 10, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 273, + }, + { + key: 'rule', + doc_count: 273, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 273, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'high', + doc_count: 273, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 91, + }, + }, + { + key: ['low users [Duplicate]'], + key_as_string: 'low users [Duplicate]', + doc_count: 273, + hostsCountAggregation: { + value: 10, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 273, + }, + { + key: 'rule', + doc_count: 273, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 273, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'low', + doc_count: 273, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 91, + }, + }, + { + key: ['low users [Duplicate] [Duplicate]'], + key_as_string: 'low users [Duplicate] [Duplicate]', + doc_count: 273, + hostsCountAggregation: { + value: 10, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 273, + }, + { + key: 'rule', + doc_count: 273, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 273, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'low', + doc_count: 273, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 91, + }, + }, + { + key: ['medium users [Duplicate]'], + key_as_string: 'medium users [Duplicate]', + doc_count: 273, + hostsCountAggregation: { + value: 10, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 273, + }, + { + key: 'rule', + doc_count: 273, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 273, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'medium', + doc_count: 273, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 91, + }, + }, + { + key: ['medium users [Duplicate] [Duplicate]'], + key_as_string: 'medium users [Duplicate] [Duplicate]', + doc_count: 273, + hostsCountAggregation: { + value: 10, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 273, + }, + { + key: 'rule', + doc_count: 273, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 273, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'medium', + doc_count: 273, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 91, + }, + }, + { + key: ['critical hosts'], + key_as_string: 'critical hosts', + doc_count: 100, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 100, + }, + { + key: 'rule', + doc_count: 100, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 100, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'critical', + doc_count: 100, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['critical hosts [Duplicate] [Duplicate] [Duplicate]'], + key_as_string: 'critical hosts [Duplicate] [Duplicate] [Duplicate]', + doc_count: 100, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 100, + }, + { + key: 'rule', + doc_count: 100, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 100, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'critical', + doc_count: 100, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['high hosts'], + key_as_string: 'high hosts', + doc_count: 100, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 100, + }, + { + key: 'rule', + doc_count: 100, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 100, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'high', + doc_count: 100, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['high hosts [Duplicate] [Duplicate] [Duplicate]'], + key_as_string: 'high hosts [Duplicate] [Duplicate] [Duplicate]', + doc_count: 100, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 100, + }, + { + key: 'rule', + doc_count: 100, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 100, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'high', + doc_count: 100, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['low hosts '], + key_as_string: 'low hosts ', + doc_count: 100, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 100, + }, + { + key: 'rule', + doc_count: 100, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 100, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'low', + doc_count: 100, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['low hosts [Duplicate] [Duplicate] [Duplicate]'], + key_as_string: 'low hosts [Duplicate] [Duplicate] [Duplicate]', + doc_count: 100, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 100, + }, + { + key: 'rule', + doc_count: 100, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 100, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'low', + doc_count: 100, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['medium hosts'], + key_as_string: 'medium hosts', + doc_count: 100, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 100, + }, + { + key: 'rule', + doc_count: 100, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 100, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'medium', + doc_count: 100, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['medium hosts [Duplicate] [Duplicate] [Duplicate]'], + key_as_string: 'medium hosts [Duplicate] [Duplicate] [Duplicate]', + doc_count: 100, + hostsCountAggregation: { + value: 30, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 100, + }, + { + key: 'rule', + doc_count: 100, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 100, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'medium', + doc_count: 100, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 0, + }, + }, + { + key: ['critical users [Duplicate] [Duplicate] [Duplicate]'], + key_as_string: 'critical users [Duplicate] [Duplicate] [Duplicate]', + doc_count: 91, + hostsCountAggregation: { + value: 10, + }, + ruleTags: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'cool', + doc_count: 91, + }, + { + key: 'rule', + doc_count: 91, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 91, + }, + severitiesSubAggregation: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'critical', + doc_count: 91, + }, + ], + }, + countSeveritySubAggregation: { + value: 1, + }, + usersCountAggregation: { + value: 91, + }, + }, + ], + }, + description: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'f', + doc_count: 1, + }, + ], + }, + unitsCount: { + value: 6048, + }, + }, +}; diff --git a/packages/kbn-alerts-grouping/src/types.ts b/packages/kbn-alerts-grouping/src/types.ts new file mode 100644 index 00000000000000..8d226bb74e71f1 --- /dev/null +++ b/packages/kbn-alerts-grouping/src/types.ts @@ -0,0 +1,98 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { Filter, Query } from '@kbn/es-query'; +import { ValidFeatureId } from '@kbn/rule-data-utils'; +import type { NotificationsStart } from '@kbn/core-notifications-browser'; +import type { DataViewsServicePublic } from '@kbn/data-views-plugin/public/types'; +import type { HttpSetup } from '@kbn/core-http-browser'; +import { + GroupingProps, + GroupOption, + GroupPanelRenderer, + GetGroupStats, + NamedAggregation, +} from '@kbn/grouping/src'; +import { ReactElement } from 'react'; + +export interface GroupModel { + activeGroups: string[]; + options: Array<{ key: string; label: string }>; +} + +export interface AlertsGroupingState { + [groupingId: string]: GroupModel; +} + +export interface AlertsGroupingProps = {}> { + /** + * The leaf component that will be rendered in the grouping panels + */ + children: (groupingFilters: Filter[]) => ReactElement; + /** + * Render function for the group panel header + */ + renderGroupPanel?: GroupPanelRenderer; + /** + * A function that given the current grouping field and aggregation results, returns an array of + * stat items to be rendered in the group panel + */ + getGroupStats?: GetGroupStats; + /** + * Default search filters + */ + defaultFilters?: Filter[]; + /** + * Global search filters + */ + globalFilters: Filter[]; + /** + * Items that will be rendered in the `Take Actions` menu + */ + takeActionItems?: GroupingProps['takeActionItems']; + /** + * The default fields available for grouping + */ + defaultGroupingOptions: GroupOption[]; + /** + * The alerting feature ids this grouping covers + */ + featureIds: ValidFeatureId[]; + /** + * Time filter start + */ + from: string; + /** + * Time filter end + */ + to: string; + /** + * Global search query (i.e. from the KQL bar) + */ + globalQuery: Query; + /** + * External loading state + */ + loading?: boolean; + /** + * ID used to retrieve the current grouping configuration from the state + */ + groupingId: string; + /** + * Resolves an array of aggregations for a given grouping field + */ + getAggregationsByGroupingField: (field: string) => NamedAggregation[]; + /** + * Services required for the grouping component + */ + services: { + notifications: NotificationsStart; + dataViews: DataViewsServicePublic; + http: HttpSetup; + }; +} diff --git a/packages/kbn-alerts-grouping/tsconfig.json b/packages/kbn-alerts-grouping/tsconfig.json new file mode 100644 index 00000000000000..04b795b97c8902 --- /dev/null +++ b/packages/kbn-alerts-grouping/tsconfig.json @@ -0,0 +1,28 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/es-query", + "@kbn/grouping", + "@kbn/i18n", + "@kbn/alerts-ui-shared", + "@kbn/rule-data-utils", + "@kbn/core-notifications-browser", + "@kbn/data-views-plugin", + "@kbn/core-http-browser", + "@kbn/i18n-react", + ] +} diff --git a/packages/kbn-alerts-ui-shared/index.ts b/packages/kbn-alerts-ui-shared/index.ts index a93fbd476165b1..8fbffe5926ad8b 100644 --- a/packages/kbn-alerts-ui-shared/index.ts +++ b/packages/kbn-alerts-ui-shared/index.ts @@ -11,8 +11,7 @@ export type { AlertLifecycleStatusBadgeProps } from './src/alert_lifecycle_statu export { MaintenanceWindowCallout } from './src/maintenance_window_callout'; export { AddMessageVariables } from './src/add_message_variables'; -export * from './src/alerts_search_bar/hooks'; -export * from './src/alerts_search_bar/apis'; +export * from './src/common/hooks'; export { AlertsSearchBar } from './src/alerts_search_bar'; export type { AlertsSearchBarProps } from './src/alerts_search_bar/types'; diff --git a/packages/kbn-alerts-ui-shared/src/alerts_search_bar/constants.ts b/packages/kbn-alerts-ui-shared/src/alerts_search_bar/constants.ts index c81588af58bf93..1d8e3b72708b52 100644 --- a/packages/kbn-alerts-ui-shared/src/alerts_search_bar/constants.ts +++ b/packages/kbn-alerts-ui-shared/src/alerts_search_bar/constants.ts @@ -6,8 +6,7 @@ * Side Public License, v 1. */ -import type { DataView, DataViewField } from '@kbn/data-views-plugin/common'; +import type { DataView } from '@kbn/data-views-plugin/common'; export const NO_INDEX_PATTERNS: DataView[] = []; -export const EMPTY_AAD_FIELDS: DataViewField[] = []; export * from '../common/constants'; diff --git a/packages/kbn-alerts-ui-shared/src/alerts_search_bar/index.tsx b/packages/kbn-alerts-ui-shared/src/alerts_search_bar/index.tsx index 13bca396cb401d..9a095200a85062 100644 --- a/packages/kbn-alerts-ui-shared/src/alerts_search_bar/index.tsx +++ b/packages/kbn-alerts-ui-shared/src/alerts_search_bar/index.tsx @@ -13,9 +13,7 @@ import { AlertConsumers } from '@kbn/rule-data-utils'; import { NO_INDEX_PATTERNS } from './constants'; import { SEARCH_BAR_PLACEHOLDER } from './translations'; import type { AlertsSearchBarProps, QueryLanguageType } from './types'; -import { useLoadRuleTypesQuery } from '../common/hooks/use_load_rule_types_query'; -import { useAlertDataView } from './hooks/use_alert_data_view'; -import { useRuleAADFields } from './hooks/use_rule_aad_fields'; +import { useLoadRuleTypesQuery, useAlertDataView, useRuleAADFields } from '../common/hooks'; const SA_ALERTS = { type: 'alerts', fields: {} } as SuggestionsAbstraction; diff --git a/packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_aad_fields.ts b/packages/kbn-alerts-ui-shared/src/common/apis/fetch_aad_fields.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_aad_fields.ts rename to packages/kbn-alerts-ui-shared/src/common/apis/fetch_aad_fields.ts diff --git a/packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_alert_fields.ts b/packages/kbn-alerts-ui-shared/src/common/apis/fetch_alert_fields.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_alert_fields.ts rename to packages/kbn-alerts-ui-shared/src/common/apis/fetch_alert_fields.ts diff --git a/packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_alert_index_names.ts b/packages/kbn-alerts-ui-shared/src/common/apis/fetch_alert_index_names.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_alert_index_names.ts rename to packages/kbn-alerts-ui-shared/src/common/apis/fetch_alert_index_names.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/constants.ts b/packages/kbn-alerts-ui-shared/src/common/constants.ts index fcbf498988a669..ccc59f18d299cd 100644 --- a/packages/kbn-alerts-ui-shared/src/common/constants.ts +++ b/packages/kbn-alerts-ui-shared/src/common/constants.ts @@ -6,8 +6,11 @@ * Side Public License, v 1. */ +import type { DataViewField } from '@kbn/data-views-plugin/common'; + export const ALERTS_FEATURE_ID = 'alerts'; export const BASE_ALERTING_API_PATH = '/api/alerting'; export const INTERNAL_BASE_ALERTING_API_PATH = '/internal/alerting'; export const BASE_RAC_ALERTS_API_PATH = '/internal/rac/alerts'; +export const EMPTY_AAD_FIELDS: DataViewField[] = []; export const BASE_TRIGGERS_ACTIONS_UI_API_PATH = '/internal/triggers_actions_ui'; diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/index.ts b/packages/kbn-alerts-ui-shared/src/common/hooks/index.ts index c0d4c5586b1e27..614b14515f5112 100644 --- a/packages/kbn-alerts-ui-shared/src/common/hooks/index.ts +++ b/packages/kbn-alerts-ui-shared/src/common/hooks/index.ts @@ -6,7 +6,10 @@ * Side Public License, v 1. */ +export * from './use_alert_data_view'; +export * from './use_find_alerts_query'; export * from './use_load_rule_types_query'; +export * from './use_rule_aad_fields'; export * from './use_load_ui_config'; export * from './use_health_check'; export * from './use_load_ui_health'; diff --git a/packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_alert_data_view.ts b/packages/kbn-alerts-ui-shared/src/common/hooks/use_alert_data_view.ts similarity index 98% rename from packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_alert_data_view.ts rename to packages/kbn-alerts-ui-shared/src/common/hooks/use_alert_data_view.ts index 47e1456158826b..8c76671819b25c 100644 --- a/packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_alert_data_view.ts +++ b/packages/kbn-alerts-ui-shared/src/common/hooks/use_alert_data_view.ts @@ -67,6 +67,7 @@ export function useAlertDataView(props: UseAlertDataViewProps): UseAlertDataView queryFn: queryIndexNameFn, onError: onErrorFn, refetchOnWindowFocus: false, + staleTime: 60 * 1000, // To prevent duplicated requests enabled: featureIds.length > 0 && !hasSecurityAndO11yFeatureIds, }); @@ -80,6 +81,7 @@ export function useAlertDataView(props: UseAlertDataViewProps): UseAlertDataView queryFn: queryAlertFieldsFn, onError: onErrorFn, refetchOnWindowFocus: false, + staleTime: 60 * 1000, enabled: hasNoSecuritySolution, }); diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_find_alerts_query.ts b/packages/kbn-alerts-ui-shared/src/common/hooks/use_find_alerts_query.ts new file mode 100644 index 00000000000000..a0d1b68458e042 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/common/hooks/use_find_alerts_query.ts @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { i18n } from '@kbn/i18n'; +import { useQuery } from '@tanstack/react-query'; +import type { HttpStart } from '@kbn/core-http-browser'; +import type { ToastsStart } from '@kbn/core-notifications-browser'; +import { ISearchRequestParams } from '@kbn/search-types'; +import { SearchResponseBody } from '@elastic/elasticsearch/lib/api/types'; +import { BASE_RAC_ALERTS_API_PATH } from '../constants'; + +export interface UseFindAlertsQueryProps { + http: HttpStart; + toasts: ToastsStart; + enabled?: boolean; + params: ISearchRequestParams & { feature_ids?: string[] }; +} + +/** + * A generic hook to find alerts + * + * Still applies alerts authorization rules but, unlike triggers_actions_ui's `useFetchAlerts` hook, + * allows to perform arbitrary queries + */ +export const useFindAlertsQuery = ({ + http, + toasts, + enabled = true, + params, +}: UseFindAlertsQueryProps) => { + const onErrorFn = (error: Error) => { + if (error) { + toasts.addDanger( + i18n.translate('alertsUIShared.hooks.useFindAlertsQuery.unableToFindAlertsQueryMessage', { + defaultMessage: 'Unable to find alerts', + }) + ); + } + }; + + return useQuery({ + queryKey: ['findAlerts', JSON.stringify(params)], + queryFn: () => + http.post>(`${BASE_RAC_ALERTS_API_PATH}/find`, { + body: JSON.stringify(params), + }), + onError: onErrorFn, + refetchOnWindowFocus: false, + enabled, + }); +}; diff --git a/packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_rule_aad_fields.ts b/packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_rule_aad_fields.ts rename to packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts diff --git a/packages/kbn-alerts-ui-shared/tsconfig.json b/packages/kbn-alerts-ui-shared/tsconfig.json index 8edc3ff6eda788..7fe9d16ad314e7 100644 --- a/packages/kbn-alerts-ui-shared/tsconfig.json +++ b/packages/kbn-alerts-ui-shared/tsconfig.json @@ -37,6 +37,7 @@ "@kbn/core-doc-links-browser", "@kbn/charts-plugin", "@kbn/data-plugin", + "@kbn/search-types", "@kbn/utility-types", "@kbn/core-application-browser", "@kbn/react-kibana-mount", diff --git a/packages/kbn-grouping/index.tsx b/packages/kbn-grouping/index.tsx index 1b83c314714b7f..7dd711b72d0154 100644 --- a/packages/kbn-grouping/index.tsx +++ b/packages/kbn-grouping/index.tsx @@ -13,7 +13,7 @@ import type { GroupingAggregation, NamedAggregation, RawBucket, - StatRenderer, + GroupStatsItem, } from './src'; export { getGroupingQuery, isNoneGroup, useGrouping }; @@ -24,5 +24,5 @@ export type { GroupingAggregation, NamedAggregation, RawBucket, - StatRenderer, + GroupStatsItem, }; diff --git a/packages/kbn-grouping/jest.config.js b/packages/kbn-grouping/jest.config.js index d415d4101ad868..80b0183f089c3b 100644 --- a/packages/kbn-grouping/jest.config.js +++ b/packages/kbn-grouping/jest.config.js @@ -22,5 +22,5 @@ module.exports = { '!/packages/kbn-grouping/**/translations', '!/packages/kbn-grouping/**/types/*', ], - setupFilesAfterEnv: ['/packages/kbn-grouping/setup_test.ts'], + setupFilesAfterEnv: ['/packages/kbn-grouping/setup_tests.ts'], }; diff --git a/packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/index.ts b/packages/kbn-grouping/setup_tests.ts similarity index 78% rename from packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/index.ts rename to packages/kbn-grouping/setup_tests.ts index 057b8ad60b9990..bb55d97ec93028 100644 --- a/packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/index.ts +++ b/packages/kbn-grouping/setup_tests.ts @@ -5,6 +5,5 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - -export * from './use_alert_data_view'; -export * from './use_rule_aad_fields'; +// eslint-disable-next-line import/no-extraneous-dependencies +import '@testing-library/jest-dom'; diff --git a/packages/kbn-grouping/src/components/accordion_panel/group_stats.test.tsx b/packages/kbn-grouping/src/components/accordion_panel/group_stats.test.tsx index 8ccc1c912b62de..5960a0a65b2954 100644 --- a/packages/kbn-grouping/src/components/accordion_panel/group_stats.test.tsx +++ b/packages/kbn-grouping/src/components/accordion_panel/group_stats.test.tsx @@ -16,10 +16,10 @@ const testProps = { groupFilter: [], groupNumber: 0, onTakeActionsOpen, - statRenderers: [ + stats: [ { title: 'Severity', - renderer:

, + component:

, }, { title: "IP's:", badge: { value: 1 } }, { title: 'Rules:', badge: { value: 2 } }, @@ -34,11 +34,12 @@ describe('Group stats', () => { beforeEach(() => { jest.clearAllMocks(); }); + it('renders each stat item', () => { const { getByTestId, queryByTestId } = render(); expect(getByTestId('group-stats')).toBeInTheDocument(); - testProps.statRenderers.forEach(({ title: stat, renderer }) => { - if (renderer != null) { + testProps.stats.forEach(({ title: stat, component }) => { + if (component != null) { expect(getByTestId(`customMetric-${stat}`)).toBeInTheDocument(); expect(queryByTestId(`metric-${stat}`)).not.toBeInTheDocument(); } else { @@ -47,6 +48,7 @@ describe('Group stats', () => { } }); }); + it('when onTakeActionsOpen is defined, call onTakeActionsOpen on popover click', () => { const { getByTestId, queryByTestId } = render(); fireEvent.click(getByTestId('take-action-button')); @@ -55,6 +57,7 @@ describe('Group stats', () => { expect(queryByTestId(actionItem)).not.toBeInTheDocument(); }); }); + it('when onTakeActionsOpen is undefined, render take actions dropdown on popover click', () => { const { getByTestId } = render(); fireEvent.click(getByTestId('take-action-button')); @@ -62,4 +65,16 @@ describe('Group stats', () => { expect(getByTestId(actionItem)).toBeInTheDocument(); }); }); + + it('shows the Take Actions menu when action items are provided', () => { + const { queryByTestId } = render( + []} /> + ); + expect(queryByTestId('take-action-button')).toBeInTheDocument(); + }); + + it('hides the Take Actions menu when no action item is provided', () => { + const { queryByTestId } = render( []} />); + expect(queryByTestId('take-action-button')).not.toBeInTheDocument(); + }); }); diff --git a/packages/kbn-grouping/src/components/accordion_panel/group_stats.tsx b/packages/kbn-grouping/src/components/accordion_panel/group_stats.tsx index 61f40982507b85..87e083fa76255f 100644 --- a/packages/kbn-grouping/src/components/accordion_panel/group_stats.tsx +++ b/packages/kbn-grouping/src/components/accordion_panel/group_stats.tsx @@ -15,9 +15,11 @@ import { EuiPopover, EuiToolTip, } from '@elastic/eui'; -import React, { useCallback, useMemo, useState } from 'react'; +import React, { Fragment, useCallback, useMemo, useState } from 'react'; import { Filter } from '@kbn/es-query'; -import { StatRenderer } from '../types'; +import { css } from '@emotion/react'; +import { euiThemeVars } from '@kbn/ui-theme'; +import { GroupStatsItem } from '../types'; import { statsContainerCss } from '../styles'; import { TAKE_ACTION } from '../translations'; @@ -26,38 +28,44 @@ interface GroupStatsProps { groupFilter: Filter[]; groupNumber: number; onTakeActionsOpen?: () => void; - statRenderers?: StatRenderer[]; - takeActionItems: (groupFilters: Filter[], groupNumber: number) => JSX.Element[]; + stats?: GroupStatsItem[]; + takeActionItems?: (groupFilters: Filter[], groupNumber: number) => JSX.Element[]; } +const Separator = () => { + return ( + + ); +}; + const GroupStatsComponent = ({ bucketKey, groupFilter, groupNumber, onTakeActionsOpen, - statRenderers, + stats, takeActionItems: getTakeActionItems, }: GroupStatsProps) => { const [isPopoverOpen, setPopover] = useState(false); - const [takeActionItems, setTakeActionItems] = useState([]); + const takeActionItems = useMemo(() => { + return getTakeActionItems?.(groupFilter, groupNumber) ?? []; + }, [getTakeActionItems, groupFilter, groupNumber]); const onButtonClick = useCallback(() => { - if (!isPopoverOpen && takeActionItems.length === 0) { - setTakeActionItems(getTakeActionItems(groupFilter, groupNumber)); - } return !isPopoverOpen && onTakeActionsOpen ? onTakeActionsOpen() : setPopover(!isPopoverOpen); - }, [ - getTakeActionItems, - groupFilter, - groupNumber, - isPopoverOpen, - onTakeActionsOpen, - takeActionItems.length, - ]); + }, [isPopoverOpen, onTakeActionsOpen]); - const statsComponent = useMemo( + const statsComponents = useMemo( () => - statRenderers?.map((stat) => { + stats?.map((stat) => { const { dataTestSubj, component } = stat.badge != null ? { @@ -73,7 +81,7 @@ const GroupStatsComponent = ({ ), } - : { dataTestSubj: `customMetric-${stat.title}`, component: stat.renderer }; + : { dataTestSubj: `customMetric-${stat.title}`, component: stat.component }; return ( @@ -83,33 +91,34 @@ const GroupStatsComponent = ({ ); - }), - [statRenderers] + }) ?? [], + [stats] ); const takeActionMenu = useMemo( - () => ( - - - {TAKE_ACTION} - - } - closePopover={() => setPopover(false)} - isOpen={isPopoverOpen} - panelPaddingSize="none" - > - - - - ), + () => + takeActionItems.length ? ( + + + {TAKE_ACTION} + + } + closePopover={() => setPopover(false)} + isOpen={isPopoverOpen} + panelPaddingSize="none" + > + + + + ) : null, [isPopoverOpen, onButtonClick, takeActionItems] ); @@ -117,11 +126,15 @@ const GroupStatsComponent = ({ - {statsComponent} - {takeActionMenu} + {[...statsComponents, takeActionMenu].filter(Boolean).map((component, index, { length }) => ( + + {component} + {index < length - 1 && } + + ))} ); }; diff --git a/packages/kbn-grouping/src/components/accordion_panel/index.tsx b/packages/kbn-grouping/src/components/accordion_panel/index.tsx index 60237b2a107804..ae13509b51a9eb 100644 --- a/packages/kbn-grouping/src/components/accordion_panel/index.tsx +++ b/packages/kbn-grouping/src/components/accordion_panel/index.tsx @@ -18,7 +18,7 @@ interface GroupPanelProps { extraAction?: React.ReactNode; forceState?: 'open' | 'closed'; groupBucket: GroupingBucket; - groupPanelRenderer?: JSX.Element; + groupPanel?: JSX.Element; groupingLevel?: number; isLoading: boolean; isNullGroup?: boolean; @@ -62,7 +62,7 @@ const GroupPanelComponent = ({ extraAction, forceState, groupBucket, - groupPanelRenderer, + groupPanel, groupingLevel = 0, isLoading, isNullGroup = false, @@ -115,7 +115,7 @@ const GroupPanelComponent = ({ buttonClassName={customAccordionButtonClassName} buttonContent={

- {groupPanelRenderer ?? ( + {groupPanel ?? ( { }); it('Renders a null group and passes the correct filter to take actions and child component', () => { - takeActionItems.mockReturnValue([]); + takeActionItems.mockReturnValue([]); const { getAllByTestId, getByTestId } = render( diff --git a/packages/kbn-grouping/src/components/grouping.tsx b/packages/kbn-grouping/src/components/grouping.tsx index 2b7c0ea4a9dd01..41a64e2cb274c8 100644 --- a/packages/kbn-grouping/src/components/grouping.tsx +++ b/packages/kbn-grouping/src/components/grouping.tsx @@ -23,8 +23,8 @@ import { GroupStats } from './accordion_panel/group_stats'; import { EmptyGroupingComponent } from './empty_results_panel'; import { countCss, groupingContainerCss, groupingContainerCssLevel } from './styles'; import { GROUPS_UNIT, NULL_GROUP } from './translations'; -import type { ParsedGroupingAggregation, GroupPanelRenderer } from './types'; -import { GroupingBucket, GroupStatsRenderer, OnGroupToggle } from './types'; +import type { ParsedGroupingAggregation, GroupPanelRenderer, GetGroupStats } from './types'; +import { GroupingBucket, OnGroupToggle } from './types'; import { getTelemetryEvent } from '../telemetry/const'; export interface GroupingProps { @@ -33,7 +33,7 @@ export interface GroupingProps { groupPanelRenderer?: GroupPanelRenderer; groupSelector?: JSX.Element; // list of custom UI components which correspond to your custom rendered metrics aggregations - groupStatsRenderer?: GroupStatsRenderer; + getGroupStats?: GetGroupStats; groupingId: string; groupingLevel?: number; inspectButton?: JSX.Element; @@ -45,7 +45,7 @@ export interface GroupingProps { renderChildComponent: (groupFilter: Filter[]) => React.ReactElement; onGroupClose: () => void; selectedGroup: string; - takeActionItems: (groupFilters: Filter[], groupNumber: number) => JSX.Element[]; + takeActionItems?: (groupFilters: Filter[], groupNumber: number) => JSX.Element[]; tracker?: ( type: UiCounterMetricType, event: string | string[], @@ -59,8 +59,8 @@ const GroupingComponent = ({ activePage, data, groupPanelRenderer, + getGroupStats, groupSelector, - groupStatsRenderer, groupingId, groupingLevel = 0, inspectButton, @@ -124,15 +124,13 @@ const GroupingComponent = ({ ) } groupNumber={groupNumber} - statRenderers={ - groupStatsRenderer && groupStatsRenderer(selectedGroup, groupBucket) - } + stats={getGroupStats && getGroupStats(selectedGroup, groupBucket)} takeActionItems={takeActionItems} /> } forceState={(trigger[groupKey] && trigger[groupKey].state) ?? 'closed'} groupBucket={groupBucket} - groupPanelRenderer={ + groupPanel={ groupPanelRenderer && groupPanelRenderer(selectedGroup, groupBucket, nullGroupMessage, isLoading) } @@ -166,7 +164,7 @@ const GroupingComponent = ({ [ data?.groupByFields?.buckets, groupPanelRenderer, - groupStatsRenderer, + getGroupStats, groupingId, groupingLevel, isLoading, diff --git a/packages/kbn-grouping/src/components/styles.tsx b/packages/kbn-grouping/src/components/styles.tsx index 063c0f271f37fd..d65cf8c84e353b 100644 --- a/packages/kbn-grouping/src/components/styles.tsx +++ b/packages/kbn-grouping/src/components/styles.tsx @@ -22,9 +22,6 @@ export const countCss = css` export const statsContainerCss = css` font-size: ${euiThemeVars.euiFontSizeXS}; font-weight: ${euiThemeVars.euiFontWeightSemiBold}; - border-right: ${euiThemeVars.euiBorderThin}; - margin-right: 16px; - padding-right: 16px; .smallDot { width: 3px !important; display: inline-block; diff --git a/packages/kbn-grouping/src/components/types.ts b/packages/kbn-grouping/src/components/types.ts index 43a9af13372f7d..98822b7c80bc9e 100644 --- a/packages/kbn-grouping/src/components/types.ts +++ b/packages/kbn-grouping/src/components/types.ts @@ -62,16 +62,16 @@ export interface BadgeMetric { width?: number; } -export interface StatRenderer { +export interface GroupStatsItem { title: string; - renderer?: JSX.Element; + component?: JSX.Element; badge?: BadgeMetric; } -export type GroupStatsRenderer = ( +export type GetGroupStats = ( selectedGroup: string, fieldBucket: RawBucket -) => StatRenderer[]; +) => GroupStatsItem[]; export type GroupPanelRenderer = ( selectedGroup: string, diff --git a/packages/kbn-grouping/src/hooks/use_grouping.tsx b/packages/kbn-grouping/src/hooks/use_grouping.tsx index af3ae458de285e..284343a29d7484 100644 --- a/packages/kbn-grouping/src/hooks/use_grouping.tsx +++ b/packages/kbn-grouping/src/hooks/use_grouping.tsx @@ -31,7 +31,7 @@ export interface UseGrouping { */ type StaticGroupingProps = Pick< GroupingProps, - 'groupPanelRenderer' | 'groupStatsRenderer' | 'onGroupToggle' | 'unit' | 'groupsUnit' + 'groupPanelRenderer' | 'getGroupStats' | 'onGroupToggle' | 'unit' | 'groupsUnit' >; /** Type for dynamic grouping component props where T is the consumer `GroupingAggregation` diff --git a/tsconfig.base.json b/tsconfig.base.json index 689df41bae17a6..85f84a2609046b 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -50,6 +50,8 @@ "@kbn/alerting-types/*": ["packages/kbn-alerting-types/*"], "@kbn/alerts-as-data-utils": ["packages/kbn-alerts-as-data-utils"], "@kbn/alerts-as-data-utils/*": ["packages/kbn-alerts-as-data-utils/*"], + "@kbn/alerts-grouping": ["packages/kbn-alerts-grouping"], + "@kbn/alerts-grouping/*": ["packages/kbn-alerts-grouping/*"], "@kbn/alerts-restricted-fixtures-plugin": ["x-pack/test/alerting_api_integration/common/plugins/alerts_restricted"], "@kbn/alerts-restricted-fixtures-plugin/*": ["x-pack/test/alerting_api_integration/common/plugins/alerts_restricted/*"], "@kbn/alerts-ui-shared": ["packages/kbn-alerts-ui-shared"], diff --git a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_grouping/cloud_security_grouping.tsx b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_grouping/cloud_security_grouping.tsx index a95ae51f81eacc..a7371851c57122 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_grouping/cloud_security_grouping.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_grouping/cloud_security_grouping.tsx @@ -77,13 +77,6 @@ export const CloudSecurityGrouping = ({ data-test-subj={CSP_GROUPING} css={css` position: relative; - && [data-test-subj='group-stats'] > .euiFlexItem:last-child { - display: none; - } - && [data-test-subj='group-stats'] > .euiFlexItem:not(:first-child) > span { - border-right: none; - margin-right: 0; - } `} > {groupSelectorComponent && ( diff --git a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_grouping/use_cloud_security_grouping.ts b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_grouping/use_cloud_security_grouping.ts index d9e7ac07b9dbd3..e480233f376fa1 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_grouping/use_cloud_security_grouping.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_grouping/use_cloud_security_grouping.ts @@ -8,7 +8,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { isNoneGroup, useGrouping } from '@kbn/grouping'; import * as uuid from 'uuid'; import type { DataView } from '@kbn/data-views-plugin/common'; -import { GroupOption, GroupPanelRenderer, GroupStatsRenderer } from '@kbn/grouping/src'; +import { GroupOption, GroupPanelRenderer, GetGroupStats } from '@kbn/grouping/src'; import { useUrlQuery } from '../../common/hooks/use_url_query'; @@ -28,7 +28,7 @@ export const useCloudSecurityGrouping = ({ getDefaultQuery, unit, groupPanelRenderer, - groupStatsRenderer, + getGroupStats, groupingLevel, groupingLocalStorageKey, maxGroupingLevels = DEFAULT_MAX_GROUPING_LEVELS, @@ -40,7 +40,7 @@ export const useCloudSecurityGrouping = ({ getDefaultQuery: (params: FindingsBaseURLQuery) => FindingsBaseURLQuery; unit: (count: number) => string; groupPanelRenderer?: GroupPanelRenderer; - groupStatsRenderer?: GroupStatsRenderer; + getGroupStats?: GetGroupStats; groupingLevel?: number; groupingLocalStorageKey: string; maxGroupingLevels?: number; @@ -60,7 +60,7 @@ export const useCloudSecurityGrouping = ({ componentProps: { unit, groupPanelRenderer, - groupStatsRenderer, + getGroupStats, groupsUnit, }, defaultGroupingOptions, diff --git a/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/latest_findings_container.tsx b/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/latest_findings_container.tsx index cfb572116e65c4..a12cc5bb353e22 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/latest_findings_container.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/latest_findings_container.tsx @@ -41,7 +41,7 @@ const SubGrouping = ({ setActivePageIndex, } = useLatestFindingsGrouping({ groupPanelRenderer, - groupStatsRenderer, + getGroupStats: groupStatsRenderer, groupingLevel, selectedGroup, groupFilters: parentGroupFilters ? JSON.parse(parentGroupFilters) : [], @@ -76,7 +76,7 @@ const SubGrouping = ({ export const LatestFindingsContainer = () => { const { grouping, isFetching, urlQuery, setUrlQuery, onResetFilters, error, isEmptyResults } = - useLatestFindingsGrouping({ groupPanelRenderer, groupStatsRenderer }); + useLatestFindingsGrouping({ groupPanelRenderer, getGroupStats: groupStatsRenderer }); const renderChildComponent = ({ level, 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 d40037d156d3f3..cd49925798b3ae 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 @@ -14,14 +14,14 @@ import { useEuiTheme, } from '@elastic/eui'; import { css } from '@emotion/react'; -import { GroupPanelRenderer, RawBucket, StatRenderer } from '@kbn/grouping/src'; +import { GroupPanelRenderer, GroupStatsItem, RawBucket } from '@kbn/grouping/src'; import React from 'react'; import { i18n } from '@kbn/i18n'; import { FINDINGS_GROUPING_OPTIONS } from '../../../common/constants'; import { - NullGroup, - LoadingGroup, firstNonNullValue, + LoadingGroup, + NullGroup, } from '../../../components/cloud_security_grouping'; import { getAbbreviatedNumber } from '../../../common/utils/get_abbreviated_number'; import { CISBenchmarkIcon } from '../../../components/cis_benchmark_icon'; @@ -221,21 +221,17 @@ const ComplianceBar = React.memo(ComplianceBarComponent); export const groupStatsRenderer = ( selectedGroup: string, bucket: RawBucket -): StatRenderer[] => { - const defaultBadges = [ - { - title: i18n.translate('xpack.csp.findings.grouping.stats.badges.findings', { - defaultMessage: 'Findings', - }), - renderer: , - }, - { - title: i18n.translate('xpack.csp.findings.grouping.stats.badges.compliance', { - defaultMessage: 'Compliance', - }), - renderer: , - }, - ]; - - return defaultBadges; -}; +): GroupStatsItem[] => [ + { + title: i18n.translate('xpack.csp.findings.grouping.stats.badges.findings', { + defaultMessage: 'Findings', + }), + component: , + }, + { + title: i18n.translate('xpack.csp.findings.grouping.stats.badges.compliance', { + defaultMessage: 'Compliance', + }), + component: , + }, +]; diff --git a/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/use_latest_findings_grouping.tsx b/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/use_latest_findings_grouping.tsx index 47f00a9a1927a0..0235960207e27d 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/use_latest_findings_grouping.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/use_latest_findings_grouping.tsx @@ -8,7 +8,7 @@ import { getGroupingQuery } from '@kbn/grouping'; import { GroupingAggregation, GroupPanelRenderer, - GroupStatsRenderer, + GetGroupStats, isNoneGroup, NamedAggregation, parseGroupingQuery, @@ -130,13 +130,13 @@ export const isFindingsRootGroupingAggregation = ( */ export const useLatestFindingsGrouping = ({ groupPanelRenderer, - groupStatsRenderer, + getGroupStats, groupingLevel = 0, groupFilters = [], selectedGroup, }: { groupPanelRenderer?: GroupPanelRenderer; - groupStatsRenderer?: GroupStatsRenderer; + getGroupStats?: GetGroupStats; groupingLevel?: number; groupFilters?: Filter[]; selectedGroup?: string; @@ -165,7 +165,7 @@ export const useLatestFindingsGrouping = ({ getDefaultQuery, unit: FINDINGS_UNIT, groupPanelRenderer, - groupStatsRenderer, + getGroupStats, groupingLocalStorageKey: LOCAL_STORAGE_FINDINGS_GROUPING_KEY, groupingLevel, groupsUnit: MISCONFIGURATIONS_GROUPS_UNIT, 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 2e1c93f4218f46..e713a0ad6aad90 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 @@ -8,7 +8,7 @@ import { getGroupingQuery } from '@kbn/grouping'; import { GroupingAggregation, GroupPanelRenderer, - GroupStatsRenderer, + GetGroupStats, isNoneGroup, NamedAggregation, parseGroupingQuery, @@ -109,13 +109,13 @@ export const isVulnerabilitiesRootGroupingAggregation = ( */ export const useLatestVulnerabilitiesGrouping = ({ groupPanelRenderer, - groupStatsRenderer, + getGroupStats, groupingLevel = 0, groupFilters = [], selectedGroup, }: { groupPanelRenderer?: GroupPanelRenderer; - groupStatsRenderer?: GroupStatsRenderer; + getGroupStats?: GetGroupStats; groupingLevel?: number; groupFilters?: Filter[]; selectedGroup?: string; @@ -144,7 +144,7 @@ export const useLatestVulnerabilitiesGrouping = ({ getDefaultQuery, unit: VULNERABILITIES_UNIT, groupPanelRenderer, - groupStatsRenderer, + getGroupStats, groupingLocalStorageKey: LOCAL_STORAGE_VULNERABILITIES_GROUPING_KEY, groupingLevel, groupsUnit: VULNERABILITIES_GROUPS_UNIT, diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/latest_vulnerabilities_container.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/latest_vulnerabilities_container.tsx index 6b2ed7aea04db6..c5510ea7deaaf1 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/latest_vulnerabilities_container.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/latest_vulnerabilities_container.tsx @@ -42,7 +42,7 @@ export const LatestVulnerabilitiesContainer = () => { setActivePageIndex, } = useLatestVulnerabilitiesGrouping({ groupPanelRenderer, - groupStatsRenderer, + getGroupStats: groupStatsRenderer, groupingLevel, selectedGroup, groupFilters: parentGroupFilters ? JSON.parse(parentGroupFilters) : [], @@ -138,7 +138,7 @@ export const LatestVulnerabilitiesContainer = () => { }; const { grouping, isFetching, urlQuery, setUrlQuery, onResetFilters, error, isEmptyResults } = - useLatestVulnerabilitiesGrouping({ groupPanelRenderer, groupStatsRenderer }); + useLatestVulnerabilitiesGrouping({ groupPanelRenderer, getGroupStats: groupStatsRenderer }); if (error || isEmptyResults) { return ( 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 489c8ac0990f84..51dc1e9009502c 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 @@ -14,7 +14,7 @@ import { useEuiTheme, } from '@elastic/eui'; import { css } from '@emotion/react'; -import { GroupPanelRenderer, RawBucket, StatRenderer } from '@kbn/grouping/src'; +import { GroupPanelRenderer, GroupStatsItem, RawBucket } from '@kbn/grouping/src'; import React from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { getCloudProviderNameFromAbbreviation } from '../../../common/utils/helpers'; @@ -195,17 +195,13 @@ const SeverityStats = React.memo(SeverityStatsComponent); export const groupStatsRenderer = ( selectedGroup: string, bucket: RawBucket -): StatRenderer[] => { - const defaultBadges = [ - { - title: VULNERABILITIES, - renderer: , - }, - { - title: '', - renderer: , - }, - ]; - - return defaultBadges; -}; +): GroupStatsItem[] => [ + { + title: VULNERABILITIES, + component: , + }, + { + title: '', + component: , + }, +]; diff --git a/x-pack/plugins/rule_registry/common/types.ts b/x-pack/plugins/rule_registry/common/types.ts index c44579920fbc59..5f80af04048e29 100644 --- a/x-pack/plugins/rule_registry/common/types.ts +++ b/x-pack/plugins/rule_registry/common/types.ts @@ -199,6 +199,23 @@ const bucketAggsTempsSchemas: t.Type = t.exact( ]), }) ), + bucket_sort: t.exact( + t.partial({ + sort: sortSchema, + from: t.number, + size: t.number, + gap_policy: t.union([ + t.literal('skip'), + t.literal('insert_zeros'), + t.literal('keep_values'), + ]), + }) + ), + value_count: t.exact( + t.partial({ + field: t.string, + }) + ), }) ); diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts index e249207baf0508..4dac5ff4139092 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts @@ -45,11 +45,6 @@ import { FieldDescriptor, IndexPatternsFetcher } from '@kbn/data-plugin/server'; import { isEmpty } from 'lodash'; import { RuleTypeRegistry } from '@kbn/alerting-plugin/server/types'; import { TypeOf } from 'io-ts'; -import { - MAX_ALERTS_GROUPING_QUERY_SIZE, - MAX_ALERTS_PAGES, - MAX_PAGINATED_ALERTS, -} from './constants'; import { BrowserFields } from '../../common'; import { alertAuditEvent, operationAlertAuditActionMap } from './audit_events'; import { @@ -63,6 +58,11 @@ import { IRuleDataService } from '../rule_data_plugin_service'; import { getAuthzFilter, getSpacesFilter } from '../lib'; import { fieldDescriptorToBrowserFieldMapper } from './browser_fields'; import { alertsAggregationsSchema } from '../../common/types'; +import { + MAX_ALERTS_GROUPING_QUERY_SIZE, + MAX_ALERTS_PAGES, + MAX_PAGINATED_ALERTS, +} from './constants'; // TODO: Fix typings https://github.com/elastic/kibana/issues/101776 type NonNullableProps = Omit & { @@ -1089,7 +1089,7 @@ export class AlertsClient { return this.find({ featureIds, aggs: { - groupByField: { + groupByFields: { terms: { field: 'groupByField', size: MAX_ALERTS_GROUPING_QUERY_SIZE, diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_alerts_group_aggregations.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_alerts_group_aggregations.test.ts index d367ebcd5ba92b..8aedf715ff6687 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_alerts_group_aggregations.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_alerts_group_aggregations.test.ts @@ -97,7 +97,7 @@ describe('getGroupAggregations()', () => { expect(alertsClient.find).toHaveBeenCalledWith({ featureIds, aggs: { - groupByField: { + groupByFields: { terms: { field: 'groupByField', size: MAX_ALERTS_GROUPING_QUERY_SIZE, diff --git a/x-pack/plugins/rule_registry/server/routes/find.ts b/x-pack/plugins/rule_registry/server/routes/find.ts index 807ed7e22f29e3..5075525a9dbd81 100644 --- a/x-pack/plugins/rule_registry/server/routes/find.ts +++ b/x-pack/plugins/rule_registry/server/routes/find.ts @@ -11,10 +11,10 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import { PositiveInteger } from '@kbn/securitysolution-io-ts-types'; import { SortOptions } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { bucketAggsSchemas, metricsAggsSchemas } from '../../common/types'; import { RacRequestHandlerContext } from '../types'; import { BASE_RAC_ALERTS_API_PATH } from '../../common/constants'; import { buildRouteValidation } from './utils/route_validation'; -import { bucketAggsSchemas, metricsAggsSchemas } from '../../common/types'; export const findAlertsByQueryRoute = (router: IRouter) => { router.post( @@ -32,7 +32,7 @@ export const findAlertsByQueryRoute = (router: IRouter size: t.union([PositiveInteger, t.undefined]), sort: t.union([t.array(t.object), t.undefined]), track_total_hits: t.union([t.boolean, t.undefined]), - _source: t.union([t.array(t.string), t.undefined]), + _source: t.union([t.array(t.string), t.boolean, t.undefined]), }) ) ), @@ -67,7 +67,7 @@ export const findAlertsByQueryRoute = (router: IRouter size, sort: sort as SortOptions[], track_total_hits, - _source, + _source: _source as false | string[], }); if (alerts == null) { return response.notFound({ diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_grouping.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_grouping.tsx index 13e9d739017c6f..fd7ca232ca8eaa 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_grouping.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_grouping.tsx @@ -104,7 +104,7 @@ const GroupedAlertsTableComponent: React.FC = (props) const { getGrouping, selectedGroups, setSelectedGroups } = useGrouping({ componentProps: { groupPanelRenderer: renderGroupPanel, - groupStatsRenderer: getStats, + getGroupStats: getStats, onGroupToggle, unit: defaultUnit, }, diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_sub_grouping.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_sub_grouping.tsx index 94f5c3abda1608..4b8c912c61a65f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_sub_grouping.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_sub_grouping.tsx @@ -13,8 +13,8 @@ import type { GroupingAggregation } from '@kbn/grouping'; import { isNoneGroup } from '@kbn/grouping'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; import type { DynamicGroupingProps } from '@kbn/grouping/src'; -import type { TableIdLiteral } from '@kbn/securitysolution-data-table'; import { parseGroupingQuery } from '@kbn/grouping/src'; +import type { TableIdLiteral } from '@kbn/securitysolution-data-table'; import type { RunTimeMappings } from '../../../sourcerer/store/model'; import { combineQueries } from '../../../common/lib/kuery'; import { SourcererScopeName } from '../../../sourcerer/store/model'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/group_stats.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/group_stats.tsx index 96cc365d93fabd..428df04b86509c 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/group_stats.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/group_stats.tsx @@ -7,7 +7,7 @@ import { EuiIcon } from '@elastic/eui'; import React from 'react'; -import type { RawBucket, StatRenderer } from '@kbn/grouping'; +import type { RawBucket, GroupStatsItem } from '@kbn/grouping'; import type { AlertsGroupingAggregation } from './types'; import * as i18n from '../translations'; @@ -67,7 +67,7 @@ const multiSeverity = ( export const getStats = ( selectedGroup: string, bucket: RawBucket -): StatRenderer[] => { +): GroupStatsItem[] => { const singleSeverityComponent = bucket.severitiesSubAggregation?.buckets && bucket.severitiesSubAggregation?.buckets?.length ? getSeverity(bucket.severitiesSubAggregation?.buckets[0].key.toString()) diff --git a/yarn.lock b/yarn.lock index 17882dae4ca640..a56e1f57733361 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3313,6 +3313,10 @@ version "0.0.0" uid "" +"@kbn/alerts-grouping@link:packages/kbn-alerts-grouping": + version "0.0.0" + uid "" + "@kbn/alerts-restricted-fixtures-plugin@link:x-pack/test/alerting_api_integration/common/plugins/alerts_restricted": version "0.0.0" uid "" From 94cab9397781cb9d6c65f3af943a6755590ec4bc Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Mon, 8 Jul 2024 20:06:40 +0200 Subject: [PATCH 021/103] [ML] AIOps: Refactors function argument structure for Log Rate Analysis. (#187669) ## Summary Refactors the function argument structure of code used on Kibana server for Log Rate Analysis from individual arguments to single objects that contain all options. The options structure looks like this: ``` { // "meta" args like dependencies, general callbacks etc. on the outer most level esClient, abortSignal, ... // within "arguments" we pass in actual options that necessary for the logic of the function arguments: { start, end, query, fields, ... } } ``` The main benefit is that code where these functions are used become easier to read. Instead of the strict order of args that sometimes included `undefined` or just a value where it's hard to guess for which argument it's used for, this enforces to have the names of options show up in the consuming code. Here's an example: Before: ``` await fetchHistogramsForFields( client, requestBody.index, histogramQuery, [ { fieldName: requestBody.timeFieldName, type: KBN_FIELD_TYPES.DATE, interval: overallTimeSeries.interval, min: overallTimeSeries.stats[0], max: overallTimeSeries.stats[1], }, ], -1, undefined, abortSignal, stateHandler.sampleProbability(), RANDOM_SAMPLER_SEED ) ``` After: ``` (await fetchHistogramsForFields({ esClient, abortSignal, arguments: { indexPattern: requestBody.index, query: histogramQuery, fields: [ { fieldName: requestBody.timeFieldName, type: KBN_FIELD_TYPES.DATE, interval: overallTimeSeries.interval, min: overallTimeSeries.stats[0], max: overallTimeSeries.stats[1], }, ], samplerShardSize: -1, randomSamplerProbability: stateHandler.sampleProbability(), randomSamplerSeed: RANDOM_SAMPLER_SEED, }, })) as [NumericChartData] ``` ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] 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) --- x-pack/packages/ml/agg_utils/index.ts | 2 +- .../ml/agg_utils/src/fetch_agg_intervals.ts | 63 +++++++++----- .../src/fetch_histograms_for_fields.ts | 86 +++++++++++-------- .../queries/fetch_categories.ts | 25 +++--- .../queries/fetch_category_counts.ts | 46 ++++++---- .../queries/fetch_frequent_item_sets.ts | 48 +++++++---- .../queries/fetch_index_info.test.ts | 8 +- .../queries/fetch_index_info.ts | 18 ++-- .../queries/fetch_significant_categories.ts | 24 ++++-- .../fetch_significant_term_p_values.ts | 48 +++++++---- .../analysis_handlers/grouping_handler.ts | 69 +++++++-------- .../analysis_handlers/histogram_handler.ts | 80 +++++++++-------- .../analysis_handlers/index_info_handler.ts | 16 ++-- .../overall_histogram_handler.ts | 25 +++--- .../significant_items_handler.ts | 38 ++++---- .../analysis_handlers/top_items_handler.ts | 6 +- .../response_stream_factory.ts | 2 +- .../route_handler_factory.ts | 4 +- .../models/data_visualizer/data_visualizer.ts | 18 ++-- .../api/field_histograms/route_handler.ts | 18 ++-- 20 files changed, 375 insertions(+), 269 deletions(-) diff --git a/x-pack/packages/ml/agg_utils/index.ts b/x-pack/packages/ml/agg_utils/index.ts index 2102522bea636b..049623ffddb383 100644 --- a/x-pack/packages/ml/agg_utils/index.ts +++ b/x-pack/packages/ml/agg_utils/index.ts @@ -6,7 +6,7 @@ */ export { buildSamplerAggregation } from './src/build_sampler_aggregation'; -export { fetchAggIntervals } from './src/fetch_agg_intervals'; +export { fetchAggIntervals, type FetchAggIntervalsParams } from './src/fetch_agg_intervals'; export { fetchHistogramsForFields } from './src/fetch_histograms_for_fields'; export { DEFAULT_SAMPLER_SHARD_SIZE } from './src/field_histograms'; export { getSamplerAggregationsResponsePath } from './src/get_sampler_aggregations_response_path'; diff --git a/x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts b/x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts index 14dd0b850abef3..f10977073f9bf8 100644 --- a/x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts +++ b/x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts @@ -22,30 +22,51 @@ import type { HistogramField, NumericColumnStatsMap } from './types'; const MAX_CHART_COLUMNS = 20; /** - * Returns aggregation intervals for the supplied document fields. + * Interface for the parameters required to fetch aggregation intervals. + */ +export interface FetchAggIntervalsParams { + /** The Elasticsearch client to use for the query. */ + esClient: ElasticsearchClient; + /** An optional abort signal to cancel the request. */ + abortSignal?: AbortSignal; + /** The arguments for the aggregation query. */ + arguments: { + /** The index pattern to query against. */ + indexPattern: string; + /** The query to filter documents. */ + query: estypes.QueryDslQueryContainer; + /** The fields to aggregate on. */ + fields: HistogramField[]; + /** The size of the sampler shard. */ + samplerShardSize: number; + /** Optional runtime mappings for the query. */ + runtimeMappings?: estypes.MappingRuntimeFields; + /** Optional probability for random sampling. */ + randomSamplerProbability?: number; + /** Optional seed for random sampling. */ + randomSamplerSeed?: number; + }; +} +/** + * Asynchronously fetches aggregation intervals from an Elasticsearch client. * - * @param client - The Elasticsearch client. - * @param indexPattern - The index pattern to search. - * @param query - The query to filter documents. - * @param fields - An array of field definitions for which aggregation intervals are requested. - * @param samplerShardSize - The shard size parameter for sampling aggregations. A value less than 1 indicates no sampling. - * @param runtimeMappings - Optional runtime mappings to apply. - * @param abortSignal - Optional AbortSignal for canceling the request. - * @param randomSamplerProbability - Optional probability value for random sampling. - * @param randomSamplerSeed - Optional seed value for random sampling. - * @returns A promise that resolves to a map of aggregation intervals for the specified fields. + * @param params - The parameters for fetching aggregation intervals. + * @returns A promise that resolves to a map of numeric column statistics. */ export const fetchAggIntervals = async ( - client: ElasticsearchClient, - indexPattern: string, - query: estypes.QueryDslQueryContainer, - fields: HistogramField[], - samplerShardSize: number, - runtimeMappings?: estypes.MappingRuntimeFields, - abortSignal?: AbortSignal, - randomSamplerProbability?: number, - randomSamplerSeed?: number + params: FetchAggIntervalsParams ): Promise => { + const { esClient, abortSignal, arguments: args } = params; + const { + indexPattern, + query, + fields, + samplerShardSize, + runtimeMappings, + randomSamplerProbability, + randomSamplerSeed, + } = args; + if ( samplerShardSize >= 1 && randomSamplerProbability !== undefined && @@ -77,7 +98,7 @@ export const fetchAggIntervals = async ( seed: randomSamplerSeed, }); - const body = await client.search( + const body = await esClient.search( { index: indexPattern, size: 0, diff --git a/x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts b/x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts index c6f1d6c5e0166e..f74ebbaac39946 100644 --- a/x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts +++ b/x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts @@ -167,32 +167,48 @@ export type FieldsForHistograms = Array< | UnsupportedHistogramField >; +interface FetchHistogramsForFieldsParams { + /** The Elasticsearch client to use for the query. */ + esClient: ElasticsearchClient; + /** An optional abort signal to cancel the request. */ + abortSignal?: AbortSignal; + /** The arguments for the aggregation query. */ + arguments: { + /** The index pattern to query against. */ + indexPattern: string; + /** The query to filter documents. */ + query: any; + /** The fields for which histograms are to be fetched. */ + fields: FieldsForHistograms; + /** The size of the sampler shard. */ + samplerShardSize: number; + /** Optional runtime mappings for the query. */ + runtimeMappings?: estypes.MappingRuntimeFields; + /** Optional probability for random sampling. */ + randomSamplerProbability?: number; + /** Optional seed for random sampling. */ + randomSamplerSeed?: number; + }; +} + /** - * Fetches data to be used in mini histogram charts. Supports auto-identifying - * the histogram interval and min/max values. + * Asynchronously fetches histograms for specified fields from an Elasticsearch client. * - * @param client Elasticsearch Client - * @param indexPattern index pattern to be queried - * @param query Elasticsearch query - * @param fields the fields the histograms should be generated for - * @param samplerShardSize shard_size parameter of the sampler aggregation - * @param runtimeMappings optional runtime mappings - * @param abortSignal optional abort signal - * @param randomSamplerProbability optional random sampler probability - * @param randomSamplerSeed optional random sampler seed - * @returns an array of histogram data for each supplied field + * @param params The parameters for fetching histograms. + * @returns A promise that resolves with the fetched histograms. */ -export const fetchHistogramsForFields = async ( - client: ElasticsearchClient, - indexPattern: string, - query: any, - fields: FieldsForHistograms, - samplerShardSize: number, - runtimeMappings?: estypes.MappingRuntimeFields, - abortSignal?: AbortSignal, - randomSamplerProbability?: number, - randomSamplerSeed?: number -) => { +export const fetchHistogramsForFields = async (params: FetchHistogramsForFieldsParams) => { + const { esClient, abortSignal, arguments: args } = params; + const { + indexPattern, + query, + fields, + samplerShardSize, + runtimeMappings, + randomSamplerProbability, + randomSamplerSeed, + } = args; + if ( samplerShardSize >= 1 && randomSamplerProbability !== undefined && @@ -202,17 +218,19 @@ export const fetchHistogramsForFields = async ( } const aggIntervals = { - ...(await fetchAggIntervals( - client, - indexPattern, - query, - fields.filter((f) => !isNumericHistogramFieldWithColumnStats(f)), - samplerShardSize, - runtimeMappings, + ...(await fetchAggIntervals({ + esClient, abortSignal, - randomSamplerProbability, - randomSamplerSeed - )), + arguments: { + indexPattern, + query, + fields: fields.filter((f) => !isNumericHistogramFieldWithColumnStats(f)), + samplerShardSize, + runtimeMappings, + randomSamplerProbability, + randomSamplerSeed, + }, + })), ...fields.filter(isNumericHistogramFieldWithColumnStats).reduce((p, field) => { const { interval, min, max, fieldName } = field; p[stringHash(fieldName)] = { interval, min, max }; @@ -259,7 +277,7 @@ export const fetchHistogramsForFields = async ( seed: randomSamplerSeed, }); - const body = await client.search( + const body = await esClient.search( { index: indexPattern, size: 0, diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_categories.ts b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_categories.ts index 99300b2bef2e6c..56f2b57f2fee8e 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_categories.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_categories.ts @@ -97,10 +97,10 @@ export const fetchCategories = async ( esClient: ElasticsearchClient, params: AiopsLogRateAnalysisSchema, fieldNames: string[], - logger: Logger, + logger?: Logger, // The default value of 1 means no sampling will be used sampleProbability: number = 1, - emitError: (m: string) => void, + emitError?: (m: string) => void, abortSignal?: AbortSignal ): Promise => { const randomSamplerWrapper = createRandomSamplerWrapper({ @@ -122,14 +122,19 @@ export const fetchCategories = async ( function reportError(fieldName: string, error: unknown) { if (!isRequestAbortedError(error)) { - logger.error( - `Failed to fetch category aggregation for fieldName "${fieldName}", got: \n${JSON.stringify( - error, - null, - 2 - )}` - ); - emitError(`Failed to fetch category aggregation for fieldName "${fieldName}".`); + if (logger) { + logger.error( + `Failed to fetch category aggregation for fieldName "${fieldName}", got: \n${JSON.stringify( + error, + null, + 2 + )}` + ); + } + + if (emitError) { + emitError(`Failed to fetch category aggregation for fieldName "${fieldName}".`); + } } } diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_category_counts.ts b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_category_counts.ts index 93018370a54ffe..0879e5de7aeff5 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_category_counts.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_category_counts.ts @@ -75,8 +75,8 @@ export const fetchCategoryCounts = async ( categories: FetchCategoriesResponse, from: number | undefined, to: number | undefined, - logger: Logger, - emitError: (m: string) => void, + logger?: Logger, + emitError?: (m: string) => void, abortSignal?: AbortSignal ): Promise => { const updatedCategories = cloneDeep(categories); @@ -101,14 +101,19 @@ export const fetchCategoryCounts = async ( ); } catch (error) { if (!isRequestAbortedError(error)) { - logger.error( - `Failed to fetch category counts for field name "${fieldName}", got: \n${JSON.stringify( - error, - null, - 2 - )}` - ); - emitError(`Failed to fetch category counts for field name "${fieldName}".`); + if (logger) { + logger.error( + `Failed to fetch category counts for field name "${fieldName}", got: \n${JSON.stringify( + error, + null, + 2 + )}` + ); + } + + if (emitError) { + emitError(`Failed to fetch category counts for field name "${fieldName}".`); + } } return updatedCategories; } @@ -118,14 +123,19 @@ export const fetchCategoryCounts = async ( updatedCategories.categories[index].count = (resp.hits.total as estypes.SearchTotalHits).value ?? 0; } else { - logger.error( - `Failed to fetch category count for category "${ - updatedCategories.categories[index].key - }", got: \n${JSON.stringify(resp, null, 2)}` - ); - emitError( - `Failed to fetch category count for category "${updatedCategories.categories[index].key}".` - ); + if (logger) { + logger.error( + `Failed to fetch category count for category "${ + updatedCategories.categories[index].key + }", got: \n${JSON.stringify(resp, null, 2)}` + ); + } + + if (emitError) { + emitError( + `Failed to fetch category count for category "${updatedCategories.categories[index].key}".` + ); + } } } diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_frequent_item_sets.ts b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_frequent_item_sets.ts index bf3607ce23736a..34c34482ccf7cb 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_frequent_item_sets.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_frequent_item_sets.ts @@ -80,20 +80,38 @@ export function getFrequentItemSetsAggFields(significantItems: SignificantItem[] ); } -export async function fetchFrequentItemSets( - client: ElasticsearchClient, - index: string, - searchQuery: estypes.QueryDslQueryContainer, - significantItems: SignificantItem[], - timeFieldName: string, - deviationMin: number, - deviationMax: number, - logger: Logger, - // The default value of 1 means no sampling will be used - sampleProbability: number = 1, - emitError: (m: string) => void, - abortSignal?: AbortSignal -): Promise { +export async function fetchFrequentItemSets({ + esClient, + abortSignal, + emitError, + logger, + arguments: args, +}: { + esClient: ElasticsearchClient; + emitError: (m: string) => void; + abortSignal?: AbortSignal; + logger: Logger; + arguments: { + index: string; + searchQuery: estypes.QueryDslQueryContainer; + significantItems: SignificantItem[]; + timeFieldName: string; + deviationMin: number; + deviationMax: number; + sampleProbability?: number; + }; +}): Promise { + const { + index, + searchQuery, + significantItems, + timeFieldName, + deviationMin, + deviationMax, + // The default value of 1 means no sampling will be used + sampleProbability = 1, + } = args; + // Sort significant terms by ascending p-value, necessary to apply the field limit correctly. const sortedSignificantItems = significantItems.slice().sort((a, b) => { return (a.pValue ?? 0) - (b.pValue ?? 0); @@ -140,7 +158,7 @@ export async function fetchFrequentItemSets( track_total_hits: true, }; - const body = await client.search< + const body = await esClient.search< unknown, { sample: FrequentItemSetsAggregation } | FrequentItemSetsAggregation >( diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.test.ts b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.test.ts index a47b6d94db1289..dc6d3537f84245 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.test.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.test.ts @@ -46,7 +46,7 @@ describe('fetch_index_info', () => { } as unknown as ElasticsearchClient; const { baselineTotalDocCount, deviationTotalDocCount, fieldCandidates } = - await fetchIndexInfo(esClientMock, paramsSearchQueryMock); + await fetchIndexInfo({ esClient: esClientMock, arguments: paramsSearchQueryMock }); expect(fieldCandidates).toEqual(['myIpFieldName', 'myKeywordFieldName']); expect(baselineTotalDocCount).toEqual(5000000); @@ -76,7 +76,7 @@ describe('fetch_index_info', () => { deviationTotalDocCount, fieldCandidates, textFieldCandidates, - } = await fetchIndexInfo(esClientMock, paramsSearchQueryMock); + } = await fetchIndexInfo({ esClient: esClientMock, arguments: paramsSearchQueryMock }); expect(fieldCandidates).toEqual([ '_metadata.elastic_apm_trace_id', @@ -258,7 +258,7 @@ describe('fetch_index_info', () => { deviationTotalDocCount, fieldCandidates, textFieldCandidates, - } = await fetchIndexInfo(esClientMock, paramsSearchQueryMock); + } = await fetchIndexInfo({ esClient: esClientMock, arguments: paramsSearchQueryMock }); expect(fieldCandidates).toEqual([ 'category.keyword', @@ -315,7 +315,7 @@ describe('fetch_index_info', () => { deviationTotalDocCount, fieldCandidates, textFieldCandidates, - } = await fetchIndexInfo(esClientMock, paramsSearchQueryMock); + } = await fetchIndexInfo({ esClient: esClientMock, arguments: paramsSearchQueryMock }); expect(fieldCandidates).toEqual(['items']); expect(textFieldCandidates).toEqual([]); diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.ts b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.ts index 458fc630b50094..a97b6049ab7b54 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.ts @@ -39,12 +39,18 @@ interface IndexInfo { zeroDocsFallback: boolean; } -export const fetchIndexInfo = async ( - esClient: ElasticsearchClient, - params: AiopsLogRateAnalysisSchema, - textFieldCandidatesOverrides: string[] = [], - abortSignal?: AbortSignal -): Promise => { +export const fetchIndexInfo = async ({ + esClient, + abortSignal, + arguments: args, +}: { + esClient: ElasticsearchClient; + abortSignal?: AbortSignal; + arguments: AiopsLogRateAnalysisSchema & { + textFieldCandidatesOverrides?: string[]; + }; +}): Promise => { + const { textFieldCandidatesOverrides = [], ...params } = args; const { index } = params; // Get all supported fields const respMapping = await esClient.fieldCaps( diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_significant_categories.ts b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_significant_categories.ts index e15918d0896e79..1d959951571921 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_significant_categories.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_significant_categories.ts @@ -32,16 +32,22 @@ const getCategoriesTestData = (categories: Category[]): Histogram[] => { const getCategoriesTotalCount = (categories: Category[]): number => categories.reduce((p, c) => p + c.count, 0); -export const fetchSignificantCategories = async ( - esClient: ElasticsearchClient, - params: AiopsLogRateAnalysisSchema, - fieldNames: string[], - logger: Logger, +export const fetchSignificantCategories = async ({ + esClient, + abortSignal, + emitError, + logger, + arguments: args, +}: { + esClient: ElasticsearchClient; + abortSignal?: AbortSignal; + emitError?: (m: string) => void; + logger?: Logger; + arguments: AiopsLogRateAnalysisSchema & { fieldNames: string[]; sampleProbability?: number }; +}) => { // The default value of 1 means no sampling will be used - sampleProbability: number = 1, - emitError: (m: string) => void, - abortSignal?: AbortSignal -) => { + const { fieldNames, sampleProbability = 1, ...params } = args; + const categoriesOverall = await fetchCategories( esClient, params, diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_significant_term_p_values.ts b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_significant_term_p_values.ts index 98dbd11398174a..9017b4949c8fe0 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_significant_term_p_values.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_significant_term_p_values.ts @@ -111,16 +111,25 @@ interface Aggs extends estypes.AggregationsSignificantLongTermsAggregate { buckets: estypes.AggregationsSignificantLongTermsBucket[]; } -export const fetchSignificantTermPValues = async ( - esClient: ElasticsearchClient, - params: AiopsLogRateAnalysisSchema, - fieldNames: string[], - logger: Logger, +export const fetchSignificantTermPValues = async ({ + esClient, + abortSignal, + logger, + emitError, + arguments: args, +}: { + esClient: ElasticsearchClient; + abortSignal?: AbortSignal; + logger?: Logger; + emitError?: (m: string) => void; + arguments: AiopsLogRateAnalysisSchema & { + fieldNames: string[]; + sampleProbability?: number; + }; +}): Promise => { // The default value of 1 means no sampling will be used - sampleProbability: number = 1, - emitError: (m: string) => void, - abortSignal?: AbortSignal -): Promise => { + const { fieldNames, sampleProbability = 1, ...params } = args; + const randomSamplerWrapper = createRandomSamplerWrapper({ probability: sampleProbability, seed: RANDOM_SAMPLER_SEED, @@ -139,14 +148,19 @@ export const fetchSignificantTermPValues = async ( function reportError(fieldName: string, error: unknown) { if (!isRequestAbortedError(error)) { - logger.error( - `Failed to fetch p-value aggregation for fieldName "${fieldName}", got: \n${JSON.stringify( - error, - null, - 2 - )}` - ); - emitError(`Failed to fetch p-value aggregation for fieldName "${fieldName}".`); + if (logger) { + logger.error( + `Failed to fetch p-value aggregation for fieldName "${fieldName}", got: \n${JSON.stringify( + error, + null, + 2 + )}` + ); + } + + if (emitError) { + emitError(`Failed to fetch p-value aggregation for fieldName "${fieldName}".`); + } } } diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/grouping_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/grouping_handler.ts index 8fe478a8053554..258b94bb12cc62 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/grouping_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/grouping_handler.ts @@ -40,7 +40,7 @@ import type { ResponseStreamFetchOptions } from '../response_stream_factory'; export const groupingHandlerFactory = ({ abortSignal, - client, + esClient, requestBody, responseStream, logDebugMessage, @@ -81,24 +81,26 @@ export const groupingHandlerFactory = ); try { - const { fields, itemSets } = await fetchFrequentItemSets( - client, - requestBody.index, - JSON.parse(requestBody.searchQuery) as estypes.QueryDslQueryContainer, - significantTerms, - requestBody.timeFieldName, - requestBody.deviationMin, - requestBody.deviationMax, + const { fields, itemSets } = await fetchFrequentItemSets({ + esClient, logger, - stateHandler.sampleProbability(), - responseStream.pushError, - abortSignal - ); + emitError: responseStream.pushError, + abortSignal, + arguments: { + index: requestBody.index, + searchQuery: JSON.parse(requestBody.searchQuery) as estypes.QueryDslQueryContainer, + significantItems: significantTerms, + timeFieldName: requestBody.timeFieldName, + deviationMin: requestBody.deviationMin, + deviationMax: requestBody.deviationMax, + sampleProbability: stateHandler.sampleProbability(), + }, + }); if (significantCategories.length > 0 && significantTerms.length > 0) { const { fields: significantCategoriesFields, itemSets: significantCategoriesItemSets } = await fetchTerms2CategoriesCounts( - client, + esClient, requestBody, JSON.parse(requestBody.searchQuery) as estypes.QueryDslQueryContainer, significantTerms, @@ -161,27 +163,26 @@ export const groupingHandlerFactory = let cpgTimeSeries: NumericChartData; try { cpgTimeSeries = ( - (await fetchHistogramsForFields( - client, - requestBody.index, - histogramQuery, - // fields - [ - { - fieldName: requestBody.timeFieldName, - type: KBN_FIELD_TYPES.DATE, - interval: overallTimeSeries.interval, - min: overallTimeSeries.stats[0], - max: overallTimeSeries.stats[1], - }, - ], - // samplerShardSize - -1, - undefined, + (await fetchHistogramsForFields({ + esClient, abortSignal, - stateHandler.sampleProbability(), - RANDOM_SAMPLER_SEED - )) as [NumericChartData] + arguments: { + indexPattern: requestBody.index, + query: histogramQuery, + fields: [ + { + fieldName: requestBody.timeFieldName, + type: KBN_FIELD_TYPES.DATE, + interval: overallTimeSeries.interval, + min: overallTimeSeries.stats[0], + max: overallTimeSeries.stats[1], + }, + ], + samplerShardSize: -1, + randomSamplerProbability: stateHandler.sampleProbability(), + randomSamplerSeed: RANDOM_SAMPLER_SEED, + }, + })) as [NumericChartData] )[0]; } catch (e) { if (!isRequestAbortedError(e)) { diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/histogram_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/histogram_handler.ts index e3501a53f5df81..2863d5c6dd427c 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/histogram_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/histogram_handler.ts @@ -35,7 +35,7 @@ import type { ResponseStreamFetchOptions } from '../response_stream_factory'; export const histogramHandlerFactory = ({ abortSignal, - client, + esClient, logDebugMessage, logger, requestBody, @@ -90,27 +90,26 @@ export const histogramHandlerFactory = try { cpTimeSeries = ( - (await fetchHistogramsForFields( - client, - requestBody.index, - histogramQuery, - // fields - [ - { - fieldName: requestBody.timeFieldName, - type: KBN_FIELD_TYPES.DATE, - interval: overallTimeSeries.interval, - min: overallTimeSeries.stats[0], - max: overallTimeSeries.stats[1], - }, - ], - // samplerShardSize - -1, - undefined, + (await fetchHistogramsForFields({ + esClient, abortSignal, - stateHandler.sampleProbability(), - RANDOM_SAMPLER_SEED - )) as [NumericChartData] + arguments: { + indexPattern: requestBody.index, + query: histogramQuery, + fields: [ + { + fieldName: requestBody.timeFieldName, + type: KBN_FIELD_TYPES.DATE, + interval: overallTimeSeries.interval, + min: overallTimeSeries.stats[0], + max: overallTimeSeries.stats[1], + }, + ], + samplerShardSize: -1, + randomSamplerProbability: stateHandler.sampleProbability(), + randomSamplerSeed: RANDOM_SAMPLER_SEED, + }, + })) as [NumericChartData] )[0]; } catch (e) { logger.error( @@ -183,27 +182,26 @@ export const histogramHandlerFactory = try { catTimeSeries = ( - (await fetchHistogramsForFields( - client, - requestBody.index, - histogramQuery, - // fields - [ - { - fieldName: requestBody.timeFieldName, - type: KBN_FIELD_TYPES.DATE, - interval: overallTimeSeries.interval, - min: overallTimeSeries.stats[0], - max: overallTimeSeries.stats[1], - }, - ], - // samplerShardSize - -1, - undefined, + (await fetchHistogramsForFields({ + esClient, abortSignal, - stateHandler.sampleProbability(), - RANDOM_SAMPLER_SEED - )) as [NumericChartData] + arguments: { + indexPattern: requestBody.index, + query: histogramQuery, + fields: [ + { + fieldName: requestBody.timeFieldName, + type: KBN_FIELD_TYPES.DATE, + interval: overallTimeSeries.interval, + min: overallTimeSeries.stats[0], + max: overallTimeSeries.stats[1], + }, + ], + samplerShardSize: -1, + randomSamplerProbability: stateHandler.sampleProbability(), + randomSamplerSeed: RANDOM_SAMPLER_SEED, + }, + })) as [NumericChartData] )[0]; } catch (e) { logger.error( diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts index 5c326e78218877..1a01d9c5432065 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts @@ -24,7 +24,7 @@ export const indexInfoHandlerFactory = async () => { const { abortSignal, - client, + esClient, logDebugMessage, logger, requestBody, @@ -56,12 +56,14 @@ export const indexInfoHandlerFactory = ); try { - const indexInfo = await fetchIndexInfo( - client, - requestBody, - ['message', 'error.message'], - abortSignal - ); + const indexInfo = await fetchIndexInfo({ + esClient, + abortSignal, + arguments: { + ...requestBody, + textFieldCandidatesOverrides: ['message', 'error.message'], + }, + }); logDebugMessage(`Baseline document count: ${indexInfo.baselineTotalDocCount}`); logDebugMessage(`Deviation document count: ${indexInfo.deviationTotalDocCount}`); diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/overall_histogram_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/overall_histogram_handler.ts index 7e4114148a4ed0..97e56795a9dfc5 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/overall_histogram_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/overall_histogram_handler.ts @@ -22,7 +22,7 @@ import type { ResponseStreamFetchOptions } from '../response_stream_factory'; export const overallHistogramHandlerFactory = ({ abortSignal, - client, + esClient, requestBody, logDebugMessage, logger, @@ -42,19 +42,18 @@ export const overallHistogramHandlerFactory = try { overallTimeSeries = ( - (await fetchHistogramsForFields( - client, - requestBody.index, - overallHistogramQuery, - // fields - histogramFields, - // samplerShardSize - -1, - undefined, + (await fetchHistogramsForFields({ + esClient, abortSignal, - stateHandler.sampleProbability(), - RANDOM_SAMPLER_SEED - )) as [NumericChartData] + arguments: { + indexPattern: requestBody.index, + query: overallHistogramQuery, + fields: histogramFields, + samplerShardSize: -1, + randomSamplerProbability: stateHandler.sampleProbability(), + randomSamplerSeed: RANDOM_SAMPLER_SEED, + }, + })) as [NumericChartData] )[0]; } catch (e) { if (!isRequestAbortedError(e)) { diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts index 92d400b466653d..197cc17b77a91e 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts @@ -46,7 +46,7 @@ type Candidate = FieldCandidate | TextFieldCandidate; export const significantItemsHandlerFactory = ({ abortSignal, - client, + esClient, logDebugMessage, logger, requestBody, @@ -110,15 +110,17 @@ export const significantItemsHandlerFactory = let pValues: Awaited>; try { - pValues = await fetchSignificantTermPValues( - client, - requestBody, - [fieldCandidate], + pValues = await fetchSignificantTermPValues({ + esClient, + abortSignal, logger, - stateHandler.sampleProbability(), - responseStream.pushError, - abortSignal - ); + emitError: responseStream.pushError, + arguments: { + ...requestBody, + fieldNames: [fieldCandidate], + sampleProbability: stateHandler.sampleProbability(), + }, + }); } catch (e) { if (!isRequestAbortedError(e)) { logger.error( @@ -144,15 +146,17 @@ export const significantItemsHandlerFactory = } else if (isTextFieldCandidate(payload)) { const { textFieldCandidate } = payload; - const significantCategoriesForField = await fetchSignificantCategories( - client, - requestBody, - [textFieldCandidate], + const significantCategoriesForField = await fetchSignificantCategories({ + esClient, logger, - stateHandler.sampleProbability(), - responseStream.pushError, - abortSignal - ); + emitError: responseStream.pushError, + abortSignal, + arguments: { + ...requestBody, + fieldNames: [textFieldCandidate], + sampleProbability: stateHandler.sampleProbability(), + }, + }); if (significantCategoriesForField.length > 0) { significantCategories.push(...significantCategoriesForField); diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/top_items_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/top_items_handler.ts index 8844bd5082e33c..882057bc12cbf4 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/top_items_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/top_items_handler.ts @@ -33,7 +33,7 @@ import type { ResponseStreamFetchOptions } from '../response_stream_factory'; export const topItemsHandlerFactory = ({ abortSignal, - client, + esClient, logDebugMessage, logger, requestBody, @@ -64,7 +64,7 @@ export const topItemsHandlerFactory = if (textFieldCandidates.length > 0) { topCategories.push( ...(await fetchTopCategories( - client, + esClient, requestBody, textFieldCandidates, logger, @@ -113,7 +113,7 @@ export const topItemsHandlerFactory = try { fetchedTopTerms = await fetchTopTerms( - client, + esClient, requestBody, [fieldCandidate], logger, diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_factory.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_factory.ts index f6ada20d3f4f83..a3e525598ef254 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_factory.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/response_stream_factory.ts @@ -39,7 +39,7 @@ import { streamPushPingWithTimeoutFactory } from './response_stream_utils/stream */ export interface ResponseStreamOptions { version: T; - client: ElasticsearchClient; + esClient: ElasticsearchClient; requestBody: AiopsLogRateAnalysisSchema; events: KibanaRequestEvents; headers: Headers; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/route_handler_factory.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/route_handler_factory.ts index 0864efbcf63da7..4c8145043891f0 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/route_handler_factory.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/route_handler_factory.ts @@ -58,14 +58,14 @@ export function routeHandlerFactory( return response.forbidden(); } - const client = (await context.core).elasticsearch.client.asCurrentUser; + const esClient = (await context.core).elasticsearch.client.asCurrentUser; const executionContext = createExecutionContext(coreStart, AIOPS_PLUGIN_ID, request.route.path); return await coreStart.executionContext.withContext(executionContext, () => { const { analysis, logDebugMessage, stateHandler, responseStream, responseWithHeaders } = responseStreamFactory({ version, - client, + esClient, requestBody: request.body, events: request.events, headers: request.headers, diff --git a/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts b/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts index 9bde3c51063868..04db54521680b5 100644 --- a/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts +++ b/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts @@ -217,14 +217,16 @@ export class DataVisualizer { samplerShardSize: number, runtimeMappings?: RuntimeMappings ): Promise { - return await fetchHistogramsForFields( - this._asCurrentUser, - indexPattern, - query, - fields, - samplerShardSize, - runtimeMappings - ); + return await fetchHistogramsForFields({ + esClient: this._asCurrentUser, + arguments: { + indexPattern, + query, + fields, + samplerShardSize, + runtimeMappings, + }, + }); } // Obtains statistics for supplied list of fields. The statistics for each field in the diff --git a/x-pack/plugins/transform/server/routes/api/field_histograms/route_handler.ts b/x-pack/plugins/transform/server/routes/api/field_histograms/route_handler.ts index 365813860462ae..1d3c8183840fba 100644 --- a/x-pack/plugins/transform/server/routes/api/field_histograms/route_handler.ts +++ b/x-pack/plugins/transform/server/routes/api/field_histograms/route_handler.ts @@ -23,14 +23,16 @@ export const routeHandler: RequestHandler< try { const esClient = (await ctx.core).elasticsearch.client; - const resp = await fetchHistogramsForFields( - esClient.asCurrentUser, - dataViewTitle, - query, - fields, - samplerShardSize, - runtimeMappings - ); + const resp = await fetchHistogramsForFields({ + esClient: esClient.asCurrentUser, + arguments: { + indexPattern: dataViewTitle, + query, + fields, + samplerShardSize, + runtimeMappings, + }, + }); return res.ok({ body: resp }); } catch (e) { From 35ee0ccbb0f45310525865d24ad0d5cba68d10f6 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Mon, 8 Jul 2024 11:10:38 -0700 Subject: [PATCH 022/103] [OAS][Cases] Add case templates to case configuration APIs (#187613) --- .../plugins/cases/docs/openapi/bundled.json | 959 ++++++++++++------ .../plugins/cases/docs/openapi/bundled.yaml | 688 ++++++++----- .../get_case_configuration_response.yaml | 30 +- .../set_case_configuration_request.yaml | 23 +- .../set_case_configuration_response.yaml | 24 +- .../update_case_configuration_request.yaml | 1 + .../update_case_configuration_response.yaml | 15 +- .../components/schemas/case_category.yaml | 3 + .../schemas/case_configure_customfields.yaml | 8 + .../case_configure_response_properties.yaml | 18 +- .../components/schemas/case_description.yaml | 3 + .../schemas/case_response_properties.yaml | 4 +- ...erity_property.yaml => case_severity.yaml} | 0 .../schemas/{status.yaml => case_status.yaml} | 0 .../openapi/components/schemas/case_tags.yaml | 7 + .../components/schemas/case_title.yaml | 3 + .../schemas/create_case_request.yaml | 21 +- .../schemas/payload_create_case.yaml | 4 +- .../components/schemas/payload_severity.yaml | 2 +- .../components/schemas/payload_status.yaml | 2 +- .../set_case_configuration_request.yaml | 2 + .../components/schemas/template_tags.yaml | 7 + .../openapi/components/schemas/templates.yaml | 66 ++ .../update_case_configuration_request.yaml | 5 +- .../schemas/update_case_request.yaml | 22 +- .../openapi/paths/api@cases@configure.yaml | 12 +- .../api@cases@configure@connectors@_find.yaml | 7 +- ...api@cases@configure@{configurationid}.yaml | 8 +- .../s@{spaceid}@api@cases@configure.yaml | 21 +- ...@api@cases@configure@connectors@_find.yaml | 7 +- ...api@cases@configure@{configurationid}.yaml | 9 +- .../routes/api/configure/get_configure.ts | 4 +- .../routes/api/configure/get_connectors.ts | 4 +- .../routes/api/configure/patch_configure.ts | 4 +- .../routes/api/configure/post_configure.ts | 4 +- 35 files changed, 1367 insertions(+), 630 deletions(-) create mode 100644 x-pack/plugins/cases/docs/openapi/components/schemas/case_category.yaml create mode 100644 x-pack/plugins/cases/docs/openapi/components/schemas/case_description.yaml rename x-pack/plugins/cases/docs/openapi/components/schemas/{severity_property.yaml => case_severity.yaml} (100%) rename x-pack/plugins/cases/docs/openapi/components/schemas/{status.yaml => case_status.yaml} (100%) create mode 100644 x-pack/plugins/cases/docs/openapi/components/schemas/case_tags.yaml create mode 100644 x-pack/plugins/cases/docs/openapi/components/schemas/case_title.yaml create mode 100644 x-pack/plugins/cases/docs/openapi/components/schemas/template_tags.yaml create mode 100644 x-pack/plugins/cases/docs/openapi/components/schemas/templates.yaml diff --git a/x-pack/plugins/cases/docs/openapi/bundled.json b/x-pack/plugins/cases/docs/openapi/bundled.json index 152a5c34e87a43..6bc965f7ee5fc3 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.json +++ b/x-pack/plugins/cases/docs/openapi/bundled.json @@ -354,9 +354,9 @@ }, "/api/cases/configure": { "get": { - "summary": "Retrieves external connection details, such as the closure type and default connector for cases in the default space.", + "summary": "Get case settings in the default space", "operationId": "getCaseConfigurationDefaultSpace", - "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration.\n", + "description": "Retrieves setting details such as the closure type, custom fields, templatse, and the default connector for cases in the default space. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created.\n", "tags": [ "cases" ], @@ -378,40 +378,6 @@ "closure_type": { "$ref": "#/components/schemas/closure_types" }, - "customFields": { - "type": "array", - "x-technical-preview": true, - "description": "Custom fields configuration details.", - "items": { - "type": "object", - "properties": { - "key": { - "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", - "type": "string", - "minLength": 1, - "maxLength": 36 - }, - "label": { - "description": "The custom field label that is displayed in the case.", - "type": "string", - "minLength": 1, - "maxLength": 50 - }, - "required": { - "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", - "type": "boolean" - }, - "type": { - "description": "The type of the custom field.", - "type": "string", - "enum": [ - "text", - "toggle" - ] - } - } - } - }, "connector": { "type": "object", "properties": { @@ -491,6 +457,51 @@ } } }, + "customFields": { + "type": "array", + "x-technical-preview": true, + "description": "Custom fields configuration details.", + "items": { + "type": "object", + "properties": { + "defaultValue": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n" + }, + "key": { + "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", + "type": "string", + "minLength": 1, + "maxLength": 36 + }, + "label": { + "description": "The custom field label that is displayed in the case.", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "required": { + "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", + "type": "boolean" + }, + "type": { + "description": "The type of the custom field.", + "type": "string", + "enum": [ + "text", + "toggle" + ] + } + } + } + }, "error": { "type": [ "string", @@ -535,6 +546,9 @@ "owner": { "$ref": "#/components/schemas/owners" }, + "templates": { + "$ref": "#/components/schemas/templates" + }, "updated_at": { "type": [ "string", @@ -621,9 +635,9 @@ } }, "post": { - "summary": "Creates a case specific configuration that includes external connection details and custom fields.", + "summary": "Add case settings in the default space", "operationId": "setCaseConfigurationDefaultSpace", - "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. Refer to the add connectors API. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details.\n", + "description": "Case settings include external connection details, custom fields, and templates. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases.\n", "tags": [ "cases" ], @@ -657,40 +671,6 @@ "closure_type": { "$ref": "#/components/schemas/closure_types" }, - "customFields": { - "type": "array", - "x-technical-preview": true, - "description": "Custom fields configuration details.", - "items": { - "type": "object", - "properties": { - "key": { - "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", - "type": "string", - "minLength": 1, - "maxLength": 36 - }, - "label": { - "description": "The custom field label that is displayed in the case.", - "type": "string", - "minLength": 1, - "maxLength": 50 - }, - "required": { - "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", - "type": "boolean" - }, - "type": { - "description": "The type of the custom field.", - "type": "string", - "enum": [ - "text", - "toggle" - ] - } - } - } - }, "connector": { "type": "object", "properties": { @@ -770,6 +750,51 @@ } } }, + "customFields": { + "type": "array", + "x-technical-preview": true, + "description": "Custom fields configuration details.", + "items": { + "type": "object", + "properties": { + "defaultValue": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n" + }, + "key": { + "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", + "type": "string", + "minLength": 1, + "maxLength": 36 + }, + "label": { + "description": "The custom field label that is displayed in the case.", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "required": { + "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", + "type": "boolean" + }, + "type": { + "description": "The type of the custom field.", + "type": "string", + "enum": [ + "text", + "toggle" + ] + } + } + } + }, "error": { "type": [ "string", @@ -814,6 +839,9 @@ "owner": { "$ref": "#/components/schemas/owners" }, + "templates": { + "$ref": "#/components/schemas/templates" + }, "updated_at": { "type": [ "string", @@ -901,9 +929,9 @@ }, "/api/cases/configure/{configurationId}": { "patch": { - "summary": "Updates external connection details, such as the closure type and default connector for cases in the default space.", + "summary": "Update case settings in the default space", "operationId": "updateCaseConfigurationDefaultSpace", - "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. Refer to the add connectors API.\n", + "description": "Updates setting details such as the closure type, custom fields, templates, and the default connector for cases in the default space. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created.\n", "tags": [ "cases" ], @@ -940,40 +968,6 @@ "closure_type": { "$ref": "#/components/schemas/closure_types" }, - "customFields": { - "type": "array", - "x-technical-preview": true, - "description": "Custom fields configuration details.", - "items": { - "type": "object", - "properties": { - "key": { - "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", - "type": "string", - "minLength": 1, - "maxLength": 36 - }, - "label": { - "description": "The custom field label that is displayed in the case.", - "type": "string", - "minLength": 1, - "maxLength": 50 - }, - "required": { - "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", - "type": "boolean" - }, - "type": { - "description": "The type of the custom field.", - "type": "string", - "enum": [ - "text", - "toggle" - ] - } - } - } - }, "connector": { "type": "object", "properties": { @@ -1053,6 +1047,51 @@ } } }, + "customFields": { + "type": "array", + "x-technical-preview": true, + "description": "Custom fields configuration details.", + "items": { + "type": "object", + "properties": { + "defaultValue": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n" + }, + "key": { + "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", + "type": "string", + "minLength": 1, + "maxLength": 36 + }, + "label": { + "description": "The custom field label that is displayed in the case.", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "required": { + "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", + "type": "boolean" + }, + "type": { + "description": "The type of the custom field.", + "type": "string", + "enum": [ + "text", + "toggle" + ] + } + } + } + }, "error": { "type": [ "string", @@ -1097,6 +1136,9 @@ "owner": { "$ref": "#/components/schemas/owners" }, + "templates": { + "$ref": "#/components/schemas/templates" + }, "updated_at": { "type": [ "string", @@ -1903,9 +1945,9 @@ }, "/api/cases/configure/connectors/_find": { "get": { - "summary": "Retrieves information about connectors in the default space.", + "summary": "Get case connectors in the default space", "operationId": "findCaseConnectorsDefaultSpace", - "description": "In particular, only the connectors that are supported for use in cases are returned. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", + "description": "Retrieves information about connectors that are supported for use in cases in the default space. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", "tags": [ "cases" ], @@ -2312,9 +2354,9 @@ }, "/s/{spaceId}/api/cases/configure": { "get": { - "summary": "Retrieves external connection details, such as the closure type and default connector for cases.", + "summary": "Get case settings", "operationId": "getCaseConfiguration", - "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration.\n", + "description": "Retrieves setting details such as the closure type, custom fields, templates, and the default connector for cases. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created.\n", "tags": [ "cases" ], @@ -2339,40 +2381,6 @@ "closure_type": { "$ref": "#/components/schemas/closure_types" }, - "customFields": { - "type": "array", - "x-technical-preview": true, - "description": "Custom fields configuration details.", - "items": { - "type": "object", - "properties": { - "key": { - "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", - "type": "string", - "minLength": 1, - "maxLength": 36 - }, - "label": { - "description": "The custom field label that is displayed in the case.", - "type": "string", - "minLength": 1, - "maxLength": 50 - }, - "required": { - "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", - "type": "boolean" - }, - "type": { - "description": "The type of the custom field.", - "type": "string", - "enum": [ - "text", - "toggle" - ] - } - } - } - }, "connector": { "type": "object", "properties": { @@ -2452,6 +2460,51 @@ } } }, + "customFields": { + "type": "array", + "x-technical-preview": true, + "description": "Custom fields configuration details.", + "items": { + "type": "object", + "properties": { + "defaultValue": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n" + }, + "key": { + "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", + "type": "string", + "minLength": 1, + "maxLength": 36 + }, + "label": { + "description": "The custom field label that is displayed in the case.", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "required": { + "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", + "type": "boolean" + }, + "type": { + "description": "The type of the custom field.", + "type": "string", + "enum": [ + "text", + "toggle" + ] + } + } + } + }, "error": { "type": [ "string", @@ -2496,6 +2549,9 @@ "owner": { "$ref": "#/components/schemas/owners" }, + "templates": { + "$ref": "#/components/schemas/templates" + }, "updated_at": { "type": [ "string", @@ -2582,9 +2638,9 @@ } }, "post": { - "summary": "Creates a case specific configuration that includes external connection details and custom fields.", + "summary": "Add case settings", "operationId": "setCaseConfiguration", - "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. Refer to the add connectors API. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details.\n", + "description": "Case settings include external connection details, custom fields, and templates. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases.\n", "tags": [ "cases" ], @@ -2621,40 +2677,6 @@ "closure_type": { "$ref": "#/components/schemas/closure_types" }, - "customFields": { - "type": "array", - "x-technical-preview": true, - "description": "Custom fields configuration details.", - "items": { - "type": "object", - "properties": { - "key": { - "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", - "type": "string", - "minLength": 1, - "maxLength": 36 - }, - "label": { - "description": "The custom field label that is displayed in the case.", - "type": "string", - "minLength": 1, - "maxLength": 50 - }, - "required": { - "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", - "type": "boolean" - }, - "type": { - "description": "The type of the custom field.", - "type": "string", - "enum": [ - "text", - "toggle" - ] - } - } - } - }, "connector": { "type": "object", "properties": { @@ -2734,6 +2756,51 @@ } } }, + "customFields": { + "type": "array", + "x-technical-preview": true, + "description": "Custom fields configuration details.", + "items": { + "type": "object", + "properties": { + "defaultValue": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n" + }, + "key": { + "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", + "type": "string", + "minLength": 1, + "maxLength": 36 + }, + "label": { + "description": "The custom field label that is displayed in the case.", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "required": { + "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", + "type": "boolean" + }, + "type": { + "description": "The type of the custom field.", + "type": "string", + "enum": [ + "text", + "toggle" + ] + } + } + } + }, "error": { "type": [ "string", @@ -2778,6 +2845,9 @@ "owner": { "$ref": "#/components/schemas/owners" }, + "templates": { + "$ref": "#/components/schemas/templates" + }, "updated_at": { "type": [ "string", @@ -2865,9 +2935,9 @@ }, "/s/{spaceId}/api/cases/configure/{configurationId}": { "patch": { - "summary": "Updates external connection details, such as the closure type and default connector for cases.", + "summary": "Update case settings", "operationId": "updateCaseConfiguration", - "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. Refer to the add connectors API.\n", + "description": "Updates setting details such as the closure type, custom fields, templates, and the default connector for cases. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created.\n", "tags": [ "cases" ], @@ -2878,68 +2948,34 @@ { "$ref": "#/components/parameters/configuration_id" }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/update_case_configuration_request" - }, - "examples": { - "updateCaseConfigurationRequest": { - "$ref": "#/components/examples/update_case_configuration_request" - } - } - } - } - }, - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "closure_type": { - "$ref": "#/components/schemas/closure_types" - }, - "customFields": { - "type": "array", - "x-technical-preview": true, - "description": "Custom fields configuration details.", - "items": { - "type": "object", - "properties": { - "key": { - "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", - "type": "string", - "minLength": 1, - "maxLength": 36 - }, - "label": { - "description": "The custom field label that is displayed in the case.", - "type": "string", - "minLength": 1, - "maxLength": 50 - }, - "required": { - "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", - "type": "boolean" - }, - "type": { - "description": "The type of the custom field.", - "type": "string", - "enum": [ - "text", - "toggle" - ] - } - } - } + { + "$ref": "#/components/parameters/space_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/update_case_configuration_request" + }, + "examples": { + "updateCaseConfigurationRequest": { + "$ref": "#/components/examples/update_case_configuration_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "closure_type": { + "$ref": "#/components/schemas/closure_types" }, "connector": { "type": "object", @@ -3020,6 +3056,51 @@ } } }, + "customFields": { + "type": "array", + "x-technical-preview": true, + "description": "Custom fields configuration details.", + "items": { + "type": "object", + "properties": { + "defaultValue": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n" + }, + "key": { + "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", + "type": "string", + "minLength": 1, + "maxLength": 36 + }, + "label": { + "description": "The custom field label that is displayed in the case.", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "required": { + "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", + "type": "boolean" + }, + "type": { + "description": "The type of the custom field.", + "type": "string", + "enum": [ + "text", + "toggle" + ] + } + } + } + }, "error": { "type": [ "string", @@ -3064,6 +3145,9 @@ "owner": { "$ref": "#/components/schemas/owners" }, + "templates": { + "$ref": "#/components/schemas/templates" + }, "updated_at": { "type": [ "string", @@ -3151,9 +3235,9 @@ }, "/s/{spaceId}/api/cases/configure/connectors/_find": { "get": { - "summary": "Retrieves information about connectors.", + "summary": "Get case connectors", "operationId": "findCaseConnectors", - "description": "In particular, only the connectors that are supported for use in cases are returned. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", + "description": "Retrieves information about connectors that are supported for use in cases. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", "tags": [ "cases" ], @@ -4908,6 +4992,11 @@ } } }, + "case_description": { + "description": "The description for the case.", + "type": "string", + "maxLength": 30000 + }, "owners": { "type": "string", "description": "The application that owns the cases: Stack Management, Observability, or Elastic Security.\n", @@ -4936,7 +5025,7 @@ } } }, - "severity_property": { + "case_severity": { "type": "string", "description": "The severity of the case.", "enum": [ @@ -4947,6 +5036,25 @@ ], "default": "low" }, + "case_tags": { + "description": "The words and phrases that help categorize cases. It can be an empty array.\n", + "type": "array", + "maxItems": 200, + "items": { + "type": "string", + "maxLength": 256 + } + }, + "case_category": { + "description": "A word or phrase that categorizes the case.", + "type": "string", + "maxLength": 50 + }, + "case_title": { + "description": "A title for the case.", + "type": "string", + "maxLength": 160 + }, "create_case_request": { "title": "Create case request", "description": "The create case API request body varies depending on the type of connector.", @@ -4989,9 +5097,7 @@ ] }, "description": { - "description": "The description for the case.", - "type": "string", - "maxLength": 30000 + "$ref": "#/components/schemas/case_description" }, "owner": { "$ref": "#/components/schemas/owners" @@ -5000,26 +5106,16 @@ "$ref": "#/components/schemas/settings" }, "severity": { - "$ref": "#/components/schemas/severity_property" + "$ref": "#/components/schemas/case_severity" }, "tags": { - "description": "The words and phrases that help categorize cases. It can be an empty array.", - "type": "array", - "maxItems": 200, - "items": { - "type": "string", - "maxLength": 256 - } + "$ref": "#/components/schemas/case_tags" }, "category": { - "description": "A word or phrase that categorizes the case.", - "type": "string", - "maxLength": 50 + "$ref": "#/components/schemas/case_category" }, "title": { - "description": "A title for the case.", - "type": "string", - "maxLength": 160 + "$ref": "#/components/schemas/case_title" }, "customFields": { "type": "array", @@ -5625,7 +5721,7 @@ } } }, - "status": { + "case_status": { "type": "string", "description": "The status of the case.", "enum": [ @@ -5822,10 +5918,10 @@ "$ref": "#/components/schemas/settings" }, "severity": { - "$ref": "#/components/schemas/severity_property" + "$ref": "#/components/schemas/case_severity" }, "status": { - "$ref": "#/components/schemas/status" + "$ref": "#/components/schemas/case_status" }, "tags": { "type": "array", @@ -5919,9 +6015,7 @@ "$ref": "#/components/schemas/assignees" }, "category": { - "description": "A word or phrase that categorizes the case.", - "type": "string", - "maxLength": 50 + "$ref": "#/components/schemas/case_category" }, "connector": { "oneOf": [ @@ -5994,8 +6088,7 @@ } }, "description": { - "description": "An updated description for the case.", - "type": "string" + "$ref": "#/components/schemas/case_description" }, "id": { "description": "The identifier for the case.", @@ -6006,24 +6099,16 @@ "$ref": "#/components/schemas/settings" }, "severity": { - "$ref": "#/components/schemas/severity_property" + "$ref": "#/components/schemas/case_severity" }, "status": { - "$ref": "#/components/schemas/status" + "$ref": "#/components/schemas/case_status" }, "tags": { - "description": "The words and phrases that help categorize cases.", - "type": "array", - "maxItems": 200, - "items": { - "type": "string", - "maxLength": 256 - } + "$ref": "#/components/schemas/case_tags" }, "title": { - "description": "A title for the case.", - "type": "string", - "maxLength": 160 + "$ref": "#/components/schemas/case_title" }, "version": { "description": "The current version of the case. To determine this value, use the get case or find cases APIs.", @@ -6069,6 +6154,127 @@ ".none" ] }, + "template_tags": { + "description": "The words and phrases that help categorize templates. It can be an empty array.\n", + "type": "array", + "maxItems": 200, + "items": { + "type": "string", + "maxLength": 256 + } + }, + "templates": { + "type": "array", + "x-technical-preview": true, + "items": { + "type": "object", + "properties": { + "caseFields": { + "type": "object", + "properties": { + "assignees": { + "$ref": "#/components/schemas/assignees" + }, + "category": { + "$ref": "#/components/schemas/case_category" + }, + "connector": { + "type": "object", + "properties": { + "fields": { + "description": "The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.", + "type": [ + "object", + "null" + ] + }, + "id": { + "description": "The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.", + "type": "string", + "examples": [ + "none" + ] + }, + "name": { + "description": "The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.", + "type": "string", + "examples": [ + "none" + ] + }, + "type": { + "$ref": "#/components/schemas/connector_types" + } + } + }, + "customFields": { + "type": "array", + "x-technical-preview": true, + "description": "Custom field values in the template.", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "The unique key for the custom field." + }, + "type": { + "type": "string", + "enum": [ + "text", + "toggle" + ], + "description": "The type of the custom field." + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "The default value for the custom field when a case uses the template. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n" + } + } + } + }, + "description": { + "$ref": "#/components/schemas/case_description" + }, + "settings": { + "$ref": "#/components/schemas/settings" + }, + "severity": { + "$ref": "#/components/schemas/case_severity" + }, + "tags": { + "$ref": "#/components/schemas/case_tags" + }, + "title": { + "$ref": "#/components/schemas/case_title" + } + } + }, + "description": { + "type": "string", + "description": "A description for the template." + }, + "key": { + "type": "string", + "description": "A unique key for the template. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific template.\n" + }, + "name": { + "type": "string", + "description": "The name of the template." + }, + "tags": { + "$ref": "#/components/schemas/template_tags" + } + } + } + }, "set_case_configuration_request": { "title": "Set case configuration request", "description": "External connection details, such as the closure type and default connector for cases.", @@ -6133,6 +6339,17 @@ "type" ], "properties": { + "defaultValue": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n" + }, "key": { "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", "type": "string", @@ -6162,12 +6379,15 @@ }, "owner": { "$ref": "#/components/schemas/owners" + }, + "templates": { + "$ref": "#/components/schemas/templates" } } }, "update_case_configuration_request": { "title": "Update case configuration request", - "description": "External connection details, such as the closure type and default connector for cases.", + "description": "You can update settings such as the closure type, custom fields, templates, and the default connector for cases.\n", "type": "object", "required": [ "version" @@ -6225,6 +6445,17 @@ "type" ], "properties": { + "defaultValue": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n" + }, "key": { "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", "type": "string", @@ -6252,6 +6483,9 @@ } } }, + "templates": { + "$ref": "#/components/schemas/templates" + }, "version": { "description": "The version of the connector. To retrieve the version value, use the get configuration API.\n", "type": "string", @@ -6875,10 +7109,10 @@ "$ref": "#/components/schemas/settings" }, "severity": { - "$ref": "#/components/schemas/severity_property" + "$ref": "#/components/schemas/case_severity" }, "status": { - "$ref": "#/components/schemas/status" + "$ref": "#/components/schemas/case_status" }, "tags": { "type": "array", @@ -6931,7 +7165,7 @@ "type": "object", "properties": { "severity": { - "$ref": "#/components/schemas/severity_property" + "$ref": "#/components/schemas/case_severity" } } }, @@ -6939,7 +7173,7 @@ "type": "object", "properties": { "status": { - "$ref": "#/components/schemas/status" + "$ref": "#/components/schemas/case_status" } } }, @@ -7590,13 +7824,14 @@ "customFields": [ { "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "defaultValue": "Custom text field value.", "label": "my-text-field", "required": false, "type": "text" } ], "owner": "cases", - "created_at": "2023-06-01T17:07:17.767Z", + "created_at": "2024-07-01T17:07:17.767Z", "created_by": { "username": "elastic", "email": null, @@ -7611,13 +7846,52 @@ "fields": null }, "mappings": [], - "version": "WzUxLDRd", - "error": null + "version": "WzEyLDNd", + "error": null, + "templates": [ + { + "key": "505932fe-ee3a-4960-a661-c781b5acdb05", + "name": "template-1", + "caseFields": { + "title": "Default case title", + "tags": [ + "Default case tag" + ], + "category": "Default-category", + "description": "A default description for cases.", + "assignees": [ + { + "uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + } + ], + "connector": { + "id": "none", + "type": ".none", + "fields": null, + "name": "none" + }, + "customFields": [ + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "value": "Default text field value.", + "type": "text" + } + ], + "settings": { + "syncAlerts": false + } + }, + "description": "A description of the template.", + "tags": [ + "Template tag 1" + ] + } + ] } ] }, "set_case_configuration_request": { - "summary": "Set the closure type and default connector for Stack Management cases.", + "summary": "Set the closure type, custom fields, and default connector for Stack Management cases.", "value": { "owner": "cases", "connector": { @@ -7632,7 +7906,38 @@ "key": "d312efda-ec2b-42ec-9e2c-84981795c581", "label": "my-text-field", "required": false, - "type": "text" + "type": "text", + "defaultValue": "My custom field default value." + } + ], + "templates": [ + { + "key": "505932fe-ee3a-4960-a661-c781b5acdb05", + "name": "template-1", + "caseFields": { + "title": "Default case title", + "tags": [ + "Default case tag" + ], + "category": "Default-category", + "description": "A default description for cases.", + "assignees": [ + { + "uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + } + ], + "customFields": [ + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "type": "text", + "value": "A text field value for the template." + } + ] + }, + "description": "A description of the template.", + "tags": [ + "Template tag 1" + ] } ] } @@ -7646,11 +7951,42 @@ "key": "d312efda-ec2b-42ec-9e2c-84981795c581", "label": "my-text-field", "required": false, - "type": "text" + "type": "text", + "defaultValue": "My custom field default value." + } + ], + "templates": [ + { + "key": "505932fe-ee3a-4960-a661-c781b5acdb05", + "name": "template-1", + "caseFields": { + "title": "Default case title", + "tags": [ + "Default case tag" + ], + "category": "Default-category", + "description": "A default description for cases.", + "assignees": [ + { + "uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + } + ], + "customFields": [ + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "type": "text", + "value": "A text field value for the template." + } + ] + }, + "description": "A description of the template.", + "tags": [ + "Template tag 1" + ] } ], "owner": "cases", - "created_at": "2023-10-01T17:07:17.767Z", + "created_at": "2024-07-01T17:07:17.767Z", "created_by": { "username": "elastic", "email": "null,", @@ -7680,6 +8016,11 @@ "source": "comments", "target": "comments", "action_type": "append" + }, + { + "source": "tags", + "target": "labels", + "action_type": "overwrite" } ], "version": "WzIwNzMsMV0=", @@ -7703,7 +8044,8 @@ "key": "d312efda-ec2b-42ec-9e2c-84981795c581", "label": "my-text-field", "required": true, - "type": "text" + "type": "text", + "defaultValue": "A new default value." }, { "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", @@ -7723,7 +8065,8 @@ "key": "d312efda-ec2b-42ec-9e2c-84981795c581", "label": "my-text-field", "required": true, - "type": "text" + "type": "text", + "defaultValue": "A new default value." }, { "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", @@ -7733,14 +8076,14 @@ } ], "owner": "cases", - "created_at": "2023-10-01T17:07:17.767Z", + "created_at": "2024-07-01T17:07:17.767Z", "created_by": { "username": "elastic", - "email": "null,", + "email": null, "full_name": null, "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, - "updated_at": "2023-10-19T00:52:42.401Z", + "updated_at": "2024-07-19T00:52:42.401Z", "updated_by": { "username": "elastic", "full_name": null, @@ -7764,15 +8107,21 @@ "target": "description", "action_type": "overwrite" }, + { + "source": "tags", + "target": "labels", + "action_type": "overwrite" + }, { "source": "comments", "target": "comments", "action_type": "append" } ], - "version": "zEzNSw1XQ==", + "version": "WzI2LDNd", "error": null, - "id": "4a97a440-e1cd-11ec-be9b-9b1838238ee6" + "id": "4a97a440-e1cd-11ec-be9b-9b1838238ee6", + "templates": [] } }, "get_reporters_response": { diff --git a/x-pack/plugins/cases/docs/openapi/bundled.yaml b/x-pack/plugins/cases/docs/openapi/bundled.yaml index 407958509f31cc..08032c30e7f501 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.yaml +++ b/x-pack/plugins/cases/docs/openapi/bundled.yaml @@ -205,10 +205,10 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/configure: get: - summary: Retrieves external connection details, such as the closure type and default connector for cases in the default space. + summary: Get case settings in the default space operationId: getCaseConfigurationDefaultSpace description: | - You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. + Retrieves setting details such as the closure type, custom fields, templatse, and the default connector for cases in the default space. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created. tags: - cases parameters: @@ -225,34 +225,6 @@ paths: properties: closure_type: $ref: '#/components/schemas/closure_types' - customFields: - type: array - x-technical-preview: true - description: Custom fields configuration details. - items: - type: object - properties: - key: - description: | - A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. - type: string - minLength: 1 - maxLength: 36 - label: - description: The custom field label that is displayed in the case. - type: string - minLength: 1 - maxLength: 50 - required: - description: | - Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. - type: boolean - type: - description: The type of the custom field. - type: string - enum: - - text - - toggle connector: type: object properties: @@ -307,6 +279,40 @@ paths: - 'null' examples: - elastic + customFields: + type: array + x-technical-preview: true + description: Custom fields configuration details. + items: + type: object + properties: + defaultValue: + oneOf: + - type: string + - type: boolean + description: | + A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean. + key: + description: | + A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 + required: + description: | + Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle error: type: - string @@ -336,6 +342,8 @@ paths: - summary owner: $ref: '#/components/schemas/owners' + templates: + $ref: '#/components/schemas/templates' updated_at: type: - string @@ -388,10 +396,10 @@ paths: schema: $ref: '#/components/schemas/4xx_response' post: - summary: Creates a case specific configuration that includes external connection details and custom fields. + summary: Add case settings in the default space operationId: setCaseConfigurationDefaultSpace description: | - You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. Refer to the add connectors API. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. + Case settings include external connection details, custom fields, and templates. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases. tags: - cases parameters: @@ -414,34 +422,6 @@ paths: properties: closure_type: $ref: '#/components/schemas/closure_types' - customFields: - type: array - x-technical-preview: true - description: Custom fields configuration details. - items: - type: object - properties: - key: - description: | - A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. - type: string - minLength: 1 - maxLength: 36 - label: - description: The custom field label that is displayed in the case. - type: string - minLength: 1 - maxLength: 50 - required: - description: | - Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. - type: boolean - type: - description: The type of the custom field. - type: string - enum: - - text - - toggle connector: type: object properties: @@ -496,6 +476,40 @@ paths: - 'null' examples: - elastic + customFields: + type: array + x-technical-preview: true + description: Custom fields configuration details. + items: + type: object + properties: + defaultValue: + oneOf: + - type: string + - type: boolean + description: | + A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean. + key: + description: | + A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 + required: + description: | + Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle error: type: - string @@ -525,6 +539,8 @@ paths: - summary owner: $ref: '#/components/schemas/owners' + templates: + $ref: '#/components/schemas/templates' updated_at: type: - string @@ -578,10 +594,10 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/configure/{configurationId}: patch: - summary: Updates external connection details, such as the closure type and default connector for cases in the default space. + summary: Update case settings in the default space operationId: updateCaseConfigurationDefaultSpace description: | - You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. Refer to the add connectors API. + Updates setting details such as the closure type, custom fields, templates, and the default connector for cases in the default space. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created. tags: - cases parameters: @@ -605,34 +621,6 @@ paths: properties: closure_type: $ref: '#/components/schemas/closure_types' - customFields: - type: array - x-technical-preview: true - description: Custom fields configuration details. - items: - type: object - properties: - key: - description: | - A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. - type: string - minLength: 1 - maxLength: 36 - label: - description: The custom field label that is displayed in the case. - type: string - minLength: 1 - maxLength: 50 - required: - description: | - Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. - type: boolean - type: - description: The type of the custom field. - type: string - enum: - - text - - toggle connector: type: object properties: @@ -687,6 +675,40 @@ paths: - 'null' examples: - elastic + customFields: + type: array + x-technical-preview: true + description: Custom fields configuration details. + items: + type: object + properties: + defaultValue: + oneOf: + - type: string + - type: boolean + description: | + A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean. + key: + description: | + A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 + required: + description: | + Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle error: type: - string @@ -716,6 +738,8 @@ paths: - summary owner: $ref: '#/components/schemas/owners' + templates: + $ref: '#/components/schemas/templates' updated_at: type: - string @@ -1208,10 +1232,10 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/configure/connectors/_find: get: - summary: Retrieves information about connectors in the default space. + summary: Get case connectors in the default space operationId: findCaseConnectorsDefaultSpace description: | - In particular, only the connectors that are supported for use in cases are returned. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + Retrieves information about connectors that are supported for use in cases in the default space. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: - cases responses: @@ -1447,10 +1471,10 @@ paths: $ref: '#/components/schemas/4xx_response' /s/{spaceId}/api/cases/configure: get: - summary: Retrieves external connection details, such as the closure type and default connector for cases. + summary: Get case settings operationId: getCaseConfiguration description: | - You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. + Retrieves setting details such as the closure type, custom fields, templates, and the default connector for cases. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created. tags: - cases parameters: @@ -1468,34 +1492,6 @@ paths: properties: closure_type: $ref: '#/components/schemas/closure_types' - customFields: - type: array - x-technical-preview: true - description: Custom fields configuration details. - items: - type: object - properties: - key: - description: | - A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. - type: string - minLength: 1 - maxLength: 36 - label: - description: The custom field label that is displayed in the case. - type: string - minLength: 1 - maxLength: 50 - required: - description: | - Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. - type: boolean - type: - description: The type of the custom field. - type: string - enum: - - text - - toggle connector: type: object properties: @@ -1550,6 +1546,40 @@ paths: - 'null' examples: - elastic + customFields: + type: array + x-technical-preview: true + description: Custom fields configuration details. + items: + type: object + properties: + defaultValue: + oneOf: + - type: string + - type: boolean + description: | + A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean. + key: + description: | + A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 + required: + description: | + Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle error: type: - string @@ -1579,6 +1609,8 @@ paths: - summary owner: $ref: '#/components/schemas/owners' + templates: + $ref: '#/components/schemas/templates' updated_at: type: - string @@ -1631,10 +1663,10 @@ paths: schema: $ref: '#/components/schemas/4xx_response' post: - summary: Creates a case specific configuration that includes external connection details and custom fields. + summary: Add case settings operationId: setCaseConfiguration description: | - You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. Refer to the add connectors API. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. + Case settings include external connection details, custom fields, and templates. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases. tags: - cases parameters: @@ -1658,34 +1690,6 @@ paths: properties: closure_type: $ref: '#/components/schemas/closure_types' - customFields: - type: array - x-technical-preview: true - description: Custom fields configuration details. - items: - type: object - properties: - key: - description: | - A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. - type: string - minLength: 1 - maxLength: 36 - label: - description: The custom field label that is displayed in the case. - type: string - minLength: 1 - maxLength: 50 - required: - description: | - Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. - type: boolean - type: - description: The type of the custom field. - type: string - enum: - - text - - toggle connector: type: object properties: @@ -1740,6 +1744,40 @@ paths: - 'null' examples: - elastic + customFields: + type: array + x-technical-preview: true + description: Custom fields configuration details. + items: + type: object + properties: + defaultValue: + oneOf: + - type: string + - type: boolean + description: | + A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean. + key: + description: | + A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 + required: + description: | + Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle error: type: - string @@ -1769,6 +1807,8 @@ paths: - summary owner: $ref: '#/components/schemas/owners' + templates: + $ref: '#/components/schemas/templates' updated_at: type: - string @@ -1822,10 +1862,10 @@ paths: $ref: '#/components/schemas/4xx_response' /s/{spaceId}/api/cases/configure/{configurationId}: patch: - summary: Updates external connection details, such as the closure type and default connector for cases. + summary: Update case settings operationId: updateCaseConfiguration description: | - You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. Refer to the add connectors API. + Updates setting details such as the closure type, custom fields, templates, and the default connector for cases. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created. tags: - cases parameters: @@ -1850,34 +1890,6 @@ paths: properties: closure_type: $ref: '#/components/schemas/closure_types' - customFields: - type: array - x-technical-preview: true - description: Custom fields configuration details. - items: - type: object - properties: - key: - description: | - A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. - type: string - minLength: 1 - maxLength: 36 - label: - description: The custom field label that is displayed in the case. - type: string - minLength: 1 - maxLength: 50 - required: - description: | - Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. - type: boolean - type: - description: The type of the custom field. - type: string - enum: - - text - - toggle connector: type: object properties: @@ -1932,6 +1944,40 @@ paths: - 'null' examples: - elastic + customFields: + type: array + x-technical-preview: true + description: Custom fields configuration details. + items: + type: object + properties: + defaultValue: + oneOf: + - type: string + - type: boolean + description: | + A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean. + key: + description: | + A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 + required: + description: | + Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle error: type: - string @@ -1961,6 +2007,8 @@ paths: - summary owner: $ref: '#/components/schemas/owners' + templates: + $ref: '#/components/schemas/templates' updated_at: type: - string @@ -2014,10 +2062,10 @@ paths: $ref: '#/components/schemas/4xx_response' /s/{spaceId}/api/cases/configure/connectors/_find: get: - summary: Retrieves information about connectors. + summary: Get case connectors operationId: findCaseConnectors description: | - In particular, only the connectors that are supported for use in cases are returned. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + Retrieves information about connectors that are supported for use in cases. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: - cases parameters: @@ -3166,6 +3214,10 @@ components: - .swimlane enum: - .swimlane + case_description: + description: The description for the case. + type: string + maxLength: 30000 owners: type: string description: | @@ -3187,7 +3239,7 @@ components: type: boolean examples: - true - severity_property: + case_severity: type: string description: The severity of the case. enum: @@ -3196,6 +3248,22 @@ components: - low - medium default: low + case_tags: + description: | + The words and phrases that help categorize cases. It can be an empty array. + type: array + maxItems: 200 + items: + type: string + maxLength: 256 + case_category: + description: A word or phrase that categorizes the case. + type: string + maxLength: 50 + case_title: + description: A title for the case. + type: string + maxLength: 160 create_case_request: title: Create case request description: The create case API request body varies depending on the type of connector. @@ -3220,30 +3288,19 @@ components: - $ref: '#/components/schemas/connector_properties_servicenow_sir' - $ref: '#/components/schemas/connector_properties_swimlane' description: - description: The description for the case. - type: string - maxLength: 30000 + $ref: '#/components/schemas/case_description' owner: $ref: '#/components/schemas/owners' settings: $ref: '#/components/schemas/settings' severity: - $ref: '#/components/schemas/severity_property' + $ref: '#/components/schemas/case_severity' tags: - description: The words and phrases that help categorize cases. It can be an empty array. - type: array - maxItems: 200 - items: - type: string - maxLength: 256 + $ref: '#/components/schemas/case_tags' category: - description: A word or phrase that categorizes the case. - type: string - maxLength: 50 + $ref: '#/components/schemas/case_category' title: - description: A title for the case. - type: string - maxLength: 160 + $ref: '#/components/schemas/case_title' customFields: type: array description: | @@ -3656,7 +3713,7 @@ components: - 'null' examples: - elastic - status: + case_status: type: string description: The status of the case. enum: @@ -3795,9 +3852,9 @@ components: settings: $ref: '#/components/schemas/settings' severity: - $ref: '#/components/schemas/severity_property' + $ref: '#/components/schemas/case_severity' status: - $ref: '#/components/schemas/status' + $ref: '#/components/schemas/case_status' tags: type: array items: @@ -3862,9 +3919,7 @@ components: assignees: $ref: '#/components/schemas/assignees' category: - description: A word or phrase that categorizes the case. - type: string - maxLength: 50 + $ref: '#/components/schemas/case_category' connector: oneOf: - $ref: '#/components/schemas/connector_properties_none' @@ -3910,8 +3965,7 @@ components: maxLength: 160 - type: boolean description: - description: An updated description for the case. - type: string + $ref: '#/components/schemas/case_description' id: description: The identifier for the case. type: string @@ -3919,20 +3973,13 @@ components: settings: $ref: '#/components/schemas/settings' severity: - $ref: '#/components/schemas/severity_property' + $ref: '#/components/schemas/case_severity' status: - $ref: '#/components/schemas/status' + $ref: '#/components/schemas/case_status' tags: - description: The words and phrases that help categorize cases. - type: array - maxItems: 200 - items: - type: string - maxLength: 256 + $ref: '#/components/schemas/case_tags' title: - description: A title for the case. - type: string - maxLength: 160 + $ref: '#/components/schemas/case_title' version: description: The current version of the case. To determine this value, use the get case or find cases APIs. type: string @@ -3963,6 +4010,91 @@ components: - .swimlane examples: - .none + template_tags: + description: | + The words and phrases that help categorize templates. It can be an empty array. + type: array + maxItems: 200 + items: + type: string + maxLength: 256 + templates: + type: array + x-technical-preview: true + items: + type: object + properties: + caseFields: + type: object + properties: + assignees: + $ref: '#/components/schemas/assignees' + category: + $ref: '#/components/schemas/case_category' + connector: + type: object + properties: + fields: + description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. + type: + - object + - 'null' + id: + description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. + type: string + examples: + - none + name: + description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. + type: string + examples: + - none + type: + $ref: '#/components/schemas/connector_types' + customFields: + type: array + x-technical-preview: true + description: Custom field values in the template. + items: + type: object + properties: + key: + type: string + description: The unique key for the custom field. + type: + type: string + enum: + - text + - toggle + description: The type of the custom field. + value: + oneOf: + - type: string + - type: boolean + description: | + The default value for the custom field when a case uses the template. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean. + description: + $ref: '#/components/schemas/case_description' + settings: + $ref: '#/components/schemas/settings' + severity: + $ref: '#/components/schemas/case_severity' + tags: + $ref: '#/components/schemas/case_tags' + title: + $ref: '#/components/schemas/case_title' + description: + type: string + description: A description for the template. + key: + type: string + description: | + A unique key for the template. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific template. + name: + type: string + description: The name of the template. + tags: + $ref: '#/components/schemas/template_tags' set_case_configuration_request: title: Set case configuration request description: External connection details, such as the closure type and default connector for cases. @@ -4014,6 +4146,12 @@ components: - required - type properties: + defaultValue: + oneOf: + - type: string + - type: boolean + description: | + A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean. key: description: | A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. @@ -4037,9 +4175,12 @@ components: - toggle owner: $ref: '#/components/schemas/owners' + templates: + $ref: '#/components/schemas/templates' update_case_configuration_request: title: Update case configuration request - description: External connection details, such as the closure type and default connector for cases. + description: | + You can update settings such as the closure type, custom fields, templates, and the default connector for cases. type: object required: - version @@ -4084,6 +4225,12 @@ components: - required - type properties: + defaultValue: + oneOf: + - type: string + - type: boolean + description: | + A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean. key: description: | A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. @@ -4105,6 +4252,8 @@ components: enum: - text - toggle + templates: + $ref: '#/components/schemas/templates' version: description: | The version of the connector. To retrieve the version value, use the get configuration API. @@ -4543,9 +4692,9 @@ components: settings: $ref: '#/components/schemas/settings' severity: - $ref: '#/components/schemas/severity_property' + $ref: '#/components/schemas/case_severity' status: - $ref: '#/components/schemas/status' + $ref: '#/components/schemas/case_status' tags: type: array items: @@ -4578,12 +4727,12 @@ components: type: object properties: severity: - $ref: '#/components/schemas/severity_property' + $ref: '#/components/schemas/case_severity' payload_status: type: object properties: status: - $ref: '#/components/schemas/status' + $ref: '#/components/schemas/case_status' payload_tags: type: object properties: @@ -5024,11 +5173,12 @@ components: closure_type: close-by-user customFields: - key: d312efda-ec2b-42ec-9e2c-84981795c581 + defaultValue: Custom text field value. label: my-text-field required: false type: text owner: cases - created_at: '2023-06-01T17:07:17.767Z' + created_at: '2024-07-01T17:07:17.767Z' created_by: username: elastic email: null @@ -5041,10 +5191,35 @@ components: type: .none fields: null mappings: [] - version: WzUxLDRd + version: WzEyLDNd error: null + templates: + - key: 505932fe-ee3a-4960-a661-c781b5acdb05 + name: template-1 + caseFields: + title: Default case title + tags: + - Default case tag + category: Default-category + description: A default description for cases. + assignees: + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + connector: + id: none + type: .none + fields: null + name: none + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + value: Default text field value. + type: text + settings: + syncAlerts: false + description: A description of the template. + tags: + - Template tag 1 set_case_configuration_request: - summary: Set the closure type and default connector for Stack Management cases. + summary: Set the closure type, custom fields, and default connector for Stack Management cases. value: owner: cases connector: @@ -5058,6 +5233,25 @@ components: label: my-text-field required: false type: text + defaultValue: My custom field default value. + templates: + - key: 505932fe-ee3a-4960-a661-c781b5acdb05 + name: template-1 + caseFields: + title: Default case title + tags: + - Default case tag + category: Default-category + description: A default description for cases. + assignees: + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: A text field value for the template. + description: A description of the template. + tags: + - Template tag 1 set_case_configuration_response: summary: This is an example response for case settings. value: @@ -5067,8 +5261,27 @@ components: label: my-text-field required: false type: text + defaultValue: My custom field default value. + templates: + - key: 505932fe-ee3a-4960-a661-c781b5acdb05 + name: template-1 + caseFields: + title: Default case title + tags: + - Default case tag + category: Default-category + description: A default description for cases. + assignees: + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: A text field value for the template. + description: A description of the template. + tags: + - Template tag 1 owner: cases - created_at: '2023-10-01T17:07:17.767Z' + created_at: '2024-07-01T17:07:17.767Z' created_by: username: elastic email: null, @@ -5091,6 +5304,9 @@ components: - source: comments target: comments action_type: append + - source: tags + target: labels + action_type: overwrite version: WzIwNzMsMV0= error: null id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 @@ -5109,6 +5325,7 @@ components: label: my-text-field required: true type: text + defaultValue: A new default value. - key: fcc6840d-eb14-42df-8aaf-232201a705ec label: my-toggle required: false @@ -5122,18 +5339,19 @@ components: label: my-text-field required: true type: text + defaultValue: A new default value. - key: fcc6840d-eb14-42df-8aaf-232201a705ec label: my-toggle required: false type: toggle owner: cases - created_at: '2023-10-01T17:07:17.767Z' + created_at: '2024-07-01T17:07:17.767Z' created_by: username: elastic - email: null, + email: null full_name: null profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 - updated_at: '2023-10-19T00:52:42.401Z' + updated_at: '2024-07-19T00:52:42.401Z' updated_by: username: elastic full_name: null @@ -5151,12 +5369,16 @@ components: - source: description target: description action_type: overwrite + - source: tags + target: labels + action_type: overwrite - source: comments target: comments action_type: append - version: zEzNSw1XQ== + version: WzI2LDNd error: null id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + templates: [] get_reporters_response: summary: A list of two users that opened cases value: diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/get_case_configuration_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_configuration_response.yaml index 8b9197600917f1..f3cfa442650010 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/get_case_configuration_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_configuration_response.yaml @@ -4,11 +4,12 @@ value: closure_type: close-by-user customFields: - key: d312efda-ec2b-42ec-9e2c-84981795c581 + defaultValue: Custom text field value. label: my-text-field required: false type: text owner: cases - created_at: 2023-06-01T17:07:17.767Z + created_at: 2024-07-01T17:07:17.767Z created_by: username: elastic email: null @@ -21,5 +22,30 @@ value: type: .none fields: null mappings: [] - version: WzUxLDRd + version: WzEyLDNd error: null + templates: + - key: 505932fe-ee3a-4960-a661-c781b5acdb05 + name: template-1 + caseFields: + title: Default case title + tags: + - Default case tag + category: Default-category + description: A default description for cases. + assignees: + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + connector: + id: none + type: .none + fields: null + name: none + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + value: Default text field value. + type: text + settings: + syncAlerts: false + description: A description of the template. + tags: + - Template tag 1 diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_request.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_request.yaml index 472a33d9feacbc..e64fb2bc72f995 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_request.yaml @@ -1,4 +1,4 @@ -summary: Set the closure type and default connector for Stack Management cases. +summary: Set the closure type, custom fields, and default connector for Stack Management cases. value: owner: cases connector: @@ -11,4 +11,23 @@ value: - key: d312efda-ec2b-42ec-9e2c-84981795c581 label: my-text-field required: false - type: text \ No newline at end of file + type: text + defaultValue: My custom field default value. + templates: + - key: 505932fe-ee3a-4960-a661-c781b5acdb05 + name: template-1 + caseFields: + title: Default case title + tags: + - Default case tag + category: Default-category + description: A default description for cases. + assignees: + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: A text field value for the template. + description: A description of the template. + tags: + - Template tag 1 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_response.yaml index d5a9f7205e23db..d0518c7c010c56 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_response.yaml @@ -6,8 +6,27 @@ value: label: my-text-field required: false type: text + defaultValue: My custom field default value. + templates: + - key: 505932fe-ee3a-4960-a661-c781b5acdb05 + name: template-1 + caseFields: + title: Default case title + tags: + - Default case tag + category: Default-category + description: A default description for cases. + assignees: + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: A text field value for the template. + description: A description of the template. + tags: + - Template tag 1 owner: cases - created_at: 2023-10-01T17:07:17.767Z + created_at: 2024-07-01T17:07:17.767Z created_by: username: elastic email: null, @@ -30,6 +49,9 @@ value: - source: comments target: comments action_type: append + - source: tags + target: labels + action_type: overwrite version: WzIwNzMsMV0= error: null id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_request.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_request.yaml index 83d617b17946b1..196ef19ba1f075 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_request.yaml @@ -12,6 +12,7 @@ value: label: my-text-field required: true type: text + defaultValue: "A new default value." - key: fcc6840d-eb14-42df-8aaf-232201a705ec label: my-toggle required: false diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_response.yaml index 6dd1da4d6f1f10..2f34418e214ac7 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_response.yaml @@ -6,18 +6,19 @@ value: label: my-text-field required: true type: text + defaultValue: A new default value. - key: fcc6840d-eb14-42df-8aaf-232201a705ec label: my-toggle required: false type: toggle owner: cases - created_at: 2023-10-01T17:07:17.767Z + created_at: 2024-07-01T17:07:17.767Z created_by: username: elastic - email: null, + email: null full_name: null profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 - updated_at: 2023-10-19T00:52:42.401Z + updated_at: 2024-07-19T00:52:42.401Z updated_by: username: elastic full_name: null @@ -35,9 +36,13 @@ value: - source: description target: description action_type: overwrite + - source: tags + target: labels + action_type: overwrite - source: comments target: comments action_type: append - version: zEzNSw1XQ== + version: WzI2LDNd error: null - id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 \ No newline at end of file + id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + templates: [] \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_category.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_category.yaml new file mode 100644 index 00000000000000..ebf0a65319853f --- /dev/null +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_category.yaml @@ -0,0 +1,3 @@ +description: A word or phrase that categorizes the case. +type: string +maxLength: 50 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_customfields.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_customfields.yaml index 344e17b00617dc..71c64225a72adb 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_customfields.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_customfields.yaml @@ -1,3 +1,11 @@ +defaultValue: + oneOf: + - type: string + - type: boolean + description: > + A default value for the custom field. + If the `type` is `text`, the default value must be a string. + If the `type` is `toggle`, the default value must be boolean. key: description: > A unique key for the custom field. diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml index e85179f3053ac5..26a7ed41685a1f 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml @@ -1,13 +1,5 @@ closure_type: $ref: 'closure_types.yaml' -customFields: - type: array - x-technical-preview: true - description: Custom fields configuration details. - items: - type: object - properties: - $ref: 'case_configure_customfields.yaml' connector: type: object properties: @@ -25,6 +17,14 @@ created_by: - username properties: $ref: 'user_properties.yaml' +customFields: + type: array + x-technical-preview: true + description: Custom fields configuration details. + items: + type: object + properties: + $ref: 'case_configure_customfields.yaml' error: type: - "string" @@ -54,6 +54,8 @@ mappings: - summary owner: $ref: 'owners.yaml' +templates: + $ref: 'templates.yaml' updated_at: type: - "string" diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_description.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_description.yaml new file mode 100644 index 00000000000000..a7336b64b44ac2 --- /dev/null +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_description.yaml @@ -0,0 +1,3 @@ +description: The description for the case. +type: string +maxLength: 30000 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml index bc26dedac8534d..5aaa73416bacdd 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml @@ -112,9 +112,9 @@ properties: settings: $ref: 'settings.yaml' severity: - $ref: 'severity_property.yaml' + $ref: 'case_severity.yaml' status: - $ref: 'status.yaml' + $ref: 'case_status.yaml' tags: type: array items: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/severity_property.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_severity.yaml similarity index 100% rename from x-pack/plugins/cases/docs/openapi/components/schemas/severity_property.yaml rename to x-pack/plugins/cases/docs/openapi/components/schemas/case_severity.yaml diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/status.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_status.yaml similarity index 100% rename from x-pack/plugins/cases/docs/openapi/components/schemas/status.yaml rename to x-pack/plugins/cases/docs/openapi/components/schemas/case_status.yaml diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_tags.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_tags.yaml new file mode 100644 index 00000000000000..cb0e78901b9071 --- /dev/null +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_tags.yaml @@ -0,0 +1,7 @@ +description: > + The words and phrases that help categorize cases. It can be an empty array. +type: array +maxItems: 200 +items: + type: string + maxLength: 256 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_title.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_title.yaml new file mode 100644 index 00000000000000..0ed3923a4a9c9c --- /dev/null +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_title.yaml @@ -0,0 +1,3 @@ +description: A title for the case. +type: string +maxLength: 160 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml index 71d3e036ac94b4..d58dea6472c21c 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml @@ -22,30 +22,19 @@ properties: - $ref: 'connector_properties_servicenow_sir.yaml' - $ref: 'connector_properties_swimlane.yaml' description: - description: The description for the case. - type: string - maxLength: 30000 + $ref: 'case_description.yaml' owner: $ref: 'owners.yaml' settings: $ref: 'settings.yaml' severity: - $ref: 'severity_property.yaml' + $ref: 'case_severity.yaml' tags: - description: The words and phrases that help categorize cases. It can be an empty array. - type: array - maxItems: 200 - items: - type: string - maxLength: 256 + $ref: 'case_tags.yaml' category: - description: A word or phrase that categorizes the case. - type: string - maxLength: 50 + $ref: 'case_category.yaml' title: - description: A title for the case. - type: string - maxLength: 160 + $ref: 'case_title.yaml' customFields: type: array description: > diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_create_case.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_create_case.yaml index 9bda777bccead2..a5483b6412871b 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_create_case.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_create_case.yaml @@ -13,9 +13,9 @@ properties: settings: $ref: 'settings.yaml' severity: - $ref: 'severity_property.yaml' + $ref: 'case_severity.yaml' status: - $ref: 'status.yaml' + $ref: 'case_status.yaml' tags: type: array items: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_severity.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_severity.yaml index 471c309304b990..99dd67b55a43ef 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_severity.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_severity.yaml @@ -1,4 +1,4 @@ type: object properties: severity: - $ref: 'severity_property.yaml' \ No newline at end of file + $ref: 'case_severity.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_status.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_status.yaml index 63b67c4e510aa2..4ba8eee486fe31 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_status.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_status.yaml @@ -1,4 +1,4 @@ type: object properties: status: - $ref: 'status.yaml' \ No newline at end of file + $ref: 'case_status.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/set_case_configuration_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/set_case_configuration_request.yaml index 043febb36c8b6c..6bcfad6a736c1f 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/set_case_configuration_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/set_case_configuration_request.yaml @@ -35,3 +35,5 @@ properties: $ref: 'case_configure_customfields.yaml' owner: $ref: 'owners.yaml' + templates: + $ref: 'templates.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/template_tags.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/template_tags.yaml new file mode 100644 index 00000000000000..8dd87c7a356121 --- /dev/null +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/template_tags.yaml @@ -0,0 +1,7 @@ +description: > + The words and phrases that help categorize templates. It can be an empty array. +type: array +maxItems: 200 +items: + type: string + maxLength: 256 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/templates.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/templates.yaml new file mode 100644 index 00000000000000..b01cf5ad1f34e1 --- /dev/null +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/templates.yaml @@ -0,0 +1,66 @@ +type: array +x-technical-preview: true +items: + type: object + properties: + caseFields: + type: object + properties: + assignees: + $ref: 'assignees.yaml' + category: + $ref: 'case_category.yaml' + connector: + type: object + properties: + $ref: 'case_configure_connector_properties.yaml' + customFields: + type: array + x-technical-preview: true + description: Custom field values in the template. + items: + type: object + properties: + key: + type: string + description: The unique key for the custom field. + type: + type: string + enum: + - text + - toggle + description: The type of the custom field. + value: + oneOf: + - type: string + - type: boolean + description: > + The default value for the custom field when a case uses the template. + If the `type` is `text`, the default value must be a string. + If the `type` is `toggle`, the default value must be boolean. + description: + $ref: 'case_description.yaml' + settings: + $ref: 'settings.yaml' + severity: + $ref: 'case_severity.yaml' + tags: + $ref: 'case_tags.yaml' + title: + $ref: 'case_title.yaml' + description: + type: string + description: A description for the template. + key: + type: string + description: > + A unique key for the template. + Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. + It is used in API calls to refer to a specific template. + name: + type: string + description: The name of the template. + tags: + $ref: 'template_tags.yaml' + + \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml index 8a6a3aa7f302bb..56db4597f8b954 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml @@ -1,5 +1,6 @@ title: Update case configuration request -description: External connection details, such as the closure type and default connector for cases. +description: > + You can update settings such as the closure type, custom fields, templates, and the default connector for cases. type: object required: - version @@ -29,6 +30,8 @@ properties: - type properties: $ref: 'case_configure_customfields.yaml' + templates: + $ref: 'templates.yaml' version: description: > The version of the connector. diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml index 3fa99d40e50026..3288f5a9476c03 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml @@ -19,9 +19,7 @@ properties: assignees: $ref: 'assignees.yaml' category: - description: A word or phrase that categorizes the case. - type: string - maxLength: 50 + $ref: 'case_category.yaml' connector: oneOf: - $ref: 'connector_properties_none.yaml' @@ -48,8 +46,7 @@ properties: properties: $ref: 'case_customfields.yaml' description: - description: An updated description for the case. - type: string + $ref: 'case_description.yaml' id: description: The identifier for the case. type: string @@ -57,20 +54,13 @@ properties: settings: $ref: 'settings.yaml' severity: - $ref: 'severity_property.yaml' + $ref: 'case_severity.yaml' status: - $ref: 'status.yaml' + $ref: 'case_status.yaml' tags: - description: The words and phrases that help categorize cases. - type: array - maxItems: 200 - items: - type: string - maxLength: 256 + $ref: 'case_tags.yaml' title: - description: A title for the case. - type: string - maxLength: 160 + $ref: 'case_title.yaml' version: description: The current version of the case. To determine this value, use the get case or find cases APIs. type: string diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure.yaml index 5de3de67182b0c..5618eb08a4b72f 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure.yaml @@ -1,10 +1,11 @@ get: - summary: Retrieves external connection details, such as the closure type and default connector for cases in the default space. + summary: Get case settings in the default space operationId: getCaseConfigurationDefaultSpace description: > + Retrieves setting details such as the closure type, custom fields, templatse, and the default connector for cases in the default space. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the case configuration. + feature privileges, depending on where the cases were created. tags: - cases parameters: @@ -31,14 +32,15 @@ get: $ref: '../components/schemas/4xx_response.yaml' post: - summary: Creates a case specific configuration that includes external connection details and custom fields. + summary: Add case settings in the default space operationId: setCaseConfigurationDefaultSpace description: > - You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. + Case settings include external connection details, custom fields, and templates. Connectors are used to interface with external systems. - You must create a connector before you can use it in your cases. Refer to the add connectors API. + You must create a connector before you can use it in your cases. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. + You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases. tags: - cases parameters: diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@connectors@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@connectors@_find.yaml index 53a5ebf537e576..5ce6113cf699d2 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@connectors@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@connectors@_find.yaml @@ -1,10 +1,9 @@ get: - summary: Retrieves information about connectors in the default space. + summary: Get case connectors in the default space operationId: findCaseConnectorsDefaultSpace description: > - In particular, only the connectors that are supported for use in cases are - returned. You must have `read` privileges for the **Actions and Connectors** - feature in the **Management** section of the Kibana feature privileges. + Retrieves information about connectors that are supported for use in cases in the default space. + You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: - cases responses: diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@{configurationid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@{configurationid}.yaml index d31299128b076f..90f75c8d45e455 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@{configurationid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@{configurationid}.yaml @@ -1,11 +1,13 @@ patch: - summary: Updates external connection details, such as the closure type and default connector for cases in the default space. + summary: Update case settings in the default space operationId: updateCaseConfigurationDefaultSpace description: > - You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. + Updates setting details such as the closure type, custom fields, templates, and the default connector for cases in the default space. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. - Refer to the add connectors API. + You must have `all` privileges for the **Cases** feature in the + **Management**, **Observability**, or **Security** section of the Kibana + feature privileges, depending on where the case was created. tags: - cases parameters: diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure.yaml index d12262379df810..7e616ed1c4f14b 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure.yaml @@ -1,10 +1,11 @@ get: - summary: Retrieves external connection details, such as the closure type and default connector for cases. + summary: Get case settings operationId: getCaseConfiguration description: > + Retrieves setting details such as the closure type, custom fields, templates, and the default connector for cases. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the case configuration. + feature privileges, depending on where the cases were created. tags: - cases parameters: @@ -32,17 +33,15 @@ get: $ref: '../components/schemas/4xx_response.yaml' post: - summary: Creates a case specific configuration that includes external connection details and custom fields. + summary: Add case settings operationId: setCaseConfiguration description: > - You must have `all` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the case configuration. - Connectors are used to interface with external systems. You must create a - connector before you can use it in your cases. Refer to the add connectors - API. If you set a default connector, it is automatically selected when you - create cases in Kibana. If you use the create case API, however, you must - still specify all of the connector details. + Case settings include external connection details, custom fields, and templates. + Connectors are used to interface with external systems. + You must create a connector before you can use it in your cases. + If you set a default connector, it is automatically selected when you create cases in Kibana. + If you use the create case API, however, you must still specify all of the connector details. + You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases. tags: - cases parameters: diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml index f04f802ba3245f..b496bb141f2ee0 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml @@ -1,10 +1,9 @@ get: - summary: Retrieves information about connectors. + summary: Get case connectors operationId: findCaseConnectors description: > - In particular, only the connectors that are supported for use in cases are - returned. You must have `read` privileges for the **Actions and Connectors** - feature in the **Management** section of the Kibana feature privileges. + Retrieves information about connectors that are supported for use in cases. + You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: - cases parameters: diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml index c8656181aca937..5d31a7e027cb25 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml @@ -1,12 +1,13 @@ patch: - summary: Updates external connection details, such as the closure type and default connector for cases. + summary: Update case settings operationId: updateCaseConfiguration description: > + Updates setting details such as the closure type, custom fields, templates, and the default connector for cases. + Connectors are used to interface with external systems. + You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the case configuration. - Connectors are used to interface with external systems. You must create a - connector before you can use it in your cases. Refer to the add connectors API. + feature privileges, depending on where the case was created. tags: - cases parameters: diff --git a/x-pack/plugins/cases/server/routes/api/configure/get_configure.ts b/x-pack/plugins/cases/server/routes/api/configure/get_configure.ts index e4d2c75689cd27..21407054bb970a 100644 --- a/x-pack/plugins/cases/server/routes/api/configure/get_configure.ts +++ b/x-pack/plugins/cases/server/routes/api/configure/get_configure.ts @@ -15,7 +15,9 @@ export const getCaseConfigureRoute = createCasesRoute({ path: CASE_CONFIGURE_URL, routerOptions: { access: 'public', - summary: `Get case settings`, + summary: 'Get case settings', + description: + 'Retrieves setting details such as the closure type, custom fields, templates, and the default connector for cases. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created.', }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/configure/get_connectors.ts b/x-pack/plugins/cases/server/routes/api/configure/get_connectors.ts index 3201cb7005fb48..8c6aa326d4ddb5 100644 --- a/x-pack/plugins/cases/server/routes/api/configure/get_connectors.ts +++ b/x-pack/plugins/cases/server/routes/api/configure/get_connectors.ts @@ -18,7 +18,9 @@ export const getConnectorsRoute = createCasesRoute({ routerOptions: { tags: ['access:casesGetConnectorsConfigure'], access: 'public', - summary: `Get case connectors`, + summary: 'Get case connectors', + description: + 'Retrieves information about connectors that are supported for use in cases. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.', }, handler: async ({ context, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/configure/patch_configure.ts b/x-pack/plugins/cases/server/routes/api/configure/patch_configure.ts index c028013332866a..f7f3fa51c7a89b 100644 --- a/x-pack/plugins/cases/server/routes/api/configure/patch_configure.ts +++ b/x-pack/plugins/cases/server/routes/api/configure/patch_configure.ts @@ -17,7 +17,9 @@ export const patchCaseConfigureRoute = createCasesRoute({ path: CASE_CONFIGURE_DETAILS_URL, routerOptions: { access: 'public', - summary: `Update case settings`, + summary: 'Update case settings', + description: + 'Updates case settings such as the closure type, custom fields, templates, and the default connector for cases. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created.', }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/configure/post_configure.ts b/x-pack/plugins/cases/server/routes/api/configure/post_configure.ts index 6b6d6b1e484417..9797f8805d85d9 100644 --- a/x-pack/plugins/cases/server/routes/api/configure/post_configure.ts +++ b/x-pack/plugins/cases/server/routes/api/configure/post_configure.ts @@ -17,7 +17,9 @@ export const postCaseConfigureRoute = createCasesRoute({ path: CASE_CONFIGURE_URL, routerOptions: { access: 'public', - summary: `Add case settings`, + summary: 'Add case settings', + description: + 'Case settings include external connection details, custom fields, and templates. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases.', }, handler: async ({ context, request, response }) => { try { From 92099b277dc5b1448d14994d280674611ca9e261 Mon Sep 17 00:00:00 2001 From: Sergi Massaneda Date: Mon, 8 Jul 2024 20:14:57 +0200 Subject: [PATCH 023/103] [Security GenAI] Use AI setting to set langsmith tracing to the Integration Assistant (#187466) ## Summary Enables tracing Langchain invocations in the integrations assistant using the Langsmith settings stored by the Security AI Settings. The evaluation settings tab is still under an experimental flag, to see it: ``` xpack.securitySolution.enableExperimental: ['assistantModelEvaluation'] ``` ### Screenshots Settings After one execution of the integration assistant: langsmith --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine --- .../kbn-langchain/server}/tracers/README.mdx | 0 .../server/tracers/apm}/apm_tracer.ts | 0 .../kbn-langchain/server/tracers/apm/index.ts | 8 +++ .../server/tracers/langsmith/index.ts | 7 ++ .../tracers/langsmith/langsmith_tracer.ts | 64 +++++++++++++++++++ x-pack/packages/kbn-langchain/tsconfig.json | 3 +- .../execute_custom_llm_chain/index.ts | 4 +- .../executors/openai_functions_executor.ts | 4 +- .../graphs/default_assistant_graph/helpers.ts | 4 +- .../graphs/default_assistant_graph/index.ts | 2 +- .../tracers/{ => apm}/with_assistant_span.ts | 0 .../server/lib/model_evaluator/evaluation.ts | 3 +- .../server/routes/attack_discovery/helpers.ts | 2 +- .../server/routes/evaluate/post_evaluate.ts | 3 +- .../server/routes/evaluate/utils.ts | 55 +--------------- .../server/routes/helpers.ts | 2 +- .../plugins/elastic_assistant/tsconfig.json | 2 +- .../categorization_route.schema.yaml | 2 + .../categorization/categorization_route.ts | 2 + .../common/api/ecs/ecs_route.schema.yaml | 2 + .../common/api/ecs/ecs_route.ts | 2 + .../api/model/common_attributes.schema.yaml | 14 ++++ .../common/api/model/common_attributes.ts | 15 +++++ .../api/related/related_route.schema.yaml | 2 + .../common/api/related/related_route.ts | 2 + .../integration_assistant/kibana.jsonc | 3 + .../public/common/lib/lang_smith.ts | 37 +++++++++++ .../data_stream_step/generation_modal.tsx | 2 + .../server/routes/categorization_routes.ts | 20 ++++-- .../server/routes/ecs_routes.ts | 34 +++++----- .../server/routes/related_routes.ts | 19 ++++-- .../integration_assistant/tsconfig.json | 3 +- 32 files changed, 231 insertions(+), 91 deletions(-) rename x-pack/{plugins/elastic_assistant/server/lib/langchain => packages/kbn-langchain/server}/tracers/README.mdx (100%) rename x-pack/{plugins/elastic_assistant/server/lib/langchain/tracers => packages/kbn-langchain/server/tracers/apm}/apm_tracer.ts (100%) create mode 100644 x-pack/packages/kbn-langchain/server/tracers/apm/index.ts create mode 100644 x-pack/packages/kbn-langchain/server/tracers/langsmith/index.ts create mode 100644 x-pack/packages/kbn-langchain/server/tracers/langsmith/langsmith_tracer.ts rename x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/{ => apm}/with_assistant_span.ts (100%) create mode 100644 x-pack/plugins/integration_assistant/public/common/lib/lang_smith.ts diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/README.mdx b/x-pack/packages/kbn-langchain/server/tracers/README.mdx similarity index 100% rename from x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/README.mdx rename to x-pack/packages/kbn-langchain/server/tracers/README.mdx diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/apm_tracer.ts b/x-pack/packages/kbn-langchain/server/tracers/apm/apm_tracer.ts similarity index 100% rename from x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/apm_tracer.ts rename to x-pack/packages/kbn-langchain/server/tracers/apm/apm_tracer.ts diff --git a/x-pack/packages/kbn-langchain/server/tracers/apm/index.ts b/x-pack/packages/kbn-langchain/server/tracers/apm/index.ts new file mode 100644 index 00000000000000..293db467d740bc --- /dev/null +++ b/x-pack/packages/kbn-langchain/server/tracers/apm/index.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 { APMTracer } from './apm_tracer'; diff --git a/x-pack/packages/kbn-langchain/server/tracers/langsmith/index.ts b/x-pack/packages/kbn-langchain/server/tracers/langsmith/index.ts new file mode 100644 index 00000000000000..179a5aa297c7e6 --- /dev/null +++ b/x-pack/packages/kbn-langchain/server/tracers/langsmith/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright 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 { getLangSmithTracer, isLangSmithEnabled } from './langsmith_tracer'; diff --git a/x-pack/packages/kbn-langchain/server/tracers/langsmith/langsmith_tracer.ts b/x-pack/packages/kbn-langchain/server/tracers/langsmith/langsmith_tracer.ts new file mode 100644 index 00000000000000..15501d22dbe09f --- /dev/null +++ b/x-pack/packages/kbn-langchain/server/tracers/langsmith/langsmith_tracer.ts @@ -0,0 +1,64 @@ +/* + * Copyright 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 { Client } from 'langsmith'; +import type { Logger } from '@kbn/core/server'; +import { ToolingLog } from '@kbn/tooling-log'; +import { LangChainTracer } from '@langchain/core/tracers/tracer_langchain'; + +/** + * Returns a custom LangChainTracer which adds the `exampleId` so Dataset 'Test' runs are written to LangSmith + * If `exampleId` is present (and a corresponding example exists in LangSmith) trace is written to the Dataset's `Tests` + * section, otherwise it is written to the `Project` provided + * + * @param apiKey API Key for LangSmith (will fetch from env vars if not provided) + * @param projectName Name of project to trace results to + * @param exampleId Dataset exampleId to associate trace with + * @param logger + */ +export const getLangSmithTracer = ({ + apiKey, + projectName, + exampleId, + logger, +}: { + apiKey?: string; + projectName?: string; + exampleId?: string; + logger: Logger | ToolingLog; +}): LangChainTracer[] => { + try { + if (!isLangSmithEnabled() || apiKey == null) { + return []; + } + const lcTracer = new LangChainTracer({ + projectName, // Shows as the 'test' run's 'name' in langsmith ui + exampleId, + client: new Client({ apiKey }), + }); + + return [lcTracer]; + } catch (e) { + // Note: creating a tracer can fail if the LangSmith env vars are not set correctly + logger.error(`Error creating LangSmith tracer: ${e.message}`); + } + + return []; +}; + +/** + * Returns true if LangSmith/tracing is enabled + */ +export const isLangSmithEnabled = (): boolean => { + try { + // Just checking if apiKey is available, if better way to check for enabled that is not env var please update + const config = Client.getDefaultClientConfig(); + return config.apiKey != null; + } catch (e) { + return false; + } +}; diff --git a/x-pack/packages/kbn-langchain/tsconfig.json b/x-pack/packages/kbn-langchain/tsconfig.json index 949aca47794ec2..e775b1a4ad50d7 100644 --- a/x-pack/packages/kbn-langchain/tsconfig.json +++ b/x-pack/packages/kbn-langchain/tsconfig.json @@ -18,6 +18,7 @@ "@kbn/logging", "@kbn/actions-plugin", "@kbn/logging-mocks", - "@kbn/utility-types" + "@kbn/utility-types", + "@kbn/tooling-log" ] } diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts index 86e01a93ddcdcc..cd1a0324063268 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts @@ -18,12 +18,12 @@ import { ActionsClientSimpleChatModel, } from '@kbn/langchain/server'; import { MessagesPlaceholder } from '@langchain/core/prompts'; +import { APMTracer } from '@kbn/langchain/server/tracers/apm'; +import { withAssistantSpan } from '../tracers/apm/with_assistant_span'; import { EsAnonymizationFieldsSchema } from '../../../ai_assistant_data_clients/anonymization_fields/types'; import { transformESSearchToAnonymizationFields } from '../../../ai_assistant_data_clients/anonymization_fields/helpers'; import { AgentExecutor } from '../executors/types'; -import { APMTracer } from '../tracers/apm_tracer'; import { AssistantToolParams } from '../../../types'; -import { withAssistantSpan } from '../tracers/with_assistant_span'; export const DEFAULT_AGENT_EXECUTOR_ID = 'Elastic AI Assistant Agent Executor'; /** diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts index 6aa1aa3ce78909..edea22a888dff6 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts @@ -11,9 +11,9 @@ import { BufferMemory, ChatMessageHistory } from 'langchain/memory'; import { ChainTool } from 'langchain/tools/chain'; import { ActionsClientLlm } from '@kbn/langchain/server'; +import { APMTracer } from '@kbn/langchain/server/tracers/apm'; +import { withAssistantSpan } from '../tracers/apm/with_assistant_span'; import { AgentExecutor } from './types'; -import { withAssistantSpan } from '../tracers/with_assistant_span'; -import { APMTracer } from '../tracers/apm_tracer'; export const OPEN_AI_FUNCTIONS_AGENT_EXECUTOR_ID = 'Elastic AI Assistant Agent Executor (OpenAI Functions)'; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/helpers.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/helpers.ts index 482c89c10e969c..fe46a5deae9fe1 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/helpers.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/helpers.ts @@ -11,11 +11,11 @@ import { streamFactory, StreamResponseWithHeaders } from '@kbn/ml-response-strea import { transformError } from '@kbn/securitysolution-es-utils'; import type { KibanaRequest } from '@kbn/core-http-server'; import type { ExecuteConnectorRequestBody, TraceData } from '@kbn/elastic-assistant-common'; +import { APMTracer } from '@kbn/langchain/server/tracers/apm'; +import { withAssistantSpan } from '../../tracers/apm/with_assistant_span'; import { AGENT_NODE_TAG } from './nodes/run_agent'; import { DEFAULT_ASSISTANT_GRAPH_ID, DefaultAssistantGraph } from './graph'; import type { OnLlmResponse, TraceOptions } from '../../executors/types'; -import type { APMTracer } from '../../tracers/apm_tracer'; -import { withAssistantSpan } from '../../tracers/with_assistant_span'; interface StreamGraphParams { apmTracer: APMTracer; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/index.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/index.ts index 517ac10479461f..87437a98898d4f 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/index.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/index.ts @@ -13,11 +13,11 @@ import { ActionsClientSimpleChatModel, } from '@kbn/langchain/server'; import { createOpenAIFunctionsAgent, createStructuredChatAgent } from 'langchain/agents'; +import { APMTracer } from '@kbn/langchain/server/tracers/apm'; import { EsAnonymizationFieldsSchema } from '../../../../ai_assistant_data_clients/anonymization_fields/types'; import { AssistantToolParams } from '../../../../types'; import { AgentExecutor } from '../../executors/types'; import { openAIFunctionAgentPrompt, structuredChatAgentPrompt } from './prompts'; -import { APMTracer } from '../../tracers/apm_tracer'; import { getDefaultAssistantGraph } from './graph'; import { invokeGraph, streamGraph } from './helpers'; import { transformESSearchToAnonymizationFields } from '../../../../ai_assistant_data_clients/anonymization_fields/helpers'; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/with_assistant_span.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/apm/with_assistant_span.ts similarity index 100% rename from x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/with_assistant_span.ts rename to x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/apm/with_assistant_span.ts diff --git a/x-pack/plugins/elastic_assistant/server/lib/model_evaluator/evaluation.ts b/x-pack/plugins/elastic_assistant/server/lib/model_evaluator/evaluation.ts index d6fb04f2a13dc5..93f164835876ab 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/model_evaluator/evaluation.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/model_evaluator/evaluation.ts @@ -15,9 +15,10 @@ import { ToolingLog } from '@kbn/tooling-log'; import { LangChainTracer } from '@langchain/core/tracers/tracer_langchain'; import { RunCollectorCallbackHandler } from '@langchain/core/tracers/run_collector'; import { Dataset } from '@kbn/elastic-assistant-common'; +import { isLangSmithEnabled } from '@kbn/langchain/server/tracers/langsmith'; import { AgentExecutorEvaluatorWithMetadata } from '../langchain/executors/types'; import { callAgentWithRetry, getMessageFromLangChainResponse } from './utils'; -import { isLangSmithEnabled, writeLangSmithFeedback } from '../../routes/evaluate/utils'; +import { writeLangSmithFeedback } from '../../routes/evaluate/utils'; import { ResponseBody } from '../langchain/types'; export interface PerformEvaluationParams { diff --git a/x-pack/plugins/elastic_assistant/server/routes/attack_discovery/helpers.ts b/x-pack/plugins/elastic_assistant/server/routes/attack_discovery/helpers.ts index 5f5eb8d0d86591..1de3b86e74debc 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/attack_discovery/helpers.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/attack_discovery/helpers.ts @@ -28,7 +28,7 @@ import type { ActionsClient } from '@kbn/actions-plugin/server'; import moment from 'moment/moment'; import { uniq } from 'lodash/fp'; import { PublicMethodsOf } from '@kbn/utility-types'; -import { getLangSmithTracer } from '../evaluate/utils'; +import { getLangSmithTracer } from '@kbn/langchain/server/tracers/langsmith'; import { getLlmType } from '../utils'; import type { GetRegisteredTools } from '../../services/app_context'; import { diff --git a/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts b/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts index 990417b7992340..79b601ed010735 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts @@ -18,6 +18,7 @@ import { ExecuteConnectorRequestBody, } from '@kbn/elastic-assistant-common'; import { ActionsClientLlm } from '@kbn/langchain/server'; +import { getLangSmithTracer } from '@kbn/langchain/server/tracers/langsmith'; import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { ESQL_RESOURCE, KNOWLEDGE_BASE_INDEX_PATTERN } from '../knowledge_base/constants'; import { buildResponse } from '../../lib/build_response'; @@ -29,7 +30,7 @@ import { indexEvaluations, setupEvaluationIndex, } from '../../lib/model_evaluator/output_index/utils'; -import { fetchLangSmithDataset, getConnectorName, getLangSmithTracer } from './utils'; +import { fetchLangSmithDataset, getConnectorName } from './utils'; import { DEFAULT_PLUGIN_NAME, getPluginNameFromRequest } from '../helpers'; /** diff --git a/x-pack/plugins/elastic_assistant/server/routes/evaluate/utils.ts b/x-pack/plugins/elastic_assistant/server/routes/evaluate/utils.ts index 17757b8778771a..46909805510e2a 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/evaluate/utils.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/evaluate/utils.ts @@ -10,8 +10,8 @@ import type { ActionResult } from '@kbn/actions-plugin/server'; import type { Logger } from '@kbn/core/server'; import type { Run } from 'langsmith/schemas'; import { ToolingLog } from '@kbn/tooling-log'; -import { LangChainTracer } from '@langchain/core/tracers/tracer_langchain'; import { Dataset } from '@kbn/elastic-assistant-common'; +import { isLangSmithEnabled } from '@kbn/langchain/server/tracers/langsmith'; /** * Return connector name for the given connectorId/connectors @@ -97,56 +97,3 @@ export const writeLangSmithFeedback = async ( return ''; } }; - -/** - * Returns a custom LangChainTracer which adds the `exampleId` so Dataset 'Test' runs are written to LangSmith - * If `exampleId` is present (and a corresponding example exists in LangSmith) trace is written to the Dataset's `Tests` - * section, otherwise it is written to the `Project` provided - * - * @param apiKey API Key for LangSmith (will fetch from env vars if not provided) - * @param projectName Name of project to trace results to - * @param exampleId Dataset exampleId to associate trace with - * @param logger - */ -export const getLangSmithTracer = ({ - apiKey, - projectName, - exampleId, - logger, -}: { - apiKey?: string; - projectName?: string; - exampleId?: string; - logger: Logger | ToolingLog; -}): LangChainTracer[] => { - try { - if (!isLangSmithEnabled() && apiKey == null) { - return []; - } - const lcTracer = new LangChainTracer({ - projectName, // Shows as the 'test' run's 'name' in langsmith ui - exampleId, - client: new Client({ apiKey }), - }); - - return [lcTracer]; - } catch (e) { - // Note: creating a tracer can fail if the LangSmith env vars are not set correctly - logger.error(`Error creating LangSmith tracer: ${e.message}`); - } - - return []; -}; - -/** - * Returns true if LangSmith/tracing is enabled - */ -export const isLangSmithEnabled = (): boolean => { - try { - // Just checking if apiKey is available, if better way to check for enabled that is not env var please update - const config = Client.getDefaultClientConfig(); - return config.apiKey != null; - } catch (e) { - return false; - } -}; diff --git a/x-pack/plugins/elastic_assistant/server/routes/helpers.ts b/x-pack/plugins/elastic_assistant/server/routes/helpers.ts index aa060e24bc5df9..a8fe0d0c25d681 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/helpers.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/helpers.ts @@ -27,6 +27,7 @@ import { i18n } from '@kbn/i18n'; import { AwaitedProperties, PublicMethodsOf } from '@kbn/utility-types'; import { ActionsClient } from '@kbn/actions-plugin/server'; import { AssistantFeatureKey } from '@kbn/elastic-assistant-common/impl/capabilities'; +import { getLangSmithTracer } from '@kbn/langchain/server/tracers/langsmith'; import { MINIMUM_AI_ASSISTANT_LICENSE } from '../../common/constants'; import { ESQL_RESOURCE, KNOWLEDGE_BASE_INDEX_PATTERN } from './knowledge_base/constants'; import { callAgentExecutor } from '../lib/langchain/execute_custom_llm_chain'; @@ -39,7 +40,6 @@ import { import { executeAction, StaticResponse } from '../lib/executor'; import { getLangChainMessages } from '../lib/langchain/helpers'; -import { getLangSmithTracer } from './evaluate/utils'; import { ElasticsearchStore } from '../lib/langchain/elasticsearch_store/elasticsearch_store'; import { AIAssistantConversationsDataClient } from '../ai_assistant_data_clients/conversations'; import { INVOKE_ASSISTANT_SUCCESS_EVENT } from '../lib/telemetry/event_based_telemetry'; diff --git a/x-pack/plugins/elastic_assistant/tsconfig.json b/x-pack/plugins/elastic_assistant/tsconfig.json index 8f546d6e5fe014..a2d0ec6c1d68a2 100644 --- a/x-pack/plugins/elastic_assistant/tsconfig.json +++ b/x-pack/plugins/elastic_assistant/tsconfig.json @@ -27,7 +27,6 @@ "@kbn/core-elasticsearch-server", "@kbn/logging", "@kbn/ml-plugin", - "@kbn/apm-utils", "@kbn/elastic-assistant-common", "@kbn/core-http-router-server-mocks", "@kbn/data-stream-adapter", @@ -46,6 +45,7 @@ "@kbn/langchain", "@kbn/stack-connectors-plugin", "@kbn/security-plugin", + "@kbn/apm-utils", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/integration_assistant/common/api/categorization/categorization_route.schema.yaml b/x-pack/plugins/integration_assistant/common/api/categorization/categorization_route.schema.yaml index 37b5750e01aca0..e04a41b88e5640 100644 --- a/x-pack/plugins/integration_assistant/common/api/categorization/categorization_route.schema.yaml +++ b/x-pack/plugins/integration_assistant/common/api/categorization/categorization_route.schema.yaml @@ -34,6 +34,8 @@ paths: $ref: "../model/common_attributes.schema.yaml#/components/schemas/Pipeline" connectorId: $ref: "../model/common_attributes.schema.yaml#/components/schemas/Connector" + langSmithOptions: + $ref: "../model/common_attributes.schema.yaml#/components/schemas/LangSmithOptions" responses: 200: description: Indicates a successful call. diff --git a/x-pack/plugins/integration_assistant/common/api/categorization/categorization_route.ts b/x-pack/plugins/integration_assistant/common/api/categorization/categorization_route.ts index 067c3c88a07ed4..c8e56a2af2f5e9 100644 --- a/x-pack/plugins/integration_assistant/common/api/categorization/categorization_route.ts +++ b/x-pack/plugins/integration_assistant/common/api/categorization/categorization_route.ts @@ -10,6 +10,7 @@ import { z } from 'zod'; import { Connector, DataStreamName, + LangSmithOptions, PackageName, Pipeline, RawSamples, @@ -23,6 +24,7 @@ export const CategorizationRequestBody = z.object({ rawSamples: RawSamples, currentPipeline: Pipeline, connectorId: Connector, + langSmithOptions: LangSmithOptions.optional(), }); export type CategorizationRequestBodyInput = z.input; diff --git a/x-pack/plugins/integration_assistant/common/api/ecs/ecs_route.schema.yaml b/x-pack/plugins/integration_assistant/common/api/ecs/ecs_route.schema.yaml index d539ae5877da8d..57505f64ebf2a2 100644 --- a/x-pack/plugins/integration_assistant/common/api/ecs/ecs_route.schema.yaml +++ b/x-pack/plugins/integration_assistant/common/api/ecs/ecs_route.schema.yaml @@ -33,6 +33,8 @@ paths: $ref: "../model/common_attributes.schema.yaml#/components/schemas/Mapping" connectorId: $ref: "../model/common_attributes.schema.yaml#/components/schemas/Connector" + langSmithOptions: + $ref: "../model/common_attributes.schema.yaml#/components/schemas/LangSmithOptions" responses: 200: description: Indicates a successful call. diff --git a/x-pack/plugins/integration_assistant/common/api/ecs/ecs_route.ts b/x-pack/plugins/integration_assistant/common/api/ecs/ecs_route.ts index b1973159f93040..fd1dca194ae59e 100644 --- a/x-pack/plugins/integration_assistant/common/api/ecs/ecs_route.ts +++ b/x-pack/plugins/integration_assistant/common/api/ecs/ecs_route.ts @@ -10,6 +10,7 @@ import { z } from 'zod'; import { Connector, DataStreamName, + LangSmithOptions, Mapping, PackageName, RawSamples, @@ -23,6 +24,7 @@ export const EcsMappingRequestBody = z.object({ rawSamples: RawSamples, mapping: Mapping.optional(), connectorId: Connector, + langSmithOptions: LangSmithOptions.optional(), }); export type EcsMappingRequestBodyInput = z.input; diff --git a/x-pack/plugins/integration_assistant/common/api/model/common_attributes.schema.yaml b/x-pack/plugins/integration_assistant/common/api/model/common_attributes.schema.yaml index 24cb71ed5274c9..527899dc33727b 100644 --- a/x-pack/plugins/integration_assistant/common/api/model/common_attributes.schema.yaml +++ b/x-pack/plugins/integration_assistant/common/api/model/common_attributes.schema.yaml @@ -143,3 +143,17 @@ components: logo: type: string description: The logo of the integration. + + LangSmithOptions: + type: object + description: The LangSmith options object. + required: + - projectName + - apiKey + properties: + projectName: + type: string + description: The project name. + apiKey: + type: string + description: The apiKey to use for tracing. diff --git a/x-pack/plugins/integration_assistant/common/api/model/common_attributes.ts b/x-pack/plugins/integration_assistant/common/api/model/common_attributes.ts index fdb20931ccce03..bde01d8bae2455 100644 --- a/x-pack/plugins/integration_assistant/common/api/model/common_attributes.ts +++ b/x-pack/plugins/integration_assistant/common/api/model/common_attributes.ts @@ -156,3 +156,18 @@ export const Integration = z.object({ */ logo: z.string().optional(), }); + +/** + * The LangSmith options object. + */ +export type LangSmithOptions = z.infer; +export const LangSmithOptions = z.object({ + /** + * The project name to use with tracing. + */ + projectName: z.string(), + /** + * The api key for the project + */ + apiKey: z.string(), +}); diff --git a/x-pack/plugins/integration_assistant/common/api/related/related_route.schema.yaml b/x-pack/plugins/integration_assistant/common/api/related/related_route.schema.yaml index 13990dc1b66d8e..a588ac58528225 100644 --- a/x-pack/plugins/integration_assistant/common/api/related/related_route.schema.yaml +++ b/x-pack/plugins/integration_assistant/common/api/related/related_route.schema.yaml @@ -34,6 +34,8 @@ paths: $ref: "../model/common_attributes.schema.yaml#/components/schemas/Pipeline" connectorId: $ref: "../model/common_attributes.schema.yaml#/components/schemas/Connector" + langSmithOptions: + $ref: "../model/common_attributes.schema.yaml#/components/schemas/LangSmithOptions" responses: 200: description: Indicates a successful call. diff --git a/x-pack/plugins/integration_assistant/common/api/related/related_route.ts b/x-pack/plugins/integration_assistant/common/api/related/related_route.ts index 4c5242e48d2c3f..961bc007adcd87 100644 --- a/x-pack/plugins/integration_assistant/common/api/related/related_route.ts +++ b/x-pack/plugins/integration_assistant/common/api/related/related_route.ts @@ -10,6 +10,7 @@ import { z } from 'zod'; import { Connector, DataStreamName, + LangSmithOptions, PackageName, Pipeline, RawSamples, @@ -23,6 +24,7 @@ export const RelatedRequestBody = z.object({ rawSamples: RawSamples, currentPipeline: Pipeline, connectorId: Connector, + langSmithOptions: LangSmithOptions.optional(), }); export type RelatedRequestBodyInput = z.input; diff --git a/x-pack/plugins/integration_assistant/kibana.jsonc b/x-pack/plugins/integration_assistant/kibana.jsonc index b2ef3045e12be2..d8d6e170262308 100644 --- a/x-pack/plugins/integration_assistant/kibana.jsonc +++ b/x-pack/plugins/integration_assistant/kibana.jsonc @@ -18,5 +18,8 @@ "actions", "stackConnectors", ], + "requiredBundles": [ + "kibanaUtils", + ] } } diff --git a/x-pack/plugins/integration_assistant/public/common/lib/lang_smith.ts b/x-pack/plugins/integration_assistant/public/common/lib/lang_smith.ts new file mode 100644 index 00000000000000..72348704399306 --- /dev/null +++ b/x-pack/plugins/integration_assistant/public/common/lib/lang_smith.ts @@ -0,0 +1,37 @@ +/* + * Copyright 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 { + DEFAULT_ASSISTANT_NAMESPACE, + TRACE_OPTIONS_SESSION_STORAGE_KEY, +} from '@kbn/elastic-assistant/impl/assistant_context/constants'; +import { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { TraceOptions } from '@kbn/elastic-assistant/impl/assistant/types'; +import type { LangSmithOptions } from '../../../common/api/model/common_attributes'; + +const sessionStorage = new Storage(window.sessionStorage); + +/** + * Retrieves the LangSmith options from the AI Settings. + */ +export const getLangSmithOptions = ( + nameSpace: string = DEFAULT_ASSISTANT_NAMESPACE +): LangSmithOptions | undefined => { + // Get the LangSmith options stored by the AI Settings using the assistant context + // TODO: Encapsulate all AI Settings logic in a generic place. + const sessionStorageTraceOptions: TraceOptions = sessionStorage.get( + `${nameSpace}.${TRACE_OPTIONS_SESSION_STORAGE_KEY}` + ); + + if (!sessionStorageTraceOptions) { + return; + } + return { + projectName: sessionStorageTraceOptions.langSmithProject, + apiKey: sessionStorageTraceOptions.langSmithApiKey, + }; +}; diff --git a/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/generation_modal.tsx b/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/generation_modal.tsx index fe5a1dabb13746..237f4cd94ee338 100644 --- a/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/generation_modal.tsx +++ b/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/generation_modal.tsx @@ -24,6 +24,7 @@ import { import { isEmpty } from 'lodash/fp'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { css } from '@emotion/react'; +import { getLangSmithOptions } from '../../../../../common/lib/lang_smith'; import type { CategorizationRequestBody, EcsMappingRequestBody, @@ -87,6 +88,7 @@ export const useGeneration = ({ dataStreamName: integrationSettings.dataStreamName ?? '', rawSamples: integrationSettings.logsSampleParsed ?? [], connectorId: connector.id, + langSmithOptions: getLangSmithOptions(), }; setProgress('ecs'); diff --git a/x-pack/plugins/integration_assistant/server/routes/categorization_routes.ts b/x-pack/plugins/integration_assistant/server/routes/categorization_routes.ts index 2dbdc63210a598..80ebe9eb652583 100644 --- a/x-pack/plugins/integration_assistant/server/routes/categorization_routes.ts +++ b/x-pack/plugins/integration_assistant/server/routes/categorization_routes.ts @@ -11,6 +11,8 @@ import { ActionsClientChatOpenAI, ActionsClientSimpleChatModel, } from '@kbn/langchain/server/language_models'; +import { APMTracer } from '@kbn/langchain/server/tracers/apm'; +import { getLangSmithTracer } from '@kbn/langchain/server/tracers/langsmith'; import { CATEGORIZATION_GRAPH_PATH, CategorizationRequestBody, @@ -46,7 +48,8 @@ export function registerCategorizationRoutes( }, withAvailability( async (context, req, res): Promise> => { - const { packageName, dataStreamName, rawSamples, currentPipeline } = req.body; + const { packageName, dataStreamName, rawSamples, currentPipeline, langSmithOptions } = + req.body; const services = await context.resolve(['core']); const { client } = services.core.elasticsearch; const { getStartServices, logger } = await context.integrationAssistant; @@ -76,13 +79,22 @@ export function registerCategorizationRoutes( streaming: false, }); - const graph = await getCategorizationGraph(client, model); - const results = await graph.invoke({ + const parameters = { packageName, dataStreamName, rawSamples, currentPipeline, - }); + }; + const options = { + callbacks: [ + new APMTracer({ projectName: langSmithOptions?.projectName ?? 'default' }, logger), + ...getLangSmithTracer({ ...langSmithOptions, logger }), + ], + }; + + const graph = await getCategorizationGraph(client, model); + const results = await graph.invoke(parameters, options); + return res.ok({ body: CategorizationResponse.parse(results) }); } catch (e) { return res.badRequest({ body: e }); diff --git a/x-pack/plugins/integration_assistant/server/routes/ecs_routes.ts b/x-pack/plugins/integration_assistant/server/routes/ecs_routes.ts index d177aeb4b2cdff..69b13a004e98ed 100644 --- a/x-pack/plugins/integration_assistant/server/routes/ecs_routes.ts +++ b/x-pack/plugins/integration_assistant/server/routes/ecs_routes.ts @@ -11,6 +11,8 @@ import { ActionsClientChatOpenAI, ActionsClientSimpleChatModel, } from '@kbn/langchain/server/language_models'; +import { APMTracer } from '@kbn/langchain/server/tracers/apm'; +import { getLangSmithTracer } from '@kbn/langchain/server/tracers/langsmith'; import { ECS_GRAPH_PATH, EcsMappingRequestBody, EcsMappingResponse } from '../../common'; import { ROUTE_HANDLER_TIMEOUT } from '../constants'; import { getEcsGraph } from '../graphs/ecs'; @@ -39,7 +41,7 @@ export function registerEcsRoutes(router: IRouter> => { - const { packageName, dataStreamName, rawSamples, mapping } = req.body; + const { packageName, dataStreamName, rawSamples, mapping, langSmithOptions } = req.body; const { getStartServices, logger } = await context.integrationAssistant; const [, { actions: actionsPlugin }] = await getStartServices(); @@ -53,6 +55,7 @@ export function registerEcsRoutes(router: IRouter> => { - const { packageName, dataStreamName, rawSamples, currentPipeline } = req.body; + const { packageName, dataStreamName, rawSamples, currentPipeline, langSmithOptions } = + req.body; const services = await context.resolve(['core']); const { client } = services.core.elasticsearch; const { getStartServices, logger } = await context.integrationAssistant; @@ -68,13 +71,21 @@ export function registerRelatedRoutes(router: IRouter Date: Mon, 8 Jul 2024 12:53:25 -0600 Subject: [PATCH 024/103] [Security solution] Add model parameter to token telemetry (#187783) --- .../server/lib/action_executor.test.ts | 28 ++++++++++++++++++- .../actions/server/lib/action_executor.ts | 1 + .../server/lib/event_based_telemetry.ts | 8 ++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/actions/server/lib/action_executor.test.ts b/x-pack/plugins/actions/server/lib/action_executor.test.ts index bfcedc821368fc..b2e6badae3c594 100644 --- a/x-pack/plugins/actions/server/lib/action_executor.test.ts +++ b/x-pack/plugins/actions/server/lib/action_executor.test.ts @@ -1695,10 +1695,35 @@ describe('Event log', () => { { actionTypeId: '.gen-ai', completion_tokens: 9, prompt_tokens: 10, total_tokens: 19 } ); }); + test('reports telemetry for token count events with additional properties', async () => { + const executorMock = setupActionExecutorMock('.gen-ai', {} as ConnectorType['validate'], { + defaultModel: 'gpt-4', + apiProvider: 'OpenAI', + }); + executorMock.mockResolvedValue({ + actionId: '1', + status: 'ok', + // @ts-ignore + data: mockGenAi, + }); + await actionExecutor.execute(executeParams); + expect(actionExecutorInitializationParams.analyticsService.reportEvent).toHaveBeenCalledWith( + GEN_AI_TOKEN_COUNT_EVENT.eventType, + { + actionTypeId: '.gen-ai', + completion_tokens: 9, + prompt_tokens: 10, + total_tokens: 19, + model: 'gpt-4', + provider: 'OpenAI', + } + ); + }); }); function setupActionExecutorMock( actionTypeId = 'test', - validationOverride?: ConnectorType['validate'] + validationOverride?: ConnectorType['validate'], + additionalConfig?: Record ) { const thisConnectorType: jest.Mocked = { ...connectorType, @@ -1712,6 +1737,7 @@ function setupActionExecutorMock( actionTypeId, config: { bar: true, + ...additionalConfig, }, secrets: { baz: true, diff --git a/x-pack/plugins/actions/server/lib/action_executor.ts b/x-pack/plugins/actions/server/lib/action_executor.ts index f8f8f32547c10c..685e18c585ae07 100644 --- a/x-pack/plugins/actions/server/lib/action_executor.ts +++ b/x-pack/plugins/actions/server/lib/action_executor.ts @@ -603,6 +603,7 @@ export class ActionExecutor { ...(actionTypeId === '.gen-ai' && config?.apiProvider != null ? { provider: config?.apiProvider } : {}), + ...(config?.defaultModel != null ? { model: config?.defaultModel } : {}), }); } }) diff --git a/x-pack/plugins/actions/server/lib/event_based_telemetry.ts b/x-pack/plugins/actions/server/lib/event_based_telemetry.ts index eb7ad8dbdfb659..2a8006758489fb 100644 --- a/x-pack/plugins/actions/server/lib/event_based_telemetry.ts +++ b/x-pack/plugins/actions/server/lib/event_based_telemetry.ts @@ -13,6 +13,7 @@ export const GEN_AI_TOKEN_COUNT_EVENT: EventTypeOpts<{ prompt_tokens: number; completion_tokens: number; provider?: string; + model?: string; }> = { eventType: 'gen_ai_token_count', schema: { @@ -51,6 +52,13 @@ export const GEN_AI_TOKEN_COUNT_EVENT: EventTypeOpts<{ optional: true, }, }, + model: { + type: 'keyword', + _meta: { + description: 'LLM model', + optional: true, + }, + }, }, }; From 610c7bdbc8824ffbb7383760cdc723749add6a57 Mon Sep 17 00:00:00 2001 From: Kevin Lacabane Date: Mon, 8 Jul 2024 21:04:57 +0200 Subject: [PATCH 025/103] [eem] fix metadata fields painless script (#187755) ## Summary Closes https://github.com/elastic/kibana/issues/186873 The ingest pipeline painless scripts for metadata fields were not looking at the right context fields. This was not a problem until now because our the fields we collect had the same name in the entity document (`source field == destination field`), but for collecting _index we need a different destination to avoid breaking elasticsearch internals --- .../server/lib/entities/built_in/services.ts | 1 + .../helpers/fixtures/entity_definition.ts | 2 +- .../generate_history_processors.test.ts.snap | 3 +++ .../generate_latest_processors.test.ts.snap | 3 +++ .../generate_history_processors.ts | 9 ++++----- .../generate_latest_processors.ts | 9 ++++----- .../generate_history_transform.test.ts.snap | 6 ++++++ .../generate_latest_transform.test.ts.snap | 17 +++++++++++++++++ 8 files changed, 39 insertions(+), 11 deletions(-) diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/built_in/services.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/built_in/services.ts index 916fef586e4d5d..02c69771ed24f0 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/built_in/services.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/built_in/services.ts @@ -24,6 +24,7 @@ export const builtInServicesEntityDefinition: EntityDefinition = entityDefinitio identityFields: ['service.name', { field: 'service.environment', optional: true }], displayNameTemplate: '{{service.name}}{{#service.environment}}:{{.}}{{/service.environment}}', metadata: [ + { source: '_index', destination: 'sourceIndex' }, 'data_stream.type', 'service.instance.id', 'service.namespace', diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/entity_definition.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/entity_definition.ts index d284e0a2b1a688..b0d47a9044d4ae 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/entity_definition.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/entity_definition.ts @@ -17,7 +17,7 @@ export const entityDefinition = entityDefinitionSchema.parse({ }, identityFields: ['log.logger', { field: 'event.category', optional: true }], displayNameTemplate: '{{log.logger}}{{#event.category}}:{{.}}{{/event.category}}', - metadata: ['tags', 'host.name', 'host.os.name'], + metadata: ['tags', 'host.name', 'host.os.name', { source: '_index', destination: 'sourceIndex' }], metrics: [ { name: 'logRate', diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_history_processors.test.ts.snap b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_history_processors.test.ts.snap index 5f898999a68240..c646694ffef5e9 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_history_processors.test.ts.snap +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_history_processors.test.ts.snap @@ -91,6 +91,9 @@ if (ctx.entity?.metadata?.host?.os?.name != null) { if(ctx.host.os == null) ctx[\\"host\\"][\\"os\\"] = new HashMap(); ctx[\\"host\\"][\\"os\\"][\\"name\\"] = ctx.entity.metadata.host.os.name.keySet(); } +if (ctx.entity?.metadata?.sourceIndex != null) { + ctx[\\"sourceIndex\\"] = ctx.entity.metadata.sourceIndex.keySet(); +} ", }, }, diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_latest_processors.test.ts.snap b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_latest_processors.test.ts.snap index 1d30cbefe5b496..33d8504d937b26 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_latest_processors.test.ts.snap +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_latest_processors.test.ts.snap @@ -34,6 +34,9 @@ if (ctx.entity?.metadata?.host?.os?.name.data != null) { if(ctx.host.os == null) ctx[\\"host\\"][\\"os\\"] = new HashMap(); ctx[\\"host\\"][\\"os\\"][\\"name\\"] = ctx.entity.metadata.host.os.name.data.keySet(); } +if (ctx.entity?.metadata?.sourceIndex.data != null) { + ctx[\\"sourceIndex\\"] = ctx.entity.metadata.sourceIndex.data.keySet(); +} ", }, }, diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_history_processors.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_history_processors.ts index bc086c67d89e23..eea33d9adda794 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_history_processors.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_history_processors.ts @@ -14,13 +14,13 @@ function createIdTemplate(definition: EntityDefinition) { }, definition.displayNameTemplate); } -function mapDestinationToPainless(destination: string, source: string) { +function mapDestinationToPainless(destination: string) { const fieldParts = destination.split('.'); return fieldParts.reduce((acc, _part, currentIndex, parts) => { if (currentIndex + 1 === parts.length) { return `${acc}\n ctx${parts .map((s) => `["${s}"]`) - .join('')} = ctx.entity.metadata.${source}.keySet();`; + .join('')} = ctx.entity.metadata.${destination}.keySet();`; } return `${acc}\n if(ctx.${parts.slice(0, currentIndex + 1).join('.')} == null) ctx${parts .slice(0, currentIndex + 1) @@ -34,12 +34,11 @@ function createMetadataPainlessScript(definition: EntityDefinition) { return ''; } return definition.metadata.reduce((script, def) => { - const source = def.source; const destination = def.destination || def.source; - return `${script}if (ctx.entity?.metadata?.${source.replaceAll( + return `${script}if (ctx.entity?.metadata?.${destination.replaceAll( '.', '?.' - )} != null) {${mapDestinationToPainless(destination, source)}\n}\n`; + )} != null) {${mapDestinationToPainless(destination)}\n}\n`; }, ''); } diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_latest_processors.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_latest_processors.ts index 17e5c2a42786dd..1574659723601f 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_latest_processors.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_latest_processors.ts @@ -8,13 +8,13 @@ import { EntityDefinition } from '@kbn/entities-schema'; import { generateLatestIndexName } from '../helpers/generate_component_id'; -function mapDestinationToPainless(destination: string, source: string) { +function mapDestinationToPainless(destination: string) { const fieldParts = destination.split('.'); return fieldParts.reduce((acc, _part, currentIndex, parts) => { if (currentIndex + 1 === parts.length) { return `${acc}\n ctx${parts .map((s) => `["${s}"]`) - .join('')} = ctx.entity.metadata.${source}.data.keySet();`; + .join('')} = ctx.entity.metadata.${destination}.data.keySet();`; } return `${acc}\n if(ctx.${parts.slice(0, currentIndex + 1).join('.')} == null) ctx${parts .slice(0, currentIndex + 1) @@ -28,12 +28,11 @@ function createMetadataPainlessScript(definition: EntityDefinition) { return ''; } return definition.metadata.reduce((script, def) => { - const source = def.source; const destination = def.destination || def.source; - return `${script}if (ctx.entity?.metadata?.${source.replaceAll( + return `${script}if (ctx.entity?.metadata?.${destination.replaceAll( '.', '?.' - )}.data != null) {${mapDestinationToPainless(destination, source)}\n}\n`; + )}.data != null) {${mapDestinationToPainless(destination)}\n}\n`; }, ''); } diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_history_transform.test.ts.snap b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_history_transform.test.ts.snap index cb8dc7400e4494..bbea064c9b7ec1 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_history_transform.test.ts.snap +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_history_transform.test.ts.snap @@ -55,6 +55,12 @@ Object { "size": 1000, }, }, + "entity.metadata.sourceIndex": Object { + "terms": Object { + "field": "_index", + "size": 1000, + }, + }, "entity.metadata.tags": Object { "terms": Object { "field": "tags", diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_latest_transform.test.ts.snap b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_latest_transform.test.ts.snap index 5ebdda304606b6..d9dff5aa54c2ee 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_latest_transform.test.ts.snap +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_latest_transform.test.ts.snap @@ -82,6 +82,23 @@ Object { }, }, }, + "entity.metadata.sourceIndex": Object { + "aggs": Object { + "data": Object { + "terms": Object { + "field": "sourceIndex", + "size": 1000, + }, + }, + }, + "filter": Object { + "range": Object { + "event.ingested": Object { + "gte": "now-1m", + }, + }, + }, + }, "entity.metadata.tags": Object { "aggs": Object { "data": Object { From d9c3300ecffda52d6d3aff85324bf272e2220cd4 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Mon, 8 Jul 2024 14:26:59 -0500 Subject: [PATCH 026/103] skip failing test suite (#176336) --- .../cases/public/components/all_cases/severity_filter.test.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx b/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx index 199b0eebfb2c62..e5efc9463bb263 100644 --- a/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx @@ -14,7 +14,8 @@ import { screen, waitFor, within } from '@testing-library/react'; import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; import { SeverityFilter } from './severity_filter'; -describe('Severity form field', () => { +// Failing: See https://github.com/elastic/kibana/issues/176336 +describe.skip('Severity form field', () => { const onChange = jest.fn(); let appMockRender: AppMockRenderer; const props = { From 06d84b2b60f25e56ee578c695cbacc5f3363f35a Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 8 Jul 2024 14:29:53 -0500 Subject: [PATCH 027/103] Fix codeowners (#187780) --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0be536182eabd7..8e93aeee0dae11 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1425,7 +1425,7 @@ x-pack/test/security_solution_api_integration/test_suites/sources @elastic/secur /x-pack/test/security_solution_cypress/cypress/* @elastic/security-engineering-productivity /x-pack/test/security_solution_cypress/cypress/tasks/login.ts @elastic/security-engineering-productivity /x-pack/test/security_solution_cypress/es_archives @elastic/security-engineering-productivity -/x-pack/plugins/security_solution/scripts/run_cypress @MadameSheema @patrykkopycinski @oatkiller @maximpn @banderror +/x-pack/plugins/security_solution/scripts/run_cypress @MadameSheema @patrykkopycinski @maximpn @banderror ## Security Solution sub teams - Threat Hunting Investigations From fe131d47170f463887ce2230105042e8a7a755a2 Mon Sep 17 00:00:00 2001 From: Candace Park <56409205+parkiino@users.noreply.github.com> Date: Mon, 8 Jul 2024 15:50:54 -0400 Subject: [PATCH 028/103] [Security Solution][AVC banner] Add AVC results banner to elastic defend home page and integrations (#186942) ## Summary - [x] Shows a banner with the 2024 AVC results blog link in 2 places: the Security homepage and the Elastic Defend integration page info - [x] Banner will not show again once dismissed - [x] Unit Tests TODO in another pr: have code to remove the avc banner code at the end of the year ## Screenshots image image --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Paul Tavares --- packages/kbn-doc-links/src/get_doc_links.ts | 1 + packages/kbn-doc-links/src/types.ts | 1 + .../avc_banner/avc_banner_background.svg | 329 ++++++++++++++++++ .../avc_banner/avc_results_banner_2024.tsx | 56 +++ .../epm/screens/detail/overview/overview.tsx | 22 ++ .../avc_banner/avc_banner_background.svg | 329 ++++++++++++++++++ .../avc_banner/avc_results_banner_2024.tsx | 58 +++ .../onboarding/onboarding.test.tsx | 95 ++--- .../landing_page/onboarding/onboarding.tsx | 21 +- .../onboarding/styles/onboarding.styles.ts | 3 + .../public/common/mock/mock_local_storage.ts | 13 +- 11 files changed, 881 insertions(+), 47 deletions(-) create mode 100644 x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/avc_banner/avc_banner_background.svg create mode 100644 x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/avc_banner/avc_results_banner_2024.tsx create mode 100644 x-pack/plugins/security_solution/public/common/components/avc_banner/avc_banner_background.svg create mode 100644 x-pack/plugins/security_solution/public/common/components/avc_banner/avc_results_banner_2024.tsx diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts index 951bdbb531d60a..ba74061778b6d3 100644 --- a/packages/kbn-doc-links/src/get_doc_links.ts +++ b/packages/kbn-doc-links/src/get_doc_links.ts @@ -462,6 +462,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D }, securitySolution: { artifactControl: `${SECURITY_SOLUTION_DOCS}artifact-control.html`, + avcResults: `${ELASTIC_WEBSITE_URL}blog/elastic-security-malware-protection-test-av-comparatives`, trustedApps: `${SECURITY_SOLUTION_DOCS}trusted-apps-ov.html`, eventFilters: `${SECURITY_SOLUTION_DOCS}event-filters.html`, blocklist: `${SECURITY_SOLUTION_DOCS}blocklist.html`, diff --git a/packages/kbn-doc-links/src/types.ts b/packages/kbn-doc-links/src/types.ts index 7a296aac6d8bae..5586f0f8f201fe 100644 --- a/packages/kbn-doc-links/src/types.ts +++ b/packages/kbn-doc-links/src/types.ts @@ -334,6 +334,7 @@ export interface DocLinks { }; readonly securitySolution: { readonly artifactControl: string; + readonly avcResults: string; readonly trustedApps: string; readonly eventFilters: string; readonly blocklist: string; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/avc_banner/avc_banner_background.svg b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/avc_banner/avc_banner_background.svg new file mode 100644 index 00000000000000..cd37f26c95f7b5 --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/avc_banner/avc_banner_background.svg @@ -0,0 +1,329 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/avc_banner/avc_results_banner_2024.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/avc_banner/avc_results_banner_2024.tsx new file mode 100644 index 00000000000000..63a3f68254c6c9 --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/avc_banner/avc_results_banner_2024.tsx @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { css } from '@emotion/css'; +import { i18n } from '@kbn/i18n'; +import { EuiButton, EuiCallOut, EuiSpacer, useEuiTheme } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; + +import avcBannerBackground from './avc_banner_background.svg'; + +export const AVCResultsBanner2024: React.FC<{ onDismiss: () => void }> = ({ onDismiss }) => { + const { docLinks } = useKibana().services; + const { euiTheme } = useEuiTheme(); + const bannerTitle = i18n.translate( + 'xpack.fleet.integrations.epm.elasticDefend.avcResultsBanner.title', + { + defaultMessage: '100% protection with zero false positives.', + } + ); + + const calloutStyles = css({ + paddingLeft: `${euiTheme.size.xl}`, + backgroundImage: `url(${avcBannerBackground})`, + backgroundRepeat: 'no-repeat', + backgroundPositionX: 'right', + backgroundPositionY: 'bottom', + }); + + return ( + + + + + + + + ); +}; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/overview.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/overview.tsx index 85899dc8d86c3a..f9c2d80d3336e1 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/overview.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/overview.tsx @@ -20,6 +20,8 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; + import { isIntegrationPolicyTemplate, isPackagePrerelease, @@ -36,6 +38,10 @@ import { isPackageUnverified } from '../../../../../../../services'; import type { PackageInfo, RegistryPolicyTemplate } from '../../../../../types'; import { SideBarColumn } from '../../../components/side_bar_column'; +import type { FleetStartServices } from '../../../../../../../plugin'; + +import { AVCResultsBanner2024 } from './avc_banner/avc_results_banner_2024'; + import { Screenshots } from './screenshots'; import { Readme } from './readme'; import { Details } from './details'; @@ -159,9 +165,11 @@ export const OverviewPage: React.FC = memo( () => integrationInfo?.screenshots || packageInfo.screenshots || [], [integrationInfo, packageInfo.screenshots] ); + const { storage } = useKibana().services; const { packageVerificationKeyId } = useGetPackageVerificationKeyId(); const isUnverified = isPackageUnverified(packageInfo, packageVerificationKeyId); const isPrerelease = isPackagePrerelease(packageInfo.version); + const isElasticDefend = packageInfo.name === 'endpoint'; const [markdown, setMarkdown] = useState(undefined); const [selectedItemId, setSelectedItem] = useState(undefined); const [isSideNavOpenOnMobile, setIsSideNavOpenOnMobile] = useState(false); @@ -283,6 +291,14 @@ export const OverviewPage: React.FC = memo( const requireAgentRootPrivileges = isRootPrivilegesRequired(packageInfo); + const [showAVCBanner, setShowAVCBanner] = useState( + storage.get('securitySolution.showAvcBanner') ?? true + ); + const onBannerDismiss = useCallback(() => { + setShowAVCBanner(false); + storage.set('securitySolution.showAvcBanner', false); + }, [storage]); + return ( @@ -297,6 +313,12 @@ export const OverviewPage: React.FC = memo( {isUnverified && } + {isElasticDefend && showAVCBanner && ( + <> + + + + )} {isPrerelease && ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x-pack/plugins/security_solution/public/common/components/avc_banner/avc_results_banner_2024.tsx b/x-pack/plugins/security_solution/public/common/components/avc_banner/avc_results_banner_2024.tsx new file mode 100644 index 00000000000000..0c73af1ef4861b --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/avc_banner/avc_results_banner_2024.tsx @@ -0,0 +1,58 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { css } from '@emotion/css'; +import { i18n } from '@kbn/i18n'; +import { EuiButton, EuiCallOut, EuiSpacer, useEuiTheme } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { useKibana } from '../../lib/kibana'; +import avcBannerBackground from './avc_banner_background.svg'; + +export const AVCResultsBanner2024: React.FC<{ onDismiss: () => void }> = ({ onDismiss }) => { + const { docLinks } = useKibana().services; + const { euiTheme } = useEuiTheme(); + const bannerTitle = i18n.translate('xpack.securitySolution.common.avcResultsBanner.title', { + defaultMessage: '100% protection with zero false positives.', + }); + + const calloutStyles = css({ + paddingLeft: `${euiTheme.size.xl}`, + backgroundImage: `url(${avcBannerBackground})`, + backgroundRepeat: 'no-repeat', + backgroundPositionX: 'right', + backgroundPositionY: 'bottom', + }); + + return ( + + + + + + + + ); +}; diff --git a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.test.tsx b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.test.tsx index f3e6dfdd644c39..fb7b6b4c9ec6b4 100644 --- a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.test.tsx @@ -5,7 +5,6 @@ * 2.0. */ import React from 'react'; -import { render } from '@testing-library/react'; import { OnboardingComponent } from './onboarding'; import { AddIntegrationsSteps, @@ -15,44 +14,19 @@ import { ViewDashboardSteps, } from './types'; import { ProductLine, ProductTier } from './configs'; +import { useCurrentUser, useKibana } from '../../../lib/kibana'; +import type { AppContextTestRender } from '../../../mock/endpoint'; +import { createAppRootMockRenderer } from '../../../mock/endpoint'; + jest.mock('./toggle_panel'); -jest.mock('./hooks/use_project_features_url'); -jest.mock('./hooks/use_projects_url'); -jest.mock('../../../lib/kibana', () => { - const original = jest.requireActual('../../../lib/kibana'); - return { - ...original, - useCurrentUser: jest.fn().mockReturnValue({ fullName: 'UserFullName' }), - useAppUrl: jest.fn().mockReturnValue({ getAppUrl: jest.fn().mockReturnValue('mock url') }), - }; -}); -jest.mock('@elastic/eui', () => { - const original = jest.requireActual('@elastic/eui'); - return { - ...original, - useEuiTheme: jest.fn().mockReturnValue({ - euiTheme: { - base: 16, - size: { xs: '4px', m: '12px', l: '24px', xl: '32px', xxl: '40px' }, - colors: { lightestShade: '' }, - font: { - weight: { bold: 700 }, - }, - }, - }), - }; -}); -jest.mock('react-router-dom', () => ({ - useLocation: jest.fn().mockReturnValue({ hash: '#watch_the_overview_video' }), -})); -jest.mock('@kbn/security-solution-navigation', () => ({ - useNavigateTo: jest.fn().mockReturnValue({ navigateTo: jest.fn() }), - SecurityPageName: { - landing: 'landing', - }, -})); +jest.mock('../../../lib/kibana'); + +(useCurrentUser as jest.Mock).mockReturnValue({ fullName: 'UserFullName' }); describe('OnboardingComponent', () => { + let render: () => ReturnType; + let renderResult: ReturnType; + let mockedContext: AppContextTestRender; const props = { indicesExist: true, productTypes: [{ product_line: ProductLine.security, product_tier: ProductTier.complete }], @@ -65,16 +39,22 @@ describe('OnboardingComponent', () => { ], spaceId: 'spaceId', }; + beforeEach(() => { + mockedContext = createAppRootMockRenderer(); + render = () => (renderResult = mockedContext.render()); + }); + + afterEach(() => { jest.clearAllMocks(); }); it('should render page title, subtitle, and description', () => { - const { getByText } = render(); + render(); - const pageTitle = getByText('Hi UserFullName!'); - const subtitle = getByText(`Get started with Security`); - const description = getByText( + const pageTitle = renderResult.getByText('Hi UserFullName!'); + const subtitle = renderResult.getByText(`Get started with Security`); + const description = renderResult.getByText( `This area shows you everything you need to know. Feel free to explore all content. You can always come back here at any time.` ); @@ -84,12 +64,41 @@ describe('OnboardingComponent', () => { }); it('should render welcomeHeader and TogglePanel', () => { - const { getByTestId } = render(); + render(); - const welcomeHeader = getByTestId('welcome-header'); - const togglePanel = getByTestId('toggle-panel'); + const welcomeHeader = renderResult.getByTestId('welcome-header'); + const togglePanel = renderResult.getByTestId('toggle-panel'); expect(welcomeHeader).toBeInTheDocument(); expect(togglePanel).toBeInTheDocument(); }); + describe('AVC 2024 Results banner', () => { + it('should render on the page', () => { + render(); + expect(renderResult.getByTestId('avcResultsBanner')).toBeTruthy(); + }); + + it('should link to the blog post', () => { + render(); + expect(renderResult.getByTestId('avcReadTheBlog')).toHaveAttribute( + 'href', + 'https://www.elastic.co/blog/elastic-security-malware-protection-test-av-comparatives' + ); + }); + + it('on closing the callout should store dismissal state in local storage', () => { + render(); + renderResult.getByTestId('euiDismissCalloutButton').click(); + expect(renderResult.queryByTestId('avcResultsBanner')).toBeNull(); + expect(useKibana().services.storage.set).toHaveBeenCalledWith( + 'securitySolution.showAvcBanner', + false + ); + }); + it('should stay dismissed if it has been closed once', () => { + (useKibana().services.storage.get as jest.Mock).mockReturnValue(false); + render(); + expect(renderResult.queryByTestId('avcResultsBanner')).toBeNull(); + }); + }); }); diff --git a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.tsx b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.tsx index 624070c812ed71..c19f03f63461d0 100644 --- a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.tsx +++ b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/onboarding.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { useCallback, useMemo } from 'react'; +import React, { useCallback, useMemo, useState } from 'react'; import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; import { TogglePanel } from './toggle_panel'; @@ -24,6 +24,7 @@ import type { StepId } from './types'; import { useOnboardingStyles } from './styles/onboarding.styles'; import { useKibana } from '../../../lib/kibana'; import type { OnboardingHubStepLinkClickedParams } from '../../../lib/telemetry/events/onboarding/types'; +import { AVCResultsBanner2024 } from '../../avc_banner/avc_results_banner_2024'; interface OnboardingProps { indicesExist?: boolean; @@ -55,8 +56,9 @@ export const OnboardingComponent: React.FC = ({ productTypes?.find((product) => product.product_line === ProductLine.security)?.product_tier, [productTypes] ); - const { wrapperStyles, progressSectionStyles, stepsSectionStyles } = useOnboardingStyles(); - const { telemetry } = useKibana().services; + const { wrapperStyles, progressSectionStyles, stepsSectionStyles, bannerStyles } = + useOnboardingStyles(); + const { telemetry, storage } = useKibana().services; const onStepLinkClicked = useCallback( (params: OnboardingHubStepLinkClickedParams) => { telemetry.reportOnboardingHubStepLinkClicked(params); @@ -64,10 +66,23 @@ export const OnboardingComponent: React.FC = ({ [telemetry] ); + const [showAVCBanner, setShowAVCBanner] = useState( + storage.get('securitySolution.showAvcBanner') ?? true + ); + const onBannerDismiss = useCallback(() => { + setShowAVCBanner(false); + storage.set('securitySolution.showAvcBanner', false); + }, [storage]); + useScrollToHash(); return (
+ {showAVCBanner && ( + + + + )} diff --git a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/styles/onboarding.styles.ts b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/styles/onboarding.styles.ts index f4a3901f4e2c0c..4f2eb59f06bf28 100644 --- a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/styles/onboarding.styles.ts +++ b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/styles/onboarding.styles.ts @@ -25,6 +25,9 @@ export const useOnboardingStyles = () => { padding: `0 ${euiTheme.size.xxl} ${euiTheme.size.xxxl}`, backgroundColor: euiTheme.colors.lightestShade, }), + bannerStyles: css({ + margin: `-${euiTheme.size.l} 0`, + }), }), [ euiTheme.colors.lightestShade, diff --git a/x-pack/plugins/security_solution/public/common/mock/mock_local_storage.ts b/x-pack/plugins/security_solution/public/common/mock/mock_local_storage.ts index 36466231b64a4b..24be4de96cf9bc 100644 --- a/x-pack/plugins/security_solution/public/common/mock/mock_local_storage.ts +++ b/x-pack/plugins/security_solution/public/common/mock/mock_local_storage.ts @@ -27,10 +27,21 @@ export const localStorageMock = (): IStorage => { }; }; +const createStorageMock = (storeMock: IStorage): Storage => { + const storage = new Storage(storeMock); + return { + store: storeMock, + get: jest.fn((...args) => storage.get(...args)), + clear: jest.fn((...args) => storage.clear(...args)), + set: jest.fn((...args) => storage.set(...args)), + remove: jest.fn((...args) => storage.remove(...args)), + } as Storage; +}; + export const createSecuritySolutionStorageMock = () => { const localStorage = localStorageMock(); return { localStorage, - storage: new Storage(localStorage), + storage: createStorageMock(localStorage), }; }; From cecdf31039c023617e8d5238deb5735c90df4e16 Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 8 Jul 2024 15:27:40 -0500 Subject: [PATCH 029/103] [ci] Skip project image build if manifest exists on pull requests (#187680) Currently, if a container image already exists for a project the script exits early with a failure. In cases where CI is re-triggered, this can be inconvenient and require an upstream merge to rebuild. Instead of exiting early, this skips the image build on pull requests. --- .../scripts/steps/artifacts/docker_image.sh | 133 ++++++++++-------- 1 file changed, 71 insertions(+), 62 deletions(-) diff --git a/.buildkite/scripts/steps/artifacts/docker_image.sh b/.buildkite/scripts/steps/artifacts/docker_image.sh index 551910432c413e..77790bf3d5a8a5 100755 --- a/.buildkite/scripts/steps/artifacts/docker_image.sh +++ b/.buildkite/scripts/steps/artifacts/docker_image.sh @@ -18,46 +18,82 @@ export KIBANA_IMAGE="$KIBANA_BASE_IMAGE:$KIBANA_IMAGE_TAG" echo "--- Verify manifest does not already exist" echo "Checking manifest for $KIBANA_IMAGE" -if docker manifest inspect $KIBANA_IMAGE &> /dev/null; then - echo "Manifest already exists, exiting" - exit 1 +SKIP_BUILD=false +if docker manifest inspect "$KIBANA_IMAGE" &> /dev/null; then + # If a staging build manifest already exists, there's a workflow error and the root cause should be investigated. + if [[ "${BUILDKITE_PULL_REQUEST:-false}" == "false" ]]; then + echo "Manifest already exists, exiting" + exit 1 + else + echo "Manifest already exists, skipping build. Look up previous build for artifacts." + SKIP_BUILD=true + fi fi -echo "--- Build Kibana" -node scripts/build \ - --debug \ - --release \ - --serverless \ - --docker-cross-compile \ - --docker-namespace="kibana-ci" \ - --docker-tag="$KIBANA_IMAGE_TAG" - -echo "--- Tag images" -docker rmi "$KIBANA_IMAGE" -docker load < "target/kibana-serverless-$BASE_VERSION-docker-image.tar.gz" -docker tag "$KIBANA_IMAGE" "$KIBANA_IMAGE-amd64" - -docker rmi "$KIBANA_IMAGE" -docker load < "target/kibana-serverless-$BASE_VERSION-docker-image-aarch64.tar.gz" -docker tag "$KIBANA_IMAGE" "$KIBANA_IMAGE-arm64" - -echo "--- Push images" -docker image push "$KIBANA_IMAGE-arm64" -docker image push "$KIBANA_IMAGE-amd64" - -echo "--- Create and push manifests" -docker manifest create \ - "$KIBANA_IMAGE" \ - --amend "$KIBANA_IMAGE-arm64" \ - --amend "$KIBANA_IMAGE-amd64" -docker manifest push "$KIBANA_IMAGE" - -if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]] && [[ "${BUILDKITE_PULL_REQUEST:-false}" == "false" ]]; then +if [[ "$SKIP_BUILD" == "false" ]]; then + echo "--- Build Kibana" + node scripts/build \ + --debug \ + --release \ + --serverless \ + --docker-cross-compile \ + --docker-namespace="kibana-ci" \ + --docker-tag="$KIBANA_IMAGE_TAG" + + echo "--- Tag images" + docker rmi "$KIBANA_IMAGE" + docker load < "target/kibana-serverless-$BASE_VERSION-docker-image.tar.gz" + docker tag "$KIBANA_IMAGE" "$KIBANA_IMAGE-amd64" + + docker rmi "$KIBANA_IMAGE" + docker load < "target/kibana-serverless-$BASE_VERSION-docker-image-aarch64.tar.gz" + docker tag "$KIBANA_IMAGE" "$KIBANA_IMAGE-arm64" + + echo "--- Push images" + docker image push "$KIBANA_IMAGE-arm64" + docker image push "$KIBANA_IMAGE-amd64" + + echo "--- Create and push manifests" docker manifest create \ - "$KIBANA_BASE_IMAGE:latest" \ + "$KIBANA_IMAGE" \ --amend "$KIBANA_IMAGE-arm64" \ --amend "$KIBANA_IMAGE-amd64" - docker manifest push "$KIBANA_BASE_IMAGE:latest" + docker manifest push "$KIBANA_IMAGE" + + if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]] && [[ "${BUILDKITE_PULL_REQUEST:-false}" == "false" ]]; then + docker manifest create \ + "$KIBANA_BASE_IMAGE:latest" \ + --amend "$KIBANA_IMAGE-arm64" \ + --amend "$KIBANA_IMAGE-amd64" + docker manifest push "$KIBANA_BASE_IMAGE:latest" + fi + + echo "--- Build dependencies report" + node scripts/licenses_csv_report "--csv=target/dependencies-$GIT_ABBREV_COMMIT.csv" + + echo "--- Upload archives" + buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-linux-x86_64.tar.gz" + buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-linux-aarch64.tar.gz" + buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-image.tar.gz" + buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-image-aarch64.tar.gz" + buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-build-context.tar.gz" + buildkite-agent artifact upload "kibana-$BASE_VERSION-cdn-assets.tar.gz" + buildkite-agent artifact upload "dependencies-$GIT_ABBREV_COMMIT.csv" + + echo "--- Upload CDN assets" + cd target + gcloud auth activate-service-account --key-file <(echo "$GCS_SA_CDN_KEY") + + CDN_ASSETS_FOLDER=$(mktemp -d) + tar -xf "kibana-$BASE_VERSION-cdn-assets.tar.gz" -C "$CDN_ASSETS_FOLDER" --strip=1 + + gsutil -m cp -r "$CDN_ASSETS_FOLDER/*" "gs://$GCS_SA_CDN_BUCKET/$GIT_ABBREV_COMMIT" + gcloud auth revoke "$GCS_SA_CDN_EMAIL" + + echo "--- Validate CDN assets" + ts-node "$(git rev-parse --show-toplevel)/.buildkite/scripts/steps/artifacts/validate_cdn_assets.ts" \ + "$GCS_SA_CDN_URL" \ + "$CDN_ASSETS_FOLDER" fi cat << EOF | buildkite-agent annotate --style "info" --context image @@ -75,33 +111,6 @@ if [[ "${BUILDKITE_PULL_REQUEST:-false}" != "false" ]]; then buildkite-agent meta-data set pr_comment:early_comment_job_id "$BUILDKITE_JOB_ID" fi -echo "--- Build dependencies report" -node scripts/licenses_csv_report "--csv=target/dependencies-$GIT_ABBREV_COMMIT.csv" - -echo "--- Upload CDN assets" -cd target -gcloud auth activate-service-account --key-file <(echo "$GCS_SA_CDN_KEY") - -CDN_ASSETS_FOLDER=$(mktemp -d) -tar -xf "kibana-$BASE_VERSION-cdn-assets.tar.gz" -C "$CDN_ASSETS_FOLDER" --strip=1 - -gsutil -m cp -r "$CDN_ASSETS_FOLDER/*" "gs://$GCS_SA_CDN_BUCKET/$GIT_ABBREV_COMMIT" -gcloud auth revoke "$GCS_SA_CDN_EMAIL" - -echo "--- Validate CDN assets" -ts-node "$(git rev-parse --show-toplevel)/.buildkite/scripts/steps/artifacts/validate_cdn_assets.ts" \ - "$GCS_SA_CDN_URL" \ - "$CDN_ASSETS_FOLDER" - -echo "--- Upload archives" -buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-linux-x86_64.tar.gz" -buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-linux-aarch64.tar.gz" -buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-image.tar.gz" -buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-image-aarch64.tar.gz" -buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-build-context.tar.gz" -buildkite-agent artifact upload "kibana-$BASE_VERSION-cdn-assets.tar.gz" -buildkite-agent artifact upload "dependencies-$GIT_ABBREV_COMMIT.csv" - # This part is related with updating the configuration of kibana-controller, # so that new stack instances contain the latest and greatest image of kibana, # and the respective stack components of course. From dd9d6434cae8b7beb3b730cd42898b8f63dbee91 Mon Sep 17 00:00:00 2001 From: Brad White Date: Mon, 8 Jul 2024 15:10:14 -0600 Subject: [PATCH 030/103] Remove Agent Debug Info (#187126) ## Summary - Removes SSH info to avoid confusion since we cannot SSH into agents on the new infra - Removes old agent metrics and logs links because they are in a different cluster and the new links are in an annotation --- .buildkite/scripts/lifecycle/post_command.sh | 7 --- .buildkite/scripts/lifecycle/pre_command.sh | 10 ---- .../scripts/lifecycle/print_agent_links.ts | 47 ------------------- 3 files changed, 64 deletions(-) delete mode 100644 .buildkite/scripts/lifecycle/print_agent_links.ts diff --git a/.buildkite/scripts/lifecycle/post_command.sh b/.buildkite/scripts/lifecycle/post_command.sh index b22293dbcb8b68..47e118a402408c 100755 --- a/.buildkite/scripts/lifecycle/post_command.sh +++ b/.buildkite/scripts/lifecycle/post_command.sh @@ -6,13 +6,6 @@ echo '--- Log out of gcloud' ./.buildkite/scripts/common/activate_service_account.sh --unset-impersonation || echo "Failed to unset impersonation" ./.buildkite/scripts/common/activate_service_account.sh --logout-gcloud || echo "Failed to log out of gcloud" -if [[ "${SKIP_NODE_SETUP:-}" =~ ^(1|true)$ ]]; then - echo '--- Skipping Agent Debug Info' -else - echo '--- Agent Debug Info' - ts-node .buildkite/scripts/lifecycle/print_agent_links.ts || true -fi - IS_TEST_EXECUTION_STEP="$(buildkite-agent meta-data get "${BUILDKITE_JOB_ID}_is_test_execution_step" --default '')" if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then diff --git a/.buildkite/scripts/lifecycle/pre_command.sh b/.buildkite/scripts/lifecycle/pre_command.sh index c0b08f474bbd20..3b2a3dcdcdad11 100755 --- a/.buildkite/scripts/lifecycle/pre_command.sh +++ b/.buildkite/scripts/lifecycle/pre_command.sh @@ -11,16 +11,6 @@ if [[ "${SKIP_NODE_SETUP:-}" =~ ^(1|true)$ ]]; then else source .buildkite/scripts/common/setup_node.sh source .buildkite/scripts/common/setup_buildkite_deps.sh - - echo '--- Agent Debug/SSH Info' - ts-node .buildkite/scripts/lifecycle/print_agent_links.ts || true -fi - -if [[ "$(curl -is metadata.google.internal || true)" ]]; then - echo "" - echo "To SSH into this agent, run:" - echo "gcloud compute ssh --tunnel-through-iap --project elastic-kibana-ci --zone \"$(curl -sH Metadata-Flavor:Google http://metadata.google.internal/computeMetadata/v1/instance/zone)\" \"$(curl -sH Metadata-Flavor:Google http://metadata.google.internal/computeMetadata/v1/instance/name)\"" - echo "" fi if [[ "${BUILDKITE_LABEL:-}" == *"Run Dynamic Pipeline"* || "${BUILDKITE_LABEL:-}" == *"Upload Pipeline"* ]]; then diff --git a/.buildkite/scripts/lifecycle/print_agent_links.ts b/.buildkite/scripts/lifecycle/print_agent_links.ts deleted file mode 100644 index 428ec3dc0aaffb..00000000000000 --- a/.buildkite/scripts/lifecycle/print_agent_links.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { BuildkiteClient } from '#pipeline-utils'; - -(async () => { - try { - const client = new BuildkiteClient(); - const build = await client.getCurrentBuild(); - - const job = build.jobs.find((j) => j.id === process.env.BUILDKITE_JOB_ID); - const startTime = job - ? new Date(job.started_at) - : new Date(new Date().getTime() - 60 * 60 * 1000); - const twoHours = new Date(startTime.getTime() + 2 * 60 * 60 * 1000); - - const METRICS_URL = [ - `https://kibana-ops-buildkite-monitoring.kb.us-central1.gcp.cloud.es.io:9243`, - `/app/metrics/link-to/host-detail/${process.env.BUILDKITE_AGENT_NAME}`, - `?to=${twoHours.getTime()}`, - `&from=${startTime.getTime()}`, - ].join(''); - - const LOGS_URL = [ - `https://kibana-ops-buildkite-monitoring.kb.us-central1.gcp.cloud.es.io:9243`, - `/app/logs/link-to/host-logs/${process.env.BUILDKITE_AGENT_NAME}`, - `?time=${startTime.getTime()}`, - ].join(''); - - console.log('Agent Metrics:'); - console.log('\u001b]1339;' + `url='${METRICS_URL}'\u0007`); - console.log('Agent Logs:'); - console.log('\u001b]1339;' + `url='${LOGS_URL}'\u0007`); - } catch (ex) { - // Probably don't need to fail the build for this failure, just log it - console.error('Buildkite API Error', ex.message); - if (ex.response) { - console.error('HTTP Error Response Status', ex.response.status); - console.error('HTTP Error Response Body', ex.response.data); - } - } -})(); From 94b9a489338f55acb6f43b0e90fa1d40e4b24860 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 08:28:44 +1000 Subject: [PATCH 031/103] Update dependency @redocly/cli to ^1.17.0 (main) (#187765) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alejandro Fernández Haro --- package.json | 2 +- yarn.lock | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 8b21bc2735362c..fe7f2ff531469b 100644 --- a/package.json +++ b/package.json @@ -1401,7 +1401,7 @@ "@mapbox/vector-tile": "1.3.1", "@octokit/rest": "^17.11.2", "@parcel/watcher": "^2.1.0", - "@redocly/cli": "^1.16.0", + "@redocly/cli": "^1.17.0", "@statoscope/webpack-plugin": "^5.28.2", "@storybook/addon-a11y": "^6.5.16", "@storybook/addon-actions": "^6.5.16", diff --git a/yarn.lock b/yarn.lock index a56e1f57733361..57727ccb87af0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8100,12 +8100,12 @@ require-from-string "^2.0.2" uri-js "^4.2.2" -"@redocly/cli@^1.16.0": - version "1.16.0" - resolved "https://registry.yarnpkg.com/@redocly/cli/-/cli-1.16.0.tgz#c8885ad46bb9993792e4266535692ce0ceb3895f" - integrity sha512-REmwkNHOd4e50vPeL6mDgHVdyUQ8e+y0cggi/cNXQzGpkZEk17Z+WFL8UFlcM+WebMWDXulJE712jT2lGYS9Zg== +"@redocly/cli@^1.17.0": + version "1.17.1" + resolved "https://registry.yarnpkg.com/@redocly/cli/-/cli-1.17.1.tgz#a6b5523e98ff84530b7c2654a897414b16dcf6b5" + integrity sha512-a7OIlsGQT8OBRMPswqcJzCoub/nvm1zYvOCOBnaLt1cYeYK9nRzYCXA6Bnx0I7wMCXf5YmL7rVTMG8RJTC+3mA== dependencies: - "@redocly/openapi-core" "1.16.0" + "@redocly/openapi-core" "1.17.1" abort-controller "^3.0.0" chokidar "^3.5.1" colorette "^1.2.0" @@ -8124,18 +8124,18 @@ styled-components "^6.0.7" yargs "17.0.1" -"@redocly/config@^0.6.0": - version "0.6.1" - resolved "https://registry.yarnpkg.com/@redocly/config/-/config-0.6.1.tgz#931da21d6cbf8e73a873ca12ae690902d848cbb5" - integrity sha512-p4mlj+CD3Byec3wOxDlDln0B0gOcNvEkpl4jn3/e9y8h11ogzXnWxnlJAtE5Kcr1ByujS/7Mbt01df9z1xfMbg== +"@redocly/config@^0.6.2": + version "0.6.2" + resolved "https://registry.yarnpkg.com/@redocly/config/-/config-0.6.2.tgz#b5180ccb407673ee048b818c3be9a4f9d0636a64" + integrity sha512-c3K5u64eMnr2ootPcpEI0ioIRLE8QP8ptvLxG9MwAmb2sU8HMRfVwXDU3AZiMVY2w4Ts0mDc+Xv4HTIk8DRqFw== -"@redocly/openapi-core@1.16.0", "@redocly/openapi-core@^1.4.0": - version "1.16.0" - resolved "https://registry.yarnpkg.com/@redocly/openapi-core/-/openapi-core-1.16.0.tgz#95afcf822890af3fe8f1bde97018370b5cadb8ca" - integrity sha512-z06h+svyqbUcdAaePq8LPSwTPlm6Ig7j2VlL8skPBYnJvyaQ2IN7x/JkOvRL4ta+wcOCBdAex5JWnZbKaNktJg== +"@redocly/openapi-core@1.17.1", "@redocly/openapi-core@^1.4.0": + version "1.17.1" + resolved "https://registry.yarnpkg.com/@redocly/openapi-core/-/openapi-core-1.17.1.tgz#d18c5223e5b578d64d789c4101b96cbb589162dc" + integrity sha512-PQxDLLNk5cBatJBBxvfk49HFw/nVozw1XZ6Dw/GX0Tviq+WxeEjEuLAKfnLVvb5L0wgs4TNmVG4Y+JyofSPu1A== dependencies: "@redocly/ajv" "^8.11.0" - "@redocly/config" "^0.6.0" + "@redocly/config" "^0.6.2" colorette "^1.2.0" https-proxy-agent "^7.0.4" js-levenshtein "^1.1.6" From 6a2abd68091b86b4e5b02359e346300371346f2a Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Mon, 8 Jul 2024 16:42:06 -0700 Subject: [PATCH 032/103] [ResponseOps][Cases] Edits case template text (#187610) --- x-pack/plugins/cases/public/common/translations.ts | 4 ++-- .../actions/copy_id/use_copy_id_action.test.tsx | 4 ++-- .../public/components/configure_cases/flyout.test.tsx | 2 +- .../cases/public/components/create/translations.ts | 2 +- .../public/components/custom_fields/text/create.test.tsx | 2 +- .../public/components/custom_fields/text/edit.test.tsx | 2 +- .../cases/public/components/custom_fields/translations.ts | 2 +- .../cases/public/components/templates/translations.ts | 8 +++----- 8 files changed, 12 insertions(+), 14 deletions(-) diff --git a/x-pack/plugins/cases/public/common/translations.ts b/x-pack/plugins/cases/public/common/translations.ts index eab026897e3bff..e83bbfd0013d19 100644 --- a/x-pack/plugins/cases/public/common/translations.ts +++ b/x-pack/plugins/cases/public/common/translations.ts @@ -22,11 +22,11 @@ export const DELETE_CASE = (quantity: number = 1) => }); export const COPY_ID_ACTION_LABEL = i18n.translate('xpack.cases.caseView.copyID', { - defaultMessage: 'Copy Case ID', + defaultMessage: 'Copy case ID', }); export const COPY_ID_ACTION_SUCCESS = i18n.translate('xpack.cases.caseView.copyIDSuccess', { - defaultMessage: 'Copied Case ID to clipboard', + defaultMessage: 'Copied case ID to clipboard', }); export const NAME = i18n.translate('xpack.cases.caseView.name', { diff --git a/x-pack/plugins/cases/public/components/actions/copy_id/use_copy_id_action.test.tsx b/x-pack/plugins/cases/public/components/actions/copy_id/use_copy_id_action.test.tsx index 0c33980b3ab63d..388b3de940ec59 100644 --- a/x-pack/plugins/cases/public/components/actions/copy_id/use_copy_id_action.test.tsx +++ b/x-pack/plugins/cases/public/components/actions/copy_id/use_copy_id_action.test.tsx @@ -50,7 +50,7 @@ describe('useCopyIDAction', () => { />, "key": "cases-action-copy-id", "name": - Copy Case ID + Copy case ID , "onClick": [Function], } @@ -84,7 +84,7 @@ describe('useCopyIDAction', () => { await waitFor(() => { expect(onActionSuccess).toHaveBeenCalled(); expect(appMockRender.coreStart.notifications.toasts.addSuccess).toHaveBeenCalledWith({ - title: 'Copied Case ID to clipboard', + title: 'Copied case ID to clipboard', className: 'eui-textBreakWord', }); }); diff --git a/x-pack/plugins/cases/public/components/configure_cases/flyout.test.tsx b/x-pack/plugins/cases/public/components/configure_cases/flyout.test.tsx index 555f5e6f553b8b..568d08b188dbfb 100644 --- a/x-pack/plugins/cases/public/components/configure_cases/flyout.test.tsx +++ b/x-pack/plugins/cases/public/components/configure_cases/flyout.test.tsx @@ -766,7 +766,7 @@ describe('CommonFlyout ', () => { expect(props.onSaveField).not.toHaveBeenCalled(); }); - expect(await screen.findByText('A Template name is required.')).toBeInTheDocument(); + expect(await screen.findByText('Template name is required.')).toBeInTheDocument(); }); it('shows error if template name is too long', async () => { diff --git a/x-pack/plugins/cases/public/components/create/translations.ts b/x-pack/plugins/cases/public/components/create/translations.ts index 56f937b7153987..89e384502d3ed8 100644 --- a/x-pack/plugins/cases/public/components/create/translations.ts +++ b/x-pack/plugins/cases/public/components/create/translations.ts @@ -55,7 +55,7 @@ export const TEMPLATE_LABEL = i18n.translate('xpack.cases.create.templateLabel', }); export const TEMPLATE_HELP_TEXT = i18n.translate('xpack.cases.create.templateHelpText', { - defaultMessage: 'Selecting a template will pre-fill certain case fields below', + defaultMessage: 'Select a template to use its default field values.', }); export const SOLUTION_SELECTOR_LABEL = i18n.translate('xpack.cases.create.solutionSelectorLabel', { diff --git a/x-pack/plugins/cases/public/components/custom_fields/text/create.test.tsx b/x-pack/plugins/cases/public/components/custom_fields/text/create.test.tsx index 0b62466fa68586..86a4aef5ad7208 100644 --- a/x-pack/plugins/cases/public/components/custom_fields/text/create.test.tsx +++ b/x-pack/plugins/cases/public/components/custom_fields/text/create.test.tsx @@ -191,7 +191,7 @@ describe('Create ', () => { userEvent.click(await screen.findByText('Submit')); expect( - await screen.findByText(`A ${customFieldConfiguration.label} is required.`) + await screen.findByText(`${customFieldConfiguration.label} is required.`) ).toBeInTheDocument(); await waitFor(() => { diff --git a/x-pack/plugins/cases/public/components/custom_fields/text/edit.test.tsx b/x-pack/plugins/cases/public/components/custom_fields/text/edit.test.tsx index 0c0ff65d5036e3..04dee5dc048786 100644 --- a/x-pack/plugins/cases/public/components/custom_fields/text/edit.test.tsx +++ b/x-pack/plugins/cases/public/components/custom_fields/text/edit.test.tsx @@ -380,7 +380,7 @@ describe('Edit ', () => { userEvent.click(await screen.findByTestId('case-text-custom-field-edit-button-test_key_1')); userEvent.clear(await screen.findByTestId('case-text-custom-field-form-field-test_key_1')); - expect(await screen.findByText('A My test label 1 is required.')).toBeInTheDocument(); + expect(await screen.findByText('My test label 1 is required.')).toBeInTheDocument(); }); it('does not shows a validation error if the field is not required', async () => { diff --git a/x-pack/plugins/cases/public/components/custom_fields/translations.ts b/x-pack/plugins/cases/public/components/custom_fields/translations.ts index 1f6616ceeb6121..5f1a91765193fd 100644 --- a/x-pack/plugins/cases/public/components/custom_fields/translations.ts +++ b/x-pack/plugins/cases/public/components/custom_fields/translations.ts @@ -77,7 +77,7 @@ export const REQUIRED = i18n.translate('xpack.cases.customFields.required', { export const REQUIRED_FIELD = (fieldName: string): string => i18n.translate('xpack.cases.customFields.requiredField', { values: { fieldName }, - defaultMessage: 'A {fieldName} is required.', + defaultMessage: '{fieldName} is required.', }); export const EDIT_CUSTOM_FIELDS_ARIA_LABEL = (customFieldLabel: string) => diff --git a/x-pack/plugins/cases/public/components/templates/translations.ts b/x-pack/plugins/cases/public/components/templates/translations.ts index 2993070046813d..607276180fca89 100644 --- a/x-pack/plugins/cases/public/components/templates/translations.ts +++ b/x-pack/plugins/cases/public/components/templates/translations.ts @@ -14,8 +14,7 @@ export const TEMPLATE_TITLE = i18n.translate('xpack.cases.templates.title', { }); export const TEMPLATE_DESCRIPTION = i18n.translate('xpack.cases.templates.description', { - defaultMessage: - 'Add Case Templates to automatically define the case fields while creating a new case. A user can choose to create an empty case or based on a preset template. Templates allow to auto-populate values when creating new cases.', + defaultMessage: 'Create templates that automatically populate values in new cases.', }); export const NO_TEMPLATES = i18n.translate('xpack.cases.templates.noTemplates', { @@ -37,7 +36,7 @@ export const REQUIRED = i18n.translate('xpack.cases.templates.required', { export const REQUIRED_FIELD = (fieldName: string): string => i18n.translate('xpack.cases.templates.requiredField', { values: { fieldName }, - defaultMessage: 'A {fieldName} is required.', + defaultMessage: '{fieldName} is required.', }); export const TEMPLATE_NAME = i18n.translate('xpack.cases.templates.templateName', { @@ -45,8 +44,7 @@ export const TEMPLATE_NAME = i18n.translate('xpack.cases.templates.templateName' }); export const TEMPLATE_TAGS_HELP = i18n.translate('xpack.cases.templates.templateTagsHelp', { - defaultMessage: - 'Type one or more custom identifying tags for this template. Please enter after each tag to begin a new one', + defaultMessage: 'Separate tags with a line break.', }); export const TEMPLATE_FIELDS = i18n.translate('xpack.cases.templates.templateFields', { From c2be810de37479d43661e722e7d7454dacc35c79 Mon Sep 17 00:00:00 2001 From: Ying Mao Date: Mon, 8 Jul 2024 20:07:57 -0400 Subject: [PATCH 033/103] [Response Ops][Alerting] Deleting ad hoc run task if the last schedule entry ends in a timeout (#187496) ## Summary Fixing bug where ad hoc run task was not getting deleted if running the last schedule entry and the run times out. ## To Verify 1. Create a detection rule 2. Add a delay in the ad hoc task runner ``` --- a/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.ts +++ b/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.ts @@ -530,6 +530,7 @@ export class AdHocTaskRunner { } catch (err) { runMetrics = asErr(err); } + await new Promise((resolve) => setTimeout(resolve, 3100000)); await this.processAdHocRunResults(runMetrics); ``` 3. Schedule a backfill for the rule with only one schedule entry ``` POST https://localhost:5601/internal/alerting/rules/backfill/_schedule [ { "rule_id": , "start": "2024-07-03T13:05:00.000Z" } ] ``` 4. Wait for the run to get cancelled then verify that the task was deleted. --------- Co-authored-by: Elastic Machine --- .../task_runner/ad_hoc_task_runner.test.ts | 78 +++++++++++++++++++ .../server/task_runner/ad_hoc_task_runner.ts | 8 +- 2 files changed, 84 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.test.ts b/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.test.ts index f3551f04477fdc..84181bb512a789 100644 --- a/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.test.ts @@ -1245,6 +1245,84 @@ describe('Ad Hoc Task Runner', () => { expect(logger.error).not.toHaveBeenCalled(); }); + test('should handle task cancellation signal due to timeout when for last schedule entry', async () => { + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue({ + ...mockedAdHocRunSO, + attributes: { + ...mockedAdHocRunSO.attributes, + schedule: [{ ...schedule1, status: adHocRunStatus.COMPLETE }, schedule2], + }, + }); + const taskRunner = new AdHocTaskRunner({ + context: taskRunnerFactoryInitializerParams, + internalSavedObjectsRepository, + taskInstance: mockedTaskInstance, + }); + + const promise = taskRunner.run(); + await Promise.resolve(); + await taskRunner.cancel(); + await promise; + await taskRunner.cleanup(); + + expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).toHaveBeenCalledWith( + AD_HOC_RUN_SAVED_OBJECT_TYPE, + 'abc', + {} + ); + expect(ruleTypeRegistry.get).toHaveBeenCalledWith('siem.queryRule'); + expect(ruleTypeRegistry.ensureRuleTypeEnabled).toHaveBeenCalledWith('siem.queryRule'); + expect(mockValidateRuleTypeParams).toHaveBeenCalledWith( + mockedAdHocRunSO.attributes.rule.params, + ruleTypeWithAlerts.validate.params + ); + + // @ts-ignore - accessing private variable + // should run the first entry in the schedule + expect(taskRunner.scheduleToRunIndex).toEqual(1); + expect(RuleRunMetricsStore).toHaveBeenCalledTimes(1); + expect(ruleTypeWithAlerts.executor).toHaveBeenCalledTimes(1); + + expect(internalSavedObjectsRepository.update).toHaveBeenCalledWith( + AD_HOC_RUN_SAVED_OBJECT_TYPE, + mockedAdHocRunSO.id, + { + schedule: [ + { ...schedule1, status: adHocRunStatus.COMPLETE }, + { ...schedule2, status: adHocRunStatus.TIMEOUT }, + ], + }, + { namespace: undefined, refresh: false } + ); + + expect(internalSavedObjectsRepository.delete).toHaveBeenCalledWith( + AD_HOC_RUN_SAVED_OBJECT_TYPE, + mockedAdHocRunSO.id, + { namespace: undefined, refresh: false } + ); + + testAlertingEventLogCalls({ + status: 'ok', + timeout: true, + backfillRunAt: schedule2.runAt, + backfillInterval: schedule2.interval, + }); + expect(logger.debug).toHaveBeenCalledTimes(3); + expect(logger.debug).nthCalledWith( + 1, + `Executing ad hoc run for rule test:rule-id for runAt ${schedule2.runAt}` + ); + expect(logger.debug).nthCalledWith( + 2, + `Cancelling execution for ad hoc run with id abc for rule type test with id rule-id - execution exceeded rule type timeout of 3m` + ); + expect(logger.debug).nthCalledWith( + 3, + `Aborting any in-progress ES searches for rule type test with id rule-id` + ); + expect(logger.error).not.toHaveBeenCalled(); + }); + test('should handle task cancellation that leads to executor throwing error', async () => { ruleTypeWithAlerts.executor.mockImplementationOnce(() => { throw new Error('Search has been aborted due to cancelled execution'); diff --git a/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.ts b/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.ts index bccf28a7cb7bc8..61f8f411aef8bf 100644 --- a/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.ts +++ b/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.ts @@ -20,7 +20,7 @@ import { TaskErrorSource, } from '@kbn/task-manager-plugin/server'; import { nanosToMillis } from '@kbn/event-log-plugin/common'; -import { RunResult } from '@kbn/task-manager-plugin/server/task'; +import { CancellableTask, RunResult } from '@kbn/task-manager-plugin/server/task'; import { AdHocRunStatus, adHocRunStatus } from '../../common/constants'; import { RuleRunnerErrorStackTraceLog, RuleTaskStateAndMetrics, TaskRunnerContext } from './types'; import { getExecutorServices } from './get_executor_services'; @@ -66,7 +66,7 @@ interface RunParams { validatedParams: RuleTypeParams; } -export class AdHocTaskRunner { +export class AdHocTaskRunner implements CancellableTask { private readonly context: TaskRunnerContext; private readonly executionId: string; private readonly internalSavedObjectsRepository: ISavedObjectsRepository; @@ -573,6 +573,10 @@ export class AdHocTaskRunner { : undefined, }, }); + this.shouldDeleteTask = !this.hasAnyPendingRuns(); + + // cleanup function is not called for timed out tasks + await this.cleanup(); } async cleanup() { From cdfcb85b6cae3d5388ced9655670140c4fe17ef6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:17:39 +1000 Subject: [PATCH 034/103] Update dependency @launchdarkly/node-server-sdk to ^9.4.7 (main) (#187807) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index fe7f2ff531469b..e9a8d26a23c8e1 100644 --- a/package.json +++ b/package.json @@ -938,7 +938,7 @@ "@langchain/langgraph": "^0.0.23", "@langchain/openai": "^0.0.34", "@langtrase/trace-attributes": "^3.0.8", - "@launchdarkly/node-server-sdk": "^9.4.6", + "@launchdarkly/node-server-sdk": "^9.4.7", "@loaders.gl/core": "^3.4.7", "@loaders.gl/json": "^3.4.7", "@loaders.gl/shapefile": "^3.4.7", diff --git a/yarn.lock b/yarn.lock index 57727ccb87af0e..67e950497963ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7059,10 +7059,10 @@ "@launchdarkly/js-sdk-common" "2.5.0" semver "7.5.4" -"@launchdarkly/node-server-sdk@^9.4.6": - version "9.4.6" - resolved "https://registry.yarnpkg.com/@launchdarkly/node-server-sdk/-/node-server-sdk-9.4.6.tgz#e1a1614e05eab2515090c7862764498a2f9b2b1e" - integrity sha512-IcQqiaYrAgmCvh1LsfjEVRa4Wk97PWirHnbVu6fRc97kt8WCKDlVo2O+IbOcC6scJVGDJU4aXVehTkfbhUq1Lg== +"@launchdarkly/node-server-sdk@^9.4.7": + version "9.4.7" + resolved "https://registry.yarnpkg.com/@launchdarkly/node-server-sdk/-/node-server-sdk-9.4.7.tgz#d8f923943b1750efa4c0f80baad079103ac5f700" + integrity sha512-9blKdS4c/ZGR0XjB8EqifDTdk08WBX/KZ91lZIc3ND3WA9D3qagysynaVkpBo3FiymHyCYyvwq4ZjiSMOIkrPw== dependencies: "@launchdarkly/js-server-sdk-common" "2.4.4" https-proxy-agent "^5.0.1" From de495d7acfe9b82991cc0ff09d6ebe5b4dd6b181 Mon Sep 17 00:00:00 2001 From: Tim Sullivan Date: Mon, 8 Jul 2024 20:27:24 -0700 Subject: [PATCH 035/103] [ESO Plugin] Migrate authc.getCurrentUser usage to coreStart.security (#187024) Part of https://github.com/elastic/kibana/issues/186574 ## Summary This PR migrates the Encrypted Saved Object Plugin's route handler that consumes `authc.getCurrentUser` to use `coreStart.security`. Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../server/crypto/encryption_key_rotation_service.ts | 7 +++---- .../plugins/encrypted_saved_objects/server/plugin.ts | 4 +--- .../server/saved_objects/index.test.ts | 6 +++--- .../server/saved_objects/index.ts | 8 ++++---- .../saved_objects_encryption_extension.ts | 12 ++++++------ x-pack/plugins/encrypted_saved_objects/tsconfig.json | 2 ++ 6 files changed, 19 insertions(+), 20 deletions(-) diff --git a/x-pack/plugins/encrypted_saved_objects/server/crypto/encryption_key_rotation_service.ts b/x-pack/plugins/encrypted_saved_objects/server/crypto/encryption_key_rotation_service.ts index c18c7a46c54c4e..d8fa12a3e49733 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/crypto/encryption_key_rotation_service.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/crypto/encryption_key_rotation_service.ts @@ -14,7 +14,7 @@ import type { StartServicesAccessor, } from '@kbn/core/server'; import { ENCRYPTION_EXTENSION_ID } from '@kbn/core-saved-objects-server'; -import type { AuthenticatedUser, SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { AuthenticatedUser } from '@kbn/core-security-common'; import type { PublicMethodsOf } from '@kbn/utility-types'; import type { EncryptedSavedObjectsService } from './encrypted_saved_objects_service'; @@ -25,7 +25,6 @@ interface EncryptionKeyRotationServiceOptions { logger: Logger; service: PublicMethodsOf; getStartServices: StartServicesAccessor; - security?: SecurityPluginSetup; } interface EncryptionKeyRotationParams { @@ -69,7 +68,7 @@ export class EncryptionKeyRotationService { request: KibanaRequest, { batchSize, type }: EncryptionKeyRotationParams ): Promise { - const [{ savedObjects }] = await this.options.getStartServices(); + const [{ security, savedObjects }] = await this.options.getStartServices(); const typeRegistry = savedObjects.getTypeRegistry(); // We need to retrieve all SavedObject types which have encrypted attributes, specifically @@ -105,7 +104,7 @@ export class EncryptionKeyRotationService { // don't want to have Encrypted Saved Objects wrapper so that it doesn't strip encrypted // attributes. But for the update we want to have it so that it automatically re-encrypts // attributes with the new primary encryption key. - const user = this.options.security?.authc.getCurrentUser(request) ?? undefined; + const user = security.authc.getCurrentUser(request) ?? undefined; const retrieveClient = savedObjects.getScopedClient(request, { includedHiddenTypes: registeredHiddenSavedObjectTypes, excludedExtensions: [ENCRYPTION_EXTENSION_ID], diff --git a/x-pack/plugins/encrypted_saved_objects/server/plugin.ts b/x-pack/plugins/encrypted_saved_objects/server/plugin.ts index ba69b00ecb4e18..50514bc6199787 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/plugin.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/plugin.ts @@ -60,7 +60,7 @@ export class EncryptedSavedObjectsPlugin this.logger = this.initializerContext.logger.get(); } - public setup(core: CoreSetup, deps: PluginsSetup): EncryptedSavedObjectsPluginSetup { + public setup(core: CoreSetup, _deps: PluginsSetup): EncryptedSavedObjectsPluginSetup { const config = this.initializerContext.config.get(); const canEncrypt = config.encryptionKey !== undefined; if (!canEncrypt) { @@ -95,7 +95,6 @@ export class EncryptedSavedObjectsPlugin this.savedObjectsSetup = setupSavedObjects({ service, savedObjects: core.savedObjects, - security: deps.security, getStartServices: core.getStartServices, }); @@ -110,7 +109,6 @@ export class EncryptedSavedObjectsPlugin logger: this.logger.get('key-rotation-service'), service, getStartServices: core.getStartServices, - security: deps.security, }) ), config, diff --git a/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.test.ts b/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.test.ts index dc7cb2a9e52d5c..bd8f21d1c8bf98 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.test.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.test.ts @@ -15,7 +15,7 @@ import { savedObjectsRepositoryMock, savedObjectsTypeRegistryMock, } from '@kbn/core/server/mocks'; -import { securityMock } from '@kbn/security-plugin/server/mocks'; +import { nextTick } from '@kbn/test-jest-helpers'; import type { ClientInstanciator } from '.'; import { setupSavedObjects } from '.'; @@ -47,14 +47,14 @@ describe('#setupSavedObjects', () => { setupContract = setupSavedObjects({ service: mockEncryptedSavedObjectsService, savedObjects: coreSetupMock.savedObjects, - security: securityMock.createSetup(), getStartServices: coreSetupMock.getStartServices, }); }); describe('#setupContract', () => { it('includes hiddenTypes when specified', async () => { - await setupContract({ includedHiddenTypes: ['hiddenType'] }); + setupContract({ includedHiddenTypes: ['hiddenType'] }); + await nextTick(); expect(coreStartMock.savedObjects.createInternalRepository).toHaveBeenCalledWith([ 'hiddenType', ]); diff --git a/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts b/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts index 6c7b9ef5513acf..3fbfec79b15289 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts @@ -18,7 +18,6 @@ import type { SavedObjectsServiceSetup, StartServicesAccessor, } from '@kbn/core/server'; -import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import type { PublicMethodsOf } from '@kbn/utility-types'; import { getDescriptorNamespace, normalizeNamespace } from './get_descriptor_namespace'; @@ -30,7 +29,6 @@ export { normalizeNamespace }; interface SetupSavedObjectsParams { service: PublicMethodsOf; savedObjects: SavedObjectsServiceSetup; - security?: SecurityPluginSetup; getStartServices: StartServicesAccessor; } @@ -78,7 +76,6 @@ export interface EncryptedSavedObjectsClient { export function setupSavedObjects({ service, savedObjects, - security, getStartServices, }: SetupSavedObjectsParams): ClientInstanciator { // Register custom saved object extension that will encrypt, decrypt and strip saved object @@ -87,7 +84,10 @@ export function setupSavedObjects({ return new SavedObjectsEncryptionExtension({ baseTypeRegistry, service, - getCurrentUser: () => security?.authc.getCurrentUser(request) ?? undefined, + getCurrentUser: async () => { + const [{ security }] = await getStartServices(); + return security.authc.getCurrentUser(request) ?? undefined; + }, }); }); diff --git a/x-pack/plugins/encrypted_saved_objects/server/saved_objects/saved_objects_encryption_extension.ts b/x-pack/plugins/encrypted_saved_objects/server/saved_objects/saved_objects_encryption_extension.ts index fe5d00ee4a8fb4..01c35c7403fdf9 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/saved_objects/saved_objects_encryption_extension.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/saved_objects/saved_objects_encryption_extension.ts @@ -22,13 +22,13 @@ import type { EncryptedSavedObjectsService } from '../crypto'; export interface Params { baseTypeRegistry: ISavedObjectTypeRegistry; service: Readonly; - getCurrentUser: () => AuthenticatedUser | undefined; + getCurrentUser: () => Promise; } export class SavedObjectsEncryptionExtension implements ISavedObjectsEncryptionExtension { readonly _baseTypeRegistry: ISavedObjectTypeRegistry; readonly _service: Readonly; - readonly _getCurrentUser: () => AuthenticatedUser | undefined; + readonly _getCurrentUser: () => Promise; constructor({ baseTypeRegistry, service, getCurrentUser }: Params) { this._baseTypeRegistry = baseTypeRegistry; @@ -51,6 +51,7 @@ export class SavedObjectsEncryptionExtension implements ISavedObjectsEncryptionE type: response.type, namespace: getDescriptorNamespace(this._baseTypeRegistry, response.type, namespace), }; + const user = await this._getCurrentUser(); // Error is returned when decryption fails, and in this case encrypted attributes will be // stripped from the returned attributes collection. That will let consumer decide whether to // fail or handle recovery gracefully. @@ -58,7 +59,7 @@ export class SavedObjectsEncryptionExtension implements ISavedObjectsEncryptionE normalizedDescriptor, response.attributes as Record, originalAttributes as Record, - { user: this._getCurrentUser() } + { user } ); return { ...response, attributes, ...(error && { error }) }; @@ -82,8 +83,7 @@ export class SavedObjectsEncryptionExtension implements ISavedObjectsEncryptionE id, namespace: getDescriptorNamespace(this._baseTypeRegistry, type, namespace), }; - return this._service.encryptAttributes(normalizedDescriptor, attributes, { - user: this._getCurrentUser(), - }); + const user = await this._getCurrentUser(); + return this._service.encryptAttributes(normalizedDescriptor, attributes, { user }); } } diff --git a/x-pack/plugins/encrypted_saved_objects/tsconfig.json b/x-pack/plugins/encrypted_saved_objects/tsconfig.json index 17dea87aca6eea..83cdcd62258503 100644 --- a/x-pack/plugins/encrypted_saved_objects/tsconfig.json +++ b/x-pack/plugins/encrypted_saved_objects/tsconfig.json @@ -12,6 +12,8 @@ "@kbn/core-saved-objects-server", "@kbn/core-saved-objects-base-server-internal", "@kbn/core-saved-objects-api-server-mocks", + "@kbn/core-security-common", + "@kbn/test-jest-helpers", ], "exclude": [ "target/**/*", From 90abc79edf92c74c53304a87b21b3b17f2ab1f0f Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 9 Jul 2024 04:36:19 +0100 Subject: [PATCH 036/103] skip flaky suite (#187701) --- .../cypress/e2e/explore/cases/connectors.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/connectors.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/connectors.cy.ts index 9c84a9067fbfea..db4e1defd48765 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/connectors.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/connectors.cy.ts @@ -18,7 +18,8 @@ import { visit } from '../../../tasks/navigation'; import { CASES_URL } from '../../../urls/navigation'; -describe('Cases connectors', { tags: ['@ess', '@serverless'] }, () => { +// FLAKY: https://github.com/elastic/kibana/issues/187701 +describe.skip('Cases connectors', { tags: ['@ess', '@serverless'] }, () => { const configureResult = { connector: { id: 'e271c3b8-f702-4fbc-98e0-db942b573bbd', From a62b8043c040b321ad726528183b5aad87599b59 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 9 Jul 2024 04:38:43 +0100 Subject: [PATCH 037/103] skip flaky suite (#187667) --- .../apps/triggers_actions_ui/stack_alerts_page.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/stack_alerts_page.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/stack_alerts_page.ts index 26bee6fc4a5cf4..0c3d801e293710 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/stack_alerts_page.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/stack_alerts_page.ts @@ -90,7 +90,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); }); - describe('Loads the page', () => { + // FLAKY: https://github.com/elastic/kibana/issues/187667 + describe.skip('Loads the page', () => { beforeEach(async () => { await security.testUser.restoreDefaults(); await pageObjects.common.navigateToUrl( From 76998c85b09c721555cd399d3b7ab76a330d387a Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 9 Jul 2024 06:56:24 +0200 Subject: [PATCH 038/103] [api-docs] 2024-07-09 Daily api_docs build (#187817) Generated by https://buildkite.com/elastic/kibana-api-docs-daily/builds/763 --- 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/assets_data_access.mdx | 2 +- api_docs/banners.mdx | 2 +- api_docs/bfetch.mdx | 2 +- api_docs/canvas.mdx | 2 +- api_docs/cases.mdx | 2 +- api_docs/charts.mdx | 2 +- api_docs/cloud.mdx | 2 +- api_docs/cloud_data_migration.mdx | 2 +- api_docs/cloud_defend.mdx | 2 +- api_docs/cloud_experiments.mdx | 2 +- api_docs/cloud_security_posture.mdx | 2 +- api_docs/console.mdx | 2 +- api_docs/content_management.mdx | 2 +- api_docs/controls.mdx | 2 +- api_docs/custom_integrations.mdx | 2 +- api_docs/dashboard.mdx | 2 +- api_docs/dashboard_enhanced.mdx | 2 +- api_docs/data.mdx | 2 +- api_docs/data_quality.mdx | 2 +- api_docs/data_query.mdx | 2 +- api_docs/data_search.mdx | 2 +- api_docs/data_view_editor.mdx | 2 +- api_docs/data_view_field_editor.mdx | 2 +- api_docs/data_view_management.mdx | 2 +- api_docs/data_views.mdx | 2 +- api_docs/data_visualizer.mdx | 2 +- api_docs/dataset_quality.mdx | 2 +- api_docs/deprecations_by_api.mdx | 6 +- api_docs/deprecations_by_plugin.mdx | 3 +- api_docs/deprecations_by_team.mdx | 2 +- api_docs/dev_tools.mdx | 2 +- api_docs/discover.mdx | 2 +- api_docs/discover_enhanced.mdx | 2 +- api_docs/discover_shared.mdx | 2 +- api_docs/ecs_data_quality_dashboard.mdx | 2 +- api_docs/elastic_assistant.mdx | 2 +- api_docs/embeddable.mdx | 2 +- api_docs/embeddable_enhanced.mdx | 2 +- api_docs/encrypted_saved_objects.mdx | 2 +- api_docs/enterprise_search.mdx | 2 +- api_docs/entity_manager.mdx | 2 +- api_docs/es_ui_shared.mdx | 2 +- api_docs/esql_data_grid.mdx | 2 +- api_docs/event_annotation.mdx | 2 +- api_docs/event_annotation_listing.mdx | 2 +- api_docs/event_log.mdx | 2 +- api_docs/exploratory_view.mdx | 2 +- api_docs/expression_error.mdx | 2 +- api_docs/expression_gauge.mdx | 2 +- api_docs/expression_heatmap.mdx | 2 +- api_docs/expression_image.mdx | 2 +- api_docs/expression_legacy_metric_vis.mdx | 2 +- api_docs/expression_metric.mdx | 2 +- api_docs/expression_metric_vis.mdx | 2 +- api_docs/expression_partition_vis.mdx | 2 +- api_docs/expression_repeat_image.mdx | 2 +- api_docs/expression_reveal_image.mdx | 2 +- api_docs/expression_shape.mdx | 2 +- api_docs/expression_tagcloud.mdx | 2 +- api_docs/expression_x_y.mdx | 2 +- api_docs/expressions.mdx | 2 +- api_docs/features.mdx | 2 +- api_docs/field_formats.mdx | 2 +- api_docs/fields_metadata.mdx | 2 +- api_docs/file_upload.mdx | 2 +- api_docs/files.mdx | 2 +- api_docs/files_management.mdx | 2 +- api_docs/fleet.mdx | 2 +- api_docs/global_search.mdx | 2 +- api_docs/guided_onboarding.mdx | 2 +- api_docs/home.mdx | 2 +- api_docs/image_embeddable.mdx | 2 +- api_docs/index_lifecycle_management.mdx | 2 +- api_docs/index_management.mdx | 2 +- api_docs/infra.mdx | 2 +- api_docs/ingest_pipelines.mdx | 2 +- api_docs/inspector.mdx | 2 +- api_docs/integration_assistant.devdocs.json | 20 +- api_docs/integration_assistant.mdx | 2 +- api_docs/interactive_setup.mdx | 2 +- api_docs/investigate.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.devdocs.json | 492 +++ api_docs/kbn_alerts_grouping.mdx | 33 + api_docs/kbn_alerts_ui_shared.devdocs.json | 3692 +++++++++++------ api_docs/kbn_alerts_ui_shared.mdx | 4 +- 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_utils.mdx | 2 +- api_docs/kbn_axe_config.mdx | 2 +- api_docs/kbn_bfetch_error.mdx | 2 +- api_docs/kbn_calculate_auto.mdx | 2 +- .../kbn_calculate_width_from_char_count.mdx | 2 +- api_docs/kbn_cases_components.mdx | 2 +- api_docs/kbn_cell_actions.mdx | 2 +- api_docs/kbn_chart_expressions_common.mdx | 2 +- api_docs/kbn_chart_icons.mdx | 2 +- api_docs/kbn_ci_stats_core.mdx | 2 +- api_docs/kbn_ci_stats_performance_metrics.mdx | 2 +- api_docs/kbn_ci_stats_reporter.mdx | 2 +- api_docs/kbn_cli_dev_mode.mdx | 2 +- api_docs/kbn_code_editor.mdx | 2 +- api_docs/kbn_code_editor_mock.mdx | 2 +- api_docs/kbn_code_owners.mdx | 2 +- api_docs/kbn_coloring.mdx | 2 +- api_docs/kbn_config.mdx | 2 +- api_docs/kbn_config_mocks.mdx | 2 +- api_docs/kbn_config_schema.mdx | 2 +- .../kbn_content_management_content_editor.mdx | 2 +- ...tent_management_tabbed_table_list_view.mdx | 2 +- ...kbn_content_management_table_list_view.mdx | 2 +- ...tent_management_table_list_view_common.mdx | 2 +- ...ntent_management_table_list_view_table.mdx | 2 +- .../kbn_content_management_user_profiles.mdx | 2 +- api_docs/kbn_content_management_utils.mdx | 2 +- .../kbn_core_analytics_browser.devdocs.json | 4 + 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 | 4 + api_docs/kbn_core_analytics_server.mdx | 2 +- .../kbn_core_analytics_server_internal.mdx | 2 +- api_docs/kbn_core_analytics_server_mocks.mdx | 2 +- api_docs/kbn_core_application_browser.mdx | 2 +- .../kbn_core_application_browser_internal.mdx | 2 +- .../kbn_core_application_browser_mocks.mdx | 2 +- api_docs/kbn_core_application_common.mdx | 2 +- api_docs/kbn_core_apps_browser_internal.mdx | 2 +- api_docs/kbn_core_apps_browser_mocks.mdx | 2 +- api_docs/kbn_core_apps_server_internal.mdx | 2 +- api_docs/kbn_core_base_browser_mocks.mdx | 2 +- api_docs/kbn_core_base_common.mdx | 2 +- api_docs/kbn_core_base_server_internal.mdx | 2 +- api_docs/kbn_core_base_server_mocks.mdx | 2 +- .../kbn_core_capabilities_browser_mocks.mdx | 2 +- api_docs/kbn_core_capabilities_common.mdx | 2 +- api_docs/kbn_core_capabilities_server.mdx | 2 +- .../kbn_core_capabilities_server_mocks.mdx | 2 +- api_docs/kbn_core_chrome_browser.mdx | 2 +- api_docs/kbn_core_chrome_browser_mocks.mdx | 2 +- api_docs/kbn_core_config_server_internal.mdx | 2 +- api_docs/kbn_core_custom_branding_browser.mdx | 2 +- ..._core_custom_branding_browser_internal.mdx | 2 +- ...kbn_core_custom_branding_browser_mocks.mdx | 2 +- api_docs/kbn_core_custom_branding_common.mdx | 2 +- api_docs/kbn_core_custom_branding_server.mdx | 2 +- ...n_core_custom_branding_server_internal.mdx | 2 +- .../kbn_core_custom_branding_server_mocks.mdx | 2 +- api_docs/kbn_core_deprecations_browser.mdx | 2 +- ...kbn_core_deprecations_browser_internal.mdx | 2 +- .../kbn_core_deprecations_browser_mocks.mdx | 2 +- api_docs/kbn_core_deprecations_common.mdx | 2 +- api_docs/kbn_core_deprecations_server.mdx | 2 +- .../kbn_core_deprecations_server_internal.mdx | 2 +- .../kbn_core_deprecations_server_mocks.mdx | 2 +- api_docs/kbn_core_doc_links_browser.mdx | 2 +- api_docs/kbn_core_doc_links_browser_mocks.mdx | 2 +- api_docs/kbn_core_doc_links_server.mdx | 2 +- api_docs/kbn_core_doc_links_server_mocks.mdx | 2 +- ...e_elasticsearch_client_server_internal.mdx | 2 +- ...core_elasticsearch_client_server_mocks.mdx | 2 +- api_docs/kbn_core_elasticsearch_server.mdx | 2 +- ...kbn_core_elasticsearch_server_internal.mdx | 2 +- .../kbn_core_elasticsearch_server_mocks.mdx | 2 +- .../kbn_core_environment_server_internal.mdx | 2 +- .../kbn_core_environment_server_mocks.mdx | 2 +- .../kbn_core_execution_context_browser.mdx | 2 +- ...ore_execution_context_browser_internal.mdx | 2 +- ...n_core_execution_context_browser_mocks.mdx | 2 +- .../kbn_core_execution_context_common.mdx | 2 +- .../kbn_core_execution_context_server.mdx | 2 +- ...core_execution_context_server_internal.mdx | 2 +- ...bn_core_execution_context_server_mocks.mdx | 2 +- api_docs/kbn_core_fatal_errors_browser.mdx | 2 +- .../kbn_core_fatal_errors_browser_mocks.mdx | 2 +- api_docs/kbn_core_http_browser.mdx | 2 +- api_docs/kbn_core_http_browser_internal.mdx | 2 +- api_docs/kbn_core_http_browser_mocks.mdx | 2 +- api_docs/kbn_core_http_common.mdx | 2 +- .../kbn_core_http_context_server_mocks.mdx | 2 +- ...re_http_request_handler_context_server.mdx | 2 +- api_docs/kbn_core_http_resources_server.mdx | 2 +- ...bn_core_http_resources_server_internal.mdx | 2 +- .../kbn_core_http_resources_server_mocks.mdx | 2 +- .../kbn_core_http_router_server_internal.mdx | 2 +- .../kbn_core_http_router_server_mocks.mdx | 2 +- api_docs/kbn_core_http_server.mdx | 2 +- api_docs/kbn_core_http_server_internal.mdx | 2 +- api_docs/kbn_core_http_server_mocks.mdx | 2 +- api_docs/kbn_core_i18n_browser.mdx | 2 +- api_docs/kbn_core_i18n_browser_mocks.mdx | 2 +- api_docs/kbn_core_i18n_server.mdx | 2 +- api_docs/kbn_core_i18n_server_internal.mdx | 2 +- api_docs/kbn_core_i18n_server_mocks.mdx | 2 +- ...n_core_injected_metadata_browser_mocks.mdx | 2 +- ...kbn_core_integrations_browser_internal.mdx | 2 +- .../kbn_core_integrations_browser_mocks.mdx | 2 +- api_docs/kbn_core_lifecycle_browser.mdx | 2 +- api_docs/kbn_core_lifecycle_browser_mocks.mdx | 2 +- api_docs/kbn_core_lifecycle_server.mdx | 2 +- api_docs/kbn_core_lifecycle_server_mocks.mdx | 2 +- api_docs/kbn_core_logging_browser_mocks.mdx | 2 +- api_docs/kbn_core_logging_common_internal.mdx | 2 +- api_docs/kbn_core_logging_server.mdx | 2 +- api_docs/kbn_core_logging_server_internal.mdx | 2 +- ...kbn_core_logging_server_mocks.devdocs.json | 16 +- api_docs/kbn_core_logging_server_mocks.mdx | 2 +- ...ore_metrics_collectors_server_internal.mdx | 2 +- ...n_core_metrics_collectors_server_mocks.mdx | 2 +- api_docs/kbn_core_metrics_server.mdx | 2 +- api_docs/kbn_core_metrics_server_internal.mdx | 2 +- api_docs/kbn_core_metrics_server_mocks.mdx | 2 +- api_docs/kbn_core_mount_utils_browser.mdx | 2 +- api_docs/kbn_core_node_server.mdx | 2 +- api_docs/kbn_core_node_server_internal.mdx | 2 +- api_docs/kbn_core_node_server_mocks.mdx | 2 +- api_docs/kbn_core_notifications_browser.mdx | 2 +- ...bn_core_notifications_browser_internal.mdx | 2 +- .../kbn_core_notifications_browser_mocks.mdx | 2 +- api_docs/kbn_core_overlays_browser.mdx | 2 +- .../kbn_core_overlays_browser_internal.mdx | 2 +- api_docs/kbn_core_overlays_browser_mocks.mdx | 2 +- api_docs/kbn_core_plugins_browser.mdx | 2 +- api_docs/kbn_core_plugins_browser_mocks.mdx | 2 +- .../kbn_core_plugins_contracts_browser.mdx | 2 +- .../kbn_core_plugins_contracts_server.mdx | 2 +- api_docs/kbn_core_plugins_server.mdx | 2 +- api_docs/kbn_core_plugins_server_mocks.mdx | 2 +- api_docs/kbn_core_preboot_server.mdx | 2 +- api_docs/kbn_core_preboot_server_mocks.mdx | 2 +- api_docs/kbn_core_rendering_browser_mocks.mdx | 2 +- .../kbn_core_rendering_server_internal.mdx | 2 +- api_docs/kbn_core_rendering_server_mocks.mdx | 2 +- api_docs/kbn_core_root_server_internal.mdx | 2 +- .../kbn_core_saved_objects_api_browser.mdx | 2 +- .../kbn_core_saved_objects_api_server.mdx | 2 +- ...bn_core_saved_objects_api_server_mocks.mdx | 2 +- ...ore_saved_objects_base_server_internal.mdx | 2 +- ...n_core_saved_objects_base_server_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_browser.mdx | 2 +- ...bn_core_saved_objects_browser_internal.mdx | 2 +- .../kbn_core_saved_objects_browser_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_common.mdx | 2 +- ..._objects_import_export_server_internal.mdx | 2 +- ...ved_objects_import_export_server_mocks.mdx | 2 +- ...aved_objects_migration_server_internal.mdx | 2 +- ...e_saved_objects_migration_server_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_server.mdx | 2 +- ...kbn_core_saved_objects_server_internal.mdx | 2 +- .../kbn_core_saved_objects_server_mocks.mdx | 2 +- .../kbn_core_saved_objects_utils_server.mdx | 2 +- api_docs/kbn_core_security_browser.mdx | 2 +- .../kbn_core_security_browser_internal.mdx | 2 +- api_docs/kbn_core_security_browser_mocks.mdx | 2 +- api_docs/kbn_core_security_common.mdx | 2 +- api_docs/kbn_core_security_server.mdx | 2 +- .../kbn_core_security_server_internal.mdx | 2 +- api_docs/kbn_core_security_server_mocks.mdx | 2 +- api_docs/kbn_core_status_common.mdx | 2 +- api_docs/kbn_core_status_common_internal.mdx | 2 +- api_docs/kbn_core_status_server.mdx | 2 +- api_docs/kbn_core_status_server_internal.mdx | 2 +- api_docs/kbn_core_status_server_mocks.mdx | 2 +- ...core_test_helpers_deprecations_getters.mdx | 2 +- ...n_core_test_helpers_http_setup_browser.mdx | 2 +- api_docs/kbn_core_test_helpers_kbn_server.mdx | 2 +- .../kbn_core_test_helpers_model_versions.mdx | 2 +- ...n_core_test_helpers_so_type_serializer.mdx | 2 +- api_docs/kbn_core_test_helpers_test_utils.mdx | 2 +- api_docs/kbn_core_theme_browser.mdx | 2 +- api_docs/kbn_core_theme_browser_mocks.mdx | 2 +- api_docs/kbn_core_ui_settings_browser.mdx | 2 +- .../kbn_core_ui_settings_browser_internal.mdx | 2 +- .../kbn_core_ui_settings_browser_mocks.mdx | 2 +- api_docs/kbn_core_ui_settings_common.mdx | 2 +- api_docs/kbn_core_ui_settings_server.mdx | 2 +- .../kbn_core_ui_settings_server_internal.mdx | 2 +- .../kbn_core_ui_settings_server_mocks.mdx | 2 +- api_docs/kbn_core_usage_data_server.mdx | 2 +- .../kbn_core_usage_data_server_internal.mdx | 2 +- api_docs/kbn_core_usage_data_server_mocks.mdx | 2 +- api_docs/kbn_core_user_profile_browser.mdx | 2 +- ...kbn_core_user_profile_browser_internal.mdx | 2 +- .../kbn_core_user_profile_browser_mocks.mdx | 2 +- api_docs/kbn_core_user_profile_common.mdx | 2 +- api_docs/kbn_core_user_profile_server.mdx | 2 +- .../kbn_core_user_profile_server_internal.mdx | 2 +- .../kbn_core_user_profile_server_mocks.mdx | 2 +- api_docs/kbn_core_user_settings_server.mdx | 2 +- .../kbn_core_user_settings_server_mocks.mdx | 2 +- api_docs/kbn_crypto.mdx | 2 +- api_docs/kbn_crypto_browser.mdx | 2 +- api_docs/kbn_custom_icons.mdx | 2 +- api_docs/kbn_custom_integrations.mdx | 2 +- api_docs/kbn_cypress_config.mdx | 2 +- api_docs/kbn_data_forge.mdx | 2 +- api_docs/kbn_data_service.mdx | 2 +- api_docs/kbn_data_stream_adapter.mdx | 2 +- api_docs/kbn_data_view_utils.mdx | 2 +- api_docs/kbn_datemath.mdx | 2 +- api_docs/kbn_deeplinks_analytics.mdx | 2 +- api_docs/kbn_deeplinks_devtools.mdx | 2 +- api_docs/kbn_deeplinks_fleet.mdx | 2 +- api_docs/kbn_deeplinks_management.mdx | 2 +- api_docs/kbn_deeplinks_ml.mdx | 2 +- api_docs/kbn_deeplinks_observability.mdx | 2 +- api_docs/kbn_deeplinks_search.mdx | 2 +- api_docs/kbn_deeplinks_security.mdx | 2 +- api_docs/kbn_deeplinks_shared.mdx | 2 +- api_docs/kbn_default_nav_analytics.mdx | 2 +- api_docs/kbn_default_nav_devtools.mdx | 2 +- api_docs/kbn_default_nav_management.mdx | 2 +- api_docs/kbn_default_nav_ml.mdx | 2 +- api_docs/kbn_dev_cli_errors.mdx | 2 +- api_docs/kbn_dev_cli_runner.mdx | 2 +- api_docs/kbn_dev_proc_runner.mdx | 2 +- api_docs/kbn_dev_utils.mdx | 2 +- api_docs/kbn_discover_utils.mdx | 2 +- api_docs/kbn_doc_links.devdocs.json | 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.devdocs.json | 4 + api_docs/kbn_ebt.mdx | 2 +- api_docs/kbn_ebt_tools.mdx | 2 +- api_docs/kbn_ecs_data_quality_dashboard.mdx | 2 +- api_docs/kbn_elastic_agent_utils.mdx | 2 +- api_docs/kbn_elastic_assistant.mdx | 2 +- api_docs/kbn_elastic_assistant_common.mdx | 2 +- api_docs/kbn_entities_schema.mdx | 2 +- api_docs/kbn_es.mdx | 2 +- api_docs/kbn_es_archiver.mdx | 2 +- api_docs/kbn_es_errors.mdx | 2 +- api_docs/kbn_es_query.mdx | 2 +- api_docs/kbn_es_types.mdx | 2 +- api_docs/kbn_eslint_plugin_imports.mdx | 2 +- api_docs/kbn_esql_ast.mdx | 2 +- api_docs/kbn_esql_utils.mdx | 2 +- api_docs/kbn_esql_validation_autocomplete.mdx | 2 +- api_docs/kbn_event_annotation_common.mdx | 2 +- api_docs/kbn_event_annotation_components.mdx | 2 +- api_docs/kbn_expandable_flyout.mdx | 2 +- api_docs/kbn_field_types.mdx | 2 +- api_docs/kbn_field_utils.mdx | 2 +- api_docs/kbn_find_used_node_modules.mdx | 2 +- api_docs/kbn_formatters.mdx | 2 +- .../kbn_ftr_common_functional_services.mdx | 2 +- .../kbn_ftr_common_functional_ui_services.mdx | 2 +- api_docs/kbn_generate.mdx | 2 +- api_docs/kbn_generate_console_definitions.mdx | 2 +- api_docs/kbn_generate_csv.mdx | 2 +- api_docs/kbn_grouping.devdocs.json | 18 +- api_docs/kbn_grouping.mdx | 4 +- api_docs/kbn_guided_onboarding.mdx | 2 +- api_docs/kbn_handlebars.mdx | 2 +- api_docs/kbn_hapi_mocks.mdx | 2 +- api_docs/kbn_health_gateway_server.mdx | 2 +- api_docs/kbn_home_sample_data_card.mdx | 2 +- api_docs/kbn_home_sample_data_tab.mdx | 2 +- api_docs/kbn_i18n.mdx | 2 +- api_docs/kbn_i18n_react.mdx | 2 +- api_docs/kbn_import_resolver.mdx | 2 +- api_docs/kbn_index_management.mdx | 2 +- api_docs/kbn_inference_integration_flyout.mdx | 2 +- api_docs/kbn_infra_forge.mdx | 2 +- api_docs/kbn_interpreter.mdx | 2 +- api_docs/kbn_io_ts_utils.mdx | 2 +- api_docs/kbn_ipynb.mdx | 2 +- api_docs/kbn_jest_serializers.mdx | 2 +- api_docs/kbn_journeys.mdx | 2 +- api_docs/kbn_json_ast.mdx | 2 +- api_docs/kbn_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.devdocs.json | 162 +- api_docs/kbn_logging.mdx | 4 +- api_docs/kbn_logging_mocks.devdocs.json | 196 +- api_docs/kbn_logging_mocks.mdx | 2 +- api_docs/kbn_managed_content_badge.mdx | 2 +- api_docs/kbn_managed_vscode_config.mdx | 2 +- api_docs/kbn_management_cards_navigation.mdx | 2 +- .../kbn_management_settings_application.mdx | 2 +- ...ent_settings_components_field_category.mdx | 2 +- ...gement_settings_components_field_input.mdx | 2 +- ...nagement_settings_components_field_row.mdx | 2 +- ...bn_management_settings_components_form.mdx | 2 +- ...n_management_settings_field_definition.mdx | 2 +- api_docs/kbn_management_settings_ids.mdx | 2 +- ...n_management_settings_section_registry.mdx | 2 +- api_docs/kbn_management_settings_types.mdx | 2 +- .../kbn_management_settings_utilities.mdx | 2 +- api_docs/kbn_management_storybook_config.mdx | 2 +- api_docs/kbn_mapbox_gl.mdx | 2 +- api_docs/kbn_maps_vector_tile_utils.mdx | 2 +- api_docs/kbn_ml_agg_utils.devdocs.json | 1655 ++++++-- api_docs/kbn_ml_agg_utils.mdx | 4 +- api_docs/kbn_ml_anomaly_utils.mdx | 2 +- api_docs/kbn_ml_cancellable_search.mdx | 2 +- api_docs/kbn_ml_category_validator.mdx | 2 +- api_docs/kbn_ml_chi2test.mdx | 2 +- .../kbn_ml_data_frame_analytics_utils.mdx | 2 +- api_docs/kbn_ml_data_grid.mdx | 2 +- api_docs/kbn_ml_date_picker.mdx | 2 +- api_docs/kbn_ml_date_utils.mdx | 2 +- api_docs/kbn_ml_error_utils.mdx | 2 +- api_docs/kbn_ml_in_memory_table.mdx | 2 +- api_docs/kbn_ml_is_defined.mdx | 2 +- api_docs/kbn_ml_is_populated_object.mdx | 2 +- api_docs/kbn_ml_kibana_theme.mdx | 2 +- api_docs/kbn_ml_local_storage.mdx | 2 +- api_docs/kbn_ml_nested_property.mdx | 2 +- api_docs/kbn_ml_number_utils.mdx | 2 +- api_docs/kbn_ml_query_utils.mdx | 2 +- api_docs/kbn_ml_random_sampler_utils.mdx | 2 +- api_docs/kbn_ml_route_utils.mdx | 2 +- api_docs/kbn_ml_runtime_field_utils.mdx | 2 +- api_docs/kbn_ml_string_hash.mdx | 2 +- api_docs/kbn_ml_time_buckets.mdx | 2 +- api_docs/kbn_ml_trained_models_utils.mdx | 2 +- api_docs/kbn_ml_ui_actions.mdx | 2 +- api_docs/kbn_ml_url_state.mdx | 2 +- api_docs/kbn_mock_idp_utils.mdx | 2 +- api_docs/kbn_monaco.mdx | 2 +- api_docs/kbn_object_versioning.mdx | 2 +- api_docs/kbn_observability_alert_details.mdx | 2 +- .../kbn_observability_alerting_test_data.mdx | 2 +- ...ility_get_padded_alert_time_range_util.mdx | 2 +- api_docs/kbn_openapi_bundler.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 +- .../kbn_presentation_publishing.devdocs.json | 33 + api_docs/kbn_presentation_publishing.mdx | 4 +- api_docs/kbn_profiling_utils.mdx | 2 +- api_docs/kbn_random_sampling.mdx | 2 +- api_docs/kbn_react_field.mdx | 2 +- api_docs/kbn_react_hooks.mdx | 2 +- api_docs/kbn_react_kibana_context_common.mdx | 2 +- api_docs/kbn_react_kibana_context_render.mdx | 2 +- api_docs/kbn_react_kibana_context_root.mdx | 2 +- api_docs/kbn_react_kibana_context_styled.mdx | 2 +- api_docs/kbn_react_kibana_context_theme.mdx | 2 +- api_docs/kbn_react_kibana_mount.mdx | 2 +- api_docs/kbn_repo_file_maps.mdx | 2 +- api_docs/kbn_repo_linter.mdx | 2 +- api_docs/kbn_repo_path.mdx | 2 +- api_docs/kbn_repo_source_classifier.mdx | 2 +- api_docs/kbn_reporting_common.mdx | 2 +- api_docs/kbn_reporting_csv_share_panel.mdx | 2 +- api_docs/kbn_reporting_export_types_csv.mdx | 2 +- .../kbn_reporting_export_types_csv_common.mdx | 2 +- api_docs/kbn_reporting_export_types_pdf.mdx | 2 +- .../kbn_reporting_export_types_pdf_common.mdx | 2 +- api_docs/kbn_reporting_export_types_png.mdx | 2 +- .../kbn_reporting_export_types_png_common.mdx | 2 +- api_docs/kbn_reporting_mocks_server.mdx | 2 +- api_docs/kbn_reporting_public.mdx | 2 +- api_docs/kbn_reporting_server.mdx | 2 +- api_docs/kbn_resizable_layout.mdx | 2 +- .../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_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_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 +- api_docs/kbn_security_solution_features.mdx | 2 +- api_docs/kbn_security_solution_navigation.mdx | 2 +- api_docs/kbn_security_solution_side_nav.mdx | 2 +- ...kbn_security_solution_storybook_config.mdx | 2 +- .../kbn_securitysolution_autocomplete.mdx | 2 +- api_docs/kbn_securitysolution_data_table.mdx | 2 +- api_docs/kbn_securitysolution_ecs.mdx | 2 +- api_docs/kbn_securitysolution_es_utils.mdx | 2 +- ...ritysolution_exception_list_components.mdx | 2 +- api_docs/kbn_securitysolution_hook_utils.mdx | 2 +- ..._securitysolution_io_ts_alerting_types.mdx | 2 +- .../kbn_securitysolution_io_ts_list_types.mdx | 2 +- api_docs/kbn_securitysolution_io_ts_types.mdx | 2 +- api_docs/kbn_securitysolution_io_ts_utils.mdx | 2 +- api_docs/kbn_securitysolution_list_api.mdx | 2 +- .../kbn_securitysolution_list_constants.mdx | 2 +- api_docs/kbn_securitysolution_list_hooks.mdx | 2 +- api_docs/kbn_securitysolution_list_utils.mdx | 2 +- api_docs/kbn_securitysolution_rules.mdx | 2 +- api_docs/kbn_securitysolution_t_grid.mdx | 2 +- api_docs/kbn_securitysolution_utils.mdx | 2 +- api_docs/kbn_server_http_tools.mdx | 2 +- api_docs/kbn_server_route_repository.mdx | 2 +- api_docs/kbn_serverless_common_settings.mdx | 2 +- .../kbn_serverless_observability_settings.mdx | 2 +- api_docs/kbn_serverless_project_switcher.mdx | 2 +- api_docs/kbn_serverless_search_settings.mdx | 2 +- api_docs/kbn_serverless_security_settings.mdx | 2 +- api_docs/kbn_serverless_storybook_config.mdx | 2 +- api_docs/kbn_shared_svg.mdx | 2 +- api_docs/kbn_shared_ux_avatar_solution.mdx | 2 +- .../kbn_shared_ux_button_exit_full_screen.mdx | 2 +- api_docs/kbn_shared_ux_button_toolbar.mdx | 2 +- api_docs/kbn_shared_ux_card_no_data.mdx | 2 +- api_docs/kbn_shared_ux_card_no_data_mocks.mdx | 2 +- api_docs/kbn_shared_ux_chrome_navigation.mdx | 2 +- api_docs/kbn_shared_ux_error_boundary.mdx | 2 +- api_docs/kbn_shared_ux_file_context.mdx | 2 +- api_docs/kbn_shared_ux_file_image.mdx | 2 +- api_docs/kbn_shared_ux_file_image_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_picker.mdx | 2 +- api_docs/kbn_shared_ux_file_types.mdx | 2 +- api_docs/kbn_shared_ux_file_upload.mdx | 2 +- api_docs/kbn_shared_ux_file_util.mdx | 2 +- api_docs/kbn_shared_ux_link_redirect_app.mdx | 2 +- .../kbn_shared_ux_link_redirect_app_mocks.mdx | 2 +- api_docs/kbn_shared_ux_markdown.mdx | 2 +- api_docs/kbn_shared_ux_markdown_mocks.mdx | 2 +- .../kbn_shared_ux_page_analytics_no_data.mdx | 2 +- ...shared_ux_page_analytics_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_page_kibana_no_data.mdx | 2 +- ...bn_shared_ux_page_kibana_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_page_kibana_template.mdx | 2 +- ...n_shared_ux_page_kibana_template_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_no_data.mdx | 2 +- .../kbn_shared_ux_page_no_data_config.mdx | 2 +- ...bn_shared_ux_page_no_data_config_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_no_data_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_solution_nav.mdx | 2 +- .../kbn_shared_ux_prompt_no_data_views.mdx | 2 +- ...n_shared_ux_prompt_no_data_views_mocks.mdx | 2 +- api_docs/kbn_shared_ux_prompt_not_found.mdx | 2 +- api_docs/kbn_shared_ux_router.mdx | 2 +- api_docs/kbn_shared_ux_router_mocks.mdx | 2 +- api_docs/kbn_shared_ux_storybook_config.mdx | 2 +- api_docs/kbn_shared_ux_storybook_mock.mdx | 2 +- api_docs/kbn_shared_ux_tabbed_modal.mdx | 2 +- api_docs/kbn_shared_ux_utility.mdx | 2 +- api_docs/kbn_slo_schema.mdx | 2 +- api_docs/kbn_some_dev_log.mdx | 2 +- api_docs/kbn_sort_predicates.mdx | 2 +- api_docs/kbn_std.mdx | 2 +- api_docs/kbn_stdio_dev_helpers.mdx | 2 +- api_docs/kbn_storybook.mdx | 2 +- api_docs/kbn_telemetry_tools.mdx | 2 +- api_docs/kbn_test.mdx | 2 +- api_docs/kbn_test_eui_helpers.mdx | 2 +- api_docs/kbn_test_jest_helpers.mdx | 2 +- api_docs/kbn_test_subj_selector.mdx | 2 +- api_docs/kbn_text_based_editor.mdx | 2 +- api_docs/kbn_timerange.mdx | 2 +- api_docs/kbn_tooling_log.mdx | 2 +- api_docs/kbn_triggers_actions_ui_types.mdx | 2 +- api_docs/kbn_try_in_console.mdx | 2 +- api_docs/kbn_ts_projects.mdx | 2 +- api_docs/kbn_typed_react_router_config.mdx | 2 +- api_docs/kbn_ui_actions_browser.mdx | 2 +- api_docs/kbn_ui_shared_deps_src.mdx | 2 +- api_docs/kbn_ui_theme.mdx | 2 +- api_docs/kbn_unified_data_table.mdx | 2 +- api_docs/kbn_unified_doc_viewer.mdx | 2 +- api_docs/kbn_unified_field_list.mdx | 2 +- api_docs/kbn_unsaved_changes_badge.mdx | 2 +- 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_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.devdocs.json | 20 +- 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 | 17 +- api_docs/presentation_panel.mdx | 2 +- api_docs/presentation_util.mdx | 2 +- api_docs/profiling.mdx | 2 +- api_docs/profiling_data_access.mdx | 2 +- api_docs/remote_clusters.mdx | 2 +- api_docs/reporting.mdx | 2 +- api_docs/rollup.mdx | 2 +- api_docs/rule_registry.mdx | 2 +- api_docs/runtime_fields.mdx | 2 +- api_docs/saved_objects.mdx | 2 +- api_docs/saved_objects_finder.mdx | 2 +- api_docs/saved_objects_management.mdx | 2 +- api_docs/saved_objects_tagging.mdx | 2 +- api_docs/saved_objects_tagging_oss.mdx | 2 +- api_docs/saved_search.mdx | 2 +- api_docs/screenshot_mode.mdx | 2 +- api_docs/screenshotting.mdx | 2 +- api_docs/search_connectors.mdx | 2 +- api_docs/search_homepage.mdx | 2 +- api_docs/search_inference_endpoints.mdx | 2 +- api_docs/search_notebooks.mdx | 2 +- api_docs/search_playground.mdx | 2 +- api_docs/security.devdocs.json | 8 - api_docs/security.mdx | 2 +- api_docs/security_solution.mdx | 2 +- api_docs/security_solution_ess.mdx | 2 +- api_docs/security_solution_serverless.mdx | 2 +- api_docs/serverless.mdx | 2 +- api_docs/serverless_observability.mdx | 2 +- api_docs/serverless_search.mdx | 2 +- api_docs/session_view.mdx | 2 +- api_docs/share.mdx | 2 +- api_docs/slo.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/text_based_languages.mdx | 2 +- api_docs/threat_intelligence.mdx | 2 +- api_docs/timelines.mdx | 2 +- api_docs/transform.mdx | 2 +- api_docs/triggers_actions_ui.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 +- 717 files changed, 5373 insertions(+), 2418 deletions(-) create mode 100644 api_docs/kbn_alerts_grouping.devdocs.json create mode 100644 api_docs/kbn_alerts_grouping.mdx diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index fe795a12dd9fc1..096066e0ce5bd0 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 01b63c9833774e..56e1e3c05dc9ce 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/ai_assistant_management_selection.mdx b/api_docs/ai_assistant_management_selection.mdx index 2a14e67b815b0d..59d2a889752204 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementSelection'] --- import aiAssistantManagementSelectionObj from './ai_assistant_management_selection.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 9f0c1a8e1b773c..6c0a62c9c13410 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 93dd6dee777903..39480138681d21 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index e72bac079873b2..c3150722d0adb8 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/apm_data_access.mdx b/api_docs/apm_data_access.mdx index ae804203f17cb5..9f794fe86c6b73 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess'] --- import apmDataAccessObj from './apm_data_access.devdocs.json'; diff --git a/api_docs/assets_data_access.mdx b/api_docs/assets_data_access.mdx index a8630693d8afbc..f82175b8f2b380 100644 --- a/api_docs/assets_data_access.mdx +++ b/api_docs/assets_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetsDataAccess title: "assetsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the assetsDataAccess plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetsDataAccess'] --- import assetsDataAccessObj from './assets_data_access.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 7705bad70091c6..5614bdf511a312 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] --- import bannersObj from './banners.devdocs.json'; diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index 063cd8e56e6fd6..5eb1c8f800a490 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] --- import bfetchObj from './bfetch.devdocs.json'; diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 5b745cf83134a4..a85993e163b537 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index bdb0be4ae6991c..e4106724469cad 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index eac4bd089d536e..e34208dde9c2d1 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index 7720c7749d8919..803baa19d1b0d6 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index f1acdde7183b3d..688d7754196386 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration'] --- import cloudDataMigrationObj from './cloud_data_migration.devdocs.json'; diff --git a/api_docs/cloud_defend.mdx b/api_docs/cloud_defend.mdx index e3ba0b074d0ca4..fb38869a0e18a1 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend'] --- import cloudDefendObj from './cloud_defend.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index c9e346b09cac22..8c6deb39773307 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index 4313a810abb6ea..4ed908f53f2782 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] --- import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json'; diff --git a/api_docs/console.mdx b/api_docs/console.mdx index 4c66c91d87e097..02950d752e811b 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/content_management.mdx b/api_docs/content_management.mdx index 28978747fe01b0..d60d0a1fbb45b8 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] --- import contentManagementObj from './content_management.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 29d638bb356833..f8470abe439d02 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 6158a4bf957e3c..e57c81077c45ec 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index e14e3b7a0c7c49..8f8ca8f4e77002 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 7a5bfe02f46c4b..1bcb7f25a63c55 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 1d1c63357050ad..a9cef4ffe9dce2 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-07-08 +date: 2024-07-09 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 981e408ce05e56..7b4ccf434823e3 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataQuality'] --- import dataQualityObj from './data_quality.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index bb9e26027fa34a..8de4d0592f7ea4 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-07-08 +date: 2024-07-09 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 34631648caf213..37f8ceb15cc784 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index b7e0c8eafa50e9..f3807615bcee70 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index 35759bcb75d10f..dd4529822585ab 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index d7ab5085ab4e75..d0b434a81c5087 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 3bf252b91e9ea7..f70820a6b113cb 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index 10022aac0772c7..05b840fe8c3d36 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/dataset_quality.mdx b/api_docs/dataset_quality.mdx index 9d224decd267f7..be1082197b1d33 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'datasetQuality'] --- import datasetQualityObj from './dataset_quality.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 69ad5a7de76e9a..f2079fd416fad8 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -18,7 +18,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | ---------------|-----------|-----------| | | ml, stackAlerts | - | | | data, @kbn/search-errors, savedObjectsManagement, unifiedSearch, @kbn/unified-field-list, lens, controls, triggersActionsUi, dataVisualizer, canvas, presentationUtil, logsShared, fleet, ml, @kbn/lens-embeddable-utils, @kbn/ml-data-view-utils, enterpriseSearch, graph, visTypeTimeseries, exploratoryView, stackAlerts, infra, securitySolution, timelines, transform, upgradeAssistant, uptime, ux, maps, dataViewManagement, eventAnnotationListing, inputControlVis, visDefaultEditor, visTypeTimelion, visTypeVega | - | -| | encryptedSavedObjects, ml, securitySolution | - | +| | 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-saved-objects-common, @kbn/core-saved-objects-server, actions, @kbn/alerting-types, alerting, savedSearch, enterpriseSearch, securitySolution, taskManager, @kbn/core-saved-objects-server-internal, @kbn/core-saved-objects-api-server | - | @@ -153,13 +153,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | security | - | | | observabilityShared | - | | | @kbn/react-kibana-context-styled, kibanaReact | - | -| | encryptedSavedObjects | - | | | @kbn/content-management-table-list-view, filesManagement | - | | | @kbn/core | - | | | @kbn/core | - | | | @kbn/core-lifecycle-browser-mocks, @kbn/core, @kbn/core-plugins-browser-internal | - | | | @kbn/core | - | | | @kbn/core-plugins-server-internal | - | +| | encryptedSavedObjects | - | | | reporting | - | | | @kbn/reporting-export-types-csv, reporting | - | | | @kbn/reporting-export-types-csv, reporting | - | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 15b7b877364b61..3d6bec3acdf4bb 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -736,7 +736,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [encryption_key_rotation_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/encrypted_saved_objects/server/crypto/encryption_key_rotation_service.ts#:~:text=authc), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts#:~:text=authc) | - | | | [create_migration.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/encrypted_saved_objects/server/create_migration.ts#:~:text=convertToMultiNamespaceTypeVersion), [create_migration.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/encrypted_saved_objects/server/create_migration.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 30d251df8a18cd..ba8f747f2b66bc 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 95a4e01c5a063c..e19d6a97753546 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 8b478de179353e..c8feab13c40f02 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 2f4861296d72ef..aeb8137f43e933 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/discover_shared.mdx b/api_docs/discover_shared.mdx index 115b4954ff23c3..f68e0f66f9d2d0 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverShared'] --- import discoverSharedObj from './discover_shared.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index 7cf5e3bde271ff..ee89b9fcaa377f 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard'] --- import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/elastic_assistant.mdx b/api_docs/elastic_assistant.mdx index 1a7099c60ad7ba..b9f54e85c98a37 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-07-08 +date: 2024-07-09 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 ba857dbbb2a0e7..33b17b1b3e0845 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 67ff8b1a7170d2..a9019137412ae6 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 3be0c3138a7aba..cf1cb411d4e83b 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index 8eac0851263ea0..38f98bde1d9b52 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/entity_manager.mdx b/api_docs/entity_manager.mdx index d1694fe705470d..f85d2feea348f9 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-07-08 +date: 2024-07-09 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 175a4473475574..ad72afddd7a281 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/esql_data_grid.mdx b/api_docs/esql_data_grid.mdx index 3d3e4afeb76eb0..3f2c0a4d9c670b 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esqlDataGrid'] --- import esqlDataGridObj from './esql_data_grid.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index 9eb1e28b51692b..8b68077abbcc75 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_annotation_listing.mdx b/api_docs/event_annotation_listing.mdx index a98be8d4a112f2..2e26b580d7ab1d 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-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing'] --- import eventAnnotationListingObj from './event_annotation_listing.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 2ed29ef90c0957..5dceb029dd2918 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/exploratory_view.mdx b/api_docs/exploratory_view.mdx index 83d69e47af2565..6ace7f03b7e987 100644 --- a/api_docs/exploratory_view.mdx +++ b/api_docs/exploratory_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/exploratoryView title: "exploratoryView" image: https://source.unsplash.com/400x175/?github description: API docs for the exploratoryView plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'exploratoryView'] --- import exploratoryViewObj from './exploratory_view.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 29aaa39510c610..ae10832e86007d 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index af5e41a1cc81e9..60112b987fa25c 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index 7725a5da603ffc..8d28641ef91100 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 230a229a657ee5..24380d9cb7a28b 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index 632b950d6c2ec9..8c2aa4cbee4bfb 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index d24838c2f76727..55f8f70299ab9b 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index 4e0b010d9ba81e..81a907caa006e3 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index 4b819b1e2c87c2..a3321202f8de61 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 450bcd91addb51..cb0416e763aaba 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index 4d95d4236ba5ba..cf12bc2eb835f3 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index 4e582765ced017..8425f9b438d210 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index a31c1d2d10c8bb..6229db242f0b13 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index f47d329c8e14e4..5c5befc88992ef 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 434469f9d33038..33e5dcb1c9e299 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.mdx b/api_docs/features.mdx index 7d5d1a7b61314a..3623e4b7381635 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index f96b25b252b1d4..4aa09771437ed3 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/fields_metadata.mdx b/api_docs/fields_metadata.mdx index c9428979d9d68c..07e9cc79559819 100644 --- a/api_docs/fields_metadata.mdx +++ b/api_docs/fields_metadata.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldsMetadata title: "fieldsMetadata" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldsMetadata plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldsMetadata'] --- import fieldsMetadataObj from './fields_metadata.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index bd6f422433be20..d7bb8672d1bbbf 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.mdx b/api_docs/files.mdx index e2af81bc92afe2..336c7b989982dc 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx index b9a7117c7c12e8..08229e66440de9 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 69bd4677ef5ee6..cf34eb3c65364e 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 2af6a3ce23a6bd..f673e4f74ddefe 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index a27b3328d230dc..0f0f71be5ab1f6 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 2ce908f6c7735d..39f790b1342994 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/image_embeddable.mdx b/api_docs/image_embeddable.mdx index 9bd69d6cb01748..7d008c8cda1466 100644 --- a/api_docs/image_embeddable.mdx +++ b/api_docs/image_embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/imageEmbeddable title: "imageEmbeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the imageEmbeddable plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'imageEmbeddable'] --- import imageEmbeddableObj from './image_embeddable.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index e18d39637395d0..2198168f7de1e3 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index af950378a75d75..6897a3353fc850 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index ddc9343d6775be..46eb5f1b08eead 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/ingest_pipelines.mdx b/api_docs/ingest_pipelines.mdx index 450eaef45bf700..7bda5d0e3d79aa 100644 --- a/api_docs/ingest_pipelines.mdx +++ b/api_docs/ingest_pipelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ingestPipelines title: "ingestPipelines" image: https://source.unsplash.com/400x175/?github description: API docs for the ingestPipelines plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ingestPipelines'] --- import ingestPipelinesObj from './ingest_pipelines.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 8a94437dc7ae27..e17918db58afca 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/integration_assistant.devdocs.json b/api_docs/integration_assistant.devdocs.json index 7bc21089a09fd3..fb01a65e33531e 100644 --- a/api_docs/integration_assistant.devdocs.json +++ b/api_docs/integration_assistant.devdocs.json @@ -231,7 +231,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; }" + "[] | undefined; }; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; }" ], "path": "x-pack/plugins/integration_assistant/common/api/categorization/categorization_route.ts", "deprecated": false, @@ -397,7 +397,7 @@ "label": "EcsMappingRequestBody", "description": [], "signature": [ - "{ connectorId: string; packageName: string; rawSamples: string[]; dataStreamName: string; mapping?: Zod.objectOutputType<{}, Zod.ZodTypeAny, \"passthrough\"> | undefined; }" + "{ connectorId: string; packageName: string; rawSamples: string[]; dataStreamName: string; mapping?: Zod.objectOutputType<{}, Zod.ZodTypeAny, \"passthrough\"> | undefined; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; }" ], "path": "x-pack/plugins/integration_assistant/common/api/ecs/ecs_route.ts", "deprecated": false, @@ -630,7 +630,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; }" + "[] | undefined; }; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; }" ], "path": "x-pack/plugins/integration_assistant/common/api/related/related_route.ts", "deprecated": false, @@ -917,7 +917,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }>; connectorId: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; packageName: string; rawSamples: string[]; dataStreamName: string; currentPipeline: { processors: ", + "[] | undefined; }>; connectorId: Zod.ZodString; langSmithOptions: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; packageName: string; rawSamples: string[]; dataStreamName: string; currentPipeline: { processors: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -933,7 +933,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; }, { connectorId: string; packageName: string; rawSamples: string[]; dataStreamName: string; currentPipeline: { processors: ", + "[] | undefined; }; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; }, { connectorId: string; packageName: string; rawSamples: string[]; dataStreamName: string; currentPipeline: { processors: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -949,7 +949,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; }>" + "[] | undefined; }; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; }>" ], "path": "x-pack/plugins/integration_assistant/common/api/categorization/categorization_route.ts", "deprecated": false, @@ -1359,7 +1359,7 @@ "label": "EcsMappingRequestBody", "description": [], "signature": [ - "Zod.ZodObject<{ packageName: Zod.ZodString; dataStreamName: Zod.ZodString; rawSamples: Zod.ZodArray; mapping: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodTypeAny, \"passthrough\">>>; connectorId: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; packageName: string; rawSamples: string[]; dataStreamName: string; mapping?: Zod.objectOutputType<{}, Zod.ZodTypeAny, \"passthrough\"> | undefined; }, { connectorId: string; packageName: string; rawSamples: string[]; dataStreamName: string; mapping?: Zod.objectInputType<{}, Zod.ZodTypeAny, \"passthrough\"> | undefined; }>" + "Zod.ZodObject<{ packageName: Zod.ZodString; dataStreamName: Zod.ZodString; rawSamples: Zod.ZodArray; mapping: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodTypeAny, \"passthrough\">>>; connectorId: Zod.ZodString; langSmithOptions: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; packageName: string; rawSamples: string[]; dataStreamName: string; mapping?: Zod.objectOutputType<{}, Zod.ZodTypeAny, \"passthrough\"> | undefined; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; }, { connectorId: string; packageName: string; rawSamples: string[]; dataStreamName: string; mapping?: Zod.objectInputType<{}, Zod.ZodTypeAny, \"passthrough\"> | undefined; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; }>" ], "path": "x-pack/plugins/integration_assistant/common/api/ecs/ecs_route.ts", "deprecated": false, @@ -1849,7 +1849,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }>; connectorId: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; packageName: string; rawSamples: string[]; dataStreamName: string; currentPipeline: { processors: ", + "[] | undefined; }>; connectorId: Zod.ZodString; langSmithOptions: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; packageName: string; rawSamples: string[]; dataStreamName: string; currentPipeline: { processors: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -1865,7 +1865,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; }, { connectorId: string; packageName: string; rawSamples: string[]; dataStreamName: string; currentPipeline: { processors: ", + "[] | undefined; }; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; }, { connectorId: string; packageName: string; rawSamples: string[]; dataStreamName: string; currentPipeline: { processors: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -1881,7 +1881,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; }>" + "[] | undefined; }; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; }>" ], "path": "x-pack/plugins/integration_assistant/common/api/related/related_route.ts", "deprecated": false, diff --git a/api_docs/integration_assistant.mdx b/api_docs/integration_assistant.mdx index 416126b9bf5ff2..e508673b99e2e7 100644 --- a/api_docs/integration_assistant.mdx +++ b/api_docs/integration_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/integrationAssistant title: "integrationAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the integrationAssistant plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'integrationAssistant'] --- import integrationAssistantObj from './integration_assistant.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index be337a285e43e2..706fd017d0bd14 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/investigate.mdx b/api_docs/investigate.mdx index b02bcf6bb6b1fb..3564bad1539b14 100644 --- a/api_docs/investigate.mdx +++ b/api_docs/investigate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/investigate title: "investigate" image: https://source.unsplash.com/400x175/?github description: API docs for the investigate plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'investigate'] --- import investigateObj from './investigate.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index 733cac3b5fa931..59e2e0458b0f13 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_actions_types.mdx b/api_docs/kbn_actions_types.mdx index a1e44e22b1e5cf..5cf407eec09494 100644 --- a/api_docs/kbn_actions_types.mdx +++ b/api_docs/kbn_actions_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-actions-types title: "@kbn/actions-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/actions-types plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/actions-types'] --- import kbnActionsTypesObj from './kbn_actions_types.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index a8dc77f4e62486..026905a20e4222 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_pattern_analysis.mdx b/api_docs/kbn_aiops_log_pattern_analysis.mdx index a22e977869b766..cfd1a74d550493 100644 --- a/api_docs/kbn_aiops_log_pattern_analysis.mdx +++ b/api_docs/kbn_aiops_log_pattern_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-pattern-analysis title: "@kbn/aiops-log-pattern-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-pattern-analysis plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-pattern-analysis'] --- import kbnAiopsLogPatternAnalysisObj from './kbn_aiops_log_pattern_analysis.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_rate_analysis.mdx b/api_docs/kbn_aiops_log_rate_analysis.mdx index eefb0c5bf1af34..cf1d55a4eba09b 100644 --- a/api_docs/kbn_aiops_log_rate_analysis.mdx +++ b/api_docs/kbn_aiops_log_rate_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-rate-analysis title: "@kbn/aiops-log-rate-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-rate-analysis plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-rate-analysis'] --- import kbnAiopsLogRateAnalysisObj from './kbn_aiops_log_rate_analysis.devdocs.json'; diff --git a/api_docs/kbn_alerting_api_integration_helpers.mdx b/api_docs/kbn_alerting_api_integration_helpers.mdx index 66893c914360c9..7229c00805c463 100644 --- a/api_docs/kbn_alerting_api_integration_helpers.mdx +++ b/api_docs/kbn_alerting_api_integration_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-api-integration-helpers title: "@kbn/alerting-api-integration-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-api-integration-helpers plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-api-integration-helpers'] --- import kbnAlertingApiIntegrationHelpersObj from './kbn_alerting_api_integration_helpers.devdocs.json'; diff --git a/api_docs/kbn_alerting_comparators.mdx b/api_docs/kbn_alerting_comparators.mdx index dfd73d4082ec27..c15e5c9d98814b 100644 --- a/api_docs/kbn_alerting_comparators.mdx +++ b/api_docs/kbn_alerting_comparators.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-comparators title: "@kbn/alerting-comparators" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-comparators plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-comparators'] --- import kbnAlertingComparatorsObj from './kbn_alerting_comparators.devdocs.json'; diff --git a/api_docs/kbn_alerting_state_types.mdx b/api_docs/kbn_alerting_state_types.mdx index 3d7ba33fcea94b..c9f4894e32a847 100644 --- a/api_docs/kbn_alerting_state_types.mdx +++ b/api_docs/kbn_alerting_state_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-state-types title: "@kbn/alerting-state-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-state-types plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-state-types'] --- import kbnAlertingStateTypesObj from './kbn_alerting_state_types.devdocs.json'; diff --git a/api_docs/kbn_alerting_types.mdx b/api_docs/kbn_alerting_types.mdx index 9b3ed7339bb9be..a85c7f65b836ae 100644 --- a/api_docs/kbn_alerting_types.mdx +++ b/api_docs/kbn_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-types title: "@kbn/alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-types plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-types'] --- import kbnAlertingTypesObj from './kbn_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index 51b1a398d86695..536f700643823c 100644 --- a/api_docs/kbn_alerts_as_data_utils.mdx +++ b/api_docs/kbn_alerts_as_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-as-data-utils title: "@kbn/alerts-as-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-as-data-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-as-data-utils'] --- import kbnAlertsAsDataUtilsObj from './kbn_alerts_as_data_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts_grouping.devdocs.json b/api_docs/kbn_alerts_grouping.devdocs.json new file mode 100644 index 00000000000000..f734613aca44b8 --- /dev/null +++ b/api_docs/kbn_alerts_grouping.devdocs.json @@ -0,0 +1,492 @@ +{ + "id": "@kbn/alerts-grouping", + "client": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGrouping", + "type": "Function", + "tags": [], + "label": "AlertsGrouping", + "description": [ + "\nA coordinator component to show multiple alert tables grouped by one or more fields\n" + ], + "signature": [ + "React.NamedExoticComponent<", + { + "pluginId": "@kbn/alerts-grouping", + "scope": "public", + "docId": "kibKbnAlertsGroupingPluginApi", + "section": "def-public.AlertsGroupingProps", + "text": "AlertsGroupingProps" + }, + "<{}>> & { readonly type: (props: ", + { + "pluginId": "@kbn/alerts-grouping", + "scope": "public", + "docId": "kibKbnAlertsGroupingPluginApi", + "section": "def-public.AlertsGroupingProps", + "text": "AlertsGroupingProps" + }, + "<{}>) => JSX.Element; }" + ], + "path": "packages/kbn-alerts-grouping/src/components/alerts_grouping.tsx", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGrouping.$1", + "type": "Uncategorized", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "P" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.useAlertsGroupingState", + "type": "Function", + "tags": [], + "label": "useAlertsGroupingState", + "description": [], + "signature": [ + "(groupingId: string) => { grouping: ", + "GroupModel", + "; updateGrouping: (groupModel: Partial<", + "GroupModel", + "> | null) => void; }" + ], + "path": "packages/kbn-alerts-grouping/src/contexts/alerts_grouping_context.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.useAlertsGroupingState.$1", + "type": "string", + "tags": [], + "label": "groupingId", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-alerts-grouping/src/contexts/alerts_grouping_context.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps", + "type": "Interface", + "tags": [], + "label": "AlertsGroupingProps", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-grouping", + "scope": "public", + "docId": "kibKbnAlertsGroupingPluginApi", + "section": "def-public.AlertsGroupingProps", + "text": "AlertsGroupingProps" + }, + "" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.children", + "type": "Function", + "tags": [], + "label": "children", + "description": [ + "\nThe leaf component that will be rendered in the grouping panels" + ], + "signature": [ + "(groupingFilters: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[]) => React.ReactElement>" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.children.$1", + "type": "Array", + "tags": [], + "label": "groupingFilters", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[]" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.renderGroupPanel", + "type": "Function", + "tags": [], + "label": "renderGroupPanel", + "description": [ + "\nRender function for the group panel header" + ], + "signature": [ + "GroupPanelRenderer", + " | undefined" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.getGroupStats", + "type": "Function", + "tags": [], + "label": "getGroupStats", + "description": [ + "\nA function that given the current grouping field and aggregation results, returns an array of\nstat items to be rendered in the group panel" + ], + "signature": [ + "GetGroupStats", + " | undefined" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.defaultFilters", + "type": "Array", + "tags": [], + "label": "defaultFilters", + "description": [ + "\nDefault search filters" + ], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.globalFilters", + "type": "Array", + "tags": [], + "label": "globalFilters", + "description": [ + "\nGlobal search filters" + ], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[]" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.takeActionItems", + "type": "Function", + "tags": [], + "label": "takeActionItems", + "description": [ + "\nItems that will be rendered in the `Take Actions` menu" + ], + "signature": [ + "((groupFilters: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[], groupNumber: number) => JSX.Element[]) | undefined" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.defaultGroupingOptions", + "type": "Array", + "tags": [], + "label": "defaultGroupingOptions", + "description": [ + "\nThe default fields available for grouping" + ], + "signature": [ + { + "pluginId": "@kbn/grouping", + "scope": "common", + "docId": "kibKbnGroupingPluginApi", + "section": "def-common.GroupOption", + "text": "GroupOption" + }, + "[]" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.featureIds", + "type": "Array", + "tags": [], + "label": "featureIds", + "description": [ + "\nThe alerting feature ids this grouping covers" + ], + "signature": [ + { + "pluginId": "@kbn/rule-data-utils", + "scope": "common", + "docId": "kibKbnRuleDataUtilsPluginApi", + "section": "def-common.AlertConsumers", + "text": "AlertConsumers" + }, + "[]" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.from", + "type": "string", + "tags": [], + "label": "from", + "description": [ + "\nTime filter start" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.to", + "type": "string", + "tags": [], + "label": "to", + "description": [ + "\nTime filter end" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.globalQuery", + "type": "Object", + "tags": [], + "label": "globalQuery", + "description": [ + "\nGlobal search query (i.e. from the KQL bar)" + ], + "signature": [ + "{ query: string | { [key: string]: any; }; language: string; }" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.loading", + "type": "CompoundType", + "tags": [], + "label": "loading", + "description": [ + "\nExternal loading state" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.groupingId", + "type": "string", + "tags": [], + "label": "groupingId", + "description": [ + "\nID used to retrieve the current grouping configuration from the state" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.getAggregationsByGroupingField", + "type": "Function", + "tags": [], + "label": "getAggregationsByGroupingField", + "description": [ + "\nResolves an array of aggregations for a given grouping field" + ], + "signature": [ + "(field: string) => ", + { + "pluginId": "@kbn/grouping", + "scope": "common", + "docId": "kibKbnGroupingPluginApi", + "section": "def-common.NamedAggregation", + "text": "NamedAggregation" + }, + "[]" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.getAggregationsByGroupingField.$1", + "type": "string", + "tags": [], + "label": "field", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.services", + "type": "Object", + "tags": [], + "label": "services", + "description": [ + "\nServices required for the grouping component" + ], + "signature": [ + "{ notifications: ", + { + "pluginId": "@kbn/core-notifications-browser", + "scope": "common", + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-common.NotificationsStart", + "text": "NotificationsStart" + }, + "; dataViews: ", + { + "pluginId": "dataViews", + "scope": "public", + "docId": "kibDataViewsPluginApi", + "section": "def-public.DataViewsServicePublic", + "text": "DataViewsServicePublic" + }, + "; http: ", + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + }, + "; }" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_alerts_grouping.mdx b/api_docs/kbn_alerts_grouping.mdx new file mode 100644 index 00000000000000..046fba053c0967 --- /dev/null +++ b/api_docs/kbn_alerts_grouping.mdx @@ -0,0 +1,33 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnAlertsGroupingPluginApi +slug: /kibana-dev-docs/api/kbn-alerts-grouping +title: "@kbn/alerts-grouping" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/alerts-grouping plugin +date: 2024-07-09 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-grouping'] +--- +import kbnAlertsGroupingObj from './kbn_alerts_grouping.devdocs.json'; + + + +Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 22 | 0 | 5 | 1 | + +## Client + +### Functions + + +### Interfaces + + diff --git a/api_docs/kbn_alerts_ui_shared.devdocs.json b/api_docs/kbn_alerts_ui_shared.devdocs.json index db705acc3d45a2..404c573dafc064 100644 --- a/api_docs/kbn_alerts_ui_shared.devdocs.json +++ b/api_docs/kbn_alerts_ui_shared.devdocs.json @@ -197,253 +197,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.fetchAadFields", - "type": "Function", - "tags": [], - "label": "fetchAadFields", - "description": [], - "signature": [ - "({\n http,\n ruleTypeId,\n}: { http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; ruleTypeId?: string | undefined; }) => Promise<", - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" - }, - "[]>" - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_aad_fields.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.fetchAadFields.$1", - "type": "Object", - "tags": [], - "label": "{\n http,\n ruleTypeId,\n}", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_aad_fields.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.fetchAadFields.$1.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_aad_fields.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.fetchAadFields.$1.ruleTypeId", - "type": "string", - "tags": [], - "label": "ruleTypeId", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_aad_fields.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.fetchAlertFields", - "type": "Function", - "tags": [], - "label": "fetchAlertFields", - "description": [], - "signature": [ - "({\n http,\n featureIds,\n}: { http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; featureIds: ", - { - "pluginId": "@kbn/rule-data-utils", - "scope": "common", - "docId": "kibKbnRuleDataUtilsPluginApi", - "section": "def-common.AlertConsumers", - "text": "AlertConsumers" - }, - "[]; }) => Promise<", - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldSpec", - "text": "FieldSpec" - }, - "[]>" - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_alert_fields.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.fetchAlertFields.$1", - "type": "Object", - "tags": [], - "label": "{\n http,\n featureIds,\n}", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_alert_fields.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.fetchAlertFields.$1.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_alert_fields.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.fetchAlertFields.$1.featureIds", - "type": "Array", - "tags": [], - "label": "featureIds", - "description": [], - "signature": [ - { - "pluginId": "@kbn/rule-data-utils", - "scope": "common", - "docId": "kibKbnRuleDataUtilsPluginApi", - "section": "def-common.AlertConsumers", - "text": "AlertConsumers" - }, - "[]" - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_alert_fields.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.fetchAlertIndexNames", - "type": "Function", - "tags": [], - "label": "fetchAlertIndexNames", - "description": [], - "signature": [ - "({\n http,\n features,\n}: { http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; features: string; }) => Promise" - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_alert_index_names.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.fetchAlertIndexNames.$1", - "type": "Object", - "tags": [], - "label": "{\n http,\n features,\n}", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_alert_index_names.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.fetchAlertIndexNames.$1.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_alert_index_names.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.fetchAlertIndexNames.$1.features", - "type": "string", - "tags": [], - "label": "features", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/apis/fetch_alert_index_names.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/alerts-ui-shared", "id": "def-common.MaintenanceWindowCallout", @@ -565,7 +318,7 @@ "text": "UseAlertDataViewResult" } ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_alert_data_view.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alert_data_view.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -585,7 +338,7 @@ "text": "UseAlertDataViewProps" } ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_alert_data_view.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alert_data_view.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -596,10 +349,10 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.useRuleAADFields", + "id": "def-common.useCreateRule", "type": "Function", "tags": [], - "label": "useRuleAADFields", + "label": "useCreateRule", "description": [], "signature": [ "(props: ", @@ -607,25 +360,54 @@ "pluginId": "@kbn/alerts-ui-shared", "scope": "common", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.UseRuleAADFieldsProps", - "text": "UseRuleAADFieldsProps" + "section": "def-common.UseCreateRuleProps", + "text": "UseCreateRuleProps" }, ") => ", + "UseMutationResult", + "<", { "pluginId": "@kbn/alerts-ui-shared", "scope": "common", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.UseRuleAADFieldsResult", - "text": "UseRuleAADFieldsResult" - } + "section": "def-common.Rule", + "text": "Rule" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">, ", + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.IHttpFetchError", + "text": "IHttpFetchError" + }, + "<{ message: string; }>, { formData: ", + "CreateRuleBody", + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">; }, unknown>" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.useRuleAADFields.$1", + "id": "def-common.useCreateRule.$1", "type": "Object", "tags": [], "label": "props", @@ -635,11 +417,11 @@ "pluginId": "@kbn/alerts-ui-shared", "scope": "common", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.UseRuleAADFieldsProps", - "text": "UseRuleAADFieldsProps" + "section": "def-common.UseCreateRuleProps", + "text": "UseCreateRuleProps" } ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -647,472 +429,684 @@ ], "returnComment": [], "initialIsOpen": false - } - ], - "interfaces": [ + }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorFieldsProps", - "type": "Interface", + "id": "def-common.useFindAlertsQuery", + "type": "Function", "tags": [], - "label": "ActionConnectorFieldsProps", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "label": "useFindAlertsQuery", + "description": [ + "\nA generic hook to find alerts\n\nStill applies alerts authorization rules but, unlike triggers_actions_ui's `useFetchAlerts` hook,\nallows to perform arbitrary queries" + ], + "signature": [ + "({ http, toasts, enabled, params, }: ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseFindAlertsQueryProps", + "text": "UseFindAlertsQueryProps" + }, + ") => ", + "UseQueryResult", + "<", + "SearchResponseBody", + "<{}, T>, Error>" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_find_alerts_query.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorFieldsProps.readOnly", - "type": "boolean", - "tags": [], - "label": "readOnly", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorFieldsProps.isEdit", - "type": "boolean", - "tags": [], - "label": "isEdit", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorFieldsProps.registerPreSubmitValidator", - "type": "Function", + "id": "def-common.useFindAlertsQuery.$1", + "type": "Object", "tags": [], - "label": "registerPreSubmitValidator", + "label": "{\n http,\n toasts,\n enabled = true,\n params,\n}", "description": [], "signature": [ - "(validator: ", { "pluginId": "@kbn/alerts-ui-shared", "scope": "common", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.ConnectorValidationFunc", - "text": "ConnectorValidationFunc" - }, - ") => void" + "section": "def-common.UseFindAlertsQueryProps", + "text": "UseFindAlertsQueryProps" + } ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_find_alerts_query.ts", "deprecated": false, "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorFieldsProps.registerPreSubmitValidator.$1", - "type": "Function", - "tags": [], - "label": "validator", - "description": [], - "signature": [ - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "common", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.ConnectorValidationFunc", - "text": "ConnectorValidationFunc" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] + "isRequired": true } ], + "returnComment": [], "initialIsOpen": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorProps", - "type": "Interface", + "id": "def-common.useGetAlertsGroupAggregationsQuery", + "type": "Function", "tags": [], - "label": "ActionConnectorProps", - "description": [], + "label": "useGetAlertsGroupAggregationsQuery", + "description": [ + "\nFetches alerts aggregations for a given groupByField.\n\nSome default aggregations are applied:\n- `groupByFields`, to get the buckets based on the provided grouping field,\n - `unitsCount`, to count the number of alerts in each bucket,\n- `unitsCount`, to count the total number of alerts targeted by the query,\n- `groupsCount`, to count the total number of groups.\n\nThe provided `aggregations` are applied within `groupByFields`. Here the `groupByField` runtime\nfield can be used to perform grouping-based aggregations.\n\nApplies alerting RBAC through featureIds." + ], "signature": [ + "({ http, toasts, enabled, params, }: ", { "pluginId": "@kbn/alerts-ui-shared", "scope": "common", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.ActionConnectorProps", - "text": "ActionConnectorProps" + "section": "def-common.UseGetAlertsGroupAggregationsQueryProps", + "text": "UseGetAlertsGroupAggregationsQueryProps" }, - "" + ") => ", + "UseQueryResult", + "<", + "SearchResponseBody", + "<{}, T>, Error>" ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorProps.secrets", - "type": "Uncategorized", + "id": "def-common.useGetAlertsGroupAggregationsQuery.$1", + "type": "Object", "tags": [], - "label": "secrets", + "label": "{\n http,\n toasts,\n enabled = true,\n params,\n}", "description": [], "signature": [ - "Secrets" + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseGetAlertsGroupAggregationsQueryProps", + "text": "UseGetAlertsGroupAggregationsQueryProps" + } ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", "deprecated": false, - "trackAdoption": false - }, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.useHealthCheck", + "type": "Function", + "tags": [], + "label": "useHealthCheck", + "description": [], + "signature": [ + "(props: ", { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorProps.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseHealthCheckProps", + "text": "UseHealthCheckProps" }, + ") => { isLoading: boolean; isInitialLoading: boolean; error: \"alertsError\" | \"encryptionError\" | \"apiKeysDisabledError\" | \"apiKeysAndEncryptionError\" | null; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorProps.actionTypeId", - "type": "string", + "id": "def-common.useHealthCheck.$1", + "type": "Object", "tags": [], - "label": "actionTypeId", + "label": "props", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseHealthCheckProps", + "text": "UseHealthCheckProps" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", "deprecated": false, - "trackAdoption": false - }, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.useLoadAlertingFrameworkHealth", + "type": "Function", + "tags": [], + "label": "useLoadAlertingFrameworkHealth", + "description": [], + "signature": [ + "(props: ", { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorProps.name", - "type": "string", - "tags": [], - "label": "name", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseLoadAlertingFrameworkHealthProps", + "text": "UseLoadAlertingFrameworkHealthProps" }, + ") => { data: ", { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorProps.referencedByCount", - "type": "number", - "tags": [], - "label": "referencedByCount", - "description": [], - "signature": [ - "number | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.AlertingFrameworkHealth", + "text": "AlertingFrameworkHealth" }, + " | undefined; isLoading: boolean; isInitialLoading: boolean; isSuccess: boolean; isError: boolean; error: unknown; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_alerting_framework_health.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorProps.config", - "type": "Uncategorized", + "id": "def-common.useLoadAlertingFrameworkHealth.$1", + "type": "Object", "tags": [], - "label": "config", + "label": "props", "description": [], "signature": [ - "Config" + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseLoadAlertingFrameworkHealthProps", + "text": "UseLoadAlertingFrameworkHealthProps" + } ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_alerting_framework_health.ts", "deprecated": false, - "trackAdoption": false - }, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.useLoadRuleTypesQuery", + "type": "Function", + "tags": [], + "label": "useLoadRuleTypesQuery", + "description": [], + "signature": [ + "({ http, toasts, filteredRuleTypes, registeredRuleTypes, enabled, }: ", { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorProps.isPreconfigured", - "type": "boolean", - "tags": [], - "label": "isPreconfigured", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseRuleTypesProps", + "text": "UseRuleTypesProps" }, + ") => { ruleTypesState: { isInitialLoad: boolean; isLoading: boolean; data: ", { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorProps.isDeprecated", - "type": "boolean", - "tags": [], - "label": "isDeprecated", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.RuleTypeIndexWithDescriptions", + "text": "RuleTypeIndexWithDescriptions" }, + "; error: Error | null; }; hasAnyAuthorizedRuleType: boolean; authorizedRuleTypes: ", { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorProps.isSystemAction", - "type": "boolean", - "tags": [], - "label": "isSystemAction", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.RuleTypeWithDescription", + "text": "RuleTypeWithDescription" }, + "[]; authorizedToReadAnyRules: boolean; authorizedToCreateAnyRules: boolean; isSuccess: boolean; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionConnectorProps.isMissingSecrets", - "type": "CompoundType", + "id": "def-common.useLoadRuleTypesQuery.$1", + "type": "Object", "tags": [], - "label": "isMissingSecrets", + "label": "{\n http,\n toasts,\n filteredRuleTypes,\n registeredRuleTypes,\n enabled = true,\n}", "description": [], "signature": [ - "boolean | undefined" + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseRuleTypesProps", + "text": "UseRuleTypesProps" + } ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "isRequired": true } ], + "returnComment": [], "initialIsOpen": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps", - "type": "Interface", + "id": "def-common.useLoadUiConfig", + "type": "Function", "tags": [], - "label": "ActionParamsProps", + "label": "useLoadUiConfig", "description": [], "signature": [ + "(props: ", { "pluginId": "@kbn/alerts-ui-shared", "scope": "common", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.ActionParamsProps", - "text": "ActionParamsProps" + "section": "def-common.UseLoadUiConfigProps", + "text": "UseLoadUiConfigProps" }, - "" + ") => { data: ", + "UiConfig", + " | undefined; isLoading: boolean; isInitialLoading: boolean; isSuccess: boolean; isError: boolean; error: unknown; }" ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_config.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.actionParams", + "id": "def-common.useLoadUiConfig.$1", "type": "Object", "tags": [], - "label": "actionParams", + "label": "props", "description": [], "signature": [ - "{ [P in keyof TParams]?: TParams[P] | undefined; }" + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseLoadUiConfigProps", + "text": "UseLoadUiConfigProps" + } ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_config.ts", "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.index", - "type": "number", - "tags": [], - "label": "index", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.useLoadUiHealth", + "type": "Function", + "tags": [], + "label": "useLoadUiHealth", + "description": [], + "signature": [ + "(props: ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseLoadUiHealthProps", + "text": "UseLoadUiHealthProps" }, + ") => { data: ", + "UiHealthCheck", + " | undefined; isLoading: boolean; isInitialLoading: boolean; isSuccess: boolean; isError: boolean; error: unknown; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_health.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.editAction", - "type": "Function", + "id": "def-common.useLoadUiHealth.$1", + "type": "Object", "tags": [], - "label": "editAction", + "label": "props", "description": [], "signature": [ - "(key: string, value: ", { - "pluginId": "@kbn/core-saved-objects-common", + "pluginId": "@kbn/alerts-ui-shared", "scope": "common", - "docId": "kibKbnCoreSavedObjectsCommonPluginApi", - "section": "def-common.SavedObjectAttribute", - "text": "SavedObjectAttribute" - }, - ", index: number) => void" + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseLoadUiHealthProps", + "text": "UseLoadUiHealthProps" + } ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_health.ts", "deprecated": false, "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.editAction.$1", - "type": "string", - "tags": [], - "label": "key", - "description": [], - "signature": [ - "string" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.editAction.$2", - "type": "CompoundType", - "tags": [], - "label": "value", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-saved-objects-common", - "scope": "common", - "docId": "kibKbnCoreSavedObjectsCommonPluginApi", - "section": "def-common.SavedObjectAttribute", - "text": "SavedObjectAttribute" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.editAction.$3", - "type": "number", - "tags": [], - "label": "index", - "description": [], - "signature": [ - "number" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.useResolveRule", + "type": "Function", + "tags": [], + "label": "useResolveRule", + "description": [], + "signature": [ + "(props: ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseResolveProps", + "text": "UseResolveProps" + }, + ") => { data: ", + "RuleFormData", + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" }, + "> | null | undefined; isLoading: boolean; isInitialLoading: boolean; isSuccess: boolean; isError: boolean; error: unknown; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.errors", + "id": "def-common.useResolveRule.$1", "type": "Object", "tags": [], - "label": "errors", + "label": "props", "description": [], "signature": [ { "pluginId": "@kbn/alerts-ui-shared", "scope": "common", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.RuleFormParamsErrors", - "text": "RuleFormParamsErrors" + "section": "def-common.UseResolveProps", + "text": "UseResolveProps" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.useRuleAADFields", + "type": "Function", + "tags": [], + "label": "useRuleAADFields", + "description": [], + "signature": [ + "(props: ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseRuleAADFieldsProps", + "text": "UseRuleAADFieldsProps" }, + ") => ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseRuleAADFieldsResult", + "text": "UseRuleAADFieldsResult" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.ruleTypeId", - "type": "string", + "id": "def-common.useRuleAADFields.$1", + "type": "Object", "tags": [], - "label": "ruleTypeId", + "label": "props", "description": [], "signature": [ - "string | undefined" + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseRuleAADFieldsProps", + "text": "UseRuleAADFieldsProps" + } ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.useUpdateRule", + "type": "Function", + "tags": [], + "label": "useUpdateRule", + "description": [], + "signature": [ + "(props: ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseUpdateRuleProps", + "text": "UseUpdateRuleProps" + }, + ") => ", + "UseMutationResult", + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.Rule", + "text": "Rule" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">, ", + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.IHttpFetchError", + "text": "IHttpFetchError" + }, + "<{ message: string; }>, { id: string; formData: ", + "UpdateRuleBody", + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" }, + ">; }, unknown>" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.messageVariables", - "type": "Array", + "id": "def-common.useUpdateRule.$1", + "type": "Object", "tags": [], - "label": "messageVariables", + "label": "props", "description": [], "signature": [ { - "pluginId": "@kbn/alerting-types", + "pluginId": "@kbn/alerts-ui-shared", "scope": "common", - "docId": "kibKbnAlertingTypesPluginApi", - "section": "def-common.ActionVariable", - "text": "ActionVariable" - }, - "[] | undefined" + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.UseUpdateRuleProps", + "text": "UseUpdateRuleProps" + } ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.defaultMessage", - "type": "string", - "tags": [], - "label": "defaultMessage", + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.ActionConnectorFieldsProps", + "type": "Interface", + "tags": [], + "label": "ActionConnectorFieldsProps", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.ActionConnectorFieldsProps.readOnly", + "type": "boolean", + "tags": [], + "label": "readOnly", "description": [], - "signature": [ - "string | undefined" - ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.useDefaultMessage", - "type": "CompoundType", + "id": "def-common.ActionConnectorFieldsProps.isEdit", + "type": "boolean", "tags": [], - "label": "useDefaultMessage", + "label": "isEdit", "description": [], - "signature": [ - "boolean | undefined" - ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.actionConnector", - "type": "CompoundType", + "id": "def-common.ActionConnectorFieldsProps.registerPreSubmitValidator", + "type": "Function", "tags": [], - "label": "actionConnector", + "label": "registerPreSubmitValidator", "description": [], "signature": [ + "(validator: ", { "pluginId": "@kbn/alerts-ui-shared", "scope": "common", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.ActionConnector", - "text": "ActionConnector" + "section": "def-common.ConnectorValidationFunc", + "text": "ConnectorValidationFunc" }, - ", Record> | undefined" + ") => void" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.ActionConnectorFieldsProps.registerPreSubmitValidator.$1", + "type": "Function", + "tags": [], + "label": "validator", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.ConnectorValidationFunc", + "text": "ConnectorValidationFunc" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.ActionConnectorProps", + "type": "Interface", + "tags": [], + "label": "ActionConnectorProps", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.ActionConnectorProps", + "text": "ActionConnectorProps" }, + "" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.isLoading", - "type": "CompoundType", + "id": "def-common.ActionConnectorProps.secrets", + "type": "Uncategorized", "tags": [], - "label": "isLoading", + "label": "secrets", "description": [], "signature": [ - "boolean | undefined" + "Secrets" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, @@ -1120,62 +1114,46 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.isDisabled", - "type": "CompoundType", + "id": "def-common.ActionConnectorProps.id", + "type": "string", "tags": [], - "label": "isDisabled", + "label": "id", "description": [], - "signature": [ - "boolean | undefined" - ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.selectedActionGroupId", + "id": "def-common.ActionConnectorProps.actionTypeId", "type": "string", "tags": [], - "label": "selectedActionGroupId", + "label": "actionTypeId", "description": [], - "signature": [ - "string | undefined" - ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.showEmailSubjectAndMessage", - "type": "CompoundType", + "id": "def-common.ActionConnectorProps.name", + "type": "string", "tags": [], - "label": "showEmailSubjectAndMessage", + "label": "name", "description": [], - "signature": [ - "boolean | undefined" - ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.executionMode", - "type": "CompoundType", + "id": "def-common.ActionConnectorProps.referencedByCount", + "type": "number", "tags": [], - "label": "executionMode", + "label": "referencedByCount", "description": [], "signature": [ - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "common", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.ActionConnectorMode", - "text": "ActionConnectorMode" - }, - " | undefined" + "number | undefined" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, @@ -1183,70 +1161,35 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.onBlur", - "type": "Function", + "id": "def-common.ActionConnectorProps.config", + "type": "Uncategorized", "tags": [], - "label": "onBlur", + "label": "config", "description": [], "signature": [ - "((field?: string | undefined) => void) | undefined" + "Config" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.onBlur.$1", - "type": "string", - "tags": [], - "label": "field", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [] + "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionParamsProps.producerId", - "type": "string", + "id": "def-common.ActionConnectorProps.isPreconfigured", + "type": "boolean", "tags": [], - "label": "producerId", + "label": "isPreconfigured", "description": [], - "signature": [ - "string | undefined" - ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionReadOnlyElementProps", - "type": "Interface", - "tags": [], - "label": "ActionReadOnlyElementProps", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionReadOnlyElementProps.connectorId", - "type": "string", + "id": "def-common.ActionConnectorProps.isDeprecated", + "type": "boolean", "tags": [], - "label": "connectorId", + "label": "isDeprecated", "description": [], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, @@ -1254,11 +1197,25 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionReadOnlyElementProps.connectorName", - "type": "string", + "id": "def-common.ActionConnectorProps.isSystemAction", + "type": "boolean", "tags": [], - "label": "connectorName", + "label": "isSystemAction", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.ActionConnectorProps.isMissingSecrets", + "type": "CompoundType", + "tags": [], + "label": "isMissingSecrets", "description": [], + "signature": [ + "boolean | undefined" + ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false @@ -1268,20 +1225,20 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel", + "id": "def-common.ActionParamsProps", "type": "Interface", "tags": [], - "label": "ActionTypeModel", + "label": "ActionParamsProps", "description": [], "signature": [ { "pluginId": "@kbn/alerts-ui-shared", "scope": "common", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.ActionTypeModel", - "text": "ActionTypeModel" + "section": "def-common.ActionParamsProps", + "text": "ActionParamsProps" }, - "" + "" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, @@ -1289,71 +1246,46 @@ "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.id", - "type": "string", + "id": "def-common.ActionParamsProps.actionParams", + "type": "Object", "tags": [], - "label": "id", + "label": "actionParams", "description": [], + "signature": [ + "{ [P in keyof TParams]?: TParams[P] | undefined; }" + ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.iconClass", - "type": "CompoundType", + "id": "def-common.ActionParamsProps.index", + "type": "number", "tags": [], - "label": "iconClass", + "label": "index", "description": [], - "signature": [ - "string | React.ComponentType<{}>" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.selectMessage", - "type": "string", - "tags": [], - "label": "selectMessage", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.actionTypeTitle", - "type": "string", - "tags": [], - "label": "actionTypeTitle", - "description": [], - "signature": [ - "string | undefined" - ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.validateParams", + "id": "def-common.ActionParamsProps.editAction", "type": "Function", "tags": [], - "label": "validateParams", + "label": "editAction", "description": [], "signature": [ - "(actionParams: ActionParams) => Promise<", + "(key: string, value: ", { - "pluginId": "@kbn/alerts-ui-shared", + "pluginId": "@kbn/core-saved-objects-common", "scope": "common", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.GenericValidationResult", - "text": "GenericValidationResult" + "docId": "kibKbnCoreSavedObjectsCommonPluginApi", + "section": "def-common.SavedObjectAttribute", + "text": "SavedObjectAttribute" }, - ">" + ", index: number) => void" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, @@ -1361,13 +1293,49 @@ "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.validateParams.$1", - "type": "Uncategorized", + "id": "def-common.ActionParamsProps.editAction.$1", + "type": "string", "tags": [], - "label": "actionParams", + "label": "key", "description": [], "signature": [ - "ActionParams" + "string" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.ActionParamsProps.editAction.$2", + "type": "CompoundType", + "tags": [], + "label": "value", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-saved-objects-common", + "scope": "common", + "docId": "kibKbnCoreSavedObjectsCommonPluginApi", + "section": "def-common.SavedObjectAttribute", + "text": "SavedObjectAttribute" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.ActionParamsProps.editAction.$3", + "type": "number", + "tags": [], + "label": "index", + "description": [], + "signature": [ + "number" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, @@ -1379,21 +1347,19 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.actionConnectorFields", - "type": "CompoundType", + "id": "def-common.ActionParamsProps.errors", + "type": "Object", "tags": [], - "label": "actionConnectorFields", + "label": "errors", "description": [], "signature": [ - "React.LazyExoticComponent> | null" + "section": "def-common.RuleFormParamsErrors", + "text": "RuleFormParamsErrors" + } ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, @@ -1401,84 +1367,34 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.actionParamsFields", - "type": "Function", + "id": "def-common.ActionParamsProps.ruleTypeId", + "type": "string", "tags": [], - "label": "actionParamsFields", + "label": "ruleTypeId", "description": [], "signature": [ - "React.ExoticComponent<(", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "common", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.ActionParamsProps", - "text": "ActionParamsProps" - }, - " & React.RefAttributes, any, any>>) | (", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "common", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.ActionParamsProps", - "text": "ActionParamsProps" - }, - " & { children?: React.ReactNode; })> & { readonly _result: React.ComponentType<", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "common", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.ActionParamsProps", - "text": "ActionParamsProps" - }, - ">; }" + "string | undefined" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.actionParamsFields.$1", - "type": "Uncategorized", - "tags": [], - "label": "props", - "description": [], - "signature": [ - "P" - ], - "path": "node_modules/@types/react/index.d.ts", - "deprecated": false, - "trackAdoption": false - } - ] + "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.actionReadOnlyExtraComponent", - "type": "Function", + "id": "def-common.ActionParamsProps.messageVariables", + "type": "Array", "tags": [], - "label": "actionReadOnlyExtraComponent", + "label": "messageVariables", "description": [], "signature": [ - "React.LazyExoticComponent> | undefined" + "[] | undefined" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, @@ -1486,14 +1402,13 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.defaultActionParams", - "type": "Object", + "id": "def-common.ActionParamsProps.defaultMessage", + "type": "string", "tags": [], - "label": "defaultActionParams", + "label": "defaultMessage", "description": [], "signature": [ - "RecursivePartial", - " | undefined" + "string | undefined" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, @@ -1501,14 +1416,13 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.defaultRecoveredActionParams", - "type": "Object", + "id": "def-common.ActionParamsProps.useDefaultMessage", + "type": "CompoundType", "tags": [], - "label": "defaultRecoveredActionParams", + "label": "useDefaultMessage", "description": [], "signature": [ - "RecursivePartial", - " | undefined" + "boolean | undefined" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, @@ -1516,20 +1430,20 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.customConnectorSelectItem", - "type": "Object", + "id": "def-common.ActionParamsProps.actionConnector", + "type": "CompoundType", "tags": [], - "label": "customConnectorSelectItem", + "label": "actionConnector", "description": [], "signature": [ { "pluginId": "@kbn/alerts-ui-shared", "scope": "common", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.CustomConnectorSelectionItem", - "text": "CustomConnectorSelectionItem" + "section": "def-common.ActionConnector", + "text": "ActionConnector" }, - " | undefined" + ", Record> | undefined" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, @@ -1537,10 +1451,10 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.isExperimental", + "id": "def-common.ActionParamsProps.isLoading", "type": "CompoundType", "tags": [], - "label": "isExperimental", + "label": "isLoading", "description": [], "signature": [ "boolean | undefined" @@ -1551,13 +1465,13 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.subtype", - "type": "Array", + "id": "def-common.ActionParamsProps.isDisabled", + "type": "CompoundType", "tags": [], - "label": "subtype", + "label": "isDisabled", "description": [], "signature": [ - "{ id: string; name: string; }[] | undefined" + "boolean | undefined" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, @@ -1565,42 +1479,24 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.convertParamsBetweenGroups", - "type": "Function", + "id": "def-common.ActionParamsProps.selectedActionGroupId", + "type": "string", "tags": [], - "label": "convertParamsBetweenGroups", + "label": "selectedActionGroupId", "description": [], "signature": [ - "((params: ActionParams) => {} | ActionParams) | undefined" + "string | undefined" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.convertParamsBetweenGroups.$1", - "type": "Uncategorized", - "tags": [], - "label": "params", - "description": [], - "signature": [ - "ActionParams" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] + "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.hideInUi", + "id": "def-common.ActionParamsProps.showEmailSubjectAndMessage", "type": "CompoundType", "tags": [], - "label": "hideInUi", + "label": "showEmailSubjectAndMessage", "description": [], "signature": [ "boolean | undefined" @@ -1611,13 +1507,20 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.modalWidth", - "type": "number", + "id": "def-common.ActionParamsProps.executionMode", + "type": "CompoundType", "tags": [], - "label": "modalWidth", + "label": "executionMode", "description": [], "signature": [ - "number | undefined" + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.ActionConnectorMode", + "text": "ActionConnectorMode" + }, + " | undefined" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, @@ -1625,68 +1528,47 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.ActionTypeModel.isSystemActionType", - "type": "CompoundType", + "id": "def-common.ActionParamsProps.onBlur", + "type": "Function", "tags": [], - "label": "isSystemActionType", + "label": "onBlur", "description": [], "signature": [ - "boolean | undefined" + "((field?: string | undefined) => void) | undefined" ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertFieldsTableProps", - "type": "Interface", - "tags": [], - "label": "AlertFieldsTableProps", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alert_fields_table/index.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertFieldsTableProps.alert", - "type": "CompoundType", - "tags": [], - "label": "alert", - "description": [ - "\nThe raw alert object" - ], - "signature": [ + "trackAdoption": false, + "children": [ { - "pluginId": "@kbn/alerting-types", - "scope": "common", - "docId": "kibKbnAlertingTypesPluginApi", - "section": "def-common.BasicFields", - "text": "BasicFields" - }, - " & { \"@timestamp\"?: string[] | undefined; \"event.action\"?: string[] | undefined; tags?: string[] | undefined; kibana?: string[] | undefined; \"kibana.alert.rule.rule_type_id\"?: string[] | undefined; \"kibana.alert.rule.consumer\"?: string[] | undefined; \"kibana.alert.rule.execution.uuid\"?: string[] | undefined; \"kibana.alert.instance.id\"?: string[] | undefined; \"kibana.alert.rule.category\"?: string[] | undefined; \"kibana.alert.rule.name\"?: string[] | undefined; \"kibana.alert.rule.producer\"?: string[] | undefined; \"kibana.alert.rule.uuid\"?: string[] | undefined; \"kibana.alert.status\"?: string[] | undefined; \"kibana.alert.uuid\"?: string[] | undefined; \"kibana.space_ids\"?: string[] | undefined; \"event.kind\"?: string[] | undefined; \"kibana.alert.action_group\"?: string[] | undefined; \"kibana.alert.case_ids\"?: string[] | undefined; \"kibana.alert.duration.us\"?: string[] | undefined; \"kibana.alert.end\"?: string[] | undefined; \"kibana.alert.flapping\"?: string[] | undefined; \"kibana.alert.maintenance_window_ids\"?: string[] | undefined; \"kibana.alert.reason\"?: string[] | undefined; \"kibana.alert.rule.parameters\"?: string[] | undefined; \"kibana.alert.rule.tags\"?: string[] | undefined; \"kibana.alert.start\"?: string[] | undefined; \"kibana.alert.time_range\"?: string[] | undefined; \"kibana.alert.workflow_assignee_ids\"?: string[] | undefined; \"kibana.alert.workflow_status\"?: string[] | undefined; \"kibana.alert.workflow_tags\"?: string[] | undefined; \"kibana.version\"?: string[] | undefined; \"kibana.alert.context\"?: string[] | undefined; \"kibana.alert.evaluation.threshold\"?: string[] | undefined; \"kibana.alert.evaluation.value\"?: string[] | undefined; \"kibana.alert.evaluation.values\"?: string[] | undefined; \"kibana.alert.group\"?: string[] | undefined; \"ecs.version\"?: string[] | undefined; \"kibana.alert.risk_score\"?: string[] | undefined; \"kibana.alert.rule.author\"?: string[] | undefined; \"kibana.alert.rule.created_at\"?: string[] | undefined; \"kibana.alert.rule.created_by\"?: string[] | undefined; \"kibana.alert.rule.description\"?: string[] | undefined; \"kibana.alert.rule.enabled\"?: string[] | undefined; \"kibana.alert.rule.from\"?: string[] | undefined; \"kibana.alert.rule.interval\"?: string[] | undefined; \"kibana.alert.rule.license\"?: string[] | undefined; \"kibana.alert.rule.note\"?: string[] | undefined; \"kibana.alert.rule.references\"?: string[] | undefined; \"kibana.alert.rule.rule_id\"?: string[] | undefined; \"kibana.alert.rule.rule_name_override\"?: string[] | undefined; \"kibana.alert.rule.to\"?: string[] | undefined; \"kibana.alert.rule.type\"?: string[] | undefined; \"kibana.alert.rule.updated_at\"?: string[] | undefined; \"kibana.alert.rule.updated_by\"?: string[] | undefined; \"kibana.alert.rule.version\"?: string[] | undefined; \"kibana.alert.severity\"?: string[] | undefined; \"kibana.alert.suppression.docs_count\"?: string[] | undefined; \"kibana.alert.suppression.end\"?: string[] | undefined; \"kibana.alert.suppression.start\"?: string[] | undefined; \"kibana.alert.suppression.terms.field\"?: string[] | undefined; \"kibana.alert.suppression.terms.value\"?: string[] | undefined; \"kibana.alert.system_status\"?: string[] | undefined; \"kibana.alert.workflow_reason\"?: string[] | undefined; \"kibana.alert.workflow_user\"?: string[] | undefined; \"event.module\"?: string[] | undefined; \"kibana.alert.rule.threat.framework\"?: string[] | undefined; \"kibana.alert.rule.threat.tactic.id\"?: string[] | undefined; \"kibana.alert.rule.threat.tactic.name\"?: string[] | undefined; \"kibana.alert.rule.threat.tactic.reference\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.id\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.name\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.reference\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.subtechnique.id\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.subtechnique.name\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.subtechnique.reference\"?: string[] | undefined; \"kibana.alert.building_block_type\"?: string[] | undefined; \"kibana.alert\"?: string[] | undefined; \"kibana.alert.group.field\"?: string[] | undefined; \"kibana.alert.group.value\"?: string[] | undefined; \"kibana.alert.rule\"?: string[] | undefined; \"kibana.alert.rule.exceptions_list\"?: string[] | undefined; \"kibana.alert.rule.namespace\"?: string[] | undefined; \"kibana.alert.suppression.terms\"?: string[] | undefined; } & { [x: string]: unknown[]; }" + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.ActionParamsProps.onBlur.$1", + "type": "string", + "tags": [], + "label": "field", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } ], - "path": "packages/kbn-alerts-ui-shared/src/alert_fields_table/index.tsx", - "deprecated": false, - "trackAdoption": false + "returnComment": [] }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertFieldsTableProps.fields", - "type": "Array", + "id": "def-common.ActionParamsProps.producerId", + "type": "string", "tags": [], - "label": "fields", - "description": [ - "\nA list of alert field keys to be shown in the table.\nWhen not defined, all the fields are shown." - ], + "label": "producerId", + "description": [], "signature": [ - "(string | number)[] | undefined" + "string | undefined" ], - "path": "packages/kbn-alerts-ui-shared/src/alert_fields_table/index.tsx", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false } @@ -1695,40 +1577,34 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertLifecycleStatusBadgeProps", + "id": "def-common.ActionReadOnlyElementProps", "type": "Interface", "tags": [], - "label": "AlertLifecycleStatusBadgeProps", + "label": "ActionReadOnlyElementProps", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alert_lifecycle_status_badge/index.tsx", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertLifecycleStatusBadgeProps.alertStatus", - "type": "CompoundType", + "id": "def-common.ActionReadOnlyElementProps.connectorId", + "type": "string", "tags": [], - "label": "alertStatus", + "label": "connectorId", "description": [], - "signature": [ - "\"recovered\" | \"active\" | \"untracked\"" - ], - "path": "packages/kbn-alerts-ui-shared/src/alert_lifecycle_status_badge/index.tsx", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertLifecycleStatusBadgeProps.flapping", - "type": "CompoundType", + "id": "def-common.ActionReadOnlyElementProps.connectorName", + "type": "string", "tags": [], - "label": "flapping", + "label": "connectorName", "description": [], - "signature": [ - "string | boolean | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/alert_lifecycle_status_badge/index.tsx", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false } @@ -1737,364 +1613,326 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps", + "id": "def-common.ActionTypeModel", "type": "Interface", "tags": [], - "label": "AlertsSearchBarProps", + "label": "ActionTypeModel", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.ActionTypeModel", + "text": "ActionTypeModel" + }, + "" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.appName", + "id": "def-common.ActionTypeModel.id", "type": "string", "tags": [], - "label": "appName", + "label": "id", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.disableQueryLanguageSwitcher", + "id": "def-common.ActionTypeModel.iconClass", "type": "CompoundType", "tags": [], - "label": "disableQueryLanguageSwitcher", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.featureIds", - "type": "Array", - "tags": [], - "label": "featureIds", - "description": [], - "signature": [ - { - "pluginId": "@kbn/rule-data-utils", - "scope": "common", - "docId": "kibKbnRuleDataUtilsPluginApi", - "section": "def-common.AlertConsumers", - "text": "AlertConsumers" - }, - "[]" - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.rangeFrom", - "type": "string", - "tags": [], - "label": "rangeFrom", + "label": "iconClass", "description": [], "signature": [ - "string | undefined" + "string | React.ComponentType<{}>" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.rangeTo", + "id": "def-common.ActionTypeModel.selectMessage", "type": "string", "tags": [], - "label": "rangeTo", + "label": "selectMessage", "description": [], - "signature": [ - "string | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.query", + "id": "def-common.ActionTypeModel.actionTypeTitle", "type": "string", "tags": [], - "label": "query", + "label": "actionTypeTitle", "description": [], "signature": [ "string | undefined" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.filters", - "type": "Array", + "id": "def-common.ActionTypeModel.validateParams", + "type": "Function", "tags": [], - "label": "filters", + "label": "validateParams", "description": [], "signature": [ + "(actionParams: ActionParams) => Promise<", { - "pluginId": "@kbn/es-query", + "pluginId": "@kbn/alerts-ui-shared", "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.GenericValidationResult", + "text": "GenericValidationResult" }, - "[] | undefined" + ">" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.ActionTypeModel.validateParams.$1", + "type": "Uncategorized", + "tags": [], + "label": "actionParams", + "description": [], + "signature": [ + "ActionParams" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.showFilterBar", + "id": "def-common.ActionTypeModel.actionConnectorFields", "type": "CompoundType", "tags": [], - "label": "showFilterBar", + "label": "actionConnectorFields", "description": [], "signature": [ - "boolean | undefined" + "React.LazyExoticComponent> | null" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.showDatePicker", - "type": "CompoundType", + "id": "def-common.ActionTypeModel.actionParamsFields", + "type": "Function", "tags": [], - "label": "showDatePicker", + "label": "actionParamsFields", "description": [], "signature": [ - "boolean | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "React.ExoticComponent<(", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.ActionParamsProps", + "text": "ActionParamsProps" + }, + " & React.RefAttributes, any, any>>) | (", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.ActionParamsProps", + "text": "ActionParamsProps" + }, + " & { children?: React.ReactNode; })> & { readonly _result: React.ComponentType<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.ActionParamsProps", + "text": "ActionParamsProps" + }, + ">; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.ActionTypeModel.actionParamsFields.$1", + "type": "Uncategorized", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "P" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false + } + ] }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.showSubmitButton", - "type": "CompoundType", + "id": "def-common.ActionTypeModel.actionReadOnlyExtraComponent", + "type": "Function", "tags": [], - "label": "showSubmitButton", + "label": "actionReadOnlyExtraComponent", "description": [], "signature": [ - "boolean | undefined" + "React.LazyExoticComponent> | undefined" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.placeholder", - "type": "string", + "id": "def-common.ActionTypeModel.defaultActionParams", + "type": "Object", "tags": [], - "label": "placeholder", + "label": "defaultActionParams", "description": [], "signature": [ - "string | undefined" + "RecursivePartial", + " | undefined" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.submitOnBlur", - "type": "CompoundType", + "id": "def-common.ActionTypeModel.defaultRecoveredActionParams", + "type": "Object", "tags": [], - "label": "submitOnBlur", + "label": "defaultRecoveredActionParams", "description": [], "signature": [ - "boolean | undefined" + "RecursivePartial", + " | undefined" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.ruleTypeId", - "type": "string", + "id": "def-common.ActionTypeModel.customConnectorSelectItem", + "type": "Object", "tags": [], - "label": "ruleTypeId", + "label": "customConnectorSelectItem", "description": [], "signature": [ - "string | undefined" + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.CustomConnectorSelectionItem", + "text": "CustomConnectorSelectionItem" + }, + " | undefined" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.onQueryChange", - "type": "Function", + "id": "def-common.ActionTypeModel.isExperimental", + "type": "CompoundType", "tags": [], - "label": "onQueryChange", + "label": "isExperimental", "description": [], "signature": [ - "((query: { dateRange: { from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }; query?: string | undefined; }) => void) | undefined" + "boolean | undefined" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.onQueryChange.$1", - "type": "Object", - "tags": [], - "label": "query", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.onQueryChange.$1.dateRange", - "type": "Object", - "tags": [], - "label": "dateRange", - "description": [], - "signature": [ - "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }" - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.onQueryChange.$1.query", - "type": "string", - "tags": [], - "label": "query", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [] + "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.onQuerySubmit", - "type": "Function", + "id": "def-common.ActionTypeModel.subtype", + "type": "Array", "tags": [], - "label": "onQuerySubmit", + "label": "subtype", "description": [], "signature": [ - "(query: { dateRange: { from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }; query?: string | undefined; }) => void" + "{ id: string; name: string; }[] | undefined" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.onQuerySubmit.$1", - "type": "Object", - "tags": [], - "label": "query", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.onQuerySubmit.$1.dateRange", - "type": "Object", - "tags": [], - "label": "dateRange", - "description": [], - "signature": [ - "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }" - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.onQuerySubmit.$1.query", - "type": "string", - "tags": [], - "label": "query", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [] + "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.onFiltersUpdated", + "id": "def-common.ActionTypeModel.convertParamsBetweenGroups", "type": "Function", "tags": [], - "label": "onFiltersUpdated", + "label": "convertParamsBetweenGroups", "description": [], "signature": [ - "((filters: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[]) => void) | undefined" + "((params: ActionParams) => {} | ActionParams) | undefined" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.onFiltersUpdated.$1", - "type": "Array", + "id": "def-common.ActionTypeModel.convertParamsBetweenGroups.$1", + "type": "Uncategorized", "tags": [], - "label": "filters", + "label": "params", "description": [], "signature": [ - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[]" + "ActionParams" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2104,39 +1942,175 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.http", - "type": "Object", + "id": "def-common.ActionTypeModel.hideInUi", + "type": "CompoundType", "tags": [], - "label": "http", + "label": "hideInUi", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.ActionTypeModel.modalWidth", + "type": "number", + "tags": [], + "label": "modalWidth", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.ActionTypeModel.isSystemActionType", + "type": "CompoundType", + "tags": [], + "label": "isSystemActionType", "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertFieldsTableProps", + "type": "Interface", + "tags": [], + "label": "AlertFieldsTableProps", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/alert_fields_table/index.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertFieldsTableProps.alert", + "type": "CompoundType", + "tags": [], + "label": "alert", + "description": [ + "\nThe raw alert object" + ], "signature": [ { - "pluginId": "@kbn/core-http-browser", + "pluginId": "@kbn/alerting-types", "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - } + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.BasicFields", + "text": "BasicFields" + }, + " & { \"@timestamp\"?: string[] | undefined; \"event.action\"?: string[] | undefined; tags?: string[] | undefined; kibana?: string[] | undefined; \"kibana.alert.rule.rule_type_id\"?: string[] | undefined; \"kibana.alert.rule.consumer\"?: string[] | undefined; \"kibana.alert.rule.execution.uuid\"?: string[] | undefined; \"kibana.alert.instance.id\"?: string[] | undefined; \"kibana.alert.rule.category\"?: string[] | undefined; \"kibana.alert.rule.name\"?: string[] | undefined; \"kibana.alert.rule.producer\"?: string[] | undefined; \"kibana.alert.rule.uuid\"?: string[] | undefined; \"kibana.alert.status\"?: string[] | undefined; \"kibana.alert.uuid\"?: string[] | undefined; \"kibana.space_ids\"?: string[] | undefined; \"event.kind\"?: string[] | undefined; \"kibana.alert.action_group\"?: string[] | undefined; \"kibana.alert.case_ids\"?: string[] | undefined; \"kibana.alert.duration.us\"?: string[] | undefined; \"kibana.alert.end\"?: string[] | undefined; \"kibana.alert.flapping\"?: string[] | undefined; \"kibana.alert.maintenance_window_ids\"?: string[] | undefined; \"kibana.alert.reason\"?: string[] | undefined; \"kibana.alert.rule.parameters\"?: string[] | undefined; \"kibana.alert.rule.tags\"?: string[] | undefined; \"kibana.alert.start\"?: string[] | undefined; \"kibana.alert.time_range\"?: string[] | undefined; \"kibana.alert.workflow_assignee_ids\"?: string[] | undefined; \"kibana.alert.workflow_status\"?: string[] | undefined; \"kibana.alert.workflow_tags\"?: string[] | undefined; \"kibana.version\"?: string[] | undefined; \"kibana.alert.context\"?: string[] | undefined; \"kibana.alert.evaluation.threshold\"?: string[] | undefined; \"kibana.alert.evaluation.value\"?: string[] | undefined; \"kibana.alert.evaluation.values\"?: string[] | undefined; \"kibana.alert.group\"?: string[] | undefined; \"ecs.version\"?: string[] | undefined; \"kibana.alert.risk_score\"?: string[] | undefined; \"kibana.alert.rule.author\"?: string[] | undefined; \"kibana.alert.rule.created_at\"?: string[] | undefined; \"kibana.alert.rule.created_by\"?: string[] | undefined; \"kibana.alert.rule.description\"?: string[] | undefined; \"kibana.alert.rule.enabled\"?: string[] | undefined; \"kibana.alert.rule.from\"?: string[] | undefined; \"kibana.alert.rule.interval\"?: string[] | undefined; \"kibana.alert.rule.license\"?: string[] | undefined; \"kibana.alert.rule.note\"?: string[] | undefined; \"kibana.alert.rule.references\"?: string[] | undefined; \"kibana.alert.rule.rule_id\"?: string[] | undefined; \"kibana.alert.rule.rule_name_override\"?: string[] | undefined; \"kibana.alert.rule.to\"?: string[] | undefined; \"kibana.alert.rule.type\"?: string[] | undefined; \"kibana.alert.rule.updated_at\"?: string[] | undefined; \"kibana.alert.rule.updated_by\"?: string[] | undefined; \"kibana.alert.rule.version\"?: string[] | undefined; \"kibana.alert.severity\"?: string[] | undefined; \"kibana.alert.suppression.docs_count\"?: string[] | undefined; \"kibana.alert.suppression.end\"?: string[] | undefined; \"kibana.alert.suppression.start\"?: string[] | undefined; \"kibana.alert.suppression.terms.field\"?: string[] | undefined; \"kibana.alert.suppression.terms.value\"?: string[] | undefined; \"kibana.alert.system_status\"?: string[] | undefined; \"kibana.alert.workflow_reason\"?: string[] | undefined; \"kibana.alert.workflow_user\"?: string[] | undefined; \"event.module\"?: string[] | undefined; \"kibana.alert.rule.threat.framework\"?: string[] | undefined; \"kibana.alert.rule.threat.tactic.id\"?: string[] | undefined; \"kibana.alert.rule.threat.tactic.name\"?: string[] | undefined; \"kibana.alert.rule.threat.tactic.reference\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.id\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.name\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.reference\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.subtechnique.id\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.subtechnique.name\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.subtechnique.reference\"?: string[] | undefined; \"kibana.alert.building_block_type\"?: string[] | undefined; \"kibana.alert\"?: string[] | undefined; \"kibana.alert.group.field\"?: string[] | undefined; \"kibana.alert.group.value\"?: string[] | undefined; \"kibana.alert.rule\"?: string[] | undefined; \"kibana.alert.rule.exceptions_list\"?: string[] | undefined; \"kibana.alert.rule.namespace\"?: string[] | undefined; \"kibana.alert.suppression.terms\"?: string[] | undefined; } & { [x: string]: unknown[]; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/alert_fields_table/index.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertFieldsTableProps.fields", + "type": "Array", + "tags": [], + "label": "fields", + "description": [ + "\nA list of alert field keys to be shown in the table.\nWhen not defined, all the fields are shown." + ], + "signature": [ + "(string | number)[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alert_fields_table/index.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertLifecycleStatusBadgeProps", + "type": "Interface", + "tags": [], + "label": "AlertLifecycleStatusBadgeProps", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/alert_lifecycle_status_badge/index.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertLifecycleStatusBadgeProps.alertStatus", + "type": "CompoundType", + "tags": [], + "label": "alertStatus", + "description": [], + "signature": [ + "\"recovered\" | \"active\" | \"untracked\"" + ], + "path": "packages/kbn-alerts-ui-shared/src/alert_lifecycle_status_badge/index.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertLifecycleStatusBadgeProps.flapping", + "type": "CompoundType", + "tags": [], + "label": "flapping", + "description": [], + "signature": [ + "string | boolean | undefined" ], + "path": "packages/kbn-alerts-ui-shared/src/alert_lifecycle_status_badge/index.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps", + "type": "Interface", + "tags": [], + "label": "AlertsSearchBarProps", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.appName", + "type": "string", + "tags": [], + "label": "appName", + "description": [], "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.toasts", - "type": "Object", + "id": "def-common.AlertsSearchBarProps.disableQueryLanguageSwitcher", + "type": "CompoundType", "tags": [], - "label": "toasts", + "label": "disableQueryLanguageSwitcher", "description": [], "signature": [ - { - "pluginId": "@kbn/core-notifications-browser", - "scope": "common", - "docId": "kibKbnCoreNotificationsBrowserPluginApi", - "section": "def-common.IToasts", - "text": "IToasts" - } + "boolean | undefined" ], "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", "deprecated": false, @@ -2144,93 +2118,464 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.unifiedSearchBar", - "type": "Function", + "id": "def-common.AlertsSearchBarProps.featureIds", + "type": "Array", "tags": [], - "label": "unifiedSearchBar", + "label": "featureIds", "description": [], "signature": [ - "(props: ", - { - "pluginId": "unifiedSearch", - "scope": "public", - "docId": "kibUnifiedSearchPluginApi", - "section": "def-public.StatefulSearchBarProps", - "text": "StatefulSearchBarProps" - }, - "<", { - "pluginId": "@kbn/es-query", + "pluginId": "@kbn/rule-data-utils", "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" + "docId": "kibKbnRuleDataUtilsPluginApi", + "section": "def-common.AlertConsumers", + "text": "AlertConsumers" }, - ">) => React.ReactElement>" + "[]" ], "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.unifiedSearchBar.$1", - "type": "CompoundType", - "tags": [], - "label": "props", - "description": [], - "signature": [ - "Omit<", - "SearchBarOwnProps", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - ">, \"showSaveQuery\"> & { appName: string; useDefaultBehaviors?: boolean | undefined; savedQueryId?: string | undefined; saveQueryMenuVisibility?: ", - "SavedQueryMenuVisibility", - " | undefined; onSavedQueryIdChange?: ((savedQueryId?: string | undefined) => void) | undefined; onFiltersUpdated?: ((filters: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[]) => void) | undefined; }" - ], - "path": "src/plugins/unified_search/public/types.ts", - "deprecated": false, - "trackAdoption": false - } - ] + "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.AlertsSearchBarProps.dataViewsService", - "type": "Object", + "id": "def-common.AlertsSearchBarProps.rangeFrom", + "type": "string", "tags": [], - "label": "dataViewsService", + "label": "rangeFrom", "description": [], "signature": [ - "{ create: (spec: ", - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" - }, - ", skipFetchFields?: boolean, displayErrors?: boolean) => Promise<", - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", + "string | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.rangeTo", + "type": "string", + "tags": [], + "label": "rangeTo", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.query", + "type": "string", + "tags": [], + "label": "query", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.filters", + "type": "Array", + "tags": [], + "label": "filters", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.showFilterBar", + "type": "CompoundType", + "tags": [], + "label": "showFilterBar", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.showDatePicker", + "type": "CompoundType", + "tags": [], + "label": "showDatePicker", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.showSubmitButton", + "type": "CompoundType", + "tags": [], + "label": "showSubmitButton", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.placeholder", + "type": "string", + "tags": [], + "label": "placeholder", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.submitOnBlur", + "type": "CompoundType", + "tags": [], + "label": "submitOnBlur", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.ruleTypeId", + "type": "string", + "tags": [], + "label": "ruleTypeId", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.onQueryChange", + "type": "Function", + "tags": [], + "label": "onQueryChange", + "description": [], + "signature": [ + "((query: { dateRange: { from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }; query?: string | undefined; }) => void) | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.onQueryChange.$1", + "type": "Object", + "tags": [], + "label": "query", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.onQueryChange.$1.dateRange", + "type": "Object", + "tags": [], + "label": "dateRange", + "description": [], + "signature": [ + "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.onQueryChange.$1.query", + "type": "string", + "tags": [], + "label": "query", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.onQuerySubmit", + "type": "Function", + "tags": [], + "label": "onQuerySubmit", + "description": [], + "signature": [ + "(query: { dateRange: { from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }; query?: string | undefined; }) => void" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.onQuerySubmit.$1", + "type": "Object", + "tags": [], + "label": "query", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.onQuerySubmit.$1.dateRange", + "type": "Object", + "tags": [], + "label": "dateRange", + "description": [], + "signature": [ + "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.onQuerySubmit.$1.query", + "type": "string", + "tags": [], + "label": "query", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.onFiltersUpdated", + "type": "Function", + "tags": [], + "label": "onFiltersUpdated", + "description": [], + "signature": [ + "((filters: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[]) => void) | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.onFiltersUpdated.$1", + "type": "Array", + "tags": [], + "label": "filters", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[]" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.toasts", + "type": "Object", + "tags": [], + "label": "toasts", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-notifications-browser", + "scope": "common", + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-common.IToasts", + "text": "IToasts" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.unifiedSearchBar", + "type": "Function", + "tags": [], + "label": "unifiedSearchBar", + "description": [], + "signature": [ + "(props: ", + { + "pluginId": "unifiedSearch", + "scope": "public", + "docId": "kibUnifiedSearchPluginApi", + "section": "def-public.StatefulSearchBarProps", + "text": "StatefulSearchBarProps" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + ">) => React.ReactElement>" + ], + "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.unifiedSearchBar.$1", + "type": "CompoundType", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "Omit<", + "SearchBarOwnProps", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + ">, \"showSaveQuery\"> & { appName: string; useDefaultBehaviors?: boolean | undefined; savedQueryId?: string | undefined; saveQueryMenuVisibility?: ", + "SavedQueryMenuVisibility", + " | undefined; onSavedQueryIdChange?: ((savedQueryId?: string | undefined) => void) | undefined; onFiltersUpdated?: ((filters: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[]) => void) | undefined; }" + ], + "path": "src/plugins/unified_search/public/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.AlertsSearchBarProps.dataViewsService", + "type": "Object", + "tags": [], + "label": "dataViewsService", + "description": [], + "signature": [ + "{ create: (spec: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" + }, + ", skipFetchFields?: boolean, displayErrors?: boolean) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", "text": "DataView" }, ">; get: (id: string, displayErrors?: boolean, refreshFields?: boolean) => Promise<", @@ -3128,15 +3473,62 @@ "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.GenericValidationResult.errors", - "type": "Object", + "id": "def-common.GenericValidationResult.errors", + "type": "Object", + "tags": [], + "label": "errors", + "description": [], + "signature": [ + "{ [P in Extract]: unknown; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.HealthStatus", + "type": "Interface", + "tags": [], + "label": "HealthStatus", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.HealthStatus.isRulesAvailable", + "type": "boolean", "tags": [], - "label": "errors", + "label": "isRulesAvailable", "description": [], - "signature": [ - "{ [P in Extract]: unknown; }" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.HealthStatus.isSufficientlySecure", + "type": "boolean", + "tags": [], + "label": "isSufficientlySecure", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.HealthStatus.hasPermanentEncryptionKey", + "type": "boolean", + "tags": [], + "label": "hasPermanentEncryptionKey", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", "deprecated": false, "trackAdoption": false } @@ -3947,7 +4339,7 @@ "tags": [], "label": "UseAlertDataViewProps", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_alert_data_view.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alert_data_view.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -3968,7 +4360,7 @@ }, "[]" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_alert_data_view.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alert_data_view.ts", "deprecated": false, "trackAdoption": false }, @@ -3988,7 +4380,7 @@ "text": "HttpSetup" } ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_alert_data_view.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alert_data_view.ts", "deprecated": false, "trackAdoption": false }, @@ -4234,91 +4626,625 @@ }, ">; createSavedObject: (dataView: ", { - "pluginId": "dataViews", + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.AbstractDataView", + "text": "AbstractDataView" + }, + ", overwrite?: boolean) => Promise; updateSavedObject: (indexPattern: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.AbstractDataView", + "text": "AbstractDataView" + }, + ", saveAttempts?: number, ignoreErrors?: boolean, displayErrors?: boolean) => Promise; defaultDataViewExists: () => Promise; getDefaultDataViewLazy: () => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewLazy", + "text": "DataViewLazy" + }, + " | null>; getDefaultDataView: (options?: { displayErrors?: boolean | undefined; refreshFields?: boolean | undefined; }) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | null>; toDataView: (dataViewLazy: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewLazy", + "text": "DataViewLazy" + }, + ") => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ">; toDataViewLazy: (dataView: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ") => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewLazy", + "text": "DataViewLazy" + }, + ">; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alert_data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseAlertDataViewProps.toasts", + "type": "Object", + "tags": [], + "label": "toasts", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-notifications-browser", + "scope": "common", + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-common.IToasts", + "text": "IToasts" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alert_data_view.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseAlertDataViewResult", + "type": "Interface", + "tags": [], + "label": "UseAlertDataViewResult", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alert_data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseAlertDataViewResult.dataViews", + "type": "Array", + "tags": [], + "label": "dataViews", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + "[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alert_data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseAlertDataViewResult.loading", + "type": "boolean", + "tags": [], + "label": "loading", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alert_data_view.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseCreateRuleProps", + "type": "Interface", + "tags": [], + "label": "UseCreateRuleProps", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseCreateRuleProps.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseCreateRuleProps.onSuccess", + "type": "Function", + "tags": [], + "label": "onSuccess", + "description": [], + "signature": [ + "((formData: ", + "CreateRuleBody", + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">) => void) | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseCreateRuleProps.onSuccess.$1", + "type": "Object", + "tags": [], + "label": "formData", + "description": [], + "signature": [ + "CreateRuleBody", + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseCreateRuleProps.onError", + "type": "Function", + "tags": [], + "label": "onError", + "description": [], + "signature": [ + "((error: ", + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.IHttpFetchError", + "text": "IHttpFetchError" + }, + "<{ message: string; }>) => void) | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseCreateRuleProps.onError.$1", + "type": "Object", + "tags": [], + "label": "error", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.IHttpFetchError", + "text": "IHttpFetchError" + }, + "<{ message: string; }>" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseFindAlertsQueryProps", + "type": "Interface", + "tags": [], + "label": "UseFindAlertsQueryProps", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_find_alerts_query.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseFindAlertsQueryProps.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.AbstractDataView", - "text": "AbstractDataView" - }, - ", overwrite?: boolean) => Promise; updateSavedObject: (indexPattern: ", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_find_alerts_query.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseFindAlertsQueryProps.toasts", + "type": "Object", + "tags": [], + "label": "toasts", + "description": [], + "signature": [ { - "pluginId": "dataViews", + "pluginId": "@kbn/core-notifications-browser", "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.AbstractDataView", - "text": "AbstractDataView" - }, - ", saveAttempts?: number, ignoreErrors?: boolean, displayErrors?: boolean) => Promise; defaultDataViewExists: () => Promise; getDefaultDataViewLazy: () => Promise<", + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-common.IToasts", + "text": "IToasts" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_find_alerts_query.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseFindAlertsQueryProps.enabled", + "type": "CompoundType", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_find_alerts_query.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseFindAlertsQueryProps.params", + "type": "CompoundType", + "tags": [], + "label": "params", + "description": [], + "signature": [ + "{ trackTotalHits?: boolean | undefined; } & ", + "SearchRequest", + " & { feature_ids?: string[] | undefined; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_find_alerts_query.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseGetAlertsGroupAggregationsQueryProps", + "type": "Interface", + "tags": [], + "label": "UseGetAlertsGroupAggregationsQueryProps", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseGetAlertsGroupAggregationsQueryProps.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ { - "pluginId": "dataViews", + "pluginId": "@kbn/core-http-browser", "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewLazy", - "text": "DataViewLazy" - }, - " | null>; getDefaultDataView: (options?: { displayErrors?: boolean | undefined; refreshFields?: boolean | undefined; }) => Promise<", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseGetAlertsGroupAggregationsQueryProps.toasts", + "type": "Object", + "tags": [], + "label": "toasts", + "description": [], + "signature": [ { - "pluginId": "dataViews", + "pluginId": "@kbn/core-notifications-browser", "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - }, - " | null>; toDataView: (dataViewLazy: ", + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-common.IToasts", + "text": "IToasts" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseGetAlertsGroupAggregationsQueryProps.enabled", + "type": "CompoundType", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseGetAlertsGroupAggregationsQueryProps.params", + "type": "Object", + "tags": [], + "label": "params", + "description": [], + "signature": [ + "{ featureIds: ", { - "pluginId": "dataViews", + "pluginId": "@kbn/rule-data-utils", "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewLazy", - "text": "DataViewLazy" + "docId": "kibKbnRuleDataUtilsPluginApi", + "section": "def-common.AlertConsumers", + "text": "AlertConsumers" }, - ") => Promise<", + "[]; groupByField: string; aggregations?: Record | undefined; filters?: ", + "QueryDslQueryContainer", + "[] | undefined; sort?: ", + "SortCombinations", + "[] | undefined; pageIndex?: number | undefined; pageSize?: number | undefined; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseHealthCheckProps", + "type": "Interface", + "tags": [], + "label": "UseHealthCheckProps", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseHealthCheckProps.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ { - "pluginId": "dataViews", + "pluginId": "@kbn/core-http-browser", "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - }, - ">; toDataViewLazy: (dataView: ", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseHealthCheckResult", + "type": "Interface", + "tags": [], + "label": "UseHealthCheckResult", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseHealthCheckResult.isLoading", + "type": "boolean", + "tags": [], + "label": "isLoading", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseHealthCheckResult.healthCheckError", + "type": "CompoundType", + "tags": [], + "label": "healthCheckError", + "description": [], + "signature": [ + "HealthCheckErrors", + " | null" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseLoadAlertingFrameworkHealthProps", + "type": "Interface", + "tags": [], + "label": "UseLoadAlertingFrameworkHealthProps", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_alerting_framework_health.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseLoadAlertingFrameworkHealthProps.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ { - "pluginId": "dataViews", + "pluginId": "@kbn/core-http-browser", "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - }, - ") => Promise<", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_alerting_framework_health.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseLoadUiConfigProps", + "type": "Interface", + "tags": [], + "label": "UseLoadUiConfigProps", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_config.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseLoadUiConfigProps.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ { - "pluginId": "dataViews", + "pluginId": "@kbn/core-http-browser", "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewLazy", - "text": "DataViewLazy" - }, - ">; }" + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + } ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_alert_data_view.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_config.ts", "deprecated": false, "trackAdoption": false - }, + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseLoadUiHealthProps", + "type": "Interface", + "tags": [], + "label": "UseLoadUiHealthProps", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_health.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.UseAlertDataViewProps.toasts", + "id": "def-common.UseLoadUiHealthProps.http", "type": "Object", "tags": [], - "label": "toasts", + "label": "http", "description": [], "signature": [ { - "pluginId": "@kbn/core-notifications-browser", + "pluginId": "@kbn/core-http-browser", "scope": "common", - "docId": "kibKbnCoreNotificationsBrowserPluginApi", - "section": "def-common.IToasts", - "text": "IToasts" + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" } ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_alert_data_view.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_health.ts", "deprecated": false, "trackAdoption": false } @@ -4327,44 +5253,46 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.UseAlertDataViewResult", + "id": "def-common.UseResolveProps", "type": "Interface", "tags": [], - "label": "UseAlertDataViewResult", + "label": "UseResolveProps", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_alert_data_view.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.UseAlertDataViewResult.dataViews", - "type": "Array", + "id": "def-common.UseResolveProps.http", + "type": "Object", "tags": [], - "label": "dataViews", + "label": "http", "description": [], "signature": [ { - "pluginId": "dataViews", + "pluginId": "@kbn/core-http-browser", "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - }, - "[] | undefined" + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + } ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_alert_data_view.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.UseAlertDataViewResult.loading", - "type": "boolean", + "id": "def-common.UseResolveProps.id", + "type": "string", "tags": [], - "label": "loading", + "label": "id", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_alert_data_view.ts", + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.ts", "deprecated": false, "trackAdoption": false } @@ -4378,7 +5306,7 @@ "tags": [], "label": "UseRuleAADFieldsProps", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -4392,7 +5320,7 @@ "signature": [ "string | undefined" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", "deprecated": false, "trackAdoption": false }, @@ -4412,7 +5340,7 @@ "text": "HttpSetup" } ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", "deprecated": false, "trackAdoption": false }, @@ -4432,7 +5360,7 @@ "text": "IToasts" } ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", "deprecated": false, "trackAdoption": false } @@ -4446,7 +5374,7 @@ "tags": [], "label": "UseRuleAADFieldsResult", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -4467,7 +5395,7 @@ }, "[]" ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", "deprecated": false, "trackAdoption": false }, @@ -4478,9 +5406,237 @@ "tags": [], "label": "loading", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseRuleTypesProps", + "type": "Interface", + "tags": [], + "label": "UseRuleTypesProps", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseRuleTypesProps.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseRuleTypesProps.toasts", + "type": "Object", + "tags": [], + "label": "toasts", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-notifications-browser", + "scope": "common", + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-common.IToasts", + "text": "IToasts" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseRuleTypesProps.filteredRuleTypes", + "type": "Array", + "tags": [], + "label": "filteredRuleTypes", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseRuleTypesProps.registeredRuleTypes", + "type": "Array", + "tags": [], + "label": "registeredRuleTypes", + "description": [], + "signature": [ + "{ id: string; description: string; }[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseRuleTypesProps.enabled", + "type": "CompoundType", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseUpdateRuleProps", + "type": "Interface", + "tags": [], + "label": "UseUpdateRuleProps", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseUpdateRuleProps.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseUpdateRuleProps.onSuccess", + "type": "Function", + "tags": [], + "label": "onSuccess", + "description": [], + "signature": [ + "((formData: ", + "UpdateRuleBody", + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">) => void) | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseUpdateRuleProps.onSuccess.$1", + "type": "Object", + "tags": [], + "label": "formData", + "description": [], + "signature": [ + "UpdateRuleBody", + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "common", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseUpdateRuleProps.onError", + "type": "Function", + "tags": [], + "label": "onError", + "description": [], + "signature": [ + "((error: ", + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.IHttpFetchError", + "text": "IHttpFetchError" + }, + "<{ message: string; }>) => void) | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.UseUpdateRuleProps.onError.$1", + "type": "Object", + "tags": [], + "label": "error", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.IHttpFetchError", + "text": "IHttpFetchError" + }, + "<{ message: string; }>" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] } ], "initialIsOpen": false diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index d7cd58c27dc71e..8fbd9e6f4c10dd 100644 --- a/api_docs/kbn_alerts_ui_shared.mdx +++ b/api_docs/kbn_alerts_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-ui-shared title: "@kbn/alerts-ui-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-ui-shared plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 245 | 0 | 231 | 2 | +| 299 | 0 | 283 | 8 | ## Common diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 56367e1832bd9e..20a3a8dc846677 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_collection_utils.mdx b/api_docs/kbn_analytics_collection_utils.mdx index ae6142dddc56b3..61471dadcc39a4 100644 --- a/api_docs/kbn_analytics_collection_utils.mdx +++ b/api_docs/kbn_analytics_collection_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-collection-utils title: "@kbn/analytics-collection-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-collection-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-collection-utils'] --- import kbnAnalyticsCollectionUtilsObj from './kbn_analytics_collection_utils.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index 9b03eedc58fc23..b03700b40d54cb 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_data_view.mdx b/api_docs/kbn_apm_data_view.mdx index 56eb4da9721b22..679a62fc5ac1f5 100644 --- a/api_docs/kbn_apm_data_view.mdx +++ b/api_docs/kbn_apm_data_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-data-view title: "@kbn/apm-data-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-data-view plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-data-view'] --- import kbnApmDataViewObj from './kbn_apm_data_view.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 0040a0ac3743fb..9cb8d8f1f5ab86 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index 7cd3ca057ea1aa..171175c92c49a9 100644 --- a/api_docs/kbn_apm_synthtrace_client.mdx +++ b/api_docs/kbn_apm_synthtrace_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace-client title: "@kbn/apm-synthtrace-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace-client plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] --- import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 61461c7ee7f361..efd66334ac7baf 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index 993511c5c924d6..d873cf82d0148a 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_bfetch_error.mdx b/api_docs/kbn_bfetch_error.mdx index efff561dd20137..8cf1337712acc0 100644 --- a/api_docs/kbn_bfetch_error.mdx +++ b/api_docs/kbn_bfetch_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-bfetch-error title: "@kbn/bfetch-error" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/bfetch-error plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bfetch-error'] --- import kbnBfetchErrorObj from './kbn_bfetch_error.devdocs.json'; diff --git a/api_docs/kbn_calculate_auto.mdx b/api_docs/kbn_calculate_auto.mdx index 46b275d0106f9e..91299eadcdb612 100644 --- a/api_docs/kbn_calculate_auto.mdx +++ b/api_docs/kbn_calculate_auto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-auto title: "@kbn/calculate-auto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-auto plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-auto'] --- import kbnCalculateAutoObj from './kbn_calculate_auto.devdocs.json'; diff --git a/api_docs/kbn_calculate_width_from_char_count.mdx b/api_docs/kbn_calculate_width_from_char_count.mdx index 1ce485f076512b..79b85cddb8cd87 100644 --- a/api_docs/kbn_calculate_width_from_char_count.mdx +++ b/api_docs/kbn_calculate_width_from_char_count.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-width-from-char-count title: "@kbn/calculate-width-from-char-count" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-width-from-char-count plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-width-from-char-count'] --- import kbnCalculateWidthFromCharCountObj from './kbn_calculate_width_from_char_count.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index fa0f50aa66bf93..1760c4e447c04f 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_cell_actions.mdx b/api_docs/kbn_cell_actions.mdx index 5763526a6a7a83..32bf933999b25a 100644 --- a/api_docs/kbn_cell_actions.mdx +++ b/api_docs/kbn_cell_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cell-actions title: "@kbn/cell-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cell-actions plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cell-actions'] --- import kbnCellActionsObj from './kbn_cell_actions.devdocs.json'; diff --git a/api_docs/kbn_chart_expressions_common.mdx b/api_docs/kbn_chart_expressions_common.mdx index 89151ed532b97b..ad00bf16869409 100644 --- a/api_docs/kbn_chart_expressions_common.mdx +++ b/api_docs/kbn_chart_expressions_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-expressions-common title: "@kbn/chart-expressions-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-expressions-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-expressions-common'] --- import kbnChartExpressionsCommonObj from './kbn_chart_expressions_common.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index c5555cb7fad264..0d093b4155ebd9 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index 541a1e182cd255..e81db5b2eec237 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 0b417fc2c09c14..03fdbac88bfd9a 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index 9bbe2ed6ad4fe0..0211a48eb90f8e 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index f5441ed33ffa24..9b81e1457bda73 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 06615f045f8e99..4fbefc50ea6fe3 100644 --- a/api_docs/kbn_code_editor.mdx +++ b/api_docs/kbn_code_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor title: "@kbn/code-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; diff --git a/api_docs/kbn_code_editor_mock.mdx b/api_docs/kbn_code_editor_mock.mdx index aa6dd5cf5e77f0..ed17d8c6a8df69 100644 --- a/api_docs/kbn_code_editor_mock.mdx +++ b/api_docs/kbn_code_editor_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor-mock title: "@kbn/code-editor-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor-mock plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor-mock'] --- import kbnCodeEditorMockObj from './kbn_code_editor_mock.devdocs.json'; diff --git a/api_docs/kbn_code_owners.mdx b/api_docs/kbn_code_owners.mdx index 79227de28fdab9..324b3553b77735 100644 --- a/api_docs/kbn_code_owners.mdx +++ b/api_docs/kbn_code_owners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-owners title: "@kbn/code-owners" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-owners plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-owners'] --- import kbnCodeOwnersObj from './kbn_code_owners.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index 352b9dcd5e1dc2..90ce92ea8f9050 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index 076d87ab6abfc9..514409c17604ba 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index 649e32e407416e..6e9b16e4631a6e 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index 47f2b28f0fe852..e4dd77810aa0ca 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_content_editor.mdx b/api_docs/kbn_content_management_content_editor.mdx index beaffc56e9c906..879b27192725d1 100644 --- a/api_docs/kbn_content_management_content_editor.mdx +++ b/api_docs/kbn_content_management_content_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-editor title: "@kbn/content-management-content-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-content-editor plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor'] --- import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json'; diff --git a/api_docs/kbn_content_management_tabbed_table_list_view.mdx b/api_docs/kbn_content_management_tabbed_table_list_view.mdx index ec2a2393d274f1..0722f7032796a8 100644 --- a/api_docs/kbn_content_management_tabbed_table_list_view.mdx +++ b/api_docs/kbn_content_management_tabbed_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-tabbed-table-list-view title: "@kbn/content-management-tabbed-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-tabbed-table-list-view plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-tabbed-table-list-view'] --- import kbnContentManagementTabbedTableListViewObj from './kbn_content_management_tabbed_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view.mdx b/api_docs/kbn_content_management_table_list_view.mdx index a7ac7476719f8b..939f6d5092f0d0 100644 --- a/api_docs/kbn_content_management_table_list_view.mdx +++ b/api_docs/kbn_content_management_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view title: "@kbn/content-management-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view'] --- import kbnContentManagementTableListViewObj from './kbn_content_management_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_common.mdx b/api_docs/kbn_content_management_table_list_view_common.mdx index bb792fc5fe8eef..31e619f9852bcb 100644 --- a/api_docs/kbn_content_management_table_list_view_common.mdx +++ b/api_docs/kbn_content_management_table_list_view_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-common title: "@kbn/content-management-table-list-view-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-common'] --- import kbnContentManagementTableListViewCommonObj from './kbn_content_management_table_list_view_common.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_table.mdx b/api_docs/kbn_content_management_table_list_view_table.mdx index f35458028c8b3a..74be3983e76dbf 100644 --- a/api_docs/kbn_content_management_table_list_view_table.mdx +++ b/api_docs/kbn_content_management_table_list_view_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-table title: "@kbn/content-management-table-list-view-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-table plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-table'] --- import kbnContentManagementTableListViewTableObj from './kbn_content_management_table_list_view_table.devdocs.json'; diff --git a/api_docs/kbn_content_management_user_profiles.mdx b/api_docs/kbn_content_management_user_profiles.mdx index 219bd3027c823f..2b81c3ba9cb2fe 100644 --- a/api_docs/kbn_content_management_user_profiles.mdx +++ b/api_docs/kbn_content_management_user_profiles.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-user-profiles title: "@kbn/content-management-user-profiles" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-user-profiles plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-user-profiles'] --- import kbnContentManagementUserProfilesObj from './kbn_content_management_user_profiles.devdocs.json'; diff --git a/api_docs/kbn_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index b7af1abadac52c..35e16d09a66e9c 100644 --- a/api_docs/kbn_content_management_utils.mdx +++ b/api_docs/kbn_content_management_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-utils title: "@kbn/content-management-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-utils'] --- import kbnContentManagementUtilsObj from './kbn_content_management_utils.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.devdocs.json b/api_docs/kbn_core_analytics_browser.devdocs.json index 0937f6f89d0f35..653be84cc56873 100644 --- a/api_docs/kbn_core_analytics_browser.devdocs.json +++ b/api_docs/kbn_core_analytics_browser.devdocs.json @@ -1427,6 +1427,10 @@ "plugin": "actions", "path": "x-pack/plugins/actions/server/lib/action_executor.test.ts" }, + { + "plugin": "actions", + "path": "x-pack/plugins/actions/server/lib/action_executor.test.ts" + }, { "plugin": "@kbn/ebt", "path": "packages/analytics/ebt/client/src/analytics_client/mocks.ts" diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index b5c48414e34ccd..fcde91201ab8db 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index 7aac4b1c986bf6..0b42f6c90100e6 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index a566e8910364b0..f9e3cc6381c29f 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.devdocs.json b/api_docs/kbn_core_analytics_server.devdocs.json index 24de9bb5afba17..ea8766e2c76399 100644 --- a/api_docs/kbn_core_analytics_server.devdocs.json +++ b/api_docs/kbn_core_analytics_server.devdocs.json @@ -1427,6 +1427,10 @@ "plugin": "actions", "path": "x-pack/plugins/actions/server/lib/action_executor.test.ts" }, + { + "plugin": "actions", + "path": "x-pack/plugins/actions/server/lib/action_executor.test.ts" + }, { "plugin": "@kbn/ebt", "path": "packages/analytics/ebt/client/src/analytics_client/mocks.ts" diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index 0037c87aa72a0b..150ee1257fee87 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index 984b35906f522c..04d6ad1681d203 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index 6989fc99ab314c..b8916d269cc1e9 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index f7596d79f5877d..da66c9c3b30fa5 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index e86e8842e348c9..f1faad6e0067e6 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index 609013c6036f80..7f963bdf82777c 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index c40d94736d9e5a..3d95f710172986 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index ee7a5c4017859c..4cf5f768f4995a 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index 11711eab99edbc..25549d6384f103 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index 2057d94a3841e0..78b83d613ebebc 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 0c73cae68148af..0556f0f0e9f16b 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 3e518fcf6ec0d9..fec3cff347d846 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index d67043839b4333..a98ef6914e73c7 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index 6284b392d31d0f..4c3adbf26bc60d 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index 1f852c5d30a180..bb3dc3876d0b42 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index 818ac0b4248f78..b43ac1eb3aaeac 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index e38ee0ed72ee57..f495847303fc9f 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index b843e5c01d3be5..8a60d6e77ed4d1 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index 6c16e68c003b45..1086abae2b215b 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index 9c68cec51e1696..62f7b570e4eca1 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index 2a2a411112cd0a..e1bde0474cae7a 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser.mdx b/api_docs/kbn_core_custom_branding_browser.mdx index 7be60bfaeea63f..e5468ddc4919cf 100644 --- a/api_docs/kbn_core_custom_branding_browser.mdx +++ b/api_docs/kbn_core_custom_branding_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser title: "@kbn/core-custom-branding-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser'] --- import kbnCoreCustomBrandingBrowserObj from './kbn_core_custom_branding_browser.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_internal.mdx b/api_docs/kbn_core_custom_branding_browser_internal.mdx index 52baac73954b7e..8096f4620c7ce2 100644 --- a/api_docs/kbn_core_custom_branding_browser_internal.mdx +++ b/api_docs/kbn_core_custom_branding_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-internal title: "@kbn/core-custom-branding-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-internal'] --- import kbnCoreCustomBrandingBrowserInternalObj from './kbn_core_custom_branding_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_mocks.mdx b/api_docs/kbn_core_custom_branding_browser_mocks.mdx index 95aba98b0e1fec..dda9d9b03975c6 100644 --- a/api_docs/kbn_core_custom_branding_browser_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-mocks title: "@kbn/core-custom-branding-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-mocks'] --- import kbnCoreCustomBrandingBrowserMocksObj from './kbn_core_custom_branding_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_common.mdx b/api_docs/kbn_core_custom_branding_common.mdx index 53ad09e3149a95..efb3d8c9ed2a3f 100644 --- a/api_docs/kbn_core_custom_branding_common.mdx +++ b/api_docs/kbn_core_custom_branding_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-common title: "@kbn/core-custom-branding-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-common'] --- import kbnCoreCustomBrandingCommonObj from './kbn_core_custom_branding_common.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server.mdx b/api_docs/kbn_core_custom_branding_server.mdx index 6eb9168c12ad53..8407c18d9dbcc0 100644 --- a/api_docs/kbn_core_custom_branding_server.mdx +++ b/api_docs/kbn_core_custom_branding_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server title: "@kbn/core-custom-branding-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server'] --- import kbnCoreCustomBrandingServerObj from './kbn_core_custom_branding_server.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_internal.mdx b/api_docs/kbn_core_custom_branding_server_internal.mdx index 823a8d9ce5eccb..17f9c83d7b6d8c 100644 --- a/api_docs/kbn_core_custom_branding_server_internal.mdx +++ b/api_docs/kbn_core_custom_branding_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-internal title: "@kbn/core-custom-branding-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-internal'] --- import kbnCoreCustomBrandingServerInternalObj from './kbn_core_custom_branding_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_mocks.mdx b/api_docs/kbn_core_custom_branding_server_mocks.mdx index 25421e02730777..5a4bbd836d77e9 100644 --- a/api_docs/kbn_core_custom_branding_server_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-mocks title: "@kbn/core-custom-branding-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-mocks'] --- import kbnCoreCustomBrandingServerMocksObj from './kbn_core_custom_branding_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index e05dcd7076b6da..459e0abfecb150 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index ed02547bde4fbd..fbb92ae3c4927b 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index 6f4f14df8caa98..db58daa3dc4c23 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index cf9ae92a963e13..6341af0909c1fa 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index 74130596e86cf0..fea078a886534a 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index cf62941fc8fbc6..9e35638fe84853 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index 4b4cf65d7248ad..c128ca473df8b1 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 0f35df945ed911..4831dce8dd2a06 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index ba090c2dfc1e21..664f1d96ac2d08 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index c8ca8f5711ce1e..f6d9eb3e892a3d 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index a9db209f6ad297..bee1dcfa6a53e2 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index 23363704233c16..e7d76027875e64 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index 4fed3ac19a8b3e..5378b1943c94c2 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index 5d4c045a4bdb5d..0f29505f85d228 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index cb2bb9ca1c91fd..f10aca9ec19952 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index 956b8cd3f716e7..cf45779818e766 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index 56041bb2f5a8d2..8b742ef47ea4d3 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index 0b52cb462eb750..22dc6d6fd2e28c 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index 38f217c418a7c8..898bb2ab07218b 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index acbb6b83c38699..785761fd8670f3 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index 854e08373db839..f52bc3b6dd3e04 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index 9a801385741ef7..c86e95d8e7c096 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index 4dcfd3cf570f0c..cb8b66a4c5859f 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index 7510f2f93d50cf..50c8cd918d317e 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index 60e326b0f1080f..c642fcbc622419 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index e3a8ade537212f..323642c224ac40 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index d194639485529f..56b67697fabc80 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index 80243423aeba19..f76ca30b74ea7b 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index c8e122dec006dd..d74fa065174a6f 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index 440e6c514517ec..85d753f6ccda05 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index 394aedc41eebfd..67aff7366d4b5b 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index 8755e844751831..11abb16b7388e5 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index c1b9fc240dcc85..b28bb841aea210 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index 6c1a285317573c..a7f5197d057e38 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index 8926219bac0f1d..80ba56edce2f9a 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index f6e729308ae90b..5bd4269119990c 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index d5dea3d43794bc..7a78f6a7b77322 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index 531e53315668cf..12b67e02c9cf0e 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 1392bc1821cf7f..5596729a19e5b5 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index f0cb3dd09ec472..6c60c5f95888dc 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index a61741372b90db..8df92ed2ed404b 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index cf115c718ff227..6550a4170a723a 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index dec0fbab7142af..306b32ec55c1a9 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index 5d0d7faf1a4d3b..f849d6e5cead01 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index 9c04564c2eb811..cdddc0eb5e5e4e 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index 4e056dd600eb41..b5e51e530e50dd 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 61bfce4f933c22..de9f97d537e428 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index 450ac4c1685ed5..bed7da38edbb42 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index 569d52281e7aa4..9976d4b739156e 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 70104ee6bf1613..7534a661104963 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index 6ba00a287dfe53..576be6a0480771 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index e46545339eb5b1..7d3abe3f0c9dc2 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index 798a08085efa91..0f501a54064563 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks'] --- import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx index 91ab873cb9165f..677ea84bfa21a6 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks'] --- import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx index b2bcc4117cabc6..d066406eb194eb 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal'] --- import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index 90e821f6e96fc3..e36cdb66b8bdbf 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index 629e1f2b11b522..87f35c880d4865 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.devdocs.json b/api_docs/kbn_core_logging_server_mocks.devdocs.json index 329bb66b1d81fd..ea54ba1fab35b6 100644 --- a/api_docs/kbn_core_logging_server_mocks.devdocs.json +++ b/api_docs/kbn_core_logging_server_mocks.devdocs.json @@ -158,7 +158,7 @@ "section": "def-common.LoggerFactory", "text": "LoggerFactory" }, - ") => { debug: [message: string, meta?: ", + ") => { debug: ([string] | [string, ", { "pluginId": "@kbn/logging", "scope": "common", @@ -166,7 +166,7 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - " | undefined][]; error: [errorOrMessage: string | Error, meta?: ", + " | undefined])[]; error: ([string | Error] | [string | Error, ", { "pluginId": "@kbn/logging", "scope": "common", @@ -174,7 +174,7 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - " | undefined][]; fatal: [errorOrMessage: string | Error, meta?: ", + " | undefined])[]; fatal: ([string | Error] | [string | Error, ", { "pluginId": "@kbn/logging", "scope": "common", @@ -182,7 +182,7 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - " | undefined][]; info: [message: string, meta?: ", + " | undefined])[]; info: ([string] | [string, ", { "pluginId": "@kbn/logging", "scope": "common", @@ -190,9 +190,9 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - " | undefined][]; log: [record: ", + " | undefined])[]; log: [record: ", "LogRecord", - "][]; trace: [message: string, meta?: ", + "][]; trace: ([string] | [string, ", { "pluginId": "@kbn/logging", "scope": "common", @@ -200,7 +200,7 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - " | undefined][]; warn: [errorOrMessage: string | Error, meta?: ", + " | undefined])[]; warn: ([string | Error] | [string | Error, ", { "pluginId": "@kbn/logging", "scope": "common", @@ -208,7 +208,7 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - " | undefined][]; }" + " | undefined])[]; }" ], "path": "packages/core/logging/core-logging-server-mocks/src/logging_system.mock.ts", "deprecated": false, diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index ff054b3e26f128..03c8d13082f19c 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index a9ebb5bc7f8857..0ff44ccb2e7262 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index eb41d8520ac47b..b5131595599a60 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index 13911cd0d967c8..a7631cf8c39bc0 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index c2eec7ade80182..b3bc256921f77c 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index 9ead95bf364da5..c0c3c776bfa33b 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index a88c6e08424b39..623d9f05fd146c 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 0d03f2740be085..07b5c87f8e1a61 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index 0d245f00069f7f..0af8a380b89861 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index e4f30e49974077..8733bac0f473d9 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index 28533cc5817ade..34ad00eaeb7a76 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index 48c792a77bb64d..ac75d8f1910b9d 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index 2ee580dc320377..906a5258c34156 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index db41cd0640ab6c..b1a65946aacee3 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index ce5b576f4c54f5..f58effd94bdd30 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index 13ef165f3bd1f5..d23b118d230031 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index d33349e51c2922..cafedc5b681bad 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index 66b5639093f235..921d52cf93af54 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_browser.mdx b/api_docs/kbn_core_plugins_contracts_browser.mdx index 00325d286c7937..db3657b741db64 100644 --- a/api_docs/kbn_core_plugins_contracts_browser.mdx +++ b/api_docs/kbn_core_plugins_contracts_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-browser title: "@kbn/core-plugins-contracts-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-browser'] --- import kbnCorePluginsContractsBrowserObj from './kbn_core_plugins_contracts_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_server.mdx b/api_docs/kbn_core_plugins_contracts_server.mdx index 7bc1539d78bbde..e76953060daa7c 100644 --- a/api_docs/kbn_core_plugins_contracts_server.mdx +++ b/api_docs/kbn_core_plugins_contracts_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-server title: "@kbn/core-plugins-contracts-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-server'] --- import kbnCorePluginsContractsServerObj from './kbn_core_plugins_contracts_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index cada580df35370..91ff579000f9ea 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server'] --- import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx index bebb76ebab92ae..046427404d6269 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks'] --- import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index 0ef63a092fcae5..1da976fb44be49 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index 5b462d37199a18..480c70239ab382 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index 9521e2d0d08834..23c9a3263b297d 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index fb2d9619ff7671..511c802b6d1416 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index ddc30cda91a768..e9dc751143066b 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index 013b234456bf99..57f88ea5c51dfc 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal'] --- import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index cb1bd63a0a4429..8fe186570a1264 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index baa2132361cc99..694f4eb097689c 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index 7285e39a59fa6c..e5c4b705bd85f6 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index afa81ac790126d..d37ce6bcdc6e1c 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index 8809c0a3e56cea..a6611bbed76dbb 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index 6d4a1999310701..eba8f921ec522b 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index 1273e663da7d03..8778e778c0fe5c 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index 1299a244ba673a..56e8c07c0f0da9 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index e8d86f8fc6dd61..554b28e4d8a6b2 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index 754d6467035a73..db08f52c6122d2 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index a88b3357816b81..2dd11ab51188fd 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index 1baeed68faf409..7645e5be4a95a5 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index 7f62d4fc6d0bea..5eebde469fa1d2 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index b2493ca9715efc..654bb0d9a30caa 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index bcc2ab4c52210b..a3b05a0a497fb9 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index fa92510690b490..74d85c41a162b8 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index 1c4c4672e06628..f1089272a33c0c 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser.mdx b/api_docs/kbn_core_security_browser.mdx index 9468388baaaf5c..c1cb8444bc83b4 100644 --- a/api_docs/kbn_core_security_browser.mdx +++ b/api_docs/kbn_core_security_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser title: "@kbn/core-security-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser'] --- import kbnCoreSecurityBrowserObj from './kbn_core_security_browser.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_internal.mdx b/api_docs/kbn_core_security_browser_internal.mdx index e48e876b5a201e..f55fdf09091ffb 100644 --- a/api_docs/kbn_core_security_browser_internal.mdx +++ b/api_docs/kbn_core_security_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-internal title: "@kbn/core-security-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-internal'] --- import kbnCoreSecurityBrowserInternalObj from './kbn_core_security_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_mocks.mdx b/api_docs/kbn_core_security_browser_mocks.mdx index 724ff1d3577485..718c42829ed7ee 100644 --- a/api_docs/kbn_core_security_browser_mocks.mdx +++ b/api_docs/kbn_core_security_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-mocks title: "@kbn/core-security-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-mocks'] --- import kbnCoreSecurityBrowserMocksObj from './kbn_core_security_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_security_common.mdx b/api_docs/kbn_core_security_common.mdx index 55c7cc2a3de811..371aaf08307d58 100644 --- a/api_docs/kbn_core_security_common.mdx +++ b/api_docs/kbn_core_security_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-common title: "@kbn/core-security-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-common'] --- import kbnCoreSecurityCommonObj from './kbn_core_security_common.devdocs.json'; diff --git a/api_docs/kbn_core_security_server.mdx b/api_docs/kbn_core_security_server.mdx index 5797725bb33f40..e76d5d248794e3 100644 --- a/api_docs/kbn_core_security_server.mdx +++ b/api_docs/kbn_core_security_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server title: "@kbn/core-security-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server'] --- import kbnCoreSecurityServerObj from './kbn_core_security_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_internal.mdx b/api_docs/kbn_core_security_server_internal.mdx index 5258aca6df22c7..97e9a6aa5eddb5 100644 --- a/api_docs/kbn_core_security_server_internal.mdx +++ b/api_docs/kbn_core_security_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-internal title: "@kbn/core-security-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-internal'] --- import kbnCoreSecurityServerInternalObj from './kbn_core_security_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_mocks.mdx b/api_docs/kbn_core_security_server_mocks.mdx index 652426ece5ba00..4837bea5d82898 100644 --- a/api_docs/kbn_core_security_server_mocks.mdx +++ b/api_docs/kbn_core_security_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-mocks title: "@kbn/core-security-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-mocks'] --- import kbnCoreSecurityServerMocksObj from './kbn_core_security_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index 66d6b939438931..eae8617e6fe549 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index e90cc83195b2f8..a9296a333acaf5 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index 46333e947d8341..d4dbdd18692374 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index 86a9ebbe5f1f2d..0b37e06fcc38c7 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index d682bf1102b8f3..14e0d72778eccc 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index 1de178318e5584..042e552861a7aa 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index d2dcfd029adc50..02cb90067ad44c 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx index fefa10b13a9cd8..730e11f40bd820 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.mdx +++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server title: "@kbn/core-test-helpers-kbn-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-kbn-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_model_versions.mdx b/api_docs/kbn_core_test_helpers_model_versions.mdx index 8ff1f7cd25fa53..5c82e09bc66019 100644 --- a/api_docs/kbn_core_test_helpers_model_versions.mdx +++ b/api_docs/kbn_core_test_helpers_model_versions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-model-versions title: "@kbn/core-test-helpers-model-versions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-model-versions plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-model-versions'] --- import kbnCoreTestHelpersModelVersionsObj from './kbn_core_test_helpers_model_versions.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index a2efcaffad146a..e5d18270b29045 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index 490d79e479bb28..39c90eea55dc25 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils'] --- import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 57b25bb6a633c3..cc711a972530ac 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index 1cb722736a90f8..f5e13361357f46 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index 7c1e5d5de13589..bca627eb63e233 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index 42e835cacf74d7..9bd6a2f4e21f88 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index 8e1a1fdd771417..e6934d5ef4f0f9 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index 5c0321733f462a..37c1136c9968aa 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index 1a228e05c73d13..208c63217e13e1 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index 98ce3dfa4c9521..d1495c6f87dfe9 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index ba562b4b378317..3eeb3b2230a88b 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index 9eace05a33f095..1cf3e2b8be0c44 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index 66b8b97972f971..77ba5dec8902c2 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index 5366d62f796488..71e9dd73f06e3f 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser.mdx b/api_docs/kbn_core_user_profile_browser.mdx index 644142c8ca939a..ab5718fa6d08eb 100644 --- a/api_docs/kbn_core_user_profile_browser.mdx +++ b/api_docs/kbn_core_user_profile_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser title: "@kbn/core-user-profile-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser'] --- import kbnCoreUserProfileBrowserObj from './kbn_core_user_profile_browser.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_internal.mdx b/api_docs/kbn_core_user_profile_browser_internal.mdx index 980a3658059814..c9e78b7d26df79 100644 --- a/api_docs/kbn_core_user_profile_browser_internal.mdx +++ b/api_docs/kbn_core_user_profile_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-internal title: "@kbn/core-user-profile-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-internal'] --- import kbnCoreUserProfileBrowserInternalObj from './kbn_core_user_profile_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_mocks.mdx b/api_docs/kbn_core_user_profile_browser_mocks.mdx index 8cc6b12ac6280d..ca3566253f9cf1 100644 --- a/api_docs/kbn_core_user_profile_browser_mocks.mdx +++ b/api_docs/kbn_core_user_profile_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-mocks title: "@kbn/core-user-profile-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-mocks'] --- import kbnCoreUserProfileBrowserMocksObj from './kbn_core_user_profile_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_common.mdx b/api_docs/kbn_core_user_profile_common.mdx index 1bc7b9b5570503..05792794b0a523 100644 --- a/api_docs/kbn_core_user_profile_common.mdx +++ b/api_docs/kbn_core_user_profile_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-common title: "@kbn/core-user-profile-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-common'] --- import kbnCoreUserProfileCommonObj from './kbn_core_user_profile_common.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server.mdx b/api_docs/kbn_core_user_profile_server.mdx index 3973da5f662436..e56fff27beafdb 100644 --- a/api_docs/kbn_core_user_profile_server.mdx +++ b/api_docs/kbn_core_user_profile_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server title: "@kbn/core-user-profile-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server'] --- import kbnCoreUserProfileServerObj from './kbn_core_user_profile_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_internal.mdx b/api_docs/kbn_core_user_profile_server_internal.mdx index aed05ffd23df64..027d32961861c3 100644 --- a/api_docs/kbn_core_user_profile_server_internal.mdx +++ b/api_docs/kbn_core_user_profile_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-internal title: "@kbn/core-user-profile-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-internal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-internal'] --- import kbnCoreUserProfileServerInternalObj from './kbn_core_user_profile_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_mocks.mdx b/api_docs/kbn_core_user_profile_server_mocks.mdx index d2e7f36f681996..deb44c2a5a93d9 100644 --- a/api_docs/kbn_core_user_profile_server_mocks.mdx +++ b/api_docs/kbn_core_user_profile_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-mocks title: "@kbn/core-user-profile-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-mocks'] --- import kbnCoreUserProfileServerMocksObj from './kbn_core_user_profile_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index 2393464e33a1bc..8a62f537cfc8e7 100644 --- a/api_docs/kbn_core_user_settings_server.mdx +++ b/api_docs/kbn_core_user_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server title: "@kbn/core-user-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server'] --- import kbnCoreUserSettingsServerObj from './kbn_core_user_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_mocks.mdx b/api_docs/kbn_core_user_settings_server_mocks.mdx index 894db82c1526d7..cb81dc195b531d 100644 --- a/api_docs/kbn_core_user_settings_server_mocks.mdx +++ b/api_docs/kbn_core_user_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-mocks title: "@kbn/core-user-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-mocks'] --- import kbnCoreUserSettingsServerMocksObj from './kbn_core_user_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index ffa39018778bc4..a6de3df2ee8d3c 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index d6920a1d85276e..3612cdf26c0ca1 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_custom_icons.mdx b/api_docs/kbn_custom_icons.mdx index ae573ccd5b1eec..8bd13f416db1bc 100644 --- a/api_docs/kbn_custom_icons.mdx +++ b/api_docs/kbn_custom_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-icons title: "@kbn/custom-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-icons plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-icons'] --- import kbnCustomIconsObj from './kbn_custom_icons.devdocs.json'; diff --git a/api_docs/kbn_custom_integrations.mdx b/api_docs/kbn_custom_integrations.mdx index cafdf4c8267ea7..2f4fb0a2b850c9 100644 --- a/api_docs/kbn_custom_integrations.mdx +++ b/api_docs/kbn_custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-integrations title: "@kbn/custom-integrations" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-integrations plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-integrations'] --- import kbnCustomIntegrationsObj from './kbn_custom_integrations.devdocs.json'; diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx index 42a3c143c3fc07..fec53bf278c1f1 100644 --- a/api_docs/kbn_cypress_config.mdx +++ b/api_docs/kbn_cypress_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cypress-config title: "@kbn/cypress-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cypress-config plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config'] --- import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json'; diff --git a/api_docs/kbn_data_forge.mdx b/api_docs/kbn_data_forge.mdx index 551736399c97cd..d757d1cb65f5b6 100644 --- a/api_docs/kbn_data_forge.mdx +++ b/api_docs/kbn_data_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-forge title: "@kbn/data-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-forge plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-forge'] --- import kbnDataForgeObj from './kbn_data_forge.devdocs.json'; diff --git a/api_docs/kbn_data_service.mdx b/api_docs/kbn_data_service.mdx index a11e0ab09e1ba5..db827308451c81 100644 --- a/api_docs/kbn_data_service.mdx +++ b/api_docs/kbn_data_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-service title: "@kbn/data-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-service plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-service'] --- import kbnDataServiceObj from './kbn_data_service.devdocs.json'; diff --git a/api_docs/kbn_data_stream_adapter.mdx b/api_docs/kbn_data_stream_adapter.mdx index 9dbd474c4af2c6..10b51c92bdbf61 100644 --- a/api_docs/kbn_data_stream_adapter.mdx +++ b/api_docs/kbn_data_stream_adapter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-stream-adapter title: "@kbn/data-stream-adapter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-stream-adapter plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-stream-adapter'] --- import kbnDataStreamAdapterObj from './kbn_data_stream_adapter.devdocs.json'; diff --git a/api_docs/kbn_data_view_utils.mdx b/api_docs/kbn_data_view_utils.mdx index 42601dc120a32e..35fcf27583c482 100644 --- a/api_docs/kbn_data_view_utils.mdx +++ b/api_docs/kbn_data_view_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-view-utils title: "@kbn/data-view-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-view-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-view-utils'] --- import kbnDataViewUtilsObj from './kbn_data_view_utils.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index f6adc1ab4278c6..a2149161db461d 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_analytics.mdx b/api_docs/kbn_deeplinks_analytics.mdx index e326358ca74ba8..6516a6992e1674 100644 --- a/api_docs/kbn_deeplinks_analytics.mdx +++ b/api_docs/kbn_deeplinks_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-analytics title: "@kbn/deeplinks-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-analytics plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-analytics'] --- import kbnDeeplinksAnalyticsObj from './kbn_deeplinks_analytics.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_devtools.mdx b/api_docs/kbn_deeplinks_devtools.mdx index e4e0d3ff9ac4a7..81a9e07573cf91 100644 --- a/api_docs/kbn_deeplinks_devtools.mdx +++ b/api_docs/kbn_deeplinks_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-devtools title: "@kbn/deeplinks-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-devtools plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_fleet.mdx b/api_docs/kbn_deeplinks_fleet.mdx index a34915bb0bea1f..9eda3599e2dfc6 100644 --- a/api_docs/kbn_deeplinks_fleet.mdx +++ b/api_docs/kbn_deeplinks_fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-fleet title: "@kbn/deeplinks-fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-fleet plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-fleet'] --- import kbnDeeplinksFleetObj from './kbn_deeplinks_fleet.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index 0ee1f3408ad7c0..ed558c6f415c37 100644 --- a/api_docs/kbn_deeplinks_management.mdx +++ b/api_docs/kbn_deeplinks_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-management title: "@kbn/deeplinks-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-management plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-management'] --- import kbnDeeplinksManagementObj from './kbn_deeplinks_management.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_ml.mdx b/api_docs/kbn_deeplinks_ml.mdx index 07038f58ba3290..371a0d04a5484f 100644 --- a/api_docs/kbn_deeplinks_ml.mdx +++ b/api_docs/kbn_deeplinks_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-ml title: "@kbn/deeplinks-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-ml plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-ml'] --- import kbnDeeplinksMlObj from './kbn_deeplinks_ml.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_observability.mdx b/api_docs/kbn_deeplinks_observability.mdx index 166a0ff6b65f5f..86d5dd2c3efb05 100644 --- a/api_docs/kbn_deeplinks_observability.mdx +++ b/api_docs/kbn_deeplinks_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-observability title: "@kbn/deeplinks-observability" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-observability plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-observability'] --- import kbnDeeplinksObservabilityObj from './kbn_deeplinks_observability.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_search.mdx b/api_docs/kbn_deeplinks_search.mdx index 980a30937053ba..5006993ab7bf58 100644 --- a/api_docs/kbn_deeplinks_search.mdx +++ b/api_docs/kbn_deeplinks_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-search title: "@kbn/deeplinks-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-search plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_security.mdx b/api_docs/kbn_deeplinks_security.mdx index a8a87167bd6cbd..230253c75efe95 100644 --- a/api_docs/kbn_deeplinks_security.mdx +++ b/api_docs/kbn_deeplinks_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-security title: "@kbn/deeplinks-security" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-security plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-security'] --- import kbnDeeplinksSecurityObj from './kbn_deeplinks_security.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_shared.mdx b/api_docs/kbn_deeplinks_shared.mdx index 54aa2eff8aff7e..8754e80b0c2951 100644 --- a/api_docs/kbn_deeplinks_shared.mdx +++ b/api_docs/kbn_deeplinks_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-shared title: "@kbn/deeplinks-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-shared plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-shared'] --- import kbnDeeplinksSharedObj from './kbn_deeplinks_shared.devdocs.json'; diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index cd5198ab30ddaa..df1ab900aef163 100644 --- a/api_docs/kbn_default_nav_analytics.mdx +++ b/api_docs/kbn_default_nav_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-analytics title: "@kbn/default-nav-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-analytics plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-analytics'] --- import kbnDefaultNavAnalyticsObj from './kbn_default_nav_analytics.devdocs.json'; diff --git a/api_docs/kbn_default_nav_devtools.mdx b/api_docs/kbn_default_nav_devtools.mdx index afff96cc9094f8..45a3b76ab4b574 100644 --- a/api_docs/kbn_default_nav_devtools.mdx +++ b/api_docs/kbn_default_nav_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-devtools title: "@kbn/default-nav-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-devtools plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-devtools'] --- import kbnDefaultNavDevtoolsObj from './kbn_default_nav_devtools.devdocs.json'; diff --git a/api_docs/kbn_default_nav_management.mdx b/api_docs/kbn_default_nav_management.mdx index ec959d597c7bf5..dad78c414e3ead 100644 --- a/api_docs/kbn_default_nav_management.mdx +++ b/api_docs/kbn_default_nav_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-management title: "@kbn/default-nav-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-management plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-management'] --- import kbnDefaultNavManagementObj from './kbn_default_nav_management.devdocs.json'; diff --git a/api_docs/kbn_default_nav_ml.mdx b/api_docs/kbn_default_nav_ml.mdx index fd753a196e2e23..96f57d83edca98 100644 --- a/api_docs/kbn_default_nav_ml.mdx +++ b/api_docs/kbn_default_nav_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-ml title: "@kbn/default-nav-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-ml plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-ml'] --- import kbnDefaultNavMlObj from './kbn_default_nav_ml.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index 22d79fd718a3cf..b962fe962b01a0 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 67e416b816d0c0..54f5461df533c9 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index 49a0ffae181707..030ee2f59ebe2c 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index e13d95ffd5f98d..3b7a7278452842 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_discover_utils.mdx b/api_docs/kbn_discover_utils.mdx index 76dc7f14539175..937235a9945c28 100644 --- a/api_docs/kbn_discover_utils.mdx +++ b/api_docs/kbn_discover_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-discover-utils title: "@kbn/discover-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/discover-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-utils'] --- import kbnDiscoverUtilsObj from './kbn_discover_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.devdocs.json b/api_docs/kbn_doc_links.devdocs.json index ab331022baa0b5..f852d7ecbf7329 100644 --- a/api_docs/kbn_doc_links.devdocs.json +++ b/api_docs/kbn_doc_links.devdocs.json @@ -546,7 +546,7 @@ "label": "securitySolution", "description": [], "signature": [ - "{ readonly artifactControl: string; readonly trustedApps: string; readonly eventFilters: string; readonly blocklist: string; readonly endpointArtifacts: string; readonly policyResponseTroubleshooting: { full_disk_access: string; macos_system_ext: string; linux_deadlock: string; }; readonly packageActionTroubleshooting: { es_connection: string; }; readonly threatIntelInt: string; readonly responseActions: string; readonly configureEndpointIntegrationPolicy: string; readonly exceptions: { value_lists: string; }; readonly privileges: string; readonly manageDetectionRules: string; readonly createDetectionRules: string; readonly createEsqlRuleType: string; readonly ruleUiAdvancedParams: string; readonly entityAnalytics: { readonly riskScorePrerequisites: string; readonly hostRiskScore: string; readonly userRiskScore: string; readonly entityRiskScoring: string; readonly assetCriticality: string; }; readonly detectionEngineOverview: string; }" + "{ readonly artifactControl: string; readonly avcResults: string; readonly trustedApps: string; readonly eventFilters: string; readonly blocklist: string; readonly endpointArtifacts: string; readonly policyResponseTroubleshooting: { full_disk_access: string; macos_system_ext: string; linux_deadlock: string; }; readonly packageActionTroubleshooting: { es_connection: string; }; readonly threatIntelInt: string; readonly responseActions: string; readonly configureEndpointIntegrationPolicy: string; readonly exceptions: { value_lists: string; }; readonly privileges: string; readonly manageDetectionRules: string; readonly createDetectionRules: string; readonly createEsqlRuleType: string; readonly ruleUiAdvancedParams: string; readonly entityAnalytics: { readonly riskScorePrerequisites: string; readonly hostRiskScore: string; readonly userRiskScore: string; readonly entityRiskScoring: string; readonly assetCriticality: string; }; readonly detectionEngineOverview: string; }" ], "path": "packages/kbn-doc-links/src/types.ts", "deprecated": false, diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index ccd70431306281..079158c906b488 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 13635e2da88813..e8eedc9b350d80 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_dom_drag_drop.mdx b/api_docs/kbn_dom_drag_drop.mdx index ebc6b972b0c925..538c23bdbfc3a1 100644 --- a/api_docs/kbn_dom_drag_drop.mdx +++ b/api_docs/kbn_dom_drag_drop.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dom-drag-drop title: "@kbn/dom-drag-drop" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dom-drag-drop plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dom-drag-drop'] --- import kbnDomDragDropObj from './kbn_dom_drag_drop.devdocs.json'; diff --git a/api_docs/kbn_ebt.devdocs.json b/api_docs/kbn_ebt.devdocs.json index 1c5899d553ac40..018b79baf453fd 100644 --- a/api_docs/kbn_ebt.devdocs.json +++ b/api_docs/kbn_ebt.devdocs.json @@ -2418,6 +2418,10 @@ "plugin": "actions", "path": "x-pack/plugins/actions/server/lib/action_executor.test.ts" }, + { + "plugin": "actions", + "path": "x-pack/plugins/actions/server/lib/action_executor.test.ts" + }, { "plugin": "@kbn/core-analytics-browser-internal", "path": "packages/core/analytics/core-analytics-browser-internal/src/analytics_service.test.mocks.ts" diff --git a/api_docs/kbn_ebt.mdx b/api_docs/kbn_ebt.mdx index 0a2164b9162098..49c57c623e9df0 100644 --- a/api_docs/kbn_ebt.mdx +++ b/api_docs/kbn_ebt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt title: "@kbn/ebt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt'] --- import kbnEbtObj from './kbn_ebt.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index 29eb1c5265fa02..955875e54964e3 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_ecs_data_quality_dashboard.mdx b/api_docs/kbn_ecs_data_quality_dashboard.mdx index fbbdca34e50c90..0d562c897bd3f2 100644 --- a/api_docs/kbn_ecs_data_quality_dashboard.mdx +++ b/api_docs/kbn_ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs-data-quality-dashboard title: "@kbn/ecs-data-quality-dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs-data-quality-dashboard plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs-data-quality-dashboard'] --- import kbnEcsDataQualityDashboardObj from './kbn_ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/kbn_elastic_agent_utils.mdx b/api_docs/kbn_elastic_agent_utils.mdx index 58c0e8c0c81dea..4bf65e3122f2c6 100644 --- a/api_docs/kbn_elastic_agent_utils.mdx +++ b/api_docs/kbn_elastic_agent_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-agent-utils title: "@kbn/elastic-agent-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-agent-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-agent-utils'] --- import kbnElasticAgentUtilsObj from './kbn_elastic_agent_utils.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index 43ca4553708b53..f9fb2031ec9768 100644 --- a/api_docs/kbn_elastic_assistant.mdx +++ b/api_docs/kbn_elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant title: "@kbn/elastic-assistant" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant'] --- import kbnElasticAssistantObj from './kbn_elastic_assistant.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant_common.mdx b/api_docs/kbn_elastic_assistant_common.mdx index a6a6d714e68367..f6184753a263ac 100644 --- a/api_docs/kbn_elastic_assistant_common.mdx +++ b/api_docs/kbn_elastic_assistant_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant-common title: "@kbn/elastic-assistant-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant-common'] --- import kbnElasticAssistantCommonObj from './kbn_elastic_assistant_common.devdocs.json'; diff --git a/api_docs/kbn_entities_schema.mdx b/api_docs/kbn_entities_schema.mdx index c8b67266dc237c..03a08d0d54cf22 100644 --- a/api_docs/kbn_entities_schema.mdx +++ b/api_docs/kbn_entities_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-entities-schema title: "@kbn/entities-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/entities-schema plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/entities-schema'] --- import kbnEntitiesSchemaObj from './kbn_entities_schema.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 717770c54e9f57..7cf1b70304a8fd 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es'] --- import kbnEsObj from './kbn_es.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 15a8cf6fed7f2d..58d019d0bf8fad 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index 2db026b58870fb..acfaba698e7faf 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index be13283336a35a..2a985320900f7f 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 5c317f757727af..82d8789b637176 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 1572d32d7f3471..ae03b6127e3d0c 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_esql_ast.mdx b/api_docs/kbn_esql_ast.mdx index cde2154547b69c..409e43359b6b83 100644 --- a/api_docs/kbn_esql_ast.mdx +++ b/api_docs/kbn_esql_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-ast title: "@kbn/esql-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-ast plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-ast'] --- import kbnEsqlAstObj from './kbn_esql_ast.devdocs.json'; diff --git a/api_docs/kbn_esql_utils.mdx b/api_docs/kbn_esql_utils.mdx index 1e649e3a94a120..0aac396b0a5e58 100644 --- a/api_docs/kbn_esql_utils.mdx +++ b/api_docs/kbn_esql_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-utils title: "@kbn/esql-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-utils'] --- import kbnEsqlUtilsObj from './kbn_esql_utils.devdocs.json'; diff --git a/api_docs/kbn_esql_validation_autocomplete.mdx b/api_docs/kbn_esql_validation_autocomplete.mdx index 6785e965da43d1..54d5544dfae3a2 100644 --- a/api_docs/kbn_esql_validation_autocomplete.mdx +++ b/api_docs/kbn_esql_validation_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-validation-autocomplete title: "@kbn/esql-validation-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-validation-autocomplete plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-validation-autocomplete'] --- import kbnEsqlValidationAutocompleteObj from './kbn_esql_validation_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index 09ee2071f26f48..90452a569323b9 100644 --- a/api_docs/kbn_event_annotation_common.mdx +++ b/api_docs/kbn_event_annotation_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-common title: "@kbn/event-annotation-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-common'] --- import kbnEventAnnotationCommonObj from './kbn_event_annotation_common.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_components.mdx b/api_docs/kbn_event_annotation_components.mdx index 721b33fcf94034..022224ae640829 100644 --- a/api_docs/kbn_event_annotation_components.mdx +++ b/api_docs/kbn_event_annotation_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-components title: "@kbn/event-annotation-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-components plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-components'] --- import kbnEventAnnotationComponentsObj from './kbn_event_annotation_components.devdocs.json'; diff --git a/api_docs/kbn_expandable_flyout.mdx b/api_docs/kbn_expandable_flyout.mdx index 971b2c45285d4b..dffd8f52dd1550 100644 --- a/api_docs/kbn_expandable_flyout.mdx +++ b/api_docs/kbn_expandable_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-expandable-flyout title: "@kbn/expandable-flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/expandable-flyout plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/expandable-flyout'] --- import kbnExpandableFlyoutObj from './kbn_expandable_flyout.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 280e662140f9d3..dc400e31bde169 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_field_utils.mdx b/api_docs/kbn_field_utils.mdx index aed748cbef0330..23af3158f039a0 100644 --- a/api_docs/kbn_field_utils.mdx +++ b/api_docs/kbn_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-utils title: "@kbn/field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-utils'] --- import kbnFieldUtilsObj from './kbn_field_utils.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index 8bb3bef436ea55..7ab020263de7e9 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_formatters.mdx b/api_docs/kbn_formatters.mdx index 15818f6f407c49..197ec0ddd43d8e 100644 --- a/api_docs/kbn_formatters.mdx +++ b/api_docs/kbn_formatters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-formatters title: "@kbn/formatters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/formatters plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/formatters'] --- import kbnFormattersObj from './kbn_formatters.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index 3cf1713b059eca..e56080047a545a 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_ui_services.mdx b/api_docs/kbn_ftr_common_functional_ui_services.mdx index 2ae0e882838406..fdb06c43b43936 100644 --- a/api_docs/kbn_ftr_common_functional_ui_services.mdx +++ b/api_docs/kbn_ftr_common_functional_ui_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-ui-services title: "@kbn/ftr-common-functional-ui-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-ui-services plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-ui-services'] --- import kbnFtrCommonFunctionalUiServicesObj from './kbn_ftr_common_functional_ui_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index cffe96d42af5fc..48b9532c8c2407 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_generate_console_definitions.mdx b/api_docs/kbn_generate_console_definitions.mdx index c7b4d10d950d3f..b0282d6e6fe6bf 100644 --- a/api_docs/kbn_generate_console_definitions.mdx +++ b/api_docs/kbn_generate_console_definitions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-console-definitions title: "@kbn/generate-console-definitions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-console-definitions plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-console-definitions'] --- import kbnGenerateConsoleDefinitionsObj from './kbn_generate_console_definitions.devdocs.json'; diff --git a/api_docs/kbn_generate_csv.mdx b/api_docs/kbn_generate_csv.mdx index 7669fe84c60d4f..5c4d3964ae8aa1 100644 --- a/api_docs/kbn_generate_csv.mdx +++ b/api_docs/kbn_generate_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-csv title: "@kbn/generate-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-csv plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv'] --- import kbnGenerateCsvObj from './kbn_generate_csv.devdocs.json'; diff --git a/api_docs/kbn_grouping.devdocs.json b/api_docs/kbn_grouping.devdocs.json index f80cff790fbd9b..be6c1495f9a0b0 100644 --- a/api_docs/kbn_grouping.devdocs.json +++ b/api_docs/kbn_grouping.devdocs.json @@ -175,10 +175,10 @@ }, { "parentPluginId": "@kbn/grouping", - "id": "def-common.StatRenderer", + "id": "def-common.GroupStatsItem", "type": "Interface", "tags": [], - "label": "StatRenderer", + "label": "GroupStatsItem", "description": [], "path": "packages/kbn-grouping/src/components/types.ts", "deprecated": false, @@ -186,7 +186,7 @@ "children": [ { "parentPluginId": "@kbn/grouping", - "id": "def-common.StatRenderer.title", + "id": "def-common.GroupStatsItem.title", "type": "string", "tags": [], "label": "title", @@ -197,10 +197,10 @@ }, { "parentPluginId": "@kbn/grouping", - "id": "def-common.StatRenderer.renderer", + "id": "def-common.GroupStatsItem.component", "type": "Object", "tags": [], - "label": "renderer", + "label": "component", "description": [], "signature": [ "JSX.Element | undefined" @@ -211,7 +211,7 @@ }, { "parentPluginId": "@kbn/grouping", - "id": "def-common.StatRenderer.badge", + "id": "def-common.GroupStatsItem.badge", "type": "Object", "tags": [], "label": "badge", @@ -244,7 +244,7 @@ "signature": [ "{ isLoading: boolean; data?: ", "ParsedGroupingAggregation", - " | undefined; activePage: number; selectedGroup: string; groupingLevel?: number | undefined; inspectButton?: JSX.Element | undefined; itemsPerPage: number; onChangeGroupsItemsPerPage?: ((size: number) => void) | undefined; onChangeGroupsPage?: ((index: number) => void) | undefined; renderChildComponent: (groupFilter: ", + " | undefined; activePage: number; selectedGroup: string; takeActionItems?: ((groupFilters: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -252,7 +252,7 @@ "section": "def-common.Filter", "text": "Filter" }, - "[]) => React.ReactElement>; onGroupClose: () => void; takeActionItems: (groupFilters: ", + "[], groupNumber: number) => JSX.Element[]) | undefined; groupingLevel?: number | undefined; inspectButton?: JSX.Element | undefined; itemsPerPage: number; onChangeGroupsItemsPerPage?: ((size: number) => void) | undefined; onChangeGroupsPage?: ((index: number) => void) | undefined; renderChildComponent: (groupFilter: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -260,7 +260,7 @@ "section": "def-common.Filter", "text": "Filter" }, - "[], groupNumber: number) => JSX.Element[]; }" + "[]) => React.ReactElement>; onGroupClose: () => void; }" ], "path": "packages/kbn-grouping/src/hooks/use_grouping.tsx", "deprecated": false, diff --git a/api_docs/kbn_grouping.mdx b/api_docs/kbn_grouping.mdx index 0983f214c403cf..945768bb9e5907 100644 --- a/api_docs/kbn_grouping.mdx +++ b/api_docs/kbn_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-grouping title: "@kbn/grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/grouping plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/grouping'] --- import kbnGroupingObj from './kbn_grouping.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 17 | 0 | 12 | 8 | +| 17 | 0 | 12 | 10 | ## Common diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index 0648db9b184599..3ddd9004d5bd93 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index d3dc6e0f0561ee..9a04a6ac2d41a6 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index f4d7ef1ab56a14..bd0f10e3f2f7ad 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx index cefaf0f8e5f0a4..20b2eae2f7b3a5 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server'] --- import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index a6c529671f9f3b..f8905056b6964d 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index 452cf68f1a3f1c..3d1c353f16c2de 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index 5450f93f7f1f6b..e26e50409e91a7 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx index c19b4069b173c2..cc84a9d96eff23 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react'] --- import kbnI18nReactObj from './kbn_i18n_react.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index 532236b028242b..5ffa24e29075de 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_index_management.mdx b/api_docs/kbn_index_management.mdx index a00fb2bd110b9c..67ce5e8cc6dfea 100644 --- a/api_docs/kbn_index_management.mdx +++ b/api_docs/kbn_index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-index-management title: "@kbn/index-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/index-management plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/index-management'] --- import kbnIndexManagementObj from './kbn_index_management.devdocs.json'; diff --git a/api_docs/kbn_inference_integration_flyout.mdx b/api_docs/kbn_inference_integration_flyout.mdx index 9905cfe1ab60f9..9482370f2098eb 100644 --- a/api_docs/kbn_inference_integration_flyout.mdx +++ b/api_docs/kbn_inference_integration_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-inference_integration_flyout title: "@kbn/inference_integration_flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/inference_integration_flyout plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/inference_integration_flyout'] --- import kbnInferenceIntegrationFlyoutObj from './kbn_inference_integration_flyout.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index 9f4b824dfb7d85..5942980525cf1f 100644 --- a/api_docs/kbn_infra_forge.mdx +++ b/api_docs/kbn_infra_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-infra-forge title: "@kbn/infra-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/infra-forge plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/infra-forge'] --- import kbnInfraForgeObj from './kbn_infra_forge.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index a1984172cd5cd4..9f75bdc13c9cc9 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index dcbc530d236a7f..8b86cea224f66a 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_ipynb.mdx b/api_docs/kbn_ipynb.mdx index 7d00c0652f49c9..7191c53657e0c1 100644 --- a/api_docs/kbn_ipynb.mdx +++ b/api_docs/kbn_ipynb.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ipynb title: "@kbn/ipynb" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ipynb plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ipynb'] --- import kbnIpynbObj from './kbn_ipynb.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index b005950555d118..885a833b848e80 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index 0fb4dbd87f980e..06baa35ff2d4be 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_json_ast.mdx b/api_docs/kbn_json_ast.mdx index fe1cb7f0e4e9d0..c4bf0298cab274 100644 --- a/api_docs/kbn_json_ast.mdx +++ b/api_docs/kbn_json_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-ast title: "@kbn/json-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-ast plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_json_schemas.mdx b/api_docs/kbn_json_schemas.mdx index 9d373f761b8d96..d17b72c5d78a32 100644 --- a/api_docs/kbn_json_schemas.mdx +++ b/api_docs/kbn_json_schemas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-schemas title: "@kbn/json-schemas" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-schemas plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-schemas'] --- import kbnJsonSchemasObj from './kbn_json_schemas.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index d444d8234c61b7..7b7504802df25e 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index 4c0911fe94de64..ac6609227b665a 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_lens_embeddable_utils.mdx b/api_docs/kbn_lens_embeddable_utils.mdx index 471307f1a06291..850a3c590f8fbc 100644 --- a/api_docs/kbn_lens_embeddable_utils.mdx +++ b/api_docs/kbn_lens_embeddable_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-embeddable-utils title: "@kbn/lens-embeddable-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-embeddable-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-embeddable-utils'] --- import kbnLensEmbeddableUtilsObj from './kbn_lens_embeddable_utils.devdocs.json'; diff --git a/api_docs/kbn_lens_formula_docs.mdx b/api_docs/kbn_lens_formula_docs.mdx index a04854958a0520..5ec041d5c749c6 100644 --- a/api_docs/kbn_lens_formula_docs.mdx +++ b/api_docs/kbn_lens_formula_docs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-formula-docs title: "@kbn/lens-formula-docs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-formula-docs plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-formula-docs'] --- import kbnLensFormulaDocsObj from './kbn_lens_formula_docs.devdocs.json'; diff --git a/api_docs/kbn_logging.devdocs.json b/api_docs/kbn_logging.devdocs.json index a343c50940b403..c4e148c61e8e58 100644 --- a/api_docs/kbn_logging.devdocs.json +++ b/api_docs/kbn_logging.devdocs.json @@ -59,7 +59,15 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - ">(message: string, meta?: Meta | undefined) => void" + ">(message: ", + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.LogMessageSource", + "text": "LogMessageSource" + }, + ", meta?: Meta | undefined) => void" ], "path": "packages/kbn-logging/src/logger.ts", "deprecated": false, @@ -68,14 +76,20 @@ { "parentPluginId": "@kbn/logging", "id": "def-common.Logger.trace.$1", - "type": "string", + "type": "CompoundType", "tags": [], "label": "message", "description": [ - "- The log message" + "- The log message, or a function returning the log message" ], "signature": [ - "string" + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.LogMessageSource", + "text": "LogMessageSource" + } ], "path": "packages/kbn-logging/src/logger.ts", "deprecated": false, @@ -89,7 +103,7 @@ "tags": [], "label": "meta", "description": [ - "-" + "- The ECS meta to attach to the log entry" ], "signature": [ "Meta | undefined" @@ -109,7 +123,7 @@ "tags": [], "label": "debug", "description": [ - "\nLog messages useful for debugging and interactive investigation" + "\nLog messages useful for debugging and interactive investigation\n" ], "signature": [ "(message: string, meta?: Meta | undefined) => void" + ">(message: ", + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.LogMessageSource", + "text": "LogMessageSource" + }, + ", meta?: Meta | undefined) => void" ], "path": "packages/kbn-logging/src/logger.ts", "deprecated": false, @@ -137,14 +159,20 @@ { "parentPluginId": "@kbn/logging", "id": "def-common.Logger.debug.$1", - "type": "string", + "type": "CompoundType", "tags": [], "label": "message", "description": [ - "- The log message" + "- The log message, or a function returning the log message" ], "signature": [ - "string" + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.LogMessageSource", + "text": "LogMessageSource" + } ], "path": "packages/kbn-logging/src/logger.ts", "deprecated": false, @@ -158,7 +186,7 @@ "tags": [], "label": "meta", "description": [ - "-" + "- The ECS meta to attach to the log entry" ], "signature": [ "Meta | undefined" @@ -178,7 +206,7 @@ "tags": [], "label": "info", "description": [ - "\nLogs messages related to general application flow" + "\nLogs messages related to general application flow\n" ], "signature": [ "(message: string, meta?: Meta | undefined) => void" + ">(message: ", + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.LogMessageSource", + "text": "LogMessageSource" + }, + ", meta?: Meta | undefined) => void" ], "path": "packages/kbn-logging/src/logger.ts", "deprecated": false, @@ -206,14 +242,20 @@ { "parentPluginId": "@kbn/logging", "id": "def-common.Logger.info.$1", - "type": "string", + "type": "CompoundType", "tags": [], "label": "message", "description": [ - "- The log message" + "- The log message, or a function returning the log message" ], "signature": [ - "string" + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.LogMessageSource", + "text": "LogMessageSource" + } ], "path": "packages/kbn-logging/src/logger.ts", "deprecated": false, @@ -227,7 +269,7 @@ "tags": [], "label": "meta", "description": [ - "-" + "- The ECS meta to attach to the log entry" ], "signature": [ "Meta | undefined" @@ -247,7 +289,7 @@ "tags": [], "label": "warn", "description": [ - "\nLogs abnormal or unexpected errors or messages" + "\nLogs abnormal or unexpected errors or messages\n" ], "signature": [ "(errorOrMessage: string | Error, meta?: Meta | undefined) => void" + ">(errorOrMessage: Error | ", + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.LogMessageSource", + "text": "LogMessageSource" + }, + ", meta?: Meta | undefined) => void" ], "path": "packages/kbn-logging/src/logger.ts", "deprecated": false, @@ -279,10 +329,17 @@ "tags": [], "label": "errorOrMessage", "description": [ - "- An Error object or message string to log" + "- An Error object, message string, or function returning the log message" ], "signature": [ - "string | Error" + "Error | ", + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.LogMessageSource", + "text": "LogMessageSource" + } ], "path": "packages/kbn-logging/src/logger.ts", "deprecated": false, @@ -296,7 +353,7 @@ "tags": [], "label": "meta", "description": [ - "-" + "- The ECS meta to attach to the log entry" ], "signature": [ "Meta | undefined" @@ -335,7 +392,15 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - ">(errorOrMessage: string | Error, meta?: Meta | undefined) => void" + ">(errorOrMessage: Error | ", + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.LogMessageSource", + "text": "LogMessageSource" + }, + ", meta?: Meta | undefined) => void" ], "path": "packages/kbn-logging/src/logger.ts", "deprecated": false, @@ -348,10 +413,17 @@ "tags": [], "label": "errorOrMessage", "description": [ - "- An Error object or message string to log" + "- An Error object, message string, or function returning the log message" ], "signature": [ - "string | Error" + "Error | ", + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.LogMessageSource", + "text": "LogMessageSource" + } ], "path": "packages/kbn-logging/src/logger.ts", "deprecated": false, @@ -365,7 +437,7 @@ "tags": [], "label": "meta", "description": [ - "-" + "- The ECS meta to attach to the log entry" ], "signature": [ "Meta | undefined" @@ -404,7 +476,15 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - ">(errorOrMessage: string | Error, meta?: Meta | undefined) => void" + ">(errorOrMessage: Error | ", + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.LogMessageSource", + "text": "LogMessageSource" + }, + ", meta?: Meta | undefined) => void" ], "path": "packages/kbn-logging/src/logger.ts", "deprecated": false, @@ -417,10 +497,17 @@ "tags": [], "label": "errorOrMessage", "description": [ - "- An Error object or message string to log" + "- An Error object, message string, or function returning the log message" ], "signature": [ - "string | Error" + "Error | ", + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.LogMessageSource", + "text": "LogMessageSource" + } ], "path": "packages/kbn-logging/src/logger.ts", "deprecated": false, @@ -434,7 +521,7 @@ "tags": [], "label": "meta", "description": [ - "-" + "- The ECS meta to attach to the log entry" ], "signature": [ "Meta | undefined" @@ -591,6 +678,21 @@ ], "enums": [], "misc": [ + { + "parentPluginId": "@kbn/logging", + "id": "def-common.LogMessageSource", + "type": "Type", + "tags": [], + "label": "LogMessageSource", + "description": [], + "signature": [ + "string | (() => string)" + ], + "path": "packages/kbn-logging/src/logger.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/logging", "id": "def-common.LogMeta", diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index f06a2551c9ac1d..d3a88fe215040e 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 27 | 0 | 1 | 2 | +| 28 | 0 | 2 | 2 | ## Common diff --git a/api_docs/kbn_logging_mocks.devdocs.json b/api_docs/kbn_logging_mocks.devdocs.json index 39e3725849b914..d6ea4b3f63b00d 100644 --- a/api_docs/kbn_logging_mocks.devdocs.json +++ b/api_docs/kbn_logging_mocks.devdocs.json @@ -30,7 +30,15 @@ "label": "MockedLogger", "description": [], "signature": [ - "{ trace: jest.MockInstance; debug: jest.MockInstance; debug: jest.MockInstance; info: jest.MockInstance; info: jest.MockInstance; warn: jest.MockInstance; warn: jest.MockInstance; error: jest.MockInstance; error: jest.MockInstance; fatal: jest.MockInstance; fatal: jest.MockInstance; debug: jest.MockInstance; debug: jest.MockInstance; info: jest.MockInstance; info: jest.MockInstance; warn: jest.MockInstance; warn: jest.MockInstance; error: jest.MockInstance; error: jest.MockInstance; fatal: jest.MockInstance; fatal: jest.MockInstance { debug: [message: string, meta?: ", + ") => { debug: ([string] | [string, ", { "pluginId": "@kbn/logging", "scope": "common", @@ -287,7 +383,7 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - " | undefined][]; error: [errorOrMessage: string | Error, meta?: ", + " | undefined])[]; error: ([string | Error] | [string | Error, ", { "pluginId": "@kbn/logging", "scope": "common", @@ -295,7 +391,7 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - " | undefined][]; fatal: [errorOrMessage: string | Error, meta?: ", + " | undefined])[]; fatal: ([string | Error] | [string | Error, ", { "pluginId": "@kbn/logging", "scope": "common", @@ -303,7 +399,7 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - " | undefined][]; info: [message: string, meta?: ", + " | undefined])[]; info: ([string] | [string, ", { "pluginId": "@kbn/logging", "scope": "common", @@ -311,9 +407,9 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - " | undefined][]; log: [record: ", + " | undefined])[]; log: [record: ", "LogRecord", - "][]; trace: [message: string, meta?: ", + "][]; trace: ([string] | [string, ", { "pluginId": "@kbn/logging", "scope": "common", @@ -321,7 +417,7 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - " | undefined][]; warn: [errorOrMessage: string | Error, meta?: ", + " | undefined])[]; warn: ([string | Error] | [string | Error, ", { "pluginId": "@kbn/logging", "scope": "common", @@ -329,7 +425,7 @@ "section": "def-common.LogMeta", "text": "LogMeta" }, - " | undefined][]; }" + " | undefined])[]; }" ], "path": "packages/kbn-logging-mocks/src/logger.mock.ts", "deprecated": false, @@ -344,7 +440,15 @@ "label": "logger", "description": [], "signature": [ - "{ trace: jest.MockInstance; debug: jest.MockInstance; debug: jest.MockInstance; info: jest.MockInstance; info: jest.MockInstance; warn: jest.MockInstance; warn: jest.MockInstance; error: jest.MockInstance; error: jest.MockInstance; fatal: jest.MockInstance; fatal: jest.MockInstance Promise<", + ") => Promise<", { "pluginId": "@kbn/ml-agg-utils", "scope": "common", @@ -126,171 +114,27 @@ "id": "def-common.fetchAggIntervals.$1", "type": "Object", "tags": [], - "label": "client", + "label": "params", "description": [ - "- The Elasticsearch client." - ], - "signature": [ - { - "pluginId": "@kbn/core-elasticsearch-server", - "scope": "common", - "docId": "kibKbnCoreElasticsearchServerPluginApi", - "section": "def-common.ElasticsearchClient", - "text": "ElasticsearchClient" - } - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchAggIntervals.$2", - "type": "string", - "tags": [], - "label": "indexPattern", - "description": [ - "- The index pattern to search." - ], - "signature": [ - "string" - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchAggIntervals.$3", - "type": "Object", - "tags": [], - "label": "query", - "description": [ - "- The query to filter documents." - ], - "signature": [ - "QueryDslQueryContainer" - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchAggIntervals.$4", - "type": "Array", - "tags": [], - "label": "fields", - "description": [ - "- An array of field definitions for which aggregation intervals are requested." + "- The parameters for fetching aggregation intervals." ], "signature": [ { "pluginId": "@kbn/ml-agg-utils", "scope": "common", "docId": "kibKbnMlAggUtilsPluginApi", - "section": "def-common.HistogramField", - "text": "HistogramField" - }, - "[]" - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchAggIntervals.$5", - "type": "number", - "tags": [], - "label": "samplerShardSize", - "description": [ - "- The shard size parameter for sampling aggregations. A value less than 1 indicates no sampling." - ], - "signature": [ - "number" + "section": "def-common.FetchAggIntervalsParams", + "text": "FetchAggIntervalsParams" + } ], "path": "x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts", "deprecated": false, "trackAdoption": false, "isRequired": true - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchAggIntervals.$6", - "type": "Object", - "tags": [], - "label": "runtimeMappings", - "description": [ - "- Optional runtime mappings to apply." - ], - "signature": [ - "MappingRuntimeFields", - " | undefined" - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchAggIntervals.$7", - "type": "Object", - "tags": [], - "label": "abortSignal", - "description": [ - "- Optional AbortSignal for canceling the request." - ], - "signature": [ - "AbortSignal | undefined" - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchAggIntervals.$8", - "type": "number", - "tags": [], - "label": "randomSamplerProbability", - "description": [ - "- Optional probability value for random sampling." - ], - "signature": [ - "number | undefined" - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchAggIntervals.$9", - "type": "number", - "tags": [], - "label": "randomSamplerSeed", - "description": [ - "- Optional seed value for random sampling." - ], - "signature": [ - "number | undefined" - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false } ], "returnComment": [ - "A promise that resolves to a map of aggregation intervals for the specified fields." + "A promise that resolves to a map of numeric column statistics." ], "initialIsOpen": false }, @@ -301,28 +145,10 @@ "tags": [], "label": "fetchHistogramsForFields", "description": [ - "\nFetches data to be used in mini histogram charts. Supports auto-identifying\nthe histogram interval and min/max values.\n" + "\nAsynchronously fetches histograms for specified fields from an Elasticsearch client.\n" ], "signature": [ - "(client: ", - { - "pluginId": "@kbn/core-elasticsearch-server", - "scope": "common", - "docId": "kibKbnCoreElasticsearchServerPluginApi", - "section": "def-common.ElasticsearchClient", - "text": "ElasticsearchClient" - }, - ", indexPattern: string, query: any, fields: ", - { - "pluginId": "@kbn/ml-agg-utils", - "scope": "common", - "docId": "kibKbnMlAggUtilsPluginApi", - "section": "def-common.FieldsForHistograms", - "text": "FieldsForHistograms" - }, - ", samplerShardSize: number, runtimeMappings?: ", - "MappingRuntimeFields", - " | undefined, abortSignal?: AbortSignal | undefined, randomSamplerProbability?: number | undefined, randomSamplerSeed?: number | undefined) => Promise<(", + "(params: FetchHistogramsForFieldsParams) => Promise<(", { "pluginId": "@kbn/ml-agg-utils", "scope": "common", @@ -341,170 +167,21 @@ "id": "def-common.fetchHistogramsForFields.$1", "type": "Object", "tags": [], - "label": "client", + "label": "params", "description": [ - "Elasticsearch Client" + "The parameters for fetching histograms." ], "signature": [ - { - "pluginId": "@kbn/core-elasticsearch-server", - "scope": "common", - "docId": "kibKbnCoreElasticsearchServerPluginApi", - "section": "def-common.ElasticsearchClient", - "text": "ElasticsearchClient" - } + "FetchHistogramsForFieldsParams" ], "path": "x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts", "deprecated": false, "trackAdoption": false, "isRequired": true - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchHistogramsForFields.$2", - "type": "string", - "tags": [], - "label": "indexPattern", - "description": [ - "index pattern to be queried" - ], - "signature": [ - "string" - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchHistogramsForFields.$3", - "type": "Any", - "tags": [], - "label": "query", - "description": [ - "Elasticsearch query" - ], - "signature": [ - "any" - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchHistogramsForFields.$4", - "type": "Array", - "tags": [], - "label": "fields", - "description": [ - "the fields the histograms should be generated for" - ], - "signature": [ - { - "pluginId": "@kbn/ml-agg-utils", - "scope": "common", - "docId": "kibKbnMlAggUtilsPluginApi", - "section": "def-common.FieldsForHistograms", - "text": "FieldsForHistograms" - } - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchHistogramsForFields.$5", - "type": "number", - "tags": [], - "label": "samplerShardSize", - "description": [ - "shard_size parameter of the sampler aggregation" - ], - "signature": [ - "number" - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchHistogramsForFields.$6", - "type": "Object", - "tags": [], - "label": "runtimeMappings", - "description": [ - "optional runtime mappings" - ], - "signature": [ - "MappingRuntimeFields", - " | undefined" - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchHistogramsForFields.$7", - "type": "Object", - "tags": [], - "label": "abortSignal", - "description": [ - "optional abort signal" - ], - "signature": [ - "AbortSignal | undefined" - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchHistogramsForFields.$8", - "type": "number", - "tags": [], - "label": "randomSamplerProbability", - "description": [ - "optional random sampler probability" - ], - "signature": [ - "number | undefined" - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - }, - { - "parentPluginId": "@kbn/ml-agg-utils", - "id": "def-common.fetchHistogramsForFields.$9", - "type": "number", - "tags": [], - "label": "randomSamplerSeed", - "description": [ - "optional random sampler seed" - ], - "signature": [ - "number | undefined" - ], - "path": "x-pack/packages/ml/agg_utils/src/fetch_histograms_for_fields.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false } ], "returnComment": [ - "an array of histogram data for each supplied field" + "A promise that resolves with the fetched histograms." ], "initialIsOpen": false }, @@ -821,6 +498,1304 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/ml-agg-utils", + "id": "def-common.FetchAggIntervalsParams", + "type": "Interface", + "tags": [], + "label": "FetchAggIntervalsParams", + "description": [ + "\nInterface for the parameters required to fetch aggregation intervals." + ], + "path": "x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-agg-utils", + "id": "def-common.FetchAggIntervalsParams.esClient", + "type": "Object", + "tags": [], + "label": "esClient", + "description": [ + "The Elasticsearch client to use for the query." + ], + "signature": [ + "{ create: { (this: That, params: ", + "CreateRequest", + " | ", + "CreateRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "WriteResponseBase", + ">; (this: That, params: ", + "CreateRequest", + " | ", + "CreateRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "WriteResponseBase", + ", unknown>>; (this: That, params: ", + "CreateRequest", + " | ", + "CreateRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "WriteResponseBase", + ">; }; update: { (this: That, params: ", + "UpdateRequest", + " | ", + "UpdateRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "UpdateResponse", + ">; (this: That, params: ", + "UpdateRequest", + " | ", + "UpdateRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "UpdateResponse", + ", unknown>>; (this: That, params: ", + "UpdateRequest", + " | ", + "UpdateRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "UpdateResponse", + ">; }; get: { (this: That, params: ", + "GetRequest", + " | ", + "GetRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "GetResponse", + ">; (this: That, params: ", + "GetRequest", + " | ", + "GetRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "GetResponse", + ", unknown>>; (this: That, params: ", + "GetRequest", + " | ", + "GetRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "GetResponse", + ">; }; delete: { (this: That, params: ", + "DeleteRequest", + " | ", + "DeleteRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "WriteResponseBase", + ">; (this: That, params: ", + "DeleteRequest", + " | ", + "DeleteRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "WriteResponseBase", + ", unknown>>; (this: That, params: ", + "DeleteRequest", + " | ", + "DeleteRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "WriteResponseBase", + ">; }; helpers: ", + "default", + "; search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + "default", + "; child: (opts: ", + "ClientOptions", + ") => ", + "default", + "; asyncSearch: ", + "default", + "; autoscaling: ", + "default", + "; bulk: { (this: That, params: ", + "BulkRequest", + " | ", + "BulkRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "BulkResponse", + ">; (this: That, params: ", + "BulkRequest", + " | ", + "BulkRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "BulkResponse", + ", unknown>>; (this: That, params: ", + "BulkRequest", + " | ", + "BulkRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "BulkResponse", + ">; }; cat: ", + "default", + "; ccr: ", + "default", + "; clearScroll: { (this: That, params?: ", + "ClearScrollRequest", + " | ", + "ClearScrollRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "ClearScrollResponse", + ">; (this: That, params?: ", + "ClearScrollRequest", + " | ", + "ClearScrollRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "ClearScrollResponse", + ", unknown>>; (this: That, params?: ", + "ClearScrollRequest", + " | ", + "ClearScrollRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "ClearScrollResponse", + ">; }; closePointInTime: { (this: That, params: ", + "ClosePointInTimeRequest", + " | ", + "ClosePointInTimeRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "ClosePointInTimeResponse", + ">; (this: That, params: ", + "ClosePointInTimeRequest", + " | ", + "ClosePointInTimeRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "ClosePointInTimeResponse", + ", unknown>>; (this: That, params: ", + "ClosePointInTimeRequest", + " | ", + "ClosePointInTimeRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "ClosePointInTimeResponse", + ">; }; cluster: ", + "default", + "; count: { (this: That, params?: ", + "CountRequest", + " | ", + "CountRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "CountResponse", + ">; (this: That, params?: ", + "CountRequest", + " | ", + "CountRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "CountResponse", + ", unknown>>; (this: That, params?: ", + "CountRequest", + " | ", + "CountRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "CountResponse", + ">; }; danglingIndices: ", + "default", + "; deleteByQuery: { (this: That, params: ", + "DeleteByQueryRequest", + " | ", + "DeleteByQueryRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "DeleteByQueryResponse", + ">; (this: That, params: ", + "DeleteByQueryRequest", + " | ", + "DeleteByQueryRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "DeleteByQueryResponse", + ", unknown>>; (this: That, params: ", + "DeleteByQueryRequest", + " | ", + "DeleteByQueryRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "DeleteByQueryResponse", + ">; }; deleteByQueryRethrottle: { (this: That, params: ", + "DeleteByQueryRethrottleRequest", + " | ", + "DeleteByQueryRethrottleRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "TasksTaskListResponseBase", + ">; (this: That, params: ", + "DeleteByQueryRethrottleRequest", + " | ", + "DeleteByQueryRethrottleRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "TasksTaskListResponseBase", + ", unknown>>; (this: That, params: ", + "DeleteByQueryRethrottleRequest", + " | ", + "DeleteByQueryRethrottleRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "TasksTaskListResponseBase", + ">; }; deleteScript: { (this: That, params: ", + "DeleteScriptRequest", + " | ", + "DeleteScriptRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "AcknowledgedResponseBase", + ">; (this: That, params: ", + "DeleteScriptRequest", + " | ", + "DeleteScriptRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "AcknowledgedResponseBase", + ", unknown>>; (this: That, params: ", + "DeleteScriptRequest", + " | ", + "DeleteScriptRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "AcknowledgedResponseBase", + ">; }; enrich: ", + "default", + "; eql: ", + "default", + "; esql: ", + "default", + "; exists: { (this: That, params: ", + "ExistsRequest", + " | ", + "ExistsRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise; (this: That, params: ", + "ExistsRequest", + " | ", + "ExistsRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + ">; (this: That, params: ", + "ExistsRequest", + " | ", + "ExistsRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise; }; existsSource: { (this: That, params: ", + "ExistsSourceRequest", + " | ", + "ExistsSourceRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise; (this: That, params: ", + "ExistsSourceRequest", + " | ", + "ExistsSourceRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + ">; (this: That, params: ", + "ExistsSourceRequest", + " | ", + "ExistsSourceRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise; }; explain: { (this: That, params: ", + "ExplainRequest", + " | ", + "ExplainRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "ExplainResponse", + ">; (this: That, params: ", + "ExplainRequest", + " | ", + "ExplainRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "ExplainResponse", + ", unknown>>; (this: That, params: ", + "ExplainRequest", + " | ", + "ExplainRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "ExplainResponse", + ">; }; features: ", + "default", + "; fieldCaps: { (this: That, params?: ", + "FieldCapsRequest", + " | ", + "FieldCapsRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "FieldCapsResponse", + ">; (this: That, params?: ", + "FieldCapsRequest", + " | ", + "FieldCapsRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "FieldCapsResponse", + ", unknown>>; (this: That, params?: ", + "FieldCapsRequest", + " | ", + "FieldCapsRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "FieldCapsResponse", + ">; }; fleet: ", + "default", + "; getScript: { (this: That, params: ", + "GetScriptRequest", + " | ", + "GetScriptRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "GetScriptResponse", + ">; (this: That, params: ", + "GetScriptRequest", + " | ", + "GetScriptRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "GetScriptResponse", + ", unknown>>; (this: That, params: ", + "GetScriptRequest", + " | ", + "GetScriptRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "GetScriptResponse", + ">; }; getScriptContext: { (this: That, params?: ", + "GetScriptContextRequest", + " | ", + "GetScriptContextRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "GetScriptContextResponse", + ">; (this: That, params?: ", + "GetScriptContextRequest", + " | ", + "GetScriptContextRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "GetScriptContextResponse", + ", unknown>>; (this: That, params?: ", + "GetScriptContextRequest", + " | ", + "GetScriptContextRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "GetScriptContextResponse", + ">; }; getScriptLanguages: { (this: That, params?: ", + "GetScriptLanguagesRequest", + " | ", + "GetScriptLanguagesRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "GetScriptLanguagesResponse", + ">; (this: That, params?: ", + "GetScriptLanguagesRequest", + " | ", + "GetScriptLanguagesRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "GetScriptLanguagesResponse", + ", unknown>>; (this: That, params?: ", + "GetScriptLanguagesRequest", + " | ", + "GetScriptLanguagesRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "GetScriptLanguagesResponse", + ">; }; getSource: { (this: That, params: ", + "GetSourceRequest", + " | ", + "GetSourceRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise; (this: That, params: ", + "GetSourceRequest", + " | ", + "GetSourceRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + ">; (this: That, params: ", + "GetSourceRequest", + " | ", + "GetSourceRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise; }; graph: ", + "default", + "; healthReport: { (this: That, params?: ", + "HealthReportRequest", + " | ", + "HealthReportRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "HealthReportResponse", + ">; (this: That, params?: ", + "HealthReportRequest", + " | ", + "HealthReportRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "HealthReportResponse", + ", unknown>>; (this: That, params?: ", + "HealthReportRequest", + " | ", + "HealthReportRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "HealthReportResponse", + ">; }; ilm: ", + "default", + "; index: { (this: That, params: ", + "IndexRequest", + " | ", + "IndexRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "WriteResponseBase", + ">; (this: That, params: ", + "IndexRequest", + " | ", + "IndexRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "WriteResponseBase", + ", unknown>>; (this: That, params: ", + "IndexRequest", + " | ", + "IndexRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "WriteResponseBase", + ">; }; indices: ", + "default", + "; inference: ", + "default", + "; info: { (this: That, params?: ", + "InfoRequest", + " | ", + "InfoRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "InfoResponse", + ">; (this: That, params?: ", + "InfoRequest", + " | ", + "InfoRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "InfoResponse", + ", unknown>>; (this: That, params?: ", + "InfoRequest", + " | ", + "InfoRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "InfoResponse", + ">; }; ingest: ", + "default", + "; knnSearch: { (this: That, params: ", + "KnnSearchRequest", + " | ", + "KnnSearchRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "KnnSearchResponse", + ">; (this: That, params: ", + "KnnSearchRequest", + " | ", + "KnnSearchRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "KnnSearchResponse", + ", unknown>>; (this: That, params: ", + "KnnSearchRequest", + " | ", + "KnnSearchRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "KnnSearchResponse", + ">; }; license: ", + "default", + "; logstash: ", + "default", + "; mget: { (this: That, params?: ", + "MgetRequest", + " | ", + "MgetRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "MgetResponse", + ">; (this: That, params?: ", + "MgetRequest", + " | ", + "MgetRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "MgetResponse", + ", unknown>>; (this: That, params?: ", + "MgetRequest", + " | ", + "MgetRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "MgetResponse", + ">; }; migration: ", + "default", + "; ml: ", + "default", + "; monitoring: ", + "default", + "; msearch: { >(this: That, params: ", + "MsearchRequest", + " | ", + "MsearchRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "MsearchResponse", + ">; >(this: That, params: ", + "MsearchRequest", + " | ", + "MsearchRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "MsearchResponse", + ", unknown>>; >(this: That, params: ", + "MsearchRequest", + " | ", + "MsearchRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "MsearchResponse", + ">; }; msearchTemplate: { >(this: That, params: ", + "MsearchTemplateRequest", + " | ", + "MsearchTemplateRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "MsearchTemplateResponse", + ">; >(this: That, params: ", + "MsearchTemplateRequest", + " | ", + "MsearchTemplateRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "MsearchTemplateResponse", + ", unknown>>; >(this: That, params: ", + "MsearchTemplateRequest", + " | ", + "MsearchTemplateRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "MsearchTemplateResponse", + ">; }; mtermvectors: { (this: That, params?: ", + "MtermvectorsRequest", + " | ", + "MtermvectorsRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "MtermvectorsResponse", + ">; (this: That, params?: ", + "MtermvectorsRequest", + " | ", + "MtermvectorsRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "MtermvectorsResponse", + ", unknown>>; (this: That, params?: ", + "MtermvectorsRequest", + " | ", + "MtermvectorsRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "MtermvectorsResponse", + ">; }; nodes: ", + "default", + "; openPointInTime: { (this: That, params: ", + "OpenPointInTimeRequest", + " | ", + "OpenPointInTimeRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "OpenPointInTimeResponse", + ">; (this: That, params: ", + "OpenPointInTimeRequest", + " | ", + "OpenPointInTimeRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "OpenPointInTimeResponse", + ", unknown>>; (this: That, params: ", + "OpenPointInTimeRequest", + " | ", + "OpenPointInTimeRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "OpenPointInTimeResponse", + ">; }; ping: { (this: That, params?: ", + "PingRequest", + " | ", + "PingRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise; (this: That, params?: ", + "PingRequest", + " | ", + "PingRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + ">; (this: That, params?: ", + "PingRequest", + " | ", + "PingRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise; }; putScript: { (this: That, params: ", + "PutScriptRequest", + " | ", + "PutScriptRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "AcknowledgedResponseBase", + ">; (this: That, params: ", + "PutScriptRequest", + " | ", + "PutScriptRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "AcknowledgedResponseBase", + ", unknown>>; (this: That, params: ", + "PutScriptRequest", + " | ", + "PutScriptRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "AcknowledgedResponseBase", + ">; }; queryRuleset: ", + "default", + "; rankEval: { (this: That, params: ", + "RankEvalRequest", + " | ", + "RankEvalRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "RankEvalResponse", + ">; (this: That, params: ", + "RankEvalRequest", + " | ", + "RankEvalRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "RankEvalResponse", + ", unknown>>; (this: That, params: ", + "RankEvalRequest", + " | ", + "RankEvalRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "RankEvalResponse", + ">; }; reindex: { (this: That, params: ", + "ReindexRequest", + " | ", + "ReindexRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "ReindexResponse", + ">; (this: That, params: ", + "ReindexRequest", + " | ", + "ReindexRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "ReindexResponse", + ", unknown>>; (this: That, params: ", + "ReindexRequest", + " | ", + "ReindexRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "ReindexResponse", + ">; }; reindexRethrottle: { (this: That, params: ", + "ReindexRethrottleRequest", + " | ", + "ReindexRethrottleRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "ReindexRethrottleResponse", + ">; (this: That, params: ", + "ReindexRethrottleRequest", + " | ", + "ReindexRethrottleRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "ReindexRethrottleResponse", + ", unknown>>; (this: That, params: ", + "ReindexRethrottleRequest", + " | ", + "ReindexRethrottleRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "ReindexRethrottleResponse", + ">; }; renderSearchTemplate: { (this: That, params?: ", + "RenderSearchTemplateRequest", + " | ", + "RenderSearchTemplateRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "RenderSearchTemplateResponse", + ">; (this: That, params?: ", + "RenderSearchTemplateRequest", + " | ", + "RenderSearchTemplateRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "RenderSearchTemplateResponse", + ", unknown>>; (this: That, params?: ", + "RenderSearchTemplateRequest", + " | ", + "RenderSearchTemplateRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "RenderSearchTemplateResponse", + ">; }; rollup: ", + "default", + "; scriptsPainlessExecute: { (this: That, params?: ", + "ScriptsPainlessExecuteRequest", + " | ", + "ScriptsPainlessExecuteRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "ScriptsPainlessExecuteResponse", + ">; (this: That, params?: ", + "ScriptsPainlessExecuteRequest", + " | ", + "ScriptsPainlessExecuteRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "ScriptsPainlessExecuteResponse", + ", unknown>>; (this: That, params?: ", + "ScriptsPainlessExecuteRequest", + " | ", + "ScriptsPainlessExecuteRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "ScriptsPainlessExecuteResponse", + ">; }; scroll: { >(this: That, params: ", + "ScrollRequest", + " | ", + "ScrollRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "ScrollResponse", + ">; >(this: That, params: ", + "ScrollRequest", + " | ", + "ScrollRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "ScrollResponse", + ", unknown>>; >(this: That, params: ", + "ScrollRequest", + " | ", + "ScrollRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "ScrollResponse", + ">; }; searchApplication: ", + "default", + "; searchMvt: { (this: That, params: ", + "SearchMvtRequest", + " | ", + "SearchMvtRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise; (this: That, params: ", + "SearchMvtRequest", + " | ", + "SearchMvtRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + ">; (this: That, params: ", + "SearchMvtRequest", + " | ", + "SearchMvtRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise; }; searchShards: { (this: That, params?: ", + "SearchShardsRequest", + " | ", + "SearchShardsRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchShardsResponse", + ">; (this: That, params?: ", + "SearchShardsRequest", + " | ", + "SearchShardsRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchShardsResponse", + ", unknown>>; (this: That, params?: ", + "SearchShardsRequest", + " | ", + "SearchShardsRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchShardsResponse", + ">; }; searchTemplate: { (this: That, params?: ", + "SearchTemplateRequest", + " | ", + "SearchTemplateRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchTemplateResponse", + ">; (this: That, params?: ", + "SearchTemplateRequest", + " | ", + "SearchTemplateRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchTemplateResponse", + ", unknown>>; (this: That, params?: ", + "SearchTemplateRequest", + " | ", + "SearchTemplateRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchTemplateResponse", + ">; }; searchableSnapshots: ", + "default", + "; security: ", + "default", + "; shutdown: ", + "default", + "; slm: ", + "default", + "; snapshot: ", + "default", + "; sql: ", + "default", + "; ssl: ", + "default", + "; synonyms: ", + "default", + "; tasks: ", + "default", + "; termsEnum: { (this: That, params: ", + "TermsEnumRequest", + " | ", + "TermsEnumRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "TermsEnumResponse", + ">; (this: That, params: ", + "TermsEnumRequest", + " | ", + "TermsEnumRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "TermsEnumResponse", + ", unknown>>; (this: That, params: ", + "TermsEnumRequest", + " | ", + "TermsEnumRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "TermsEnumResponse", + ">; }; termvectors: { (this: That, params: ", + "TermvectorsRequest", + " | ", + "TermvectorsRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "TermvectorsResponse", + ">; (this: That, params: ", + "TermvectorsRequest", + " | ", + "TermvectorsRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "TermvectorsResponse", + ", unknown>>; (this: That, params: ", + "TermvectorsRequest", + " | ", + "TermvectorsRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "TermvectorsResponse", + ">; }; textStructure: ", + "default", + "; transform: ", + "default", + "; updateByQuery: { (this: That, params: ", + "UpdateByQueryRequest", + " | ", + "UpdateByQueryRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "UpdateByQueryResponse", + ">; (this: That, params: ", + "UpdateByQueryRequest", + " | ", + "UpdateByQueryRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "UpdateByQueryResponse", + ", unknown>>; (this: That, params: ", + "UpdateByQueryRequest", + " | ", + "UpdateByQueryRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "UpdateByQueryResponse", + ">; }; updateByQueryRethrottle: { (this: That, params: ", + "UpdateByQueryRethrottleRequest", + " | ", + "UpdateByQueryRethrottleRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "UpdateByQueryRethrottleResponse", + ">; (this: That, params: ", + "UpdateByQueryRethrottleRequest", + " | ", + "UpdateByQueryRethrottleRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "UpdateByQueryRethrottleResponse", + ", unknown>>; (this: That, params: ", + "UpdateByQueryRethrottleRequest", + " | ", + "UpdateByQueryRethrottleRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "UpdateByQueryRethrottleResponse", + ">; }; watcher: ", + "default", + "; xpack: ", + "default", + "; }" + ], + "path": "x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/ml-agg-utils", + "id": "def-common.FetchAggIntervalsParams.abortSignal", + "type": "Object", + "tags": [], + "label": "abortSignal", + "description": [ + "An optional abort signal to cancel the request." + ], + "signature": [ + "AbortSignal | undefined" + ], + "path": "x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/ml-agg-utils", + "id": "def-common.FetchAggIntervalsParams.arguments", + "type": "Object", + "tags": [], + "label": "arguments", + "description": [ + "The arguments for the aggregation query." + ], + "signature": [ + "{ indexPattern: string; query: ", + "QueryDslQueryContainer", + "; fields: ", + { + "pluginId": "@kbn/ml-agg-utils", + "scope": "common", + "docId": "kibKbnMlAggUtilsPluginApi", + "section": "def-common.HistogramField", + "text": "HistogramField" + }, + "[]; samplerShardSize: number; runtimeMappings?: ", + "MappingRuntimeFields", + " | undefined; randomSamplerProbability?: number | undefined; randomSamplerSeed?: number | undefined; }" + ], + "path": "x-pack/packages/ml/agg_utils/src/fetch_agg_intervals.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/ml-agg-utils", "id": "def-common.FieldValuePair", diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index af2c679cfa10a6..ff022fd4098b44 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 102 | 2 | 0 | 0 | +| 90 | 1 | 0 | 0 | ## Common diff --git a/api_docs/kbn_ml_anomaly_utils.mdx b/api_docs/kbn_ml_anomaly_utils.mdx index e37572ac71c784..61537f4a1be4ca 100644 --- a/api_docs/kbn_ml_anomaly_utils.mdx +++ b/api_docs/kbn_ml_anomaly_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-anomaly-utils title: "@kbn/ml-anomaly-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-anomaly-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-anomaly-utils'] --- import kbnMlAnomalyUtilsObj from './kbn_ml_anomaly_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_cancellable_search.mdx b/api_docs/kbn_ml_cancellable_search.mdx index 8fd567c3af8209..1006c08221c4b2 100644 --- a/api_docs/kbn_ml_cancellable_search.mdx +++ b/api_docs/kbn_ml_cancellable_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-cancellable-search title: "@kbn/ml-cancellable-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-cancellable-search plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-cancellable-search'] --- import kbnMlCancellableSearchObj from './kbn_ml_cancellable_search.devdocs.json'; diff --git a/api_docs/kbn_ml_category_validator.mdx b/api_docs/kbn_ml_category_validator.mdx index 5439d2962d8507..f9c0a415626417 100644 --- a/api_docs/kbn_ml_category_validator.mdx +++ b/api_docs/kbn_ml_category_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-category-validator title: "@kbn/ml-category-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-category-validator plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-category-validator'] --- import kbnMlCategoryValidatorObj from './kbn_ml_category_validator.devdocs.json'; diff --git a/api_docs/kbn_ml_chi2test.mdx b/api_docs/kbn_ml_chi2test.mdx index 59f50baf9de510..7244fc9f1399f6 100644 --- a/api_docs/kbn_ml_chi2test.mdx +++ b/api_docs/kbn_ml_chi2test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-chi2test title: "@kbn/ml-chi2test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-chi2test plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-chi2test'] --- import kbnMlChi2testObj from './kbn_ml_chi2test.devdocs.json'; diff --git a/api_docs/kbn_ml_data_frame_analytics_utils.mdx b/api_docs/kbn_ml_data_frame_analytics_utils.mdx index fc230ff07712c5..55b9791fa27337 100644 --- a/api_docs/kbn_ml_data_frame_analytics_utils.mdx +++ b/api_docs/kbn_ml_data_frame_analytics_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-frame-analytics-utils title: "@kbn/ml-data-frame-analytics-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-frame-analytics-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-frame-analytics-utils'] --- import kbnMlDataFrameAnalyticsUtilsObj from './kbn_ml_data_frame_analytics_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_data_grid.mdx b/api_docs/kbn_ml_data_grid.mdx index 5695dc0f25cf94..65980b4809fb96 100644 --- a/api_docs/kbn_ml_data_grid.mdx +++ b/api_docs/kbn_ml_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-grid title: "@kbn/ml-data-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-grid plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-grid'] --- import kbnMlDataGridObj from './kbn_ml_data_grid.devdocs.json'; diff --git a/api_docs/kbn_ml_date_picker.mdx b/api_docs/kbn_ml_date_picker.mdx index 33f2bc1e6384dc..02491f27034d16 100644 --- a/api_docs/kbn_ml_date_picker.mdx +++ b/api_docs/kbn_ml_date_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-picker title: "@kbn/ml-date-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-picker plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-picker'] --- import kbnMlDatePickerObj from './kbn_ml_date_picker.devdocs.json'; diff --git a/api_docs/kbn_ml_date_utils.mdx b/api_docs/kbn_ml_date_utils.mdx index 7c8f3607acb952..45eff4760ee26e 100644 --- a/api_docs/kbn_ml_date_utils.mdx +++ b/api_docs/kbn_ml_date_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-utils title: "@kbn/ml-date-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-utils'] --- import kbnMlDateUtilsObj from './kbn_ml_date_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_error_utils.mdx b/api_docs/kbn_ml_error_utils.mdx index 6239fcb1f1d8bc..ab69959755eca6 100644 --- a/api_docs/kbn_ml_error_utils.mdx +++ b/api_docs/kbn_ml_error_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-error-utils title: "@kbn/ml-error-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-error-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-error-utils'] --- import kbnMlErrorUtilsObj from './kbn_ml_error_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_in_memory_table.mdx b/api_docs/kbn_ml_in_memory_table.mdx index 06a5e0e84c3867..97f5b22c20e038 100644 --- a/api_docs/kbn_ml_in_memory_table.mdx +++ b/api_docs/kbn_ml_in_memory_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-in-memory-table title: "@kbn/ml-in-memory-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-in-memory-table plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-in-memory-table'] --- import kbnMlInMemoryTableObj from './kbn_ml_in_memory_table.devdocs.json'; diff --git a/api_docs/kbn_ml_is_defined.mdx b/api_docs/kbn_ml_is_defined.mdx index ddacc0c9e75803..0aa6a9294274c3 100644 --- a/api_docs/kbn_ml_is_defined.mdx +++ b/api_docs/kbn_ml_is_defined.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-defined title: "@kbn/ml-is-defined" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-defined plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-defined'] --- import kbnMlIsDefinedObj from './kbn_ml_is_defined.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index 31bacaf2d7c2e1..5bc58b4ab29e7b 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_kibana_theme.mdx b/api_docs/kbn_ml_kibana_theme.mdx index de01941b084cc5..30078356d43ffa 100644 --- a/api_docs/kbn_ml_kibana_theme.mdx +++ b/api_docs/kbn_ml_kibana_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-kibana-theme title: "@kbn/ml-kibana-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-kibana-theme plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-kibana-theme'] --- import kbnMlKibanaThemeObj from './kbn_ml_kibana_theme.devdocs.json'; diff --git a/api_docs/kbn_ml_local_storage.mdx b/api_docs/kbn_ml_local_storage.mdx index 05c124f998a367..c2fab682158a4b 100644 --- a/api_docs/kbn_ml_local_storage.mdx +++ b/api_docs/kbn_ml_local_storage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-local-storage title: "@kbn/ml-local-storage" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-local-storage plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-local-storage'] --- import kbnMlLocalStorageObj from './kbn_ml_local_storage.devdocs.json'; diff --git a/api_docs/kbn_ml_nested_property.mdx b/api_docs/kbn_ml_nested_property.mdx index af58dd368889f8..0e71ba311f3cc8 100644 --- a/api_docs/kbn_ml_nested_property.mdx +++ b/api_docs/kbn_ml_nested_property.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-nested-property title: "@kbn/ml-nested-property" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-nested-property plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-nested-property'] --- import kbnMlNestedPropertyObj from './kbn_ml_nested_property.devdocs.json'; diff --git a/api_docs/kbn_ml_number_utils.mdx b/api_docs/kbn_ml_number_utils.mdx index a873ad2ca52be7..835039597aa7ff 100644 --- a/api_docs/kbn_ml_number_utils.mdx +++ b/api_docs/kbn_ml_number_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-number-utils title: "@kbn/ml-number-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-number-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-number-utils'] --- import kbnMlNumberUtilsObj from './kbn_ml_number_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index 0fcd6307c06f6d..0d109f34bc4f51 100644 --- a/api_docs/kbn_ml_query_utils.mdx +++ b/api_docs/kbn_ml_query_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-query-utils title: "@kbn/ml-query-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-query-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-query-utils'] --- import kbnMlQueryUtilsObj from './kbn_ml_query_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_random_sampler_utils.mdx b/api_docs/kbn_ml_random_sampler_utils.mdx index 0b007be3a66de7..efad24db230693 100644 --- a/api_docs/kbn_ml_random_sampler_utils.mdx +++ b/api_docs/kbn_ml_random_sampler_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-random-sampler-utils title: "@kbn/ml-random-sampler-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-random-sampler-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-random-sampler-utils'] --- import kbnMlRandomSamplerUtilsObj from './kbn_ml_random_sampler_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_route_utils.mdx b/api_docs/kbn_ml_route_utils.mdx index e7ce6f547f0616..c1fece43923f37 100644 --- a/api_docs/kbn_ml_route_utils.mdx +++ b/api_docs/kbn_ml_route_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-route-utils title: "@kbn/ml-route-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-route-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-route-utils'] --- import kbnMlRouteUtilsObj from './kbn_ml_route_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_runtime_field_utils.mdx b/api_docs/kbn_ml_runtime_field_utils.mdx index 9383a2ed07ea1f..74644502aff39b 100644 --- a/api_docs/kbn_ml_runtime_field_utils.mdx +++ b/api_docs/kbn_ml_runtime_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-runtime-field-utils title: "@kbn/ml-runtime-field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-runtime-field-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-runtime-field-utils'] --- import kbnMlRuntimeFieldUtilsObj from './kbn_ml_runtime_field_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index 463910bb46bc41..97462d503b78bd 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_time_buckets.mdx b/api_docs/kbn_ml_time_buckets.mdx index c6a8c34ee030a3..1c39672f5e2df2 100644 --- a/api_docs/kbn_ml_time_buckets.mdx +++ b/api_docs/kbn_ml_time_buckets.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-time-buckets title: "@kbn/ml-time-buckets" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-time-buckets plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-time-buckets'] --- import kbnMlTimeBucketsObj from './kbn_ml_time_buckets.devdocs.json'; diff --git a/api_docs/kbn_ml_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index 4d0a80d24677f3..acf4af07efdb0b 100644 --- a/api_docs/kbn_ml_trained_models_utils.mdx +++ b/api_docs/kbn_ml_trained_models_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-trained-models-utils title: "@kbn/ml-trained-models-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-trained-models-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-trained-models-utils'] --- import kbnMlTrainedModelsUtilsObj from './kbn_ml_trained_models_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_ui_actions.mdx b/api_docs/kbn_ml_ui_actions.mdx index d12dd3868dacd7..cb29649614e39c 100644 --- a/api_docs/kbn_ml_ui_actions.mdx +++ b/api_docs/kbn_ml_ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-ui-actions title: "@kbn/ml-ui-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-ui-actions plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-ui-actions'] --- import kbnMlUiActionsObj from './kbn_ml_ui_actions.devdocs.json'; diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index 5bdbce0fc07d95..6b6e2fe6d34fd5 100644 --- a/api_docs/kbn_ml_url_state.mdx +++ b/api_docs/kbn_ml_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-url-state title: "@kbn/ml-url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-url-state plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; diff --git a/api_docs/kbn_mock_idp_utils.mdx b/api_docs/kbn_mock_idp_utils.mdx index 2db0260104bdd4..88ac70409c1102 100644 --- a/api_docs/kbn_mock_idp_utils.mdx +++ b/api_docs/kbn_mock_idp_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mock-idp-utils title: "@kbn/mock-idp-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mock-idp-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mock-idp-utils'] --- import kbnMockIdpUtilsObj from './kbn_mock_idp_utils.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index b9a6c47279e2fa..cb50c19d04a9ad 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_object_versioning.mdx b/api_docs/kbn_object_versioning.mdx index 8565575126b651..dee6a9dcb42813 100644 --- a/api_docs/kbn_object_versioning.mdx +++ b/api_docs/kbn_object_versioning.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-object-versioning title: "@kbn/object-versioning" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/object-versioning plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/object-versioning'] --- import kbnObjectVersioningObj from './kbn_object_versioning.devdocs.json'; diff --git a/api_docs/kbn_observability_alert_details.mdx b/api_docs/kbn_observability_alert_details.mdx index 40175c1fd6d823..c405579e9f465f 100644 --- a/api_docs/kbn_observability_alert_details.mdx +++ b/api_docs/kbn_observability_alert_details.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alert-details title: "@kbn/observability-alert-details" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alert-details plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alert-details'] --- import kbnObservabilityAlertDetailsObj from './kbn_observability_alert_details.devdocs.json'; diff --git a/api_docs/kbn_observability_alerting_test_data.mdx b/api_docs/kbn_observability_alerting_test_data.mdx index 8b17b7d181a1eb..9924c95c9a34e1 100644 --- a/api_docs/kbn_observability_alerting_test_data.mdx +++ b/api_docs/kbn_observability_alerting_test_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alerting-test-data title: "@kbn/observability-alerting-test-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alerting-test-data plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alerting-test-data'] --- import kbnObservabilityAlertingTestDataObj from './kbn_observability_alerting_test_data.devdocs.json'; diff --git a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx index e5c6e5ade70429..2014c95c4c3487 100644 --- a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx +++ b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-get-padded-alert-time-range-util title: "@kbn/observability-get-padded-alert-time-range-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-get-padded-alert-time-range-util plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-get-padded-alert-time-range-util'] --- import kbnObservabilityGetPaddedAlertTimeRangeUtilObj from './kbn_observability_get_padded_alert_time_range_util.devdocs.json'; diff --git a/api_docs/kbn_openapi_bundler.mdx b/api_docs/kbn_openapi_bundler.mdx index b6b3817c48a397..61e6f419b90f82 100644 --- a/api_docs/kbn_openapi_bundler.mdx +++ b/api_docs/kbn_openapi_bundler.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-bundler title: "@kbn/openapi-bundler" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-bundler plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-bundler'] --- import kbnOpenapiBundlerObj from './kbn_openapi_bundler.devdocs.json'; diff --git a/api_docs/kbn_openapi_generator.mdx b/api_docs/kbn_openapi_generator.mdx index 416c12bcd66b84..422af3b6140e36 100644 --- a/api_docs/kbn_openapi_generator.mdx +++ b/api_docs/kbn_openapi_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-generator title: "@kbn/openapi-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-generator plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-generator'] --- import kbnOpenapiGeneratorObj from './kbn_openapi_generator.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index 286ec6bb1fefea..722df1697e829a 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index f1f2e91a56dec3..7dbae17bcf545f 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index 67f377daecdf29..19c3bd2cc9ed41 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_panel_loader.mdx b/api_docs/kbn_panel_loader.mdx index f42ac1a2afa4ea..c9725297c9842f 100644 --- a/api_docs/kbn_panel_loader.mdx +++ b/api_docs/kbn_panel_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-panel-loader title: "@kbn/panel-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/panel-loader plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/panel-loader'] --- import kbnPanelLoaderObj from './kbn_panel_loader.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index e8454cf7d3d5fd..0a9ec50d257a4d 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_check.mdx b/api_docs/kbn_plugin_check.mdx index f7258f49714a5c..87ce43cac874dd 100644 --- a/api_docs/kbn_plugin_check.mdx +++ b/api_docs/kbn_plugin_check.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-check title: "@kbn/plugin-check" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-check plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-check'] --- import kbnPluginCheckObj from './kbn_plugin_check.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index 6c45d65b28deab..696f801a977e9c 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 6c13c3e45a08f8..b142fbb353f280 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_presentation_containers.mdx b/api_docs/kbn_presentation_containers.mdx index 9e73ce9eab63c5..e0f7bb5acdadea 100644 --- a/api_docs/kbn_presentation_containers.mdx +++ b/api_docs/kbn_presentation_containers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-containers title: "@kbn/presentation-containers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-containers plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-containers'] --- import kbnPresentationContainersObj from './kbn_presentation_containers.devdocs.json'; diff --git a/api_docs/kbn_presentation_publishing.devdocs.json b/api_docs/kbn_presentation_publishing.devdocs.json index e77aadbe13c1c8..f4d2eb257223fa 100644 --- a/api_docs/kbn_presentation_publishing.devdocs.json +++ b/api_docs/kbn_presentation_publishing.devdocs.json @@ -1696,6 +1696,39 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.hasBlockingError", + "type": "Function", + "tags": [], + "label": "hasBlockingError", + "description": [], + "signature": [ + "(api: unknown) => boolean" + ], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_blocking_error.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.hasBlockingError.$1", + "type": "Unknown", + "tags": [], + "label": "api", + "description": [], + "signature": [ + "unknown" + ], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_blocking_error.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.hasEditCapabilities", diff --git a/api_docs/kbn_presentation_publishing.mdx b/api_docs/kbn_presentation_publishing.mdx index bdc898bc8a93b5..72b2179b517019 100644 --- a/api_docs/kbn_presentation_publishing.mdx +++ b/api_docs/kbn_presentation_publishing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-publishing title: "@kbn/presentation-publishing" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-publishing plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-publishing'] --- import kbnPresentationPublishingObj from './kbn_presentation_publishing.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kib | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 214 | 0 | 179 | 5 | +| 216 | 0 | 181 | 5 | ## Common diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index 48244dfd953c31..4842e6a2b56615 100644 --- a/api_docs/kbn_profiling_utils.mdx +++ b/api_docs/kbn_profiling_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-profiling-utils title: "@kbn/profiling-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/profiling-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/profiling-utils'] --- import kbnProfilingUtilsObj from './kbn_profiling_utils.devdocs.json'; diff --git a/api_docs/kbn_random_sampling.mdx b/api_docs/kbn_random_sampling.mdx index 804c5283cf48ff..951256c39e536b 100644 --- a/api_docs/kbn_random_sampling.mdx +++ b/api_docs/kbn_random_sampling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-random-sampling title: "@kbn/random-sampling" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/random-sampling plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/random-sampling'] --- import kbnRandomSamplingObj from './kbn_random_sampling.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index c33886bcb46302..71f7a6297be1ad 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_react_hooks.mdx b/api_docs/kbn_react_hooks.mdx index b81c374f689440..9d129916ceec28 100644 --- a/api_docs/kbn_react_hooks.mdx +++ b/api_docs/kbn_react_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-hooks title: "@kbn/react-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-hooks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-hooks'] --- import kbnReactHooksObj from './kbn_react_hooks.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_common.mdx b/api_docs/kbn_react_kibana_context_common.mdx index a9238d361ac0a5..d43937348fb600 100644 --- a/api_docs/kbn_react_kibana_context_common.mdx +++ b/api_docs/kbn_react_kibana_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-common title: "@kbn/react-kibana-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-common'] --- import kbnReactKibanaContextCommonObj from './kbn_react_kibana_context_common.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_render.mdx b/api_docs/kbn_react_kibana_context_render.mdx index a252b7c0e9f902..88d9bf660bd001 100644 --- a/api_docs/kbn_react_kibana_context_render.mdx +++ b/api_docs/kbn_react_kibana_context_render.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-render title: "@kbn/react-kibana-context-render" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-render plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-render'] --- import kbnReactKibanaContextRenderObj from './kbn_react_kibana_context_render.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_root.mdx b/api_docs/kbn_react_kibana_context_root.mdx index accb017dcc49f6..d435ea6427be67 100644 --- a/api_docs/kbn_react_kibana_context_root.mdx +++ b/api_docs/kbn_react_kibana_context_root.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-root title: "@kbn/react-kibana-context-root" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-root plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-root'] --- import kbnReactKibanaContextRootObj from './kbn_react_kibana_context_root.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_styled.mdx b/api_docs/kbn_react_kibana_context_styled.mdx index 63cba8beb601e0..63a01de3117431 100644 --- a/api_docs/kbn_react_kibana_context_styled.mdx +++ b/api_docs/kbn_react_kibana_context_styled.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-styled title: "@kbn/react-kibana-context-styled" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-styled plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-styled'] --- import kbnReactKibanaContextStyledObj from './kbn_react_kibana_context_styled.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_theme.mdx b/api_docs/kbn_react_kibana_context_theme.mdx index 04e154ccd224dd..65978f536556a9 100644 --- a/api_docs/kbn_react_kibana_context_theme.mdx +++ b/api_docs/kbn_react_kibana_context_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-theme title: "@kbn/react-kibana-context-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-theme plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-theme'] --- import kbnReactKibanaContextThemeObj from './kbn_react_kibana_context_theme.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_mount.mdx b/api_docs/kbn_react_kibana_mount.mdx index 6a679d2b7d1044..b7631257ad2190 100644 --- a/api_docs/kbn_react_kibana_mount.mdx +++ b/api_docs/kbn_react_kibana_mount.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-mount title: "@kbn/react-kibana-mount" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-mount plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-mount'] --- import kbnReactKibanaMountObj from './kbn_react_kibana_mount.devdocs.json'; diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index c232bbeb55e7c2..f1fa3104d03fac 100644 --- a/api_docs/kbn_repo_file_maps.mdx +++ b/api_docs/kbn_repo_file_maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-file-maps title: "@kbn/repo-file-maps" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-file-maps plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-file-maps'] --- import kbnRepoFileMapsObj from './kbn_repo_file_maps.devdocs.json'; diff --git a/api_docs/kbn_repo_linter.mdx b/api_docs/kbn_repo_linter.mdx index 56b622aed5970f..f4cdffdcac021f 100644 --- a/api_docs/kbn_repo_linter.mdx +++ b/api_docs/kbn_repo_linter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-linter title: "@kbn/repo-linter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-linter plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-linter'] --- import kbnRepoLinterObj from './kbn_repo_linter.devdocs.json'; diff --git a/api_docs/kbn_repo_path.mdx b/api_docs/kbn_repo_path.mdx index 386e4ce27b9d93..caa046bede4365 100644 --- a/api_docs/kbn_repo_path.mdx +++ b/api_docs/kbn_repo_path.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-path title: "@kbn/repo-path" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-path plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-path'] --- import kbnRepoPathObj from './kbn_repo_path.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index 77bfe7e0a48075..c0ae43523df83f 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_reporting_common.mdx b/api_docs/kbn_reporting_common.mdx index d0dc576ac7e092..eb7e0c948d4b27 100644 --- a/api_docs/kbn_reporting_common.mdx +++ b/api_docs/kbn_reporting_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-common title: "@kbn/reporting-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_csv_share_panel.mdx b/api_docs/kbn_reporting_csv_share_panel.mdx index f079d644ab35dc..d099fee886f5c1 100644 --- a/api_docs/kbn_reporting_csv_share_panel.mdx +++ b/api_docs/kbn_reporting_csv_share_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-csv-share-panel title: "@kbn/reporting-csv-share-panel" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-csv-share-panel plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-csv-share-panel'] --- import kbnReportingCsvSharePanelObj from './kbn_reporting_csv_share_panel.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv.mdx b/api_docs/kbn_reporting_export_types_csv.mdx index 0fa03bd2ff18a1..ecdc0f512a6254 100644 --- a/api_docs/kbn_reporting_export_types_csv.mdx +++ b/api_docs/kbn_reporting_export_types_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv title: "@kbn/reporting-export-types-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv'] --- import kbnReportingExportTypesCsvObj from './kbn_reporting_export_types_csv.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv_common.mdx b/api_docs/kbn_reporting_export_types_csv_common.mdx index 5fd99d4c490613..2e185bd3e9c09a 100644 --- a/api_docs/kbn_reporting_export_types_csv_common.mdx +++ b/api_docs/kbn_reporting_export_types_csv_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv-common title: "@kbn/reporting-export-types-csv-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv-common'] --- import kbnReportingExportTypesCsvCommonObj from './kbn_reporting_export_types_csv_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf.mdx b/api_docs/kbn_reporting_export_types_pdf.mdx index e659f2010a4a1b..77a9baff0a4e70 100644 --- a/api_docs/kbn_reporting_export_types_pdf.mdx +++ b/api_docs/kbn_reporting_export_types_pdf.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf title: "@kbn/reporting-export-types-pdf" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf'] --- import kbnReportingExportTypesPdfObj from './kbn_reporting_export_types_pdf.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf_common.mdx b/api_docs/kbn_reporting_export_types_pdf_common.mdx index 253a333bd788b9..f03e1164abca5a 100644 --- a/api_docs/kbn_reporting_export_types_pdf_common.mdx +++ b/api_docs/kbn_reporting_export_types_pdf_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf-common title: "@kbn/reporting-export-types-pdf-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf-common'] --- import kbnReportingExportTypesPdfCommonObj from './kbn_reporting_export_types_pdf_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png.mdx b/api_docs/kbn_reporting_export_types_png.mdx index 29fcde583cb180..d668328d20e234 100644 --- a/api_docs/kbn_reporting_export_types_png.mdx +++ b/api_docs/kbn_reporting_export_types_png.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png title: "@kbn/reporting-export-types-png" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png'] --- import kbnReportingExportTypesPngObj from './kbn_reporting_export_types_png.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png_common.mdx b/api_docs/kbn_reporting_export_types_png_common.mdx index 352778ee8483d3..8ce4258543b46e 100644 --- a/api_docs/kbn_reporting_export_types_png_common.mdx +++ b/api_docs/kbn_reporting_export_types_png_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png-common title: "@kbn/reporting-export-types-png-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png-common'] --- import kbnReportingExportTypesPngCommonObj from './kbn_reporting_export_types_png_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_mocks_server.mdx b/api_docs/kbn_reporting_mocks_server.mdx index deeab29280f92a..8712180c101d52 100644 --- a/api_docs/kbn_reporting_mocks_server.mdx +++ b/api_docs/kbn_reporting_mocks_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-mocks-server title: "@kbn/reporting-mocks-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-mocks-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-mocks-server'] --- import kbnReportingMocksServerObj from './kbn_reporting_mocks_server.devdocs.json'; diff --git a/api_docs/kbn_reporting_public.mdx b/api_docs/kbn_reporting_public.mdx index 2b368c96b1feaf..f52846975e6069 100644 --- a/api_docs/kbn_reporting_public.mdx +++ b/api_docs/kbn_reporting_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-public title: "@kbn/reporting-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-public plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-public'] --- import kbnReportingPublicObj from './kbn_reporting_public.devdocs.json'; diff --git a/api_docs/kbn_reporting_server.mdx b/api_docs/kbn_reporting_server.mdx index 18e453ba8bd276..6f7f12a59850ff 100644 --- a/api_docs/kbn_reporting_server.mdx +++ b/api_docs/kbn_reporting_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-server title: "@kbn/reporting-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-server'] --- import kbnReportingServerObj from './kbn_reporting_server.devdocs.json'; diff --git a/api_docs/kbn_resizable_layout.mdx b/api_docs/kbn_resizable_layout.mdx index 78a22ffb9b9237..be41eba0c6a6c7 100644 --- a/api_docs/kbn_resizable_layout.mdx +++ b/api_docs/kbn_resizable_layout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-resizable-layout title: "@kbn/resizable-layout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/resizable-layout plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/resizable-layout'] --- import kbnResizableLayoutObj from './kbn_resizable_layout.devdocs.json'; diff --git a/api_docs/kbn_response_ops_feature_flag_service.mdx b/api_docs/kbn_response_ops_feature_flag_service.mdx index a6bb37ad738a11..b2289667ccc4ef 100644 --- a/api_docs/kbn_response_ops_feature_flag_service.mdx +++ b/api_docs/kbn_response_ops_feature_flag_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-response-ops-feature-flag-service title: "@kbn/response-ops-feature-flag-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/response-ops-feature-flag-service plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/response-ops-feature-flag-service'] --- import kbnResponseOpsFeatureFlagServiceObj from './kbn_response_ops_feature_flag_service.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index 5dc805bb997eec..3c983f8067808f 100644 --- a/api_docs/kbn_rison.mdx +++ b/api_docs/kbn_rison.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison title: "@kbn/rison" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rison plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rollup.mdx b/api_docs/kbn_rollup.mdx index 92ab3d3ced8915..99a5af6503be76 100644 --- a/api_docs/kbn_rollup.mdx +++ b/api_docs/kbn_rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rollup title: "@kbn/rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rollup plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rollup'] --- import kbnRollupObj from './kbn_rollup.devdocs.json'; diff --git a/api_docs/kbn_router_to_openapispec.mdx b/api_docs/kbn_router_to_openapispec.mdx index 3c8022f8686c27..4962e236dd4705 100644 --- a/api_docs/kbn_router_to_openapispec.mdx +++ b/api_docs/kbn_router_to_openapispec.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-to-openapispec title: "@kbn/router-to-openapispec" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-to-openapispec plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-to-openapispec'] --- import kbnRouterToOpenapispecObj from './kbn_router_to_openapispec.devdocs.json'; diff --git a/api_docs/kbn_router_utils.mdx b/api_docs/kbn_router_utils.mdx index fccac139cf4340..9361a07a5911fb 100644 --- a/api_docs/kbn_router_utils.mdx +++ b/api_docs/kbn_router_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-utils title: "@kbn/router-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-utils'] --- import kbnRouterUtilsObj from './kbn_router_utils.devdocs.json'; diff --git a/api_docs/kbn_rrule.mdx b/api_docs/kbn_rrule.mdx index afcbc21614595d..54d0ccd633422c 100644 --- a/api_docs/kbn_rrule.mdx +++ b/api_docs/kbn_rrule.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rrule title: "@kbn/rrule" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rrule plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rrule'] --- import kbnRruleObj from './kbn_rrule.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index d7d821b6133205..77115422dbec47 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index 867d9266356b5f..d241357c284f90 100644 --- a/api_docs/kbn_saved_objects_settings.mdx +++ b/api_docs/kbn_saved_objects_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-saved-objects-settings title: "@kbn/saved-objects-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/saved-objects-settings plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-objects-settings'] --- import kbnSavedObjectsSettingsObj from './kbn_saved_objects_settings.devdocs.json'; diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index 740b1f283b190c..de2ea6e8885890 100644 --- a/api_docs/kbn_search_api_panels.mdx +++ b/api_docs/kbn_search_api_panels.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-api-panels title: "@kbn/search-api-panels" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-api-panels plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-panels'] --- import kbnSearchApiPanelsObj from './kbn_search_api_panels.devdocs.json'; diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index 097d2bedc893f9..e2e90e6248dead 100644 --- a/api_docs/kbn_search_connectors.mdx +++ b/api_docs/kbn_search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-connectors title: "@kbn/search-connectors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-connectors plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-connectors'] --- import kbnSearchConnectorsObj from './kbn_search_connectors.devdocs.json'; diff --git a/api_docs/kbn_search_errors.mdx b/api_docs/kbn_search_errors.mdx index b344cc9aa10c35..5009b6f1dd9229 100644 --- a/api_docs/kbn_search_errors.mdx +++ b/api_docs/kbn_search_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-errors title: "@kbn/search-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-errors plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-errors'] --- import kbnSearchErrorsObj from './kbn_search_errors.devdocs.json'; diff --git a/api_docs/kbn_search_index_documents.mdx b/api_docs/kbn_search_index_documents.mdx index da306c70d5ab2a..7a39ecf13f5804 100644 --- a/api_docs/kbn_search_index_documents.mdx +++ b/api_docs/kbn_search_index_documents.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-index-documents title: "@kbn/search-index-documents" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-index-documents plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-index-documents'] --- import kbnSearchIndexDocumentsObj from './kbn_search_index_documents.devdocs.json'; diff --git a/api_docs/kbn_search_response_warnings.mdx b/api_docs/kbn_search_response_warnings.mdx index 68892d775aeab0..cd01e2a84fc1df 100644 --- a/api_docs/kbn_search_response_warnings.mdx +++ b/api_docs/kbn_search_response_warnings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-response-warnings title: "@kbn/search-response-warnings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-response-warnings plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-response-warnings'] --- import kbnSearchResponseWarningsObj from './kbn_search_response_warnings.devdocs.json'; diff --git a/api_docs/kbn_search_types.mdx b/api_docs/kbn_search_types.mdx index e5cb920fbd6db5..51cb27c0dced73 100644 --- a/api_docs/kbn_search_types.mdx +++ b/api_docs/kbn_search_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-types title: "@kbn/search-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-types plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-types'] --- import kbnSearchTypesObj from './kbn_search_types.devdocs.json'; diff --git a/api_docs/kbn_security_api_key_management.mdx b/api_docs/kbn_security_api_key_management.mdx index 89d4f1bae57476..9c95241ecaa83e 100644 --- a/api_docs/kbn_security_api_key_management.mdx +++ b/api_docs/kbn_security_api_key_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-api-key-management title: "@kbn/security-api-key-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-api-key-management plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-api-key-management'] --- import kbnSecurityApiKeyManagementObj from './kbn_security_api_key_management.devdocs.json'; diff --git a/api_docs/kbn_security_form_components.mdx b/api_docs/kbn_security_form_components.mdx index 766b7e26e497ce..27f10f009c4d4f 100644 --- a/api_docs/kbn_security_form_components.mdx +++ b/api_docs/kbn_security_form_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-form-components title: "@kbn/security-form-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-form-components plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-form-components'] --- import kbnSecurityFormComponentsObj from './kbn_security_form_components.devdocs.json'; diff --git a/api_docs/kbn_security_hardening.mdx b/api_docs/kbn_security_hardening.mdx index 48d0290ab07dbd..bf16364236051a 100644 --- a/api_docs/kbn_security_hardening.mdx +++ b/api_docs/kbn_security_hardening.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-hardening title: "@kbn/security-hardening" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-hardening plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-hardening'] --- import kbnSecurityHardeningObj from './kbn_security_hardening.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_common.mdx b/api_docs/kbn_security_plugin_types_common.mdx index 925cdf8584226b..ace424adb9be5d 100644 --- a/api_docs/kbn_security_plugin_types_common.mdx +++ b/api_docs/kbn_security_plugin_types_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-common title: "@kbn/security-plugin-types-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-common plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-common'] --- import kbnSecurityPluginTypesCommonObj from './kbn_security_plugin_types_common.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_public.mdx b/api_docs/kbn_security_plugin_types_public.mdx index c88ff0948b688d..654c86d26238bc 100644 --- a/api_docs/kbn_security_plugin_types_public.mdx +++ b/api_docs/kbn_security_plugin_types_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-public title: "@kbn/security-plugin-types-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-public plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-public'] --- import kbnSecurityPluginTypesPublicObj from './kbn_security_plugin_types_public.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_server.mdx b/api_docs/kbn_security_plugin_types_server.mdx index 019c7ae94ecd2a..7c6aa2da3511c5 100644 --- a/api_docs/kbn_security_plugin_types_server.mdx +++ b/api_docs/kbn_security_plugin_types_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-server title: "@kbn/security-plugin-types-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-server plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-server'] --- import kbnSecurityPluginTypesServerObj from './kbn_security_plugin_types_server.devdocs.json'; diff --git a/api_docs/kbn_security_solution_features.mdx b/api_docs/kbn_security_solution_features.mdx index 3cb90e5d36e2e6..b21ee6f8c49252 100644 --- a/api_docs/kbn_security_solution_features.mdx +++ b/api_docs/kbn_security_solution_features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-features title: "@kbn/security-solution-features" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-features plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-features'] --- import kbnSecuritySolutionFeaturesObj from './kbn_security_solution_features.devdocs.json'; diff --git a/api_docs/kbn_security_solution_navigation.mdx b/api_docs/kbn_security_solution_navigation.mdx index cf8fbb69b2746c..0b83757f314ee0 100644 --- a/api_docs/kbn_security_solution_navigation.mdx +++ b/api_docs/kbn_security_solution_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-navigation title: "@kbn/security-solution-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-navigation plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-navigation'] --- import kbnSecuritySolutionNavigationObj from './kbn_security_solution_navigation.devdocs.json'; diff --git a/api_docs/kbn_security_solution_side_nav.mdx b/api_docs/kbn_security_solution_side_nav.mdx index 633610a7ea13ef..8057980cadb7a1 100644 --- a/api_docs/kbn_security_solution_side_nav.mdx +++ b/api_docs/kbn_security_solution_side_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-side-nav title: "@kbn/security-solution-side-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-side-nav plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-side-nav'] --- import kbnSecuritySolutionSideNavObj from './kbn_security_solution_side_nav.devdocs.json'; diff --git a/api_docs/kbn_security_solution_storybook_config.mdx b/api_docs/kbn_security_solution_storybook_config.mdx index 013a4b9e650f99..b5b0d157c24acc 100644 --- a/api_docs/kbn_security_solution_storybook_config.mdx +++ b/api_docs/kbn_security_solution_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-storybook-config title: "@kbn/security-solution-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-storybook-config plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-storybook-config'] --- import kbnSecuritySolutionStorybookConfigObj from './kbn_security_solution_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 5af55f3a42c2f6..5dd49e562276dd 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_data_table.mdx b/api_docs/kbn_securitysolution_data_table.mdx index 94e7c3cb6107eb..847ada8f39c8ff 100644 --- a/api_docs/kbn_securitysolution_data_table.mdx +++ b/api_docs/kbn_securitysolution_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-data-table title: "@kbn/securitysolution-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-data-table plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-data-table'] --- import kbnSecuritysolutionDataTableObj from './kbn_securitysolution_data_table.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_ecs.mdx b/api_docs/kbn_securitysolution_ecs.mdx index 9d2181f67a1b9d..e9d5e398486b6a 100644 --- a/api_docs/kbn_securitysolution_ecs.mdx +++ b/api_docs/kbn_securitysolution_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-ecs title: "@kbn/securitysolution-ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-ecs plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-ecs'] --- import kbnSecuritysolutionEcsObj from './kbn_securitysolution_ecs.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index 659d62c2871f3a..57d5f1abad1906 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index 8eed006d96b43b..fff4914fe6a2f1 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index cfc1ef783f69dd..954af3189ec594 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index d67064c32e7890..5d0f2d29fcb494 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index 22c3c27f50333b..adde037bf8f76d 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index 85ddf0fe803d03..e43f20cdf9b71f 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index d4227b146a7f71..70fb3ceefef022 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index bbfa8cf696d7d1..26f187818b0d12 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 475619ad530085..100e35128e49b6 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index e73c011214c04f..b2150310488deb 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index c4ca3bc2a4f571..8dc005863aaae5 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 76b7c7762c034a..0334b7101d4107 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index 71843e02a384dc..0974a12d88dd57 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index d32aff651c32f7..17e8687117b289 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index cc039c941647b8..906161232d75ce 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index 590b8ce862cd91..a651a0ed8e5967 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_serverless_common_settings.mdx b/api_docs/kbn_serverless_common_settings.mdx index fbc54dcaf0b08c..52f01f02c37a5a 100644 --- a/api_docs/kbn_serverless_common_settings.mdx +++ b/api_docs/kbn_serverless_common_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-common-settings title: "@kbn/serverless-common-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-common-settings plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-common-settings'] --- import kbnServerlessCommonSettingsObj from './kbn_serverless_common_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_observability_settings.mdx b/api_docs/kbn_serverless_observability_settings.mdx index 748b9bea7cae34..b34d7c3f130ade 100644 --- a/api_docs/kbn_serverless_observability_settings.mdx +++ b/api_docs/kbn_serverless_observability_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-observability-settings title: "@kbn/serverless-observability-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-observability-settings plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-observability-settings'] --- import kbnServerlessObservabilitySettingsObj from './kbn_serverless_observability_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index b3bd67962cfe91..0654aa98964e38 100644 --- a/api_docs/kbn_serverless_project_switcher.mdx +++ b/api_docs/kbn_serverless_project_switcher.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-project-switcher title: "@kbn/serverless-project-switcher" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-project-switcher plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-project-switcher'] --- import kbnServerlessProjectSwitcherObj from './kbn_serverless_project_switcher.devdocs.json'; diff --git a/api_docs/kbn_serverless_search_settings.mdx b/api_docs/kbn_serverless_search_settings.mdx index 2af8fbfe1a1ec5..b95f3d8c270a9e 100644 --- a/api_docs/kbn_serverless_search_settings.mdx +++ b/api_docs/kbn_serverless_search_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-search-settings title: "@kbn/serverless-search-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-search-settings plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-search-settings'] --- import kbnServerlessSearchSettingsObj from './kbn_serverless_search_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_security_settings.mdx b/api_docs/kbn_serverless_security_settings.mdx index fda7996e6d9d14..87842d991d9745 100644 --- a/api_docs/kbn_serverless_security_settings.mdx +++ b/api_docs/kbn_serverless_security_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-security-settings title: "@kbn/serverless-security-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-security-settings plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-security-settings'] --- import kbnServerlessSecuritySettingsObj from './kbn_serverless_security_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_storybook_config.mdx b/api_docs/kbn_serverless_storybook_config.mdx index d65e49e5421bab..f21be827265cbb 100644 --- a/api_docs/kbn_serverless_storybook_config.mdx +++ b/api_docs/kbn_serverless_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-storybook-config title: "@kbn/serverless-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-storybook-config plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-storybook-config'] --- import kbnServerlessStorybookConfigObj from './kbn_serverless_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index 78c22f69cac986..ae711cf27009dd 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index 3a725d7f4ae72d..ce8b7138b3f6a5 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index d9901d9981d8e3..2b9f134fc1a71f 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index b70942060d25d4..f6b0046b47e5f7 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index eb7d923069c799..714b36ef1c651a 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index 44b70d4f9cfcfb..3c6075bbedff69 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_chrome_navigation.mdx b/api_docs/kbn_shared_ux_chrome_navigation.mdx index a359a4eafea75a..3f830a73d4ac27 100644 --- a/api_docs/kbn_shared_ux_chrome_navigation.mdx +++ b/api_docs/kbn_shared_ux_chrome_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-chrome-navigation title: "@kbn/shared-ux-chrome-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-chrome-navigation plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-chrome-navigation'] --- import kbnSharedUxChromeNavigationObj from './kbn_shared_ux_chrome_navigation.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_error_boundary.mdx b/api_docs/kbn_shared_ux_error_boundary.mdx index 6a4154410cd555..bf856b962f65d6 100644 --- a/api_docs/kbn_shared_ux_error_boundary.mdx +++ b/api_docs/kbn_shared_ux_error_boundary.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-error-boundary title: "@kbn/shared-ux-error-boundary" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-error-boundary plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-error-boundary'] --- import kbnSharedUxErrorBoundaryObj from './kbn_shared_ux_error_boundary.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index 13846cd0e76070..dd93e338a49b6d 100644 --- a/api_docs/kbn_shared_ux_file_context.mdx +++ b/api_docs/kbn_shared_ux_file_context.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context title: "@kbn/shared-ux-file-context" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-context plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-context'] --- import kbnSharedUxFileContextObj from './kbn_shared_ux_file_context.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image.mdx b/api_docs/kbn_shared_ux_file_image.mdx index 3fe7960852f3f5..e06be2cf1ae868 100644 --- a/api_docs/kbn_shared_ux_file_image.mdx +++ b/api_docs/kbn_shared_ux_file_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image title: "@kbn/shared-ux-file-image" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image'] --- import kbnSharedUxFileImageObj from './kbn_shared_ux_file_image.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image_mocks.mdx b/api_docs/kbn_shared_ux_file_image_mocks.mdx index 1a1b52d677478f..5bcc1d6dd2210f 100644 --- a/api_docs/kbn_shared_ux_file_image_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks title: "@kbn/shared-ux-file-image-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image-mocks'] --- import kbnSharedUxFileImageMocksObj from './kbn_shared_ux_file_image_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_mocks.mdx b/api_docs/kbn_shared_ux_file_mocks.mdx index b5b206ba657068..7a390a371b9855 100644 --- a/api_docs/kbn_shared_ux_file_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks title: "@kbn/shared-ux-file-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-mocks'] --- import kbnSharedUxFileMocksObj from './kbn_shared_ux_file_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_picker.mdx b/api_docs/kbn_shared_ux_file_picker.mdx index 16e8f7b0372771..b3eddac9002385 100644 --- a/api_docs/kbn_shared_ux_file_picker.mdx +++ b/api_docs/kbn_shared_ux_file_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-picker title: "@kbn/shared-ux-file-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-picker plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-picker'] --- import kbnSharedUxFilePickerObj from './kbn_shared_ux_file_picker.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_types.mdx b/api_docs/kbn_shared_ux_file_types.mdx index 20f15fad44c1e3..b98be1af3526a0 100644 --- a/api_docs/kbn_shared_ux_file_types.mdx +++ b/api_docs/kbn_shared_ux_file_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-types title: "@kbn/shared-ux-file-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-types plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-types'] --- import kbnSharedUxFileTypesObj from './kbn_shared_ux_file_types.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_upload.mdx b/api_docs/kbn_shared_ux_file_upload.mdx index 0d27fa72019c61..49889a486b35ef 100644 --- a/api_docs/kbn_shared_ux_file_upload.mdx +++ b/api_docs/kbn_shared_ux_file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-upload title: "@kbn/shared-ux-file-upload" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-upload plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-upload'] --- import kbnSharedUxFileUploadObj from './kbn_shared_ux_file_upload.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_util.mdx b/api_docs/kbn_shared_ux_file_util.mdx index 766a646c3bd388..fe5d366e3204da 100644 --- a/api_docs/kbn_shared_ux_file_util.mdx +++ b/api_docs/kbn_shared_ux_file_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util title: "@kbn/shared-ux-file-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-util plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-util'] --- import kbnSharedUxFileUtilObj from './kbn_shared_ux_file_util.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx index ab0b096ffe935f..e7e61258e81121 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app'] --- import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index 0ed32793631962..7c1a0a4799703a 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index 6f2d67d39a4b50..1d8f6e8a14c327 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown'] --- import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx index 47ca6bfd5c72f5..8f4ffc93536e31 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks'] --- import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index 11a99aa869ee73..f90b3d07d556e1 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index 72d9cbd60ad12c..409ea87af405c1 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index 5e72d2df79332c..3599ac1d45c671 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index e9705c3b6e8515..8a8fbf40762328 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index 03e6370532f58b..0a99623c45ee78 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index eff470f50018bf..a003943ace5fec 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index 2559fcda05b829..d811eb76f4f32a 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index 593cc187772131..9807cff5789c2c 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index f9eccfc7cac1d7..937c53dd2f21bc 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index 90df83a5ba65bd..3f77f2e595402d 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index bcbcf14dbea7fd..4c55d88218b17b 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index d1e6e81e02d883..29e6f400f90198 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index e834ccc0f15037..507995b46b07ec 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index 4bb9f11736be0d..8d2e867e0829d5 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.mdx +++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found title: "@kbn/shared-ux-prompt-not-found" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-not-found plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-not-found'] --- import kbnSharedUxPromptNotFoundObj from './kbn_shared_ux_prompt_not_found.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index 3306213db6571a..69aee6a46de941 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index 906abc1ce03156..5296751e7f6c1a 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index b2afa5e58ec4b9..ca374d345179fc 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index ebc3da4fb17548..b7a7ca637f243b 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_tabbed_modal.mdx b/api_docs/kbn_shared_ux_tabbed_modal.mdx index 1ed40fcea5f0f1..807a274717f065 100644 --- a/api_docs/kbn_shared_ux_tabbed_modal.mdx +++ b/api_docs/kbn_shared_ux_tabbed_modal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-tabbed-modal title: "@kbn/shared-ux-tabbed-modal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-tabbed-modal plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-tabbed-modal'] --- import kbnSharedUxTabbedModalObj from './kbn_shared_ux_tabbed_modal.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index 527b032a6b17e8..0db9b623abdb48 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index 78b809e9698905..e10cfefa7e37fe 100644 --- a/api_docs/kbn_slo_schema.mdx +++ b/api_docs/kbn_slo_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-slo-schema title: "@kbn/slo-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/slo-schema plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 0aa443eeb59465..5d4f631d15a18e 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_sort_predicates.mdx b/api_docs/kbn_sort_predicates.mdx index 1e12e9188be5d7..3871ca4aab2663 100644 --- a/api_docs/kbn_sort_predicates.mdx +++ b/api_docs/kbn_sort_predicates.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-predicates title: "@kbn/sort-predicates" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-predicates plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-predicates'] --- import kbnSortPredicatesObj from './kbn_sort_predicates.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 7fc2e34747080b..0745405dc9a156 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index fa8e2065e59a89..ff38938a9cf6a6 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index 36169161eebd65..54d1eca651229e 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index e8df3d9f778be3..cb369874340442 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 4dd34bf327208e..b25472babcf81e 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_eui_helpers.mdx b/api_docs/kbn_test_eui_helpers.mdx index 4e7a01d4ed5f6b..f96a386cb8ed13 100644 --- a/api_docs/kbn_test_eui_helpers.mdx +++ b/api_docs/kbn_test_eui_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-eui-helpers title: "@kbn/test-eui-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-eui-helpers plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-eui-helpers'] --- import kbnTestEuiHelpersObj from './kbn_test_eui_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 09ccfd5078d81a..93131030a565fe 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index 99da33e2ccf055..ebab933870827f 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_text_based_editor.mdx b/api_docs/kbn_text_based_editor.mdx index 1ff7c45c80df1d..5a4309ae18d55b 100644 --- a/api_docs/kbn_text_based_editor.mdx +++ b/api_docs/kbn_text_based_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-text-based-editor title: "@kbn/text-based-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/text-based-editor plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/text-based-editor'] --- import kbnTextBasedEditorObj from './kbn_text_based_editor.devdocs.json'; diff --git a/api_docs/kbn_timerange.mdx b/api_docs/kbn_timerange.mdx index c6e3efc08752cc..709a03157915b9 100644 --- a/api_docs/kbn_timerange.mdx +++ b/api_docs/kbn_timerange.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-timerange title: "@kbn/timerange" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/timerange plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/timerange'] --- import kbnTimerangeObj from './kbn_timerange.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index 815d49bb0ab60f..dc160105e78a58 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_triggers_actions_ui_types.mdx b/api_docs/kbn_triggers_actions_ui_types.mdx index c61dbf5f0293f5..636b8be20610f8 100644 --- a/api_docs/kbn_triggers_actions_ui_types.mdx +++ b/api_docs/kbn_triggers_actions_ui_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-triggers-actions-ui-types title: "@kbn/triggers-actions-ui-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/triggers-actions-ui-types plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/triggers-actions-ui-types'] --- import kbnTriggersActionsUiTypesObj from './kbn_triggers_actions_ui_types.devdocs.json'; diff --git a/api_docs/kbn_try_in_console.mdx b/api_docs/kbn_try_in_console.mdx index 501411d005146f..949a959470f6e8 100644 --- a/api_docs/kbn_try_in_console.mdx +++ b/api_docs/kbn_try_in_console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-try-in-console title: "@kbn/try-in-console" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/try-in-console plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/try-in-console'] --- import kbnTryInConsoleObj from './kbn_try_in_console.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index 6442507f98960b..3ce429bac4a27b 100644 --- a/api_docs/kbn_ts_projects.mdx +++ b/api_docs/kbn_ts_projects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-projects title: "@kbn/ts-projects" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ts-projects plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-projects'] --- import kbnTsProjectsObj from './kbn_ts_projects.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index 046105aa3b05db..4863e314d89a5d 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx index 1e2b06bac50808..303b7a77218826 100644 --- a/api_docs/kbn_ui_actions_browser.mdx +++ b/api_docs/kbn_ui_actions_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-actions-browser title: "@kbn/ui-actions-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-actions-browser plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-actions-browser'] --- import kbnUiActionsBrowserObj from './kbn_ui_actions_browser.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index fa675f67979552..7c0e9167c87a6d 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index f69c92de2de658..86fda35b01e2c6 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_unified_data_table.mdx b/api_docs/kbn_unified_data_table.mdx index 90a3757543ef5f..d69f9c8c5c1a89 100644 --- a/api_docs/kbn_unified_data_table.mdx +++ b/api_docs/kbn_unified_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-data-table title: "@kbn/unified-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-data-table plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-data-table'] --- import kbnUnifiedDataTableObj from './kbn_unified_data_table.devdocs.json'; diff --git a/api_docs/kbn_unified_doc_viewer.mdx b/api_docs/kbn_unified_doc_viewer.mdx index c761cfe3cd050c..b29a49446008f9 100644 --- a/api_docs/kbn_unified_doc_viewer.mdx +++ b/api_docs/kbn_unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-doc-viewer title: "@kbn/unified-doc-viewer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-doc-viewer plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-doc-viewer'] --- import kbnUnifiedDocViewerObj from './kbn_unified_doc_viewer.devdocs.json'; diff --git a/api_docs/kbn_unified_field_list.mdx b/api_docs/kbn_unified_field_list.mdx index b3006d0d1ce6df..7d5a9c54157624 100644 --- a/api_docs/kbn_unified_field_list.mdx +++ b/api_docs/kbn_unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-field-list title: "@kbn/unified-field-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-field-list plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-field-list'] --- import kbnUnifiedFieldListObj from './kbn_unified_field_list.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_badge.mdx b/api_docs/kbn_unsaved_changes_badge.mdx index a43036c1daf6f6..cff3206d2d904b 100644 --- a/api_docs/kbn_unsaved_changes_badge.mdx +++ b/api_docs/kbn_unsaved_changes_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-badge title: "@kbn/unsaved-changes-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-badge plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-badge'] --- import kbnUnsavedChangesBadgeObj from './kbn_unsaved_changes_badge.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_prompt.mdx b/api_docs/kbn_unsaved_changes_prompt.mdx index 9f80861837ac9b..9a07953f5ef7b3 100644 --- a/api_docs/kbn_unsaved_changes_prompt.mdx +++ b/api_docs/kbn_unsaved_changes_prompt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-prompt title: "@kbn/unsaved-changes-prompt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-prompt plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-prompt'] --- import kbnUnsavedChangesPromptObj from './kbn_unsaved_changes_prompt.devdocs.json'; diff --git a/api_docs/kbn_use_tracked_promise.mdx b/api_docs/kbn_use_tracked_promise.mdx index add37803730264..3a6350ce0f4619 100644 --- a/api_docs/kbn_use_tracked_promise.mdx +++ b/api_docs/kbn_use_tracked_promise.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-use-tracked-promise title: "@kbn/use-tracked-promise" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/use-tracked-promise plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/use-tracked-promise'] --- import kbnUseTrackedPromiseObj from './kbn_use_tracked_promise.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index b24e1fe093713a..4d51c61d4f468d 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index 5e0c1ef1a8d290..3a8b5546675b91 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index 0bebdf5daf0754..6016643b3d27e0 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index b12ae78de3d2f8..16358c94b7da88 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_visualization_ui_components.mdx b/api_docs/kbn_visualization_ui_components.mdx index 8161d2ab82cbe2..16b7d652dfe9bb 100644 --- a/api_docs/kbn_visualization_ui_components.mdx +++ b/api_docs/kbn_visualization_ui_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-ui-components title: "@kbn/visualization-ui-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-ui-components plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-ui-components'] --- import kbnVisualizationUiComponentsObj from './kbn_visualization_ui_components.devdocs.json'; diff --git a/api_docs/kbn_visualization_utils.mdx b/api_docs/kbn_visualization_utils.mdx index 1d21660042de0b..35cd7528e17576 100644 --- a/api_docs/kbn_visualization_utils.mdx +++ b/api_docs/kbn_visualization_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-utils title: "@kbn/visualization-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-utils'] --- import kbnVisualizationUtilsObj from './kbn_visualization_utils.devdocs.json'; diff --git a/api_docs/kbn_xstate_utils.mdx b/api_docs/kbn_xstate_utils.mdx index 03c89de759e9dc..7cd72ea98a4e04 100644 --- a/api_docs/kbn_xstate_utils.mdx +++ b/api_docs/kbn_xstate_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-xstate-utils title: "@kbn/xstate-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/xstate-utils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/xstate-utils'] --- import kbnXstateUtilsObj from './kbn_xstate_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index d05df06aaf5f92..6f87b3d59c2269 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kbn_zod_helpers.mdx b/api_docs/kbn_zod_helpers.mdx index 57f119e1d70a65..01deacde43e620 100644 --- a/api_docs/kbn_zod_helpers.mdx +++ b/api_docs/kbn_zod_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod-helpers title: "@kbn/zod-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/zod-helpers plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod-helpers'] --- import kbnZodHelpersObj from './kbn_zod_helpers.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index a6e165e93ac13c..f994ec347d18b8 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 336f63c8a3f170..3019bde1572f70 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index 1381da42194693..431ebf3a2d6186 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index 4172f4ba146c37..7d4b442e3b28af 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.devdocs.json b/api_docs/lens.devdocs.json index d47d721a70681c..28c0c308162ca0 100644 --- a/api_docs/lens.devdocs.json +++ b/api_docs/lens.devdocs.json @@ -11091,7 +11091,15 @@ }, " | undefined>; canViewUnderlyingData: () => Promise; getViewUnderlyingDataArgs: () => ", "ViewUnderlyingDataArgs", - "; } & ", + "; getFullAttributes: () => ", + { + "pluginId": "lens", + "scope": "public", + "docId": "kibLensPluginApi", + "section": "def-public.LensSavedObjectAttributes", + "text": "LensSavedObjectAttributes" + }, + " | undefined; } & ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -11147,7 +11155,15 @@ "section": "def-common.HasParentApi", "text": "HasParentApi" }, - ">" + ">>" ], "path": "x-pack/plugins/lens/public/embeddable/interfaces/lens_api.ts", "deprecated": false, diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 445f4e77549024..c3d5cb143c0e79 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index d06552ebe87ae8..de74ce08f2e16b 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index e3420b477c8d93..09495a17a5d3b5 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 9123d5260eb5c4..4fc4c85abc9f50 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/links.mdx b/api_docs/links.mdx index 248abf6785ed83..560e44067a7ea5 100644 --- a/api_docs/links.mdx +++ b/api_docs/links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/links title: "links" image: https://source.unsplash.com/400x175/?github description: API docs for the links plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'links'] --- import linksObj from './links.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index 7296758a01be71..a2d3af9cc76f56 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/logs_data_access.mdx b/api_docs/logs_data_access.mdx index bed1649fbbe849..035befc30e2414 100644 --- a/api_docs/logs_data_access.mdx +++ b/api_docs/logs_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsDataAccess title: "logsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the logsDataAccess plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsDataAccess'] --- import logsDataAccessObj from './logs_data_access.devdocs.json'; diff --git a/api_docs/logs_explorer.mdx b/api_docs/logs_explorer.mdx index 512882c9a9da21..b1b1874c1a1085 100644 --- a/api_docs/logs_explorer.mdx +++ b/api_docs/logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsExplorer title: "logsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the logsExplorer plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsExplorer'] --- import logsExplorerObj from './logs_explorer.devdocs.json'; diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx index ddc23e1672f650..455b1b62caf67c 100644 --- a/api_docs/logs_shared.mdx +++ b/api_docs/logs_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsShared title: "logsShared" image: https://source.unsplash.com/400x175/?github description: API docs for the logsShared plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared'] --- import logsSharedObj from './logs_shared.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 2637590cd280dc..9efd852c72ca9b 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 595a701e2f2590..47e0f72e43f1b1 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index f21ebe2a92c0ce..1541454bbeea53 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/metrics_data_access.mdx b/api_docs/metrics_data_access.mdx index 2ddf02eca894fd..94a27bc9aec2d2 100644 --- a/api_docs/metrics_data_access.mdx +++ b/api_docs/metrics_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/metricsDataAccess title: "metricsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the metricsDataAccess plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsDataAccess'] --- import metricsDataAccessObj from './metrics_data_access.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 8c2b3a2f6c21c8..380e40ca6d5664 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/mock_idp_plugin.mdx b/api_docs/mock_idp_plugin.mdx index 614c7158a647b9..d6d2f2c8ac194d 100644 --- a/api_docs/mock_idp_plugin.mdx +++ b/api_docs/mock_idp_plugin.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mockIdpPlugin title: "mockIdpPlugin" image: https://source.unsplash.com/400x175/?github description: API docs for the mockIdpPlugin plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mockIdpPlugin'] --- import mockIdpPluginObj from './mock_idp_plugin.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index 4c4a1a87487f1f..dcbdf082713120 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index b06cd919e64f68..74d85a0245195b 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index 80583b63ddc448..380cd978db995b 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index e6c83a0b8c85f1..bd93f2dc714f94 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/no_data_page.mdx b/api_docs/no_data_page.mdx index 3c96ce742b25c8..f79178e58cd425 100644 --- a/api_docs/no_data_page.mdx +++ b/api_docs/no_data_page.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/noDataPage title: "noDataPage" image: https://source.unsplash.com/400x175/?github description: API docs for the noDataPage plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'noDataPage'] --- import noDataPageObj from './no_data_page.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index 8a4e4f9d973568..5e5755bad1a4df 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 62d58ed9156200..3449ee952dca5f 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index 08abba6f8d44f7..d2d8baa627bcbe 100644 --- a/api_docs/observability_a_i_assistant.mdx +++ b/api_docs/observability_a_i_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistant title: "observabilityAIAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistant plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant_app.mdx b/api_docs/observability_a_i_assistant_app.mdx index d973688447a266..1b834afc8f3325 100644 --- a/api_docs/observability_a_i_assistant_app.mdx +++ b/api_docs/observability_a_i_assistant_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistantApp title: "observabilityAIAssistantApp" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistantApp plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistantApp'] --- import observabilityAIAssistantAppObj from './observability_a_i_assistant_app.devdocs.json'; diff --git a/api_docs/observability_ai_assistant_management.mdx b/api_docs/observability_ai_assistant_management.mdx index bba8a809fa885d..9c33efa5ef117c 100644 --- a/api_docs/observability_ai_assistant_management.mdx +++ b/api_docs/observability_ai_assistant_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAiAssistantManagement title: "observabilityAiAssistantManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAiAssistantManagement plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAiAssistantManagement'] --- import observabilityAiAssistantManagementObj from './observability_ai_assistant_management.devdocs.json'; diff --git a/api_docs/observability_logs_explorer.mdx b/api_docs/observability_logs_explorer.mdx index 03415287aebdf6..231481cbb3217a 100644 --- a/api_docs/observability_logs_explorer.mdx +++ b/api_docs/observability_logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityLogsExplorer title: "observabilityLogsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityLogsExplorer plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityLogsExplorer'] --- import observabilityLogsExplorerObj from './observability_logs_explorer.devdocs.json'; diff --git a/api_docs/observability_onboarding.mdx b/api_docs/observability_onboarding.mdx index c56ec13fcf195f..02f2807beb89d5 100644 --- a/api_docs/observability_onboarding.mdx +++ b/api_docs/observability_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityOnboarding title: "observabilityOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityOnboarding plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding'] --- import observabilityOnboardingObj from './observability_onboarding.devdocs.json'; diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx index 4ef904639b5cfa..dd1bbf734cd350 100644 --- a/api_docs/observability_shared.mdx +++ b/api_docs/observability_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityShared title: "observabilityShared" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityShared plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityShared'] --- import observabilitySharedObj from './observability_shared.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 355d9f22bbb1f3..9e1a61f471a7c6 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/painless_lab.mdx b/api_docs/painless_lab.mdx index 1c8776eaa649ed..aa0bef6692c8e0 100644 --- a/api_docs/painless_lab.mdx +++ b/api_docs/painless_lab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/painlessLab title: "painlessLab" image: https://source.unsplash.com/400x175/?github description: API docs for the painlessLab plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'painlessLab'] --- import painlessLabObj from './painless_lab.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 36f5121d9e6346..d152b01f9130ad 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -15,13 +15,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 810 | 694 | 42 | +| 811 | 695 | 42 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 49627 | 238 | 37843 | 1888 | +| 49694 | 237 | 37903 | 1897 | ## Plugin Directory @@ -246,7 +246,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 23 | 0 | 22 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 194 | 0 | 191 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 33 | 0 | 33 | 0 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 245 | 0 | 231 | 2 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 22 | 0 | 5 | 1 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 299 | 0 | 283 | 8 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 73 | 0 | 73 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 1 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 18 | 0 | 18 | 0 | @@ -511,7 +512,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 0 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 1 | 0 | 1 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 26 | 0 | 26 | 1 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 17 | 0 | 12 | 8 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 17 | 0 | 12 | 10 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 49 | 0 | 47 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 33 | 3 | 24 | 6 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 3 | 0 | 3 | 0 | @@ -535,7 +536,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 7 | 0 | 5 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 193 | 0 | 190 | 6 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 172 | 0 | 172 | 1 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 27 | 0 | 1 | 2 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 28 | 0 | 2 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 8 | 0 | 8 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 2 | 0 | 2 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 6 | 0 | 1 | 1 | @@ -553,7 +554,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 2 | 0 | 0 | 0 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 592 | 1 | 1 | 0 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 2 | 0 | 2 | 0 | -| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 102 | 2 | 0 | 0 | +| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 90 | 1 | 0 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 207 | 3 | 1 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 8 | 0 | 8 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 37 | 0 | 0 | 0 | @@ -596,7 +597,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 1 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 1 | 0 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 82 | 0 | 71 | 0 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 214 | 0 | 179 | 5 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 216 | 0 | 181 | 5 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 168 | 0 | 55 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 13 | 0 | 7 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 22 | 0 | 9 | 0 | diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx index 5ea452ba5ae7be..5377b64c59d8bd 100644 --- a/api_docs/presentation_panel.mdx +++ b/api_docs/presentation_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationPanel title: "presentationPanel" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationPanel plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationPanel'] --- import presentationPanelObj from './presentation_panel.devdocs.json'; diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index a14778068239e8..2cf99c9268efca 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index 5c72538d2c4f01..5fc10548933798 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/profiling_data_access.mdx b/api_docs/profiling_data_access.mdx index 00f753c6b4d110..c81cc064925b0d 100644 --- a/api_docs/profiling_data_access.mdx +++ b/api_docs/profiling_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profilingDataAccess title: "profilingDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the profilingDataAccess plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profilingDataAccess'] --- import profilingDataAccessObj from './profiling_data_access.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index b93e6db7ceb18d..61ae6d3ac7bc4f 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index 063e8274c7a3f0..e85a65b36c59fb 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index 7d7c160ff2a4af..905ccaead09c74 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 13de741ebab4cc..fe3d512ee6f209 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 7088a69a51c595..92cd07cb6a86db 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index d595d7bbd271f4..c16fb0c31ecab5 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index 867623d4c6821f..2d65a9e00b0a43 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 6d00f58784381a..47bc1753e03e3c 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index ee59172c34819c..343c998820d527 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index 68ae1f8618344a..d42770557cf897 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index da4a255d567ea1..f2d736be63446c 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index cd862be0ac68e2..850b0930150ee5 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index c8e9dc547f0239..5aa11ebce00553 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/search_connectors.mdx b/api_docs/search_connectors.mdx index 4436fe0755745b..fb4ee5e644b260 100644 --- a/api_docs/search_connectors.mdx +++ b/api_docs/search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchConnectors title: "searchConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the searchConnectors plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchConnectors'] --- import searchConnectorsObj from './search_connectors.devdocs.json'; diff --git a/api_docs/search_homepage.mdx b/api_docs/search_homepage.mdx index 64d2db820054d1..a0d0813d0d9c91 100644 --- a/api_docs/search_homepage.mdx +++ b/api_docs/search_homepage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchHomepage title: "searchHomepage" image: https://source.unsplash.com/400x175/?github description: API docs for the searchHomepage plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchHomepage'] --- import searchHomepageObj from './search_homepage.devdocs.json'; diff --git a/api_docs/search_inference_endpoints.mdx b/api_docs/search_inference_endpoints.mdx index 2080ed5ca52b0f..1d24c2f2d0127d 100644 --- a/api_docs/search_inference_endpoints.mdx +++ b/api_docs/search_inference_endpoints.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchInferenceEndpoints title: "searchInferenceEndpoints" image: https://source.unsplash.com/400x175/?github description: API docs for the searchInferenceEndpoints plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchInferenceEndpoints'] --- import searchInferenceEndpointsObj from './search_inference_endpoints.devdocs.json'; diff --git a/api_docs/search_notebooks.mdx b/api_docs/search_notebooks.mdx index 507e5b4f71c942..a2ca0c503916f5 100644 --- a/api_docs/search_notebooks.mdx +++ b/api_docs/search_notebooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchNotebooks title: "searchNotebooks" image: https://source.unsplash.com/400x175/?github description: API docs for the searchNotebooks plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchNotebooks'] --- import searchNotebooksObj from './search_notebooks.devdocs.json'; diff --git a/api_docs/search_playground.mdx b/api_docs/search_playground.mdx index b8ed38133f09a8..64611dafd82733 100644 --- a/api_docs/search_playground.mdx +++ b/api_docs/search_playground.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchPlayground title: "searchPlayground" image: https://source.unsplash.com/400x175/?github description: API docs for the searchPlayground plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchPlayground'] --- import searchPlaygroundObj from './search_playground.devdocs.json'; diff --git a/api_docs/security.devdocs.json b/api_docs/security.devdocs.json index 65b7d3c7c4827c..6923618136dcd5 100644 --- a/api_docs/security.devdocs.json +++ b/api_docs/security.devdocs.json @@ -5312,14 +5312,6 @@ "deprecated": true, "trackAdoption": false, "references": [ - { - "plugin": "encryptedSavedObjects", - "path": "x-pack/plugins/encrypted_saved_objects/server/crypto/encryption_key_rotation_service.ts" - }, - { - "plugin": "encryptedSavedObjects", - "path": "x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/server/routes/annotations.ts" diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 2a74ab8593600e..426eb872fc138b 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index d0c19652b80d34..2beb77b8f021ad 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/security_solution_ess.mdx b/api_docs/security_solution_ess.mdx index ca5d0277e654fa..6f910f41ef9fa7 100644 --- a/api_docs/security_solution_ess.mdx +++ b/api_docs/security_solution_ess.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionEss title: "securitySolutionEss" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionEss plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionEss'] --- import securitySolutionEssObj from './security_solution_ess.devdocs.json'; diff --git a/api_docs/security_solution_serverless.mdx b/api_docs/security_solution_serverless.mdx index 9b24761af71e9b..c45b80b05022b2 100644 --- a/api_docs/security_solution_serverless.mdx +++ b/api_docs/security_solution_serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionServerless title: "securitySolutionServerless" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionServerless plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionServerless'] --- import securitySolutionServerlessObj from './security_solution_serverless.devdocs.json'; diff --git a/api_docs/serverless.mdx b/api_docs/serverless.mdx index da7868e5b1c228..5edadd4df85841 100644 --- a/api_docs/serverless.mdx +++ b/api_docs/serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverless title: "serverless" image: https://source.unsplash.com/400x175/?github description: API docs for the serverless plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverless'] --- import serverlessObj from './serverless.devdocs.json'; diff --git a/api_docs/serverless_observability.mdx b/api_docs/serverless_observability.mdx index d6fe2cd591caa3..a0d2eb5ba6340c 100644 --- a/api_docs/serverless_observability.mdx +++ b/api_docs/serverless_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessObservability title: "serverlessObservability" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessObservability plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessObservability'] --- import serverlessObservabilityObj from './serverless_observability.devdocs.json'; diff --git a/api_docs/serverless_search.mdx b/api_docs/serverless_search.mdx index 80b88244ac67ca..5caf420464062a 100644 --- a/api_docs/serverless_search.mdx +++ b/api_docs/serverless_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessSearch title: "serverlessSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessSearch plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessSearch'] --- import serverlessSearchObj from './serverless_search.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 79162800e440ca..780c2b3b45e421 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index c4df520b19cc74..3131c5c2c6108e 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/slo.mdx b/api_docs/slo.mdx index 6b21af0604dbfe..1bceb41948c735 100644 --- a/api_docs/slo.mdx +++ b/api_docs/slo.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/slo title: "slo" image: https://source.unsplash.com/400x175/?github description: API docs for the slo plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'slo'] --- import sloObj from './slo.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index 16bc98a22e80d3..b12b6a9ec84e19 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index e8800dce8973aa..e47eb24a3ffced 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index d55c2a87486b7b..7bd81f0d77fe70 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index b02825de7e85be..0d8eeb21ffb4b1 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 01680f84a730b9..cafa9df73c7d77 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 332ecfc54c40a9..bd107e8ace5ae7 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 8a48000d1df75a..156c0703d5d000 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index a8f07a34bf3d61..f998b3df27e236 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index fa61ee11b71477..c930712b12bcf1 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/text_based_languages.mdx b/api_docs/text_based_languages.mdx index 267e7a39ae8975..5813f0438d52a7 100644 --- a/api_docs/text_based_languages.mdx +++ b/api_docs/text_based_languages.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/textBasedLanguages title: "textBasedLanguages" image: https://source.unsplash.com/400x175/?github description: API docs for the textBasedLanguages plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'textBasedLanguages'] --- import textBasedLanguagesObj from './text_based_languages.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index 683688d7e93532..ef23eb49129ccc 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index d9ba9b44c1c9c9..99e3b0e874c36b 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index e58c9cec1e62f4..2a2604e67dd170 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index b31663c7a5a5f3..e4b742cbd7d1f1 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 969cd27f7bc122..882b2c6be20442 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 602bb57e1f9fc1..5aa9989c99e79d 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_doc_viewer.mdx b/api_docs/unified_doc_viewer.mdx index 7f83f2c204322c..1caa3e13cf3c64 100644 --- a/api_docs/unified_doc_viewer.mdx +++ b/api_docs/unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedDocViewer title: "unifiedDocViewer" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedDocViewer plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedDocViewer'] --- import unifiedDocViewerObj from './unified_doc_viewer.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index 7401034d91de21..e523bb984eb860 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index e94fbd00a4aafa..bf5e4d88739908 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index 8d8f42e1070625..9be2c3796bffdf 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/uptime.mdx b/api_docs/uptime.mdx index 3615e524035d24..41ab261a2f6a19 100644 --- a/api_docs/uptime.mdx +++ b/api_docs/uptime.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uptime title: "uptime" image: https://source.unsplash.com/400x175/?github description: API docs for the uptime plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uptime'] --- import uptimeObj from './uptime.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index c41d14fcc1a83e..57e7235cc89b41 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 4275aebd09f688..57af900f407c7c 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index 9f95f19e351385..04268f31c0558c 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index ad9274f7b36d03..00204bf4434c2e 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index 09f8249808cee3..0524cbaa8be377 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index f8d93dc89d2c62..88bc88e7f03a23 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index 43d2eca9272e36..90f824637708d1 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index 139a4dcde08b81..986e5117524d03 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index ebb98991755223..f89789624e87cf 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 035af1f062fc44..3f26a6dc228f4d 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index 1597032573cce1..c32fdb26962813 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index bf370e3fbf573e..85f6705d4d4cc2 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index 4de8bc1a944fd0..62f1b17b448d9e 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 23d41de4f0317c..210f5acd288f13 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2024-07-08 +date: 2024-07-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; From dbb2e2d78ba09a8d6b2ecedff4d63a8c01c1f866 Mon Sep 17 00:00:00 2001 From: Justin Kambic Date: Tue, 9 Jul 2024 03:06:02 -0400 Subject: [PATCH 039/103] [Observability Onboarding] Add missing translation on OTel quickstart title (#187781) ## Summary Adds a missing translation call to one of the titles on the OTel collector quickstart in onboarding. --- .../application/quickstart_flows/otel_logs/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_logs/index.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_logs/index.tsx index 5fcdb8d20a38b2..f5693d8650e640 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_logs/index.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_logs/index.tsx @@ -770,7 +770,12 @@ rm ./otel.yml && cp ./otel_samples/platformlogs_hostmetrics.yml ./otel.yml && mk ), }, { - title: 'Visualize your data', + title: i18n.translate( + 'xpack.observability_onboarding.otelLogsPanel.steps.visualize', + { + defaultMessage: 'Visualize your data', + } + ), children: ( <> From e64102dc74bfd3ca411be7635fd204be96d2ae11 Mon Sep 17 00:00:00 2001 From: Konrad Szwarc Date: Tue, 9 Jul 2024 09:23:07 +0200 Subject: [PATCH 040/103] [EDR Workflows] Add artifact information (#184125) This PR adds both user and global Artifacts to the Policy Response tree, which can be found in the fleet's Policy Response flyout as well as in the Endpoint Details panel. The data needed to render these fields is already present in the policy_response API response. I don't believe we need to provide any kind of backward compatibility since `policy_response` API response seems to be carrying this info as far back as `7.17.23` stack version (Cloud @ `7.17.23` with FS @ `7.17.23` and Agent @ `7.17.23`), see screenshot below: ![Screenshot 2024-07-03 at 12 07 23](https://github.com/elastic/kibana/assets/29123534/b0d6dd45-4036-4f64-a42b-07c35ca37684) https://github.com/elastic/kibana/assets/29123534/ac1c5048-6e9f-4e9c-b61d-e76a473c83ed Updated styling https://github.com/elastic/kibana/assets/29123534/2ac95589-a228-4444-a781-b02055757c3b --- .../common/endpoint/types/index.ts | 5 +- .../policy_response_wrapper.test.tsx | 46 ++++++ .../policy_response/policy_response.tsx | 131 ++++++++++++++---- .../policy_response_artifact_item.tsx | 111 +++++++++++++++ .../policy_response_wrapper.tsx | 40 +++--- 5 files changed, 290 insertions(+), 43 deletions(-) create mode 100644 x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_artifact_item.tsx diff --git a/x-pack/plugins/security_solution/common/endpoint/types/index.ts b/x-pack/plugins/security_solution/common/endpoint/types/index.ts index 9e02fe0f69cef2..18bac96ba651e3 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/index.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/index.ts @@ -1225,6 +1225,9 @@ export interface HostPolicyResponseAppliedAction { export type HostPolicyResponseConfiguration = HostPolicyResponse['Endpoint']['policy']['applied']['response']['configurations']; +export type HostPolicyResponseArtifacts = + HostPolicyResponse['Endpoint']['policy']['applied']['artifacts']; + interface HostPolicyResponseConfigurationStatus { status: HostPolicyResponseActionStatus; concerned_actions: HostPolicyActionName[]; @@ -1233,7 +1236,7 @@ interface HostPolicyResponseConfigurationStatus { /** * Host Policy Response Applied Artifact */ -interface HostPolicyResponseAppliedArtifact { +export interface HostPolicyResponseAppliedArtifact { name: string; sha256: string; } diff --git a/x-pack/plugins/security_solution/public/management/components/policy_response/integration_tests/policy_response_wrapper.test.tsx b/x-pack/plugins/security_solution/public/management/components/policy_response/integration_tests/policy_response_wrapper.test.tsx index f23e3bb005fbac..63fd435e4a0462 100644 --- a/x-pack/plugins/security_solution/public/management/components/policy_response/integration_tests/policy_response_wrapper.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/policy_response/integration_tests/policy_response_wrapper.test.tsx @@ -136,6 +136,16 @@ describe('when on the policy response', () => { for (const action of actions) { userEvent.click(action); } + const artifactsTitle = component.getByTestId('endpointPolicyResponseArtifactsTitle'); + + userEvent.click(artifactsTitle); + + const globalArtifacts = component.getByTestId(`endpointPolicyResponseArtifactGlobal`); + const userArtifacts = component.getByTestId(`endpointPolicyResponseArtifactUser`); + + userEvent.click(globalArtifacts); + userEvent.click(userArtifacts); + return component; }; }); @@ -209,6 +219,42 @@ describe('when on the policy response', () => { // ); }); + it('should show a configuration section for artifacts', async () => { + runMock(); + const component = await renderOpenedTree(); + + const globalArtifacts = component.getByTestId(`endpointPolicyResponseArtifactGlobal`); + const userArtifacts = component.getByTestId(`endpointPolicyResponseArtifactUser`); + expect(globalArtifacts.textContent).toBe( + `Global (v${commonPolicyResponse.Endpoint.policy.applied.artifacts.global.version})` + ); + expect(userArtifacts.textContent).toBe( + `User (v${commonPolicyResponse.Endpoint.policy.applied.artifacts.user.version})` + ); + }); + + it('should show artifact section for each configuration section', async () => { + runMock(); + const component = await renderOpenedTree(); + + const artifacts = [ + ...commonPolicyResponse.Endpoint.policy.applied.artifacts.global.identifiers, + ...commonPolicyResponse.Endpoint.policy.applied.artifacts.user.identifiers, + ]; + + const names = component.queryAllByTestId('endpointPolicyResponseArtifactName'); + const sha256s = component.queryAllByTestId('endpointPolicyResponseArtifactSha256'); + const copyButtons = component.queryAllByTestId('endpointPolicyResponseArtifactCopyButton'); + + expect(names).toHaveLength(artifacts.length); + expect(sha256s).toHaveLength(artifacts.length); + expect(copyButtons).toHaveLength(artifacts.length); + expect(names[0].textContent).toBe(artifacts[0].name); + expect(names[1].textContent).toBe(artifacts[1].name); + expect(sha256s[0].textContent).toContain(artifacts[0].sha256.substring(0, 5)); // Rendered sha256 is truncated + expect(sha256s[1].textContent).toContain(artifacts[1].sha256.substring(0, 5)); + }); + it('should not show any numbered badges if all actions are successful', async () => { const policyResponse = createPolicyResponse(HostPolicyResponseActionStatus.success); runMock(policyResponse); diff --git a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response.tsx b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response.tsx index 4f2c53c15fb608..8871ef5ba35401 100644 --- a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response.tsx +++ b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response.tsx @@ -6,12 +6,15 @@ */ import React, { memo, useCallback } from 'react'; +import { capitalize } from 'lodash'; import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiHealth, EuiText, EuiTreeView, EuiNotificationBadge } from '@elastic/eui'; +import { PolicyResponseArtifactItem } from './policy_response_artifact_item'; import { useKibana } from '../../../common/lib/kibana'; import type { HostPolicyResponseAppliedAction, + HostPolicyResponseArtifacts, HostPolicyResponseConfiguration, Immutable, ImmutableArray, @@ -23,33 +26,46 @@ import { PolicyResponseActionItem } from './policy_response_action_item'; // Most of them are needed in order to display large react nodes (PolicyResponseActionItem) in child levels. const StyledEuiTreeView = styled(EuiTreeView)` - .policy-response-action-item-expanded { + & .policy-response-artifact-item { + & .euiTreeView__nodeLabel { + width: 100%; + } + } + + & .policy-response-action-item-expanded { height: auto; padding-top: ${({ theme }) => theme.eui.euiSizeS}; padding-bottom: ${({ theme }) => theme.eui.euiSizeS}; - .euiTreeView__nodeLabel { + + & .euiTreeView__nodeLabel { width: 100%; } } - .policyResponseStatusHealth { + + & .policyResponseStatusHealth { padding-top: 5px; } - .euiTreeView__node--expanded { + + & .euiTreeView__node--expanded { max-height: none !important; - .policy-response-action-expanded + div { - .euiTreeView__node { + + & .policy-response-action-expanded + div { + & .euiTreeView__node { // When response action item displays a callout, this needs to be overwritten to remove the default max height of EuiTreeView max-height: none !important; } } } - .euiTreeView__node { + + & .euiTreeView__node { max-height: none !important; - .euiNotificationBadge { + + & .euiNotificationBadge { margin-right: 5px; } - .euiTreeView__nodeLabel { - .euiText { + + & .euiTreeView__nodeLabel { + & .euiText { font-size: ${({ theme }) => theme.eui.euiFontSize}; } } @@ -60,6 +76,7 @@ interface PolicyResponseProps { hostOs: string; policyResponseConfig: Immutable; policyResponseActions: Immutable; + policyResponseArtifacts: Immutable; policyResponseAttentionCount: Map; } @@ -71,6 +88,7 @@ export const PolicyResponse = memo( hostOs, policyResponseConfig, policyResponseActions, + policyResponseArtifacts, policyResponseAttentionCount, }: PolicyResponseProps) => { const { docLinks } = useKibana().services; @@ -155,37 +173,100 @@ export const PolicyResponse = memo( ] ); - const getResponseConfigs = useCallback( - () => - Object.entries(policyResponseConfig).map(([key, val]) => { - const attentionCount = policyResponseAttentionCount.get(key); + const getArtifacts = useCallback( + ( + artifactIdentifiers: PolicyResponseProps['policyResponseArtifacts'][ + | 'global' + | 'user']['identifiers'] + ) => { + return artifactIdentifiers.map((artifact) => { + return { + label: , + id: artifact.name, + className: 'policy-response-artifact-item', + }; + }); + }, + [] + ); + + const getResponseConfigs = useCallback(() => { + const config = Object.entries(policyResponseConfig).map(([key, val]) => { + const attentionCount = policyResponseAttentionCount.get(key); + return { + label: ( + + {formatResponse(key)} + + ), + id: key, + icon: attentionCount ? ( + + {attentionCount} + + ) : ( + + ), + children: getConcernedActions(val.concerned_actions), + }; + }); + + const artifacts = { + label: ( + + + + ), + id: 'policyResponseArtifacts', + icon: ( + + ), + children: Object.entries(policyResponseArtifacts).map(([key, val]) => { return { label: ( - {formatResponse(key)} + {`${capitalize(key)} (v${val.version})`} ), id: key, - icon: attentionCount ? ( - - {attentionCount} - - ) : ( + icon: ( ), - children: getConcernedActions(val.concerned_actions), + children: getArtifacts(val.identifiers), }; }), - [getConcernedActions, policyResponseAttentionCount, policyResponseConfig] - ); + }; + return [...config, artifacts]; + }, [ + getArtifacts, + getConcernedActions, + policyResponseArtifacts, + policyResponseAttentionCount, + policyResponseConfig, + ]); const generateTreeView = useCallback(() => { let policyTotalErrors = 0; diff --git a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_artifact_item.tsx b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_artifact_item.tsx new file mode 100644 index 00000000000000..1d252f1ed9f37b --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_artifact_item.tsx @@ -0,0 +1,111 @@ +/* + * Copyright 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, { memo } from 'react'; +import { truncate } from 'lodash'; +import styled from 'styled-components'; +import { EuiCopy, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText, EuiToolTip } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import type { HostPolicyResponseAppliedArtifact } from '../../../../common/endpoint/types'; + +const StyledArtifactName = styled(EuiText)` + white-space: nowrap; + line-height: inherit; + overflow: hidden; + text-overflow: ellipsis; +`; + +const StyledShaValue = styled(EuiText)` + width: 80px; + white-space: nowrap; + line-height: inherit; + overflow: hidden; + text-overflow: ellipsis; +`; + +const IconContainer = styled(EuiText)` + padding: 2px; + border: ${({ theme }) => theme.eui.euiBorderThin}; + border-radius: ${({ theme }) => theme.eui.euiBorderRadiusSmall}; +`; + +interface PolicyResponseArtifactItemProps { + artifact: HostPolicyResponseAppliedArtifact; +} + +const COPY_TOOLTIP = { + BEFORE: i18n.translate( + 'xpack.securitySolution.endpoint.details.policyResponse.artifact.copyButton.beforeCopyTooltip', + { + defaultMessage: 'Copy artifact ID', + } + ), + AFTER: i18n.translate( + 'xpack.securitySolution.endpoint.details.policyResponse.artifact.copyButton.afterCopyTooltip', + { + defaultMessage: 'Artifact ID copied!', + } + ), +}; + +export const PolicyResponseArtifactItem = memo(({ artifact }: PolicyResponseArtifactItemProps) => { + return ( + + + + + {artifact.name} + + + + + + + {'sha256'} + + + + + <>{truncate(artifact.sha256, { length: 12 })} + + + + + + {(copy) => ( + + )} + + + + + + ); +}); + +PolicyResponseArtifactItem.displayName = 'PolicyResponseArtifactItem'; diff --git a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.tsx b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.tsx index d80f7403e8e725..6c0ae3c4ddb14c 100644 --- a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.tsx +++ b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.tsx @@ -32,6 +32,8 @@ export const PolicyResponseWrapper = memo( const [policyResponseConfig, setPolicyResponseConfig] = useState(); + const [policyResponseArtifacts, setPolicyResponseArtifacts] = + useState(); const [policyResponseActions, setPolicyResponseActions] = useState(); const [policyResponseAttentionCount, setPolicyResponseAttentionCount] = useState< @@ -43,6 +45,7 @@ export const PolicyResponseWrapper = memo( setPolicyResponseConfig( data.policy_response.Endpoint.policy.applied.response.configurations ); + setPolicyResponseArtifacts(data.policy_response.Endpoint.policy.applied.artifacts); setPolicyResponseActions(data.policy_response.Endpoint.policy.applied.actions); setPolicyResponseAttentionCount( getFailedOrWarningActionCountFromPolicyResponse( @@ -125,23 +128,26 @@ export const PolicyResponseWrapper = memo( /> )} {isLoading && } - {policyResponseConfig !== undefined && policyResponseActions !== undefined && ( - <> - - - {genericErrors?.map((genericActionError) => ( - - - - - ))} - - )} + {policyResponseConfig !== undefined && + policyResponseActions !== undefined && + policyResponseArtifacts !== undefined && ( + <> + + + {genericErrors?.map((genericActionError) => ( + + + + + ))} + + )} ); } From 4013f608c1872b75f4f5601889a478b985479859 Mon Sep 17 00:00:00 2001 From: Dario Gieselaar Date: Tue, 9 Jul 2024 09:31:54 +0200 Subject: [PATCH 041/103] [AI Assistant] Add to dashboard (#179329) Adds a new functionality in the AI assistant when in dashboards. If the users ask for a question which will generate a query then then can use prompts like: - `Create a visualization from this query and add this to a dashboard` - `Create a metric from this query and add this to a dashboard` - .... ![meow](https://github.com/elastic/kibana/assets/17003240/3092f006-13ce-4565-b9d3-c6ad407afb31) ### How it works - It uses the existing functionality of the assistant to create an ES|QL query (if the generated query is wrong is not part of this PR) - The LLM returns the query to the new `add_to_dashboard` function and with the chart type (if the user has added the preference) and the configuration needed for the ConfigBuilder it creates a Lens embeddable and adds it to the dashboard. ### How to test - Go to advanced settings, find the `Observability AI Assistant scope` setting and change to Everywhere - Go to a dahsboard (existing or new) - Ask a question to the AI such as `I want the 95th percentile of ... from ... index` or `I want the median of butes from the kibana_sample_data_logs grouped by the top 5 destinations` - After the ES|QL query has been generated correctly ask AI to create a chart from this query and add this to the dashboard ### important note As this is the first real consumer of the build api for ES|QL I have fixed and various bugs I discovered in the api. --------- Co-authored-by: Stratoula Kalafateli Co-authored-by: Stratoula Kalafateli Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../config_builder/charts/gauge.test.ts | 2 + .../config_builder/charts/heatmap.test.ts | 1 + .../config_builder/charts/metric.test.ts | 1 + .../config_builder/charts/partition.test.ts | 1 + .../config_builder/charts/region_map.test.ts | 1 + .../config_builder/charts/table.test.ts | 1 + .../config_builder/charts/tag_cloud.test.ts | 5 +- .../config_builder/charts/tag_cloud.ts | 6 +- .../config_builder/charts/xy.test.ts | 1 + .../config_builder/config_builder.ts | 4 +- .../config_builder/types.ts | 10 +- .../config_builder/utils.test.ts | 1 + .../config_builder/utils.ts | 1 + src/plugins/dashboard/kibana.jsonc | 3 +- .../public/dashboard_app/dashboard_app.tsx | 11 +- ...use_observability_ai_assistant_context.tsx | 386 ++++++++++++++++++ src/plugins/dashboard/public/plugin.tsx | 6 + ...observability_ai_assistant_service.stub.ts | 20 + .../observability_ai_assistant_service.ts | 23 ++ .../observability_ai_assistant/types.ts | 13 + .../public/services/plugin_services.stub.ts | 2 + .../public/services/plugin_services.ts | 2 + .../dashboard/public/services/types.ts | 2 + src/plugins/dashboard/tsconfig.json | 4 + .../utils/create_screen_context_action.ts | 2 +- 25 files changed, 493 insertions(+), 16 deletions(-) create mode 100644 src/plugins/dashboard/public/dashboard_app/hooks/use_observability_ai_assistant_context.tsx create mode 100644 src/plugins/dashboard/public/services/observability_ai_assistant/observability_ai_assistant_service.stub.ts create mode 100644 src/plugins/dashboard/public/services/observability_ai_assistant/observability_ai_assistant_service.ts create mode 100644 src/plugins/dashboard/public/services/observability_ai_assistant/types.ts diff --git a/packages/kbn-lens-embeddable-utils/config_builder/charts/gauge.test.ts b/packages/kbn-lens-embeddable-utils/config_builder/charts/gauge.test.ts index 322bfa2fb2da18..6403ec630a66f8 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/charts/gauge.test.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/charts/gauge.test.ts @@ -98,6 +98,7 @@ test('generates gauge chart config', async () => { "query": Object { "esql": "from test | count=count()", }, + "timeField": undefined, }, }, }, @@ -189,6 +190,7 @@ test('generates gauge chart config with goal and max', async () => { "query": Object { "esql": "from test | count=count() | eval max=1000 | eval goal=500", }, + "timeField": undefined, }, }, }, diff --git a/packages/kbn-lens-embeddable-utils/config_builder/charts/heatmap.test.ts b/packages/kbn-lens-embeddable-utils/config_builder/charts/heatmap.test.ts index 9c3c2fa2bdb6b3..a6ba22ea8de1a0 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/charts/heatmap.test.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/charts/heatmap.test.ts @@ -116,6 +116,7 @@ test('generates metric chart config', async () => { "query": Object { "esql": "from test | count=count() by @timestamp, category", }, + "timeField": undefined, }, }, }, diff --git a/packages/kbn-lens-embeddable-utils/config_builder/charts/metric.test.ts b/packages/kbn-lens-embeddable-utils/config_builder/charts/metric.test.ts index 052c89a0c56c79..05d89bb95cd84d 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/charts/metric.test.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/charts/metric.test.ts @@ -108,6 +108,7 @@ test('generates metric chart config', async () => { "query": Object { "esql": "from test | count=count()", }, + "timeField": undefined, }, }, }, diff --git a/packages/kbn-lens-embeddable-utils/config_builder/charts/partition.test.ts b/packages/kbn-lens-embeddable-utils/config_builder/charts/partition.test.ts index 120b3069552d8e..2511601b5bab51 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/charts/partition.test.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/charts/partition.test.ts @@ -115,6 +115,7 @@ test('generates metric chart config', async () => { "query": Object { "esql": "from test | count=count() by @timestamp, category", }, + "timeField": undefined, }, }, }, diff --git a/packages/kbn-lens-embeddable-utils/config_builder/charts/region_map.test.ts b/packages/kbn-lens-embeddable-utils/config_builder/charts/region_map.test.ts index dc1f37a393fd23..e3a50cc3a07a15 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/charts/region_map.test.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/charts/region_map.test.ts @@ -107,6 +107,7 @@ test('generates region map chart config', async () => { "query": Object { "esql": "from test | count=count() by category", }, + "timeField": undefined, }, }, }, diff --git a/packages/kbn-lens-embeddable-utils/config_builder/charts/table.test.ts b/packages/kbn-lens-embeddable-utils/config_builder/charts/table.test.ts index 90c07d4af46b72..3ddbaa79357e15 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/charts/table.test.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/charts/table.test.ts @@ -107,6 +107,7 @@ test('generates table config', async () => { "query": Object { "esql": "from test | count=count() by category", }, + "timeField": undefined, }, }, }, diff --git a/packages/kbn-lens-embeddable-utils/config_builder/charts/tag_cloud.test.ts b/packages/kbn-lens-embeddable-utils/config_builder/charts/tag_cloud.test.ts index d7db572bb286a2..ff8366f9eeda17 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/charts/tag_cloud.test.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/charts/tag_cloud.test.ts @@ -107,6 +107,7 @@ test('generates tag cloud chart config', async () => { "query": Object { "esql": "from test | count=count() by category", }, + "timeField": undefined, }, }, }, @@ -123,8 +124,8 @@ test('generates tag cloud chart config', async () => { "minFontSize": 12, "orientation": "single", "showLabel": true, - "tagAccessor": "category", - "valueAccessor": "count", + "tagAccessor": "metric_formula_accessor_breakdown", + "valueAccessor": "metric_formula_accessor", }, }, "title": "test", diff --git a/packages/kbn-lens-embeddable-utils/config_builder/charts/tag_cloud.ts b/packages/kbn-lens-embeddable-utils/config_builder/charts/tag_cloud.ts index 551dcfe973d3a5..55ce8f1fe1a02e 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/charts/tag_cloud.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/charts/tag_cloud.ts @@ -18,7 +18,6 @@ import { buildDatasourceStates, buildReferences, getAdhocDataviews, - isFormulaDataset, mapToFormula, } from '../utils'; import { getBreakdownColumn, getFormulaColumn, getValueColumn } from '../columns'; @@ -31,18 +30,17 @@ function getAccessorName(type: 'breakdown') { function buildVisualizationState(config: LensTagCloudConfig): TagcloudState { const layer = config; - const isFormula = isFormulaDataset(config.dataset) || isFormulaDataset(layer.dataset); return { layerId: DEFAULT_LAYER_ID, - valueAccessor: !isFormula ? layer.value : ACCESSOR, + valueAccessor: ACCESSOR, maxFontSize: 72, minFontSize: 12, orientation: 'single', showLabel: true, ...(layer.breakdown ? { - tagAccessor: !isFormula ? (layer.breakdown as string) : getAccessorName('breakdown'), + tagAccessor: getAccessorName('breakdown'), } : {}), }; diff --git a/packages/kbn-lens-embeddable-utils/config_builder/charts/xy.test.ts b/packages/kbn-lens-embeddable-utils/config_builder/charts/xy.test.ts index 562c5b0948a486..4af00e3d163bd1 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/charts/xy.test.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/charts/xy.test.ts @@ -125,6 +125,7 @@ test('generates xy chart config', async () => { "query": Object { "esql": "from test | count=count() by @timestamp", }, + "timeField": undefined, }, }, }, diff --git a/packages/kbn-lens-embeddable-utils/config_builder/config_builder.ts b/packages/kbn-lens-embeddable-utils/config_builder/config_builder.ts index 4a14e20b7aea47..f60a758f49e9ec 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/config_builder.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/config_builder.ts @@ -49,7 +49,7 @@ export class LensConfigBuilder { async build( config: LensConfig, options: LensConfigOptions = {} - ): Promise { + ): Promise { const { chartType } = config; const chartConfig = await this.charts[chartType](config as any, { formulaAPI: this.formulaAPI, @@ -74,6 +74,6 @@ export class LensConfigBuilder { } as LensEmbeddableInput; } - return chartState; + return chartState as LensAttributes; } } diff --git a/packages/kbn-lens-embeddable-utils/config_builder/types.ts b/packages/kbn-lens-embeddable-utils/config_builder/types.ts index 19683adb4d423c..b246d79c6a0b6b 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/types.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/types.ts @@ -7,7 +7,7 @@ */ import type { FormulaPublicApi, TypedLensByValueInput } from '@kbn/lens-plugin/public'; -import type { Filter, Query } from '@kbn/es-query'; +import type { AggregateQuery, Filter, Query } from '@kbn/es-query'; import type { Datatable } from '@kbn/expressions-plugin/common'; import { DataViewsCommon } from './config_builder'; @@ -95,7 +95,7 @@ export interface LensConfigOptions { /** optional time range override */ timeRange?: TimeRange; filters?: Filter[]; - query?: Query; + query?: Query | AggregateQuery; } export interface LensAxisTitleVisibilityConfig { @@ -208,9 +208,9 @@ export type LensRegionMapConfig = Identity< export interface LensMosaicConfigBase { chartType: 'mosaic'; /** field name to apply breakdown based on field type or full breakdown configuration */ - breakdown: LensBreakdownConfig; + breakdown: LensBreakdownConfig[]; /** field name to apply breakdown based on field type or full breakdown configuration */ - xAxis: LensBreakdownConfig; + xAxis?: LensBreakdownConfig; } export type LensMosaicConfig = Identity; @@ -228,7 +228,7 @@ export type LensTableConfig = Identity; } diff --git a/packages/kbn-lens-embeddable-utils/config_builder/utils.test.ts b/packages/kbn-lens-embeddable-utils/config_builder/utils.test.ts index d7559b7121ae87..480be9c800b56c 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/utils.test.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/utils.test.ts @@ -208,6 +208,7 @@ describe('buildDatasourceStates', () => { "query": Object { "esql": "from test | limit 10", }, + "timeField": undefined, }, }, }, diff --git a/packages/kbn-lens-embeddable-utils/config_builder/utils.ts b/packages/kbn-lens-embeddable-utils/config_builder/utils.ts index ffd0a40612a7ab..ca4114b4df4fe3 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/utils.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/utils.ts @@ -200,6 +200,7 @@ function buildDatasourceStatesLayer( const newLayer = { index: dataView!.id!, query: { esql: (dataset as LensESQLDataset).esql } as AggregateQuery, + timeField: dataView!.timeFieldName, columns, allColumns: columns, }; diff --git a/src/plugins/dashboard/kibana.jsonc b/src/plugins/dashboard/kibana.jsonc index 1c7689e09cf9fe..2bf60cde55ef0e 100644 --- a/src/plugins/dashboard/kibana.jsonc +++ b/src/plugins/dashboard/kibana.jsonc @@ -34,7 +34,8 @@ "usageCollection", "taskManager", "serverless", - "noDataPage" + "noDataPage", + "observabilityAIAssistant" ], "requiredBundles": [ "kibanaReact", diff --git a/src/plugins/dashboard/public/dashboard_app/dashboard_app.tsx b/src/plugins/dashboard/public/dashboard_app/dashboard_app.tsx index 320887bbf551cd..2fa3ad16f7823b 100644 --- a/src/plugins/dashboard/public/dashboard_app/dashboard_app.tsx +++ b/src/plugins/dashboard/public/dashboard_app/dashboard_app.tsx @@ -42,6 +42,7 @@ import { loadDashboardHistoryLocationState } from './locator/load_dashboard_hist import type { DashboardCreationOptions } from '../dashboard_container/embeddable/dashboard_container_factory'; import { DashboardTopNav } from '../dashboard_top_nav'; import { DashboardTabTitleSetter } from './tab_title_setter/dashboard_tab_title_setter'; +import { useObservabilityAIAssistantContext } from './hooks/use_observability_ai_assistant_context'; export interface DashboardAppProps { history: History; @@ -82,13 +83,21 @@ export function DashboardApp({ embeddable: { getStateTransfer }, notifications: { toasts }, settings: { uiSettings }, - data: { search }, + data: { search, dataViews }, customBranding, share: { url }, + observabilityAIAssistant, } = pluginServices.getServices(); const showPlainSpinner = useObservable(customBranding.hasCustomBranding$, false); const { scopedHistory: getScopedHistory } = useDashboardMountContext(); + useObservabilityAIAssistantContext({ + observabilityAIAssistant: observabilityAIAssistant.start, + dashboardAPI, + search, + dataViews, + }); + useExecutionContext(executionContext, { type: 'application', page: 'app', diff --git a/src/plugins/dashboard/public/dashboard_app/hooks/use_observability_ai_assistant_context.tsx b/src/plugins/dashboard/public/dashboard_app/hooks/use_observability_ai_assistant_context.tsx new file mode 100644 index 00000000000000..04340b040c5ca8 --- /dev/null +++ b/src/plugins/dashboard/public/dashboard_app/hooks/use_observability_ai_assistant_context.tsx @@ -0,0 +1,386 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { ObservabilityAIAssistantPublicStart } from '@kbn/observability-ai-assistant-plugin/public'; +import { useEffect } from 'react'; +import type { Embeddable } from '@kbn/embeddable-plugin/public'; +import { getESQLQueryColumns } from '@kbn/esql-utils'; +import type { ISearchStart } from '@kbn/data-plugin/public'; +import { + LensConfigBuilder, + type LensConfig, + type LensMetricConfig, + type LensPieConfig, + type LensGaugeConfig, + type LensXYConfig, + type LensHeatmapConfig, + type LensMosaicConfig, + type LensRegionMapConfig, + type LensTableConfig, + type LensTagCloudConfig, + type LensTreeMapConfig, + LensDataset, +} from '@kbn/lens-embeddable-utils/config_builder'; +import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; +import { LensEmbeddableInput } from '@kbn/lens-plugin/public'; +import type { AwaitingDashboardAPI } from '../../dashboard_container'; + +const chartTypes = [ + 'xy', + 'pie', + 'heatmap', + 'metric', + 'gauge', + 'donut', + 'mosaic', + 'regionmap', + 'table', + 'tagcloud', + 'treemap', +] as const; + +export function useObservabilityAIAssistantContext({ + observabilityAIAssistant, + dashboardAPI, + search, + dataViews, +}: { + observabilityAIAssistant: ObservabilityAIAssistantPublicStart | undefined; + dashboardAPI: AwaitingDashboardAPI; + search: ISearchStart; + dataViews: DataViewsPublicPluginStart; +}) { + useEffect(() => { + if (!observabilityAIAssistant) { + return; + } + + const { + service: { setScreenContext }, + createScreenContextAction, + } = observabilityAIAssistant; + + return setScreenContext({ + screenDescription: + 'The user is looking at the dashboard app. Here they can add visualizations to a dashboard and save them', + actions: dashboardAPI + ? [ + createScreenContextAction( + { + name: 'add_to_dashboard', + description: + 'Add an ES|QL visualization to the current dashboard. Pick a single chart type, and based on the chart type, the corresponding key for `layers`. E.g., when you select type:metric, fill in only layers.metric.', + parameters: { + type: 'object', + properties: { + esql: { + type: 'object', + properties: { + query: { + type: 'string', + description: + 'The ES|QL query for this visualization. Use the "query" function to generate ES|QL first and then add it here.', + }, + }, + required: ['query'], + }, + type: { + type: 'string', + description: 'The type of chart', + enum: chartTypes, + }, + layers: { + type: 'object', + properties: { + xy: { + type: 'object', + properties: { + xAxis: { + type: 'string', + }, + yAxis: { + type: 'string', + }, + type: { + type: 'string', + enum: ['line', 'bar', 'area'], + }, + }, + }, + donut: { + type: 'object', + properties: { + breakdown: { + type: 'string', + }, + }, + }, + metric: { + type: 'object', + }, + gauge: { + type: 'object', + }, + pie: { + type: 'object', + properties: { + breakdown: { + type: 'string', + }, + }, + }, + heatmap: { + type: 'object', + properties: { + xAxis: { + type: 'string', + }, + breakdown: { + type: 'string', + }, + }, + required: ['xAxis'], + }, + mosaic: { + type: 'object', + properties: { + breakdown: { + type: 'string', + }, + }, + required: ['breakdown'], + }, + regionmap: { + type: 'object', + properties: { + breakdown: { + type: 'string', + }, + }, + required: ['breakdown'], + }, + table: { + type: 'object', + }, + tagcloud: { + type: 'object', + properties: { + breakdown: { + type: 'string', + }, + }, + required: ['breakdown'], + }, + treemap: { + type: 'object', + properties: { + breakdown: { + type: 'string', + }, + }, + }, + }, + }, + title: { + type: 'string', + description: 'An optional title for the visualization.', + }, + }, + required: ['esql', 'type'], + } as const, + }, + async ({ args, signal }) => { + const { + title = '', + type: chartType = 'xy', + layers, + esql: { query }, + } = args; + + const [columns] = await Promise.all([ + getESQLQueryColumns({ + esqlQuery: query, + search: search.search, + signal, + }), + ]); + + const configBuilder = new LensConfigBuilder(dataViews); + + let config: LensConfig; + + const firstMetricColumn = columns.find( + (column) => column.meta.type === 'number' + )?.id; + + const dataset: LensDataset = { + esql: query, + }; + + switch (chartType) { + default: + case 'xy': + const xyConfig: LensXYConfig = { + chartType: 'xy', + layers: [ + { + seriesType: layers?.xy?.type || 'line', + type: 'series', + xAxis: layers?.xy?.xAxis || '@timestamp', + yAxis: [ + { + value: layers?.xy?.yAxis || firstMetricColumn!, + }, + ], + }, + ], + dataset, + title, + }; + config = xyConfig; + break; + + case 'donut': + const donutConfig: LensPieConfig = { + chartType, + title, + value: firstMetricColumn!, + breakdown: [layers?.donut?.breakdown!], + dataset, + }; + config = donutConfig; + break; + + case 'pie': + const pieConfig: LensPieConfig = { + chartType, + title, + value: firstMetricColumn!, + breakdown: [layers?.pie?.breakdown!], + dataset, + }; + config = pieConfig; + break; + + case 'metric': + const metricConfig: LensMetricConfig = { + chartType, + title, + value: firstMetricColumn!, + dataset, + }; + config = metricConfig; + break; + + case 'gauge': + const gaugeConfig: LensGaugeConfig = { + chartType, + title, + value: firstMetricColumn!, + dataset, + }; + config = gaugeConfig; + + break; + + case 'heatmap': + const heatmapConfig: LensHeatmapConfig = { + chartType, + title, + value: firstMetricColumn!, + breakdown: layers?.heatmap?.breakdown, + xAxis: layers?.heatmap?.xAxis || '@timestamp', + dataset, + }; + config = heatmapConfig; + break; + + case 'mosaic': + const mosaicConfig: LensMosaicConfig = { + chartType, + title, + value: firstMetricColumn!, + breakdown: [layers?.mosaic?.breakdown || '@timestamp'], + dataset, + }; + config = mosaicConfig; + break; + + case 'regionmap': + const regionMapConfig: LensRegionMapConfig = { + chartType, + title, + value: firstMetricColumn!, + breakdown: layers?.regionmap?.breakdown!, + dataset, + }; + config = regionMapConfig; + break; + + case 'table': + const tableConfig: LensTableConfig = { + chartType, + title, + value: firstMetricColumn!, + dataset, + }; + config = tableConfig; + break; + + case 'tagcloud': + const tagCloudConfig: LensTagCloudConfig = { + chartType, + title, + value: firstMetricColumn!, + breakdown: layers?.tagcloud?.breakdown!, + dataset, + }; + config = tagCloudConfig; + break; + + case 'treemap': + const treeMapConfig: LensTreeMapConfig = { + chartType, + title, + value: firstMetricColumn!, + breakdown: [layers?.treemap?.breakdown || '@timestamp'], + dataset, + }; + config = treeMapConfig; + break; + } + + const embeddableInput = (await configBuilder.build(config, { + embeddable: true, + query: dataset, + })) as LensEmbeddableInput; + + return dashboardAPI + .addNewPanel({ + panelType: 'lens', + initialState: embeddableInput, + }) + .then(() => { + return { + content: 'Visualization successfully added to dashboard', + }; + }) + .catch((error) => { + return { + content: { + error, + }, + }; + }); + } + ), + ] + : [], + }); + }, [observabilityAIAssistant, dashboardAPI, search, dataViews]); +} diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx index 344afc4ef73045..a3e5d24b9b7f26 100644 --- a/src/plugins/dashboard/public/plugin.tsx +++ b/src/plugins/dashboard/public/plugin.tsx @@ -52,6 +52,10 @@ import type { UrlForwardingSetup, UrlForwardingStart } from '@kbn/url-forwarding import type { SavedObjectTaggingOssPluginStart } from '@kbn/saved-objects-tagging-oss-plugin/public'; import type { ServerlessPluginStart } from '@kbn/serverless/public'; import type { NoDataPagePluginStart } from '@kbn/no-data-page-plugin/public'; +import type { + ObservabilityAIAssistantPublicSetup, + ObservabilityAIAssistantPublicStart, +} from '@kbn/observability-ai-assistant-plugin/public'; import { CustomBrandingStart } from '@kbn/core-custom-branding-browser'; import { SavedObjectsManagementPluginStart } from '@kbn/saved-objects-management-plugin/public'; @@ -87,6 +91,7 @@ export interface DashboardSetupDependencies { uiActions: UiActionsSetup; urlForwarding: UrlForwardingSetup; unifiedSearch: UnifiedSearchPublicPluginStart; + observabilityAIAssistant?: ObservabilityAIAssistantPublicSetup; } export interface DashboardStartDependencies { @@ -110,6 +115,7 @@ export interface DashboardStartDependencies { customBranding: CustomBrandingStart; serverless?: ServerlessPluginStart; noDataPage?: NoDataPagePluginStart; + observabilityAIAssistant?: ObservabilityAIAssistantPublicStart; } export interface DashboardSetup { diff --git a/src/plugins/dashboard/public/services/observability_ai_assistant/observability_ai_assistant_service.stub.ts b/src/plugins/dashboard/public/services/observability_ai_assistant/observability_ai_assistant_service.stub.ts new file mode 100644 index 00000000000000..089ac9c6afc6b4 --- /dev/null +++ b/src/plugins/dashboard/public/services/observability_ai_assistant/observability_ai_assistant_service.stub.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { PluginServiceFactory } from '@kbn/presentation-util-plugin/public'; +import { observabilityAIAssistantPluginMock } from '@kbn/observability-ai-assistant-plugin/public/mock'; +import { ObservabilityAIAssistantService } from './types'; + +type ObservabilityAIAssistantServiceFactory = PluginServiceFactory; + +export const observabilityAIAssistantServiceStubFactory: ObservabilityAIAssistantServiceFactory = + () => { + const pluginMock = observabilityAIAssistantPluginMock.createStartContract(); + return { + start: pluginMock, + }; + }; diff --git a/src/plugins/dashboard/public/services/observability_ai_assistant/observability_ai_assistant_service.ts b/src/plugins/dashboard/public/services/observability_ai_assistant/observability_ai_assistant_service.ts new file mode 100644 index 00000000000000..81d1a238546387 --- /dev/null +++ b/src/plugins/dashboard/public/services/observability_ai_assistant/observability_ai_assistant_service.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { KibanaPluginServiceFactory } from '@kbn/presentation-util-plugin/public'; +import type { DashboardStartDependencies } from '../../plugin'; +import type { ObservabilityAIAssistantService } from './types'; + +export type ObservabilityAIAssistantServiceFactory = KibanaPluginServiceFactory< + ObservabilityAIAssistantService, + DashboardStartDependencies +>; +export const observabilityAIAssistantServiceFactory: ObservabilityAIAssistantServiceFactory = ({ + startPlugins, +}) => { + return startPlugins.observabilityAIAssistant + ? { start: startPlugins.observabilityAIAssistant } + : {}; +}; diff --git a/src/plugins/dashboard/public/services/observability_ai_assistant/types.ts b/src/plugins/dashboard/public/services/observability_ai_assistant/types.ts new file mode 100644 index 00000000000000..342f4610240662 --- /dev/null +++ b/src/plugins/dashboard/public/services/observability_ai_assistant/types.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { ObservabilityAIAssistantPublicStart } from '@kbn/observability-ai-assistant-plugin/public'; + +export interface ObservabilityAIAssistantService { + start?: ObservabilityAIAssistantPublicStart; +} diff --git a/src/plugins/dashboard/public/services/plugin_services.stub.ts b/src/plugins/dashboard/public/services/plugin_services.stub.ts index e6898ebe6e921c..8f0f1dd4f5bbc0 100644 --- a/src/plugins/dashboard/public/services/plugin_services.stub.ts +++ b/src/plugins/dashboard/public/services/plugin_services.stub.ts @@ -44,6 +44,7 @@ import { savedObjectsManagementServiceFactory } from './saved_objects_management import { contentManagementServiceFactory } from './content_management/content_management_service.stub'; import { serverlessServiceFactory } from './serverless/serverless_service.stub'; import { userProfileServiceFactory } from './user_profile/user_profile_service.stub'; +import { observabilityAIAssistantServiceStubFactory } from './observability_ai_assistant/observability_ai_assistant_service.stub'; import { noDataPageServiceFactory } from './no_data_page/no_data_page_service.stub'; import { uiActionsServiceFactory } from './ui_actions/ui_actions_service.stub'; @@ -80,6 +81,7 @@ export const providers: PluginServiceProviders = { noDataPage: new PluginServiceProvider(noDataPageServiceFactory), uiActions: new PluginServiceProvider(uiActionsServiceFactory), userProfile: new PluginServiceProvider(userProfileServiceFactory), + observabilityAIAssistant: new PluginServiceProvider(observabilityAIAssistantServiceStubFactory), }; export const registry = new PluginServiceRegistry(providers); diff --git a/src/plugins/dashboard/public/services/plugin_services.ts b/src/plugins/dashboard/public/services/plugin_services.ts index ef9a195cfd7cf0..9880308e7c5e57 100644 --- a/src/plugins/dashboard/public/services/plugin_services.ts +++ b/src/plugins/dashboard/public/services/plugin_services.ts @@ -46,6 +46,7 @@ import { contentManagementServiceFactory } from './content_management/content_ma import { serverlessServiceFactory } from './serverless/serverless_service'; import { noDataPageServiceFactory } from './no_data_page/no_data_page_service'; import { uiActionsServiceFactory } from './ui_actions/ui_actions_service'; +import { observabilityAIAssistantServiceFactory } from './observability_ai_assistant/observability_ai_assistant_service'; import { userProfileServiceFactory } from './user_profile/user_profile_service'; const providers: PluginServiceProviders = { @@ -93,6 +94,7 @@ const providers: PluginServiceProviders & { @@ -79,5 +80,6 @@ export interface DashboardServices { serverless: DashboardServerlessService; // TODO: make this optional in follow up noDataPage: NoDataPageService; uiActions: DashboardUiActionsService; + observabilityAIAssistant: ObservabilityAIAssistantService; // TODO: make this optional in follow up userProfile: DashboardUserProfileService; } diff --git a/src/plugins/dashboard/tsconfig.json b/src/plugins/dashboard/tsconfig.json index f906809c7888e5..8659b44b914ff2 100644 --- a/src/plugins/dashboard/tsconfig.json +++ b/src/plugins/dashboard/tsconfig.json @@ -79,6 +79,10 @@ "@kbn/core-user-profile-browser-mocks", "@kbn/react-kibana-context-render", "@kbn/core-i18n-browser-mocks", + "@kbn/observability-ai-assistant-plugin", + "@kbn/esql-utils", + "@kbn/lens-embeddable-utils", + "@kbn/lens-plugin", ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts index fcd6e8dd7bb801..d2cf9f7df95193 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts @@ -26,5 +26,5 @@ export function createScreenContextAction< return { ...definition, respond, - }; + } as ScreenContextActionDefinition; } From 717ab7a852126b8e4cef51521ce4a6b06c4276b7 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 9 Jul 2024 09:33:57 +0200 Subject: [PATCH 042/103] skip failing test suite (#187818) --- .../maintenance_windows/maintenance_windows_table.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/maintenance_windows/maintenance_windows_table.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/maintenance_windows/maintenance_windows_table.ts index 0b228be252ca3b..3b01650a9c6e80 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/maintenance_windows/maintenance_windows_table.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/maintenance_windows/maintenance_windows_table.ts @@ -20,7 +20,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { let objectRemover: ObjectRemover; const browser = getService('browser'); - describe('Maintenance windows table', function () { + // Failing: See https://github.com/elastic/kibana/issues/187818 + describe.skip('Maintenance windows table', function () { before(async () => { objectRemover = await createObjectRemover({ getService }); }); From f3e23959b658b77b7f17e123adbe647ddbe16646 Mon Sep 17 00:00:00 2001 From: Brad White Date: Tue, 9 Jul 2024 02:02:15 -0600 Subject: [PATCH 043/103] [CI] Fix auto approve backport permissions (#187813) ## Summary In #187246 this workflow was changed to `pull_request` instead of `pull_request_target` and has been failing on forks. When running with `pull_request` the workflow is in the context of the fork and doesn't have secrets from the Kibana repo. [Action logs](https://github.com/elastic/kibana/actions/workflows/auto-approve-backports.yml) [Docs](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflows-in-forked-repositories) --- .github/workflows/auto-approve-api-docs.yml | 2 +- .github/workflows/auto-approve-backports.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-approve-api-docs.yml b/.github/workflows/auto-approve-api-docs.yml index 503ea9634d00eb..11e28d46d9cc26 100644 --- a/.github/workflows/auto-approve-api-docs.yml +++ b/.github/workflows/auto-approve-api-docs.yml @@ -1,5 +1,5 @@ on: - pull_request: + pull_request_target: branches: - main types: diff --git a/.github/workflows/auto-approve-backports.yml b/.github/workflows/auto-approve-backports.yml index 2f73696406d92b..4c08e2bbb718c7 100644 --- a/.github/workflows/auto-approve-backports.yml +++ b/.github/workflows/auto-approve-backports.yml @@ -1,5 +1,5 @@ on: - pull_request: + pull_request_target: branches-ignore: - main types: From f2614a45d96ace46a760e9b7708662b2353a280b Mon Sep 17 00:00:00 2001 From: Pierre Gayvallet Date: Tue, 9 Jul 2024 11:39:47 +0200 Subject: [PATCH 044/103] Add integration test for ES client custom user agent header (#187744) ## Summary Fix https://github.com/elastic/kibana/issues/141287 --- .../elasticsearch/user_agent.test.ts | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 src/core/server/integration_tests/elasticsearch/user_agent.test.ts diff --git a/src/core/server/integration_tests/elasticsearch/user_agent.test.ts b/src/core/server/integration_tests/elasticsearch/user_agent.test.ts new file mode 100644 index 00000000000000..b864e3f3303082 --- /dev/null +++ b/src/core/server/integration_tests/elasticsearch/user_agent.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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { esTestConfig } from '@kbn/test'; +import * as http from 'http'; +import { loggerMock } from '@kbn/logging-mocks'; +import { Root } from '@kbn/core-root-server-internal'; +import { + PRODUCT_RESPONSE_HEADER, + USER_AGENT_HEADER, + configureClient, + AgentManager, +} from '@kbn/core-elasticsearch-client-server-internal'; +import { configSchema, ElasticsearchConfig } from '@kbn/core-elasticsearch-server-internal'; + +function createFakeElasticsearchServer(hook: (req: http.IncomingMessage) => void) { + const server = http.createServer((req, res) => { + hook(req); + res.writeHead(200, undefined, { [PRODUCT_RESPONSE_HEADER]: 'Elasticsearch' }); + res.write('{}'); + res.end(); + }); + server.listen(esTestConfig.getPort()); + + return server; +} + +describe('ES Client - custom user-agent', () => { + let esServer: http.Server; + let kibanaServer: Root; + + afterAll(async () => { + try { + await kibanaServer?.shutdown(); + } catch (e) { + // trap + } + try { + await new Promise((resolve, reject) => + esServer.close((err) => (err ? reject(err) : resolve())) + ); + } catch (e) { + // trap + } + }); + + test('should send a custom user-agent header matching the expected format', async () => { + const kibanaVersion = '8.42.9'; + const logger = loggerMock.create(); + const rawConfig = configSchema.validate({ + hosts: [`${esTestConfig.getUrl()}`], + }); + const config = new ElasticsearchConfig(rawConfig); + const agentFactoryProvider = new AgentManager(logger, { dnsCacheTtlInSeconds: 0 }); + const esClient = configureClient(config, { + type: 'foo', + logger, + kibanaVersion, + agentFactoryProvider, + }); + + let userAgentHeader: string | undefined; + esServer = createFakeElasticsearchServer((res) => { + userAgentHeader = res.headers[USER_AGENT_HEADER]; + }); + + await esClient.ping(); + + expect(userAgentHeader).toEqual(`Kibana/${kibanaVersion}`); + }); +}); From 234f97ab6966669be0bcfd3c200ce8f0e4946288 Mon Sep 17 00:00:00 2001 From: Nick Partridge Date: Tue, 9 Jul 2024 02:40:29 -0700 Subject: [PATCH 045/103] [Lens] Metric style options improvements (#186929) ## Summary Adds 3 new options to the new `Metric` vis including: - Title/subtitle alignment - Value alignment - Icon alignment - Value fontSizing --- .../kbn-test-eui-helpers/src/rtl_helpers.tsx | 58 +++- .../metric_vis_function.test.ts | 4 + .../metric_vis_function.ts | 28 ++ .../common/types/expression_functions.ts | 6 +- .../common/types/expression_renderers.ts | 6 +- .../public/components/metric_vis.test.tsx | 50 ++- .../public/components/metric_vis.tsx | 4 + .../shared_components/toolbar_popover.scss | 2 +- .../heatmap/toolbar_component.tsx | 2 +- .../public/visualizations/metric/constants.ts | 23 ++ .../metric/dimension_editor.test.tsx | 6 +- .../metric/dimension_editor.tsx | 8 +- .../visualizations/metric/suggestions.test.ts | 2 +- .../visualizations/metric/suggestions.ts | 3 +- .../visualizations/metric/to_expression.ts | 8 +- .../visualizations/metric/toolbar.test.tsx | 93 ------ .../public/visualizations/metric/toolbar.tsx | 62 ---- .../visualizations/metric/toolbar/index.tsx | 8 + .../toolbar/label_options_popover.test.tsx | 94 ++++++ .../metric/toolbar/label_options_popover.tsx | 72 +++++ .../visualizations/metric/toolbar/toolbar.tsx | 28 ++ .../toolbar/visual_options_popover.test.tsx | 140 +++++++++ .../metric/toolbar/visual_options_popover.tsx | 290 ++++++++++++++++++ .../public/visualizations/metric/types.ts | 9 +- .../metric/visualization.test.ts | 35 ++- .../visualizations/metric/visualization.tsx | 33 +- .../visual_options_popover/index.tsx | 2 +- .../translations/translations/fr-FR.json | 2 +- .../translations/translations/ja-JP.json | 2 +- .../translations/translations/zh-CN.json | 2 +- 30 files changed, 848 insertions(+), 234 deletions(-) delete mode 100644 x-pack/plugins/lens/public/visualizations/metric/toolbar.test.tsx delete mode 100644 x-pack/plugins/lens/public/visualizations/metric/toolbar.tsx create mode 100644 x-pack/plugins/lens/public/visualizations/metric/toolbar/index.tsx create mode 100644 x-pack/plugins/lens/public/visualizations/metric/toolbar/label_options_popover.test.tsx create mode 100644 x-pack/plugins/lens/public/visualizations/metric/toolbar/label_options_popover.tsx create mode 100644 x-pack/plugins/lens/public/visualizations/metric/toolbar/toolbar.tsx create mode 100644 x-pack/plugins/lens/public/visualizations/metric/toolbar/visual_options_popover.test.tsx create mode 100644 x-pack/plugins/lens/public/visualizations/metric/toolbar/visual_options_popover.tsx diff --git a/packages/kbn-test-eui-helpers/src/rtl_helpers.tsx b/packages/kbn-test-eui-helpers/src/rtl_helpers.tsx index e55b61a380bbf0..58f0444f8b63fa 100644 --- a/packages/kbn-test-eui-helpers/src/rtl_helpers.tsx +++ b/packages/kbn-test-eui-helpers/src/rtl_helpers.tsx @@ -53,7 +53,7 @@ export class EuiButtonGroupTestHarness { } /** - * Returns selected value of button group + * Returns selected option of button group */ public get selected() { return within(this.#buttonGroup).getByRole('button', { pressed: true }); @@ -136,3 +136,59 @@ export class EuiSuperDatePickerTestHarness { userEvent.click(screen.getByRole('button', { name: 'Refresh' })); } } + +export class EuiSelectTestHarness { + #testId: string; + + /** + * Returns select or throws + */ + get #selectEl() { + return screen.getByTestId(this.#testId); + } + + constructor(testId: string) { + this.#testId = testId; + } + + /** + * Returns `data-test-subj` of select + */ + public get testId() { + return this.#testId; + } + + /** + * Returns button select if found, otherwise `null` + */ + public get self() { + return screen.queryByTestId(this.#testId); + } + + /** + * Returns all options of select + */ + public get options(): HTMLOptionElement[] { + return within(this.#selectEl).getAllByRole('option'); + } + + /** + * Returns selected option + */ + public get selected() { + return (this.#selectEl as HTMLSelectElement).value; + } + + /** + * Select option by value + */ + public select(optionName: string | RegExp) { + const option = this.options.find((o) => o.value === optionName)?.value; + + if (!option) { + throw new Error(`Option [${optionName}] not found`); + } + + fireEvent.change(this.#selectEl, { target: { value: option } }); + } +} diff --git a/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_vis_function.test.ts b/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_vis_function.test.ts index abfa37dd8df6ef..88568b1c231cb3 100644 --- a/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_vis_function.test.ts +++ b/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_vis_function.test.ts @@ -25,6 +25,10 @@ describe('interpreter/functions#metricVis', () => { progressDirection: 'horizontal', maxCols: 1, inspectorTableId: 'random-id', + titlesTextAlign: 'left', + valuesTextAlign: 'right', + iconAlign: 'left', + valueFontSize: 'default', }; it('should pass over overrides from variables', async () => { diff --git a/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_vis_function.ts b/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_vis_function.ts index db1e0cf5cea5fd..c40af033ceab97 100644 --- a/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_vis_function.ts +++ b/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_vis_function.ts @@ -77,6 +77,30 @@ export const metricVisFunction = (): MetricVisExpressionFunctionDefinition => ({ 'The direction the progress bar should grow. Must be provided to render a progress bar.', }), }, + titlesTextAlign: { + types: ['string'], + help: i18n.translate('expressionMetricVis.function.titlesTextAlign.help', { + defaultMessage: 'The alignment of the Title and Subtitle.', + }), + }, + valuesTextAlign: { + types: ['string'], + help: i18n.translate('expressionMetricVis.function.valuesTextAlign.help', { + defaultMessage: 'The alignment of the Primary and Secondary Metric.', + }), + }, + iconAlign: { + types: ['string'], + help: i18n.translate('expressionMetricVis.function.iconAlign.help', { + defaultMessage: 'The alignment of icon.', + }), + }, + valueFontSize: { + types: ['string', 'number'], + help: i18n.translate('expressionMetricVis.function.valueFontSize.help', { + defaultMessage: 'The value font size.', + }), + }, color: { types: ['string'], help: i18n.translate('expressionMetricVis.function.color.help', { @@ -189,6 +213,10 @@ export const metricVisFunction = (): MetricVisExpressionFunctionDefinition => ({ icon: args.icon, palette: args.palette?.params, progressDirection: args.progressDirection, + titlesTextAlign: args.titlesTextAlign, + valuesTextAlign: args.valuesTextAlign, + iconAlign: args.iconAlign, + valueFontSize: args.valueFontSize, maxCols: args.maxCols, minTiles: args.minTiles, trends: args.trendline?.trends, diff --git a/src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts b/src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts index 28199c684ea157..7e7438aa3d8ad0 100644 --- a/src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts +++ b/src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts @@ -7,7 +7,7 @@ */ import type { PaletteOutput } from '@kbn/coloring'; -import { LayoutDirection, MetricWTrend } from '@elastic/charts'; +import { LayoutDirection, MetricStyle, MetricWTrend } from '@elastic/charts'; import { $Values } from '@kbn/utility-types'; import { Datatable, @@ -38,6 +38,10 @@ export interface MetricArguments { subtitle?: string; secondaryPrefix?: string; progressDirection?: LayoutDirection; + titlesTextAlign: MetricStyle['titlesTextAlign']; + valuesTextAlign: MetricStyle['valuesTextAlign']; + iconAlign: MetricStyle['iconAlign']; + valueFontSize: MetricStyle['valueFontSize']; color?: string; icon?: string; palette?: PaletteOutput; diff --git a/src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts b/src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts index b9a43af0752b29..083f464670d895 100644 --- a/src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts +++ b/src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts @@ -8,7 +8,7 @@ import { ExpressionValueVisDimension } from '@kbn/visualizations-plugin/common'; import { CustomPaletteState } from '@kbn/charts-plugin/common'; -import { LayoutDirection } from '@elastic/charts'; +import { LayoutDirection, MetricStyle } from '@elastic/charts'; import { TrendlineResult } from './expression_functions'; export const visType = 'metric'; @@ -27,6 +27,10 @@ export interface MetricVisParam { icon?: string; palette?: CustomPaletteState; progressDirection?: LayoutDirection; + titlesTextAlign: MetricStyle['titlesTextAlign']; + valuesTextAlign: MetricStyle['valuesTextAlign']; + iconAlign: MetricStyle['iconAlign']; + valueFontSize: MetricStyle['valueFontSize']; maxCols: number; minTiles?: number; trends?: TrendlineResult['trends']; diff --git a/src/plugins/chart_expressions/expression_metric/public/components/metric_vis.test.tsx b/src/plugins/chart_expressions/expression_metric/public/components/metric_vis.test.tsx index ed57f38ec886fd..cd93d3997b8d5a 100644 --- a/src/plugins/chart_expressions/expression_metric/public/components/metric_vis.test.tsx +++ b/src/plugins/chart_expressions/expression_metric/public/components/metric_vis.test.tsx @@ -23,7 +23,7 @@ import { SerializedFieldFormat } from '@kbn/field-formats-plugin/common'; import { SerializableRecord } from '@kbn/utility-types'; import type { IUiSettingsClient } from '@kbn/core/public'; import { CustomPaletteState } from '@kbn/charts-plugin/common/expressions/palette/types'; -import { DimensionsVisParam } from '../../common'; +import { DimensionsVisParam, MetricVisParam } from '../../common'; import { euiThemeVars } from '@kbn/ui-theme'; import { DEFAULT_TRENDLINE_NAME } from '../../common/constants'; import faker from 'faker'; @@ -73,6 +73,15 @@ const dayOfWeekColumnId = 'col-0-0'; const basePriceColumnId = 'col-1-1'; const minPriceColumnId = 'col-2-2'; +const defaultMetricParams: MetricVisParam = { + progressDirection: 'vertical', + maxCols: 5, + titlesTextAlign: 'left', + valuesTextAlign: 'right', + iconAlign: 'left', + valueFontSize: 'default', +}; + const table: Datatable = { type: 'datatable', columns: [ @@ -217,8 +226,7 @@ describe('MetricVisComponent', function () { describe('single metric', () => { const config: Props['config'] = { metric: { - progressDirection: 'vertical', - maxCols: 5, + ...defaultMetricParams, icon: 'empty', }, dimensions: { @@ -402,8 +410,7 @@ describe('MetricVisComponent', function () { describe('metric grid', () => { const config: Props['config'] = { metric: { - progressDirection: 'vertical', - maxCols: 5, + ...defaultMetricParams, }, dimensions: { metric: basePriceColumnId, @@ -856,8 +863,7 @@ describe('MetricVisComponent', function () { data={table} config={{ metric: { - progressDirection: 'vertical', - maxCols: 5, + ...defaultMetricParams, }, dimensions: { metric: basePriceColumnId, @@ -911,8 +917,7 @@ describe('MetricVisComponent', function () { { const config: Props['config'] = { metric: { - progressDirection: 'vertical', - maxCols: 5, + ...defaultMetricParams, }, dimensions: { metric: '1', @@ -1416,8 +1413,7 @@ describe('MetricVisComponent', function () { +>; + +/** + * Defaults for select optional Metric vis state options + */ +export const metricStateDefaults: Required< + Pick< + MetricVisualizationStateOptionals, + 'titlesTextAlign' | 'valuesTextAlign' | 'iconAlign' | 'valueFontMode' + > +> = { + titlesTextAlign: 'left', + valuesTextAlign: 'right', + iconAlign: 'left', + valueFontMode: 'default', +}; diff --git a/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.test.tsx b/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.test.tsx index 429a681027e634..a239b12deb5beb 100644 --- a/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.test.tsx +++ b/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.test.tsx @@ -13,7 +13,7 @@ import { chartPluginMock } from '@kbn/charts-plugin/public/mocks'; import { euiLightVars } from '@kbn/ui-theme'; import { CustomPaletteParams, PaletteOutput, PaletteRegistry } from '@kbn/coloring'; import { VisualizationDimensionEditorProps } from '../../types'; -import { MetricVisualizationState } from './visualization'; +import { MetricVisualizationState } from './types'; import { DimensionEditor, DimensionEditorAdditionalSection, @@ -59,6 +59,10 @@ describe('dimension editor', () => { palette, icon: 'tag', showBar: true, + titlesTextAlign: 'left', + valuesTextAlign: 'right', + iconAlign: 'left', + valueFontMode: 'default', trendlineLayerId: 'second', trendlineLayerType: 'metricTrendline', trendlineMetricAccessor: 'trendline-metric-col-id', diff --git a/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.tsx b/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.tsx index 757700fa80938d..f040c6dc86fa4a 100644 --- a/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.tsx +++ b/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.tsx @@ -34,14 +34,10 @@ import { isNumericFieldForDatatable } from '../../../common/expressions/datatabl import { applyPaletteParams, PalettePanelContainer } from '../../shared_components'; import type { VisualizationDimensionEditorProps } from '../../types'; import { defaultNumberPaletteParams, defaultPercentagePaletteParams } from './palette_config'; -import { - DEFAULT_MAX_COLUMNS, - getDefaultColor, - MetricVisualizationState, - showingBar, -} from './visualization'; +import { DEFAULT_MAX_COLUMNS, getDefaultColor, showingBar } from './visualization'; import { CollapseSetting } from '../../shared_components/collapse_setting'; import { iconsSet } from './icon_set'; +import { MetricVisualizationState } from './types'; export type SupportingVisType = 'none' | 'bar' | 'trendline'; diff --git a/x-pack/plugins/lens/public/visualizations/metric/suggestions.test.ts b/x-pack/plugins/lens/public/visualizations/metric/suggestions.test.ts index 22d701cee570b3..fff365e0e89ddc 100644 --- a/x-pack/plugins/lens/public/visualizations/metric/suggestions.test.ts +++ b/x-pack/plugins/lens/public/visualizations/metric/suggestions.test.ts @@ -7,7 +7,7 @@ import { getSuggestions } from './suggestions'; import { LayerTypes } from '@kbn/expression-xy-plugin/public'; -import { MetricVisualizationState } from './visualization'; +import { MetricVisualizationState } from './types'; import { IconChartMetric } from '@kbn/chart-icons'; const metricColumn = { diff --git a/x-pack/plugins/lens/public/visualizations/metric/suggestions.ts b/x-pack/plugins/lens/public/visualizations/metric/suggestions.ts index a4077b4aca4509..b405ea646d9809 100644 --- a/x-pack/plugins/lens/public/visualizations/metric/suggestions.ts +++ b/x-pack/plugins/lens/public/visualizations/metric/suggestions.ts @@ -8,7 +8,8 @@ import { IconChartMetric } from '@kbn/chart-icons'; import { LayerTypes } from '@kbn/expression-xy-plugin/public'; import type { TableSuggestion, Visualization } from '../../types'; -import { metricLabel, MetricVisualizationState, supportedDataTypes } from './visualization'; +import { MetricVisualizationState } from './types'; +import { metricLabel, supportedDataTypes } from './visualization'; const MAX_BUCKETED_COLUMNS = 1; const MAX_METRIC_COLUMNS = 2; // primary and secondary metric diff --git a/x-pack/plugins/lens/public/visualizations/metric/to_expression.ts b/x-pack/plugins/lens/public/visualizations/metric/to_expression.ts index c37ae2d57544e4..d0ff261653e1fe 100644 --- a/x-pack/plugins/lens/public/visualizations/metric/to_expression.ts +++ b/x-pack/plugins/lens/public/visualizations/metric/to_expression.ts @@ -17,7 +17,9 @@ import { CollapseArgs, CollapseFunction } from '../../../common/expressions'; import { CollapseExpressionFunction } from '../../../common/expressions/collapse/types'; import { DatasourceLayers } from '../../types'; import { showingBar } from './metric_visualization'; -import { DEFAULT_MAX_COLUMNS, getDefaultColor, MetricVisualizationState } from './visualization'; +import { DEFAULT_MAX_COLUMNS, getDefaultColor } from './visualization'; +import { MetricVisualizationState } from './types'; +import { metricStateDefaults } from './constants'; // TODO - deduplicate with gauges? function computePaletteParams(params: CustomPaletteParams) { @@ -148,6 +150,10 @@ export const toExpression = ( progressDirection: showingBar(state) ? state.progressDirection || LayoutDirection.Vertical : undefined, + titlesTextAlign: state.titlesTextAlign ?? metricStateDefaults.titlesTextAlign, + valuesTextAlign: state.valuesTextAlign ?? metricStateDefaults.valuesTextAlign, + iconAlign: state.iconAlign ?? metricStateDefaults.iconAlign, + valueFontSize: state.valueFontMode ?? metricStateDefaults.valueFontMode, color: state.color || getDefaultColor(state, isMetricNumeric), icon: state.icon, palette: diff --git a/x-pack/plugins/lens/public/visualizations/metric/toolbar.test.tsx b/x-pack/plugins/lens/public/visualizations/metric/toolbar.test.tsx deleted file mode 100644 index 8b4ea8a39f3ab9..00000000000000 --- a/x-pack/plugins/lens/public/visualizations/metric/toolbar.test.tsx +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { CustomPaletteParams, PaletteOutput } from '@kbn/coloring'; -import { Toolbar } from './toolbar'; -import { MetricVisualizationState } from './visualization'; -import { createMockFramePublicAPI } from '../../mocks'; -import { fireEvent, render, screen, waitFor } from '@testing-library/react'; - -describe('metric toolbar', () => { - const palette: PaletteOutput = { - type: 'palette', - name: 'foo', - params: { - rangeType: 'percent', - }, - }; - - const fullState: Required = { - layerId: 'first', - layerType: 'data', - metricAccessor: 'metric-col-id', - secondaryMetricAccessor: 'secondary-metric-col-id', - maxAccessor: 'max-metric-col-id', - breakdownByAccessor: 'breakdown-col-id', - collapseFn: 'sum', - subtitle: 'subtitle', - secondaryPrefix: 'extra-text', - progressDirection: 'vertical', - maxCols: 5, - color: 'static-color', - icon: 'compute', - palette, - showBar: true, - trendlineLayerId: 'second', - trendlineLayerType: 'metricTrendline', - trendlineMetricAccessor: 'trendline-metric-col-id', - trendlineSecondaryMetricAccessor: 'trendline-secondary-metric-col-id', - trendlineTimeAccessor: 'trendline-time-col-id', - trendlineBreakdownByAccessor: 'trendline-breakdown-col-id', - }; - - const frame = createMockFramePublicAPI(); - - const mockSetState = jest.fn(); - - const renderToolbar = (state: MetricVisualizationState) => { - return { ...render() }; - }; - - afterEach(() => mockSetState.mockClear()); - - describe('text options', () => { - it('sets a subtitle', async () => { - renderToolbar({ - ...fullState, - breakdownByAccessor: undefined, - }); - const textOptionsButton = screen.getByTestId('lnsLabelsButton'); - textOptionsButton.click(); - - const newSubtitle = 'new subtitle hey'; - const subtitleField = screen.getByDisplayValue('subtitle'); - // cannot use userEvent because the element cannot be clicked on - fireEvent.change(subtitleField, { target: { value: newSubtitle + ' 1' } }); - await waitFor(() => expect(mockSetState).toHaveBeenCalled()); - fireEvent.change(subtitleField, { target: { value: newSubtitle + ' 2' } }); - await waitFor(() => expect(mockSetState).toHaveBeenCalledTimes(2)); - fireEvent.change(subtitleField, { target: { value: newSubtitle + ' 3' } }); - await waitFor(() => expect(mockSetState).toHaveBeenCalledTimes(3)); - expect(mockSetState.mock.calls.map(([state]) => state.subtitle)).toMatchInlineSnapshot(` - Array [ - "new subtitle hey 1", - "new subtitle hey 2", - "new subtitle hey 3", - ] - `); - }); - - it('hides text options when has breakdown by', () => { - renderToolbar({ - ...fullState, - breakdownByAccessor: 'some-accessor', - }); - expect(screen.queryByTestId('lnsLabelsButton')).not.toBeInTheDocument(); - }); - }); -}); diff --git a/x-pack/plugins/lens/public/visualizations/metric/toolbar.tsx b/x-pack/plugins/lens/public/visualizations/metric/toolbar.tsx deleted file mode 100644 index 2e7c1ca285d6e4..00000000000000 --- a/x-pack/plugins/lens/public/visualizations/metric/toolbar.tsx +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useCallback } from 'react'; -import { i18n } from '@kbn/i18n'; -import { EuiFlexGroup, EuiFormRow, EuiFieldText } from '@elastic/eui'; -import { useDebouncedValue } from '@kbn/visualization-utils'; -import { VisualizationToolbarProps } from '../../types'; -import { ToolbarPopover } from '../../shared_components'; -import { MetricVisualizationState } from './visualization'; - -export function Toolbar(props: VisualizationToolbarProps) { - const { state, setState } = props; - - const setSubtitle = useCallback( - (prefix: string) => setState({ ...state, subtitle: prefix }), - [setState, state] - ); - - const { inputValue: subtitleInputVal, handleInputChange: handleSubtitleChange } = - useDebouncedValue( - { - onChange: setSubtitle, - value: state.subtitle || '', - }, - { allowFalsyValue: true } - ); - - const hasBreakdownBy = Boolean(state.breakdownByAccessor); - - return ( - - {!hasBreakdownBy && ( - - - handleSubtitleChange(value)} - /> - - - )} - - ); -} diff --git a/x-pack/plugins/lens/public/visualizations/metric/toolbar/index.tsx b/x-pack/plugins/lens/public/visualizations/metric/toolbar/index.tsx new file mode 100644 index 00000000000000..503039f627974b --- /dev/null +++ b/x-pack/plugins/lens/public/visualizations/metric/toolbar/index.tsx @@ -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 { Toolbar } from './toolbar'; diff --git a/x-pack/plugins/lens/public/visualizations/metric/toolbar/label_options_popover.test.tsx b/x-pack/plugins/lens/public/visualizations/metric/toolbar/label_options_popover.test.tsx new file mode 100644 index 00000000000000..1f205c60f69160 --- /dev/null +++ b/x-pack/plugins/lens/public/visualizations/metric/toolbar/label_options_popover.test.tsx @@ -0,0 +1,94 @@ +/* + * Copyright 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 { CustomPaletteParams, PaletteOutput } from '@kbn/coloring'; +import { fireEvent, render, screen, waitFor } from '@testing-library/react'; +import { MetricVisualizationState } from '../types'; +import { LabelOptionsPopover } from './label_options_popover'; + +describe('LabelOptionsPopover', () => { + const palette: PaletteOutput = { + type: 'palette', + name: 'foo', + params: { + rangeType: 'percent', + }, + }; + + const fullState: Required = { + layerId: 'first', + layerType: 'data', + metricAccessor: 'metric-col-id', + secondaryMetricAccessor: 'secondary-metric-col-id', + maxAccessor: 'max-metric-col-id', + breakdownByAccessor: 'breakdown-col-id', + collapseFn: 'sum', + subtitle: 'subtitle', + secondaryPrefix: 'extra-text', + progressDirection: 'vertical', + maxCols: 5, + color: 'static-color', + icon: 'compute', + palette, + showBar: true, + trendlineLayerId: 'second', + trendlineLayerType: 'metricTrendline', + trendlineMetricAccessor: 'trendline-metric-col-id', + trendlineSecondaryMetricAccessor: 'trendline-secondary-metric-col-id', + trendlineTimeAccessor: 'trendline-time-col-id', + trendlineBreakdownByAccessor: 'trendline-breakdown-col-id', + titlesTextAlign: 'left', + valuesTextAlign: 'right', + iconAlign: 'left', + valueFontMode: 'default', + }; + + const mockSetState = jest.fn(); + + const renderToolbarOptions = (state: MetricVisualizationState) => { + return { + ...render(), + }; + }; + + afterEach(() => mockSetState.mockClear()); + + it('should set a subtitle', async () => { + renderToolbarOptions({ + ...fullState, + breakdownByAccessor: undefined, + }); + const labelOptionsButton = screen.getByTestId('lnsLabelsButton'); + labelOptionsButton.click(); + + const newSubtitle = 'new subtitle hey'; + const subtitleField = screen.getByDisplayValue('subtitle'); + // cannot use userEvent because the element cannot be clicked on + fireEvent.change(subtitleField, { target: { value: newSubtitle + ' 1' } }); + await waitFor(() => expect(mockSetState).toHaveBeenCalled()); + fireEvent.change(subtitleField, { target: { value: newSubtitle + ' 2' } }); + await waitFor(() => expect(mockSetState).toHaveBeenCalledTimes(2)); + fireEvent.change(subtitleField, { target: { value: newSubtitle + ' 3' } }); + await waitFor(() => expect(mockSetState).toHaveBeenCalledTimes(3)); + expect(mockSetState.mock.calls.map(([state]) => state.subtitle)).toMatchInlineSnapshot(` + Array [ + "new subtitle hey 1", + "new subtitle hey 2", + "new subtitle hey 3", + ] + `); + }); + + it('should disable labels options when Metric has breakdown by', () => { + renderToolbarOptions({ + ...fullState, + breakdownByAccessor: 'some-accessor', + }); + expect(screen.getByTestId('lnsLabelsButton')).toBeDisabled(); + }); +}); diff --git a/x-pack/plugins/lens/public/visualizations/metric/toolbar/label_options_popover.tsx b/x-pack/plugins/lens/public/visualizations/metric/toolbar/label_options_popover.tsx new file mode 100644 index 00000000000000..ec7101a8dedb8c --- /dev/null +++ b/x-pack/plugins/lens/public/visualizations/metric/toolbar/label_options_popover.tsx @@ -0,0 +1,72 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { FC, useCallback } from 'react'; + +import { EuiFormRow, EuiFieldText } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +import { useDebouncedValue } from '@kbn/visualization-utils'; +import { TooltipWrapper } from '@kbn/visualization-utils'; +import { ToolbarPopover } from '../../../shared_components'; +import { MetricVisualizationState } from '../types'; + +export interface LabelOptionsPopoverProps { + state: MetricVisualizationState; + setState: (newState: MetricVisualizationState) => void; +} + +export const LabelOptionsPopover: FC = ({ state, setState }) => { + const setSubtitle = useCallback( + (prefix: string) => setState({ ...state, subtitle: prefix }), + [setState, state] + ); + + const { inputValue: subtitleInputVal, handleInputChange: handleSubtitleChange } = + useDebouncedValue( + { + onChange: setSubtitle, + value: state.subtitle || '', + }, + { allowFalsyValue: true } + ); + + const hasBreakdownBy = Boolean(state.breakdownByAccessor); + + return ( + + + + handleSubtitleChange(value)} + /> + + + + ); +}; diff --git a/x-pack/plugins/lens/public/visualizations/metric/toolbar/toolbar.tsx b/x-pack/plugins/lens/public/visualizations/metric/toolbar/toolbar.tsx new file mode 100644 index 00000000000000..1593d2dce5bf05 --- /dev/null +++ b/x-pack/plugins/lens/public/visualizations/metric/toolbar/toolbar.tsx @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { VisualizationToolbarProps } from '../../../types'; +import { LabelOptionsPopover } from './label_options_popover'; +import { VisualOptionsPopover } from './visual_options_popover'; +import { MetricVisualizationState } from '../types'; + +export function Toolbar(props: VisualizationToolbarProps) { + const { state, setState } = props; + + return ( + + + + + + + + + ); +} diff --git a/x-pack/plugins/lens/public/visualizations/metric/toolbar/visual_options_popover.test.tsx b/x-pack/plugins/lens/public/visualizations/metric/toolbar/visual_options_popover.test.tsx new file mode 100644 index 00000000000000..06b253dc862b9c --- /dev/null +++ b/x-pack/plugins/lens/public/visualizations/metric/toolbar/visual_options_popover.test.tsx @@ -0,0 +1,140 @@ +/* + * Copyright 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 { CustomPaletteParams, PaletteOutput } from '@kbn/coloring'; +import { render, screen } from '@testing-library/react'; +import { MetricVisualizationState } from '../types'; +import { VisualOptionsPopover } from './visual_options_popover'; +import { EuiButtonGroupTestHarness } from '@kbn/test-eui-helpers'; + +jest.mock('lodash', () => ({ + ...jest.requireActual('lodash'), + debounce: (fn: unknown) => fn, +})); + +describe('VisualOptionsPopover', () => { + const palette: PaletteOutput = { + type: 'palette', + name: 'foo', + params: { + rangeType: 'percent', + }, + }; + + const fullState: Required = { + layerId: 'first', + layerType: 'data', + metricAccessor: 'metric-col-id', + secondaryMetricAccessor: 'secondary-metric-col-id', + maxAccessor: 'max-metric-col-id', + breakdownByAccessor: 'breakdown-col-id', + collapseFn: 'sum', + subtitle: 'subtitle', + secondaryPrefix: 'extra-text', + progressDirection: 'vertical', + maxCols: 5, + color: 'static-color', + icon: 'compute', + palette, + showBar: true, + trendlineLayerId: 'second', + trendlineLayerType: 'metricTrendline', + trendlineMetricAccessor: 'trendline-metric-col-id', + trendlineSecondaryMetricAccessor: 'trendline-secondary-metric-col-id', + trendlineTimeAccessor: 'trendline-time-col-id', + trendlineBreakdownByAccessor: 'trendline-breakdown-col-id', + titlesTextAlign: 'left', + valuesTextAlign: 'right', + iconAlign: 'left', + valueFontMode: 'default', + }; + + const mockSetState = jest.fn(); + + const renderToolbarOptions = (state: MetricVisualizationState) => { + return { + ...render(), + }; + }; + + afterEach(() => mockSetState.mockClear()); + + it('should set titlesTextAlign', async () => { + renderToolbarOptions({ ...fullState }); + const textOptionsButton = screen.getByTestId('lnsVisualOptionsButton'); + textOptionsButton.click(); + + const titlesAlignBtnGroup = new EuiButtonGroupTestHarness('lens-titles-alignment-btn'); + + titlesAlignBtnGroup.select('Right'); + titlesAlignBtnGroup.select('Center'); + titlesAlignBtnGroup.select('Left'); + + expect(mockSetState.mock.calls.map(([s]) => s.titlesTextAlign)).toEqual([ + 'right', + 'center', + 'left', + ]); + }); + + it('should set valuesTextAlign', async () => { + renderToolbarOptions({ ...fullState }); + const textOptionsButton = screen.getByTestId('lnsVisualOptionsButton'); + textOptionsButton.click(); + + const valueAlignBtnGroup = new EuiButtonGroupTestHarness('lens-values-alignment-btn'); + + valueAlignBtnGroup.select('Center'); + valueAlignBtnGroup.select('Left'); + valueAlignBtnGroup.select('Right'); + + expect(mockSetState.mock.calls.map(([s]) => s.valuesTextAlign)).toEqual([ + 'center', + 'left', + 'right', + ]); + }); + + it('should set valueFontMode', async () => { + renderToolbarOptions({ ...fullState }); + const textOptionsButton = screen.getByTestId('lnsVisualOptionsButton'); + textOptionsButton.click(); + + const modeBtnGroup = new EuiButtonGroupTestHarness('lens-value-font-mode-btn'); + + expect(modeBtnGroup.selected.textContent).toBe('Default'); + + modeBtnGroup.select('Fit'); + modeBtnGroup.select('Default'); + + expect(mockSetState.mock.calls.map(([s]) => s.valueFontMode)).toEqual(['fit', 'default']); + }); + + it('should set iconAlign', async () => { + renderToolbarOptions({ ...fullState, icon: 'sortUp' }); + const textOptionsButton = screen.getByTestId('lnsVisualOptionsButton'); + textOptionsButton.click(); + + const iconAlignBtnGroup = new EuiButtonGroupTestHarness('lens-icon-alignment-btn'); + + expect(iconAlignBtnGroup.selected.textContent).toBe('Left'); + + iconAlignBtnGroup.select('Right'); + iconAlignBtnGroup.select('Left'); + + expect(mockSetState.mock.calls.map(([s]) => s.iconAlign)).toEqual(['right', 'left']); + }); + + it.each([undefined, 'empty'])('should hide iconAlign option when icon is %j', async (icon) => { + renderToolbarOptions({ ...fullState, icon }); + const textOptionsButton = screen.getByTestId('lnsVisualOptionsButton'); + textOptionsButton.click(); + + expect(screen.queryByTestId('lens-icon-alignment-btn')).not.toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/lens/public/visualizations/metric/toolbar/visual_options_popover.tsx b/x-pack/plugins/lens/public/visualizations/metric/toolbar/visual_options_popover.tsx new file mode 100644 index 00000000000000..607bba17afc240 --- /dev/null +++ b/x-pack/plugins/lens/public/visualizations/metric/toolbar/visual_options_popover.tsx @@ -0,0 +1,290 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { FC } from 'react'; + +import { EuiFormRow, EuiIconTip, EuiButtonGroup } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +import { MetricStyle } from '@elastic/charts'; +import { ToolbarPopover } from '../../../shared_components'; +import { MetricVisualizationState, ValueFontMode } from '../types'; +import { metricStateDefaults } from '../constants'; + +export interface VisualOptionsPopoverProps { + state: MetricVisualizationState; + setState: (newState: MetricVisualizationState) => void; +} + +export const VisualOptionsPopover: FC = ({ state, setState }) => { + return ( + + { + setState({ ...state, titlesTextAlign }); + }} + /> + { + setState({ ...state, valuesTextAlign }); + }} + /> + {state.icon && state.icon !== 'empty' && ( + { + setState({ ...state, iconAlign }); + }} + /> + )} + { + setState({ ...state, valueFontMode: value }); + }} + /> + + ); +}; + +const valueFontModes: Array<{ + id: ValueFontMode; + label: string; +}> = [ + { + id: 'default', + label: i18n.translate('xpack.lens.metric.toolbarVisOptions.default', { + defaultMessage: 'Default', + }), + }, + { + id: 'fit', + label: i18n.translate('xpack.lens.metric.toolbarVisOptions.fit', { + defaultMessage: 'Fit', + }), + }, +]; + +function ValueFontOption({ + value, + onChange, +}: { + value: typeof valueFontModes[number]['id']; + onChange: (mode: ValueFontMode) => void; +}) { + const label = i18n.translate('xpack.lens.metric.toolbarVisOptions.valueFontSize', { + defaultMessage: 'Value fontSize', + }); + + return ( + + {label}{' '} + + + } + > + { + onChange(mode as ValueFontMode); + }} + /> + + ); +} + +const alignmentOptions: Array<{ + id: MetricStyle['titlesTextAlign'] | MetricStyle['valuesTextAlign']; + label: string; +}> = [ + { + id: 'left', + label: i18n.translate('xpack.lens.shared.left', { + defaultMessage: 'Left', + }), + }, + { + id: 'center', + label: i18n.translate('xpack.lens.shared.center', { + defaultMessage: 'Center', + }), + }, + { + id: 'right', + label: i18n.translate('xpack.lens.shared.right', { + defaultMessage: 'Right', + }), + }, +]; + +function TitlesAlignmentOption({ + value, + onChange, +}: { + value: MetricStyle['titlesTextAlign']; + onChange: (alignment: MetricStyle['titlesTextAlign']) => void; +}) { + const label = i18n.translate('xpack.lens.metric.toolbarVisOptions.titlesAlignment', { + defaultMessage: 'Titles alignment', + }); + + return ( + + {label}{' '} + + + } + > + { + onChange(alignment as MetricStyle['titlesTextAlign']); + }} + /> + + ); +} + +function ValuesAlignmentOption({ + value, + onChange, +}: { + value: MetricStyle['valuesTextAlign']; + onChange: (alignment: MetricStyle['valuesTextAlign']) => void; +}) { + const label = i18n.translate('xpack.lens.metric.toolbarVisOptions.valuesAlignment', { + defaultMessage: 'Values alignment', + }); + + return ( + + {label}{' '} + + + } + > + { + onChange(alignment as MetricStyle['valuesTextAlign']); + }} + /> + + ); +} + +const iconAlignmentOptions: Array<{ + id: MetricStyle['titlesTextAlign'] | MetricStyle['valuesTextAlign']; + label: string; +}> = [ + { + id: 'left', + label: i18n.translate('xpack.lens.shared.left', { + defaultMessage: 'Left', + }), + }, + { + id: 'right', + label: i18n.translate('xpack.lens.shared.right', { + defaultMessage: 'Right', + }), + }, +]; + +function IconAlignmentOption({ + value, + onChange, +}: { + value: MetricStyle['iconAlign']; + onChange: (alignment: MetricStyle['iconAlign']) => void; +}) { + const label = i18n.translate('xpack.lens.metric.toolbarVisOptions.iconAlignment', { + defaultMessage: 'Icon alignment', + }); + + return ( + + { + onChange(alignment as MetricStyle['iconAlign']); + }} + /> + + ); +} diff --git a/x-pack/plugins/lens/public/visualizations/metric/types.ts b/x-pack/plugins/lens/public/visualizations/metric/types.ts index d25a4b1b333963..774c1572ce73b8 100644 --- a/x-pack/plugins/lens/public/visualizations/metric/types.ts +++ b/x-pack/plugins/lens/public/visualizations/metric/types.ts @@ -5,11 +5,13 @@ * 2.0. */ -import type { LayoutDirection } from '@elastic/charts'; +import type { LayoutDirection, MetricStyle } from '@elastic/charts'; import type { PaletteOutput, CustomPaletteParams } from '@kbn/coloring'; import type { CollapseFunction } from '@kbn/visualizations-plugin/common'; import type { LayerType } from '../../../common/types'; +export type ValueFontMode = Exclude; + export interface MetricVisualizationState { layerId: string; layerType: LayerType; @@ -24,7 +26,12 @@ export interface MetricVisualizationState { secondaryPrefix?: string; progressDirection?: LayoutDirection; showBar?: boolean; + titlesTextAlign?: MetricStyle['titlesTextAlign']; + valuesTextAlign?: MetricStyle['valuesTextAlign']; + iconAlign?: MetricStyle['iconAlign']; + valueFontMode?: ValueFontMode; color?: string; + icon?: string; palette?: PaletteOutput; maxCols?: number; diff --git a/x-pack/plugins/lens/public/visualizations/metric/visualization.test.ts b/x-pack/plugins/lens/public/visualizations/metric/visualization.test.ts index a907fa0cae917c..af9039740f3ebd 100644 --- a/x-pack/plugins/lens/public/visualizations/metric/visualization.test.ts +++ b/x-pack/plugins/lens/public/visualizations/metric/visualization.test.ts @@ -19,10 +19,11 @@ import { Visualization, } from '../../types'; import { GROUP_ID } from './constants'; -import { getMetricVisualization, MetricVisualizationState } from './visualization'; +import { getMetricVisualization } from './visualization'; import { themeServiceMock } from '@kbn/core/public/mocks'; import { Ast } from '@kbn/interpreter'; import { LayoutDirection } from '@elastic/charts'; +import { MetricVisualizationState } from './types'; const paletteService = chartPluginMock.createPaletteRegistry(); const theme = themeServiceMock.createStartContract(); @@ -76,6 +77,10 @@ describe('metric visualization', () => { color: 'static-color', palette, showBar: false, + titlesTextAlign: 'left', + valuesTextAlign: 'right', + iconAlign: 'left', + valueFontMode: 'default', }; const fullStateWTrend: Required = { @@ -316,6 +321,9 @@ describe('metric visualization', () => { "icon": Array [ "empty", ], + "iconAlign": Array [ + "left", + ], "inspectorTableId": Array [ "first", ], @@ -353,7 +361,16 @@ describe('metric visualization', () => { "subtitle": Array [ "subtitle", ], + "titlesTextAlign": Array [ + "left", + ], "trendline": Array [], + "valueFontSize": Array [ + "default", + ], + "valuesTextAlign": Array [ + "right", + ], }, "function": "metricVis", "type": "function", @@ -380,6 +397,9 @@ describe('metric visualization', () => { "icon": Array [ "empty", ], + "iconAlign": Array [ + "left", + ], "inspectorTableId": Array [ "first", ], @@ -420,7 +440,16 @@ describe('metric visualization', () => { "subtitle": Array [ "subtitle", ], + "titlesTextAlign": Array [ + "left", + ], "trendline": Array [], + "valueFontSize": Array [ + "default", + ], + "valuesTextAlign": Array [ + "right", + ], }, "function": "metricVis", "type": "function", @@ -778,8 +807,12 @@ describe('metric visualization', () => { expect(visualization.clearLayer(fullState, 'some-id', 'indexPattern1')).toMatchInlineSnapshot(` Object { "icon": "empty", + "iconAlign": "left", "layerId": "first", "layerType": "data", + "titlesTextAlign": "left", + "valueFontMode": "default", + "valuesTextAlign": "right", } `); }); diff --git a/x-pack/plugins/lens/public/visualizations/metric/visualization.tsx b/x-pack/plugins/lens/public/visualizations/metric/visualization.tsx index f60b1da51505dc..3a780e5a20f758 100644 --- a/x-pack/plugins/lens/public/visualizations/metric/visualization.tsx +++ b/x-pack/plugins/lens/public/visualizations/metric/visualization.tsx @@ -7,16 +7,13 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { PaletteOutput, PaletteRegistry, CustomPaletteParams } from '@kbn/coloring'; +import { PaletteRegistry } from '@kbn/coloring'; import { ThemeServiceStart } from '@kbn/core/public'; import { VIS_EVENT_TO_TRIGGER } from '@kbn/visualizations-plugin/public'; -import { LayoutDirection } from '@elastic/charts'; import { euiLightVars, euiThemeVars } from '@kbn/ui-theme'; import { IconChartMetric } from '@kbn/chart-icons'; import { AccessorConfig } from '@kbn/visualization-ui-components'; import { isNumericFieldForDatatable } from '../../../common/expressions/datatable/utils'; -import { CollapseFunction } from '../../../common/expressions'; -import type { LayerType } from '../../../common/types'; import { layerTypes } from '../../../common/layer_types'; import type { FormBasedPersistedState } from '../../datasources/form_based/types'; import { getSuggestions } from './suggestions'; @@ -35,6 +32,7 @@ import { generateId } from '../../id_generator'; import { toExpression } from './to_expression'; import { nonNullable } from '../../utils'; import { METRIC_NUMERIC_MAX } from '../../user_messages_ids'; +import { MetricVisualizationState } from './types'; export const DEFAULT_MAX_COLUMNS = 3; @@ -49,33 +47,6 @@ export const getDefaultColor = (state: MetricVisualizationState, isMetricNumeric : euiThemeVars.euiColorEmptyShade; }; -export interface MetricVisualizationState { - layerId: string; - layerType: LayerType; - metricAccessor?: string; - secondaryMetricAccessor?: string; - maxAccessor?: string; - breakdownByAccessor?: string; - // the dimensions can optionally be single numbers - // computed by collapsing all rows - collapseFn?: CollapseFunction; - subtitle?: string; - secondaryPrefix?: string; - progressDirection?: LayoutDirection; - showBar?: boolean; - color?: string; - icon?: string; - palette?: PaletteOutput; - maxCols?: number; - - trendlineLayerId?: string; - trendlineLayerType?: LayerType; - trendlineTimeAccessor?: string; - trendlineMetricAccessor?: string; - trendlineSecondaryMetricAccessor?: string; - trendlineBreakdownByAccessor?: string; -} - export const supportedDataTypes = new Set(['string', 'boolean', 'number', 'ip', 'date']); const isSupportedMetric = (op: OperationMetadata) => diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/visual_options_popover/index.tsx b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/visual_options_popover/index.tsx index b8b244daf85d29..5fd35a780cda56 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/visual_options_popover/index.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/visual_options_popover/index.tsx @@ -79,7 +79,7 @@ export const VisualOptionsPopover: React.FC = ({ return ( Date: Tue, 9 Jul 2024 11:54:47 +0200 Subject: [PATCH 046/103] [Security Solutions] Add a preview button to alerts inside the risk contribution panel (#187148) ## Summary The feature is hidden behind the flag `entityAlertPreviewEnabled` * It adds the extra column to the risk contribution panel with a button that opens the alert preview panel https://github.com/elastic/kibana/assets/1490444/0677de6b-a6fa-461b-92b5-188d79e7274c ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) --- .../entity_details_flyout/index.tsx | 4 +- .../tabs/risk_inputs/risk_inputs.test.tsx | 66 ++++++++++++++--- .../tabs/risk_inputs/risk_inputs_tab.tsx | 25 ++++++- ...correlations_details_alerts_table.test.tsx | 2 +- .../correlations_details_alerts_table.tsx | 55 +++----------- .../document_details/preview/constants.ts | 19 +++++ .../flyout/document_details/preview/index.tsx | 13 +--- .../host_details_left/index.test.tsx | 18 +++-- .../host_details_left/index.tsx | 7 +- .../entity_details/host_right/index.tsx | 3 +- .../user_details_left/index.test.tsx | 2 + .../user_details_left/index.tsx | 10 ++- .../entity_details/user_details_left/tabs.tsx | 6 +- .../entity_details/user_right/index.tsx | 3 +- .../components/alert_preview_button.test.tsx | 65 +++++++++++++++++ .../components/alert_preview_button.tsx | 72 +++++++++++++++++++ 16 files changed, 284 insertions(+), 86 deletions(-) create mode 100644 x-pack/plugins/security_solution/public/flyout/document_details/preview/constants.ts create mode 100644 x-pack/plugins/security_solution/public/flyout/shared/components/alert_preview_button.test.tsx create mode 100644 x-pack/plugins/security_solution/public/flyout/shared/components/alert_preview_button.tsx diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/index.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/index.tsx index 4c92512e133444..c863904da6c66f 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/index.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/index.tsx @@ -14,7 +14,7 @@ import { RiskInputsTab } from './tabs/risk_inputs/risk_inputs_tab'; export const RISK_INPUTS_TAB_TEST_ID = `${PREFIX}RiskInputsTab` as const; -export const getRiskInputTab = ({ entityType, entityName }: RiskInputsTabProps) => ({ +export const getRiskInputTab = ({ entityType, entityName, scopeId }: RiskInputsTabProps) => ({ id: EntityDetailsLeftPanelTab.RISK_INPUTS, 'data-test-subj': RISK_INPUTS_TAB_TEST_ID, name: ( @@ -23,5 +23,5 @@ export const getRiskInputTab = ({ entityType, entityName }: RiskInputsTabProps) defaultMessage="Risk contributions" /> ), - content: , + content: , }); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx index 8524a2a6a26ea3..d6a247f6558a78 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx @@ -9,7 +9,7 @@ import { render } from '@testing-library/react'; import React from 'react'; import { TestProviders } from '../../../../../common/mock'; import { times } from 'lodash/fp'; -import { RiskInputsTab } from './risk_inputs_tab'; +import { EXPAND_ALERT_TEST_ID, RiskInputsTab } from './risk_inputs_tab'; import { alertInputDataMock } from '../../mocks'; import { RiskSeverity } from '../../../../../../common/search_strategy'; import { RiskScoreEntity } from '../../../../../../common/entity_analytics/risk_engine'; @@ -49,6 +49,12 @@ const riskScore = { }, }; +const mockUseIsExperimentalFeatureEnabled = jest.fn().mockReturnValue(false); + +jest.mock('../../../../../common/hooks/use_experimental_features', () => ({ + useIsExperimentalFeatureEnabled: () => mockUseIsExperimentalFeatureEnabled(), +})); + const riskScoreWithAssetCriticalityContribution = (contribution: number) => { const score = JSON.parse(JSON.stringify(riskScore)); score.user.risk.category_2_score = contribution; @@ -74,7 +80,7 @@ describe('RiskInputsTab', () => { const { getByTestId, queryByTestId } = render( - + ); @@ -87,7 +93,7 @@ describe('RiskInputsTab', () => { const { queryByTestId } = render( - + ); @@ -116,13 +122,57 @@ describe('RiskInputsTab', () => { const { queryByTestId } = render( - + ); expect(queryByTestId('risk-input-contexts-title')).toBeInTheDocument(); }); + it('it renders alert preview button when feature flag is enable', () => { + mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); + mockUseRiskScore.mockReturnValue({ + loading: false, + error: false, + data: [riskScore], + }); + mockUseRiskContributingAlerts.mockReturnValue({ + loading: false, + error: false, + data: [alertInputDataMock], + }); + + const { getByTestId } = render( + + + + ); + + expect(getByTestId(EXPAND_ALERT_TEST_ID)).toBeInTheDocument(); + }); + + it('it does not render alert preview button when feature flag is disable', () => { + mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); + mockUseRiskScore.mockReturnValue({ + loading: false, + error: false, + data: [riskScore], + }); + mockUseRiskContributingAlerts.mockReturnValue({ + loading: false, + error: false, + data: [alertInputDataMock], + }); + + const { queryByTestId } = render( + + + + ); + + expect(queryByTestId(EXPAND_ALERT_TEST_ID)).not.toBeInTheDocument(); + }); + it('Displays 0.00 for the asset criticality contribution if the contribution value is less than -0.01', () => { mockUseUiSetting.mockReturnValue([true]); @@ -134,7 +184,7 @@ describe('RiskInputsTab', () => { const { getByTestId } = render( - + ); const contextsTable = getByTestId('risk-input-contexts-table'); @@ -153,7 +203,7 @@ describe('RiskInputsTab', () => { const { getByTestId } = render( - + ); const contextsTable = getByTestId('risk-input-contexts-table'); @@ -172,7 +222,7 @@ describe('RiskInputsTab', () => { const { getByTestId } = render( - + ); @@ -201,7 +251,7 @@ describe('RiskInputsTab', () => { const { queryByTestId } = render( - + ); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx index 48f004cbd70693..f4514c6bf8f2be 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx @@ -14,6 +14,8 @@ import { useUiSetting$ } from '@kbn/kibana-react-plugin/public'; import { ALERT_RULE_NAME } from '@kbn/rule-data-utils'; import { get } from 'lodash/fp'; +import { AlertPreviewButton } from '../../../../../flyout/shared/components/alert_preview_button'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; import { useGlobalTime } from '../../../../../common/containers/use_global_time'; import { useQueryInspector } from '../../../../../common/components/page/manage_query'; import { formatRiskScore } from '../../../../common'; @@ -40,6 +42,7 @@ import { ActionColumn } from '../../components/action_column'; export interface RiskInputsTabProps extends Record { entityType: RiskScoreEntity; entityName: string; + scopeId: string; } const FIRST_RECORD_PAGINATION = { @@ -47,9 +50,10 @@ const FIRST_RECORD_PAGINATION = { querySize: 1, }; +export const EXPAND_ALERT_TEST_ID = 'risk-input-alert-preview-button'; export const RISK_INPUTS_TAB_QUERY_ID = 'RiskInputsTabQuery'; -export const RiskInputsTab = ({ entityType, entityName }: RiskInputsTabProps) => { +export const RiskInputsTab = ({ entityType, entityName, scopeId }: RiskInputsTabProps) => { const { setQuery, deleteQuery } = useGlobalTime(); const [selectedItems, setSelectedItems] = useState([]); @@ -96,9 +100,26 @@ export const RiskInputsTab = ({ entityType, entityName }: RiskInputsTabProps) => }), [] ); + const isPreviewEnabled = useIsExperimentalFeatureEnabled('entityAlertPreviewEnabled'); const inputColumns: Array> = useMemo( () => [ + ...(isPreviewEnabled + ? [ + { + render: (data: InputAlert) => ( + + ), + width: '5%', + }, + ] + : []), + { name: ( render: formatContribution, }, ], - [] + [isPreviewEnabled, scopeId] ); const [isAssetCriticalityEnabled] = useUiSetting$(ENABLE_ASSET_CRITICALITY_SETTING); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.test.tsx index 1fce080352a083..fec6a1efaa08f3 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.test.tsx @@ -16,7 +16,7 @@ import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_ex import { mockFlyoutApi } from '../../shared/mocks/mock_flyout_context'; import { mockContextValue } from '../../shared/mocks/mock_context'; import { DocumentDetailsPreviewPanelKey } from '../../shared/constants/panel_keys'; -import { ALERT_PREVIEW_BANNER } from '../../preview'; +import { ALERT_PREVIEW_BANNER } from '../../preview/constants'; import { DocumentDetailsContext } from '../../shared/context'; jest.mock('../hooks/use_paginated_alerts'); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx index bf1a28201fc872..5253aa1cd272b3 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx @@ -7,16 +7,14 @@ import type { ReactElement, ReactNode } from 'react'; import React, { type FC, useMemo, useCallback } from 'react'; -import { type Criteria, EuiBasicTable, formatDate, EuiButtonIcon } from '@elastic/eui'; +import { type Criteria, EuiBasicTable, formatDate } from '@elastic/eui'; import { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; import type { Filter } from '@kbn/es-query'; import { isRight } from 'fp-ts/lib/Either'; -import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; import { ALERT_REASON, ALERT_RULE_NAME } from '@kbn/rule-data-utils'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { useDocumentDetailsContext } from '../../shared/context'; import { CORRELATIONS_DETAILS_ALERT_PREVIEW_BUTTON_TEST_ID } from './test_ids'; import { CellTooltipWrapper } from '../../shared/components/cell_tooltip_wrapper'; import type { DataProvider } from '../../../../../common/types'; @@ -26,51 +24,11 @@ import { ExpandablePanel } from '../../../shared/components/expandable_panel'; import { InvestigateInTimelineButton } from '../../../../common/components/event_details/table/investigate_in_timeline_button'; import { ACTION_INVESTIGATE_IN_TIMELINE } from '../../../../detections/components/alerts_table/translations'; import { getDataProvider } from '../../../../common/components/event_details/table/use_action_cell_data_provider'; -import { DocumentDetailsPreviewPanelKey } from '../../shared/constants/panel_keys'; -import { ALERT_PREVIEW_BANNER } from '../../preview'; +import { AlertPreviewButton } from '../../../shared/components/alert_preview_button'; export const TIMESTAMP_DATE_FORMAT = 'MMM D, YYYY @ HH:mm:ss.SSS'; const dataProviderLimit = 5; -interface AlertPreviewButtonProps { - /** - * Id of the document - */ - id: string; - /** - * Name of the index used in the parent's page - */ - indexName: string; -} - -const AlertPreviewButton: FC = ({ id, indexName }) => { - const { openPreviewPanel } = useExpandableFlyoutApi(); - const { scopeId } = useDocumentDetailsContext(); - - const openAlertPreview = useCallback( - () => - openPreviewPanel({ - id: DocumentDetailsPreviewPanelKey, - params: { - id, - indexName, - scopeId, - isPreviewMode: true, - banner: ALERT_PREVIEW_BANNER, - }, - }), - [openPreviewPanel, id, indexName, scopeId] - ); - - return ( - - ); -}; - export interface CorrelationsDetailsAlertsTableProps { /** * Text to display in the ExpandablePanel title section @@ -172,7 +130,12 @@ export const CorrelationsDetailsAlertsTable: FC) => ( - + ), width: '5%', }, @@ -247,7 +210,7 @@ export const CorrelationsDetailsAlertsTable: FC ({ describe('HostDetailsPanel', () => { it('render risk inputs panel', () => { - const { getByTestId } = render(, { - wrapper: TestProviders, - }); + const { getByTestId } = render( + , + { + wrapper: TestProviders, + } + ); expect(getByTestId(RISK_INPUTS_TAB_TEST_ID)).toBeInTheDocument(); }); it("doesn't render risk inputs panel when no alerts ids are provided", () => { - const { queryByTestId } = render(, { - wrapper: TestProviders, - }); + const { queryByTestId } = render( + , + { + wrapper: TestProviders, + } + ); expect(queryByTestId(RISK_INPUTS_TAB_TEST_ID)).not.toBeInTheDocument(); }); }); diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/host_details_left/index.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/host_details_left/index.tsx index 853a68c4fb95e3..ba34ac3d8aa3a3 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/host_details_left/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/host_details_left/index.tsx @@ -18,6 +18,7 @@ import { RiskScoreEntity } from '../../../../common/entity_analytics/risk_engine export interface HostDetailsPanelProps extends Record { isRiskScoreExist: boolean; name: string; + scopeId: string; } export interface HostDetailsExpandableFlyoutProps extends FlyoutPanelProps { key: 'host_details'; @@ -25,18 +26,18 @@ export interface HostDetailsExpandableFlyoutProps extends FlyoutPanelProps { } export const HostDetailsPanelKey: HostDetailsExpandableFlyoutProps['key'] = 'host_details'; -export const HostDetailsPanel = ({ name, isRiskScoreExist }: HostDetailsPanelProps) => { +export const HostDetailsPanel = ({ name, isRiskScoreExist, scopeId }: HostDetailsPanelProps) => { // Temporary implementation while Host details left panel don't have Asset tabs const [tabs, selectedTabId, setSelectedTabId] = useMemo(() => { const isRiskScoreTabAvailable = isRiskScoreExist && name; return [ isRiskScoreTabAvailable - ? [getRiskInputTab({ entityName: name, entityType: RiskScoreEntity.host })] + ? [getRiskInputTab({ entityName: name, entityType: RiskScoreEntity.host, scopeId })] : [], EntityDetailsLeftPanelTab.RISK_INPUTS, () => {}, ]; - }, [name, isRiskScoreExist]); + }, [name, isRiskScoreExist, scopeId]); return ( <> diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/index.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/index.tsx index 518e423fe0077a..798bff18b9c161 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/index.tsx @@ -112,12 +112,13 @@ export const HostPanel = ({ id: HostDetailsPanelKey, params: { name: hostName, + scopeId, isRiskScoreExist, path: tab ? { tab } : undefined, }, }); }, - [telemetry, openLeftPanel, hostName, isRiskScoreExist] + [telemetry, openLeftPanel, hostName, isRiskScoreExist, scopeId] ); const openDefaultPanel = useCallback(() => openTabPanel(), [openTabPanel]); diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/user_details_left/index.test.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/user_details_left/index.test.tsx index 2c88a0ecdfb0b6..bdff465e0b982b 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/user_details_left/index.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/user_details_left/index.test.tsx @@ -20,6 +20,7 @@ describe('LeftPanel', () => { }} isRiskScoreExist user={{ name: 'test user', email: [] }} + scopeId={'scopeId'} />, { wrapper: TestProviders, @@ -39,6 +40,7 @@ describe('LeftPanel', () => { }} isRiskScoreExist={false} user={{ name: 'test user', email: [] }} + scopeId={'scopeId'} />, { wrapper: TestProviders, diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/user_details_left/index.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/user_details_left/index.tsx index 3a682ba1258644..757c6799a6da14 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/user_details_left/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/user_details_left/index.tsx @@ -27,6 +27,7 @@ export interface UserDetailsPanelProps extends Record { isRiskScoreExist: boolean; user: UserParam; path?: PanelPath; + scopeId: string; } export interface UserDetailsExpandableFlyoutProps extends FlyoutPanelProps { key: 'user_details'; @@ -34,9 +35,14 @@ export interface UserDetailsExpandableFlyoutProps extends FlyoutPanelProps { } export const UserDetailsPanelKey: UserDetailsExpandableFlyoutProps['key'] = 'user_details'; -export const UserDetailsPanel = ({ isRiskScoreExist, user, path }: UserDetailsPanelProps) => { +export const UserDetailsPanel = ({ + isRiskScoreExist, + user, + path, + scopeId, +}: UserDetailsPanelProps) => { const managedUser = useManagedUser(user.name, user.email); - const tabs = useTabs(managedUser.data, user.name, isRiskScoreExist); + const tabs = useTabs(managedUser.data, user.name, isRiskScoreExist, scopeId); const { selectedTabId, setSelectedTabId } = useSelectedTab(isRiskScoreExist, user, tabs, path); if (managedUser.isLoading) return ; diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/user_details_left/tabs.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/user_details_left/tabs.tsx index 358dd5357ae2f7..3a6814a28e62cd 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/user_details_left/tabs.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/user_details_left/tabs.tsx @@ -25,7 +25,8 @@ import { EntityDetailsLeftPanelTab } from '../shared/components/left_panel/left_ export const useTabs = ( managedUser: ManagedUserHits, name: string, - isRiskScoreExist: boolean + isRiskScoreExist: boolean, + scopeId: string ): LeftPanelTabsType => useMemo(() => { const tabs: LeftPanelTabsType = []; @@ -37,6 +38,7 @@ export const useTabs = ( getRiskInputTab({ entityName: name, entityType: RiskScoreEntity.user, + scopeId, }) ); } @@ -50,7 +52,7 @@ export const useTabs = ( } return tabs; - }, [isRiskScoreExist, managedUser, name]); + }, [isRiskScoreExist, managedUser, name, scopeId]); const getOktaTab = (oktaManagedUser: ManagedUserHit) => ({ id: EntityDetailsLeftPanelTab.OKTA, diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx index bdfc967fd15084..97f36c3a525c58 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx @@ -115,6 +115,7 @@ export const UserPanel = ({ id: UserDetailsPanelKey, params: { isRiskScoreExist: !!userRiskData?.user?.risk, + scopeId, user: { name: userName, email, @@ -123,7 +124,7 @@ export const UserPanel = ({ path: tab ? { tab } : undefined, }); }, - [telemetry, email, openLeftPanel, userName, userRiskData] + [telemetry, openLeftPanel, userRiskData?.user?.risk, userName, email, scopeId] ); const openPanelFirstTab = useCallback(() => openPanelTab(), [openPanelTab]); diff --git a/x-pack/plugins/security_solution/public/flyout/shared/components/alert_preview_button.test.tsx b/x-pack/plugins/security_solution/public/flyout/shared/components/alert_preview_button.test.tsx new file mode 100644 index 00000000000000..f478812f96f93c --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/shared/components/alert_preview_button.test.tsx @@ -0,0 +1,65 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { fireEvent, render } from '@testing-library/react'; +import { ExpandableFlyoutProvider } from '@kbn/expandable-flyout'; +import React from 'react'; +import { AlertPreviewButton } from './alert_preview_button'; +import { DocumentDetailsPreviewPanelKey } from '../../document_details/shared/constants/panel_keys'; +import { ALERT_PREVIEW_BANNER } from '../../document_details/preview/constants'; + +const mockOpenPreviewPanel = jest.fn(); +jest.mock('@kbn/expandable-flyout', () => { + return { + useExpandableFlyoutApi: () => ({ + openPreviewPanel: mockOpenPreviewPanel, + }), + }; +}); + +describe('AlertPreviewButton', () => { + it('renders the icon', () => { + const { getByTestId } = render( + , + { wrapper: ExpandableFlyoutProvider } + ); + expect(getByTestId('alertPreviewButton')).toBeInTheDocument(); + }); + + it('opens the preview panel when clicked', () => { + const id = '1'; + const indexName = 'index'; + const scopeId = 'scope'; + + const { getByTestId } = render( + , + { wrapper: ExpandableFlyoutProvider } + ); + fireEvent.click(getByTestId('alertPreviewButton')); + + expect(mockOpenPreviewPanel).toHaveBeenCalledWith({ + id: DocumentDetailsPreviewPanelKey, + params: { + id, + indexName, + scopeId, + isPreviewMode: true, + banner: ALERT_PREVIEW_BANNER, + }, + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/flyout/shared/components/alert_preview_button.tsx b/x-pack/plugins/security_solution/public/flyout/shared/components/alert_preview_button.tsx new file mode 100644 index 00000000000000..62426476e3c1f3 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/shared/components/alert_preview_button.tsx @@ -0,0 +1,72 @@ +/* + * Copyright 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 { EuiButtonIcon } from '@elastic/eui'; +import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; +import React, { useCallback } from 'react'; +import type { FC } from 'react'; +import { i18n } from '@kbn/i18n'; +import { ALERT_PREVIEW_BANNER } from '../../document_details/preview/constants'; +import { DocumentDetailsPreviewPanelKey } from '../../document_details/shared/constants/panel_keys'; + +interface AlertPreviewButtonProps { + /** + * Name of the index used in the parent's page + */ + indexName: string; + /** + * Id of the alert to preview + */ + id: string; + /** + * Data attribute used for testing. + */ + 'data-test-subj'?: string; + /** + * Maintain backwards compatibility // TODO remove when possible + */ + scopeId: string; +} + +/** + * Icon button showed on tables to launch a preview of the alert details panel. + */ +export const AlertPreviewButton: FC = ({ + id, + indexName, + 'data-test-subj': dataTestSubj, + scopeId, +}) => { + const { openPreviewPanel } = useExpandableFlyoutApi(); + + const openAlertPreview = useCallback( + () => + openPreviewPanel({ + id: DocumentDetailsPreviewPanelKey, + params: { + id, + indexName, + scopeId, + isPreviewMode: true, + banner: ALERT_PREVIEW_BANNER, + }, + }), + [openPreviewPanel, id, indexName, scopeId] + ); + + return ( + + ); +}; From d4db33595dd390b4239309b35b3ed3a7d0c2938d Mon Sep 17 00:00:00 2001 From: Tomasz Ciecierski Date: Tue, 9 Jul 2024 11:59:31 +0200 Subject: [PATCH 047/103] [EDR Workflows] Add x fields to osquery OpenApi schema (#187685) --- .../api/live_query/create_live_query.gen.ts | 3 - .../live_query/create_live_query.schema.yaml | 4 - .../api/live_query/find_live_query.gen.ts | 3 - .../live_query/find_live_query.schema.yaml | 11 -- .../live_query/get_live_query_details.gen.ts | 20 ---- .../get_live_query_details.schema.yaml | 24 ---- .../live_query/get_live_query_results.gen.ts | 3 - .../get_live_query_results.schema.yaml | 18 --- .../common/api/live_query/live_queries.gen.ts | 88 +++++++++++++++ .../api/live_query/live_queries.schema.yaml | 80 +++++++++++--- .../api/model/schema/common_attributes.gen.ts | 3 + .../schema/common_attributes.schema.yaml | 10 +- .../common/api/packs/create_pack.gen.ts | 3 - .../common/api/packs/create_pack.schema.yaml | 5 +- .../common/api/packs/delete_packs.gen.ts | 3 - .../common/api/packs/delete_packs.schema.yaml | 11 -- .../common/api/packs/find_packs.gen.ts | 3 - .../common/api/packs/find_packs.schema.yaml | 11 -- .../osquery/common/api/packs/packs.gen.ts | 74 +++++++++++++ .../common/api/packs/packs.schema.yaml | 59 ++++++++-- .../common/api/packs/read_packs.gen.ts | 3 - .../common/api/packs/read_packs.schema.yaml | 11 -- .../common/api/packs/update_packs.gen.ts | 3 - .../common/api/packs/update_packs.schema.yaml | 11 -- .../api/saved_query/delete_saved_query.gen.ts | 3 - .../delete_saved_query.schema.yaml | 11 -- .../api/saved_query/find_saved_query.gen.ts | 3 - .../saved_query/find_saved_query.schema.yaml | 11 -- .../api/saved_query/read_saved_query.gen.ts | 3 - .../saved_query/read_saved_query.schema.yaml | 11 -- .../common/api/saved_query/saved_query.gen.ts | 95 ++++++++++++++++ .../api/saved_query/saved_query.schema.yaml | 103 ++++++++++++------ .../api/saved_query/update_saved_query.gen.ts | 3 - .../update_saved_query.schema.yaml | 11 -- 34 files changed, 452 insertions(+), 266 deletions(-) delete mode 100644 x-pack/plugins/osquery/common/api/live_query/get_live_query_details.gen.ts delete mode 100644 x-pack/plugins/osquery/common/api/live_query/get_live_query_details.schema.yaml create mode 100644 x-pack/plugins/osquery/common/api/live_query/live_queries.gen.ts create mode 100644 x-pack/plugins/osquery/common/api/packs/packs.gen.ts create mode 100644 x-pack/plugins/osquery/common/api/saved_query/saved_query.gen.ts diff --git a/x-pack/plugins/osquery/common/api/live_query/create_live_query.gen.ts b/x-pack/plugins/osquery/common/api/live_query/create_live_query.gen.ts index a0635327aaf307..e435a79acdab4f 100644 --- a/x-pack/plugins/osquery/common/api/live_query/create_live_query.gen.ts +++ b/x-pack/plugins/osquery/common/api/live_query/create_live_query.gen.ts @@ -40,6 +40,3 @@ export const CreateLiveQueryRequestBody = z.object({ event_ids: z.array(z.string()).optional(), metadata: z.object({}).nullable().optional(), }); - -export type SuccessResponse = z.infer; -export const SuccessResponse = z.object({}); diff --git a/x-pack/plugins/osquery/common/api/live_query/create_live_query.schema.yaml b/x-pack/plugins/osquery/common/api/live_query/create_live_query.schema.yaml index 4cae65cab8b822..1e40158c638d72 100644 --- a/x-pack/plugins/osquery/common/api/live_query/create_live_query.schema.yaml +++ b/x-pack/plugins/osquery/common/api/live_query/create_live_query.schema.yaml @@ -47,7 +47,3 @@ components: metadata: type: object nullable: true - SuccessResponse: - type: object - properties: {} - # Define properties for the success response if needed diff --git a/x-pack/plugins/osquery/common/api/live_query/find_live_query.gen.ts b/x-pack/plugins/osquery/common/api/live_query/find_live_query.gen.ts index 4860fae7cb7cab..313bb98064a503 100644 --- a/x-pack/plugins/osquery/common/api/live_query/find_live_query.gen.ts +++ b/x-pack/plugins/osquery/common/api/live_query/find_live_query.gen.ts @@ -32,6 +32,3 @@ export const FindLiveQueryRequestQuery = z.object({ sort: SortOrUndefined.optional(), sortOrder: SortOrderOrUndefined.optional(), }); - -export type SuccessResponse = z.infer; -export const SuccessResponse = z.object({}); diff --git a/x-pack/plugins/osquery/common/api/live_query/find_live_query.schema.yaml b/x-pack/plugins/osquery/common/api/live_query/find_live_query.schema.yaml index 730051c5a329d2..50589ecc9fc280 100644 --- a/x-pack/plugins/osquery/common/api/live_query/find_live_query.schema.yaml +++ b/x-pack/plugins/osquery/common/api/live_query/find_live_query.schema.yaml @@ -4,13 +4,6 @@ info: version: '2023-10-31' paths: { } components: - parameters: - FindLiveQueryRequestQueryParameter: - name: query - in: query - required: true - schema: - $ref: '#/components/schemas/FindLiveQueryRequestQuery' schemas: FindLiveQueryRequestQuery: type: object @@ -25,7 +18,3 @@ components: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/SortOrUndefined' sortOrder: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/SortOrderOrUndefined' - SuccessResponse: - type: object - properties: {} - # Define properties for the success response if needed diff --git a/x-pack/plugins/osquery/common/api/live_query/get_live_query_details.gen.ts b/x-pack/plugins/osquery/common/api/live_query/get_live_query_details.gen.ts deleted file mode 100644 index 503b7f79f5a714..00000000000000 --- a/x-pack/plugins/osquery/common/api/live_query/get_live_query_details.gen.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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -/* - * NOTICE: Do not edit this file manually. - * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. - * - * info: - * title: Get Live Query Details Schema - * version: 2023-10-31 - */ - -import { z } from 'zod'; - -export type SuccessResponse = z.infer; -export const SuccessResponse = z.object({}); diff --git a/x-pack/plugins/osquery/common/api/live_query/get_live_query_details.schema.yaml b/x-pack/plugins/osquery/common/api/live_query/get_live_query_details.schema.yaml deleted file mode 100644 index 8bc32f55162f4b..00000000000000 --- a/x-pack/plugins/osquery/common/api/live_query/get_live_query_details.schema.yaml +++ /dev/null @@ -1,24 +0,0 @@ -openapi: 3.0.0 -info: - title: Get Live Query Details Schema - version: '2023-10-31' -paths: { } -components: - parameters: - GetLiveQueryDetailsRequestParameter: - name: id - in: path - required: true - schema: - $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/Id' - GetLiveQueryDetailsRequestQueryParameter: - name: query - in: query - schema: - type: object - additionalProperties: true - schemas: - SuccessResponse: - type: object - properties: {} - # Define properties for the success response if needed diff --git a/x-pack/plugins/osquery/common/api/live_query/get_live_query_results.gen.ts b/x-pack/plugins/osquery/common/api/live_query/get_live_query_results.gen.ts index 171755c49941e7..b1ef683502bc3d 100644 --- a/x-pack/plugins/osquery/common/api/live_query/get_live_query_results.gen.ts +++ b/x-pack/plugins/osquery/common/api/live_query/get_live_query_results.gen.ts @@ -39,6 +39,3 @@ export const GetLiveQueryResultsRequestParams = z.object({ id: Id.optional(), actionId: Id.optional(), }); - -export type SuccessResponse = z.infer; -export const SuccessResponse = z.object({}); diff --git a/x-pack/plugins/osquery/common/api/live_query/get_live_query_results.schema.yaml b/x-pack/plugins/osquery/common/api/live_query/get_live_query_results.schema.yaml index 6036820ef022bf..9d946d6fe821d9 100644 --- a/x-pack/plugins/osquery/common/api/live_query/get_live_query_results.schema.yaml +++ b/x-pack/plugins/osquery/common/api/live_query/get_live_query_results.schema.yaml @@ -4,19 +4,6 @@ info: version: '2023-10-31' paths: { } components: - parameters: - GetLiveQueryRequestResultsQueryParameter: - name: query - in: query - required: true - schema: - $ref: '#/components/schemas/GetLiveQueryResultsRequestQuery' - GetLiveQueryRequestResultsParameter: - name: query - in: path - required: true - schema: - $ref: '#/components/schemas/GetLiveQueryResultsRequestParams' schemas: GetLiveQueryResultsRequestQuery: type: object @@ -38,8 +25,3 @@ components: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/Id' actionId: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/Id' - - SuccessResponse: - type: object - properties: {} - # Define properties for the success response if needed diff --git a/x-pack/plugins/osquery/common/api/live_query/live_queries.gen.ts b/x-pack/plugins/osquery/common/api/live_query/live_queries.gen.ts new file mode 100644 index 00000000000000..03c760cf90f76a --- /dev/null +++ b/x-pack/plugins/osquery/common/api/live_query/live_queries.gen.ts @@ -0,0 +1,88 @@ +/* + * Copyright 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. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Live Queries Schema + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { FindLiveQueryRequestQuery } from './find_live_query.gen'; +import { DefaultSuccessResponse, Id } from '../model/schema/common_attributes.gen'; +import { CreateLiveQueryRequestBody } from './create_live_query.gen'; +import { + GetLiveQueryResultsRequestQuery, + GetLiveQueryResultsRequestParams, +} from './get_live_query_results.gen'; + +export type OsqueryCreateLiveQueryRequestBody = z.infer; +export const OsqueryCreateLiveQueryRequestBody = CreateLiveQueryRequestBody; +export type OsqueryCreateLiveQueryRequestBodyInput = z.input< + typeof OsqueryCreateLiveQueryRequestBody +>; + +export type OsqueryCreateLiveQueryResponse = z.infer; +export const OsqueryCreateLiveQueryResponse = DefaultSuccessResponse; +export type OsqueryFindLiveQueriesRequestQuery = z.infer; +export const OsqueryFindLiveQueriesRequestQuery = z.object({ + query: FindLiveQueryRequestQuery, +}); +export type OsqueryFindLiveQueriesRequestQueryInput = z.input< + typeof OsqueryFindLiveQueriesRequestQuery +>; + +export type OsqueryFindLiveQueriesResponse = z.infer; +export const OsqueryFindLiveQueriesResponse = DefaultSuccessResponse; +export type OsqueryGetLiveQueryDetailsRequestQuery = z.infer< + typeof OsqueryGetLiveQueryDetailsRequestQuery +>; +export const OsqueryGetLiveQueryDetailsRequestQuery = z.object({ + query: z.object({}), +}); +export type OsqueryGetLiveQueryDetailsRequestQueryInput = z.input< + typeof OsqueryGetLiveQueryDetailsRequestQuery +>; + +export type OsqueryGetLiveQueryDetailsRequestParams = z.infer< + typeof OsqueryGetLiveQueryDetailsRequestParams +>; +export const OsqueryGetLiveQueryDetailsRequestParams = z.object({ + id: Id, +}); +export type OsqueryGetLiveQueryDetailsRequestParamsInput = z.input< + typeof OsqueryGetLiveQueryDetailsRequestParams +>; + +export type OsqueryGetLiveQueryDetailsResponse = z.infer; +export const OsqueryGetLiveQueryDetailsResponse = DefaultSuccessResponse; +export type OsqueryGetLiveQueryResultsRequestQuery = z.infer< + typeof OsqueryGetLiveQueryResultsRequestQuery +>; +export const OsqueryGetLiveQueryResultsRequestQuery = z.object({ + query: GetLiveQueryResultsRequestQuery, +}); +export type OsqueryGetLiveQueryResultsRequestQueryInput = z.input< + typeof OsqueryGetLiveQueryResultsRequestQuery +>; + +export type OsqueryGetLiveQueryResultsRequestParams = z.infer< + typeof OsqueryGetLiveQueryResultsRequestParams +>; +export const OsqueryGetLiveQueryResultsRequestParams = z.object({ + query: GetLiveQueryResultsRequestParams, +}); +export type OsqueryGetLiveQueryResultsRequestParamsInput = z.input< + typeof OsqueryGetLiveQueryResultsRequestParams +>; + +export type OsqueryGetLiveQueryResultsResponse = z.infer; +export const OsqueryGetLiveQueryResultsResponse = DefaultSuccessResponse; diff --git a/x-pack/plugins/osquery/common/api/live_query/live_queries.schema.yaml b/x-pack/plugins/osquery/common/api/live_query/live_queries.schema.yaml index feff5dd665f330..ae7c9e4d50f2d7 100644 --- a/x-pack/plugins/osquery/common/api/live_query/live_queries.schema.yaml +++ b/x-pack/plugins/osquery/common/api/live_query/live_queries.schema.yaml @@ -6,17 +6,32 @@ paths: /api/osquery/live_queries: get: summary: Find live queries + operationId: OsqueryFindLiveQueries + x-codegen-enabled: true + x-labels: + - ess + - serverless parameters: - - $ref: './find_live_query.schema.yaml#/components/parameters/FindLiveQueryRequestQueryParameter' + - name: query + in: query + required: true + schema: + $ref: './find_live_query.schema.yaml#/components/schemas/FindLiveQueryRequestQuery' responses: '200': description: OK content: application/json: schema: - $ref: './find_live_query.schema.yaml#/components/schemas/SuccessResponse' + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/DefaultSuccessResponse' + post: summary: Create a live query + operationId: OsqueryCreateLiveQuery + x-codegen-enabled: true + x-labels: + - ess + - serverless requestBody: required: true content: @@ -29,30 +44,59 @@ paths: content: application/json: schema: - $ref: './create_live_query.schema.yaml#/components/schemas/SuccessResponse' + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/DefaultSuccessResponse' + /api/osquery/live_queries/{id}: get: summary: Get live query details + operationId: OsqueryGetLiveQueryDetails + x-codegen-enabled: true + x-labels: + - ess + - serverless parameters: - - $ref: './get_live_query_details.schema.yaml#/components/parameters/GetLiveQueryDetailsRequestQueryParameter' - - $ref: './get_live_query_details.schema.yaml#/components/parameters/GetLiveQueryDetailsRequestParameter' + - name: id + in: path + required: true + schema: + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/Id' + - name: query + in: query + schema: + type: object + additionalProperties: true responses: '200': description: OK content: application/json: schema: - $ref: './get_live_query_details.schema.yaml#/components/schemas/SuccessResponse' + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/DefaultSuccessResponse' + /api/osquery/live_queries/{id}/results/{actionId}: - get: - summary: Get live query results - parameters: - - $ref: './get_live_query_results.schema.yaml#/components/parameters/GetLiveQueryRequestResultsQueryParameter' - - $ref: './get_live_query_results.schema.yaml#/components/parameters/GetLiveQueryRequestResultsParameter' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: './get_live_query_results.schema.yaml#/components/schemas/SuccessResponse' + get: + summary: Get live query results + operationId: OsqueryGetLiveQueryResults + x-codegen-enabled: true + x-labels: + - ess + - serverless + parameters: + - name: query + in: query + required: true + schema: + $ref: './get_live_query_results.schema.yaml#/components/schemas/GetLiveQueryResultsRequestQuery' + - name: query + in: path + required: true + schema: + $ref: './get_live_query_results.schema.yaml#/components/schemas/GetLiveQueryResultsRequestParams' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/DefaultSuccessResponse' + diff --git a/x-pack/plugins/osquery/common/api/model/schema/common_attributes.gen.ts b/x-pack/plugins/osquery/common/api/model/schema/common_attributes.gen.ts index f57cd361a0dd20..71cfeda094ff9f 100644 --- a/x-pack/plugins/osquery/common/api/model/schema/common_attributes.gen.ts +++ b/x-pack/plugins/osquery/common/api/model/schema/common_attributes.gen.ts @@ -178,3 +178,6 @@ export const SortOrderOrUndefined = z.union([z.string().nullable(), z.unknown()] export type Shards = z.infer; export const Shards = z.object({}).catchall(z.number()); + +export type DefaultSuccessResponse = z.infer; +export const DefaultSuccessResponse = z.object({}); diff --git a/x-pack/plugins/osquery/common/api/model/schema/common_attributes.schema.yaml b/x-pack/plugins/osquery/common/api/model/schema/common_attributes.schema.yaml index ba236b8601e7d1..9f24757ee300cc 100644 --- a/x-pack/plugins/osquery/common/api/model/schema/common_attributes.schema.yaml +++ b/x-pack/plugins/osquery/common/api/model/schema/common_attributes.schema.yaml @@ -241,11 +241,15 @@ components: SortOrderOrUndefined: oneOf: - - type: string - nullable: true - - enum: [ asc, desc ] + - type: string + nullable: true + - enum: [ asc, desc ] Shards: type: object additionalProperties: type: number + + DefaultSuccessResponse: + type: object + properties: { } diff --git a/x-pack/plugins/osquery/common/api/packs/create_pack.gen.ts b/x-pack/plugins/osquery/common/api/packs/create_pack.gen.ts index 54cd665b257509..1269df0f65053d 100644 --- a/x-pack/plugins/osquery/common/api/packs/create_pack.gen.ts +++ b/x-pack/plugins/osquery/common/api/packs/create_pack.gen.ts @@ -34,6 +34,3 @@ export const CreatePacksRequestBody = z.object({ shards: Shards.optional(), queries: ObjectQueries.optional(), }); - -export type SuccessResponse = z.infer; -export const SuccessResponse = z.object({}); diff --git a/x-pack/plugins/osquery/common/api/packs/create_pack.schema.yaml b/x-pack/plugins/osquery/common/api/packs/create_pack.schema.yaml index da04d037b1d56e..cac8b877bac1a3 100644 --- a/x-pack/plugins/osquery/common/api/packs/create_pack.schema.yaml +++ b/x-pack/plugins/osquery/common/api/packs/create_pack.schema.yaml @@ -20,7 +20,4 @@ components: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/Shards' queries: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/ObjectQueries' - SuccessResponse: - type: object - properties: {} - # Define properties for the success response if needed + diff --git a/x-pack/plugins/osquery/common/api/packs/delete_packs.gen.ts b/x-pack/plugins/osquery/common/api/packs/delete_packs.gen.ts index 4efab4f488a1d7..525950384cc2f3 100644 --- a/x-pack/plugins/osquery/common/api/packs/delete_packs.gen.ts +++ b/x-pack/plugins/osquery/common/api/packs/delete_packs.gen.ts @@ -22,6 +22,3 @@ export type DeletePacksRequestQuery = z.infer; export const DeletePacksRequestQuery = z.object({ id: PackId.optional(), }); - -export type SuccessResponse = z.infer; -export const SuccessResponse = z.object({}); diff --git a/x-pack/plugins/osquery/common/api/packs/delete_packs.schema.yaml b/x-pack/plugins/osquery/common/api/packs/delete_packs.schema.yaml index 3286aa0b1bb7a1..b26c5e415450a2 100644 --- a/x-pack/plugins/osquery/common/api/packs/delete_packs.schema.yaml +++ b/x-pack/plugins/osquery/common/api/packs/delete_packs.schema.yaml @@ -4,20 +4,9 @@ info: version: '2023-10-31' paths: { } components: - parameters: - DeletePacksRequestQueryParameter: - name: query - in: path - required: true - schema: - $ref: '#/components/schemas/DeletePacksRequestQuery' schemas: DeletePacksRequestQuery: type: object properties: id: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/PackId' - SuccessResponse: - type: object - properties: {} - # Define properties for the success response if needed diff --git a/x-pack/plugins/osquery/common/api/packs/find_packs.gen.ts b/x-pack/plugins/osquery/common/api/packs/find_packs.gen.ts index 9ff3e8c6ae0df2..dcad0cb0c9757a 100644 --- a/x-pack/plugins/osquery/common/api/packs/find_packs.gen.ts +++ b/x-pack/plugins/osquery/common/api/packs/find_packs.gen.ts @@ -30,6 +30,3 @@ export const FindPacksRequestQuery = z.object({ sort: SortOrUndefined.optional(), sortOrder: SortOrderOrUndefined.optional(), }); - -export type SuccessResponse = z.infer; -export const SuccessResponse = z.object({}); diff --git a/x-pack/plugins/osquery/common/api/packs/find_packs.schema.yaml b/x-pack/plugins/osquery/common/api/packs/find_packs.schema.yaml index 4cd1c222bc6d22..c93d9249b7299f 100644 --- a/x-pack/plugins/osquery/common/api/packs/find_packs.schema.yaml +++ b/x-pack/plugins/osquery/common/api/packs/find_packs.schema.yaml @@ -4,13 +4,6 @@ info: version: '2023-10-31' paths: { } components: - parameters: - FindPacksRequestQueryParameter: - name: query - in: query - required: true - schema: - $ref: '#/components/schemas/FindPacksRequestQuery' schemas: FindPacksRequestQuery: type: object @@ -23,7 +16,3 @@ components: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/SortOrUndefined' sortOrder: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/SortOrderOrUndefined' - SuccessResponse: - type: object - properties: {} - # Define properties for the success response if needed diff --git a/x-pack/plugins/osquery/common/api/packs/packs.gen.ts b/x-pack/plugins/osquery/common/api/packs/packs.gen.ts new file mode 100644 index 00000000000000..26d5e8536b8840 --- /dev/null +++ b/x-pack/plugins/osquery/common/api/packs/packs.gen.ts @@ -0,0 +1,74 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Packs Schema + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { FindPacksRequestQuery } from './find_packs.gen'; +import { DefaultSuccessResponse } from '../model/schema/common_attributes.gen'; +import { CreatePacksRequestBody } from './create_pack.gen'; +import { ReadPacksRequestQuery } from './read_packs.gen'; +import { DeletePacksRequestQuery } from './delete_packs.gen'; +import { UpdatePacksRequestBody, UpdatePacksRequestParams } from './update_packs.gen'; + +export type OsqueryCreatePacksRequestBody = z.infer; +export const OsqueryCreatePacksRequestBody = CreatePacksRequestBody; +export type OsqueryCreatePacksRequestBodyInput = z.input; + +export type OsqueryCreatePacksResponse = z.infer; +export const OsqueryCreatePacksResponse = DefaultSuccessResponse; + +export type OsqueryDeletePacksRequestParams = z.infer; +export const OsqueryDeletePacksRequestParams = z.object({ + query: DeletePacksRequestQuery, +}); +export type OsqueryDeletePacksRequestParamsInput = z.input; + +export type OsqueryDeletePacksResponse = z.infer; +export const OsqueryDeletePacksResponse = DefaultSuccessResponse; +export type OsqueryFindPacksRequestQuery = z.infer; +export const OsqueryFindPacksRequestQuery = z.object({ + query: FindPacksRequestQuery, +}); +export type OsqueryFindPacksRequestQueryInput = z.input; + +export type OsqueryFindPacksResponse = z.infer; +export const OsqueryFindPacksResponse = DefaultSuccessResponse; + +export type OsqueryGetPacksDetailsRequestParams = z.infer< + typeof OsqueryGetPacksDetailsRequestParams +>; +export const OsqueryGetPacksDetailsRequestParams = z.object({ + query: ReadPacksRequestQuery, +}); +export type OsqueryGetPacksDetailsRequestParamsInput = z.input< + typeof OsqueryGetPacksDetailsRequestParams +>; + +export type OsqueryGetPacksDetailsResponse = z.infer; +export const OsqueryGetPacksDetailsResponse = DefaultSuccessResponse; + +export type OsqueryUpdatePacksRequestParams = z.infer; +export const OsqueryUpdatePacksRequestParams = z.object({ + query: UpdatePacksRequestParams, +}); +export type OsqueryUpdatePacksRequestParamsInput = z.input; + +export type OsqueryUpdatePacksRequestBody = z.infer; +export const OsqueryUpdatePacksRequestBody = UpdatePacksRequestBody; +export type OsqueryUpdatePacksRequestBodyInput = z.input; + +export type OsqueryUpdatePacksResponse = z.infer; +export const OsqueryUpdatePacksResponse = DefaultSuccessResponse; diff --git a/x-pack/plugins/osquery/common/api/packs/packs.schema.yaml b/x-pack/plugins/osquery/common/api/packs/packs.schema.yaml index 006e0ebd75286c..bb2078e334649f 100644 --- a/x-pack/plugins/osquery/common/api/packs/packs.schema.yaml +++ b/x-pack/plugins/osquery/common/api/packs/packs.schema.yaml @@ -6,17 +6,31 @@ paths: /api/osquery/packs: get: summary: Find packs + operationId: OsqueryFindPacks + x-codegen-enabled: true + x-labels: + - ess + - serverless parameters: - - $ref: './find_packs.schema.yaml#/components/parameters/FindPacksRequestQueryParameter' + - name: query + in: query + required: true + schema: + $ref: './find_packs.schema.yaml#/components/schemas/FindPacksRequestQuery' responses: '200': description: OK content: application/json: schema: - $ref: './find_packs.schema.yaml#/components/schemas/SuccessResponse' + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/DefaultSuccessResponse' post: summary: Create a packs + operationId: OsqueryCreatePacks + x-codegen-enabled: true + x-labels: + - ess + - serverless requestBody: required: true content: @@ -29,32 +43,55 @@ paths: content: application/json: schema: - $ref: './create_pack.schema.yaml#/components/schemas/SuccessResponse' + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/DefaultSuccessResponse' /api/osquery/packs/{id}: get: summary: Get packs details + operationId: OsqueryGetPacksDetails + x-codegen-enabled: true + x-labels: + - ess + - serverless parameters: - - $ref: './read_packs.schema.yaml#/components/parameters/ReadPacksRequestQueryParameter' + - name: query + in: path + required: true + schema: + $ref: './read_packs.schema.yaml#/components/schemas/ReadPacksRequestQuery' responses: '200': description: OK content: application/json: schema: - $ref: './read_packs.schema.yaml#/components/schemas/SuccessResponse' + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/DefaultSuccessResponse' delete: summary: Delete packs + operationId: OsqueryDeletePacks + x-codegen-enabled: true + x-labels: + - ess + - serverless parameters: - - $ref: './delete_packs.schema.yaml#/components/parameters/DeletePacksRequestQueryParameter' + - name: query + in: path + required: true + schema: + $ref: './delete_packs.schema.yaml#/components/schemas/DeletePacksRequestQuery' responses: '200': description: OK content: application/json: schema: - $ref: './find_packs.schema.yaml#/components/schemas/SuccessResponse' + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/DefaultSuccessResponse' put: summary: Update packs + operationId: OsqueryUpdatePacks + x-codegen-enabled: true + x-labels: + - ess + - serverless requestBody: required: true content: @@ -62,11 +99,15 @@ paths: schema: $ref: './update_packs.schema.yaml#/components/schemas/UpdatePacksRequestBody' parameters: - - $ref: './update_packs.schema.yaml#/components/parameters/UpdatePacksRequestQueryParameter' + - name: query + in: path + required: true + schema: + $ref: './update_packs.schema.yaml#/components/schemas/UpdatePacksRequestParams' responses: '200': description: OK content: application/json: schema: - $ref: './update_packs.schema.yaml#/components/schemas/SuccessResponse' + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/DefaultSuccessResponse' diff --git a/x-pack/plugins/osquery/common/api/packs/read_packs.gen.ts b/x-pack/plugins/osquery/common/api/packs/read_packs.gen.ts index bd125eb3acf057..2a315b1604db09 100644 --- a/x-pack/plugins/osquery/common/api/packs/read_packs.gen.ts +++ b/x-pack/plugins/osquery/common/api/packs/read_packs.gen.ts @@ -22,6 +22,3 @@ export type ReadPacksRequestQuery = z.infer; export const ReadPacksRequestQuery = z.object({ id: PackId.optional(), }); - -export type SuccessResponse = z.infer; -export const SuccessResponse = z.object({}); diff --git a/x-pack/plugins/osquery/common/api/packs/read_packs.schema.yaml b/x-pack/plugins/osquery/common/api/packs/read_packs.schema.yaml index 8cfe415848c92a..de068fca1259ef 100644 --- a/x-pack/plugins/osquery/common/api/packs/read_packs.schema.yaml +++ b/x-pack/plugins/osquery/common/api/packs/read_packs.schema.yaml @@ -4,20 +4,9 @@ info: version: '2023-10-31' paths: { } components: - parameters: - ReadPacksRequestQueryParameter: - name: query - in: path - required: true - schema: - $ref: '#/components/schemas/ReadPacksRequestQuery' schemas: ReadPacksRequestQuery: type: object properties: id: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/PackId' - SuccessResponse: - type: object - properties: {} - # Define properties for the success response if needed diff --git a/x-pack/plugins/osquery/common/api/packs/update_packs.gen.ts b/x-pack/plugins/osquery/common/api/packs/update_packs.gen.ts index 92321233cd0d01..de75ec2e3ebc2a 100644 --- a/x-pack/plugins/osquery/common/api/packs/update_packs.gen.ts +++ b/x-pack/plugins/osquery/common/api/packs/update_packs.gen.ts @@ -39,6 +39,3 @@ export const UpdatePacksRequestBody = z.object({ shards: Shards.optional(), queries: ObjectQueries.optional(), }); - -export type SuccessResponse = z.infer; -export const SuccessResponse = z.object({}); diff --git a/x-pack/plugins/osquery/common/api/packs/update_packs.schema.yaml b/x-pack/plugins/osquery/common/api/packs/update_packs.schema.yaml index 0b0510b4773abb..5a10ec7a73da44 100644 --- a/x-pack/plugins/osquery/common/api/packs/update_packs.schema.yaml +++ b/x-pack/plugins/osquery/common/api/packs/update_packs.schema.yaml @@ -4,13 +4,6 @@ info: version: '2023-10-31' paths: { } components: - parameters: - UpdatePacksRequestQueryParameter: - name: query - in: path - required: true - schema: - $ref: '#/components/schemas/UpdatePacksRequestParams' schemas: UpdatePacksRequestParams: type: object @@ -32,7 +25,3 @@ components: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/Shards' queries: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/ObjectQueries' - SuccessResponse: - type: object - properties: {} - # Define properties for the success response if needed diff --git a/x-pack/plugins/osquery/common/api/saved_query/delete_saved_query.gen.ts b/x-pack/plugins/osquery/common/api/saved_query/delete_saved_query.gen.ts index da550104fb6f1c..daaee3e18c65c0 100644 --- a/x-pack/plugins/osquery/common/api/saved_query/delete_saved_query.gen.ts +++ b/x-pack/plugins/osquery/common/api/saved_query/delete_saved_query.gen.ts @@ -22,6 +22,3 @@ export type DeleteSavedQueryRequestQuery = z.infer; -export const SuccessResponse = z.object({}); diff --git a/x-pack/plugins/osquery/common/api/saved_query/delete_saved_query.schema.yaml b/x-pack/plugins/osquery/common/api/saved_query/delete_saved_query.schema.yaml index 7a180c542aa230..7c301cee022423 100644 --- a/x-pack/plugins/osquery/common/api/saved_query/delete_saved_query.schema.yaml +++ b/x-pack/plugins/osquery/common/api/saved_query/delete_saved_query.schema.yaml @@ -4,20 +4,9 @@ info: version: '2023-10-31' paths: { } components: - parameters: - DeleteSavedQueryRequestQueryParameter: - name: query - in: path - required: true - schema: - $ref: '#/components/schemas/DeleteSavedQueryRequestQuery' schemas: DeleteSavedQueryRequestQuery: type: object properties: id: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/SavedQueryId' - SuccessResponse: - type: object - properties: {} - # Define properties for the success response if needed diff --git a/x-pack/plugins/osquery/common/api/saved_query/find_saved_query.gen.ts b/x-pack/plugins/osquery/common/api/saved_query/find_saved_query.gen.ts index 0c875aa8fa1871..2773d1f5e210d0 100644 --- a/x-pack/plugins/osquery/common/api/saved_query/find_saved_query.gen.ts +++ b/x-pack/plugins/osquery/common/api/saved_query/find_saved_query.gen.ts @@ -30,6 +30,3 @@ export const FindSavedQueryRequestQuery = z.object({ sort: SortOrUndefined.optional(), sortOrder: SortOrderOrUndefined.optional(), }); - -export type SuccessResponse = z.infer; -export const SuccessResponse = z.object({}); diff --git a/x-pack/plugins/osquery/common/api/saved_query/find_saved_query.schema.yaml b/x-pack/plugins/osquery/common/api/saved_query/find_saved_query.schema.yaml index dbebf003a46969..ba11befc7af288 100644 --- a/x-pack/plugins/osquery/common/api/saved_query/find_saved_query.schema.yaml +++ b/x-pack/plugins/osquery/common/api/saved_query/find_saved_query.schema.yaml @@ -4,13 +4,6 @@ info: version: '2023-10-31' paths: { } components: - parameters: - FindSavedQueryRequestQueryParameter: - name: query - in: query - required: true - schema: - $ref: '#/components/schemas/FindSavedQueryRequestQuery' schemas: FindSavedQueryRequestQuery: type: object @@ -23,7 +16,3 @@ components: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/SortOrUndefined' sortOrder: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/SortOrderOrUndefined' - SuccessResponse: - type: object - properties: {} - # Define properties for the success response if needed diff --git a/x-pack/plugins/osquery/common/api/saved_query/read_saved_query.gen.ts b/x-pack/plugins/osquery/common/api/saved_query/read_saved_query.gen.ts index 33708f3fc4f3cd..d397135a872865 100644 --- a/x-pack/plugins/osquery/common/api/saved_query/read_saved_query.gen.ts +++ b/x-pack/plugins/osquery/common/api/saved_query/read_saved_query.gen.ts @@ -22,6 +22,3 @@ export type ReadSavedQueryRequestQuery = z.infer; -export const SuccessResponse = z.object({}); diff --git a/x-pack/plugins/osquery/common/api/saved_query/read_saved_query.schema.yaml b/x-pack/plugins/osquery/common/api/saved_query/read_saved_query.schema.yaml index a5fed00a37e0c2..7f2db7145e673a 100644 --- a/x-pack/plugins/osquery/common/api/saved_query/read_saved_query.schema.yaml +++ b/x-pack/plugins/osquery/common/api/saved_query/read_saved_query.schema.yaml @@ -4,20 +4,9 @@ info: version: '2023-10-31' paths: { } components: - parameters: - ReadSavedQueryRequestQueryParameter: - name: query - in: path - required: true - schema: - $ref: '#/components/schemas/ReadSavedQueryRequestQuery' schemas: ReadSavedQueryRequestQuery: type: object properties: id: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/SavedQueryId' - SuccessResponse: - type: object - properties: {} - # Define properties for the success response if needed diff --git a/x-pack/plugins/osquery/common/api/saved_query/saved_query.gen.ts b/x-pack/plugins/osquery/common/api/saved_query/saved_query.gen.ts new file mode 100644 index 00000000000000..033dab65762dd0 --- /dev/null +++ b/x-pack/plugins/osquery/common/api/saved_query/saved_query.gen.ts @@ -0,0 +1,95 @@ +/* + * Copyright 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. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Saved Queries Schema + * version: 2023-10-31 + */ + +import { z } from 'zod'; + +import { FindSavedQueryRequestQuery } from './find_saved_query.gen'; +import { DefaultSuccessResponse } from '../model/schema/common_attributes.gen'; +import { CreateSavedQueryRequestBody } from './create_saved_query.gen'; +import { ReadSavedQueryRequestQuery } from './read_saved_query.gen'; +import { DeleteSavedQueryRequestQuery } from './delete_saved_query.gen'; +import { + UpdateSavedQueryRequestBody, + UpdateSavedQueryRequestParams, +} from './update_saved_query.gen'; + +export type OsqueryCreateSavedQueryRequestBody = z.infer; +export const OsqueryCreateSavedQueryRequestBody = CreateSavedQueryRequestBody; +export type OsqueryCreateSavedQueryRequestBodyInput = z.input< + typeof OsqueryCreateSavedQueryRequestBody +>; + +export type OsqueryCreateSavedQueryResponse = z.infer; +export const OsqueryCreateSavedQueryResponse = DefaultSuccessResponse; + +export type OsqueryDeleteSavedQueryRequestParams = z.infer< + typeof OsqueryDeleteSavedQueryRequestParams +>; +export const OsqueryDeleteSavedQueryRequestParams = z.object({ + query: DeleteSavedQueryRequestQuery, +}); +export type OsqueryDeleteSavedQueryRequestParamsInput = z.input< + typeof OsqueryDeleteSavedQueryRequestParams +>; + +export type OsqueryDeleteSavedQueryResponse = z.infer; +export const OsqueryDeleteSavedQueryResponse = DefaultSuccessResponse; +export type OsqueryFindSavedQueriesRequestQuery = z.infer< + typeof OsqueryFindSavedQueriesRequestQuery +>; +export const OsqueryFindSavedQueriesRequestQuery = z.object({ + query: FindSavedQueryRequestQuery, +}); +export type OsqueryFindSavedQueriesRequestQueryInput = z.input< + typeof OsqueryFindSavedQueriesRequestQuery +>; + +export type OsqueryFindSavedQueriesResponse = z.infer; +export const OsqueryFindSavedQueriesResponse = DefaultSuccessResponse; + +export type OsqueryGetSavedQueryDetailsRequestParams = z.infer< + typeof OsqueryGetSavedQueryDetailsRequestParams +>; +export const OsqueryGetSavedQueryDetailsRequestParams = z.object({ + query: ReadSavedQueryRequestQuery, +}); +export type OsqueryGetSavedQueryDetailsRequestParamsInput = z.input< + typeof OsqueryGetSavedQueryDetailsRequestParams +>; + +export type OsqueryGetSavedQueryDetailsResponse = z.infer< + typeof OsqueryGetSavedQueryDetailsResponse +>; +export const OsqueryGetSavedQueryDetailsResponse = DefaultSuccessResponse; + +export type OsqueryUpdateSavedQueryRequestParams = z.infer< + typeof OsqueryUpdateSavedQueryRequestParams +>; +export const OsqueryUpdateSavedQueryRequestParams = z.object({ + query: UpdateSavedQueryRequestParams, +}); +export type OsqueryUpdateSavedQueryRequestParamsInput = z.input< + typeof OsqueryUpdateSavedQueryRequestParams +>; + +export type OsqueryUpdateSavedQueryRequestBody = z.infer; +export const OsqueryUpdateSavedQueryRequestBody = UpdateSavedQueryRequestBody; +export type OsqueryUpdateSavedQueryRequestBodyInput = z.input< + typeof OsqueryUpdateSavedQueryRequestBody +>; + +export type OsqueryUpdateSavedQueryResponse = z.infer; +export const OsqueryUpdateSavedQueryResponse = DefaultSuccessResponse; diff --git a/x-pack/plugins/osquery/common/api/saved_query/saved_query.schema.yaml b/x-pack/plugins/osquery/common/api/saved_query/saved_query.schema.yaml index d8cef82ac71034..62ae77a83a94bf 100644 --- a/x-pack/plugins/osquery/common/api/saved_query/saved_query.schema.yaml +++ b/x-pack/plugins/osquery/common/api/saved_query/saved_query.schema.yaml @@ -6,17 +6,31 @@ paths: /api/osquery/saved_queries: get: summary: Find saved queries + operationId: OsqueryFindSavedQueries + x-codegen-enabled: true + x-labels: + - ess + - serverless parameters: - - $ref: './find_saved_query.schema.yaml#/components/parameters/FindSavedQueryRequestQueryParameter' + - name: query + in: query + required: true + schema: + $ref: './find_saved_query.schema.yaml#/components/schemas/FindSavedQueryRequestQuery' responses: '200': description: OK content: application/json: schema: - $ref: './find_saved_query.schema.yaml#/components/schemas/SuccessResponse' + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/DefaultSuccessResponse' post: summary: Create a saved query + operationId: OsqueryCreateSavedQuery + x-codegen-enabled: true + x-labels: + - ess + - serverless requestBody: required: true content: @@ -29,44 +43,71 @@ paths: content: application/json: schema: - $ref: './create_saved_query.schema.yaml#/components/schemas/SuccessResponse' + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/DefaultSuccessResponse' /api/osquery/saved_queries/{id}: get: summary: Get saved query details + operationId: OsqueryGetSavedQueryDetails + x-codegen-enabled: true + x-labels: + - ess + - serverless parameters: - - $ref: './read_saved_query.schema.yaml#/components/parameters/ReadSavedQueryRequestQueryParameter' + - name: query + in: path + required: true + schema: + $ref: './read_saved_query.schema.yaml#/components/schemas/ReadSavedQueryRequestQuery' responses: '200': description: OK content: application/json: schema: - $ref: './read_saved_query.schema.yaml#/components/schemas/SuccessResponse' + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/DefaultSuccessResponse' delete: - summary: Delete saved query - parameters: - - $ref: './delete_saved_query.schema.yaml#/components/parameters/DeleteSavedQueryRequestQueryParameter' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: './find_saved_query.schema.yaml#/components/schemas/SuccessResponse' + summary: Delete saved query + operationId: OsqueryDeleteSavedQuery + x-codegen-enabled: true + x-labels: + - ess + - serverless + parameters: + - name: query + in: path + required: true + schema: + $ref: './delete_saved_query.schema.yaml#/components/schemas/DeleteSavedQueryRequestQuery' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/DefaultSuccessResponse' put: - summary: Update saved query - requestBody: - required: true - content: - application/json: - schema: - $ref: './update_saved_query.schema.yaml#/components/schemas/UpdateSavedQueryRequestBody' - parameters: - - $ref: './update_saved_query.schema.yaml#/components/parameters/UpdateSavedQueryRequestQueryParameter' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: './update_saved_query.schema.yaml#/components/schemas/SuccessResponse' + summary: Update saved query + operationId: OsqueryUpdateSavedQuery + x-codegen-enabled: true + x-labels: + - ess + - serverless + requestBody: + required: true + content: + application/json: + schema: + $ref: './update_saved_query.schema.yaml#/components/schemas/UpdateSavedQueryRequestBody' + parameters: + - name: query + in: path + required: true + schema: + $ref: './update_saved_query.schema.yaml#/components/schemas/UpdateSavedQueryRequestParams' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/DefaultSuccessResponse' diff --git a/x-pack/plugins/osquery/common/api/saved_query/update_saved_query.gen.ts b/x-pack/plugins/osquery/common/api/saved_query/update_saved_query.gen.ts index 70417f2880de2f..b2e5a48c4aaca3 100644 --- a/x-pack/plugins/osquery/common/api/saved_query/update_saved_query.gen.ts +++ b/x-pack/plugins/osquery/common/api/saved_query/update_saved_query.gen.ts @@ -44,6 +44,3 @@ export const UpdateSavedQueryRequestBody = z.object({ snapshot: SnapshotOrUndefined.optional(), removed: RemovedOrUndefined.optional(), }); - -export type SuccessResponse = z.infer; -export const SuccessResponse = z.object({}); diff --git a/x-pack/plugins/osquery/common/api/saved_query/update_saved_query.schema.yaml b/x-pack/plugins/osquery/common/api/saved_query/update_saved_query.schema.yaml index b91359b5bbeef1..9f33e8bfda83db 100644 --- a/x-pack/plugins/osquery/common/api/saved_query/update_saved_query.schema.yaml +++ b/x-pack/plugins/osquery/common/api/saved_query/update_saved_query.schema.yaml @@ -4,13 +4,6 @@ info: version: '2023-10-31' paths: { } components: - parameters: - UpdateSavedQueryRequestQueryParameter: - name: query - in: path - required: true - schema: - $ref: '#/components/schemas/UpdateSavedQueryRequestParams' schemas: UpdateSavedQueryRequestParams: type: object @@ -38,7 +31,3 @@ components: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/SnapshotOrUndefined' removed: $ref: '../model/schema/common_attributes.schema.yaml#/components/schemas/RemovedOrUndefined' - SuccessResponse: - type: object - properties: {} - # Define properties for the success response if needed From 66844f574fc144a5d90b988ecb825955a849f91f Mon Sep 17 00:00:00 2001 From: Tre Date: Tue, 9 Jul 2024 11:14:29 +0100 Subject: [PATCH 048/103] [Skip on MKI] Switch from skipSvlSec to failsOnMKI (#187834) ## Summary Due to the `skipSvlSec` tag being ignored (for now), switch the tag so it actually does not run on mki, at all. --- .../test_suites/common/index_management/datastreams.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/datastreams.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/datastreams.ts index b5f51258c8df46..5e0a5baedb2802 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/datastreams.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/datastreams.ts @@ -23,7 +23,7 @@ export default function ({ getService }: FtrProviderContext) { describe('Data streams', function () { // see details: https://github.com/elastic/kibana/issues/187372 - this.tags(['skipSvlSec']); + this.tags(['failsOnMKI']); before(async () => { roleAuthc = await svlUserManager.createApiKeyForRole('admin'); internalReqHeader = svlCommonApi.getInternalRequestHeader(); From 0b9751b245a42e75dd790f58d86687d4f08ac059 Mon Sep 17 00:00:00 2001 From: Antonio Date: Tue, 9 Jul 2024 12:16:59 +0200 Subject: [PATCH 049/103] [ResponseOps][Rules] Fix bug saving actions when editing rules. (#187767) ## Summary Fix bug saving actions when editing rules. Co-authored-by: Elastic Machine --- .../src/common/apis/update_rule/update_rule.test.ts | 12 ++++-------- .../src/common/apis/update_rule/update_rule.ts | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.test.ts b/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.test.ts index 28a0c39c998df3..7cb64b51427e09 100644 --- a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.test.ts +++ b/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.test.ts @@ -114,13 +114,9 @@ describe('updateRule', () => { }, ], }); - expect(http.put.mock.calls[0]).toMatchInlineSnapshot(` - Array [ - "/api/alerting/rule/12%2F3", - Object { - "body": "{\\"name\\":\\"test\\",\\"tags\\":[\\"foo\\"],\\"schedule\\":{\\"interval\\":\\"1m\\"},\\"params\\":{},\\"actions\\":[],\\"alert_delay\\":{\\"active\\":10}}", - }, - ] - `); + + expect(http.put).toHaveBeenCalledWith('/api/alerting/rule/12%2F3', { + body: '{"name":"test","tags":["foo"],"schedule":{"interval":"1m"},"params":{},"actions":[{"group":"default","id":"2","params":{},"frequency":{"notify_when":"onActionGroupChange","throttle":null,"summary":false},"use_alert_data_for_template":false},{"id":".test-system-action","params":{}}],"alert_delay":{"active":10}}', + }); }); }); diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.ts b/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.ts index 7d9dbf71211ee9..841778eaa52ee5 100644 --- a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.ts +++ b/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.ts @@ -44,7 +44,7 @@ export async function updateRule({ const res = await http.put>( `${BASE_ALERTING_API_PATH}/rule/${encodeURIComponent(id)}`, { - body: JSON.stringify(transformUpdateRuleBody(pick(rule, UPDATE_FIELDS))), + body: JSON.stringify(transformUpdateRuleBody(pick(rule, UPDATE_FIELDS_WITH_ACTIONS))), } ); return transformRule(res); From 2e8ca07cedf356103e51ff4b0d8f2d832f7a90bb Mon Sep 17 00:00:00 2001 From: Achyut Jhunjhunwala Date: Tue, 9 Jul 2024 12:27:45 +0200 Subject: [PATCH 050/103] [Logs Explorer] Add logic to render degraded fields table in Logs Flyout (#186287) ## Summary Closes - https://github.com/elastic/kibana/issues/172272 The PR adds the degraded Field Table in the Logs Flyout. The accordion is kept closed by default. For demo purposes below screenshot will show it expanded This PR will also fix a very simply Flaky Test - https://github.com/elastic/kibana/issues/186244 ## Pending Items - [x] Add Locator for Dataset Quality Page - [x] Add tests ## Demo ![Jul-04-2024 15-54-22](https://github.com/elastic/kibana/assets/7416358/4ff9ab9c-ef01-4dd4-83f0-8db9e0dad3f1) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../observability/locators/dataset_quality.ts | 15 +- src/plugins/unified_doc_viewer/kibana.jsonc | 2 +- .../public/__mocks__/services.ts | 2 + .../logs_overview.test.tsx | 40 ++- .../logs_overview.tsx | 2 + .../logs_overview_degraded_fields.tsx | 321 ++++++++++++++++++ .../unified_doc_viewer/public/plugin.tsx | 5 +- .../unified_doc_viewer/public/types.ts | 3 +- src/plugins/unified_doc_viewer/tsconfig.json | 5 +- x-pack/plugins/data_quality/common/index.ts | 3 - .../construct_dataset_quality_locator_path.ts | 5 +- .../locators/dataset_quality_locator.ts | 7 +- .../data_quality/common/locators/types.ts | 25 -- .../common/url_schema/url_schema_v1.ts | 2 +- x-pack/plugins/data_quality/tsconfig.json | 2 +- .../data_streams_stats/data_stream_stat.ts | 2 +- .../dataset_quality/common/types/common.ts | 1 - .../public/components/flyout/flyout.tsx | 8 +- .../public/components/flyout/header.tsx | 10 +- .../components/dataset_quality_link.tsx | 2 +- .../observability_logs_explorer/tsconfig.json | 1 - .../observability/dataset_quality/home.ts | 1 + 22 files changed, 409 insertions(+), 55 deletions(-) create mode 100644 src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview_degraded_fields.tsx diff --git a/packages/deeplinks/observability/locators/dataset_quality.ts b/packages/deeplinks/observability/locators/dataset_quality.ts index bfa760bf62c06a..e30648e3f129ca 100644 --- a/packages/deeplinks/observability/locators/dataset_quality.ts +++ b/packages/deeplinks/observability/locators/dataset_quality.ts @@ -8,7 +8,7 @@ import { SerializableRecord } from '@kbn/utility-types'; -export const DATASET_QUALITY_LOCATOR_ID = 'DATASET_QUALITY_LOCATOR'; +export const DATA_QUALITY_LOCATOR_ID = 'DATA_QUALITY_LOCATOR'; // eslint-disable-next-line @typescript-eslint/consistent-type-definitions type RefreshInterval = { @@ -23,11 +23,22 @@ type TimeRangeConfig = { refresh: RefreshInterval; }; +// eslint-disable-next-line @typescript-eslint/consistent-type-definitions +type DatasetConfig = { + rawName: string; + type: string; + name: string; + namespace: string; +}; + // eslint-disable-next-line @typescript-eslint/consistent-type-definitions type Filters = { timeRange: TimeRangeConfig; }; -export interface DatasetQualityLocatorParams extends SerializableRecord { +export interface DataQualityLocatorParams extends SerializableRecord { filters?: Filters; + flyout?: { + dataset: DatasetConfig; + }; } diff --git a/src/plugins/unified_doc_viewer/kibana.jsonc b/src/plugins/unified_doc_viewer/kibana.jsonc index 2361a10120e9b8..e2febffda4df6b 100644 --- a/src/plugins/unified_doc_viewer/kibana.jsonc +++ b/src/plugins/unified_doc_viewer/kibana.jsonc @@ -8,7 +8,7 @@ "server": false, "browser": true, "requiredBundles": ["kibanaUtils"], - "requiredPlugins": ["data", "discoverShared", "fieldFormats"], + "requiredPlugins": ["data", "discoverShared", "fieldFormats", "share"], "optionalPlugins": ["fieldsMetadata"] } } diff --git a/src/plugins/unified_doc_viewer/public/__mocks__/services.ts b/src/plugins/unified_doc_viewer/public/__mocks__/services.ts index 8496b919b38f03..29ae5f2981a6e0 100644 --- a/src/plugins/unified_doc_viewer/public/__mocks__/services.ts +++ b/src/plugins/unified_doc_viewer/public/__mocks__/services.ts @@ -12,6 +12,7 @@ import { discoverSharedPluginMock } from '@kbn/discover-shared-plugin/public/moc import { fieldFormatsMock } from '@kbn/field-formats-plugin/common/mocks'; import { fieldsMetadataPluginPublicMock } from '@kbn/fields-metadata-plugin/public/mocks'; import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; +import { sharePluginMock } from '@kbn/share-plugin/public/mocks'; import type { UnifiedDocViewerServices, UnifiedDocViewerStart } from '../types'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import { DocViewsRegistry } from '@kbn/unified-doc-viewer'; @@ -29,4 +30,5 @@ export const mockUnifiedDocViewerServices: jest.Mocked storage: new Storage(localStorage), uiSettings: uiSettingsServiceMock.createStartContract(), unifiedDocViewer: mockUnifiedDocViewer, + share: sharePluginMock.createStartContract(), }; diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview.test.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview.test.tsx index 7b9379654cec12..a0f4ba8e993ff1 100644 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview.test.tsx +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview.test.tsx @@ -18,6 +18,8 @@ const DATASET_NAME = 'logs.overview'; const NAMESPACE = 'default'; const DATA_STREAM_NAME = `logs-${DATASET_NAME}-${NAMESPACE}`; const NOW = Date.now(); +const MORE_THAN_1024_CHARS = + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?'; const dataView = { fields: { @@ -82,7 +84,7 @@ const fullHit = buildDataTableRecord( cloud: { provider: ['gcp'], region: 'us-central-1', - availability_zone: 'us-central-1a', + availability_zone: MORE_THAN_1024_CHARS, project: { id: 'elastic-project', }, @@ -92,6 +94,9 @@ const fullHit = buildDataTableRecord( }, 'agent.name': 'node', }, + ignored_field_values: { + 'cloud.availability_zone': [MORE_THAN_1024_CHARS], + }, }, dataView ); @@ -159,4 +164,37 @@ describe('LogsOverview', () => { expect(screen.queryByTestId('unifiedDocViewLogsOverviewLogShipper')).toBeInTheDocument(); }); }); + describe('Degraded Fields section', () => { + it('should load the degraded fields container when present', async () => { + expect( + screen.queryByTestId('unifiedDocViewLogsOverviewDegradedFieldsAccordion') + ).toBeInTheDocument(); + expect( + screen.queryByTestId('unifiedDocViewLogsOverviewDegradedFieldsTechPreview') + ).toBeInTheDocument(); + expect( + screen.queryByTestId('unifiedDocViewLogsOverviewDegradedFieldTitleCount') + ).toBeInTheDocument(); + + // The accordion must be closed by default + const accordion = screen.queryByTestId('unifiedDocViewLogsOverviewDegradedFieldsAccordion1'); + + if (accordion === null) { + return; + } + const button = accordion.querySelector('button'); + + if (button === null) { + return; + } + // Check the aria-expanded property of the button + const isExpanded = button.getAttribute('aria-expanded'); + expect(isExpanded).toBe('false'); + + button.click(); + expect( + screen.queryByTestId('unifiedDocViewLogsOverviewDegradedFieldsQualityIssuesTable') + ).toBeInTheDocument(); + }); + }); }); diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview.tsx index c0161d112e9558..b46570f4f0d374 100644 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview.tsx +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview.tsx @@ -15,6 +15,7 @@ import { LogsOverviewHighlights } from './logs_overview_highlights'; import { FieldActionsProvider } from '../../hooks/use_field_actions'; import { getUnifiedDocViewerServices } from '../../plugin'; import { LogsOverviewAIAssistant } from './logs_overview_ai_assistant'; +import { LogsOverviewDegradedFields } from './logs_overview_degraded_fields'; export function LogsOverview({ columns, @@ -38,6 +39,7 @@ export function LogsOverview({ + ); diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview_degraded_fields.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview_degraded_fields.tsx new file mode 100644 index 00000000000000..976ef71c6b647c --- /dev/null +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview_degraded_fields.tsx @@ -0,0 +1,321 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import React, { useMemo, useState } from 'react'; +import { DataTableRecord } from '@kbn/discover-utils'; +import { + EuiAccordion, + EuiBadge, + EuiBetaBadge, + EuiFlexGroup, + EuiFlexItem, + EuiHorizontalRule, + EuiTitle, + EuiBasicTable, + useGeneratedHtmlId, + EuiBasicTableColumn, + EuiHeaderLink, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { orderBy } from 'lodash'; +import { getRouterLinkProps } from '@kbn/router-utils'; +import { DATA_QUALITY_LOCATOR_ID, DataQualityLocatorParams } from '@kbn/deeplinks-observability'; +import { BrowserUrlService } from '@kbn/share-plugin/public'; +import { getUnifiedDocViewerServices } from '../../plugin'; + +type Direction = 'asc' | 'desc'; +type SortField = 'issue' | 'values'; + +const DEFAULT_SORT_FIELD = 'issue'; +const DEFAULT_SORT_DIRECTION = 'asc'; +const DEFAULT_ROWS_PER_PAGE = 5; + +interface DegradedField { + issue: string; + values: string[]; +} + +interface ParamsForLocator { + dataStreamType: string; + dataStreamName: string; + dataStreamNamespace: string; + rawName: string; +} + +interface TableOptions { + page: { + index: number; + size: number; + }; + sort: { + field: SortField; + direction: Direction; + }; +} + +const DEFAULT_TABLE_OPTIONS: TableOptions = { + page: { + index: 0, + size: 0, + }, + sort: { + field: DEFAULT_SORT_FIELD, + direction: DEFAULT_SORT_DIRECTION, + }, +}; + +const qualityIssuesAccordionTitle = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.accordion.title.qualityIssues', + { + defaultMessage: 'Quality Issues', + } +); + +const qualityIssuesAccordionTechPreviewBadge = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.accordion.title.techPreview', + { + defaultMessage: 'TECH PREVIEW', + } +); + +const issueColumnName = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.accordion.qualityIssues.table.field', + { + defaultMessage: 'Issue', + } +); + +const valuesColumnName = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.accordion.qualityIssues.table.values', + { + defaultMessage: 'Values', + } +); + +const textFieldIgnored = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.accordion.qualityIssues.table.textIgnored', + { + defaultMessage: 'field ignored', + } +); + +export const datasetQualityLinkTitle = i18n.translate( + 'unifiedDocViewer.docView.logsOverview.accordion.qualityIssues.table.datasetQualityLinkTitle', + { + defaultMessage: 'Data set details', + } +); + +export const LogsOverviewDegradedFields = ({ rawDoc }: { rawDoc: DataTableRecord['raw'] }) => { + const { ignored_field_values: ignoredFieldValues = {}, fields: sourceFields = {} } = rawDoc; + const countOfDegradedFields = Object.keys(ignoredFieldValues)?.length; + + const columns = getDegradedFieldsColumns(); + const tableData = getDataFormattedForTable(ignoredFieldValues); + + const paramsForLocator = getParamsForLocator(sourceFields); + + const accordionId = useGeneratedHtmlId({ + prefix: qualityIssuesAccordionTitle, + }); + + const [tableOptions, setTableOptions] = useState(DEFAULT_TABLE_OPTIONS); + + const onTableChange = (options: { + page: { index: number; size: number }; + sort?: { field: SortField; direction: Direction }; + }) => { + setTableOptions({ + page: { + index: options.page.index, + size: options.page.size, + }, + sort: { + field: options.sort?.field ?? DEFAULT_SORT_FIELD, + direction: options.sort?.direction ?? DEFAULT_SORT_DIRECTION, + }, + }); + }; + + const pagination = useMemo( + () => ({ + pageIndex: tableOptions.page.index, + pageSize: DEFAULT_ROWS_PER_PAGE, + totalItemCount: tableData?.length ?? 0, + hidePerPageOptions: true, + }), + [tableData, tableOptions] + ); + + const renderedItems = useMemo(() => { + const sortedItems = orderBy(tableData, tableOptions.sort.field, tableOptions.sort.direction); + return sortedItems.slice( + tableOptions.page.index * DEFAULT_ROWS_PER_PAGE, + (tableOptions.page.index + 1) * DEFAULT_ROWS_PER_PAGE + ); + }, [tableData, tableOptions]); + + const { share } = getUnifiedDocViewerServices(); + const { url: urlService } = share; + + const accordionTitle = ( + + + +

{qualityIssuesAccordionTitle}

+
+
+ + + {countOfDegradedFields} + + + + + +
+ ); + + return countOfDegradedFields > 0 ? ( + <> + + } + data-test-subj="unifiedDocViewLogsOverviewDegradedFieldsAccordion" + > + + + + + ) : null; +}; + +const getDegradedFieldsColumns = (): Array> => [ + { + name: issueColumnName, + sortable: true, + field: 'issue', + render: (issue: string) => { + return ( + <> + {issue} {textFieldIgnored} + + ); + }, + }, + { + name: valuesColumnName, + sortable: true, + field: 'values', + render: (values: string[]) => { + return values.map((value, idx) => {value}); + }, + }, +]; + +const getDataFormattedForTable = ( + ignoredFieldValues: Record +): DegradedField[] => { + return Object.entries(ignoredFieldValues).map(([field, values]) => ({ + issue: field, + values, + })); +}; + +const getParamsForLocator = ( + sourceFields: DataTableRecord['raw']['fields'] +): ParamsForLocator | undefined => { + if (sourceFields) { + const dataStreamTypeArr = sourceFields['data_stream.type']; + const dataStreamType = dataStreamTypeArr ? dataStreamTypeArr[0] : undefined; + const dataStreamNameArr = sourceFields['data_stream.dataset']; + const dataStreamName = dataStreamNameArr ? dataStreamNameArr[0] : undefined; + const dataStreamNamespaceArr = sourceFields['data_stream.namespace']; + const dataStreamNamespace = dataStreamNamespaceArr ? dataStreamNamespaceArr[0] : undefined; + let rawName; + + if (dataStreamType && dataStreamName && dataStreamNamespace) { + rawName = `${dataStreamType}-${dataStreamName}-${dataStreamNamespace}`; + } + + if (rawName) { + return { + dataStreamType, + dataStreamName, + dataStreamNamespace, + rawName, + }; + } + } +}; + +const DatasetQualityLink = React.memo( + ({ + urlService, + paramsForLocator, + }: { + urlService: BrowserUrlService; + paramsForLocator?: ParamsForLocator; + }) => { + const locator = urlService.locators.get(DATA_QUALITY_LOCATOR_ID); + const locatorParams: DataQualityLocatorParams = paramsForLocator + ? { + flyout: { + dataset: { + rawName: paramsForLocator.rawName, + type: paramsForLocator.dataStreamType, + name: paramsForLocator.dataStreamName, + namespace: paramsForLocator.dataStreamNamespace, + }, + }, + } + : {}; + + const datasetQualityUrl = locator?.getRedirectUrl(locatorParams); + + const navigateToDatasetQuality = () => { + locator?.navigate(locatorParams); + }; + + const datasetQualityLinkProps = getRouterLinkProps({ + href: datasetQualityUrl, + onClick: navigateToDatasetQuality, + }); + + return paramsForLocator ? ( + + {datasetQualityLinkTitle} + + ) : null; + } +); diff --git a/src/plugins/unified_doc_viewer/public/plugin.tsx b/src/plugins/unified_doc_viewer/public/plugin.tsx index 13027a2541084f..9c4d7117c37dd2 100644 --- a/src/plugins/unified_doc_viewer/public/plugin.tsx +++ b/src/plugins/unified_doc_viewer/public/plugin.tsx @@ -19,6 +19,7 @@ import { CoreStart } from '@kbn/core/public'; import { dynamic } from '@kbn/shared-ux-utility'; import { DiscoverSharedPublicStart } from '@kbn/discover-shared-plugin/public'; import { FieldsMetadataPublicStart } from '@kbn/fields-metadata-plugin/public'; +import { SharePluginStart } from '@kbn/share-plugin/public'; import type { UnifiedDocViewerServices } from './types'; export const [getUnifiedDocViewerServices, setUnifiedDocViewerServices] = @@ -52,6 +53,7 @@ export interface UnifiedDocViewerStartDeps { discoverShared: DiscoverSharedPublicStart; fieldFormats: FieldFormatsStart; fieldsMetadata: FieldsMetadataPublicStart; + share: SharePluginStart; } export class UnifiedDocViewerPublicPlugin @@ -121,7 +123,7 @@ export class UnifiedDocViewerPublicPlugin public start(core: CoreStart, deps: UnifiedDocViewerStartDeps) { const { analytics, uiSettings } = core; - const { data, discoverShared, fieldFormats, fieldsMetadata } = deps; + const { data, discoverShared, fieldFormats, fieldsMetadata, share } = deps; const storage = new Storage(localStorage); const unifiedDocViewer = { registry: this.docViewsRegistry, @@ -135,6 +137,7 @@ export class UnifiedDocViewerPublicPlugin storage, uiSettings, unifiedDocViewer, + share, }; setUnifiedDocViewerServices(services); return unifiedDocViewer; diff --git a/src/plugins/unified_doc_viewer/public/types.ts b/src/plugins/unified_doc_viewer/public/types.ts index c19c60da72b13e..e471fa87b85c16 100644 --- a/src/plugins/unified_doc_viewer/public/types.ts +++ b/src/plugins/unified_doc_viewer/public/types.ts @@ -5,7 +5,6 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - export type { JsonCodeEditorProps } from './components'; export type { EsDocSearchProps } from './hooks'; export type { UnifiedDocViewerSetup, UnifiedDocViewerStart } from './plugin'; @@ -17,6 +16,7 @@ import type { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import type { FieldsMetadataPublicStart } from '@kbn/fields-metadata-plugin/public'; import type { Storage } from '@kbn/kibana-utils-plugin/public'; import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; +import type { SharePluginStart } from '@kbn/share-plugin/public'; import type { UnifiedDocViewerStart } from './plugin'; export interface UnifiedDocViewerServices { @@ -28,4 +28,5 @@ export interface UnifiedDocViewerServices { storage: Storage; uiSettings: IUiSettingsClient; unifiedDocViewer: UnifiedDocViewerStart; + share: SharePluginStart; } diff --git a/src/plugins/unified_doc_viewer/tsconfig.json b/src/plugins/unified_doc_viewer/tsconfig.json index fbe2ac83c5f1ac..3b271744ed4af0 100644 --- a/src/plugins/unified_doc_viewer/tsconfig.json +++ b/src/plugins/unified_doc_viewer/tsconfig.json @@ -32,7 +32,10 @@ "@kbn/discover-shared-plugin", "@kbn/fields-metadata-plugin", "@kbn/unified-data-table", - "@kbn/core-notifications-browser" + "@kbn/core-notifications-browser", + "@kbn/deeplinks-observability", + "@kbn/share-plugin", + "@kbn/router-utils" ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/data_quality/common/index.ts b/x-pack/plugins/data_quality/common/index.ts index 79bbe59ff35d2a..1b174a9efe5241 100644 --- a/x-pack/plugins/data_quality/common/index.ts +++ b/x-pack/plugins/data_quality/common/index.ts @@ -13,6 +13,3 @@ export const PLUGIN_NAME = i18n.translate('xpack.dataQuality.name', { }); export { DATA_QUALITY_URL_STATE_KEY, datasetQualityUrlSchemaV1 } from './url_schema'; - -export { DATA_QUALITY_LOCATOR_ID } from './locators'; -export type { DataQualityLocatorParams } from './locators'; diff --git a/x-pack/plugins/data_quality/common/locators/construct_dataset_quality_locator_path.ts b/x-pack/plugins/data_quality/common/locators/construct_dataset_quality_locator_path.ts index 45f58752bd2fc7..f5b5b0bf7ce592 100644 --- a/x-pack/plugins/data_quality/common/locators/construct_dataset_quality_locator_path.ts +++ b/x-pack/plugins/data_quality/common/locators/construct_dataset_quality_locator_path.ts @@ -8,9 +8,9 @@ import { setStateToKbnUrl } from '@kbn/kibana-utils-plugin/common'; import { ManagementAppLocatorParams } from '@kbn/management-plugin/common/locator'; import { LocatorPublic } from '@kbn/share-plugin/common'; +import { DataQualityLocatorParams } from '@kbn/deeplinks-observability'; import { datasetQualityUrlSchemaV1, DATA_QUALITY_URL_STATE_KEY } from '../url_schema'; import { deepCompactObject } from '../utils/deep_compact_object'; -import { DataQualityLocatorParams } from './types'; interface LocatorPathConstructionParams { locatorParams: DataQualityLocatorParams; @@ -20,7 +20,7 @@ interface LocatorPathConstructionParams { export const constructDatasetQualityLocatorPath = async (params: LocatorPathConstructionParams) => { const { - locatorParams: { filters }, + locatorParams: { filters, flyout }, useHash, managementLocator, } = params; @@ -29,6 +29,7 @@ export const constructDatasetQualityLocatorPath = async (params: LocatorPathCons deepCompactObject({ v: 1, filters, + flyout, }) ); diff --git a/x-pack/plugins/data_quality/common/locators/dataset_quality_locator.ts b/x-pack/plugins/data_quality/common/locators/dataset_quality_locator.ts index 70e4770090ef3b..4bf804955b6bcb 100644 --- a/x-pack/plugins/data_quality/common/locators/dataset_quality_locator.ts +++ b/x-pack/plugins/data_quality/common/locators/dataset_quality_locator.ts @@ -6,11 +6,8 @@ */ import type { LocatorDefinition, LocatorPublic } from '@kbn/share-plugin/public'; -import { - DataQualityLocatorDependencies, - DataQualityLocatorParams, - DATA_QUALITY_LOCATOR_ID, -} from './types'; +import { DataQualityLocatorParams, DATA_QUALITY_LOCATOR_ID } from '@kbn/deeplinks-observability'; +import { DataQualityLocatorDependencies } from './types'; import { constructDatasetQualityLocatorPath } from './construct_dataset_quality_locator_path'; export type DatasetQualityLocator = LocatorPublic; diff --git a/x-pack/plugins/data_quality/common/locators/types.ts b/x-pack/plugins/data_quality/common/locators/types.ts index 57067cd0e482a3..786b5e1cf567f8 100644 --- a/x-pack/plugins/data_quality/common/locators/types.ts +++ b/x-pack/plugins/data_quality/common/locators/types.ts @@ -7,31 +7,6 @@ import { ManagementAppLocatorParams } from '@kbn/management-plugin/common/locator'; import { LocatorPublic } from '@kbn/share-plugin/common'; -import { SerializableRecord } from '@kbn/utility-types'; - -export const DATA_QUALITY_LOCATOR_ID = 'DATA_QUALITY_LOCATOR'; - -// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -type RefreshInterval = { - pause: boolean; - value: number; -}; - -// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -type TimeRangeConfig = { - from: string; - to: string; - refresh: RefreshInterval; -}; - -// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -type Filters = { - timeRange: TimeRangeConfig; -}; - -export interface DataQualityLocatorParams extends SerializableRecord { - filters?: Filters; -} export interface DataQualityLocatorDependencies { useHash: boolean; diff --git a/x-pack/plugins/data_quality/common/url_schema/url_schema_v1.ts b/x-pack/plugins/data_quality/common/url_schema/url_schema_v1.ts index 6fd5781a217e80..076e1b641b7e27 100644 --- a/x-pack/plugins/data_quality/common/url_schema/url_schema_v1.ts +++ b/x-pack/plugins/data_quality/common/url_schema/url_schema_v1.ts @@ -37,11 +37,11 @@ const datasetRT = rt.intersection([ type: rt.string, name: rt.string, namespace: rt.string, - title: rt.string, }), rt.exact( rt.partial({ integration: integrationRT, + title: rt.string, }) ), ]); diff --git a/x-pack/plugins/data_quality/tsconfig.json b/x-pack/plugins/data_quality/tsconfig.json index 7a904e9f95cda6..911c4fbfff5573 100644 --- a/x-pack/plugins/data_quality/tsconfig.json +++ b/x-pack/plugins/data_quality/tsconfig.json @@ -25,8 +25,8 @@ "@kbn/core-chrome-browser", "@kbn/features-plugin", "@kbn/share-plugin", - "@kbn/utility-types", "@kbn/deeplinks-management", + "@kbn/deeplinks-observability", "@kbn/ebt-tools", ], "exclude": ["target/**/*"] diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/data_stream_stat.ts b/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/data_stream_stat.ts index 5968c369732de2..164a43c625fb16 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/data_stream_stat.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/data_stream_stat.ts @@ -17,7 +17,7 @@ export class DataStreamStat { type: DataStreamType; name: DataStreamStatType['name']; namespace: string; - title: string; + title?: string; size?: DataStreamStatType['size']; // total datastream size sizeBytes?: DataStreamStatType['sizeBytes']; // total datastream size lastActivity?: DataStreamStatType['lastActivity']; diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/types/common.ts b/x-pack/plugins/observability_solution/dataset_quality/common/types/common.ts index ca5c4632ec0d3d..82d7b64e25f636 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/types/common.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/types/common.ts @@ -22,6 +22,5 @@ export interface BasicDataStream { name: DataStreamStatType['name']; rawName: string; namespace: string; - title: string; integration?: Integration; } diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout.tsx index 7411067a7317f4..7dc455b2804440 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout.tsx @@ -43,15 +43,16 @@ export default function Flyout({ dataset, closeFlyout }: FlyoutProps) { integration, } = useDatasetQualityFlyout(); - const titleAndLinkDetails: BasicDataStream = { + const linkDetails: BasicDataStream = { name: dataset.name, rawName: dataset.rawName, integration: integration?.integrationDetails, type: dataset.type, namespace: dataset.namespace, - title: integration?.integrationDetails?.datasets?.[dataset.name] ?? dataset.name, }; + const title = integration?.integrationDetails?.datasets?.[dataset.name] ?? dataset.name; + const { startTracking } = useDatasetDetailsTelemetry(); useEffect(() => { @@ -70,8 +71,9 @@ export default function Flyout({ dataset, closeFlyout }: FlyoutProps) { ) : ( <>
diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/header.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/header.tsx index 5fc66f79b79bad..10d0c96a057bd3 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/header.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/header.tsx @@ -27,17 +27,19 @@ import { IntegrationIcon } from '../common'; import { BasicDataStream } from '../../../common/types'; export function Header({ - titleAndLinkDetails, + linkDetails, loading, + title, }: { - titleAndLinkDetails: BasicDataStream; + linkDetails: BasicDataStream; loading: boolean; + title: string; }) { - const { integration, title } = titleAndLinkDetails; + const { integration } = linkDetails; const euiShadow = useEuiShadow('s'); const { euiTheme } = useEuiTheme(); const redirectLinkProps = useRedirectLink({ - dataStreamStat: titleAndLinkDetails, + dataStreamStat: linkDetails, telemetry: { page: 'details', navigationSource: NavigationSource.Header, diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/dataset_quality_link.tsx b/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/dataset_quality_link.tsx index 24782cd2ab2bb9..6610db470014b7 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/dataset_quality_link.tsx +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/dataset_quality_link.tsx @@ -12,7 +12,7 @@ import { BrowserUrlService } from '@kbn/share-plugin/public'; import { MatchedStateFromActor } from '@kbn/xstate-utils'; import { useActor } from '@xstate/react'; import React from 'react'; -import { DataQualityLocatorParams, DATA_QUALITY_LOCATOR_ID } from '@kbn/data-quality-plugin/common'; +import { DataQualityLocatorParams, DATA_QUALITY_LOCATOR_ID } from '@kbn/deeplinks-observability'; import { datasetQualityLinkTitle } from '../../common/translations'; import { ObservabilityLogsExplorerService, diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.json b/x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.json index 446c237e257eb1..26db8756fb9a14 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.json +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.json @@ -49,7 +49,6 @@ "@kbn/es-query", "@kbn/core-analytics-browser", "@kbn/react-hooks", - "@kbn/data-quality-plugin", "@kbn/ebt", ], "exclude": [ diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/home.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/home.ts index 7deeeff7e9bc1b..a1c285146e5e53 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/home.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/home.ts @@ -49,6 +49,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('dataset quality table exists', async () => { await PageObjects.datasetQuality.navigateTo(); + await PageObjects.datasetQuality.waitUntilTableLoaded(); await testSubjects.existOrFail( PageObjects.datasetQuality.testSubjectSelectors.datasetQualityTable ); From 692b656f9c247b438951a946f3f1123d36ac00a6 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Tue, 9 Jul 2024 12:32:48 +0200 Subject: [PATCH 051/103] [ES|QL] Support counter fields (#186292) - Closes https://github.com/elastic/kibana/issues/186160 ## Summary This PR adds a new util to help with converting ES|QL column into data view field representation https://github.com/elastic/kibana/blob/9d63332c74523b00f2b9056352a5b3a86eaf2b75/packages/kbn-data-view-utils/src/utils/convert_to_data_view_field.ts#L13 This allows to handle counter fields in a more predicable way despite of the different format of ES|QL column data. https://github.com/elastic/kibana/pull/186154#issuecomment-2164973060 Screenshot 2024-07-03 at 13 48 20 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine Co-authored-by: Stratoula Kalafateli Co-authored-by: Matthias Wilhelm --- packages/kbn-data-view-utils/index.ts | 2 +- .../convert_to_data_view_field_spec.test.ts | 60 +++++++++++++++++++ .../utils/convert_to_data_view_field_spec.ts | 37 ++++++++++++ packages/kbn-data-view-utils/tsconfig.json | 4 ++ .../kbn-field-types/src/kbn_field_types.ts | 4 ++ .../utils/get_text_based_column_icon_type.ts | 9 ++- packages/kbn-field-utils/tsconfig.json | 1 + .../components/sidebar/lib/get_field_list.ts | 11 +--- 8 files changed, 113 insertions(+), 15 deletions(-) create mode 100644 packages/kbn-data-view-utils/src/utils/convert_to_data_view_field_spec.test.ts create mode 100644 packages/kbn-data-view-utils/src/utils/convert_to_data_view_field_spec.ts diff --git a/packages/kbn-data-view-utils/index.ts b/packages/kbn-data-view-utils/index.ts index 1c881dbdacf79f..ad783bc163c593 100644 --- a/packages/kbn-data-view-utils/index.ts +++ b/packages/kbn-data-view-utils/index.ts @@ -7,6 +7,6 @@ */ export * from './src/constants'; - +export { convertDatatableColumnToDataViewFieldSpec } from './src/utils/convert_to_data_view_field_spec'; export { createRegExpPatternFrom } from './src/utils/create_regexp_pattern_from'; export { testPatternAgainstAllowedList } from './src/utils/test_pattern_against_allowed_list'; diff --git a/packages/kbn-data-view-utils/src/utils/convert_to_data_view_field_spec.test.ts b/packages/kbn-data-view-utils/src/utils/convert_to_data_view_field_spec.test.ts new file mode 100644 index 00000000000000..94dce4a6a60da6 --- /dev/null +++ b/packages/kbn-data-view-utils/src/utils/convert_to_data_view_field_spec.test.ts @@ -0,0 +1,60 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { DatatableColumnType } from '@kbn/expressions-plugin/common'; +import { convertDatatableColumnToDataViewFieldSpec } from './convert_to_data_view_field_spec'; + +describe('convertDatatableColumnToDataViewFieldSpec', () => { + it('should return a DataViewField object for a counter column', () => { + const column = { + id: 'bytes_counter', + name: 'bytes_counter', + meta: { + esType: 'counter_long', + type: 'number' as DatatableColumnType, + }, + isNull: false, + }; + const result = convertDatatableColumnToDataViewFieldSpec(column); + expect(result).toEqual( + expect.objectContaining({ + name: 'bytes_counter', + type: 'number', + esTypes: ['long'], + searchable: true, + aggregatable: false, + isNull: false, + timeSeriesMetric: 'counter', + }) + ); + }); + + it('should return a DataViewField object with timeSeriesMetric undefined if esType does not start with counter_', () => { + const column = { + id: 'test', + name: 'test', + meta: { + esType: 'keyword', + type: 'string' as DatatableColumnType, + }, + isNull: false, + }; + const result = convertDatatableColumnToDataViewFieldSpec(column); + expect(result.timeSeriesMetric).toBeUndefined(); + expect(result).toEqual( + expect.objectContaining({ + name: 'test', + type: 'string', + esTypes: ['keyword'], + searchable: true, + aggregatable: false, + isNull: false, + }) + ); + }); +}); diff --git a/packages/kbn-data-view-utils/src/utils/convert_to_data_view_field_spec.ts b/packages/kbn-data-view-utils/src/utils/convert_to_data_view_field_spec.ts new file mode 100644 index 00000000000000..7cc408a414adef --- /dev/null +++ b/packages/kbn-data-view-utils/src/utils/convert_to_data_view_field_spec.ts @@ -0,0 +1,37 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { DatatableColumn } from '@kbn/expressions-plugin/common'; +import type { MappingTimeSeriesMetricType } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { FieldSpec } from '@kbn/data-views-plugin/common'; + +/** + * Convert a datatable column to a DataViewFieldSpec + */ +export function convertDatatableColumnToDataViewFieldSpec(column: DatatableColumn): FieldSpec { + let esType = column.meta?.esType; + let timeSeriesMetric: MappingTimeSeriesMetricType | undefined; + + // 'counter_integer', 'counter_long', 'counter_double'... + if (esType?.startsWith('counter_')) { + esType = esType?.replace('counter_', ''); + timeSeriesMetric = 'counter'; + } + + // `DataViewField` class is defined in "data-views" plugin, so we can't create an instance of it from a package. + // We will return a data view field spec here instead then. + return { + name: column.name, + type: column.meta?.type ?? 'unknown', + esTypes: esType ? [esType] : undefined, + searchable: true, + aggregatable: false, + isNull: Boolean(column?.isNull), + ...(timeSeriesMetric ? { timeSeriesMetric } : {}), + }; +} diff --git a/packages/kbn-data-view-utils/tsconfig.json b/packages/kbn-data-view-utils/tsconfig.json index a41af0b7c50174..05400030e1001c 100644 --- a/packages/kbn-data-view-utils/tsconfig.json +++ b/packages/kbn-data-view-utils/tsconfig.json @@ -14,5 +14,9 @@ ], "exclude": [ "target/**/*" + ], + "kbn_references": [ + "@kbn/data-views-plugin", + "@kbn/expressions-plugin", ] } diff --git a/packages/kbn-field-types/src/kbn_field_types.ts b/packages/kbn-field-types/src/kbn_field_types.ts index 7ec22de078230d..5059d37da1d0e8 100644 --- a/packages/kbn-field-types/src/kbn_field_types.ts +++ b/packages/kbn-field-types/src/kbn_field_types.ts @@ -50,6 +50,10 @@ export const getFilterableKbnTypeNames = (): string[] => registeredKbnTypes.filter((type) => type.filterable).map((type) => type.name); export function esFieldTypeToKibanaFieldType(type: string) { + // 'counter_integer', 'counter_long', 'counter_double'... + if (type.startsWith('counter_')) { + return KBN_FIELD_TYPES.NUMBER; + } switch (type) { case ES_FIELD_TYPES._INDEX: return KBN_FIELD_TYPES.STRING; diff --git a/packages/kbn-field-utils/src/utils/get_text_based_column_icon_type.ts b/packages/kbn-field-utils/src/utils/get_text_based_column_icon_type.ts index 0ccad94674208d..3c37b9b01c3fbf 100644 --- a/packages/kbn-field-utils/src/utils/get_text_based_column_icon_type.ts +++ b/packages/kbn-field-utils/src/utils/get_text_based_column_icon_type.ts @@ -7,6 +7,7 @@ */ import type { DatatableColumnMeta } from '@kbn/expressions-plugin/common'; +import { convertDatatableColumnToDataViewFieldSpec } from '@kbn/data-view-utils'; import { getFieldIconType } from './get_field_icon_type'; export function getTextBasedColumnIconType( @@ -19,10 +20,8 @@ export function getTextBasedColumnIconType( | null ): string | null { return columnMeta && columnMeta.type - ? getFieldIconType({ - name: '', - type: columnMeta.type, - esTypes: columnMeta.esType ? [columnMeta.esType] : [], - }) + ? getFieldIconType( + convertDatatableColumnToDataViewFieldSpec({ id: '', name: '', meta: columnMeta }) + ) : null; } diff --git a/packages/kbn-field-utils/tsconfig.json b/packages/kbn-field-utils/tsconfig.json index 4b75159b5f7feb..9ac5ba7e942bc3 100644 --- a/packages/kbn-field-utils/tsconfig.json +++ b/packages/kbn-field-utils/tsconfig.json @@ -10,6 +10,7 @@ "@kbn/react-field", "@kbn/field-types", "@kbn/expressions-plugin", + "@kbn/data-view-utils", ], "exclude": ["target/**/*"] } diff --git a/src/plugins/discover/public/application/main/components/sidebar/lib/get_field_list.ts b/src/plugins/discover/public/application/main/components/sidebar/lib/get_field_list.ts index 99d911dd14f61f..36a07faaef80df 100644 --- a/src/plugins/discover/public/application/main/components/sidebar/lib/get_field_list.ts +++ b/src/plugins/discover/public/application/main/components/sidebar/lib/get_field_list.ts @@ -8,6 +8,7 @@ import { difference } from 'lodash'; import { type DataView, DataViewField } from '@kbn/data-views-plugin/public'; +import { convertDatatableColumnToDataViewFieldSpec } from '@kbn/data-view-utils'; import type { DatatableColumn } from '@kbn/expressions-plugin/common'; import { fieldWildcardFilter } from '@kbn/kibana-utils-plugin/public'; import { isNestedFieldParent } from '@kbn/discover-utils'; @@ -66,14 +67,6 @@ export function getEsqlQueryFieldList(esqlQueryColumns?: DatatableColumn[]): Dat return []; } return esqlQueryColumns.map( - (column) => - new DataViewField({ - name: column.name, - type: column.meta?.type ?? 'unknown', - esTypes: column.meta?.esType ? [column.meta?.esType] : undefined, - searchable: true, - aggregatable: false, - isNull: Boolean(column?.isNull), - }) + (column) => new DataViewField(convertDatatableColumnToDataViewFieldSpec(column)) ); } From 834f8fdb375d0c7eef0de974ae5c0f0c0f19b60a Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Tue, 9 Jul 2024 07:27:20 -0400 Subject: [PATCH 052/103] [Fleet] Always use a SNAPSHOT version when running elastic-agent docker image (#187777) --- x-pack/test/fleet_cypress/artifact_manager.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/x-pack/test/fleet_cypress/artifact_manager.ts b/x-pack/test/fleet_cypress/artifact_manager.ts index 0fe6609f28efc7..23efabe2d976ad 100644 --- a/x-pack/test/fleet_cypress/artifact_manager.ts +++ b/x-pack/test/fleet_cypress/artifact_manager.ts @@ -15,6 +15,10 @@ export async function getLatestVersion(): Promise { return pRetry(() => axios('https://artifacts-api.elastic.co/v1/versions'), { maxRetryTime: 60 * 1000, // 1 minute }) - .then((response) => last(response.data.versions as string[]) || DEFAULT_VERSION) + .then( + (response) => + last((response.data.versions as string[]).filter((v) => v.includes('-SNAPSHOT'))) || + DEFAULT_VERSION + ) .catch(() => DEFAULT_VERSION); } From 045aafcfea10fb2d1099eb2c7b7600bf25480ede Mon Sep 17 00:00:00 2001 From: Dmitrii Shevchenko Date: Tue, 9 Jul 2024 13:40:50 +0200 Subject: [PATCH 053/103] [Security Solution] Implement isCustomized calculation (#186988) **Resolves: https://github.com/elastic/kibana/issues/180145** **Resolves: https://github.com/elastic/kibana/issues/184364** > [!NOTE] > This PR doesn't include `isCustomized` recalculation when bulk editing rules. This should be addressed separately as it might require first changing the `RulesClient.bulkEdit` method signature. ## Summary This PR implements the calculation of `ruleSource.isCustomized` inside the `DetectionRulesClient`. The recalculation of the `isCustomized` field is performed on every rule patch and update operation, including rule upgrades. See the ticket for more information: https://github.com/elastic/kibana/issues/180145 and `detection_rules_client/mergers/rule_source/calculate_is_customized.ts` for implementation details. The `isCustomized` calculation is based on the `calculateRuleFieldsDiff` method used inside the prebuilt rules domain for calculating changed fields during rule upgrades. This ensures that the diff calculation logic is unified and reused to avoid any discrepancies in different paths of rule management. The recalculation and saving of the field is done in the following endpoints: - **Update Rule** - `PUT /rules` - **Patch Rule** - `PATCH /rules` - **Bulk Update Rules** - `PUT /rules/_bulk_update` - **Bulk Patch Rules** - `PATCH /rules/_bulk_update` - **Import Rules** - `POST /rules/_import` - **Perform Rule Upgrade** - `POST /prebuilt_rules/upgrade/_perform` This PR also partially addresses refactoring mentioned here: https://github.com/elastic/kibana/issues/184364. Namely: - Splits the rule converters into smaller single-responsibility functions. - Separate methods to convert RuleResponse to AlertingRule and back - Separate methods to apply rule patches, updates, or set defaults - Separate case converters - Migrates methods to work with RuleResponse instead of alerting type wherever possible. - Adds new methods for fetching rules by id or rule id and deprecates the `readRules`. Although new methods are not exposed yet in the public client interface, this is something that needs to be addressed separately. --- .../rule_schema/rule_response_schema.mock.ts | 28 +- .../review_rule_installation_route.ts | 2 +- .../review_rule_upgrade_route.ts | 2 +- .../__mocks__/prebuilt_rule_assets_client.ts | 14 + .../prebuilt_rule_objects_client.ts | 2 +- .../api/create_rule_exceptions/route.ts | 2 +- .../bulk_actions/bulk_actions_response.ts | 2 +- .../api/rules/bulk_patch_rules/route.ts | 2 +- .../api/rules/patch_rule/route.ts | 2 +- .../detection_engine/rule_management/index.ts | 9 +- .../logic/actions/duplicate_rule.ts | 5 +- .../common_params_camel_to_snake.test.ts | 29 + .../common_params_camel_to_snake.ts | 47 + .../convert_alerting_rule_to_rule_response.ts | 26 + ...rt_prebuilt_rule_asset_to_rule_response.ts | 39 + .../convert_rule_response_to_alerting_rule.ts | 210 +++++ .../internal_rule_to_api_response.ts | 61 ++ .../type_specific_camel_to_snake.test.ts | 67 ++ .../type_specific_camel_to_snake.ts | 127 +++ ...on_rules_client.create_custom_rule.test.ts | 4 +- ..._rules_client.create_prebuilt_rule.test.ts | 4 +- ...detection_rules_client.delete_rule.test.ts | 4 +- ...detection_rules_client.import_rule.test.ts | 38 +- .../detection_rules_client.patch_rule.test.ts | 185 ++-- .../detection_rules_client.ts | 143 +-- ...detection_rules_client.update_rule.test.ts | 140 +-- ...rules_client.upgrade_prebuilt_rule.test.ts | 69 +- .../detection_rules_client_interface.ts | 2 +- .../mergers/apply_rule_defaults.ts | 185 ++++ .../mergers/apply_rule_patch.test.ts | 456 +++++++++ .../mergers/apply_rule_patch.ts | 334 +++++++ .../mergers/apply_rule_update.ts | 52 ++ .../rule_source/calculate_is_customized.ts | 33 + .../rule_source/calculate_rule_source.test.ts | 112 +++ .../rule_source/calculate_rule_source.ts | 47 + .../methods/__mocks__/get_rule_by_rule_id.ts | 13 + .../methods/create_custom_rule.ts | 44 - .../methods/create_prebuilt_rule.ts | 49 - .../methods/create_rule.ts | 55 ++ .../methods/delete_rule.ts | 10 +- .../methods/get_rule_by_id.ts | 34 + .../methods/get_rule_by_id_or_rule_id.ts | 36 + .../methods/get_rule_by_rule_id.ts | 38 + .../methods/import_rule.ts | 83 +- .../methods/patch_rule.ts | 77 +- .../methods/update_rule.ts | 73 +- .../methods/upgrade_prebuilt_rule.ts | 102 +- .../detection_rules_client/read_rules.ts | 2 + .../logic/detection_rules_client/utils.ts | 10 +- .../export/get_export_by_object_ids.test.ts | 2 +- .../logic/export/get_export_by_object_ids.ts | 2 +- .../normalization/rule_converters.test.ts | 491 ---------- .../normalization/rule_converters.ts | 869 ------------------ .../rule_management/utils/utils.test.ts | 2 +- .../rule_management/utils/utils.ts | 26 +- .../rule_management/utils/validate.ts | 2 +- .../rule_preview/api/preview_rules/route.ts | 8 +- .../rule_schema/model/rule_schemas.ts | 39 +- .../server/request_context_factory.ts | 9 +- .../create_rule_exceptions_ess.ts | 11 - .../patch_rules_bulk.ts | 10 +- .../patch_rules_ess.ts | 11 +- 62 files changed, 2552 insertions(+), 2040 deletions(-) create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_assets/__mocks__/prebuilt_rule_assets_client.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/common_params_camel_to_snake.test.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/common_params_camel_to_snake.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/convert_alerting_rule_to_rule_response.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/convert_prebuilt_rule_asset_to_rule_response.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/convert_rule_response_to_alerting_rule.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/internal_rule_to_api_response.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/type_specific_camel_to_snake.test.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/type_specific_camel_to_snake.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_defaults.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.test.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_update.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_is_customized.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.test.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/__mocks__/get_rule_by_rule_id.ts delete mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_custom_rule.ts delete mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_prebuilt_rule.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_rule.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/get_rule_by_id.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/get_rule_by_id_or_rule_id.ts create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/get_rule_by_rule_id.ts delete mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/normalization/rule_converters.test.ts delete mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/normalization/rule_converters.ts diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_response_schema.mock.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_response_schema.mock.ts index 1a39d65c1c22f6..c605436576995e 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_response_schema.mock.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_response_schema.mock.ts @@ -6,16 +6,18 @@ */ import { DEFAULT_INDICATOR_SOURCE_PATH } from '../../../../constants'; +import { getListArrayMock } from '../../../../detection_engine/schemas/types/lists.mock'; import type { EqlRule, EsqlRule, MachineLearningRule, + NewTermsRule, QueryRule, SavedQueryRule, SharedResponseProps, ThreatMatchRule, + ThresholdRule, } from './rule_schemas.gen'; -import { getListArrayMock } from '../../../../detection_engine/schemas/types/lists.mock'; export const ANCHOR_DATE = '2020-02-20T03:57:54.037Z'; @@ -238,3 +240,27 @@ export const getRulesEqlSchemaMock = (anchorDate: string = ANCHOR_DATE): EqlRule tiebreaker_field: undefined, }; }; + +export const getRulesNewTermsSchemaMock = (anchorDate: string = ANCHOR_DATE): NewTermsRule => { + return { + ...getResponseBaseParams(anchorDate), + type: 'new_terms', + query: '*', + language: 'kuery', + new_terms_fields: ['user.name'], + history_window_start: 'now-7d', + }; +}; + +export const getRulesThresholdSchemaMock = (anchorDate: string = ANCHOR_DATE): ThresholdRule => { + return { + ...getResponseBaseParams(anchorDate), + type: 'threshold', + language: 'kuery', + query: 'user.name: root or user.name: admin', + threshold: { + field: 'some.field', + value: 4, + }, + }; +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_installation/review_rule_installation_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_installation/review_rule_installation_route.ts index 0b30c9bab47828..ec3ca342bf8c9a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_installation/review_rule_installation_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_installation/review_rule_installation_route.ts @@ -18,7 +18,7 @@ import { createPrebuiltRuleObjectsClient } from '../../logic/rule_objects/prebui import { fetchRuleVersionsTriad } from '../../logic/rule_versions/fetch_rule_versions_triad'; import type { PrebuiltRuleAsset } from '../../model/rule_assets/prebuilt_rule_asset'; import { getVersionBuckets } from '../../model/rule_versions/get_version_buckets'; -import { convertPrebuiltRuleAssetToRuleResponse } from '../../../rule_management/normalization/rule_converters'; +import { convertPrebuiltRuleAssetToRuleResponse } from '../../../rule_management/logic/detection_rules_client/converters/convert_prebuilt_rule_asset_to_rule_response'; import { PREBUILT_RULES_OPERATION_SOCKET_TIMEOUT_MS } from '../../constants'; export const reviewRuleInstallationRoute = (router: SecuritySolutionPluginRouter) => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts index de7db929790dee..f38fcc7953641d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts @@ -27,7 +27,7 @@ import { createPrebuiltRuleAssetsClient } from '../../logic/rule_assets/prebuilt import { createPrebuiltRuleObjectsClient } from '../../logic/rule_objects/prebuilt_rule_objects_client'; import { fetchRuleVersionsTriad } from '../../logic/rule_versions/fetch_rule_versions_triad'; import { getVersionBuckets } from '../../model/rule_versions/get_version_buckets'; -import { convertPrebuiltRuleAssetToRuleResponse } from '../../../rule_management/normalization/rule_converters'; +import { convertPrebuiltRuleAssetToRuleResponse } from '../../../rule_management/logic/detection_rules_client/converters/convert_prebuilt_rule_asset_to_rule_response'; import { PREBUILT_RULES_OPERATION_SOCKET_TIMEOUT_MS } from '../../constants'; export const reviewRuleUpgradeRoute = (router: SecuritySolutionPluginRouter) => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_assets/__mocks__/prebuilt_rule_assets_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_assets/__mocks__/prebuilt_rule_assets_client.ts new file mode 100644 index 00000000000000..0776fefb98656f --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_assets/__mocks__/prebuilt_rule_assets_client.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const createPrebuiltRuleAssetsClient = () => { + return { + fetchLatestAssets: jest.fn(), + fetchLatestVersions: jest.fn(), + fetchAssetsByVersion: jest.fn(), + }; +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/prebuilt_rule_objects_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/prebuilt_rule_objects_client.ts index 7ad4df3cddabd9..1138a48cc39d42 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/prebuilt_rule_objects_client.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/prebuilt_rule_objects_client.ts @@ -13,7 +13,7 @@ import type { import { withSecuritySpan } from '../../../../../utils/with_security_span'; import { findRules } from '../../../rule_management/logic/search/find_rules'; import { getExistingPrepackagedRules } from '../../../rule_management/logic/search/get_existing_prepackaged_rules'; -import { internalRuleToAPIResponse } from '../../../rule_management/normalization/rule_converters'; +import { internalRuleToAPIResponse } from '../../../rule_management/logic/detection_rules_client/converters/internal_rule_to_api_response'; export interface IPrebuiltRuleObjectsClient { fetchAllInstalledRules(): Promise; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts index c8c257770e26a0..060043c14819f7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts @@ -295,7 +295,7 @@ export const createAndAssociateDefaultExceptionList = async ({ : existingRuleExceptionLists; await detectionRulesClient.patchRule({ - nextParams: { + rulePatch: { rule_id: rule.params.ruleId, ...rule.params, exceptions_list: [ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/bulk_actions_response.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/bulk_actions_response.ts index 2bf14ccbf085e7..1b78da705e346b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/bulk_actions_response.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/bulk_actions_response.ts @@ -25,7 +25,7 @@ import type { BulkActionsDryRunErrCode } from '../../../../../../../common/const import type { PromisePoolError } from '../../../../../../utils/promise_pool'; import type { RuleAlertType } from '../../../../rule_schema'; import type { DryRunError } from '../../../logic/bulk_actions/dry_run'; -import { internalRuleToAPIResponse } from '../../../normalization/rule_converters'; +import { internalRuleToAPIResponse } from '../../../logic/detection_rules_client/converters/internal_rule_to_api_response'; const MAX_ERROR_MESSAGE_LENGTH = 1000; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts index 3b16ba5fa47424..da75e4e33362a8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts @@ -86,7 +86,7 @@ export const bulkPatchRulesRoute = (router: SecuritySolutionPluginRouter, logger }); const patchedRule = await detectionRulesClient.patchRule({ - nextParams: payloadRule, + rulePatch: payloadRule, }); return patchedRule; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts index 0e508f43103d61..3886f63c482b0a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts @@ -76,7 +76,7 @@ export const patchRuleRoute = (router: SecuritySolutionPluginRouter) => { }); const patchedRule = await detectionRulesClient.patchRule({ - nextParams: params, + rulePatch: params, }); return response.ok({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/index.ts index 7e379651b2faf4..f2e147ef3154fb 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/index.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/index.ts @@ -7,12 +7,7 @@ export * from './api/register_routes'; -// TODO: https://github.com/elastic/kibana/pull/142950 -// TODO: Revisit and consider moving to the rule_schema subdomain -export { - commonParamsCamelToSnake, - typeSpecificCamelToSnake, - convertCreateAPIToInternalSchema, -} from './normalization/rule_converters'; +export { commonParamsCamelToSnake } from './logic/detection_rules_client/converters/common_params_camel_to_snake'; +export { typeSpecificCamelToSnake } from './logic/detection_rules_client/converters/type_specific_camel_to_snake'; export { transformFromAlertThrottle, transformToNotifyWhen } from './normalization/rule_actions'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/actions/duplicate_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/actions/duplicate_rule.ts index dd22dac3adc77c..1dfa3a9b0e9ad3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/actions/duplicate_rule.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/actions/duplicate_rule.ts @@ -12,7 +12,6 @@ import type { SanitizedRule } from '@kbn/alerting-plugin/common'; import { SERVER_APP_ID } from '../../../../../../common/constants'; import type { InternalRuleCreate, RuleParams } from '../../../rule_schema'; import { transformToActionFrequency } from '../../normalization/rule_actions'; -import { convertImmutableToRuleSource } from '../../normalization/rule_converters'; const DUPLICATE_TITLE = i18n.translate( 'xpack.securitySolution.detectionEngine.rules.cloneRule.duplicateTitle', @@ -47,7 +46,9 @@ export const duplicateRule = async ({ rule }: DuplicateRuleParams): Promise { + test('should convert rule_source params to snake case', () => { + const transformedParams = commonParamsCamelToSnake({ + ...getBaseRuleParams(), + ruleSource: { + type: 'external', + isCustomized: false, + }, + }); + expect(transformedParams).toEqual( + expect.objectContaining({ + rule_source: { + type: 'external', + is_customized: false, + }, + }) + ); + }); +}); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/common_params_camel_to_snake.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/common_params_camel_to_snake.ts new file mode 100644 index 00000000000000..6f98230043e743 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/common_params_camel_to_snake.ts @@ -0,0 +1,47 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { convertObjectKeysToSnakeCase } from '../../../../../../utils/object_case_converters'; +import type { BaseRuleParams } from '../../../../rule_schema'; +import { migrateLegacyInvestigationFields } from '../../../utils/utils'; + +export const commonParamsCamelToSnake = (params: BaseRuleParams) => { + return { + description: params.description, + risk_score: params.riskScore, + severity: params.severity, + building_block_type: params.buildingBlockType, + namespace: params.namespace, + note: params.note, + license: params.license, + output_index: params.outputIndex, + timeline_id: params.timelineId, + timeline_title: params.timelineTitle, + meta: params.meta, + rule_name_override: params.ruleNameOverride, + timestamp_override: params.timestampOverride, + timestamp_override_fallback_disabled: params.timestampOverrideFallbackDisabled, + investigation_fields: migrateLegacyInvestigationFields(params.investigationFields), + author: params.author, + false_positives: params.falsePositives, + from: params.from, + rule_id: params.ruleId, + max_signals: params.maxSignals, + risk_score_mapping: params.riskScoreMapping, + severity_mapping: params.severityMapping, + threat: params.threat, + to: params.to, + references: params.references, + version: params.version, + exceptions_list: params.exceptionsList, + immutable: params.immutable, + rule_source: convertObjectKeysToSnakeCase(params.ruleSource), + related_integrations: params.relatedIntegrations ?? [], + required_fields: params.requiredFields ?? [], + setup: params.setup ?? '', + }; +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/convert_alerting_rule_to_rule_response.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/convert_alerting_rule_to_rule_response.ts new file mode 100644 index 00000000000000..ab7fb237e64f1d --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/convert_alerting_rule_to_rule_response.ts @@ -0,0 +1,26 @@ +/* + * Copyright 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 { SanitizedRule } from '@kbn/alerting-plugin/common'; +import { stringifyZodError } from '@kbn/zod-helpers'; +import { RuleResponse } from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import type { RuleParams } from '../../../../rule_schema'; +import { internalRuleToAPIResponse } from './internal_rule_to_api_response'; +import { RuleResponseValidationError } from '../utils'; + +export function convertAlertingRuleToRuleResponse(rule: SanitizedRule): RuleResponse { + const parseResult = RuleResponse.safeParse(internalRuleToAPIResponse(rule)); + + if (!parseResult.success) { + throw new RuleResponseValidationError({ + message: stringifyZodError(parseResult.error), + ruleId: rule.params.ruleId, + }); + } + + return parseResult.data; +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/convert_prebuilt_rule_asset_to_rule_response.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/convert_prebuilt_rule_asset_to_rule_response.ts new file mode 100644 index 00000000000000..0cb42100d45122 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/convert_prebuilt_rule_asset_to_rule_response.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { v4 as uuidv4 } from 'uuid'; +import { RuleResponse } from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import { addEcsToRequiredFields } from '../../../utils/utils'; +import type { PrebuiltRuleAsset } from '../../../../prebuilt_rules'; +import { RULE_DEFAULTS } from '../mergers/apply_rule_defaults'; + +export const convertPrebuiltRuleAssetToRuleResponse = ( + prebuiltRuleAsset: PrebuiltRuleAsset +): RuleResponse => { + const immutable = true; + + const ruleResponseSpecificFields = { + id: uuidv4(), + updated_at: new Date().toISOString(), + updated_by: '', + created_at: new Date().toISOString(), + created_by: '', + immutable, + rule_source: { + type: 'external', + is_customized: false, + }, + revision: 1, + }; + + return RuleResponse.parse({ + ...RULE_DEFAULTS, + ...prebuiltRuleAsset, + required_fields: addEcsToRequiredFields(prebuiltRuleAsset.required_fields), + ...ruleResponseSpecificFields, + }); +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/convert_rule_response_to_alerting_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/convert_rule_response_to_alerting_rule.ts new file mode 100644 index 00000000000000..60a41211a66c56 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/convert_rule_response_to_alerting_rule.ts @@ -0,0 +1,210 @@ +/* + * Copyright 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 { UpdateRuleData } from '@kbn/alerting-plugin/server/application/rule/methods/update'; +import type { + RuleResponse, + TypeSpecificCreateProps, +} from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import { + transformRuleToAlertAction, + transformRuleToAlertResponseAction, +} from '../../../../../../../common/detection_engine/transform_actions'; +import { + normalizeMachineLearningJobIds, + normalizeThresholdObject, +} from '../../../../../../../common/detection_engine/utils'; +import { assertUnreachable } from '../../../../../../../common/utility_types'; +import { convertObjectKeysToCamelCase } from '../../../../../../utils/object_case_converters'; +import type { RuleParams, TypeSpecificRuleParams } from '../../../../rule_schema'; +import { transformToActionFrequency } from '../../../normalization/rule_actions'; +import { addEcsToRequiredFields } from '../../../utils/utils'; + +/** + * These are the fields that are added to the rule response that are not part of the rule params + */ +type RuntimeFields = + | 'id' + | 'created_at' + | 'updated_at' + | 'created_by' + | 'updated_by' + | 'revision' + | 'execution_summary'; + +export const convertRuleResponseToAlertingRule = ( + rule: Omit +): UpdateRuleData => { + const alertActions = rule.actions.map((action) => transformRuleToAlertAction(action)); + const actions = transformToActionFrequency(alertActions, rule.throttle); + + // Because of Omit Typescript doesn't recognize + // that rule is assignable to TypeSpecificCreateProps despite omitted fields + // are not part of type specific props. So we need to cast here. + const typeSpecificParams = typeSpecificSnakeToCamel(rule as TypeSpecificCreateProps); + + return { + name: rule.name, + tags: rule.tags, + params: { + author: rule.author, + buildingBlockType: rule.building_block_type, + description: rule.description, + ruleId: rule.rule_id, + falsePositives: rule.false_positives, + from: rule.from, + investigationFields: rule.investigation_fields, + immutable: rule.immutable, + ruleSource: convertObjectKeysToCamelCase(rule.rule_source), + license: rule.license, + outputIndex: rule.output_index ?? '', + timelineId: rule.timeline_id, + timelineTitle: rule.timeline_title, + meta: rule.meta, + maxSignals: rule.max_signals, + relatedIntegrations: rule.related_integrations, + requiredFields: addEcsToRequiredFields(rule.required_fields), + riskScore: rule.risk_score, + riskScoreMapping: rule.risk_score_mapping, + ruleNameOverride: rule.rule_name_override, + setup: rule.setup, + severity: rule.severity, + severityMapping: rule.severity_mapping, + threat: rule.threat, + timestampOverride: rule.timestamp_override, + timestampOverrideFallbackDisabled: rule.timestamp_override_fallback_disabled, + to: rule.to, + references: rule.references, + namespace: rule.namespace, + note: rule.note, + version: rule.version, + exceptionsList: rule.exceptions_list, + ...typeSpecificParams, + }, + schedule: { interval: rule.interval }, + actions, + }; +}; + +// Converts params from the snake case API format to the internal camel case format AND applies default values where needed. +// Notice that params.language is possibly undefined for most rule types in the API but we default it to kuery to match +// the legacy API behavior +const typeSpecificSnakeToCamel = (params: TypeSpecificCreateProps): TypeSpecificRuleParams => { + switch (params.type) { + case 'eql': { + return { + type: params.type, + language: params.language, + index: params.index, + dataViewId: params.data_view_id, + query: params.query, + filters: params.filters, + timestampField: params.timestamp_field, + eventCategoryOverride: params.event_category_override, + tiebreakerField: params.tiebreaker_field, + alertSuppression: convertObjectKeysToCamelCase(params.alert_suppression), + }; + } + case 'esql': { + return { + type: params.type, + language: params.language, + query: params.query, + alertSuppression: convertObjectKeysToCamelCase(params.alert_suppression), + }; + } + case 'threat_match': { + return { + type: params.type, + language: params.language ?? 'kuery', + index: params.index, + dataViewId: params.data_view_id, + query: params.query, + filters: params.filters, + savedId: params.saved_id, + threatFilters: params.threat_filters, + threatQuery: params.threat_query, + threatMapping: params.threat_mapping, + threatLanguage: params.threat_language, + threatIndex: params.threat_index, + threatIndicatorPath: params.threat_indicator_path, + concurrentSearches: params.concurrent_searches, + itemsPerSearch: params.items_per_search, + alertSuppression: convertObjectKeysToCamelCase(params.alert_suppression), + }; + } + case 'query': { + return { + type: params.type, + language: params.language ?? 'kuery', + index: params.index, + dataViewId: params.data_view_id, + query: params.query ?? '', + filters: params.filters, + savedId: params.saved_id, + responseActions: params.response_actions?.map((rule) => + transformRuleToAlertResponseAction(rule) + ), + alertSuppression: convertObjectKeysToCamelCase(params.alert_suppression), + }; + } + case 'saved_query': { + return { + type: params.type, + language: params.language ?? 'kuery', + index: params.index, + query: params.query, + filters: params.filters, + savedId: params.saved_id, + dataViewId: params.data_view_id, + responseActions: params.response_actions?.map((rule) => + transformRuleToAlertResponseAction(rule) + ), + alertSuppression: convertObjectKeysToCamelCase(params.alert_suppression), + }; + } + case 'threshold': { + return { + type: params.type, + language: params.language ?? 'kuery', + index: params.index, + dataViewId: params.data_view_id, + query: params.query, + filters: params.filters, + savedId: params.saved_id, + threshold: normalizeThresholdObject(params.threshold), + alertSuppression: params.alert_suppression?.duration + ? { duration: params.alert_suppression.duration } + : undefined, + }; + } + case 'machine_learning': { + return { + type: params.type, + anomalyThreshold: params.anomaly_threshold, + machineLearningJobId: normalizeMachineLearningJobIds(params.machine_learning_job_id), + alertSuppression: convertObjectKeysToCamelCase(params.alert_suppression), + }; + } + case 'new_terms': { + return { + type: params.type, + query: params.query, + newTermsFields: params.new_terms_fields, + historyWindowStart: params.history_window_start, + index: params.index, + filters: params.filters, + language: params.language ?? 'kuery', + dataViewId: params.data_view_id, + alertSuppression: convertObjectKeysToCamelCase(params.alert_suppression), + }; + } + default: { + return assertUnreachable(params); + } + } +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/internal_rule_to_api_response.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/internal_rule_to_api_response.ts new file mode 100644 index 00000000000000..452f59df8dcf93 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/internal_rule_to_api_response.ts @@ -0,0 +1,61 @@ +/* + * Copyright 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 { ResolvedSanitizedRule, SanitizedRule } from '@kbn/alerting-plugin/common'; +import type { RequiredOptional } from '@kbn/zod-helpers'; +import type { RuleResponse } from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import { transformAlertToRuleAction } from '../../../../../../../common/detection_engine/transform_actions'; +import { createRuleExecutionSummary } from '../../../../rule_monitoring'; +import type { RuleParams } from '../../../../rule_schema'; +import { + transformFromAlertThrottle, + transformToActionFrequency, +} from '../../../normalization/rule_actions'; +import { typeSpecificCamelToSnake } from './type_specific_camel_to_snake'; +import { commonParamsCamelToSnake } from './common_params_camel_to_snake'; + +export const internalRuleToAPIResponse = ( + rule: SanitizedRule | ResolvedSanitizedRule +): RequiredOptional => { + const executionSummary = createRuleExecutionSummary(rule); + + const isResolvedRule = (obj: unknown): obj is ResolvedSanitizedRule => { + const outcome = (obj as ResolvedSanitizedRule).outcome; + return outcome != null && outcome !== 'exactMatch'; + }; + + const alertActions = rule.actions.map(transformAlertToRuleAction); + const throttle = transformFromAlertThrottle(rule); + const actions = transformToActionFrequency(alertActions, throttle); + + return { + // saved object properties + outcome: isResolvedRule(rule) ? rule.outcome : undefined, + alias_target_id: isResolvedRule(rule) ? rule.alias_target_id : undefined, + alias_purpose: isResolvedRule(rule) ? rule.alias_purpose : undefined, + // Alerting framework params + id: rule.id, + updated_at: rule.updatedAt.toISOString(), + updated_by: rule.updatedBy ?? 'elastic', + created_at: rule.createdAt.toISOString(), + created_by: rule.createdBy ?? 'elastic', + name: rule.name, + tags: rule.tags, + interval: rule.schedule.interval, + enabled: rule.enabled, + revision: rule.revision, + // Security solution shared rule params + ...commonParamsCamelToSnake(rule.params), + // Type specific security solution rule params + ...typeSpecificCamelToSnake(rule.params), + // Actions + throttle: undefined, + actions, + // Execution summary + execution_summary: executionSummary ?? undefined, + }; +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/type_specific_camel_to_snake.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/type_specific_camel_to_snake.test.ts new file mode 100644 index 00000000000000..08e6d3cc64b0a1 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/type_specific_camel_to_snake.test.ts @@ -0,0 +1,67 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { + AlertSuppressionDuration, + AlertSuppressionMissingFieldsStrategy, +} from '../../../../../../../common/api/detection_engine'; +import { getEqlRuleParams } from '../../../../rule_schema/mocks'; +import { typeSpecificCamelToSnake } from './type_specific_camel_to_snake'; + +describe('typeSpecificCamelToSnake', () => { + describe('EQL', () => { + test('should accept EQL params when existing rule type is EQL', () => { + const params = { + timestampField: 'event.created', + eventCategoryOverride: 'event.not_category', + tiebreakerField: 'event.created', + }; + const eqlRule = { ...getEqlRuleParams(), ...params }; + const transformedParams = typeSpecificCamelToSnake(eqlRule); + expect(transformedParams).toEqual( + expect.objectContaining({ + timestamp_field: 'event.created', + event_category_override: 'event.not_category', + tiebreaker_field: 'event.created', + }) + ); + }); + + test('should accept EQL params with suppression in camel case and convert to snake case when rule type is EQL', () => { + const params = { + timestampField: 'event.created', + eventCategoryOverride: 'event.not_category', + tiebreakerField: 'event.created', + alertSuppression: { + groupBy: ['event.type'], + duration: { + value: 10, + unit: 'm', + } as AlertSuppressionDuration, + missingFieldsStrategy: 'suppress' as AlertSuppressionMissingFieldsStrategy, + }, + }; + const eqlRule = { ...getEqlRuleParams(), ...params }; + const transformedParams = typeSpecificCamelToSnake(eqlRule); + expect(transformedParams).toEqual( + expect.objectContaining({ + timestamp_field: 'event.created', + event_category_override: 'event.not_category', + tiebreaker_field: 'event.created', + alert_suppression: { + group_by: ['event.type'], + duration: { + value: 10, + unit: 'm', + } as AlertSuppressionDuration, + missing_fields_strategy: 'suppress', + }, + }) + ); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/type_specific_camel_to_snake.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/type_specific_camel_to_snake.ts new file mode 100644 index 00000000000000..0808d1921e9bf8 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/converters/type_specific_camel_to_snake.ts @@ -0,0 +1,127 @@ +/* + * Copyright 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 { RequiredOptional } from '@kbn/zod-helpers'; +import type { TypeSpecificResponse } from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import { transformAlertToRuleResponseAction } from '../../../../../../../common/detection_engine/transform_actions'; +import { assertUnreachable } from '../../../../../../../common/utility_types'; +import { convertObjectKeysToSnakeCase } from '../../../../../../utils/object_case_converters'; +import type { TypeSpecificRuleParams } from '../../../../rule_schema'; + +export const typeSpecificCamelToSnake = ( + params: TypeSpecificRuleParams +): RequiredOptional => { + switch (params.type) { + case 'eql': { + return { + type: params.type, + language: params.language, + index: params.index, + data_view_id: params.dataViewId, + query: params.query, + filters: params.filters, + timestamp_field: params.timestampField, + event_category_override: params.eventCategoryOverride, + tiebreaker_field: params.tiebreakerField, + alert_suppression: convertObjectKeysToSnakeCase(params.alertSuppression), + }; + } + case 'esql': { + return { + type: params.type, + language: params.language, + query: params.query, + alert_suppression: convertObjectKeysToSnakeCase(params.alertSuppression), + }; + } + case 'threat_match': { + return { + type: params.type, + language: params.language, + index: params.index, + data_view_id: params.dataViewId, + query: params.query, + filters: params.filters, + saved_id: params.savedId, + threat_filters: params.threatFilters, + threat_query: params.threatQuery, + threat_mapping: params.threatMapping, + threat_language: params.threatLanguage, + threat_index: params.threatIndex, + threat_indicator_path: params.threatIndicatorPath, + concurrent_searches: params.concurrentSearches, + items_per_search: params.itemsPerSearch, + alert_suppression: convertObjectKeysToSnakeCase(params.alertSuppression), + }; + } + case 'query': { + return { + type: params.type, + language: params.language, + index: params.index, + data_view_id: params.dataViewId, + query: params.query, + filters: params.filters, + saved_id: params.savedId, + response_actions: params.responseActions?.map(transformAlertToRuleResponseAction), + alert_suppression: convertObjectKeysToSnakeCase(params.alertSuppression), + }; + } + case 'saved_query': { + return { + type: params.type, + language: params.language, + index: params.index, + query: params.query, + filters: params.filters, + saved_id: params.savedId, + data_view_id: params.dataViewId, + response_actions: params.responseActions?.map(transformAlertToRuleResponseAction), + alert_suppression: convertObjectKeysToSnakeCase(params.alertSuppression), + }; + } + case 'threshold': { + return { + type: params.type, + language: params.language, + index: params.index, + data_view_id: params.dataViewId, + query: params.query, + filters: params.filters, + saved_id: params.savedId, + threshold: params.threshold, + alert_suppression: params.alertSuppression?.duration + ? { duration: params.alertSuppression?.duration } + : undefined, + }; + } + case 'machine_learning': { + return { + type: params.type, + anomaly_threshold: params.anomalyThreshold, + machine_learning_job_id: params.machineLearningJobId, + alert_suppression: convertObjectKeysToSnakeCase(params.alertSuppression), + }; + } + case 'new_terms': { + return { + type: params.type, + query: params.query, + new_terms_fields: params.newTermsFields, + history_window_start: params.historyWindowStart, + index: params.index, + filters: params.filters, + language: params.language, + data_view_id: params.dataViewId, + alert_suppression: convertObjectKeysToSnakeCase(params.alertSuppression), + }; + } + default: { + return assertUnreachable(params); + } + } +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_custom_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_custom_rule.test.ts index 7aab6640a1b52c..5578854ed95b2c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_custom_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_custom_rule.test.ts @@ -6,6 +6,7 @@ */ import { rulesClientMock } from '@kbn/alerting-plugin/server/mocks'; +import { savedObjectsClientMock } from '@kbn/core/server/mocks'; import { getCreateRulesSchemaMock, @@ -35,7 +36,8 @@ describe('DetectionRulesClient.createCustomRule', () => { rulesClient = rulesClientMock.create(); rulesClient.create.mockResolvedValue(getRuleMock(getQueryRuleParams())); - detectionRulesClient = createDetectionRulesClient(rulesClient, mlAuthz); + const savedObjectsClient = savedObjectsClientMock.create(); + detectionRulesClient = createDetectionRulesClient({ rulesClient, mlAuthz, savedObjectsClient }); }); it('should create a rule with the correct parameters and options', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_prebuilt_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_prebuilt_rule.test.ts index fd3ac991a968fe..f91c577f3b2a0e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_prebuilt_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_prebuilt_rule.test.ts @@ -6,6 +6,7 @@ */ import { rulesClientMock } from '@kbn/alerting-plugin/server/mocks'; +import { savedObjectsClientMock } from '@kbn/core/server/mocks'; import { getCreateRulesSchemaMock, @@ -35,7 +36,8 @@ describe('DetectionRulesClient.createPrebuiltRule', () => { rulesClient = rulesClientMock.create(); rulesClient.create.mockResolvedValue(getRuleMock(getQueryRuleParams())); - detectionRulesClient = createDetectionRulesClient(rulesClient, mlAuthz); + const savedObjectsClient = savedObjectsClientMock.create(); + detectionRulesClient = createDetectionRulesClient({ rulesClient, mlAuthz, savedObjectsClient }); }); it('creates a rule with the correct parameters and options', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.delete_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.delete_rule.test.ts index 37cb8e0aa709e3..166656701f3044 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.delete_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.delete_rule.test.ts @@ -6,6 +6,7 @@ */ import { rulesClientMock } from '@kbn/alerting-plugin/server/mocks'; +import { savedObjectsClientMock } from '@kbn/core/server/mocks'; import { buildMlAuthz } from '../../../../machine_learning/authz'; import { createDetectionRulesClient } from './detection_rules_client'; import type { IDetectionRulesClient } from './detection_rules_client_interface'; @@ -20,7 +21,8 @@ describe('DetectionRulesClient.deleteRule', () => { beforeEach(() => { rulesClient = rulesClientMock.create(); - detectionRulesClient = createDetectionRulesClient(rulesClient, mlAuthz); + const savedObjectsClient = savedObjectsClientMock.create(); + detectionRulesClient = createDetectionRulesClient({ rulesClient, mlAuthz, savedObjectsClient }); }); it('should call rulesClient.delete passing the expected ruleId', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rule.test.ts index 474fecc1865196..fb9b4f7995c905 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rule.test.ts @@ -6,19 +6,23 @@ */ import { rulesClientMock } from '@kbn/alerting-plugin/server/mocks'; -import { readRules } from './read_rules'; -import { getCreateRulesSchemaMock } from '../../../../../../common/api/detection_engine/model/rule_schema/mocks'; -import { getRuleMock } from '../../../routes/__mocks__/request_responses'; -import { getQueryRuleParams } from '../../../rule_schema/mocks'; +import { savedObjectsClientMock } from '@kbn/core/server/mocks'; +import { + getCreateRulesSchemaMock, + getRulesSchemaMock, +} from '../../../../../../common/api/detection_engine/model/rule_schema/mocks'; import { buildMlAuthz } from '../../../../machine_learning/authz'; import { throwAuthzError } from '../../../../machine_learning/validation'; +import { getRuleMock } from '../../../routes/__mocks__/request_responses'; +import { getQueryRuleParams } from '../../../rule_schema/mocks'; import { createDetectionRulesClient } from './detection_rules_client'; import type { IDetectionRulesClient } from './detection_rules_client_interface'; +import { getRuleByRuleId } from './methods/get_rule_by_rule_id'; jest.mock('../../../../machine_learning/authz'); jest.mock('../../../../machine_learning/validation'); -jest.mock('./read_rules'); +jest.mock('./methods/get_rule_by_rule_id'); describe('DetectionRulesClient.importRule', () => { let rulesClient: ReturnType; @@ -34,21 +38,19 @@ describe('DetectionRulesClient.importRule', () => { version: 1, immutable, }; - const existingRule = getRuleMock({ - ...getQueryRuleParams({ - ruleId: ruleToImport.rule_id, - }), - }); + const existingRule = getRulesSchemaMock(); + existingRule.rule_id = ruleToImport.rule_id; beforeEach(() => { rulesClient = rulesClientMock.create(); rulesClient.create.mockResolvedValue(getRuleMock(getQueryRuleParams())); rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); - detectionRulesClient = createDetectionRulesClient(rulesClient, mlAuthz); + const savedObjectsClient = savedObjectsClientMock.create(); + detectionRulesClient = createDetectionRulesClient({ rulesClient, mlAuthz, savedObjectsClient }); }); it('calls rulesClient.create with the correct parameters when rule_id does not match an installed rule', async () => { - (readRules as jest.Mock).mockResolvedValue(null); + (getRuleByRuleId as jest.Mock).mockResolvedValueOnce(null); await detectionRulesClient.importRule({ ruleToImport, overwriteRules: true, @@ -90,7 +92,8 @@ describe('DetectionRulesClient.importRule', () => { describe('when rule_id matches an installed rule', () => { it('calls rulesClient.update with the correct parameters when overwriteRules is true', async () => { - (readRules as jest.Mock).mockResolvedValue(existingRule); + (getRuleByRuleId as jest.Mock).mockResolvedValueOnce(existingRule); + await detectionRulesClient.importRule({ ruleToImport, overwriteRules: true, @@ -122,12 +125,9 @@ describe('DetectionRulesClient.importRule', () => { it('ensures overwritten rule DOES NOT preserve fields missed in the imported rule when "overwriteRules" is "true" and matching rule found', async () => { const existingRuleWithTimestampOverride = { ...existingRule, - params: { - ...existingRule.params, - timestamp_override: '2020-01-01T00:00:00Z', - }, + timestamp_override: '2020-01-01T00:00:00Z', }; - (readRules as jest.Mock).mockResolvedValue(existingRuleWithTimestampOverride); + (getRuleByRuleId as jest.Mock).mockResolvedValue(existingRuleWithTimestampOverride); await detectionRulesClient.importRule({ ruleToImport: { @@ -151,7 +151,7 @@ describe('DetectionRulesClient.importRule', () => { }); it('rejects when overwriteRules is false', async () => { - (readRules as jest.Mock).mockResolvedValue(existingRule); + (getRuleByRuleId as jest.Mock).mockResolvedValue(existingRule); await expect( detectionRulesClient.importRule({ ruleToImport, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.patch_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.patch_rule.test.ts index 7f1c2198886366..d17b12415642ae 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.patch_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.patch_rule.test.ts @@ -12,17 +12,20 @@ import { getMlRuleParams, getQueryRuleParams } from '../../../rule_schema/mocks' import { getCreateMachineLearningRulesSchemaMock, getCreateRulesSchemaMock, + getRulesMlSchemaMock, + getRulesSchemaMock, } from '../../../../../../common/api/detection_engine/model/rule_schema/mocks'; -import { readRules } from './read_rules'; +import { getRuleByRuleId } from './methods/get_rule_by_rule_id'; import { buildMlAuthz } from '../../../../machine_learning/authz'; import { throwAuthzError } from '../../../../machine_learning/validation'; import { createDetectionRulesClient } from './detection_rules_client'; import type { IDetectionRulesClient } from './detection_rules_client_interface'; +import { savedObjectsClientMock } from '@kbn/core/server/mocks'; jest.mock('../../../../machine_learning/authz'); jest.mock('../../../../machine_learning/validation'); -jest.mock('./read_rules'); +jest.mock('./methods/get_rule_by_rule_id'); describe('DetectionRulesClient.patchRule', () => { let rulesClient: ReturnType; @@ -32,97 +35,78 @@ describe('DetectionRulesClient.patchRule', () => { beforeEach(() => { rulesClient = rulesClientMock.create(); - detectionRulesClient = createDetectionRulesClient(rulesClient, mlAuthz); + const savedObjectsClient = savedObjectsClientMock.create(); + detectionRulesClient = createDetectionRulesClient({ rulesClient, mlAuthz, savedObjectsClient }); }); it('calls the rulesClient with expected params', async () => { - const nextParams = getCreateRulesSchemaMock(); - const existingRule = getRuleMock(getQueryRuleParams()); - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); + // Mock the existing rule + const existingRule = getRulesSchemaMock(); + (getRuleByRuleId as jest.Mock).mockResolvedValueOnce(existingRule); + + // Mock the rule update + const rulePatch = getCreateRulesSchemaMock('query-rule-id'); + rulePatch.name = 'new name'; + rulePatch.description = 'new description'; + + // Mock the rule returned after update; not used for this test directly but + // needed so that the patchRule method does not throw rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); - await detectionRulesClient.patchRule({ nextParams }); + await detectionRulesClient.patchRule({ rulePatch }); expect(rulesClient.update).toHaveBeenCalledWith( expect.objectContaining({ data: expect.objectContaining({ - name: nextParams.name, + name: rulePatch.name, params: expect.objectContaining({ - ruleId: nextParams.rule_id, - description: nextParams.description, + ruleId: rulePatch.rule_id, + description: rulePatch.description, }), }), }) ); }); - it('returns rule enabled: true if the nexParams have enabled: true', async () => { - const nextParams = { ...getCreateRulesSchemaMock(), enabled: true }; - const existingRule = getRuleMock(getQueryRuleParams()); - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); - rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); + it('enables the rule if the nexParams have enabled: true', async () => { + // Mock the existing rule + const existingRule = getRulesSchemaMock(); + existingRule.enabled = false; + (getRuleByRuleId as jest.Mock).mockResolvedValueOnce(existingRule); - const rule = await detectionRulesClient.patchRule({ nextParams }); + // Mock the rule update + const rulePatch = { ...getCreateRulesSchemaMock(), enabled: true }; - expect(rule.enabled).toBe(true); - }); + // Mock the rule returned after update; not used for this test directly but + // needed so that the patchRule method does not throw + rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); - it('calls the rulesClient with legacy ML params', async () => { - const nextParams = getCreateMachineLearningRulesSchemaMock(); - const existingRule = getRuleMock(getMlRuleParams()); - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); - rulesClient.update.mockResolvedValue(getRuleMock(getMlRuleParams())); + const rule = await detectionRulesClient.patchRule({ rulePatch }); - await detectionRulesClient.patchRule({ nextParams }); - expect(rulesClient.update).toHaveBeenCalledWith( + expect(rule.enabled).toBe(true); + expect(rulesClient.enable).toHaveBeenCalledWith( expect.objectContaining({ - data: expect.objectContaining({ - params: expect.objectContaining({ - anomalyThreshold: 58, - machineLearningJobId: ['typical-ml-job-id'], - }), - }), + id: existingRule.id, }) ); }); - it('calls the rulesClient with new ML params', async () => { - const nextParams = { - ...getCreateMachineLearningRulesSchemaMock(), - machine_learning_job_id: ['new_job_1', 'new_job_2'], - }; - const existingRule = getRuleMock(getMlRuleParams()); - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); - rulesClient.update.mockResolvedValue(getRuleMock(getMlRuleParams())); - - await detectionRulesClient.patchRule({ nextParams }); + it('disables the rule if the nexParams have enabled: false', async () => { + // Mock the existing rule + const existingRule = getRulesSchemaMock(); + existingRule.enabled = true; + (getRuleByRuleId as jest.Mock).mockResolvedValueOnce(existingRule); - expect(rulesClient.update).toHaveBeenCalledWith( - expect.objectContaining({ - data: expect.objectContaining({ - params: expect.objectContaining({ - anomalyThreshold: 58, - machineLearningJobId: ['new_job_1', 'new_job_2'], - }), - }), - }) - ); - }); + // Mock the rule update + const rulePatch = { ...getCreateRulesSchemaMock(), enabled: false }; - it('should call rulesClient.disable if the rule was enabled and enabled is false', async () => { - const nextParams = { - ...getCreateRulesSchemaMock(), - enabled: false, - }; - const existingRule = { - ...getRuleMock(getQueryRuleParams()), - enabled: true, - }; - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); + // Mock the rule returned after update; not used for this test directly but + // needed so that the patchRule method does not throw rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); - await detectionRulesClient.patchRule({ nextParams }); + const rule = await detectionRulesClient.patchRule({ rulePatch }); + expect(rule.enabled).toBe(false); expect(rulesClient.disable).toHaveBeenCalledWith( expect.objectContaining({ id: existingRule.id, @@ -130,23 +114,29 @@ describe('DetectionRulesClient.patchRule', () => { ); }); - it('should call rulesClient.enable if the rule was disabled and enabled is true', async () => { - const nextParams = { - ...getCreateRulesSchemaMock(), - enabled: true, - }; - const existingRule = { - ...getRuleMock(getQueryRuleParams()), - enabled: false, - }; - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); - rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); + it('calls the rulesClient with new ML params', async () => { + // Mock the existing rule + const existingRule = getRulesMlSchemaMock(); + (getRuleByRuleId as jest.Mock).mockResolvedValueOnce(existingRule); - await detectionRulesClient.patchRule({ nextParams }); + // Mock the rule update + const rulePatch = getCreateMachineLearningRulesSchemaMock(); + rulePatch.anomaly_threshold = 42; + rulePatch.machine_learning_job_id = ['new-job-id']; - expect(rulesClient.enable).toHaveBeenCalledWith( + // Mock the rule returned after update; not used for this test directly but + // needed so that the patchRule method does not throw + rulesClient.update.mockResolvedValue(getRuleMock(getMlRuleParams())); + + await detectionRulesClient.patchRule({ rulePatch }); + expect(rulesClient.update).toHaveBeenCalledWith( expect.objectContaining({ - id: existingRule.id, + data: expect.objectContaining({ + params: expect.objectContaining({ + anomalyThreshold: rulePatch.anomaly_threshold, + machineLearningJobId: rulePatch.machine_learning_job_id, + }), + }), }) ); }); @@ -156,21 +146,23 @@ describe('DetectionRulesClient.patchRule', () => { throw new Error('mocked MLAuth error'); }); - const nextParams = { - ...getCreateRulesSchemaMock(), - enabled: true, - }; + const rulePatch = getCreateRulesSchemaMock(); - await expect(detectionRulesClient.patchRule({ nextParams })).rejects.toThrow( + await expect(detectionRulesClient.patchRule({ rulePatch })).rejects.toThrow( 'mocked MLAuth error' ); expect(rulesClient.create).not.toHaveBeenCalled(); }); - describe('regression tests', () => { + describe('actions', () => { it("updates the rule's actions if provided", async () => { - const nextParams = { + // Mock the existing rule + const existingRule = getRulesSchemaMock(); + (getRuleByRuleId as jest.Mock).mockResolvedValueOnce(existingRule); + + // Mock the rule update + const rulePatch = { ...getCreateRulesSchemaMock(), actions: [ { @@ -183,11 +175,12 @@ describe('DetectionRulesClient.patchRule', () => { }, ], }; - const existingRule = getRuleMock(getQueryRuleParams()); - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); + + // Mock the rule returned after update; not used for this test directly but + // needed so that the patchRule method does not throw rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); - await detectionRulesClient.patchRule({ nextParams }); + await detectionRulesClient.patchRule({ rulePatch }); expect(rulesClient.update).toHaveBeenCalledWith( expect.objectContaining({ @@ -209,12 +202,12 @@ describe('DetectionRulesClient.patchRule', () => { }); it('does not update actions if none are specified', async () => { - const nextParams = getCreateRulesSchemaMock(); - delete nextParams.actions; - const existingRule = getRuleMock(getQueryRuleParams()); + // Mock the existing rule + const existingRule = getRulesSchemaMock(); + (getRuleByRuleId as jest.Mock).mockResolvedValueOnce(existingRule); existingRule.actions = [ { - actionTypeId: '.slack', + action_type_id: '.slack', id: '2933e581-d81c-4fe3-88fe-c57c6b8a5bfd', params: { message: 'Rule {{context.rule.name}} generated {{state.signals_count}} signals', @@ -222,10 +215,16 @@ describe('DetectionRulesClient.patchRule', () => { group: 'default', }, ]; - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); + + // Mock the rule update + const rulePatch = getCreateRulesSchemaMock(); + delete rulePatch.actions; + + // Mock the rule returned after update; not used for this test directly but + // needed so that the patchRule method does not throw rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); - await detectionRulesClient.patchRule({ nextParams }); + await detectionRulesClient.patchRule({ rulePatch }); expect(rulesClient.update).toHaveBeenCalledWith( expect.objectContaining({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.ts index ce6043a4209074..dfcfc8f7fa3930 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.ts @@ -6,73 +6,110 @@ */ import type { RulesClient } from '@kbn/alerting-plugin/server'; -import type { MlAuthz } from '../../../../machine_learning/authz'; - +import type { SavedObjectsClientContract } from '@kbn/core/server'; import type { RuleResponse } from '../../../../../../common/api/detection_engine/model/rule_schema'; +import { withSecuritySpan } from '../../../../../utils/with_security_span'; +import type { MlAuthz } from '../../../../machine_learning/authz'; +import { createPrebuiltRuleAssetsClient } from '../../../prebuilt_rules/logic/rule_assets/prebuilt_rule_assets_client'; import type { - IDetectionRulesClient, CreateCustomRuleArgs, CreatePrebuiltRuleArgs, - UpdateRuleArgs, - PatchRuleArgs, DeleteRuleArgs, - UpgradePrebuiltRuleArgs, + IDetectionRulesClient, ImportRuleArgs, + PatchRuleArgs, + UpdateRuleArgs, + UpgradePrebuiltRuleArgs, } from './detection_rules_client_interface'; - -import { createCustomRule } from './methods/create_custom_rule'; -import { createPrebuiltRule } from './methods/create_prebuilt_rule'; -import { updateRule } from './methods/update_rule'; -import { patchRule } from './methods/patch_rule'; +import { createRule } from './methods/create_rule'; import { deleteRule } from './methods/delete_rule'; -import { upgradePrebuiltRule } from './methods/upgrade_prebuilt_rule'; import { importRule } from './methods/import_rule'; +import { patchRule } from './methods/patch_rule'; +import { updateRule } from './methods/update_rule'; +import { upgradePrebuiltRule } from './methods/upgrade_prebuilt_rule'; -import { withSecuritySpan } from '../../../../../utils/with_security_span'; +interface DetectionRulesClientParams { + rulesClient: RulesClient; + savedObjectsClient: SavedObjectsClientContract; + mlAuthz: MlAuthz; +} + +export const createDetectionRulesClient = ({ + rulesClient, + mlAuthz, + savedObjectsClient, +}: DetectionRulesClientParams): IDetectionRulesClient => { + const prebuiltRuleAssetClient = createPrebuiltRuleAssetsClient(savedObjectsClient); -export const createDetectionRulesClient = ( - rulesClient: RulesClient, - mlAuthz: MlAuthz -): IDetectionRulesClient => ({ - async createCustomRule(args: CreateCustomRuleArgs): Promise { - return withSecuritySpan('DetectionRulesClient.createCustomRule', async () => { - return createCustomRule(rulesClient, args, mlAuthz); - }); - }, + return { + async createCustomRule(args: CreateCustomRuleArgs): Promise { + return withSecuritySpan('DetectionRulesClient.createCustomRule', async () => { + return createRule({ + rulesClient, + rule: { + ...args.params, + // For backwards compatibility, we default to true if not provided. + // The default enabled value is false for prebuilt rules, and true + // for custom rules. + enabled: args.params.enabled ?? true, + immutable: false, + }, + mlAuthz, + }); + }); + }, - async createPrebuiltRule(args: CreatePrebuiltRuleArgs): Promise { - return withSecuritySpan('DetectionRulesClient.createPrebuiltRule', async () => { - return createPrebuiltRule(rulesClient, args, mlAuthz); - }); - }, + async createPrebuiltRule(args: CreatePrebuiltRuleArgs): Promise { + return withSecuritySpan('DetectionRulesClient.createPrebuiltRule', async () => { + return createRule({ + rulesClient, + rule: { + ...args.params, + immutable: true, + }, + mlAuthz, + }); + }); + }, - async updateRule(args: UpdateRuleArgs): Promise { - return withSecuritySpan('DetectionRulesClient.updateRule', async () => { - return updateRule(rulesClient, args, mlAuthz); - }); - }, + async updateRule({ ruleUpdate }: UpdateRuleArgs): Promise { + return withSecuritySpan('DetectionRulesClient.updateRule', async () => { + return updateRule({ rulesClient, prebuiltRuleAssetClient, mlAuthz, ruleUpdate }); + }); + }, - async patchRule(args: PatchRuleArgs): Promise { - return withSecuritySpan('DetectionRulesClient.patchRule', async () => { - return patchRule(rulesClient, args, mlAuthz); - }); - }, + async patchRule({ rulePatch }: PatchRuleArgs): Promise { + return withSecuritySpan('DetectionRulesClient.patchRule', async () => { + return patchRule({ rulesClient, prebuiltRuleAssetClient, mlAuthz, rulePatch }); + }); + }, - async deleteRule(args: DeleteRuleArgs): Promise { - return withSecuritySpan('DetectionRulesClient.deleteRule', async () => { - return deleteRule(rulesClient, args); - }); - }, + async deleteRule({ ruleId }: DeleteRuleArgs): Promise { + return withSecuritySpan('DetectionRulesClient.deleteRule', async () => { + return deleteRule({ rulesClient, ruleId }); + }); + }, - async upgradePrebuiltRule(args: UpgradePrebuiltRuleArgs): Promise { - return withSecuritySpan('DetectionRulesClient.upgradePrebuiltRule', async () => { - return upgradePrebuiltRule(rulesClient, args, mlAuthz); - }); - }, + async upgradePrebuiltRule({ ruleAsset }: UpgradePrebuiltRuleArgs): Promise { + return withSecuritySpan('DetectionRulesClient.upgradePrebuiltRule', async () => { + return upgradePrebuiltRule({ + rulesClient, + ruleAsset, + mlAuthz, + prebuiltRuleAssetClient, + }); + }); + }, - async importRule(args: ImportRuleArgs): Promise { - return withSecuritySpan('DetectionRulesClient.importRule', async () => { - return importRule(rulesClient, args, mlAuthz); - }); - }, -}); + async importRule(args: ImportRuleArgs): Promise { + return withSecuritySpan('DetectionRulesClient.importRule', async () => { + return importRule({ + rulesClient, + importRulePayload: args, + mlAuthz, + prebuiltRuleAssetClient, + }); + }); + }, + }; +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.update_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.update_rule.test.ts index 671460b046fea0..db9d122e7d9127 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.update_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.update_rule.test.ts @@ -12,17 +12,20 @@ import { getMlRuleParams, getQueryRuleParams } from '../../../rule_schema/mocks' import { getCreateMachineLearningRulesSchemaMock, getCreateRulesSchemaMock, + getRulesMlSchemaMock, + getRulesSchemaMock, } from '../../../../../../common/api/detection_engine/model/rule_schema/mocks'; -import { readRules } from './read_rules'; +import { getRuleByRuleId } from './methods/get_rule_by_rule_id'; import { buildMlAuthz } from '../../../../machine_learning/authz'; import { throwAuthzError } from '../../../../machine_learning/validation'; import { createDetectionRulesClient } from './detection_rules_client'; import type { IDetectionRulesClient } from './detection_rules_client_interface'; +import { savedObjectsClientMock } from '@kbn/core/server/mocks'; jest.mock('../../../../machine_learning/authz'); jest.mock('../../../../machine_learning/validation'); -jest.mock('./read_rules'); +jest.mock('./methods/get_rule_by_rule_id'); describe('DetectionRulesClient.updateRule', () => { let rulesClient: ReturnType; @@ -32,13 +35,22 @@ describe('DetectionRulesClient.updateRule', () => { beforeEach(() => { rulesClient = rulesClientMock.create(); - detectionRulesClient = createDetectionRulesClient(rulesClient, mlAuthz); + const savedObjectsClient = savedObjectsClientMock.create(); + detectionRulesClient = createDetectionRulesClient({ rulesClient, mlAuthz, savedObjectsClient }); }); it('calls the rulesClient with expected params', async () => { - const ruleUpdate = getCreateRulesSchemaMock(); - const existingRule = getRuleMock(getQueryRuleParams()); - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); + // Mock the existing rule + const existingRule = getRulesSchemaMock(); + (getRuleByRuleId as jest.Mock).mockResolvedValueOnce(existingRule); + + // Mock the rule update + const ruleUpdate = getCreateRulesSchemaMock('query-rule-id'); + ruleUpdate.name = 'new name'; + ruleUpdate.description = 'new description'; + + // Mock the rule returned after update; not used for this test directly but + // needed so that the patchRule method does not throw rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); await detectionRulesClient.updateRule({ ruleUpdate }); @@ -56,21 +68,18 @@ describe('DetectionRulesClient.updateRule', () => { ); }); - it('returns rule enabled: true if the nexParams have enabled: true', async () => { - const ruleUpdate = { ...getCreateRulesSchemaMock(), enabled: true }; - const existingRule = getRuleMock(getQueryRuleParams()); - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); - rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); - - const rule = await detectionRulesClient.updateRule({ ruleUpdate }); - - expect(rule.enabled).toBe(true); - }); + it('calls the rulesClient with new ML params', async () => { + // Mock the existing rule + const existingRule = getRulesMlSchemaMock(); + (getRuleByRuleId as jest.Mock).mockResolvedValueOnce(existingRule); - it('calls the rulesClient with legacy ML params', async () => { + // Mock the rule update const ruleUpdate = getCreateMachineLearningRulesSchemaMock(); - const existingRule = getRuleMock(getMlRuleParams()); - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); + ruleUpdate.anomaly_threshold = 42; + ruleUpdate.machine_learning_job_id = ['new-job-id']; + + // Mock the rule returned after update; not used for this test directly but + // needed so that the patchRule method does not throw rulesClient.update.mockResolvedValue(getRuleMock(getMlRuleParams())); await detectionRulesClient.updateRule({ ruleUpdate }); @@ -79,48 +88,26 @@ describe('DetectionRulesClient.updateRule', () => { expect.objectContaining({ data: expect.objectContaining({ params: expect.objectContaining({ - anomalyThreshold: 58, - machineLearningJobId: ['typical-ml-job-id'], + anomalyThreshold: ruleUpdate.anomaly_threshold, + machineLearningJobId: ruleUpdate.machine_learning_job_id, }), }), }) ); }); - it('calls the rulesClient with new ML params', async () => { - const ruleUpdate = { - ...getCreateMachineLearningRulesSchemaMock(), - machine_learning_job_id: ['new_job_1', 'new_job_2'], - }; - const existingRule = getRuleMock(getMlRuleParams()); - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); - rulesClient.update.mockResolvedValue(getRuleMock(getMlRuleParams())); + it('disables rule if the rule was enabled and enabled is false', async () => { + // Mock the existing rule + const existingRule = getRulesSchemaMock(); + existingRule.enabled = true; + (getRuleByRuleId as jest.Mock).mockResolvedValueOnce(existingRule); - await detectionRulesClient.updateRule({ ruleUpdate }); + // Mock the rule update + const ruleUpdate = { ...getCreateRulesSchemaMock(), enabled: false }; - expect(rulesClient.update).toHaveBeenCalledWith( - expect.objectContaining({ - data: expect.objectContaining({ - params: expect.objectContaining({ - anomalyThreshold: 58, - machineLearningJobId: ['new_job_1', 'new_job_2'], - }), - }), - }) - ); - }); - - it('should call rulesClient.disable if the rule was enabled and enabled is false', async () => { - const ruleUpdate = { - ...getCreateRulesSchemaMock(), - enabled: false, - }; - const existingRule = { - ...getRuleMock(getQueryRuleParams()), - enabled: true, - }; + // Mock the rule returned after update; not used for this test directly but + // needed so that the patchRule method does not throw rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); await detectionRulesClient.updateRule({ ruleUpdate }); @@ -131,17 +118,18 @@ describe('DetectionRulesClient.updateRule', () => { ); }); - it('should call rulesClient.enable if the rule was disabled and enabled is true', async () => { - const ruleUpdate = { - ...getCreateRulesSchemaMock(), - enabled: true, - }; - const existingRule = { - ...getRuleMock(getQueryRuleParams()), - enabled: false, - }; + it('enables rule if the rule was disabled and enabled is true', async () => { + // Mock the existing rule + const existingRule = getRulesSchemaMock(); + existingRule.enabled = false; + (getRuleByRuleId as jest.Mock).mockResolvedValueOnce(existingRule); + + // Mock the rule update + const ruleUpdate = { ...getCreateRulesSchemaMock(), enabled: true }; + + // Mock the rule returned after update; not used for this test directly but + // needed so that the patchRule method does not throw rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); await detectionRulesClient.updateRule({ ruleUpdate }); @@ -169,8 +157,13 @@ describe('DetectionRulesClient.updateRule', () => { expect(rulesClient.create).not.toHaveBeenCalled(); }); - describe('regression tests', () => { + describe('actions', () => { it("updates the rule's actions if provided", async () => { + // Mock the existing rule + const existingRule = getRulesSchemaMock(); + (getRuleByRuleId as jest.Mock).mockResolvedValueOnce(existingRule); + + // Mock the rule update const ruleUpdate = { ...getCreateRulesSchemaMock(), actions: [ @@ -184,8 +177,9 @@ describe('DetectionRulesClient.updateRule', () => { }, ], }; - const existingRule = getRuleMock(getQueryRuleParams()); - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); + + // Mock the rule returned after update; not used for this test directly but + // needed so that the patchRule method does not throw rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); await detectionRulesClient.updateRule({ ruleUpdate }); @@ -210,12 +204,12 @@ describe('DetectionRulesClient.updateRule', () => { }); it('updates actions to empty if none are specified', async () => { - const ruleUpdate = getCreateRulesSchemaMock(); - delete ruleUpdate.actions; - const existingRule = getRuleMock(getQueryRuleParams()); + // Mock the existing rule + const existingRule = getRulesSchemaMock(); + (getRuleByRuleId as jest.Mock).mockResolvedValueOnce(existingRule); existingRule.actions = [ { - actionTypeId: '.slack', + action_type_id: '.slack', id: '2933e581-d81c-4fe3-88fe-c57c6b8a5bfd', params: { message: 'Rule {{context.rule.name}} generated {{state.signals_count}} signals', @@ -223,8 +217,14 @@ describe('DetectionRulesClient.updateRule', () => { group: 'default', }, ]; + + // Mock the rule update + const ruleUpdate = getCreateRulesSchemaMock(); + delete ruleUpdate.actions; + + // Mock the rule returned after update; not used for this test directly but + // needed so that the patchRule method does not throw rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams())); - (readRules as jest.Mock).mockResolvedValueOnce(existingRule); await detectionRulesClient.updateRule({ ruleUpdate }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.upgrade_prebuilt_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.upgrade_prebuilt_rule.test.ts index 38f3507d2f7ae3..7a5ae76371532c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.upgrade_prebuilt_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.upgrade_prebuilt_rule.test.ts @@ -10,21 +10,22 @@ import { rulesClientMock } from '@kbn/alerting-plugin/server/mocks'; import { getCreateEqlRuleSchemaMock, getCreateRulesSchemaMock, + getRulesEqlSchemaMock, + getRulesSchemaMock, } from '../../../../../../common/api/detection_engine/model/rule_schema/mocks'; import type { PrebuiltRuleAsset } from '../../../prebuilt_rules'; - -import { readRules } from './read_rules'; +import { getRuleByRuleId } from './methods/get_rule_by_rule_id'; import { getRuleMock } from '../../../routes/__mocks__/request_responses'; import { getEqlRuleParams, getQueryRuleParams } from '../../../rule_schema/mocks'; - import { buildMlAuthz } from '../../../../machine_learning/authz'; import { throwAuthzError } from '../../../../machine_learning/validation'; import { createDetectionRulesClient } from './detection_rules_client'; import type { IDetectionRulesClient } from './detection_rules_client_interface'; +import { savedObjectsClientMock } from '@kbn/core/server/mocks'; jest.mock('../../../../machine_learning/authz'); jest.mock('../../../../machine_learning/validation'); -jest.mock('./read_rules'); +jest.mock('./methods/get_rule_by_rule_id'); describe('DetectionRulesClient.upgradePrebuiltRule', () => { let rulesClient: ReturnType; @@ -34,7 +35,8 @@ describe('DetectionRulesClient.upgradePrebuiltRule', () => { beforeEach(() => { rulesClient = rulesClientMock.create(); - detectionRulesClient = createDetectionRulesClient(rulesClient, mlAuthz); + const savedObjectsClient = savedObjectsClientMock.create(); + detectionRulesClient = createDetectionRulesClient({ rulesClient, mlAuthz, savedObjectsClient }); }); it('throws if no matching rule_id is found', async () => { @@ -44,7 +46,7 @@ describe('DetectionRulesClient.upgradePrebuiltRule', () => { rule_id: 'rule-id', }; - (readRules as jest.Mock).mockResolvedValue(null); + (getRuleByRuleId as jest.Mock).mockResolvedValue(null); await expect(detectionRulesClient.upgradePrebuiltRule({ ruleAsset })).rejects.toThrow( `Failed to find rule ${ruleAsset.rule_id}` ); @@ -80,28 +82,24 @@ describe('DetectionRulesClient.upgradePrebuiltRule', () => { rule_id: 'rule-id', }; // Installed version is "query" - const installedRule = getRuleMock({ - ...getQueryRuleParams({ - exceptionsList: [ - { id: 'test_id', list_id: 'hi', type: 'detection', namespace_type: 'agnostic' }, - ], - }), - actions: [ - { - group: 'default', - id: 'test_id', - action_type_id: '.index', - config: { - index: ['index-1', 'index-2'], - }, - }, - ], - ruleId: 'rule-id', - }); + const installedRule = getRulesSchemaMock(); + installedRule.exceptions_list = [ + { id: 'test_id', list_id: 'hi', type: 'detection', namespace_type: 'agnostic' }, + ]; + installedRule.actions = [ + { + group: 'default', + id: 'test_id', + action_type_id: '.index', + params: {}, + }, + ]; + installedRule.rule_id = 'rule-id'; + beforeEach(() => { jest.resetAllMocks(); rulesClient.create.mockResolvedValue(getRuleMock(getQueryRuleParams())); - (readRules as jest.Mock).mockResolvedValue(installedRule); + (getRuleByRuleId as jest.Mock).mockResolvedValue(installedRule); }); it('deletes the old rule', async () => { @@ -117,16 +115,23 @@ describe('DetectionRulesClient.upgradePrebuiltRule', () => { name: ruleAsset.name, tags: ruleAsset.tags, // enabled and actions are kept from original rule - actions: installedRule.actions, + actions: [ + expect.objectContaining({ + actionTypeId: '.index', + group: 'default', + id: 'test_id', + params: {}, + }), + ], enabled: installedRule.enabled, params: expect.objectContaining({ index: ruleAsset.index, description: ruleAsset.description, immutable: true, // exceptions_lists, actions, timeline_id and timeline_title are maintained - timelineTitle: installedRule.params.timelineTitle, - timelineId: installedRule.params.timelineId, - exceptionsList: installedRule.params.exceptionsList, + timelineTitle: installedRule.timeline_title, + timelineId: installedRule.timeline_id, + exceptionsList: installedRule.exceptions_list, }), }), options: { @@ -147,11 +152,9 @@ describe('DetectionRulesClient.upgradePrebuiltRule', () => { rule_id: 'rule-id', }; // Installed version is "eql" - const installedRule = getRuleMock({ - ...getEqlRuleParams(), - }); + const installedRule = getRulesEqlSchemaMock(); beforeEach(() => { - (readRules as jest.Mock).mockResolvedValue(installedRule); + (getRuleByRuleId as jest.Mock).mockResolvedValue(installedRule); }); it('patches the existing rule with the new params from the rule asset', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client_interface.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client_interface.ts index 34c39153206b1e..d7b45f83e8bf81 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client_interface.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client_interface.ts @@ -38,7 +38,7 @@ export interface UpdateRuleArgs { } export interface PatchRuleArgs { - nextParams: RulePatchProps; + rulePatch: RulePatchProps; } export interface DeleteRuleArgs { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_defaults.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_defaults.ts new file mode 100644 index 00000000000000..837df0b3b2f1fd --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_defaults.ts @@ -0,0 +1,185 @@ +/* + * Copyright 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 { v4 as uuidv4 } from 'uuid'; +import type { + RuleCreateProps, + RuleSource, + TypeSpecificCreateProps, +} from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import { + DEFAULT_INDICATOR_SOURCE_PATH, + DEFAULT_MAX_SIGNALS, +} from '../../../../../../../common/constants'; +import { + normalizeMachineLearningJobIds, + normalizeThresholdObject, +} from '../../../../../../../common/detection_engine/utils'; +import { assertUnreachable } from '../../../../../../../common/utility_types'; +import { addEcsToRequiredFields } from '../../../utils/utils'; + +export const RULE_DEFAULTS = { + enabled: false, + risk_score_mapping: [], + severity_mapping: [], + interval: '5m' as const, + to: 'now' as const, + from: 'now-6m' as const, + exceptions_list: [], + false_positives: [], + max_signals: DEFAULT_MAX_SIGNALS, + actions: [], + related_integrations: [], + required_fields: [], + setup: '', + references: [], + threat: [], + tags: [], + author: [], + output_index: '', + version: 1, +}; + +export function applyRuleDefaults(rule: RuleCreateProps & { immutable?: boolean }) { + const typeSpecificParams = setTypeSpecificDefaults(rule); + const immutable = rule.immutable ?? false; + + return { + ...RULE_DEFAULTS, + ...rule, + ...typeSpecificParams, + rule_id: rule.rule_id ?? uuidv4(), + immutable, + rule_source: convertImmutableToRuleSource(immutable), + required_fields: addEcsToRequiredFields(rule.required_fields), + }; +} + +const convertImmutableToRuleSource = (immutable: boolean): RuleSource => { + if (immutable) { + return { + type: 'external', + is_customized: false, + }; + } + + return { + type: 'internal', + }; +}; + +export const setTypeSpecificDefaults = (props: TypeSpecificCreateProps) => { + switch (props.type) { + case 'eql': { + return { + type: props.type, + language: props.language, + index: props.index, + data_view_id: props.data_view_id, + query: props.query, + filters: props.filters, + timestamp_field: props.timestamp_field, + event_category_override: props.event_category_override, + tiebreaker_field: props.tiebreaker_field, + alert_suppression: props.alert_suppression, + }; + } + case 'esql': { + return { + type: props.type, + language: props.language, + query: props.query, + alert_suppression: props.alert_suppression, + }; + } + case 'threat_match': { + return { + type: props.type, + language: props.language ?? 'kuery', + index: props.index, + data_view_id: props.data_view_id, + query: props.query, + filters: props.filters, + saved_id: props.saved_id, + threat_filters: props.threat_filters, + threat_query: props.threat_query, + threat_mapping: props.threat_mapping, + threat_language: props.threat_language, + threat_index: props.threat_index, + threat_indicator_path: props.threat_indicator_path ?? DEFAULT_INDICATOR_SOURCE_PATH, + concurrent_searches: props.concurrent_searches, + items_per_search: props.items_per_search, + alert_suppression: props.alert_suppression, + }; + } + case 'query': { + return { + type: props.type, + language: props.language ?? 'kuery', + index: props.index, + data_view_id: props.data_view_id, + query: props.query ?? '', + filters: props.filters, + saved_id: props.saved_id, + response_actions: props.response_actions, + alert_suppression: props.alert_suppression, + }; + } + case 'saved_query': { + return { + type: props.type, + language: props.language ?? 'kuery', + index: props.index, + query: props.query, + filters: props.filters, + saved_id: props.saved_id, + data_view_id: props.data_view_id, + response_actions: props.response_actions, + alert_suppression: props.alert_suppression, + }; + } + case 'threshold': { + return { + type: props.type, + language: props.language ?? 'kuery', + index: props.index, + data_view_id: props.data_view_id, + query: props.query, + filters: props.filters, + saved_id: props.saved_id, + threshold: normalizeThresholdObject(props.threshold), + alert_suppression: props.alert_suppression?.duration + ? { duration: props.alert_suppression.duration } + : undefined, + }; + } + case 'machine_learning': { + return { + type: props.type, + anomaly_threshold: props.anomaly_threshold, + machine_learning_job_id: normalizeMachineLearningJobIds(props.machine_learning_job_id), + alert_suppression: props.alert_suppression, + }; + } + case 'new_terms': { + return { + type: props.type, + query: props.query, + new_terms_fields: props.new_terms_fields, + history_window_start: props.history_window_start, + index: props.index, + filters: props.filters, + language: props.language ?? 'kuery', + data_view_id: props.data_view_id, + alert_suppression: props.alert_suppression, + }; + } + default: { + return assertUnreachable(props); + } + } +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.test.ts new file mode 100644 index 00000000000000..49592aff28f951 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.test.ts @@ -0,0 +1,456 @@ +/* + * Copyright 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 { + AlertSuppressionDuration, + PatchRuleRequestBody, +} from '../../../../../../../common/api/detection_engine'; +import { + getEsqlRuleSchemaMock, + getRulesEqlSchemaMock, + getRulesMlSchemaMock, + getRulesNewTermsSchemaMock, + getRulesSchemaMock, + getRulesThresholdSchemaMock, + getSavedQuerySchemaMock, + getThreatMatchingSchemaMock, +} from '../../../../../../../common/api/detection_engine/model/rule_schema/mocks'; +import { createPrebuiltRuleAssetsClient } from '../../../../prebuilt_rules/logic/rule_assets/__mocks__/prebuilt_rule_assets_client'; +import { applyRulePatch } from './apply_rule_patch'; + +const prebuiltRuleAssetClient = createPrebuiltRuleAssetsClient(); + +describe('applyRulePatch', () => { + describe('EQL', () => { + test('should accept EQL params when existing rule type is EQL', async () => { + const rulePatch = { + timestamp_field: 'event.created', + event_category_override: 'event.not_category', + tiebreaker_field: 'event.created', + }; + const existingRule = getRulesEqlSchemaMock(); + const patchedRule = await applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }); + expect(patchedRule).toEqual( + expect.objectContaining({ + timestamp_field: 'event.created', + event_category_override: 'event.not_category', + tiebreaker_field: 'event.created', + }) + ); + }); + test('should accept EQL params with suppression in snake case and convert to camel case when rule type is EQL', async () => { + const rulePatch = { + timestamp_field: 'event.created', + event_category_override: 'event.not_category', + tiebreaker_field: 'event.created', + alert_suppression: { + group_by: ['event.type'], + duration: { + value: 10, + unit: 'm', + } as AlertSuppressionDuration, + missing_fields_strategy: 'suppress', + }, + }; + const existingRule = getRulesEqlSchemaMock(); + const patchedRule = await applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }); + expect(patchedRule).toEqual( + expect.objectContaining({ + timestamp_field: 'event.created', + event_category_override: 'event.not_category', + tiebreaker_field: 'event.created', + alert_suppression: { + group_by: ['event.type'], + duration: { + value: 10, + unit: 'm', + }, + missing_fields_strategy: 'suppress', + }, + }) + ); + }); + test('should reject invalid EQL params when existing rule type is EQL', async () => { + const rulePatch = { + timestamp_field: 1, + event_category_override: 1, + tiebreaker_field: 1, + } as PatchRuleRequestBody; + const existingRule = getRulesEqlSchemaMock(); + await expect( + applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }) + ).rejects.toThrowError( + 'event_category_override: Expected string, received number, tiebreaker_field: Expected string, received number, timestamp_field: Expected string, received number' + ); + }); + test('should reject EQL params with invalid suppression group_by field', async () => { + const rulePatch = { + timestamp_field: 'event.created', + event_category_override: 'event.not_category', + tiebreaker_field: 'event.created', + alert_suppression: { + group_by: 'event.type', + duration: { + value: 10, + unit: 'm', + } as AlertSuppressionDuration, + missing_fields_strategy: 'suppress', + }, + }; + const existingRule = getRulesEqlSchemaMock(); + await expect( + applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }) + ).rejects.toThrowError('alert_suppression.group_by: Expected array, received string'); + }); + }); + + test('should accept threat match params when existing rule type is threat match', async () => { + const rulePatch = { + threat_indicator_path: 'my.indicator', + threat_query: 'test-query', + }; + const existingRule = getThreatMatchingSchemaMock(); + const patchedRule = await applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }); + expect(patchedRule).toEqual( + expect.objectContaining({ + threat_indicator_path: 'my.indicator', + threat_query: 'test-query', + }) + ); + }); + + test('should reject invalid threat match params when existing rule type is threat match', async () => { + const rulePatch = { + threat_indicator_path: 1, + threat_query: 1, + } as PatchRuleRequestBody; + const existingRule = getThreatMatchingSchemaMock(); + await expect( + applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }) + ).rejects.toThrowError( + 'threat_query: Expected string, received number, threat_indicator_path: Expected string, received number' + ); + }); + + test('should accept query params when existing rule type is query', async () => { + const rulePatch = { + index: ['new-test-index'], + language: 'lucene', + } as PatchRuleRequestBody; + const existingRule = getRulesSchemaMock(); + const patchedRule = await applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }); + expect(patchedRule).toEqual( + expect.objectContaining({ + index: ['new-test-index'], + language: 'lucene', + }) + ); + }); + + test('should reject invalid query params when existing rule type is query', async () => { + const rulePatch = { + index: [1], + language: 'non-language', + } as PatchRuleRequestBody; + const existingRule = getRulesSchemaMock(); + await expect( + applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }) + ).rejects.toThrowError( + "index.0: Expected string, received number, language: Invalid enum value. Expected 'kuery' | 'lucene', received 'non-language'" + ); + }); + + test('should accept saved query params when existing rule type is saved query', async () => { + const rulePatch = { + index: ['new-test-index'], + language: 'lucene', + } as PatchRuleRequestBody; + const existingRule = getSavedQuerySchemaMock(); + const patchedRule = await applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }); + expect(patchedRule).toEqual( + expect.objectContaining({ + index: ['new-test-index'], + language: 'lucene', + }) + ); + }); + + test('should reject invalid saved query params when existing rule type is saved query', async () => { + const rulePatch = { + index: [1], + language: 'non-language', + } as PatchRuleRequestBody; + const existingRule = getSavedQuerySchemaMock(); + await expect( + applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }) + ).rejects.toThrowError( + "index.0: Expected string, received number, language: Invalid enum value. Expected 'kuery' | 'lucene', received 'non-language'" + ); + }); + + test('should accept threshold params when existing rule type is threshold', async () => { + const rulePatch = { + threshold: { + field: ['host.name'], + value: 107, + }, + }; + const existingRule = getRulesThresholdSchemaMock(); + const patchedRule = await applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }); + expect(patchedRule).toEqual( + expect.objectContaining({ + threshold: { + field: ['host.name'], + value: 107, + }, + }) + ); + }); + + test('should reject invalid threshold params when existing rule type is threshold', async () => { + const rulePatch = { + threshold: { + field: ['host.name'], + value: 'invalid', + }, + } as PatchRuleRequestBody; + const existingRule = getRulesThresholdSchemaMock(); + await expect( + applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }) + ).rejects.toThrowError('threshold.value: Expected number, received string'); + }); + + test('should accept ES|QL alerts suppression params', async () => { + const rulePatch = { + alert_suppression: { + group_by: ['agent.name'], + duration: { value: 4, unit: 'h' as const }, + missing_fields_strategy: 'doNotSuppress' as const, + }, + }; + const existingRule = getEsqlRuleSchemaMock(); + const patchedRule = await applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }); + expect(patchedRule).toEqual( + expect.objectContaining({ + alert_suppression: { + group_by: ['agent.name'], + missing_fields_strategy: 'doNotSuppress', + duration: { value: 4, unit: 'h' }, + }, + }) + ); + }); + + test('should accept threshold alerts suppression params', async () => { + const rulePatch = { + alert_suppression: { + duration: { value: 4, unit: 'h' as const }, + }, + }; + const existingRule = getRulesThresholdSchemaMock(); + const patchedRule = await applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }); + expect(patchedRule).toEqual( + expect.objectContaining({ + alert_suppression: { + duration: { value: 4, unit: 'h' }, + }, + }) + ); + }); + + test('should accept threat_match alerts suppression params', async () => { + const rulePatch = { + alert_suppression: { + group_by: ['agent.name'], + missing_fields_strategy: 'suppress' as const, + }, + }; + const existingRule = getThreatMatchingSchemaMock(); + const patchedRule = await applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }); + expect(patchedRule).toEqual( + expect.objectContaining({ + alert_suppression: { + group_by: ['agent.name'], + missing_fields_strategy: 'suppress', + }, + }) + ); + }); + + test('should accept new_terms alerts suppression params', async () => { + const rulePatch = { + alert_suppression: { + group_by: ['agent.name'], + duration: { value: 4, unit: 'h' as const }, + missing_fields_strategy: 'suppress' as const, + }, + }; + const existingRule = getRulesNewTermsSchemaMock(); + const patchedRule = await applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }); + expect(patchedRule).toEqual( + expect.objectContaining({ + alert_suppression: { + group_by: ['agent.name'], + missing_fields_strategy: 'suppress', + duration: { value: 4, unit: 'h' }, + }, + }) + ); + }); + + describe('machine learning rules', () => { + test('should accept machine learning params when existing rule type is machine learning', async () => { + const rulePatch = { + anomaly_threshold: 5, + }; + const existingRule = getRulesMlSchemaMock(); + const patchedRule = await applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }); + expect(patchedRule).toEqual( + expect.objectContaining({ + anomaly_threshold: 5, + }) + ); + }); + + test('should reject invalid machine learning params when existing rule type is machine learning', async () => { + const rulePatch = { + anomaly_threshold: 'invalid', + } as PatchRuleRequestBody; + const existingRule = getRulesMlSchemaMock(); + await expect( + applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }) + ).rejects.toThrowError('anomaly_threshold: Expected number, received string'); + }); + + it('accepts suppression params', async () => { + const rulePatch = { + alert_suppression: { + group_by: ['agent.name'], + missing_fields_strategy: 'suppress' as const, + }, + }; + const existingRule = getRulesMlSchemaMock(); + const patchedRule = await applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }); + + expect(patchedRule).toEqual( + expect.objectContaining({ + alert_suppression: { + group_by: ['agent.name'], + missing_fields_strategy: 'suppress', + }, + }) + ); + }); + }); + + test('should accept new terms params when existing rule type is new terms', async () => { + const rulePatch = { + new_terms_fields: ['event.new_field'], + }; + const existingRule = getRulesNewTermsSchemaMock(); + const patchedRule = await applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }); + expect(patchedRule).toEqual( + expect.objectContaining({ + new_terms_fields: ['event.new_field'], + }) + ); + }); + + test('should reject invalid new terms params when existing rule type is new terms', async () => { + const rulePatch = { + new_terms_fields: 'invalid', + } as PatchRuleRequestBody; + const existingRule = getRulesNewTermsSchemaMock(); + await expect( + applyRulePatch({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, + }) + ).rejects.toThrowError('new_terms_fields: Expected array, received string'); + }); +}); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.ts new file mode 100644 index 00000000000000..9d02cd8dbb9df8 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.ts @@ -0,0 +1,334 @@ +/* + * Copyright 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 { BadRequestError } from '@kbn/securitysolution-es-utils'; +import { stringifyZodError } from '@kbn/zod-helpers'; +import type { + EqlRule, + EqlRuleResponseFields, + EsqlRule, + EsqlRuleResponseFields, + MachineLearningRule, + MachineLearningRuleResponseFields, + NewTermsRule, + NewTermsRuleResponseFields, + QueryRule, + QueryRuleResponseFields, + RuleResponse, + SavedQueryRule, + SavedQueryRuleResponseFields, + ThreatMatchRule, + ThreatMatchRuleResponseFields, + ThresholdRule, + ThresholdRuleResponseFields, + TypeSpecificResponse, +} from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import { + EqlRulePatchFields, + EsqlRulePatchFields, + MachineLearningRulePatchFields, + NewTermsRulePatchFields, + QueryRulePatchFields, + SavedQueryRulePatchFields, + ThreatMatchRulePatchFields, + ThresholdRulePatchFields, +} from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import type { PatchRuleRequestBody } from '../../../../../../../common/api/detection_engine/rule_management'; +import { + normalizeMachineLearningJobIds, + normalizeThresholdObject, +} from '../../../../../../../common/detection_engine/utils'; +import { assertUnreachable } from '../../../../../../../common/utility_types'; +import type { IPrebuiltRuleAssetsClient } from '../../../../prebuilt_rules/logic/rule_assets/prebuilt_rule_assets_client'; +import { addEcsToRequiredFields } from '../../../utils/utils'; +import { calculateRuleSource } from './rule_source/calculate_rule_source'; + +interface ApplyRulePatchProps { + prebuiltRuleAssetClient: IPrebuiltRuleAssetsClient; + existingRule: RuleResponse; + rulePatch: PatchRuleRequestBody; +} + +// eslint-disable-next-line complexity +export const applyRulePatch = async ({ + rulePatch, + existingRule, + prebuiltRuleAssetClient, +}: ApplyRulePatchProps): Promise => { + const typeSpecificParams = patchTypeSpecificParams(rulePatch, existingRule); + + const nextRule: RuleResponse = { + // Keep existing values for these fields + id: existingRule.id, + rule_id: existingRule.rule_id, + revision: existingRule.revision, + immutable: existingRule.immutable, + rule_source: existingRule.rule_source, + updated_at: existingRule.updated_at, + updated_by: existingRule.updated_by, + created_at: existingRule.created_at, + created_by: existingRule.created_by, + + // Update values for these fields + enabled: rulePatch.enabled ?? existingRule.enabled, + name: rulePatch.name ?? existingRule.name, + tags: rulePatch.tags ?? existingRule.tags, + author: rulePatch.author ?? existingRule.author, + building_block_type: rulePatch.building_block_type ?? existingRule.building_block_type, + description: rulePatch.description ?? existingRule.description, + false_positives: rulePatch.false_positives ?? existingRule.false_positives, + investigation_fields: rulePatch.investigation_fields ?? existingRule.investigation_fields, + from: rulePatch.from ?? existingRule.from, + license: rulePatch.license ?? existingRule.license, + output_index: rulePatch.output_index ?? existingRule.output_index, + timeline_id: rulePatch.timeline_id ?? existingRule.timeline_id, + timeline_title: rulePatch.timeline_title ?? existingRule.timeline_title, + meta: rulePatch.meta ?? existingRule.meta, + max_signals: rulePatch.max_signals ?? existingRule.max_signals, + related_integrations: rulePatch.related_integrations ?? existingRule.related_integrations, + required_fields: addEcsToRequiredFields(rulePatch.required_fields), + risk_score: rulePatch.risk_score ?? existingRule.risk_score, + risk_score_mapping: rulePatch.risk_score_mapping ?? existingRule.risk_score_mapping, + rule_name_override: rulePatch.rule_name_override ?? existingRule.rule_name_override, + setup: rulePatch.setup ?? existingRule.setup, + severity: rulePatch.severity ?? existingRule.severity, + severity_mapping: rulePatch.severity_mapping ?? existingRule.severity_mapping, + threat: rulePatch.threat ?? existingRule.threat, + timestamp_override: rulePatch.timestamp_override ?? existingRule.timestamp_override, + timestamp_override_fallback_disabled: + rulePatch.timestamp_override_fallback_disabled ?? + existingRule.timestamp_override_fallback_disabled, + to: rulePatch.to ?? existingRule.to, + references: rulePatch.references ?? existingRule.references, + namespace: rulePatch.namespace ?? existingRule.namespace, + note: rulePatch.note ?? existingRule.note, + version: rulePatch.version ?? existingRule.version, + exceptions_list: rulePatch.exceptions_list ?? existingRule.exceptions_list, + interval: rulePatch.interval ?? existingRule.interval, + throttle: rulePatch.throttle ?? existingRule.throttle, + actions: rulePatch.actions ?? existingRule.actions, + ...typeSpecificParams, + }; + + nextRule.rule_source = await calculateRuleSource({ + rule: nextRule, + prebuiltRuleAssetClient, + }); + + return nextRule; +}; + +const patchEqlParams = ( + rulePatch: EqlRulePatchFields, + existingRule: EqlRule +): EqlRuleResponseFields => { + return { + type: existingRule.type, + language: rulePatch.language ?? existingRule.language, + index: rulePatch.index ?? existingRule.index, + data_view_id: rulePatch.data_view_id ?? existingRule.data_view_id, + query: rulePatch.query ?? existingRule.query, + filters: rulePatch.filters ?? existingRule.filters, + timestamp_field: rulePatch.timestamp_field ?? existingRule.timestamp_field, + event_category_override: + rulePatch.event_category_override ?? existingRule.event_category_override, + tiebreaker_field: rulePatch.tiebreaker_field ?? existingRule.tiebreaker_field, + alert_suppression: rulePatch.alert_suppression ?? existingRule.alert_suppression, + }; +}; + +const patchEsqlParams = ( + rulePatch: EsqlRulePatchFields, + existingRule: EsqlRule +): EsqlRuleResponseFields => { + return { + type: existingRule.type, + language: rulePatch.language ?? existingRule.language, + query: rulePatch.query ?? existingRule.query, + alert_suppression: rulePatch.alert_suppression ?? existingRule.alert_suppression, + }; +}; + +const patchThreatMatchParams = ( + rulePatch: ThreatMatchRulePatchFields, + existingRule: ThreatMatchRule +): ThreatMatchRuleResponseFields => { + return { + type: existingRule.type, + language: rulePatch.language ?? existingRule.language, + index: rulePatch.index ?? existingRule.index, + data_view_id: rulePatch.data_view_id ?? existingRule.data_view_id, + query: rulePatch.query ?? existingRule.query, + filters: rulePatch.filters ?? existingRule.filters, + saved_id: rulePatch.saved_id ?? existingRule.saved_id, + threat_filters: rulePatch.threat_filters ?? existingRule.threat_filters, + threat_query: rulePatch.threat_query ?? existingRule.threat_query, + threat_mapping: rulePatch.threat_mapping ?? existingRule.threat_mapping, + threat_language: rulePatch.threat_language ?? existingRule.threat_language, + threat_index: rulePatch.threat_index ?? existingRule.threat_index, + threat_indicator_path: rulePatch.threat_indicator_path ?? existingRule.threat_indicator_path, + concurrent_searches: rulePatch.concurrent_searches ?? existingRule.concurrent_searches, + items_per_search: rulePatch.items_per_search ?? existingRule.items_per_search, + alert_suppression: rulePatch.alert_suppression ?? existingRule.alert_suppression, + }; +}; + +const patchQueryParams = ( + rulePatch: QueryRulePatchFields, + existingRule: QueryRule +): QueryRuleResponseFields => { + return { + type: existingRule.type, + language: rulePatch.language ?? existingRule.language, + index: rulePatch.index ?? existingRule.index, + data_view_id: rulePatch.data_view_id ?? existingRule.data_view_id, + query: rulePatch.query ?? existingRule.query, + filters: rulePatch.filters ?? existingRule.filters, + saved_id: rulePatch.saved_id ?? existingRule.saved_id, + response_actions: rulePatch.response_actions ?? existingRule.response_actions, + alert_suppression: rulePatch.alert_suppression ?? existingRule.alert_suppression, + }; +}; + +const patchSavedQueryParams = ( + rulePatch: SavedQueryRulePatchFields, + existingRule: SavedQueryRule +): SavedQueryRuleResponseFields => { + return { + type: existingRule.type, + language: rulePatch.language ?? existingRule.language, + index: rulePatch.index ?? existingRule.index, + data_view_id: rulePatch.data_view_id ?? existingRule.data_view_id, + query: rulePatch.query ?? existingRule.query, + filters: rulePatch.filters ?? existingRule.filters, + saved_id: rulePatch.saved_id ?? existingRule.saved_id, + response_actions: rulePatch.response_actions ?? existingRule.response_actions, + alert_suppression: rulePatch.alert_suppression ?? existingRule.alert_suppression, + }; +}; + +const patchThresholdParams = ( + rulePatch: ThresholdRulePatchFields, + existingRule: ThresholdRule +): ThresholdRuleResponseFields => { + return { + type: existingRule.type, + language: rulePatch.language ?? existingRule.language, + index: rulePatch.index ?? existingRule.index, + data_view_id: rulePatch.data_view_id ?? existingRule.data_view_id, + query: rulePatch.query ?? existingRule.query, + filters: rulePatch.filters ?? existingRule.filters, + saved_id: rulePatch.saved_id ?? existingRule.saved_id, + threshold: rulePatch.threshold + ? normalizeThresholdObject(rulePatch.threshold) + : existingRule.threshold, + alert_suppression: rulePatch.alert_suppression ?? existingRule.alert_suppression, + }; +}; + +const patchMachineLearningParams = ( + params: MachineLearningRulePatchFields, + existingRule: MachineLearningRule +): MachineLearningRuleResponseFields => { + return { + type: existingRule.type, + anomaly_threshold: params.anomaly_threshold ?? existingRule.anomaly_threshold, + machine_learning_job_id: params.machine_learning_job_id + ? normalizeMachineLearningJobIds(params.machine_learning_job_id) + : existingRule.machine_learning_job_id, + alert_suppression: params.alert_suppression ?? existingRule.alert_suppression, + }; +}; + +const patchNewTermsParams = ( + params: NewTermsRulePatchFields, + existingRule: NewTermsRule +): NewTermsRuleResponseFields => { + return { + type: existingRule.type, + language: params.language ?? existingRule.language, + index: params.index ?? existingRule.index, + data_view_id: params.data_view_id ?? existingRule.data_view_id, + query: params.query ?? existingRule.query, + filters: params.filters ?? existingRule.filters, + new_terms_fields: params.new_terms_fields ?? existingRule.new_terms_fields, + history_window_start: params.history_window_start ?? existingRule.history_window_start, + alert_suppression: params.alert_suppression ?? existingRule.alert_suppression, + }; +}; + +export const patchTypeSpecificParams = ( + params: PatchRuleRequestBody, + existingRule: RuleResponse +): TypeSpecificResponse => { + // Here we do the validation of patch params by rule type to ensure that the fields that are + // passed in to patch are of the correct type, e.g. `query` is a string. Since the combined patch schema + // is a union of types where everything is optional, it's hard to do the validation before we know the rule type - + // a patch request that defines `event_category_override` as a number would not be assignable to the EQL patch schema, + // but would be assignable to the other rule types since they don't specify `event_category_override`. + switch (existingRule.type) { + case 'eql': { + const result = EqlRulePatchFields.safeParse(params); + if (!result.success) { + throw new BadRequestError(stringifyZodError(result.error)); + } + return patchEqlParams(result.data, existingRule); + } + case 'esql': { + const result = EsqlRulePatchFields.safeParse(params); + if (!result.success) { + throw new BadRequestError(stringifyZodError(result.error)); + } + return patchEsqlParams(result.data, existingRule); + } + case 'threat_match': { + const result = ThreatMatchRulePatchFields.safeParse(params); + if (!result.success) { + throw new BadRequestError(stringifyZodError(result.error)); + } + return patchThreatMatchParams(result.data, existingRule); + } + case 'query': { + const result = QueryRulePatchFields.safeParse(params); + if (!result.success) { + throw new BadRequestError(stringifyZodError(result.error)); + } + return patchQueryParams(result.data, existingRule); + } + case 'saved_query': { + const result = SavedQueryRulePatchFields.safeParse(params); + if (!result.success) { + throw new BadRequestError(stringifyZodError(result.error)); + } + return patchSavedQueryParams(result.data, existingRule); + } + case 'threshold': { + const result = ThresholdRulePatchFields.safeParse(params); + if (!result.success) { + throw new BadRequestError(stringifyZodError(result.error)); + } + return patchThresholdParams(result.data, existingRule); + } + case 'machine_learning': { + const result = MachineLearningRulePatchFields.safeParse(params); + if (!result.success) { + throw new BadRequestError(stringifyZodError(result.error)); + } + return patchMachineLearningParams(result.data, existingRule); + } + case 'new_terms': { + const result = NewTermsRulePatchFields.safeParse(params); + if (!result.success) { + throw new BadRequestError(stringifyZodError(result.error)); + } + return patchNewTermsParams(result.data, existingRule); + } + default: { + return assertUnreachable(existingRule); + } + } +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_update.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_update.ts new file mode 100644 index 00000000000000..b911e66a1fc457 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_update.ts @@ -0,0 +1,52 @@ +/* + * Copyright 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 { + RuleResponse, + RuleUpdateProps, +} from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import type { IPrebuiltRuleAssetsClient } from '../../../../prebuilt_rules/logic/rule_assets/prebuilt_rule_assets_client'; +import { applyRuleDefaults } from './apply_rule_defaults'; +import { calculateRuleSource } from './rule_source/calculate_rule_source'; + +interface ApplyRuleUpdateProps { + prebuiltRuleAssetClient: IPrebuiltRuleAssetsClient; + existingRule: RuleResponse; + ruleUpdate: RuleUpdateProps; +} + +export const applyRuleUpdate = async ({ + prebuiltRuleAssetClient, + existingRule, + ruleUpdate, +}: ApplyRuleUpdateProps): Promise => { + const nextRule: RuleResponse = { + ...applyRuleDefaults(ruleUpdate), + + // Use existing values + enabled: ruleUpdate.enabled ?? existingRule.enabled, + version: ruleUpdate.version ?? existingRule.version, + + // Always keep existing values for these fields + id: existingRule.id, + rule_id: existingRule.rule_id, + revision: existingRule.revision, + immutable: existingRule.immutable, + rule_source: existingRule.rule_source, + updated_at: existingRule.updated_at, + updated_by: existingRule.updated_by, + created_at: existingRule.created_at, + created_by: existingRule.created_by, + }; + + nextRule.rule_source = await calculateRuleSource({ + rule: nextRule, + prebuiltRuleAssetClient, + }); + + return nextRule; +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_is_customized.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_is_customized.ts new file mode 100644 index 00000000000000..4f9bb4a060f6f3 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_is_customized.ts @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { RuleResponse } from '../../../../../../../../common/api/detection_engine'; +import { MissingVersion } from '../../../../../../../../common/api/detection_engine'; +import type { PrebuiltRuleAsset } from '../../../../../prebuilt_rules'; +import { calculateRuleFieldsDiff } from '../../../../../prebuilt_rules/logic/diff/calculation/calculate_rule_fields_diff'; +import { convertRuleToDiffable } from '../../../../../prebuilt_rules/logic/diff/normalization/convert_rule_to_diffable'; +import { convertPrebuiltRuleAssetToRuleResponse } from '../../converters/convert_prebuilt_rule_asset_to_rule_response'; + +export function calculateIsCustomized( + baseRule: PrebuiltRuleAsset | undefined, + nextRule: RuleResponse +) { + if (baseRule == null) { + // If the base version is missing, we consider the rule to be customized + return true; + } + + const baseRuleWithDefaults = convertPrebuiltRuleAssetToRuleResponse(baseRule); + + const fieldsDiff = calculateRuleFieldsDiff({ + base_version: MissingVersion, + current_version: convertRuleToDiffable(baseRuleWithDefaults), + target_version: convertRuleToDiffable(nextRule), + }); + + return Object.values(fieldsDiff).some((diff) => diff.has_update); +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.test.ts new file mode 100644 index 00000000000000..e44c69d2705d54 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.test.ts @@ -0,0 +1,112 @@ +/* + * Copyright 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 { createPrebuiltRuleAssetsClient } from '../../../../../prebuilt_rules/logic/rule_assets/__mocks__/prebuilt_rule_assets_client'; +import { applyRuleDefaults } from '../apply_rule_defaults'; +import { calculateRuleSource } from './calculate_rule_source'; + +const prebuiltRuleAssetClient = createPrebuiltRuleAssetsClient(); + +const getSampleRuleAsset = () => { + return applyRuleDefaults({ + rule_id: 'test-rule-id', + name: 'Test rule', + description: 'Test description', + type: 'query', + query: 'user.name: root or user.name: admin', + severity: 'high', + risk_score: 55, + }); +}; + +const getSampleRule = () => { + return { + ...getSampleRuleAsset(), + id: 'test-rule-id', + updated_at: '2021-01-01T00:00:00Z', + updated_by: 'test-user', + created_at: '2021-01-01T00:00:00Z', + created_by: 'test-user', + revision: 1, + }; +}; + +describe('calculateRuleSource', () => { + it('returns an internal rule source when the rule is not prebuilt', async () => { + const rule = getSampleRule(); + rule.immutable = false; + + const result = await calculateRuleSource({ + prebuiltRuleAssetClient, + rule, + }); + expect(result).toEqual({ + type: 'internal', + }); + }); + + it('returns an external rule source with customized false when the rule is prebuilt', async () => { + const rule = getSampleRule(); + rule.immutable = true; + + const baseRule = getSampleRuleAsset(); + prebuiltRuleAssetClient.fetchAssetsByVersion.mockResolvedValueOnce([baseRule]); + + const result = await calculateRuleSource({ + prebuiltRuleAssetClient, + rule, + }); + expect(result).toEqual( + expect.objectContaining({ + type: 'external', + is_customized: false, + }) + ); + }); + + it('returns is_customized true when the rule is prebuilt and has been customized', async () => { + const rule = getSampleRule(); + rule.immutable = true; + rule.name = 'Updated name'; + + const baseRule = getSampleRuleAsset(); + prebuiltRuleAssetClient.fetchAssetsByVersion.mockResolvedValueOnce([baseRule]); + + const result = await calculateRuleSource({ + prebuiltRuleAssetClient, + rule, + }); + expect(result).toEqual( + expect.objectContaining({ + type: 'external', + is_customized: true, + }) + ); + }); + + it('returns is_customized false when the rule has only changes to revision, updated_at, updated_by', async () => { + const rule = getSampleRule(); + rule.immutable = true; + rule.revision = 5; + rule.updated_at = '2024-01-01T00:00:00Z'; + rule.updated_by = 'new-user'; + + const baseRule = getSampleRuleAsset(); + prebuiltRuleAssetClient.fetchAssetsByVersion.mockResolvedValueOnce([baseRule]); + + const result = await calculateRuleSource({ + prebuiltRuleAssetClient, + rule, + }); + expect(result).toEqual( + expect.objectContaining({ + type: 'external', + is_customized: false, + }) + ); + }); +}); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.ts new file mode 100644 index 00000000000000..742cd20544a60b --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.ts @@ -0,0 +1,47 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { + RuleResponse, + RuleSource, +} from '../../../../../../../../common/api/detection_engine/model/rule_schema'; +import type { PrebuiltRuleAsset } from '../../../../../prebuilt_rules'; +import type { IPrebuiltRuleAssetsClient } from '../../../../../prebuilt_rules/logic/rule_assets/prebuilt_rule_assets_client'; +import { calculateIsCustomized } from './calculate_is_customized'; + +interface CalculateRuleSourceProps { + prebuiltRuleAssetClient: IPrebuiltRuleAssetsClient; + rule: RuleResponse; +} + +export async function calculateRuleSource({ + prebuiltRuleAssetClient, + rule, +}: CalculateRuleSourceProps): Promise { + if (rule.immutable) { + // This is a prebuilt rule and, despite the name, they are not immutable. So + // we need to recalculate `ruleSource.isCustomized` based on the rule's contents. + const prebuiltRulesResponse = await prebuiltRuleAssetClient.fetchAssetsByVersion([ + { + rule_id: rule.rule_id, + version: rule.version, + }, + ]); + const baseRule: PrebuiltRuleAsset | undefined = prebuiltRulesResponse.at(0); + + const isCustomized = calculateIsCustomized(baseRule, rule); + + return { + type: 'external', + is_customized: isCustomized, + }; + } + + return { + type: 'internal', + }; +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/__mocks__/get_rule_by_rule_id.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/__mocks__/get_rule_by_rule_id.ts new file mode 100644 index 00000000000000..251cd7f6991951 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/__mocks__/get_rule_by_rule_id.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { RuleResponse } from '../../../../../../../../common/api/detection_engine'; +import { getRulesSchemaMock } from '../../../../../../../../common/api/detection_engine/model/rule_schema/rule_response_schema.mock'; + +export const getRuleByRuleId = jest + .fn() + .mockImplementation(async (): Promise => getRulesSchemaMock()); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_custom_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_custom_rule.ts deleted file mode 100644 index 963cac7e10dd13..00000000000000 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_custom_rule.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { RulesClient } from '@kbn/alerting-plugin/server'; -import { stringifyZodError } from '@kbn/zod-helpers'; -import type { CreateCustomRuleArgs } from '../detection_rules_client_interface'; -import type { MlAuthz } from '../../../../../machine_learning/authz'; -import type { RuleParams } from '../../../../rule_schema'; -import { RuleResponse } from '../../../../../../../common/api/detection_engine/model/rule_schema'; -import { - convertCreateAPIToInternalSchema, - internalRuleToAPIResponse, -} from '../../../normalization/rule_converters'; -import { validateMlAuth, RuleResponseValidationError } from '../utils'; - -export const createCustomRule = async ( - rulesClient: RulesClient, - args: CreateCustomRuleArgs, - mlAuthz: MlAuthz -): Promise => { - const { params } = args; - await validateMlAuth(mlAuthz, params.type); - - const internalRule = convertCreateAPIToInternalSchema(params, { immutable: false }); - const rule = await rulesClient.create({ - data: internalRule, - }); - - /* Trying to convert the rule to a RuleResponse object */ - const parseResult = RuleResponse.safeParse(internalRuleToAPIResponse(rule)); - - if (!parseResult.success) { - throw new RuleResponseValidationError({ - message: stringifyZodError(parseResult.error), - ruleId: rule.params.ruleId, - }); - } - - return parseResult.data; -}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_prebuilt_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_prebuilt_rule.ts deleted file mode 100644 index 0f0a4aea12d7b2..00000000000000 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_prebuilt_rule.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { RulesClient } from '@kbn/alerting-plugin/server'; -import { stringifyZodError } from '@kbn/zod-helpers'; -import type { CreatePrebuiltRuleArgs } from '../detection_rules_client_interface'; -import type { MlAuthz } from '../../../../../machine_learning/authz'; -import { RuleResponse } from '../../../../../../../common/api/detection_engine/model/rule_schema'; -import type { RuleParams } from '../../../../rule_schema'; -import { - convertCreateAPIToInternalSchema, - internalRuleToAPIResponse, -} from '../../../normalization/rule_converters'; -import { validateMlAuth, RuleResponseValidationError } from '../utils'; - -export const createPrebuiltRule = async ( - rulesClient: RulesClient, - args: CreatePrebuiltRuleArgs, - mlAuthz: MlAuthz -): Promise => { - const { params } = args; - - await validateMlAuth(mlAuthz, params.type); - - const internalRule = convertCreateAPIToInternalSchema(params, { - immutable: true, - defaultEnabled: false, - }); - - const rule = await rulesClient.create({ - data: internalRule, - }); - - /* Trying to convert the rule to a RuleResponse object */ - const parseResult = RuleResponse.safeParse(internalRuleToAPIResponse(rule)); - - if (!parseResult.success) { - throw new RuleResponseValidationError({ - message: stringifyZodError(parseResult.error), - ruleId: rule.params.ruleId, - }); - } - - return parseResult.data; -}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_rule.ts new file mode 100644 index 00000000000000..772e0c775d8b4c --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_rule.ts @@ -0,0 +1,55 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { RulesClient } from '@kbn/alerting-plugin/server'; +import { ruleTypeMappings } from '@kbn/securitysolution-rules'; +import { SERVER_APP_ID } from '../../../../../../../common'; +import type { + RuleCreateProps, + RuleResponse, +} from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import type { MlAuthz } from '../../../../../machine_learning/authz'; +import type { RuleParams } from '../../../../rule_schema'; +import { convertAlertingRuleToRuleResponse } from '../converters/convert_alerting_rule_to_rule_response'; +import { convertRuleResponseToAlertingRule } from '../converters/convert_rule_response_to_alerting_rule'; +import { applyRuleDefaults } from '../mergers/apply_rule_defaults'; +import { validateMlAuth } from '../utils'; + +interface CreateRuleOptions { + rulesClient: RulesClient; + mlAuthz: MlAuthz; + rule: RuleCreateProps & { immutable: boolean }; + id?: string; + allowMissingConnectorSecrets?: boolean; +} + +export const createRule = async ({ + rulesClient, + mlAuthz, + rule, + id, + allowMissingConnectorSecrets, +}: CreateRuleOptions): Promise => { + await validateMlAuth(mlAuthz, rule.type); + + const ruleWithDefaults = applyRuleDefaults(rule); + + const payload = { + ...convertRuleResponseToAlertingRule(ruleWithDefaults), + alertTypeId: ruleTypeMappings[rule.type], + consumer: SERVER_APP_ID, + enabled: rule.enabled ?? false, + }; + + const createdRule = await rulesClient.create({ + data: payload, + options: { id }, + allowMissingConnectorSecrets, + }); + + return convertAlertingRuleToRuleResponse(createdRule); +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/delete_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/delete_rule.ts index ec1491e8159d77..4a9ca8abcdeb18 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/delete_rule.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/delete_rule.ts @@ -6,9 +6,13 @@ */ import type { RulesClient } from '@kbn/alerting-plugin/server'; -import type { DeleteRuleArgs } from '../detection_rules_client_interface'; +import type { RuleObjectId } from '../../../../../../../common/api/detection_engine'; -export const deleteRule = async (rulesClient: RulesClient, args: DeleteRuleArgs): Promise => { - const { ruleId } = args; +interface DeleteRuleParams { + rulesClient: RulesClient; + ruleId: RuleObjectId; +} + +export const deleteRule = async ({ rulesClient, ruleId }: DeleteRuleParams): Promise => { await rulesClient.delete({ id: ruleId }); }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/get_rule_by_id.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/get_rule_by_id.ts new file mode 100644 index 00000000000000..39ca15fda42f30 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/get_rule_by_id.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { RulesClient } from '@kbn/alerting-plugin/server'; +import type { + RuleObjectId, + RuleResponse, +} from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import type { RuleParams } from '../../../../rule_schema'; +import { convertAlertingRuleToRuleResponse } from '../converters/convert_alerting_rule_to_rule_response'; + +interface GethRuleByIdOptions { + rulesClient: RulesClient; + id: RuleObjectId; +} + +export const getRuleById = async ({ + rulesClient, + id, +}: GethRuleByIdOptions): Promise => { + try { + const rule = await rulesClient.resolve({ id }); + return convertAlertingRuleToRuleResponse(rule); + } catch (err) { + if (err?.output?.statusCode === 404) { + return null; + } + throw err; + } +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/get_rule_by_id_or_rule_id.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/get_rule_by_id_or_rule_id.ts new file mode 100644 index 00000000000000..fce28d1a1c0300 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/get_rule_by_id_or_rule_id.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 type { RulesClient } from '@kbn/alerting-plugin/server'; +import type { + RuleObjectId, + RuleResponse, + RuleSignatureId, +} from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import { invariant } from '../../../../../../../common/utils/invariant'; +import { getRuleById } from './get_rule_by_id'; +import { getRuleByRuleId } from './get_rule_by_rule_id'; + +interface GetRuleByIdOptions { + rulesClient: RulesClient; + id: RuleObjectId | undefined; + ruleId: RuleSignatureId | undefined; +} + +export const getRuleByIdOrRuleId = async ({ + rulesClient, + id, + ruleId, +}: GetRuleByIdOptions): Promise => { + if (id != null) { + return getRuleById({ rulesClient, id }); + } + if (ruleId != null) { + return getRuleByRuleId({ rulesClient, ruleId }); + } + invariant(false, 'Either id or ruleId must be provided'); +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/get_rule_by_rule_id.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/get_rule_by_rule_id.ts new file mode 100644 index 00000000000000..fda00cd292b885 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/get_rule_by_rule_id.ts @@ -0,0 +1,38 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { RulesClient } from '@kbn/alerting-plugin/server'; +import type { + RuleResponse, + RuleSignatureId, +} from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import { findRules } from '../../search/find_rules'; +import { convertAlertingRuleToRuleResponse } from '../converters/convert_alerting_rule_to_rule_response'; + +interface GetRuleByRuleIdOptions { + rulesClient: RulesClient; + ruleId: RuleSignatureId; +} + +export const getRuleByRuleId = async ({ + rulesClient, + ruleId, +}: GetRuleByRuleIdOptions): Promise => { + const findRuleResponse = await findRules({ + rulesClient, + filter: `alert.attributes.params.ruleId: "${ruleId}"`, + page: 1, + fields: undefined, + perPage: undefined, + sortField: undefined, + sortOrder: undefined, + }); + if (findRuleResponse.data.length === 0) { + return null; + } + return convertAlertingRuleToRuleResponse(findRuleResponse.data[0]); +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/import_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/import_rule.ts index 55a0399f1a5282..adb28133b62f3c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/import_rule.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/import_rule.ts @@ -6,78 +6,67 @@ */ import type { RulesClient } from '@kbn/alerting-plugin/server'; -import { stringifyZodError } from '@kbn/zod-helpers'; +import type { RuleResponse } from '../../../../../../../common/api/detection_engine/model/rule_schema'; import type { MlAuthz } from '../../../../../machine_learning/authz'; -import type { ImportRuleArgs } from '../detection_rules_client_interface'; -import type { RuleAlertType, RuleParams } from '../../../../rule_schema'; +import type { IPrebuiltRuleAssetsClient } from '../../../../prebuilt_rules/logic/rule_assets/prebuilt_rule_assets_client'; import { createBulkErrorObject } from '../../../../routes/utils'; -import { - convertCreateAPIToInternalSchema, - convertUpdateAPIToInternalSchema, - internalRuleToAPIResponse, -} from '../../../normalization/rule_converters'; -import { RuleResponse } from '../../../../../../../common/api/detection_engine/model/rule_schema'; - -import { validateMlAuth, RuleResponseValidationError } from '../utils'; +import { convertAlertingRuleToRuleResponse } from '../converters/convert_alerting_rule_to_rule_response'; +import { convertRuleResponseToAlertingRule } from '../converters/convert_rule_response_to_alerting_rule'; +import type { ImportRuleArgs } from '../detection_rules_client_interface'; +import { applyRuleUpdate } from '../mergers/apply_rule_update'; +import { validateMlAuth } from '../utils'; +import { createRule } from './create_rule'; +import { getRuleByRuleId } from './get_rule_by_rule_id'; -import { readRules } from '../read_rules'; +interface ImportRuleOptions { + rulesClient: RulesClient; + prebuiltRuleAssetClient: IPrebuiltRuleAssetsClient; + importRulePayload: ImportRuleArgs; + mlAuthz: MlAuthz; +} -export const importRule = async ( - rulesClient: RulesClient, - importRulePayload: ImportRuleArgs, - mlAuthz: MlAuthz -): Promise => { +export const importRule = async ({ + rulesClient, + importRulePayload, + prebuiltRuleAssetClient, + mlAuthz, +}: ImportRuleOptions): Promise => { const { ruleToImport, overwriteRules, allowMissingConnectorSecrets } = importRulePayload; await validateMlAuth(mlAuthz, ruleToImport.type); - const existingRule = await readRules({ + const existingRule = await getRuleByRuleId({ rulesClient, ruleId: ruleToImport.rule_id, - id: undefined, }); if (existingRule && !overwriteRules) { throw createBulkErrorObject({ - ruleId: existingRule.params.ruleId, + ruleId: existingRule.rule_id, statusCode: 409, - message: `rule_id: "${existingRule.params.ruleId}" already exists`, + message: `rule_id: "${existingRule.rule_id}" already exists`, }); } - let importedInternalRule: RuleAlertType; - if (existingRule && overwriteRules) { - const ruleUpdateParams = convertUpdateAPIToInternalSchema({ + const ruleWithUpdates = await applyRuleUpdate({ + prebuiltRuleAssetClient, existingRule, ruleUpdate: ruleToImport, }); - importedInternalRule = await rulesClient.update({ + const updatedRule = await rulesClient.update({ id: existingRule.id, - data: ruleUpdateParams, - }); - } else { - /* Rule does not exist, so we'll create it */ - const ruleCreateParams = convertCreateAPIToInternalSchema(ruleToImport, { - immutable: false, - }); - - importedInternalRule = await rulesClient.create({ - data: ruleCreateParams, - allowMissingConnectorSecrets, + data: convertRuleResponseToAlertingRule(ruleWithUpdates), }); + return convertAlertingRuleToRuleResponse(updatedRule); } - /* Trying to convert an internal rule to a RuleResponse object */ - const parseResult = RuleResponse.safeParse(internalRuleToAPIResponse(importedInternalRule)); - - if (!parseResult.success) { - throw new RuleResponseValidationError({ - message: stringifyZodError(parseResult.error), - ruleId: importedInternalRule.params.ruleId, - }); - } - - return parseResult.data; + /* Rule does not exist, so we'll create it */ + return createRule({ + rulesClient, + mlAuthz, + rule: ruleToImport, + allowMissingConnectorSecrets, + }); }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/patch_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/patch_rule.ts index ce9956c5eec841..d615d5fc5a8171 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/patch_rule.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/patch_rule.ts @@ -6,34 +6,35 @@ */ import type { RulesClient } from '@kbn/alerting-plugin/server'; -import { stringifyZodError } from '@kbn/zod-helpers'; +import type { + RulePatchProps, + RuleResponse, +} from '../../../../../../../common/api/detection_engine/model/rule_schema'; import type { MlAuthz } from '../../../../../machine_learning/authz'; -import type { PatchRuleArgs } from '../detection_rules_client_interface'; +import type { IPrebuiltRuleAssetsClient } from '../../../../prebuilt_rules/logic/rule_assets/prebuilt_rule_assets_client'; +import { applyRulePatch } from '../mergers/apply_rule_patch'; import { getIdError } from '../../../utils/utils'; -import { - convertPatchAPIToInternalSchema, - internalRuleToAPIResponse, -} from '../../../normalization/rule_converters'; -import { RuleResponse } from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import { convertAlertingRuleToRuleResponse } from '../converters/convert_alerting_rule_to_rule_response'; +import { convertRuleResponseToAlertingRule } from '../converters/convert_rule_response_to_alerting_rule'; +import { ClientError, toggleRuleEnabledOnUpdate, validateMlAuth } from '../utils'; +import { getRuleByIdOrRuleId } from './get_rule_by_id_or_rule_id'; -import { - validateMlAuth, - ClientError, - toggleRuleEnabledOnUpdate, - RuleResponseValidationError, -} from '../utils'; +interface PatchRuleOptions { + rulesClient: RulesClient; + prebuiltRuleAssetClient: IPrebuiltRuleAssetsClient; + rulePatch: RulePatchProps; + mlAuthz: MlAuthz; +} -import { readRules } from '../read_rules'; +export const patchRule = async ({ + rulesClient, + prebuiltRuleAssetClient, + rulePatch, + mlAuthz, +}: PatchRuleOptions): Promise => { + const { rule_id: ruleId, id } = rulePatch; -export const patchRule = async ( - rulesClient: RulesClient, - args: PatchRuleArgs, - mlAuthz: MlAuthz -): Promise => { - const { nextParams } = args; - const { rule_id: ruleId, id } = nextParams; - - const existingRule = await readRules({ + const existingRule = await getRuleByIdOrRuleId({ rulesClient, ruleId, id, @@ -44,32 +45,20 @@ export const patchRule = async ( throw new ClientError(error.message, error.statusCode); } - await validateMlAuth(mlAuthz, nextParams.type ?? existingRule.params.type); + await validateMlAuth(mlAuthz, rulePatch.type ?? existingRule.type); - const patchedRule = convertPatchAPIToInternalSchema(nextParams, existingRule); + const patchedRule = await applyRulePatch({ + prebuiltRuleAssetClient, + existingRule, + rulePatch, + }); const patchedInternalRule = await rulesClient.update({ id: existingRule.id, - data: patchedRule, + data: convertRuleResponseToAlertingRule(patchedRule), }); - const { enabled } = await toggleRuleEnabledOnUpdate( - rulesClient, - existingRule, - nextParams.enabled - ); - - /* Trying to convert the internal rule to a RuleResponse object */ - const parseResult = RuleResponse.safeParse( - internalRuleToAPIResponse({ ...patchedInternalRule, enabled }) - ); - - if (!parseResult.success) { - throw new RuleResponseValidationError({ - message: stringifyZodError(parseResult.error), - ruleId: patchedInternalRule.params.ruleId, - }); - } + const { enabled } = await toggleRuleEnabledOnUpdate(rulesClient, existingRule, patchedRule); - return parseResult.data; + return convertAlertingRuleToRuleResponse({ ...patchedInternalRule, enabled }); }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/update_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/update_rule.ts index 8684a7ccd2c61c..cf42074c2a0425 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/update_rule.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/update_rule.ts @@ -6,36 +6,37 @@ */ import type { RulesClient } from '@kbn/alerting-plugin/server'; -import { stringifyZodError } from '@kbn/zod-helpers'; +import type { RuleResponse } from '../../../../../../../common/api/detection_engine/model/rule_schema'; import type { MlAuthz } from '../../../../../machine_learning/authz'; -import type { UpdateRuleArgs } from '../detection_rules_client_interface'; +import { applyRuleUpdate } from '../mergers/apply_rule_update'; import { getIdError } from '../../../utils/utils'; -import { - convertUpdateAPIToInternalSchema, - internalRuleToAPIResponse, -} from '../../../normalization/rule_converters'; -import { RuleResponse } from '../../../../../../../common/api/detection_engine/model/rule_schema'; +import { convertRuleResponseToAlertingRule } from '../converters/convert_rule_response_to_alerting_rule'; -import { - validateMlAuth, - ClientError, - toggleRuleEnabledOnUpdate, - RuleResponseValidationError, -} from '../utils'; +import { ClientError, toggleRuleEnabledOnUpdate, validateMlAuth } from '../utils'; -import { readRules } from '../read_rules'; +import type { RuleUpdateProps } from '../../../../../../../common/api/detection_engine'; +import type { IPrebuiltRuleAssetsClient } from '../../../../prebuilt_rules/logic/rule_assets/prebuilt_rule_assets_client'; +import { getRuleByIdOrRuleId } from './get_rule_by_id_or_rule_id'; +import { convertAlertingRuleToRuleResponse } from '../converters/convert_alerting_rule_to_rule_response'; -export const updateRule = async ( - rulesClient: RulesClient, - args: UpdateRuleArgs, - mlAuthz: MlAuthz -): Promise => { - const { ruleUpdate } = args; +interface UpdateRuleArguments { + rulesClient: RulesClient; + prebuiltRuleAssetClient: IPrebuiltRuleAssetsClient; + ruleUpdate: RuleUpdateProps; + mlAuthz: MlAuthz; +} + +export const updateRule = async ({ + rulesClient, + prebuiltRuleAssetClient, + ruleUpdate, + mlAuthz, +}: UpdateRuleArguments): Promise => { const { rule_id: ruleId, id } = ruleUpdate; await validateMlAuth(mlAuthz, ruleUpdate.type); - const existingRule = await readRules({ + const existingRule = await getRuleByIdOrRuleId({ rulesClient, ruleId, id, @@ -46,33 +47,21 @@ export const updateRule = async ( throw new ClientError(error.message, error.statusCode); } - const newInternalRule = convertUpdateAPIToInternalSchema({ + const ruleWithUpdates = await applyRuleUpdate({ + prebuiltRuleAssetClient, existingRule, ruleUpdate, }); - const updatedInternalRule = await rulesClient.update({ + const updatedRule = await rulesClient.update({ id: existingRule.id, - data: newInternalRule, + data: convertRuleResponseToAlertingRule(ruleWithUpdates), }); - const { enabled } = await toggleRuleEnabledOnUpdate( - rulesClient, - existingRule, - ruleUpdate.enabled - ); - - /* Trying to convert the internal rule to a RuleResponse object */ - const parseResult = RuleResponse.safeParse( - internalRuleToAPIResponse({ ...updatedInternalRule, enabled }) - ); + const { enabled } = await toggleRuleEnabledOnUpdate(rulesClient, existingRule, ruleWithUpdates); - if (!parseResult.success) { - throw new RuleResponseValidationError({ - message: stringifyZodError(parseResult.error), - ruleId: updatedInternalRule.params.ruleId, - }); - } - - return parseResult.data; + return convertAlertingRuleToRuleResponse({ + ...updatedRule, + enabled, + }); }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/upgrade_prebuilt_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/upgrade_prebuilt_rule.ts index 8c1079f5716dbe..4eef323be2fd95 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/upgrade_prebuilt_rule.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/upgrade_prebuilt_rule.ts @@ -6,94 +6,74 @@ */ import type { RulesClient } from '@kbn/alerting-plugin/server'; -import { stringifyZodError } from '@kbn/zod-helpers'; +import type { RuleResponse } from '../../../../../../../common/api/detection_engine/model/rule_schema'; import type { MlAuthz } from '../../../../../machine_learning/authz'; -import type { RuleParams } from '../../../../rule_schema'; -import type { UpgradePrebuiltRuleArgs } from '../detection_rules_client_interface'; -import { - convertPatchAPIToInternalSchema, - convertCreateAPIToInternalSchema, - internalRuleToAPIResponse, -} from '../../../normalization/rule_converters'; -import { transformAlertToRuleAction } from '../../../../../../../common/detection_engine/transform_actions'; -import { RuleResponse } from '../../../../../../../common/api/detection_engine/model/rule_schema'; - -import { validateMlAuth, ClientError, RuleResponseValidationError } from '../utils'; - -import { readRules } from '../read_rules'; - -export const upgradePrebuiltRule = async ( - rulesClient: RulesClient, - upgradePrebuiltRulePayload: UpgradePrebuiltRuleArgs, - mlAuthz: MlAuthz -): Promise => { - const { ruleAsset } = upgradePrebuiltRulePayload; - +import type { PrebuiltRuleAsset } from '../../../../prebuilt_rules'; +import type { IPrebuiltRuleAssetsClient } from '../../../../prebuilt_rules/logic/rule_assets/prebuilt_rule_assets_client'; +import { convertAlertingRuleToRuleResponse } from '../converters/convert_alerting_rule_to_rule_response'; +import { convertRuleResponseToAlertingRule } from '../converters/convert_rule_response_to_alerting_rule'; +import { applyRulePatch } from '../mergers/apply_rule_patch'; +import { ClientError, validateMlAuth } from '../utils'; +import { createRule } from './create_rule'; +import { getRuleByRuleId } from './get_rule_by_rule_id'; + +export const upgradePrebuiltRule = async ({ + rulesClient, + ruleAsset, + mlAuthz, + prebuiltRuleAssetClient, +}: { + rulesClient: RulesClient; + ruleAsset: PrebuiltRuleAsset; + mlAuthz: MlAuthz; + prebuiltRuleAssetClient: IPrebuiltRuleAssetsClient; +}): Promise => { await validateMlAuth(mlAuthz, ruleAsset.type); - const existingRule = await readRules({ + const existingRule = await getRuleByRuleId({ rulesClient, ruleId: ruleAsset.rule_id, - id: undefined, }); if (!existingRule) { throw new ClientError(`Failed to find rule ${ruleAsset.rule_id}`, 500); } - if (ruleAsset.type !== existingRule.params.type) { + if (ruleAsset.type !== existingRule.type) { // If we're trying to change the type of a prepackaged rule, we need to delete the old one // and replace it with the new rule, keeping the enabled setting, actions, throttle, id, // and exception lists from the old rule await rulesClient.delete({ id: existingRule.id }); - const internalRule = convertCreateAPIToInternalSchema( - { + const createdRule = await createRule({ + rulesClient, + mlAuthz, + rule: { ...ruleAsset, + immutable: true, enabled: existingRule.enabled, - exceptions_list: existingRule.params.exceptionsList, - actions: existingRule.actions.map(transformAlertToRuleAction), - timeline_id: existingRule.params.timelineId, - timeline_title: existingRule.params.timelineTitle, + exceptions_list: existingRule.exceptions_list, + actions: existingRule.actions, + timeline_id: existingRule.timeline_id, + timeline_title: existingRule.timeline_title, }, - { immutable: true, defaultEnabled: existingRule.enabled } - ); - - const createdRule = await rulesClient.create({ - data: internalRule, - options: { id: existingRule.id }, + id: existingRule.id, }); - /* Trying to convert the rule to a RuleResponse object */ - const parseResult = RuleResponse.safeParse(internalRuleToAPIResponse(createdRule)); - - if (!parseResult.success) { - throw new RuleResponseValidationError({ - message: stringifyZodError(parseResult.error), - ruleId: createdRule.params.ruleId, - }); - } - - return parseResult.data; + return createdRule; } // Else, simply patch it. - const patchedRule = convertPatchAPIToInternalSchema(ruleAsset, existingRule); + const patchedRule = await applyRulePatch({ + prebuiltRuleAssetClient, + existingRule, + rulePatch: ruleAsset, + }); const patchedInternalRule = await rulesClient.update({ id: existingRule.id, - data: patchedRule, + data: convertRuleResponseToAlertingRule(patchedRule), }); - /* Trying to convert the internal rule to a RuleResponse object */ - const parseResult = RuleResponse.safeParse(internalRuleToAPIResponse(patchedInternalRule)); - - if (!parseResult.success) { - throw new RuleResponseValidationError({ - message: stringifyZodError(parseResult.error), - ruleId: patchedInternalRule.params.ruleId, - }); - } - - return parseResult.data; + return convertAlertingRuleToRuleResponse(patchedInternalRule); }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/read_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/read_rules.ts index d699d5ee7dd559..67c7746bd0eb36 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/read_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/read_rules.ts @@ -30,6 +30,8 @@ export interface ReadRuleOptions { * be returned as a not-found or a thrown error that is not 404. * @param ruleId - This is a close second to being fast as long as it can find the rule_id from * a filter query against the ruleId property in params using `alert.attributes.params.ruleId: "${ruleId}"` + * + * @deprecated Should be replaced with DetectionRulesClient.getRuleById once it's implemented */ export const readRules = async ({ rulesClient, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/utils.ts index 4f25497b305640..db2af377eb5b1d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/utils.ts @@ -12,21 +12,21 @@ import type { RulesClient } from '@kbn/alerting-plugin/server'; import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; import type { MlAuthz } from '../../../../machine_learning/authz'; -import type { RuleAlertType } from '../../../rule_schema'; import type { RuleSignatureId } from '../../../../../../common/api/detection_engine/model/rule_schema/common_attributes.gen'; import { throwAuthzError } from '../../../../machine_learning/validation'; +import type { RuleResponse } from '../../../../../../common/api/detection_engine'; export const toggleRuleEnabledOnUpdate = async ( rulesClient: RulesClient, - existingRule: RuleAlertType, - updatedRuleEnabled?: boolean + existingRule: RuleResponse, + updatedRule: RuleResponse ): Promise<{ enabled: boolean }> => { - if (existingRule.enabled && updatedRuleEnabled === false) { + if (existingRule.enabled && !updatedRule.enabled) { await rulesClient.disable({ id: existingRule.id }); return { enabled: false }; } - if (!existingRule.enabled && updatedRuleEnabled === true) { + if (!existingRule.enabled && updatedRule.enabled) { await rulesClient.enable({ id: existingRule.id }); return { enabled: true }; } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/export/get_export_by_object_ids.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/export/get_export_by_object_ids.test.ts index 08794143ce161b..5093393d6d6573 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/export/get_export_by_object_ids.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/export/get_export_by_object_ids.test.ts @@ -15,7 +15,7 @@ import { getRuleMock, } from '../../../routes/__mocks__/request_responses'; import { getThreatMock } from '../../../../../../common/detection_engine/schemas/types/threat.mock'; -import { internalRuleToAPIResponse } from '../../normalization/rule_converters'; +import { internalRuleToAPIResponse } from '../detection_rules_client/converters/internal_rule_to_api_response'; import { getEqlRuleParams, getQueryRuleParams } from '../../../rule_schema/mocks'; import { getExportByObjectIds } from './get_export_by_object_ids'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/export/get_export_by_object_ids.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/export/get_export_by_object_ids.ts index ce57b33227ca42..7c3142aed85f6d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/export/get_export_by_object_ids.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/export/get_export_by_object_ids.ts @@ -13,7 +13,7 @@ import type { ExceptionListClient } from '@kbn/lists-plugin/server'; import type { RulesClient, PartialRule } from '@kbn/alerting-plugin/server'; import type { ActionsClient } from '@kbn/actions-plugin/server'; import { withSecuritySpan } from '../../../../../utils/with_security_span'; -import { internalRuleToAPIResponse } from '../../normalization/rule_converters'; +import { internalRuleToAPIResponse } from '../detection_rules_client/converters/internal_rule_to_api_response'; import type { RuleParams } from '../../../rule_schema'; import { hasValidRuleType } from '../../../rule_schema'; import { findRules } from '../search/find_rules'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/normalization/rule_converters.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/normalization/rule_converters.test.ts deleted file mode 100644 index 5df02371befa2e..00000000000000 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/normalization/rule_converters.test.ts +++ /dev/null @@ -1,491 +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 { - commonParamsCamelToSnake, - patchTypeSpecificSnakeToCamel, - typeSpecificCamelToSnake, -} from './rule_converters'; -import { - getBaseRuleParams, - getEqlRuleParams, - getEsqlRuleParams, - getMlRuleParams, - getNewTermsRuleParams, - getQueryRuleParams, - getSavedQueryRuleParams, - getThreatRuleParams, - getThresholdRuleParams, -} from '../../rule_schema/mocks'; -import type { - AlertSuppressionDuration, - PatchRuleRequestBody, - AlertSuppressionMissingFieldsStrategy, -} from '../../../../../common/api/detection_engine'; - -describe('rule_converters', () => { - describe('patchTypeSpecificSnakeToCamel', () => { - describe('EQL', () => { - test('should accept EQL params when existing rule type is EQL', () => { - const patchParams = { - timestamp_field: 'event.created', - event_category_override: 'event.not_category', - tiebreaker_field: 'event.created', - }; - const rule = getEqlRuleParams(); - const patchedParams = patchTypeSpecificSnakeToCamel(patchParams, rule); - expect(patchedParams).toEqual( - expect.objectContaining({ - timestampField: 'event.created', - eventCategoryOverride: 'event.not_category', - tiebreakerField: 'event.created', - }) - ); - }); - test('should accept EQL params with suppression in snake case and convert to camel case when rule type is EQL', () => { - const patchParams = { - timestamp_field: 'event.created', - event_category_override: 'event.not_category', - tiebreaker_field: 'event.created', - alert_suppression: { - group_by: ['event.type'], - duration: { - value: 10, - unit: 'm', - } as AlertSuppressionDuration, - missing_fields_strategy: 'suppress', - }, - }; - const rule = getEqlRuleParams(); - const patchedParams = patchTypeSpecificSnakeToCamel(patchParams, rule); - expect(patchedParams).toEqual( - expect.objectContaining({ - timestampField: 'event.created', - eventCategoryOverride: 'event.not_category', - tiebreakerField: 'event.created', - alertSuppression: { - groupBy: ['event.type'], - duration: { - value: 10, - unit: 'm', - }, - missingFieldsStrategy: 'suppress', - }, - }) - ); - }); - test('should reject invalid EQL params when existing rule type is EQL', () => { - const patchParams = { - timestamp_field: 1, - event_category_override: 1, - tiebreaker_field: 1, - } as PatchRuleRequestBody; - const rule = getEqlRuleParams(); - expect(() => patchTypeSpecificSnakeToCamel(patchParams, rule)).toThrowError( - 'event_category_override: Expected string, received number, tiebreaker_field: Expected string, received number, timestamp_field: Expected string, received number' - ); - }); - test('should reject EQL params with invalid suppression group_by field', () => { - const patchParams = { - timestamp_field: 'event.created', - event_category_override: 'event.not_category', - tiebreaker_field: 'event.created', - alert_suppression: { - group_by: 'event.type', - duration: { - value: 10, - unit: 'm', - } as AlertSuppressionDuration, - missing_fields_strategy: 'suppress', - }, - }; - const rule = getEqlRuleParams(); - expect(() => patchTypeSpecificSnakeToCamel(patchParams, rule)).toThrowError( - 'alert_suppression.group_by: Expected array, received string' - ); - }); - }); - - describe('machine learning rules', () => { - test('should accept machine learning params when existing rule type is machine learning', () => { - const patchParams = { - anomaly_threshold: 5, - }; - const rule = getMlRuleParams(); - const patchedParams = patchTypeSpecificSnakeToCamel(patchParams, rule); - expect(patchedParams).toEqual( - expect.objectContaining({ - anomalyThreshold: 5, - }) - ); - }); - - test('should reject invalid machine learning params when existing rule type is machine learning', () => { - const patchParams = { - anomaly_threshold: 'invalid', - } as PatchRuleRequestBody; - const rule = getMlRuleParams(); - expect(() => patchTypeSpecificSnakeToCamel(patchParams, rule)).toThrowError( - 'anomaly_threshold: Expected number, received string' - ); - }); - - it('accepts suppression params', () => { - const patchParams = { - alert_suppression: { - group_by: ['agent.name'], - missing_fields_strategy: 'suppress' as const, - }, - }; - const rule = getMlRuleParams(); - const patchedParams = patchTypeSpecificSnakeToCamel(patchParams, rule); - - expect(patchedParams).toEqual( - expect.objectContaining({ - alertSuppression: { - groupBy: ['agent.name'], - missingFieldsStrategy: 'suppress', - }, - }) - ); - }); - }); - - test('should accept threat match params when existing rule type is threat match', () => { - const patchParams = { - threat_indicator_path: 'my.indicator', - threat_query: 'test-query', - }; - const rule = getThreatRuleParams(); - const patchedParams = patchTypeSpecificSnakeToCamel(patchParams, rule); - expect(patchedParams).toEqual( - expect.objectContaining({ - threatIndicatorPath: 'my.indicator', - threatQuery: 'test-query', - }) - ); - }); - - test('should reject invalid threat match params when existing rule type is threat match', () => { - const patchParams = { - threat_indicator_path: 1, - threat_query: 1, - } as PatchRuleRequestBody; - const rule = getThreatRuleParams(); - expect(() => patchTypeSpecificSnakeToCamel(patchParams, rule)).toThrowError( - 'threat_query: Expected string, received number, threat_indicator_path: Expected string, received number' - ); - }); - - test('should accept query params when existing rule type is query', () => { - const patchParams = { - index: ['new-test-index'], - language: 'lucene', - } as PatchRuleRequestBody; - const rule = getQueryRuleParams(); - const patchedParams = patchTypeSpecificSnakeToCamel(patchParams, rule); - expect(patchedParams).toEqual( - expect.objectContaining({ - index: ['new-test-index'], - language: 'lucene', - }) - ); - }); - - test('should reject invalid query params when existing rule type is query', () => { - const patchParams = { - index: [1], - language: 'non-language', - } as PatchRuleRequestBody; - const rule = getQueryRuleParams(); - expect(() => patchTypeSpecificSnakeToCamel(patchParams, rule)).toThrowError( - "index.0: Expected string, received number, language: Invalid enum value. Expected 'kuery' | 'lucene', received 'non-language'" - ); - }); - - test('should accept saved query params when existing rule type is saved query', () => { - const patchParams = { - index: ['new-test-index'], - language: 'lucene', - } as PatchRuleRequestBody; - const rule = getSavedQueryRuleParams(); - const patchedParams = patchTypeSpecificSnakeToCamel(patchParams, rule); - expect(patchedParams).toEqual( - expect.objectContaining({ - index: ['new-test-index'], - language: 'lucene', - }) - ); - }); - - test('should reject invalid saved query params when existing rule type is saved query', () => { - const patchParams = { - index: [1], - language: 'non-language', - } as PatchRuleRequestBody; - const rule = getSavedQueryRuleParams(); - expect(() => patchTypeSpecificSnakeToCamel(patchParams, rule)).toThrowError( - "index.0: Expected string, received number, language: Invalid enum value. Expected 'kuery' | 'lucene', received 'non-language'" - ); - }); - - test('should accept threshold params when existing rule type is threshold', () => { - const patchParams = { - threshold: { - field: ['host.name'], - value: 107, - }, - }; - const rule = getThresholdRuleParams(); - const patchedParams = patchTypeSpecificSnakeToCamel(patchParams, rule); - expect(patchedParams).toEqual( - expect.objectContaining({ - threshold: { - field: ['host.name'], - value: 107, - }, - }) - ); - }); - - test('should reject invalid threshold params when existing rule type is threshold', () => { - const patchParams = { - threshold: { - field: ['host.name'], - value: 'invalid', - }, - } as PatchRuleRequestBody; - const rule = getThresholdRuleParams(); - expect(() => patchTypeSpecificSnakeToCamel(patchParams, rule)).toThrowError( - 'threshold.value: Expected number, received string' - ); - }); - - test('should accept ES|QL alerts suppression params', () => { - const patchParams = { - alert_suppression: { - group_by: ['agent.name'], - duration: { value: 4, unit: 'h' as const }, - missing_fields_strategy: 'doNotSuppress' as const, - }, - }; - const rule = getEsqlRuleParams(); - const patchedParams = patchTypeSpecificSnakeToCamel(patchParams, rule); - expect(patchedParams).toEqual( - expect.objectContaining({ - alertSuppression: { - groupBy: ['agent.name'], - missingFieldsStrategy: 'doNotSuppress', - duration: { value: 4, unit: 'h' }, - }, - }) - ); - }); - - test('should accept threshold alerts suppression params', () => { - const patchParams = { - alert_suppression: { - duration: { value: 4, unit: 'h' as const }, - }, - }; - const rule = getThresholdRuleParams(); - const patchedParams = patchTypeSpecificSnakeToCamel(patchParams, rule); - expect(patchedParams).toEqual( - expect.objectContaining({ - alertSuppression: { - duration: { value: 4, unit: 'h' }, - }, - }) - ); - }); - - test('should accept threat_match alerts suppression params', () => { - const patchParams = { - alert_suppression: { - group_by: ['agent.name'], - missing_fields_strategy: 'suppress' as const, - }, - }; - const rule = getThreatRuleParams(); - const patchedParams = patchTypeSpecificSnakeToCamel(patchParams, rule); - expect(patchedParams).toEqual( - expect.objectContaining({ - alertSuppression: { - groupBy: ['agent.name'], - missingFieldsStrategy: 'suppress', - }, - }) - ); - }); - - test('should accept new_terms alerts suppression params', () => { - const patchParams = { - alert_suppression: { - group_by: ['agent.name'], - duration: { value: 4, unit: 'h' as const }, - missing_fields_strategy: 'suppress' as const, - }, - }; - const rule = getNewTermsRuleParams(); - const patchedParams = patchTypeSpecificSnakeToCamel(patchParams, rule); - expect(patchedParams).toEqual( - expect.objectContaining({ - alertSuppression: { - groupBy: ['agent.name'], - missingFieldsStrategy: 'suppress', - duration: { value: 4, unit: 'h' }, - }, - }) - ); - }); - - test('should accept new terms params when existing rule type is new terms', () => { - const patchParams = { - new_terms_fields: ['event.new_field'], - }; - const rule = getNewTermsRuleParams(); - const patchedParams = patchTypeSpecificSnakeToCamel(patchParams, rule); - expect(patchedParams).toEqual( - expect.objectContaining({ - newTermsFields: ['event.new_field'], - }) - ); - }); - - test('should reject invalid new terms params when existing rule type is new terms', () => { - const patchParams = { - new_terms_fields: 'invalid', - } as PatchRuleRequestBody; - const rule = getNewTermsRuleParams(); - expect(() => patchTypeSpecificSnakeToCamel(patchParams, rule)).toThrowError( - 'new_terms_fields: Expected array, received string' - ); - }); - }); - - describe('typeSpecificCamelToSnake', () => { - describe('EQL', () => { - test('should accept EQL params when existing rule type is EQL', () => { - const params = { - timestampField: 'event.created', - eventCategoryOverride: 'event.not_category', - tiebreakerField: 'event.created', - }; - const eqlRule = { ...getEqlRuleParams(), ...params }; - const transformedParams = typeSpecificCamelToSnake(eqlRule); - expect(transformedParams).toEqual( - expect.objectContaining({ - timestamp_field: 'event.created', - event_category_override: 'event.not_category', - tiebreaker_field: 'event.created', - }) - ); - }); - - test('should accept EQL params with suppression in camel case and convert to snake case when rule type is EQL', () => { - const params = { - timestampField: 'event.created', - eventCategoryOverride: 'event.not_category', - tiebreakerField: 'event.created', - alertSuppression: { - groupBy: ['event.type'], - duration: { - value: 10, - unit: 'm', - } as AlertSuppressionDuration, - missingFieldsStrategy: 'suppress' as AlertSuppressionMissingFieldsStrategy, - }, - }; - const eqlRule = { ...getEqlRuleParams(), ...params }; - const transformedParams = typeSpecificCamelToSnake(eqlRule); - expect(transformedParams).toEqual( - expect.objectContaining({ - timestamp_field: 'event.created', - event_category_override: 'event.not_category', - tiebreaker_field: 'event.created', - alert_suppression: { - group_by: ['event.type'], - duration: { - value: 10, - unit: 'm', - } as AlertSuppressionDuration, - missing_fields_strategy: 'suppress', - }, - }) - ); - }); - }); - - describe('machine learning rules', () => { - it('accepts normal params', () => { - const params = { - anomalyThreshold: 74, - machineLearningJobId: ['job-1'], - }; - const ruleParams = { ...getMlRuleParams(), ...params }; - const transformedParams = typeSpecificCamelToSnake(ruleParams); - expect(transformedParams).toEqual( - expect.objectContaining({ - anomaly_threshold: 74, - machine_learning_job_id: ['job-1'], - }) - ); - }); - - it('accepts suppression params', () => { - const params = { - anomalyThreshold: 74, - machineLearningJobId: ['job-1'], - alertSuppression: { - groupBy: ['event.type'], - duration: { - value: 10, - unit: 'm', - } as AlertSuppressionDuration, - missingFieldsStrategy: 'suppress' as AlertSuppressionMissingFieldsStrategy, - }, - }; - const ruleParams = { ...getMlRuleParams(), ...params }; - const transformedParams = typeSpecificCamelToSnake(ruleParams); - expect(transformedParams).toEqual( - expect.objectContaining({ - anomaly_threshold: 74, - machine_learning_job_id: ['job-1'], - alert_suppression: { - group_by: ['event.type'], - duration: { - value: 10, - unit: 'm', - }, - missing_fields_strategy: 'suppress', - }, - }) - ); - }); - }); - }); - - describe('commonParamsCamelToSnake', () => { - test('should convert rule_source params to snake case', () => { - const transformedParams = commonParamsCamelToSnake({ - ...getBaseRuleParams(), - ruleSource: { - type: 'external', - isCustomized: false, - }, - }); - expect(transformedParams).toEqual( - expect.objectContaining({ - rule_source: { - type: 'external', - is_customized: false, - }, - }) - ); - }); - }); -}); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/normalization/rule_converters.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/normalization/rule_converters.ts deleted file mode 100644 index db815f32fb5ed3..00000000000000 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/normalization/rule_converters.ts +++ /dev/null @@ -1,869 +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 { v4 as uuidv4 } from 'uuid'; - -import { stringifyZodError } from '@kbn/zod-helpers'; -import { BadRequestError } from '@kbn/securitysolution-es-utils'; -import { ruleTypeMappings } from '@kbn/securitysolution-rules'; -import type { ResolvedSanitizedRule, SanitizedRule } from '@kbn/alerting-plugin/common'; - -import type { RequiredOptional } from '@kbn/zod-helpers'; -import { - DEFAULT_INDICATOR_SOURCE_PATH, - DEFAULT_MAX_SIGNALS, - SERVER_APP_ID, -} from '../../../../../common/constants'; - -import type { PatchRuleRequestBody } from '../../../../../common/api/detection_engine/rule_management'; -import type { - RuleCreateProps, - RuleUpdateProps, - TypeSpecificCreateProps, - TypeSpecificResponse, -} from '../../../../../common/api/detection_engine/model/rule_schema'; -import { - EqlRulePatchFields, - EsqlRulePatchFields, - MachineLearningRulePatchFields, - NewTermsRulePatchFields, - QueryRulePatchFields, - SavedQueryRulePatchFields, - ThreatMatchRulePatchFields, - ThresholdRulePatchFields, - RuleResponse, -} from '../../../../../common/api/detection_engine/model/rule_schema'; - -import { - transformAlertToRuleAction, - transformAlertToRuleResponseAction, - transformRuleToAlertAction, - transformRuleToAlertResponseAction, -} from '../../../../../common/detection_engine/transform_actions'; - -import { - normalizeMachineLearningJobIds, - normalizeThresholdObject, -} from '../../../../../common/detection_engine/utils'; - -import { assertUnreachable } from '../../../../../common/utility_types'; - -import type { - InternalRuleCreate, - RuleParams, - TypeSpecificRuleParams, - BaseRuleParams, - EqlRuleParams, - EqlSpecificRuleParams, - EsqlRuleParams, - EsqlSpecificRuleParams, - ThreatRuleParams, - ThreatSpecificRuleParams, - QueryRuleParams, - QuerySpecificRuleParams, - SavedQuerySpecificRuleParams, - SavedQueryRuleParams, - ThresholdRuleParams, - ThresholdSpecificRuleParams, - MachineLearningRuleParams, - MachineLearningSpecificRuleParams, - InternalRuleUpdate, - NewTermsRuleParams, - NewTermsSpecificRuleParams, - RuleSourceCamelCased, -} from '../../rule_schema'; -import { transformFromAlertThrottle, transformToActionFrequency } from './rule_actions'; -import { - addEcsToRequiredFields, - convertAlertSuppressionToCamel, - convertAlertSuppressionToSnake, - migrateLegacyInvestigationFields, -} from '../utils/utils'; -import { createRuleExecutionSummary } from '../../rule_monitoring'; -import type { PrebuiltRuleAsset } from '../../prebuilt_rules'; -import { convertObjectKeysToSnakeCase } from '../../../../utils/object_case_converters'; - -const DEFAULT_FROM = 'now-6m' as const; -const DEFAULT_TO = 'now' as const; -const DEFAULT_INTERVAL = '5m' as const; - -// These functions provide conversions from the request API schema to the internal rule schema and from the internal rule schema -// to the response API schema. This provides static type-check assurances that the internal schema is in sync with the API schema for -// required and default-able fields. However, it is still possible to add an optional field to the API schema -// without causing a type-check error here. - -// Converts params from the snake case API format to the internal camel case format AND applies default values where needed. -// Notice that params.language is possibly undefined for most rule types in the API but we default it to kuery to match -// the legacy API behavior -export const typeSpecificSnakeToCamel = ( - params: TypeSpecificCreateProps -): TypeSpecificRuleParams => { - switch (params.type) { - case 'eql': { - return { - type: params.type, - language: params.language, - index: params.index, - dataViewId: params.data_view_id, - query: params.query, - filters: params.filters, - timestampField: params.timestamp_field, - eventCategoryOverride: params.event_category_override, - tiebreakerField: params.tiebreaker_field, - alertSuppression: convertAlertSuppressionToCamel(params.alert_suppression), - }; - } - case 'esql': { - return { - type: params.type, - language: params.language, - query: params.query, - alertSuppression: convertAlertSuppressionToCamel(params.alert_suppression), - }; - } - case 'threat_match': { - return { - type: params.type, - language: params.language ?? 'kuery', - index: params.index, - dataViewId: params.data_view_id, - query: params.query, - filters: params.filters, - savedId: params.saved_id, - threatFilters: params.threat_filters, - threatQuery: params.threat_query, - threatMapping: params.threat_mapping, - threatLanguage: params.threat_language, - threatIndex: params.threat_index, - threatIndicatorPath: params.threat_indicator_path ?? DEFAULT_INDICATOR_SOURCE_PATH, - concurrentSearches: params.concurrent_searches, - itemsPerSearch: params.items_per_search, - alertSuppression: convertAlertSuppressionToCamel(params.alert_suppression), - }; - } - case 'query': { - return { - type: params.type, - language: params.language ?? 'kuery', - index: params.index, - dataViewId: params.data_view_id, - query: params.query ?? '', - filters: params.filters, - savedId: params.saved_id, - responseActions: params.response_actions?.map(transformRuleToAlertResponseAction), - alertSuppression: convertAlertSuppressionToCamel(params.alert_suppression), - }; - } - case 'saved_query': { - return { - type: params.type, - language: params.language ?? 'kuery', - index: params.index, - query: params.query, - filters: params.filters, - savedId: params.saved_id, - dataViewId: params.data_view_id, - responseActions: params.response_actions?.map(transformRuleToAlertResponseAction), - alertSuppression: convertAlertSuppressionToCamel(params.alert_suppression), - }; - } - case 'threshold': { - return { - type: params.type, - language: params.language ?? 'kuery', - index: params.index, - dataViewId: params.data_view_id, - query: params.query, - filters: params.filters, - savedId: params.saved_id, - threshold: normalizeThresholdObject(params.threshold), - alertSuppression: params.alert_suppression?.duration - ? { duration: params.alert_suppression.duration } - : undefined, - }; - } - case 'machine_learning': { - return { - type: params.type, - anomalyThreshold: params.anomaly_threshold, - machineLearningJobId: normalizeMachineLearningJobIds(params.machine_learning_job_id), - alertSuppression: convertAlertSuppressionToCamel(params.alert_suppression), - }; - } - case 'new_terms': { - return { - type: params.type, - query: params.query, - newTermsFields: params.new_terms_fields, - historyWindowStart: params.history_window_start, - index: params.index, - filters: params.filters, - language: params.language ?? 'kuery', - dataViewId: params.data_view_id, - alertSuppression: convertAlertSuppressionToCamel(params.alert_suppression), - }; - } - default: { - return assertUnreachable(params); - } - } -}; - -const patchEqlParams = ( - params: EqlRulePatchFields, - existingRule: EqlRuleParams -): EqlSpecificRuleParams => { - return { - type: existingRule.type, - language: params.language ?? existingRule.language, - index: params.index ?? existingRule.index, - dataViewId: params.data_view_id ?? existingRule.dataViewId, - query: params.query ?? existingRule.query, - filters: params.filters ?? existingRule.filters, - timestampField: params.timestamp_field ?? existingRule.timestampField, - eventCategoryOverride: params.event_category_override ?? existingRule.eventCategoryOverride, - tiebreakerField: params.tiebreaker_field ?? existingRule.tiebreakerField, - alertSuppression: - convertAlertSuppressionToCamel(params.alert_suppression) ?? existingRule.alertSuppression, - }; -}; - -const patchEsqlParams = ( - params: EsqlRulePatchFields, - existingRule: EsqlRuleParams -): EsqlSpecificRuleParams => { - return { - type: existingRule.type, - language: params.language ?? existingRule.language, - query: params.query ?? existingRule.query, - alertSuppression: - convertAlertSuppressionToCamel(params.alert_suppression) ?? existingRule.alertSuppression, - }; -}; - -const patchThreatMatchParams = ( - params: ThreatMatchRulePatchFields, - existingRule: ThreatRuleParams -): ThreatSpecificRuleParams => { - return { - type: existingRule.type, - language: params.language ?? existingRule.language, - index: params.index ?? existingRule.index, - dataViewId: params.data_view_id ?? existingRule.dataViewId, - query: params.query ?? existingRule.query, - filters: params.filters ?? existingRule.filters, - savedId: params.saved_id ?? existingRule.savedId, - threatFilters: params.threat_filters ?? existingRule.threatFilters, - threatQuery: params.threat_query ?? existingRule.threatQuery, - threatMapping: params.threat_mapping ?? existingRule.threatMapping, - threatLanguage: params.threat_language ?? existingRule.threatLanguage, - threatIndex: params.threat_index ?? existingRule.threatIndex, - threatIndicatorPath: params.threat_indicator_path ?? existingRule.threatIndicatorPath, - concurrentSearches: params.concurrent_searches ?? existingRule.concurrentSearches, - itemsPerSearch: params.items_per_search ?? existingRule.itemsPerSearch, - alertSuppression: - convertAlertSuppressionToCamel(params.alert_suppression) ?? existingRule.alertSuppression, - }; -}; - -const patchQueryParams = ( - params: QueryRulePatchFields, - existingRule: QueryRuleParams -): QuerySpecificRuleParams => { - return { - type: existingRule.type, - language: params.language ?? existingRule.language, - index: params.index ?? existingRule.index, - dataViewId: params.data_view_id ?? existingRule.dataViewId, - query: params.query ?? existingRule.query, - filters: params.filters ?? existingRule.filters, - savedId: params.saved_id ?? existingRule.savedId, - responseActions: - params.response_actions?.map(transformRuleToAlertResponseAction) ?? - existingRule.responseActions, - alertSuppression: - convertAlertSuppressionToCamel(params.alert_suppression) ?? existingRule.alertSuppression, - }; -}; - -const patchSavedQueryParams = ( - params: SavedQueryRulePatchFields, - existingRule: SavedQueryRuleParams -): SavedQuerySpecificRuleParams => { - return { - type: existingRule.type, - language: params.language ?? existingRule.language, - index: params.index ?? existingRule.index, - dataViewId: params.data_view_id ?? existingRule.dataViewId, - query: params.query ?? existingRule.query, - filters: params.filters ?? existingRule.filters, - savedId: params.saved_id ?? existingRule.savedId, - responseActions: - params.response_actions?.map(transformRuleToAlertResponseAction) ?? - existingRule.responseActions, - alertSuppression: - convertAlertSuppressionToCamel(params.alert_suppression) ?? existingRule.alertSuppression, - }; -}; - -const patchThresholdParams = ( - params: ThresholdRulePatchFields, - existingRule: ThresholdRuleParams -): ThresholdSpecificRuleParams => { - return { - type: existingRule.type, - language: params.language ?? existingRule.language, - index: params.index ?? existingRule.index, - dataViewId: params.data_view_id ?? existingRule.dataViewId, - query: params.query ?? existingRule.query, - filters: params.filters ?? existingRule.filters, - savedId: params.saved_id ?? existingRule.savedId, - threshold: params.threshold - ? normalizeThresholdObject(params.threshold) - : existingRule.threshold, - alertSuppression: params.alert_suppression ?? existingRule.alertSuppression, - }; -}; - -const patchMachineLearningParams = ( - params: MachineLearningRulePatchFields, - existingRule: MachineLearningRuleParams -): MachineLearningSpecificRuleParams => { - return { - type: existingRule.type, - anomalyThreshold: params.anomaly_threshold ?? existingRule.anomalyThreshold, - machineLearningJobId: params.machine_learning_job_id - ? normalizeMachineLearningJobIds(params.machine_learning_job_id) - : existingRule.machineLearningJobId, - alertSuppression: - convertAlertSuppressionToCamel(params.alert_suppression) ?? existingRule.alertSuppression, - }; -}; - -const patchNewTermsParams = ( - params: NewTermsRulePatchFields, - existingRule: NewTermsRuleParams -): NewTermsSpecificRuleParams => { - return { - type: existingRule.type, - language: params.language ?? existingRule.language, - index: params.index ?? existingRule.index, - dataViewId: params.data_view_id ?? existingRule.dataViewId, - query: params.query ?? existingRule.query, - filters: params.filters ?? existingRule.filters, - newTermsFields: params.new_terms_fields ?? existingRule.newTermsFields, - historyWindowStart: params.history_window_start ?? existingRule.historyWindowStart, - alertSuppression: - convertAlertSuppressionToCamel(params.alert_suppression) ?? existingRule.alertSuppression, - }; -}; - -export const patchTypeSpecificSnakeToCamel = ( - params: PatchRuleRequestBody, - existingRule: RuleParams -): TypeSpecificRuleParams => { - // Here we do the validation of patch params by rule type to ensure that the fields that are - // passed in to patch are of the correct type, e.g. `query` is a string. Since the combined patch schema - // is a union of types where everything is optional, it's hard to do the validation before we know the rule type - - // a patch request that defines `event_category_override` as a number would not be assignable to the EQL patch schema, - // but would be assignable to the other rule types since they don't specify `event_category_override`. - switch (existingRule.type) { - case 'eql': { - const result = EqlRulePatchFields.safeParse(params); - if (!result.success) { - throw new BadRequestError(stringifyZodError(result.error)); - } - return patchEqlParams(result.data, existingRule); - } - case 'esql': { - const result = EsqlRulePatchFields.safeParse(params); - if (!result.success) { - throw new BadRequestError(stringifyZodError(result.error)); - } - return patchEsqlParams(result.data, existingRule); - } - case 'threat_match': { - const result = ThreatMatchRulePatchFields.safeParse(params); - if (!result.success) { - throw new BadRequestError(stringifyZodError(result.error)); - } - return patchThreatMatchParams(result.data, existingRule); - } - case 'query': { - const result = QueryRulePatchFields.safeParse(params); - if (!result.success) { - throw new BadRequestError(stringifyZodError(result.error)); - } - return patchQueryParams(result.data, existingRule); - } - case 'saved_query': { - const result = SavedQueryRulePatchFields.safeParse(params); - if (!result.success) { - throw new BadRequestError(stringifyZodError(result.error)); - } - return patchSavedQueryParams(result.data, existingRule); - } - case 'threshold': { - const result = ThresholdRulePatchFields.safeParse(params); - if (!result.success) { - throw new BadRequestError(stringifyZodError(result.error)); - } - return patchThresholdParams(result.data, existingRule); - } - case 'machine_learning': { - const result = MachineLearningRulePatchFields.safeParse(params); - if (!result.success) { - throw new BadRequestError(stringifyZodError(result.error)); - } - return patchMachineLearningParams(result.data, existingRule); - } - case 'new_terms': { - const result = NewTermsRulePatchFields.safeParse(params); - if (!result.success) { - throw new BadRequestError(stringifyZodError(result.error)); - } - return patchNewTermsParams(result.data, existingRule); - } - default: { - return assertUnreachable(existingRule); - } - } -}; - -interface ConvertUpdateAPIToInternalSchemaProps { - existingRule: SanitizedRule; - ruleUpdate: RuleUpdateProps; -} - -export const convertUpdateAPIToInternalSchema = ({ - existingRule, - ruleUpdate, -}: ConvertUpdateAPIToInternalSchemaProps) => { - const alertActions = - ruleUpdate.actions?.map((action) => transformRuleToAlertAction(action)) ?? []; - const actions = transformToActionFrequency(alertActions, ruleUpdate.throttle); - - const typeSpecificParams = typeSpecificSnakeToCamel(ruleUpdate); - - const newInternalRule: InternalRuleUpdate = { - name: ruleUpdate.name, - tags: ruleUpdate.tags ?? [], - params: { - author: ruleUpdate.author ?? [], - buildingBlockType: ruleUpdate.building_block_type, - description: ruleUpdate.description, - ruleId: existingRule.params.ruleId, - falsePositives: ruleUpdate.false_positives ?? [], - from: ruleUpdate.from ?? 'now-6m', - investigationFields: ruleUpdate.investigation_fields, - immutable: existingRule.params.immutable, - ruleSource: convertImmutableToRuleSource(existingRule.params.immutable), - license: ruleUpdate.license, - outputIndex: ruleUpdate.output_index ?? '', - timelineId: ruleUpdate.timeline_id, - timelineTitle: ruleUpdate.timeline_title, - meta: ruleUpdate.meta, - maxSignals: ruleUpdate.max_signals ?? DEFAULT_MAX_SIGNALS, - relatedIntegrations: ruleUpdate.related_integrations ?? [], - requiredFields: addEcsToRequiredFields(ruleUpdate.required_fields), - riskScore: ruleUpdate.risk_score, - riskScoreMapping: ruleUpdate.risk_score_mapping ?? [], - ruleNameOverride: ruleUpdate.rule_name_override, - setup: ruleUpdate.setup, - severity: ruleUpdate.severity, - severityMapping: ruleUpdate.severity_mapping ?? [], - threat: ruleUpdate.threat ?? [], - timestampOverride: ruleUpdate.timestamp_override, - timestampOverrideFallbackDisabled: ruleUpdate.timestamp_override_fallback_disabled, - to: ruleUpdate.to ?? 'now', - references: ruleUpdate.references ?? [], - namespace: ruleUpdate.namespace, - note: ruleUpdate.note, - version: ruleUpdate.version ?? existingRule.params.version, - exceptionsList: ruleUpdate.exceptions_list ?? [], - ...typeSpecificParams, - }, - schedule: { interval: ruleUpdate.interval ?? '5m' }, - actions, - }; - - return newInternalRule; -}; - -// eslint-disable-next-line complexity -export const convertPatchAPIToInternalSchema = ( - nextParams: PatchRuleRequestBody, - existingRule: SanitizedRule -): InternalRuleUpdate => { - const typeSpecificParams = patchTypeSpecificSnakeToCamel(nextParams, existingRule.params); - const existingParams = existingRule.params; - - const alertActions = - nextParams.actions?.map((action) => transformRuleToAlertAction(action)) ?? existingRule.actions; - const throttle = nextParams.throttle ?? transformFromAlertThrottle(existingRule); - const actions = transformToActionFrequency(alertActions, throttle); - - return { - name: nextParams.name ?? existingRule.name, - tags: nextParams.tags ?? existingRule.tags, - params: { - author: nextParams.author ?? existingParams.author, - buildingBlockType: nextParams.building_block_type ?? existingParams.buildingBlockType, - description: nextParams.description ?? existingParams.description, - ruleId: existingParams.ruleId, - falsePositives: nextParams.false_positives ?? existingParams.falsePositives, - investigationFields: nextParams.investigation_fields ?? existingParams.investigationFields, - from: nextParams.from ?? existingParams.from, - immutable: existingParams.immutable, - ruleSource: convertImmutableToRuleSource(existingParams.immutable), - license: nextParams.license ?? existingParams.license, - outputIndex: nextParams.output_index ?? existingParams.outputIndex, - timelineId: nextParams.timeline_id ?? existingParams.timelineId, - timelineTitle: nextParams.timeline_title ?? existingParams.timelineTitle, - meta: nextParams.meta ?? existingParams.meta, - maxSignals: nextParams.max_signals ?? existingParams.maxSignals, - relatedIntegrations: nextParams.related_integrations ?? existingParams.relatedIntegrations, - requiredFields: addEcsToRequiredFields(nextParams.required_fields), - riskScore: nextParams.risk_score ?? existingParams.riskScore, - riskScoreMapping: nextParams.risk_score_mapping ?? existingParams.riskScoreMapping, - ruleNameOverride: nextParams.rule_name_override ?? existingParams.ruleNameOverride, - setup: nextParams.setup ?? existingParams.setup, - severity: nextParams.severity ?? existingParams.severity, - severityMapping: nextParams.severity_mapping ?? existingParams.severityMapping, - threat: nextParams.threat ?? existingParams.threat, - timestampOverride: nextParams.timestamp_override ?? existingParams.timestampOverride, - timestampOverrideFallbackDisabled: - nextParams.timestamp_override_fallback_disabled ?? - existingParams.timestampOverrideFallbackDisabled, - to: nextParams.to ?? existingParams.to, - references: nextParams.references ?? existingParams.references, - namespace: nextParams.namespace ?? existingParams.namespace, - note: nextParams.note ?? existingParams.note, - version: nextParams.version ?? existingParams.version, - exceptionsList: nextParams.exceptions_list ?? existingParams.exceptionsList, - ...typeSpecificParams, - }, - schedule: { interval: nextParams.interval ?? existingRule.schedule.interval }, - actions, - }; -}; - -interface RuleCreateOptions { - immutable?: boolean; - defaultEnabled?: boolean; -} - -// eslint-disable-next-line complexity -export const convertCreateAPIToInternalSchema = ( - input: RuleCreateProps, - options?: RuleCreateOptions -): InternalRuleCreate => { - const { immutable = false, defaultEnabled = true } = options ?? {}; - - const typeSpecificParams = typeSpecificSnakeToCamel(input); - const newRuleId = input.rule_id ?? uuidv4(); - - const alertActions = input.actions?.map((action) => transformRuleToAlertAction(action)) ?? []; - const actions = transformToActionFrequency(alertActions, input.throttle); - - return { - name: input.name, - tags: input.tags ?? [], - alertTypeId: ruleTypeMappings[input.type], - consumer: SERVER_APP_ID, - params: { - author: input.author ?? [], - buildingBlockType: input.building_block_type, - description: input.description, - ruleId: newRuleId, - falsePositives: input.false_positives ?? [], - investigationFields: input.investigation_fields, - from: input.from ?? DEFAULT_FROM, - immutable, - ruleSource: convertImmutableToRuleSource(immutable), - license: input.license, - outputIndex: input.output_index ?? '', - timelineId: input.timeline_id, - timelineTitle: input.timeline_title, - meta: input.meta, - maxSignals: input.max_signals ?? DEFAULT_MAX_SIGNALS, - riskScore: input.risk_score, - riskScoreMapping: input.risk_score_mapping ?? [], - ruleNameOverride: input.rule_name_override, - severity: input.severity, - severityMapping: input.severity_mapping ?? [], - threat: input.threat ?? [], - timestampOverride: input.timestamp_override, - timestampOverrideFallbackDisabled: input.timestamp_override_fallback_disabled, - to: input.to ?? DEFAULT_TO, - references: input.references ?? [], - namespace: input.namespace, - note: input.note, - version: input.version ?? 1, - exceptionsList: input.exceptions_list ?? [], - relatedIntegrations: input.related_integrations ?? [], - requiredFields: addEcsToRequiredFields(input.required_fields), - setup: input.setup ?? '', - ...typeSpecificParams, - }, - schedule: { interval: input.interval ?? '5m' }, - enabled: input.enabled ?? defaultEnabled, - actions, - }; -}; - -// Converts the internal rule data structure to the response API schema -export const typeSpecificCamelToSnake = ( - params: TypeSpecificRuleParams -): RequiredOptional => { - switch (params.type) { - case 'eql': { - return { - type: params.type, - language: params.language, - index: params.index, - data_view_id: params.dataViewId, - query: params.query, - filters: params.filters, - timestamp_field: params.timestampField, - event_category_override: params.eventCategoryOverride, - tiebreaker_field: params.tiebreakerField, - alert_suppression: convertAlertSuppressionToSnake(params.alertSuppression), - }; - } - case 'esql': { - return { - type: params.type, - language: params.language, - query: params.query, - alert_suppression: convertAlertSuppressionToSnake(params.alertSuppression), - }; - } - case 'threat_match': { - return { - type: params.type, - language: params.language, - index: params.index, - data_view_id: params.dataViewId, - query: params.query, - filters: params.filters, - saved_id: params.savedId, - threat_filters: params.threatFilters, - threat_query: params.threatQuery, - threat_mapping: params.threatMapping, - threat_language: params.threatLanguage, - threat_index: params.threatIndex, - threat_indicator_path: params.threatIndicatorPath, - concurrent_searches: params.concurrentSearches, - items_per_search: params.itemsPerSearch, - alert_suppression: convertAlertSuppressionToSnake(params.alertSuppression), - }; - } - case 'query': { - return { - type: params.type, - language: params.language, - index: params.index, - data_view_id: params.dataViewId, - query: params.query, - filters: params.filters, - saved_id: params.savedId, - response_actions: params.responseActions?.map(transformAlertToRuleResponseAction), - alert_suppression: convertAlertSuppressionToSnake(params.alertSuppression), - }; - } - case 'saved_query': { - return { - type: params.type, - language: params.language, - index: params.index, - query: params.query, - filters: params.filters, - saved_id: params.savedId, - data_view_id: params.dataViewId, - response_actions: params.responseActions?.map(transformAlertToRuleResponseAction), - alert_suppression: convertAlertSuppressionToSnake(params.alertSuppression), - }; - } - case 'threshold': { - return { - type: params.type, - language: params.language, - index: params.index, - data_view_id: params.dataViewId, - query: params.query, - filters: params.filters, - saved_id: params.savedId, - threshold: params.threshold, - alert_suppression: params.alertSuppression?.duration - ? { duration: params.alertSuppression?.duration } - : undefined, - }; - } - case 'machine_learning': { - return { - type: params.type, - anomaly_threshold: params.anomalyThreshold, - machine_learning_job_id: params.machineLearningJobId, - alert_suppression: convertAlertSuppressionToSnake(params.alertSuppression), - }; - } - case 'new_terms': { - return { - type: params.type, - query: params.query, - new_terms_fields: params.newTermsFields, - history_window_start: params.historyWindowStart, - index: params.index, - filters: params.filters, - language: params.language, - data_view_id: params.dataViewId, - alert_suppression: convertAlertSuppressionToSnake(params.alertSuppression), - }; - } - default: { - return assertUnreachable(params); - } - } -}; - -// TODO: separate out security solution defined common params from Alerting framework common params -// so we can explicitly specify the return type of this function -export const commonParamsCamelToSnake = (params: BaseRuleParams) => { - return { - description: params.description, - risk_score: params.riskScore, - severity: params.severity, - building_block_type: params.buildingBlockType, - namespace: params.namespace, - note: params.note, - license: params.license, - output_index: params.outputIndex, - timeline_id: params.timelineId, - timeline_title: params.timelineTitle, - meta: params.meta, - rule_name_override: params.ruleNameOverride, - timestamp_override: params.timestampOverride, - timestamp_override_fallback_disabled: params.timestampOverrideFallbackDisabled, - investigation_fields: migrateLegacyInvestigationFields(params.investigationFields), - author: params.author, - false_positives: params.falsePositives, - from: params.from, - rule_id: params.ruleId, - max_signals: params.maxSignals, - risk_score_mapping: params.riskScoreMapping, - severity_mapping: params.severityMapping, - threat: params.threat, - to: params.to, - references: params.references, - version: params.version, - exceptions_list: params.exceptionsList, - immutable: params.immutable, - rule_source: convertObjectKeysToSnakeCase(params.ruleSource), - related_integrations: params.relatedIntegrations ?? [], - required_fields: params.requiredFields ?? [], - setup: params.setup ?? '', - }; -}; - -export const internalRuleToAPIResponse = ( - rule: SanitizedRule | ResolvedSanitizedRule -): RequiredOptional => { - const executionSummary = createRuleExecutionSummary(rule); - - const isResolvedRule = (obj: unknown): obj is ResolvedSanitizedRule => - (obj as ResolvedSanitizedRule).outcome != null; - - const alertActions = rule.actions.map(transformAlertToRuleAction); - const throttle = transformFromAlertThrottle(rule); - const actions = transformToActionFrequency(alertActions, throttle); - - return { - // saved object properties - outcome: isResolvedRule(rule) ? rule.outcome : undefined, - alias_target_id: isResolvedRule(rule) ? rule.alias_target_id : undefined, - alias_purpose: isResolvedRule(rule) ? rule.alias_purpose : undefined, - // Alerting framework params - id: rule.id, - updated_at: rule.updatedAt.toISOString(), - updated_by: rule.updatedBy ?? 'elastic', - created_at: rule.createdAt.toISOString(), - created_by: rule.createdBy ?? 'elastic', - name: rule.name, - tags: rule.tags, - interval: rule.schedule.interval, - enabled: rule.enabled, - revision: rule.revision, - // Security solution shared rule params - ...commonParamsCamelToSnake(rule.params), - // Type specific security solution rule params - ...typeSpecificCamelToSnake(rule.params), - // Actions - throttle: undefined, - actions, - // Execution summary - execution_summary: executionSummary ?? undefined, - }; -}; - -export const convertPrebuiltRuleAssetToRuleResponse = ( - prebuiltRuleAsset: PrebuiltRuleAsset -): RuleResponse => { - const prebuiltRuleAssetDefaults = { - enabled: false, - risk_score_mapping: [], - severity_mapping: [], - interval: DEFAULT_INTERVAL, - to: DEFAULT_TO, - from: DEFAULT_FROM, - exceptions_list: [], - false_positives: [], - max_signals: DEFAULT_MAX_SIGNALS, - actions: [], - related_integrations: [], - required_fields: [], - setup: '', - note: '', - references: [], - threat: [], - tags: [], - author: [], - }; - - const immutable = true; - - const ruleResponseSpecificFields = { - id: uuidv4(), - updated_at: new Date(0).toISOString(), - updated_by: '', - created_at: new Date(0).toISOString(), - created_by: '', - immutable, - rule_source: convertObjectKeysToSnakeCase(convertImmutableToRuleSource(immutable)), - revision: 1, - }; - - return RuleResponse.parse({ - ...prebuiltRuleAssetDefaults, - ...prebuiltRuleAsset, - required_fields: addEcsToRequiredFields(prebuiltRuleAsset.required_fields), - ...ruleResponseSpecificFields, - }); -}; - -export const convertImmutableToRuleSource = (immutable: boolean): RuleSourceCamelCased => { - if (immutable) { - return { - type: 'external', - isCustomized: false, - }; - } - - return { - type: 'internal', - }; -}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/utils.test.ts index 61436a04c26753..536a314fa6c09f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/utils.test.ts @@ -38,7 +38,7 @@ import { getMlRuleParams, getQueryRuleParams, getThreatRuleParams } from '../../ import { createRulesAndExceptionsStreamFromNdJson } from '../logic/import/create_rules_stream_from_ndjson'; import type { RuleExceptionsPromiseFromStreams } from '../logic/import/import_rules_utils'; -import { internalRuleToAPIResponse } from '../normalization/rule_converters'; +import { internalRuleToAPIResponse } from '../logic/detection_rules_client/converters/internal_rule_to_api_response'; type PromiseFromStreams = RuleToImport | Error; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/utils.ts index 66fa635e768ad4..bf6227ddcbfe8a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/utils.ts @@ -17,8 +17,6 @@ import type { SavedObjectsClientContract } from '@kbn/core/server'; import type { RuleAction } from '@kbn/securitysolution-io-ts-alerting-types'; import type { - AlertSuppression, - AlertSuppressionCamel, InvestigationFields, RequiredField, RequiredFieldInput, @@ -33,7 +31,7 @@ import type { BulkError, OutputError } from '../../routes/utils'; import { createBulkErrorObject } from '../../routes/utils'; import type { InvestigationFieldsCombined, RuleAlertType, RuleParams } from '../../rule_schema'; import { hasValidRuleType } from '../../rule_schema'; -import { internalRuleToAPIResponse } from '../normalization/rule_converters'; +import { internalRuleToAPIResponse } from '../logic/detection_rules_client/converters/internal_rule_to_api_response'; type PromiseFromStreams = RuleToImport | Error; const MAX_CONCURRENT_SEARCHES = 10; @@ -347,28 +345,6 @@ export const getInvalidConnectors = async ( return [Array.from(errors.values()), Array.from(rulesAcc.values())]; }; -export const convertAlertSuppressionToCamel = ( - input: AlertSuppression | undefined -): AlertSuppressionCamel | undefined => - input - ? { - groupBy: input.group_by, - duration: input.duration, - missingFieldsStrategy: input.missing_fields_strategy, - } - : undefined; - -export const convertAlertSuppressionToSnake = ( - input: AlertSuppressionCamel | undefined -): AlertSuppression | undefined => - input - ? { - group_by: input.groupBy, - duration: input.duration, - missing_fields_strategy: input.missingFieldsStrategy, - } - : undefined; - /** * In ESS 8.10.x "investigation_fields" are mapped as string[]. * For 8.11+ logic is added on read in our endpoints to migrate diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/validate.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/validate.ts index 298b7f62d2973a..dd77122ac45600 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/validate.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/validate.ts @@ -31,7 +31,7 @@ import { type UnifiedQueryRuleParams, } from '../../rule_schema'; import { type BulkError, createBulkErrorObject } from '../../routes/utils'; -import { internalRuleToAPIResponse } from '../normalization/rule_converters'; +import { internalRuleToAPIResponse } from '../logic/detection_rules_client/converters/internal_rule_to_api_response'; export const transformValidateBulkError = ( ruleId: string, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/route.ts index c2faa464b75da5..7b48e32bf99625 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/route.ts @@ -23,6 +23,7 @@ import { buildRouteValidationWithZod } from '@kbn/zod-helpers'; import { DEFAULT_PREVIEW_INDEX, DETECTION_ENGINE_RULES_PREVIEW, + SERVER_APP_ID, } from '../../../../../../common/constants'; import { validateCreateRuleProps } from '../../../../../../common/api/detection_engine/rule_management'; import { RuleExecutionStatusEnum } from '../../../../../../common/api/detection_engine/rule_monitoring'; @@ -34,7 +35,6 @@ import { PreviewRulesSchema } from '../../../../../../common/api/detection_engin import type { StartPlugins, SetupPlugins } from '../../../../../plugin'; import { buildSiemResponse } from '../../../routes/utils'; -import { convertCreateAPIToInternalSchema } from '../../../rule_management'; import type { RuleParams } from '../../../rule_schema'; import { createPreviewRuleExecutionLogger } from './preview_rule_execution_logger'; import { parseInterval } from '../../../rule_types/utils/utils'; @@ -64,6 +64,8 @@ import { createSecurityRuleTypeWrapper } from '../../../rule_types/create_securi import { assertUnreachable } from '../../../../../../common/utility_types'; import { wrapScopedClusterClient } from './wrap_scoped_cluster_client'; import { wrapSearchSourceClient } from './wrap_search_source_client'; +import { applyRuleDefaults } from '../../../rule_management/logic/detection_rules_client/mergers/apply_rule_defaults'; +import { convertRuleResponseToAlertingRule } from '../../../rule_management/logic/detection_rules_client/converters/convert_rule_response_to_alerting_rule'; const PREVIEW_TIMEOUT_SECONDS = 60; const MAX_ROUTE_CONCURRENCY = 10; @@ -118,7 +120,7 @@ export const previewRulesRoute = ( }); } - const internalRule = convertCreateAPIToInternalSchema(request.body); + const internalRule = convertRuleResponseToAlertingRule(applyRuleDefaults(request.body)); const previewRuleParams = internalRule.params; const mlAuthz = buildMlAuthz({ @@ -237,6 +239,8 @@ export const previewRulesRoute = ( createdAt: new Date(), createdBy: username ?? 'preview-created-by', producer: 'preview-producer', + consumer: SERVER_APP_ID, + enabled: true, revision: 0, ruleTypeId, ruleTypeName, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_schema/model/rule_schemas.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_schema/model/rule_schemas.ts index b3000edf895dc7..5d5065170deff6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_schema/model/rule_schemas.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_schema/model/rule_schemas.ts @@ -5,11 +5,6 @@ * 2.0. */ import type { SanitizedRuleConfig } from '@kbn/alerting-plugin/common'; -import type { - RuleActionArrayCamel, - RuleActionNotifyWhen, - RuleActionThrottle, -} from '@kbn/securitysolution-io-ts-alerting-types'; import type { EQL_RULE_TYPE_ID, ESQL_RULE_TYPE_ID, @@ -22,12 +17,9 @@ import type { THRESHOLD_RULE_TYPE_ID, } from '@kbn/securitysolution-rules'; import * as z from 'zod'; +import type { CreateRuleData } from '@kbn/alerting-plugin/server/application/rule/methods/create'; +import type { UpdateRuleData } from '@kbn/alerting-plugin/server/application/rule/methods/update'; import { RuleResponseAction } from '../../../../../common/api/detection_engine'; -import type { - IsRuleEnabled, - RuleName, - RuleTagArray, -} from '../../../../../common/api/detection_engine/model/rule_schema'; import { AlertsIndex, AlertsIndexNamespace, @@ -334,29 +326,8 @@ export type AllRuleTypes = | typeof THRESHOLD_RULE_TYPE_ID | typeof NEW_TERMS_RULE_TYPE_ID; -export interface InternalRuleCreate { - name: RuleName; - tags: RuleTagArray; - alertTypeId: AllRuleTypes; +export type InternalRuleCreate = CreateRuleData & { consumer: typeof SERVER_APP_ID; - schedule: { - interval: string; - }; - enabled: IsRuleEnabled; - actions: RuleActionArrayCamel; - params: RuleParams; - throttle?: RuleActionThrottle | null; - notifyWhen?: RuleActionNotifyWhen | null; -} +}; -export interface InternalRuleUpdate { - name: RuleName; - tags: RuleTagArray; - schedule: { - interval: string; - }; - actions: RuleActionArrayCamel; - params: RuleParams; - throttle?: RuleActionThrottle | null; - notifyWhen?: RuleActionNotifyWhen | null; -} +export type InternalRuleUpdate = UpdateRuleData; diff --git a/x-pack/plugins/security_solution/server/request_context_factory.ts b/x-pack/plugins/security_solution/server/request_context_factory.ts index 1f36f7ecff234e..ea1673fe9a5de1 100644 --- a/x-pack/plugins/security_solution/server/request_context_factory.ts +++ b/x-pack/plugins/security_solution/server/request_context_factory.ts @@ -122,10 +122,11 @@ export class RequestContextFactory implements IRequestContextFactory { savedObjectsClient: coreContext.savedObjects.client, }); - return createDetectionRulesClient( - startPlugins.alerting.getRulesClientWithRequest(request), - mlAuthz - ); + return createDetectionRulesClient({ + rulesClient: startPlugins.alerting.getRulesClientWithRequest(request), + savedObjectsClient: coreContext.savedObjects.client, + mlAuthz, + }); }), getDetectionEngineHealthClient: memoize(() => diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/create_rule_exceptions_ess.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/create_rule_exceptions_ess.ts index 94069641061708..a1708cf4d6ae03 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/create_rule_exceptions_ess.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/create_rule_exceptions_ess.ts @@ -14,7 +14,6 @@ import { getRuleSOById, createRuleThroughAlertingEndpoint, getRuleSavedObjectWithLegacyInvestigationFields, - checkInvestigationFieldSoValue, } from '../../../../utils'; import { createAlertsIndex, @@ -79,25 +78,15 @@ export default ({ getService }: FtrProviderContext) => { }) .expect(200); - /** - * Confirm type on SO so that it's clear in the tests whether it's expected that - * the SO itself is migrated to the inteded object type, or if the transformation is - * happening just on the response. In this case, change will - * NOT include a migration on SO. - */ const { hits: { hits: [{ _source: ruleSO }], }, } = await getRuleSOById(es, ruleWithLegacyInvestigationField.id); - const isInvestigationFieldMigratedInSo = await checkInvestigationFieldSoValue(ruleSO, { - field_names: ['client.address', 'agent.name'], - }); expect( ruleSO?.alert.params.exceptionsList.some((list) => list.type === 'rule_default') ).to.eql(true); - expect(isInvestigationFieldMigratedInSo).to.eql(false); }); }); }); diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/trial_license_complete_tier/patch_rules_bulk.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/trial_license_complete_tier/patch_rules_bulk.ts index 7e496ea73194d5..947b191469e3d6 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/trial_license_complete_tier/patch_rules_bulk.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/trial_license_complete_tier/patch_rules_bulk.ts @@ -532,7 +532,7 @@ export default ({ getService }: FtrProviderContext) => { ); }); - it('should patch a rule with a legacy investigation field and transform field in response', async () => { + it('should patch a rule with a legacy investigation field and migrate field', async () => { // patch a simple rule's name const { body } = await securitySolutionApi .bulkPatchRules({ @@ -548,19 +548,13 @@ export default ({ getService }: FtrProviderContext) => { }); expect(bodyToCompareLegacyField.name).to.eql('some other name'); - /** - * Confirm type on SO so that it's clear in the tests whether it's expected that - * the SO itself is migrated to the inteded object type, or if the transformation is - * happening just on the response. In this case, change should - * NOT include a migration on SO. - */ const isInvestigationFieldMigratedInSo = await checkInvestigationFieldSoValue( undefined, { field_names: ['client.address', 'agent.name'] }, es, body[0].id ); - expect(isInvestigationFieldMigratedInSo).to.eql(false); + expect(isInvestigationFieldMigratedInSo).to.eql(true); }); it('should patch a rule with a legacy investigation field - empty array - and transform field in response', async () => { diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/trial_license_complete_tier/patch_rules_ess.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/trial_license_complete_tier/patch_rules_ess.ts index 30398cd2cd1e9d..d28358519e307a 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/trial_license_complete_tier/patch_rules_ess.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/trial_license_complete_tier/patch_rules_ess.ts @@ -137,7 +137,7 @@ export default ({ getService }: FtrProviderContext) => { ); }); - it('should patch a rule with a legacy investigation field and transform response', async () => { + it('should patch a rule with a legacy investigation field and migrate field', async () => { const { body } = await supertest .patch(DETECTION_ENGINE_RULES_URL) .set('kbn-xsrf', 'true') @@ -152,12 +152,7 @@ export default ({ getService }: FtrProviderContext) => { expect(bodyToCompare.investigation_fields).to.eql({ field_names: ['client.address', 'agent.name'], }); - /** - * Confirm type on SO so that it's clear in the tests whether it's expected that - * the SO itself is migrated to the inteded object type, or if the transformation is - * happening just on the response. In this case, change should - * NOT include a migration on SO. - */ + const isInvestigationFieldMigratedInSo = await checkInvestigationFieldSoValue( undefined, { @@ -166,7 +161,7 @@ export default ({ getService }: FtrProviderContext) => { es, body.id ); - expect(isInvestigationFieldMigratedInSo).to.eql(false); + expect(isInvestigationFieldMigratedInSo).to.eql(true); }); it('should patch a rule with a legacy investigation field - empty array - and transform response', async () => { From 5df39715a55a8cd4d1c3ff8c64e3f1d74f4cadfd Mon Sep 17 00:00:00 2001 From: Julia Bardi <90178898+juliaElastic@users.noreply.github.com> Date: Tue, 9 Jul 2024 14:12:41 +0200 Subject: [PATCH 054/103] [Fleet] enable feature flag for reusable integration policies (#187153) ## Summary Closes https://github.com/elastic/kibana/issues/186175 --- .../fleet/common/experimental_features.ts | 2 +- ...e_policy_pipelines_and_mappings_real.cy.ts | 27 ++++++++++++++----- .../fleet/cypress/screens/integrations.ts | 2 +- .../steps/step_select_agent_policy.tsx | 5 +++- .../single_page_layout/index.test.tsx | 1 - .../edit_package_policy_page/index.tsx | 7 +++++ 6 files changed, 34 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/fleet/common/experimental_features.ts b/x-pack/plugins/fleet/common/experimental_features.ts index 1e6af81b8c4451..502d3b603f159a 100644 --- a/x-pack/plugins/fleet/common/experimental_features.ts +++ b/x-pack/plugins/fleet/common/experimental_features.ts @@ -27,7 +27,7 @@ const _allowedExperimentalValues = { enablePackagesStateMachine: true, advancedPolicySettings: true, useSpaceAwareness: false, - enableReusableIntegrationPolicies: false, + enableReusableIntegrationPolicies: true, }; /** diff --git a/x-pack/plugins/fleet/cypress/e2e/package_policy_pipelines_and_mappings_real.cy.ts b/x-pack/plugins/fleet/cypress/e2e/package_policy_pipelines_and_mappings_real.cy.ts index 0478c450ae5a27..269c848f998bf7 100644 --- a/x-pack/plugins/fleet/cypress/e2e/package_policy_pipelines_and_mappings_real.cy.ts +++ b/x-pack/plugins/fleet/cypress/e2e/package_policy_pipelines_and_mappings_real.cy.ts @@ -82,8 +82,13 @@ describe('Input package create and edit package policy', () => { cy.getBySel(EXISTING_HOSTS_TAB).click(); - cy.getBySel(POLICY_EDITOR.AGENT_POLICY_SELECT).click().get(`#${agentPolicyId}`).click(); - cy.wait(500); // wait for policy id to be set + cy.getBySel(POLICY_EDITOR.AGENT_POLICY_SELECT).click(); + cy.getBySel('agentPolicyMultiItem').each(($el) => { + if ($el.text() === agentPolicyName) { + $el.trigger('click'); + } + }); + cy.wait(1000); // wait for policy id to be set cy.getBySel(CREATE_PACKAGE_POLICY_SAVE_BTN).click(); cy.getBySel(CONFIRM_MODAL.CANCEL_BUTTON).click(); @@ -150,8 +155,13 @@ describe('Integration package with custom dataset create and edit package policy cy.getBySel(EXISTING_HOSTS_TAB).click(); - cy.getBySel(POLICY_EDITOR.AGENT_POLICY_SELECT).click().get(`#${agentPolicyId}`).click(); - cy.wait(500); // wait for policy id to be set + cy.getBySel(POLICY_EDITOR.AGENT_POLICY_SELECT).click(); + cy.getBySel('agentPolicyMultiItem').each(($el) => { + if ($el.text() === agentPolicyName) { + $el.trigger('click'); + } + }); + cy.wait(1000); // wait for policy id to be set cy.getBySel(CREATE_PACKAGE_POLICY_SAVE_BTN).click(); cy.getBySel(CONFIRM_MODAL.CANCEL_BUTTON).click(); @@ -210,8 +220,13 @@ describe('Integration package with fixed dataset create and edit package policy' cy.getBySel(EXISTING_HOSTS_TAB).click(); - cy.getBySel(POLICY_EDITOR.AGENT_POLICY_SELECT).click().get(`#${agentPolicyId}`).click(); - cy.wait(500); // wait for policy id to be set + cy.getBySel(POLICY_EDITOR.AGENT_POLICY_SELECT).click(); + cy.getBySel('agentPolicyMultiItem').each(($el) => { + if ($el.text() === agentPolicyName) { + $el.trigger('click'); + } + }); + cy.wait(1000); // wait for policy id to be set cy.getBySel(CREATE_PACKAGE_POLICY_SAVE_BTN).click(); cy.getBySel(CONFIRM_MODAL.CANCEL_BUTTON).click(); diff --git a/x-pack/plugins/fleet/cypress/screens/integrations.ts b/x-pack/plugins/fleet/cypress/screens/integrations.ts index 7cc6aefdf89ecc..1a31d2dc5de31c 100644 --- a/x-pack/plugins/fleet/cypress/screens/integrations.ts +++ b/x-pack/plugins/fleet/cypress/screens/integrations.ts @@ -38,7 +38,7 @@ export const SETTINGS = { export const POLICY_EDITOR = { POLICY_NAME_INPUT: 'packagePolicyNameInput', DATASET_SELECT: 'datasetComboBox', - AGENT_POLICY_SELECT: 'agentPolicySelect', + AGENT_POLICY_SELECT: 'agentPolicyMultiSelect', INSPECT_PIPELINES_BTN: 'datastreamInspectPipelineBtn', EDIT_MAPPINGS_BTN: 'datastreamEditMappingsBtn', CREATE_MAPPINGS_BTN: 'datastreamAddCustomComponentTemplateBtn', diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_agent_policy.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_agent_policy.tsx index 6238a2cc62a078..84783ecda8cad6 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_agent_policy.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_agent_policy.tsx @@ -101,6 +101,9 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{ updateAgentPolicies([]); } }; + if (isLoading || selectedPolicyIds.length === 0) { + return; + } const agentPoliciesHaveAllSelectedIds = selectedPolicyIds.every((id) => agentPolicies.map((policy) => policy.id).includes(id) ); @@ -110,7 +113,7 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{ setSelectedAgentPolicyError(undefined); updateAgentPolicies(agentPolicies.filter((policy) => selectedPolicyIds.includes(policy.id))); } - }, [selectedPolicyIds, agentPolicies, updateAgentPolicies]); + }, [selectedPolicyIds, agentPolicies, updateAgentPolicies, isLoading]); // Try to select default agent policy useEffect(() => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx index 0054fc71133a2b..4109a66a59638d 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx @@ -378,7 +378,6 @@ describe('When on the package policy create page', () => { expect(sendCreatePackagePolicy as jest.MockedFunction).toHaveBeenCalledWith({ ...newPackagePolicy, - policy_id: 'agent-policy-1', policy_ids: ['agent-policy-1'], force: false, }); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx index acaf623afa3308..98096d02138f95 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx @@ -144,6 +144,13 @@ export const EditPackagePolicyForm = memo<{ const [isFirstLoad, setIsFirstLoad] = useState(true); const [newAgentPolicyName, setNewAgentPolicyName] = useState(); + // make form dirty if new agent policy is selected + useEffect(() => { + if (newAgentPolicyName) { + setIsEdited(true); + } + }, [newAgentPolicyName, setIsEdited]); + const [hasAgentPolicyError, setHasAgentPolicyError] = useState(false); // Retrieve agent count From 43fca860ae8e7b651c7d4f5729686f06e2ccdc75 Mon Sep 17 00:00:00 2001 From: Dmitry Gurevich <99176494+gurevichdmitry@users.noreply.github.com> Date: Tue, 9 Jul 2024 15:16:54 +0300 Subject: [PATCH 055/103] [Cloud Security] Add sanity UI tests for ESS deployments (#187328) ## Summary This PR adds sanity UI tests for all main components related to CSPM and KSPM integrations (i.e., Dashboards, Benchmarks, and Findings pages). The following is covered: - Dashboard - Overall functionality and appearance check - Accounts - Verification of correct account count - Account panels - Ensuring functionality and appearance of account panels (AWS, GCP, Azure). - Verification of non-null values - Aggregation data panel - Navigation links - Confirmation of proper navigation links - Findings - Query + Grouping by - Data grid manipulations (pagination, sort) - Rules - Benchmark (Count > 0 for evaluation and compliance) --- .../cloud_tests/basic_ui_sanity.ts | 75 -------- .../cloud_tests/benchmark_sanity.ts | 50 +++++ .../cloud_tests/dashboard_sanity.ts | 139 ++++++++++++++ .../cloud_tests/findings_sanity.ts | 175 ++++++++++++++++++ .../cloud_tests/index.ts | 4 +- .../page_objects/benchmark_page.ts | 22 +++ .../page_objects/csp_dashboard_page.ts | 54 +++++- 7 files changed, 436 insertions(+), 83 deletions(-) delete mode 100644 x-pack/test/cloud_security_posture_functional/cloud_tests/basic_ui_sanity.ts create mode 100644 x-pack/test/cloud_security_posture_functional/cloud_tests/benchmark_sanity.ts create mode 100644 x-pack/test/cloud_security_posture_functional/cloud_tests/dashboard_sanity.ts create mode 100644 x-pack/test/cloud_security_posture_functional/cloud_tests/findings_sanity.ts diff --git a/x-pack/test/cloud_security_posture_functional/cloud_tests/basic_ui_sanity.ts b/x-pack/test/cloud_security_posture_functional/cloud_tests/basic_ui_sanity.ts deleted file mode 100644 index 495105017e5c22..00000000000000 --- a/x-pack/test/cloud_security_posture_functional/cloud_tests/basic_ui_sanity.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import expect from '@kbn/expect'; -import { FtrProviderContext } from '../ftr_provider_context'; - -// eslint-disable-next-line import/no-default-export -export default ({ getPageObjects, getService }: FtrProviderContext) => { - const retry = getService('retry'); - const pageObjects = getPageObjects(['common', 'cloudPostureDashboard', 'header']); - - describe('Cloud Posture Dashboard Page', function () { - this.tags(['cloud_security_posture_ui_sanity']); - let cspDashboard: typeof pageObjects.cloudPostureDashboard; - let dashboard: typeof pageObjects.cloudPostureDashboard.dashboard; - - before(async () => { - cspDashboard = pageObjects.cloudPostureDashboard; - dashboard = pageObjects.cloudPostureDashboard.dashboard; - await cspDashboard.waitForPluginInitialized(); - await cspDashboard.navigateToComplianceDashboardPage(); - await retry.waitFor( - 'Cloud posture integration dashboard to be displayed', - async () => !!dashboard.getIntegrationDashboardContainer() - ); - }); - - describe('Cloud Dashboard', () => { - it('displays compliance score greater than 40', async () => { - await pageObjects.header.waitUntilLoadingHasFinished(); - const scoreElement = await dashboard.getCloudComplianceScore(); - const score = parseInt((await scoreElement.getVisibleText()).replace('%', ''), 10); - expect(score).to.be.greaterThan(40); - }); - - it('displays all compliance scores', async () => { - const scoresElements = await dashboard.getAllCloudComplianceScores(); - const scores: string[] = []; - for (const scoreElement of scoresElements) { - scores.push(await scoreElement.getVisibleText()); - } - // 3 scores for each cloud provider + 1 summary score - expect(scores.length).to.be(4); - }); - - it('displays a number of resources evaluated greater than 3000', async () => { - const resourcesEvaluated = await dashboard.getCloudResourcesEvaluated(); - const visibleText = await resourcesEvaluated.getVisibleText(); - const resourcesEvaluatedCount = parseInt(visibleText.replace(/,/g, ''), 10); - expect(resourcesEvaluatedCount).greaterThan(3000); - }); - }); - - describe('Kubernetes Dashboard', () => { - it('displays compliance score greater than 80', async () => { - await pageObjects.header.waitUntilLoadingHasFinished(); - const scoreElement = await dashboard.getKubernetesComplianceScore(); - const score = parseInt((await scoreElement.getVisibleText()).replace('%', ''), 10); - expect(score).to.be.greaterThan(80); - }); - - it('displays a number of resources evaluated greater than 150', async () => { - const resourcesEvaluated = await dashboard.getKubernetesResourcesEvaluated(); - const resourcesEvaluatedCount = parseInt( - (await resourcesEvaluated.getVisibleText()).replace(/,/g, ''), - 10 - ); - expect(resourcesEvaluatedCount).greaterThan(150); - }); - }); - }); -}; diff --git a/x-pack/test/cloud_security_posture_functional/cloud_tests/benchmark_sanity.ts b/x-pack/test/cloud_security_posture_functional/cloud_tests/benchmark_sanity.ts new file mode 100644 index 00000000000000..277c1038e51ae0 --- /dev/null +++ b/x-pack/test/cloud_security_posture_functional/cloud_tests/benchmark_sanity.ts @@ -0,0 +1,50 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../ftr_provider_context'; + +// eslint-disable-next-line import/no-default-export +export default ({ getPageObjects, getService }: FtrProviderContext) => { + const pageObjects = getPageObjects(['common', 'benchmark']); + + describe('Benchmark Page - Sanity Tests', function () { + this.tags(['cloud_security_posture_ui_sanity']); + let benchmark: typeof pageObjects.benchmark; + + before(async () => { + benchmark = pageObjects.benchmark; + await benchmark.navigateToBenchnmarkPage(); + await benchmark.waitForPluginInitialized(); + }); + + it('Benchmark table exists', async () => { + expect(await benchmark.benchmarkPage.doesBenchmarkTableExists()); + }); + + it('Benchmarks count is more than 0', async () => { + const benchmarksRows = await benchmark.benchmarkPage.getBenchmarkTableRows(); + expect(benchmarksRows.length).to.be.greaterThan(0); + }); + + it('For each benchmark, evaluation and complience are not empty', async () => { + const benchmarksRows = await benchmark.benchmarkPage.getBenchmarkTableRows(); + for (const row of benchmarksRows) { + const benchmarkName = await benchmark.benchmarkPage.getCisNameCellData(row); + const evaluated = await benchmark.benchmarkPage.getEvaluatedCellData(row); + const compliance = await benchmark.benchmarkPage.getComplianceCellData(row); + expect(await evaluated).to.not.contain( + 'Add', + `The ${benchmarkName} does not have evaluated data` + ); + expect(await compliance).to.not.contain( + 'No', + `The ${benchmarkName} does not have compliance data` + ); + } + }); + }); +}; diff --git a/x-pack/test/cloud_security_posture_functional/cloud_tests/dashboard_sanity.ts b/x-pack/test/cloud_security_posture_functional/cloud_tests/dashboard_sanity.ts new file mode 100644 index 00000000000000..6eaafcb1541344 --- /dev/null +++ b/x-pack/test/cloud_security_posture_functional/cloud_tests/dashboard_sanity.ts @@ -0,0 +1,139 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../ftr_provider_context'; + +// eslint-disable-next-line import/no-default-export +export default ({ getPageObjects, getService }: FtrProviderContext) => { + const retry = getService('retry'); + const pageObjects = getPageObjects(['common', 'cloudPostureDashboard', 'header', 'findings']); + + describe('Cloud Posture Dashboard Page - Sanity Tests', function () { + this.tags(['cloud_security_posture_ui_sanity']); + let cspDashboard: typeof pageObjects.cloudPostureDashboard; + let dashboard: typeof pageObjects.cloudPostureDashboard.dashboard; + let findings: typeof pageObjects.findings; + let TAB_TYPES: typeof pageObjects.cloudPostureDashboard.TAB_TYPES; + + before(async () => { + cspDashboard = pageObjects.cloudPostureDashboard; + dashboard = pageObjects.cloudPostureDashboard.dashboard; + findings = pageObjects.findings; + TAB_TYPES = pageObjects.cloudPostureDashboard.TAB_TYPES; + await cspDashboard.waitForPluginInitialized(); + await cspDashboard.navigateToComplianceDashboardPage(); + await retry.waitFor( + 'Cloud posture integration dashboard to be displayed', + async () => !!dashboard.getIntegrationDashboardContainer() + ); + }); + + describe('Cloud Dashboard', () => { + it('displays compliance score greater than 40', async () => { + await pageObjects.header.waitUntilLoadingHasFinished(); + const scoreElement = await dashboard.getCloudComplianceScore(); + const score = parseInt((await scoreElement.getVisibleText()).replace('%', ''), 10); + expect(score).to.be.greaterThan(40); + }); + + it('displays all compliance scores', async () => { + const scoresElements = await dashboard.getAllCloudComplianceScores(); + const scores: string[] = []; + for (const scoreElement of scoresElements) { + scores.push(await scoreElement.getVisibleText()); + } + // 3 scores for each cloud provider + 1 summary score + expect(scores.length).to.be(4); + }); + + it('displays a number of resources evaluated greater than 1500', async () => { + const resourcesEvaluated = await dashboard.getCloudResourcesEvaluated(); + const visibleText = await resourcesEvaluated.getVisibleText(); + const resourcesEvaluatedCount = parseInt(visibleText.replace(/,/g, ''), 10); + expect(resourcesEvaluatedCount).greaterThan(1500); + }); + + it('Compliance By CIS sections have non empty values', async () => { + const complianceScoresChartPanel = await dashboard.getAllComplianceScoresByCisSection( + TAB_TYPES.CLOUD + ); + expect(complianceScoresChartPanel.length).to.be.greaterThan(0); + for (const score of complianceScoresChartPanel) { + const scoreValue = await score.getVisibleText(); + // Check if the score is a percentage + expect(scoreValue).to.match(/^\d+%$/); + } + }); + + it('Navigation to Findings page', async () => { + const findingsLinkCount = await dashboard.getFindingsLinksCount(TAB_TYPES.CLOUD); + for (let i = 0; i < findingsLinkCount; i++) { + const link = await dashboard.getFindingsLinkAtIndex(TAB_TYPES.CLOUD, i); + // for (const link of findingsLink) { + await link.click(); + await pageObjects.header.waitUntilLoadingHasFinished(); + const groupSelector = await findings.groupSelector(); + await groupSelector.openDropDown(); + await groupSelector.setValue('None'); + expect( + await findings.createDataTableObject('latest_findings_table').getRowsCount() + ).to.be.greaterThan(0); + await cspDashboard.navigateToComplianceDashboardPage(); + await pageObjects.header.waitUntilLoadingHasFinished(); + } + }); + }); + + describe('Kubernetes Dashboard', () => { + it('displays compliance score greater than 80', async () => { + await pageObjects.header.waitUntilLoadingHasFinished(); + const scoreElement = await dashboard.getKubernetesComplianceScore(); + const score = parseInt((await scoreElement.getVisibleText()).replace('%', ''), 10); + expect(score).to.be.greaterThan(80); + }); + + it('displays a number of resources evaluated greater than 150', async () => { + const resourcesEvaluated = await dashboard.getKubernetesResourcesEvaluated(); + const resourcesEvaluatedCount = parseInt( + (await resourcesEvaluated.getVisibleText()).replace(/,/g, ''), + 10 + ); + expect(resourcesEvaluatedCount).greaterThan(150); + }); + + it('Compliance By CIS sections have non empty values', async () => { + const complianceScoresChartPanel = await dashboard.getAllComplianceScoresByCisSection( + 'Kubernetes' + ); + expect(complianceScoresChartPanel.length).to.be.greaterThan(0); + for (const score of complianceScoresChartPanel) { + const scoreValue = await score.getVisibleText(); + // Check if the score is a percentage + expect(scoreValue).to.match(/^\d+%$/); + } + }); + + it('Navigation to Findings page', async () => { + const findingsLinkCount = await dashboard.getFindingsLinksCount(TAB_TYPES.KUBERNETES); + for (let i = 0; i < findingsLinkCount; i++) { + const link = await dashboard.getFindingsLinkAtIndex(TAB_TYPES.KUBERNETES, i); + await link.click(); + await pageObjects.header.waitUntilLoadingHasFinished(); + const groupSelector = await findings.groupSelector(); + await groupSelector.openDropDown(); + await groupSelector.setValue('None'); + expect( + await findings.createDataTableObject('latest_findings_table').getRowsCount() + ).to.be.greaterThan(0); + await cspDashboard.navigateToComplianceDashboardPage(); + await pageObjects.header.waitUntilLoadingHasFinished(); + await dashboard.getKubernetesDashboard(); + } + }); + }); + }); +}; diff --git a/x-pack/test/cloud_security_posture_functional/cloud_tests/findings_sanity.ts b/x-pack/test/cloud_security_posture_functional/cloud_tests/findings_sanity.ts new file mode 100644 index 00000000000000..fd8c8a956b1d59 --- /dev/null +++ b/x-pack/test/cloud_security_posture_functional/cloud_tests/findings_sanity.ts @@ -0,0 +1,175 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../ftr_provider_context'; + +// eslint-disable-next-line import/no-default-export +export default ({ getPageObjects, getService }: FtrProviderContext) => { + const pageObjects = getPageObjects(['common', 'findings', 'header']); + const queryBar = getService('queryBar'); + const testSubjects = getService('testSubjects'); + + describe('Findings Page - Sanity Tests', function () { + this.tags(['cloud_security_posture_ui_sanity']); + let findings: typeof pageObjects.findings; + let latestFindingsTable: typeof findings.latestFindingsTable; + + before(async () => { + findings = pageObjects.findings; + latestFindingsTable = pageObjects.findings.latestFindingsTable; + await findings.navigateToLatestFindingsPage(); + await findings.waitForPluginInitialized(); + }); + + describe('Findings - Querying data', () => { + afterEach(async () => { + // Reset the group selector to None + const groupSelector = await findings.groupSelector(); + await groupSelector.openDropDown(); + await groupSelector.setValue('None'); + // Reset search query + await queryBar.clearQuery(); + await queryBar.submitQuery(); + }); + + const testCases = [ + { + searchQuery: + 'cloud.provider : "aws" and cloud.region : "eu-west-3" and result.evaluation : "failed" and rule.tags : "CIS 5.4"', + provider: 'aws', + expectedRowsCount: 3, + expectedGroupCount: '1 cloud account', + expectedUnitCount: '3 findings', + }, + { + searchQuery: + 'cloud.provider : "gcp" and rule.benchmark.rule_number : "3.1" and result.evaluation : "failed"', + provider: 'gcp', + expectedRowsCount: 1, + expectedGroupCount: '1 cloud account', + expectedUnitCount: '1 finding', + }, + { + searchQuery: + 'cloud.provider : "azure" and rule.benchmark.rule_number : "7.1" and result.evaluation : "failed"', + provider: 'azure', + expectedRowsCount: 1, + expectedGroupCount: '1 cloud account', + expectedUnitCount: '1 finding', + }, + { + searchQuery: + 'rule.benchmark.id : "cis_k8s" and rule.benchmark.rule_number : "4.2.4" and result.evaluation : "failed"', + provider: 'k8s', + expectedRowsCount: 2, + expectedGroupCount: '0 cloud accounts', + expectedUnitCount: '2 findings', + }, + { + searchQuery: 'rule.benchmark.id : "cis_eks" and rule.benchmark.rule_number : "3.1.1"', + provider: 'eks', + expectedRowsCount: 2, + expectedGroupCount: '0 cloud accounts', + expectedUnitCount: '2 findings', + }, + ]; + + testCases.forEach( + ({ searchQuery, provider, expectedRowsCount, expectedGroupCount, expectedUnitCount }) => { + it(`Querying ${provider} provider data`, async () => { + // Execute the query + await queryBar.setQuery(searchQuery); + await queryBar.submitQuery(); + // Get the number of rows in the data table + const rowsCount = await findings + .createDataTableObject('latest_findings_table') + .getRowsCount(); + + // Check that the number of rows matches the expected count + expect(rowsCount).to.be(expectedRowsCount); + const groupSelector = await findings.groupSelector(); + await groupSelector.openDropDown(); + await groupSelector.setValue('Cloud account'); + const grouping = await findings.findingsGrouping(); + // Check that the group count and unit count matches the expected values + const groupCount = await grouping.getGroupCount(); + expect(groupCount).to.be(expectedGroupCount); + + const unitCount = await grouping.getUnitCount(); + expect(unitCount).to.be(expectedUnitCount); + }); + } + ); + }); + + describe('Findings - Sorting data', () => { + afterEach(async () => { + const paginationBtn = await testSubjects.find('tablePaginationPopoverButton'); + await paginationBtn.click(); + const pageSizeOption = await testSubjects.find('tablePagination-50-rows'); + await pageSizeOption.click(); + }); + + type SortDirection = 'asc' | 'desc'; + const paginationAndsortingTestCases: Array<{ + searchQuery: string; + paginationRowsCount: string; + columnName: string; + sortType: SortDirection; + expectedResult: string; + }> = [ + { + searchQuery: + 'cloud.provider : "aws" and resource.sub_type : "aws-iam-user" and result.evaluation : "passed"', + paginationRowsCount: '250', + columnName: 'rule.benchmark.rule_number', + sortType: 'desc', + expectedResult: '1.7', + }, + { + searchQuery: 'cloud.provider : "azure" and result.evaluation : "failed"', + paginationRowsCount: '500', + columnName: 'rule.benchmark.rule_number', + sortType: 'asc', + expectedResult: '1.23', + }, + { + searchQuery: 'cloud.provider : "gcp" and result.evaluation : "passed"', + paginationRowsCount: '500', + columnName: 'resource.sub_type', + sortType: 'desc', + expectedResult: 'gcp-storage-bucket', + }, + ]; + + paginationAndsortingTestCases.forEach( + ({ searchQuery, paginationRowsCount, columnName, sortType, expectedResult }) => { + it(`Paginating and sorting data`, async () => { + // Run query + await queryBar.clearQuery(); + await queryBar.setQuery(searchQuery); + await queryBar.submitQuery(); + // Update latest findings table pagination + const paginationBtn = await testSubjects.find('tablePaginationPopoverButton'); + await paginationBtn.click(); + const pageSizeOption = await testSubjects.find( + `tablePagination-${paginationRowsCount}-rows` + ); + await pageSizeOption.click(); + // Sort by column + await latestFindingsTable.toggleColumnSort(columnName, sortType); + await pageObjects.header.waitUntilLoadingHasFinished(); + const values = (await latestFindingsTable.getColumnValues(columnName)).filter(Boolean); + // Check that the first value matches the expected result + // Whole sorting logic functionality is checked in the findings.ts + expect(values[0]).to.equal(expectedResult); + }); + } + ); + }); + }); +}; diff --git a/x-pack/test/cloud_security_posture_functional/cloud_tests/index.ts b/x-pack/test/cloud_security_posture_functional/cloud_tests/index.ts index b08970ccaed13f..80afb04563326f 100644 --- a/x-pack/test/cloud_security_posture_functional/cloud_tests/index.ts +++ b/x-pack/test/cloud_security_posture_functional/cloud_tests/index.ts @@ -10,6 +10,8 @@ import { FtrProviderContext } from '../ftr_provider_context'; // eslint-disable-next-line import/no-default-export export default function ({ loadTestFile }: FtrProviderContext) { describe('Cloud Security Posture', function () { - loadTestFile(require.resolve('./basic_ui_sanity')); + loadTestFile(require.resolve('./dashboard_sanity')); + loadTestFile(require.resolve('./benchmark_sanity')); + loadTestFile(require.resolve('./findings_sanity')); }); } diff --git a/x-pack/test/cloud_security_posture_functional/page_objects/benchmark_page.ts b/x-pack/test/cloud_security_posture_functional/page_objects/benchmark_page.ts index 39856fa34d3fba..25ae1181f38b50 100644 --- a/x-pack/test/cloud_security_posture_functional/page_objects/benchmark_page.ts +++ b/x-pack/test/cloud_security_posture_functional/page_objects/benchmark_page.ts @@ -40,6 +40,28 @@ export function BenchmarkPagePageProvider({ getService, getPageObjects }: FtrPro doesBenchmarkTableExists: async () => { return await testSubjects.find('csp_benchmarks_table'); }, + + getBenchmarkTableRows: async () => { + const benchmarkTable = await testSubjects.find(CSP_BECNHMARK_TABLE); + return await benchmarkTable.findAllByXpath(`//tbody//tr`); + }, + + getCellData: async (row: any, cellDataTestSubj: string) => { + const cell = await row.findByTestSubject(cellDataTestSubj); + return await cell.getVisibleText(); + }, + + getEvaluatedCellData: async (row: any) => { + return await benchmarkPage.getCellData(row, 'benchmark-table-column-evaluated'); + }, + + getComplianceCellData: async (row: any) => { + return await benchmarkPage.getCellData(row, 'benchmark-table-column-compliance'); + }, + + getCisNameCellData: async (row: any) => { + return await benchmarkPage.getCellData(row, 'benchmark-table-column-cis-name'); + }, }; const navigateToBenchnmarkPage = async () => { diff --git a/x-pack/test/cloud_security_posture_functional/page_objects/csp_dashboard_page.ts b/x-pack/test/cloud_security_posture_functional/page_objects/csp_dashboard_page.ts index 4343662e32efdb..6f40f7b07003d6 100644 --- a/x-pack/test/cloud_security_posture_functional/page_objects/csp_dashboard_page.ts +++ b/x-pack/test/cloud_security_posture_functional/page_objects/csp_dashboard_page.ts @@ -52,6 +52,11 @@ export function CspDashboardPageProvider({ getService, getPageObjects }: FtrProv }, }; + const TAB_TYPES = { + CLOUD: 'Cloud', + KUBERNETES: 'Kubernetes', + } as const; + const dashboard = { getDashboardPageHeader: () => testSubjects.find('cloud-posture-dashboard-page-header'), @@ -63,31 +68,65 @@ export function CspDashboardPageProvider({ getService, getPageObjects }: FtrProv getCloudTab: async () => { const tabs = await dashboard.getDashboardTabs(); - return await tabs.findByXpath(`//span[text()="Cloud"]`); + return await tabs.findByXpath(`//span[text()="${TAB_TYPES.CLOUD}"]`); }, getKubernetesTab: async () => { const tabs = await dashboard.getDashboardTabs(); - return await tabs.findByXpath(`//span[text()="Kubernetes"]`); + return await tabs.findByXpath(`//span[text()="${TAB_TYPES.KUBERNETES}"]`); }, - clickTab: async (tab: 'Cloud' | 'Kubernetes') => { - if (tab === 'Cloud') { + clickTab: async (tab: typeof TAB_TYPES[keyof typeof TAB_TYPES]) => { + if (tab === TAB_TYPES.CLOUD) { const cloudTab = await dashboard.getCloudTab(); await cloudTab.click(); } - if (tab === 'Kubernetes') { + if (tab === TAB_TYPES.KUBERNETES) { const k8sTab = await dashboard.getKubernetesTab(); await k8sTab.click(); } }, + getAllComplianceScoresByCisSection: async (tab: typeof TAB_TYPES[keyof typeof TAB_TYPES]) => { + await dashboard.getDashoard(tab); + const pageContainer = await testSubjects.find('pageContainer'); + return await pageContainer.findAllByTestSubject('cloudSecurityFindingsComplianceScore'); + }, + + getDashoard: async (tab: typeof TAB_TYPES[keyof typeof TAB_TYPES]) => { + if (tab === TAB_TYPES.CLOUD) { + return await dashboard.getCloudDashboard(); + } + if (tab === TAB_TYPES.KUBERNETES) { + return await dashboard.getKubernetesDashboard(); + } + }, + + getFindingsLinks: async (tab: typeof TAB_TYPES[keyof typeof TAB_TYPES]) => { + await dashboard.getDashoard(tab); + const pageContainer = await testSubjects.find('pageContainer'); + return await pageContainer.findAllByXpath(`//button[contains(@class, 'euiLink')]`); + }, + + getFindingsLinkAtIndex: async ( + tab: typeof TAB_TYPES[keyof typeof TAB_TYPES], + linkIndex = 0 + ) => { + const allLinks = await dashboard.getFindingsLinks(tab); + return await allLinks[linkIndex]; + }, + + getFindingsLinksCount: async (tab: typeof TAB_TYPES[keyof typeof TAB_TYPES]) => { + const allLinks = await dashboard.getFindingsLinks(tab); + return await allLinks.length; + }, + getIntegrationDashboardContainer: () => testSubjects.find('dashboard-container'), // Cloud Dashboard getCloudDashboard: async () => { - await dashboard.clickTab('Cloud'); + await dashboard.clickTab(TAB_TYPES.CLOUD); return await testSubjects.find('cloud-dashboard-container'); }, @@ -119,7 +158,7 @@ export function CspDashboardPageProvider({ getService, getPageObjects }: FtrProv // Kubernetes Dashboard getKubernetesDashboard: async () => { - await dashboard.clickTab('Kubernetes'); + await dashboard.clickTab(TAB_TYPES.KUBERNETES); return await testSubjects.find('kubernetes-dashboard-container'); }, @@ -161,5 +200,6 @@ export function CspDashboardPageProvider({ getService, getPageObjects }: FtrProv navigateToComplianceDashboardPage, dashboard, index, + TAB_TYPES, }; } From 7997d6fe33cfea1d5e0897c8b95156fe3830b30a Mon Sep 17 00:00:00 2001 From: Dima Arnautov Date: Tue, 9 Jul 2024 15:21:20 +0300 Subject: [PATCH 056/103] [ML] Hide ML embeddables from the "Add panel" flyout when ML feature isn't available (#187639) ## Summary Fixes #187007 Hides ML embeddables from the "Add panel" flyout when 1. ML feature isn't available for the user role 2. ML is hidden in a current space ### How to test 1. Create a custom role with disabled ML privilege and assign it to a user ![image](https://github.com/elastic/kibana/assets/5236598/07fe2865-2ebe-448f-8e31-c36581b57b28) 2. Remove ML feature visibility in a current space ![image](https://github.com/elastic/kibana/assets/5236598/dc3f19fa-cb29-424a-a04d-677518bb45fa) ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --- .../services/dashboard/add_panel.ts | 9 ++++-- x-pack/plugins/aiops/public/plugin.tsx | 4 ++- x-pack/plugins/ml/public/plugin.ts | 2 +- .../apps/ml/permissions/no_ml_access.ts | 26 +++++++++++++++- .../services/ml/dashboard_embeddables.ts | 7 +++++ .../functional/services/ml/security_common.ts | 30 +++++++++++++++++++ 6 files changed, 73 insertions(+), 5 deletions(-) diff --git a/test/functional/services/dashboard/add_panel.ts b/test/functional/services/dashboard/add_panel.ts index ffc62bdfdb68af..16b283f2b5c535 100644 --- a/test/functional/services/dashboard/add_panel.ts +++ b/test/functional/services/dashboard/add_panel.ts @@ -69,9 +69,14 @@ export class DashboardAddPanelService extends FtrService { await this.testSubjects.click(`visType-${visType}`); } - async verifyEmbeddableFactoryGroupExists(groupId: string) { + async verifyEmbeddableFactoryGroupExists(groupId: string, expectExist: boolean = true) { this.log.debug('DashboardAddPanel.verifyEmbeddableFactoryGroupExists'); - await this.testSubjects.existOrFail(`dashboardEditorMenu-${groupId}Group`); + const testSubject = `dashboardEditorMenu-${groupId}Group`; + if (expectExist) { + await this.testSubjects.existOrFail(testSubject); + } else { + await this.testSubjects.missingOrFail(testSubject); + } } async clickAddNewEmbeddableLink(type: string) { diff --git a/x-pack/plugins/aiops/public/plugin.tsx b/x-pack/plugins/aiops/public/plugin.tsx index b1d62c42751800..7d55c3098cfafe 100755 --- a/x-pack/plugins/aiops/public/plugin.tsx +++ b/x-pack/plugins/aiops/public/plugin.tsx @@ -41,7 +41,9 @@ export class AiopsPlugin { registerChangePointChartsAttachment }, [coreStart, pluginStart], ]) => { - if (license.hasAtLeast('platinum')) { + const { canUseAiops } = coreStart.application.capabilities.ml; + + if (license.hasAtLeast('platinum') && canUseAiops) { if (embeddable) { registerEmbeddables(embeddable, core); } diff --git a/x-pack/plugins/ml/public/plugin.ts b/x-pack/plugins/ml/public/plugin.ts index 0a7e44959a262a..ae41b31d3eaafe 100644 --- a/x-pack/plugins/ml/public/plugin.ts +++ b/x-pack/plugins/ml/public/plugin.ts @@ -269,7 +269,7 @@ export class MlPlugin implements Plugin { ); } - if (fullLicense) { + if (fullLicense && mlCapabilities.canGetMlInfo) { registerMlUiActions(pluginsSetup.uiActions, core); if (this.enabledFeatures.ad) { diff --git a/x-pack/test/functional/apps/ml/permissions/no_ml_access.ts b/x-pack/test/functional/apps/ml/permissions/no_ml_access.ts index 1974a48e778413..d6729e7bef923b 100644 --- a/x-pack/test/functional/apps/ml/permissions/no_ml_access.ts +++ b/x-pack/test/functional/apps/ml/permissions/no_ml_access.ts @@ -10,8 +10,9 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../services/ml/security_common'; export default function ({ getPageObjects, getService }: FtrProviderContext) { - const PageObjects = getPageObjects(['common', 'error']); + const PageObjects = getPageObjects(['common', 'error', 'dashboard']); const ml = getService('ml'); + const esArchiver = getService('esArchiver'); const testUsers = [{ user: USER.ML_UNAUTHORIZED, discoverAvailable: true }]; @@ -56,5 +57,28 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); }); } + + describe('for user with no ML access and Kibana features access', function () { + before(async () => { + await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/farequote'); + await ml.testResources.createDataViewIfNeeded('ft_farequote', '@timestamp'); + await ml.securityUI.loginAs(USER.ML_DISABLED); + await ml.api.cleanMlIndices(); + }); + + after(async () => { + // NOTE: Logout needs to happen before anything else to avoid flaky behavior + await ml.securityUI.logout(); + }); + + it('should not register ML embeddables in the dashboard', async () => { + await ml.testExecution.logTestStep( + 'should not contain ML embeddable in the Add panel list' + ); + await PageObjects.dashboard.navigateToApp(); + await PageObjects.dashboard.clickCreateDashboardPrompt(); + await ml.dashboardEmbeddables.assertMlSectionExists(false); + }); + }); }); } diff --git a/x-pack/test/functional/services/ml/dashboard_embeddables.ts b/x-pack/test/functional/services/ml/dashboard_embeddables.ts index b22622ead61d0c..3d88b3b9fd9c8c 100644 --- a/x-pack/test/functional/services/ml/dashboard_embeddables.ts +++ b/x-pack/test/functional/services/ml/dashboard_embeddables.ts @@ -114,6 +114,13 @@ export function MachineLearningDashboardEmbeddablesProvider( }); }, + async assertMlSectionExists(expectExist = true) { + await retry.tryForTime(60 * 1000, async () => { + await dashboardAddPanel.clickEditorMenuButton(); + await dashboardAddPanel.verifyEmbeddableFactoryGroupExists('ml', expectExist); + }); + }, + async openAnomalyJobSelectionFlyout( mlEmbeddableType: 'ml_anomaly_swimlane' | 'ml_anomaly_charts' | 'ml_single_metric_viewer' ) { diff --git a/x-pack/test/functional/services/ml/security_common.ts b/x-pack/test/functional/services/ml/security_common.ts index 6952183e7bdef3..6d9aee298beaa3 100644 --- a/x-pack/test/functional/services/ml/security_common.ts +++ b/x-pack/test/functional/services/ml/security_common.ts @@ -21,6 +21,7 @@ export enum USER { ML_VIEWER_SPACE1 = 'ft_ml_viewer_space1', ML_VIEWER_ALL_SPACES = 'ft_ml_viewer_all_spaces', ML_UNAUTHORIZED = 'ft_ml_unauthorized', + ML_DISABLED = 'ft_ml_disabled', } export function MachineLearningSecurityCommonProvider({ getService }: FtrProviderContext) { @@ -133,6 +134,29 @@ export function MachineLearningSecurityCommonProvider({ getService }: FtrProvide elasticsearch: { cluster: [], indices: [], run_as: [] }, kibana: [{ base: [], feature: { discover: ['read'] }, spaces: ['default'] }], }, + { + name: 'ft_ml_disabled', + elasticsearch: { cluster: [], indices: [], run_as: [] }, + kibana: [ + { + base: [], + feature: { + // FIXME: We need permission to save search in Discover to test the data viz embeddable + // change permission back to read once tests are moved out of ML + discover: ['all'], + visualize: ['add'], + dashboard: ['all'], + actions: ['all'], + savedObjectsManagement: ['all'], + advancedSettings: ['all'], + indexPatterns: ['all'], + generalCases: ['all'], + ml: ['none'], + }, + spaces: ['*'], + }, + ], + }, { name: 'ft_all_space_ml_none', elasticsearch: { cluster: [], indices: [], run_as: [] }, @@ -230,6 +254,12 @@ export function MachineLearningSecurityCommonProvider({ getService }: FtrProvide password: 'mlu001', roles: ['ft_default_space_ml_none', 'ft_ml_source_readonly'], }, + { + name: 'ft_ml_disabled', + full_name: 'ML Disabled', + password: 'mlud001', + roles: ['ft_ml_disabled'], + }, ]; return { From df22162faf44c561a6246e3e07595db7c3b516eb Mon Sep 17 00:00:00 2001 From: Paul Tavares <56442535+paul-tavares@users.noreply.github.com> Date: Tue, 9 Jul 2024 08:26:44 -0400 Subject: [PATCH 057/103] [Security Solution][Endpoint] Add `kill-process` API support for SentinelOne agents (#186133) ## Summary #### Security Solution changes: - Adds new feature flag for `kill-process` operation against SentinelOne hosts - Adds support for `kill-process` to the existing api for `agent_type` of `sentinel_one` #### Stack Connectors changes: The following changes were done to the SentinelOne connector: - Added additional query param to the `getRemoteScripts()` sub-action --- .../connector_types.test.ts.snap | 38 +++ .../api/endpoint/actions/common/base.ts | 10 - .../actions/common/response_actions.ts | 11 +- .../endpoint/actions/kill_process_route.ts | 37 ++- .../endpoint/actions/suspend_process_route.ts | 13 +- .../common/endpoint/schema/actions.test.ts | 69 ++++- .../is_response_action_supported.ts | 2 +- .../common/endpoint/types/actions.ts | 38 ++- .../common/endpoint/types/sentinel_one.ts | 8 + .../common/experimental_features.ts | 3 + .../common/lib/process_actions/index.ts | 9 +- .../kill_process_action.tsx | 6 +- .../suspend_process_action.tsx | 9 +- .../lib/console_commands_definition.ts | 4 + .../endpoint_responder/lib/utils.ts | 7 +- .../use_send_kill_process_endpoint_request.ts | 14 +- ...e_send_suspend_process_endpoint_request.ts | 14 +- .../complete_external_actions_task_runner.ts | 4 +- .../routes/actions/response_actions.ts | 15 +- .../crowdstrike_actions_client.test.ts | 4 +- .../crowdstrike/crowdstrike_actions_client.ts | 25 +- .../endpoint/endpoint_actions_client.test.ts | 6 +- .../endpoint/endpoint_actions_client.ts | 25 +- .../lib/base_response_actions_client.ts | 47 +++- .../clients/lib/simple_mem_cache.test.ts | 75 +++++ .../actions/clients/lib/simple_mem_cache.ts | 89 ++++++ .../services/actions/clients/lib/types.ts | 13 +- .../services/actions/clients/mocks.ts | 5 +- .../actions/clients/sentinelone/mocks.ts | 64 +++++ .../sentinel_one_actions_client.test.ts | 177 +++++++++++- .../sentinel_one_actions_client.ts | 257 +++++++++++++++--- .../actions/clients/sentinelone/types.ts | 23 +- .../endpoint/services/actions/utils/utils.ts | 10 - .../endpoint_response_action.ts | 9 +- .../common/sentinelone/schema.ts | 3 + .../apis/endpoint_authz.ts | 34 ++- 36 files changed, 963 insertions(+), 214 deletions(-) create mode 100644 x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/simple_mem_cache.test.ts create mode 100644 x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/simple_mem_cache.ts diff --git a/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap b/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap index e1366f7f9c573d..05d74f781c4346 100644 --- a/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap +++ b/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap @@ -7561,6 +7561,44 @@ Object { ], "type": "alternatives", }, + "scriptType": Object { + "flags": Object { + "default": null, + "error": [Function], + "presence": "optional", + }, + "matches": Array [ + Object { + "schema": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + }, + Object { + "schema": Object { + "allow": Array [ + null, + ], + "flags": Object { + "error": [Function], + "only": true, + }, + "type": "any", + }, + }, + ], + "type": "alternatives", + }, }, "type": "object", } diff --git a/x-pack/plugins/security_solution/common/api/endpoint/actions/common/base.ts b/x-pack/plugins/security_solution/common/api/endpoint/actions/common/base.ts index a5e5c060e7303f..8bb76a19fa0155 100644 --- a/x-pack/plugins/security_solution/common/api/endpoint/actions/common/base.ts +++ b/x-pack/plugins/security_solution/common/api/endpoint/actions/common/base.ts @@ -71,13 +71,3 @@ export const NoParametersRequestSchema = { body: schema.object({ ...BaseActionRequestSchema }), }; export type BaseActionRequestBody = TypeOf; - -export const KillOrSuspendProcessRequestSchema = { - body: schema.object({ - ...BaseActionRequestSchema, - parameters: schema.oneOf([ - schema.object({ pid: schema.number({ min: 1 }) }), - schema.object({ entity_id: schema.string({ minLength: 1 }) }), - ]), - }), -}; diff --git a/x-pack/plugins/security_solution/common/api/endpoint/actions/common/response_actions.ts b/x-pack/plugins/security_solution/common/api/endpoint/actions/common/response_actions.ts index 66dc4d5828ce00..ca6d9d5e91982d 100644 --- a/x-pack/plugins/security_solution/common/api/endpoint/actions/common/response_actions.ts +++ b/x-pack/plugins/security_solution/common/api/endpoint/actions/common/response_actions.ts @@ -7,15 +7,20 @@ import type { TypeOf } from '@kbn/config-schema'; import { schema } from '@kbn/config-schema'; -import { UploadActionRequestSchema } from '../..'; +import { + KillProcessRouteRequestSchema, + SuspendProcessRouteRequestSchema, + UploadActionRequestSchema, +} from '../..'; import { ExecuteActionRequestSchema } from '../execute_route'; import { EndpointActionGetFileSchema } from '../get_file_route'; import { ScanActionRequestSchema } from '../scan_route'; -import { KillOrSuspendProcessRequestSchema, NoParametersRequestSchema } from './base'; +import { NoParametersRequestSchema } from './base'; export const ResponseActionBodySchema = schema.oneOf([ NoParametersRequestSchema.body, - KillOrSuspendProcessRequestSchema.body, + KillProcessRouteRequestSchema.body, + SuspendProcessRouteRequestSchema.body, EndpointActionGetFileSchema.body, ExecuteActionRequestSchema.body, ScanActionRequestSchema.body, diff --git a/x-pack/plugins/security_solution/common/api/endpoint/actions/kill_process_route.ts b/x-pack/plugins/security_solution/common/api/endpoint/actions/kill_process_route.ts index 8652623f93a573..f3c0d4e8f12be2 100644 --- a/x-pack/plugins/security_solution/common/api/endpoint/actions/kill_process_route.ts +++ b/x-pack/plugins/security_solution/common/api/endpoint/actions/kill_process_route.ts @@ -5,6 +5,39 @@ * 2.0. */ -import { KillOrSuspendProcessRequestSchema } from './common/base'; +import { schema } from '@kbn/config-schema'; +import { BaseActionRequestSchema } from './common/base'; -export const KillProcessRouteRequestSchema = KillOrSuspendProcessRequestSchema; +// -------------------------------------------------- +// Tests for this module are at: +// x-pack/plugins/security_solution/common/endpoint/schema/actions.test.ts:604 +// -------------------------------------------------- + +export const KillProcessRouteRequestSchema = { + body: schema.object( + { + ...BaseActionRequestSchema, + parameters: schema.oneOf([ + schema.object({ pid: schema.number({ min: 1 }) }), + schema.object({ entity_id: schema.string({ minLength: 1 }) }), + + // Process Name currently applies only to SentinelOne (validated below) + schema.object({ process_name: schema.string({ minLength: 1 }) }), + ]), + }, + { + validate(bodyContent) { + if ('process_name' in bodyContent.parameters && bodyContent.agent_type !== 'sentinel_one') { + return `[parameters.process_name]: is not valid with agent type of ${bodyContent.agent_type}`; + } + + if ( + bodyContent.agent_type === 'sentinel_one' && + !('process_name' in bodyContent.parameters) + ) { + return `[parameters.process_name]: missing parameter for agent type of ${bodyContent.agent_type}`; + } + }, + } + ), +}; diff --git a/x-pack/plugins/security_solution/common/api/endpoint/actions/suspend_process_route.ts b/x-pack/plugins/security_solution/common/api/endpoint/actions/suspend_process_route.ts index 71801f4b979fc3..81edb01197c696 100644 --- a/x-pack/plugins/security_solution/common/api/endpoint/actions/suspend_process_route.ts +++ b/x-pack/plugins/security_solution/common/api/endpoint/actions/suspend_process_route.ts @@ -5,6 +5,15 @@ * 2.0. */ -import { KillOrSuspendProcessRequestSchema } from './common/base'; +import { schema } from '@kbn/config-schema'; +import { BaseActionRequestSchema } from './common/base'; -export const SuspendProcessRouteRequestSchema = KillOrSuspendProcessRequestSchema; +export const SuspendProcessRouteRequestSchema = { + body: schema.object({ + ...BaseActionRequestSchema, + parameters: schema.oneOf([ + schema.object({ pid: schema.number({ min: 1 }) }), + schema.object({ entity_id: schema.string({ minLength: 1 }) }), + ]), + }), +}; diff --git a/x-pack/plugins/security_solution/common/endpoint/schema/actions.test.ts b/x-pack/plugins/security_solution/common/endpoint/schema/actions.test.ts index 563633ed8413dc..4ea9f59ea179d1 100644 --- a/x-pack/plugins/security_solution/common/endpoint/schema/actions.test.ts +++ b/x-pack/plugins/security_solution/common/endpoint/schema/actions.test.ts @@ -14,11 +14,13 @@ import { } from '../service/response_actions/constants'; import { createHapiReadableStreamMock } from '../../../server/endpoint/services/actions/mocks'; import type { HapiReadableStream } from '../../../server/types'; -import { EndpointActionListRequestSchema, UploadActionRequestSchema } from '../../api/endpoint'; import { - KillOrSuspendProcessRequestSchema, - NoParametersRequestSchema, -} from '../../api/endpoint/actions/common/base'; + EndpointActionListRequestSchema, + KillProcessRouteRequestSchema, + SuspendProcessRouteRequestSchema, + UploadActionRequestSchema, +} from '../../api/endpoint'; +import { NoParametersRequestSchema } from '../../api/endpoint/actions/common/base'; import { ExecuteActionRequestSchema } from '../../api/endpoint/actions/execute_route'; import { ScanActionRequestSchema } from '../../api/endpoint/actions/scan_route'; @@ -507,16 +509,20 @@ describe('actions schemas', () => { }); }); - describe('KillOrSuspendProcessRequestSchema', () => { + describe.each` + name | killOrSuspendSchema + ${'KillProcessRouteRequestSchema'} | ${KillProcessRouteRequestSchema} + ${'SuspendProcessRouteRequestSchema'} | ${SuspendProcessRouteRequestSchema} + `('$name', ({ name, killOrSuspendSchema }) => { it('should not accept when no endpoint_ids', () => { expect(() => { - KillOrSuspendProcessRequestSchema.body.validate({}); + killOrSuspendSchema.body.validate({}); }).toThrow(); }); it('should not accept empty endpoint_ids array', () => { expect(() => { - KillOrSuspendProcessRequestSchema.body.validate({ + killOrSuspendSchema.body.validate({ endpoint_ids: [], }); }).toThrow(); @@ -524,7 +530,7 @@ describe('actions schemas', () => { it('should not accept empty string as endpoint id', () => { expect(() => { - KillOrSuspendProcessRequestSchema.body.validate({ + killOrSuspendSchema.body.validate({ endpoint_ids: [' '], }); }).toThrow(); @@ -532,7 +538,7 @@ describe('actions schemas', () => { it('should not accept any empty string in endpoint_ids array', () => { expect(() => { - KillOrSuspendProcessRequestSchema.body.validate({ + killOrSuspendSchema.body.validate({ endpoint_ids: ['x', ' ', 'y'], }); }).toThrow(); @@ -540,7 +546,7 @@ describe('actions schemas', () => { it('should accept pid', () => { expect(() => { - KillOrSuspendProcessRequestSchema.body.validate({ + killOrSuspendSchema.body.validate({ endpoint_ids: ['ABC-XYZ-000'], parameters: { pid: 1234, @@ -551,7 +557,7 @@ describe('actions schemas', () => { it('should accept entity_id', () => { expect(() => { - KillOrSuspendProcessRequestSchema.body.validate({ + killOrSuspendSchema.body.validate({ endpoint_ids: ['ABC-XYZ-000'], parameters: { entity_id: 'abc123', @@ -562,7 +568,7 @@ describe('actions schemas', () => { it('should reject pid and entity_id together', () => { expect(() => { - KillOrSuspendProcessRequestSchema.body.validate({ + killOrSuspendSchema.body.validate({ endpoint_ids: ['ABC-XYZ-000'], parameters: { pid: 1234, @@ -574,7 +580,7 @@ describe('actions schemas', () => { it('should reject if no pid or entity_id', () => { expect(() => { - KillOrSuspendProcessRequestSchema.body.validate({ + killOrSuspendSchema.body.validate({ endpoint_ids: ['ABC-XYZ-000'], comment: 'a user comment', parameters: {}, @@ -584,7 +590,7 @@ describe('actions schemas', () => { it('should accept a comment', () => { expect(() => { - KillOrSuspendProcessRequestSchema.body.validate({ + killOrSuspendSchema.body.validate({ endpoint_ids: ['ABC-XYZ-000'], comment: 'a user comment', parameters: { @@ -595,6 +601,41 @@ describe('actions schemas', () => { }); }); + describe('KillProcessRequestSchema for SentinelOne', () => { + it('should error if agentType is not sentinel_one and process_name parameter is used', () => { + expect(() => { + KillProcessRouteRequestSchema.body.validate({ + endpoint_ids: ['abc'], + parameters: { + process_name: 'explorer.exe', + }, + }); + }).toThrow(); + }); + + it('should error if agentType is sentinel_one but process_name is not defined', () => { + expect(() => { + KillProcessRouteRequestSchema.body.validate({ + endpoint_ids: ['abc'], + agent_type: 'sentinel_one', + parameters: { pid: 4 }, + }); + }).toThrow(); + }); + + it('should allow use of process_name if agentType is sentinel_one', () => { + expect(() => { + KillProcessRouteRequestSchema.body.validate({ + endpoint_ids: ['abc'], + agent_type: 'sentinel_one', + parameters: { + process_name: 'explorer.exe', + }, + }); + }).not.toThrow(); + }); + }); + describe('ExecuteActionRequestSchema', () => { it('should not accept when no endpoint_ids', () => { expect(() => { diff --git a/x-pack/plugins/security_solution/common/endpoint/service/response_actions/is_response_action_supported.ts b/x-pack/plugins/security_solution/common/endpoint/service/response_actions/is_response_action_supported.ts index 0c0d0db9607094..61216afeea1ee2 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/response_actions/is_response_action_supported.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/response_actions/is_response_action_supported.ts @@ -74,7 +74,7 @@ const RESPONSE_ACTIONS_SUPPORT_MAP: SupportMap = { }, manual: { endpoint: true, - sentinel_one: false, + sentinel_one: true, crowdstrike: false, }, }, diff --git a/x-pack/plugins/security_solution/common/endpoint/types/actions.ts b/x-pack/plugins/security_solution/common/endpoint/types/actions.ts index 28be6f8d3d139b..01da8a39ee7237 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/actions.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/actions.ts @@ -8,12 +8,14 @@ import type { TypeOf } from '@kbn/config-schema'; import type { EcsError } from '@elastic/ecs'; import type { BaseFileMetadata, FileCompression, FileJSON } from '@kbn/files-plugin/common'; -import type { ResponseActionBodySchema, UploadActionApiRequestBody } from '../../api/endpoint'; -import type { ActionStatusRequestSchema } from '../../api/endpoint/actions/action_status_route'; import type { - KillOrSuspendProcessRequestSchema, - NoParametersRequestSchema, -} from '../../api/endpoint/actions/common/base'; + ResponseActionBodySchema, + UploadActionApiRequestBody, + KillProcessRouteRequestSchema, + SuspendProcessRouteRequestSchema, +} from '../../api/endpoint'; +import type { ActionStatusRequestSchema } from '../../api/endpoint/actions/action_status_route'; +import type { NoParametersRequestSchema } from '../../api/endpoint/actions/common/base'; import type { ResponseActionAgentType, ResponseActionsApiCommandNames, @@ -178,19 +180,28 @@ export interface LogsEndpointActionResponse< meta?: TMeta; } -interface ResponseActionParametersWithPid { +export interface ResponseActionParametersWithPid { pid: number; entity_id?: never; + process_name?: never; } -interface ResponseActionParametersWithEntityId { +export interface ResponseActionParametersWithEntityId { pid?: never; + process_name?: never; entity_id: string; } -export type ResponseActionParametersWithPidOrEntityId = +export interface ResponseActionParametersWithProcessName { + pid?: never; + entity_id?: never; + process_name: string; +} + +export type ResponseActionParametersWithProcessData = | ResponseActionParametersWithPid - | ResponseActionParametersWithEntityId; + | ResponseActionParametersWithEntityId + | ResponseActionParametersWithProcessName; export interface ResponseActionGetFileParameters { path: string; @@ -207,7 +218,7 @@ export interface ResponseActionScanParameters { export type EndpointActionDataParameterTypes = | undefined - | ResponseActionParametersWithPidOrEntityId + | ResponseActionParametersWithProcessData | ResponseActionsExecuteParameters | ResponseActionGetFileParameters | ResponseActionUploadParameters @@ -350,7 +361,12 @@ export type HostIsolationRequestBody = TypeOf; -export type KillOrSuspendProcessRequestBody = TypeOf; +export type KillProcessRequestBody = TypeOf; + +export type SuspendProcessRequestBody = TypeOf; + +/** Note: this type should almost never be used. Use instead the response action specific types above */ +export type KillOrSuspendProcessRequestBody = KillProcessRequestBody & SuspendProcessRequestBody; export interface HostIsolationResponse { action: string; diff --git a/x-pack/plugins/security_solution/common/endpoint/types/sentinel_one.ts b/x-pack/plugins/security_solution/common/endpoint/types/sentinel_one.ts index 91a06ffc5ffca4..a15557617d9f03 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/sentinel_one.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/sentinel_one.ts @@ -115,3 +115,11 @@ export interface SentinelOneGetFileResponseMeta { createdAt: string; filename: string; } + +export interface SentinelOneKillProcessRequestMeta extends SentinelOneIsolationRequestMeta { + /** + * The Parent Task Is that is executing the kill process action in SentinelOne. + * Used to check on the status of that action + */ + parentTaskId: string; +} diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts index 66b5f4bd948a16..8113a685c94716 100644 --- a/x-pack/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/plugins/security_solution/common/experimental_features.ts @@ -81,6 +81,9 @@ export const allowedExperimentalValues = Object.freeze({ /** Enables the `get-file` response action for SentinelOne */ responseActionsSentinelOneGetFileEnabled: true, + /** Enables the `kill-process` response action for SentinelOne */ + responseActionsSentinelOneKillProcessEnabled: false, + /** * Enables the ability to send Response actions to Crowdstrike and persist the results * in ES. diff --git a/x-pack/plugins/security_solution/public/common/lib/process_actions/index.ts b/x-pack/plugins/security_solution/public/common/lib/process_actions/index.ts index ef38144a5c53cd..b8cb7c04f469c9 100644 --- a/x-pack/plugins/security_solution/public/common/lib/process_actions/index.ts +++ b/x-pack/plugins/security_solution/public/common/lib/process_actions/index.ts @@ -6,16 +6,15 @@ */ import type { - KillOrSuspendProcessRequestBody, ResponseActionApiResponse, + KillProcessRequestBody, + SuspendProcessRequestBody, } from '../../../../common/endpoint/types'; import { KibanaServices } from '../kibana'; import { KILL_PROCESS_ROUTE, SUSPEND_PROCESS_ROUTE } from '../../../../common/endpoint/constants'; /** Kills a process specified by pid or entity id on a host running Endpoint Security */ -export const killProcess = ( - params: KillOrSuspendProcessRequestBody -): Promise => { +export const killProcess = (params: KillProcessRequestBody): Promise => { return KibanaServices.get().http.post(KILL_PROCESS_ROUTE, { body: JSON.stringify(params), version: '2023-10-31', @@ -24,7 +23,7 @@ export const killProcess = ( /** Suspends a process specified by pid or entity id on a host running Endpoint Security */ export const suspendProcess = ( - params: KillOrSuspendProcessRequestBody + params: SuspendProcessRequestBody ): Promise => { return KibanaServices.get().http.post(SUSPEND_PROCESS_ROUTE, { body: JSON.stringify(params), diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/kill_process_action.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/kill_process_action.tsx index 657b6847e7839b..a6b29516153817 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/kill_process_action.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/kill_process_action.tsx @@ -6,18 +6,18 @@ */ import { memo, useMemo } from 'react'; -import type { KillOrSuspendProcessRequestBody } from '../../../../../common/endpoint/types'; import { parsedPidOrEntityIdParameter } from '../lib/utils'; import { useSendKillProcessRequest } from '../../../hooks/response_actions/use_send_kill_process_endpoint_request'; import type { ActionRequestComponentProps } from '../types'; import { useConsoleActionSubmitter } from '../hooks/use_console_action_submitter'; +import type { KillProcessRequestBody } from '../../../../../common/endpoint/types'; export const KillProcessActionResult = memo< ActionRequestComponentProps<{ pid?: string[]; entityId?: string[] }> >(({ command, setStore, store, status, setStatus, ResultComponent }) => { const actionCreator = useSendKillProcessRequest(); - const actionRequestBody = useMemo(() => { + const actionRequestBody = useMemo(() => { const endpointId = command.commandDefinition?.meta?.endpointId; const parameters = parsedPidOrEntityIdParameter(command.args.args); @@ -30,7 +30,7 @@ export const KillProcessActionResult = memo< : undefined; }, [command.args.args, command.commandDefinition?.meta?.endpointId]); - return useConsoleActionSubmitter({ + return useConsoleActionSubmitter({ ResultComponent, setStore, store, diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/suspend_process_action.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/suspend_process_action.tsx index fbb18aabd7b00e..70893689c04399 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/suspend_process_action.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/suspend_process_action.tsx @@ -8,8 +8,8 @@ import { memo, useMemo } from 'react'; import { parsedPidOrEntityIdParameter } from '../lib/utils'; import type { - KillOrSuspendProcessRequestBody, SuspendProcessActionOutputContent, + SuspendProcessRequestBody, } from '../../../../../common/endpoint/types'; import { useSendSuspendProcessRequest } from '../../../hooks/response_actions/use_send_suspend_process_endpoint_request'; import type { ActionRequestComponentProps } from '../types'; @@ -20,7 +20,7 @@ export const SuspendProcessActionResult = memo< >(({ command, setStore, store, status, setStatus, ResultComponent }) => { const actionCreator = useSendSuspendProcessRequest(); - const actionRequestBody = useMemo(() => { + const actionRequestBody = useMemo(() => { const endpointId = command.commandDefinition?.meta?.endpointId; const parameters = parsedPidOrEntityIdParameter(command.args.args); @@ -33,10 +33,7 @@ export const SuspendProcessActionResult = memo< : undefined; }, [command.args.args, command.commandDefinition?.meta?.endpointId]); - return useConsoleActionSubmitter< - KillOrSuspendProcessRequestBody, - SuspendProcessActionOutputContent - >({ + return useConsoleActionSubmitter({ ResultComponent, setStore, store, diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/console_commands_definition.ts b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/console_commands_definition.ts index 84624c2ce595bf..b57bd57ecd85b9 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/console_commands_definition.ts +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/console_commands_definition.ts @@ -571,9 +571,13 @@ const adjustCommandsForSentinelOne = ({ }: { commandList: CommandDefinition[]; }): CommandDefinition[] => { + const featureFlags = ExperimentalFeaturesService.get(); + const isKillProcessEnabled = featureFlags.responseActionsSentinelOneKillProcessEnabled; + return commandList.map((command) => { if ( command.name === 'status' || + (command.name === 'kill-process' && !isKillProcessEnabled) || !isAgentTypeAndActionSupported( 'sentinel_one', RESPONSE_CONSOLE_COMMAND_TO_API_COMMAND_MAP[command.name as ConsoleResponseActionCommands], diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/utils.ts b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/utils.ts index d5c40347ebf80e..41c57feb5c76c8 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/utils.ts +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/utils.ts @@ -4,12 +4,15 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { ResponseActionParametersWithPidOrEntityId } from '../../../../../common/endpoint/types'; +import type { + ResponseActionParametersWithEntityId, + ResponseActionParametersWithPid, +} from '../../../../../common/endpoint/types'; export const parsedPidOrEntityIdParameter = (parameters: { pid?: string[]; entityId?: string[]; -}): ResponseActionParametersWithPidOrEntityId => { +}): ResponseActionParametersWithPid | ResponseActionParametersWithEntityId => { if (parameters.pid) { return { pid: Number(parameters.pid[0]) }; } diff --git a/x-pack/plugins/security_solution/public/management/hooks/response_actions/use_send_kill_process_endpoint_request.ts b/x-pack/plugins/security_solution/public/management/hooks/response_actions/use_send_kill_process_endpoint_request.ts index 2d86f15f81d406..b17d34ab4e463c 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/response_actions/use_send_kill_process_endpoint_request.ts +++ b/x-pack/plugins/security_solution/public/management/hooks/response_actions/use_send_kill_process_endpoint_request.ts @@ -9,8 +9,8 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { useMutation } from '@tanstack/react-query'; import type { IHttpFetchError } from '@kbn/core-http-browser'; import type { - KillOrSuspendProcessRequestBody, ResponseActionApiResponse, + KillProcessRequestBody, } from '../../../../common/endpoint/types'; import { killProcess } from '../../../common/lib/process_actions'; @@ -22,15 +22,11 @@ export const useSendKillProcessRequest = ( customOptions?: UseMutationOptions< ResponseActionApiResponse, IHttpFetchError, - KillOrSuspendProcessRequestBody + KillProcessRequestBody > -): UseMutationResult< - ResponseActionApiResponse, - IHttpFetchError, - KillOrSuspendProcessRequestBody -> => { - return useMutation( - (processData: KillOrSuspendProcessRequestBody) => { +): UseMutationResult => { + return useMutation( + (processData: KillProcessRequestBody) => { return killProcess(processData); }, customOptions diff --git a/x-pack/plugins/security_solution/public/management/hooks/response_actions/use_send_suspend_process_endpoint_request.ts b/x-pack/plugins/security_solution/public/management/hooks/response_actions/use_send_suspend_process_endpoint_request.ts index d6c2f56cb627f5..787344ffd54dc8 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/response_actions/use_send_suspend_process_endpoint_request.ts +++ b/x-pack/plugins/security_solution/public/management/hooks/response_actions/use_send_suspend_process_endpoint_request.ts @@ -9,8 +9,8 @@ import { useMutation } from '@tanstack/react-query'; import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; import type { IHttpFetchError } from '@kbn/core-http-browser'; import type { - KillOrSuspendProcessRequestBody, ResponseActionApiResponse, + SuspendProcessRequestBody, } from '../../../../common/endpoint/types'; import { suspendProcess } from '../../../common/lib/process_actions'; @@ -22,15 +22,11 @@ export const useSendSuspendProcessRequest = ( customOptions?: UseMutationOptions< ResponseActionApiResponse, IHttpFetchError, - KillOrSuspendProcessRequestBody + SuspendProcessRequestBody > -): UseMutationResult< - ResponseActionApiResponse, - IHttpFetchError, - KillOrSuspendProcessRequestBody -> => { - return useMutation( - (processData: KillOrSuspendProcessRequestBody) => { +): UseMutationResult => { + return useMutation( + (processData: SuspendProcessRequestBody) => { return suspendProcess(processData); }, customOptions diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task_runner.ts b/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task_runner.ts index dbc57c2a55a845..0207a3b5d1460f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task_runner.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/response_actions/complete_external_actions_task_runner.ts @@ -152,7 +152,7 @@ export class CompleteExternalActionsTaskRunner return null; } - this.errors.push(err.message); + this.errors.push(err.stack); }); } ) @@ -164,7 +164,7 @@ export class CompleteExternalActionsTaskRunner if (this.errors.length) { this.log.error( `${this.errors.length} errors were encountered while running task:\n${this.errors.join( - '\n' + '\n----' )}` ); } diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts index 2bbe35f9747b49..f3610502b0c523 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts @@ -47,10 +47,11 @@ import { import type { ActionDetails, EndpointActionDataParameterTypes, - KillOrSuspendProcessRequestBody, - ResponseActionParametersWithPidOrEntityId, + ResponseActionParametersWithProcessData, ResponseActionsExecuteParameters, ResponseActionScanParameters, + KillProcessRequestBody, + SuspendProcessRequestBody, } from '../../../../common/endpoint/types'; import type { ResponseActionsApiCommandNames } from '../../../../common/endpoint/service/response_actions/constants'; import type { @@ -165,7 +166,7 @@ export function registerResponseActionRoutes( withEndpointAuthz( { all: ['canKillProcess'] }, logger, - responseActionRequestHandler( + responseActionRequestHandler( endpointContext, 'kill-process' ) @@ -188,7 +189,7 @@ export function registerResponseActionRoutes( withEndpointAuthz( { all: ['canSuspendProcess'] }, logger, - responseActionRequestHandler( + responseActionRequestHandler( endpointContext, 'suspend-process' ) @@ -374,14 +375,12 @@ function responseActionRequestHandler { subActionParams: { actionParameters: { comment: - 'Action triggered from Elastic Security by user foo for action 123-345-456: test comment', + 'Action triggered from Elastic Security by user [foo] for action [isolate (action id: 123-345-456)]: test comment', }, command: 'contain', ids: ['1-2-3'], @@ -232,7 +232,7 @@ describe('CrowdstrikeActionsClient class', () => { command: 'lift_containment', ids: ['1-2-3'], comment: - 'Action triggered from Elastic Security by user foo for action 123-345-456: test comment', + 'Action triggered from Elastic Security by user [foo] for action [unisolate (action id: 123-345-456)]: test comment', }, }, }); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts index 72994508ebc222..958c51014c6a01 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts @@ -12,6 +12,7 @@ import { } from '@kbn/stack-connectors-plugin/common/crowdstrike/constants'; import type { SearchResponse } from '@elastic/elasticsearch/lib/api/types'; import type { CrowdstrikeBaseApiResponse } from '@kbn/stack-connectors-plugin/common/crowdstrike/types'; +import { v4 as uuidv4 } from 'uuid'; import type { CrowdstrikeActionRequestCommonMeta } from '../../../../../../common/endpoint/types/crowdstrike'; import type { CommonResponseActionMethodOptions, @@ -37,7 +38,6 @@ import type { NormalizedExternalConnectorClient, NormalizedExternalConnectorClientExecuteOptions, } from '../lib/normalized_external_connector_client'; -import { ELASTIC_RESPONSE_ACTION_MESSAGE } from '../../utils'; export type CrowdstrikeActionsClientOptions = ResponseActionsClientOptions & { connectorActions: NormalizedExternalConnectorClient; @@ -190,19 +190,15 @@ export class CrowdstrikeActionsClient extends ResponseActionsClientImpl { let actionResponse: ActionTypeExecutorResult | undefined; if (!reqIndexOptions.error) { let error = (await this.validateRequest(reqIndexOptions)).error; - const actionCommentMessage = ELASTIC_RESPONSE_ACTION_MESSAGE( - this.options.username, - reqIndexOptions.actionId - ); if (!error) { + if (!reqIndexOptions.actionId) { + reqIndexOptions.actionId = uuidv4(); + } + try { actionResponse = (await this.sendAction(SUB_ACTION.HOST_ACTIONS, { ids: actionRequest.endpoint_ids, - actionParameters: { - comment: reqIndexOptions.comment - ? `${actionCommentMessage}: ${reqIndexOptions.comment}` - : actionCommentMessage, - }, + actionParameters: { comment: this.buildExternalComment(reqIndexOptions) }, command: 'contain', })) as ActionTypeExecutorResult; } catch (err) { @@ -254,18 +250,13 @@ export class CrowdstrikeActionsClient extends ResponseActionsClientImpl { let actionResponse: ActionTypeExecutorResult | undefined; if (!reqIndexOptions.error) { let error = (await this.validateRequest(reqIndexOptions)).error; - const actionCommentMessage = ELASTIC_RESPONSE_ACTION_MESSAGE( - this.options.username, - reqIndexOptions.actionId - ); + if (!error) { try { actionResponse = (await this.sendAction(SUB_ACTION.HOST_ACTIONS, { ids: actionRequest.endpoint_ids, command: 'lift_containment', - comment: reqIndexOptions.comment - ? `${actionCommentMessage}: ${reqIndexOptions.comment}` - : actionCommentMessage, + comment: this.buildExternalComment(reqIndexOptions), })) as ActionTypeExecutorResult; } catch (err) { error = err; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/endpoint/endpoint_actions_client.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/endpoint/endpoint_actions_client.test.ts index 1fa046496f2318..21a4196ba84e53 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/endpoint/endpoint_actions_client.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/endpoint/endpoint_actions_client.test.ts @@ -263,7 +263,8 @@ describe('EndpointActionsClient', () => { }); }); - it('should create an action with error', async () => { + it('should create an action with error and not trow when in automated mode', async () => { + classConstructorOptions.isAutomated = true; await endpointActionsClient.isolate(getCommonResponseActionOptions(), { error: 'something is wrong', }); @@ -283,7 +284,8 @@ describe('EndpointActionsClient', () => { ); }); - it('should create an action with error when agents are invalid', async () => { + it('should create an action with error when agents are invalid (automated mode)', async () => { + classConstructorOptions.isAutomated = true; // @ts-expect-error mocking this for testing purposes endpointActionsClient.checkAgentIds = jest.fn().mockResolvedValueOnce({ isValid: false, diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/endpoint/endpoint_actions_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/endpoint/endpoint_actions_client.ts index 2c908bd1a3f304..59328beb46c128 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/endpoint/endpoint_actions_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/endpoint/endpoint_actions_client.ts @@ -30,12 +30,11 @@ import type { ActionDetails, HostMetadata, GetProcessesActionOutputContent, - KillOrSuspendProcessRequestBody, KillProcessActionOutputContent, ResponseActionExecuteOutputContent, ResponseActionGetFileOutputContent, ResponseActionGetFileParameters, - ResponseActionParametersWithPidOrEntityId, + ResponseActionParametersWithProcessData, ResponseActionsExecuteParameters, ResponseActionUploadOutputContent, ResponseActionUploadParameters, @@ -45,6 +44,8 @@ import type { UploadedFileInfo, ResponseActionScanParameters, ResponseActionScanOutputContent, + KillProcessRequestBody, + SuspendProcessRequestBody, } from '../../../../../../common/endpoint/types'; import type { CommonResponseActionMethodOptions, @@ -107,6 +108,10 @@ export class EndpointActionsClient extends ResponseActionsClientImpl { const { hosts, ruleName, ruleId, error } = this.getMethodOptions(options); let actionError: string | undefined = validationError?.message || error; + if (actionError && !this.options.isAutomated) { + throw new ResponseActionsClientError(actionError, 400); + } + // Dispatch action to Endpoint using Fleet if (!actionError) { try { @@ -242,26 +247,26 @@ export class EndpointActionsClient extends ResponseActionsClientImpl { } async killProcess( - actionRequest: KillOrSuspendProcessRequestBody, + actionRequest: KillProcessRequestBody, options: CommonResponseActionMethodOptions = {} ): Promise< - ActionDetails + ActionDetails > { return this.handleResponseAction< - KillOrSuspendProcessRequestBody, - ActionDetails + KillProcessRequestBody, + ActionDetails >('kill-process', actionRequest, options); } async suspendProcess( - actionRequest: KillOrSuspendProcessRequestBody, + actionRequest: SuspendProcessRequestBody, options: CommonResponseActionMethodOptions = {} ): Promise< - ActionDetails + ActionDetails > { return this.handleResponseAction< - KillOrSuspendProcessRequestBody, - ActionDetails + SuspendProcessRequestBody, + ActionDetails >('suspend-process', actionRequest, options); } diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.ts index 677165519796bd..927875855eb11f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.ts @@ -13,6 +13,7 @@ import { AttachmentType, ExternalReferenceStorageType } from '@kbn/cases-plugin/ import type { CaseAttachments } from '@kbn/cases-plugin/public/types'; import { i18n } from '@kbn/i18n'; import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import { SimpleMemCache } from './simple_mem_cache'; import { validateActionId } from '../../utils/validate_action_id'; import { fetchActionResponses, @@ -49,14 +50,13 @@ import type { EndpointActionDataParameterTypes, EndpointActionResponseDataOutput, GetProcessesActionOutputContent, - KillOrSuspendProcessRequestBody, KillProcessActionOutputContent, LogsEndpointAction, LogsEndpointActionResponse, ResponseActionExecuteOutputContent, ResponseActionGetFileOutputContent, ResponseActionGetFileParameters, - ResponseActionParametersWithPidOrEntityId, + ResponseActionParametersWithProcessData, ResponseActionScanOutputContent, ResponseActionsExecuteParameters, ResponseActionScanParameters, @@ -65,6 +65,8 @@ import type { SuspendProcessActionOutputContent, UploadedFileInfo, WithAllKeys, + KillProcessRequestBody, + SuspendProcessRequestBody, } from '../../../../../../common/endpoint/types'; import type { ExecuteActionRequestBody, @@ -79,6 +81,17 @@ import { stringify } from '../../../../utils/stringify'; import { CASE_ATTACHMENT_ENDPOINT_TYPE_ID } from '../../../../../../common/constants'; import { EMPTY_COMMENT } from '../../../../utils/translations'; +const ELASTIC_RESPONSE_ACTION_MESSAGE = ( + username: string = 'system', + command: ResponseActionsApiCommandNames, + responseActionId: string +): string => { + return i18n.translate('xpack.securitySolution.responseActions.comment.message', { + values: { username, command, responseActionId }, + defaultMessage: `Action triggered from Elastic Security by user [{username}] for action [{command} (action id: {responseActionId})]`, + }); +}; + const ENTERPRISE_LICENSE_REQUIRED_MSG = i18n.translate( 'xpack.securitySolution.responseActionsList.error.licenseTooLow', { @@ -176,6 +189,8 @@ export interface ResponseActionsClientPendingAction< export abstract class ResponseActionsClientImpl implements ResponseActionsClient { protected readonly log: Logger; + protected readonly cache = new SimpleMemCache(); + protected abstract readonly agentType: ResponseActionAgentType; constructor(protected readonly options: ResponseActionsClientOptions) { @@ -560,6 +575,26 @@ export abstract class ResponseActionsClientImpl implements ResponseActionsClient usageService.notifyUsage(featureKey); } + /** + * Builds a comment for use in response action requests sent to external EDR systems + * @protected + */ + protected buildExternalComment( + actionRequestIndexOptions: ResponseActionsClientWriteActionRequestToEndpointIndexOptions + ): string { + const { actionId = uuidv4(), comment, command } = actionRequestIndexOptions; + + // If the action request index options does not yet have an actionId assigned to it, then do it now. + // Need to ensure we have an action id for cross-reference. + if (!actionRequestIndexOptions.actionId) { + actionRequestIndexOptions.actionId = actionId; + } + + return ( + ELASTIC_RESPONSE_ACTION_MESSAGE(this.options.username, command, actionId) + + (comment ? `: ${comment}` : '') + ); + } protected async ensureValidActionId(actionId: string): Promise { return validateActionId(this.options.esClient, actionId, this.agentType); } @@ -650,19 +685,19 @@ export abstract class ResponseActionsClientImpl implements ResponseActionsClient } public async killProcess( - actionRequest: KillOrSuspendProcessRequestBody, + actionRequest: KillProcessRequestBody, options?: CommonResponseActionMethodOptions ): Promise< - ActionDetails + ActionDetails > { throw new ResponseActionsNotSupportedError('kill-process'); } public async suspendProcess( - actionRequest: KillOrSuspendProcessRequestBody, + actionRequest: SuspendProcessRequestBody, options?: CommonResponseActionMethodOptions ): Promise< - ActionDetails + ActionDetails > { throw new ResponseActionsNotSupportedError('suspend-process'); } diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/simple_mem_cache.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/simple_mem_cache.test.ts new file mode 100644 index 00000000000000..f351e2e40d5be5 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/simple_mem_cache.test.ts @@ -0,0 +1,75 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { SimpleMemCache } from './simple_mem_cache'; + +describe('SimpleMemCache class', () => { + let cache: SimpleMemCache; + let key: any; + let value: any; + + beforeAll(() => { + jest.useFakeTimers(); + }); + + afterAll(() => { + jest.useRealTimers(); + }); + + beforeEach(() => { + cache = new SimpleMemCache(); + key = Symbol('foo'); + value = () => {}; + }); + + it('should `set` and `get` a value to cache', () => { + cache.set(key, value); + + expect(cache.get(key)).toEqual(value); + }); + + it('should accept strings as keys', () => { + key = 'mykey'; + cache.set(key, value); + + expect(cache.get(key)).toEqual(value); + }); + + it('should delete a value from cache', () => { + cache.set(key, value); + + expect(cache.get(key)).toEqual(value); + + cache.delete(key); + + expect(cache.get(key)).toEqual(undefined); + }); + + it('should cleanup expired cache entries', () => { + const key2 = 'myKey'; + cache.set(key, value); // Default ttl of 10s + cache.set(key2, value, 60); // ttl 60s + const dateObj = new Date(); + dateObj.setSeconds(dateObj.getSeconds() + 11); + jest.setSystemTime(dateObj); + cache.cleanup(); + + expect(cache.get(key)).toBeUndefined(); + expect(cache.get(key2)).toEqual(value); + }); + + it('should return undefined when a cache entry exists, but it is expired', () => { + cache.set(key, value); + const dateObj = new Date(); + dateObj.setSeconds(dateObj.getSeconds() + 11); + jest.setSystemTime(dateObj); + + expect(cache.get(key)).toBeUndefined(); + }); +}); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/simple_mem_cache.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/simple_mem_cache.ts new file mode 100644 index 00000000000000..fc355bf6c37970 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/simple_mem_cache.ts @@ -0,0 +1,89 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +export interface SimpleMemCacheInterface { + /** Store a piece of data in cache */ + set( + key: any, + value: any, + /** Time-to-live for this entry only (in seconds) */ + ttl?: number + ): void; + /** Retrieve a piece of data from cache */ + get(key: any): TValue | undefined; + /** Delete a piece of data from cache */ + delete(key: any): void; + /** Clean up the cache by removing all expired entries */ + cleanup(): void; +} + +export interface SimpleMemCacheOptions { + /** + * Default Time-to-live (in seconds) for each piece of data that is cached. + * Defaults to `10` seconds. Can also be set on each entry explicitly + */ + ttl?: number; +} + +interface CachedEntry { + value: any; + expires: number; +} + +/** + * A simple memory caching mechanism. Entries are given a time-to-live (`ttl`) and deleted only when + * attempted to be retrieved and entry is expired. + * + * > **NOTE**: There is no automated "cache cleanup" to remove expired entries over time due to the + * > fact that it could lead to memory leaks. A `cleanup()` method, however, is provided + * > which can be called periodically to clean up the cache + */ +export class SimpleMemCache implements SimpleMemCacheInterface { + private readonly ttl: number; + private readonly cache = new Map(); + + constructor({ ttl = 10 }: SimpleMemCacheOptions = {}) { + this.ttl = ttl; + } + + private isExpired(entry: CachedEntry): boolean { + return entry.expires < Date.now(); + } + + public set(key: any, value: any, ttl = this.ttl): void { + const expiresDt = new Date(); + expiresDt.setSeconds(expiresDt.getSeconds() + ttl); + this.cache.set(key, { value, expires: expiresDt.getTime() }); + } + + public get(key: any): TValue | undefined { + const cachedValue = this.cache.get(key); + + if (cachedValue) { + if (this.isExpired(cachedValue)) { + this.delete(key); + return; + } + + return cachedValue.value as TValue; + } + } + + public delete(key: any): void { + this.cache.delete(key); + } + + public cleanup(): void { + for (const [cacheKey, cacheData] of this.cache.entries()) { + if (this.isExpired(cacheData)) { + this.delete(cacheKey); + } + } + } +} diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/types.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/types.ts index f95d0b7144a54f..4a7b7efd4d4a56 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/types.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/lib/types.ts @@ -8,9 +8,8 @@ import type { Readable } from 'stream'; import type { ActionDetails, - KillOrSuspendProcessRequestBody, KillProcessActionOutputContent, - ResponseActionParametersWithPidOrEntityId, + ResponseActionParametersWithProcessData, SuspendProcessActionOutputContent, GetProcessesActionOutputContent, ResponseActionGetFileOutputContent, @@ -24,6 +23,8 @@ import type { UploadedFileInfo, ResponseActionScanOutputContent, ResponseActionScanParameters, + KillProcessRequestBody, + SuspendProcessRequestBody, } from '../../../../../../common/endpoint/types'; import type { IsolationRouteRequestBody, @@ -88,17 +89,17 @@ export interface ResponseActionsClient { ) => Promise; killProcess: ( - actionRequest: OmitUnsupportedAttributes, + actionRequest: OmitUnsupportedAttributes, options?: CommonResponseActionMethodOptions ) => Promise< - ActionDetails + ActionDetails >; suspendProcess: ( - actionRequest: OmitUnsupportedAttributes, + actionRequest: OmitUnsupportedAttributes, options?: CommonResponseActionMethodOptions ) => Promise< - ActionDetails + ActionDetails >; runningProcesses: ( diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/mocks.ts index e8b62fb0143069..a721bda2f38ab5 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/mocks.ts @@ -172,11 +172,10 @@ const createNoParamsResponseActionOptionsMock = ( const createKillOrSuspendProcessOptionsMock = ( overrides: Partial = {} ): KillOrSuspendProcessRequestBody => { + const parameters = overrides.parameters ?? { pid: 999 }; const options: KillOrSuspendProcessRequestBody = { ...createNoParamsResponseActionOptionsMock(), - parameters: { - pid: 999, - }, + parameters, }; return merge(options, overrides); }; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/mocks.ts index 0971ed70456552..dac3a5c8f1ddb8 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/mocks.ts @@ -8,6 +8,7 @@ import type { SentinelOneGetAgentsResponse, SentinelOneGetActivitiesResponse, + SentinelOneGetRemoteScriptsResponse, } from '@kbn/stack-connectors-plugin/common/sentinelone/types'; import { SENTINELONE_CONNECTOR_ID, @@ -130,6 +131,53 @@ const createSentinelOneAgentDetailsMock = ( ); }; +const createSentinelOneGetRemoteScriptsApiResponseMock = + (): SentinelOneGetRemoteScriptsResponse => { + return { + errors: null, + data: [ + { + bucketName: 'us-east-1-prod-remote-scripts', + createdAt: '2022-07-17T14:02:45.309427Z', + createdByUser: 'SentinelOne', + createdByUserId: '-1', + creator: 'SentinelOne', + creatorId: '-1', + fileName: + '-1/-1/75cYNKCLYJ7kEsjtBSrha0dXTSANJeMmBDQpXlRzPQA%3D/multi-operations-script-bash.sh', + fileSize: 13701, + id: '1466645476786791838', + inputExample: '--terminate --processes ping,chrome --force', + inputInstructions: '--terminate --processes [-f|--force]', + inputRequired: true, + isAvailableForArs: false, + isAvailableForLite: false, + mgmtId: -1, + osTypes: ['macos', 'linux'], + outputFilePaths: null, + package: null, + scopeId: '-1', + scopeLevel: 'sentinel', + scopeName: null, + scopePath: 'Global', + scriptDescription: null, + scriptName: 'Terminate Processes (Linux/macOS)', + scriptRuntimeTimeoutSeconds: 3600, + scriptType: 'action', + shortFileName: 'multi-operations-script-bash.sh', + signature: '75cYNKCLYJ7kEsjtBSrha0dXTSANJeMmBDQpXlRzPQA=', + signatureType: 'SHA-256', + supportedDestinations: null, + updatedAt: '2024-06-30T06:37:53.904005Z', + updater: null, + updaterId: null, + version: '1.0.0', + }, + ], + pagination: { nextCursor: null, totalItems: 1 }, + }; + }; + const createSentinelOneGetActivitiesApiResponseMock = (): SentinelOneGetActivitiesResponse => { return { errors: undefined, @@ -225,6 +273,21 @@ const createConnectorActionsClientMock = (): ActionsClientMock => { data: createSentinelOneGetActivitiesApiResponseMock(), }); + case SUB_ACTION.GET_REMOTE_SCRIPTS: + return responseActionsClientMock.createConnectorActionExecuteResponse({ + data: createSentinelOneGetRemoteScriptsApiResponseMock(), + }); + + case SUB_ACTION.EXECUTE_SCRIPT: + return responseActionsClientMock.createConnectorActionExecuteResponse({ + data: { + data: { + affected: 1, + parentTaskId: 'task-789', + }, + }, + }); + default: return responseActionsClientMock.createConnectorActionExecuteResponse(); } @@ -249,4 +312,5 @@ export const sentinelOneMock = { createConnectorActionsClient: createConnectorActionsClientMock, createConstructorOptions: createConstructorOptionsMock, createSentinelOneActivitiesApiResponse: createSentinelOneGetActivitiesApiResponseMock, + createSentinelOneGetRemoteScriptsApiResponse: createSentinelOneGetRemoteScriptsApiResponseMock, }; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.test.ts index df326a269f0a38..6a5304f17b82eb 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.test.ts @@ -34,6 +34,7 @@ import type { ResponseActionGetFileOutputContent, ResponseActionGetFileParameters, SentinelOneGetFileRequestMeta, + KillOrSuspendProcessRequestBody, } from '../../../../../../common/endpoint/types'; import type { SearchHit, SearchResponse } from '@elastic/elasticsearch/lib/api/types'; import type { ResponseActionGetFileRequestBody } from '../../../../../../common/api/endpoint'; @@ -42,6 +43,7 @@ import { ACTIONS_SEARCH_PAGE_SIZE } from '../../constants'; import type { ElasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { Readable } from 'stream'; import { RESPONSE_ACTIONS_ZIP_PASSCODE } from '../../../../../../common/endpoint/service/response_actions/constants'; +import type { DeeplyMockedKeys } from '@kbn/utility-types-jest'; jest.mock('../../action_details_by_id', () => { const originalMod = jest.requireActual('../../action_details_by_id'); @@ -57,7 +59,7 @@ const getActionDetailsByIdMock = _getActionDetailsById as jest.Mock; describe('SentinelOneActionsClient class', () => { let classConstructorOptions: SentinelOneActionsClientOptionsMock; let s1ActionsClient: ResponseActionsClient; - let connectorActionsMock: NormalizedExternalConnectorClient; + let connectorActionsMock: DeeplyMockedKeys; const createS1IsolationOptions = ( overrides: Omit< @@ -68,11 +70,12 @@ describe('SentinelOneActionsClient class', () => { beforeEach(() => { classConstructorOptions = sentinelOneMock.createConstructorOptions(); - connectorActionsMock = classConstructorOptions.connectorActions; + connectorActionsMock = + classConstructorOptions.connectorActions as DeeplyMockedKeys; s1ActionsClient = new SentinelOneActionsClient(classConstructorOptions); }); - it.each(['killProcess', 'suspendProcess', 'runningProcesses', 'execute', 'upload'] as Array< + it.each(['suspendProcess', 'runningProcesses', 'execute', 'upload', 'scan'] as Array< keyof ResponseActionsClient >)('should throw an un-supported error for %s', async (methodName) => { // @ts-expect-error Purposely passing in empty object for options @@ -794,7 +797,8 @@ describe('SentinelOneActionsClient class', () => { classConstructorOptions.isAutomated = true; classConstructorOptions.connectorActions = responseActionsClientMock.createNormalizedExternalConnectorClient(subActionsClient); - connectorActionsMock = classConstructorOptions.connectorActions; + connectorActionsMock = + classConstructorOptions.connectorActions as DeeplyMockedKeys; // @ts-expect-error readonly prop assignment classConstructorOptions.endpointService.experimentalFeatures.responseActionsSentinelOneGetFileEnabled = true; @@ -1125,4 +1129,169 @@ describe('SentinelOneActionsClient class', () => { }); }); }); + + describe('#killProcess()', () => { + let killProcessActionRequest: KillOrSuspendProcessRequestBody; + + beforeEach(() => { + // @ts-expect-error readonly prop assignment + classConstructorOptions.endpointService.experimentalFeatures.responseActionsSentinelOneKillProcessEnabled = + true; + + killProcessActionRequest = responseActionsClientMock.createKillProcessOptions({ + // @ts-expect-error TS2322 due to type being overloaded to handle kill/suspend process and specific option for S1 + parameters: { process_name: 'foo' }, + }); + }); + + it('should throw an error if feature flag is disabled', async () => { + // @ts-expect-error readonly prop assignment + classConstructorOptions.endpointService.experimentalFeatures.responseActionsSentinelOneKillProcessEnabled = + false; + + await expect(s1ActionsClient.killProcess(killProcessActionRequest)).rejects.toThrow( + `kill-process not supported for sentinel_one agent type. Feature disabled` + ); + }); + + it('should throw an error if `process_name` is not defined (manual mode)', async () => { + // @ts-expect-error + killProcessActionRequest.parameters.process_name = ''; + + await expect(s1ActionsClient.killProcess(killProcessActionRequest)).rejects.toThrow( + '[body.parameters.process_name]: missing parameter or value is empty' + ); + }); + + it('should still create action at error if something goes wrong in automated mode', async () => { + // @ts-expect-error + killProcessActionRequest.parameters.process_name = ''; + classConstructorOptions.isAutomated = true; + classConstructorOptions.connectorActions = + responseActionsClientMock.createNormalizedExternalConnectorClient( + sentinelOneMock.createConnectorActionsClient() + ); + s1ActionsClient = new SentinelOneActionsClient(classConstructorOptions); + await s1ActionsClient.killProcess(killProcessActionRequest); + + expect(classConstructorOptions.esClient.index).toHaveBeenCalledWith( + expect.objectContaining({ + document: expect.objectContaining({ + error: { + message: '[body.parameters.process_name]: missing parameter or value is empty', + }, + }), + }), + { meta: true } + ); + }); + + it('should retrieve script execution information from S1 using host OS', async () => { + await s1ActionsClient.killProcess(killProcessActionRequest); + + expect(connectorActionsMock.execute as jest.Mock).toHaveBeenCalledWith({ + params: { + subAction: SUB_ACTION.GET_REMOTE_SCRIPTS, + subActionParams: { + osTypes: 'linux', + query: 'terminate', + scriptType: 'action', + }, + }, + }); + }); + + it('should throw error if unable to retrieve S1 script information', async () => { + const executeMockImplementation = connectorActionsMock.execute.getMockImplementation()!; + connectorActionsMock.execute.mockImplementation(async (options) => { + if (options.params.subAction === SUB_ACTION.GET_REMOTE_SCRIPTS) { + return responseActionsClientMock.createConnectorActionExecuteResponse({ + data: { data: [] }, + }); + } + return executeMockImplementation.call(connectorActionsMock, options); + }); + + await expect(s1ActionsClient.killProcess(killProcessActionRequest)).rejects.toThrow( + 'Unable to find a script from SentinelOne to handle [kill-process] response action for host running [linux])' + ); + }); + + it('should send execute script request to S1 for kill-process', async () => { + await s1ActionsClient.killProcess(killProcessActionRequest); + + expect(connectorActionsMock.execute).toHaveBeenCalledWith({ + params: { + subAction: 'executeScript', + subActionParams: { + filter: { uuids: '1-2-3' }, + script: { + inputParams: '--terminate --processes "foo" --force', + outputDestination: 'SentinelCloud', + requiresApproval: false, + scriptId: '1466645476786791838', + taskDescription: expect.stringContaining( + 'Action triggered from Elastic Security by user [foo] for action [kill-process' + ), + }, + }, + }, + }); + }); + + it('should return action details on success', async () => { + await s1ActionsClient.killProcess(killProcessActionRequest); + + expect(getActionDetailsByIdMock).toHaveBeenCalled(); + }); + + it('should create action request doc with expected meta info', async () => { + await s1ActionsClient.killProcess(killProcessActionRequest); + + expect(classConstructorOptions.esClient.index).toHaveBeenCalledWith( + { + document: { + '@timestamp': expect.any(String), + EndpointActions: { + action_id: expect.any(String), + data: { + command: 'kill-process', + comment: 'test comment', + parameters: { process_name: 'foo' }, + hosts: { + '1-2-3': { + name: 'sentinelone-1460', + }, + }, + }, + expiration: expect.any(String), + input_type: 'sentinel_one', + type: 'INPUT_ACTION', + }, + agent: { id: ['1-2-3'] }, + user: { id: 'foo' }, + meta: { + agentId: '1845174760470303882', + agentUUID: '1-2-3', + hostName: 'sentinelone-1460', + parentTaskId: 'task-789', + }, + }, + index: ENDPOINT_ACTIONS_INDEX, + refresh: 'wait_for', + }, + { meta: true } + ); + }); + + it('should update cases', async () => { + killProcessActionRequest = { + ...killProcessActionRequest, + case_ids: ['case-1'], + }; + await s1ActionsClient.killProcess(killProcessActionRequest); + + expect(classConstructorOptions.casesClient?.attachments.bulkCreate).toHaveBeenCalled(); + }); + }); }); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.ts index f1f36e993e8a0c..54d2147cbe2e27 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.ts @@ -12,11 +12,13 @@ import { import { groupBy } from 'lodash'; import type { ActionTypeExecutorResult } from '@kbn/actions-plugin/common'; import type { + SentinelOneDownloadAgentFileParams, SentinelOneGetActivitiesParams, SentinelOneGetActivitiesResponse, - SentinelOneGetAgentsParams, SentinelOneGetAgentsResponse, - SentinelOneDownloadAgentFileParams, + SentinelOneGetRemoteScriptsParams, + SentinelOneGetRemoteScriptsResponse, + SentinelOneExecuteScriptResponse, } from '@kbn/stack-connectors-plugin/common/sentinelone/types'; import type { QueryDslQueryContainer, @@ -24,11 +26,10 @@ import type { SearchRequest, } from '@elastic/elasticsearch/lib/api/types'; import type { Readable } from 'stream'; +import type { Mutable } from 'utility-types'; +import type { SentinelOneKillProcessScriptArgs, SentinelOneScriptArgs } from './types'; import { ACTIONS_SEARCH_PAGE_SIZE } from '../../constants'; -import type { - NormalizedExternalConnectorClient, - NormalizedExternalConnectorClientExecuteOptions, -} from '../lib/normalized_external_connector_client'; +import type { NormalizedExternalConnectorClient } from '../lib/normalized_external_connector_client'; import { SENTINEL_ONE_ACTIVITY_INDEX_PATTERN } from '../../../../../../common'; import { catchAndWrapError } from '../../../../utils'; import type { @@ -40,16 +41,20 @@ import type { ResponseActionAgentType, ResponseActionsApiCommandNames, } from '../../../../../../common/endpoint/service/response_actions/constants'; +import { RESPONSE_ACTIONS_ZIP_PASSCODE } from '../../../../../../common/endpoint/service/response_actions/constants'; import { stringify } from '../../../../utils/stringify'; import { ResponseActionAgentResponseEsDocNotFound, ResponseActionsClientError } from '../errors'; import type { ActionDetails, EndpointActionDataParameterTypes, EndpointActionResponseDataOutput, + KillProcessActionOutputContent, + KillProcessRequestBody, LogsEndpointAction, LogsEndpointActionResponse, ResponseActionGetFileOutputContent, ResponseActionGetFileParameters, + ResponseActionParametersWithProcessData, SentinelOneActionRequestCommonMeta, SentinelOneActivityDataForType80, SentinelOneActivityEsDoc, @@ -57,7 +62,9 @@ import type { SentinelOneGetFileResponseMeta, SentinelOneIsolationRequestMeta, SentinelOneIsolationResponseMeta, + SentinelOneKillProcessRequestMeta, UploadedFileInfo, + ResponseActionParametersWithProcessName, } from '../../../../../../common/endpoint/types'; import type { IsolationRouteRequestBody, @@ -65,17 +72,29 @@ import type { } from '../../../../../../common/api/endpoint'; import type { ResponseActionsClientOptions, + ResponseActionsClientPendingAction, ResponseActionsClientValidateRequestResponse, ResponseActionsClientWriteActionRequestToEndpointIndexOptions, - ResponseActionsClientPendingAction, } from '../lib/base_response_actions_client'; import { ResponseActionsClientImpl } from '../lib/base_response_actions_client'; -import { RESPONSE_ACTIONS_ZIP_PASSCODE } from '../../../../../../common/endpoint/service/response_actions/constants'; + +const NOOP_THROW = () => { + throw new ResponseActionsClientError('not implemented!'); +}; export type SentinelOneActionsClientOptions = ResponseActionsClientOptions & { connectorActions: NormalizedExternalConnectorClient; }; +interface FetchScriptInfoResponse< + TScriptOptions extends SentinelOneScriptArgs = SentinelOneScriptArgs +> { + scriptId: string; + scriptInfo: SentinelOneGetRemoteScriptsResponse['data'][number]; + /** A helper method that will build the arguments for the given script */ + buildScriptArgs: (options: TScriptOptions) => string; +} + export class SentinelOneActionsClient extends ResponseActionsClientImpl { protected readonly agentType: ResponseActionAgentType = 'sentinel_one'; private readonly connectorActionsClient: NormalizedExternalConnectorClient; @@ -208,28 +227,21 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { private async getAgentDetails( agentUUID: string ): Promise { - const executeOptions: NormalizedExternalConnectorClientExecuteOptions< - SentinelOneGetAgentsParams, - SUB_ACTION - > = { - params: { - subAction: SUB_ACTION.GET_AGENTS, - subActionParams: { - uuid: agentUUID, - }, - }, - }; + const cachedEntry = this.cache.get(agentUUID); + + if (cachedEntry) { + this.log.debug( + `Found cached agent details for UUID [${agentUUID}]:\n${stringify(cachedEntry)}` + ); + return cachedEntry; + } let s1ApiResponse: SentinelOneGetAgentsResponse | undefined; try { - const response = (await this.connectorActionsClient.execute( - executeOptions - )) as ActionTypeExecutorResult; - - this.log.debug( - () => `Response for SentinelOne agent id [${agentUUID}] returned:\n${stringify(response)}` - ); + const response = await this.sendAction(SUB_ACTION.GET_AGENTS, { + uuid: agentUUID, + }); s1ApiResponse = response.data; } catch (err) { @@ -244,6 +256,8 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { throw new ResponseActionsClientError(`SentinelOne agent id [${agentUUID}] not found`, 404); } + this.cache.set(agentUUID, s1ApiResponse.data[0]); + return s1ApiResponse.data[0]; } @@ -261,6 +275,23 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { }; } + // validate that we have a `process_name`. We need this here because the schema for this command + // specifically because `KillProcessRequestBody` allows 3 types of parameters. + if (payload.command === 'kill-process') { + if ( + !payload.parameters || + !('process_name' in payload.parameters) || + !payload.parameters.process_name + ) { + return { + isValid: false, + error: new ResponseActionsClientError( + '[body.parameters.process_name]: missing parameter or value is empty' + ), + }; + } + } + return super.validateRequest(payload); } @@ -439,13 +470,6 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { SentinelOneGetActivitiesResponse<{ commandBatchUuid: string }> >(SUB_ACTION.GET_ACTIVITIES, activitySearchCriteria); - this.log.debug( - () => - `Search of activity log with:\n${stringify( - activitySearchCriteria - )}\n returned:\n${stringify(activityLogSearchResponse.data)}` - ); - if (activityLogSearchResponse.data?.data.length) { const activityLogItem = activityLogSearchResponse.data?.data[0]; @@ -559,6 +583,86 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { }; } + async killProcess( + actionRequest: KillProcessRequestBody, + options?: CommonResponseActionMethodOptions + ): Promise< + ActionDetails + > { + if ( + !this.options.endpointService.experimentalFeatures + .responseActionsSentinelOneKillProcessEnabled + ) { + throw new ResponseActionsClientError( + `kill-process not supported for ${this.agentType} agent type. Feature disabled`, + 400 + ); + } + + const reqIndexOptions: ResponseActionsClientWriteActionRequestToEndpointIndexOptions< + ResponseActionParametersWithProcessName, + KillProcessActionOutputContent, + Partial + > = { + ...actionRequest, + ...this.getMethodOptions(options), + command: 'kill-process', + meta: { parentTaskId: '' }, + }; + + if (!reqIndexOptions.error) { + let error = (await this.validateRequest(reqIndexOptions)).error; + + if (!error) { + const s1AgentDetails = await this.getAgentDetails(reqIndexOptions.endpoint_ids[0]); + const terminateScriptInfo = await this.fetchScriptInfo( + 'kill-process', + s1AgentDetails.osType + ); + + try { + const s1Response = await this.sendAction( + SUB_ACTION.EXECUTE_SCRIPT, + { + filter: { + uuids: actionRequest.endpoint_ids[0], + }, + script: { + scriptId: terminateScriptInfo.scriptId, + taskDescription: this.buildExternalComment(reqIndexOptions), + requiresApproval: false, + outputDestination: 'SentinelCloud', + inputParams: terminateScriptInfo.buildScriptArgs({ + // @ts-expect-error TS2339: Property 'process_name' does not exist (`.validateRequest()` has already validated that `process_name` exists) + processName: reqIndexOptions.parameters.process_name, + }), + }, + } + ); + + reqIndexOptions.meta = { + parentTaskId: s1Response.data?.data?.parentTaskId ?? '', + }; + } catch (err) { + error = err; + } + } + + reqIndexOptions.error = error?.message; + + if (!this.options.isAutomated && error) { + throw error; + } + } + + const { actionDetails } = await this.handleResponseActionCreation< + ResponseActionParametersWithProcessData, + KillProcessActionOutputContent + >(reqIndexOptions); + + return actionDetails; + } + async processPendingActions({ abortSignal, addToQueue, @@ -616,6 +720,93 @@ export class SentinelOneActionsClient extends ResponseActionsClientImpl { } } + /** + * retrieve script info. for scripts that are used to handle Elastic response actions + * @param scriptType + * @param osType + * @private + */ + private async fetchScriptInfo< + TScriptOptions extends SentinelOneScriptArgs = SentinelOneScriptArgs + >( + scriptType: Extract, + osType: string | 'linux' | 'macos' | 'windows' + ): Promise> { + const searchQueryParams: Mutable> = { + query: '', + osTypes: osType, + }; + let buildScriptArgs = NOOP_THROW as FetchScriptInfoResponse['buildScriptArgs']; + let isDesiredScript: ( + scriptInfo: SentinelOneGetRemoteScriptsResponse['data'][number] + ) => boolean = () => false; + + // Set the query value for filtering the list of scripts in S1 + switch (scriptType) { + case 'kill-process': + searchQueryParams.query = 'terminate'; + searchQueryParams.scriptType = 'action'; + + isDesiredScript = (scriptInfo) => { + return ( + scriptInfo.creator === 'SentinelOne' && + scriptInfo.creatorId === '-1' && + // Using single `-` (instead of double `--`) in match below to ensure both windows and macos/linux are matched + /-terminate/i.test(scriptInfo.inputInstructions ?? '') && + /-processes/i.test(scriptInfo.inputInstructions ?? '') + ); + }; + break; + + default: + throw new ResponseActionsClientError( + `Unable to fetch SentinelOne script for OS [${osType}]. Unknown script type [${scriptType}]` + ); + } + + const { data: scriptSearchResults } = + await this.sendAction( + SUB_ACTION.GET_REMOTE_SCRIPTS, + searchQueryParams + ); + + const s1Script: SentinelOneGetRemoteScriptsResponse['data'][number] | undefined = ( + scriptSearchResults?.data ?? [] + ).find(isDesiredScript); + + if (!s1Script) { + throw new ResponseActionsClientError( + `Unable to find a script from SentinelOne to handle [${scriptType}] response action for host running [${osType}])` + ); + } + + switch (scriptType) { + case 'kill-process': + buildScriptArgs = (args: SentinelOneKillProcessScriptArgs) => { + if (!args.processName) { + throw new ResponseActionsClientError( + `'processName' missing while building script args for [${s1Script.scriptName} (id: ${s1Script.id})] script` + ); + } + + if (osType === 'windows') { + return `-Terminate -Processes "${args.processName}" -Force`; + } + + // Linux + Macos + return `--terminate --processes "${args.processName}" --force`; + }; + + break; + } + + return { + scriptId: s1Script.id, + scriptInfo: s1Script, + buildScriptArgs, + } as FetchScriptInfoResponse; + } + private async fetchGetFileResponseEsDocForAgentId( actionId: string, agentId: string diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/types.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/types.ts index fbb28df5e4449a..a51a9ec9817658 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/types.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/types.ts @@ -5,22 +5,11 @@ * 2.0. */ -/* eslint-disable @typescript-eslint/no-explicit-any */ - -import type { ActionsClient } from '@kbn/actions-plugin/server'; -import type { SUB_ACTION } from '@kbn/stack-connectors-plugin/common/sentinelone/constants'; - -type ConnectorActionsExecuteOptions = Parameters[0]; - -interface SentinelOneConnectorExecuteParams< - P extends Record = Record -> { - subAction: SUB_ACTION; - subActionParams: P; +export interface SentinelOneKillProcessScriptArgs { + processName: string; } -export type SentinelOneConnectorExecuteOptions< - P extends Record = Record -> = Omit & { - params: SentinelOneConnectorExecuteParams

& Record; -}; +/** + * All the possible set of arguments running SentinelOne scripts that we support for response actions + */ +export type SentinelOneScriptArgs = SentinelOneKillProcessScriptArgs; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/utils/utils.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/utils/utils.ts index f5087b18e03d67..9c9f8e5b62cac4 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/utils/utils.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/utils/utils.ts @@ -9,7 +9,6 @@ import type { ElasticsearchClient } from '@kbn/core/server'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { EcsError } from '@elastic/ecs'; import moment from 'moment/moment'; -import { i18n } from '@kbn/i18n'; import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; import type { FetchActionResponsesResult } from '../..'; import type { @@ -611,12 +610,3 @@ export const createActionDetailsRecord = { return moment().add(2, 'weeks').toISOString(); }; - -export const ELASTIC_RESPONSE_ACTION_MESSAGE = ( - username: string = 'system', - responseActionId: string = 'response-action-id' // I believe actionId exists always and there is a mismatch in types, but this default is just a safety net -): string => - i18n.translate('xpack.securitySolution.responseActions.comment.message', { - values: { username, responseActionId }, - defaultMessage: `Action triggered from Elastic Security by user {username} for action {responseActionId}`, - }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/endpoint_response_action.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/endpoint_response_action.ts index 6ebc378dfd3155..a310cb33497e8c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/endpoint_response_action.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/endpoint_response_action.ts @@ -12,10 +12,13 @@ import type { RuleResponseEndpointAction, ProcessesParams, } from '../../../../common/api/detection_engine'; -import type { KillOrSuspendProcessRequestBody } from '../../../../common/endpoint/types'; import { getErrorProcessAlerts, getIsolateAlerts, getProcessAlerts } from './utils'; import type { AlertsAction, ResponseActionAlerts } from './types'; import type { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; +import type { + ResponseActionParametersWithEntityId, + ResponseActionParametersWithPid, +} from '../../../../common/endpoint/types'; export const endpointResponseAction = async ( responseAction: RuleResponseEndpointAction, @@ -115,7 +118,9 @@ export const endpointResponseAction = async ( comment, endpoint_ids, alert_ids, - parameters: parameters as KillOrSuspendProcessRequestBody['parameters'], + parameters: parameters as + | ResponseActionParametersWithPid + | ResponseActionParametersWithEntityId, }, { hosts, diff --git a/x-pack/plugins/stack_connectors/common/sentinelone/schema.ts b/x-pack/plugins/stack_connectors/common/sentinelone/schema.ts index 66a50a42dc4193..80f86a5c05ad8c 100644 --- a/x-pack/plugins/stack_connectors/common/sentinelone/schema.ts +++ b/x-pack/plugins/stack_connectors/common/sentinelone/schema.ts @@ -162,7 +162,10 @@ export const SentinelOneIsolateHostResponseSchema = schema.object({ export const SentinelOneGetRemoteScriptsParamsSchema = schema.object({ query: schema.nullable(schema.string()), + // Possible values (multiples comma delimiter): `linux` or `macos` or `windows` osTypes: schema.nullable(schema.string()), + // possible values (multiples comma delimiter): `action` or `artifactCollection` or `dataCollection` + scriptType: schema.nullable(schema.string()), }); export const SentinelOneFetchAgentFilesParamsSchema = schema.object({ diff --git a/x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint_api_int/apis/endpoint_authz.ts b/x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint_api_int/apis/endpoint_authz.ts index 3f69edf091707b..a9aa7af8292257 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint_api_int/apis/endpoint_authz.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint_api_int/apis/endpoint_authz.ts @@ -36,7 +36,7 @@ export default function ({ getService }: FtrProviderContext) { method: keyof Pick; path: string; version?: string; - body: Record | undefined; + body: Record | (() => Record) | undefined; } describe('@ess @serverless When attempting to call an endpoint api', function () { @@ -92,13 +92,13 @@ export default function ({ getService }: FtrProviderContext) { { method: 'post', path: ISOLATE_HOST_ROUTE_V2, - body: { endpoint_ids: ['one'] }, + body: () => ({ endpoint_ids: [agentId] }), version: '2023-10-31', }, { method: 'post', path: UNISOLATE_HOST_ROUTE_V2, - body: { endpoint_ids: ['one'] }, + body: () => ({ endpoint_ids: [agentId] }), version: '2023-10-31', }, ]; @@ -107,19 +107,19 @@ export default function ({ getService }: FtrProviderContext) { { method: 'post', path: GET_PROCESSES_ROUTE, - body: { endpoint_ids: ['one'] }, + body: () => ({ endpoint_ids: [agentId] }), version: '2023-10-31', }, { method: 'post', path: KILL_PROCESS_ROUTE, - body: { endpoint_ids: ['one'], parameters: { entity_id: 'abc123' } }, + body: () => ({ endpoint_ids: [agentId], parameters: { entity_id: 'abc123' } }), version: '2023-10-31', }, { method: 'post', path: SUSPEND_PROCESS_ROUTE, - body: { endpoint_ids: ['one'], parameters: { entity_id: 'abc123' } }, + body: () => ({ endpoint_ids: [agentId], parameters: { entity_id: 'abc123' } }), version: '2023-10-31', }, ]; @@ -128,7 +128,7 @@ export default function ({ getService }: FtrProviderContext) { { method: 'post', path: GET_FILE_ROUTE, - body: { endpoint_ids: ['one'], parameters: { path: '/opt/file/doc.txt' } }, + body: () => ({ endpoint_ids: [agentId], parameters: { path: '/opt/file/doc.txt' } }), version: '2023-10-31', }, ]; @@ -138,7 +138,7 @@ export default function ({ getService }: FtrProviderContext) { method: 'post', path: EXECUTE_ROUTE, version: '2023-10-31', - body: { endpoint_ids: ['one'], parameters: { command: 'ls -la' } }, + body: () => ({ endpoint_ids: [agentId], parameters: { command: 'ls -la' } }), }, ]; @@ -155,6 +155,10 @@ export default function ({ getService }: FtrProviderContext) { return path.replace('{action_id}', actionId).replace('{agentId}', agentId); } + function getBodyPayload(apiCall: ApiCallsInterface): ApiCallsInterface['body'] { + return typeof apiCall.body === 'function' ? apiCall.body() : apiCall.body; + } + before(async () => { indexedData = await endpointTestResources.loadEndpointData(); agentId = indexedData.hosts[0].agent.id; @@ -179,7 +183,7 @@ export default function ({ getService }: FtrProviderContext) { .auth(ROLE.t1_analyst, 'changeme') .set('kbn-xsrf', 'xxx') .set(apiListItem.version ? 'Elastic-Api-Version' : 'foo', '2023-10-31') - .send(apiListItem.body) + .send(getBodyPayload(apiListItem)) .expect(403, { statusCode: 403, error: 'Forbidden', @@ -196,7 +200,7 @@ export default function ({ getService }: FtrProviderContext) { await supertestWithoutAuth[apiListItem.method](replacePathIds(apiListItem.path)) .auth(ROLE.t1_analyst, 'changeme') .set('kbn-xsrf', 'xxx') - .send(apiListItem.body) + .send(getBodyPayload(apiListItem)) .expect(200); }); } @@ -214,7 +218,7 @@ export default function ({ getService }: FtrProviderContext) { await supertestWithoutAuth[apiListItem.method](replacePathIds(apiListItem.path)) .auth(ROLE.platform_engineer, 'changeme') .set('kbn-xsrf', 'xxx') - .send(apiListItem.body) + .send(getBodyPayload(apiListItem)) .expect(403, { statusCode: 403, error: 'Forbidden', @@ -234,7 +238,7 @@ export default function ({ getService }: FtrProviderContext) { await supertestWithoutAuth[apiListItem.method](replacePathIds(apiListItem.path)) .auth(ROLE.platform_engineer, 'changeme') .set('kbn-xsrf', 'xxx') - .send(apiListItem.body) + .send(getBodyPayload(apiListItem)) .expect(200); }); } @@ -248,7 +252,7 @@ export default function ({ getService }: FtrProviderContext) { await supertestWithoutAuth[apiListItem.method](replacePathIds(apiListItem.path)) .auth(ROLE.endpoint_operations_analyst, 'changeme') .set('kbn-xsrf', 'xxx') - .send(apiListItem.body) + .send(getBodyPayload(apiListItem)) .expect(403, { statusCode: 403, error: 'Forbidden', @@ -270,7 +274,7 @@ export default function ({ getService }: FtrProviderContext) { await supertestWithoutAuth[apiListItem.method](replacePathIds(apiListItem.path)) .auth(ROLE.endpoint_operations_analyst, 'changeme') .set('kbn-xsrf', 'xxx') - .send(apiListItem.body) + .send(getBodyPayload(apiListItem)) .expect(200); }); } @@ -291,7 +295,7 @@ export default function ({ getService }: FtrProviderContext) { }]`, async () => { await supertest[apiListItem.method](replacePathIds(apiListItem.path)) .set('kbn-xsrf', 'xxx') - .send(apiListItem.body) + .send(getBodyPayload(apiListItem)) .expect(200); }); } From 27ccd4d5399a1b4d8b79037b86560ae73e77984e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Kopyci=C5=84ski?= Date: Tue, 9 Jul 2024 14:57:59 +0200 Subject: [PATCH 058/103] Cleanup aiAssistantFlyoutMode feature flag (#182992) ## Summary Cleanup Security `aiAssistantFlyoutMode` feature flag --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../impl/mock/get_anonymized_value/index.ts | 11 +- .../assistant_header_flyout.tsx | 284 -------- .../assistant/assistant_header/index.test.tsx | 46 +- .../impl/assistant/assistant_header/index.tsx | 284 +++++--- .../assistant_overlay/flyout_navigation.tsx | 1 + .../assistant_overlay/index.test.tsx | 42 +- .../assistant/assistant_overlay/index.tsx | 46 +- .../assistant/assistant_title/index.test.tsx | 21 +- .../impl/assistant/assistant_title/index.tsx | 198 +----- .../assistant/chat_actions/index.test.tsx | 11 - .../impl/assistant/chat_actions/index.tsx | 27 +- .../impl/assistant/chat_send/index.test.tsx | 3 - .../impl/assistant/chat_send/index.tsx | 30 +- .../chat_send/use_chat_send.test.tsx | 4 - .../assistant/chat_send/use_chat_send.tsx | 7 - .../assistant/context_pills/index.test.tsx | 1 - .../impl/assistant/context_pills/index.tsx | 22 +- .../conversation_selector/index.tsx | 7 +- .../conversation_selector_settings/index.tsx | 2 - .../conversation_settings.tsx | 3 - .../conversation_settings_editor.tsx | 6 - .../index.tsx | 3 - .../conversation_sidepanel/title_field.tsx | 2 +- .../impl/assistant/helpers.test.ts | 17 +- .../impl/assistant/helpers.ts | 7 +- .../impl/assistant/index.test.tsx | 39 +- .../impl/assistant/index.tsx | 616 ++++++------------ .../assistant/prompt_editor/index.test.tsx | 1 - .../impl/assistant/prompt_editor/index.tsx | 6 - .../selected_prompt_contexts/index.test.tsx | 57 -- .../selected_prompt_contexts/index.tsx | 86 +-- .../system_prompt/helpers.test.tsx | 12 +- .../prompt_editor/system_prompt/helpers.tsx | 43 +- .../system_prompt/index.test.tsx | 44 +- .../prompt_editor/system_prompt/index.tsx | 104 +-- .../select_system_prompt/index.test.tsx | 78 +-- .../select_system_prompt/index.tsx | 148 ++--- .../system_prompt_selector.tsx | 5 +- .../impl/assistant/prompt_textarea/index.tsx | 9 +- .../quick_prompt_selector.tsx | 5 +- .../quick_prompts/quick_prompts.test.tsx | 11 +- .../assistant/quick_prompts/quick_prompts.tsx | 40 +- .../settings/assistant_settings.test.tsx | 1 - .../assistant/settings/assistant_settings.tsx | 3 - .../assistant_settings_button.test.tsx | 1 - .../settings/assistant_settings_button.tsx | 5 +- .../assistant_settings_management.test.tsx | 1 - .../assistant_settings_management.tsx | 3 - .../evaluation_settings.tsx | 6 +- .../assistant/use_assistant_overlay/index.tsx | 2 +- .../impl/assistant/use_conversation/index.tsx | 8 +- .../use_conversation/sample_conversations.tsx | 30 +- .../impl/assistant_context/index.tsx | 6 +- .../connector_missing_callout/index.test.tsx | 3 - .../connector_missing_callout/index.tsx | 14 +- .../connector_selector/index.test.tsx | 7 +- .../connector_selector/index.tsx | 4 +- .../connector_selector_inline.test.tsx | 36 +- .../connector_selector_inline.tsx | 107 +-- .../connectorland/connector_setup/helpers.tsx | 33 - .../connector_setup/index.test.tsx | 131 +--- .../connectorland/connector_setup/index.tsx | 222 +------ .../content/prompts/welcome/translations.ts | 24 - .../context_preview.tsx | 1 + .../data_anonymization_editor/index.test.tsx | 29 +- .../impl/data_anonymization_editor/index.tsx | 81 +-- .../impl/mock/get_anonymized_value/index.ts | 11 +- .../storage_details/helpers.ts | 61 +- .../data_quality_panel/stat_label/index.tsx | 3 +- .../tabs/ecs_compliant_tab/index.tsx | 7 +- .../data_quality_panel/tabs/helpers.tsx | 6 +- .../src/solution_side_nav_panel.styles.ts | 2 +- .../side_nav/src/solution_side_nav_panel.tsx | 3 +- .../common/experimental_features.ts | 5 - .../assistant/comment_actions/index.tsx | 11 +- .../assistant/get_comments/index.test.tsx | 1 - .../public/assistant/get_comments/index.tsx | 4 +- .../public/assistant/overlay.tsx | 9 +- .../stack_management/management_settings.tsx | 8 +- .../pages/header/index.test.tsx | 4 +- .../attack_discovery/pages/header/index.tsx | 2 - .../pages/welcome/index.test.tsx | 6 - .../attack_discovery/pages/welcome/index.tsx | 17 +- .../timeline/tabs/assistant/index.tsx | 35 - .../components/timeline/tabs/index.tsx | 68 +- .../translations/translations/fr-FR.json | 4 - .../translations/translations/ja-JP.json | 4 - .../translations/translations/zh-CN.json | 4 - 88 files changed, 829 insertions(+), 2593 deletions(-) delete mode 100644 x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/assistant_header_flyout.tsx delete mode 100644 x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/helpers.tsx delete mode 100644 x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/assistant/index.tsx diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/mock/get_anonymized_value/index.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/mock/get_anonymized_value/index.ts index 3822c736b670e3..256f9776c45635 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/mock/get_anonymized_value/index.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/mock/get_anonymized_value/index.ts @@ -5,13 +5,6 @@ * 2.0. */ -import { Replacements } from '../../schemas'; - /** This mock returns the reverse of `value` */ -export const mockGetAnonymizedValue = ({ - currentReplacements, - rawValue, -}: { - currentReplacements: Replacements | undefined; - rawValue: string; -}): string => rawValue.split('').reverse().join(''); +export const mockGetAnonymizedValue = ({ rawValue }: { rawValue: string }): string => + rawValue.split('').reverse().join(''); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/assistant_header_flyout.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/assistant_header_flyout.tsx deleted file mode 100644 index 5725d983eff337..00000000000000 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/assistant_header_flyout.tsx +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useState, useMemo, useCallback } from 'react'; -import { QueryObserverResult, RefetchOptions, RefetchQueryFilters } from '@tanstack/react-query'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiPopover, - EuiContextMenu, - EuiButtonIcon, - EuiPanel, - EuiConfirmModal, - EuiToolTip, -} from '@elastic/eui'; -import { css } from '@emotion/react'; -import { euiThemeVars } from '@kbn/ui-theme'; -import { DocLinksStart } from '@kbn/core-doc-links-browser'; -import { isEmpty } from 'lodash'; -import { Conversation } from '../../..'; -import { AssistantTitle } from '../assistant_title'; -import { ConnectorSelectorInline } from '../../connectorland/connector_selector_inline/connector_selector_inline'; -import { FlyoutNavigation } from '../assistant_overlay/flyout_navigation'; -import { AssistantSettingsButton } from '../settings/assistant_settings_button'; -import * as i18n from './translations'; -import { AIConnector } from '../../connectorland/connector_selector'; - -interface OwnProps { - selectedConversation: Conversation | undefined; - defaultConnector?: AIConnector; - docLinks: Omit; - isDisabled: boolean; - isSettingsModalVisible: boolean; - onToggleShowAnonymizedValues: () => void; - setIsSettingsModalVisible: React.Dispatch>; - showAnonymizedValues: boolean; - onChatCleared: () => void; - onCloseFlyout?: () => void; - chatHistoryVisible?: boolean; - setChatHistoryVisible?: React.Dispatch>; - onConversationSelected: ({ cId, cTitle }: { cId: string; cTitle: string }) => void; - conversations: Record; - conversationsLoaded: boolean; - refetchConversationsState: () => Promise; - onConversationCreate: () => Promise; - isAssistantEnabled: boolean; - refetchPrompts?: ( - options?: RefetchOptions & RefetchQueryFilters - ) => Promise>; -} - -type Props = OwnProps; -/** - * Renders the header of the Elastic AI Assistant. - * Provide a user interface for selecting and managing conversations, - * toggling the display of anonymized values, and accessing the assistant settings. - */ -export const AssistantHeaderFlyout: React.FC = ({ - selectedConversation, - defaultConnector, - docLinks, - isDisabled, - isSettingsModalVisible, - onToggleShowAnonymizedValues, - setIsSettingsModalVisible, - showAnonymizedValues, - onChatCleared, - chatHistoryVisible, - setChatHistoryVisible, - onCloseFlyout, - onConversationSelected, - conversations, - conversationsLoaded, - refetchConversationsState, - onConversationCreate, - isAssistantEnabled, - refetchPrompts, -}) => { - const showAnonymizedValuesChecked = useMemo( - () => - selectedConversation?.replacements != null && - Object.keys(selectedConversation?.replacements).length > 0 && - showAnonymizedValues, - [selectedConversation?.replacements, showAnonymizedValues] - ); - - const selectedConnectorId = useMemo( - () => selectedConversation?.apiConfig?.connectorId, - [selectedConversation?.apiConfig?.connectorId] - ); - - const [isPopoverOpen, setPopover] = useState(false); - - const onButtonClick = useCallback(() => { - setPopover(!isPopoverOpen); - }, [isPopoverOpen]); - - const closePopover = useCallback(() => { - setPopover(false); - }, []); - - const [isResetConversationModalVisible, setIsResetConversationModalVisible] = useState(false); - - const closeDestroyModal = useCallback(() => setIsResetConversationModalVisible(false), []); - const showDestroyModal = useCallback(() => setIsResetConversationModalVisible(true), []); - - const onConversationChange = useCallback( - (updatedConversation) => { - onConversationSelected({ - cId: updatedConversation.id, - cTitle: updatedConversation.title, - }); - }, - [onConversationSelected] - ); - - const panels = useMemo( - () => [ - { - id: 0, - items: [ - { - name: i18n.RESET_CONVERSATION, - css: css` - color: ${euiThemeVars.euiColorDanger}; - `, - onClick: showDestroyModal, - icon: 'refresh', - 'data-test-subj': 'clear-chat', - }, - ], - }, - ], - [showDestroyModal] - ); - - const handleReset = useCallback(() => { - onChatCleared(); - closeDestroyModal(); - closePopover(); - }, [onChatCleared, closeDestroyModal, closePopover]); - - return ( - <> - - - - - - - {onCloseFlyout && ( - - - - )} - - - - - - - - - - - - - - - - - - - - - } - isOpen={isPopoverOpen} - closePopover={closePopover} - panelPaddingSize="none" - anchorPosition="downLeft" - > - - - - - - - - {isResetConversationModalVisible && ( - -

{i18n.CLEAR_CHAT_CONFIRMATION}

- - )} - - ); -}; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.test.tsx index f806f5d1ef7c63..b4f4bd2c25384e 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.test.tsx @@ -20,7 +20,7 @@ const mockConversations = { }; const testProps = { conversationsLoaded: true, - currentConversation: welcomeConvo, + selectedConversation: welcomeConvo, title: 'Test Title', docLinks: { ELASTIC_WEBSITE_URL: 'https://www.elastic.co/', @@ -30,12 +30,13 @@ const testProps = { isSettingsModalVisible: false, onConversationSelected, onToggleShowAnonymizedValues: jest.fn(), - selectedConversationId: emptyWelcomeConvo.id, setIsSettingsModalVisible: jest.fn(), - onConversationDeleted: jest.fn(), + onConversationCreate: jest.fn(), + onChatCleared: jest.fn(), showAnonymizedValues: false, conversations: mockConversations, refetchConversationsState: jest.fn(), + isAssistantEnabled: true, anonymizationFields: { total: 0, page: 1, perPage: 1000, data: [] }, refetchAnonymizationFieldsResults: jest.fn(), allPrompts: [], @@ -69,53 +70,64 @@ describe('AssistantHeader', () => { beforeEach(() => { jest.clearAllMocks(); }); - it('showAnonymizedValues is not checked when currentConversation.replacements is null', () => { + it('showAnonymizedValues is not checked when selectedConversation.replacements is null', () => { const { getByText, getByTestId } = render(, { wrapper: TestProviders, }); - expect(getByText('Test Title')).toBeInTheDocument(); - expect(getByTestId('showAnonymizedValues')).toHaveAttribute('aria-checked', 'false'); + expect(getByText(welcomeConvo.title)).toBeInTheDocument(); + expect(getByTestId('showAnonymizedValues').firstChild).toHaveAttribute( + 'data-euiicon-type', + 'eyeClosed' + ); }); - it('showAnonymizedValues is not checked when currentConversation.replacements is empty', () => { + it('showAnonymizedValues is not checked when selectedConversation.replacements is empty', () => { const { getByText, getByTestId } = render( , { wrapper: TestProviders, } ); - expect(getByText('Test Title')).toBeInTheDocument(); - expect(getByTestId('showAnonymizedValues')).toHaveAttribute('aria-checked', 'false'); + expect(getByText(welcomeConvo.title)).toBeInTheDocument(); + expect(getByTestId('showAnonymizedValues').firstChild).toHaveAttribute( + 'data-euiicon-type', + 'eyeClosed' + ); }); - it('showAnonymizedValues is not checked when currentConversation.replacements has values and showAnonymizedValues is false', () => { + it('showAnonymizedValues is not checked when selectedConversation.replacements has values and showAnonymizedValues is false', () => { const { getByTestId } = render( - , + , { wrapper: TestProviders, } ); - expect(getByTestId('showAnonymizedValues')).toHaveAttribute('aria-checked', 'false'); + expect(getByTestId('showAnonymizedValues').firstChild).toHaveAttribute( + 'data-euiicon-type', + 'eyeClosed' + ); }); - it('showAnonymizedValues is checked when currentConversation.replacements has values and showAnonymizedValues is true', () => { + it('showAnonymizedValues is checked when selectedConversation.replacements has values and showAnonymizedValues is true', () => { const { getByTestId } = render( - , + , { wrapper: TestProviders, } ); - expect(getByTestId('showAnonymizedValues')).toHaveAttribute('aria-checked', 'true'); + expect(getByTestId('showAnonymizedValues').firstChild).toHaveAttribute( + 'data-euiicon-type', + 'eye' + ); }); it('Conversation is updated when connector change occurs', async () => { const { getByTestId } = render(, { wrapper: TestProviders, }); - fireEvent.click(getByTestId('connectorSelectorPlaceholderButton')); fireEvent.click(getByTestId('connector-selector')); await act(async () => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.tsx index 7507c146486147..30e620ea38873e 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.tsx @@ -5,44 +5,47 @@ * 2.0. */ -import React, { useCallback, useMemo } from 'react'; +import React, { useState, useMemo, useCallback } from 'react'; +import { QueryObserverResult, RefetchOptions, RefetchQueryFilters } from '@tanstack/react-query'; import { EuiFlexGroup, EuiFlexItem, - EuiHorizontalRule, - EuiSpacer, - EuiSwitch, + EuiPopover, + EuiContextMenu, + EuiButtonIcon, + EuiPanel, + EuiConfirmModal, EuiToolTip, } from '@elastic/eui'; -import { QueryObserverResult, RefetchOptions, RefetchQueryFilters } from '@tanstack/react-query'; import { css } from '@emotion/react'; -import { DocLinksStart } from '@kbn/core-doc-links-browser'; +import { euiThemeVars } from '@kbn/ui-theme'; import { isEmpty } from 'lodash'; -import { PromptResponse } from '@kbn/elastic-assistant-common'; -import { AIConnector } from '../../connectorland/connector_selector'; import { Conversation } from '../../..'; import { AssistantTitle } from '../assistant_title'; -import { ConversationSelector } from '../conversations/conversation_selector'; +import { ConnectorSelectorInline } from '../../connectorland/connector_selector_inline/connector_selector_inline'; +import { FlyoutNavigation } from '../assistant_overlay/flyout_navigation'; import { AssistantSettingsButton } from '../settings/assistant_settings_button'; import * as i18n from './translations'; +import { AIConnector } from '../../connectorland/connector_selector'; interface OwnProps { - currentConversation?: Conversation; + selectedConversation: Conversation | undefined; defaultConnector?: AIConnector; - docLinks: Omit; isDisabled: boolean; isSettingsModalVisible: boolean; - onConversationSelected: ({ cId, cTitle }: { cId: string; cTitle: string }) => void; - onConversationDeleted: (conversationId: string) => void; onToggleShowAnonymizedValues: () => void; setIsSettingsModalVisible: React.Dispatch>; - shouldDisableKeyboardShortcut?: () => boolean; showAnonymizedValues: boolean; - title: string; + onChatCleared: () => void; + onCloseFlyout?: () => void; + chatHistoryVisible?: boolean; + setChatHistoryVisible?: React.Dispatch>; + onConversationSelected: ({ cId, cTitle }: { cId: string; cTitle: string }) => void; conversations: Record; conversationsLoaded: boolean; refetchConversationsState: () => Promise; - allPrompts: PromptResponse[]; + onConversationCreate: () => Promise; + isAssistantEnabled: boolean; refetchPrompts?: ( options?: RefetchOptions & RefetchQueryFilters ) => Promise>; @@ -55,31 +58,53 @@ type Props = OwnProps; * toggling the display of anonymized values, and accessing the assistant settings. */ export const AssistantHeader: React.FC = ({ - currentConversation, + selectedConversation, defaultConnector, - docLinks, isDisabled, isSettingsModalVisible, - onConversationSelected, - onConversationDeleted, onToggleShowAnonymizedValues, setIsSettingsModalVisible, - shouldDisableKeyboardShortcut, showAnonymizedValues, - title, + onChatCleared, + chatHistoryVisible, + setChatHistoryVisible, + onCloseFlyout, + onConversationSelected, conversations, conversationsLoaded, refetchConversationsState, - allPrompts, + onConversationCreate, + isAssistantEnabled, refetchPrompts, }) => { const showAnonymizedValuesChecked = useMemo( () => - currentConversation?.replacements != null && - Object.keys(currentConversation?.replacements).length > 0 && + selectedConversation?.replacements != null && + Object.keys(selectedConversation?.replacements).length > 0 && showAnonymizedValues, - [currentConversation?.replacements, showAnonymizedValues] + [selectedConversation?.replacements, showAnonymizedValues] ); + + const selectedConnectorId = useMemo( + () => selectedConversation?.apiConfig?.connectorId, + [selectedConversation?.apiConfig?.connectorId] + ); + + const [isPopoverOpen, setPopover] = useState(false); + + const onButtonClick = useCallback(() => { + setPopover(!isPopoverOpen); + }, [isPopoverOpen]); + + const closePopover = useCallback(() => { + setPopover(false); + }, []); + + const [isResetConversationModalVisible, setIsResetConversationModalVisible] = useState(false); + + const closeDestroyModal = useCallback(() => setIsResetConversationModalVisible(false), []); + const showDestroyModal = useCallback(() => setIsResetConversationModalVisible(true), []); + const onConversationChange = useCallback( (updatedConversation) => { onConversationSelected({ @@ -89,90 +114,163 @@ export const AssistantHeader: React.FC = ({ }, [onConversationSelected] ); - const selectedConversationId = useMemo( - () => - !isEmpty(currentConversation?.id) ? currentConversation?.id : currentConversation?.title, - [currentConversation?.id, currentConversation?.title] + + const panels = useMemo( + () => [ + { + id: 0, + items: [ + { + name: i18n.RESET_CONVERSATION, + css: css` + color: ${euiThemeVars.euiColorDanger}; + `, + onClick: showDestroyModal, + icon: 'refresh', + 'data-test-subj': 'clear-chat', + }, + ], + }, + ], + [showDestroyModal] ); + const handleReset = useCallback(() => { + onChatCleared(); + closeDestroyModal(); + closePopover(); + }, [onChatCleared, closeDestroyModal, closePopover]); + return ( <> - + + + + + + {onCloseFlyout && ( + + + + )} + + + - - - - - - + + + + - <> - - + + + + + - - - - + + + } + isOpen={isPopoverOpen} + closePopover={closePopover} + panelPaddingSize="none" + anchorPosition="downLeft" + > + + - - - - + + +
+ {isResetConversationModalVisible && ( + +

{i18n.CLEAR_CHAT_CONFIRMATION}

+
+ )} ); }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/flyout_navigation.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/flyout_navigation.tsx index 85d7360c2870a7..3f7c3f7ea1bcb4 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/flyout_navigation.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/flyout_navigation.tsx @@ -48,6 +48,7 @@ export const FlyoutNavigation = memo( onClick={onToggle} iconType={isExpanded ? 'arrowEnd' : 'arrowStart'} size="xs" + data-test-subj="aiAssistantFlyoutNavigationToggle" aria-label={ isExpanded ? i18n.translate( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/index.test.tsx index 679901bc027483..9e6a9164607a3a 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/index.test.tsx @@ -24,31 +24,33 @@ describe('AssistantOverlay', () => { it('renders when isAssistantEnabled prop is true and keyboard shortcut is pressed', () => { const { getByTestId } = render( - + ); fireEvent.keyDown(document, { key: ';', ctrlKey: true }); - const modal = getByTestId('ai-assistant-modal'); - expect(modal).toBeInTheDocument(); + const flyout = getByTestId('ai-assistant-flyout'); + expect(flyout).toBeInTheDocument(); }); - it('modal closes when close button is clicked', () => { - const { getByLabelText, queryByTestId } = render( + it('flyout closes when close button is clicked', () => { + const { queryByTestId } = render( - + ); fireEvent.keyDown(document, { key: ';', ctrlKey: true }); - const closeButton = getByLabelText('Closes this modal window'); - fireEvent.click(closeButton); - const modal = queryByTestId('ai-assistant-modal'); - expect(modal).not.toBeInTheDocument(); + const closeButton = queryByTestId('euiFlyoutCloseButton'); + if (closeButton) { + fireEvent.click(closeButton); + } + const flyout = queryByTestId('ai-assistant-flyout'); + expect(flyout).not.toBeInTheDocument(); }); - it('Assistant invoked from shortcut tracking happens on modal open only (not close)', () => { + it('Assistant invoked from shortcut tracking happens on flyout open only (not close)', () => { render( - + ); fireEvent.keyDown(document, { key: ';', ctrlKey: true }); @@ -61,26 +63,26 @@ describe('AssistantOverlay', () => { expect(reportAssistantInvoked).toHaveBeenCalledTimes(1); }); - it('modal closes when shortcut is pressed and modal is already open', () => { + it('flyout closes when shortcut is pressed and flyout is already open', () => { const { queryByTestId } = render( - + ); fireEvent.keyDown(document, { key: ';', ctrlKey: true }); fireEvent.keyDown(document, { key: ';', ctrlKey: true }); - const modal = queryByTestId('ai-assistant-modal'); - expect(modal).not.toBeInTheDocument(); + const flyout = queryByTestId('ai-assistant-flyout'); + expect(flyout).not.toBeInTheDocument(); }); - it('modal does not open when incorrect shortcut is pressed', () => { + it('flyout does not open when incorrect shortcut is pressed', () => { const { queryByTestId } = render( - + ); fireEvent.keyDown(document, { key: 'a', ctrlKey: true }); - const modal = queryByTestId('ai-assistant-modal'); - expect(modal).not.toBeInTheDocument(); + const flyout = queryByTestId('ai-assistant-flyout'); + expect(flyout).not.toBeInTheDocument(); }); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/index.tsx index 44907d8b1fd004..689f60f0a52d91 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_overlay/index.tsx @@ -6,12 +6,12 @@ */ import React, { useCallback, useEffect, useRef, useState } from 'react'; -import { EuiModal, EuiFlyoutResizable, useEuiTheme } from '@elastic/eui'; +import { EuiFlyoutResizable } from '@elastic/eui'; import useEvent from 'react-use/lib/useEvent'; -// eslint-disable-next-line @kbn/eslint/module_migration -import styled from 'styled-components'; import { css } from '@emotion/react'; +// eslint-disable-next-line @kbn/eslint/module_migration +import { createGlobalStyle } from 'styled-components'; import { ShowAssistantOverlayProps, useAssistantContext, @@ -22,23 +22,21 @@ import { WELCOME_CONVERSATION_TITLE } from '../use_conversation/translations'; const isMac = navigator.platform.toLowerCase().indexOf('mac') >= 0; -const StyledEuiModal = styled(EuiModal)` - ${({ theme }) => `margin-top: ${theme.eui.euiSizeXXL};`} - min-width: 95vw; - min-height: 25vh; -`; - /** * Modal container for Elastic AI Assistant conversations, receiving the page contents as context, plus whatever * component currently has focus and any specific context it may provide through the SAssInterface. */ export interface Props { - isFlyoutMode: boolean; currentUserAvatar?: UserAvatar; } -export const AssistantOverlay = React.memo(({ isFlyoutMode, currentUserAvatar }) => { - const { euiTheme } = useEuiTheme(); +export const UnifiedTimelineGlobalStyles = createGlobalStyle` + body:has(.timeline-portal-overlay-mask) .euiOverlayMask { + z-index: 1003 !important; + } +`; + +export const AssistantOverlay = React.memo(({ currentUserAvatar }) => { const [isModalVisible, setIsModalVisible] = useState(false); const [conversationTitle, setConversationTitle] = useState( WELCOME_CONVERSATION_TITLE @@ -130,8 +128,8 @@ export const AssistantOverlay = React.memo(({ isFlyoutMode, currentUserAv if (!isModalVisible) return null; - if (isFlyoutMode) { - return ( + return ( + <> (({ isFlyoutMode, currentUserAv data-test-subj="ai-assistant-flyout" paddingSize="none" hideCloseButton - // EUI TODO: This z-index override of EuiOverlayMask is a workaround, and ideally should be resolved with a cleaner UI/UX flow long-term - maskProps={{ style: `z-index: ${(euiTheme.levels.flyout as number) + 3}` }} // we need this flyout to be above the timeline flyout (which has a z-index of 1002) > - ); - } - - return ( - <> - {isModalVisible && ( - - - - )} + ); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.test.tsx index ee4a998a1439f6..d9dd84cb0b51d8 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { render, fireEvent } from '@testing-library/react'; +import { render } from '@testing-library/react'; import { AssistantTitle } from '.'; import { TestProviders } from '../../mock/test_providers/test_providers'; @@ -14,7 +14,6 @@ const testProps = { title: 'Test Title', docLinks: { ELASTIC_WEBSITE_URL: 'https://www.elastic.co/', DOC_LINK_VERSION: '7.15' }, selectedConversation: undefined, - isFlyoutMode: false, onChange: jest.fn(), refetchConversationsState: jest.fn(), }; @@ -28,22 +27,4 @@ describe('AssistantTitle', () => { ); expect(getByText('Test Title')).toBeInTheDocument(); }); - - it('clicking on the popover button opens the popover with the correct link', () => { - const { getByTestId, queryByTestId } = render( - - - , - { - wrapper: TestProviders, - } - ); - expect(queryByTestId('tooltipContent')).not.toBeInTheDocument(); - fireEvent.click(getByTestId('tooltipIcon')); - expect(getByTestId('tooltipContent')).toBeInTheDocument(); - expect(getByTestId('externalDocumentationLink')).toHaveAttribute( - 'href', - 'https://www.elastic.co/guide/en/security/7.15/security-assistant.html' - ); - }); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.tsx index 7e9934afcaa90b..2090a92645c65a 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_title/index.tsx @@ -5,24 +5,10 @@ * 2.0. */ -import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { - EuiButtonIcon, - EuiFlexGroup, - EuiFlexItem, - EuiInlineEditTitle, - EuiLink, - EuiModalHeaderTitle, - EuiPopover, - EuiText, - EuiTitle, -} from '@elastic/eui'; -import type { DocLinksStart } from '@kbn/core-doc-links-browser'; -import { FormattedMessage } from '@kbn/i18n-react'; +import React, { useCallback, useEffect, useState } from 'react'; +import { EuiFlexGroup, EuiFlexItem, EuiInlineEditTitle } from '@elastic/eui'; import { css } from '@emotion/react'; -import * as i18n from '../translations'; import type { Conversation } from '../../..'; -import { ConnectorSelectorInline } from '../../connectorland/connector_selector_inline/connector_selector_inline'; import { AssistantAvatar } from '../assistant_avatar/assistant_avatar'; import { useConversation } from '../use_conversation'; import { NEW_CHAT } from '../conversations/conversation_sidepanel/translations'; @@ -32,63 +18,14 @@ import { NEW_CHAT } from '../conversations/conversation_sidepanel/translations'; * information about the assistant feature and access to documentation. */ export const AssistantTitle: React.FC<{ - isDisabled?: boolean; title?: string; - docLinks: Omit; selectedConversation: Conversation | undefined; - isFlyoutMode: boolean; - onChange: (updatedConversation: Conversation) => void; refetchConversationsState: () => Promise; -}> = ({ - isDisabled = false, - title, - docLinks, - selectedConversation, - isFlyoutMode, - onChange, - refetchConversationsState, -}) => { +}> = ({ title, selectedConversation, refetchConversationsState }) => { const [newTitle, setNewTitle] = useState(title); const [newTitleError, setNewTitleError] = useState(false); const { updateConversationTitle } = useConversation(); - const selectedConnectorId = selectedConversation?.apiConfig?.connectorId; - - const { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION } = docLinks; - const url = `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/security-assistant.html`; - - const documentationLink = useMemo( - () => ( - - {i18n.DOCUMENTATION} - - ), - [url] - ); - - const content = useMemo( - () => ( - - ), - [documentationLink] - ); - - const [isPopoverOpen, setIsPopoverOpen] = useState(false); - const onButtonClick = useCallback(() => setIsPopoverOpen((isOpen: boolean) => !isOpen), []); - const closePopover = useCallback(() => setIsPopoverOpen(false), []); - const handleUpdateTitle = useCallback( async (updatedTitle: string) => { setNewTitleError(false); @@ -109,108 +46,33 @@ export const AssistantTitle: React.FC<{ setNewTitle(title); }, [title]); - if (isFlyoutMode) { - return ( - - - - - - setNewTitle(e.currentTarget.nodeValue || '')} - onCancel={() => setNewTitle(title)} - onSave={handleUpdateTitle} - editModeProps={{ - formRowProps: { - fullWidth: true, - }, - }} - /> - - - ); - } - return ( - - - - - - - - - - - -

{title}

-
-
- - - } - isOpen={isPopoverOpen} - closePopover={closePopover} - anchorPosition="rightUp" - > - - -

{content}

-
-
-
-
-
-
- {!isFlyoutMode && ( - - - - )} -
-
-
-
+ + + + + + setNewTitle(e.currentTarget.nodeValue || '')} + onCancel={() => setNewTitle(title)} + onSave={handleUpdateTitle} + editModeProps={{ + formRowProps: { + fullWidth: true, + }, + }} + /> + + ); }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_actions/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_actions/index.test.tsx index 36936c7565112d..7fbd7e1a033663 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_actions/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_actions/index.test.tsx @@ -9,14 +9,11 @@ import React from 'react'; import { render, fireEvent, within } from '@testing-library/react'; import { ChatActions } from '.'; -const onChatCleared = jest.fn(); const onSendMessage = jest.fn(); const testProps = { isDisabled: false, isLoading: false, - onChatCleared, onSendMessage, - isFlyoutMode: false, promptValue: 'prompt', }; @@ -26,16 +23,9 @@ describe('ChatActions', () => { }); it('the component renders with all props', () => { const { getByTestId } = render(); - expect(getByTestId('clear-chat')).toHaveAttribute('aria-label', 'Clear chat'); expect(getByTestId('submit-chat')).toHaveAttribute('aria-label', 'Submit message'); }); - it('onChatCleared function is called when clear chat button is clicked', () => { - const { getByTestId } = render(); - fireEvent.click(getByTestId('clear-chat')); - expect(onChatCleared).toHaveBeenCalled(); - }); - it('onSendMessage function is called when send message button is clicked', () => { const { getByTestId } = render(); @@ -49,7 +39,6 @@ describe('ChatActions', () => { isDisabled: true, }; const { getByTestId } = render(); - expect(getByTestId('clear-chat')).toBeDisabled(); expect(getByTestId('submit-chat')).toBeDisabled(); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_actions/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_actions/index.tsx index e7ff0922b30ae6..ba980356351fdf 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_actions/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_actions/index.tsx @@ -7,14 +7,12 @@ import React, { useCallback, useRef } from 'react'; import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; -import { CLEAR_CHAT, SUBMIT_MESSAGE } from '../translations'; +import { SUBMIT_MESSAGE } from '../translations'; interface OwnProps { isDisabled: boolean; isLoading: boolean; - isFlyoutMode: boolean; promptValue?: string; - onChatCleared: () => void; onSendMessage: () => void; } @@ -26,9 +24,7 @@ type Props = OwnProps; export const ChatActions: React.FC = ({ isDisabled, isLoading, - onChatCleared, onSendMessage, - isFlyoutMode, promptValue, }) => { const submitTooltipRef = useRef(null); @@ -39,21 +35,6 @@ export const ChatActions: React.FC = ({ return ( - {!isFlyoutMode && ( - - - - - - )} = ({ aria-label={SUBMIT_MESSAGE} data-test-subj="submit-chat" color="primary" - display={isFlyoutMode && promptValue?.length ? 'fill' : 'base'} - size={isFlyoutMode ? 'm' : 'xs'} - iconType={isFlyoutMode ? 'kqlFunction' : 'returnKey'} + display={promptValue?.length ? 'fill' : 'base'} + size={'m'} + iconType={'kqlFunction'} isDisabled={isDisabled || !promptValue?.length} isLoading={isLoading} onClick={onSendMessage} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.test.tsx index ab7b942476f812..99f30cde68a821 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.test.tsx @@ -12,12 +12,10 @@ import { TestProviders } from '../../mock/test_providers/test_providers'; jest.mock('./use_chat_send'); -const handleOnChatCleared = jest.fn(); const handlePromptChange = jest.fn(); const handleSendMessage = jest.fn(); const handleRegenerateResponse = jest.fn(); const testProps: Props = { - handleOnChatCleared, handlePromptChange, handleSendMessage, handleRegenerateResponse, @@ -25,7 +23,6 @@ const testProps: Props = { isDisabled: false, shouldRefocusPrompt: false, userPrompt: '', - isFlyoutMode: false, }; describe('ChatSend', () => { beforeEach(() => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.tsx index 880d4d5f9f88fc..c292a70252a032 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/index.tsx @@ -14,11 +14,10 @@ import { ChatActions } from '../chat_actions'; import { PromptTextArea } from '../prompt_textarea'; import { useAutosizeTextArea } from './use_autosize_textarea'; -export interface Props extends Omit { +export interface Props extends Omit { isDisabled: boolean; shouldRefocusPrompt: boolean; userPrompt: string | null; - isFlyoutMode: boolean; } /** @@ -26,12 +25,10 @@ export interface Props extends Omit { * Allows the user to clear the chat and switch between different system prompts. */ export const ChatSend: React.FC = ({ - handleOnChatCleared, handlePromptChange, handleSendMessage, isDisabled, isLoading, - isFlyoutMode, shouldRefocusPrompt, userPrompt, }) => { @@ -58,7 +55,7 @@ export const ChatSend: React.FC = ({ return ( = ({ handlePromptChange={handlePromptChange} value={promptValue} isDisabled={isDisabled} - isFlyoutMode={isFlyoutMode} /> diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.test.tsx index 17a421313e3a44..a9231499570c79 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.test.tsx @@ -21,7 +21,6 @@ jest.mock('../use_conversation'); jest.mock('../../..'); const setEditingSystemPromptId = jest.fn(); -const setPromptTextPreview = jest.fn(); const setSelectedPromptContexts = jest.fn(); const setUserPrompt = jest.fn(); const sendMessage = jest.fn(); @@ -43,7 +42,6 @@ export const testProps: UseChatSendProps = { } as unknown as HttpSetup, editingSystemPromptId: defaultSystemPrompt.id, setEditingSystemPromptId, - setPromptTextPreview, setSelectedPromptContexts, setUserPrompt, setCurrentConversation, @@ -75,7 +73,6 @@ describe('use chat send', () => { }); result.current.handleOnChatCleared(); expect(clearConversation).toHaveBeenCalled(); - expect(setPromptTextPreview).toHaveBeenCalledWith(''); expect(setUserPrompt).toHaveBeenCalledWith(''); expect(setSelectedPromptContexts).toHaveBeenCalledWith({}); await waitFor(() => { @@ -89,7 +86,6 @@ describe('use chat send', () => { wrapper: TestProviders, }); result.current.handlePromptChange('new prompt'); - expect(setPromptTextPreview).toHaveBeenCalledWith('new prompt'); expect(setUserPrompt).toHaveBeenCalledWith('new prompt'); }); it('handleSendMessage sends message with context prompt when a valid prompt text is provided', async () => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.tsx index 9d5e822fcdf55f..5a70b6ad32cd88 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.tsx @@ -25,7 +25,6 @@ export interface UseChatSendProps { http: HttpSetup; selectedPromptContexts: Record; setEditingSystemPromptId: React.Dispatch>; - setPromptTextPreview: React.Dispatch>; setSelectedPromptContexts: React.Dispatch< React.SetStateAction> >; @@ -54,7 +53,6 @@ export const useChatSend = ({ http, selectedPromptContexts, setEditingSystemPromptId, - setPromptTextPreview, setSelectedPromptContexts, setUserPrompt, setCurrentConversation, @@ -69,7 +67,6 @@ export const useChatSend = ({ const { clearConversation, removeLastMessage } = useConversation(); const handlePromptChange = (prompt: string) => { - setPromptTextPreview(prompt); setUserPrompt(prompt); }; @@ -120,7 +117,6 @@ export const useChatSend = ({ // Reset prompt context selection and preview before sending: setSelectedPromptContexts({}); - setPromptTextPreview(''); const rawResponse = await sendMessage({ apiConfig: currentConversation.apiConfig, @@ -168,7 +164,6 @@ export const useChatSend = ({ selectedPromptContexts, sendMessage, setCurrentConversation, - setPromptTextPreview, setSelectedPromptContexts, toasts, ] @@ -214,7 +209,6 @@ export const useChatSend = ({ conversation: currentConversation, })?.id; - setPromptTextPreview(''); setUserPrompt(''); setSelectedPromptContexts({}); if (currentConversation) { @@ -230,7 +224,6 @@ export const useChatSend = ({ currentConversation, setCurrentConversation, setEditingSystemPromptId, - setPromptTextPreview, setSelectedPromptContexts, setUserPrompt, ]); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.test.tsx index 0168c27c7f5486..da2dd3008a1b09 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.test.tsx @@ -33,7 +33,6 @@ const mockPromptContexts: Record = { const defaultProps = { anonymizationFields: { total: 0, page: 1, perPage: 1000, data: [] }, promptContexts: mockPromptContexts, - isFlyoutMode: false, }; describe('ContextPills', () => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.tsx index ce5a0cf59ca6a6..d3ae29643804ef 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.tsx @@ -5,20 +5,14 @@ * 2.0. */ -import { EuiButton, EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; +import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; import { sortBy } from 'lodash/fp'; import React, { useCallback, useMemo } from 'react'; -// eslint-disable-next-line @kbn/eslint/module_migration -import styled from 'styled-components'; import { FindAnonymizationFieldsResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen'; import { getNewSelectedPromptContext } from '../../data_anonymization/get_new_selected_prompt_context'; import type { PromptContext, SelectedPromptContext } from '../prompt_context/types'; -const PillButton = styled(EuiButton)` - margin-right: ${({ theme }) => theme.eui.euiSizeXS}; -`; - interface Props { anonymizationFields: FindAnonymizationFieldsResponse; promptContexts: Record; @@ -26,7 +20,6 @@ interface Props { setSelectedPromptContexts: React.Dispatch< React.SetStateAction> >; - isFlyoutMode: boolean; } const ContextPillsComponent: React.FC = ({ @@ -34,7 +27,6 @@ const ContextPillsComponent: React.FC = ({ promptContexts, selectedPromptContexts, setSelectedPromptContexts, - isFlyoutMode, }) => { const sortedPromptContexts = useMemo( () => sortBy('description', Object.values(promptContexts)), @@ -63,7 +55,7 @@ const ContextPillsComponent: React.FC = ({ {sortedPromptContexts.map(({ description, id, tooltip }) => { // Workaround for known issue where tooltip won't dismiss after button state is changed once clicked // See: https://github.com/elastic/eui/issues/6488#issuecomment-1379656704 - const button = isFlyoutMode ? ( + const button = ( = ({ > {description} - ) : ( - selectPromptContext(id)} - > - {description} - ); return ( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.tsx index fd9cddc39dbbee..4ee8076c42a9d5 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.tsx @@ -35,7 +35,6 @@ interface Props { selectedConversationId: string | undefined; onConversationSelected: ({ cId, cTitle }: { cId: string; cTitle: string }) => void; onConversationDeleted: (conversationId: string) => void; - shouldDisableKeyboardShortcut?: () => boolean; isDisabled?: boolean; conversations: Record; allPrompts: PromptResponse[]; @@ -65,7 +64,6 @@ export const ConversationSelector: React.FC = React.memo( defaultConnector, onConversationSelected, onConversationDeleted, - shouldDisableKeyboardShortcut = () => false, isDisabled = false, conversations, allPrompts, @@ -199,9 +197,8 @@ export const ConversationSelector: React.FC = React.memo( const renderOption: ( option: ConversationSelectorOption, - searchValue: string, - OPTION_CONTENT_CLASSNAME: string - ) => React.ReactNode = (option, searchValue, contentClassName) => { + searchValue: string + ) => React.ReactNode = (option, searchValue) => { const { label, id, value } = option; return ( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/index.tsx index f4b8f9a79412fb..f1edb5a9dc2a97 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector_settings/index.tsx @@ -27,7 +27,6 @@ interface Props { onConversationDeleted: (conversationTitle: string) => void; onConversationSelectionChange: (conversation?: Conversation | string) => void; selectedConversationTitle: string; - shouldDisableKeyboardShortcut?: () => boolean; isDisabled?: boolean; } @@ -62,7 +61,6 @@ export const ConversationSelectorSettings: React.FC = React.memo( onConversationSelectionChange, selectedConversationTitle, isDisabled, - shouldDisableKeyboardShortcut = () => false, }) => { const conversationTitles = useMemo( () => Object.values(conversations).map((c) => c.title), diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx index cba17030e1577d..1584a46ee687a1 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx @@ -49,7 +49,6 @@ export interface ConversationSettingsProps { React.SetStateAction >; isDisabled?: boolean; - isFlyoutMode: boolean; } /** @@ -66,7 +65,6 @@ export const ConversationSettings: React.FC = React.m conversationSettings, http, isDisabled = false, - isFlyoutMode, setAssistantStreamingEnabled, setConversationSettings, conversationsSettingsBulkActions, @@ -127,7 +125,6 @@ export const ConversationSettings: React.FC = React.m conversationsSettingsBulkActions={conversationsSettingsBulkActions} http={http} isDisabled={isDisabled} - isFlyoutMode={isFlyoutMode} selectedConversation={selectedConversationWithApiConfig} setConversationSettings={setConversationSettings} setConversationsSettingsBulkActions={setConversationsSettingsBulkActions} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings_editor.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings_editor.tsx index 41da376d21b738..cf8275203090bc 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings_editor.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings_editor.tsx @@ -31,7 +31,6 @@ export interface ConversationSettingsEditorProps { conversationsSettingsBulkActions: ConversationsBulkActions; http: HttpSetup; isDisabled?: boolean; - isFlyoutMode: boolean; selectedConversation?: Conversation; setConversationSettings: React.Dispatch>>; setConversationsSettingsBulkActions: React.Dispatch< @@ -49,7 +48,6 @@ export const ConversationSettingsEditor: React.FC @@ -304,7 +299,6 @@ export const ConversationSettingsEditor: React.FC diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings_management/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings_management/index.tsx index 485f89358f57a7..10608502e70d3c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings_management/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings_management/index.tsx @@ -36,7 +36,6 @@ interface Props { defaultConnector?: AIConnector; handleSave: (shouldRefetchConversation?: boolean) => void; isDisabled?: boolean; - isFlyoutMode: boolean; onCancelClick: () => void; setAssistantStreamingEnabled: React.Dispatch>; setConversationSettings: React.Dispatch>>; @@ -62,7 +61,6 @@ const ConversationSettingsManagementComponent: React.FC = ({ conversationsLoaded, handleSave, isDisabled, - isFlyoutMode, onSelectedConversationChange, onCancelClick, selectedConversation, @@ -221,7 +219,6 @@ const ConversationSettingsManagementComponent: React.FC = ({ conversationsSettingsBulkActions={conversationsSettingsBulkActions} http={http} isDisabled={isDisabled} - isFlyoutMode={isFlyoutMode} selectedConversation={selectedConversation} setConversationSettings={setConversationSettings} setConversationsSettingsBulkActions={setConversationsSettingsBulkActions} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_sidepanel/title_field.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_sidepanel/title_field.tsx index acbda153202776..373c052ede6e1d 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_sidepanel/title_field.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_sidepanel/title_field.tsx @@ -32,7 +32,7 @@ const TitleFieldComponent = ({ conversationIds, euiFieldProps }: TitleFieldProps ), value: true, }, - validate: (text: string) => { + validate: () => { if (conversationIds?.includes(value)) { return i18n.translate( 'xpack.elasticAssistant.conversationSidepanel.titleField.uniqueTitle', diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.test.ts index 19d703a271edc7..b4ed11a82df9eb 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.test.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.test.ts @@ -22,12 +22,11 @@ const defaultConversation = { replacements: {}, title: 'conversation_id', }; -const isFlyoutMode = false; describe('helpers', () => { describe('isAssistantEnabled = false', () => { const isAssistantEnabled = false; it('When no conversation history, return only enterprise messaging', () => { - const result = getBlockBotConversation(defaultConversation, isAssistantEnabled, isFlyoutMode); + const result = getBlockBotConversation(defaultConversation, isAssistantEnabled); expect(result.messages).toEqual(enterpriseMessaging); expect(result.messages.length).toEqual(1); }); @@ -47,7 +46,7 @@ describe('helpers', () => { }, ], }; - const result = getBlockBotConversation(conversation, isAssistantEnabled, isFlyoutMode); + const result = getBlockBotConversation(conversation, isAssistantEnabled); expect(result.messages.length).toEqual(2); }); @@ -56,7 +55,7 @@ describe('helpers', () => { ...defaultConversation, messages: enterpriseMessaging, }; - const result = getBlockBotConversation(conversation, isAssistantEnabled, isFlyoutMode); + const result = getBlockBotConversation(conversation, isAssistantEnabled); expect(result.messages.length).toEqual(1); expect(result.messages).toEqual(enterpriseMessaging); }); @@ -77,7 +76,7 @@ describe('helpers', () => { }, ], }; - const result = getBlockBotConversation(conversation, isAssistantEnabled, isFlyoutMode); + const result = getBlockBotConversation(conversation, isAssistantEnabled); expect(result.messages.length).toEqual(3); }); }); @@ -85,8 +84,8 @@ describe('helpers', () => { describe('isAssistantEnabled = true', () => { const isAssistantEnabled = true; it('when no conversation history, returns the welcome conversation', () => { - const result = getBlockBotConversation(defaultConversation, isAssistantEnabled, isFlyoutMode); - expect(result.messages.length).toEqual(3); + const result = getBlockBotConversation(defaultConversation, isAssistantEnabled); + expect(result.messages.length).toEqual(0); }); it('returns a conversation history with the welcome conversation appended', () => { const conversation = { @@ -103,8 +102,8 @@ describe('helpers', () => { }, ], }; - const result = getBlockBotConversation(conversation, isAssistantEnabled, isFlyoutMode); - expect(result.messages.length).toEqual(4); + const result = getBlockBotConversation(conversation, isAssistantEnabled); + expect(result.messages.length).toEqual(1); }); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts index e9a0599ca4fc2d..f369bf430ea542 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts @@ -10,7 +10,7 @@ import { AIConnector } from '../connectorland/connector_selector'; import { FetchConnectorExecuteResponse, FetchConversationsResponse } from './api'; import { Conversation } from '../..'; import type { ClientMessage } from '../assistant_context/types'; -import { enterpriseMessaging, WELCOME_CONVERSATION } from './use_conversation/sample_conversations'; +import { enterpriseMessaging } from './use_conversation/sample_conversations'; export const getMessageFromRawResponse = ( rawResponse: FetchConnectorExecuteResponse @@ -57,8 +57,7 @@ export const mergeBaseWithPersistedConversations = ( export const getBlockBotConversation = ( conversation: Conversation, - isAssistantEnabled: boolean, - isFlyoutMode: boolean + isAssistantEnabled: boolean ): Conversation => { if (!isAssistantEnabled) { if ( @@ -76,7 +75,7 @@ export const getBlockBotConversation = ( return { ...conversation, - messages: [...conversation.messages, ...(!isFlyoutMode ? WELCOME_CONVERSATION.messages : [])], + messages: conversation.messages, }; }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.test.tsx index b25945dd247bfe..cd0d53bd460c3f 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.test.tsx @@ -7,12 +7,11 @@ import React from 'react'; -import { act, fireEvent, render, screen, waitFor, within } from '@testing-library/react'; +import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'; import { Assistant } from '.'; import type { IHttpFetchError } from '@kbn/core/public'; import { useLoadConnectors } from '../connectorland/use_load_connectors'; -import { useConnectorSetup } from '../connectorland/connector_setup'; import { DefinedUseQueryResult, UseQueryResult } from '@tanstack/react-query'; @@ -40,7 +39,7 @@ jest.mock('./use_conversation'); const renderAssistant = (extraProps = {}, providerProps = {}) => render( - + ); @@ -63,11 +62,12 @@ const mockData = { }, }; const mockDeleteConvo = jest.fn(); +const mockGetDefaultConversation = jest.fn().mockReturnValue(mockData.welcome_id); const clearConversation = jest.fn(); const mockUseConversation = { clearConversation: clearConversation.mockResolvedValue(mockData.welcome_id), getConversation: jest.fn(), - getDefaultConversation: jest.fn().mockReturnValue(mockData.welcome_id), + getDefaultConversation: mockGetDefaultConversation, deleteConversation: mockDeleteConvo, setApiConfig: jest.fn().mockResolvedValue({}), }; @@ -83,10 +83,6 @@ describe('Assistant', () => { persistToLocalStorage = jest.fn(); persistToSessionStorage = jest.fn(); (useConversation as jest.Mock).mockReturnValue(mockUseConversation); - jest.mocked(useConnectorSetup).mockReturnValue({ - comments: [], - prompt: <>, - }); jest.mocked(PromptEditor).mockReturnValue(null); jest.mocked(QuickPrompts).mockReturnValue(null); @@ -221,22 +217,21 @@ describe('Assistant', () => { it('should delete conversation when delete button is clicked', async () => { renderAssistant(); + const deleteButton = screen.getAllByTestId('delete-option')[0]; await act(async () => { - fireEvent.click( - within(screen.getByTestId('conversation-selector')).getByTestId( - 'comboBoxToggleListButton' - ) - ); + fireEvent.click(deleteButton); }); - const deleteButton = screen.getAllByTestId('delete-option')[0]; await act(async () => { - fireEvent.click(deleteButton); + fireEvent.click(screen.getByTestId('confirmModalConfirmButton')); + }); + + await waitFor(() => { + expect(mockDeleteConvo).toHaveBeenCalledWith(mockData.electric_sheep_id.id); }); - expect(mockDeleteConvo).toHaveBeenCalledWith(mockData.welcome_id.id); }); it('should refetchConversationsState after clear chat history button click', async () => { - renderAssistant({ isFlyoutMode: true }); + renderAssistant(); fireEvent.click(screen.getByTestId('chat-context-menu')); fireEvent.click(screen.getByTestId('clear-chat')); fireEvent.click(screen.getByTestId('confirmModalConfirmButton')); @@ -259,7 +254,7 @@ describe('Assistant', () => { expect(persistToLocalStorage).toHaveBeenLastCalledWith(mockData.welcome_id.id); - const previousConversationButton = screen.getByLabelText('Previous conversation'); + const previousConversationButton = await screen.findByText(mockData.electric_sheep_id.title); expect(previousConversationButton).toBeInTheDocument(); await act(async () => { @@ -295,13 +290,13 @@ describe('Assistant', () => { isFetched: true, } as unknown as DefinedUseQueryResult, unknown>); - const { getByLabelText } = renderAssistant(); + const { findByText } = renderAssistant(); expect(persistToLocalStorage).toHaveBeenCalled(); expect(persistToLocalStorage).toHaveBeenLastCalledWith(mockData.welcome_id.id); - const previousConversationButton = getByLabelText('Previous conversation'); + const previousConversationButton = await findByText(mockData.electric_sheep_id.title); expect(previousConversationButton).toBeInTheDocument(); @@ -321,7 +316,7 @@ describe('Assistant', () => { renderAssistant({ setConversationTitle }); await act(async () => { - fireEvent.click(screen.getByLabelText('Previous conversation')); + fireEvent.click(await screen.findByText(mockData.electric_sheep_id.title)); }); expect(setConversationTitle).toHaveBeenLastCalledWith('electric sheep'); @@ -351,7 +346,7 @@ describe('Assistant', () => { } as unknown as DefinedUseQueryResult, unknown>); renderAssistant(); - const previousConversationButton = screen.getByLabelText('Previous conversation'); + const previousConversationButton = await screen.findByText('updated title'); await act(async () => { fireEvent.click(previousConversationButton); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx index 6892fdcaf48bd9..3fe4e1586e239b 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx @@ -5,8 +5,6 @@ * 2.0. */ -/* eslint-disable complexity */ - import React, { Dispatch, SetStateAction, @@ -26,9 +24,6 @@ import { EuiFlyoutFooter, EuiFlyoutHeader, EuiFlyoutBody, - EuiModalFooter, - EuiModalHeader, - EuiModalBody, EuiText, } from '@elastic/eui'; import { euiThemeVars } from '@kbn/ui-theme'; @@ -43,7 +38,6 @@ import { PromptTypeEnum } from '@kbn/elastic-assistant-common/impl/schemas/promp import { useChatSend } from './chat_send/use_chat_send'; import { ChatSend } from './chat_send'; import { BlockBotCallToAction } from './block_bot/cta'; -import { AssistantHeader } from './assistant_header'; import { WELCOME_CONVERSATION_TITLE } from './use_conversation/translations'; import { getDefaultConnector, @@ -57,16 +51,15 @@ import { getNewSelectedPromptContext } from '../data_anonymization/get_new_selec import type { PromptContext, SelectedPromptContext } from './prompt_context/types'; import { useConversation } from './use_conversation'; import { CodeBlockDetails, getDefaultSystemPrompt } from './use_conversation/helpers'; -import { PromptEditor } from './prompt_editor'; import { QuickPrompts } from './quick_prompts/quick_prompts'; import { useLoadConnectors } from '../connectorland/use_load_connectors'; -import { useConnectorSetup } from '../connectorland/connector_setup'; +import { ConnectorSetup } from '../connectorland/connector_setup'; import { ConnectorMissingCallout } from '../connectorland/connector_missing_callout'; import { ConversationSidePanel } from './conversations/conversation_sidepanel'; import { NEW_CHAT } from './conversations/conversation_sidepanel/translations'; import { SystemPrompt } from './prompt_editor/system_prompt'; import { SelectedPromptContexts } from './prompt_editor/selected_prompt_contexts'; -import { AssistantHeaderFlyout } from './assistant_header/assistant_header_flyout'; +import { AssistantHeader } from './assistant_header'; import * as i18n from './translations'; export const CONVERSATION_SIDE_PANEL_WIDTH = 220; @@ -77,17 +70,12 @@ const CommentContainer = styled('span')` overflow: hidden; `; -const ModalPromptEditorWrapper = styled.div` - margin-right: 24px; -`; - import { FetchConversationsResponse, useFetchCurrentUserConversations, CONVERSATIONS_QUERY_KEYS, } from './api/conversations/use_fetch_current_user_conversations'; import { Conversation } from '../assistant_context/types'; -import { clearPresentationData } from '../connectorland/connector_setup/helpers'; import { getGenAiConfig } from '../connectorland/helpers'; import { AssistantAnimatedIcon } from './assistant_animated_icon'; import { useFetchAnonymizationFields } from './api/anonymization_fields/use_fetch_anonymization_fields'; @@ -102,7 +90,6 @@ export interface Props { showTitle?: boolean; setConversationTitle?: Dispatch>; onCloseFlyout?: () => void; - isFlyoutMode?: boolean; chatHistoryVisible?: boolean; setChatHistoryVisible?: Dispatch>; currentUserAvatar?: UserAvatar; @@ -120,7 +107,6 @@ const AssistantComponent: React.FC = ({ showTitle = true, setConversationTitle, onCloseFlyout, - isFlyoutMode = false, chatHistoryVisible, setChatHistoryVisible, currentUserAvatar, @@ -129,14 +115,12 @@ const AssistantComponent: React.FC = ({ assistantTelemetry, augmentMessageCodeBlocks, assistantAvailability: { isAssistantEnabled }, - docLinks, getComments, http, knowledgeBase: { isEnabledKnowledgeBase, isEnabledRAGAlerts }, promptContexts, setLastConversationId, getLastConversationId, - title, baseConversations, } = useAssistantContext(); @@ -251,7 +235,7 @@ const AssistantComponent: React.FC = ({ nextConversation?.id !== '' ? nextConversation?.id : nextConversation?.title ]) ?? conversations[WELCOME_CONVERSATION_TITLE] ?? - getDefaultConversation({ cTitle: WELCOME_CONVERSATION_TITLE, isFlyoutMode }); + getDefaultConversation({ cTitle: WELCOME_CONVERSATION_TITLE }); if ( prev && @@ -278,7 +262,6 @@ const AssistantComponent: React.FC = ({ getDefaultConversation, getLastConversationId, isAssistantEnabled, - isFlyoutMode, ]); // Welcome setup state @@ -295,10 +278,8 @@ const AssistantComponent: React.FC = ({ // Welcome conversation is a special 'setup' case when no connector exists, mostly extracted to `ConnectorSetup` component, // but currently a bit of state is littered throughout the assistant component. TODO: clean up/isolate this state const blockBotConversation = useMemo( - () => - currentConversation && - getBlockBotConversation(currentConversation, isAssistantEnabled, isFlyoutMode), - [currentConversation, isAssistantEnabled, isFlyoutMode] + () => currentConversation && getBlockBotConversation(currentConversation, isAssistantEnabled), + [currentConversation, isAssistantEnabled] ); // Settings modal state (so it isn't shared between assistant instances like Timeline) @@ -325,7 +306,6 @@ const AssistantComponent: React.FC = ({ setLastConversationId, ]); - const [promptTextPreview, setPromptTextPreview] = useState(''); const [autoPopulatedOnce, setAutoPopulatedOnce] = useState(false); const [userPrompt, setUserPrompt] = useState(null); @@ -398,16 +378,10 @@ const AssistantComponent: React.FC = ({ // when scrollHeight changes, parent is scrolled to bottom parent.scrollTop = parent.scrollHeight; - if (isFlyoutMode) { - ( - commentsContainerRef.current?.childNodes[0].childNodes[0] as HTMLElement - ).lastElementChild?.scrollIntoView(); - } + ( + commentsContainerRef.current?.childNodes[0].childNodes[0] as HTMLElement + ).lastElementChild?.scrollIntoView(); }); - - const getWrapper = (children: React.ReactNode, isCommentContainer: boolean) => - isCommentContainer ? {children} : <>{children}; - // End Scrolling const selectedSystemPrompt = useMemo( @@ -446,17 +420,6 @@ const AssistantComponent: React.FC = ({ [allSystemPrompts, refetchCurrentConversation, refetchResults] ); - const { comments: connectorComments, prompt: connectorPrompt } = useConnectorSetup({ - isFlyoutMode, - conversation: blockBotConversation, - onConversationUpdate: handleOnConversationSelected, - onSetupComplete: () => { - if (currentConversation) { - setCurrentConversation(clearPresentationData(currentConversation)); - } - }, - }); - const handleOnConversationDeleted = useCallback( async (cTitle: string) => { await deleteConversation(conversations[cTitle].id); @@ -538,14 +501,6 @@ const AssistantComponent: React.FC = ({ isFetchedAnonymizationFields, ]); - useEffect(() => {}, [ - areConnectorsFetched, - connectors, - conversationsLoaded, - currentConversation, - isLoading, - ]); - const createCodeBlockPortals = useCallback( () => messageCodeBlocks?.map((codeBlocks: CodeBlockDetails[], i: number) => { @@ -576,7 +531,6 @@ const AssistantComponent: React.FC = ({ } = useChatSend({ allSystemPrompts, currentConversation, - setPromptTextPreview, setUserPrompt, editingSystemPromptId, http, @@ -601,7 +555,7 @@ const AssistantComponent: React.FC = ({ [currentConversation, handleSendMessage, refetchResults] ); - const chatbotComments = useMemo( + const comments = useMemo( () => ( <> = ({ isFetchingResponse: isLoadingChatSend, setIsStreaming, currentUserAvatar, - isFlyoutMode, })} - {...(!isFlyoutMode - ? { - css: css` - margin-right: ${euiThemeVars.euiSizeL}; + // Avoid comments going off the flyout + css={css` + padding-bottom: ${euiThemeVars.euiSizeL}; - > li > div:nth-child(2) { - overflow: hidden; - } - `, - } - : { - // Avoid comments going off the flyout - css: css` - padding-bottom: ${euiThemeVars.euiSizeL}; - - > li > div:nth-child(2) { - overflow: hidden; - } - `, - })} + > li > div:nth-child(2) { + overflow: hidden; + } + `} /> {currentConversation?.messages.length !== 0 && selectedPromptContextsCount > 0 && ( )} - - {!isFlyoutMode && - (currentConversation?.messages.length === 0 || selectedPromptContextsCount > 0) && ( - - - - )} ), [ @@ -675,34 +596,10 @@ const AssistantComponent: React.FC = ({ isEnabledRAGAlerts, isLoadingChatSend, currentUserAvatar, - isFlyoutMode, selectedPromptContextsCount, - editingSystemPromptId, - isNewConversation, - isSettingsModalVisible, - promptContexts, - promptTextPreview, - handleOnSystemPromptSelectionChange, - selectedPromptContexts, - allSystemPrompts, ] ); - const comments = useMemo(() => { - if (isDisabled && !isFlyoutMode) { - return ( - - ); - } - - return chatbotComments; - }, [isDisabled, isFlyoutMode, chatbotComments, connectorComments]); - const trackPrompt = useCallback( (promptTitle: string) => { if (currentConversation?.title) { @@ -800,19 +697,14 @@ const AssistantComponent: React.FC = ({ textAlign="center" color={euiThemeVars.euiColorMediumShade} size="xs" - css={ - isFlyoutMode - ? css` - margin: 0 ${euiThemeVars.euiSizeL} ${euiThemeVars.euiSizeM} - ${euiThemeVars.euiSizeL}; - ` - : {} - } + css={css` + margin: 0 ${euiThemeVars.euiSizeL} ${euiThemeVars.euiSizeM} ${euiThemeVars.euiSizeL}; + `} > {i18n.DISCLAIMER} ), - [isFlyoutMode, isNewConversation] + [isNewConversation] ); const flyoutBodyContent = useMemo(() => { @@ -842,7 +734,10 @@ const AssistantComponent: React.FC = ({ - {connectorPrompt} + @@ -879,7 +774,6 @@ const AssistantComponent: React.FC = ({ onSystemPromptSelectionChange={handleOnSystemPromptSelectionChange} isSettingsModalVisible={isSettingsModalVisible} setIsSettingsModalVisible={setIsSettingsModalVisible} - isFlyoutMode allSystemPrompts={allSystemPrompts} /> @@ -905,328 +799,212 @@ const AssistantComponent: React.FC = ({ ); }, [ allSystemPrompts, + blockBotConversation, comments, - connectorPrompt, currentConversation, editingSystemPromptId, + handleOnConversationSelected, handleOnSystemPromptSelectionChange, isSettingsModalVisible, isWelcomeSetup, ]); - if (isFlyoutMode) { - return ( - - {chatHistoryVisible && ( - - - - )} + return ( + + {chatHistoryVisible && ( - - + + )} + + + + - + + + {/* Create portals for each EuiCodeBlock to add the `Investigate in Timeline` action */} + {createCodeBlockPortals()} + + - - + min-height: 100px; + flex: 1; - {/* Create portals for each EuiCodeBlock to add the `Investigate in Timeline` action */} - {createCodeBlockPortals()} - - div { + display: flex; + flex-direction: column; + align-items: stretch; + + > .euiFlyoutBody__banner { + overflow-x: unset; + } - > div { + > .euiFlyoutBody__overflowContent { display: flex; - flex-direction: column; - align-items: stretch; - - > .euiFlyoutBody__banner { - overflow-x: unset; - } - - > .euiFlyoutBody__overflowContent { - display: flex; - flex: 1; - overflow: auto; - } + flex: 1; + overflow: auto; } - `} - banner={ - !isDisabled && - showMissingConnectorCallout && - areConnectorsFetched && ( - 0} - isSettingsModalVisible={isSettingsModalVisible} - setIsSettingsModalVisible={setIsSettingsModalVisible} - isFlyoutMode={isFlyoutMode} - /> - ) } - > - {!isAssistantEnabled ? ( - 0} + isSettingsModalVisible={isSettingsModalVisible} + setIsSettingsModalVisible={setIsSettingsModalVisible} /> - ) : ( - - {flyoutBodyContent} - {disclaimer} - - )} - - + {!isAssistantEnabled ? ( + + } + http={http} + isAssistantEnabled={isAssistantEnabled} + isWelcomeSetup={isWelcomeSetup} + /> + ) : ( + + {flyoutBodyContent} + {disclaimer} + + )} + + + - - {!isDisabled && - Object.keys(promptContexts).length !== selectedPromptContextsCount && ( - - - <> - - {Object.keys(promptContexts).length > 0 && } - - - - )} - - - {Object.keys(selectedPromptContexts).length ? ( - - + {!isDisabled && + Object.keys(promptContexts).length !== selectedPromptContextsCount && ( + + + <> + + {Object.keys(promptContexts).length > 0 && } + - ) : null} + + )} + + {Object.keys(selectedPromptContexts).length ? ( - - - - - {!isDisabled && ( - - + - - )} - - - - - - - ); - } - - return getWrapper( - <> - - {showTitle && ( - - )} + + + - {/* Create portals for each EuiCodeBlock to add the `Investigate in Timeline` action */} - {createCodeBlockPortals()} - - {!isDisabled && !isLoadingAnonymizationFields && !isErrorAnonymizationFields && ( - <> - - {Object.keys(promptContexts).length > 0 && } - - )} - - - - - {' '} - {getWrapper( - <> - {comments} - - {!isDisabled && showMissingConnectorCallout && areConnectorsFetched && ( - <> - - - - 0} - isSettingsModalVisible={isSettingsModalVisible} - setIsSettingsModalVisible={setIsSettingsModalVisible} - isFlyoutMode={isFlyoutMode} - /> - - - + {!isDisabled && ( + + + )} - , - !embeddedLayout - )} - - {disclaimer} - - - - - - {!isDisabled && ( - - )} - - , - embeddedLayout + + + + + + ); }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.test.tsx index 6d421b649a3808..e2f55ee89202e7 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.test.tsx @@ -39,7 +39,6 @@ const defaultProps: Props = { selectedPromptContexts: {}, setIsSettingsModalVisible: jest.fn(), setSelectedPromptContexts: jest.fn(), - isFlyoutMode: false, allSystemPrompts: [], }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.tsx index 1528435764acdd..adf9b7d4aa6582 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.tsx @@ -31,7 +31,6 @@ export interface Props { setSelectedPromptContexts: React.Dispatch< React.SetStateAction> >; - isFlyoutMode: boolean; allSystemPrompts: PromptResponse[]; } @@ -50,7 +49,6 @@ const PromptEditorComponent: React.FC = ({ selectedPromptContexts, setIsSettingsModalVisible, setSelectedPromptContexts, - isFlyoutMode, allSystemPrompts, }) => { const commentBody = useMemo( @@ -64,17 +62,14 @@ const PromptEditorComponent: React.FC = ({ onSystemPromptSelectionChange={onSystemPromptSelectionChange} isSettingsModalVisible={isSettingsModalVisible} setIsSettingsModalVisible={setIsSettingsModalVisible} - isFlyoutMode={isFlyoutMode} /> )} @@ -90,7 +85,6 @@ const PromptEditorComponent: React.FC = ({ onSystemPromptSelectionChange, isSettingsModalVisible, setIsSettingsModalVisible, - isFlyoutMode, promptContexts, selectedPromptContexts, setSelectedPromptContexts, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/selected_prompt_contexts/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/selected_prompt_contexts/index.test.tsx index 899ee5ed7488cf..873c41731bd204 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/selected_prompt_contexts/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/selected_prompt_contexts/index.test.tsx @@ -15,7 +15,6 @@ import type { SelectedPromptContext } from '../../prompt_context/types'; import { Props, SelectedPromptContexts } from '.'; const defaultProps: Props = { - isNewConversation: false, promptContexts: { [mockAlertPromptContext.id]: mockAlertPromptContext, [mockEventPromptContext.id]: mockEventPromptContext, @@ -23,7 +22,6 @@ const defaultProps: Props = { selectedPromptContexts: {}, setSelectedPromptContexts: jest.fn(), currentReplacements: {}, - isFlyoutMode: false, }; const mockSelectedAlertPromptContext: SelectedPromptContext = { @@ -53,61 +51,6 @@ describe('SelectedPromptContexts', () => { }); }); - it('it does NOT render a spacer when isNewConversation is false and selectedPromptContextIds.length is 1', async () => { - render( - - - - ); - - await waitFor(() => { - expect(screen.queryByTestId('spacer')).not.toBeInTheDocument(); - }); - }); - - it('it renders a spacer when isNewConversation is true and selectedPromptContextIds.length is 1', async () => { - render( - - - - ); - - await waitFor(() => { - expect(screen.getByTestId('spacer')).toBeInTheDocument(); - }); - }); - - it('it renders a spacer for each selected prompt context when isNewConversation is false and selectedPromptContextIds.length is 2', async () => { - render( - - - - ); - - await waitFor(() => { - expect(screen.getAllByTestId('spacer')).toHaveLength(2); - }); - }); - it('renders the selected prompt contexts', async () => { const selectedPromptContexts = { [mockAlertPromptContext.id]: mockSelectedAlertPromptContext, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/selected_prompt_contexts/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/selected_prompt_contexts/index.tsx index d3555b2e2ac862..3a0e6f3ce87d21 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/selected_prompt_contexts/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/selected_prompt_contexts/index.tsx @@ -5,19 +5,10 @@ * 2.0. */ -import { - EuiAccordion, - EuiButtonIcon, - EuiFlexGroup, - EuiFlexItem, - EuiSpacer, - EuiToolTip, -} from '@elastic/eui'; +import { EuiAccordion, EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; import { isEmpty, omit } from 'lodash/fp'; import React, { useCallback } from 'react'; -// eslint-disable-next-line @kbn/eslint/module_migration -import styled from 'styled-components'; - +import styled from '@emotion/styled'; import { css } from '@emotion/react'; import { euiThemeVars } from '@kbn/ui-theme'; import { Conversation } from '../../../assistant_context/types'; @@ -26,14 +17,12 @@ import type { PromptContext, SelectedPromptContext } from '../../prompt_context/ import * as i18n from './translations'; export interface Props { - isNewConversation: boolean; promptContexts: Record; selectedPromptContexts: Record; setSelectedPromptContexts: React.Dispatch< React.SetStateAction> >; currentReplacements: Conversation['replacements'] | undefined; - isFlyoutMode: boolean; } export const EditorContainer = styled.div<{ @@ -45,20 +34,11 @@ export const EditorContainer = styled.div<{ `; const SelectedPromptContextsComponent: React.FC = ({ - isNewConversation, promptContexts, selectedPromptContexts, setSelectedPromptContexts, currentReplacements, - isFlyoutMode, }) => { - const [accordionState, setAccordionState] = React.useState<'closed' | 'open'>('closed'); - - const onToggle = useCallback( - () => setAccordionState((prev) => (prev === 'open' ? 'closed' : 'open')), - [] - ); - const unselectPromptContext = useCallback( (unselectedId: string) => { setSelectedPromptContexts((prev) => omit(unselectedId, prev)); @@ -71,22 +51,13 @@ const SelectedPromptContextsComponent: React.FC = ({ } return ( - + {Object.keys(selectedPromptContexts) .sort() .map((id) => ( - {!isFlyoutMode && - (isNewConversation || Object.keys(selectedPromptContexts).length > 1) ? ( - - ) : null} = ({ } id={id} - {...(!isFlyoutMode && { onToggle })} paddingSize="s" - {...(isFlyoutMode - ? { - css: css` - background: ${euiThemeVars.euiPageBackgroundColor}; - border-radius: ${euiThemeVars.euiBorderRadius}; + css={css` + background: ${euiThemeVars.euiPageBackgroundColor}; + border-radius: ${euiThemeVars.euiBorderRadius}; - > div:first-child { - color: ${euiThemeVars.euiColorPrimary}; - padding: ${euiThemeVars.euiFormControlPadding}; - } - `, - borders: 'all', - arrowProps: { - color: 'primary', - }, - } - : {})} + > div:first-child { + color: ${euiThemeVars.euiColorPrimary}; + padding: ${euiThemeVars.euiFormControlPadding}; + } + `} + borders={'all'} + arrowProps={{ + color: 'primary', + }} > - {isFlyoutMode ? ( - - ) : ( - - - - )} + ))} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.test.tsx index 82b04c60a569c2..f13441a3102f92 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.test.tsx @@ -16,21 +16,21 @@ import { getOptions, getOptionFromPrompt } from './helpers'; describe('helpers', () => { describe('getOptionFromPrompt', () => { it('returns an EuiSuperSelectOption with the correct value', () => { - const option = getOptionFromPrompt({ ...mockSystemPrompt, isFlyoutMode: true }); + const option = getOptionFromPrompt({ ...mockSystemPrompt }); expect(option.value).toBe(mockSystemPrompt.id); }); it('returns an EuiSuperSelectOption with the correct inputDisplay', () => { - const option = getOptionFromPrompt({ ...mockSystemPrompt, isFlyoutMode: false }); + const option = getOptionFromPrompt({ ...mockSystemPrompt }); render(<>{option.inputDisplay}); - expect(screen.getByTestId('systemPromptText')).toHaveTextContent(mockSystemPrompt.content); + expect(screen.getByTestId('systemPromptText')).toHaveTextContent(mockSystemPrompt.name); }); it('shows the expected name in the dropdownDisplay', () => { - const option = getOptionFromPrompt({ ...mockSystemPrompt, isFlyoutMode: true }); + const option = getOptionFromPrompt({ ...mockSystemPrompt }); render({option.dropdownDisplay}); @@ -38,7 +38,7 @@ describe('helpers', () => { }); it('shows the expected prompt content in the dropdownDisplay', () => { - const option = getOptionFromPrompt({ ...mockSystemPrompt, isFlyoutMode: true }); + const option = getOptionFromPrompt({ ...mockSystemPrompt }); render({option.dropdownDisplay}); @@ -51,7 +51,7 @@ describe('helpers', () => { const prompts = [mockSystemPrompt, mockSuperheroSystemPrompt]; const promptIds = prompts.map(({ id }) => id); - const options = getOptions({ prompts, isFlyoutMode: false }); + const options = getOptions({ prompts }); const optionValues = options.map(({ value }) => value); expect(optionValues).toEqual(promptIds); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.tsx index bd217bb54e9f69..92814927f980a9 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.tsx @@ -8,46 +8,23 @@ import { EuiText, EuiToolTip } from '@elastic/eui'; import type { EuiSuperSelectOption } from '@elastic/eui'; import React from 'react'; -// eslint-disable-next-line @kbn/eslint/module_migration -import styled from 'styled-components'; - -import { css } from '@emotion/react'; +import styled from '@emotion/styled'; import { isEmpty } from 'lodash/fp'; +import { euiThemeVars } from '@kbn/ui-theme'; import { PromptResponse } from '@kbn/elastic-assistant-common'; import { EMPTY_PROMPT } from './translations'; const Strong = styled.strong` - margin-right: ${({ theme }) => theme.eui.euiSizeS}; + margin-right: ${euiThemeVars.euiSizeS}; `; export const getOptionFromPrompt = ({ content, id, name, - showTitles = false, - isFlyoutMode, -}: PromptResponse & { - showTitles?: boolean; - isFlyoutMode: boolean; -}): EuiSuperSelectOption => ({ +}: PromptResponse): EuiSuperSelectOption => ({ value: id, - inputDisplay: isFlyoutMode ? ( - name - ) : ( - - {showTitles ? name : content} - - ), + inputDisplay: {name}, dropdownDisplay: ( <> {name} @@ -64,12 +41,6 @@ export const getOptionFromPrompt = ({ interface GetOptionsProps { prompts: PromptResponse[] | undefined; - showTitles?: boolean; - isFlyoutMode: boolean; } -export const getOptions = ({ - prompts, - showTitles = false, - isFlyoutMode, -}: GetOptionsProps): Array> => - prompts?.map((p) => getOptionFromPrompt({ ...p, showTitles, isFlyoutMode })) ?? []; +export const getOptions = ({ prompts }: GetOptionsProps): Array> => + prompts?.map(getOptionFromPrompt) ?? []; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.test.tsx index 34d40852ba505f..3b82b1fd0fbe5e 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.test.tsx @@ -90,7 +90,6 @@ describe('SystemPrompt', () => { isSettingsModalVisible={isSettingsModalVisible} onSystemPromptSelectionChange={onSystemPromptSelectionChange} setIsSettingsModalVisible={setIsSettingsModalVisible} - isFlyoutMode={false} allSystemPrompts={mockSystemPrompts} /> ); @@ -100,10 +99,6 @@ describe('SystemPrompt', () => { expect(screen.getByTestId('selectSystemPrompt')).toBeInTheDocument(); }); - it('does NOT render the system prompt text', () => { - expect(screen.queryByTestId('systemPromptText')).not.toBeInTheDocument(); - }); - it('does NOT render the edit button', () => { expect(screen.queryByTestId('edit')).not.toBeInTheDocument(); }); @@ -122,26 +117,21 @@ describe('SystemPrompt', () => { isSettingsModalVisible={isSettingsModalVisible} onSystemPromptSelectionChange={onSystemPromptSelectionChange} setIsSettingsModalVisible={setIsSettingsModalVisible} - isFlyoutMode={false} allSystemPrompts={mockSystemPrompts} /> ); }); - it('does NOT render the system prompt select', () => { - expect(screen.queryByTestId('selectSystemPrompt')).not.toBeInTheDocument(); + it('does render the system prompt select', () => { + expect(screen.queryByTestId('selectSystemPrompt')).toBeInTheDocument(); }); it('renders the system prompt text', () => { - expect(screen.getByTestId('systemPromptText')).toHaveTextContent(mockSystemPrompt.content); - }); - - it('renders the edit button', () => { - expect(screen.getByTestId('edit')).toBeInTheDocument(); + expect(screen.getByTestId('systemPromptText')).toHaveTextContent(mockSystemPrompt.name); }); it('renders the clear button', () => { - expect(screen.getByTestId('clear')).toBeInTheDocument(); + expect(screen.getByTestId('clearSystemPrompt')).toBeInTheDocument(); }); }); @@ -158,7 +148,6 @@ describe('SystemPrompt', () => { isSettingsModalVisible={isSettingsModalVisible} onSystemPromptSelectionChange={onSystemPromptSelectionChange} setIsSettingsModalVisible={setIsSettingsModalVisible} - isFlyoutMode={false} allSystemPrompts={mockSystemPrompts} /> @@ -206,7 +195,6 @@ describe('SystemPrompt', () => { isSettingsModalVisible={isSettingsModalVisible} onSystemPromptSelectionChange={onSystemPromptSelectionChange} setIsSettingsModalVisible={setIsSettingsModalVisible} - isFlyoutMode={false} allSystemPrompts={mockSystemPrompts} /> @@ -268,7 +256,6 @@ describe('SystemPrompt', () => { isSettingsModalVisible={isSettingsModalVisible} onSystemPromptSelectionChange={onSystemPromptSelectionChange} setIsSettingsModalVisible={setIsSettingsModalVisible} - isFlyoutMode={false} allSystemPrompts={mockSystemPrompts} /> @@ -337,7 +324,6 @@ describe('SystemPrompt', () => { isSettingsModalVisible={isSettingsModalVisible} onSystemPromptSelectionChange={onSystemPromptSelectionChange} setIsSettingsModalVisible={setIsSettingsModalVisible} - isFlyoutMode={false} allSystemPrompts={mockSystemPrompts} /> @@ -421,7 +407,6 @@ describe('SystemPrompt', () => { isSettingsModalVisible={isSettingsModalVisible} onSystemPromptSelectionChange={onSystemPromptSelectionChange} setIsSettingsModalVisible={setIsSettingsModalVisible} - isFlyoutMode={false} allSystemPrompts={mockSystemPrompts} /> @@ -483,26 +468,6 @@ describe('SystemPrompt', () => { }); }); - it('shows the system prompt select when the edit button is clicked', () => { - render( - - - - ); - - userEvent.click(screen.getByTestId('edit')); - - expect(screen.getByTestId('selectSystemPrompt')).toBeInTheDocument(); - }); - it('shows the system prompt select when system prompt text is clicked', () => { render( @@ -512,7 +477,6 @@ describe('SystemPrompt', () => { isSettingsModalVisible={isSettingsModalVisible} onSystemPromptSelectionChange={onSystemPromptSelectionChange} setIsSettingsModalVisible={setIsSettingsModalVisible} - isFlyoutMode={false} allSystemPrompts={mockSystemPrompts} /> diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.tsx index f2808c3e204f1b..01fe334eb1f7d2 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.tsx @@ -5,14 +5,9 @@ * 2.0. */ -import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiText, EuiToolTip } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; - -import { css } from '@emotion/react'; -import { isEmpty } from 'lodash/fp'; import { PromptResponse } from '@kbn/elastic-assistant-common'; import { Conversation } from '../../../..'; -import * as i18n from './translations'; import { SelectSystemPrompt } from './select_system_prompt'; interface Props { @@ -21,7 +16,6 @@ interface Props { isSettingsModalVisible: boolean; onSystemPromptSelectionChange: (systemPromptId: string | undefined) => void; setIsSettingsModalVisible: React.Dispatch>; - isFlyoutMode: boolean; allSystemPrompts: PromptResponse[]; } @@ -31,7 +25,6 @@ const SystemPromptComponent: React.FC = ({ isSettingsModalVisible, onSystemPromptSelectionChange, setIsSettingsModalVisible, - isFlyoutMode, allSystemPrompts, }) => { const selectedPrompt = useMemo(() => { @@ -42,99 +35,24 @@ const SystemPromptComponent: React.FC = ({ } }, [allSystemPrompts, conversation?.apiConfig?.defaultSystemPromptId, editingSystemPromptId]); - const [isEditing, setIsEditing] = React.useState(false); - const handleClearSystemPrompt = useCallback(() => { if (conversation) { onSystemPromptSelectionChange(undefined); } }, [conversation, onSystemPromptSelectionChange]); - const handleEditSystemPrompt = useCallback(() => setIsEditing(true), []); - - if (isFlyoutMode) { - return ( - - ); - } - return ( -
- {selectedPrompt == null || isEditing ? ( - - ) : ( - - - - {isEmpty(selectedPrompt?.content) ? i18n.EMPTY_PROMPT : selectedPrompt?.content} - - - - - - - - - - - - - - - - - - - )} -
+ ); }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.test.tsx index 3796e5b4a81ebc..7c8f575cd49d79 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.test.tsx @@ -48,9 +48,9 @@ const props: Props = { ], conversation: undefined, isSettingsModalVisible: false, + isClearable: true, selectedPrompt: { id: 'default-system-prompt', content: '', name: '', promptType: 'system' }, setIsSettingsModalVisible: jest.fn(), - isFlyoutMode: false, }; const mockUseAssistantContext = { @@ -91,93 +91,27 @@ jest.mock('../../../../assistant_context', () => { describe('SelectSystemPrompt', () => { beforeEach(() => jest.clearAllMocks()); - it('renders the prompt super select when isEditing is true', () => { - const { getByTestId } = render(); + it('renders the prompt super select', () => { + const { getByTestId } = render(); expect(getByTestId(TEST_IDS.PROMPT_SUPERSELECT)).toBeInTheDocument(); }); - it('does NOT render the prompt super select when isEditing is false', () => { - const { queryByTestId } = render(); - - expect(queryByTestId(TEST_IDS.PROMPT_SUPERSELECT)).not.toBeInTheDocument(); - }); - - it('does NOT render the clear system prompt button when isEditing is true', () => { - const { queryByTestId } = render(); - - expect(queryByTestId('clearSystemPrompt')).not.toBeInTheDocument(); - }); - - it('renders the clear system prompt button when isEditing is true AND isClearable is true', () => { - const { getByTestId } = render( - - ); + it('renders the clear system prompt button', () => { + const { getByTestId } = render(); expect(getByTestId('clearSystemPrompt')).toBeInTheDocument(); }); - it('does NOT render the clear system prompt button when isEditing is false', () => { - const { queryByTestId } = render(); - - expect(queryByTestId('clearSystemPrompt')).not.toBeInTheDocument(); - }); - - it('renders the add system prompt button when isEditing is false', () => { - const { getByTestId } = render(); - - expect(getByTestId('addSystemPrompt')).toBeInTheDocument(); - }); - - it('does NOT render the add system prompt button when isEditing is true', () => { - const { queryByTestId } = render(); - - expect(queryByTestId('addSystemPrompt')).not.toBeInTheDocument(); - }); - it('clears the selected system prompt when the clear button is clicked', () => { const clearSelectedSystemPrompt = jest.fn(); const { getByTestId } = render( - + ); userEvent.click(getByTestId('clearSystemPrompt')); expect(clearSelectedSystemPrompt).toHaveBeenCalledTimes(1); }); - - it('hides the select when the clear button is clicked', () => { - const setIsEditing = jest.fn(); - - const { getByTestId } = render( - - ); - - userEvent.click(getByTestId('clearSystemPrompt')); - - expect(setIsEditing).toHaveBeenCalledWith(false); - }); - - it('shows the select when the add button is clicked', () => { - const setIsEditing = jest.fn(); - - const { getByTestId } = render( - - ); - - userEvent.click(getByTestId('addSystemPrompt')); - - expect(setIsEditing).toHaveBeenCalledWith(true); - }); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.tsx index 0296fa3e636ca8..0f10cf6d3063fd 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.tsx @@ -38,15 +38,11 @@ export interface Props { selectedPrompt: PromptResponse | undefined; clearSelectedSystemPrompt?: () => void; isClearable?: boolean; - isEditing?: boolean; isDisabled?: boolean; isOpen?: boolean; isSettingsModalVisible: boolean; - setIsEditing?: React.Dispatch>; setIsSettingsModalVisible: React.Dispatch>; - showTitles?: boolean; onSystemPromptSelectionChange?: (promptId: string | undefined) => void; - isFlyoutMode: boolean; } const ADD_NEW_SYSTEM_PROMPT = 'ADD_NEW_SYSTEM_PROMPT'; @@ -58,15 +54,11 @@ const SelectSystemPromptComponent: React.FC = ({ selectedPrompt, clearSelectedSystemPrompt, isClearable = false, - isEditing = false, isDisabled = false, isOpen = false, isSettingsModalVisible, onSystemPromptSelectionChange, - setIsEditing, setIsSettingsModalVisible, - showTitles = false, - isFlyoutMode = false, }) => { const { setSelectedSettingsTab } = useAssistantContext(); const { setApiConfig } = useConversation(); @@ -117,10 +109,7 @@ const SelectSystemPromptComponent: React.FC = ({ }, []); // SuperSelect State/Actions - const options = useMemo( - () => getOptions({ prompts: allSystemPrompts, showTitles, isFlyoutMode }), - [allSystemPrompts, showTitles, isFlyoutMode] - ); + const options = useMemo(() => getOptions({ prompts: allSystemPrompts }), [allSystemPrompts]); const onChange = useCallback( (selectedSystemPromptId) => { @@ -134,11 +123,9 @@ const SelectSystemPromptComponent: React.FC = ({ onSystemPromptSelectionChange(selectedSystemPromptId); } setSelectedSystemPrompt(selectedSystemPromptId); - setIsEditing?.(false); }, [ onSystemPromptSelectionChange, - setIsEditing, setIsSettingsModalVisible, setSelectedSettingsTab, setSelectedSystemPrompt, @@ -147,14 +134,8 @@ const SelectSystemPromptComponent: React.FC = ({ const clearSystemPrompt = useCallback(() => { setSelectedSystemPrompt(undefined); - setIsEditing?.(false); clearSelectedSystemPrompt?.(); - }, [clearSelectedSystemPrompt, setIsEditing, setSelectedSystemPrompt]); - - const onShowSelectSystemPrompt = useCallback(() => { - setIsEditing?.(true); - setIsOpenLocal(true); - }, [setIsEditing]); + }, [clearSelectedSystemPrompt, setSelectedSystemPrompt]); return ( = ({ max-width: 100%; `} > - {isEditing && ( - + - - - )} + /> + - {isEditing && isClearable && selectedPrompt && ( + {isClearable && selectedPrompt && ( svg { - width: 8px; - height: 8px; - stroke-width: 2px; - fill: #fff; - stroke: #fff; - } - ` - : undefined - } - /> - - )} - {!isEditing && ( - - svg { + width: 8px; + height: 8px; + stroke-width: 2px; + fill: #fff; + stroke: #fff; + } + `} /> )} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_selector/system_prompt_selector.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_selector/system_prompt_selector.tsx index 2c4826940a7caa..ae5fce935cfe31 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_selector/system_prompt_selector.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_selector/system_prompt_selector.tsx @@ -147,9 +147,8 @@ export const SystemPromptSelector: React.FC = React.memo( const renderOption: ( option: SystemPromptSelectorOption, - searchValue: string, - OPTION_CONTENT_CLASSNAME: string - ) => React.ReactNode = (option, searchValue, contentClassName) => { + searchValue: string + ) => React.ReactNode = (option, searchValue) => { const { label, value } = option; return ( isDisabled?: boolean; onPromptSubmit: (value: string) => void; value: string; - isFlyoutMode: boolean; } export const PromptTextArea = forwardRef( - ({ isDisabled = false, value, onPromptSubmit, handlePromptChange, isFlyoutMode }, ref) => { + ({ isDisabled = false, value, onPromptSubmit, handlePromptChange }, ref) => { const onChangeCallback = useCallback( (event: React.ChangeEvent) => { handlePromptChange(event.target.value); @@ -46,8 +45,8 @@ export const PromptTextArea = forwardRef( ( value={value} onChange={onChangeCallback} onKeyDown={onKeyDown} - rows={isFlyoutMode ? 1 : 6} + rows={1} /> ); } diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_selector/quick_prompt_selector.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_selector/quick_prompt_selector.tsx index d29887e8c4f6a2..759c6e49e446e7 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_selector/quick_prompt_selector.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_selector/quick_prompt_selector.tsx @@ -140,9 +140,8 @@ export const QuickPromptSelector: React.FC = React.memo( const renderOption: ( option: QuickPromptSelectorOption, - searchValue: string, - OPTION_CONTENT_CLASSNAME: string - ) => React.ReactNode = (option, searchValue, contentClassName) => { + searchValue: string + ) => React.ReactNode = (option, searchValue) => { const { color, label, value } = option; return ( ({ + ...jest.requireActual('react-use'), + useMeasure: () => [ + () => {}, + { + width: 500, + }, + ], +})); + jest.mock('../../assistant_context', () => ({ ...jest.requireActual('../../assistant_context'), useAssistantContext: () => mockUseAssistantContext, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompts.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompts.tsx index c578a58be728d1..e910d238ccc5d7 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompts.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompts.tsx @@ -27,12 +27,10 @@ import { QUICK_PROMPTS_TAB } from '../settings/const'; export const KNOWLEDGE_BASE_CATEGORY = 'knowledge-base'; -const COUNT_BEFORE_OVERFLOW = 5; interface QuickPromptsProps { setInput: (input: string) => void; setIsSettingsModalVisible: React.Dispatch>; trackPrompt: (prompt: string) => void; - isFlyoutMode: boolean; allPrompts: PromptResponse[]; } @@ -42,7 +40,7 @@ interface QuickPromptsProps { * and localstorage for storing new and edited prompts. */ export const QuickPrompts: React.FC = React.memo( - ({ setInput, setIsSettingsModalVisible, trackPrompt, isFlyoutMode, allPrompts }) => { + ({ setInput, setIsSettingsModalVisible, trackPrompt, allPrompts }) => { const [quickPromptsContainerRef, { width }] = useMeasure(); const { knowledgeBase, promptContexts, setSelectedSettingsTab } = useAssistantContext(); @@ -103,25 +101,15 @@ export const QuickPrompts: React.FC = React.memo( }, [setIsSettingsModalVisible, setSelectedSettingsTab]); const quickPrompts = useMemo(() => { - const visibleCount = isFlyoutMode ? Math.floor(width / 120) : COUNT_BEFORE_OVERFLOW; + const visibleCount = Math.floor(width / 120); const visibleItems = contextFilteredQuickPrompts.slice(0, visibleCount); const overflowItems = contextFilteredQuickPrompts.slice(visibleCount); return { visible: visibleItems, overflow: overflowItems }; - }, [contextFilteredQuickPrompts, isFlyoutMode, width]); + }, [contextFilteredQuickPrompts, width]); return ( - + = React.memo( - ) : ( - - ) + } isOpen={isOverflowPopoverOpen} closePopover={closeOverflowPopover} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.test.tsx index 8f4a8680f9c572..9fb8db972e4821 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.test.tsx @@ -55,7 +55,6 @@ const testProps = { selectedConversationId: welcomeConvo.title, onClose, onSave, - isFlyoutMode: false, onConversationSelected, conversations: {}, anonymizationFields: { total: 0, page: 1, perPage: 1000, data: [] }, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.tsx index d5bbefe3042083..4b46d2b75d0a96 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.tsx @@ -59,7 +59,6 @@ interface Props { onClose: ( event?: React.KeyboardEvent | React.MouseEvent ) => void; - isFlyoutMode: boolean; onSave: (success: boolean) => Promise; selectedConversationId?: string; onConversationSelected: ({ cId, cTitle }: { cId: string; cTitle: string }) => void; @@ -80,7 +79,6 @@ export const AssistantSettings: React.FC = React.memo( onConversationSelected, conversations, conversationsLoaded, - isFlyoutMode, }) => { const { actionTypeRegistry, @@ -338,7 +336,6 @@ export const AssistantSettings: React.FC = React.memo( setAssistantStreamingEnabled={setUpdatedAssistantStreamingEnabled} onSelectedConversationChange={onHandleSelectedConversationChange} http={http} - isFlyoutMode={isFlyoutMode} /> ))} {selectedSettingsTab === QUICK_PROMPTS_TAB && ( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.test.tsx index 3aab8d1169bfcd..0ef76adad9940c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.test.tsx @@ -22,7 +22,6 @@ const testProps = { isSettingsModalVisible: false, selectedConversation: welcomeConvo, setIsSettingsModalVisible, - isFlyoutMode: false, onConversationSelected, conversations: {}, conversationsLoaded: true, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.tsx index 30f141f219476f..0df20b0cd4db24 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.tsx @@ -23,7 +23,6 @@ interface Props { setIsSettingsModalVisible: React.Dispatch>; onConversationSelected: ({ cId, cTitle }: { cId: string; cTitle: string }) => void; isDisabled?: boolean; - isFlyoutMode: boolean; conversations: Record; conversationsLoaded: boolean; refetchConversationsState: () => Promise; @@ -42,7 +41,6 @@ export const AssistantSettingsButton: React.FC = React.memo( isSettingsModalVisible, setIsSettingsModalVisible, selectedConversationId, - isFlyoutMode, onConversationSelected, conversations, conversationsLoaded, @@ -92,7 +90,7 @@ export const AssistantSettingsButton: React.FC = React.memo( isDisabled={isDisabled} iconType="gear" size="xs" - {...(isFlyoutMode ? { color: 'text' } : {})} + color="text" /> @@ -103,7 +101,6 @@ export const AssistantSettingsButton: React.FC = React.memo( onConversationSelected={onConversationSelected} onClose={handleCloseModal} onSave={handleSave} - isFlyoutMode={isFlyoutMode} conversations={conversations} conversationsLoaded={conversationsLoaded} /> diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.test.tsx index 15fb05ca1c8075..7d70ee5ede7304 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.test.tsx @@ -62,7 +62,6 @@ const testProps = { selectedConversation: welcomeConvo, onClose, onSave, - isFlyoutMode: false, onConversationSelected, conversations: {}, anonymizationFields: { total: 0, page: 1, perPage: 1000, data: [] }, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.tsx index 3f9be4972fe7e0..be6370d36e841b 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.tsx @@ -49,7 +49,6 @@ interface Props { conversations: Record; conversationsLoaded: boolean; selectedConversation: Conversation; - isFlyoutMode: boolean; refetchConversations: () => void; } @@ -61,7 +60,6 @@ export const AssistantSettingsManagement: React.FC = React.memo( ({ conversations, conversationsLoaded, - isFlyoutMode, refetchConversations, selectedConversation: defaultSelectedConversation, }) => { @@ -304,7 +302,6 @@ export const AssistantSettingsManagement: React.FC = React.memo( conversationsSettingsBulkActions={conversationsSettingsBulkActions} defaultConnector={defaultConnector} handleSave={handleSave} - isFlyoutMode={isFlyoutMode} onCancelClick={onCancelClick} onSelectedConversationChange={onHandleSelectedConversationChange} selectedConversation={selectedConversation} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/evaluation_settings.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/evaluation_settings.tsx index fe4d75be04004b..71bbab7636a4aa 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/evaluation_settings.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/evaluation_settings.tsx @@ -44,14 +44,10 @@ const DEFAULT_EVAL_TYPES_OPTIONS = [ ]; const DEFAULT_OUTPUT_INDEX = '.kibana-elastic-ai-assistant-evaluation-results'; -interface Props { - onEvaluationSettingsChange?: () => void; -} - /** * Evaluation Settings -- development-only feature for evaluating models */ -export const EvaluationSettings: React.FC = React.memo(({ onEvaluationSettingsChange }) => { +export const EvaluationSettings: React.FC = React.memo(() => { const { actionTypeRegistry, basePath, http, setTraceOptions, traceOptions } = useAssistantContext(); const { data: connectors } = useLoadConnectors({ http }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_assistant_overlay/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_assistant_overlay/index.tsx index 3396223d192cad..9ccc2cbce815de 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_assistant_overlay/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_assistant_overlay/index.tsx @@ -130,7 +130,7 @@ export const useAssistantOverlay = ( // proxy show / hide calls to assistant context, using our internal prompt context id: // silent:boolean doesn't show the toast notification if the conversation is not found const showAssistantOverlay = useCallback( - async (showOverlay: boolean, silent?: boolean) => { + async (showOverlay: boolean) => { let conversation; if (!isLoading) { conversation = conversationTitle diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.tsx index a276aea3ff4ab9..4643af5509aeb5 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.tsx @@ -33,7 +33,6 @@ interface CreateConversationProps { messages?: ClientMessage[]; conversationIds?: string[]; apiConfig?: Conversation['apiConfig']; - isFlyoutMode: boolean; } interface SetApiConfigProps { @@ -126,13 +125,10 @@ export const useConversation = (): UseConversation => { * Create a new conversation with the given conversationId, and optionally add messages */ const getDefaultConversation = useCallback( - ({ cTitle, messages, isFlyoutMode }: CreateConversationProps): Conversation => { + ({ cTitle, messages }: CreateConversationProps): Conversation => { const newConversation: Conversation = cTitle === i18n.WELCOME_CONVERSATION_TITLE - ? { - ...WELCOME_CONVERSATION, - messages: !isFlyoutMode ? WELCOME_CONVERSATION.messages : [], - } + ? WELCOME_CONVERSATION : { ...DEFAULT_CONVERSATION_STATE, id: '', diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/sample_conversations.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/sample_conversations.tsx index 7cdf709192f709..85192f646963c5 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/sample_conversations.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/sample_conversations.tsx @@ -13,35 +13,7 @@ export const WELCOME_CONVERSATION: Conversation = { id: '', title: WELCOME_CONVERSATION_TITLE, category: 'assistant', - messages: [ - { - role: 'assistant', - content: i18n.WELCOME_GENERAL, - timestamp: '', - presentation: { - delay: 2 * 1000, - stream: true, - }, - }, - { - role: 'assistant', - content: i18n.WELCOME_GENERAL_2, - timestamp: '', - presentation: { - delay: 1000, - stream: true, - }, - }, - { - role: 'assistant', - content: i18n.WELCOME_GENERAL_3, - timestamp: '', - presentation: { - delay: 1000, - stream: true, - }, - }, - ], + messages: [], replacements: {}, excludeFromLastConversationStorage: true, }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx index 78336f8a8b03d4..65fca756233069 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx @@ -73,7 +73,6 @@ export interface AssistantProviderProps { showAnonymizedValues: boolean; setIsStreaming: (isStreaming: boolean) => void; currentUserAvatar?: UserAvatar; - isFlyoutMode: boolean; }) => EuiCommentProps[]; http: HttpSetup; baseConversations: Record; @@ -114,7 +113,6 @@ export interface UseAssistantContext { showAnonymizedValues: boolean; currentUserAvatar?: UserAvatar; setIsStreaming: (isStreaming: boolean) => void; - isFlyoutMode: boolean; }) => EuiCommentProps[]; http: HttpSetup; knowledgeBase: KnowledgeBaseConfig; @@ -234,9 +232,7 @@ export const AssistantProvider: React.FC = ({ /** * Global Assistant Overlay actions */ - const [showAssistantOverlay, setShowAssistantOverlay] = useState( - (showAssistant) => {} - ); + const [showAssistantOverlay, setShowAssistantOverlay] = useState(() => {}); /** * Settings State diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_missing_callout/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_missing_callout/index.test.tsx index a131e63ae49c30..5465ca19e99de6 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_missing_callout/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_missing_callout/index.test.tsx @@ -30,7 +30,6 @@ describe('connectorMissingCallout', () => { isConnectorConfigured={false} isSettingsModalVisible={false} setIsSettingsModalVisible={jest.fn()} - isFlyoutMode={false} /> ); @@ -45,7 +44,6 @@ describe('connectorMissingCallout', () => { isConnectorConfigured={true} isSettingsModalVisible={false} setIsSettingsModalVisible={jest.fn()} - isFlyoutMode={false} /> ); @@ -70,7 +68,6 @@ describe('connectorMissingCallout', () => { isConnectorConfigured={true} isSettingsModalVisible={false} setIsSettingsModalVisible={jest.fn()} - isFlyoutMode={false} /> ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_missing_callout/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_missing_callout/index.tsx index 8853ca0a67d33a..26ce2f736ed9a2 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_missing_callout/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_missing_callout/index.tsx @@ -20,7 +20,6 @@ interface Props { isConnectorConfigured: boolean; isSettingsModalVisible: boolean; setIsSettingsModalVisible: React.Dispatch>; - isFlyoutMode: boolean; } /** @@ -31,7 +30,7 @@ interface Props { * TODO: Add setting for 'default connector' so we can auto-resolve and not even show this */ export const ConnectorMissingCallout: React.FC = React.memo( - ({ isConnectorConfigured, isSettingsModalVisible, setIsSettingsModalVisible, isFlyoutMode }) => { + ({ isConnectorConfigured, isSettingsModalVisible, setIsSettingsModalVisible }) => { const { assistantAvailability, setSelectedSettingsTab } = useAssistantContext(); const onConversationSettingsClicked = useCallback(() => { @@ -55,13 +54,10 @@ export const ConnectorMissingCallout: React.FC = React.memo( iconType="controlsVertical" size="m" title={i18n.MISSING_CONNECTOR_CALLOUT_TITLE} - css={ - isFlyoutMode && - css` - padding-left: ${euiLightVars.euiPanelPaddingModifiers.paddingMedium} !important; - padding-right: ${euiLightVars.euiPanelPaddingModifiers.paddingMedium} !important; - ` - } + css={css` + padding-left: ${euiLightVars.euiPanelPaddingModifiers.paddingMedium} !important; + padding-right: ${euiLightVars.euiPanelPaddingModifiers.paddingMedium} !important; + `} >

{ beforeEach(() => { jest.clearAllMocks(); }); - it('renders empty selection if no selected connector is provided', () => { + it('renders add new connector button if no selected connector is provided', () => { const { getByTestId } = render( ); - expect(getByTestId('connector-selector')).toBeInTheDocument(); - expect(getByTestId('connector-selector')).toHaveTextContent(''); + fireEvent.click(getByTestId('connector-selector')); + expect(getByTestId('addNewConnectorButton')).toBeInTheDocument(); }); it('renders with provided selected connector', () => { const { getByTestId } = render( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx index 410ee650c43ef3..ad0fffc44e6b5e 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx @@ -30,7 +30,6 @@ interface Props { selectedConnectorId?: string; displayFancy?: (displayText: string) => React.ReactNode; setIsOpen?: (isOpen: boolean) => void; - isFlyoutMode: boolean; stats?: AttackDiscoveryStats | null; } @@ -47,7 +46,6 @@ export const ConnectorSelector: React.FC = React.memo( selectedConnectorId, onConnectorSelectionChange, setIsOpen, - isFlyoutMode, stats = null, }) => { const { actionTypeRegistry, http, assistantAvailability } = useAssistantContext(); @@ -177,7 +175,7 @@ export const ConnectorSelector: React.FC = React.memo( return ( <> - {isFlyoutMode && !connectorExists && !connectorOptions.length ? ( + {!connectorExists && !connectorOptions.length ? ( ({ jest.mock('../use_load_connectors', () => ({ useLoadConnectors: jest.fn(() => { return { - data: [], + data: mockConnectors, error: null, isSuccess: true, }; @@ -68,67 +67,61 @@ describe('ConnectorSelectorInline', () => { jest.clearAllMocks(); }); it('renders empty view if no selected conversation is provided', () => { - const { getByText } = render( + const { getByTestId } = render( ); - expect(getByText(i18n.INLINE_CONNECTOR_PLACEHOLDER)).toBeInTheDocument(); + fireEvent.click(getByTestId('connector-selector')); + expect(getByTestId('addNewConnectorButton')).toBeInTheDocument(); }); it('renders empty view if selectedConnectorId is NOT in list of connectors', () => { - const { getByText } = render( + const { getByTestId } = render( ); - expect(getByText(i18n.INLINE_CONNECTOR_PLACEHOLDER)).toBeInTheDocument(); + fireEvent.click(getByTestId('connector-selector')); + expect(getByTestId('addNewConnectorButton')).toBeInTheDocument(); }); - it('Clicking add connector button opens the connector selector', () => { - const { getByTestId, queryByTestId } = render( + it('renders the connector selector', () => { + const { getByTestId } = render( ); - expect(queryByTestId('connector-selector')).not.toBeInTheDocument(); - fireEvent.click(getByTestId('connectorSelectorPlaceholderButton')); expect(getByTestId('connector-selector')).toBeInTheDocument(); }); it('On connector change, update conversation API config', () => { const connectorTwo = mockConnectors[1]; - const { getByTestId, queryByTestId } = render( + const { getByTestId } = render( ); - fireEvent.click(getByTestId('connectorSelectorPlaceholderButton')); fireEvent.click(getByTestId('connector-selector')); fireEvent.click(getByTestId(connectorTwo.id)); - expect(queryByTestId('connector-selector')).not.toBeInTheDocument(); expect(setApiConfig).toHaveBeenCalledWith({ apiConfig: { actionTypeId: '.gen-ai', @@ -151,16 +144,13 @@ describe('ConnectorSelectorInline', () => { ); - fireEvent.click(getByTestId('connectorSelectorPlaceholderButton')); fireEvent.click(getByTestId('connector-selector')); - fireEvent.click(getByTestId('addNewConnectorButton')); expect(getByTestId('connector-selector')).toBeInTheDocument(); expect(setApiConfig).not.toHaveBeenCalled(); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.tsx index ebf762530af118..19e5db98a74faf 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; import React, { useCallback, useState } from 'react'; import { css } from '@emotion/css'; @@ -13,8 +13,6 @@ import { euiThemeVars } from '@kbn/ui-theme'; import type { AttackDiscoveryStats } from '@kbn/elastic-assistant-common'; import { AIConnector, ConnectorSelector } from '../connector_selector'; import { Conversation } from '../../..'; -import { useLoadConnectors } from '../use_load_connectors'; -import * as i18n from '../translations'; import { useAssistantContext } from '../../assistant_context'; import { useConversation } from '../../assistant/use_conversation'; import { getGenAiConfig } from '../helpers'; @@ -25,7 +23,6 @@ interface Props { isDisabled?: boolean; selectedConnectorId?: string; selectedConversation?: Conversation; - isFlyoutMode: boolean; onConnectorIdSelected?: (connectorId: string) => void; onConnectorSelected?: (conversation: Conversation) => void; stats?: AttackDiscoveryStats | null; @@ -53,14 +50,6 @@ const inputDisplayClassName = css` text-overflow: ellipsis; `; -const placeholderButtonClassName = css` - overflow: hidden; - text-overflow: ellipsis; - max-width: 400px; - font-weight: normal; - padding: 0 14px 0 0; -`; - /** * A compact wrapper of the ConnectorSelector component used in the Settings modal. */ @@ -69,29 +58,16 @@ export const ConnectorSelectorInline: React.FC = React.memo( isDisabled = false, selectedConnectorId, selectedConversation, - isFlyoutMode, - onConnectorIdSelected, onConnectorSelected, stats = null, }) => { const [isOpen, setIsOpen] = useState(false); - const { assistantAvailability, http } = useAssistantContext(); + const { assistantAvailability } = useAssistantContext(); const { setApiConfig } = useConversation(); - const { data: aiConnectors } = useLoadConnectors({ - http, - }); - - const selectedConnectorName = - (aiConnectors ?? []).find((c) => c.id === selectedConnectorId)?.name ?? - i18n.INLINE_CONNECTOR_PLACEHOLDER; const localIsDisabled = isDisabled || !assistantAvailability.hasConnectorsReadPrivilege; - const onConnectorClick = useCallback(() => { - setIsOpen(!isOpen); - }, [isOpen]); - const onChange = useCallback( async (connector: AIConnector) => { const connectorId = connector.id; @@ -129,40 +105,6 @@ export const ConnectorSelectorInline: React.FC = React.memo( [selectedConversation, setApiConfig, onConnectorIdSelected, onConnectorSelected] ); - if (isFlyoutMode) { - return ( - - - ( - - {displayText} - - )} - isOpen={isOpen} - isDisabled={localIsDisabled} - selectedConnectorId={selectedConnectorId} - setIsOpen={setIsOpen} - onConnectorSelectionChange={onChange} - isFlyoutMode={isFlyoutMode} - stats={stats} - /> - - - ); - } - return ( = React.memo( responsive={false} > - {isOpen ? ( - ( - - {displayText} - - )} - isOpen - isDisabled={localIsDisabled} - selectedConnectorId={selectedConnectorId} - setIsOpen={setIsOpen} - onConnectorSelectionChange={onChange} - isFlyoutMode={isFlyoutMode} - stats={stats} - /> - ) : ( - - ( + - {selectedConnectorName} - - - )} + {displayText} + + )} + isOpen={isOpen} + isDisabled={localIsDisabled} + selectedConnectorId={selectedConnectorId} + setIsOpen={setIsOpen} + onConnectorSelectionChange={onChange} + stats={stats} + /> ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/helpers.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/helpers.tsx deleted file mode 100644 index cb11ca51047f0e..00000000000000 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/helpers.tsx +++ /dev/null @@ -1,33 +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 { Conversation } from '../../assistant_context/types'; - -/** - * Removes all presentation data from the conversation - * @param conversation - */ -export const clearPresentationData = (conversation: Conversation): Conversation => { - const { messages, ...restConversation } = conversation; - return { - ...restConversation, - messages: messages.map((message) => { - const { presentation, ...restMessages } = message; - return { - ...restMessages, - presentation: undefined, - }; - }), - }; -}; - -/** - * Returns true if the conversation has no presentation data - * @param conversation - */ -export const conversationHasNoPresentationData = (conversation: Conversation): boolean => - !conversation.messages.some((message) => message.presentation !== undefined); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.test.tsx index cf46b5886a3893..b6eaa4578d4a01 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.test.tsx @@ -6,19 +6,15 @@ */ import React from 'react'; -import { useConnectorSetup } from '.'; -import { act, renderHook } from '@testing-library/react-hooks'; import { fireEvent, render } from '@testing-library/react'; import { welcomeConvo } from '../../mock/conversation'; import { TestProviders } from '../../mock/test_providers/test_providers'; -import { EuiCommentList } from '@elastic/eui'; +import { ConnectorSetup } from '.'; -const onSetupComplete = jest.fn(); const onConversationUpdate = jest.fn(); const defaultProps = { conversation: welcomeConvo, - onSetupComplete, onConversationUpdate, }; const newConnector = { actionTypeId: '.gen-ai', name: 'cool name' }; @@ -50,121 +46,40 @@ jest.mock('../../assistant/use_conversation', () => ({ })); jest.spyOn(global, 'clearTimeout'); -describe('useConnectorSetup', () => { +describe('ConnectorSetup', () => { beforeEach(() => { jest.clearAllMocks(); }); - it('should render comments and prompts', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useConnectorSetup(defaultProps), { - wrapper: ({ children }) => {children}, - }); - await waitForNextUpdate(); - expect( - result.current.comments.map((c) => ({ username: c.username, timestamp: c.timestamp })) - ).toEqual([ - { - username: 'You', - timestamp: `at: ${new Date('2024-03-18T18:59:18.174Z').toLocaleString()}`, - }, - { - username: 'Assistant', - timestamp: `at: ${new Date('2024-03-19T18:59:18.174Z').toLocaleString()}`, - }, - ]); - - expect(result.current.prompt.props['data-test-subj']).toEqual('prompt'); + it('should render action type selector', async () => { + const { getByTestId } = render(, { + wrapper: TestProviders, }); + + expect(getByTestId('modal-mock')).toBeInTheDocument(); }); - it('should set api config for each conversation when new connector is saved', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useConnectorSetup(defaultProps), { - wrapper: ({ children }) => {children}, - }); - await waitForNextUpdate(); - const { getByTestId, queryByTestId, rerender } = render(result.current.prompt, { - wrapper: TestProviders, - }); - expect(getByTestId('connectorButton')).toBeInTheDocument(); - expect(queryByTestId('skip-setup-button')).not.toBeInTheDocument(); - fireEvent.click(getByTestId('connectorButton')); - rerender(result.current.prompt); - fireEvent.click(getByTestId('modal-mock')); - expect(setApiConfig).toHaveBeenCalledTimes(1); + it('should set api config for each conversation when new connector is saved', async () => { + const { getByTestId } = render(, { + wrapper: TestProviders, }); + + fireEvent.click(getByTestId('modal-mock')); + expect(setApiConfig).toHaveBeenCalledTimes(1); }); it('should NOT set the api config for each conversation when a new connector is saved and updateConversationsOnSaveConnector is false', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - useConnectorSetup({ - ...defaultProps, - updateConversationsOnSaveConnector: false, // <-- don't update the conversations - }), - { - wrapper: ({ children }) => {children}, - } - ); - await waitForNextUpdate(); - const { getByTestId, queryByTestId, rerender } = render(result.current.prompt, { + const { getByTestId } = render( + , + { wrapper: TestProviders, - }); - expect(getByTestId('connectorButton')).toBeInTheDocument(); - expect(queryByTestId('skip-setup-button')).not.toBeInTheDocument(); - fireEvent.click(getByTestId('connectorButton')); + } + ); - rerender(result.current.prompt); - fireEvent.click(getByTestId('modal-mock')); + fireEvent.click(getByTestId('modal-mock')); - expect(setApiConfig).not.toHaveBeenCalled(); - }); - }); - - it('should show skip button if message has presentation data', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - useConnectorSetup({ - ...defaultProps, - conversation: { - ...defaultProps.conversation, - messages: [ - { - ...defaultProps.conversation.messages[0], - presentation: { - delay: 0, - stream: false, - }, - }, - ], - }, - }), - { - wrapper: ({ children }) => {children}, - } - ); - await waitForNextUpdate(); - const { getByTestId, queryByTestId } = render(result.current.prompt, { - wrapper: TestProviders, - }); - expect(getByTestId('skip-setup-button')).toBeInTheDocument(); - expect(queryByTestId('connectorButton')).not.toBeInTheDocument(); - }); - }); - it('should call onSetupComplete and setConversations when onHandleMessageStreamingComplete', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useConnectorSetup(defaultProps), { - wrapper: ({ children }) => {children}, - }); - await waitForNextUpdate(); - render(, { - wrapper: TestProviders, - }); - - expect(clearTimeout).toHaveBeenCalled(); - expect(onSetupComplete).toHaveBeenCalled(); - }); + expect(setApiConfig).not.toHaveBeenCalled(); }); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.tsx index 81166bbf90fa15..a27da69709c38c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.tsx @@ -5,181 +5,44 @@ * 2.0. */ -import React, { useCallback, useMemo, useRef, useState } from 'react'; -import type { EuiCommentProps } from '@elastic/eui'; -import { EuiAvatar, EuiBadge, EuiMarkdownFormat, EuiText, EuiTextAlign } from '@elastic/eui'; -import styled from '@emotion/styled'; -import { css } from '@emotion/react'; +import React, { useCallback, useMemo, useState } from 'react'; import { ActionConnector } from '@kbn/triggers-actions-ui-plugin/public/common/constants'; import { ActionType } from '@kbn/triggers-actions-ui-plugin/public'; import { AddConnectorModal } from '../add_connector_modal'; import { WELCOME_CONVERSATION } from '../../assistant/use_conversation/sample_conversations'; -import { Conversation, ClientMessage } from '../../..'; +import { Conversation } from '../../..'; import { useLoadActionTypes } from '../use_load_action_types'; -import { StreamingText } from '../../assistant/streaming_text'; -import { ConnectorButton } from '../connector_button'; import { useConversation } from '../../assistant/use_conversation'; -import { conversationHasNoPresentationData } from './helpers'; -import * as i18n from '../translations'; import { useAssistantContext } from '../../assistant_context'; import { useLoadConnectors } from '../use_load_connectors'; -import { AssistantAvatar } from '../../assistant/assistant_avatar/assistant_avatar'; import { getGenAiConfig } from '../helpers'; -const ConnectorButtonWrapper = styled.div` - margin-bottom: 10px; -`; - export interface ConnectorSetupProps { conversation?: Conversation; - isFlyoutMode?: boolean; - onSetupComplete?: () => void; onConversationUpdate?: ({ cId, cTitle }: { cId: string; cTitle: string }) => Promise; updateConversationsOnSaveConnector?: boolean; } -export const useConnectorSetup = ({ +export const ConnectorSetup = ({ conversation: defaultConversation, - isFlyoutMode, - onSetupComplete, onConversationUpdate, updateConversationsOnSaveConnector = true, -}: ConnectorSetupProps): { - comments: EuiCommentProps[]; - prompt: React.ReactElement; -} => { +}: ConnectorSetupProps) => { const conversation = useMemo( - () => - defaultConversation || { - ...WELCOME_CONVERSATION, - messages: !isFlyoutMode ? WELCOME_CONVERSATION.messages : [], - }, - [defaultConversation, isFlyoutMode] + () => defaultConversation || WELCOME_CONVERSATION, + [defaultConversation] ); const { setApiConfig } = useConversation(); - const bottomRef = useRef(null); // Access all conversations so we can add connector to all on initial setup const { actionTypeRegistry, http } = useAssistantContext(); - const { - data: connectors, - isSuccess: areConnectorsFetched, - refetch: refetchConnectors, - } = useLoadConnectors({ http }); - const isConnectorConfigured = areConnectorsFetched && !!connectors?.length; + const { refetch: refetchConnectors } = useLoadConnectors({ http }); - const [isConnectorModalVisible, setIsConnectorModalVisible] = useState(false); - const [showAddConnectorButton, setShowAddConnectorButton] = useState(() => { - // If no presentation data on messages, default to showing add connector button so it doesn't delay render and flash on screen - return conversationHasNoPresentationData(conversation); - }); const { data: actionTypes } = useLoadActionTypes({ http }); const [selectedActionType, setSelectedActionType] = useState(null); - const lastConversationMessageIndex = useMemo( - () => conversation.messages.length - 1, - [conversation.messages.length] - ); - - const [currentMessageIndex, setCurrentMessageIndex] = useState( - // If connector is configured or conversation has already been replayed show all messages immediately - isConnectorConfigured || conversationHasNoPresentationData(conversation) - ? lastConversationMessageIndex - : 0 - ); - - const streamingTimeoutRef = useRef(undefined); - - // Once streaming of previous message is complete, proceed to next message - const onHandleMessageStreamingComplete = useCallback(() => { - if (currentMessageIndex === lastConversationMessageIndex) { - clearTimeout(streamingTimeoutRef.current); - return; - } - streamingTimeoutRef.current = window.setTimeout(() => { - bottomRef.current?.scrollIntoView({ block: 'end' }); - return setCurrentMessageIndex(currentMessageIndex + 1); - }, conversation.messages[currentMessageIndex]?.presentation?.delay ?? 0); - return () => clearTimeout(streamingTimeoutRef.current); - }, [conversation.messages, currentMessageIndex, lastConversationMessageIndex]); - - // Show button to add connector after last message has finished streaming - const onHandleLastMessageStreamingComplete = useCallback(() => { - setShowAddConnectorButton(true); - bottomRef.current?.scrollIntoView({ block: 'end' }); - onSetupComplete?.(); - }, [onSetupComplete]); - - // Show button to add connector after last message has finished streaming - const handleSkipSetup = useCallback(() => { - setCurrentMessageIndex(lastConversationMessageIndex); - }, [lastConversationMessageIndex]); - - // Create EuiCommentProps[] from conversation messages - const commentBody = useCallback( - (message: ClientMessage, index: number, length: number) => { - // If timestamp is not set, set it to current time (will update conversation at end of setup) - if ( - conversation.messages[index].timestamp == null || - conversation.messages[index].timestamp.length === 0 - ) { - conversation.messages[index].timestamp = new Date().toISOString(); - } - const isLastMessage = index === length - 1; - const enableStreaming = - (message?.presentation?.stream ?? false) && currentMessageIndex !== length - 1; - return ( - - {(streamedText, isStreamingComplete) => ( - - {streamedText} - - - )} - - ); - }, - [ - conversation.messages, - currentMessageIndex, - onHandleLastMessageStreamingComplete, - onHandleMessageStreamingComplete, - ] - ); - - const comments = useMemo( - () => - conversation.messages.slice(0, currentMessageIndex + 1).map((message, index) => { - const isUser = message.role === 'user'; - const timestamp = `${i18n.CONNECTOR_SETUP_TIMESTAMP_AT}: ${new Date( - message.timestamp - ).toLocaleString()}`; - const commentProps: EuiCommentProps = { - username: isUser ? i18n.CONNECTOR_SETUP_USER_YOU : i18n.CONNECTOR_SETUP_USER_ASSISTANT, - children: commentBody(message, index, conversation.messages.length), - timelineAvatar: ( - - ), - timestamp, - }; - return commentProps; - }), - [commentBody, conversation.messages, currentMessageIndex] - ); - const onSaveConnector = useCallback( async (connector: ActionConnector) => { if (updateConversationsOnSaveConnector) { @@ -204,7 +67,6 @@ export const useConnectorSetup = ({ }); refetchConnectors?.(); - setIsConnectorModalVisible(false); } } else { refetchConnectors?.(); @@ -221,65 +83,17 @@ export const useConnectorSetup = ({ const handleClose = useCallback(() => { setSelectedActionType(null); - setIsConnectorModalVisible(false); }, []); - return { - comments: isFlyoutMode ? [] : comments, - prompt: isFlyoutMode ? ( -

- -
- ) : ( -
- {showAddConnectorButton && ( - - - - )} - {!showAddConnectorButton && ( - - - - {i18n.CONNECTOR_SETUP_SKIP} - - - - )} - {isConnectorModalVisible && ( - - )} -
- ), - }; + return ( + + ); }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/content/prompts/welcome/translations.ts b/x-pack/packages/kbn-elastic-assistant/impl/content/prompts/welcome/translations.ts index 387c1d01422f65..3324d09b50a5a2 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/content/prompts/welcome/translations.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/content/prompts/welcome/translations.ts @@ -7,30 +7,6 @@ import { i18n } from '@kbn/i18n'; -export const WELCOME_GENERAL = i18n.translate( - 'xpack.elasticAssistant.securityAssistant.content.prompts.welcome.welcomeGeneralPrompt', - { - defaultMessage: - 'Welcome to your Elastic AI Assistant! I am your 100% open-code portal into your Elastic life. In time, I will be able to answer questions and provide assistance across all your information in Elastic, and oh-so much more. Till then, I hope this early preview will open your mind to the possibilities of what we can create when we work together, in the open. Cheers!', - } -); - -export const WELCOME_GENERAL_2 = i18n.translate( - 'xpack.elasticAssistant.securityAssistant.content.prompts.welcome.welcomeGeneral2Prompt', - { - defaultMessage: - "First things first, we'll need to set up a Generative AI Connector to get this chat experience going! With the Generative AI Connector, you'll be able to configure access to either an OpenAI service or an Amazon Bedrock service, but you better believe you'll be able to deploy your own models within your Elastic Cloud instance and use those here in the future... 😉", - } -); - -export const WELCOME_GENERAL_3 = i18n.translate( - 'xpack.elasticAssistant.securityAssistant.content.prompts.welcome.welcomeGeneral3Prompt', - { - defaultMessage: - 'Go ahead and click the add connector button below to continue the conversation!', - } -); - export const ENTERPRISE = i18n.translate( 'xpack.elasticAssistant.securityAssistant.content.prompts.welcome.enterprisePrompt', { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_preview.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_preview.tsx index 91b676c491e47c..49d5d0fe4d63d6 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_preview.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_preview.tsx @@ -48,6 +48,7 @@ const SelectedPromptContextPreviewComponent = ({ return ( { rawData: 'test-raw-data', }; - it('renders stats', () => { - render( - - - - ); - - expect(screen.getByTestId('stats')).toBeInTheDocument(); - }); - describe('when rawData is a string (non-anonymized data)', () => { it('renders the ReadOnlyContextViewer when rawData is (non-anonymized data)', () => { render( @@ -61,7 +45,6 @@ describe('DataAnonymizationEditor', () => { selectedPromptContext={mockSelectedPromptContext} setSelectedPromptContexts={jest.fn()} currentReplacements={{}} - isFlyoutMode={false} /> ); @@ -76,7 +59,6 @@ describe('DataAnonymizationEditor', () => { selectedPromptContext={mockSelectedPromptContext} setSelectedPromptContexts={jest.fn()} currentReplacements={{}} - isFlyoutMode={false} /> ); @@ -105,24 +87,17 @@ describe('DataAnonymizationEditor', () => { selectedPromptContext={selectedPromptContextWithAnonymized} setSelectedPromptContexts={setSelectedPromptContexts} currentReplacements={{}} - isFlyoutMode={false} /> ); }); - it('renders the ContextEditor when rawData is anonymized data', () => { - expect(screen.getByTestId('contextEditor')).toBeInTheDocument(); + it('renders the SelectedPromptContextPreview when rawData is anonymized data', () => { + expect(screen.getByTestId('selectedPromptContextPreview')).toBeInTheDocument(); }); it('does NOT render the ReadOnlyContextViewer when rawData is anonymized data', () => { expect(screen.queryByTestId('readOnlyContextViewer')).not.toBeInTheDocument(); }); - - it('calls setSelectedPromptContexts when a field is toggled', () => { - userEvent.click(screen.getAllByTestId('allowed')[0]); // toggle the first field - - expect(setSelectedPromptContexts).toBeCalled(); - }); }); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/index.tsx index 1fd0e31c787673..0794ca4330350d 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiPanel, EuiSpacer } from '@elastic/eui'; +import { EuiPanel } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; import styled from '@emotion/styled'; import { AnonymizedData } from '@kbn/elastic-assistant-common/impl/data_anonymization/types'; @@ -14,9 +14,7 @@ import { BatchUpdateListItem } from './context_editor/types'; import { getIsDataAnonymizable, updateSelectedPromptContext } from './helpers'; import { ReadOnlyContextViewer } from './read_only_context_viewer'; import { ContextEditorFlyout } from './context_editor_flyout'; -import { ContextEditor } from './context_editor'; import { ReplacementsContextViewer } from './replacements_context_viewer'; -import { Stats } from './stats'; const EditorContainer = styled.div` overflow-x: auto; @@ -28,14 +26,12 @@ export interface Props { React.SetStateAction> >; currentReplacements: AnonymizedData['replacements'] | undefined; - isFlyoutMode: boolean; } const DataAnonymizationEditorComponent: React.FC = ({ selectedPromptContext, setSelectedPromptContexts, currentReplacements, - isFlyoutMode, }) => { const isDataAnonymizable = useMemo( () => getIsDataAnonymizable(selectedPromptContext.rawData), @@ -63,66 +59,27 @@ const DataAnonymizationEditorComponent: React.FC = ({ [selectedPromptContext, setSelectedPromptContexts] ); - if (isFlyoutMode) { - return ( - - - {typeof selectedPromptContext.rawData === 'string' ? ( - selectedPromptContext.replacements != null ? ( - - ) : ( - - ) - ) : ( - - )} - - - ); - } - return ( - - - - - {typeof selectedPromptContext.rawData === 'string' ? ( - selectedPromptContext.replacements != null ? ( - + + {typeof selectedPromptContext.rawData === 'string' ? ( + selectedPromptContext.replacements != null ? ( + + ) : ( + + ) ) : ( - - ) - ) : ( - - )} + + )} + ); }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/mock/get_anonymized_value/index.ts b/x-pack/packages/kbn-elastic-assistant/impl/mock/get_anonymized_value/index.ts index a6d5c4e5d39724..256f9776c45635 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/mock/get_anonymized_value/index.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/mock/get_anonymized_value/index.ts @@ -5,13 +5,6 @@ * 2.0. */ -import { Replacements } from '@kbn/elastic-assistant-common'; - /** This mock returns the reverse of `value` */ -export const mockGetAnonymizedValue = ({ - currentReplacements, - rawValue, -}: { - currentReplacements: Replacements | undefined; - rawValue: string; -}): string => rawValue.split('').reverse().join(''); +export const mockGetAnonymizedValue = ({ rawValue }: { rawValue: string }): string => + rawValue.split('').reverse().join(''); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/helpers.ts index 5b3860af449202..3eaf493222cb06 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/helpers.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/helpers.ts @@ -134,37 +134,34 @@ export const getFlattenedBuckets = ({ if (((isILMAvailable && ilmExplain != null) || !isILMAvailable) && stats != null) { return [ ...acc, - ...Object.entries(stats).reduce( - (validStats, [indexName, indexStats]) => { - const ilmPhase = getIlmPhase(ilmExplain?.[indexName], isILMAvailable); - const isSelectedPhase = - (isILMAvailable && ilmPhase != null && ilmPhasesMap[ilmPhase] != null) || - !isILMAvailable; - - if (isSelectedPhase) { - const incompatible = - results != null && results[indexName] != null - ? results[indexName].incompatible - : undefined; - const sizeInBytes = getSizeInBytes({ indexName, stats }); - const docsCount = getDocsCount({ stats, indexName }); - return [ - ...validStats, - { - ilmPhase, - incompatible, - indexName, - pattern, - sizeInBytes, - docsCount, - }, - ]; - } else { - return validStats; - } - }, - [] - ), + ...Object.entries(stats).reduce((validStats, [indexName]) => { + const ilmPhase = getIlmPhase(ilmExplain?.[indexName], isILMAvailable); + const isSelectedPhase = + (isILMAvailable && ilmPhase != null && ilmPhasesMap[ilmPhase] != null) || + !isILMAvailable; + + if (isSelectedPhase) { + const incompatible = + results != null && results[indexName] != null + ? results[indexName].incompatible + : undefined; + const sizeInBytes = getSizeInBytes({ indexName, stats }); + const docsCount = getDocsCount({ stats, indexName }); + return [ + ...validStats, + { + ilmPhase, + incompatible, + indexName, + pattern, + sizeInBytes, + docsCount, + }, + ]; + } else { + return validStats; + } + }, []), ]; } @@ -232,7 +229,7 @@ export const getLayersMultiDimensional = ({ groupByRollup: (d: Datum) => d.indexName, nodeLabel: (indexName: Datum) => indexName, shape: { - fillColor: (indexName: Key, sortIndex: number, node: Pick) => { + fillColor: (indexName: Key, _sortIndex: number, node: Pick) => { const pattern = getGroupFromPath(node.path) ?? ''; const flattenedBucket = pathToFlattenedBucketMap[`${pattern}${indexName}`]; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/stat_label/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/stat_label/index.tsx index 31b4620fbb5f0f..32402b49b570c5 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/stat_label/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/stat_label/index.tsx @@ -19,12 +19,11 @@ const Line2 = styled.span` const EMPTY = ' '; interface Props { - color?: string; line1?: string; line2?: string; } -export const StatLabel: React.FC = ({ color, line1 = EMPTY, line2 = EMPTY }) => ( +export const StatLabel: React.FC = ({ line1 = EMPTY, line2 = EMPTY }) => ( <> {line1} {line2} diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/ecs_compliant_tab/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/ecs_compliant_tab/index.tsx index b53567e709eb47..855ef75e80b84d 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/ecs_compliant_tab/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/ecs_compliant_tab/index.tsx @@ -26,15 +26,10 @@ const EmptyPromptContainer = styled.div` interface Props { indexName: string; - onAddToNewCase: (markdownComments: string[]) => void; partitionedFieldMetadata: PartitionedFieldMetadata; } -const EcsCompliantTabComponent: React.FC = ({ - indexName, - onAddToNewCase, - partitionedFieldMetadata, -}) => { +const EcsCompliantTabComponent: React.FC = ({ indexName, partitionedFieldMetadata }) => { const emptyPromptBody = useMemo(() => , []); const title = useMemo(() => , []); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/helpers.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/helpers.tsx index 670357c3730f71..8790ab12591b31 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/helpers.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/helpers.tsx @@ -212,11 +212,7 @@ export const getTabs = ({
), content: ( - + ), id: ECS_COMPLIANT_TAB_ID, name: i18n.ECS_COMPLIANT_FIELDS, diff --git a/x-pack/packages/security-solution/side_nav/src/solution_side_nav_panel.styles.ts b/x-pack/packages/security-solution/side_nav/src/solution_side_nav_panel.styles.ts index ca0f592f96a438..f5af4cd05ad24e 100644 --- a/x-pack/packages/security-solution/side_nav/src/solution_side_nav_panel.styles.ts +++ b/x-pack/packages/security-solution/side_nav/src/solution_side_nav_panel.styles.ts @@ -69,7 +69,7 @@ export const SolutionSideNavCategoryTitleStyles = (euiTheme: EuiThemeComputed<{} font-weight: ${euiTheme.font.weight.medium}; `; -export const SolutionSideNavPanelLinksGroupStyles = (euiTheme: EuiThemeComputed<{}>) => css` +export const SolutionSideNavPanelLinksGroupStyles = () => css` padding-left: 0; padding-right: 0; `; diff --git a/x-pack/packages/security-solution/side_nav/src/solution_side_nav_panel.tsx b/x-pack/packages/security-solution/side_nav/src/solution_side_nav_panel.tsx index dfe2f643d47833..248121872018b7 100644 --- a/x-pack/packages/security-solution/side_nav/src/solution_side_nav_panel.tsx +++ b/x-pack/packages/security-solution/side_nav/src/solution_side_nav_panel.tsx @@ -333,8 +333,7 @@ interface SolutionSideNavPanelItemsProps { */ const SolutionSideNavPanelItems: React.FC = React.memo( function SolutionSideNavPanelItems({ items, onClose }) { - const { euiTheme } = useEuiTheme(); - const panelLinksGroupClassNames = classNames(SolutionSideNavPanelLinksGroupStyles(euiTheme)); + const panelLinksGroupClassNames = classNames(SolutionSideNavPanelLinksGroupStyles()); return ( {items.map((item) => ( diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts index 8113a685c94716..03e1d324494f48 100644 --- a/x-pack/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/plugins/security_solution/common/experimental_features.ts @@ -242,11 +242,6 @@ export const allowedExperimentalValues = Object.freeze({ */ unifiedManifestEnabled: true, - /** - * Enables Security AI Assistant's Flyout mode - */ - aiAssistantFlyoutMode: true, - /** * Enables the new modal for the value list items */ diff --git a/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx b/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx index df961ac223c4d8..baf36e278b71f2 100644 --- a/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx +++ b/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx @@ -23,16 +23,15 @@ import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experime interface Props { message: ClientMessage; - isFlyoutMode: boolean; } -const CommentActionsComponent: React.FC = ({ message, isFlyoutMode }) => { +const CommentActionsComponent: React.FC = ({ message }) => { const toasts = useToasts(); const { cases } = useKibana().services; const dispatch = useDispatch(); const isModelEvaluationEnabled = useIsExperimentalFeatureEnabled('assistantModelEvaluation'); - const { showAssistantOverlay, traceOptions } = useAssistantContext(); + const { traceOptions } = useAssistantContext(); const associateNote = useCallback( (noteId: string) => dispatch(timelineActions.addNote({ id: TimelineId.active, noteId })), @@ -65,10 +64,6 @@ const CommentActionsComponent: React.FC = ({ message, isFlyoutMode }) => }); const onAddToExistingCase = useCallback(() => { - if (!isFlyoutMode) { - showAssistantOverlay({ showOverlay: false }); - } - selectCaseModal.open({ getAttachments: () => [ { @@ -78,7 +73,7 @@ const CommentActionsComponent: React.FC = ({ message, isFlyoutMode }) => }, ], }); - }, [content, isFlyoutMode, selectCaseModal, showAssistantOverlay]); + }, [content, selectCaseModal]); // Note: This feature is behind the `isModelEvaluationEnabled` FF. If ever released, this URL should be configurable // as APM data may not go to the same cluster where the Kibana instance is running diff --git a/x-pack/plugins/security_solution/public/assistant/get_comments/index.test.tsx b/x-pack/plugins/security_solution/public/assistant/get_comments/index.test.tsx index b59f14684a2caf..884af527f4be08 100644 --- a/x-pack/plugins/security_solution/public/assistant/get_comments/index.test.tsx +++ b/x-pack/plugins/security_solution/public/assistant/get_comments/index.test.tsx @@ -39,7 +39,6 @@ const testProps = { isFetchingResponse: false, currentConversation, showAnonymizedValues, - isFlyoutMode: false, }; describe('getComments', () => { it('Does not add error state message has no error', () => { diff --git a/x-pack/plugins/security_solution/public/assistant/get_comments/index.tsx b/x-pack/plugins/security_solution/public/assistant/get_comments/index.tsx index 10d5a15c800ae9..8976c851c6e65d 100644 --- a/x-pack/plugins/security_solution/public/assistant/get_comments/index.tsx +++ b/x-pack/plugins/security_solution/public/assistant/get_comments/index.tsx @@ -60,7 +60,6 @@ export const getComments = ({ refetchCurrentConversation, regenerateMessage, showAnonymizedValues, - isFlyoutMode, currentUserAvatar, setIsStreaming, }: { @@ -71,7 +70,6 @@ export const getComments = ({ refetchCurrentConversation: () => void; regenerateMessage: (conversationId: string) => void; showAnonymizedValues: boolean; - isFlyoutMode: boolean; currentUserAvatar?: UserAvatar; setIsStreaming: (isStreaming: boolean) => void; }): EuiCommentProps[] => { @@ -187,7 +185,7 @@ export const getComments = ({ return { ...messageProps, - actions: , + actions: , children: ( { @@ -31,16 +30,10 @@ export const AssistantOverlay: React.FC = () => { }); const { assistantAvailability } = useAssistantContext(); - const aiAssistantFlyoutMode = useIsExperimentalFeatureEnabled('aiAssistantFlyoutMode'); if (!assistantAvailability.hasAssistantPrivilege) { return null; } - return ( - - ); + return ; }; diff --git a/x-pack/plugins/security_solution/public/assistant/stack_management/management_settings.tsx b/x-pack/plugins/security_solution/public/assistant/stack_management/management_settings.tsx index 525315ca36eb28..31f3910fdab499 100644 --- a/x-pack/plugins/security_solution/public/assistant/stack_management/management_settings.tsx +++ b/x-pack/plugins/security_solution/public/assistant/stack_management/management_settings.tsx @@ -16,13 +16,10 @@ import { } from '@kbn/elastic-assistant'; import { useConversation } from '@kbn/elastic-assistant/impl/assistant/use_conversation'; import type { FetchConversationsResponse } from '@kbn/elastic-assistant/impl/assistant/api'; -import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experimental_features'; const defaultSelectedConversationId = WELCOME_CONVERSATION_TITLE; export const ManagementSettings = React.memo(() => { - const isFlyoutMode = useIsExperimentalFeatureEnabled('aiAssistantFlyoutMode'); - const { baseConversations, http, @@ -49,8 +46,8 @@ export const ManagementSettings = React.memo(() => { const currentConversation = useMemo( () => conversations?.[defaultSelectedConversationId] ?? - getDefaultConversation({ cTitle: WELCOME_CONVERSATION_TITLE, isFlyoutMode }), - [conversations, getDefaultConversation, isFlyoutMode] + getDefaultConversation({ cTitle: WELCOME_CONVERSATION_TITLE }), + [conversations, getDefaultConversation] ); if (conversations) { @@ -58,7 +55,6 @@ export const ManagementSettings = React.memo(() => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.test.tsx index 938da7f930d514..4f242cedfc92e1 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.test.tsx @@ -38,7 +38,7 @@ describe('Header', () => { ); - const connectorSelector = screen.getByTestId('connectorSelectorPlaceholderButton'); + const connectorSelector = screen.getByTestId('addNewConnectorButton'); expect(connectorSelector).toBeInTheDocument(); }); @@ -61,7 +61,7 @@ describe('Header', () => { ); - const connectorSelector = screen.queryByTestId('connectorSelectorPlaceholderButton'); + const connectorSelector = screen.queryByTestId('addNewConnectorButton'); expect(connectorSelector).not.toBeInTheDocument(); }); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.tsx index 78ad8db6d2f6e3..fa4a9caa3dcb1f 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.tsx @@ -38,7 +38,6 @@ const HeaderComponent: React.FC = ({ onCancel, stats, }) => { - const isFlyoutMode = false; // always false for attack discovery const { hasAssistantPrivilege } = useAssistantAvailability(); const { euiTheme } = useEuiTheme(); const disabled = !hasAssistantPrivilege || connectorId == null; @@ -85,7 +84,6 @@ const HeaderComponent: React.FC = ({ {connectorsAreConfigured && ( { expect(bodyText).toHaveTextContent(FIRST_SET_UP); }); - - it('renders connector prompt', () => { - const connectorPrompt = screen.getByTestId('prompt'); - - expect(connectorPrompt).toBeInTheDocument(); - }); }); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/welcome/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/welcome/index.tsx index 3f8488f6f64b42..7ab90b524bb930 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/welcome/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/welcome/index.tsx @@ -6,21 +6,13 @@ */ import { AssistantAvatar } from '@kbn/elastic-assistant'; -import { useConnectorSetup } from '@kbn/elastic-assistant/impl/connectorland/connector_setup'; +import { ConnectorSetup } from '@kbn/elastic-assistant/impl/connectorland/connector_setup'; import { EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText } from '@elastic/eui'; import React, { useMemo } from 'react'; -import { noop } from 'lodash/fp'; import * as i18n from './translations'; const WelcomeComponent: React.FC = () => { - const { prompt: connectorPrompt } = useConnectorSetup({ - isFlyoutMode: true, // prevents the "Click to skip" button from showing - onConversationUpdate: async () => {}, - onSetupComplete: noop, // this callback cannot be used to select a connector, so it's not used - updateConversationsOnSaveConnector: false, // no conversation to update - }); - const title = useMemo( () => ( { - {connectorPrompt} + + {}} + updateConversationsOnSaveConnector={false} // no conversation to update + /> +
); }; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/assistant/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/assistant/index.tsx deleted file mode 100644 index a71b7c8231f59a..00000000000000 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/assistant/index.tsx +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import styled from 'styled-components'; -import { Assistant } from '@kbn/elastic-assistant'; -import type { Dispatch, SetStateAction } from 'react'; -import React, { memo } from 'react'; -import { TIMELINE_CONVERSATION_TITLE } from '../../../../../assistant/content/conversations/translations'; - -const AssistantTabContainer = styled.div` - overflow-y: auto; - width: 100%; -`; - -const AssistantTab: React.FC<{ - shouldRefocusPrompt: boolean; - setConversationTitle: Dispatch>; -}> = memo(({ shouldRefocusPrompt, setConversationTitle }) => ( - - - -)); - -AssistantTab.displayName = 'AssistantTab'; - -// eslint-disable-next-line import/no-default-export -export { AssistantTab as default }; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/index.tsx index 643a5b54be415c..7f5ab6f316a629 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/index.tsx @@ -6,17 +6,13 @@ */ import { EuiBadge, EuiSkeletonText, EuiTabs, EuiTab } from '@elastic/eui'; -import { css } from '@emotion/react'; import { isEmpty } from 'lodash/fp'; -import type { Ref, ReactElement, ComponentType, Dispatch, SetStateAction } from 'react'; -import React, { lazy, memo, Suspense, useCallback, useEffect, useMemo, useState } from 'react'; +import type { Ref, ReactElement, ComponentType } from 'react'; +import React, { lazy, memo, Suspense, useCallback, useEffect, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import styled from 'styled-components'; import { useEsqlAvailability } from '../../../../common/hooks/esql/use_esql_availability'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { useAssistantTelemetry } from '../../../../assistant/use_assistant_telemetry'; -import { useAssistantAvailability } from '../../../../assistant/use_assistant_availability'; import type { SessionViewConfig } from '../../../../../common/types'; import type { RowRenderer, TimelineId } from '../../../../../common/types/timeline'; import { TimelineTabs } from '../../../../../common/types/timeline'; @@ -41,7 +37,6 @@ import { } from './selectors'; import * as i18n from './translations'; import { useLicense } from '../../../../common/hooks/use_license'; -import { TIMELINE_CONVERSATION_TITLE } from '../../../../assistant/content/conversations/translations'; import { initializeTimelineSettings } from '../../../store/actions'; import { selectTimelineESQLSavedSearchId } from '../../../store/selectors'; @@ -96,7 +91,6 @@ interface BasicTimelineTab { type ActiveTimelineTabProps = BasicTimelineTab & { activeTimelineTab: TimelineTabs; showTimeline: boolean; - setConversationTitle: Dispatch>; }; const ActiveTimelineTab = memo( @@ -106,10 +100,8 @@ const ActiveTimelineTab = memo( rowRenderers, timelineId, timelineType, - setConversationTitle, showTimeline, }) => { - const { hasAssistantPrivilege } = useAssistantAvailability(); const { isTimelineEsqlEnabledByFeatureFlag, isEsqlAdvancedSettingEnabled } = useEsqlAvailability(); const timelineESQLSavedSearch = useShallowEqualSelector((state) => @@ -124,7 +116,6 @@ const ActiveTimelineTab = memo( } return isEsqlAdvancedSettingEnabled || timelineESQLSavedSearch != null; }, [isEsqlAdvancedSettingEnabled, isTimelineEsqlEnabledByFeatureFlag, timelineESQLSavedSearch]); - const aiAssistantFlyoutMode = useIsExperimentalFeatureEnabled('aiAssistantFlyoutMode'); const getTab = useCallback( (tab: TimelineTabs) => { switch (tab) { @@ -147,33 +138,6 @@ const ActiveTimelineTab = memo( [activeTimelineTab] ); - const getAssistantTab = useCallback(() => { - if (showTimeline) { - const AssistantTab = tabWithSuspense(lazy(() => import('./assistant'))); - return ( - - ); - } else { - return null; - } - }, [activeTimelineTab, setConversationTitle, showTimeline]); - /* Future developer -> why are we doing that * It is really expansive to re-render the QueryTab because the drag/drop * Therefore, we are only hiding its dom when switching to another tab @@ -228,7 +192,6 @@ const ActiveTimelineTab = memo( > {isGraphOrNotesTabs && getTab(activeTimelineTab)} - {hasAssistantPrivilege && !aiAssistantFlyoutMode ? getAssistantTab() : null} ); } @@ -271,8 +234,6 @@ const TabsContentComponent: React.FC = ({ sessionViewConfig, timelineDescription, }) => { - const aiAssistantFlyoutMode = useIsExperimentalFeatureEnabled('aiAssistantFlyoutMode'); - const { hasAssistantPrivilege } = useAssistantAvailability(); const dispatch = useDispatch(); const getActiveTab = useMemo(() => getActiveTabSelector(), []); const getShowTimeline = useMemo(() => getShowTimelineSelector(), []); @@ -312,9 +273,6 @@ const TabsContentComponent: React.FC = ({ const isEnterprisePlus = useLicense().isEnterprise(); - const [conversationTitle, setConversationTitle] = useState(TIMELINE_CONVERSATION_TITLE); - const { reportAssistantInvoked } = useAssistantTelemetry(); - const allTimelineNoteIds = useMemo(() => { const eventNoteIds = Object.values(eventIdToNoteIds).reduce( (acc, v) => [...acc, ...v], @@ -361,16 +319,6 @@ const TabsContentComponent: React.FC = ({ setActiveTab(TimelineTabs.session); }, [setActiveTab]); - const setSecurityAssistantAsActiveTab = useCallback(() => { - setActiveTab(TimelineTabs.securityAssistant); - if (activeTab !== TimelineTabs.securityAssistant) { - reportAssistantInvoked({ - conversationId: conversationTitle, - invokedBy: TIMELINE_CONVERSATION_TITLE, - }); - } - }, [activeTab, conversationTitle, reportAssistantInvoked, setActiveTab]); - const setEsqlAsActiveTab = useCallback(() => { dispatch( initializeTimelineSettings({ @@ -471,17 +419,6 @@ const TabsContentComponent: React.FC = ({
)} - {hasAssistantPrivilege && !aiAssistantFlyoutMode && ( - - {i18n.SECURITY_ASSISTANT} - - )} )} @@ -492,7 +429,6 @@ const TabsContentComponent: React.FC = ({ timelineId={timelineId} timelineType={timelineType} timelineDescription={timelineDescription} - setConversationTitle={setConversationTitle} showTimeline={showTimeline} /> diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index cff2887179e376..5438a0096c0644 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -13310,7 +13310,6 @@ "xpack.elasticAssistant.assistant.settings.knowledgeBasedSettings.knowledgeBaseDescription": "Pour commencer, configurez ELSER dans {machineLearning}. {seeDocs}", "xpack.elasticAssistant.assistant.settings.knowledgeBaseSettings.knowledgeBaseInstalledDescription": "Initialisé sur `{kbIndexPattern}`", "xpack.elasticAssistant.assistant.settings.knowledgeBaseSettings.latestAndRiskiestOpenAlertsLabel": "Envoyez à l'Assistant d'IA des informations sur vos {alertsCount} alertes ouvertes ou confirmées les plus récentes et les plus risquées.", - "xpack.elasticAssistant.assistant.technicalPreview.tooltipContent": "Les réponses des systèmes d'IA ne sont pas toujours tout à fait exactes. Pour en savoir plus sur la fonctionnalité d'assistant et son utilisation, consultez {documentationLink}.", "xpack.elasticAssistant.dataAnonymizationEditor.contextEditor.selectAllFields": "Sélectionnez l'ensemble des {totalFields} champs", "xpack.elasticAssistant.dataAnonymizationEditor.contextEditor.selectedFields": "{selected} champs sélectionnés", "xpack.elasticAssistant.dataAnonymizationEditor.stats.allowedStat.allowedTooltip": "{allowed} champs sur {total} dans ce contexte sont autorisés à être inclus dans la conversation", @@ -13511,9 +13510,6 @@ "xpack.elasticAssistant.knowledgeBase.setupError": "Erreur lors de la configuration de la base de connaissances", "xpack.elasticAssistant.knowledgeBase.statusError": "Erreur lors de la récupération du statut de la base de connaissances", "xpack.elasticAssistant.securityAssistant.content.prompts.welcome.enterprisePrompt": "L'assistant d'IA d'Elastic n'est accessible qu'aux entreprises. Veuillez mettre votre licence à niveau pour bénéficier de cette fonctionnalité.", - "xpack.elasticAssistant.securityAssistant.content.prompts.welcome.welcomeGeneral2Prompt": "Avant toute chose, il faut configurer un Connecteur d'intelligence artificielle générative pour lancer cette expérience de chat ! Avec le connecteur d'IA générative, vous pourrez configurer l'accès à un service OpenAI ou à un service Amazon Bedrock, mais sachez que vous serez en mesure de déployer vos propres modèles au sein d'une instance Elastic Cloud et de les y utiliser à l'avenir... 😉", - "xpack.elasticAssistant.securityAssistant.content.prompts.welcome.welcomeGeneral3Prompt": "Cliquez sur le bouton \"Ajouter un connecteur\" ci-dessous pour continuer la conversation.", - "xpack.elasticAssistant.securityAssistant.content.prompts.welcome.welcomeGeneralPrompt": "Bienvenue sur votre assistant d’intelligence artificielle Elastic. Je suis votre portail 100 % open-code vers votre vie Elastic. Avec le temps, je serai capable de répondre à vos questions et de vous apporter mon aide concernant l’ensemble de vos informations contenues dans Elastic, et bien plus encore. En attendant, j’espère que cet aperçu anticipé vous donnera une idée de ce que nous pouvons créer en travaillant ensemble, en toute transparence. À bientôt !", "xpack.embeddableEnhanced.actions.panelNotifications.manyDrilldowns": "Le panneau comporte {count} recherches", "xpack.embeddableEnhanced.actions.panelNotifications.oneDrilldown": "Le panneau comporte 1 recherche", "xpack.embeddableEnhanced.Drilldowns": "Explorations", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 05d9fc8678211f..bac41bbe59b2e6 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -13289,7 +13289,6 @@ "xpack.elasticAssistant.assistant.settings.knowledgeBasedSettings.knowledgeBaseDescription": "{machineLearning}内でELSERを構成して開始します。{seeDocs}", "xpack.elasticAssistant.assistant.settings.knowledgeBaseSettings.knowledgeBaseInstalledDescription": "`{kbIndexPattern}`に初期化されました", "xpack.elasticAssistant.assistant.settings.knowledgeBaseSettings.latestAndRiskiestOpenAlertsLabel": "{alertsCount}件の最新の最もリスクが高い未解決または確認済みのアラートに関する情報をAI Assistantに送信します。", - "xpack.elasticAssistant.assistant.technicalPreview.tooltipContent": "AIシステムからの応答は、必ずしも完全に正確であるとは限りません。アシスタント機能とその使用方法の詳細については、{documentationLink}を参照してください。", "xpack.elasticAssistant.dataAnonymizationEditor.contextEditor.selectAllFields": "すべての{totalFields}フィールドを選択", "xpack.elasticAssistant.dataAnonymizationEditor.contextEditor.selectedFields": "選択した{selected}フィールド", "xpack.elasticAssistant.dataAnonymizationEditor.stats.allowedStat.allowedTooltip": "このコンテキストの{total}フィールドのうち{allowed}個を会話に含めることができます", @@ -13490,9 +13489,6 @@ "xpack.elasticAssistant.knowledgeBase.setupError": "ナレッジベースの設定エラー", "xpack.elasticAssistant.knowledgeBase.statusError": "ナレッジベースステータスの取得エラー", "xpack.elasticAssistant.securityAssistant.content.prompts.welcome.enterprisePrompt": "Elastic AI Assistantはエンタープライズユーザーのみご利用いただけます。この機能を使用するには、ライセンスをアップグレードしてください。", - "xpack.elasticAssistant.securityAssistant.content.prompts.welcome.welcomeGeneral2Prompt": "まず最初に、このチャットエクスペリエンスを開始するために生成AIコネクターを設定する必要があります。生成AIコネクターを使用すると、OpenAI ServiceまたはAmazon Bedrockサービスへのアクセスを設定できます。しかし、将来的にはElastic Cloudインスタンス内に独自のモデルをデプロイして、それをここで使うことができるようになると考えてください... 😉", - "xpack.elasticAssistant.securityAssistant.content.prompts.welcome.welcomeGeneral3Prompt": "会話を続けるには、以下の[コネクターの追加]ボタンをクリックしてください。", - "xpack.elasticAssistant.securityAssistant.content.prompts.welcome.welcomeGeneralPrompt": "Elastic AI Assistantへようこそ!Elasticを活用するための100%オープンコードのポータルです。いずれは、Elasticにあるすべての情報、そしてもっともっと多くのことについて、質問に答えたり、サポートを提供したりできるようになるでしょう。それまでは、この早期プレビューが、オープンな場で協力するときに生み出せるものの可能性を知るきっかけになることを願っています。どうぞよろしくお願いいたします。", "xpack.embeddableEnhanced.actions.panelNotifications.manyDrilldowns": "パネルには{count}個のドリルダウンがあります", "xpack.embeddableEnhanced.actions.panelNotifications.oneDrilldown": "パネルには 1 個のドリルダウンがあります", "xpack.embeddableEnhanced.Drilldowns": "ドリルダウン", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index c28f3ed1ca3bac..3b76c43276896d 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -13315,7 +13315,6 @@ "xpack.elasticAssistant.assistant.settings.knowledgeBasedSettings.knowledgeBaseDescription": "在 {machineLearning} 中配置 ELSER 以开始。{seeDocs}", "xpack.elasticAssistant.assistant.settings.knowledgeBaseSettings.knowledgeBaseInstalledDescription": "已初始化为 `{kbIndexPattern}`", "xpack.elasticAssistant.assistant.settings.knowledgeBaseSettings.latestAndRiskiestOpenAlertsLabel": "发送有关 {alertsCount} 个最新和风险最高的未决或已确认告警的 AI 助手信息。", - "xpack.elasticAssistant.assistant.technicalPreview.tooltipContent": "来自 AI 系统的响应可能不会始终完全准确。有关辅助功能及其用法的详细信息,请参阅 {documentationLink}。", "xpack.elasticAssistant.dataAnonymizationEditor.contextEditor.selectAllFields": "选择所有 {totalFields} 个字段", "xpack.elasticAssistant.dataAnonymizationEditor.contextEditor.selectedFields": "已选定 {selected} 个字段", "xpack.elasticAssistant.dataAnonymizationEditor.stats.allowedStat.allowedTooltip": "允许在对话中包含此上下文中的 {allowed} 个(共 {total} 个)字段", @@ -13516,9 +13515,6 @@ "xpack.elasticAssistant.knowledgeBase.setupError": "设置知识库时出错", "xpack.elasticAssistant.knowledgeBase.statusError": "提取知识库状态时出错", "xpack.elasticAssistant.securityAssistant.content.prompts.welcome.enterprisePrompt": "Elastic AI 助手仅对企业用户可用。请升级许可证以使用此功能。", - "xpack.elasticAssistant.securityAssistant.content.prompts.welcome.welcomeGeneral2Prompt": "首先,我们需要设置生成式 AI 连接器以继续这种聊天体验!使用生成式 AI 连接器,您将能够配置 OpenAI 服务或 Amazon Bedrock 服务的访问权限,但请您相信,您将能够在 Elastic Cloud 实例中部署自己的模型,并于未来在此处使用那些模型……😉", - "xpack.elasticAssistant.securityAssistant.content.prompts.welcome.welcomeGeneral3Prompt": "接下来,单击下面的“添加连接器”按钮继续对话!", - "xpack.elasticAssistant.securityAssistant.content.prompts.welcome.welcomeGeneralPrompt": "欢迎使用 Elastic AI 助手!我是您的 100% 开放源代码门户,可帮助您熟练使用 Elastic。一段时间后,我将能够回答问题,并利用 Elastic 中的所有信息提供帮助等。到那时,我希望这个早期预览版本将为您打开思路,为我们的公开协作创造各种可能性。加油!", "xpack.embeddableEnhanced.actions.panelNotifications.manyDrilldowns": "面板有 {count} 个向下钻取", "xpack.embeddableEnhanced.actions.panelNotifications.oneDrilldown": "面板有 1 个向下钻取", "xpack.embeddableEnhanced.Drilldowns": "向下钻取", From a8af108ebfab6fc31db48f3b1f3924ad23795912 Mon Sep 17 00:00:00 2001 From: Elena Stoeva <59341489+ElenaStoeva@users.noreply.github.com> Date: Tue, 9 Jul 2024 13:58:23 +0100 Subject: [PATCH 059/103] [Console] Update Es client for fetching autocomplete metadata (#187774) Fixes https://github.com/elastic/kibana/issues/186896 ## Summary This PR changes the Es client used for fetching autocomplete data from `asInternalUser` to `asCurrentUser`. This will exposing only suggestions for indices/data streams/templates/etc. which the current user has access to. How to test: 1. Start Es and Kibana 2. Create a new index 3. Create a new role: - Cluster privileges: `all` - Run As privileges: `elastic` - Index privileges: add only the index created from the previous step and add `all` privileges for it - Kibana privileges: All privileges for all spaces and all features 4. Create a user that has the created role from the previous step 5. Log in with the new user 6. Go to Console and start typing `GET ` and verify that only the created test index is suggested. Typing `GET .` shouldn't suggest anything as the current user doesn't have access to the hidden indices. --- .../api/console/autocomplete_entities/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/console/server/routes/api/console/autocomplete_entities/index.ts b/src/plugins/console/server/routes/api/console/autocomplete_entities/index.ts index 2d19de0a56e749..677e4b93797c65 100644 --- a/src/plugins/console/server/routes/api/console/autocomplete_entities/index.ts +++ b/src/plugins/console/server/routes/api/console/autocomplete_entities/index.ts @@ -16,7 +16,7 @@ const MAX_RESPONSE_SIZE = 10 * 1024 * 1024; // 10MB const getMappings = async (settings: SettingsToRetrieve, esClient: IScopedClusterClient) => { if (settings.fields && settings.fieldsIndices) { - const mappings = await esClient.asInternalUser.indices.getMapping( + const mappings = await esClient.asCurrentUser.indices.getMapping( { index: settings.fieldsIndices, }, @@ -33,7 +33,7 @@ const getMappings = async (settings: SettingsToRetrieve, esClient: IScopedCluste const getAliases = async (settings: SettingsToRetrieve, esClient: IScopedClusterClient) => { if (settings.indices) { - const aliases = await esClient.asInternalUser.indices.getAlias(); + const aliases = await esClient.asCurrentUser.indices.getAlias(); return aliases; } // If the user doesn't want autocomplete suggestions, then clear any that exist. @@ -42,7 +42,7 @@ const getAliases = async (settings: SettingsToRetrieve, esClient: IScopedCluster const getDataStreams = async (settings: SettingsToRetrieve, esClient: IScopedClusterClient) => { if (settings.dataStreams) { - const dataStreams = await esClient.asInternalUser.indices.getDataStream(); + const dataStreams = await esClient.asCurrentUser.indices.getDataStream(); return dataStreams; } // If the user doesn't want autocomplete suggestions, then clear any that exist. @@ -51,7 +51,7 @@ const getDataStreams = async (settings: SettingsToRetrieve, esClient: IScopedClu const getLegacyTemplates = async (settings: SettingsToRetrieve, esClient: IScopedClusterClient) => { if (settings.templates) { - const legacyTemplates = await esClient.asInternalUser.indices.getTemplate(); + const legacyTemplates = await esClient.asCurrentUser.indices.getTemplate(); return legacyTemplates; } // If the user doesn't want autocomplete suggestions, then clear any that exist. @@ -60,7 +60,7 @@ const getLegacyTemplates = async (settings: SettingsToRetrieve, esClient: IScope const getIndexTemplates = async (settings: SettingsToRetrieve, esClient: IScopedClusterClient) => { if (settings.templates) { - const indexTemplates = await esClient.asInternalUser.indices.getIndexTemplate(); + const indexTemplates = await esClient.asCurrentUser.indices.getIndexTemplate(); return indexTemplates; } // If the user doesn't want autocomplete suggestions, then clear any that exist. @@ -72,7 +72,7 @@ const getComponentTemplates = async ( esClient: IScopedClusterClient ) => { if (settings.templates) { - const componentTemplates = await esClient.asInternalUser.cluster.getComponentTemplate(); + const componentTemplates = await esClient.asCurrentUser.cluster.getComponentTemplate(); return componentTemplates; } // If the user doesn't want autocomplete suggestions, then clear any that exist. From af2183e6a9ef2a66b5c89fe1d84ae498f8b190c2 Mon Sep 17 00:00:00 2001 From: Vadim Kibana <82822460+vadimkibana@users.noreply.github.com> Date: Tue, 9 Jul 2024 15:06:57 +0200 Subject: [PATCH 060/103] [ES|QL] Do not fail validation on ES|QL parameters (#187825) ## Summary Closes https://github.com/elastic/kibana/issues/186527 - Now validation does not error on param usage in function arguments or expressions. ### Checklist Delete any items that are not applicable to this PR. - [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 ### 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) --- packages/kbn-esql-ast/index.ts | 1 + .../src/shared/helpers.ts | 10 ++++- .../__tests__/validation.params.test.ts | 43 +++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 packages/kbn-esql-validation-autocomplete/src/validation/__tests__/validation.params.test.ts diff --git a/packages/kbn-esql-ast/index.ts b/packages/kbn-esql-ast/index.ts index fc129c5c6fac3a..6c8cd3c23e50b3 100644 --- a/packages/kbn-esql-ast/index.ts +++ b/packages/kbn-esql-ast/index.ts @@ -22,6 +22,7 @@ export type { ESQLSource, ESQLColumn, ESQLLiteral, + ESQLParamLiteral, AstProviderFn, EditorError, ESQLAstNode, diff --git a/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts b/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts index effd6b1b16ddda..32bd23e3934313 100644 --- a/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts +++ b/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts @@ -17,7 +17,7 @@ import type { ESQLSource, ESQLTimeInterval, } from '@kbn/esql-ast'; -import { ESQLInlineCast } from '@kbn/esql-ast/src/types'; +import { ESQLInlineCast, ESQLParamLiteral } from '@kbn/esql-ast/src/types'; import { statsAggregationFunctionDefinitions } from '../definitions/aggs'; import { builtinFunctions } from '../definitions/builtin'; import { commandDefinitions } from '../definitions/commands'; @@ -407,7 +407,7 @@ export function checkFunctionArgMatchesDefinition( parentCommand?: string ) { const argType = parameterDefinition.type; - if (argType === 'any') { + if (argType === 'any' || isParam(arg)) { return true; } if (arg.type === 'literal') { @@ -575,3 +575,9 @@ export function shouldBeQuotedText( export const isAggFunction = (arg: ESQLFunction): boolean => getFunctionDefinition(arg.name)?.type === 'agg'; + +export const isParam = (x: unknown): x is ESQLParamLiteral => + !!x && + typeof x === 'object' && + (x as ESQLParamLiteral).type === 'literal' && + (x as ESQLParamLiteral).literalType === 'param'; diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/validation.params.test.ts b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/validation.params.test.ts new file mode 100644 index 00000000000000..17f91a72c52a41 --- /dev/null +++ b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/validation.params.test.ts @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { setup } from './helpers'; + +test('should allow param inside agg function argument', async () => { + const { validate } = await setup(); + + const res1 = await validate('FROM index | STATS avg(?)'); + const res2 = await validate('FROM index | STATS avg(?named)'); + const res3 = await validate('FROM index | STATS avg(?123)'); + + expect(res1).toMatchObject({ errors: [], warnings: [] }); + expect(res2).toMatchObject({ errors: [], warnings: [] }); + expect(res3).toMatchObject({ errors: [], warnings: [] }); +}); + +test('allow params in WHERE command expressions', async () => { + const { validate } = await setup(); + + const res1 = await validate('FROM index | WHERE stringField >= ?earliest'); + const res2 = await validate(` + FROM index + | WHERE stringField >= ?earliest + | WHERE stringField <= ?0 + | WHERE stringField == ? + `); + const res3 = await validate(` + FROM index + | WHERE stringField >= ?earliest + AND stringField <= ?0 + AND stringField == ? + `); + + expect(res1).toMatchObject({ errors: [], warnings: [] }); + expect(res2).toMatchObject({ errors: [], warnings: [] }); + expect(res3).toMatchObject({ errors: [], warnings: [] }); +}); From 59db0f104174a3e72d70257d623c24ab5cc2481b Mon Sep 17 00:00:00 2001 From: Julia Bardi <90178898+juliaElastic@users.noreply.github.com> Date: Tue, 9 Jul 2024 15:11:16 +0200 Subject: [PATCH 061/103] [Fleet] Small UI tweaks for reusable integration policies (#187832) ## Summary Relates https://github.com/elastic/kibana/issues/75867 Change to `Agent policy` to `Agent policies` in a few places. image image image ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --- .../components/steps/step_select_agent_policy.tsx | 4 ++-- .../components/package_policies/package_policies_table.tsx | 2 +- .../sections/epm/screens/detail/policies/package_policies.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_agent_policy.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_agent_policy.tsx index 84783ecda8cad6..349105eafee4ce 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_agent_policy.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_agent_policy.tsx @@ -195,7 +195,7 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{

@@ -218,7 +218,7 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx index e9bbde2520837a..2cecdf37f30f59 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx @@ -113,7 +113,7 @@ export const PackagePoliciesTable: React.FunctionComponent = ({ sortable: true, truncateText: true, name: i18n.translate('xpack.fleet.policyDetails.packagePoliciesTable.nameColumnTitle', { - defaultMessage: 'Name', + defaultMessage: 'Integration policy', }), render: (value: string, packagePolicy: InMemoryPackagePolicy) => ( diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/package_policies.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/package_policies.tsx index cc91af6a873a8e..aa86607a84ee50 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/package_policies.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/package_policies.tsx @@ -230,7 +230,7 @@ export const PackagePoliciesPage = ({ name, version }: PackagePoliciesPanelProps { field: 'packagePolicy.policy_ids', name: i18n.translate('xpack.fleet.epm.packageDetails.integrationList.agentPolicy', { - defaultMessage: 'Agent policy', + defaultMessage: 'Agent policies', }), truncateText: true, render(id, { agentPolicies, packagePolicy }) { From f484acad1171c42dd67ba2ed8fb6602d8c2f5635 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Tue, 9 Jul 2024 23:42:00 +1000 Subject: [PATCH 062/103] Update kubernetes templates for elastic-agent (#187612) Automated by https://buildkite.com/elastic/elastic-agent/builds/10175 --- .../plugins/fleet/server/services/elastic_agent_manifest.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts b/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts index 8e471800763380..4b7068336bbc50 100644 --- a/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts +++ b/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts @@ -351,9 +351,6 @@ spec: effect: NoSchedule serviceAccountName: elastic-agent hostNetwork: true - # 'hostPID: true' enables the Elastic Security integration to observe all process exec events on the host. - # Sharing the host process ID namespace gives visibility of all processes running on the same host. - hostPID: true dnsPolicy: ClusterFirstWithHostNet containers: - name: elastic-agent @@ -469,7 +466,7 @@ spec: hostPath: path: /var/lib # Mount /etc/machine-id from the host to determine host ID - # Needed for Elastic Security integration + # Needed for Kubernetes node autodiscovery - name: etc-mid hostPath: path: /etc/machine-id From ff9a48edbe43de5075b113f280de63f5c099d078 Mon Sep 17 00:00:00 2001 From: Sid Date: Tue, 9 Jul 2024 15:43:17 +0200 Subject: [PATCH 063/103] [Security in Core] Exposes `apiKeys` from `core.security.authc` (#186910) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Expose `apiKeys` as a service under `core.security.authc.apiKeys`. Closes https://github.com/elastic/kibana/issues/184764 ### Details PR introduces a new API Keys Service which is accessible under the `authc` namespace in core.security. The service exposes the public API that was already available on the server-side in the security plugin. The service is initialized and registered with core using the `delegate_api` - allowing access to the service within the core plugin without the need for the `security` plugin. Note: I had to move quite a few types/functions around to prevent cyclical dependencies. ### Plugins and the APIs that use the current `apiKeys` function from the security plugin
Expand for table with details | Plugin | File | API used | Can be migrated | |--------|--------|--------|--------| | alerting | x-pack/plugins/alerting/plugin/server.ts | areApiKeysEnabled() | ✅ | | | x-pack/plugins/alerting/server/rules_client_factory.ts | grantAsInternalUser() | ❌ | | | x-pack/plugins/alerting/server/task.ts | invalidatedAsInternalUser() | ❌ | | enterprise_search | x-pack/plugins/enterprise_search/server/routes/enterprise_search/api_keys | create() | ✅ | | | x-pack/plugins/enterprise_search/server/lib/indices/create_api_key.ts | create() | ✅ | | fleet | x-pack/plugins/fleet/server/routes/setup/handlers.ts | areApiKeysEnabled() | ✅ | | | x-pack/plugins/fleet/server/services/api_keys/security | invalidateAsInternalUser() | ❌ | | | x-pack/plugins/fleet/server/services/api_keys/transform_api_keys.ts | grantAsInternalUser() | ❌ | | | x-pack/plugins/fleet/server/services/setup/fleet_server_policies_enrollment_keys.ts | areApiKeysEnabled() | ✅ | | | x-pack/plugins/fleet/server/services/setup/fleet_server_policies_enrollment_keys.ts | areAPIKeysEnabled() | ✅ | | | x-pack/plugins/observability_solution/apm/server/routes/agent_keys/get_agent_keys_privileges.ts | areAPIKeysEnabled() | ✅ | | observability_solution | x-pack/plugins/observability_solution/entity_manager/server/lib/auth/api_key/api_key.ts | areAPIKeysEnabled | ✅ | | | | validate | ✅ | | | | grantAsInternalUser | ❌ | | | x-pack/plugins/observability_solution/entity_manager/server/routes/enablement/disable.ts | invalidateAsInternalUser | ❌ | | | x-pack/plugins/observability_solution/entity_manager/server/routes/enablement/enable.ts | invalidateAsInternalUser | ❌ | | | x-pack/plugins/observability_solution/observability_onboarding/server/routes/flow/route.ts | create | ✅ | | | x-pack/plugins/observability_solution/synthetics/server/routes/synthetics_service/enablement.ts | invalidateAsInternalUser | ❌ | | | x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_api_key.ts | validate | ✅ | | | | areAPIKeysEnabled | ✅ | | | | grantAsInternalUser | ❌ | | | | create | ✅ | | serverless_search | x-pack/plugins/serverless_search/server/routes/api_key_routes.ts | create | ✅ | | | x-pack/plugins/transform/server/routes/api/reauthorize_transforms/route_handler_factory.ts | grantAsInternalUser | ❌ | | | x-pack/plugins/upgrade_assistant/server/lib/reindexing/credential_store.ts | grantAsInternalUser | ❌ | | | | invalidateAsInternalUser | ❌ | | | | areAPIKeysEnabled() | ✅ |
--------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine --- .../src/security_route_handler_context.ts | 10 + .../src/utils/convert_security_api.test.ts | 11 + .../src/utils/default_implementation.test.ts | 9 + .../src/utils/default_implementation.ts | 13 + .../core-security-server-mocks/index.ts | 1 + .../src}/api_keys.mock.ts | 11 +- .../src/security_service.mock.ts | 10 + .../security/core-security-server/index.ts | 22 ++ .../core-security-server/src/authc.ts | 2 + .../src/authentication/api_keys/api_keys.ts | 268 ++++++++++++++++++ .../api_keys/api_keys_context.ts | 64 +++++ .../src/authentication/api_keys/index.ts | 27 ++ .../src/request_handler_context.ts | 3 + .../core-security-server/src/roles/index.ts | 9 + .../core-security-server/src/roles/schema.ts | 42 +++ .../security/plugin_types_server/index.ts | 38 ++- .../src/authentication/api_keys/api_keys.ts | 222 +++------------ .../src/authentication/api_keys/index.ts | 17 -- .../authentication/authentication_service.ts | 7 +- .../src/authentication/index.ts | 21 +- .../src/authorization/index.ts | 1 - .../plugin_types_server/tsconfig.json | 3 +- .../authentication/api_keys/api_keys.test.ts | 20 +- .../authentication/api_keys/api_keys.ts | 32 +-- .../authentication_service.mock.ts | 2 +- .../authentication/authentication_service.ts | 1 - .../server/build_delegate_apis.test.ts | 15 + .../security/server/build_delegate_apis.ts | 11 + x-pack/plugins/security/server/mocks.ts | 7 +- x-pack/plugins/security/server/plugin.ts | 12 +- x-pack/plugins/security/tsconfig.json | 2 +- 31 files changed, 644 insertions(+), 269 deletions(-) rename {x-pack/plugins/security/server/authentication/api_keys => packages/core/security/core-security-server-mocks/src}/api_keys.mock.ts (59%) create mode 100644 packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts create mode 100644 packages/core/security/core-security-server/src/authentication/api_keys/api_keys_context.ts create mode 100644 packages/core/security/core-security-server/src/authentication/api_keys/index.ts create mode 100644 packages/core/security/core-security-server/src/roles/index.ts create mode 100644 packages/core/security/core-security-server/src/roles/schema.ts diff --git a/packages/core/security/core-security-server-internal/src/security_route_handler_context.ts b/packages/core/security/core-security-server-internal/src/security_route_handler_context.ts index 4fa328782dd0ed..bae1c11d152a48 100644 --- a/packages/core/security/core-security-server-internal/src/security_route_handler_context.ts +++ b/packages/core/security/core-security-server-internal/src/security_route_handler_context.ts @@ -26,6 +26,16 @@ export class CoreSecurityRouteHandlerContext implements SecurityRequestHandlerCo if (this.#authc == null) { this.#authc = { getCurrentUser: () => this.securityStart.authc.getCurrentUser(this.request), + apiKeys: { + areAPIKeysEnabled: () => this.securityStart.authc.apiKeys.areAPIKeysEnabled(), + create: (createParams) => + this.securityStart.authc.apiKeys.create(this.request, createParams), + update: (updateParams) => + this.securityStart.authc.apiKeys.update(this.request, updateParams), + validate: (apiKeyParams) => this.securityStart.authc.apiKeys.validate(apiKeyParams), + invalidate: (apiKeyParams) => + this.securityStart.authc.apiKeys.invalidate(this.request, apiKeyParams), + }, }; } return this.#authc; diff --git a/packages/core/security/core-security-server-internal/src/utils/convert_security_api.test.ts b/packages/core/security/core-security-server-internal/src/utils/convert_security_api.test.ts index 7c2e49092f73e5..40d9e788ea01be 100644 --- a/packages/core/security/core-security-server-internal/src/utils/convert_security_api.test.ts +++ b/packages/core/security/core-security-server-internal/src/utils/convert_security_api.test.ts @@ -15,6 +15,16 @@ describe('convertSecurityApi', () => { const source: CoreSecurityDelegateContract = { authc: { getCurrentUser: jest.fn(), + apiKeys: { + areAPIKeysEnabled: jest.fn(), + areCrossClusterAPIKeysEnabled: jest.fn(), + validate: jest.fn(), + invalidate: jest.fn(), + invalidateAsInternalUser: jest.fn(), + grantAsInternalUser: jest.fn(), + create: jest.fn(), + update: jest.fn(), + }, }, audit: { asScoped: jest.fn().mockReturnValue(createAuditLoggerMock.create()), @@ -23,6 +33,7 @@ describe('convertSecurityApi', () => { }; const output = convertSecurityApi(source); expect(output.authc.getCurrentUser).toBe(source.authc.getCurrentUser); + expect(output.authc.apiKeys).toBe(source.authc.apiKeys); expect(output.audit.asScoped).toBe(source.audit.asScoped); expect(output.audit.withoutRequest).toBe(source.audit.withoutRequest); }); diff --git a/packages/core/security/core-security-server-internal/src/utils/default_implementation.test.ts b/packages/core/security/core-security-server-internal/src/utils/default_implementation.test.ts index e4348404671b92..bc7fac96b7dd32 100644 --- a/packages/core/security/core-security-server-internal/src/utils/default_implementation.test.ts +++ b/packages/core/security/core-security-server-internal/src/utils/default_implementation.test.ts @@ -23,6 +23,15 @@ describe('getDefaultSecurityImplementation', () => { }); }); + describe('authc.apiKeys', () => { + it('returns stub object', async () => { + const { apiKeys } = implementation.authc; + const areAPIKeysEnabled = await apiKeys.areAPIKeysEnabled(); + + expect(areAPIKeysEnabled).toBe(false); + }); + }); + describe('audit.asScoped', () => { it('returns null', async () => { const logger = implementation.audit.asScoped({} as any); diff --git a/packages/core/security/core-security-server-internal/src/utils/default_implementation.ts b/packages/core/security/core-security-server-internal/src/utils/default_implementation.ts index 91819807f10647..8eaeb7b2577b56 100644 --- a/packages/core/security/core-security-server-internal/src/utils/default_implementation.ts +++ b/packages/core/security/core-security-server-internal/src/utils/default_implementation.ts @@ -8,10 +8,23 @@ import type { CoreSecurityDelegateContract } from '@kbn/core-security-server'; +const API_KEYS_DISABLED_ERROR = new Error('API keys are disabled'); +const REJECT_WHEN_API_KEYS_DISABLED = () => Promise.reject(API_KEYS_DISABLED_ERROR); + export const getDefaultSecurityImplementation = (): CoreSecurityDelegateContract => { return { authc: { getCurrentUser: () => null, + apiKeys: { + areAPIKeysEnabled: () => Promise.resolve(false), + areCrossClusterAPIKeysEnabled: () => Promise.resolve(false), + create: REJECT_WHEN_API_KEYS_DISABLED, + update: REJECT_WHEN_API_KEYS_DISABLED, + grantAsInternalUser: REJECT_WHEN_API_KEYS_DISABLED, + validate: REJECT_WHEN_API_KEYS_DISABLED, + invalidate: REJECT_WHEN_API_KEYS_DISABLED, + invalidateAsInternalUser: REJECT_WHEN_API_KEYS_DISABLED, + }, }, audit: { asScoped: () => { diff --git a/packages/core/security/core-security-server-mocks/index.ts b/packages/core/security/core-security-server-mocks/index.ts index 23c49282252f0c..c834759973c1ea 100644 --- a/packages/core/security/core-security-server-mocks/index.ts +++ b/packages/core/security/core-security-server-mocks/index.ts @@ -9,3 +9,4 @@ export { securityServiceMock } from './src/security_service.mock'; export type { InternalSecurityStartMock, SecurityStartMock } from './src/security_service.mock'; export { auditLoggerMock } from './src/audit.mock'; +export { apiKeysMock } from './src/api_keys.mock'; diff --git a/x-pack/plugins/security/server/authentication/api_keys/api_keys.mock.ts b/packages/core/security/core-security-server-mocks/src/api_keys.mock.ts similarity index 59% rename from x-pack/plugins/security/server/authentication/api_keys/api_keys.mock.ts rename to packages/core/security/core-security-server-mocks/src/api_keys.mock.ts index cfa857ca833a2c..108f8380264e6e 100644 --- a/x-pack/plugins/security/server/authentication/api_keys/api_keys.mock.ts +++ b/packages/core/security/core-security-server-mocks/src/api_keys.mock.ts @@ -1,16 +1,15 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ -import type { PublicMethodsOf } from '@kbn/utility-types'; - -import type { APIKeys } from './api_keys'; +import type { APIKeysService } from '@kbn/core-security-server'; export const apiKeysMock = { - create: (): jest.Mocked> => ({ + create: (): jest.MockedObjectDeep => ({ areAPIKeysEnabled: jest.fn(), areCrossClusterAPIKeysEnabled: jest.fn(), create: jest.fn(), diff --git a/packages/core/security/core-security-server-mocks/src/security_service.mock.ts b/packages/core/security/core-security-server-mocks/src/security_service.mock.ts index d833048990ff5e..86a39af3b16d59 100644 --- a/packages/core/security/core-security-server-mocks/src/security_service.mock.ts +++ b/packages/core/security/core-security-server-mocks/src/security_service.mock.ts @@ -15,6 +15,7 @@ import type { InternalSecurityServiceSetup, InternalSecurityServiceStart, } from '@kbn/core-security-server-internal'; +import { apiKeysMock } from './api_keys.mock'; import { auditServiceMock, type MockedAuditService } from './audit.mock'; import { mockAuthenticatedUser, MockAuthenticatedUserProps } from '@kbn/core-security-common/mocks'; @@ -35,6 +36,7 @@ const createStartMock = (): SecurityStartMock => { const mock = { authc: { getCurrentUser: jest.fn(), + apiKeys: apiKeysMock.create(), }, audit: auditServiceMock.create(), }; @@ -61,6 +63,7 @@ const createInternalStartMock = (): InternalSecurityStartMock => { const mock = { authc: { getCurrentUser: jest.fn(), + apiKeys: apiKeysMock.create(), }, audit: auditServiceMock.create(), }; @@ -82,6 +85,13 @@ const createRequestHandlerContextMock = () => { const mock: jest.MockedObjectDeep = { authc: { getCurrentUser: jest.fn(), + apiKeys: { + areAPIKeysEnabled: jest.fn(), + create: jest.fn(), + update: jest.fn(), + validate: jest.fn(), + invalidate: jest.fn(), + }, }, audit: { logger: { diff --git a/packages/core/security/core-security-server/index.ts b/packages/core/security/core-security-server/index.ts index 6a111ab6e27ab7..b5dd091c7b87ae 100644 --- a/packages/core/security/core-security-server/index.ts +++ b/packages/core/security/core-security-server/index.ts @@ -26,4 +26,26 @@ export type { AuditRequest, } from './src/audit_logging/audit_events'; export type { AuditLogger } from './src/audit_logging/audit_logger'; + +export type { + APIKeysServiceWithContext, + APIKeysService, + CreateAPIKeyParams, + CreateAPIKeyResult, + InvalidateAPIKeyResult, + InvalidateAPIKeysParams, + ValidateAPIKeyParams, + CreateRestAPIKeyParams, + CreateRestAPIKeyWithKibanaPrivilegesParams, + CreateCrossClusterAPIKeyParams, + GrantAPIKeyResult, + UpdateAPIKeyParams, + UpdateAPIKeyResult, + UpdateCrossClusterAPIKeyParams, + UpdateRestAPIKeyParams, + UpdateRestAPIKeyWithKibanaPrivilegesParams, +} from './src/authentication/api_keys'; + +export type { KibanaPrivilegesType, ElasticsearchPrivilegesType } from './src/roles'; +export { isCreateRestAPIKeyParams } from './src/authentication/api_keys'; export type { CoreFipsService } from './src/fips'; diff --git a/packages/core/security/core-security-server/src/authc.ts b/packages/core/security/core-security-server/src/authc.ts index 97654104858eae..85ba4fc71542a1 100644 --- a/packages/core/security/core-security-server/src/authc.ts +++ b/packages/core/security/core-security-server/src/authc.ts @@ -8,6 +8,7 @@ import type { KibanaRequest } from '@kbn/core-http-server'; import type { AuthenticatedUser } from '@kbn/core-security-common'; +import type { APIKeysService } from './authentication/api_keys'; /** * Core's authentication service @@ -22,4 +23,5 @@ export interface CoreAuthenticationService { * @param request The request to retrieve the authenticated user for. */ getCurrentUser(request: KibanaRequest): AuthenticatedUser | null; + apiKeys: APIKeysService; } diff --git a/packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts b/packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts new file mode 100644 index 00000000000000..e842c38d8674d1 --- /dev/null +++ b/packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts @@ -0,0 +1,268 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { estypes } from '@elastic/elasticsearch'; + +import type { KibanaRequest } from '@kbn/core-http-server'; + +import { ElasticsearchPrivilegesType, KibanaPrivilegesType } from '../../roles'; + +/** + * Interface for managing API keys in Elasticsearch, including creation, + * validation, and invalidation of API keys, + * as well as checking the status of API key features. + */ +export interface APIKeys { + /** + * Determines if API Keys are enabled in Elasticsearch. + */ + areAPIKeysEnabled(): Promise; + + /** + * Determines if Cross-Cluster API Keys are enabled in Elasticsearch. + */ + areCrossClusterAPIKeysEnabled(): Promise; + + /** + * Tries to create an API key for the current user. + * + * Returns newly created API key or `null` if API keys are disabled. + * + * User needs `manage_api_key` privilege to create REST API keys and `manage_security` for Cross-Cluster API keys. + * + * @param request Request instance. + * @param createParams The params to create an API key + */ + create( + request: KibanaRequest, + createParams: CreateAPIKeyParams + ): Promise; + + /** + * Attempts update an API key with the provided 'role_descriptors' and 'metadata' + * + * Returns `updated`, `true` if the update was successful, `false` if there was nothing to update + * + * User needs `manage_api_key` privilege to update REST API keys and `manage_security` for cross-cluster API keys. + * + * @param request Request instance. + * @param updateParams The params to edit an API key + */ + update( + request: KibanaRequest, + updateParams: UpdateAPIKeyParams + ): Promise; + + /** + * Tries to grant an API key for the current user. + * @param request Request instance. + * @param createParams Create operation parameters. + */ + grantAsInternalUser( + request: KibanaRequest, + createParams: CreateRestAPIKeyParams | CreateRestAPIKeyWithKibanaPrivilegesParams + ): Promise; + + /** + * Tries to validate an API key. + * @param apiKeyPrams ValidateAPIKeyParams. + */ + validate(apiKeyPrams: ValidateAPIKeyParams): Promise; + + /** + * Tries to invalidate an API keys. + * @param request Request instance. + * @param params The params to invalidate an API keys. + */ + invalidate( + request: KibanaRequest, + params: InvalidateAPIKeysParams + ): Promise; + + /** + * Tries to invalidate the API keys by using the internal user. + * @param params The params to invalidate the API keys. + */ + invalidateAsInternalUser(params: InvalidateAPIKeysParams): Promise; +} + +export type CreateAPIKeyParams = + | CreateRestAPIKeyParams + | CreateRestAPIKeyWithKibanaPrivilegesParams + | CreateCrossClusterAPIKeyParams; + +/** + * Response of Kibana Create API key endpoint. + */ +export type CreateAPIKeyResult = estypes.SecurityCreateApiKeyResponse; + +export interface CreateRestAPIKeyParams { + type?: 'rest'; + expiration?: string; + name: string; + role_descriptors: Record; + metadata?: { [key: string]: any }; +} + +export interface CreateRestAPIKeyWithKibanaPrivilegesParams { + type?: 'rest'; + expiration?: string; + name: string; + metadata?: { [key: string]: any }; + kibana_role_descriptors: Record< + string, + { + elasticsearch: ElasticsearchPrivilegesType & { [key: string]: unknown }; + kibana: KibanaPrivilegesType; + } + >; +} + +export interface CreateCrossClusterAPIKeyParams { + type: 'cross_cluster'; + expiration?: string; + name: string; + metadata?: { [key: string]: any }; + access: { + search?: Array<{ + names: string[]; + query?: unknown; + field_security?: unknown; + allow_restricted_indices?: boolean; + }>; + replication?: Array<{ + names: string[]; + }>; + }; +} + +export interface GrantAPIKeyResult { + /** + * Unique id for this API key + */ + id: string; + /** + * Name for this API key + */ + name: string; + /** + * Generated API key + */ + api_key: string; +} + +/** + * Represents the parameters for validating API Key credentials. + */ +export interface ValidateAPIKeyParams { + /** + * Unique id for this API key + */ + id: string; + + /** + * Generated API Key (secret) + */ + api_key: string; +} + +/** + * Represents the params for invalidating multiple API keys + */ +export interface InvalidateAPIKeysParams { + /** + * List of unique API key IDs + */ + ids: string[]; +} + +/** + * The return value when invalidating an API key in Elasticsearch. + */ +export interface InvalidateAPIKeyResult { + /** + * The IDs of the API keys that were invalidated as part of the request. + */ + invalidated_api_keys: string[]; + /** + * The IDs of the API keys that were already invalidated. + */ + previously_invalidated_api_keys: string[]; + /** + * The number of errors that were encountered when invalidating the API keys. + */ + error_count: number; + /** + * Details about these errors. This field is not present in the response when error_count is 0. + */ + error_details?: Array<{ + type?: string; + reason?: string; + caused_by?: { + type?: string; + reason?: string; + }; + }>; +} + +/** + * Response of Kibana Update API key endpoint. + */ +export type UpdateAPIKeyResult = estypes.SecurityUpdateApiKeyResponse; + +/** + * Request body of Kibana Update API key endpoint. + */ +export type UpdateAPIKeyParams = + | UpdateRestAPIKeyParams + | UpdateCrossClusterAPIKeyParams + | UpdateRestAPIKeyWithKibanaPrivilegesParams; + +export interface UpdateRestAPIKeyParams { + id: string; + type?: 'rest'; + expiration?: string; + role_descriptors: Record; + metadata?: { [key: string]: any }; +} + +export interface UpdateCrossClusterAPIKeyParams { + id: string; + type: 'cross_cluster'; + expiration?: string; + metadata?: { [key: string]: any }; + access: { + search?: Array<{ + names: string[]; + query?: unknown; + field_security?: unknown; + allow_restricted_indices?: boolean; + }>; + replication?: Array<{ + names: string[]; + }>; + }; +} + +export interface UpdateRestAPIKeyWithKibanaPrivilegesParams { + id: string; + type?: 'rest'; + expiration?: string; + metadata?: { [key: string]: any }; + kibana_role_descriptors: Record< + string, + { + elasticsearch: ElasticsearchPrivilegesType & { [key: string]: unknown }; + kibana: KibanaPrivilegesType; + } + >; +} + +export function isCreateRestAPIKeyParams(params: any): params is CreateRestAPIKeyParams { + return 'role_descriptors' in params; +} diff --git a/packages/core/security/core-security-server/src/authentication/api_keys/api_keys_context.ts b/packages/core/security/core-security-server/src/authentication/api_keys/api_keys_context.ts new file mode 100644 index 00000000000000..7090f7312774f5 --- /dev/null +++ b/packages/core/security/core-security-server/src/authentication/api_keys/api_keys_context.ts @@ -0,0 +1,64 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { + CreateAPIKeyParams, + CreateAPIKeyResult, + UpdateAPIKeyParams, + UpdateAPIKeyResult, + ValidateAPIKeyParams, + InvalidateAPIKeyResult, + InvalidateAPIKeysParams, +} from './api_keys'; + +/** + * Public API Keys service exposed through core context to manage + * API keys in Elasticsearch, including creation, + * validation, and invalidation of API keys, + * as well as checking the status of API key features. + */ +export interface APIKeysServiceWithContext { + /** + * Determines if API Keys are enabled in Elasticsearch. + */ + areAPIKeysEnabled(): Promise; + + /** + * Tries to create an API key for the current user. + * + * Returns newly created API key or `null` if API keys are disabled. + * + * User needs `manage_api_key` privilege to create REST API keys and `manage_security` for Cross-Cluster API keys. + * + * @param createParams The params to create an API key + */ + create(createParams: CreateAPIKeyParams): Promise; + + /** + * Attempts update an API key with the provided 'role_descriptors' and 'metadata' + * + * Returns `updated`, `true` if the update was successful, `false` if there was nothing to update + * + * User needs `manage_api_key` privilege to update REST API keys and `manage_security` for cross-cluster API keys. + * + * @param updateParams The params to edit an API key + */ + update(updateParams: UpdateAPIKeyParams): Promise; + + /** + * Tries to validate an API key. + * @param apiKeyPrams ValidateAPIKeyParams. + */ + validate(apiKeyPrams: ValidateAPIKeyParams): Promise; + + /** + * Tries to invalidate an API keys. + * @param params The params to invalidate an API keys. + */ + invalidate(params: InvalidateAPIKeysParams): Promise; +} diff --git a/packages/core/security/core-security-server/src/authentication/api_keys/index.ts b/packages/core/security/core-security-server/src/authentication/api_keys/index.ts new file mode 100644 index 00000000000000..da7163bb508794 --- /dev/null +++ b/packages/core/security/core-security-server/src/authentication/api_keys/index.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { + APIKeys as APIKeysService, + CreateAPIKeyParams, + CreateAPIKeyResult, + InvalidateAPIKeyResult, + InvalidateAPIKeysParams, + ValidateAPIKeyParams, + CreateRestAPIKeyParams, + CreateRestAPIKeyWithKibanaPrivilegesParams, + CreateCrossClusterAPIKeyParams, + GrantAPIKeyResult, + UpdateAPIKeyParams, + UpdateAPIKeyResult, + UpdateCrossClusterAPIKeyParams, + UpdateRestAPIKeyParams, + UpdateRestAPIKeyWithKibanaPrivilegesParams, +} from './api_keys'; +export type { APIKeysServiceWithContext } from './api_keys_context'; +export { isCreateRestAPIKeyParams } from './api_keys'; diff --git a/packages/core/security/core-security-server/src/request_handler_context.ts b/packages/core/security/core-security-server/src/request_handler_context.ts index 37915c24ddaa1c..6cb13b3afb9a81 100644 --- a/packages/core/security/core-security-server/src/request_handler_context.ts +++ b/packages/core/security/core-security-server/src/request_handler_context.ts @@ -7,7 +7,9 @@ */ import type { AuthenticatedUser } from '@kbn/core-security-common'; + import { AuditLogger } from './audit_logging/audit_logger'; +import type { APIKeysServiceWithContext } from './authentication/api_keys'; export interface SecurityRequestHandlerContext { authc: AuthcRequestHandlerContext; @@ -16,6 +18,7 @@ export interface SecurityRequestHandlerContext { export interface AuthcRequestHandlerContext { getCurrentUser(): AuthenticatedUser | null; + apiKeys: APIKeysServiceWithContext; } export interface AuditRequestHandlerContext { diff --git a/packages/core/security/core-security-server/src/roles/index.ts b/packages/core/security/core-security-server/src/roles/index.ts new file mode 100644 index 00000000000000..420f6780fdd85e --- /dev/null +++ b/packages/core/security/core-security-server/src/roles/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { ElasticsearchPrivilegesType, KibanaPrivilegesType } from './schema'; diff --git a/packages/core/security/core-security-server/src/roles/schema.ts b/packages/core/security/core-security-server/src/roles/schema.ts new file mode 100644 index 00000000000000..693916ef3d9b32 --- /dev/null +++ b/packages/core/security/core-security-server/src/roles/schema.ts @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * Type representing Elasticsearch specific portion of the role definition. + */ +export interface ElasticsearchPrivilegesType { + cluster?: string[]; + remote_cluster?: Array<{ + privileges: string[]; + clusters: string[]; + }>; + indices?: Array<{ + names: string[]; + field_security?: Record<'grant' | 'except', string[]>; + privileges: string[]; + query?: string; + allow_restricted_indices?: boolean; + }>; + remote_indices?: Array<{ + clusters: string[]; + names: string[]; + field_security?: Record<'grant' | 'except', string[]>; + privileges: string[]; + query?: string; + allow_restricted_indices?: boolean; + }>; + run_as?: string[]; +} +/** + * Type representing Kibana specific portion of the role definition. + */ +export type KibanaPrivilegesType = Array<{ + spaces: string[]; + base?: string[]; + feature?: Record; +}>; diff --git a/x-pack/packages/security/plugin_types_server/index.ts b/x-pack/packages/security/plugin_types_server/index.ts index 1228b9d36f961b..21ab0eb2b39af9 100644 --- a/x-pack/packages/security/plugin_types_server/index.ts +++ b/x-pack/packages/security/plugin_types_server/index.ts @@ -14,15 +14,6 @@ export type { AuditLogger, } from './src/audit'; export type { - CreateAPIKeyParams, - CreateAPIKeyResult, - CreateRestAPIKeyParams, - GrantAPIKeyResult, - InvalidateAPIKeysParams, - ValidateAPIKeyParams, - CreateRestAPIKeyWithKibanaPrivilegesParams, - CreateCrossClusterAPIKeyParams, - InvalidateAPIKeyResult, APIKeys, AuthenticationServiceStart, UpdateAPIKeyParams, @@ -39,7 +30,6 @@ export type { CheckPrivilegesWithRequest, CheckSavedObjectsPrivilegesWithRequest, CheckPrivilegesDynamicallyWithRequest, - KibanaPrivilegesType, SavedObjectActions, UIActions, CheckPrivilegesPayload, @@ -51,7 +41,6 @@ export type { CheckPrivilegesOptions, CheckUserProfilesPrivilegesPayload, CheckUserProfilesPrivilegesResponse, - ElasticsearchPrivilegesType, CasesActions, CheckPrivileges, AlertingActions, @@ -72,11 +61,30 @@ export type { } from './src/user_profile'; export { - restApiKeySchema, - getRestApiKeyWithKibanaPrivilegesSchema, getUpdateRestApiKeyWithKibanaPrivilegesSchema, - crossClusterApiKeySchema, updateRestApiKeySchema, updateCrossClusterApiKeySchema, } from './src/authentication'; -export { GLOBAL_RESOURCE, elasticsearchRoleSchema, getKibanaRoleSchema } from './src/authorization'; + +export type { + ElasticsearchPrivilegesType, + KibanaPrivilegesType, + APIKeysService, + CreateAPIKeyParams, + CreateAPIKeyResult, + InvalidateAPIKeyResult, + InvalidateAPIKeysParams, + ValidateAPIKeyParams, + CreateRestAPIKeyParams, + CreateRestAPIKeyWithKibanaPrivilegesParams, + CreateCrossClusterAPIKeyParams, + GrantAPIKeyResult, +} from '@kbn/core-security-server'; +export { isCreateRestAPIKeyParams } from '@kbn/core-security-server'; + +export { + restApiKeySchema, + crossClusterApiKeySchema, + getRestApiKeyWithKibanaPrivilegesSchema, +} from './src/authentication'; +export { getKibanaRoleSchema, elasticsearchRoleSchema, GLOBAL_RESOURCE } from './src/authorization'; diff --git a/x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts b/x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts index 2ced5478b46ebb..c331802c7f6939 100644 --- a/x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts +++ b/x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts @@ -5,153 +5,9 @@ * 2.0. */ -import type { estypes } from '@elastic/elasticsearch'; - -import type { KibanaRequest } from '@kbn/core/server'; -import { schema, TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; import { getKibanaRoleSchema, elasticsearchRoleSchema } from '../../authorization'; -export interface APIKeys { - /** - * Determines if API Keys are enabled in Elasticsearch. - */ - areAPIKeysEnabled(): Promise; - - /** - * Determines if Cross-Cluster API Keys are enabled in Elasticsearch. - */ - areCrossClusterAPIKeysEnabled(): Promise; - - /** - * Tries to create an API key for the current user. - * - * Returns newly created API key or `null` if API keys are disabled. - * - * User needs `manage_api_key` privilege to create REST API keys and `manage_security` for Cross-Cluster API keys. - * - * @param request Request instance. - * @param createParams The params to create an API key - */ - create( - request: KibanaRequest, - createParams: CreateAPIKeyParams - ): Promise; - - /** - * Tries to grant an API key for the current user. - * @param request Request instance. - * @param createParams Create operation parameters. - */ - grantAsInternalUser( - request: KibanaRequest, - createParams: CreateRestAPIKeyParams | CreateRestAPIKeyWithKibanaPrivilegesParams - ): Promise; - - /** - * Tries to validate an API key. - * @param apiKeyPrams ValidateAPIKeyParams. - */ - validate(apiKeyPrams: ValidateAPIKeyParams): Promise; - - /** - * Tries to invalidate an API keys. - * @param request Request instance. - * @param params The params to invalidate an API keys. - */ - invalidate( - request: KibanaRequest, - params: InvalidateAPIKeysParams - ): Promise; - - /** - * Tries to invalidate the API keys by using the internal user. - * @param params The params to invalidate the API keys. - */ - invalidateAsInternalUser(params: InvalidateAPIKeysParams): Promise; -} - -export type CreateAPIKeyParams = - | CreateRestAPIKeyParams - | CreateRestAPIKeyWithKibanaPrivilegesParams - | CreateCrossClusterAPIKeyParams; - -/** - * Response of Kibana Create API key endpoint. - */ -export type CreateAPIKeyResult = estypes.SecurityCreateApiKeyResponse; - -export type CreateRestAPIKeyParams = TypeOf; -export type CreateRestAPIKeyWithKibanaPrivilegesParams = TypeOf< - ReturnType ->; -export type CreateCrossClusterAPIKeyParams = TypeOf; - -export interface GrantAPIKeyResult { - /** - * Unique id for this API key - */ - id: string; - /** - * Name for this API key - */ - name: string; - /** - * Generated API key - */ - api_key: string; -} - -/** - * Represents the parameters for validating API Key credentials. - */ -export interface ValidateAPIKeyParams { - /** - * Unique id for this API key - */ - id: string; - - /** - * Generated API Key (secret) - */ - api_key: string; -} - -/** - * Represents the params for invalidating multiple API keys - */ -export interface InvalidateAPIKeysParams { - ids: string[]; -} - -/** - * The return value when invalidating an API key in Elasticsearch. - */ -export interface InvalidateAPIKeyResult { - /** - * The IDs of the API keys that were invalidated as part of the request. - */ - invalidated_api_keys: string[]; - /** - * The IDs of the API keys that were already invalidated. - */ - previously_invalidated_api_keys: string[]; - /** - * The number of errors that were encountered when invalidating the API keys. - */ - error_count: number; - /** - * Details about these errors. This field is not present in the response when error_count is 0. - */ - error_details?: Array<{ - type?: string; - reason?: string; - caused_by?: { - type?: string; - reason?: string; - }; - }>; -} - export const restApiKeySchema = schema.object({ type: schema.maybe(schema.literal('rest')), name: schema.string(), @@ -165,8 +21,11 @@ export const restApiKeySchema = schema.object({ export const getRestApiKeyWithKibanaPrivilegesSchema = ( getBasePrivilegeNames: Parameters[0] ) => - restApiKeySchema.extends({ - role_descriptors: null, + schema.object({ + type: schema.maybe(schema.literal('rest')), + name: schema.string(), + expiration: schema.maybe(schema.string()), + metadata: schema.maybe(schema.object({}, { unknowns: 'allow' })), kibana_role_descriptors: schema.recordOf( schema.string(), schema.object({ @@ -176,9 +35,11 @@ export const getRestApiKeyWithKibanaPrivilegesSchema = ( ), }); -export const crossClusterApiKeySchema = restApiKeySchema.extends({ +export const crossClusterApiKeySchema = schema.object({ type: schema.literal('cross_cluster'), - role_descriptors: null, + name: schema.string(), + expiration: schema.maybe(schema.string()), + metadata: schema.maybe(schema.object({}, { unknowns: 'allow' })), access: schema.object( { search: schema.maybe( @@ -203,41 +64,52 @@ export const crossClusterApiKeySchema = restApiKeySchema.extends({ ), }); -/** - * Response of Kibana Update API key endpoint. - */ -export type UpdateAPIKeyResult = estypes.SecurityUpdateApiKeyResponse; - -/** - * Request body of Kibana Update API key endpoint. - */ -export type UpdateAPIKeyParams = - | UpdateRestAPIKeyParams - | UpdateCrossClusterAPIKeyParams - | UpdateRestAPIKeyWithKibanaPrivilegesParams; - -export const updateRestApiKeySchema = restApiKeySchema.extends({ - name: null, +export const updateRestApiKeySchema = schema.object({ id: schema.string(), + type: schema.maybe(schema.literal('rest')), + expiration: schema.maybe(schema.string()), + role_descriptors: schema.recordOf(schema.string(), schema.object({}, { unknowns: 'allow' }), { + defaultValue: {}, + }), + metadata: schema.maybe(schema.object({}, { unknowns: 'allow' })), }); -export const updateCrossClusterApiKeySchema = crossClusterApiKeySchema.extends({ - name: null, +export const updateCrossClusterApiKeySchema = schema.object({ id: schema.string(), + type: schema.literal('cross_cluster'), + expiration: schema.maybe(schema.string()), + metadata: schema.maybe(schema.object({}, { unknowns: 'allow' })), + access: schema.object( + { + search: schema.maybe( + schema.arrayOf( + schema.object({ + names: schema.arrayOf(schema.string()), + query: schema.maybe(schema.any()), + field_security: schema.maybe(schema.any()), + allow_restricted_indices: schema.maybe(schema.boolean()), + }) + ) + ), + replication: schema.maybe( + schema.arrayOf( + schema.object({ + names: schema.arrayOf(schema.string()), + }) + ) + ), + }, + { unknowns: 'allow' } + ), }); -export type UpdateRestAPIKeyParams = TypeOf; -export type UpdateCrossClusterAPIKeyParams = TypeOf; -export type UpdateRestAPIKeyWithKibanaPrivilegesParams = TypeOf< - ReturnType ->; - export const getUpdateRestApiKeyWithKibanaPrivilegesSchema = ( getBasePrivilegeNames: Parameters[0] ) => - restApiKeySchema.extends({ - role_descriptors: null, - name: null, + schema.object({ + type: schema.maybe(schema.literal('rest')), + expiration: schema.maybe(schema.string()), + metadata: schema.maybe(schema.object({}, { unknowns: 'allow' })), id: schema.string(), kibana_role_descriptors: schema.recordOf( schema.string(), diff --git a/x-pack/packages/security/plugin_types_server/src/authentication/api_keys/index.ts b/x-pack/packages/security/plugin_types_server/src/authentication/api_keys/index.ts index ec36a99b4da637..16736820525548 100644 --- a/x-pack/packages/security/plugin_types_server/src/authentication/api_keys/index.ts +++ b/x-pack/packages/security/plugin_types_server/src/authentication/api_keys/index.ts @@ -5,23 +5,6 @@ * 2.0. */ -export type { - CreateAPIKeyParams, - CreateAPIKeyResult, - InvalidateAPIKeyResult, - InvalidateAPIKeysParams, - ValidateAPIKeyParams, - CreateRestAPIKeyParams, - CreateRestAPIKeyWithKibanaPrivilegesParams, - CreateCrossClusterAPIKeyParams, - GrantAPIKeyResult, - APIKeys, - UpdateAPIKeyParams, - UpdateAPIKeyResult, - UpdateCrossClusterAPIKeyParams, - UpdateRestAPIKeyParams, - UpdateRestAPIKeyWithKibanaPrivilegesParams, -} from './api_keys'; export { crossClusterApiKeySchema, getRestApiKeyWithKibanaPrivilegesSchema, diff --git a/x-pack/packages/security/plugin_types_server/src/authentication/authentication_service.ts b/x-pack/packages/security/plugin_types_server/src/authentication/authentication_service.ts index 6bc5a73113ae3f..5d066bb6565cad 100644 --- a/x-pack/packages/security/plugin_types_server/src/authentication/authentication_service.ts +++ b/x-pack/packages/security/plugin_types_server/src/authentication/authentication_service.ts @@ -6,14 +6,13 @@ */ import type { KibanaRequest } from '@kbn/core/server'; -import type { AuthenticatedUser } from '@kbn/core-security-common'; - -import type { APIKeys } from './api_keys'; +import type { AuthenticatedUser } from '@kbn/security-plugin-types-common'; +import type { APIKeysService } from '@kbn/core-security-server'; /** * Authentication services available on the security plugin's start contract. */ export interface AuthenticationServiceStart { - apiKeys: APIKeys; + apiKeys: APIKeysService; getCurrentUser: (request: KibanaRequest) => AuthenticatedUser | null; } diff --git a/x-pack/packages/security/plugin_types_server/src/authentication/index.ts b/x-pack/packages/security/plugin_types_server/src/authentication/index.ts index 6e30f9ebcec24f..4a5e7da782baf8 100644 --- a/x-pack/packages/security/plugin_types_server/src/authentication/index.ts +++ b/x-pack/packages/security/plugin_types_server/src/authentication/index.ts @@ -5,29 +5,22 @@ * 2.0. */ +export type { AuthenticationServiceStart } from './authentication_service'; + export type { - CreateAPIKeyParams, - CreateAPIKeyResult, - CreateRestAPIKeyParams, - CreateRestAPIKeyWithKibanaPrivilegesParams, - CreateCrossClusterAPIKeyParams, - InvalidateAPIKeyResult, - InvalidateAPIKeysParams, - ValidateAPIKeyParams, - APIKeys, - GrantAPIKeyResult, + APIKeysService as APIKeys, UpdateAPIKeyParams, UpdateAPIKeyResult, UpdateCrossClusterAPIKeyParams, UpdateRestAPIKeyParams, UpdateRestAPIKeyWithKibanaPrivilegesParams, -} from './api_keys'; -export type { AuthenticationServiceStart } from './authentication_service'; +} from '@kbn/core-security-server'; + export { - restApiKeySchema, + crossClusterApiKeySchema, getRestApiKeyWithKibanaPrivilegesSchema, getUpdateRestApiKeyWithKibanaPrivilegesSchema, - crossClusterApiKeySchema, + restApiKeySchema, updateRestApiKeySchema, updateCrossClusterApiKeySchema, } from './api_keys'; diff --git a/x-pack/packages/security/plugin_types_server/src/authorization/index.ts b/x-pack/packages/security/plugin_types_server/src/authorization/index.ts index 54364d7817f31e..baeeeddc1fa746 100644 --- a/x-pack/packages/security/plugin_types_server/src/authorization/index.ts +++ b/x-pack/packages/security/plugin_types_server/src/authorization/index.ts @@ -42,7 +42,6 @@ export type { PrivilegeDeprecationsRolesByFeatureIdResponse, } from './deprecations'; export type { AuthorizationMode } from './mode'; -export type { ElasticsearchPrivilegesType, KibanaPrivilegesType } from './role_schema'; export { GLOBAL_RESOURCE } from './constants'; export { elasticsearchRoleSchema, getKibanaRoleSchema } from './role_schema'; diff --git a/x-pack/packages/security/plugin_types_server/tsconfig.json b/x-pack/packages/security/plugin_types_server/tsconfig.json index 04ed00229a3de3..2f4ae387ac2b59 100644 --- a/x-pack/packages/security/plugin_types_server/tsconfig.json +++ b/x-pack/packages/security/plugin_types_server/tsconfig.json @@ -10,11 +10,10 @@ "target/**/*" ], "kbn_references": [ - "@kbn/config-schema", "@kbn/core", "@kbn/security-plugin-types-common", "@kbn/core-user-profile-server", "@kbn/core-security-server", - "@kbn/core-security-common" + "@kbn/config-schema", ] } diff --git a/x-pack/plugins/security/server/authentication/api_keys/api_keys.test.ts b/x-pack/plugins/security/server/authentication/api_keys/api_keys.test.ts index 7c63ace9fc7069..198bc004ecb607 100644 --- a/x-pack/plugins/security/server/authentication/api_keys/api_keys.test.ts +++ b/x-pack/plugins/security/server/authentication/api_keys/api_keys.test.ts @@ -30,6 +30,7 @@ describe('API Keys', () => { >; let mockLicense: jest.Mocked; let logger: Logger; + const roleDescriptors: { [key: string]: any } = { foo: true }; beforeEach(() => { mockValidateKibanaPrivileges.mockReset().mockReturnValue({ validationErrors: [] }); @@ -239,9 +240,10 @@ describe('API Keys', () => { }); const result = await apiKeys.create(httpServerMock.createKibanaRequest(), { name: 'key-name', - role_descriptors: { foo: true }, + role_descriptors: roleDescriptors, expiration: '1d', }); + expect(result).toEqual({ api_key: 'abc123', expiration: '1d', @@ -253,7 +255,7 @@ describe('API Keys', () => { expect(mockScopedClusterClient.asCurrentUser.security.createApiKey).toHaveBeenCalledWith({ body: { name: 'key-name', - role_descriptors: { foo: true }, + role_descriptors: roleDescriptors, expiration: '1d', }, }); @@ -343,7 +345,7 @@ describe('API Keys', () => { const result = await apiKeys.update(httpServerMock.createKibanaRequest(), { id: 'test_id', - role_descriptors: { foo: true }, + role_descriptors: roleDescriptors, metadata: {}, }); @@ -370,7 +372,7 @@ describe('API Keys', () => { const result = await apiKeys.update(httpServerMock.createKibanaRequest(), { id: 'test_id', - role_descriptors: { foo: true }, + role_descriptors: roleDescriptors, metadata: {}, }); @@ -473,7 +475,7 @@ describe('API Keys', () => { }), { name: 'test_api_key', - role_descriptors: { foo: true }, + role_descriptors: roleDescriptors, expiration: '1d', } ); @@ -512,7 +514,7 @@ describe('API Keys', () => { }), { name: 'test_api_key', - role_descriptors: { foo: true }, + role_descriptors: roleDescriptors, expiration: '1d', } ); @@ -527,7 +529,7 @@ describe('API Keys', () => { body: { api_key: { name: 'test_api_key', - role_descriptors: { foo: true }, + role_descriptors: roleDescriptors, expiration: '1d', }, grant_type: 'access_token', @@ -553,7 +555,7 @@ describe('API Keys', () => { }), { name: 'test_api_key', - role_descriptors: { foo: true }, + role_descriptors: roleDescriptors, expiration: '1d', } ); @@ -592,7 +594,7 @@ describe('API Keys', () => { }), { name: 'test_api_key', - role_descriptors: { foo: true }, + role_descriptors: roleDescriptors, expiration: '1d', } ) diff --git a/x-pack/plugins/security/server/authentication/api_keys/api_keys.ts b/x-pack/plugins/security/server/authentication/api_keys/api_keys.ts index 1fbd99b4dd812d..054ab59fbd0bbc 100644 --- a/x-pack/plugins/security/server/authentication/api_keys/api_keys.ts +++ b/x-pack/plugins/security/server/authentication/api_keys/api_keys.ts @@ -20,6 +20,7 @@ import type { InvalidateAPIKeysParams, ValidateAPIKeyParams, } from '@kbn/security-plugin-types-server'; +import { isCreateRestAPIKeyParams } from '@kbn/security-plugin-types-server'; import { getFakeKibanaRequest } from './fake_kibana_request'; import type { SecurityLicense } from '../../../common'; @@ -96,7 +97,6 @@ export class APIKeys implements APIKeysType { this.logger.debug( `Testing if API Keys are enabled by attempting to invalidate a non-existant key: ${id}` ); - try { await this.clusterClient.asInternalUser.security.invalidateApiKey({ body: { @@ -125,7 +125,6 @@ export class APIKeys implements APIKeysType { this.logger.debug( `Testing if cross-cluster API Keys are enabled by attempting to update a non-existant key: ${id}` ); - try { await this.clusterClient.asInternalUser.transport.request({ method: 'PUT', @@ -155,13 +154,13 @@ export class APIKeys implements APIKeysType { if (!this.license.isEnabled()) { return null; } - const { type, expiration, name, metadata } = createParams; const scopedClusterClient = this.clusterClient.asScoped(request); this.logger.debug('Trying to create an API key'); let result: CreateAPIKeyResult; + try { if (type === 'cross_cluster') { result = await scopedClusterClient.asCurrentUser.transport.request({ @@ -175,13 +174,13 @@ export class APIKeys implements APIKeysType { name, expiration, metadata, - role_descriptors: - 'role_descriptors' in createParams - ? createParams.role_descriptors - : this.parseRoleDescriptorsWithKibanaPrivileges( - createParams.kibana_role_descriptors, - false - ), + role_descriptors: isCreateRestAPIKeyParams(createParams) + ? createParams.role_descriptors + : this.parseRoleDescriptorsWithKibanaPrivileges( + createParams.kibana_role_descriptors, + this.kibanaFeatures, + false + ), }, }); } @@ -234,6 +233,7 @@ export class APIKeys implements APIKeysType { ? updateParams.role_descriptors : this.parseRoleDescriptorsWithKibanaPrivileges( updateParams.kibana_role_descriptors, + this.kibanaFeatures, true ), }); @@ -279,12 +279,12 @@ export class APIKeys implements APIKeysType { ); const { expiration, metadata, name } = createParams; - const roleDescriptors = 'role_descriptors' in createParams ? createParams.role_descriptors : this.parseRoleDescriptorsWithKibanaPrivileges( createParams.kibana_role_descriptors, + this.kibanaFeatures, false ); @@ -293,7 +293,6 @@ export class APIKeys implements APIKeysType { authorizationHeader, clientAuthorizationHeader ); - // User needs `manage_api_key` or `grant_api_key` privilege to use this API let result: GrantAPIKeyResult; try { @@ -318,7 +317,6 @@ export class APIKeys implements APIKeysType { } this.logger.debug(`Trying to invalidate ${params.ids.length} an API key as current user`); - let result: InvalidateAPIKeyResult; try { // User needs `manage_api_key` privilege to use this API @@ -354,6 +352,7 @@ export class APIKeys implements APIKeysType { this.logger.debug(`Trying to invalidate ${params.ids.length} API keys`); let result: InvalidateAPIKeyResult; + try { // Internal user needs `cluster:admin/xpack/security/api_key/invalidate` privilege to use this API result = await this.clusterClient.asInternalUser.security.invalidateApiKey({ @@ -384,7 +383,6 @@ export class APIKeys implements APIKeysType { const fakeRequest = getFakeKibanaRequest(apiKeyPrams); this.logger.debug(`Trying to validate an API key`); - try { await this.clusterClient.asScoped(fakeRequest).asCurrentUser.security.authenticate(); this.logger.debug(`API key was validated successfully`); @@ -445,6 +443,7 @@ export class APIKeys implements APIKeysType { private parseRoleDescriptorsWithKibanaPrivileges( kibanaRoleDescriptors: CreateRestAPIKeyWithKibanaPrivilegesParams['kibana_role_descriptors'], + features: KibanaFeature[], isEdit: boolean ) { const roleDescriptors = Object.create(null); @@ -452,10 +451,7 @@ export class APIKeys implements APIKeysType { const allValidationErrors: string[] = []; if (kibanaRoleDescriptors) { Object.entries(kibanaRoleDescriptors).forEach(([roleKey, roleDescriptor]) => { - const { validationErrors } = validateKibanaPrivileges( - this.kibanaFeatures, - roleDescriptor.kibana - ); + const { validationErrors } = validateKibanaPrivileges(features, roleDescriptor.kibana); allValidationErrors.push(...validationErrors); const applications = transformPrivilegesToElasticsearchPrivileges( diff --git a/x-pack/plugins/security/server/authentication/authentication_service.mock.ts b/x-pack/plugins/security/server/authentication/authentication_service.mock.ts index de87e7161bda8b..676b039eefaa46 100644 --- a/x-pack/plugins/security/server/authentication/authentication_service.mock.ts +++ b/x-pack/plugins/security/server/authentication/authentication_service.mock.ts @@ -5,9 +5,9 @@ * 2.0. */ +import { apiKeysMock } from '@kbn/core-security-server-mocks'; import type { DeeplyMockedKeys } from '@kbn/utility-types-jest'; -import { apiKeysMock } from './api_keys/api_keys.mock'; import type { InternalAuthenticationServiceStart } from './authentication_service'; export const authenticationServiceMock = { diff --git a/x-pack/plugins/security/server/authentication/authentication_service.ts b/x-pack/plugins/security/server/authentication/authentication_service.ts index abc400c0b6305e..cf99084d4d0bce 100644 --- a/x-pack/plugins/security/server/authentication/authentication_service.ts +++ b/x-pack/plugins/security/server/authentication/authentication_service.ts @@ -348,7 +348,6 @@ export class AuthenticationService { applicationName, kibanaFeatures, }); - /** * Retrieves server protocol name/host name/port and merges it with `xpack.security.public` config * to construct a server base URL (deprecated, used by the SAML provider only). diff --git a/x-pack/plugins/security/server/build_delegate_apis.test.ts b/x-pack/plugins/security/server/build_delegate_apis.test.ts index 59963ad2aef8e4..297ee6ebf92c41 100644 --- a/x-pack/plugins/security/server/build_delegate_apis.test.ts +++ b/x-pack/plugins/security/server/build_delegate_apis.test.ts @@ -65,6 +65,21 @@ describe('buildSecurityApi', () => { expect(auditService.asScoped(request).log).toHaveBeenCalledWith({ message: 'an event' }); }); }); + + describe('authc.apiKeys', () => { + it('properly delegates to the service', async () => { + await authc.apiKeys.areAPIKeysEnabled(); + expect(authc.apiKeys.areAPIKeysEnabled).toHaveBeenCalledTimes(1); + }); + + it('returns the result from the service', async () => { + authc.apiKeys.areAPIKeysEnabled.mockReturnValue(Promise.resolve(false)); + + const areAPIKeysEnabled = await authc.apiKeys.areAPIKeysEnabled(); + + expect(areAPIKeysEnabled).toBe(false); + }); + }); }); describe('buildUserProfileApi', () => { diff --git a/x-pack/plugins/security/server/build_delegate_apis.ts b/x-pack/plugins/security/server/build_delegate_apis.ts index fb782f3db256ff..f6d57cfc8a4a8b 100644 --- a/x-pack/plugins/security/server/build_delegate_apis.ts +++ b/x-pack/plugins/security/server/build_delegate_apis.ts @@ -24,6 +24,17 @@ export const buildSecurityApi = ({ getCurrentUser: (request) => { return getAuthc().getCurrentUser(request); }, + apiKeys: { + areAPIKeysEnabled: () => getAuthc().apiKeys.areAPIKeysEnabled(), + areCrossClusterAPIKeysEnabled: () => getAuthc().apiKeys.areAPIKeysEnabled(), + grantAsInternalUser: (request, createParams) => + getAuthc().apiKeys.grantAsInternalUser(request, createParams), + create: (request, createParams) => getAuthc().apiKeys.create(request, createParams), + update: (request, updateParams) => getAuthc().apiKeys.update(request, updateParams), + validate: (apiKeyParams) => getAuthc().apiKeys.validate(apiKeyParams), + invalidate: (request, params) => getAuthc().apiKeys.invalidate(request, params), + invalidateAsInternalUser: (params) => getAuthc().apiKeys.invalidateAsInternalUser(params), + }, }, audit: { asScoped(request) { diff --git a/x-pack/plugins/security/server/mocks.ts b/x-pack/plugins/security/server/mocks.ts index a5473176fc7e75..e47faeba525a03 100644 --- a/x-pack/plugins/security/server/mocks.ts +++ b/x-pack/plugins/security/server/mocks.ts @@ -7,7 +7,7 @@ import type { TransportResult } from '@elastic/elasticsearch'; -import { securityServiceMock } from '@kbn/core-security-server-mocks'; +import { apiKeysMock, securityServiceMock } from '@kbn/core-security-server-mocks'; import { auditServiceMock } from './audit/mocks'; import { authenticationServiceMock } from './authentication/authentication_service.mock'; @@ -19,7 +19,10 @@ function createSetupMock() { const mockAuthz = authorizationMock.create(); return { audit: auditServiceMock.create(), - authc: { getCurrentUser: jest.fn() }, + authc: { + getCurrentUser: jest.fn(), + apiKeys: apiKeysMock.create(), + }, authz: { actions: mockAuthz.actions, checkPrivilegesWithRequest: mockAuthz.checkPrivilegesWithRequest, diff --git a/x-pack/plugins/security/server/plugin.ts b/x-pack/plugins/security/server/plugin.ts index 9d5ffde67b1d7d..a500454f98fa93 100644 --- a/x-pack/plugins/security/server/plugin.ts +++ b/x-pack/plugins/security/server/plugin.ts @@ -77,7 +77,9 @@ export interface SecurityPluginSetup extends SecurityPluginSetupWithoutDeprecate /** * @deprecated Use `authc` methods from the `SecurityServiceStart` contract instead. */ - authc: { getCurrentUser: (request: KibanaRequest) => AuthenticatedUser | null }; + authc: { + getCurrentUser: (request: KibanaRequest) => AuthenticatedUser | null; + }; /** * @deprecated Use `authz` methods from the `SecurityServiceStart` contract instead. */ @@ -110,6 +112,7 @@ export class SecurityPlugin private readonly logger: Logger; private authorizationSetup?: AuthorizationServiceSetupInternal; private auditSetup?: AuditServiceSetup; + private configSubscription?: Subscription; private config?: ConfigType; @@ -189,6 +192,7 @@ export class SecurityPlugin this.initializerContext.logger.get('authentication') ); this.auditService = new AuditService(this.initializerContext.logger.get('audit')); + this.elasticsearchService = new ElasticsearchService( this.initializerContext.logger.get('elasticsearch') ); @@ -340,7 +344,9 @@ export class SecurityPlugin return Object.freeze({ audit: this.auditSetup, - authc: { getCurrentUser: (request) => this.getAuthentication().getCurrentUser(request) }, + authc: { + getCurrentUser: (request) => this.getAuthentication().getCurrentUser(request), + }, authz: { actions: this.authorizationSetup.actions, checkPrivilegesWithRequest: this.authorizationSetup.checkPrivilegesWithRequest, @@ -421,8 +427,8 @@ export class SecurityPlugin return Object.freeze({ authc: { - apiKeys: this.authenticationStart.apiKeys, getCurrentUser: this.authenticationStart.getCurrentUser, + apiKeys: this.authenticationStart.apiKeys, }, authz: { actions: this.authorizationSetup!.actions, diff --git a/x-pack/plugins/security/tsconfig.json b/x-pack/plugins/security/tsconfig.json index 64d162839cf1e0..10c1ada6ede157 100644 --- a/x-pack/plugins/security/tsconfig.json +++ b/x-pack/plugins/security/tsconfig.json @@ -83,7 +83,7 @@ "@kbn/core-user-profile-browser", "@kbn/security-api-key-management", "@kbn/security-form-components", - "@kbn/core-security-server-mocks", + "@kbn/core-security-server-mocks" ], "exclude": [ "target/**/*", From 436ff94f2e8f7cc6bdc6f94700a5bd65b9c48718 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Tue, 9 Jul 2024 09:44:24 -0400 Subject: [PATCH 064/103] [Synthetics] switch codeowners (#187775) ## Summary Switches codeowners for Synthetics ![Come back to me](https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExcmZydzA0dXA0N2FnbWJydWU3bzF2a2VibnY5NWUyaWs1dzA3bTM3NiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/czE57x4A8axa3BlYkY/giphy.gif) --------- Co-authored-by: Shahzad Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .github/CODEOWNERS | 28 +++++++++---------- .../exploratory_view/kibana.jsonc | 2 +- .../synthetics/kibana.jsonc | 2 +- .../uptime/kibana.jsonc | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8e93aeee0dae11..831fc4217a00e7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -422,7 +422,7 @@ x-pack/plugins/event_log @elastic/response-ops packages/kbn-expandable-flyout @elastic/security-threat-hunting-investigations packages/kbn-expect @elastic/kibana-operations @elastic/appex-qa x-pack/examples/exploratory_view_example @elastic/obs-ux-infra_services-team -x-pack/plugins/observability_solution/exploratory_view @elastic/obs-ux-infra_services-team +x-pack/plugins/observability_solution/exploratory_view @elastic/obs-ux-management-team src/plugins/expression_error @elastic/kibana-presentation src/plugins/chart_expressions/expression_gauge @elastic/kibana-visualizations src/plugins/chart_expressions/expression_heatmap @elastic/kibana-visualizations @@ -848,7 +848,7 @@ test/server_integration/plugins/status_plugin_b @elastic/kibana-core packages/kbn-std @elastic/kibana-core packages/kbn-stdio-dev-helpers @elastic/kibana-operations packages/kbn-storybook @elastic/kibana-operations -x-pack/plugins/observability_solution/synthetics @elastic/obs-ux-infra_services-team +x-pack/plugins/observability_solution/synthetics @elastic/obs-ux-management-team x-pack/test/alerting_api_integration/common/plugins/task_manager_fixture @elastic/response-ops x-pack/test/plugin_api_perf/plugins/task_manager_performance @elastic/response-ops x-pack/plugins/task_manager @elastic/response-ops @@ -904,7 +904,7 @@ src/plugins/unified_search @elastic/kibana-visualizations packages/kbn-unsaved-changes-badge @elastic/kibana-data-discovery packages/kbn-unsaved-changes-prompt @elastic/kibana-management x-pack/plugins/upgrade_assistant @elastic/kibana-management -x-pack/plugins/observability_solution/uptime @elastic/obs-ux-infra_services-team +x-pack/plugins/observability_solution/uptime @elastic/obs-ux-management-team x-pack/plugins/drilldowns/url_drilldown @elastic/appex-sharedux src/plugins/url_forwarding @elastic/kibana-visualizations src/plugins/usage_collection @elastic/kibana-core @@ -1142,15 +1142,15 @@ x-pack/test/observability_ai_assistant_functional @elastic/obs-ai-assistant #CC# /x-pack/plugins/observability_solution/observability/ @elastic/apm-ui # Uptime -/x-pack/test/functional_with_es_ssl/apps/discover_ml_uptime/uptime/ @elastic/obs-ux-infra_services-team -/x-pack/test/functional/apps/uptime @elastic/obs-ux-infra_services-team -/x-pack/test/functional/es_archives/uptime @elastic/obs-ux-infra_services-team -/x-pack/test/functional/services/uptime @elastic/obs-ux-infra_services-team -/x-pack/test/api_integration/apis/uptime @elastic/obs-ux-infra_services-team -/x-pack/test/api_integration/apis/synthetics @elastic/obs-ux-infra_services-team -/x-pack/test/alerting_api_integration/observability/synthetics_rule.ts @elastic/obs-ux-infra_services-team +/x-pack/test/functional_with_es_ssl/apps/discover_ml_uptime/uptime/ @elastic/obs-ux-management-team +/x-pack/test/functional/apps/uptime @elastic/obs-ux-management-team +/x-pack/test/functional/es_archives/uptime @elastic/obs-ux-management-team +/x-pack/test/functional/services/uptime @elastic/obs-ux-management-team +/x-pack/test/api_integration/apis/uptime @elastic/obs-ux-management-team +/x-pack/test/api_integration/apis/synthetics @elastic/obs-ux-management-team +/x-pack/test/alerting_api_integration/observability/synthetics_rule.ts @elastic/obs-ux-management-team /x-pack/test/alerting_api_integration/observability/index.ts @elastic/obs-ux-management-team -/x-pack/test_serverless/api_integration/test_suites/observability/synthetics @elastic/obs-ux-infra_services-team +/x-pack/test_serverless/api_integration/test_suites/observability/synthetics @elastic/obs-ux-management-team # Logs /x-pack/test/api_integration/apis/logs_ui @elastic/obs-ux-logs-team @@ -1734,9 +1734,9 @@ packages/react @elastic/appex-sharedux x-pack/plugins/actions/server/saved_objects/index.ts @elastic/response-ops @elastic/kibana-security x-pack/plugins/alerting/server/saved_objects/index.ts @elastic/response-ops @elastic/kibana-security x-pack/plugins/fleet/server/saved_objects/index.ts @elastic/fleet @elastic/kibana-security -x-pack/plugins/observability_solution/synthetics/server/saved_objects/saved_objects.ts @elastic/obs-ux-infra_services-team @elastic/kibana-security -x-pack/plugins/observability_solution/synthetics/server/saved_objects/synthetics_monitor.ts @elastic/obs-ux-infra_services-team @elastic/kibana-security -x-pack/plugins/observability_solution/synthetics/server/saved_objects/synthetics_param.ts @elastic/obs-ux-infra_services-team @elastic/kibana-security +x-pack/plugins/observability_solution/synthetics/server/saved_objects/saved_objects.ts @elastic/obs-ux-management-team @elastic/kibana-security +x-pack/plugins/observability_solution/synthetics/server/saved_objects/synthetics_monitor.ts @elastic/obs-ux-management-team @elastic/kibana-security +x-pack/plugins/observability_solution/synthetics/server/saved_objects/synthetics_param.ts @elastic/obs-ux-management-team @elastic/kibana-security # Specialised GitHub workflows for the Observability robots /.github/workflows/deploy-my-kibana.yml @elastic/observablt-robots @elastic/kibana-operations diff --git a/x-pack/plugins/observability_solution/exploratory_view/kibana.jsonc b/x-pack/plugins/observability_solution/exploratory_view/kibana.jsonc index 9fadcd2d68ca34..4061de177e427c 100644 --- a/x-pack/plugins/observability_solution/exploratory_view/kibana.jsonc +++ b/x-pack/plugins/observability_solution/exploratory_view/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/exploratory-view-plugin", - "owner": "@elastic/obs-ux-infra_services-team", + "owner": "@elastic/obs-ux-management-team", "plugin": { "id": "exploratoryView", "server": false, diff --git a/x-pack/plugins/observability_solution/synthetics/kibana.jsonc b/x-pack/plugins/observability_solution/synthetics/kibana.jsonc index 90076811dc75b3..3e0715e48abb19 100644 --- a/x-pack/plugins/observability_solution/synthetics/kibana.jsonc +++ b/x-pack/plugins/observability_solution/synthetics/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/synthetics-plugin", - "owner": "@elastic/obs-ux-infra_services-team", + "owner": "@elastic/obs-ux-management-team", "description": "This plugin visualizes data from Synthetics and Heartbeat, and integrates with other Observability solutions.", "plugin": { "id": "synthetics", diff --git a/x-pack/plugins/observability_solution/uptime/kibana.jsonc b/x-pack/plugins/observability_solution/uptime/kibana.jsonc index 3e27bac31cba66..b45d8b78bc9cc4 100644 --- a/x-pack/plugins/observability_solution/uptime/kibana.jsonc +++ b/x-pack/plugins/observability_solution/uptime/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/uptime-plugin", - "owner": "@elastic/obs-ux-infra_services-team", + "owner": "@elastic/obs-ux-management-team", "description": "This plugin visualizes data from Heartbeat, and integrates with other Observability solutions.", "plugin": { "id": "uptime", From 1a6b1edf190e377af81f8cd4480fd5375f10ba5c Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 9 Jul 2024 15:46:42 +0200 Subject: [PATCH 065/103] obs: deploy serverless when targeting main only (#187741) --- .buildkite/scripts/steps/serverless/deploy.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.buildkite/scripts/steps/serverless/deploy.sh b/.buildkite/scripts/steps/serverless/deploy.sh index 0c6f52b6f1982f..325aadf187b5b4 100644 --- a/.buildkite/scripts/steps/serverless/deploy.sh +++ b/.buildkite/scripts/steps/serverless/deploy.sh @@ -160,9 +160,12 @@ EOF is_pr_with_label "ci:project-deploy-elasticsearch" && deploy "elasticsearch" if is_pr_with_label "ci:project-deploy-observability" ; then - create_github_issue_oblt_test_environments - echo "--- Deploy observability with Kibana CI" - deploy "observability" + # Only deploy observability if the PR is targeting main + if [[ "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" == "main" ]]; then + create_github_issue_oblt_test_environments + echo "--- Deploy observability with Kibana CI" + deploy "observability" + fi fi is_pr_with_label "ci:project-deploy-security" && deploy "security" From 7e4c8a83e1d324a987f869a2aa909f346b7aa7d7 Mon Sep 17 00:00:00 2001 From: Vadim Kibana <82822460+vadimkibana@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:16:32 +0200 Subject: [PATCH 066/103] [ES|QL] Rename `text-based-languages` pugin to `esql` plugin (#187520) ## Summary Renames `@kbn/text-based-languages` plugin to `@kbn/esql` plugin. This has been discussed internally, the rationale is that now there will be only one language: ES|QL; and we may use this plugin for ES|QL related HTTP routes. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine --- .github/CODEOWNERS | 2 +- .i18nrc.json | 2 +- docs/developer/plugin-list.asciidoc | 8 ++++---- package.json | 2 +- packages/kbn-optimizer/limits.yml | 2 +- src/plugins/esql/.i18nrc.json | 6 ++++++ src/plugins/{text_based_languages => esql}/README.md | 6 +++--- .../{text_based_languages => esql}/jest.config.js | 8 +++----- .../{text_based_languages => esql}/kibana.jsonc | 4 ++-- .../{text_based_languages => esql}/package.json | 2 +- .../public/create_editor.tsx | 0 .../{text_based_languages => esql}/public/index.ts | 6 +++--- .../public/kibana_services.ts | 0 .../{text_based_languages => esql}/public/plugin.ts | 10 +++++----- .../public/triggers/index.ts | 0 .../public/triggers/update_esql_query_actions.test.ts | 0 .../public/triggers/update_esql_query_actions.ts | 2 +- .../public/triggers/update_esql_query_helpers.ts | 0 .../public/triggers/update_esql_query_trigger.ts | 4 ++-- .../{text_based_languages => esql}/public/types.ts | 2 +- .../{text_based_languages => esql}/server/index.ts | 4 ++-- .../{text_based_languages => esql}/server/plugin.ts | 2 +- .../server/ui_settings.ts | 6 +++--- .../{text_based_languages => esql}/tsconfig.json | 0 src/plugins/text_based_languages/.i18nrc.json | 6 ------ src/plugins/unified_search/.storybook/main.js | 5 +---- src/plugins/unified_search/kibana.jsonc | 2 +- .../public/query_string_input/query_bar_top_row.tsx | 2 +- src/plugins/unified_search/tsconfig.json | 2 +- tsconfig.base.json | 4 ++-- x-pack/plugins/data_visualizer/kibana.jsonc | 2 +- .../index_data_visualizer_esql.tsx | 2 +- .../field_stats/field_stats_esql_editor.tsx | 2 +- x-pack/plugins/data_visualizer/tsconfig.json | 2 +- x-pack/plugins/lens/kibana.jsonc | 2 +- .../edit_on_the_fly/lens_configuration_flyout.tsx | 2 +- x-pack/plugins/lens/tsconfig.json | 2 +- x-pack/plugins/maps/kibana.jsonc | 2 +- .../public/classes/sources/esql_source/esql_editor.tsx | 2 +- x-pack/plugins/maps/tsconfig.json | 2 +- x-pack/plugins/stack_alerts/kibana.jsonc | 2 +- .../es_query/expression/esql_query_expression.tsx | 2 +- x-pack/plugins/stack_alerts/tsconfig.json | 2 +- x-pack/plugins/translations/translations/fr-FR.json | 4 ++-- x-pack/plugins/translations/translations/ja-JP.json | 4 ++-- x-pack/plugins/translations/translations/zh-CN.json | 4 ++-- yarn.lock | 8 ++++---- 47 files changed, 70 insertions(+), 75 deletions(-) create mode 100755 src/plugins/esql/.i18nrc.json rename src/plugins/{text_based_languages => esql}/README.md (86%) rename src/plugins/{text_based_languages => esql}/jest.config.js (72%) rename src/plugins/{text_based_languages => esql}/kibana.jsonc (82%) rename src/plugins/{text_based_languages => esql}/package.json (70%) rename src/plugins/{text_based_languages => esql}/public/create_editor.tsx (100%) rename src/plugins/{text_based_languages => esql}/public/index.ts (76%) rename src/plugins/{text_based_languages => esql}/public/kibana_services.ts (100%) rename src/plugins/{text_based_languages => esql}/public/plugin.ts (83%) rename src/plugins/{text_based_languages => esql}/public/triggers/index.ts (100%) rename src/plugins/{text_based_languages => esql}/public/triggers/update_esql_query_actions.test.ts (100%) rename src/plugins/{text_based_languages => esql}/public/triggers/update_esql_query_actions.ts (95%) rename src/plugins/{text_based_languages => esql}/public/triggers/update_esql_query_helpers.ts (100%) rename src/plugins/{text_based_languages => esql}/public/triggers/update_esql_query_trigger.ts (80%) rename src/plugins/{text_based_languages => esql}/public/types.ts (90%) rename src/plugins/{text_based_languages => esql}/server/index.ts (76%) rename src/plugins/{text_based_languages => esql}/server/plugin.ts (91%) rename src/plugins/{text_based_languages => esql}/server/ui_settings.ts (82%) rename src/plugins/{text_based_languages => esql}/tsconfig.json (100%) delete mode 100755 src/plugins/text_based_languages/.i18nrc.json diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 831fc4217a00e7..c0928205b74154 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -407,6 +407,7 @@ packages/kbn-eslint-plugin-imports @elastic/kibana-operations packages/kbn-eslint-plugin-telemetry @elastic/obs-knowledge-team examples/eso_model_version_example @elastic/kibana-security x-pack/test/encrypted_saved_objects_api_integration/plugins/api_consumer_plugin @elastic/kibana-security +src/plugins/esql @elastic/kibana-esql packages/kbn-esql-ast @elastic/kibana-esql examples/esql_ast_inspector @elastic/kibana-esql src/plugins/esql_datagrid @elastic/kibana-esql @@ -865,7 +866,6 @@ packages/kbn-test-jest-helpers @elastic/kibana-operations @elastic/appex-qa packages/kbn-test-subj-selector @elastic/kibana-operations @elastic/appex-qa x-pack/examples/testing_embedded_lens @elastic/kibana-visualizations packages/kbn-text-based-editor @elastic/kibana-esql -src/plugins/text_based_languages @elastic/kibana-esql x-pack/examples/third_party_lens_navigation_prompt @elastic/kibana-visualizations x-pack/examples/third_party_vis_lens_example @elastic/kibana-visualizations x-pack/plugins/threat_intelligence @elastic/security-threat-hunting-investigations diff --git a/.i18nrc.json b/.i18nrc.json index 63adc5c5aae2bf..bab7cdc68d81d5 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -116,7 +116,7 @@ "serverlessPackages": "packages/serverless", "coloring": "packages/kbn-coloring/src", "languageDocumentationPopover": "packages/kbn-language-documentation-popover/src", - "textBasedLanguages": "src/plugins/text_based_languages", + "esql": "src/plugins/esql", "esqlDataGrid": "src/plugins/esql_datagrid", "statusPage": "src/legacy/core_plugins/status_page", "telemetry": ["src/plugins/telemetry", "src/plugins/telemetry_management_section"], diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index e4f161ac8f4e54..0f20d331118ccb 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -102,6 +102,10 @@ This API doesn't support angular, for registering angular dev tools, bootstrap a |Embeddables are React components that manage their own state, can be serialized and deserialized, and return an API that can be used to interact with them imperatively. +|{kib-repo}blob/{branch}/src/plugins/esql/README.md[esql] +|The editor accepts the following properties: + + |{kib-repo}blob/{branch}/src/plugins/esql_datagrid/README.md[esqlDataGrid] |Contains a Discover-like table specifically for ES|QL queries: @@ -328,10 +332,6 @@ generating deep links to other apps using locators, and creating short URLs. |This plugin adds the Advanced Settings section for the Usage and Security Data collection (aka Telemetry). -|{kib-repo}blob/{branch}/src/plugins/text_based_languages/README.md[textBasedLanguages] -|The editor accepts the following properties: - - |<> |UI Actions plugins provides API to manage *triggers* and *actions*. diff --git a/package.json b/package.json index e9a8d26a23c8e1..8ac85c6af20ba0 100644 --- a/package.json +++ b/package.json @@ -454,6 +454,7 @@ "@kbn/es-ui-shared-plugin": "link:src/plugins/es_ui_shared", "@kbn/eso-model-version-example": "link:examples/eso_model_version_example", "@kbn/eso-plugin": "link:x-pack/test/encrypted_saved_objects_api_integration/plugins/api_consumer_plugin", + "@kbn/esql": "link:src/plugins/esql", "@kbn/esql-ast": "link:packages/kbn-esql-ast", "@kbn/esql-ast-inspector-plugin": "link:examples/esql_ast_inspector", "@kbn/esql-datagrid": "link:src/plugins/esql_datagrid", @@ -864,7 +865,6 @@ "@kbn/test-feature-usage-plugin": "link:x-pack/test/licensing_plugin/plugins/test_feature_usage", "@kbn/testing-embedded-lens-plugin": "link:x-pack/examples/testing_embedded_lens", "@kbn/text-based-editor": "link:packages/kbn-text-based-editor", - "@kbn/text-based-languages": "link:src/plugins/text_based_languages", "@kbn/third-party-lens-navigation-prompt-plugin": "link:x-pack/examples/third_party_lens_navigation_prompt", "@kbn/third-party-vis-lens-example-plugin": "link:x-pack/examples/third_party_vis_lens_example", "@kbn/threat-intelligence-plugin": "link:x-pack/plugins/threat_intelligence", diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 00bcbf6481939d..3b7828dc7f67d0 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -42,6 +42,7 @@ pageLoadAssetSize: embeddableEnhanced: 22107 enterpriseSearch: 66810 entityManager: 17175 + esql: 37000 esqlDataGrid: 24582 esUiShared: 326654 eventAnnotation: 30000 @@ -156,7 +157,6 @@ pageLoadAssetSize: synthetics: 40958 telemetry: 51957 telemetryManagementSection: 38586 - textBasedLanguages: 37000 threatIntelligence: 44299 timelines: 327300 transform: 41007 diff --git a/src/plugins/esql/.i18nrc.json b/src/plugins/esql/.i18nrc.json new file mode 100755 index 00000000000000..fce2490c832cff --- /dev/null +++ b/src/plugins/esql/.i18nrc.json @@ -0,0 +1,6 @@ +{ + "prefix": "esql", + "paths": { + "esql": "." + } +} diff --git a/src/plugins/text_based_languages/README.md b/src/plugins/esql/README.md similarity index 86% rename from src/plugins/text_based_languages/README.md rename to src/plugins/esql/README.md index 42d33752206826..05a7406e06a3b6 100644 --- a/src/plugins/text_based_languages/README.md +++ b/src/plugins/esql/README.md @@ -1,4 +1,4 @@ -# @kbn/text-based-languages +# @kbn/esql ## Component properties The editor accepts the following properties: @@ -11,8 +11,8 @@ The editor accepts the following properties: - isLoading: As the editor is not responsible for the data fetching request, the consumer could update this property when the data are being fetched. If this property is defined, the query history component will be rendered ``` -To use it on your application, you need to add the textBasedLanguages to your requiredBundles and the @kbn/text-based-languages to your tsconfig.json and use the component like that: -import { TextBasedLangEditor } from '@kbn/text-based-languages/public'; +To use it on your application, you need to add the textBasedLanguages to your requiredBundles and the @kbn/esql to your tsconfig.json and use the component like that: +import { TextBasedLangEditor } from '@kbn/esql/public'; /src/plugins/text_based_languages'], - coverageDirectory: '/target/kibana-coverage/jest/src/plugins/text_based_languages', + roots: ['/src/plugins/esql'], + coverageDirectory: '/target/kibana-coverage/jest/src/plugins/esql', coverageReporters: ['text', 'html'], - collectCoverageFrom: [ - '/src/plugins/text_based_languages/{common,public,server}/**/*.{js,ts,tsx}', - ], + collectCoverageFrom: ['/src/plugins/esql/{common,public,server}/**/*.{js,ts,tsx}'], setupFiles: ['jest-canvas-mock'], }; diff --git a/src/plugins/text_based_languages/kibana.jsonc b/src/plugins/esql/kibana.jsonc similarity index 82% rename from src/plugins/text_based_languages/kibana.jsonc rename to src/plugins/esql/kibana.jsonc index 5bed408add15a1..797b9066e46ae4 100644 --- a/src/plugins/text_based_languages/kibana.jsonc +++ b/src/plugins/esql/kibana.jsonc @@ -1,9 +1,9 @@ { "type": "plugin", - "id": "@kbn/text-based-languages", + "id": "@kbn/esql", "owner": "@elastic/kibana-esql", "plugin": { - "id": "textBasedLanguages", + "id": "esql", "server": true, "browser": true, "optionalPlugins": [ diff --git a/src/plugins/text_based_languages/package.json b/src/plugins/esql/package.json similarity index 70% rename from src/plugins/text_based_languages/package.json rename to src/plugins/esql/package.json index a13edb19901925..fe166ce25a71bb 100644 --- a/src/plugins/text_based_languages/package.json +++ b/src/plugins/esql/package.json @@ -1,5 +1,5 @@ { - "name": "@kbn/text-based-languages", + "name": "@kbn/esql", "private": true, "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0" diff --git a/src/plugins/text_based_languages/public/create_editor.tsx b/src/plugins/esql/public/create_editor.tsx similarity index 100% rename from src/plugins/text_based_languages/public/create_editor.tsx rename to src/plugins/esql/public/create_editor.tsx diff --git a/src/plugins/text_based_languages/public/index.ts b/src/plugins/esql/public/index.ts similarity index 76% rename from src/plugins/text_based_languages/public/index.ts rename to src/plugins/esql/public/index.ts index 697e1d0e1d3190..8e797ed591fca6 100644 --- a/src/plugins/text_based_languages/public/index.ts +++ b/src/plugins/esql/public/index.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -import { TextBasedLanguagesPlugin } from './plugin'; +import { EsqlPlugin } from './plugin'; export type { TextBasedLanguagesEditorProps } from '@kbn/text-based-editor'; -export type { TextBasedLanguagesPluginStart } from './types'; +export type { EsqlPluginStart } from './types'; export { TextBasedLangEditor } from './create_editor'; export function plugin() { - return new TextBasedLanguagesPlugin(); + return new EsqlPlugin(); } diff --git a/src/plugins/text_based_languages/public/kibana_services.ts b/src/plugins/esql/public/kibana_services.ts similarity index 100% rename from src/plugins/text_based_languages/public/kibana_services.ts rename to src/plugins/esql/public/kibana_services.ts diff --git a/src/plugins/text_based_languages/public/plugin.ts b/src/plugins/esql/public/plugin.ts similarity index 83% rename from src/plugins/text_based_languages/public/plugin.ts rename to src/plugins/esql/public/plugin.ts index 841641c8fce25d..5b78a0b48dc2b8 100755 --- a/src/plugins/text_based_languages/public/plugin.ts +++ b/src/plugins/esql/public/plugin.ts @@ -19,22 +19,22 @@ import { } from './triggers'; import { setKibanaServices } from './kibana_services'; -interface TextBasedLanguagesPluginStart { +interface EsqlPluginStart { dataViews: DataViewsPublicPluginStart; expressions: ExpressionsStart; uiActions: UiActionsStart; data: DataPublicPluginStart; } -interface TextBasedLanguagesPluginSetup { +interface EsqlPluginSetup { indexManagement: IndexManagementPluginSetup; uiActions: UiActionsSetup; } -export class TextBasedLanguagesPlugin implements Plugin<{}, void> { +export class EsqlPlugin implements Plugin<{}, void> { private indexManagement?: IndexManagementPluginSetup; - public setup(_: CoreSetup, { indexManagement, uiActions }: TextBasedLanguagesPluginSetup) { + public setup(_: CoreSetup, { indexManagement, uiActions }: EsqlPluginSetup) { this.indexManagement = indexManagement; uiActions.registerTrigger(updateESQLQueryTrigger); @@ -44,7 +44,7 @@ export class TextBasedLanguagesPlugin implements Plugin<{}, void> { public start( core: CoreStart, - { dataViews, expressions, data, uiActions }: TextBasedLanguagesPluginStart + { dataViews, expressions, data, uiActions }: EsqlPluginStart ): void { const appendESQLAction = new UpdateESQLQueryAction(data); uiActions.addTriggerAction(UPDATE_ESQL_QUERY_TRIGGER, appendESQLAction); diff --git a/src/plugins/text_based_languages/public/triggers/index.ts b/src/plugins/esql/public/triggers/index.ts similarity index 100% rename from src/plugins/text_based_languages/public/triggers/index.ts rename to src/plugins/esql/public/triggers/index.ts diff --git a/src/plugins/text_based_languages/public/triggers/update_esql_query_actions.test.ts b/src/plugins/esql/public/triggers/update_esql_query_actions.test.ts similarity index 100% rename from src/plugins/text_based_languages/public/triggers/update_esql_query_actions.test.ts rename to src/plugins/esql/public/triggers/update_esql_query_actions.test.ts diff --git a/src/plugins/text_based_languages/public/triggers/update_esql_query_actions.ts b/src/plugins/esql/public/triggers/update_esql_query_actions.ts similarity index 95% rename from src/plugins/text_based_languages/public/triggers/update_esql_query_actions.ts rename to src/plugins/esql/public/triggers/update_esql_query_actions.ts index 4aa7b015b366b7..798ac803d3e3b6 100644 --- a/src/plugins/text_based_languages/public/triggers/update_esql_query_actions.ts +++ b/src/plugins/esql/public/triggers/update_esql_query_actions.ts @@ -25,7 +25,7 @@ export class UpdateESQLQueryAction implements Action { constructor(protected readonly data: DataPublicPluginStart) {} public getDisplayName(): string { - return i18n.translate('textBasedLanguages.updateESQLQueryLabel', { + return i18n.translate('esql.updateESQLQueryLabel', { defaultMessage: 'Update the ES|QL query in the editor', }); } diff --git a/src/plugins/text_based_languages/public/triggers/update_esql_query_helpers.ts b/src/plugins/esql/public/triggers/update_esql_query_helpers.ts similarity index 100% rename from src/plugins/text_based_languages/public/triggers/update_esql_query_helpers.ts rename to src/plugins/esql/public/triggers/update_esql_query_helpers.ts diff --git a/src/plugins/text_based_languages/public/triggers/update_esql_query_trigger.ts b/src/plugins/esql/public/triggers/update_esql_query_trigger.ts similarity index 80% rename from src/plugins/text_based_languages/public/triggers/update_esql_query_trigger.ts rename to src/plugins/esql/public/triggers/update_esql_query_trigger.ts index 13164647607ef0..79feddcd42c0cd 100644 --- a/src/plugins/text_based_languages/public/triggers/update_esql_query_trigger.ts +++ b/src/plugins/esql/public/triggers/update_esql_query_trigger.ts @@ -13,10 +13,10 @@ export const UPDATE_ESQL_QUERY_TRIGGER = 'UPDATE_ESQL_QUERY_TRIGGER'; export const updateESQLQueryTrigger: Trigger = { id: UPDATE_ESQL_QUERY_TRIGGER, - title: i18n.translate('textBasedLanguages.triggers.updateEsqlQueryTrigger', { + title: i18n.translate('esql.triggers.updateEsqlQueryTrigger', { defaultMessage: 'Update ES|QL query', }), - description: i18n.translate('textBasedLanguages.triggers.updateEsqlQueryTriggerDescription', { + description: i18n.translate('esql.triggers.updateEsqlQueryTriggerDescription', { defaultMessage: 'Update ES|QL query with a new one', }), }; diff --git a/src/plugins/text_based_languages/public/types.ts b/src/plugins/esql/public/types.ts similarity index 90% rename from src/plugins/text_based_languages/public/types.ts rename to src/plugins/esql/public/types.ts index c2dd5249d3d190..ef28bddc3c4580 100644 --- a/src/plugins/text_based_languages/public/types.ts +++ b/src/plugins/esql/public/types.ts @@ -7,6 +7,6 @@ */ import { TextBasedLanguagesEditorProps } from '@kbn/text-based-editor'; -export interface TextBasedLanguagesPluginStart { +export interface EsqlPluginStart { Editor: React.ComponentType; } diff --git a/src/plugins/text_based_languages/server/index.ts b/src/plugins/esql/server/index.ts similarity index 76% rename from src/plugins/text_based_languages/server/index.ts rename to src/plugins/esql/server/index.ts index bca404b161bf8a..fa0a0cec5bdbea 100644 --- a/src/plugins/text_based_languages/server/index.ts +++ b/src/plugins/esql/server/index.ts @@ -7,6 +7,6 @@ */ export const plugin = async () => { - const { TextBasedLanguagesServerPlugin } = await import('./plugin'); - return new TextBasedLanguagesServerPlugin(); + const { EsqlServerPlugin } = await import('./plugin'); + return new EsqlServerPlugin(); }; diff --git a/src/plugins/text_based_languages/server/plugin.ts b/src/plugins/esql/server/plugin.ts similarity index 91% rename from src/plugins/text_based_languages/server/plugin.ts rename to src/plugins/esql/server/plugin.ts index 95a341a467cc59..416c1dacc04e58 100644 --- a/src/plugins/text_based_languages/server/plugin.ts +++ b/src/plugins/esql/server/plugin.ts @@ -9,7 +9,7 @@ import type { CoreSetup, CoreStart, Plugin } from '@kbn/core/server'; import { getUiSettings } from './ui_settings'; -export class TextBasedLanguagesServerPlugin implements Plugin { +export class EsqlServerPlugin implements Plugin { public setup(core: CoreSetup) { core.uiSettings.register(getUiSettings()); return {}; diff --git a/src/plugins/text_based_languages/server/ui_settings.ts b/src/plugins/esql/server/ui_settings.ts similarity index 82% rename from src/plugins/text_based_languages/server/ui_settings.ts rename to src/plugins/esql/server/ui_settings.ts index 32717b0d2cb8c0..9c43fdf55cc250 100644 --- a/src/plugins/text_based_languages/server/ui_settings.ts +++ b/src/plugins/esql/server/ui_settings.ts @@ -14,17 +14,17 @@ import { ENABLE_ESQL } from '@kbn/esql-utils'; export const getUiSettings: () => Record = () => ({ [ENABLE_ESQL]: { - name: i18n.translate('textBasedLanguages.advancedSettings.enableESQLTitle', { + name: i18n.translate('esql.advancedSettings.enableESQLTitle', { defaultMessage: 'Enable ES|QL', }), value: true, - description: i18n.translate('textBasedLanguages.advancedSettings.enableESQLDescription', { + description: i18n.translate('esql.advancedSettings.enableESQLDescription', { defaultMessage: 'This setting enables ES|QL in Kibana. By switching it off you will hide the ES|QL user interface from various applications. However, users will be able to access existing ES|QL saved searches, visualizations, etc. If you have feedback on this experience please reach out to us on {link}', values: { link: `` + - i18n.translate('textBasedLanguages.advancedSettings.enableESQL.discussLinkText', { + i18n.translate('esql.advancedSettings.enableESQL.discussLinkText', { defaultMessage: 'https://ela.st/esql-feedback', }) + '', diff --git a/src/plugins/text_based_languages/tsconfig.json b/src/plugins/esql/tsconfig.json similarity index 100% rename from src/plugins/text_based_languages/tsconfig.json rename to src/plugins/esql/tsconfig.json diff --git a/src/plugins/text_based_languages/.i18nrc.json b/src/plugins/text_based_languages/.i18nrc.json deleted file mode 100755 index d5a020d5dd392b..00000000000000 --- a/src/plugins/text_based_languages/.i18nrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "prefix": "textBasedLanguages", - "paths": { - "textBasedLanguages": "." - } -} diff --git a/src/plugins/unified_search/.storybook/main.js b/src/plugins/unified_search/.storybook/main.js index f0e135be6d8a26..3c5919edc3e53d 100644 --- a/src/plugins/unified_search/.storybook/main.js +++ b/src/plugins/unified_search/.storybook/main.js @@ -12,10 +12,7 @@ import { resolve } from 'path'; const mockConfig = { resolve: { alias: { - '@kbn/text-based-languages/public': resolve( - __dirname, - '../public/mocks/text_based_languages_editor.tsx' - ), + '@kbn/esql/public': resolve(__dirname, '../public/mocks/text_based_languages_editor.tsx'), }, }, }; diff --git a/src/plugins/unified_search/kibana.jsonc b/src/plugins/unified_search/kibana.jsonc index 9311d6cece2e2a..ad7f73a6088578 100644 --- a/src/plugins/unified_search/kibana.jsonc +++ b/src/plugins/unified_search/kibana.jsonc @@ -27,7 +27,7 @@ "kibanaUtils", "kibanaReact", "data", - "textBasedLanguages" + "esql" ] } } diff --git a/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx b/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx index 941040dfd30f88..1ef60866402000 100644 --- a/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx +++ b/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx @@ -18,7 +18,7 @@ import { isOfAggregateQueryType, getLanguageDisplayName, } from '@kbn/es-query'; -import { TextBasedLangEditor } from '@kbn/text-based-languages/public'; +import { TextBasedLangEditor } from '@kbn/esql/public'; import { EMPTY } from 'rxjs'; import { map } from 'rxjs'; import { throttle } from 'lodash'; diff --git a/src/plugins/unified_search/tsconfig.json b/src/plugins/unified_search/tsconfig.json index 82df1ffe507cfd..fc830033a69b76 100644 --- a/src/plugins/unified_search/tsconfig.json +++ b/src/plugins/unified_search/tsconfig.json @@ -37,7 +37,7 @@ "@kbn/react-field", "@kbn/ui-theme", "@kbn/saved-objects-management-plugin", - "@kbn/text-based-languages", + "@kbn/esql", "@kbn/text-based-editor", "@kbn/core-doc-links-browser", "@kbn/core-lifecycle-browser", diff --git a/tsconfig.base.json b/tsconfig.base.json index 85f84a2609046b..6be66ec0a97d52 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -808,6 +808,8 @@ "@kbn/eso-model-version-example/*": ["examples/eso_model_version_example/*"], "@kbn/eso-plugin": ["x-pack/test/encrypted_saved_objects_api_integration/plugins/api_consumer_plugin"], "@kbn/eso-plugin/*": ["x-pack/test/encrypted_saved_objects_api_integration/plugins/api_consumer_plugin/*"], + "@kbn/esql": ["src/plugins/esql"], + "@kbn/esql/*": ["src/plugins/esql/*"], "@kbn/esql-ast": ["packages/kbn-esql-ast"], "@kbn/esql-ast/*": ["packages/kbn-esql-ast/*"], "@kbn/esql-ast-inspector-plugin": ["examples/esql_ast_inspector"], @@ -1724,8 +1726,6 @@ "@kbn/testing-embedded-lens-plugin/*": ["x-pack/examples/testing_embedded_lens/*"], "@kbn/text-based-editor": ["packages/kbn-text-based-editor"], "@kbn/text-based-editor/*": ["packages/kbn-text-based-editor/*"], - "@kbn/text-based-languages": ["src/plugins/text_based_languages"], - "@kbn/text-based-languages/*": ["src/plugins/text_based_languages/*"], "@kbn/third-party-lens-navigation-prompt-plugin": ["x-pack/examples/third_party_lens_navigation_prompt"], "@kbn/third-party-lens-navigation-prompt-plugin/*": ["x-pack/examples/third_party_lens_navigation_prompt/*"], "@kbn/third-party-vis-lens-example-plugin": ["x-pack/examples/third_party_vis_lens_example"], diff --git a/x-pack/plugins/data_visualizer/kibana.jsonc b/x-pack/plugins/data_visualizer/kibana.jsonc index 1ad88eaea4cb4f..84fc98d3fb22fe 100644 --- a/x-pack/plugins/data_visualizer/kibana.jsonc +++ b/x-pack/plugins/data_visualizer/kibana.jsonc @@ -37,7 +37,7 @@ "fieldFormats", "uiActions", "lens", - "textBasedLanguages", + "esql", "visualizations" ] } 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 4ffe604c3d3523..fd65ed3c7dfa62 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 @@ -12,7 +12,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { usePageUrlState } from '@kbn/ml-url-state'; import { FullTimeRangeSelector, DatePickerWrapper } from '@kbn/ml-date-picker'; -import { TextBasedLangEditor } from '@kbn/text-based-languages/public'; +import { TextBasedLangEditor } from '@kbn/esql/public'; import type { AggregateQuery } from '@kbn/es-query'; import { diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/field_stats/field_stats_esql_editor.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/field_stats/field_stats_esql_editor.tsx index bdaee8c1a5ae15..a015d975fdf182 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/field_stats/field_stats_esql_editor.tsx +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/field_stats/field_stats_esql_editor.tsx @@ -5,7 +5,7 @@ * 2.0. */ import React, { useRef, useState, useCallback } from 'react'; -import { TextBasedLangEditor } from '@kbn/text-based-languages/public'; +import { TextBasedLangEditor } from '@kbn/esql/public'; import { EuiFlexItem } from '@elastic/eui'; import type { AggregateQuery } from '@kbn/es-query'; diff --git a/x-pack/plugins/data_visualizer/tsconfig.json b/x-pack/plugins/data_visualizer/tsconfig.json index 96167830943549..ed8a3540f6d8ac 100644 --- a/x-pack/plugins/data_visualizer/tsconfig.json +++ b/x-pack/plugins/data_visualizer/tsconfig.json @@ -68,7 +68,7 @@ "@kbn/security-plugin", "@kbn/share-plugin", "@kbn/test-jest-helpers", - "@kbn/text-based-languages", + "@kbn/esql", "@kbn/ui-actions-plugin", "@kbn/ui-theme", "@kbn/unified-search-plugin", diff --git a/x-pack/plugins/lens/kibana.jsonc b/x-pack/plugins/lens/kibana.jsonc index 367260bae0f005..10eb3721414feb 100644 --- a/x-pack/plugins/lens/kibana.jsonc +++ b/x-pack/plugins/lens/kibana.jsonc @@ -56,7 +56,7 @@ "embeddable", "fieldFormats", "charts", - "textBasedLanguages", + "esql", ], "extraPublicDirs": [ "common/constants" diff --git a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.tsx b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.tsx index 5c163df2c0715a..98233c7ebffefe 100644 --- a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.tsx +++ b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.tsx @@ -26,7 +26,7 @@ import { getLanguageDisplayName, } from '@kbn/es-query'; import type { AggregateQuery, Query } from '@kbn/es-query'; -import { TextBasedLangEditor } from '@kbn/text-based-languages/public'; +import { TextBasedLangEditor } from '@kbn/esql/public'; import { DefaultInspectorAdapters } from '@kbn/expressions-plugin/common'; import { buildExpression } from '../../../editor_frame_service/editor_frame/expression_helpers'; import { MAX_NUM_OF_COLUMNS } from '../../../datasources/text_based/utils'; diff --git a/x-pack/plugins/lens/tsconfig.json b/x-pack/plugins/lens/tsconfig.json index 0f485a3c0c259d..90801e8687c61a 100644 --- a/x-pack/plugins/lens/tsconfig.json +++ b/x-pack/plugins/lens/tsconfig.json @@ -86,7 +86,7 @@ "@kbn/search-response-warnings", "@kbn/logging", "@kbn/core-plugins-server", - "@kbn/text-based-languages", + "@kbn/esql", "@kbn/field-utils", "@kbn/panel-loader", "@kbn/shared-ux-button-toolbar", diff --git a/x-pack/plugins/maps/kibana.jsonc b/x-pack/plugins/maps/kibana.jsonc index 881d557e5e3052..b042d0250b0c20 100644 --- a/x-pack/plugins/maps/kibana.jsonc +++ b/x-pack/plugins/maps/kibana.jsonc @@ -49,7 +49,7 @@ "usageCollection", "unifiedSearch", "fieldFormats", - "textBasedLanguages", + "esql", "savedObjects", ], "extraPublicDirs": [ diff --git a/x-pack/plugins/maps/public/classes/sources/esql_source/esql_editor.tsx b/x-pack/plugins/maps/public/classes/sources/esql_source/esql_editor.tsx index 8ed04f61adb5d9..5cfaf5abfcb726 100644 --- a/x-pack/plugins/maps/public/classes/sources/esql_source/esql_editor.tsx +++ b/x-pack/plugins/maps/public/classes/sources/esql_source/esql_editor.tsx @@ -11,7 +11,7 @@ import { isEqual } from 'lodash'; import useMountedState from 'react-use/lib/useMountedState'; import type { AggregateQuery } from '@kbn/es-query'; import type { ESQLColumn } from '@kbn/es-types'; -import { TextBasedLangEditor } from '@kbn/text-based-languages/public'; +import { TextBasedLangEditor } from '@kbn/esql/public'; import { getESQLMeta, verifyGeometryColumn } from './esql_utils'; interface Props { diff --git a/x-pack/plugins/maps/tsconfig.json b/x-pack/plugins/maps/tsconfig.json index 5821e1e82a21e5..cfd635f23d58d4 100644 --- a/x-pack/plugins/maps/tsconfig.json +++ b/x-pack/plugins/maps/tsconfig.json @@ -78,7 +78,7 @@ "@kbn/search-response-warnings", "@kbn/calculate-width-from-char-count", "@kbn/content-management-table-list-view-common", - "@kbn/text-based-languages", + "@kbn/esql", "@kbn/es-types", "@kbn/data-service", "@kbn/code-editor", diff --git a/x-pack/plugins/stack_alerts/kibana.jsonc b/x-pack/plugins/stack_alerts/kibana.jsonc index 9f2f33abf1f6e3..4d000228b0e073 100644 --- a/x-pack/plugins/stack_alerts/kibana.jsonc +++ b/x-pack/plugins/stack_alerts/kibana.jsonc @@ -22,7 +22,7 @@ ], "requiredBundles": [ "esUiShared", - "textBasedLanguages" + "esql" ], "extraPublicDirs": ["common"] } diff --git a/x-pack/plugins/stack_alerts/public/rule_types/es_query/expression/esql_query_expression.tsx b/x-pack/plugins/stack_alerts/public/rule_types/es_query/expression/esql_query_expression.tsx index 3ff2b70522e9a4..e9ceabf4639b2a 100644 --- a/x-pack/plugins/stack_alerts/public/rule_types/es_query/expression/esql_query_expression.tsx +++ b/x-pack/plugins/stack_alerts/public/rule_types/es_query/expression/esql_query_expression.tsx @@ -17,7 +17,7 @@ import { EuiSpacer, } from '@elastic/eui'; import { getFields, RuleTypeParamsExpressionProps } from '@kbn/triggers-actions-ui-plugin/public'; -import { TextBasedLangEditor } from '@kbn/text-based-languages/public'; +import { TextBasedLangEditor } from '@kbn/esql/public'; import { fetchFieldsFromESQL } from '@kbn/text-based-editor'; import { getIndexPatternFromESQLQuery } from '@kbn/esql-utils'; import type { AggregateQuery } from '@kbn/es-query'; diff --git a/x-pack/plugins/stack_alerts/tsconfig.json b/x-pack/plugins/stack_alerts/tsconfig.json index 081b0588d39aa2..f187bf466e3759 100644 --- a/x-pack/plugins/stack_alerts/tsconfig.json +++ b/x-pack/plugins/stack_alerts/tsconfig.json @@ -38,7 +38,7 @@ "@kbn/discover-plugin", "@kbn/rule-data-utils", "@kbn/alerts-as-data-utils", - "@kbn/text-based-languages", + "@kbn/esql", "@kbn/text-based-editor", "@kbn/expressions-plugin", "@kbn/core-http-browser", diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 5438a0096c0644..5cbe8f43a13221 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -2525,8 +2525,8 @@ "unifiedDocViewer.sourceViewer.errorMessage": "Impossible de récupérer les données pour le moment. Actualisez l'onglet et réessayez.", "unifiedDocViewer.sourceViewer.errorMessageTitle": "Une erreur s'est produite.", "unifiedDocViewer.sourceViewer.refresh": "Actualiser", - "textBasedLanguages.advancedSettings.enableESQL.discussLinkText": "discuss.elastic.co/c/elastic-stack/kibana", - "textBasedLanguages.advancedSettings.enableESQLTitle": "Activer ES|QL", + "esql.advancedSettings.enableESQL.discussLinkText": "discuss.elastic.co/c/elastic-stack/kibana", + "esql.advancedSettings.enableESQLTitle": "Activer ES|QL", "domDragDrop.announce.cancelled": "Mouvement annulé. {label} revenu à sa position initiale", "domDragDrop.announce.cancelledItem": "Mouvement annulé. {label} revenu au groupe {groupLabel} à la position {position}", "domDragDrop.announce.dropped.combineCompatible": "Combinaisons de {label} dans le {groupLabel} vers {dropLabel} dans le groupe {dropGroupLabel} à la position {dropPosition} dans le calque {dropLayerNumber}", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index bac41bbe59b2e6..a7dcd7e5416c6c 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -2522,8 +2522,8 @@ "unifiedDocViewer.sourceViewer.errorMessage": "現在データを取得できませんでした。タブを更新して、再試行してください。", "unifiedDocViewer.sourceViewer.errorMessageTitle": "エラーが発生しました", "unifiedDocViewer.sourceViewer.refresh": "更新", - "textBasedLanguages.advancedSettings.enableESQL.discussLinkText": "discuss.elastic.co/c/elastic-stack/kibana", - "textBasedLanguages.advancedSettings.enableESQLTitle": "ES|QLを有効化", + "esql.advancedSettings.enableESQL.discussLinkText": "discuss.elastic.co/c/elastic-stack/kibana", + "esql.advancedSettings.enableESQLTitle": "ES|QLを有効化", "domDragDrop.announce.cancelled": "移動がキャンセルされました。{label}は初期位置に戻りました", "domDragDrop.announce.cancelledItem": "移動がキャンセルされました。{label}は位置{position}の{groupLabel}グループに戻りました", "domDragDrop.announce.dropped.combineCompatible": "レイヤー{dropLayerNumber}の位置{dropPosition}で、グループ{groupLabel}の{label}をグループ{dropGroupLabel}の{dropLabel}と結合しました", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 3b76c43276896d..b6203a35743e35 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -2526,8 +2526,8 @@ "unifiedDocViewer.sourceViewer.errorMessage": "当前无法获取数据。请刷新选项卡以重试。", "unifiedDocViewer.sourceViewer.errorMessageTitle": "发生错误", "unifiedDocViewer.sourceViewer.refresh": "刷新", - "textBasedLanguages.advancedSettings.enableESQL.discussLinkText": "discuss.elastic.co/c/elastic-stack/kibana", - "textBasedLanguages.advancedSettings.enableESQLTitle": "启用 ES|QL", + "esql.advancedSettings.enableESQL.discussLinkText": "discuss.elastic.co/c/elastic-stack/kibana", + "esql.advancedSettings.enableESQLTitle": "启用 ES|QL", "domDragDrop.announce.cancelled": "移动已取消。{label} 将返回至其初始位置", "domDragDrop.announce.cancelledItem": "移动已取消。{label} 返回至 {groupLabel} 组中的位置 {position}", "domDragDrop.announce.dropped.combineCompatible": "已将组 {groupLabel} 中的 {label} 组合到图层 {dropLayerNumber} 的组 {dropGroupLabel} 中的位置 {dropPosition} 上的 {dropLabel}", diff --git a/yarn.lock b/yarn.lock index 67e950497963ba..de7e3662c29a42 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4853,6 +4853,10 @@ version "0.0.0" uid "" +"@kbn/esql@link:src/plugins/esql": + version "0.0.0" + uid "" + "@kbn/event-annotation-common@link:packages/kbn-event-annotation-common": version "0.0.0" uid "" @@ -6661,10 +6665,6 @@ version "0.0.0" uid "" -"@kbn/text-based-languages@link:src/plugins/text_based_languages": - version "0.0.0" - uid "" - "@kbn/third-party-lens-navigation-prompt-plugin@link:x-pack/examples/third_party_lens_navigation_prompt": version "0.0.0" uid "" From 9765879a342984af952530c3057e1329683310b6 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:25:38 +0200 Subject: [PATCH 067/103] skip failing test suite (#170593) --- x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts index 6b847fb396967c..005747c79c7fe0 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts @@ -39,7 +39,8 @@ import { } from '../../tasks/integrations'; import { ServerlessRoleName } from '../../support/roles'; -describe('ALL - Add Integration', { tags: ['@ess', '@serverless'] }, () => { +// Failing: See https://github.com/elastic/kibana/issues/170593 +describe.skip('ALL - Add Integration', { tags: ['@ess', '@serverless'] }, () => { let savedQueryId: string; before(() => { From 4081a9c2b513a8ae8d42181012636e1990066b6b Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:26:05 +0200 Subject: [PATCH 068/103] skip failing test suite (#171279) --- x-pack/plugins/osquery/cypress/e2e/all/packs_integration.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/osquery/cypress/e2e/all/packs_integration.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/packs_integration.cy.ts index ccbd119aab3a78..9c61f69ecb2960 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/packs_integration.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/packs_integration.cy.ts @@ -40,7 +40,8 @@ import { cleanupPack, cleanupAgentPolicy } from '../../tasks/api_fixtures'; import { request } from '../../tasks/common'; import { ServerlessRoleName } from '../../support/roles'; -describe('ALL - Packs', { tags: ['@ess', '@serverless'] }, () => { +// Failing: See https://github.com/elastic/kibana/issues/171279 +describe.skip('ALL - Packs', { tags: ['@ess', '@serverless'] }, () => { const integration = 'Osquery Manager'; describe( From b2e82f631efe4040099402cb7ba6fac617e1edc6 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:26:12 +0200 Subject: [PATCH 069/103] skip failing test suite (#180424) --- x-pack/plugins/osquery/cypress/e2e/all/packs_integration.cy.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/plugins/osquery/cypress/e2e/all/packs_integration.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/packs_integration.cy.ts index 9c61f69ecb2960..f9408073450346 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/packs_integration.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/packs_integration.cy.ts @@ -41,6 +41,7 @@ import { request } from '../../tasks/common'; import { ServerlessRoleName } from '../../support/roles'; // Failing: See https://github.com/elastic/kibana/issues/171279 +// Failing: See https://github.com/elastic/kibana/issues/180424 describe.skip('ALL - Packs', { tags: ['@ess', '@serverless'] }, () => { const integration = 'Osquery Manager'; From 47178a776f05e13a67de7e52c4ca662d41ee2dff Mon Sep 17 00:00:00 2001 From: Milton Hultgren Date: Tue, 9 Jul 2024 16:31:35 +0200 Subject: [PATCH 070/103] [EEM] Add versioning for entity definitions (#187692) This PR adds a `version` field to the `EntityDefinition` type, making it required in the API calls. It must be a SemVer string. The version is added to the ingest pipelines and transforms as part of their metadata. The version is included in the output documents alongside the schema version. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../current_fields.json | 3 ++- .../current_mappings.json | 3 +++ .../saved_objects/check_registered_types.test.ts | 2 +- .../kbn-entities-schema/src/schema/common.ts | 6 ++++++ .../src/schema/entity_definition.ts | 2 ++ .../server/lib/entities/built_in/services.ts | 1 + .../entities/create_and_install_ingest_pipeline.ts | 6 ++++++ .../entities/helpers/fixtures/entity_definition.ts | 1 + .../generate_history_processors.test.ts.snap | 12 ++++++++++++ .../generate_latest_processors.test.ts.snap | 12 ++++++++++++ .../ingest_pipeline/generate_history_processors.ts | 13 +++++++++++++ .../ingest_pipeline/generate_latest_processors.ts | 13 +++++++++++++ .../lib/entities/install_entity_definition.test.ts | 6 ++++++ .../generate_history_transform.test.ts.snap | 3 +++ .../generate_latest_transform.test.ts.snap | 3 +++ .../transform/generate_history_transform.ts | 3 +++ .../entities/transform/generate_latest_transform.ts | 3 +++ .../server/saved_objects/entity_definition.ts | 13 +++++++++++++ .../server/templates/components/entity.ts | 8 ++++++++ 19 files changed, 111 insertions(+), 2 deletions(-) diff --git a/packages/kbn-check-mappings-update-cli/current_fields.json b/packages/kbn-check-mappings-update-cli/current_fields.json index 9cecd6df6d6f6f..59cd87288e8ece 100644 --- a/packages/kbn-check-mappings-update-cli/current_fields.json +++ b/packages/kbn-check-mappings-update-cli/current_fields.json @@ -301,7 +301,8 @@ "metrics", "name", "staticFields", - "type" + "type", + "version" ], "entity-discovery-api-key": [ "apiKey" diff --git a/packages/kbn-check-mappings-update-cli/current_mappings.json b/packages/kbn-check-mappings-update-cli/current_mappings.json index f0df154b4f0127..47602ca181b5e4 100644 --- a/packages/kbn-check-mappings-update-cli/current_mappings.json +++ b/packages/kbn-check-mappings-update-cli/current_mappings.json @@ -1028,6 +1028,9 @@ }, "type": { "type": "keyword" + }, + "version": { + "type": "keyword" } } }, diff --git a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts index 73f8b7f9e93139..51c06947d224b9 100644 --- a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts +++ b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts @@ -88,7 +88,7 @@ describe('checking migration metadata changes on all registered SO types', () => "endpoint:unified-user-artifact-manifest": "71c7fcb52c658b21ea2800a6b6a76972ae1c776e", "endpoint:user-artifact-manifest": "1c3533161811a58772e30cdc77bac4631da3ef2b", "enterprise_search_telemetry": "9ac912e1417fc8681e0cd383775382117c9e3d3d", - "entity-definition": "33fe0194bd896f0bfe479d55f6de20f8ba1d7713", + "entity-definition": "331a2ba0ee9f24936ef049683549c8af7e46f03a", "entity-discovery-api-key": "c267a65c69171d1804362155c1378365f5acef88", "epm-packages": "8042d4a1522f6c4e6f5486e791b3ffe3a22f88fd", "epm-packages-assets": "7a3e58efd9a14191d0d1a00b8aaed30a145fd0b1", diff --git a/x-pack/packages/kbn-entities-schema/src/schema/common.ts b/x-pack/packages/kbn-entities-schema/src/schema/common.ts index b0d4b7247d12cf..bb9d07b1957f43 100644 --- a/x-pack/packages/kbn-entities-schema/src/schema/common.ts +++ b/x-pack/packages/kbn-entities-schema/src/schema/common.ts @@ -96,3 +96,9 @@ export const identityFieldsSchema = z optional: z.boolean(), }) .or(z.string().transform((value) => ({ field: value, optional: false }))); + +const semVerRegex = new RegExp(/^[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$/); +export const semVerSchema = z.string().refine((maybeSemVer) => semVerRegex.test(maybeSemVer), { + message: + 'The string does use the Semantic Versioning (Semver) format of {major}.{minor}.{patch} (e.g., 1.0.0), ensure each part contains only digits.', +}); diff --git a/x-pack/packages/kbn-entities-schema/src/schema/entity_definition.ts b/x-pack/packages/kbn-entities-schema/src/schema/entity_definition.ts index 15f3e98582c972..8fee16117b9c61 100644 --- a/x-pack/packages/kbn-entities-schema/src/schema/entity_definition.ts +++ b/x-pack/packages/kbn-entities-schema/src/schema/entity_definition.ts @@ -13,10 +13,12 @@ import { filterSchema, durationSchema, identityFieldsSchema, + semVerSchema, } from './common'; export const entityDefinitionSchema = z.object({ id: z.string().regex(/^[\w-]+$/), + version: semVerSchema, name: z.string(), description: z.optional(z.string()), type: z.string(), diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/built_in/services.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/built_in/services.ts index 02c69771ed24f0..29d501de8312f9 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/built_in/services.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/built_in/services.ts @@ -10,6 +10,7 @@ import { BUILT_IN_ID_PREFIX } from './constants'; export const builtInServicesEntityDefinition: EntityDefinition = entityDefinitionSchema.parse({ id: `${BUILT_IN_ID_PREFIX}services`, + version: '0.1.0', name: 'Services from logs', type: 'service', managed: true, diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/create_and_install_ingest_pipeline.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/create_and_install_ingest_pipeline.ts index ce8515a5e31db5..23feb84fa5336b 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/create_and_install_ingest_pipeline.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/create_and_install_ingest_pipeline.ts @@ -28,6 +28,9 @@ export async function createAndInstallHistoryIngestPipeline( esClient.ingest.putPipeline({ id: historyId, processors: historyProcessors, + _meta: { + definitionVersion: definition.version, + }, }), { logger } ); @@ -51,6 +54,9 @@ export async function createAndInstallLatestIngestPipeline( esClient.ingest.putPipeline({ id: latestId, processors: latestProcessors, + _meta: { + definitionVersion: definition.version, + }, }), { logger } ); diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/entity_definition.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/entity_definition.ts index b0d47a9044d4ae..137560df13385b 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/entity_definition.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/entity_definition.ts @@ -8,6 +8,7 @@ import { entityDefinitionSchema } from '@kbn/entities-schema'; export const entityDefinition = entityDefinitionSchema.parse({ id: 'admin-console-services', + version: '999.999.999', name: 'Services for Admin Console', type: 'service', indexPatterns: ['kbn-data-forge-fake_stack.*'], diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_history_processors.test.ts.snap b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_history_processors.test.ts.snap index c646694ffef5e9..eb74937a7e8c8e 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_history_processors.test.ts.snap +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_history_processors.test.ts.snap @@ -20,6 +20,18 @@ Array [ "value": "admin-console-services", }, }, + Object { + "set": Object { + "field": "entity.definitionVersion", + "value": "999.999.999", + }, + }, + Object { + "set": Object { + "field": "entity.schemaVersion", + "value": "v1", + }, + }, Object { "set": Object { "field": "entity.displayName", diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_latest_processors.test.ts.snap b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_latest_processors.test.ts.snap index 33d8504d937b26..c66bd8337da474 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_latest_processors.test.ts.snap +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_latest_processors.test.ts.snap @@ -20,6 +20,18 @@ Array [ "value": "admin-console-services", }, }, + Object { + "set": Object { + "field": "entity.definitionVersion", + "value": "999.999.999", + }, + }, + Object { + "set": Object { + "field": "entity.schemaVersion", + "value": "v1", + }, + }, Object { "script": Object { "source": "if (ctx.entity?.metadata?.tags.data != null) { diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_history_processors.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_history_processors.ts index eea33d9adda794..b273be780910b3 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_history_processors.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_history_processors.ts @@ -6,6 +6,7 @@ */ import { EntityDefinition } from '@kbn/entities-schema'; +import { ENTITY_SCHEMA_VERSION_V1 } from '../../../../common/constants_entities'; import { generateHistoryIndexName } from '../helpers/generate_component_id'; function createIdTemplate(definition: EntityDefinition) { @@ -62,6 +63,18 @@ export function generateHistoryProcessors(definition: EntityDefinition) { value: definition.id, }, }, + { + set: { + field: 'entity.definitionVersion', + value: definition.version, + }, + }, + { + set: { + field: 'entity.schemaVersion', + value: ENTITY_SCHEMA_VERSION_V1, + }, + }, { set: { field: 'entity.displayName', diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_latest_processors.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_latest_processors.ts index 1574659723601f..056fb043ab05c9 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_latest_processors.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_latest_processors.ts @@ -6,6 +6,7 @@ */ import { EntityDefinition } from '@kbn/entities-schema'; +import { ENTITY_SCHEMA_VERSION_V1 } from '../../../../common/constants_entities'; import { generateLatestIndexName } from '../helpers/generate_component_id'; function mapDestinationToPainless(destination: string) { @@ -56,6 +57,18 @@ export function generateLatestProcessors(definition: EntityDefinition) { value: definition.id, }, }, + { + set: { + field: 'entity.definitionVersion', + value: definition.version, + }, + }, + { + set: { + field: 'entity.schemaVersion', + value: ENTITY_SCHEMA_VERSION_V1, + }, + }, ...(definition.staticFields != null ? Object.keys(definition.staticFields).map((field) => ({ set: { field, value: definition.staticFields![field] }, diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.test.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.test.ts index d246b3f4f56068..6e7080c6364b75 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.test.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.test.ts @@ -38,10 +38,16 @@ const assertHasCreatedDefinition = ( expect(esClient.ingest.putPipeline).toBeCalledWith({ id: generateHistoryIngestPipelineId(builtInServicesEntityDefinition), processors: expect.anything(), + _meta: { + definitionVersion: '0.1.0', + }, }); expect(esClient.ingest.putPipeline).toBeCalledWith({ id: generateLatestIngestPipelineId(builtInServicesEntityDefinition), processors: expect.anything(), + _meta: { + definitionVersion: '0.1.0', + }, }); expect(esClient.transform.putTransform).toBeCalledTimes(2); diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_history_transform.test.ts.snap b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_history_transform.test.ts.snap index bbea064c9b7ec1..961f57045a5a26 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_history_transform.test.ts.snap +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_history_transform.test.ts.snap @@ -2,6 +2,9 @@ exports[`generateHistoryTransform(definition) should generate a valid latest transform 1`] = ` Object { + "_meta": Object { + "definitionVersion": "999.999.999", + }, "defer_validation": true, "dest": Object { "index": ".entities.v1.history.noop", diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_latest_transform.test.ts.snap b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_latest_transform.test.ts.snap index d9dff5aa54c2ee..aa0b2c7e871d2c 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_latest_transform.test.ts.snap +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_latest_transform.test.ts.snap @@ -2,6 +2,9 @@ exports[`generateLatestTransform(definition) should generate a valid latest transform 1`] = ` Object { + "_meta": Object { + "definitionVersion": "999.999.999", + }, "defer_validation": true, "dest": Object { "index": ".entities.v1.latest.noop", diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_history_transform.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_history_transform.ts index 2fd430f142b72f..4467c2425976c5 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_history_transform.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_history_transform.ts @@ -34,6 +34,9 @@ export function generateHistoryTransform( return { transform_id: generateHistoryTransformId(definition), + _meta: { + definitionVersion: definition.version, + }, defer_validation: true, source: { index: definition.indexPatterns, diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_latest_transform.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_latest_transform.ts index 9f19f083291f22..e52aa10e0820d3 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_latest_transform.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_latest_transform.ts @@ -25,6 +25,9 @@ export function generateLatestTransform( ): TransformPutTransformRequest { return { transform_id: generateLatestTransformId(definition), + _meta: { + definitionVersion: definition.version, + }, defer_validation: true, source: { index: `${generateHistoryIndexName(definition)}.*`, diff --git a/x-pack/plugins/observability_solution/entity_manager/server/saved_objects/entity_definition.ts b/x-pack/plugins/observability_solution/entity_manager/server/saved_objects/entity_definition.ts index 5ddba63b7ad073..b4bf24580d632d 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/saved_objects/entity_definition.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/saved_objects/entity_definition.ts @@ -18,6 +18,7 @@ export const entityDefinition: SavedObjectsType = { dynamic: false, properties: { id: { type: 'keyword' }, + version: { type: 'keyword' }, name: { type: 'text' }, description: { type: 'text' }, type: { type: 'keyword' }, @@ -37,4 +38,16 @@ export const entityDefinition: SavedObjectsType = { return `EntityDefinition: [${savedObject.attributes.name}]`; }, }, + modelVersions: { + '1': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + version: { type: 'keyword' }, + }, + }, + ], + }, + }, }; diff --git a/x-pack/plugins/observability_solution/entity_manager/server/templates/components/entity.ts b/x-pack/plugins/observability_solution/entity_manager/server/templates/components/entity.ts index 88c01b113c0e49..fd7e82749f0691 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/templates/components/entity.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/templates/components/entity.ts @@ -41,6 +41,14 @@ export const entitiesEntityComponentTemplateConfig: ClusterPutComponentTemplateR ignore_above: 1024, type: 'keyword', }, + definitionVersion: { + ignore_above: 1024, + type: 'keyword', + }, + schemaVersion: { + ignore_above: 1024, + type: 'keyword', + }, lastSeenTimestamp: { type: 'date', }, From 0b405a0d656e496775a2c6efa1392ec3ed3fdd4f Mon Sep 17 00:00:00 2001 From: Davis Plumlee <56367316+dplumlee@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:33:04 -0400 Subject: [PATCH 071/103] [Security Solution] Array of scalar values diff algorithm test plan (#186325) ## Summary Related ticket: https://github.com/elastic/kibana/issues/180162 Adds test plan for diff algorithm for arrays of scalar values implemented here: https://github.com/elastic/kibana/pull/186323 ### 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) --- .../installation_and_upgrade.md | 146 ----------- .../upgrade_review_algorithms.md | 246 ++++++++++++++++++ 2 files changed, 246 insertions(+), 146 deletions(-) create mode 100644 x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/upgrade_review_algorithms.md diff --git a/x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/installation_and_upgrade.md b/x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/installation_and_upgrade.md index e2f98296e199c7..beda8a9517830a 100644 --- a/x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/installation_and_upgrade.md +++ b/x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/installation_and_upgrade.md @@ -55,14 +55,6 @@ Status: `in progress`. The current test plan matches `Milestone 2` of the [Rule - [**Scenario: User can see correct rule information in preview before upgrading**](#scenario-user-can-see-correct-rule-information-in-preview-before-upgrading) - [**Scenario: Tabs and sections without content should be hidden in preview before upgrading**](#scenario-tabs-and-sections-without-content-should-be-hidden-in-preview-before-upgrading) - [Rule upgrade workflow: filtering, sorting, pagination](#rule-upgrade-workflow-filtering-sorting-pagination) - - [Rule upgrade workflow: simple diff algorithm](#rule-upgrade-workflow-simple-diff-algorithm) - - [**Scenario: Rule field doesn't have an update and has no custom value**](#scenario-rule-field-doesnt-have-an-update-and-has-no-custom-value) - - [**Scenario: Rule field doesn't have an update but has a custom value**](#scenario-rule-field-doesnt-have-an-update-but-has-a-custom-value) - - [**Scenario: Rule field has an update and doesn't have a custom value**](#scenario-rule-field-has-an-update-and-doesnt-have-a-custom-value) - - [**Scenario: Rule field has an update and a custom value that are the same**](#scenario-rule-field-has-an-update-and-a-custom-value-that-are-the-same) - - [**Scenario: Rule field has an update and a custom value that are NOT the same**](#scenario-rule-field-has-an-update-and-a-custom-value-that-are-not-the-same) - - [**Scenario: Rule field has an update and a custom value that are NOT the same and the rule base version doesn't exist**](#scenario-rule-field-has-an-update-and-a-custom-value-that-are-not-the-same-and-the-rule-base-version-doesnt-exist) - - [**Scenario: Rule field has an update and a custom value that are the same and the rule base version doesn't exist**](#scenario-rule-field-has-an-update-and-a-custom-value-that-are-the-same-and-the-rule-base-version-doesnt-exist) - [Rule upgrade workflow: viewing rule changes in JSON diff view](#rule-upgrade-workflow-viewing-rule-changes-in-json-diff-view) - [**Scenario: User can see changes in a side-by-side JSON diff view**](#scenario-user-can-see-changes-in-a-side-by-side-json-diff-view) - [**Scenario: User can see precisely how property values would change after upgrade**](#scenario-user-can-see-precisely-how-property-values-would-change-after-upgrade) @@ -823,144 +815,6 @@ And the Investigation Guide tab should NOT be displayed TODO: add scenarios https://github.com/elastic/kibana/issues/166215 -### Rule upgrade workflow: simple diff algorithm - -#### **Scenario: Rule field doesn't have an update and has no custom value** - -**Automation**: 2 integration tests with mock rules + a set of unit tests for the algorithm - -```Gherkin -Given at least 1 prebuilt rule is installed in Kibana -And for this rule there is a new version available -And field is not customized by the user (current version == base version) -And field is not updated by Elastic in this upgrade (target version == base version) -Then for field the diff algorithm should output the current version as the merged one without a conflict -And field should not be returned from the `upgrade/_review` API endpoint -And field should not be shown in the upgrade preview UI - -Examples: -| field_name | base_version | current_version | target_version | -| name | "A" | "A" | "A" | -| risk_score | 1 | 1 | 1 | -``` - -#### **Scenario: Rule field doesn't have an update but has a custom value** - -**Automation**: 2 integration tests with mock rules + a set of unit tests for the algorithm - -```Gherkin -Given at least 1 prebuilt rule is installed in Kibana -And for this rule there is a new version available -And field is customized by the user (current version != base version) -And field is not updated by Elastic in this upgrade (target version == base version) -Then for field the diff algorithm should output the current version as the merged one without a conflict -And field should be returned from the `upgrade/_review` API endpoint -And field should be shown in the upgrade preview UI - -Examples: -| field_name | base_version | current_version | target_version | -| name | "A" | "B" | "A" | -| risk_score | 1 | 2 | 1 | -``` - -#### **Scenario: Rule field has an update and doesn't have a custom value** - -**Automation**: 2 integration tests with mock rules + a set of unit tests for the algorithm - -```Gherkin -Given at least 1 prebuilt rule is installed in Kibana -And for this rule there is a new version available -And field is not customized by the user (current version == base version) -And field is updated by Elastic in this upgrade (target version != base version) -Then for field the diff algorithm should output the target version as the merged one without a conflict -And field should be returned from the `upgrade/_review` API endpoint -And field should be shown in the upgrade preview UI - -Examples: -| field_name | base_version | current_version | target_version | -| name | "A" | "A" | "B" | -| risk_score | 1 | 1 | 2 | -``` - -#### **Scenario: Rule field has an update and a custom value that are the same** - -**Automation**: 2 integration tests with mock rules + a set of unit tests for the algorithm - -```Gherkin -Given at least 1 prebuilt rule is installed in Kibana -And for this rule there is a new version available -And field is customized by the user (current version != base version) -And field is updated by Elastic in this upgrade (target version != base version) -And customized field is the same as the Elastic update in this upgrade (current version == target version) -Then for field the diff algorithm should output the current version as the merged one without a conflict -And field should be returned from the `upgrade/_review` API endpoint -And field should be shown in the upgrade preview UI - -Examples: -| field_name | base_version | current_version | target_version | -| name | "A" | "B" | "B" | -| risk_score | 1 | 2 | 2 | -``` - -#### **Scenario: Rule field has an update and a custom value that are NOT the same** - -**Automation**: 2 integration tests with mock rules + a set of unit tests for the algorithm - -```Gherkin -Given at least 1 prebuilt rule is installed in Kibana -And for this rule there is a new version available -And field is customized by the user (current version != base version) -And field is updated by Elastic in this upgrade (target version != base version) -And customized field is different than the Elastic update in this upgrade (current version != target version) -Then for field the diff algorithm should output the current version as the merged one with a conflict -And field should be returned from the `upgrade/_review` API endpoint -And field should be shown in the upgrade preview UI - -Examples: -| field_name | base_version | current_version | target_version | -| name | "A" | "B" | "C" | -| risk_score | 1 | 2 | 3 | -``` - -#### **Scenario: Rule field has an update and a custom value that are NOT the same and the rule base version doesn't exist** - -**Automation**: 2 integration tests with mock rules + a set of unit tests for the algorithm - -```Gherkin -Given at least 1 prebuilt rule is installed in Kibana -And for this rule there is a new version available -And the base version of the rule cannot be determined -And customized field is different than the Elastic update in this upgrade (current version != target version) -Then for field the diff algorithm should output the target version as the merged one with a conflict -And field should be returned from the `upgrade/_review` API endpoint -And field should be shown in the upgrade preview UI - -Examples: -| field_name | base_version | current_version | target_version | -| name | N/A | "B" | "C" | -| risk_score | N/A | 2 | 3 | -``` - -#### **Scenario: Rule field has an update and a custom value that are the same and the rule base version doesn't exist** - -**Automation**: 2 integration tests with mock rules + a set of unit tests for the algorithm - -```Gherkin -Given at least 1 prebuilt rule is installed in Kibana -And for this rule there is a new version available -And the base version of the rule cannot be determined -And customized field is the same as the Elastic update in this upgrade (current version == target version) -Then for field the diff algorithm should output the current version as the merged one without a conflict -And field should not be returned from the `upgrade/_review` API endpoint -And field should not be shown in the upgrade preview UI - - -Examples: -| field_name | base_version | current_version | target_version | -| name | N/A | "A" | "A" | -| risk_score | N/A | 1 | 1 | -``` - ### Rule upgrade workflow: viewing rule changes in JSON diff view #### **Scenario: User can see changes in a side-by-side JSON diff view** diff --git a/x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/upgrade_review_algorithms.md b/x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/upgrade_review_algorithms.md new file mode 100644 index 00000000000000..fad01b9698b9be --- /dev/null +++ b/x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/upgrade_review_algorithms.md @@ -0,0 +1,246 @@ +# Diff Algorithms for `upgrade/_review` Endpoint + +This is a test plan for the `upgrade/_review` endpoint diff algorithms that are a part of the larger prebuilt rules customization feature. These algorithms determine what fields get returned when a user makes an API request to review changes as a part of the rule update process and determine what version of those fields should be displayed by the UI. + +Status: `in progress`. + +## Table of Contents + +- [Useful information](#useful-information) + - [Tickets](#tickets) + - [Terminology](#terminology) + - [Assumptions](#assumptions) + - [Non-functional requirements](#non-functional-requirements) + - [Functional requirements](#functional-requirements) +- [Scenarios](#scenarios) + + - [Rule field doesn't have an update and has no custom value - `AAA`](#rule-field-doesnt-have-an-update-and-has-no-custom-value---aaa) + - [**Scenario: `AAA` - Rule field is any type**](#scenario-aaa---rule-field-is-any-type) + - [Rule field doesn't have an update but has a custom value - `ABA`](#rule-field-doesnt-have-an-update-but-has-a-custom-value---aba) + - [**Scenario: `ABA` - Rule field is any type**](#scenario-aba---rule-field-is-any-type) + - [Rule field has an update and doesn't have a custom value - `AAB`](#rule-field-has-an-update-and-doesnt-have-a-custom-value---aab) + - [**Scenario: `AAB` - Rule field is any type**](#scenario-aab---rule-field-is-any-type) + - [Rule field has an update and a custom value that are the same - `ABB`](#rule-field-has-an-update-and-a-custom-value-that-are-the-same---abb) + - [**Scenario: `ABB` - Rule field is any type**](#scenario-abb---rule-field-is-any-type) + - [Rule field has an update and a custom value that are NOT the same - `ABC`](#rule-field-has-an-update-and-a-custom-value-that-are-not-the-same---abc) + - [**Scenario: `ABC` - Rule field is a number or single line string**](#scenario-abc---rule-field-is-a-number-or-single-line-string) + - [**Scenario: `ABC` - Rule field is an array of scalar values**](#scenario-abc---rule-field-is-an-array-of-scalar-values) + - [Rule field has an update and a custom value that are the same and the rule base version doesn't exist - `-AA`](#rule-field-has-an-update-and-a-custom-value-that-are-the-same-and-the-rule-base-version-doesnt-exist----aa) + - [**Scenario: `-AA` - Rule field is any type**](#scenario--aa---rule-field-is-any-type) + - [Rule field has an update and a custom value that are NOT the same and the rule base version doesn't exist - `-BC`](#rule-field-has-an-update-and-a-custom-value-that-are-not-the-same-and-the-rule-base-version-doesnt-exist----bc) + - [**Scenario: `-BC` - Rule field is a number or single line string**](#scenario--bc---rule-field-is-a-number-or-single-line-string) + - [**Scenario: `-BC` - Rule field is an array of scalar values**](#scenario--bc---rule-field-is-an-array-of-scalar-values) + +## Useful information + +### Tickets + +- [Users can customize prebuilt detection rules](https://github.com/elastic/kibana/issues/174168) epic +- [Implement single-line string diff algorithm](https://github.com/elastic/kibana/issues/180158) +- [Implement number diff algorithm](https://github.com/elastic/kibana/issues/180160) +- [Implement array of scalar values diff algorithm](https://github.com/elastic/kibana/issues/180162) + +### Terminology + +- **Base version**: Also labeled as `base_version`. This is the version of a rule authored by Elastic as it is installed from the `security_detection_engine` package, with no customizations to any fields by the user. + +- **Current version**: Also labeled as `current_version`. This is the version of the rule that the user currently has installed. Consists of the `base_version` of the rules plus all customization applies to its fields by the user. + +- **Target version**: Also labeled as `target_version`. This is the version of the rule that contains the update from Elastic. + +- **Merged version**: Also labeled as `merged_version`. This is the version of the rule that we determine via the various algorithms. It could contain a mix of all the rule versions on a per-field basis to create a singluar version of the rule containing all relevant updates and user changes to display to the user. + +### Assumptions + +- All scenarios will contain at least 1 prebuilt rule installed in Kibana. +- A new version will be available for rule(s). + +## Scenarios + +### Rule field doesn't have an update and has no custom value - `AAA` + +#### **Scenario: `AAA` - Rule field is any type** + +**Automation**: 3 integration tests with mock rules + a set of unit tests for each algorithm + +```Gherkin +Given field is not customized by the user (current version == base version) +And field is not updated by Elastic in this upgrade (target version == base version) +Then for field the diff algorithm should output the current version as the merged one without a conflict +And field should not be returned from the `upgrade/_review` API endpoint +And field should not be shown in the upgrade preview UI + +Examples: +| algorithm | field_name | base_version | current_version | target_version | merged_version | +| single line string | name | "A" | "A" | "A" | "A" | +| number | risk_score | 1 | 1 | 1 | 1 | +| array of scalars | tags | ["one", "two", "three"] | ["one", "three", "two"] | ["three", "one", "two"] | ["one", "three", "two"] | +``` + +### Rule field doesn't have an update but has a custom value - `ABA` + +#### **Scenario: `ABA` - Rule field is any type** + +**Automation**: 3 integration tests with mock rules + a set of unit tests for each algorithm + +```Gherkin +Given field is customized by the user (current version != base version) +And field is not updated by Elastic in this upgrade (target version == base version) +Then for field the diff algorithm should output the current version as the merged one without a conflict +And field should be returned from the `upgrade/_review` API endpoint +And field should be shown in the upgrade preview UI + +Examples: +| algorithm | field_name | base_version | current_version | target_version | merged_version | +| single line string | name | "A" | "B" | "A" | "B" | +| number | risk_score | 1 | 2 | 1 | 2 | +| array of scalars | tags | ["one", "two", "three"] | ["one", "two", "four"] | ["one", "two", "three"] | ["one", "two", "four"] | +``` + +### Rule field has an update and doesn't have a custom value - `AAB` + +#### **Scenario: `AAB` - Rule field is any type** + +**Automation**: 3 integration tests with mock rules + a set of unit tests for each algorithm + +```Gherkin +Given field is not customized by the user (current version == base version) +And field is updated by Elastic in this upgrade (target version != base version) +Then for field the diff algorithm should output the target version as the merged one without a conflict +And field should be returned from the `upgrade/_review` API endpoint +And field should be shown in the upgrade preview UI + +Examples: +| algorithm | field_name | base_version | current_version | target_version | merged_version | +| single line string | name | "A" | "A" | "B" | "B" | +| number | risk_score | 1 | 1 | 2 | 2 | +| array of scalars | tags | ["one", "two", "three"] | ["one", "two", "three"] | ["one", "two", "four"] | ["one", "two", "four"] | +``` + +### Rule field has an update and a custom value that are the same - `ABB` + +#### **Scenario: `ABB` - Rule field is any type** + +**Automation**: 3 integration tests with mock rules + a set of unit tests for each algorithm + +```Gherkin +Given field is customized by the user (current version != base version) +And field is updated by Elastic in this upgrade (target version != base version) +And customized field is the same as the Elastic update in this upgrade (current version == target version) +Then for field the diff algorithm should output the current version as the merged one without a conflict +And field should be returned from the `upgrade/_review` API endpoint +And field should be shown in the upgrade preview UI + +Examples: +| algorithm | field_name | base_version | current_version | target_version | merged_version | +| single line string | name | "A" | "B" | "B" | "B" | +| number | risk_score | 1 | 2 | 2 | 2 | +| array of scalars | tags | ["one", "two", "three"] | ["one", "two", "four"] | ["one", "two", "four"] | ["one", "two", "four"] | +``` + +### Rule field has an update and a custom value that are NOT the same - `ABC` + +#### **Scenario: `ABC` - Rule field is a number or single line string** + +**Automation**: 2 integration tests with mock rules + a set of unit tests for the algorithms + +```Gherkin +Given field is customized by the user (current version != base version) +And field is updated by Elastic in this upgrade (target version != base version) +And customized field is different than the Elastic update in this upgrade (current version != target version) +Then for field the diff algorithm should output the current version as the merged one with a non-solvable conflict +And field should be returned from the `upgrade/_review` API endpoint +And field should be shown in the upgrade preview UI + +Examples: +| algorithm | field_name | base_version | current_version | target_version | merged_version | +| single line string | name | "A" | "B" | "C" | "B" | +| number | risk_score | 1 | 2 | 3 | 2 | +``` + +#### **Scenario: `ABC` - Rule field is an array of scalar values** + +**Automation**: 5 integration tests with mock rules + a set of unit tests for the algorithm + +```Gherkin +Given field is customized by the user (current version != base version) +And field is updated by Elastic in this upgrade (target version != base version) +And customized field is different than the Elastic update in this upgrade (current version != target version) +Then for field the diff algorithm should output a custom merged version with a solvable conflict +And arrays should be deduplicated before comparison +And arrays should be compared sensitive of case +And arrays should be compared agnostic of order +And field should be returned from the `upgrade/_review` API endpoint +And field should be shown in the upgrade preview UI + +Examples: +| algorithm | field_name | base_version | current_version | target_version | merged_version | +| array of scalars | tags | ["one", "two", "three"] | ["one", "two", "four"] | ["one", "two", "five"] | ["one", "two", "four", "five"] | +| array of scalars | tags | ["one", "two", "three"] | ["two", "one"] | ["one", "four"] | ["one", "four"] | +| array of scalars | tags | ["one", "two", "three"] | [] | ["one", "two", "five"] | ["five"] | +| array of scalars | tags | ["one", "two", "two"] | ["two", "one", "three"] | ["three", "three", "one"] | ["one", "three"] | +| array of scalars | index | ["logs-*", "endgame-*", "endpoint-*"] | ["Logs-*", "endgame-*"] | ["logs-*", "endgame-*", "new-*"] | ["Logs-*", "endgame-*", "new-*"] | +| array of scalars | index | ["logs-*"] | ["logs-*", "Logs-*"] | ["logs-*", "new-*"] | ["logs-*", "Logs-*", "new-*"] | +``` + +### Rule field has an update and a custom value that are the same and the rule base version doesn't exist - `-AA` + +#### **Scenario: `-AA` - Rule field is any type** + +**Automation**: 3 integration tests with mock rules + a set of unit tests for each algorithm + +```Gherkin +Given at least 1 installed prebuilt rule has a new version available +And the base version of the rule cannot be determined +And customized field is the same as the Elastic update in this upgrade (current version == target version) +Then for field the diff algorithm should output the current version as the merged one without a conflict +And field should not be returned from the `upgrade/_review` API endpoint +And field should not be shown in the upgrade preview UI + +Examples: +| algorithm | field_name | base_version | current_version | target_version | merged_version | +| single line string | name | N/A | "A" | "A" | "A" | +| number | risk_score | N/A | 1 | 1 | 1 | +| array of scalars | tags | N/A | ["one", "three", "two"] | ["three", "one", "two"] | ["one", "three", "two"] | +``` + +### Rule field has an update and a custom value that are NOT the same and the rule base version doesn't exist - `-BC` + +#### **Scenario: `-BC` - Rule field is a number or single line string** + +**Automation**: 2 integration tests with mock rules + a set of unit tests for the algorithms + +```Gherkin +Given at least 1 installed prebuilt rule has a new version available +And the base version of the rule cannot be determined +And customized field is different than the Elastic update in this upgrade (current version != target version) +Then for field the diff algorithm should output the target version as the merged one with a solvable conflict +And field should be returned from the `upgrade/_review` API endpoint +And field should be shown in the upgrade preview UI + +Examples: +| algorithm | field_name | base_version | current_version | target_version | merged_version | +| single line string | name | N/A | "B" | "C" | "C" | +| number | risk_score | N/A | 2 | 3 | 3 | +``` + +#### **Scenario: `-BC` - Rule field is an array of scalar values** + +**Automation**: 1 integration test with mock rules + a set of unit tests for the algorithm + +```Gherkin +Given field is customized by the user (current version != base version) +And field is updated by Elastic in this upgrade (target version != base version) +And customized field is different than the Elastic update in this upgrade (current version != target version) +Then for field the diff algorithm should output a custom merged version with a solvable conflict +And arrays should be deduplicated before comparison +And arrays should be compared sensitive of case +And arrays should be compared agnostic of order +And field should be returned from the `upgrade/_review` API endpoint +And field should be shown in the upgrade preview UI + + +Examples: +| algorithm | field_name | base_version | current_version | target_version | merged_version | +| array of scalars | tags | N/A | ["one", "two", "four"] | ["one", "two", "five"] | ["one", "two", "four", "five"] | +``` From 34b96c51ce29afd2ba75d009a226d587bd757672 Mon Sep 17 00:00:00 2001 From: Marta Bondyra <4283304+mbondyra@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:38:19 +0200 Subject: [PATCH 072/103] [Unified Fieldlist] unskip the flaky test (#187862) Fixes https://github.com/elastic/kibana/issues/187714 I could reproduce the flakiness on my local machine. It doesn't happen anymore with this PR. Tested by running 100 times like this; before: ``` test.each(Array(100).fill(null))('should render correctly', async () => { const props: FieldNameSearchProps = { nameFilter: '', onChange: jest.fn(), screenReaderDescriptionId: 'htmlId', 'data-test-subj': 'searchInput', }; render(); const input = screen.getByRole('searchbox', { name: 'Search field names' }); expect(input).toHaveAttribute('aria-describedby', 'htmlId'); userEvent.type(input, 'hey'); await waitFor(() => expect(props.onChange).toHaveBeenCalledWith('hey'), { timeout: 256 }); expect(props.onChange).toBeCalledTimes(1); }); ``` Screenshot 2024-07-09 at 14 56 49 after: ``` test.each(Array(100).fill(null))('should render correctly', () => { const props: FieldNameSearchProps = { nameFilter: '', onChange: jest.fn(), screenReaderDescriptionId: 'htmlId', 'data-test-subj': 'searchInput', }; render(); const input = screen.getByRole('searchbox', { name: 'Search field names' }); expect(input).toHaveAttribute('aria-describedby', 'htmlId'); userEvent.type(input, 'hey'); jest.advanceTimersByTime(256); expect(props.onChange).toHaveBeenCalledWith('hey'); expect(props.onChange).toBeCalledTimes(1); }); ``` Screenshot 2024-07-09 at 14 57 56 --- .../field_name_search.test.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/kbn-unified-field-list/src/components/field_list_filters/field_name_search.test.tsx b/packages/kbn-unified-field-list/src/components/field_list_filters/field_name_search.test.tsx index e5a5a4bb82a5f0..52858ba292812f 100644 --- a/packages/kbn-unified-field-list/src/components/field_list_filters/field_name_search.test.tsx +++ b/packages/kbn-unified-field-list/src/components/field_list_filters/field_name_search.test.tsx @@ -8,12 +8,18 @@ import React, { useState } from 'react'; import userEvent from '@testing-library/user-event'; +import { render, screen } from '@testing-library/react'; import { FieldNameSearch, type FieldNameSearchProps } from './field_name_search'; -import { render, screen, waitFor } from '@testing-library/react'; -// Flaky: https://github.com/elastic/kibana/issues/187714 -describe.skip('UnifiedFieldList ', () => { - it('should render correctly', async () => { +describe('UnifiedFieldList ', () => { + beforeAll(() => { + jest.useFakeTimers(); + }); + afterAll(() => { + jest.useRealTimers(); + }); + + it('should render correctly', () => { const props: FieldNameSearchProps = { nameFilter: '', onChange: jest.fn(), @@ -24,11 +30,12 @@ describe.skip('UnifiedFieldList ', () => { const input = screen.getByRole('searchbox', { name: 'Search field names' }); expect(input).toHaveAttribute('aria-describedby', 'htmlId'); userEvent.type(input, 'hey'); - await waitFor(() => expect(props.onChange).toHaveBeenCalledWith('hey'), { timeout: 256 }); + jest.advanceTimersByTime(256); + expect(props.onChange).toHaveBeenCalledWith('hey'); expect(props.onChange).toBeCalledTimes(1); }); - it('should accept the updates from the top', async () => { + it('should accept the updates from the top', () => { const FieldNameSearchWithWrapper = ({ defaultNameFilter = '' }) => { const [nameFilter, setNameFilter] = useState(defaultNameFilter); const props: FieldNameSearchProps = { From e03fc63e48559604d691825ad3875b69977f198b Mon Sep 17 00:00:00 2001 From: Anton Dosov Date: Tue, 9 Jul 2024 16:38:56 +0200 Subject: [PATCH 073/103] [TableListView] Dashboard listing recently viewed sorting (#187564) ## Summary Close https://github.com/elastic/kibana/issues/183686 Adds a new sorting option "Recently viewed". Recently viewed dashboards will be shown at the top of the list. The remaining dashboards are sorted by last updated at. - This is a default option unless another option was explicitly selected before (and saved in local storage) - If there are no recently viewed dashboards, then this sorting option is hidden, and "last updated at" is default like before - This option is only added to the dashboard listing Implementation: - Recently viewed dashboard are stored in local storage as a queue with 20 items max - I reused the existing RecentlyAccessedService we've been using for sidenav's recently viewed section. For this, I moved it to a separate package. The service already handles a lot of edge cases like spaces, key hashing, and deduping. - The sorting part in EUITable is a bit hacky. It doesn't support custom internal sorting (like we do with title and lastUpdatedAt), so I had to sort the list myself and then tell EUITable not to do any sorting in case "Recently viewed" option is selected. [slack discussion](https://elastic.slack.com/archives/C7QC1JV6F/p1720008717120589) Screenshot 2024-07-05 at 10 59 25 --- .github/CODEOWNERS | 1 + package.json | 1 + .../table_list_view/src/table_list_view.tsx | 3 + .../src/components/table.tsx | 13 ++- .../src/components/table_sort_select.test.tsx | 64 ++++++++++++++ .../src/components/table_sort_select.tsx | 82 +++++++++++++++++- .../table_list_view_table/src/reducer.tsx | 17 ++-- .../src/table_list_view.test.tsx | 85 +++++++++++++++++++ .../src/table_list_view_table.tsx | 33 +++++-- .../table_list_view_table/tsconfig.json | 3 +- .../src/chrome_service.tsx | 4 +- .../tsconfig.json | 2 +- packages/kbn-recently-accessed/README.md | 4 + packages/kbn-recently-accessed/index.ts | 13 +++ packages/kbn-recently-accessed/jest.config.js | 13 +++ packages/kbn-recently-accessed/kibana.jsonc | 5 ++ packages/kbn-recently-accessed/package.json | 6 ++ .../src}/create_log_key.test.ts | 0 .../src}/create_log_key.ts | 2 +- .../src}/index.ts | 1 + .../src}/persisted_log.test.ts | 0 .../src}/persisted_log.ts | 0 .../src}/recently_accessed_service.test.ts | 5 +- .../src}/recently_accessed_service.ts | 17 ++-- packages/kbn-recently-accessed/src/types.ts | 56 ++++++++++++ packages/kbn-recently-accessed/tsconfig.json | 21 +++++ .../use_dashboard_listing_table.test.tsx | 1 + .../hooks/use_dashboard_listing_table.tsx | 3 + .../internal_dashboard_top_nav.tsx | 7 ++ .../dashboard_recently_accessed.stub.ts | 22 +++++ .../dashboard_recently_accessed.ts | 32 +++++++ .../dashboard_recently_accessed/types.ts | 11 +++ .../public/services/plugin_services.stub.ts | 2 + .../public/services/plugin_services.ts | 2 + .../dashboard/public/services/types.ts | 2 + src/plugins/dashboard/tsconfig.json | 1 + tsconfig.base.json | 2 + yarn.lock | 4 + 38 files changed, 507 insertions(+), 33 deletions(-) create mode 100644 packages/content-management/table_list_view_table/src/components/table_sort_select.test.tsx create mode 100644 packages/kbn-recently-accessed/README.md create mode 100644 packages/kbn-recently-accessed/index.ts create mode 100644 packages/kbn-recently-accessed/jest.config.js create mode 100644 packages/kbn-recently-accessed/kibana.jsonc create mode 100644 packages/kbn-recently-accessed/package.json rename packages/{core/chrome/core-chrome-browser-internal/src/recently_accessed => kbn-recently-accessed/src}/create_log_key.test.ts (100%) rename packages/{core/chrome/core-chrome-browser-internal/src/recently_accessed => kbn-recently-accessed/src}/create_log_key.ts (88%) rename packages/{core/chrome/core-chrome-browser-internal/src/recently_accessed => kbn-recently-accessed/src}/index.ts (84%) rename packages/{core/chrome/core-chrome-browser-internal/src/recently_accessed => kbn-recently-accessed/src}/persisted_log.test.ts (100%) rename packages/{core/chrome/core-chrome-browser-internal/src/recently_accessed => kbn-recently-accessed/src}/persisted_log.ts (100%) rename packages/{core/chrome/core-chrome-browser-internal/src/recently_accessed => kbn-recently-accessed/src}/recently_accessed_service.test.ts (98%) rename packages/{core/chrome/core-chrome-browser-internal/src/recently_accessed => kbn-recently-accessed/src}/recently_accessed_service.ts (68%) create mode 100644 packages/kbn-recently-accessed/src/types.ts create mode 100644 packages/kbn-recently-accessed/tsconfig.json create mode 100644 src/plugins/dashboard/public/services/dashboard_recently_accessed/dashboard_recently_accessed.stub.ts create mode 100644 src/plugins/dashboard/public/services/dashboard_recently_accessed/dashboard_recently_accessed.ts create mode 100644 src/plugins/dashboard/public/services/dashboard_recently_accessed/types.ts diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c0928205b74154..98ff703cf09680 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -659,6 +659,7 @@ packages/react/kibana_context/root @elastic/appex-sharedux packages/react/kibana_context/styled @elastic/appex-sharedux packages/react/kibana_context/theme @elastic/appex-sharedux packages/react/kibana_mount @elastic/appex-sharedux +packages/kbn-recently-accessed @elastic/appex-sharedux x-pack/plugins/remote_clusters @elastic/kibana-management test/plugin_functional/plugins/rendering_plugin @elastic/kibana-core packages/kbn-repo-file-maps @elastic/kibana-operations diff --git a/package.json b/package.json index 8ac85c6af20ba0..1370f8012f3f39 100644 --- a/package.json +++ b/package.json @@ -675,6 +675,7 @@ "@kbn/react-kibana-context-styled": "link:packages/react/kibana_context/styled", "@kbn/react-kibana-context-theme": "link:packages/react/kibana_context/theme", "@kbn/react-kibana-mount": "link:packages/react/kibana_mount", + "@kbn/recently-accessed": "link:packages/kbn-recently-accessed", "@kbn/remote-clusters-plugin": "link:x-pack/plugins/remote_clusters", "@kbn/rendering-plugin": "link:test/plugin_functional/plugins/rendering_plugin", "@kbn/repo-info": "link:packages/kbn-repo-info", diff --git a/packages/content-management/table_list_view/src/table_list_view.tsx b/packages/content-management/table_list_view/src/table_list_view.tsx index a5150c959e4f59..06c2566936d5ab 100644 --- a/packages/content-management/table_list_view/src/table_list_view.tsx +++ b/packages/content-management/table_list_view/src/table_list_view.tsx @@ -38,6 +38,7 @@ export type TableListViewProps & { title: string; description?: string; @@ -75,6 +76,7 @@ export const TableListView = ({ additionalRightSideActions, withoutPageTemplateWrapper, createdByEnabled, + recentlyAccessed, }: TableListViewProps) => { const PageTemplate = withoutPageTemplateWrapper ? (React.Fragment as unknown as typeof KibanaPageTemplate) @@ -124,6 +126,7 @@ export const TableListView = ({ onFetchSuccess={onFetchSuccess} setPageDataTestSubject={setPageDataTestSubject} createdByEnabled={createdByEnabled} + recentlyAccessed={recentlyAccessed} /> diff --git a/packages/content-management/table_list_view_table/src/components/table.tsx b/packages/content-management/table_list_view_table/src/components/table.tsx index dc3061e1e4802c..058c12eba5bf3c 100644 --- a/packages/content-management/table_list_view_table/src/components/table.tsx +++ b/packages/content-management/table_list_view_table/src/components/table.tsx @@ -13,7 +13,6 @@ import { EuiButton, EuiInMemoryTable, CriteriaWithPagination, - PropertySort, SearchFilterConfig, Direction, Query, @@ -59,6 +58,7 @@ interface Props extends State, TagManageme tableCaption: string; tableColumns: Array>; hasUpdatedAtMetadata: boolean; + hasRecentlyAccessedMetadata: boolean; deleteItems: TableListViewTableProps['deleteItems']; tableItemsRowActions: TableItemsRowActions; renderCreateButton: () => React.ReactElement | undefined; @@ -81,6 +81,7 @@ export function Table({ tableSort, tableFilter, hasUpdatedAtMetadata, + hasRecentlyAccessedMetadata, entityName, entityNamePlural, tagsToTableItemMap, @@ -174,12 +175,13 @@ export function Table({ ); }, }; - }, [hasUpdatedAtMetadata, onSortChange, tableSort]); + }, [hasUpdatedAtMetadata, onSortChange, tableSort, hasRecentlyAccessedMetadata]); const tagFilterPanel = useMemo(() => { if (!isTaggingEnabled()) return null; @@ -278,6 +280,11 @@ export function Table({ return { allUsers: Array.from(users), showNoUserOption: _showNoUserOption }; }, [createdByEnabled, items]); + const sorting = + tableSort.field === 'accessedAt' // "accessedAt" is a special case with a custom sorting + ? true // by passing "true" we disable the EuiInMemoryTable sorting and handle it ourselves, but sorting is still enabled + : { sort: tableSort }; + return ( ({ selection={selection} search={search} executeQueryOptions={{ enabled: false }} - sorting={tableSort ? { sort: tableSort as PropertySort } : undefined} + sorting={sorting} onChange={onTableChange} data-test-subj="itemsInMemTable" rowHeader="attributes.title" diff --git a/packages/content-management/table_list_view_table/src/components/table_sort_select.test.tsx b/packages/content-management/table_list_view_table/src/components/table_sort_select.test.tsx new file mode 100644 index 00000000000000..e2c62a46c0e71b --- /dev/null +++ b/packages/content-management/table_list_view_table/src/components/table_sort_select.test.tsx @@ -0,0 +1,64 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { sortByRecentlyAccessed } from './table_sort_select'; +import { UserContentCommonSchema } from '@kbn/content-management-table-list-view-common'; + +describe('sortByRecentlyAccessed', () => { + const items: UserContentCommonSchema[] = [ + { + id: 'item-1', + type: 'dashboard', + updatedAt: '2020-01-01T00:00:00Z', + attributes: { + title: 'Item 1', + }, + references: [], + }, + { + id: 'item-2', + type: 'dashboard', + updatedAt: '2020-01-02T00:00:00Z', + attributes: { + title: 'Item 2', + }, + createdBy: 'u_1', + references: [], + }, + { + id: 'item-3', + type: 'dashboard', + updatedAt: '2020-01-03T00:00:00Z', + attributes: { + title: 'Item 3', + }, + createdBy: 'u_2', + references: [], + }, + { + id: 'item-4', + type: 'dashboard', + updatedAt: '2020-01-04T00:00:00Z', + attributes: { + title: 'Item 4', + }, + references: [], + managed: true, + }, + ]; + + test('sort by last updated', () => { + const sortedItems = sortByRecentlyAccessed(items, []); + expect(sortedItems.map((item) => item.id)).toEqual(['item-4', 'item-3', 'item-2', 'item-1']); + }); + + test('pulls recently accessed to the top', () => { + const sortedItems = sortByRecentlyAccessed(items, [{ id: 'item-1' }, { id: 'item-2' }]); + expect(sortedItems.map((item) => item.id)).toEqual(['item-1', 'item-2', 'item-4', 'item-3']); + }); +}); diff --git a/packages/content-management/table_list_view_table/src/components/table_sort_select.tsx b/packages/content-management/table_list_view_table/src/components/table_sort_select.tsx index c9e06a29e9c8c8..1b5d9080f82051 100644 --- a/packages/content-management/table_list_view_table/src/components/table_sort_select.tsx +++ b/packages/content-management/table_list_view_table/src/components/table_sort_select.tsx @@ -16,8 +16,10 @@ import { Direction, EuiText, useEuiTheme, + EuiIconTip, } from '@elastic/eui'; import { css } from '@emotion/react'; +import { UserContentCommonSchema } from '@kbn/content-management-table-list-view-common'; import { State } from '../table_list_view_table'; @@ -26,9 +28,15 @@ type SortItem = EuiSelectableOption & { direction: Direction; }; -export type SortColumnField = 'updatedAt' | 'attributes.title'; +export type SortColumnField = 'updatedAt' | 'attributes.title' | 'accessedAt'; const i18nText = { + accessedDescSort: i18n.translate( + 'contentManagement.tableList.listing.tableSortSelect.recentlyAccessedLabel', + { + defaultMessage: 'Recently viewed', + } + ), nameAscSort: i18n.translate('contentManagement.tableList.listing.tableSortSelect.nameAscLabel', { defaultMessage: 'Name A-Z', }), @@ -57,11 +65,17 @@ const i18nText = { interface Props { hasUpdatedAtMetadata: boolean; + hasRecentlyAccessedMetadata: boolean; tableSort: State['tableSort']; onChange?: (column: SortColumnField, direction: Direction) => void; } -export function TableSortSelect({ tableSort, hasUpdatedAtMetadata, onChange }: Props) { +export function TableSortSelect({ + tableSort, + hasUpdatedAtMetadata, + hasRecentlyAccessedMetadata, + onChange, +}: Props) { const { euiTheme } = useEuiTheme(); const [isPopoverOpen, setIsPopoverOpen] = useState(false); @@ -81,6 +95,40 @@ export function TableSortSelect({ tableSort, hasUpdatedAtMetadata, onChange }: P }, ]; + if (hasRecentlyAccessedMetadata) { + opts = [ + { + label: i18nText.accessedDescSort, + column: + 'accessedAt' /* nonexistent field, used to identify this custom type of sorting */, + direction: 'desc', + append: ( + + ), + }, + ...opts, + ]; + } + if (hasUpdatedAtMetadata) { opts = opts.concat([ { @@ -100,6 +148,7 @@ export function TableSortSelect({ tableSort, hasUpdatedAtMetadata, onChange }: P return opts; }); + const selectedOptionLabel = options.find(({ checked }) => checked === 'on')?.label ?? ''; const panelHeaderCSS = css` @@ -165,8 +214,11 @@ export function TableSortSelect({ tableSort, hasUpdatedAtMetadata, onChange }: P <> {i18nText.headerSort} - singleSelection - aria-label="some aria label" + singleSelection={'always'} + aria-label={i18n.translate( + 'contentManagement.tableList.listing.tableSortSelect.sortingOptionsAriaLabel', + { defaultMessage: 'Sorting options' } + )} options={options} onChange={onSelectChange} data-test-subj="sortSelect" @@ -214,3 +266,25 @@ export function saveSorting( /* empty */ } } + +/** + * Default custom sorting for the table when recently accessed info is available + * Sorts by recently accessed list first and the by lastUpdatedAt + */ +export function sortByRecentlyAccessed( + items: T[], + recentlyAccessed: Array<{ id: string }> +) { + const recentlyAccessedMap = new Map(recentlyAccessed.map((item, index) => [item.id, index])); + return [...items].sort((a, b) => { + if (recentlyAccessedMap.has(a.id) && recentlyAccessedMap.has(b.id)) { + return recentlyAccessedMap.get(a.id)! - recentlyAccessedMap.get(b.id)!; + } else if (recentlyAccessedMap.has(a.id)) { + return -1; + } else if (recentlyAccessedMap.has(b.id)) { + return 1; + } else { + return a.updatedAt > b.updatedAt ? -1 : 1; + } + }); +} diff --git a/packages/content-management/table_list_view_table/src/reducer.tsx b/packages/content-management/table_list_view_table/src/reducer.tsx index b4cf3691f9d759..d239fad38c724a 100644 --- a/packages/content-management/table_list_view_table/src/reducer.tsx +++ b/packages/content-management/table_list_view_table/src/reducer.tsx @@ -33,11 +33,18 @@ export function getReducer() { // Only change the table sort if it hasn't been changed already. // For example if its state comes from the URL, we don't want to override it here. - if (hasUpdatedAtMetadata && !state.sortColumnChanged) { - tableSort = { - field: 'updatedAt' as const, - direction: 'desc' as const, - }; + if (!state.sortColumnChanged) { + if (state.hasRecentlyAccessedMetadata) { + tableSort = { + field: 'accessedAt' as const, + direction: 'desc' as const, + }; + } else if (hasUpdatedAtMetadata) { + tableSort = { + field: 'updatedAt' as const, + direction: 'desc' as const, + }; + } } } diff --git a/packages/content-management/table_list_view_table/src/table_list_view.test.tsx b/packages/content-management/table_list_view_table/src/table_list_view.test.tsx index c8747477994801..e56322099d5ffa 100644 --- a/packages/content-management/table_list_view_table/src/table_list_view.test.tsx +++ b/packages/content-management/table_list_view_table/src/table_list_view.test.tsx @@ -653,6 +653,91 @@ describe('TableListView', () => { }); }); + describe('column sorting with recently accessed', () => { + const setupColumnSorting = registerTestBed( + WithServices(TableListViewTable, { + TagList: getTagList({ references: [] }), + }), + { + defaultProps: { + ...requiredProps, + recentlyAccessed: { get: () => [{ id: '123', link: '', label: '' }] }, + }, + memoryRouter: { wrapComponent: true }, + } + ); + + const hits: UserContentCommonSchema[] = [ + { + id: '123', + updatedAt: twoDaysAgo.toISOString(), // first asc, last desc + type: 'dashboard', + attributes: { + title: 'z-foo', // first desc, last asc + }, + references: [{ id: 'id-tag-1', name: 'tag-1', type: 'tag' }], + }, + { + id: '456', + updatedAt: yesterday.toISOString(), // first desc, last asc + type: 'dashboard', + attributes: { + title: 'a-foo', // first asc, last desc + }, + references: [], + }, + ]; + + test('should initially sort by "Recently Accessed"', async () => { + let testBed: TestBed; + + await act(async () => { + testBed = await setupColumnSorting({ + findItems: jest.fn().mockResolvedValue({ total: hits.length, hits }), + }); + }); + + const { component, table } = testBed!; + component.update(); + + const { tableCellsValues } = table.getMetaData('itemsInMemTable'); + + expect(tableCellsValues).toEqual([ + ['z-foo', twoDaysAgoToString], + ['a-foo', yesterdayToString], + ]); + }); + + test('filter select should have 5 options', async () => { + let testBed: TestBed; + + await act(async () => { + testBed = await setupColumnSorting({ + findItems: jest.fn().mockResolvedValue({ total: hits.length, hits }), + }); + }); + const { openSortSelect } = getActions(testBed!); + const { component, find } = testBed!; + component.update(); + + act(() => { + openSortSelect(); + }); + component.update(); + + const filterOptions = find('sortSelect').find('li'); + + expect(filterOptions.length).toBe(5); + expect(filterOptions.map((wrapper) => wrapper.text())).toEqual([ + 'Recently viewed. Checked option.Additional information ', + 'Name A-Z ', + 'Name Z-A ', + 'Recently updated ', + 'Least recently updated ', + ]); + }); + }); + describe('content editor', () => { const setupInspector = registerTestBed( WithServices(TableListViewTable), diff --git a/packages/content-management/table_list_view_table/src/table_list_view_table.tsx b/packages/content-management/table_list_view_table/src/table_list_view_table.tsx index 9e69c4e0f44345..888e0a312d049d 100644 --- a/packages/content-management/table_list_view_table/src/table_list_view_table.tsx +++ b/packages/content-management/table_list_view_table/src/table_list_view_table.tsx @@ -37,6 +37,7 @@ import type { SavedObjectsReference, } from '@kbn/content-management-content-editor'; import type { UserContentCommonSchema } from '@kbn/content-management-table-list-view-common'; +import type { RecentlyAccessed } from '@kbn/recently-accessed'; import { Table, @@ -52,6 +53,7 @@ import { type SortColumnField, getInitialSorting, saveSorting } from './componen import { useTags } from './use_tags'; import { useInRouterContext, useUrlState } from './use_url_state'; import { RowActions, TableItemsRowActions } from './types'; +import { sortByRecentlyAccessed } from './components/table_sort_select'; interface ContentEditorConfig extends Pick< @@ -116,6 +118,7 @@ export interface TableListViewTableProps< */ withoutPageTemplateWrapper?: boolean; contentEditor?: ContentEditorConfig; + recentlyAccessed?: Pick; tableCaption: string; /** Flag to force a new fetch of the table items. Whenever it changes, the `findItems()` will be called. */ @@ -145,6 +148,7 @@ export interface State { // in the query params. We might want to stop supporting both in a future release (v9.0?) stateFromURL.s = sanitizedParams.s ?? sanitizedParams.title; - if (sanitizedParams.sort === 'title' || sanitizedParams.sort === 'updatedAt') { - const field = sanitizedParams.sort === 'title' ? 'attributes.title' : 'updatedAt'; + if ( + sanitizedParams.sort === 'title' || + sanitizedParams.sort === 'updatedAt' || + sanitizedParams.sort === 'accessedAt' + ) { + const field = + sanitizedParams.sort === 'title' + ? 'attributes.title' + : sanitizedParams.sort === 'accessedAt' + ? 'accessedAt' + : 'updatedAt'; - stateFromURL.sort = { field, direction: 'asc' }; + stateFromURL.sort = { field, direction: field === 'attributes.title' ? 'asc' : 'desc' }; if (sanitizedParams.sortdir === 'desc' || sanitizedParams.sortdir === 'asc') { stateFromURL.sort.direction = sanitizedParams.sortdir; @@ -302,6 +315,7 @@ function TableListViewTableComp({ refreshListBouncer, setPageDataTestSubject, createdByEnabled = false, + recentlyAccessed, }: TableListViewTableProps) { useEffect(() => { setPageDataTestSubject(`${entityName}LandingPage`); @@ -373,6 +387,7 @@ function TableListViewTableComp({ showDeleteModal: false, hasUpdatedAtMetadata: false, hasCreatedByMetadata: false, + hasRecentlyAccessedMetadata: recentlyAccessed ? recentlyAccessed.get().length > 0 : false, selectedIds: [], searchQuery: { text: '', query: new Query(Ast.create([]), undefined, '') }, pagination: { @@ -387,7 +402,7 @@ function TableListViewTableComp({ createdBy: [], }, }; - }, [initialPageSize, entityName]); + }, [initialPageSize, entityName, recentlyAccessed]); const [state, dispatch] = useReducer(reducer, initialState); @@ -404,6 +419,7 @@ function TableListViewTableComp({ totalItems, hasUpdatedAtMetadata, hasCreatedByMetadata, + hasRecentlyAccessedMetadata, pagination, tableSort, tableFilter, @@ -433,6 +449,12 @@ function TableListViewTableComp({ } if (idx === fetchIdx.current) { + // when recentlyAccessed is available, we sort the items by the recently accessed items + // then this sort will be used as the default sort for the table + if (recentlyAccessed && recentlyAccessed.get().length > 0) { + response.hits = sortByRecentlyAccessed(response.hits, recentlyAccessed.get()); + } + dispatch({ type: 'onFetchItemsSuccess', data: { @@ -448,7 +470,7 @@ function TableListViewTableComp({ data: err, }); } - }, [searchQueryParser, searchQuery.text, findItems, onFetchSuccess]); + }, [searchQueryParser, searchQuery.text, findItems, onFetchSuccess, recentlyAccessed]); const updateQuery = useCallback( (query: Query) => { @@ -1109,6 +1131,7 @@ function TableListViewTableComp({ searchQuery={searchQuery} tableColumns={tableColumns} hasUpdatedAtMetadata={hasUpdatedAtMetadata} + hasRecentlyAccessedMetadata={hasRecentlyAccessedMetadata} tableSort={tableSort} tableFilter={tableFilter} tableItemsRowActions={tableItemsRowActions} diff --git a/packages/content-management/table_list_view_table/tsconfig.json b/packages/content-management/table_list_view_table/tsconfig.json index 09bf8256764d1e..b8add47c2bfb99 100644 --- a/packages/content-management/table_list_view_table/tsconfig.json +++ b/packages/content-management/table_list_view_table/tsconfig.json @@ -34,7 +34,8 @@ "@kbn/user-profile-components", "@kbn/core-user-profile-browser", "@kbn/react-kibana-mount", - "@kbn/content-management-user-profiles" + "@kbn/content-management-user-profiles", + "@kbn/recently-accessed" ], "exclude": [ "target/**/*" diff --git a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx index d2922b9a966116..380314554dedda 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx @@ -39,13 +39,13 @@ import type { SideNavComponent as ISideNavComponent, ChromeHelpMenuLink, } from '@kbn/core-chrome-browser'; +import { RecentlyAccessedService } from '@kbn/recently-accessed'; import { Logger } from '@kbn/logging'; import { DocTitleService } from './doc_title'; import { NavControlsService } from './nav_controls'; import { NavLinksService } from './nav_links'; import { ProjectNavigationService } from './project_navigation'; -import { RecentlyAccessedService } from './recently_accessed'; import { Header, LoadingIndicator, ProjectHeader } from './ui'; import { registerAnalyticsContextProvider } from './register_analytics_context_provider'; import type { InternalChromeStart } from './types'; @@ -252,7 +252,7 @@ export class ChromeService { chromeBreadcrumbs$: breadcrumbs$, logger: this.logger, }); - const recentlyAccessed = await this.recentlyAccessed.start({ http }); + const recentlyAccessed = this.recentlyAccessed.start({ http, key: 'recentlyAccessed' }); const docTitle = this.docTitle.start(); const { customBranding$ } = customBranding; const helpMenuLinks$ = navControls.getHelpMenuLinks$(); diff --git a/packages/core/chrome/core-chrome-browser-internal/tsconfig.json b/packages/core/chrome/core-chrome-browser-internal/tsconfig.json index 5d81526f2c970e..d4512b515f6404 100644 --- a/packages/core/chrome/core-chrome-browser-internal/tsconfig.json +++ b/packages/core/chrome/core-chrome-browser-internal/tsconfig.json @@ -16,7 +16,6 @@ "**/*.tsx", ], "kbn_references": [ - "@kbn/crypto-browser", "@kbn/i18n", "@kbn/i18n-react", "@kbn/core-injected-metadata-browser-internal", @@ -55,6 +54,7 @@ "@kbn/core-i18n-browser-mocks", "@kbn/core-theme-browser-mocks", "@kbn/react-kibana-context-render", + "@kbn/recently-accessed", ], "exclude": [ "target/**/*", diff --git a/packages/kbn-recently-accessed/README.md b/packages/kbn-recently-accessed/README.md new file mode 100644 index 00000000000000..a7579822c91235 --- /dev/null +++ b/packages/kbn-recently-accessed/README.md @@ -0,0 +1,4 @@ +# @kbn/recently-accessed + +The `RecentlyAccessedService` uses browser local storage to manage records of recently accessed objects. +This can be used to make recent items easier for users to find in listing UIs. diff --git a/packages/kbn-recently-accessed/index.ts b/packages/kbn-recently-accessed/index.ts new file mode 100644 index 00000000000000..3b23a548ce9466 --- /dev/null +++ b/packages/kbn-recently-accessed/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { + type RecentlyAccessed, + type RecentlyAccessedHistoryItem, + RecentlyAccessedService, +} from './src'; diff --git a/packages/kbn-recently-accessed/jest.config.js b/packages/kbn-recently-accessed/jest.config.js new file mode 100644 index 00000000000000..1492f7da1fcfec --- /dev/null +++ b/packages/kbn-recently-accessed/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../..', + roots: ['/packages/kbn-recently-accessed'], +}; diff --git a/packages/kbn-recently-accessed/kibana.jsonc b/packages/kbn-recently-accessed/kibana.jsonc new file mode 100644 index 00000000000000..0ec9917dc6b779 --- /dev/null +++ b/packages/kbn-recently-accessed/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/recently-accessed", + "owner": "@elastic/appex-sharedux" +} diff --git a/packages/kbn-recently-accessed/package.json b/packages/kbn-recently-accessed/package.json new file mode 100644 index 00000000000000..825ccbd8cfdaf1 --- /dev/null +++ b/packages/kbn-recently-accessed/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/recently-accessed", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} \ No newline at end of file diff --git a/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/create_log_key.test.ts b/packages/kbn-recently-accessed/src/create_log_key.test.ts similarity index 100% rename from packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/create_log_key.test.ts rename to packages/kbn-recently-accessed/src/create_log_key.test.ts diff --git a/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/create_log_key.ts b/packages/kbn-recently-accessed/src/create_log_key.ts similarity index 88% rename from packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/create_log_key.ts rename to packages/kbn-recently-accessed/src/create_log_key.ts index a9b0c5cdcf7d40..5a5e8e7cc7ad0a 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/create_log_key.ts +++ b/packages/kbn-recently-accessed/src/create_log_key.ts @@ -8,7 +8,7 @@ import { Sha256 } from '@kbn/crypto-browser'; -export async function createLogKey(type: string, optionalIdentifier?: string) { +export function createLogKey(type: string, optionalIdentifier?: string) { const baseKey = `kibana.history.${type}`; if (!optionalIdentifier) { diff --git a/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/index.ts b/packages/kbn-recently-accessed/src/index.ts similarity index 84% rename from packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/index.ts rename to packages/kbn-recently-accessed/src/index.ts index 2256f60061b873..389b7eca5c1b23 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/index.ts +++ b/packages/kbn-recently-accessed/src/index.ts @@ -7,3 +7,4 @@ */ export { RecentlyAccessedService } from './recently_accessed_service'; +export type { RecentlyAccessed, RecentlyAccessedHistoryItem } from './types'; diff --git a/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/persisted_log.test.ts b/packages/kbn-recently-accessed/src/persisted_log.test.ts similarity index 100% rename from packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/persisted_log.test.ts rename to packages/kbn-recently-accessed/src/persisted_log.test.ts diff --git a/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/persisted_log.ts b/packages/kbn-recently-accessed/src/persisted_log.ts similarity index 100% rename from packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/persisted_log.ts rename to packages/kbn-recently-accessed/src/persisted_log.ts diff --git a/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/recently_accessed_service.test.ts b/packages/kbn-recently-accessed/src/recently_accessed_service.test.ts similarity index 98% rename from packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/recently_accessed_service.test.ts rename to packages/kbn-recently-accessed/src/recently_accessed_service.test.ts index e394f81fab11d6..0260949295634f 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/recently_accessed_service.test.ts +++ b/packages/kbn-recently-accessed/src/recently_accessed_service.test.ts @@ -54,7 +54,10 @@ describe('RecentlyAccessed#start()', () => { const getStart = async () => { const http = httpServiceMock.createStartContract(); - const recentlyAccessed = await new RecentlyAccessedService().start({ http }); + const recentlyAccessed = await new RecentlyAccessedService().start({ + http, + key: 'recentlyAccessed', + }); return { http, recentlyAccessed }; }; diff --git a/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/recently_accessed_service.ts b/packages/kbn-recently-accessed/src/recently_accessed_service.ts similarity index 68% rename from packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/recently_accessed_service.ts rename to packages/kbn-recently-accessed/src/recently_accessed_service.ts index ec9a04ab5551ca..4df97b556e5b65 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/recently_accessed/recently_accessed_service.ts +++ b/packages/kbn-recently-accessed/src/recently_accessed_service.ts @@ -6,23 +6,20 @@ * Side Public License, v 1. */ -import type { InternalHttpStart } from '@kbn/core-http-browser-internal'; -import type { - ChromeRecentlyAccessed, - ChromeRecentlyAccessedHistoryItem, -} from '@kbn/core-chrome-browser'; +import type { HttpStart } from '@kbn/core-http-browser'; +import type { RecentlyAccessed, RecentlyAccessedHistoryItem } from './types'; import { PersistedLog } from './persisted_log'; import { createLogKey } from './create_log_key'; interface StartDeps { - http: InternalHttpStart; + key: string; + http: Pick; } -/** @internal */ export class RecentlyAccessedService { - async start({ http }: StartDeps): Promise { - const logKey = await createLogKey('recentlyAccessed', http.basePath.get()); - const history = new PersistedLog(logKey, { + start({ http, key }: StartDeps): RecentlyAccessed { + const logKey = createLogKey(key, http.basePath.get()); + const history = new PersistedLog(logKey, { maxLength: 20, isEqual: (oldItem, newItem) => oldItem.id === newItem.id, }); diff --git a/packages/kbn-recently-accessed/src/types.ts b/packages/kbn-recently-accessed/src/types.ts new file mode 100644 index 00000000000000..9b729ffc9ed2cd --- /dev/null +++ b/packages/kbn-recently-accessed/src/types.ts @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Observable } from 'rxjs'; + +/** @public */ +export interface RecentlyAccessedHistoryItem { + link: string; + label: string; + id: string; +} + +/** + * {@link RecentlyAccessed | APIs} for recently accessed history. + * @public + */ +export interface RecentlyAccessed { + /** + * Adds a new item to the recently accessed history. + * + * @example + * ```js + * chrome.recentlyAccessed.add('/app/map/1234', 'Map 1234', '1234'); + * ``` + * + * @param link a relative URL to the resource (not including the {@link HttpStart.basePath | `http.basePath`}) + * @param label the label to display in the UI + * @param id a unique string used to de-duplicate the recently accessed list. + */ + add(link: string, label: string, id: string): void; + + /** + * Gets an Array of the current recently accessed history. + * + * @example + * ```js + * recentlyAccessed.get().forEach(console.log); + * ``` + */ + get(): RecentlyAccessedHistoryItem[]; + + /** + * Gets an Observable of the array of recently accessed history. + * + * @example + * ```js + * recentlyAccessed.get$().subscribe(console.log); + * ``` + */ + get$(): Observable; +} diff --git a/packages/kbn-recently-accessed/tsconfig.json b/packages/kbn-recently-accessed/tsconfig.json new file mode 100644 index 00000000000000..f6029007a43762 --- /dev/null +++ b/packages/kbn-recently-accessed/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/crypto-browser", + "@kbn/core-http-browser", + "@kbn/core-http-browser-mocks", + ] +} diff --git a/src/plugins/dashboard/public/dashboard_listing/hooks/use_dashboard_listing_table.test.tsx b/src/plugins/dashboard/public/dashboard_listing/hooks/use_dashboard_listing_table.test.tsx index b2493454d4da26..da9783676cba32 100644 --- a/src/plugins/dashboard/public/dashboard_listing/hooks/use_dashboard_listing_table.test.tsx +++ b/src/plugins/dashboard/public/dashboard_listing/hooks/use_dashboard_listing_table.test.tsx @@ -157,6 +157,7 @@ describe('useDashboardListingTable', () => { showActivityView: true, }, createdByEnabled: true, + recentlyAccessed: expect.objectContaining({ get: expect.any(Function) }), }; expect(tableListViewTableProps).toEqual(expectedProps); diff --git a/src/plugins/dashboard/public/dashboard_listing/hooks/use_dashboard_listing_table.tsx b/src/plugins/dashboard/public/dashboard_listing/hooks/use_dashboard_listing_table.tsx index 659e5e43930ea2..097fc5ea6d8660 100644 --- a/src/plugins/dashboard/public/dashboard_listing/hooks/use_dashboard_listing_table.tsx +++ b/src/plugins/dashboard/public/dashboard_listing/hooks/use_dashboard_listing_table.tsx @@ -100,6 +100,7 @@ export const useDashboardListingTable = ({ checkForDuplicateDashboardTitle, }, notifications: { toasts }, + dashboardRecentlyAccessed, } = pluginServices.getServices(); const { getEntityName, getTableListTitle, getEntityNamePlural } = dashboardListingTableStrings; @@ -302,6 +303,7 @@ export const useDashboardListingTable = ({ title, urlStateEnabled, createdByEnabled: true, + recentlyAccessed: dashboardRecentlyAccessed, }), [ contentEditorValidators, @@ -324,6 +326,7 @@ export const useDashboardListingTable = ({ title, updateItemMeta, urlStateEnabled, + dashboardRecentlyAccessed, ] ); diff --git a/src/plugins/dashboard/public/dashboard_top_nav/internal_dashboard_top_nav.tsx b/src/plugins/dashboard/public/dashboard_top_nav/internal_dashboard_top_nav.tsx index d3e0ac34590492..6cef6ab1871f4b 100644 --- a/src/plugins/dashboard/public/dashboard_top_nav/internal_dashboard_top_nav.tsx +++ b/src/plugins/dashboard/public/dashboard_top_nav/internal_dashboard_top_nav.tsx @@ -83,6 +83,7 @@ export function InternalDashboardTopNav({ embeddable: { getStateTransfer }, initializerContext: { allowByValueEmbeddables }, dashboardCapabilities: { saveQuery: allowSaveQuery, showWriteControls }, + dashboardRecentlyAccessed, } = pluginServices.getServices(); const isLabsEnabled = uiSettings.get(UI_SETTINGS.ENABLE_LABS_UI); const { setHeaderActionMenu, onAppLeave } = useDashboardMountContext(); @@ -143,6 +144,11 @@ export function InternalDashboardTopNav({ title, lastSavedId ); + dashboardRecentlyAccessed.add( + getFullEditPath(lastSavedId, viewMode === ViewMode.EDIT), + title, + lastSavedId + ); } return () => subscription.unsubscribe(); }, [ @@ -152,6 +158,7 @@ export function InternalDashboardTopNav({ lastSavedId, viewMode, title, + dashboardRecentlyAccessed, ]); /** diff --git a/src/plugins/dashboard/public/services/dashboard_recently_accessed/dashboard_recently_accessed.stub.ts b/src/plugins/dashboard/public/services/dashboard_recently_accessed/dashboard_recently_accessed.stub.ts new file mode 100644 index 00000000000000..32f17f01d0e064 --- /dev/null +++ b/src/plugins/dashboard/public/services/dashboard_recently_accessed/dashboard_recently_accessed.stub.ts @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { PluginServiceFactory } from '@kbn/presentation-util-plugin/public'; +import { DashboardRecentlyAccessedService } from './types'; + +type DashboardRecentlyAccessedServiceFactory = + PluginServiceFactory; + +export const dashboardRecentlyAccessedServiceFactory: DashboardRecentlyAccessedServiceFactory = + () => { + return { + add: jest.fn(), + get: jest.fn(), + get$: jest.fn(), + }; + }; diff --git a/src/plugins/dashboard/public/services/dashboard_recently_accessed/dashboard_recently_accessed.ts b/src/plugins/dashboard/public/services/dashboard_recently_accessed/dashboard_recently_accessed.ts new file mode 100644 index 00000000000000..8a80544aacad45 --- /dev/null +++ b/src/plugins/dashboard/public/services/dashboard_recently_accessed/dashboard_recently_accessed.ts @@ -0,0 +1,32 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { RecentlyAccessedService } from '@kbn/recently-accessed'; +import type { KibanaPluginServiceFactory } from '@kbn/presentation-util-plugin/public'; + +import { DashboardHTTPService } from '../http/types'; +import { DashboardStartDependencies } from '../../plugin'; +import { DashboardRecentlyAccessedService } from './types'; + +interface DashboardRecentlyAccessedRequiredServices { + http: DashboardHTTPService; +} + +export type DashboardBackupServiceFactory = KibanaPluginServiceFactory< + DashboardRecentlyAccessedService, + DashboardStartDependencies, + DashboardRecentlyAccessedRequiredServices +>; + +export const dashboardRecentlyAccessedFactory: DashboardBackupServiceFactory = ( + core, + requiredServices +) => { + const { http } = requiredServices; + return new RecentlyAccessedService().start({ http, key: 'dashboardRecentlyAccessed' }); +}; diff --git a/src/plugins/dashboard/public/services/dashboard_recently_accessed/types.ts b/src/plugins/dashboard/public/services/dashboard_recently_accessed/types.ts new file mode 100644 index 00000000000000..0b27bfe89aa63f --- /dev/null +++ b/src/plugins/dashboard/public/services/dashboard_recently_accessed/types.ts @@ -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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { RecentlyAccessed } from '@kbn/recently-accessed'; + +export type DashboardRecentlyAccessedService = RecentlyAccessed; diff --git a/src/plugins/dashboard/public/services/plugin_services.stub.ts b/src/plugins/dashboard/public/services/plugin_services.stub.ts index 8f0f1dd4f5bbc0..59c78ac9685b42 100644 --- a/src/plugins/dashboard/public/services/plugin_services.stub.ts +++ b/src/plugins/dashboard/public/services/plugin_services.stub.ts @@ -47,6 +47,7 @@ import { userProfileServiceFactory } from './user_profile/user_profile_service.s import { observabilityAIAssistantServiceStubFactory } from './observability_ai_assistant/observability_ai_assistant_service.stub'; import { noDataPageServiceFactory } from './no_data_page/no_data_page_service.stub'; import { uiActionsServiceFactory } from './ui_actions/ui_actions_service.stub'; +import { dashboardRecentlyAccessedServiceFactory } from './dashboard_recently_accessed/dashboard_recently_accessed.stub'; export const providers: PluginServiceProviders = { dashboardContentManagement: new PluginServiceProvider(dashboardContentManagementServiceFactory), @@ -82,6 +83,7 @@ export const providers: PluginServiceProviders = { uiActions: new PluginServiceProvider(uiActionsServiceFactory), userProfile: new PluginServiceProvider(userProfileServiceFactory), observabilityAIAssistant: new PluginServiceProvider(observabilityAIAssistantServiceStubFactory), + dashboardRecentlyAccessed: new PluginServiceProvider(dashboardRecentlyAccessedServiceFactory), }; export const registry = new PluginServiceRegistry(providers); diff --git a/src/plugins/dashboard/public/services/plugin_services.ts b/src/plugins/dashboard/public/services/plugin_services.ts index 9880308e7c5e57..b46c261fa6507d 100644 --- a/src/plugins/dashboard/public/services/plugin_services.ts +++ b/src/plugins/dashboard/public/services/plugin_services.ts @@ -48,6 +48,7 @@ import { noDataPageServiceFactory } from './no_data_page/no_data_page_service'; import { uiActionsServiceFactory } from './ui_actions/ui_actions_service'; import { observabilityAIAssistantServiceFactory } from './observability_ai_assistant/observability_ai_assistant_service'; import { userProfileServiceFactory } from './user_profile/user_profile_service'; +import { dashboardRecentlyAccessedFactory } from './dashboard_recently_accessed/dashboard_recently_accessed'; const providers: PluginServiceProviders = { dashboardContentManagement: new PluginServiceProvider(dashboardContentManagementServiceFactory, [ @@ -96,6 +97,7 @@ const providers: PluginServiceProviders(); diff --git a/src/plugins/dashboard/public/services/types.ts b/src/plugins/dashboard/public/services/types.ts index ebb5fa110d0e2b..bb0a8d8d6914d0 100644 --- a/src/plugins/dashboard/public/services/types.ts +++ b/src/plugins/dashboard/public/services/types.ts @@ -43,6 +43,7 @@ import { NoDataPageService } from './no_data_page/types'; import { DashboardUiActionsService } from './ui_actions/types'; import { ObservabilityAIAssistantService } from './observability_ai_assistant/types'; import { DashboardUserProfileService } from './user_profile/types'; +import { DashboardRecentlyAccessedService } from './dashboard_recently_accessed/types'; export type DashboardPluginServiceParams = KibanaPluginServiceParams & { initContext: PluginInitializerContext; // need a custom type so that initContext is a required parameter for initializerContext @@ -82,4 +83,5 @@ export interface DashboardServices { uiActions: DashboardUiActionsService; observabilityAIAssistant: ObservabilityAIAssistantService; // TODO: make this optional in follow up userProfile: DashboardUserProfileService; + dashboardRecentlyAccessed: DashboardRecentlyAccessedService; } diff --git a/src/plugins/dashboard/tsconfig.json b/src/plugins/dashboard/tsconfig.json index 8659b44b914ff2..a29aa108530350 100644 --- a/src/plugins/dashboard/tsconfig.json +++ b/src/plugins/dashboard/tsconfig.json @@ -83,6 +83,7 @@ "@kbn/esql-utils", "@kbn/lens-embeddable-utils", "@kbn/lens-plugin", + "@kbn/recently-accessed", ], "exclude": ["target/**/*"] } diff --git a/tsconfig.base.json b/tsconfig.base.json index 6be66ec0a97d52..6d4637281115e2 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1312,6 +1312,8 @@ "@kbn/react-kibana-context-theme/*": ["packages/react/kibana_context/theme/*"], "@kbn/react-kibana-mount": ["packages/react/kibana_mount"], "@kbn/react-kibana-mount/*": ["packages/react/kibana_mount/*"], + "@kbn/recently-accessed": ["packages/kbn-recently-accessed"], + "@kbn/recently-accessed/*": ["packages/kbn-recently-accessed/*"], "@kbn/remote-clusters-plugin": ["x-pack/plugins/remote_clusters"], "@kbn/remote-clusters-plugin/*": ["x-pack/plugins/remote_clusters/*"], "@kbn/rendering-plugin": ["test/plugin_functional/plugins/rendering_plugin"], diff --git a/yarn.lock b/yarn.lock index de7e3662c29a42..cad73b99f3c3ed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5837,6 +5837,10 @@ version "0.0.0" uid "" +"@kbn/recently-accessed@link:packages/kbn-recently-accessed": + version "0.0.0" + uid "" + "@kbn/remote-clusters-plugin@link:x-pack/plugins/remote_clusters": version "0.0.0" uid "" From 17eb2c894ea6c6a3c9dd8124395bf4fc295d26d9 Mon Sep 17 00:00:00 2001 From: Tim Sullivan Date: Tue, 9 Jul 2024 07:39:38 -0700 Subject: [PATCH 074/103] [Security Solution] Use authc.getCurrentUser from core.security (#187004) Part of https://github.com/elastic/kibana/issues/186574 Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. ### Checklist Delete any items that are not applicable to this PR. - [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 --- .../endpoint/endpoint_app_context_services.ts | 6 +-- .../server/endpoint/mocks/mocks.ts | 7 +-- .../routes/actions/file_download_handler.ts | 5 +- .../routes/actions/file_info_handler.ts | 5 +- .../routes/actions/response_actions.test.ts | 8 ++- .../routes/actions/response_actions.ts | 5 +- .../routes/get_dashboards_by_tags.test.ts | 12 +---- .../routes/get_dashboards_by_tags.ts | 9 +--- .../server/lib/dashboards/routes/index.ts | 9 +--- ...t_rules_and_timelines_status_route.test.ts | 13 ++--- ...ebuilt_rules_and_timelines_status_route.ts | 8 +-- .../prebuilt_rules/api/register_routes.ts | 8 +-- .../create_signals_migration_route.test.ts | 9 +--- .../signals/create_signals_migration_route.ts | 8 +-- .../signals/delete_signals_migration_route.ts | 8 +-- .../finalize_signals_migration_route.test.ts | 8 +-- .../finalize_signals_migration_route.ts | 6 +-- .../routes/signals/open_close_signals.test.ts | 14 +----- .../signals/open_close_signals_route.ts | 19 +++---- .../routes/install_risk_scores.test.ts | 6 +-- .../onboarding/routes/install_risk_scores.ts | 8 +-- .../create_prebuilt_saved_objects.test.ts | 12 +---- .../routes/create_prebuilt_saved_objects.ts | 7 +-- .../delete_prebuilt_saved_objects.test.ts | 12 +---- .../routes/delete_prebuilt_saved_objects.ts | 9 +--- .../server/lib/tags/routes/create_tag.test.ts | 12 +---- .../server/lib/tags/routes/create_tag.ts | 9 +--- .../lib/tags/routes/get_tags_by_name.test.ts | 12 +---- .../lib/tags/routes/get_tags_by_name.ts | 9 +--- .../server/lib/tags/routes/index.ts | 11 ++--- .../clean_draft_timelines/index.ts | 9 +--- .../get_draft_timelines/index.ts | 9 +--- .../server/lib/timeline/routes/index.ts | 49 +++++++++---------- .../lib/timeline/routes/notes/delete_note.ts | 9 +--- .../lib/timeline/routes/notes/get_notes.ts | 9 +--- .../lib/timeline/routes/notes/persist_note.ts | 9 +--- .../pinned_events/persist_pinned_event.ts | 6 +-- .../helpers.test.ts | 11 ----- .../index.test.ts | 13 +---- .../install_prepackaged_timelines/index.ts | 6 +-- .../routes/timelines/copy_timeline/index.ts | 9 +--- .../create_timelines/helpers.test.ts | 10 ---- .../timelines/create_timelines/index.ts | 9 +--- .../timelines/delete_timelines/index.ts | 9 +--- .../timelines/export_timelines/index.test.ts | 11 +---- .../timelines/export_timelines/index.ts | 9 +--- .../timelines/get_timeline/index.test.ts | 13 +---- .../routes/timelines/get_timeline/index.ts | 9 +--- .../timelines/get_timelines/index.test.ts | 15 +----- .../routes/timelines/get_timelines/index.ts | 9 +--- .../timelines/import_timelines/index.ts | 9 +--- .../routes/timelines/patch_timelines/index.ts | 9 +--- .../timelines/persist_favorite/index.ts | 9 +--- .../timelines/resolve_timeline/index.ts | 9 +--- .../server/lib/timeline/utils/common.ts | 7 ++- .../security_solution/server/plugin.ts | 2 +- .../server/request_context_factory.ts | 6 +-- .../security_solution/server/routes/index.ts | 22 ++++----- 58 files changed, 142 insertions(+), 438 deletions(-) diff --git a/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts index 6f80a018319fa8..d7181b3ce49c60 100644 --- a/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts +++ b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts @@ -11,10 +11,10 @@ import type { Logger, LoggerFactory, SavedObjectsClientContract, + SecurityServiceStart, } from '@kbn/core/server'; import type { ExceptionListClient, ListsServerExtensionRegistrar } from '@kbn/lists-plugin/server'; import type { CasesClient, CasesServerStart } from '@kbn/cases-plugin/server'; -import type { SecurityPluginStart } from '@kbn/security-plugin/server'; import type { FleetFromHostFileClientInterface, FleetStartContract, @@ -68,7 +68,7 @@ export interface EndpointAppContextServiceStartContract { endpointMetadataService: EndpointMetadataService; endpointFleetServicesFactory: EndpointFleetServicesFactoryInterface; manifestManager?: ManifestManager; - security: SecurityPluginStart; + security: SecurityServiceStart; alerting: AlertsPluginStartContract; config: ConfigType; registerIngestCallback?: FleetStartContract['registerExternalCallback']; @@ -93,7 +93,7 @@ export class EndpointAppContextService { private setupDependencies: EndpointAppContextServiceSetupContract | null = null; private startDependencies: EndpointAppContextServiceStartContract | null = null; private fleetServicesFactory: EndpointFleetServicesFactoryInterface | null = null; - public security: SecurityPluginStart | undefined; + public security: SecurityServiceStart | undefined; public setup(dependencies: EndpointAppContextServiceSetupContract) { this.setupDependencies = dependencies; diff --git a/x-pack/plugins/security_solution/server/endpoint/mocks/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/mocks/mocks.ts index 3cd77526942ffa..9b6f001934910f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/mocks/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/mocks/mocks.ts @@ -15,6 +15,7 @@ import { loggingSystemMock, savedObjectsClientMock, savedObjectsServiceMock, + securityServiceMock, } from '@kbn/core/server/mocks'; import type { IRouter, @@ -154,7 +155,7 @@ export const createMockEndpointAppContextServiceStartContract = const logger = loggingSystemMock.create().get('mock_endpoint_app_context'); const savedObjectsStart = savedObjectsServiceMock.createStartContract(); - const security = securityMock.createStart(); + const security = securityServiceMock.createStart(); const agentService = createMockAgentService(); const agentPolicyService = createMockAgentPolicyService(); const packagePolicyService = createPackagePolicyServiceMock(); @@ -196,10 +197,6 @@ export const createMockEndpointAppContextServiceStartContract = securityMock.createMockAuthenticatedUser({ roles: ['superuser'] }) ); - security.authz.checkPrivilegesDynamicallyWithRequest.mockReturnValue( - jest.fn(() => ({ privileges: { kibana: [] } })) - ); - const casesMock = casesPluginMock.createStartContract(); const fleetActionsClientMock = createFleetActionsClientMock(); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.ts index cb4afe44964722..0037d5dded81f0 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.ts @@ -66,11 +66,12 @@ export const getActionFileDownloadRouteHandler = ( return async (context, req, res) => { const { action_id: actionId, file_id: fileId } = req.params; + const coreContext = await context.core; try { - const esClient = (await context.core).elasticsearch.client.asInternalUser; + const esClient = coreContext.elasticsearch.client.asInternalUser; const { agentType } = await getActionAgentType(esClient, actionId); - const user = endpointContext.service.security?.authc.getCurrentUser(req); + const user = coreContext.security.authc.getCurrentUser(); const casesClient = await endpointContext.service.getCasesClient(req); const connectorActions = (await context.actions).getActionsClient(); const responseActionsClient: ResponseActionsClient = getResponseActionsClient(agentType, { diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.ts index 0576cec69b01ca..4b1d67ff887188 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.ts @@ -36,11 +36,12 @@ export const getActionFileInfoRouteHandler = ( return async (context, req, res) => { const { action_id: requestActionId, file_id: fileId } = req.params; + const coreContext = await context.core; try { - const esClient = (await context.core).elasticsearch.client.asInternalUser; + const esClient = coreContext.elasticsearch.client.asInternalUser; const { agentType } = await getActionAgentType(esClient, requestActionId); - const user = endpointContext.service.security?.authc.getCurrentUser(req); + const user = coreContext.security.authc.getCurrentUser(); const casesClient = await endpointContext.service.getCasesClient(req); const connectorActions = (await context.actions).getActionsClient(); const responseActionsClient: ResponseActionsClient = getResponseActionsClient(agentType, { diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts index 8c1ba19ca626da..47099ae060efa3 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts @@ -192,11 +192,6 @@ describe('Response actions', () => { }: CallRouteInterface, indexExists?: { endpointDsExists: boolean } ): Promise> => { - const asUser = mockUser ? mockUser : superUser; - (startContract.security.authc.getCurrentUser as jest.Mock).mockImplementationOnce( - () => asUser - ); - const ctx = createRouteHandlerContext(mockScopedClient, mockSavedObjectClient); ctx.securitySolution.getEndpointAuthz.mockResolvedValue( @@ -218,6 +213,9 @@ describe('Response actions', () => { }; } ); + const asUser = mockUser ? mockUser : superUser; + (ctx.core.security.authc.getCurrentUser as jest.Mock).mockImplementationOnce(() => asUser); + const metadataResponse = docGen.generateHostMetadata(); const withErrorResponse = indexErrorResponse ? indexErrorResponse : { statusCode: 201 }; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts index f3610502b0c523..723daf576c38e7 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts @@ -338,8 +338,9 @@ function responseActionRequestHandler { let server: ReturnType; - let securitySetup: SecurityPluginSetup; const { context } = requestContextMock.createTools(); const logger = { error: jest.fn() } as unknown as Logger; @@ -36,14 +33,7 @@ describe('getDashboardsByTagsRoute', () => { jest.clearAllMocks(); server = serverMock.create(); - securitySetup = { - authc: { - getCurrentUser: jest.fn().mockReturnValue(mockGetCurrentUser), - }, - authz: {}, - } as unknown as SecurityPluginSetup; - - getDashboardsByTagsRoute(server.router, logger, securitySetup); + getDashboardsByTagsRoute(server.router, logger); }); it('should return dashboards with Security Solution tags', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/dashboards/routes/get_dashboards_by_tags.ts b/x-pack/plugins/security_solution/server/lib/dashboards/routes/get_dashboards_by_tags.ts index ef4695aea6ea5f..e7a3ebf9a7f10a 100644 --- a/x-pack/plugins/security_solution/server/lib/dashboards/routes/get_dashboards_by_tags.ts +++ b/x-pack/plugins/security_solution/server/lib/dashboards/routes/get_dashboards_by_tags.ts @@ -10,18 +10,13 @@ import { i18n } from '@kbn/i18n'; import type { DashboardAttributes } from '@kbn/dashboard-plugin/common'; import { transformError } from '@kbn/securitysolution-es-utils'; import { INTERNAL_DASHBOARDS_URL } from '../../../../common/constants'; -import type { SetupPlugins } from '../../../plugin'; import type { SecuritySolutionPluginRouter } from '../../../types'; import { buildSiemResponse } from '../../detection_engine/routes/utils'; import { buildFrameworkRequest } from '../../timeline/utils/common'; import { getDashboardsRequest } from '../../../../common/api/tags'; import { buildRouteValidationWithExcess } from '../../../utils/build_validation/route_validation'; -export const getDashboardsByTagsRoute = ( - router: SecuritySolutionPluginRouter, - logger: Logger, - security: SetupPlugins['security'] -) => { +export const getDashboardsByTagsRoute = (router: SecuritySolutionPluginRouter, logger: Logger) => { router.versioned .post({ path: INTERNAL_DASHBOARDS_URL, @@ -36,7 +31,7 @@ export const getDashboardsByTagsRoute = ( validate: { request: { body: buildRouteValidationWithExcess(getDashboardsRequest) } }, }, async (context, request, response) => { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const savedObjectsClient = (await frameworkRequest.context.core).savedObjects.client; const { tagIds } = request.body; diff --git a/x-pack/plugins/security_solution/server/lib/dashboards/routes/index.ts b/x-pack/plugins/security_solution/server/lib/dashboards/routes/index.ts index 17b6cec643ec48..dfbb6fbb8771df 100644 --- a/x-pack/plugins/security_solution/server/lib/dashboards/routes/index.ts +++ b/x-pack/plugins/security_solution/server/lib/dashboards/routes/index.ts @@ -5,14 +5,9 @@ * 2.0. */ import type { Logger } from '@kbn/core/server'; -import type { SetupPlugins } from '../../../plugin_contract'; import type { SecuritySolutionPluginRouter } from '../../../types'; import { getDashboardsByTagsRoute } from './get_dashboards_by_tags'; -export const registerDashboardsRoutes = ( - router: SecuritySolutionPluginRouter, - logger: Logger, - security: SetupPlugins['security'] -) => { - getDashboardsByTagsRoute(router, logger, security); +export const registerDashboardsRoutes = (router: SecuritySolutionPluginRouter, logger: Logger) => { + getDashboardsByTagsRoute(router, logger); }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.test.ts index 9e9bd77e81a1c9..8e029f939d1110 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.test.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { securityServiceMock } from '@kbn/core/server/mocks'; import { getPrebuiltRulesAndTimelinesStatusRoute } from './get_prebuilt_rules_and_timelines_status_route'; import { @@ -13,7 +14,6 @@ import { getPrepackagedRulesStatusRequest, } from '../../../routes/__mocks__/request_responses'; import { requestContextMock, serverMock } from '../../../routes/__mocks__'; -import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { checkTimelinesStatus } from '../../../../timeline/utils/check_timelines_status'; import { mockCheckTimelinesStatusBeforeInstallResult, @@ -56,6 +56,7 @@ jest.mock('../../../../timeline/utils/check_timelines_status', () => { }); describe('get_prepackaged_rule_status_route', () => { + const securityCore = securityServiceMock.createStart(); const mockGetCurrentUser = { user: { username: 'mockUser', @@ -64,19 +65,13 @@ describe('get_prepackaged_rule_status_route', () => { let server: ReturnType; let { clients, context } = requestContextMock.createTools(); - let securitySetup: SecurityPluginSetup; beforeEach(() => { jest.clearAllMocks(); server = serverMock.create(); ({ clients, context } = requestContextMock.createTools()); - securitySetup = { - authc: { - getCurrentUser: jest.fn().mockReturnValue(mockGetCurrentUser), - }, - authz: {}, - } as unknown as SecurityPluginSetup; + jest.spyOn(securityCore.authc, 'getCurrentUser').mockReturnValue(mockGetCurrentUser); clients.rulesClient.find.mockResolvedValue(getEmptyFindResult()); @@ -86,7 +81,7 @@ describe('get_prepackaged_rule_status_route', () => { prepackagedTimelines: [], }); - getPrebuiltRulesAndTimelinesStatusRoute(server.router, securitySetup); + getPrebuiltRulesAndTimelinesStatusRoute(server.router); }); describe('status codes', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.ts index 4848cb5e52c4e4..84cb18032f50e2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.ts @@ -9,7 +9,6 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import { validate } from '@kbn/securitysolution-io-ts-utils'; import { checkTimelineStatusRt } from '../../../../../../common/api/timeline'; import { buildSiemResponse } from '../../../routes/utils'; -import type { SetupPlugins } from '../../../../../plugin'; import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { @@ -27,10 +26,7 @@ import { rulesToMap } from '../../logic/utils'; import { buildFrameworkRequest } from '../../../../timeline/utils/common'; import { checkTimelinesStatus } from '../../../../timeline/utils/check_timelines_status'; -export const getPrebuiltRulesAndTimelinesStatusRoute = ( - router: SecuritySolutionPluginRouter, - security: SetupPlugins['security'] -) => { +export const getPrebuiltRulesAndTimelinesStatusRoute = (router: SecuritySolutionPluginRouter) => { router.versioned .get({ access: 'public', @@ -71,7 +67,7 @@ export const getPrebuiltRulesAndTimelinesStatusRoute = ( const rulesToInstall = getRulesToInstall(latestPrebuiltRules, installedPrebuiltRules); const rulesToUpdate = getRulesToUpdate(latestPrebuiltRules, installedPrebuiltRules); - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const prebuiltTimelineStatus = await checkTimelinesStatus(frameworkRequest); const [validatedPrebuiltTimelineStatus] = validate( prebuiltTimelineStatus, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/register_routes.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/register_routes.ts index 1ac2ef2a3954db..71740086e3fa59 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/register_routes.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/register_routes.ts @@ -5,7 +5,6 @@ * 2.0. */ -import type { SetupPlugins } from '../../../../plugin_contract'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { getPrebuiltRulesAndTimelinesStatusRoute } from './get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route'; @@ -16,12 +15,9 @@ import { reviewRuleUpgradeRoute } from './review_rule_upgrade/review_rule_upgrad import { performRuleInstallationRoute } from './perform_rule_installation/perform_rule_installation_route'; import { performRuleUpgradeRoute } from './perform_rule_upgrade/perform_rule_upgrade_route'; -export const registerPrebuiltRulesRoutes = ( - router: SecuritySolutionPluginRouter, - security: SetupPlugins['security'] -) => { +export const registerPrebuiltRulesRoutes = (router: SecuritySolutionPluginRouter) => { // Legacy endpoints that we're going to deprecate - getPrebuiltRulesAndTimelinesStatusRoute(router, security); + getPrebuiltRulesAndTimelinesStatusRoute(router); installPrebuiltRulesAndTimelinesRoute(router); // New endpoints for the rule upgrade and installation workflows diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.test.ts index 5d81134325c503..094f3e560ec3ef 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.test.ts @@ -6,7 +6,6 @@ */ import { requestMock, serverMock } from '../__mocks__'; -import type { SetupPlugins } from '../../../../plugin'; import { DETECTION_ENGINE_SIGNALS_MIGRATION_URL } from '../../../../../common/constants'; import { getCreateSignalsMigrationSchemaMock } from '../../../../../common/api/detection_engine/signals_migration/create_signals_migration/create_signals_migration_route.mock'; import { getIndexVersionsByIndex } from '../../migrations/get_index_versions_by_index'; @@ -43,13 +42,7 @@ describe('creating signals migrations route', () => { (getIndexVersionsByIndex as jest.Mock).mockResolvedValue({ 'my-signals-index': -1 }); (getSignalVersionsByIndex as jest.Mock).mockResolvedValue({ 'my-signals-index': [] }); - const securityMock = { - authc: { - getCurrentUser: jest.fn().mockReturnValue({ user: { username: 'my-username' } }), - }, - } as unknown as SetupPlugins['security']; - - createSignalsMigrationRoute(server.router, securityMock); + createSignalsMigrationRoute(server.router); }); it('passes options to the createMigration', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts index b6e7ae696b7556..8d8d80a7004780 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts @@ -9,7 +9,6 @@ import { transformError, BadRequestError, getIndexAliases } from '@kbn/securitys import { buildRouteValidationWithZod } from '@kbn/zod-helpers'; import { CreateAlertsMigrationRequestBody } from '../../../../../common/api/detection_engine/signals_migration'; import type { SecuritySolutionPluginRouter } from '../../../../types'; -import type { SetupPlugins } from '../../../../plugin'; import { DETECTION_ENGINE_SIGNALS_MIGRATION_URL } from '../../../../../common/constants'; import { buildSiemResponse } from '../utils'; @@ -20,10 +19,7 @@ import { isOutdated, signalsAreOutdated } from '../../migrations/helpers'; import { getIndexVersionsByIndex } from '../../migrations/get_index_versions_by_index'; import { getSignalVersionsByIndex } from '../../migrations/get_signal_versions_by_index'; -export const createSignalsMigrationRoute = ( - router: SecuritySolutionPluginRouter, - security: SetupPlugins['security'] -) => { +export const createSignalsMigrationRoute = (router: SecuritySolutionPluginRouter) => { router.versioned .post({ path: DETECTION_ENGINE_SIGNALS_MIGRATION_URL, @@ -53,7 +49,7 @@ export const createSignalsMigrationRoute = ( if (!appClient) { return siemResponse.error({ statusCode: 404 }); } - const user = await security?.authc.getCurrentUser(request); + const user = core.security.authc.getCurrentUser(); const migrationService = signalsMigrationService({ esClient, soClient, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts index f4452c73eaf78d..c4838280ac6a41 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts @@ -9,17 +9,13 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import { buildRouteValidationWithZod } from '@kbn/zod-helpers'; import { AlertsMigrationCleanupRequestBody } from '../../../../../common/api/detection_engine/signals_migration'; import type { SecuritySolutionPluginRouter } from '../../../../types'; -import type { SetupPlugins } from '../../../../plugin'; import { DETECTION_ENGINE_SIGNALS_MIGRATION_URL } from '../../../../../common/constants'; import { buildSiemResponse } from '../utils'; import { signalsMigrationService } from '../../migrations/migration_service'; import { getMigrationSavedObjectsById } from '../../migrations/get_migration_saved_objects_by_id'; -export const deleteSignalsMigrationRoute = ( - router: SecuritySolutionPluginRouter, - security: SetupPlugins['security'] -) => { +export const deleteSignalsMigrationRoute = (router: SecuritySolutionPluginRouter) => { router.versioned .delete({ path: DETECTION_ENGINE_SIGNALS_MIGRATION_URL, @@ -50,7 +46,7 @@ export const deleteSignalsMigrationRoute = ( return siemResponse.error({ statusCode: 404 }); } - const user = await security?.authc.getCurrentUser(request); + const user = core.security.authc.getCurrentUser(); const migrationService = signalsMigrationService({ esClient, soClient, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.test.ts index 341cff93ccc63a..8183c0bbac7bd2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.test.ts @@ -6,7 +6,6 @@ */ import { serverMock } from '../__mocks__'; -import type { SetupPlugins } from '../../../../plugin'; import { getFinalizeSignalsMigrationRequest } from '../__mocks__/request_responses'; import { getMigrationSavedObjectsById } from '../../migrations/get_migration_saved_objects_by_id'; import { getSignalsMigrationSavedObjectMock } from '../../migrations/saved_objects_schema.mock'; @@ -22,14 +21,9 @@ describe('finalizing signals migrations', () => { beforeEach(() => { server = serverMock.create(); - const securityMock = { - authc: { - getCurrentUser: jest.fn().mockReturnValue({ user: { username: 'my-username' } }), - }, - } as unknown as SetupPlugins['security']; const ruleDataPluginServiceMock = ruleDataServiceMock.create() as unknown as RuleDataPluginService; - finalizeSignalsMigrationRoute(server.router, ruleDataPluginServiceMock, securityMock); + finalizeSignalsMigrationRoute(server.router, ruleDataPluginServiceMock); }); it('returns an empty array error if no migrations exists', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts index 468baae7fdcad8..9e09ffe0cf895d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts @@ -10,7 +10,6 @@ import type { RuleDataPluginService } from '@kbn/rule-registry-plugin/server'; import { buildRouteValidationWithZod } from '@kbn/zod-helpers'; import { FinalizeAlertsMigrationRequestBody } from '../../../../../common/api/detection_engine/signals_migration'; import type { SecuritySolutionPluginRouter } from '../../../../types'; -import type { SetupPlugins } from '../../../../plugin'; import { DETECTION_ENGINE_SIGNALS_FINALIZE_MIGRATION_URL } from '../../../../../common/constants'; import { isMigrationFailed, isMigrationPending } from '../../migrations/helpers'; import { signalsMigrationService } from '../../migrations/migration_service'; @@ -20,8 +19,7 @@ import { getMigrationSavedObjectsById } from '../../migrations/get_migration_sav export const finalizeSignalsMigrationRoute = ( router: SecuritySolutionPluginRouter, - ruleDataService: RuleDataPluginService, - security: SetupPlugins['security'] + ruleDataService: RuleDataPluginService ) => { router.versioned .post({ @@ -53,7 +51,7 @@ export const finalizeSignalsMigrationRoute = ( if (!appClient) { return siemResponse.error({ statusCode: 404 }); } - const user = await security?.authc.getCurrentUser(request); + const user = core.security.authc.getCurrentUser(); const migrationService = signalsMigrationService({ esClient, soClient, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals.test.ts index 1b2bdb6ca1ef4e..a1569e8bcab078 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { coreMock, loggingSystemMock } from '@kbn/core/server/mocks'; +import { loggingSystemMock } from '@kbn/core/server/mocks'; import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from '../../../../../common/constants'; import { @@ -24,18 +24,8 @@ describe('set signal status', () => { let server: ReturnType; let { context } = requestContextMock.createTools(); let logger: ReturnType; - let mockCore: ReturnType; beforeEach(() => { - mockCore = coreMock.createSetup({ - pluginStartDeps: { - security: { - authc: { - getCurrentUser: jest.fn().mockReturnValue({ user: { username: 'my-username' } }), - }, - }, - }, - }); server = serverMock.create(); logger = loggingSystemMock.createLogger(); ({ context } = requestContextMock.createTools()); @@ -44,7 +34,7 @@ describe('set signal status', () => { getSuccessfulSignalUpdateResponse() ); const telemetrySenderMock = createMockTelemetryEventsSender(); - setSignalsStatusRoute(server.router, logger, telemetrySenderMock, mockCore.getStartServices); + setSignalsStatusRoute(server.router, logger, telemetrySenderMock); }); describe('status on signal', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts index a92f3a54ebac70..dde24af7007c4c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts @@ -12,8 +12,7 @@ import { ALERT_WORKFLOW_STATUS_UPDATED_AT, ALERT_WORKFLOW_USER, } from '@kbn/rule-data-utils'; -import type { ElasticsearchClient, Logger, StartServicesAccessor } from '@kbn/core/server'; -import type { AuthenticatedUser } from '@kbn/security-plugin/common'; +import type { AuthenticatedUser, ElasticsearchClient, Logger } from '@kbn/core/server'; import { buildRouteValidationWithZod } from '@kbn/zod-helpers'; import { SetAlertsStatusRequestBody } from '../../../../../common/api/detection_engine/signals'; import type { SecuritySolutionPluginRouter } from '../../../../types'; @@ -24,7 +23,6 @@ import { import { buildSiemResponse } from '../utils'; import type { ITelemetryEventsSender } from '../../../telemetry/sender'; import { INSIGHTS_CHANNEL } from '../../../telemetry/constants'; -import type { StartPlugins } from '../../../../plugin'; import { getSessionIDfromKibanaRequest, createAlertStatusPayloads, @@ -33,8 +31,7 @@ import { export const setSignalsStatusRoute = ( router: SecuritySolutionPluginRouter, logger: Logger, - sender: ITelemetryEventsSender, - startServices: StartServicesAccessor + sender: ITelemetryEventsSender ) => { router.versioned .post({ @@ -65,14 +62,10 @@ export const setSignalsStatusRoute = ( if (!siemClient) { return siemResponse.error({ statusCode: 404 }); } - const [_, { security }] = await startServices(); - const user = security.authc.getCurrentUser(request); + const user = core.security.authc.getCurrentUser(); const clusterId = sender.getClusterID(); - const [isTelemetryOptedIn, username] = await Promise.all([ - sender.isTelemetryOptedIn(), - security?.authc.getCurrentUser(request)?.username, - ]); + const isTelemetryOptedIn = await sender.isTelemetryOptedIn(); if (isTelemetryOptedIn && clusterId) { // Sometimes the ids are in the query not passed in the request? @@ -82,12 +75,12 @@ export const setSignalsStatusRoute = ( : (get(request.body.query, 'bool.filter.terms._id') as string[]); // Get Context for Insights Payloads const sessionId = getSessionIDfromKibanaRequest(clusterId, request); - if (username && toSendAlertIds && sessionId && status) { + if (user?.username && toSendAlertIds && sessionId && status) { const insightsPayloads = createAlertStatusPayloads( clusterId, toSendAlertIds, sessionId, - username, + user.username, DETECTION_ENGINE_SIGNALS_STATUS_URL, status ); diff --git a/x-pack/plugins/security_solution/server/lib/risk_score/onboarding/routes/install_risk_scores.test.ts b/x-pack/plugins/security_solution/server/lib/risk_score/onboarding/routes/install_risk_scores.test.ts index 526f3d595d5a06..114d51bfae6a4b 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_score/onboarding/routes/install_risk_scores.test.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_score/onboarding/routes/install_risk_scores.test.ts @@ -55,7 +55,6 @@ describe(`installRiskScoresRoute - ${RiskScoreEntity.host}`, () => { let server: ReturnType; let { context } = requestContextMock.createTools(); const logger = { error: jest.fn() } as unknown as Logger; - const security = undefined; const mockSpaceId = 'mockSpaceId'; beforeAll(async () => { @@ -71,7 +70,7 @@ describe(`installRiskScoresRoute - ${RiskScoreEntity.host}`, () => { }, }); - installRiskScoresRoute(server.router, logger, security); + installRiskScoresRoute(server.router, logger); await server.inject(request, requestContextMock.convertContext(context)); }); @@ -120,7 +119,6 @@ describe(`installRiskScoresRoute - ${RiskScoreEntity.user}`, () => { let server: ReturnType; let { context } = requestContextMock.createTools(); const logger = { error: jest.fn() } as unknown as Logger; - const security = undefined; const mockSpaceId = 'mockSpaceId'; beforeAll(async () => { @@ -136,7 +134,7 @@ describe(`installRiskScoresRoute - ${RiskScoreEntity.user}`, () => { }, }); - installRiskScoresRoute(server.router, logger, security); + installRiskScoresRoute(server.router, logger); await server.inject(request, requestContextMock.convertContext(context)); }); diff --git a/x-pack/plugins/security_solution/server/lib/risk_score/onboarding/routes/install_risk_scores.ts b/x-pack/plugins/security_solution/server/lib/risk_score/onboarding/routes/install_risk_scores.ts index 627a9afd4e8711..de6675985fc006 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_score/onboarding/routes/install_risk_scores.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_score/onboarding/routes/install_risk_scores.ts @@ -11,18 +11,12 @@ import type { Logger } from '@kbn/core/server'; import { APP_ID, INTERNAL_RISK_SCORE_URL } from '../../../../../common/constants'; import type { SecuritySolutionPluginRouter } from '../../../../types'; -import type { SetupPlugins } from '../../../../plugin'; - import { buildSiemResponse } from '../../../detection_engine/routes/utils'; import { installRiskScoreModule } from '../helpers/install_risk_score_module'; import { onboardingRiskScoreRequestBody } from '../../../../../common/api/entity_analytics/risk_score'; -export const installRiskScoresRoute = ( - router: SecuritySolutionPluginRouter, - logger: Logger, - security: SetupPlugins['security'] -) => { +export const installRiskScoresRoute = (router: SecuritySolutionPluginRouter, logger: Logger) => { router.versioned .post({ access: 'internal', diff --git a/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/create_prebuilt_saved_objects.test.ts b/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/create_prebuilt_saved_objects.test.ts index bf265e8638de11..300012738134d2 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/create_prebuilt_saved_objects.test.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/create_prebuilt_saved_objects.test.ts @@ -5,12 +5,10 @@ * 2.0. */ import type { Logger } from '@kbn/core/server'; -import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { PREBUILT_SAVED_OBJECTS_BULK_CREATE } from '../../../../../common/constants'; import { serverMock, requestContextMock, - mockGetCurrentUser, requestMock, } from '../../../detection_engine/routes/__mocks__'; import { getEmptySavedObjectsResponse } from '../../../detection_engine/routes/__mocks__/request_responses'; @@ -52,7 +50,6 @@ const createPrebuiltSavedObjectsRequest = (savedObjectTemplate: string) => describe('createPrebuiltSavedObjects', () => { let server: ReturnType; - let securitySetup: SecurityPluginSetup; let { clients, context } = requestContextMock.createTools(); const logger = { error: jest.fn() } as unknown as Logger; @@ -62,16 +59,9 @@ describe('createPrebuiltSavedObjects', () => { server = serverMock.create(); ({ clients, context } = requestContextMock.createTools()); - securitySetup = { - authc: { - getCurrentUser: jest.fn().mockReturnValue(mockGetCurrentUser), - }, - authz: {}, - } as unknown as SecurityPluginSetup; - clients.savedObjectsClient.bulkCreate.mockResolvedValue(getEmptySavedObjectsResponse()); - createPrebuiltSavedObjectsRoute(server.router, logger, securitySetup); + createPrebuiltSavedObjectsRoute(server.router, logger); }); it.each([['hostRiskScoreDashboards'], ['userRiskScoreDashboards']])( diff --git a/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/create_prebuilt_saved_objects.ts b/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/create_prebuilt_saved_objects.ts index 568489155707a5..a17669af734fe9 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/create_prebuilt_saved_objects.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/create_prebuilt_saved_objects.ts @@ -10,8 +10,6 @@ import type { Logger } from '@kbn/core/server'; import { PREBUILT_SAVED_OBJECTS_BULK_CREATE } from '../../../../../common/constants'; import type { SecuritySolutionPluginRouter } from '../../../../types'; -import type { SetupPlugins } from '../../../../plugin'; - import { buildSiemResponse } from '../../../detection_engine/routes/utils'; import { buildFrameworkRequest } from '../../../timeline/utils/common'; @@ -20,8 +18,7 @@ import { createPrebuiltSavedObjectsRequestBody } from '../../../../../common/api export const createPrebuiltSavedObjectsRoute = ( router: SecuritySolutionPluginRouter, - logger: Logger, - security: SetupPlugins['security'] + logger: Logger ) => { router.versioned .post({ @@ -46,7 +43,7 @@ export const createPrebuiltSavedObjectsRoute = ( const spaceId = securitySolution?.getSpaceId(); - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const savedObjectsClient = (await frameworkRequest.context.core).savedObjects.client; const result = await bulkCreateSavedObjects({ savedObjectsClient, diff --git a/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/delete_prebuilt_saved_objects.test.ts b/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/delete_prebuilt_saved_objects.test.ts index 363aba02536ead..37c2417340fcd6 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/delete_prebuilt_saved_objects.test.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/delete_prebuilt_saved_objects.test.ts @@ -4,12 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { PREBUILT_SAVED_OBJECTS_BULK_DELETE } from '../../../../../common/constants'; import { serverMock, requestContextMock, - mockGetCurrentUser, requestMock, } from '../../../detection_engine/routes/__mocks__'; import { deletePrebuiltSavedObjectsRoute } from './delete_prebuilt_saved_objects'; @@ -48,7 +46,6 @@ const deletePrebuiltSavedObjectsRequest = (savedObjectTemplate: string) => describe('deletePrebuiltSavedObjects', () => { let server: ReturnType; - let securitySetup: SecurityPluginSetup; let { clients, context } = requestContextMock.createTools(); beforeEach(() => { @@ -57,16 +54,9 @@ describe('deletePrebuiltSavedObjects', () => { server = serverMock.create(); ({ clients, context } = requestContextMock.createTools()); - securitySetup = { - authc: { - getCurrentUser: jest.fn().mockReturnValue(mockGetCurrentUser), - }, - authz: {}, - } as unknown as SecurityPluginSetup; - clients.savedObjectsClient.delete.mockResolvedValue(''); - deletePrebuiltSavedObjectsRoute(server.router, securitySetup); + deletePrebuiltSavedObjectsRoute(server.router); }); it('should delete legacy hostRiskScoreDashboards', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/delete_prebuilt_saved_objects.ts b/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/delete_prebuilt_saved_objects.ts index c78d1f292afe60..bd7ae03191ea50 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/delete_prebuilt_saved_objects.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_saved_objects/routes/delete_prebuilt_saved_objects.ts @@ -10,18 +10,13 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import { PREBUILT_SAVED_OBJECTS_BULK_DELETE } from '../../../../../common/constants'; import type { SecuritySolutionPluginRouter } from '../../../../types'; -import type { SetupPlugins } from '../../../../plugin'; - import { buildSiemResponse } from '../../../detection_engine/routes/utils'; import { buildFrameworkRequest } from '../../../timeline/utils/common'; import { bulkDeleteSavedObjects } from '../helpers/bulk_delete_saved_objects'; import { deletePrebuiltSavedObjectsRequestBody } from '../../../../../common/api/entity_analytics/risk_score'; -export const deletePrebuiltSavedObjectsRoute = ( - router: SecuritySolutionPluginRouter, - security: SetupPlugins['security'] -) => { +export const deletePrebuiltSavedObjectsRoute = (router: SecuritySolutionPluginRouter) => { router.versioned .post({ access: 'internal', @@ -42,7 +37,7 @@ export const deletePrebuiltSavedObjectsRoute = ( const spaceId = securitySolution?.getSpaceId(); - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const savedObjectsClient = (await frameworkRequest.context.core).savedObjects.client; const res = await bulkDeleteSavedObjects({ diff --git a/x-pack/plugins/security_solution/server/lib/tags/routes/create_tag.test.ts b/x-pack/plugins/security_solution/server/lib/tags/routes/create_tag.test.ts index c546d2fe63a497..232c09e76ee325 100644 --- a/x-pack/plugins/security_solution/server/lib/tags/routes/create_tag.test.ts +++ b/x-pack/plugins/security_solution/server/lib/tags/routes/create_tag.test.ts @@ -5,12 +5,10 @@ * 2.0. */ import type { Logger } from '@kbn/core/server'; -import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { INTERNAL_TAGS_URL } from '../../../../common/constants'; import { serverMock, requestContextMock, - mockGetCurrentUser, requestMock, } from '../../detection_engine/routes/__mocks__'; import { mockGetTagsResult } from '../__mocks__'; @@ -18,7 +16,6 @@ import { createTagRoute } from './create_tag'; describe('createTagRoute', () => { let server: ReturnType; - let securitySetup: SecurityPluginSetup; const { context } = requestContextMock.createTools(); const logger = { error: jest.fn() } as unknown as Logger; @@ -34,14 +31,7 @@ describe('createTagRoute', () => { jest.clearAllMocks(); server = serverMock.create(); - securitySetup = { - authc: { - getCurrentUser: jest.fn().mockReturnValue(mockGetCurrentUser), - }, - authz: {}, - } as unknown as SecurityPluginSetup; - - createTagRoute(server.router, logger, securitySetup); + createTagRoute(server.router, logger); }); it('should return tags with the exact name', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/tags/routes/create_tag.ts b/x-pack/plugins/security_solution/server/lib/tags/routes/create_tag.ts index 97499b76ae3541..1604b4374b984b 100644 --- a/x-pack/plugins/security_solution/server/lib/tags/routes/create_tag.ts +++ b/x-pack/plugins/security_solution/server/lib/tags/routes/create_tag.ts @@ -10,18 +10,13 @@ import { i18n } from '@kbn/i18n'; import { transformError } from '@kbn/securitysolution-es-utils'; import { createTagRequest } from '../../../../common/api/tags'; import { INTERNAL_TAGS_URL } from '../../../../common/constants'; -import type { SetupPlugins } from '../../../plugin'; import type { SecuritySolutionPluginRouter } from '../../../types'; import { buildRouteValidationWithExcess } from '../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../detection_engine/routes/utils'; import { buildFrameworkRequest } from '../../timeline/utils/common'; import { createTag } from '../saved_objects'; -export const createTagRoute = ( - router: SecuritySolutionPluginRouter, - logger: Logger, - security: SetupPlugins['security'] -) => { +export const createTagRoute = (router: SecuritySolutionPluginRouter, logger: Logger) => { router.versioned .put({ path: INTERNAL_TAGS_URL, @@ -36,7 +31,7 @@ export const createTagRoute = ( validate: { request: { body: buildRouteValidationWithExcess(createTagRequest) } }, }, async (context, request, response) => { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const savedObjectsClient = (await frameworkRequest.context.core).savedObjects.client; const { name: tagName, description, color } = request.body; try { diff --git a/x-pack/plugins/security_solution/server/lib/tags/routes/get_tags_by_name.test.ts b/x-pack/plugins/security_solution/server/lib/tags/routes/get_tags_by_name.test.ts index dd18ad8257867d..fab00d4db059b1 100644 --- a/x-pack/plugins/security_solution/server/lib/tags/routes/get_tags_by_name.test.ts +++ b/x-pack/plugins/security_solution/server/lib/tags/routes/get_tags_by_name.test.ts @@ -5,12 +5,10 @@ * 2.0. */ import type { Logger, SavedObjectsFindResponse } from '@kbn/core/server'; -import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { INTERNAL_TAGS_URL, SECURITY_TAG_NAME } from '../../../../common/constants'; import { serverMock, requestContextMock, - mockGetCurrentUser, requestMock, } from '../../detection_engine/routes/__mocks__'; import { mockGetTagsResult } from '../__mocks__'; @@ -18,7 +16,6 @@ import { getTagsByNameRoute } from './get_tags_by_name'; describe('getTagsByNameRoute', () => { let server: ReturnType; - let securitySetup: SecurityPluginSetup; const { context } = requestContextMock.createTools(); const logger = { error: jest.fn() } as unknown as Logger; @@ -36,14 +33,7 @@ describe('getTagsByNameRoute', () => { jest.clearAllMocks(); server = serverMock.create(); - securitySetup = { - authc: { - getCurrentUser: jest.fn().mockReturnValue(mockGetCurrentUser), - }, - authz: {}, - } as unknown as SecurityPluginSetup; - - getTagsByNameRoute(server.router, logger, securitySetup); + getTagsByNameRoute(server.router, logger); }); it('should return tags with the exact name', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/tags/routes/get_tags_by_name.ts b/x-pack/plugins/security_solution/server/lib/tags/routes/get_tags_by_name.ts index cd07a71db5a1c6..75ae24d0eacd5f 100644 --- a/x-pack/plugins/security_solution/server/lib/tags/routes/get_tags_by_name.ts +++ b/x-pack/plugins/security_solution/server/lib/tags/routes/get_tags_by_name.ts @@ -10,18 +10,13 @@ import { i18n } from '@kbn/i18n'; import { transformError } from '@kbn/securitysolution-es-utils'; import { getTagsByNameRequest } from '../../../../common/api/tags'; import { INTERNAL_TAGS_URL } from '../../../../common/constants'; -import type { SetupPlugins } from '../../../plugin'; import type { SecuritySolutionPluginRouter } from '../../../types'; import { buildRouteValidationWithExcess } from '../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../detection_engine/routes/utils'; import { buildFrameworkRequest } from '../../timeline/utils/common'; import { findTagsByName } from '../saved_objects'; -export const getTagsByNameRoute = ( - router: SecuritySolutionPluginRouter, - logger: Logger, - security: SetupPlugins['security'] -) => { +export const getTagsByNameRoute = (router: SecuritySolutionPluginRouter, logger: Logger) => { router.versioned .get({ path: INTERNAL_TAGS_URL, @@ -36,7 +31,7 @@ export const getTagsByNameRoute = ( validate: { request: { query: buildRouteValidationWithExcess(getTagsByNameRequest) } }, }, async (context, request, response) => { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const savedObjectsClient = (await frameworkRequest.context.core).savedObjects.client; const { name: tagName } = request.query; diff --git a/x-pack/plugins/security_solution/server/lib/tags/routes/index.ts b/x-pack/plugins/security_solution/server/lib/tags/routes/index.ts index bfcdf518ee9057..f7677388856a75 100644 --- a/x-pack/plugins/security_solution/server/lib/tags/routes/index.ts +++ b/x-pack/plugins/security_solution/server/lib/tags/routes/index.ts @@ -6,16 +6,11 @@ */ import type { Logger } from '@kbn/core/server'; -import type { SetupPlugins } from '../../../plugin_contract'; import type { SecuritySolutionPluginRouter } from '../../../types'; import { createTagRoute } from './create_tag'; import { getTagsByNameRoute } from './get_tags_by_name'; -export const registerTagsRoutes = ( - router: SecuritySolutionPluginRouter, - logger: Logger, - security: SetupPlugins['security'] -) => { - getTagsByNameRoute(router, logger, security); - createTagRoute(router, logger, security); +export const registerTagsRoutes = (router: SecuritySolutionPluginRouter, logger: Logger) => { + getTagsByNameRoute(router, logger); + createTagRoute(router, logger); }; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/clean_draft_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/clean_draft_timelines/index.ts index 604e9dabe0d62a..ae1cff768fded3 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/clean_draft_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/clean_draft_timelines/index.ts @@ -13,7 +13,6 @@ import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; import { TIMELINE_DRAFT_URL } from '../../../../../../common/constants'; import { buildFrameworkRequest } from '../../../utils/common'; -import type { SetupPlugins } from '../../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import { getDraftTimeline, @@ -24,11 +23,7 @@ import { import { draftTimelineDefaults } from '../../../utils/default_timeline'; import { cleanDraftTimelineSchema, TimelineType } from '../../../../../../common/api/timeline'; -export const cleanDraftTimelinesRoute = ( - router: SecuritySolutionPluginRouter, - _: ConfigType, - security: SetupPlugins['security'] -) => { +export const cleanDraftTimelinesRoute = (router: SecuritySolutionPluginRouter, _: ConfigType) => { router.versioned .post({ path: TIMELINE_DRAFT_URL, @@ -45,7 +40,7 @@ export const cleanDraftTimelinesRoute = ( version: '2023-10-31', }, async (context, request, response) => { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const siemResponse = buildSiemResponse(response); try { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/get_draft_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/get_draft_timelines/index.ts index 93e5d9fe84b008..6619e4a0eb18bc 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/get_draft_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/get_draft_timelines/index.ts @@ -12,17 +12,12 @@ import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; import { TIMELINE_DRAFT_URL } from '../../../../../../common/constants'; import { buildFrameworkRequest } from '../../../utils/common'; -import type { SetupPlugins } from '../../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import { getDraftTimeline, persistTimeline } from '../../../saved_object/timelines'; import { draftTimelineDefaults } from '../../../utils/default_timeline'; import { getDraftTimelineSchema } from '../../../../../../common/api/timeline'; -export const getDraftTimelinesRoute = ( - router: SecuritySolutionPluginRouter, - _: ConfigType, - security: SetupPlugins['security'] -) => { +export const getDraftTimelinesRoute = (router: SecuritySolutionPluginRouter, _: ConfigType) => { router.versioned .get({ path: TIMELINE_DRAFT_URL, @@ -39,7 +34,7 @@ export const getDraftTimelinesRoute = ( version: '2023-10-31', }, async (context, request, response) => { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const siemResponse = buildSiemResponse(response); try { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/index.ts index 8fa7e7a8f31d66..6b44496b6c3c45 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/index.ts @@ -5,7 +5,6 @@ * 2.0. */ -import type { SetupPlugins } from '../../../plugin'; import type { SecuritySolutionPluginRouter } from '../../../types'; import type { ConfigType } from '../../..'; import { @@ -28,30 +27,26 @@ import { persistNoteRoute, deleteNoteRoute, getNotesRoute } from './notes'; import { persistPinnedEventRoute } from './pinned_events'; -export function registerTimelineRoutes( - router: SecuritySolutionPluginRouter, - config: ConfigType, - security: SetupPlugins['security'] -) { - createTimelinesRoute(router, config, security); - patchTimelinesRoute(router, config, security); - - importTimelinesRoute(router, config, security); - exportTimelinesRoute(router, config, security); - getDraftTimelinesRoute(router, config, security); - getTimelineRoute(router, config, security); - resolveTimelineRoute(router, config, security); - getTimelinesRoute(router, config, security); - cleanDraftTimelinesRoute(router, config, security); - deleteTimelinesRoute(router, config, security); - persistFavoriteRoute(router, config, security); - copyTimelineRoute(router, config, security); - - installPrepackedTimelinesRoute(router, config, security); - - persistNoteRoute(router, config, security); - deleteNoteRoute(router, config, security); - getNotesRoute(router, config, security); - - persistPinnedEventRoute(router, config, security); +export function registerTimelineRoutes(router: SecuritySolutionPluginRouter, config: ConfigType) { + createTimelinesRoute(router, config); + patchTimelinesRoute(router, config); + + importTimelinesRoute(router, config); + exportTimelinesRoute(router, config); + getDraftTimelinesRoute(router, config); + getTimelineRoute(router, config); + resolveTimelineRoute(router, config); + getTimelinesRoute(router, config); + cleanDraftTimelinesRoute(router, config); + deleteTimelinesRoute(router, config); + persistFavoriteRoute(router, config); + copyTimelineRoute(router, config); + + installPrepackedTimelinesRoute(router, config); + + persistNoteRoute(router, config); + deleteNoteRoute(router, config); + getNotesRoute(router, config); + + persistPinnedEventRoute(router, config); } diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/delete_note.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/delete_note.ts index 6cab82872b9245..318d8950bc6195 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/delete_note.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/delete_note.ts @@ -10,7 +10,6 @@ import type { SecuritySolutionPluginRouter } from '../../../../types'; import { NOTE_URL } from '../../../../../common/constants'; -import type { SetupPlugins } from '../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../utils/build_validation/route_validation'; import type { ConfigType } from '../../../..'; @@ -20,11 +19,7 @@ import { buildFrameworkRequest } from '../../utils/common'; import { deleteNoteSchema } from '../../../../../common/api/timeline'; import { deleteNote } from '../../saved_object/notes'; -export const deleteNoteRoute = ( - router: SecuritySolutionPluginRouter, - config: ConfigType, - security: SetupPlugins['security'] -) => { +export const deleteNoteRoute = (router: SecuritySolutionPluginRouter, config: ConfigType) => { router.versioned .delete({ path: NOTE_URL, @@ -44,7 +39,7 @@ export const deleteNoteRoute = ( const siemResponse = buildSiemResponse(response); try { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const noteId = request.body?.noteId ?? ''; const noteIds = request.body?.noteIds ?? null; if (noteIds != null) { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/get_notes.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/get_notes.ts index 97aecc06ef1983..f230d0832a96ca 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/get_notes.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/get_notes.ts @@ -10,18 +10,13 @@ import type { SecuritySolutionPluginRouter } from '../../../../types'; import { NOTE_URL } from '../../../../../common/constants'; import type { ConfigType } from '../../../..'; -import type { SetupPlugins } from '../../../../plugin'; import { buildSiemResponse } from '../../../detection_engine/routes/utils'; import { buildFrameworkRequest, getNotesPaginated } from '../../utils/common'; import { getAllSavedNote, MAX_UNASSOCIATED_NOTES } from '../../saved_object/notes'; import { noteSavedObjectType } from '../../saved_object_mappings/notes'; -export const getNotesRoute = ( - router: SecuritySolutionPluginRouter, - _: ConfigType, - security: SetupPlugins['security'] -) => { +export const getNotesRoute = (router: SecuritySolutionPluginRouter, _: ConfigType) => { router.versioned .get({ path: NOTE_URL, @@ -40,7 +35,7 @@ export const getNotesRoute = ( async (context, request, response) => { try { const queryParams = request.query; - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const documentIds = queryParams.documentIds ?? null; if (documentIds != null) { if (Array.isArray(documentIds)) { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/persist_note.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/persist_note.ts index e4cf4b8a9c7774..1bd91306a74199 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/persist_note.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/persist_note.ts @@ -10,7 +10,6 @@ import type { SecuritySolutionPluginRouter } from '../../../../types'; import { NOTE_URL } from '../../../../../common/constants'; -import type { SetupPlugins } from '../../../../plugin'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import type { ConfigType } from '../../../..'; @@ -20,11 +19,7 @@ import { buildFrameworkRequest } from '../../utils/common'; import { persistNoteWithoutRefSchema } from '../../../../../common/api/timeline'; import { persistNote } from '../../saved_object/notes'; -export const persistNoteRoute = ( - router: SecuritySolutionPluginRouter, - _: ConfigType, - security: SetupPlugins['security'] -) => { +export const persistNoteRoute = (router: SecuritySolutionPluginRouter, _: ConfigType) => { router.versioned .patch({ path: NOTE_URL, @@ -44,7 +39,7 @@ export const persistNoteRoute = ( const siemResponse = buildSiemResponse(response); try { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const { note } = request.body; const noteId = request.body?.noteId ?? null; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/pinned_events/persist_pinned_event.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/pinned_events/persist_pinned_event.ts index 529f5d830e803c..a5739c49a34ea2 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/pinned_events/persist_pinned_event.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/pinned_events/persist_pinned_event.ts @@ -10,7 +10,6 @@ import type { SecuritySolutionPluginRouter } from '../../../../types'; import { PINNED_EVENT_URL } from '../../../../../common/constants'; -import type { SetupPlugins } from '../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../utils/build_validation/route_validation'; import type { ConfigType } from '../../../..'; @@ -22,8 +21,7 @@ import { persistPinnedEventOnTimeline } from '../../saved_object/pinned_events'; export const persistPinnedEventRoute = ( router: SecuritySolutionPluginRouter, - config: ConfigType, - security: SetupPlugins['security'] + config: ConfigType ) => { router.versioned .patch({ @@ -44,7 +42,7 @@ export const persistPinnedEventRoute = ( const siemResponse = buildSiemResponse(response); try { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const { eventId } = request.body; const pinnedEventId = request.body?.pinnedEventId ?? null; const timelineId = request.body?.timelineId ?? null; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/helpers.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/helpers.test.ts index 763833a0ab4e84..7a4e7a41a1ee75 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/helpers.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/helpers.test.ts @@ -6,13 +6,11 @@ */ import { createPromiseFromStreams } from '@kbn/utils'; -import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import type { FrameworkRequest } from '../../../../framework'; import { createMockConfig, requestContextMock, - mockGetCurrentUser, } from '../../../../detection_engine/routes/__mocks__'; import { addPrepackagedRulesRequest, @@ -27,7 +25,6 @@ import type { ImportTimelineResultSchema } from '../../../../../../common/api/ti jest.mock('../../timelines/import_timelines/helpers'); describe('installPrepackagedTimelines', () => { - let securitySetup: SecurityPluginSetup; let frameworkRequest: FrameworkRequest; const spyInstallPrepackagedTimelines = jest.spyOn(helpers, 'installPrepackagedTimelines'); @@ -37,13 +34,6 @@ describe('installPrepackagedTimelines', () => { const mockFileName = 'prepackaged_timelines.ndjson'; beforeEach(async () => { - securitySetup = { - authc: { - getCurrentUser: jest.fn().mockReturnValue(mockGetCurrentUser), - }, - authz: {}, - } as unknown as SecurityPluginSetup; - clients.rulesClient.find.mockResolvedValue(getFindResultWithSingleHit()); jest.doMock('./helpers', () => { @@ -56,7 +46,6 @@ describe('installPrepackagedTimelines', () => { const request = addPrepackagedRulesRequest(); frameworkRequest = await buildFrameworkRequest( requestContextMock.convertContext(context), - securitySetup, request ); }); diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.test.ts index 17086ca5a317d4..9513bd49b4e6d0 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.test.ts @@ -5,8 +5,6 @@ * 2.0. */ -import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; - import { serverMock, requestContextMock, @@ -14,7 +12,6 @@ import { } from '../../../../detection_engine/routes/__mocks__'; import { - mockGetCurrentUser, mockCheckTimelinesStatusBeforeInstallResult, mockCheckTimelinesStatusAfterInstallResult, } from '../../../__mocks__/import_timelines'; @@ -39,7 +36,6 @@ jest.mock('../../../utils/check_timelines_status', () => { describe('installPrepackagedTimelines', () => { let server: ReturnType; - let securitySetup: SecurityPluginSetup; let { context } = requestContextMock.createTools(); beforeEach(() => { @@ -49,14 +45,7 @@ describe('installPrepackagedTimelines', () => { server = serverMock.create(); context = requestContextMock.createTools().context; - securitySetup = { - authc: { - getCurrentUser: jest.fn().mockReturnValue(mockGetCurrentUser), - }, - authz: {}, - } as unknown as SecurityPluginSetup; - - installPrepackedTimelinesRoute(server.router, createMockConfig(), securitySetup); + installPrepackedTimelinesRoute(server.router, createMockConfig()); }); test('should call installPrepackagedTimelines ', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.ts index 88d868968e9bb5..0b150b4e47f564 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.ts @@ -12,7 +12,6 @@ import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINE_PREPACKAGED_URL } from '../../../../../../common/constants'; -import type { SetupPlugins } from '../../../../../plugin'; import type { ConfigType } from '../../../../../config'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; @@ -27,8 +26,7 @@ export { installPrepackagedTimelines } from './helpers'; export const installPrepackedTimelinesRoute = ( router: SecuritySolutionPluginRouter, - config: ConfigType, - security: SetupPlugins['security'] + config: ConfigType ) => { router.versioned .post({ @@ -49,7 +47,7 @@ export const installPrepackedTimelinesRoute = ( }, async (context, request, response) => { try { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const prepackagedTimelineStatus = await checkTimelinesStatus(frameworkRequest); const [validatedprepackagedTimelineStatus, prepackagedTimelineStatusError] = validate( prepackagedTimelineStatus, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/copy_timeline/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/copy_timeline/index.ts index 0e288e00995967..5bdb4e0f93d678 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/copy_timeline/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/copy_timeline/index.ts @@ -11,17 +11,12 @@ import type { ConfigType } from '../../../../..'; import { copyTimelineSchema } from '../../../../../../common/api/timeline'; import { copyTimeline } from '../../../saved_object/timelines'; import type { SecuritySolutionPluginRouter } from '../../../../../types'; -import type { SetupPlugins } from '../../../../../plugin'; import { TIMELINE_COPY_URL } from '../../../../../../common/constants'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; import { buildFrameworkRequest } from '../../../utils/common'; -export const copyTimelineRoute = ( - router: SecuritySolutionPluginRouter, - _: ConfigType, - security: SetupPlugins['security'] -) => { +export const copyTimelineRoute = (router: SecuritySolutionPluginRouter, _: ConfigType) => { router.versioned .post({ path: TIMELINE_COPY_URL, @@ -41,7 +36,7 @@ export const copyTimelineRoute = ( const siemResponse = buildSiemResponse(response); try { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const { timeline, timelineIdToCopy } = request.body; const copiedTimeline = await copyTimeline(frameworkRequest, timeline, timelineIdToCopy); diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.test.ts index d444983e7b00a1..9799d2c6bdf3ba 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.test.ts @@ -12,7 +12,6 @@ import type { FrameworkRequest } from '../../../../framework'; import type { SavedTimeline, Note } from '../../../../../../common/api/timeline'; import { mockTemplate, mockTimeline } from '../../../__mocks__/create_timelines'; import { buildFrameworkRequest } from '../../../utils/common'; -import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { requestContextMock } from '../../../../detection_engine/routes/__mocks__'; import { getCreateTimelinesRequest, @@ -62,23 +61,14 @@ jest.mock('../../../saved_object/notes/persist_notes', () => ({ })); describe('createTimelines', () => { - let securitySetup: SecurityPluginSetup; let frameworkRequest: FrameworkRequest; beforeAll(async () => { - securitySetup = { - authc: { - getCurrentUser: jest.fn(), - }, - authz: {}, - } as unknown as SecurityPluginSetup; - const { context } = requestContextMock.createTools(); const mockRequest = getCreateTimelinesRequest(createTimelineWithoutTimelineId); frameworkRequest = await buildFrameworkRequest( requestContextMock.convertContext(context), - securitySetup, mockRequest ); Date.now = jest.fn().mockReturnValue(new Date('2020-11-04T11:37:31.655Z')); diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/index.ts index 91b191c6ead0fe..0fcf286661b963 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/index.ts @@ -12,7 +12,6 @@ import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINE_URL } from '../../../../../../common/constants'; import type { ConfigType } from '../../../../..'; -import type { SetupPlugins } from '../../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; @@ -29,11 +28,7 @@ import type { CreateTimelinesResponse } from '../../../../../../common/api/timel export * from './helpers'; -export const createTimelinesRoute = ( - router: SecuritySolutionPluginRouter, - _: ConfigType, - security: SetupPlugins['security'] -) => { +export const createTimelinesRoute = (router: SecuritySolutionPluginRouter, _: ConfigType) => { router.versioned .post({ path: TIMELINE_URL, @@ -55,7 +50,7 @@ export const createTimelinesRoute = ( const siemResponse = buildSiemResponse(response); try { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const { timelineId, timeline, version } = request.body; const { templateTimelineId, templateTimelineVersion, timelineType, title, status } = diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/delete_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/delete_timelines/index.ts index 602d29ae061abe..7f6339ee25929a 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/delete_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/delete_timelines/index.ts @@ -10,18 +10,13 @@ import { buildRouteValidationWithExcess } from '../../../../../utils/build_valid import type { ConfigType } from '../../../../..'; import { deleteTimelinesSchema } from '../../../../../../common/api/timeline'; import type { SecuritySolutionPluginRouter } from '../../../../../types'; -import type { SetupPlugins } from '../../../../../plugin'; import { TIMELINE_URL } from '../../../../../../common/constants'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; import { buildFrameworkRequest } from '../../../utils/common'; import { deleteTimeline } from '../../../saved_object/timelines'; -export const deleteTimelinesRoute = ( - router: SecuritySolutionPluginRouter, - config: ConfigType, - security: SetupPlugins['security'] -) => { +export const deleteTimelinesRoute = (router: SecuritySolutionPluginRouter, config: ConfigType) => { router.versioned .delete({ path: TIMELINE_URL, @@ -41,7 +36,7 @@ export const deleteTimelinesRoute = ( const siemResponse = buildSiemResponse(response); try { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const { savedObjectIds, searchIds } = request.body; await deleteTimeline(frameworkRequest, savedObjectIds, searchIds); diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.test.ts index 044fc77caef80b..13b6e0f68fefc0 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.test.ts @@ -23,8 +23,6 @@ import { TIMELINE_EXPORT_URL } from '../../../../../../common/constants'; import { convertSavedObjectToSavedNote } from '../../../saved_object/notes/saved_object'; import { convertSavedObjectToSavedPinnedEvent } from '../../../saved_object/pinned_events'; import { convertSavedObjectToSavedTimeline } from '../../../saved_object/timelines/convert_saved_object_to_savedtimeline'; -import { mockGetCurrentUser } from '../../../__mocks__/import_timelines'; -import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; jest.mock('../../../saved_object/timelines/convert_saved_object_to_savedtimeline', () => { return { @@ -48,17 +46,10 @@ jest.mock('../../../saved_object/pinned_events', () => { describe('export timelines', () => { let server: ReturnType; let { clients, context } = requestContextMock.createTools(); - let securitySetup: SecurityPluginSetup; beforeEach(() => { server = serverMock.create(); ({ clients, context } = requestContextMock.createTools()); - securitySetup = { - authc: { - getCurrentUser: jest.fn().mockReturnValue(mockGetCurrentUser), - }, - authz: {}, - } as unknown as SecurityPluginSetup; clients.savedObjectsClient.bulkGet.mockResolvedValue(mockTimelinesSavedObjects()); (convertSavedObjectToSavedTimeline as unknown as jest.Mock).mockReturnValue(mockTimelines()); @@ -66,7 +57,7 @@ describe('export timelines', () => { (convertSavedObjectToSavedPinnedEvent as unknown as jest.Mock).mockReturnValue( mockPinnedEvents() ); - exportTimelinesRoute(server.router, createMockConfig(), securitySetup); + exportTimelinesRoute(server.router, createMockConfig()); }); describe('status codes', () => { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.ts index 6f02c312b7bc75..7af6b7be0cdd0e 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.ts @@ -17,17 +17,12 @@ import { } from '../../../../../../common/api/timeline'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import { buildFrameworkRequest } from '../../../utils/common'; -import type { SetupPlugins } from '../../../../../plugin'; import { getExportTimelineByObjectIds } from './helpers'; export * from './helpers'; -export const exportTimelinesRoute = ( - router: SecuritySolutionPluginRouter, - config: ConfigType, - security: SetupPlugins['security'] -) => { +export const exportTimelinesRoute = (router: SecuritySolutionPluginRouter, config: ConfigType) => { router.versioned .post({ path: TIMELINE_EXPORT_URL, @@ -49,7 +44,7 @@ export const exportTimelinesRoute = ( async (context, request, response) => { try { const siemResponse = buildSiemResponse(response); - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const exportSizeLimit = config.maxTimelineImportExportSize; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.test.ts index d439bdd300c4be..78df97fa441be4 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.test.ts @@ -5,8 +5,6 @@ * 2.0. */ -import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; - import { serverMock, requestContextMock, @@ -14,7 +12,6 @@ import { } from '../../../../detection_engine/routes/__mocks__'; import { getTimelineOrNull, getTimelineTemplateOrNull } from '../../../saved_object/timelines'; -import { mockGetCurrentUser } from '../../../__mocks__/import_timelines'; import { getTimelineRequest } from '../../../__mocks__/request_responses'; import { getTimelineRoute } from '.'; @@ -27,7 +24,6 @@ jest.mock('../../../saved_object/timelines', () => ({ describe('get timeline', () => { let server: ReturnType; - let securitySetup: SecurityPluginSetup; let { context } = requestContextMock.createTools(); beforeEach(() => { @@ -37,14 +33,7 @@ describe('get timeline', () => { server = serverMock.create(); context = requestContextMock.createTools().context; - securitySetup = { - authc: { - getCurrentUser: jest.fn().mockReturnValue(mockGetCurrentUser), - }, - authz: {}, - } as unknown as SecurityPluginSetup; - - getTimelineRoute(server.router, createMockConfig(), securitySetup); + getTimelineRoute(server.router, createMockConfig()); }); test('should call getTimelineTemplateOrNull if templateTimelineId is given', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.ts index 25cf3c895f2911..321e6aafe4903f 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.ts @@ -11,7 +11,6 @@ import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINE_URL } from '../../../../../../common/constants'; import type { ConfigType } from '../../../../..'; -import type { SetupPlugins } from '../../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; @@ -24,11 +23,7 @@ import type { ResolvedTimelineWithOutcomeSavedObject, } from '../../../../../../common/api/timeline'; -export const getTimelineRoute = ( - router: SecuritySolutionPluginRouter, - _: ConfigType, - security: SetupPlugins['security'] -) => { +export const getTimelineRoute = (router: SecuritySolutionPluginRouter, _: ConfigType) => { router.versioned .get({ path: TIMELINE_URL, @@ -46,7 +41,7 @@ export const getTimelineRoute = ( }, async (context, request, response) => { try { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const query = request.query ?? {}; const { template_timeline_id: templateTimelineId, id } = query; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.test.ts index 012427846f35e3..b006b77c9a595f 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.test.ts @@ -5,18 +5,13 @@ * 2.0. */ -import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; - import { serverMock, requestContextMock, createMockConfig, } from '../../../../detection_engine/routes/__mocks__'; import { getAllTimeline } from '../../../saved_object/timelines'; - -import { mockGetCurrentUser } from '../../../__mocks__/import_timelines'; import { getTimelineRequest } from '../../../__mocks__/request_responses'; - import { getTimelinesRoute } from '.'; jest.mock('../../../saved_object/timelines', () => ({ @@ -25,7 +20,6 @@ jest.mock('../../../saved_object/timelines', () => ({ describe('get all timelines', () => { let server: ReturnType; - let securitySetup: SecurityPluginSetup; let { context } = requestContextMock.createTools(); beforeEach(() => { @@ -35,14 +29,7 @@ describe('get all timelines', () => { server = serverMock.create(); context = requestContextMock.createTools().context; - securitySetup = { - authc: { - getCurrentUser: jest.fn().mockReturnValue(mockGetCurrentUser), - }, - authz: {}, - } as unknown as SecurityPluginSetup; - - getTimelinesRoute(server.router, createMockConfig(), securitySetup); + getTimelinesRoute(server.router, createMockConfig()); }); test('should get the total count', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.ts index 02cb8ff41f1a3f..97d9bf51a08766 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.ts @@ -14,7 +14,6 @@ import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINES_URL } from '../../../../../../common/constants'; import type { ConfigType } from '../../../../..'; -import type { SetupPlugins } from '../../../../../plugin'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; @@ -23,11 +22,7 @@ import { buildFrameworkRequest, escapeHatch, throwErrors } from '../../../utils/ import { getAllTimeline } from '../../../saved_object/timelines'; import { getTimelinesQuerySchema } from '../../../../../../common/api/timeline'; -export const getTimelinesRoute = ( - router: SecuritySolutionPluginRouter, - _: ConfigType, - security: SetupPlugins['security'] -) => { +export const getTimelinesRoute = (router: SecuritySolutionPluginRouter, _: ConfigType) => { router.versioned .get({ path: TIMELINES_URL, @@ -47,7 +42,7 @@ export const getTimelinesRoute = ( const customHttpRequestError = (message: string) => new CustomHttpRequestError(message, 400); try { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const queryParams = pipe( getTimelinesQuerySchema.decode(request.query), fold(throwErrors(customHttpRequestError), identity) diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/index.ts index 8d6326af6c17cc..be5ebc44e7faa5 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/index.ts @@ -13,7 +13,6 @@ import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINE_IMPORT_URL } from '../../../../../../common/constants'; -import type { SetupPlugins } from '../../../../../plugin'; import type { ConfigType } from '../../../../../config'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; @@ -24,11 +23,7 @@ import { buildFrameworkRequest } from '../../../utils/common'; export { importTimelines } from './helpers'; -export const importTimelinesRoute = ( - router: SecuritySolutionPluginRouter, - config: ConfigType, - security: SetupPlugins['security'] -) => { +export const importTimelinesRoute = (router: SecuritySolutionPluginRouter, config: ConfigType) => { router.versioned .post({ path: `${TIMELINE_IMPORT_URL}`, @@ -66,7 +61,7 @@ export const importTimelinesRoute = ( body: `Invalid file extension ${fileExtension}`, }); } - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const res = await importTimelines( file as unknown as Readable, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/patch_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/patch_timelines/index.ts index c8b9c26536444b..1c3cba9fdcb918 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/patch_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/patch_timelines/index.ts @@ -11,7 +11,6 @@ import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINE_URL } from '../../../../../../common/constants'; -import type { SetupPlugins } from '../../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import type { ConfigType } from '../../../../..'; @@ -23,11 +22,7 @@ import { createTimelines } from '../create_timelines'; import { CompareTimelinesStatus } from '../../../utils/compare_timelines_status'; import type { PatchTimelinesResponse } from '../../../../../../common/api/timeline'; -export const patchTimelinesRoute = ( - router: SecuritySolutionPluginRouter, - _: ConfigType, - security: SetupPlugins['security'] -) => { +export const patchTimelinesRoute = (router: SecuritySolutionPluginRouter, _: ConfigType) => { router.versioned .patch({ path: TIMELINE_URL, @@ -47,7 +42,7 @@ export const patchTimelinesRoute = ( const siemResponse = buildSiemResponse(response); try { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const { timelineId, timeline, version } = request.body; const { templateTimelineId, templateTimelineVersion, timelineType, title, status } = timeline; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/persist_favorite/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/persist_favorite/index.ts index 746987caa3759c..3b220ccf57e208 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/persist_favorite/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/persist_favorite/index.ts @@ -10,7 +10,6 @@ import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINE_FAVORITE_URL } from '../../../../../../common/constants'; -import type { SetupPlugins } from '../../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import type { ConfigType } from '../../../../..'; @@ -20,11 +19,7 @@ import { buildFrameworkRequest } from '../../../utils/common'; import { persistFavorite } from '../../../saved_object/timelines'; import { TimelineType, persistFavoriteSchema } from '../../../../../../common/api/timeline'; -export const persistFavoriteRoute = ( - router: SecuritySolutionPluginRouter, - _: ConfigType, - security: SetupPlugins['security'] -) => { +export const persistFavoriteRoute = (router: SecuritySolutionPluginRouter, _: ConfigType) => { router.versioned .patch({ path: TIMELINE_FAVORITE_URL, @@ -44,7 +39,7 @@ export const persistFavoriteRoute = ( const siemResponse = buildSiemResponse(response); try { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const { timelineId, templateTimelineId, templateTimelineVersion, timelineType } = request.body; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/resolve_timeline/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/resolve_timeline/index.ts index 7572e72cfb9ac1..09549f9b9034f5 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/resolve_timeline/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/resolve_timeline/index.ts @@ -11,7 +11,6 @@ import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINE_RESOLVE_URL } from '../../../../../../common/constants'; import type { ConfigType } from '../../../../..'; -import type { SetupPlugins } from '../../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; @@ -24,11 +23,7 @@ import type { ResolvedTimelineWithOutcomeSavedObject, } from '../../../../../../common/api/timeline'; -export const resolveTimelineRoute = ( - router: SecuritySolutionPluginRouter, - _: ConfigType, - security: SetupPlugins['security'] -) => { +export const resolveTimelineRoute = (router: SecuritySolutionPluginRouter, _: ConfigType) => { router.versioned .get({ path: TIMELINE_RESOLVE_URL, @@ -46,7 +41,7 @@ export const resolveTimelineRoute = ( }, async (context, request, response) => { try { - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const frameworkRequest = await buildFrameworkRequest(context, request); const query = request.query ?? {}; const { template_timeline_id: templateTimelineId, id } = query; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts b/x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts index b9f1aaafbf9692..cfa804b848fcd8 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts @@ -14,17 +14,16 @@ import { schema } from '@kbn/config-schema'; import type { KibanaRequest, RequestHandlerContext } from '@kbn/core/server'; import { formatErrors } from '@kbn/securitysolution-io-ts-utils'; -import type { SetupPlugins, StartPlugins } from '../../../plugin'; import type { FrameworkRequest } from '../../framework'; export const buildFrameworkRequest = async ( context: RequestHandlerContext, - security: StartPlugins['security'] | SetupPlugins['security'] | undefined, request: KibanaRequest ): Promise => { - const savedObjectsClient = (await context.core).savedObjects.client; - const user = await security?.authc.getCurrentUser(request); + const coreContext = await context.core; + const savedObjectsClient = coreContext.savedObjects.client; + const user = coreContext.security.authc.getCurrentUser(); return set( 'user', diff --git a/x-pack/plugins/security_solution/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts index 5b5b833dd2d4b4..be4d5ae275d83a 100644 --- a/x-pack/plugins/security_solution/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -643,7 +643,7 @@ export class Plugin implements ISecuritySolutionPlugin { logger ), endpointFleetServicesFactory, - security: plugins.security, + security: core.security, alerting: plugins.alerting, config, cases: plugins.cases, diff --git a/x-pack/plugins/security_solution/server/request_context_factory.ts b/x-pack/plugins/security_solution/server/request_context_factory.ts index ea1673fe9a5de1..00db7dcb2c3e83 100644 --- a/x-pack/plugins/security_solution/server/request_context_factory.ts +++ b/x-pack/plugins/security_solution/server/request_context_factory.ts @@ -65,8 +65,8 @@ export class RequestContextFactory implements IRequestContextFactory { const { lists, ruleRegistry, security } = plugins; - const [, startPlugins] = await core.getStartServices(); - const frameworkRequest = await buildFrameworkRequest(context, security, request); + const [_, startPlugins] = await core.getStartServices(); + const frameworkRequest = await buildFrameworkRequest(context, request); const coreContext = await context.core; const licensing = await context.licensing; @@ -149,7 +149,7 @@ export class RequestContextFactory implements IRequestContextFactory { return null; } - const username = security?.authc.getCurrentUser(request)?.username || 'elastic'; + const username = coreContext.security.authc.getCurrentUser()?.username || 'elastic'; return lists.getExceptionListClient(coreContext.savedObjects.client, username); }, diff --git a/x-pack/plugins/security_solution/server/routes/index.ts b/x-pack/plugins/security_solution/server/routes/index.ts index bc1a26534cd6c7..6f245bd04a02b6 100644 --- a/x-pack/plugins/security_solution/server/routes/index.ts +++ b/x-pack/plugins/security_solution/server/routes/index.ts @@ -80,7 +80,7 @@ export const initRoutes = ( ) => { registerFleetIntegrationsRoutes(router); registerLegacyRuleActionsRoutes(router, logger); - registerPrebuiltRulesRoutes(router, security); + registerPrebuiltRulesRoutes(router); registerRuleExceptionsRoutes(router); registerManageExceptionsRoutes(router); registerRuleManagementRoutes(router, config, ml, logger); @@ -99,19 +99,19 @@ export const initRoutes = ( registerResolverRoutes(router, getStartServices, config); - registerTimelineRoutes(router, config, security); + registerTimelineRoutes(router, config); // Detection Engine Signals routes that have the REST endpoints of /api/detection_engine/signals // POST /api/detection_engine/signals/status // Example usage can be found in security_solution/server/lib/detection_engine/scripts/signals - setSignalsStatusRoute(router, logger, telemetrySender, getStartServices); + setSignalsStatusRoute(router, logger, telemetrySender); setAlertTagsRoute(router); setAlertAssigneesRoute(router); querySignalsRoute(router, ruleDataClient); getSignalsMigrationStatusRoute(router); - createSignalsMigrationRoute(router, security); - finalizeSignalsMigrationRoute(router, ruleDataService, security); - deleteSignalsMigrationRoute(router, security); + createSignalsMigrationRoute(router); + finalizeSignalsMigrationRoute(router, ruleDataService); + deleteSignalsMigrationRoute(router); suggestUserProfilesRoute(router, getStartServices); // Detection Engine index routes that have the REST endpoints of /api/detection_engine/index @@ -130,14 +130,14 @@ export const initRoutes = ( createStoredScriptRoute(router, logger); deleteStoredScriptRoute(router); readPrebuiltDevToolContentRoute(router); - createPrebuiltSavedObjectsRoute(router, logger, security); - deletePrebuiltSavedObjectsRoute(router, security); + createPrebuiltSavedObjectsRoute(router, logger); + deletePrebuiltSavedObjectsRoute(router); getRiskScoreIndexStatusRoute(router); - installRiskScoresRoute(router, logger, security); + installRiskScoresRoute(router, logger); // Dashboards - registerDashboardsRoutes(router, logger, security); - registerTagsRoutes(router, logger, security); + registerDashboardsRoutes(router, logger); + registerTagsRoutes(router, logger); const { previewTelemetryUrlEnabled } = config.experimentalFeatures; if (previewTelemetryUrlEnabled) { // telemetry preview endpoint for e2e integration tests only at the moment. From 739e059945a13e58be0707478eedd4a3bcb5a1c1 Mon Sep 17 00:00:00 2001 From: "Eyo O. Eyo" <7893459+eokoneyo@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:39:56 +0200 Subject: [PATCH 075/103] Fix issue with no values been displayed in new agg based visualization filterbox (#187738) ## Summary Closes https://github.com/elastic/kibana/issues/187710 The issue results for configuration that makes such that in certain cases agg based visualisations aren't enabled for creation relates to https://github.com/elastic/kibana/pull/157920 see https://github.com/elastic/kibana/pull/157920/files#diff-062b952861b34b71d7bb79ee2409352ccc6c82ab99a47233ed8b9686aab95c38R78-R79 for more details, as such this PR introduces consideration for the possibility of this so that in the case where there isn't any agg based visualization that can be created, the option to create one is not provided. How to test; - Navigating to dashboards in stateful kibana, one should be presented with the aggregation based visualization option when the add panel button is clicked. - Navigating to dashboards in serverless kibana, if the aggregation based visualization option is available there **must** an option presented when the selection is rendered. --- .../public/actions/add_agg_vis_action.test.ts | 62 +++++++++++++++++++ .../public/actions/add_agg_vis_action.ts | 16 +++-- src/plugins/visualizations/public/plugin.ts | 5 +- 3 files changed, 77 insertions(+), 6 deletions(-) create mode 100644 src/plugins/visualizations/public/actions/add_agg_vis_action.test.ts diff --git a/src/plugins/visualizations/public/actions/add_agg_vis_action.test.ts b/src/plugins/visualizations/public/actions/add_agg_vis_action.test.ts new file mode 100644 index 00000000000000..15003c4b045666 --- /dev/null +++ b/src/plugins/visualizations/public/actions/add_agg_vis_action.test.ts @@ -0,0 +1,62 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { + AddAggVisualizationPanelAction, + ADD_AGG_VIS_ACTION_ID, + type AddAggVisualizationPanelActionApi, +} from './add_agg_vis_action'; +import type { BaseVisType } from '../vis_types/base_vis_type'; +import { VisGroups } from '../vis_types/vis_groups_enum'; +import { TypesService, type TypesStart } from '../vis_types/types_service'; + +const mockCompatibleEmbeddableAPI: AddAggVisualizationPanelActionApi = { + type: ADD_AGG_VIS_ACTION_ID, + addNewPanel: jest.fn(), + getAppContext: jest.fn(), +}; + +describe('AddAggVisualizationPanelAction', () => { + let typeServiceStart: TypesStart; + + beforeEach(() => { + const typeService = new TypesService(); + + typeServiceStart = typeService.start(); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + test('invoking the compatibility function returns false when initialized with types that are not grouped as agg visualizations', async () => { + jest.spyOn(typeServiceStart, 'all').mockReturnValue([]); + + const addAggVisualizationPanelAction = new AddAggVisualizationPanelAction(typeServiceStart); + + expect( + await addAggVisualizationPanelAction.isCompatible({ embeddable: mockCompatibleEmbeddableAPI }) + ).toBe(false); + }); + + test('invoking the compatibility function returns true when the registered agg visualizations type does not have creation disabled', async () => { + jest.spyOn(typeServiceStart, 'all').mockReturnValue([ + { + group: VisGroups.AGGBASED, + disableCreate: false, + name: 'test visualization', + } as BaseVisType, + ]); + + const addAggVisualizationPanelAction = new AddAggVisualizationPanelAction(typeServiceStart); + + expect( + await addAggVisualizationPanelAction.isCompatible({ embeddable: mockCompatibleEmbeddableAPI }) + ).toBe(true); + }); +}); diff --git a/src/plugins/visualizations/public/actions/add_agg_vis_action.ts b/src/plugins/visualizations/public/actions/add_agg_vis_action.ts index 62c8e3654db6e2..d0b7b2d9a7f6de 100644 --- a/src/plugins/visualizations/public/actions/add_agg_vis_action.ts +++ b/src/plugins/visualizations/public/actions/add_agg_vis_action.ts @@ -17,11 +17,13 @@ import { COMMON_EMBEDDABLE_GROUPING } from '@kbn/embeddable-plugin/public'; import { Action, IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; import { apiHasType } from '@kbn/presentation-publishing'; import { apiCanAddNewPanel, CanAddNewPanel } from '@kbn/presentation-containers'; +import { VisGroups } from '../vis_types/vis_groups_enum'; +import type { TypesStart } from '../vis_types/types_service'; import { showNewVisModal } from '../wizard/show_new_vis'; -const ADD_AGG_VIS_ACTION_ID = 'ADD_AGG_VIS'; +export const ADD_AGG_VIS_ACTION_ID = 'ADD_AGG_VIS'; -type AddAggVisualizationPanelActionApi = HasType & CanAddNewPanel & HasAppContext; +export type AddAggVisualizationPanelActionApi = HasType & CanAddNewPanel & HasAppContext; const isApiCompatible = (api: unknown | null): api is AddAggVisualizationPanelActionApi => { return apiHasType(api) && apiCanAddNewPanel(api) && apiHasAppContext(api); @@ -31,10 +33,15 @@ export class AddAggVisualizationPanelAction implements Action { + return !type.disableCreate && type.group === VisGroups.AGGBASED; + }); + } public getIconType() { return 'visualizeApp'; @@ -47,7 +54,8 @@ export class AddAggVisualizationPanelAction implements Action { diff --git a/src/plugins/visualizations/public/plugin.ts b/src/plugins/visualizations/public/plugin.ts index c97ff8f4eba453..bb931a072f1921 100644 --- a/src/plugins/visualizations/public/plugin.ts +++ b/src/plugins/visualizations/public/plugin.ts @@ -400,8 +400,6 @@ export class VisualizationsPlugin uiActions.registerTrigger(dashboardVisualizationPanelTrigger); const editInLensAction = new EditInLensAction(data.query.timefilter.timefilter); uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, editInLensAction); - const addAggVisAction = new AddAggVisualizationPanelAction(); - uiActions.addTriggerAction(ADD_PANEL_TRIGGER, addAggVisAction); const embeddableFactory = new VisualizeEmbeddableFactory({ start }); embeddable.registerEmbeddableFactory(VISUALIZE_EMBEDDABLE_TYPE, embeddableFactory); @@ -499,6 +497,9 @@ export class VisualizationsPlugin setSavedObjectTagging(savedObjectsTaggingOss); } + const addAggVisAction = new AddAggVisualizationPanelAction(types); + uiActions.addTriggerAction(ADD_PANEL_TRIGGER, addAggVisAction); + return { ...types, showNewVisModal, From ff651f20d247f2ccf64b712131edd346f3ccf1a8 Mon Sep 17 00:00:00 2001 From: Saikat Sarkar <132922331+saikatsarkar056@users.noreply.github.com> Date: Tue, 9 Jul 2024 08:42:52 -0600 Subject: [PATCH 076/103] [Inference Endpoints View] Deletion, search and filtering of inference endpoints (#186206) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR consists of the following changes: - An option to delete an existing inference endpoint - Filtering the endpoints based on 'provider' and 'type' - Search option - Display the trained models deployment status - Display additional 3rd party providers (Mistral, Azure OpenAI, Azure AI Studio) - Add licensing for gating enterprise licensed users ### Stack Management ![Screenshot 2024-06-24 at 2 38 44 PM](https://github.com/elastic/kibana/assets/132922331/d8072069-2309-40b9-a723-6b34f64b7ef0) ### Serverless ![Screenshot 2024-06-24 at 2 43 36 PM](https://github.com/elastic/kibana/assets/132922331/fe5be2fd-d9ca-41f7-b246-8767e88d2938) --------- Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com> --- packages/deeplinks/search/constants.ts | 2 +- packages/deeplinks/search/deep_links.ts | 8 +- packages/deeplinks/search/index.ts | 2 +- .../collectors/application_usage/schema.ts | 2 +- src/plugins/telemetry/schema/oss_plugins.json | 2 +- .../src/constants/trained_models.ts | 46 ++++ .../enterprise_search/common/constants.ts | 4 +- .../kea_logic/licensing_logic.mock.ts | 1 + .../public/applications/shared/layout/nav.tsx | 48 ++-- .../shared/licensing/licensing_logic.test.ts | 32 +++ .../shared/licensing/licensing_logic.ts | 8 + .../public/navigation_tree.ts | 2 +- .../enterprise_search/public/plugin.ts | 62 +++-- .../enterprise_search/server/plugin.ts | 4 + .../common/translations.ts | 64 +++++ .../common/types.ts | 1 + .../images/providers/azure_ai_studio.svg | 44 +++ .../assets/images/providers/azure_open_ai.svg | 9 + .../public/assets/images/providers/cohere.svg | 9 + .../assets/images/providers/elastic.svg | 16 ++ .../images/providers/google_ai_studio.svg | 6 + .../assets/images/providers/hugging_face.svg | 10 + .../assets/images/providers/mistral.svg | 34 +++ .../assets/images/providers/open_ai.svg | 3 + .../all_inference_endpoints/constants.ts | 11 +- .../filter/multi_select_filter.test.tsx | 66 +++++ .../filter/multi_select_filter.tsx | 108 ++++++++ .../filter/service_provider_filter.tsx | 43 +++ .../filter/task_type_filter.tsx | 42 +++ .../filter/translations.ts | 22 ++ .../copy_id/use_copy_id_action.test.tsx | 73 +++++ .../actions/copy_id/use_copy_id_action.tsx | 44 +++ .../confirm_delete_endpoint/index.test.tsx | 41 +++ .../delete/confirm_delete_endpoint/index.tsx | 34 +++ .../confirm_delete_endpoint/translations.ts | 24 ++ .../actions/delete/use_delete_action.tsx | 55 ++++ .../render_actions/actions/types.ts | 12 + .../render_actions/use_actions.tsx | 79 ++++++ .../deployment_status.test.tsx | 27 ++ .../deployment_status.tsx | 52 ++++ .../render_deployment_status/translations.ts | 29 ++ .../render_endpoint/endpoint_info.test.tsx | 257 ++++++++++++++++++ .../render_endpoint/endpoint_info.tsx | 164 +++++++++++ .../render_endpoint/model_badge.tsx | 21 ++ .../render_endpoint/translations.ts | 20 ++ .../service_provider.test.tsx | 32 +++ .../service_provider.tsx | 83 ++++++ .../render_task_type/task_type.test.tsx | 29 ++ .../render_task_type/task_type.tsx | 26 ++ .../render_table_columns/table_columns.tsx | 79 ++++++ .../search/table_search.test.tsx | 30 ++ .../search/table_search.tsx | 34 +++ .../all_inference_endpoints/table_columns.ts | 35 --- .../tabular_page.test.tsx | 6 + .../all_inference_endpoints/tabular_page.tsx | 101 ++++++- .../all_inference_endpoints/types.ts | 38 ++- .../empty_prompt/add_empty_prompt.tsx | 45 ++- .../components/empty_prompt/elser_prompt.tsx | 31 --- ...gual_e5_prompt.tsx => endpoint_prompt.tsx} | 27 +- .../components/inference_endpoints_header.tsx | 27 +- .../inference_flyout_wrapper_component.tsx | 37 ++- .../public/hooks/translations.ts | 23 ++ .../use_all_inference_endpoints_state.tsx | 20 +- .../public/hooks/use_delete_endpoint.test.tsx | 72 +++++ .../public/hooks/use_delete_endpoint.tsx | 42 +++ .../public/hooks/use_table_data.test.tsx | 67 ++++- .../public/hooks/use_table_data.tsx | 59 +++- .../lib/delete_inference_endpoint.test.ts | 32 +++ .../server/lib/delete_inference_endpoint.ts | 19 ++ .../server/routes.ts | 25 ++ 70 files changed, 2458 insertions(+), 204 deletions(-) create mode 100644 x-pack/plugins/search_inference_endpoints/public/assets/images/providers/azure_ai_studio.svg create mode 100644 x-pack/plugins/search_inference_endpoints/public/assets/images/providers/azure_open_ai.svg create mode 100644 x-pack/plugins/search_inference_endpoints/public/assets/images/providers/cohere.svg create mode 100644 x-pack/plugins/search_inference_endpoints/public/assets/images/providers/elastic.svg create mode 100644 x-pack/plugins/search_inference_endpoints/public/assets/images/providers/google_ai_studio.svg create mode 100644 x-pack/plugins/search_inference_endpoints/public/assets/images/providers/hugging_face.svg create mode 100644 x-pack/plugins/search_inference_endpoints/public/assets/images/providers/mistral.svg create mode 100644 x-pack/plugins/search_inference_endpoints/public/assets/images/providers/open_ai.svg create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/multi_select_filter.test.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/multi_select_filter.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/service_provider_filter.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/task_type_filter.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/translations.ts create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/use_copy_id_action.test.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/use_copy_id_action.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/index.test.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/index.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/translations.ts create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/use_delete_action.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/types.ts create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/use_actions.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/deployment_status.test.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/deployment_status.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/translations.ts create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.test.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/model_badge.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/translations.ts create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.test.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_task_type/task_type.test.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_task_type/task_type.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/table_columns.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/search/table_search.test.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/search/table_search.tsx delete mode 100644 x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/table_columns.ts delete mode 100644 x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/elser_prompt.tsx rename x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/{multilingual_e5_prompt.tsx => endpoint_prompt.tsx} (51%) create mode 100644 x-pack/plugins/search_inference_endpoints/public/hooks/translations.ts create mode 100644 x-pack/plugins/search_inference_endpoints/public/hooks/use_delete_endpoint.test.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/public/hooks/use_delete_endpoint.tsx create mode 100644 x-pack/plugins/search_inference_endpoints/server/lib/delete_inference_endpoint.test.ts create mode 100644 x-pack/plugins/search_inference_endpoints/server/lib/delete_inference_endpoint.ts diff --git a/packages/deeplinks/search/constants.ts b/packages/deeplinks/search/constants.ts index 3fdcc78bb68a17..8aa53658320f53 100644 --- a/packages/deeplinks/search/constants.ts +++ b/packages/deeplinks/search/constants.ts @@ -8,7 +8,7 @@ export const ENTERPRISE_SEARCH_APP_ID = 'enterpriseSearch'; export const ENTERPRISE_SEARCH_CONTENT_APP_ID = 'enterpriseSearchContent'; -export const ENTERPRISE_SEARCH_INFERENCE_ENDPOINTS_APP_ID = 'enterpriseSearchInferenceEndpoints'; +export const ENTERPRISE_SEARCH_RELEVANCE_APP_ID = 'enterpriseSearchRelevance'; export const ENTERPRISE_SEARCH_APPLICATIONS_APP_ID = 'enterpriseSearchApplications'; export const ENTERPRISE_SEARCH_ANALYTICS_APP_ID = 'enterpriseSearchAnalytics'; export const ENTERPRISE_SEARCH_APPSEARCH_APP_ID = 'appSearch'; diff --git a/packages/deeplinks/search/deep_links.ts b/packages/deeplinks/search/deep_links.ts index f004d1b2c9dd6a..4b32ec9757bde6 100644 --- a/packages/deeplinks/search/deep_links.ts +++ b/packages/deeplinks/search/deep_links.ts @@ -12,6 +12,7 @@ import { ENTERPRISE_SEARCH_APP_ID, ENTERPRISE_SEARCH_CONTENT_APP_ID, ENTERPRISE_SEARCH_APPLICATIONS_APP_ID, + ENTERPRISE_SEARCH_RELEVANCE_APP_ID, ENTERPRISE_SEARCH_ANALYTICS_APP_ID, ENTERPRISE_SEARCH_APPSEARCH_APP_ID, ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID, @@ -23,6 +24,7 @@ import { export type EnterpriseSearchApp = typeof ENTERPRISE_SEARCH_APP_ID; export type EnterpriseSearchContentApp = typeof ENTERPRISE_SEARCH_CONTENT_APP_ID; export type EnterpriseSearchApplicationsApp = typeof ENTERPRISE_SEARCH_APPLICATIONS_APP_ID; +export type EnterpriseSearchRelevanceApp = typeof ENTERPRISE_SEARCH_RELEVANCE_APP_ID; export type EnterpriseSearchAnalyticsApp = typeof ENTERPRISE_SEARCH_ANALYTICS_APP_ID; export type EnterpriseSearchAppsearchApp = typeof ENTERPRISE_SEARCH_APPSEARCH_APP_ID; export type EnterpriseSearchWorkplaceSearchApp = typeof ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID; @@ -38,10 +40,13 @@ export type ApplicationsLinkId = 'searchApplications' | 'playground'; export type AppsearchLinkId = 'engines'; +export type RelevanceLinkId = 'inferenceEndpoints'; + export type DeepLinkId = | EnterpriseSearchApp | EnterpriseSearchContentApp | EnterpriseSearchApplicationsApp + | EnterpriseSearchRelevanceApp | EnterpriseSearchAnalyticsApp | EnterpriseSearchAppsearchApp | EnterpriseSearchWorkplaceSearchApp @@ -52,4 +57,5 @@ export type DeepLinkId = | SearchHomepage | `${EnterpriseSearchContentApp}:${ContentLinkId}` | `${EnterpriseSearchApplicationsApp}:${ApplicationsLinkId}` - | `${EnterpriseSearchAppsearchApp}:${AppsearchLinkId}`; + | `${EnterpriseSearchAppsearchApp}:${AppsearchLinkId}` + | `${EnterpriseSearchRelevanceApp}:${RelevanceLinkId}`; diff --git a/packages/deeplinks/search/index.ts b/packages/deeplinks/search/index.ts index 663d625e9fd72e..a18f0cb31426f6 100644 --- a/packages/deeplinks/search/index.ts +++ b/packages/deeplinks/search/index.ts @@ -9,7 +9,7 @@ export { ENTERPRISE_SEARCH_APP_ID, ENTERPRISE_SEARCH_CONTENT_APP_ID, - ENTERPRISE_SEARCH_INFERENCE_ENDPOINTS_APP_ID, + ENTERPRISE_SEARCH_RELEVANCE_APP_ID, ENTERPRISE_SEARCH_APPLICATIONS_APP_ID, ENTERPRISE_SEARCH_ANALYTICS_APP_ID, ENTERPRISE_SEARCH_APPSEARCH_APP_ID, diff --git a/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts b/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts index 4ffe9d483a1a47..8d6343337f152a 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts @@ -135,7 +135,7 @@ export const applicationUsageSchema = { canvas: commonSchema, enterpriseSearch: commonSchema, enterpriseSearchContent: commonSchema, - enterpriseSearchInferenceEndpoints: commonSchema, + enterpriseSearchRelevance: commonSchema, enterpriseSearchAnalytics: commonSchema, enterpriseSearchApplications: commonSchema, enterpriseSearchAISearch: commonSchema, diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index 22e75e5d4b658f..00c4a48da72faf 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -2098,7 +2098,7 @@ } } }, - "enterpriseSearchInferenceEndpoints": { + "enterpriseSearchRelevance": { "properties": { "appId": { "type": "keyword", diff --git a/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts b/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts index 0e19fef36e2e20..49acb6e1d5169e 100644 --- a/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts +++ b/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts @@ -201,6 +201,52 @@ export type InferenceServiceSettings = api_key: string; organization_id: string; url: string; + model_id: string; + }; + } + | { + service: 'mistral'; + service_settings: { + api_key: string; + model: string; + max_input_tokens: string; + rate_limit: { + requests_per_minute: number; + }; + }; + } + | { + service: 'cohere'; + service_settings: { + similarity: string; + dimensions: string; + model_id: string; + embedding_type: string; + }; + } + | { + service: 'azureaistudio'; + service_settings: { + target: string; + provider: string; + embedding_type: string; + }; + } + | { + service: 'azureopenai'; + service_settings: { + resource_name: string; + deployment_id: string; + api_version: string; + }; + } + | { + service: 'googleaistudio'; + service_settings: { + model_id: string; + rate_limit: { + requests_per_minute: number; + }; }; } | { diff --git a/x-pack/plugins/enterprise_search/common/constants.ts b/x-pack/plugins/enterprise_search/common/constants.ts index 47c4741e41afc7..f2be720d1c04c7 100644 --- a/x-pack/plugins/enterprise_search/common/constants.ts +++ b/x-pack/plugins/enterprise_search/common/constants.ts @@ -8,7 +8,7 @@ import { ENTERPRISE_SEARCH_APP_ID, ENTERPRISE_SEARCH_CONTENT_APP_ID, - ENTERPRISE_SEARCH_INFERENCE_ENDPOINTS_APP_ID, + ENTERPRISE_SEARCH_RELEVANCE_APP_ID, ENTERPRISE_SEARCH_APPLICATIONS_APP_ID, ENTERPRISE_SEARCH_ANALYTICS_APP_ID, ENTERPRISE_SEARCH_APPSEARCH_APP_ID, @@ -178,7 +178,7 @@ export const VECTOR_SEARCH_PLUGIN = { }; export const INFERENCE_ENDPOINTS_PLUGIN = { - ID: ENTERPRISE_SEARCH_INFERENCE_ENDPOINTS_APP_ID, + ID: ENTERPRISE_SEARCH_RELEVANCE_APP_ID, NAME: i18n.translate('xpack.enterpriseSearch.inferenceEndpoints.productName', { defaultMessage: 'Inference Endpoints', }), diff --git a/x-pack/plugins/enterprise_search/public/applications/__mocks__/kea_logic/licensing_logic.mock.ts b/x-pack/plugins/enterprise_search/public/applications/__mocks__/kea_logic/licensing_logic.mock.ts index 0ea858d0f2f507..4f91ddf4cb5c67 100644 --- a/x-pack/plugins/enterprise_search/public/applications/__mocks__/kea_logic/licensing_logic.mock.ts +++ b/x-pack/plugins/enterprise_search/public/applications/__mocks__/kea_logic/licensing_logic.mock.ts @@ -10,6 +10,7 @@ import { licensingMock } from '@kbn/licensing-plugin/public/mocks'; export const mockLicensingValues = { license: licensingMock.createLicense(), hasPlatinumLicense: false, + hasEnterpriseLicense: true, hasGoldLicense: false, isTrial: false, canManageLicense: true, diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx index 77454581c61e77..e39f0f0b71f296 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx @@ -40,6 +40,8 @@ import { import { INFERENCE_ENDPOINTS_PATH } from '../../enterprise_search_relevance/routes'; import { KibanaLogic } from '../kibana'; +import { LicensingLogic } from '../licensing'; + import { generateNavLink } from './nav_link_helpers'; /** @@ -51,7 +53,11 @@ import { generateNavLink } from './nav_link_helpers'; export const useEnterpriseSearchNav = (alwaysReturn = false) => { const { isSearchHomepageEnabled, searchHomepage, isSidebarEnabled, productAccess } = useValues(KibanaLogic); + + const { hasEnterpriseLicense } = useValues(LicensingLogic); + const indicesNavItems = useIndicesNav(); + if (!isSidebarEnabled && !alwaysReturn) return undefined; const navItems: Array> = [ @@ -154,25 +160,29 @@ export const useEnterpriseSearchNav = (alwaysReturn = false) => { defaultMessage: 'Build', }), }, - { - id: 'relevance', - items: [ - { - id: 'inference_endpoints', - name: i18n.translate('xpack.enterpriseSearch.nav.inferenceEndpointsTitle', { - defaultMessage: 'Inference Endpoints', - }), - ...generateNavLink({ - shouldNotCreateHref: true, - shouldShowActiveForSubroutes: true, - to: INFERENCE_ENDPOINTS_PLUGIN.URL + INFERENCE_ENDPOINTS_PATH, - }), - }, - ], - name: i18n.translate('xpack.enterpriseSearch.nav.relevanceTitle', { - defaultMessage: 'Relevance', - }), - }, + ...(hasEnterpriseLicense + ? [ + { + id: 'relevance', + items: [ + { + id: 'inference_endpoints', + name: i18n.translate('xpack.enterpriseSearch.nav.inferenceEndpointsTitle', { + defaultMessage: 'Inference Endpoints', + }), + ...generateNavLink({ + shouldNotCreateHref: true, + shouldShowActiveForSubroutes: true, + to: INFERENCE_ENDPOINTS_PLUGIN.URL + INFERENCE_ENDPOINTS_PATH, + }), + }, + ], + name: i18n.translate('xpack.enterpriseSearch.nav.relevanceTitle', { + defaultMessage: 'Relevance', + }), + }, + ] + : []), { id: 'es_getting_started', items: [ diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/licensing/licensing_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/shared/licensing/licensing_logic.test.ts index 85a26abeef1e15..743483e96fa317 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/licensing/licensing_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/licensing/licensing_logic.test.ts @@ -167,6 +167,38 @@ describe('LicensingLogic', () => { }); }); + describe('hasEnterpriseLicense', () => { + it('is true for enterprise and trial licenses', () => { + updateLicense({ status: 'active', type: 'enterprise' }); + expect(LicensingLogic.values.hasEnterpriseLicense).toEqual(true); + + updateLicense({ status: 'active', type: 'trial' }); + expect(LicensingLogic.values.hasEnterpriseLicense).toEqual(true); + }); + + it('is false if the current license is expired', () => { + updateLicense({ status: 'expired', type: 'enterprise' }); + expect(LicensingLogic.values.hasEnterpriseLicense).toEqual(false); + + updateLicense({ status: 'expired', type: 'trial' }); + expect(LicensingLogic.values.hasEnterpriseLicense).toEqual(false); + }); + + it('is false for licenses below enterprise', () => { + updateLicense({ status: 'active', type: 'gold' }); + expect(LicensingLogic.values.hasEnterpriseLicense).toEqual(false); + + updateLicense({ status: 'active', type: 'platinum' }); + expect(LicensingLogic.values.hasEnterpriseLicense).toEqual(false); + + updateLicense({ status: 'active', type: 'basic' }); + expect(LicensingLogic.values.hasEnterpriseLicense).toEqual(false); + + updateLicense({ status: 'active', type: 'standard' }); + expect(LicensingLogic.values.hasEnterpriseLicense).toEqual(false); + }); + }); + describe('isTrial', () => { it('is true for active trial license', () => { updateLicense({ status: 'active', type: 'trial' }); diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/licensing/licensing_logic.ts b/x-pack/plugins/enterprise_search/public/applications/shared/licensing/licensing_logic.ts index 77a09de2c863f3..ab3586f6563c13 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/licensing/licensing_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/licensing/licensing_logic.ts @@ -13,6 +13,7 @@ import { ILicense } from '@kbn/licensing-plugin/public'; interface LicensingValues { license: ILicense | null; licenseSubscription: Subscription | null; + hasEnterpriseLicense: boolean; hasPlatinumLicense: boolean; hasGoldLicense: boolean; isTrial: boolean; @@ -52,6 +53,13 @@ export const LicensingLogic = kea [selectors.license], + (license) => { + const qualifyingLicenses = ['enterprise', 'trial']; + return license?.isActive && qualifyingLicenses.includes(license?.type); + }, + ], hasGoldLicense: [ (selectors) => [selectors.license], (license) => { diff --git a/x-pack/plugins/enterprise_search/public/navigation_tree.ts b/x-pack/plugins/enterprise_search/public/navigation_tree.ts index 8bb6bf70e603b3..d5c640fa67b3ea 100644 --- a/x-pack/plugins/enterprise_search/public/navigation_tree.ts +++ b/x-pack/plugins/enterprise_search/public/navigation_tree.ts @@ -211,7 +211,7 @@ export const getNavigationTreeDefinition = ({ }), }, { - children: [{ link: 'searchInferenceEndpoints' }], + children: [{ link: 'enterpriseSearchRelevance:inferenceEndpoints' }], id: 'relevance', title: i18n.translate('xpack.enterpriseSearch.searchNav.relevance', { defaultMessage: 'Relevance', diff --git a/x-pack/plugins/enterprise_search/public/plugin.ts b/x-pack/plugins/enterprise_search/public/plugin.ts index 280de2f04356b4..552bb43fbd0734 100644 --- a/x-pack/plugins/enterprise_search/public/plugin.ts +++ b/x-pack/plugins/enterprise_search/public/plugin.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { BehaviorSubject, firstValueFrom } from 'rxjs'; +import { BehaviorSubject, firstValueFrom, Subscription } from 'rxjs'; import { ChartsPluginStart } from '@kbn/charts-plugin/public'; import { CloudSetup, CloudStart } from '@kbn/cloud-plugin/public'; @@ -27,6 +27,7 @@ import type { HomePublicPluginSetup } from '@kbn/home-plugin/public'; import { i18n } from '@kbn/i18n'; import type { IndexManagementPluginStart } from '@kbn/index-management'; import { LensPublicStart } from '@kbn/lens-plugin/public'; +import { ILicense } from '@kbn/licensing-plugin/public'; import { LicensingPluginStart } from '@kbn/licensing-plugin/public'; import { MlPluginStart } from '@kbn/ml-plugin/public'; import type { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public'; @@ -84,6 +85,7 @@ export type EnterpriseSearchPublicStart = ReturnType(); @@ -261,7 +264,8 @@ export class EnterpriseSearchPlugin implements Plugin { if (!config.ui?.enabled) { return; } - const { cloud, share } = plugins; + const { cloud, share, licensing } = plugins; + const useSearchHomepage = plugins.searchHomepage && plugins.searchHomepage.isHomepageFeatureEnabled(); @@ -445,29 +449,33 @@ export class EnterpriseSearchPlugin implements Plugin { title: ANALYTICS_PLUGIN.NAME, }); - core.application.register({ - appRoute: INFERENCE_ENDPOINTS_PLUGIN.URL, - category: DEFAULT_APP_CATEGORIES.enterpriseSearch, - deepLinks: relevanceLinks, - euiIconType: INFERENCE_ENDPOINTS_PLUGIN.LOGO, - id: INFERENCE_ENDPOINTS_PLUGIN.ID, - mount: async (params: AppMountParameters) => { - const kibanaDeps = await this.getKibanaDeps(core, params, cloud); - const { chrome, http } = kibanaDeps.core; - chrome.docTitle.change(INFERENCE_ENDPOINTS_PLUGIN.NAME); - - await this.getInitialData(http); - const pluginData = this.getPluginData(); - - const { renderApp } = await import('./applications'); - const { EnterpriseSearchRelevance } = await import( - './applications/enterprise_search_relevance' - ); - - return renderApp(EnterpriseSearchRelevance, kibanaDeps, pluginData); - }, - title: INFERENCE_ENDPOINTS_PLUGIN.NAME, - visibleIn: [], + this.licenseSubscription = licensing?.license$.subscribe((license: ILicense) => { + if (license.isActive && license.hasAtLeast('enterprise')) { + core.application.register({ + appRoute: INFERENCE_ENDPOINTS_PLUGIN.URL, + category: DEFAULT_APP_CATEGORIES.enterpriseSearch, + deepLinks: relevanceLinks, + euiIconType: INFERENCE_ENDPOINTS_PLUGIN.LOGO, + id: INFERENCE_ENDPOINTS_PLUGIN.ID, + mount: async (params: AppMountParameters) => { + const kibanaDeps = await this.getKibanaDeps(core, params, cloud); + const { chrome, http } = kibanaDeps.core; + chrome.docTitle.change(INFERENCE_ENDPOINTS_PLUGIN.NAME); + + await this.getInitialData(http); + const pluginData = this.getPluginData(); + + const { renderApp } = await import('./applications'); + const { EnterpriseSearchRelevance } = await import( + './applications/enterprise_search_relevance' + ); + + return renderApp(EnterpriseSearchRelevance, kibanaDeps, pluginData); + }, + title: INFERENCE_ENDPOINTS_PLUGIN.NAME, + visibleIn: [], + }); + } }); core.application.register({ @@ -645,7 +653,9 @@ export class EnterpriseSearchPlugin implements Plugin { return {}; } - public stop() {} + public stop() { + this.licenseSubscription?.unsubscribe(); + } private updateSideNavDefinition = (items: Partial) => { this.sideNavDynamicItems$.next({ ...this.sideNavDynamicItems$.getValue(), ...items }); diff --git a/x-pack/plugins/enterprise_search/server/plugin.ts b/x-pack/plugins/enterprise_search/server/plugin.ts index 24298c55fdffae..ee403e223305fe 100644 --- a/x-pack/plugins/enterprise_search/server/plugin.ts +++ b/x-pack/plugins/enterprise_search/server/plugin.ts @@ -21,6 +21,7 @@ import { DataPluginStart } from '@kbn/data-plugin/server/plugin'; import { PluginSetupContract as FeaturesPluginSetup } from '@kbn/features-plugin/server'; import { GlobalSearchPluginSetup } from '@kbn/global-search-plugin/server'; import type { GuidedOnboardingPluginSetup } from '@kbn/guided-onboarding-plugin/server'; +import type { LicensingPluginStart } from '@kbn/licensing-plugin/public'; import { LogsSharedPluginSetup } from '@kbn/logs-shared-plugin/server'; import type { MlPluginSetup } from '@kbn/ml-plugin/server'; import { SearchConnectorsPluginSetup } from '@kbn/search-connectors-plugin/server'; @@ -95,6 +96,7 @@ interface PluginsSetup { guidedOnboarding?: GuidedOnboardingPluginSetup; logsShared: LogsSharedPluginSetup; ml?: MlPluginSetup; + licensing: LicensingPluginStart; searchConnectors?: SearchConnectorsPluginSetup; security: SecurityPluginSetup; usageCollection?: UsageCollectionSetup; @@ -148,6 +150,7 @@ export class EnterpriseSearchPlugin implements Plugin { logsShared, customIntegrations, ml, + licensing, guidedOnboarding, cloud, searchConnectors, @@ -262,6 +265,7 @@ export class EnterpriseSearchPlugin implements Plugin { log, enterpriseSearchRequestHandler, ml, + licensing, }; registerConfigDataRoute(dependencies); diff --git a/x-pack/plugins/search_inference_endpoints/common/translations.ts b/x-pack/plugins/search_inference_endpoints/common/translations.ts index e58829812829b7..8171b8bba02546 100644 --- a/x-pack/plugins/search_inference_endpoints/common/translations.ts +++ b/x-pack/plugins/search_inference_endpoints/common/translations.ts @@ -14,6 +14,10 @@ export const INFERENCE_ENDPOINT_LABEL = i18n.translate( } ); +export const CANCEL = i18n.translate('xpack.searchInferenceEndpoints.cancel', { + defaultMessage: 'Cancel', +}); + export const MANAGE_INFERENCE_ENDPOINTS_LABEL = i18n.translate( 'xpack.searchInferenceEndpoints.allInferenceEndpoints.description', { @@ -94,3 +98,63 @@ export const FORBIDDEN_TO_ACCESS_TRAINED_MODELS = i18n.translate( defaultMessage: 'Forbidden to access trained models', } ); + +export const COPY_ID_ACTION_LABEL = i18n.translate( + 'xpack.searchInferenceEndpoints.actions.copyID', + { + defaultMessage: 'Copy endpoint ID', + } +); + +export const COPY_ID_ACTION_SUCCESS = i18n.translate( + 'xpack.searchInferenceEndpoints.actions.copyIDSuccess', + { + defaultMessage: 'Inference endpoint ID copied!', + } +); + +export const ENDPOINT_ADDED_SUCCESS = i18n.translate( + 'xpack.searchInferenceEndpoints.actions.endpointAddedSuccess', + { + defaultMessage: 'Endpoint added', + } +); + +export const ENDPOINT_CREATION_FAILED = i18n.translate( + 'xpack.searchInferenceEndpoints.actions.endpointAddedFailure', + { + defaultMessage: 'Endpoint creation failed', + } +); + +export const ENDPOINT_ADDED_SUCCESS_DESCRIPTION = (endpointId: string) => + i18n.translate('xpack.searchInferenceEndpoints.actions.endpointAddedSuccessDescription', { + defaultMessage: 'The inference endpoint "{endpointId}" was added.', + values: { endpointId }, + }); + +export const DELETE_ACTION_LABEL = i18n.translate( + 'xpack.searchInferenceEndpoints.actions.deleteSingleEndpoint', + { + defaultMessage: 'Delete endpoint', + } +); + +export const ENDPOINT = i18n.translate('xpack.searchInferenceEndpoints.endpoint', { + defaultMessage: 'Endpoint', +}); + +export const SERVICE_PROVIDER = i18n.translate('xpack.searchInferenceEndpoints.serviceProvider', { + defaultMessage: 'Service', +}); + +export const TASK_TYPE = i18n.translate('xpack.searchInferenceEndpoints.taskType', { + defaultMessage: 'Type', +}); + +export const TRAINED_MODELS_STAT_GATHER_FAILED = i18n.translate( + 'xpack.searchInferenceEndpoints.actions.trainedModelsStatGatherFailed', + { + defaultMessage: 'Failed to retrieve trained model statistics', + } +); diff --git a/x-pack/plugins/search_inference_endpoints/common/types.ts b/x-pack/plugins/search_inference_endpoints/common/types.ts index ef29d987309f8b..e6529de4e3a642 100644 --- a/x-pack/plugins/search_inference_endpoints/common/types.ts +++ b/x-pack/plugins/search_inference_endpoints/common/types.ts @@ -7,6 +7,7 @@ export enum APIRoutes { GET_INFERENCE_ENDPOINTS = '/internal/inference_endpoints/endpoints', + DELETE_INFERENCE_ENDPOINT = '/internal/inference_endpoint/endpoints/{type}/{id}', } export interface SearchInferenceEndpointsConfigType { diff --git a/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/azure_ai_studio.svg b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/azure_ai_studio.svg new file mode 100644 index 00000000000000..405e182a103949 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/azure_ai_studio.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/azure_open_ai.svg b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/azure_open_ai.svg new file mode 100644 index 00000000000000..122c0c65af13cc --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/azure_open_ai.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/cohere.svg b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/cohere.svg new file mode 100644 index 00000000000000..69953809fec358 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/cohere.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/elastic.svg b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/elastic.svg new file mode 100644 index 00000000000000..e763c2e2f2ab6e --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/elastic.svg @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/google_ai_studio.svg b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/google_ai_studio.svg new file mode 100644 index 00000000000000..b6e34ae15c9e4b --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/google_ai_studio.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/hugging_face.svg b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/hugging_face.svg new file mode 100644 index 00000000000000..87ac70c5a18f41 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/hugging_face.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/mistral.svg b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/mistral.svg new file mode 100644 index 00000000000000..f62258a327594b --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/mistral.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/open_ai.svg b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/open_ai.svg new file mode 100644 index 00000000000000..9ddc8f8fd63b8b --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/open_ai.svg @@ -0,0 +1,3 @@ + + + diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/constants.ts b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/constants.ts index 1b7e72149fd439..b3fd13dc5383ab 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/constants.ts +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/constants.ts @@ -8,8 +8,9 @@ import { SortFieldInferenceEndpoint, QueryParams, - AlInferenceEndpointsTableState, + AllInferenceEndpointsTableState, SortOrder, + FilterOptions, } from './types'; export const DEFAULT_TABLE_ACTIVE_PAGE = 1; @@ -22,6 +23,12 @@ export const DEFAULT_QUERY_PARAMS: QueryParams = { sortOrder: SortOrder.asc, }; -export const DEFAULT_INFERENCE_ENDPOINTS_TABLE_STATE: AlInferenceEndpointsTableState = { +export const DEFAULT_FILTER_OPTIONS: FilterOptions = { + provider: [], + type: [], +}; + +export const DEFAULT_INFERENCE_ENDPOINTS_TABLE_STATE: AllInferenceEndpointsTableState = { + filterOptions: DEFAULT_FILTER_OPTIONS, queryParams: DEFAULT_QUERY_PARAMS, }; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/multi_select_filter.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/multi_select_filter.test.tsx new file mode 100644 index 00000000000000..87b984c26d3ea9 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/multi_select_filter.test.tsx @@ -0,0 +1,66 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { render, fireEvent, waitFor } from '@testing-library/react'; +import { MultiSelectFilter, MultiSelectFilterOption } from './multi_select_filter'; +import '@testing-library/jest-dom/extend-expect'; + +describe('MultiSelectFilter', () => { + const options: MultiSelectFilterOption[] = [ + { key: '1', label: 'Option 1', checked: 'off' }, + { key: '2', label: 'Option 2', checked: 'on' }, + { key: '3', label: 'Option 3', checked: 'off' }, + ]; + + it('should render the filter button with the provided label', () => { + const { getByText } = render( + {}} options={options} buttonLabel="Filter Options" /> + ); + expect(getByText('Filter Options')).toBeInTheDocument(); + }); + + it('should toggle the popover when the filter button is clicked', async () => { + const { getByText, queryByText } = render( + {}} options={options} buttonLabel="Filter Options" /> + ); + fireEvent.click(getByText('Filter Options')); + expect(queryByText('Option 1')).toBeInTheDocument(); + fireEvent.click(getByText('Filter Options')); + await waitFor(() => { + expect(queryByText('Option 1')).not.toBeInTheDocument(); + }); + }); + + it('should render the provided options', async () => { + const { getByText } = render( + {}} options={options} buttonLabel="Filter Options" /> + ); + + fireEvent.click(getByText('Filter Options')); + + await waitFor(() => { + expect(getByText('Option 1')).toBeInTheDocument(); + expect(getByText('Option 2')).toBeInTheDocument(); + expect(getByText('Option 3')).toBeInTheDocument(); + }); + }); + + it('should call the onChange function with the updated options when an option is clicked', async () => { + const onChange = jest.fn(); + const { getByText } = render( + + ); + + fireEvent.click(getByText('Filter Options')); + fireEvent.click(getByText('Option 1')); + + await waitFor(() => { + expect(onChange).toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/multi_select_filter.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/multi_select_filter.tsx new file mode 100644 index 00000000000000..84883c4e854320 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/multi_select_filter.tsx @@ -0,0 +1,108 @@ +/* + * Copyright 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 { + EuiFilterButton, + EuiFilterGroup, + EuiPopover, + EuiPopoverTitle, + EuiSelectable, + EuiSpacer, + EuiText, + EuiTextColor, + useEuiTheme, +} from '@elastic/eui'; +import { css } from '@emotion/react'; +import React, { useState } from 'react'; +import * as i18n from './translations'; + +export interface MultiSelectFilterOption { + key: string; + label: string; + checked?: 'on' | 'off'; +} + +interface UseFilterParams { + buttonLabel?: string; + onChange: (newOptions: MultiSelectFilterOption[]) => void; + options: MultiSelectFilterOption[]; + renderOption?: (option: MultiSelectFilterOption) => React.ReactNode; + selectedOptionKeys?: string[]; +} + +export const MultiSelectFilter: React.FC = ({ + buttonLabel, + onChange, + options: rawOptions, + selectedOptionKeys = [], + renderOption, +}) => { + const { euiTheme } = useEuiTheme(); + const [isPopoverOpen, setIsPopoverOpen] = useState(false); + const toggleIsPopoverOpen = () => setIsPopoverOpen((prevValue) => !prevValue); + const options: MultiSelectFilterOption[] = rawOptions.map(({ key, label }) => ({ + label, + key, + checked: selectedOptionKeys.includes(key) ? 'on' : undefined, + })); + + return ( + + 0} + numActiveFilters={selectedOptionKeys.length} + aria-label={buttonLabel} + > + + {buttonLabel} + + + } + isOpen={isPopoverOpen} + closePopover={() => setIsPopoverOpen(false)} + panelPaddingSize="none" + repositionOnScroll + > + + {(list, search) => ( +
+ {search} +
+ {i18n.OPTIONS(options.length)} +
+ + {list} +
+ )} +
+
+
+ ); +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/service_provider_filter.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/service_provider_filter.tsx new file mode 100644 index 00000000000000..3d7f9568428efd --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/service_provider_filter.tsx @@ -0,0 +1,43 @@ +/* + * Copyright 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 { SERVICE_PROVIDERS } from '../render_table_columns/render_service_provider/service_provider'; +import type { FilterOptions, ServiceProviderKeys } from '../types'; +import { MultiSelectFilter, MultiSelectFilterOption } from './multi_select_filter'; +import * as i18n from './translations'; + +interface Props { + optionKeys: ServiceProviderKeys[]; + onChange: (newFilterOptions: Partial) => void; +} + +const options = Object.entries(SERVICE_PROVIDERS).map(([key, { name }]) => ({ + key, + label: name, +})); + +export const ServiceProviderFilter: React.FC = ({ optionKeys, onChange }) => { + const filterId: string = 'provider'; + const onSystemFilterChange = (newOptions: MultiSelectFilterOption[]) => { + onChange({ + [filterId]: newOptions + .filter((option) => option.checked === 'on') + .map((option) => option.key), + }); + }; + + return ( + option.label} + selectedOptionKeys={optionKeys} + /> + ); +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/task_type_filter.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/task_type_filter.tsx new file mode 100644 index 00000000000000..389757b833db68 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/task_type_filter.tsx @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { FilterOptions, TaskTypes } from '../types'; +import { MultiSelectFilter, MultiSelectFilterOption } from './multi_select_filter'; +import * as i18n from './translations'; + +interface Props { + optionKeys: TaskTypes[]; + onChange: (newFilterOptions: Partial) => void; +} + +const options = Object.values(TaskTypes).map((option) => ({ + key: option, + label: option, +})); + +export const TaskTypeFilter: React.FC = ({ optionKeys, onChange }) => { + const filterId: string = 'type'; + const onSystemFilterChange = (newOptions: MultiSelectFilterOption[]) => { + onChange({ + [filterId]: newOptions + .filter((option) => option.checked === 'on') + .map((option) => option.key), + }); + }; + + return ( + option.label} + selectedOptionKeys={optionKeys} + /> + ); +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/translations.ts b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/translations.ts new file mode 100644 index 00000000000000..f373e8f5d5a46c --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/filter/translations.ts @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export { SERVICE_PROVIDER, TASK_TYPE } from '../../../../common/translations'; + +export const EMPTY_FILTER_MESSAGE = i18n.translate( + 'xpack.searchInferenceEndpoints.filter.emptyMessage', + { + defaultMessage: 'No options', + } +); +export const OPTIONS = (totalCount: number) => + i18n.translate('xpack.searchInferenceEndpoints.filter.options', { + defaultMessage: '{totalCount, plural, one {# option} other {# options}}', + values: { totalCount }, + }); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/use_copy_id_action.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/use_copy_id_action.test.tsx new file mode 100644 index 00000000000000..1445e0c41c5745 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/use_copy_id_action.test.tsx @@ -0,0 +1,73 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { renderReactTestingLibraryWithI18n as render } from '@kbn/test-jest-helpers'; +import React from 'react'; +import { useKibana } from '../../../../../../hooks/use_kibana'; +import { useCopyIDAction } from './use_copy_id_action'; + +const mockInferenceEndpoint = { + deployment: 'not_applicable', + endpoint: { + model_id: 'hugging-face-embeddings', + task_type: 'text_embedding', + service: 'hugging_face', + service_settings: { + dimensions: 768, + rate_limit: { + requests_per_minute: 3000, + }, + }, + task_settings: {}, + }, + provider: 'hugging_face', + type: 'text_embedding', +} as any; + +Object.defineProperty(navigator, 'clipboard', { + value: { + writeText: jest.fn().mockResolvedValue(undefined), + }, + configurable: true, +}); + +const mockOnActionSuccess = jest.fn(); + +jest.mock('../../../../../../hooks/use_kibana', () => ({ + useKibana: jest.fn(), +})); + +const addSuccess = jest.fn(); + +(useKibana as jest.Mock).mockImplementation(() => ({ + services: { + notifications: { + toasts: { + addSuccess, + }, + }, + }, +})); + +describe('useCopyIDAction hook', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('renders the label with correct text', () => { + const TestComponent = () => { + const { getAction } = useCopyIDAction({ onActionSuccess: mockOnActionSuccess }); + const action = getAction(mockInferenceEndpoint); + return
{action}
; + }; + + const { getByTestId } = render(); + const labelElement = getByTestId('inference-endpoints-action-copy-id-label'); + + expect(labelElement).toHaveTextContent('Copy endpoint ID'); + }); +}); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/use_copy_id_action.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/use_copy_id_action.tsx new file mode 100644 index 00000000000000..b43b308af068a0 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/use_copy_id_action.tsx @@ -0,0 +1,44 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiContextMenuItem, EuiCopy, EuiIcon } from '@elastic/eui'; +import React from 'react'; +import * as i18n from '../../../../../../../common/translations'; +import { useKibana } from '../../../../../../hooks/use_kibana'; +import { InferenceEndpointUI } from '../../../../types'; +import { UseCopyIDActionProps } from '../types'; + +export const useCopyIDAction = ({ onActionSuccess }: UseCopyIDActionProps) => { + const { + services: { notifications }, + } = useKibana(); + const toasts = notifications?.toasts; + + const getAction = (inferenceEndpoint: InferenceEndpointUI) => { + return ( + + {(copy) => ( + } + onClick={() => { + copy(); + onActionSuccess(); + toasts?.addSuccess({ title: i18n.COPY_ID_ACTION_SUCCESS }); + }} + size="s" + > + {i18n.COPY_ID_ACTION_LABEL} + + )} + + ); + }; + + return { getAction }; +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/index.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/index.test.tsx new file mode 100644 index 00000000000000..e6f4594e2d0cde --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/index.test.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 { render, fireEvent, screen } from '@testing-library/react'; +import React from 'react'; +import { ConfirmDeleteEndpointModal } from '.'; +import * as i18n from './translations'; + +describe('ConfirmDeleteEndpointModal', () => { + const mockOnCancel = jest.fn(); + const mockOnConfirm = jest.fn(); + + beforeEach(() => { + render(); + }); + + it('renders the modal with correct texts', () => { + expect(screen.getByText(i18n.DELETE_TITLE)).toBeInTheDocument(); + expect(screen.getByText(i18n.CONFIRM_DELETE_WARNING)).toBeInTheDocument(); + expect(screen.getByText(i18n.CANCEL)).toBeInTheDocument(); + expect(screen.getByText(i18n.DELETE_ACTION_LABEL)).toBeInTheDocument(); + }); + + it('calls onCancel when the cancel button is clicked', () => { + fireEvent.click(screen.getByText(i18n.CANCEL)); + expect(mockOnCancel).toHaveBeenCalled(); + }); + + it('calls onConfirm when the delete button is clicked', () => { + fireEvent.click(screen.getByText(i18n.DELETE_ACTION_LABEL)); + expect(mockOnConfirm).toHaveBeenCalled(); + }); + + it('has the delete button focused by default', () => { + expect(document.activeElement).toHaveTextContent(i18n.DELETE_ACTION_LABEL); + }); +}); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/index.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/index.tsx new file mode 100644 index 00000000000000..e650192a66dc7b --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/index.tsx @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { EuiConfirmModal } from '@elastic/eui'; +import * as i18n from './translations'; + +interface ConfirmDeleteEndpointModalProps { + onCancel: () => void; + onConfirm: () => void; +} + +export const ConfirmDeleteEndpointModal: React.FC = ({ + onCancel, + onConfirm, +}) => { + return ( + + {i18n.CONFIRM_DELETE_WARNING} + + ); +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/translations.ts b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/translations.ts new file mode 100644 index 00000000000000..6b2dff7d8b8f1d --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/translations.ts @@ -0,0 +1,24 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; +export * from '../../../../../../../../common/translations'; + +export const DELETE_TITLE = i18n.translate( + 'xpack.searchInferenceEndpoints.confirmDeleteEndpoint.title', + { + defaultMessage: 'Delete inference endpoint', + } +); + +export const CONFIRM_DELETE_WARNING = i18n.translate( + 'xpack.searchInferenceEndpoints.confirmDeleteEndpoint.confirmQuestion', + { + defaultMessage: + 'Deleting an active endpoint will cause operations targeting associated semantic_text fields and inference pipelines to fail.', + } +); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/use_delete_action.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/use_delete_action.tsx new file mode 100644 index 00000000000000..1a2e5cdb5b51f4 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/use_delete_action.tsx @@ -0,0 +1,55 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiContextMenuItem, EuiIcon } from '@elastic/eui'; +import React, { useCallback, useState } from 'react'; +import * as i18n from '../../../../../../../common/translations'; +import { useDeleteEndpoint } from '../../../../../../hooks/use_delete_endpoint'; +import { InferenceEndpointUI } from '../../../../types'; +import type { UseActionProps } from '../types'; + +export const useDeleteAction = ({ onActionSuccess }: UseActionProps) => { + const [isModalVisible, setIsModalVisible] = useState(false); + const [endpointToBeDeleted, setEndpointToBeDeleted] = useState(null); + const onCloseModal = useCallback(() => setIsModalVisible(false), []); + const openModal = useCallback( + (selectedEndpoint: InferenceEndpointUI) => { + onActionSuccess(); + setIsModalVisible(true); + setEndpointToBeDeleted(selectedEndpoint); + }, + [onActionSuccess] + ); + + const { mutate: deleteEndpoint } = useDeleteEndpoint(); + + const onConfirmDeletion = useCallback(() => { + onCloseModal(); + if (!endpointToBeDeleted) { + return; + } + + deleteEndpoint({ + type: endpointToBeDeleted.type, + id: endpointToBeDeleted.endpoint.model_id, + }); + }, [deleteEndpoint, onCloseModal, endpointToBeDeleted]); + + const getAction = (selectedEndpoint: InferenceEndpointUI) => { + return ( + } + onClick={() => openModal(selectedEndpoint)} + > + {i18n.DELETE_ACTION_LABEL} + + ); + }; + + return { getAction, isModalVisible, onConfirmDeletion, onCloseModal }; +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/types.ts b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/types.ts new file mode 100644 index 00000000000000..a80ccae703b7af --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/types.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export interface UseActionProps { + onActionSuccess: () => void; +} + +export type UseCopyIDActionProps = Pick; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/use_actions.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/use_actions.tsx new file mode 100644 index 00000000000000..f76d147c68646b --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/use_actions.tsx @@ -0,0 +1,79 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { EuiTableComputedColumnType } from '@elastic/eui'; +import { EuiButtonIcon, EuiContextMenuPanel, EuiPopover } from '@elastic/eui'; +import React, { useCallback, useState } from 'react'; +import { InferenceEndpointUI } from '../../types'; +import { useCopyIDAction } from './actions/copy_id/use_copy_id_action'; +import { ConfirmDeleteEndpointModal } from './actions/delete/confirm_delete_endpoint'; +import { useDeleteAction } from './actions/delete/use_delete_action'; + +export const ActionColumn: React.FC<{ interfaceEndpoint: InferenceEndpointUI }> = ({ + interfaceEndpoint, +}) => { + const [isPopoverOpen, setIsPopoverOpen] = useState(false); + const tooglePopover = useCallback(() => setIsPopoverOpen(!isPopoverOpen), [isPopoverOpen]); + const closePopover = useCallback(() => setIsPopoverOpen(false), []); + + const copyIDAction = useCopyIDAction({ + onActionSuccess: closePopover, + }); + + const deleteAction = useDeleteAction({ + onActionSuccess: closePopover, + }); + + const items = [ + copyIDAction.getAction(interfaceEndpoint), + deleteAction.getAction(interfaceEndpoint), + ]; + + return ( + <> + + } + isOpen={isPopoverOpen} + closePopover={closePopover} + panelPaddingSize="none" + anchorPosition="downLeft" + > + + + {deleteAction.isModalVisible ? ( + + ) : null} + + ); +}; + +interface UseBulkActionsReturnValue { + actions: EuiTableComputedColumnType; +} + +export const useActions = (): UseBulkActionsReturnValue => { + return { + actions: { + align: 'right', + render: (interfaceEndpoint: InferenceEndpointUI) => { + return ; + }, + width: '165px', + }, + }; +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/deployment_status.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/deployment_status.test.tsx new file mode 100644 index 00000000000000..59414cd6c90efd --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/deployment_status.test.tsx @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { render, screen } from '@testing-library/react'; +import React from 'react'; +import { DeploymentStatus } from './deployment_status'; +import { DeploymentStatusEnum } from '../../types'; + +describe('DeploymentStatus component', () => { + it.each([[DeploymentStatusEnum.deployed, DeploymentStatusEnum.notDeployed]])( + 'renders with %s status, expects %s color, and correct data-test-subj attribute', + (status) => { + render(); + const healthComponent = screen.getByTestId(`table-column-deployment-${status}`); + expect(healthComponent).toBeInTheDocument(); + } + ); + + it('does not render when status is notApplicable', () => { + const { container } = render(); + expect(container).toBeEmptyDOMElement(); + }); +}); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/deployment_status.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/deployment_status.tsx new file mode 100644 index 00000000000000..61e6e620d24856 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/deployment_status.tsx @@ -0,0 +1,52 @@ +/* + * Copyright 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 { EuiIcon, EuiToolTip } from '@elastic/eui'; +import { DeploymentStatusEnum } from '../../types'; +import * as i18n from './translations'; + +interface DeploymentStatusProps { + status: DeploymentStatusEnum; +} + +export const DeploymentStatus: React.FC = ({ status }) => { + if (status === DeploymentStatusEnum.notApplicable) { + return null; + } + + let statusColor: string; + let type: string; + let tooltip: string; + + switch (status) { + case DeploymentStatusEnum.deployed: + statusColor = 'success'; + type = 'dot'; + tooltip = i18n.MODEL_DEPLOYED; + break; + case DeploymentStatusEnum.notDeployed: + statusColor = 'warning'; + type = 'warning'; + tooltip = i18n.MODEL_NOT_DEPLOYED; + break; + case DeploymentStatusEnum.notDeployable: + statusColor = 'danger'; + type = 'dot'; + tooltip = i18n.MODEL_FAILED_TO_BE_DEPLOYED; + } + + return ( + + + + ); +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/translations.ts b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/translations.ts new file mode 100644 index 00000000000000..9a5448f5bf0d2e --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/translations.ts @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const MODEL_DEPLOYED = i18n.translate( + 'xpack.searchInferenceEndpoints.deploymentStatus.tooltip.modelDeployed', + { + defaultMessage: 'Model is deployed', + } +); + +export const MODEL_NOT_DEPLOYED = i18n.translate( + 'xpack.searchInferenceEndpoints.deploymentStatus.tooltip.modelNotDeployed', + { + defaultMessage: 'Model is not deployed', + } +); + +export const MODEL_FAILED_TO_BE_DEPLOYED = i18n.translate( + 'xpack.searchInferenceEndpoints.deploymentStatus.tooltip.modelFailedToBeDeployed', + { + defaultMessage: 'Model can not be deployed', + } +); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.test.tsx new file mode 100644 index 00000000000000..c92c01240425cb --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.test.tsx @@ -0,0 +1,257 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { render, screen } from '@testing-library/react'; +import React from 'react'; +import { EndpointInfo } from './endpoint_info'; + +describe('RenderEndpoint component tests', () => { + describe('with cohere service', () => { + const mockEndpoint = { + model_id: 'cohere-2', + service: 'cohere', + service_settings: { + similarity: 'cosine', + dimensions: 384, + model_id: 'embed-english-light-v3.0', + rate_limit: { + requests_per_minute: 10000, + }, + embedding_type: 'byte', + }, + task_settings: {}, + } as any; + + it('renders the component with endpoint details for Cohere service', () => { + render(); + + expect(screen.getByText('cohere-2')).toBeInTheDocument(); + expect(screen.getByText('byte')).toBeInTheDocument(); + expect(screen.getByText('embed-english-light-v3.0')).toBeInTheDocument(); + }); + + it('does not render model_id badge if serviceSettings.model_id is not provided for Cohere service', () => { + const modifiedEndpoint = { + ...mockEndpoint, + service_settings: { ...mockEndpoint.service_settings, model_id: undefined }, + }; + render(); + + expect(screen.queryByText('embed-english-light-v3.0')).not.toBeInTheDocument(); + }); + + it('renders only model_id if other settings are not provided for Cohere service', () => { + const modifiedEndpoint = { + ...mockEndpoint, + service_settings: { model_id: 'embed-english-light-v3.0' }, + }; + render(); + + expect(screen.getByText('embed-english-light-v3.0')).toBeInTheDocument(); + expect(screen.queryByText(',')).not.toBeInTheDocument(); + }); + }); + + describe('with elasticsearch service', () => { + const mockEndpoint = { + model_id: 'model-123', + service: 'elasticsearch', + service_settings: { + num_allocations: 5, + num_threads: 10, + model_id: 'settings-model-123', + }, + } as any; + + it('renders the component with endpoint model_id and model settings', () => { + render(); + + expect(screen.getByText('model-123')).toBeInTheDocument(); + expect(screen.getByText('settings-model-123')).toBeInTheDocument(); + expect(screen.getByText('Threads: 10 | Allocations: 5')).toBeInTheDocument(); + }); + + it('renders the component with only model_id if num_threads and num_allocations are not provided', () => { + const modifiedSettings = { + ...mockEndpoint.service_settings, + num_threads: undefined, + num_allocations: undefined, + }; + const modifiedEndpoint = { ...mockEndpoint, service_settings: modifiedSettings }; + render(); + + expect(screen.getByText('model-123')).toBeInTheDocument(); + expect(screen.getByText('settings-model-123')).toBeInTheDocument(); + expect(screen.queryByText('Threads: 10 | Allocations: 5')).not.toBeInTheDocument(); + }); + }); + + describe('with azureaistudio service', () => { + const mockEndpoint = { + model_id: 'azure-ai-1', + service: 'azureaistudio', + service_settings: { + target: 'westus', + provider: 'microsoft_phi', + endpoint_type: 'realtime', + }, + } as any; + + it('renders the component with endpoint details', () => { + render(); + + expect(screen.getByText('azure-ai-1')).toBeInTheDocument(); + expect(screen.getByText('microsoft_phi, realtime, westus')).toBeInTheDocument(); + }); + + it('renders correctly when some service settings are missing', () => { + const modifiedEndpoint = { + ...mockEndpoint, + service_settings: { target: 'westus', provider: 'microsoft_phi' }, + }; + render(); + + expect(screen.getByText('microsoft_phi, westus')).toBeInTheDocument(); + }); + + it('does not render a comma when only one service setting is provided', () => { + const modifiedEndpoint = { + ...mockEndpoint, + service_settings: { target: 'westus' }, + }; + render(); + + expect(screen.getByText('westus')).toBeInTheDocument(); + expect(screen.queryByText(',')).not.toBeInTheDocument(); + }); + + it('renders nothing related to service settings when all are missing', () => { + const modifiedEndpoint = { + ...mockEndpoint, + service_settings: {}, + }; + render(); + + expect(screen.getByText('azure-ai-1')).toBeInTheDocument(); + expect(screen.queryByText('westus')).not.toBeInTheDocument(); + expect(screen.queryByText('microsoft_phi')).not.toBeInTheDocument(); + expect(screen.queryByText('realtime')).not.toBeInTheDocument(); + }); + }); + + describe('with azureopenai service', () => { + const mockEndpoint = { + model_id: 'azure-openai-1', + service: 'azureopenai', + service_settings: { + resource_name: 'resource-xyz', + deployment_id: 'deployment-123', + api_version: 'v1', + }, + } as any; + + it('renders the component with all required endpoint details', () => { + render(); + + expect(screen.getByText('azure-openai-1')).toBeInTheDocument(); + expect(screen.getByText('resource-xyz, deployment-123, v1')).toBeInTheDocument(); + }); + }); + + describe('with mistral service', () => { + const mockEndpoint = { + model_id: 'mistral-ai-1', + service: 'mistral', + service_settings: { + model: 'model-xyz', + max_input_tokens: 512, + rate_limit: { + requests_per_minute: 1000, + }, + }, + } as any; + + it('renders the component with endpoint details', () => { + render(); + + expect(screen.getByText('mistral-ai-1')).toBeInTheDocument(); + expect(screen.getByText('model-xyz')).toBeInTheDocument(); + expect(screen.getByText('max_input_tokens: 512, rate_limit: 1000')).toBeInTheDocument(); + }); + + it('renders correctly when some service settings are missing', () => { + const modifiedEndpoint = { + ...mockEndpoint, + service_settings: { + model: 'model-xyz', + max_input_tokens: 512, + }, + }; + render(); + + expect(screen.getByText('max_input_tokens: 512')).toBeInTheDocument(); + }); + + it('does not render a comma when only one service setting is provided', () => { + const modifiedEndpoint = { + ...mockEndpoint, + service_settings: { model: 'model-xyz' }, + }; + render(); + + expect(screen.getByText('model-xyz')).toBeInTheDocument(); + expect(screen.queryByText(',')).not.toBeInTheDocument(); + }); + + it('renders nothing related to service settings when all are missing', () => { + const modifiedEndpoint = { + ...mockEndpoint, + service_settings: {}, + }; + render(); + + expect(screen.getByText('mistral-ai-1')).toBeInTheDocument(); + expect(screen.queryByText('model-xyz')).not.toBeInTheDocument(); + expect(screen.queryByText('max_input_tokens: 512')).not.toBeInTheDocument(); + expect(screen.queryByText('rate_limit: 1000')).not.toBeInTheDocument(); + }); + }); + + describe('with googleaistudio service', () => { + const mockEndpoint = { + model_id: 'google-ai-1', + service: 'googleaistudio', + service_settings: { + model_id: 'model-abc', + rate_limit: { + requests_per_minute: 500, + }, + }, + } as any; + + it('renders the component with endpoint details', () => { + render(); + + expect(screen.getByText('model-abc')).toBeInTheDocument(); + expect(screen.getByText('rate_limit: 500')).toBeInTheDocument(); + }); + + it('renders correctly when rate limit is missing', () => { + const modifiedEndpoint = { + ...mockEndpoint, + service_settings: { + model_id: 'model-abc', + }, + }; + + render(); + + expect(screen.getByText('model-abc')).toBeInTheDocument(); + expect(screen.queryByText('Rate limit:')).not.toBeInTheDocument(); + }); + }); +}); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx new file mode 100644 index 00000000000000..ae482b609346f0 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx @@ -0,0 +1,164 @@ +/* + * Copyright 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 { InferenceAPIConfigResponse } from '@kbn/ml-trained-models-utils'; +import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; +import { ServiceProviderKeys } from '../../types'; +import { ModelBadge } from './model_badge'; +import * as i18n from './translations'; + +export interface EndpointInfoProps { + endpoint: InferenceAPIConfigResponse; +} + +export const EndpointInfo: React.FC = ({ endpoint }) => { + return ( + + + {endpoint.model_id} + + + + + + ); +}; + +export const EndpointModelInfo: React.FC = ({ endpoint }) => { + const serviceSettings = endpoint.service_settings; + const modelId = + 'model_id' in serviceSettings + ? serviceSettings.model_id + : 'model' in serviceSettings + ? serviceSettings.model + : undefined; + + return ( + + {modelId && ( + + + + )} + + + {endpointModelAtrributes(endpoint)} + + + + ); +}; + +function endpointModelAtrributes(endpoint: InferenceAPIConfigResponse) { + switch (endpoint.service) { + case ServiceProviderKeys.elser: + case ServiceProviderKeys.elasticsearch: + return elasticsearchAttributes(endpoint); + case ServiceProviderKeys.cohere: + return cohereAttributes(endpoint); + case ServiceProviderKeys.hugging_face: + return huggingFaceAttributes(endpoint); + case ServiceProviderKeys.openai: + return openAIAttributes(endpoint); + case ServiceProviderKeys.azureaistudio: + return azureOpenAIStudioAttributes(endpoint); + case ServiceProviderKeys.azureopenai: + return azureOpenAIAttributes(endpoint); + case ServiceProviderKeys.mistral: + return mistralAttributes(endpoint); + case ServiceProviderKeys.googleaistudio: + return googleAIStudioAttributes(endpoint); + default: + return null; + } +} + +function elasticsearchAttributes(endpoint: InferenceAPIConfigResponse) { + const serviceSettings = endpoint.service_settings; + + const numAllocations = + 'num_allocations' in serviceSettings ? serviceSettings.num_allocations : undefined; + const numThreads = 'num_threads' in serviceSettings ? serviceSettings.num_threads : undefined; + + return `${numThreads ? i18n.THREADS(numThreads) : ''}${ + numThreads && numAllocations ? ' | ' : '' + }${numAllocations ? i18n.ALLOCATIONS(numAllocations) : ''}`; +} + +function cohereAttributes(endpoint: InferenceAPIConfigResponse) { + const serviceSettings = endpoint.service_settings; + const embeddingType = + 'embedding_type' in serviceSettings ? serviceSettings.embedding_type : undefined; + + const taskSettings = endpoint.task_settings; + const inputType = 'input_type' in taskSettings ? taskSettings.input_type : undefined; + const truncate = 'truncate' in taskSettings ? taskSettings.truncate : undefined; + + return [embeddingType, inputType, truncate && `truncate: ${truncate}`].filter(Boolean).join(', '); +} + +function huggingFaceAttributes(endpoint: InferenceAPIConfigResponse) { + const serviceSettings = endpoint.service_settings; + const url = 'url' in serviceSettings ? serviceSettings.url : null; + + return url; +} + +function openAIAttributes(endpoint: InferenceAPIConfigResponse) { + const serviceSettings = endpoint.service_settings; + const url = 'url' in serviceSettings ? serviceSettings.url : null; + + return url; +} + +function azureOpenAIStudioAttributes(endpoint: InferenceAPIConfigResponse) { + const serviceSettings = endpoint.service_settings; + const provider = 'provider' in serviceSettings ? serviceSettings.provider : undefined; + const endpointType = + 'endpoint_type' in serviceSettings ? serviceSettings.endpoint_type : undefined; + const target = 'target' in serviceSettings ? serviceSettings.target : undefined; + + return [provider, endpointType, target].filter(Boolean).join(', '); +} + +function azureOpenAIAttributes(endpoint: InferenceAPIConfigResponse) { + const serviceSettings = endpoint.service_settings; + + const resourceName = + 'resource_name' in serviceSettings ? serviceSettings.resource_name : undefined; + const deploymentId = + 'deployment_id' in serviceSettings ? serviceSettings.deployment_id : undefined; + const apiVersion = 'api_version' in serviceSettings ? serviceSettings.api_version : undefined; + + return [resourceName, deploymentId, apiVersion].filter(Boolean).join(', '); +} + +function mistralAttributes(endpoint: InferenceAPIConfigResponse) { + const serviceSettings = endpoint.service_settings; + + const maxInputTokens = + 'max_input_tokens' in serviceSettings ? serviceSettings.max_input_tokens : undefined; + const rateLimit = + 'rate_limit' in serviceSettings ? serviceSettings.rate_limit.requests_per_minute : undefined; + + return [ + maxInputTokens && `max_input_tokens: ${maxInputTokens}`, + rateLimit && `rate_limit: ${rateLimit}`, + ] + .filter(Boolean) + .join(', '); +} + +function googleAIStudioAttributes(endpoint: InferenceAPIConfigResponse) { + const serviceSettings = endpoint.service_settings; + + const rateLimit = + 'rate_limit' in serviceSettings ? serviceSettings.rate_limit.requests_per_minute : undefined; + + return rateLimit && `rate_limit: ${rateLimit}`; +} diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/model_badge.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/model_badge.tsx new file mode 100644 index 00000000000000..e4b241abd8199c --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/model_badge.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 React from 'react'; +import { EuiBadge, useEuiTheme } from '@elastic/eui'; + +interface ModelBadgeProps { + model?: string; +} + +export const ModelBadge: React.FC = ({ model }) => { + const { euiTheme } = useEuiTheme(); + + if (!model) return null; + + return {model}; +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/translations.ts b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/translations.ts new file mode 100644 index 00000000000000..52705999e8b444 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/translations.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const THREADS = (numThreads: number) => + i18n.translate('xpack.searchInferenceEndpoints.elasticsearch.threads', { + defaultMessage: 'Threads: {numThreads}', + values: { numThreads }, + }); + +export const ALLOCATIONS = (numAllocations: number) => + i18n.translate('xpack.searchInferenceEndpoints.elasticsearch.allocations', { + defaultMessage: 'Allocations: {numAllocations}', + values: { numAllocations }, + }); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.test.tsx new file mode 100644 index 00000000000000..a592569abb0aaa --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.test.tsx @@ -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 { render, screen } from '@testing-library/react'; +import React from 'react'; +import { ServiceProvider } from './service_provider'; +import { ServiceProviderKeys } from '../../types'; + +jest.mock('../../../../assets/images/providers/elastic.svg', () => 'elasticIcon.svg'); +jest.mock('../../../../assets/images/providers/hugging_face.svg', () => 'huggingFaceIcon.svg'); +jest.mock('../../../../assets/images/providers/cohere.svg', () => 'cohereIcon.svg'); +jest.mock('../../../../assets/images/providers/open_ai.svg', () => 'openAIIcon.svg'); + +describe('ServiceProvider component', () => { + it('renders Hugging Face icon and name when providerKey is hugging_face', () => { + render(); + expect(screen.getByText('Hugging Face')).toBeInTheDocument(); + const icon = screen.getByTestId('table-column-service-provider-hugging_face'); + expect(icon).toBeInTheDocument(); + }); + + it('renders Open AI icon and name when providerKey is openai', () => { + render(); + expect(screen.getByText('OpenAI')).toBeInTheDocument(); + const icon = screen.getByTestId('table-column-service-provider-openai'); + expect(icon).toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.tsx new file mode 100644 index 00000000000000..c4f09213158ce5 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.tsx @@ -0,0 +1,83 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiIcon } from '@elastic/eui'; +import React from 'react'; +import elasticIcon from '../../../../assets/images/providers/elastic.svg'; +import huggingFaceIcon from '../../../../assets/images/providers/hugging_face.svg'; +import cohereIcon from '../../../../assets/images/providers/cohere.svg'; +import openAIIcon from '../../../../assets/images/providers/open_ai.svg'; +import azureAIStudioIcon from '../../../../assets/images/providers/azure_ai_studio.svg'; +import azureOpenAIIcon from '../../../../assets/images/providers/azure_open_ai.svg'; +import googleAIStudioIcon from '../../../../assets/images/providers/google_ai_studio.svg'; +import mistralIcon from '../../../../assets/images/providers/mistral.svg'; +import { ServiceProviderKeys } from '../../types'; + +interface ServiceProviderProps { + providerKey: ServiceProviderKeys; +} + +interface ServiceProviderRecord { + icon: string; + name: string; +} + +export const SERVICE_PROVIDERS: Record = { + [ServiceProviderKeys.azureaistudio]: { + icon: azureAIStudioIcon, + name: 'Azure AI Studio', + }, + [ServiceProviderKeys.azureopenai]: { + icon: azureOpenAIIcon, + name: 'Azure OpenAI', + }, + [ServiceProviderKeys.cohere]: { + icon: cohereIcon, + name: 'Cohere', + }, + [ServiceProviderKeys.elasticsearch]: { + icon: elasticIcon, + name: 'Elasticsearch', + }, + [ServiceProviderKeys.elser]: { + icon: elasticIcon, + name: 'ELSER', + }, + [ServiceProviderKeys.googleaistudio]: { + icon: googleAIStudioIcon, + name: 'Google AI Studio', + }, + [ServiceProviderKeys.hugging_face]: { + icon: huggingFaceIcon, + name: 'Hugging Face', + }, + [ServiceProviderKeys.mistral]: { + icon: mistralIcon, + name: 'Mistral', + }, + [ServiceProviderKeys.openai]: { + icon: openAIIcon, + name: 'OpenAI', + }, +}; + +export const ServiceProvider: React.FC = ({ providerKey }) => { + const provider = SERVICE_PROVIDERS[providerKey]; + + return provider ? ( + <> + + {provider.name} + + ) : ( + {providerKey} + ); +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_task_type/task_type.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_task_type/task_type.test.tsx new file mode 100644 index 00000000000000..c81ce80a619e5c --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_task_type/task_type.test.tsx @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { render, screen } from '@testing-library/react'; +import React from 'react'; +import { TaskType } from './task_type'; +import { TaskTypes } from '../../types'; + +describe('TaskType component', () => { + it.each([ + [TaskTypes.completion, 'completion'], + [TaskTypes.sparse_embedding, 'sparse_embedding'], + [TaskTypes.text_embedding, 'text_embedding'], + ])('renders the task type badge for %s', (taskType, expected) => { + render(); + const badge = screen.getByTestId(`table-column-task-type-${taskType}`); + expect(badge).toBeInTheDocument(); + expect(badge).toHaveTextContent(expected); + }); + + it('returns null when type is null', () => { + const { container } = render(); + expect(container).toBeEmptyDOMElement(); + }); +}); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_task_type/task_type.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_task_type/task_type.tsx new file mode 100644 index 00000000000000..c2942559617486 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_task_type/task_type.tsx @@ -0,0 +1,26 @@ +/* + * Copyright 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 { EuiBadge } from '@elastic/eui'; +import React from 'react'; +import { TaskTypes } from '../../types'; + +interface TaskTypeProps { + type?: TaskTypes; +} + +export const TaskType: React.FC = ({ type }) => { + if (type != null) { + return ( + + {type} + + ); + } + + return null; +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/table_columns.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/table_columns.tsx new file mode 100644 index 00000000000000..caca4449e02fa9 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/table_columns.tsx @@ -0,0 +1,79 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { InferenceAPIConfigResponse } from '@kbn/ml-trained-models-utils'; +import React from 'react'; +import type { HorizontalAlignment } from '@elastic/eui'; +import * as i18n from '../../../../common/translations'; +import { useActions } from './render_actions/use_actions'; +import { EndpointInfo } from './render_endpoint/endpoint_info'; +import { ServiceProvider } from './render_service_provider/service_provider'; +import { TaskType } from './render_task_type/task_type'; +import { DeploymentStatus } from './render_deployment_status/deployment_status'; +import { DeploymentStatusEnum, ServiceProviderKeys, TaskTypes } from '../types'; + +export const useTableColumns = () => { + const { actions } = useActions(); + const deploymentAlignment: HorizontalAlignment = 'center'; + + const TABLE_COLUMNS = [ + { + field: 'deployment', + name: '', + render: (deployment: DeploymentStatusEnum) => { + if (deployment != null) { + return ; + } + + return null; + }, + width: '64px', + align: deploymentAlignment, + }, + { + field: 'endpoint', + name: i18n.ENDPOINT, + render: (endpoint: InferenceAPIConfigResponse) => { + if (endpoint != null) { + return ; + } + + return null; + }, + sortable: true, + }, + { + field: 'provider', + name: i18n.SERVICE_PROVIDER, + render: (provider: ServiceProviderKeys) => { + if (provider != null) { + return ; + } + + return null; + }, + sortable: false, + width: '265px', + }, + { + field: 'type', + name: i18n.TASK_TYPE, + render: (type: TaskTypes) => { + if (type != null) { + return ; + } + + return null; + }, + sortable: false, + width: '265px', + }, + actions, + ]; + + return TABLE_COLUMNS; +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/search/table_search.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/search/table_search.test.tsx new file mode 100644 index 00000000000000..b7d1dbcacfd71c --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/search/table_search.test.tsx @@ -0,0 +1,30 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { render, screen, fireEvent } from '@testing-library/react'; +import { TableSearch } from './table_search'; +import React from 'react'; + +describe('TableSearchComponent', () => { + const mockSetSearchKey = jest.fn(); + + it('renders correctly', () => { + render(); + expect(screen.getByRole('searchbox')).toBeInTheDocument(); + }); + + it('input value matches searchKey prop', () => { + render(); + expect(screen.getByRole('searchbox')).toHaveValue('test'); + }); + + it('calls setSearchKey on input change', () => { + render(); + fireEvent.change(screen.getByRole('searchbox'), { target: { value: 'new search' } }); + expect(mockSetSearchKey).toHaveBeenCalledWith('new search'); + }); +}); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/search/table_search.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/search/table_search.tsx new file mode 100644 index 00000000000000..086dcb9656d836 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/search/table_search.tsx @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiFieldSearch } from '@elastic/eui'; +import React, { useCallback } from 'react'; + +interface TableSearchComponentProps { + searchKey: string; + setSearchKey: React.Dispatch>; +} + +export const TableSearch: React.FC = ({ searchKey, setSearchKey }) => { + const onSearch = useCallback( + (newSearch) => { + const trimSearch = newSearch.trim(); + setSearchKey(trimSearch); + }, + [setSearchKey] + ); + + return ( + setSearchKey(e.target.value)} + onSearch={onSearch} + value={searchKey} + /> + ); +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/table_columns.ts b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/table_columns.ts deleted file mode 100644 index 39e957f9086842..00000000000000 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/table_columns.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { i18n } from '@kbn/i18n'; - -export const TABLE_COLUMNS = [ - { - field: 'endpoint', - name: i18n.translate('xpack.searchInferenceEndpoints.inferenceEndpoints.table.endpoint', { - defaultMessage: 'Endpoint', - }), - sortable: true, - width: '50%', - }, - { - field: 'provider', - name: i18n.translate('xpack.searchInferenceEndpoints.inferenceEndpoints.table.provider', { - defaultMessage: 'Provider', - }), - sortable: false, - width: '110px', - }, - { - field: 'type', - name: i18n.translate('xpack.searchInferenceEndpoints.inferenceEndpoints.table.type', { - defaultMessage: 'Type', - }), - sortable: false, - width: '90px', - }, -]; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx index 091ff8270dd633..91a2ea959fdec4 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx @@ -36,6 +36,12 @@ const inferenceEndpoints = [ }, ] as InferenceAPIConfigResponse[]; +jest.mock('../../hooks/use_delete_endpoint', () => ({ + useDeleteEndpoint: () => ({ + mutate: jest.fn().mockImplementation(() => Promise.resolve()), // Mock implementation of the mutate function + }), +})); + describe('When the tabular page is loaded', () => { beforeEach(() => { render(); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx index 2fb84dc4b99de1..ec19ad49ad477b 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx @@ -5,28 +5,87 @@ * 2.0. */ -import React, { useCallback } from 'react'; +import React, { useCallback, useEffect } from 'react'; +import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { InferenceAPIConfigResponse } from '@kbn/ml-trained-models-utils'; +import { extractErrorProperties } from '@kbn/ml-error-utils'; +import * as i18n from '../../../common/translations'; import { useTableData } from '../../hooks/use_table_data'; +import { FilterOptions } from './types'; + +import { DeploymentStatusEnum } from './types'; import { useAllInferenceEndpointsState } from '../../hooks/use_all_inference_endpoints_state'; import { EndpointsTable } from './endpoints_table'; -import { TABLE_COLUMNS } from './table_columns'; +import { ServiceProviderFilter } from './filter/service_provider_filter'; +import { TaskTypeFilter } from './filter/task_type_filter'; +import { TableSearch } from './search/table_search'; +import { useTableColumns } from './render_table_columns/table_columns'; +import { useKibana } from '../../hooks/use_kibana'; interface TabularPageProps { inferenceEndpoints: InferenceAPIConfigResponse[]; } export const TabularPage: React.FC = ({ inferenceEndpoints }) => { - const { queryParams, setQueryParams } = useAllInferenceEndpointsState(); + const [searchKey, setSearchKey] = React.useState(''); + const [deploymentStatus, setDeploymentStatus] = React.useState< + Record + >({}); + const { queryParams, setQueryParams, filterOptions, setFilterOptions } = + useAllInferenceEndpointsState(); + + const { + services: { ml, notifications }, + } = useKibana(); + + const onFilterChangedCallback = useCallback( + (newFilterOptions: Partial) => { + setFilterOptions(newFilterOptions); + }, + [setFilterOptions] + ); + + useEffect(() => { + const fetchDeploymentStatus = async () => { + const trainedModelStats = await ml?.mlApi?.trainedModels.getTrainedModelStats(); + if (trainedModelStats) { + const newDeploymentStatus = trainedModelStats?.trained_model_stats.reduce( + (acc, modelStat) => { + if (modelStat.model_id) { + acc[modelStat.model_id] = + modelStat?.deployment_stats?.state === 'started' + ? DeploymentStatusEnum.deployed + : DeploymentStatusEnum.notDeployed; + } + return acc; + }, + {} as Record + ); + setDeploymentStatus(newDeploymentStatus); + } + }; + + fetchDeploymentStatus().catch((error) => { + const errorObj = extractErrorProperties(error); + notifications?.toasts?.addError(errorObj.message ? new Error(error.message) : error, { + title: i18n.TRAINED_MODELS_STAT_GATHER_FAILED, + }); + }); + }, [ml, notifications]); const { paginatedSortedTableData, pagination, sorting } = useTableData( inferenceEndpoints, - queryParams + queryParams, + filterOptions, + searchKey, + deploymentStatus ); + const tableColumns = useTableColumns(); + const handleTableChange = useCallback( ({ page, sort }) => { const newQueryParams = { @@ -46,12 +105,32 @@ export const TabularPage: React.FC = ({ inferenceEndpoints }) ); return ( - + + + + + + + + + + + + + + + + + + ); }; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/types.ts b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/types.ts index 4afba1dda110ac..4a83ac401c89a0 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/types.ts +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/types.ts @@ -5,8 +5,28 @@ * 2.0. */ +import { InferenceAPIConfigResponse } from '@kbn/ml-trained-models-utils'; export const INFERENCE_ENDPOINTS_TABLE_PER_PAGE_VALUES = [10, 25, 50, 100]; +export enum ServiceProviderKeys { + azureopenai = 'azureopenai', + azureaistudio = 'azureaistudio', + cohere = 'cohere', + elasticsearch = 'elasticsearch', + elser = 'elser', + googleaistudio = 'googleaistudio', + hugging_face = 'hugging_face', + mistral = 'mistral', + openai = 'openai', +} + +export enum TaskTypes { + completion = 'completion', + rerank = 'rerank', + sparse_embedding = 'sparse_embedding', + text_embedding = 'text_embedding', +} + export enum SortFieldInferenceEndpoint { endpoint = 'endpoint', } @@ -25,7 +45,13 @@ export interface QueryParams extends SortingParams { perPage: number; } -export interface AlInferenceEndpointsTableState { +export interface FilterOptions { + provider: ServiceProviderKeys[]; + type: TaskTypes[]; +} + +export interface AllInferenceEndpointsTableState { + filterOptions: FilterOptions; queryParams: QueryParams; } @@ -34,8 +60,16 @@ export interface EuiBasicTableSortTypes { field: string; } +export enum DeploymentStatusEnum { + deployed = 'deployed', + notDeployed = 'not_deployed', + notDeployable = 'not_deployable', + notApplicable = 'not_applicable', +} + export interface InferenceEndpointUI { - endpoint: string; + deployment: DeploymentStatusEnum; + endpoint: InferenceAPIConfigResponse; provider: string; type: string; } diff --git a/x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/add_empty_prompt.tsx b/x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/add_empty_prompt.tsx index 69d74724016d6b..ee858f7a8b640b 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/add_empty_prompt.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/add_empty_prompt.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { EuiButton, - EuiEmptyPrompt, + EuiPageTemplate, EuiFlexGroup, EuiFlexItem, EuiImage, @@ -20,8 +20,7 @@ import * as i18n from '../../../common/translations'; import inferenceEndpoint from '../../assets/images/inference_endpoint.svg'; -import { ElserPrompt } from './elser_prompt'; -import { MultilingualE5Prompt } from './multilingual_e5_prompt'; +import { EndpointPrompt } from './endpoint_prompt'; import './add_empty_prompt.scss'; @@ -31,9 +30,12 @@ interface AddEmptyPromptProps { export const AddEmptyPrompt: React.FC = ({ setIsInferenceFlyoutVisible }) => { return ( - } title={

{i18n.INFERENCE_ENDPOINT_LABEL}

} body={ @@ -60,20 +62,41 @@ export const AddEmptyPrompt: React.FC = ({ setIsInferenceFl {i18n.START_WITH_PREPARED_ENDPOINTS_LABEL} - + - + setIsInferenceFlyoutVisible(true)} + > + {i18n.ADD_ENDPOINT_LABEL} + + } + /> - + setIsInferenceFlyoutVisible(true)} + > + {i18n.ADD_ENDPOINT_LABEL} + + } + /> } - color="plain" - hasBorder - icon={} /> ); }; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/elser_prompt.tsx b/x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/elser_prompt.tsx deleted file mode 100644 index db38b649fd66e3..00000000000000 --- a/x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/elser_prompt.tsx +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import { EuiButton, EuiCard } from '@elastic/eui'; - -import * as i18n from '../../../common/translations'; - -interface ElserPromptProps { - setIsInferenceFlyoutVisible: (value: boolean) => void; -} -export const ElserPrompt: React.FC = ({ setIsInferenceFlyoutVisible }) => ( - setIsInferenceFlyoutVisible(true)}> - {i18n.ADD_ENDPOINT_LABEL} - - } - /> -); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/multilingual_e5_prompt.tsx b/x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/endpoint_prompt.tsx similarity index 51% rename from x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/multilingual_e5_prompt.tsx rename to x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/endpoint_prompt.tsx index 69133909efcb2b..b10812ef2e6a32 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/multilingual_e5_prompt.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/empty_prompt/endpoint_prompt.tsx @@ -6,29 +6,28 @@ */ import React from 'react'; +import { EuiCard } from '@elastic/eui'; -import { EuiButton, EuiCard } from '@elastic/eui'; - -import * as i18n from '../../../common/translations'; - -interface MultilingualE5PromptProps { +interface EndpointPromptProps { setIsInferenceFlyoutVisible: (value: boolean) => void; + title: string; + description: string; + footer: React.ReactElement; } -export const MultilingualE5Prompt: React.FC = ({ +export const EndpointPrompt: React.FC = ({ setIsInferenceFlyoutVisible, + title, + description, + footer, }) => ( setIsInferenceFlyoutVisible(true)}> - {i18n.ADD_ENDPOINT_LABEL} - - } + title={title} + titleSize="xs" + description={description} + footer={footer} /> ); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/inference_endpoints_header.tsx b/x-pack/plugins/search_inference_endpoints/public/components/inference_endpoints_header.tsx index 8b551af28bd4c5..6956e470a9b770 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/inference_endpoints_header.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/inference_endpoints_header.tsx @@ -5,8 +5,8 @@ * 2.0. */ +import { EuiButton, EuiPageTemplate } from '@elastic/eui'; import React from 'react'; -import { EuiPageTemplate, EuiFlexGroup, EuiFlexItem, EuiButton } from '@elastic/eui'; import * as i18n from '../../common/translations'; interface InferenceEndpointsHeaderProps { @@ -21,21 +21,18 @@ export const InferenceEndpointsHeader: React.FC = data-test-subj="allInferenceEndpointsPage" pageTitle={i18n.INFERENCE_ENDPOINT_LABEL} description={i18n.MANAGE_INFERENCE_ENDPOINTS_LABEL} + bottomBorder={true} rightSideItems={[ - - - setIsInferenceFlyoutVisible(true)} - > - {i18n.ADD_ENDPOINT_LABEL} - - - , + setIsInferenceFlyoutVisible(true)} + > + {i18n.ADD_ENDPOINT_LABEL} + , ]} /> ); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/inference_flyout_wrapper_component.tsx b/x-pack/plugins/search_inference_endpoints/public/components/inference_flyout_wrapper_component.tsx index bf1343fe3db8ba..43dc7d7d1751c3 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/inference_flyout_wrapper_component.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/inference_flyout_wrapper_component.tsx @@ -47,9 +47,11 @@ export const InferenceFlyoutWrapperComponent: React.FC { @@ -87,17 +93,26 @@ export const InferenceFlyoutWrapperComponent: React.FC { setIsCreateInferenceApiLoading(true); - try { - await createInferenceEndpointMutation.mutateAsync({ inferenceId, taskType, modelConfig }); - setIsInferenceFlyoutVisible(!isInferenceFlyoutVisible); - } catch (error) { - const errorObj = extractErrorProperties(error); - setInferenceAddError(errorObj.message); - } finally { - setIsCreateInferenceApiLoading(false); - } + + createInferenceEndpointMutation + .mutateAsync({ inferenceId, taskType, modelConfig }) + .catch((error) => { + const errorObj = extractErrorProperties(error); + notifications?.toasts?.addError(errorObj.message ? new Error(error.message) : error, { + title: i18n.ENDPOINT_CREATION_FAILED, + }); + }) + .finally(() => { + setIsCreateInferenceApiLoading(false); + }); + setIsInferenceFlyoutVisible(!isInferenceFlyoutVisible); }, - [createInferenceEndpointMutation, isInferenceFlyoutVisible, setIsInferenceFlyoutVisible] + [ + createInferenceEndpointMutation, + isInferenceFlyoutVisible, + setIsInferenceFlyoutVisible, + notifications, + ] ); const onFlyoutClose = useCallback(() => { diff --git a/x-pack/plugins/search_inference_endpoints/public/hooks/translations.ts b/x-pack/plugins/search_inference_endpoints/public/hooks/translations.ts new file mode 100644 index 00000000000000..ee1dc26a548177 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/hooks/translations.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; +export * from '../../common/translations'; + +export const ENDPOINT_DELETION_FAILED = i18n.translate( + 'xpack.searchInferenceEndpoints.deleteEndpoint.endpointDeletionFailed', + { + defaultMessage: 'Endpoint deletion failed', + } +); + +export const DELETE_SUCCESS = i18n.translate( + 'xpack.searchInferenceEndpoints.deleteEndpoint.deleteSuccess', + { + defaultMessage: 'The inference endpoint has been deleted sucessfully.', + } +); diff --git a/x-pack/plugins/search_inference_endpoints/public/hooks/use_all_inference_endpoints_state.tsx b/x-pack/plugins/search_inference_endpoints/public/hooks/use_all_inference_endpoints_state.tsx index 4979cdf7994fc7..c2a0486578a9e1 100644 --- a/x-pack/plugins/search_inference_endpoints/public/hooks/use_all_inference_endpoints_state.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/hooks/use_all_inference_endpoints_state.tsx @@ -9,7 +9,8 @@ import { useCallback, useState } from 'react'; import type { QueryParams, - AlInferenceEndpointsTableState, + AllInferenceEndpointsTableState, + FilterOptions, } from '../components/all_inference_endpoints/types'; import { DEFAULT_INFERENCE_ENDPOINTS_TABLE_STATE } from '../components/all_inference_endpoints/constants'; @@ -17,13 +18,15 @@ import { DEFAULT_INFERENCE_ENDPOINTS_TABLE_STATE } from '../components/all_infer interface UseAllInferenceEndpointsStateReturn { queryParams: QueryParams; setQueryParams: (queryParam: Partial) => void; + filterOptions: FilterOptions; + setFilterOptions: (filterOptions: Partial) => void; } export function useAllInferenceEndpointsState(): UseAllInferenceEndpointsStateReturn { - const [tableState, setTableState] = useState( + const [tableState, setTableState] = useState( DEFAULT_INFERENCE_ENDPOINTS_TABLE_STATE ); - const setState = useCallback((state: AlInferenceEndpointsTableState) => { + const setState = useCallback((state: AllInferenceEndpointsTableState) => { setTableState(state); }, []); @@ -34,8 +37,19 @@ export function useAllInferenceEndpointsState(): UseAllInferenceEndpointsStateRe }, setQueryParams: (newQueryParams: Partial) => { setState({ + filterOptions: tableState.filterOptions, queryParams: { ...tableState.queryParams, ...newQueryParams }, }); }, + filterOptions: { + ...DEFAULT_INFERENCE_ENDPOINTS_TABLE_STATE.filterOptions, + ...tableState.filterOptions, + }, + setFilterOptions: (newFilterOptions: Partial) => { + setState({ + filterOptions: { ...tableState.filterOptions, ...newFilterOptions }, + queryParams: tableState.queryParams, + }); + }, }; } diff --git a/x-pack/plugins/search_inference_endpoints/public/hooks/use_delete_endpoint.test.tsx b/x-pack/plugins/search_inference_endpoints/public/hooks/use_delete_endpoint.test.tsx new file mode 100644 index 00000000000000..72e8dfe8418e21 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/hooks/use_delete_endpoint.test.tsx @@ -0,0 +1,72 @@ +/* + * Copyright 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 { renderHook } from '@testing-library/react-hooks'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { useKibana } from './use_kibana'; +import { useDeleteEndpoint } from './use_delete_endpoint'; +import * as i18n from './translations'; +import React from 'react'; + +jest.mock('./use_kibana'); + +const mockUseKibana = useKibana as jest.Mock; +const mockDelete = jest.fn(); +const mockAddSuccess = jest.fn(); +const mockAddError = jest.fn(); + +describe('useDeleteEndpoint', () => { + beforeEach(() => { + mockUseKibana.mockReturnValue({ + services: { + http: { + delete: mockDelete, + }, + notifications: { + toasts: { + addSuccess: mockAddSuccess, + addError: mockAddError, + }, + }, + }, + }); + mockDelete.mockResolvedValue({}); + }); + + const wrapper = ({ children }: { children: React.ReactNode }) => { + const queryClient = new QueryClient(); + return {children}; + }; + + it('should call delete endpoint and show success toast on success', async () => { + const { result, waitFor } = renderHook(() => useDeleteEndpoint(), { wrapper }); + + result.current.mutate({ type: 'text_embedding', id: 'in-1' }); + + await waitFor(() => + expect(mockDelete).toHaveBeenCalledWith( + '/internal/inference_endpoint/endpoints/text_embedding/in-1' + ) + ); + expect(mockAddSuccess).toHaveBeenCalledWith({ + title: i18n.DELETE_SUCCESS, + }); + }); + + it('should show error toast on failure', async () => { + const error = new Error('Deletion failed'); + mockDelete.mockRejectedValue(error); + const { result, waitFor } = renderHook(() => useDeleteEndpoint(), { wrapper }); + + result.current.mutate({ type: 'model', id: '123' }); + + await waitFor(() => expect(mockAddError).toHaveBeenCalled()); + expect(mockAddError).toHaveBeenCalledWith(error, { + title: i18n.ENDPOINT_DELETION_FAILED, + }); + }); +}); diff --git a/x-pack/plugins/search_inference_endpoints/public/hooks/use_delete_endpoint.tsx b/x-pack/plugins/search_inference_endpoints/public/hooks/use_delete_endpoint.tsx new file mode 100644 index 00000000000000..e5464703dcfe27 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/hooks/use_delete_endpoint.tsx @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { useKibana } from './use_kibana'; +import * as i18n from './translations'; + +import { INFERENCE_ENDPOINTS_QUERY_KEY } from '../../common/constants'; + +interface MutationArgs { + type: string; + id: string; +} + +export const useDeleteEndpoint = () => { + const queryClient = useQueryClient(); + const { services } = useKibana(); + const toasts = services.notifications?.toasts; + + return useMutation( + async ({ type, id }: MutationArgs) => { + await services.http.delete<{}>(`/internal/inference_endpoint/endpoints/${type}/${id}`); + }, + { + onSuccess: () => { + queryClient.invalidateQueries([INFERENCE_ENDPOINTS_QUERY_KEY]); + toasts?.addSuccess({ + title: i18n.DELETE_SUCCESS, + }); + }, + onError: (error: Error) => { + toasts?.addError(new Error(error?.message), { + title: i18n.ENDPOINT_DELETION_FAILED, + }); + }, + } + ); +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.test.tsx b/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.test.tsx index e0026cbffff98b..a8d0326a4c36fd 100644 --- a/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.test.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.test.tsx @@ -36,8 +36,8 @@ const inferenceEndpoints = [ }, { model_id: 'my-elser-model-05', - task_type: 'sparse_embedding', - service: 'elser', + task_type: 'text_embedding', + service: 'elasticsearch', service_settings: { num_allocations: 1, num_threads: 1, @@ -54,9 +54,23 @@ const queryParams = { sortOrder: 'desc', } as QueryParams; +const filterOptions = { + provider: ['elser', 'elasticsearch'], + type: ['sparse_embedding', 'text_embedding'], +} as any; + +const deploymentStatus = { + '.elser_model_2': 'deployed', + lang_ident_model_1: 'not_deployed', +} as any; + +const searchKey = 'my'; + describe('useTableData', () => { it('should return correct pagination', () => { - const { result } = renderHook(() => useTableData(inferenceEndpoints, queryParams)); + const { result } = renderHook(() => + useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey, deploymentStatus) + ); expect(result.current.pagination).toEqual({ pageIndex: 0, @@ -67,7 +81,9 @@ describe('useTableData', () => { }); it('should return correct sorting', () => { - const { result } = renderHook(() => useTableData(inferenceEndpoints, queryParams)); + const { result } = renderHook(() => + useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey, deploymentStatus) + ); expect(result.current.sorting).toEqual({ sort: { @@ -78,15 +94,54 @@ describe('useTableData', () => { }); it('should return correctly sorted data', () => { - const { result } = renderHook(() => useTableData(inferenceEndpoints, queryParams)); + const { result } = renderHook(() => + useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey, deploymentStatus) + ); const expectedSortedData = [...inferenceEndpoints].sort((a, b) => b.model_id.localeCompare(a.model_id) ); - const sortedEndpoints = result.current.sortedTableData.map((item) => item.endpoint); + const sortedEndpoints = result.current.sortedTableData.map((item) => item.endpoint.model_id); const expectedModelIds = expectedSortedData.map((item) => item.model_id); expect(sortedEndpoints).toEqual(expectedModelIds); }); + + it('should filter data based on provider and type from filterOptions', () => { + const filterOptions2 = { + provider: ['elser'], + type: ['text_embedding'], + } as any; + const { result } = renderHook(() => + useTableData(inferenceEndpoints, queryParams, filterOptions2, searchKey, deploymentStatus) + ); + + const filteredData = result.current.sortedTableData; + expect( + filteredData.every( + (endpoint) => + filterOptions.provider.includes(endpoint.provider) && + filterOptions.type.includes(endpoint.type) + ) + ).toBeTruthy(); + }); + + it('should filter data based on searchKey', () => { + const searchKey2 = 'model-05'; + const { result } = renderHook(() => + useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey2, deploymentStatus) + ); + const filteredData = result.current.sortedTableData; + expect(filteredData.every((item) => item.endpoint.model_id.includes(searchKey))).toBeTruthy(); + }); + + it('should update deployment status based on deploymentStatus object', () => { + const { result } = renderHook(() => + useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey, deploymentStatus) + ); + + const updatedData = result.current.sortedTableData; + expect(updatedData[0].deployment).toEqual('deployed'); + }); }); diff --git a/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.tsx b/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.tsx index 304c469e060933..54d865aad51903 100644 --- a/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.tsx @@ -11,11 +11,15 @@ import { InferenceAPIConfigResponse } from '@kbn/ml-trained-models-utils'; import { useMemo } from 'react'; import { DEFAULT_TABLE_LIMIT } from '../components/all_inference_endpoints/constants'; import { - InferenceEndpointUI, + FilterOptions, INFERENCE_ENDPOINTS_TABLE_PER_PAGE_VALUES, + InferenceEndpointUI, QueryParams, SortOrder, + ServiceProviderKeys, + TaskTypes, } from '../components/all_inference_endpoints/types'; +import { DeploymentStatusEnum } from '../components/all_inference_endpoints/types'; interface UseTableDataReturn { tableData: InferenceEndpointUI[]; @@ -27,15 +31,50 @@ interface UseTableDataReturn { export const useTableData = ( inferenceEndpoints: InferenceAPIConfigResponse[], - queryParams: QueryParams + queryParams: QueryParams, + filterOptions: FilterOptions, + searchKey: string, + deploymentStatus: Record ): UseTableDataReturn => { const tableData: InferenceEndpointUI[] = useMemo(() => { - return inferenceEndpoints.map((endpoint) => ({ - endpoint: endpoint.model_id, - provider: endpoint.service, - type: endpoint.task_type, - })); - }, [inferenceEndpoints]); + let filteredEndpoints = inferenceEndpoints; + + if (filterOptions.provider.length > 0) { + filteredEndpoints = filteredEndpoints.filter((endpoint) => + filterOptions.provider.includes(ServiceProviderKeys[endpoint.service]) + ); + } + + if (filterOptions.type.length > 0) { + filteredEndpoints = filteredEndpoints.filter((endpoint) => + filterOptions.type.includes(TaskTypes[endpoint.task_type]) + ); + } + + return filteredEndpoints + .filter((endpoint) => endpoint.model_id.includes(searchKey)) + .map((endpoint) => { + const isElasticService = + endpoint.service === ServiceProviderKeys.elasticsearch || + endpoint.service === ServiceProviderKeys.elser; + + let deploymentStatusValue = DeploymentStatusEnum.notApplicable; + if (isElasticService) { + const modelId = endpoint.service_settings?.model_id; + deploymentStatusValue = + modelId && deploymentStatus[modelId] !== undefined + ? deploymentStatus[modelId] + : DeploymentStatusEnum.notDeployable; + } + + return { + deployment: deploymentStatusValue, + endpoint, + provider: endpoint.service, + type: endpoint.task_type, + }; + }); + }, [inferenceEndpoints, searchKey, filterOptions, deploymentStatus]); const sortedTableData: InferenceEndpointUI[] = useMemo(() => { return [...tableData].sort((a, b) => { @@ -43,9 +82,9 @@ export const useTableData = ( const bValue = b[queryParams.sortField]; if (queryParams.sortOrder === SortOrder.asc) { - return aValue.localeCompare(bValue); + return aValue.model_id.localeCompare(bValue.model_id); } else { - return bValue.localeCompare(aValue); + return bValue.model_id.localeCompare(aValue.model_id); } }); }, [tableData, queryParams]); diff --git a/x-pack/plugins/search_inference_endpoints/server/lib/delete_inference_endpoint.test.ts b/x-pack/plugins/search_inference_endpoints/server/lib/delete_inference_endpoint.test.ts new file mode 100644 index 00000000000000..f6c9a5625230d7 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/server/lib/delete_inference_endpoint.test.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 { deleteInferenceEndpoint } from './delete_inference_endpoint'; + +describe('deleteInferenceEndpoint', () => { + let mockClient: any; + + beforeEach(() => { + mockClient = { + transport: { + request: jest.fn(), + }, + }; + }); + + it('should call the Elasticsearch client with the correct DELETE request', async () => { + const type = 'model'; + const id = 'model-id-123'; + + await deleteInferenceEndpoint(mockClient, type, id); + + expect(mockClient.transport.request).toHaveBeenCalledWith({ + method: 'DELETE', + path: `/_inference/${type}/${id}`, + }); + }); +}); diff --git a/x-pack/plugins/search_inference_endpoints/server/lib/delete_inference_endpoint.ts b/x-pack/plugins/search_inference_endpoints/server/lib/delete_inference_endpoint.ts new file mode 100644 index 00000000000000..c294820e4943e1 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/server/lib/delete_inference_endpoint.ts @@ -0,0 +1,19 @@ +/* + * Copyright 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 { ElasticsearchClient } from '@kbn/core/server'; + +export const deleteInferenceEndpoint = async ( + client: ElasticsearchClient, + type: string, + id: string +): Promise => { + return await client.transport.request({ + method: 'DELETE', + path: `/_inference/${type}/${id}`, + }); +}; diff --git a/x-pack/plugins/search_inference_endpoints/server/routes.ts b/x-pack/plugins/search_inference_endpoints/server/routes.ts index d5f010b902c523..7456888aabb19f 100644 --- a/x-pack/plugins/search_inference_endpoints/server/routes.ts +++ b/x-pack/plugins/search_inference_endpoints/server/routes.ts @@ -6,10 +6,12 @@ */ import { IRouter } from '@kbn/core/server'; +import { schema } from '@kbn/config-schema'; import type { Logger } from '@kbn/logging'; import { fetchInferenceEndpoints } from './lib/fetch_inference_endpoints'; import { APIRoutes } from './types'; import { errorHandler } from './utils/error_handler'; +import { deleteInferenceEndpoint } from './lib/delete_inference_endpoint'; export function defineRoutes({ logger, router }: { logger: Logger; router: IRouter }) { router.get( @@ -32,4 +34,27 @@ export function defineRoutes({ logger, router }: { logger: Logger; router: IRout }); }) ); + + router.delete( + { + path: APIRoutes.DELETE_INFERENCE_ENDPOINT, + validate: { + params: schema.object({ + type: schema.string(), + id: schema.string(), + }), + }, + }, + errorHandler(logger)(async (context, request, response) => { + const { + client: { asCurrentUser }, + } = (await context.core).elasticsearch; + + const { type, id } = request.params; + + await deleteInferenceEndpoint(asCurrentUser, type, id); + + return response.ok(); + }) + ); } From 9657aa59ef2680ec558fcfac8dc1bc6fb164eeb6 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 9 Jul 2024 16:21:54 +0100 Subject: [PATCH 077/103] skip flaky suite (#170593) --- x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts index 005747c79c7fe0..f06666ed1fd887 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts @@ -104,7 +104,8 @@ describe.skip('ALL - Add Integration', { tags: ['@ess', '@serverless'] }, () => cy.contains(`version: ${oldVersion}`).should('not.exist'); }); }); - describe('Add integration to policy', () => { + // FLAKY: https://github.com/elastic/kibana/issues/170593 + describe.skip('Add integration to policy', () => { const [integrationName, policyName] = generateRandomStringName(2); let policyId: string; beforeEach(() => { From f2fb57f2fadd39b414c5e6105c0dd403ef3d2558 Mon Sep 17 00:00:00 2001 From: Rodney Norris Date: Tue, 9 Jul 2024 10:24:27 -0500 Subject: [PATCH 078/103] [Search] Homepage header links (#187419) ## Summary - Added console quickstart link to search homepage - Added Endpoints & API keys link to Homepage header ### Screenshots #### ES3 ![image](https://github.com/elastic/kibana/assets/1972968/41a2a9a8-1290-4f2e-b9c4-f8d88f4c5226) ![image](https://github.com/elastic/kibana/assets/1972968/bbdab0b9-e3be-4e1d-be74-fdba02f74082) ![image](https://github.com/elastic/kibana/assets/1972968/7c5c7dd7-1c13-424c-9102-accd5a7314b6) #### Stack ![image](https://github.com/elastic/kibana/assets/1972968/e926b747-8219-431e-870c-3151f74b3c55) ### Testing To test these changes you can enable the feature flag with the Kibana Dev Console using the following command: ``` POST kbn:/internal/kibana/settings/searchHomepage:homepageEnabled {"value": true} ``` You can then disable the feature flag with the following command: ``` DELETE kbn:/internal/kibana/settings/searchHomepage:homepageEnabled ``` ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [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 - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine --- .../public/components/console_link_button.tsx | 45 +++++++++++++++++++ .../components/endpoints_header_action.tsx | 45 +++++++++++++++++++ .../public/components/search_homepage.tsx | 2 +- .../components/search_homepage_body.tsx | 21 ++++----- .../components/search_homepage_header.tsx | 10 ++++- .../public/components/stack_app.tsx | 2 +- x-pack/plugins/search_homepage/tsconfig.json | 1 + .../page_objects/svl_search_homepage.ts | 42 +++++++++++++++++ .../search/config.feature_flags.ts | 4 +- .../functional/test_suites/search/config.ts | 4 ++ .../test_suites/search/search_homepage.ts | 34 ++++++++++++-- 11 files changed, 189 insertions(+), 21 deletions(-) create mode 100644 x-pack/plugins/search_homepage/public/components/console_link_button.tsx create mode 100644 x-pack/plugins/search_homepage/public/components/endpoints_header_action.tsx diff --git a/x-pack/plugins/search_homepage/public/components/console_link_button.tsx b/x-pack/plugins/search_homepage/public/components/console_link_button.tsx new file mode 100644 index 00000000000000..79511788b2f95c --- /dev/null +++ b/x-pack/plugins/search_homepage/public/components/console_link_button.tsx @@ -0,0 +1,45 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React, { useCallback } from 'react'; +import { EuiButtonEmpty } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import type { ConsolePluginStart } from '@kbn/console-plugin/public'; + +import { useKibana } from '../hooks/use_kibana'; + +const canOpenConsole = (plugin?: ConsolePluginStart): boolean => { + if (!plugin) return false; + if (!plugin.isEmbeddedConsoleAvailable || !plugin.openEmbeddedConsole) return false; + return plugin.isEmbeddedConsoleAvailable(); +}; + +export const ConsoleLinkButton = () => { + const { + services: { console: consolePlugin }, + } = useKibana(); + const openConsole = useCallback(() => { + if (!canOpenConsole(consolePlugin)) return; + + consolePlugin!.openEmbeddedConsole!(); + }, [consolePlugin]); + if (consolePlugin === undefined || consolePlugin.openEmbeddedConsole === undefined) return null; + + return ( + + + + ); +}; diff --git a/x-pack/plugins/search_homepage/public/components/endpoints_header_action.tsx b/x-pack/plugins/search_homepage/public/components/endpoints_header_action.tsx new file mode 100644 index 00000000000000..0cc3ae6dea48fb --- /dev/null +++ b/x-pack/plugins/search_homepage/public/components/endpoints_header_action.tsx @@ -0,0 +1,45 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import { EuiButtonEmpty, EuiFlexGroup, EuiFlyout, EuiHeaderLinks } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { + KibanaWiredConnectionDetailsProvider, + ConnectionDetailsFlyoutContent, +} from '@kbn/cloud/connection_details'; + +export const EndpointsHeaderAction = () => { + const [open, setOpen] = React.useState(false); + + return ( + <> + + + setOpen(true)} + data-test-subj="searchHomepageEndpointsHeaderActionEndpointsApiKeysButton" + data-telemetry-id="searchHomepageEndpointsHeaderActionEndpointsApiKeysButton" + > + + + + + {open && ( + setOpen(false)} size="s"> + + + + + )} + + ); +}; diff --git a/x-pack/plugins/search_homepage/public/components/search_homepage.tsx b/x-pack/plugins/search_homepage/public/components/search_homepage.tsx index 7af02cbcf3275d..76f34caad0a5dd 100644 --- a/x-pack/plugins/search_homepage/public/components/search_homepage.tsx +++ b/x-pack/plugins/search_homepage/public/components/search_homepage.tsx @@ -24,7 +24,7 @@ export const SearchHomepagePage = () => { return ( - + {embeddableConsole} diff --git a/x-pack/plugins/search_homepage/public/components/search_homepage_body.tsx b/x-pack/plugins/search_homepage/public/components/search_homepage_body.tsx index 808393594e7d8c..f27da234687110 100644 --- a/x-pack/plugins/search_homepage/public/components/search_homepage_body.tsx +++ b/x-pack/plugins/search_homepage/public/components/search_homepage_body.tsx @@ -6,19 +6,16 @@ */ import React from 'react'; import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; +import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; + +import { ConsoleLinkButton } from './console_link_button'; export const SearchHomepageBody = () => ( - -
+ + + + + + ); diff --git a/x-pack/plugins/search_homepage/public/components/search_homepage_header.tsx b/x-pack/plugins/search_homepage/public/components/search_homepage_header.tsx index 941655d67cdabb..3ea294bb1138c1 100644 --- a/x-pack/plugins/search_homepage/public/components/search_homepage_header.tsx +++ b/x-pack/plugins/search_homepage/public/components/search_homepage_header.tsx @@ -8,7 +8,13 @@ import React from 'react'; import { EuiPageTemplate, EuiTitle } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -export const SearchHomepageHeader = () => ( +import { EndpointsHeaderAction } from './endpoints_header_action'; + +export interface SearchHomepageHeaderProps { + showEndpointsAPIKeys: boolean; +} + +export const SearchHomepageHeader = ({ showEndpointsAPIKeys }: SearchHomepageHeaderProps) => ( @@ -21,6 +27,6 @@ export const SearchHomepageHeader = () => ( } data-test-subj="search-homepage-header" - rightSideItems={[]} + rightSideItems={[...(showEndpointsAPIKeys ? [] : [])]} /> ); diff --git a/x-pack/plugins/search_homepage/public/components/stack_app.tsx b/x-pack/plugins/search_homepage/public/components/stack_app.tsx index ca18ac7112c091..f570d81e97c3ab 100644 --- a/x-pack/plugins/search_homepage/public/components/stack_app.tsx +++ b/x-pack/plugins/search_homepage/public/components/stack_app.tsx @@ -12,7 +12,7 @@ import { SearchHomepageHeader } from './search_homepage_header'; export const App: React.FC = () => { return ( <> - + ); diff --git a/x-pack/plugins/search_homepage/tsconfig.json b/x-pack/plugins/search_homepage/tsconfig.json index 9f084b32f7d3b3..91de974fd29145 100644 --- a/x-pack/plugins/search_homepage/tsconfig.json +++ b/x-pack/plugins/search_homepage/tsconfig.json @@ -23,6 +23,7 @@ "@kbn/share-plugin", "@kbn/usage-collection-plugin", "@kbn/config-schema", + "@kbn/cloud", ], "exclude": [ "target/**/*", diff --git a/x-pack/test_serverless/functional/page_objects/svl_search_homepage.ts b/x-pack/test_serverless/functional/page_objects/svl_search_homepage.ts index eeb1b6de731f9d..44bdd417330a34 100644 --- a/x-pack/test_serverless/functional/page_objects/svl_search_homepage.ts +++ b/x-pack/test_serverless/functional/page_objects/svl_search_homepage.ts @@ -22,5 +22,47 @@ export function SvlSearchHomePageProvider({ getService }: FtrProviderContext) { async expectHomepageHeader() { await testSubjects.existOrFail('search-homepage-header', { timeout: 2000 }); }, + async expectConsoleLinkExists() { + await testSubjects.existOrFail('searchHomepageEmbeddedConsoleButton'); + }, + async clickConsoleLink() { + await testSubjects.click('searchHomepageEmbeddedConsoleButton'); + }, + async expectEndpointsLinkExists() { + await testSubjects.existOrFail('searchHomepageEndpointsHeaderActionEndpointsApiKeysButton'); + }, + async clickEndpointsLink() { + await testSubjects.click('searchHomepageEndpointsHeaderActionEndpointsApiKeysButton'); + }, + async expectConnectionDetailsFlyoutToBeOpen() { + await testSubjects.existOrFail('connectionDetailsModalTitle'); + }, + async closeConnectionDetailsFlyout() { + await testSubjects.existOrFail('euiFlyoutCloseButton'); + await testSubjects.click('euiFlyoutCloseButton'); + }, + async expectEndpointsTabIsAvailable() { + await testSubjects.existOrFail('connectionDetailsTabBtn-endpoints'); + await testSubjects.click('connectionDetailsTabBtn-endpoints'); + await testSubjects.existOrFail('connectionDetailsEsUrl'); + await testSubjects.existOrFail('connectionDetailsCloudIdSwitch'); + }, + async expectAPIKeyTabIsAvailable() { + await testSubjects.existOrFail('connectionDetailsTabBtn-apiKeys'); + await testSubjects.click('connectionDetailsTabBtn-apiKeys'); + await testSubjects.existOrFail('connectionDetailsApiKeyNameInput'); + await testSubjects.existOrFail('connectionDetailsApiKeySubmitBtn'); + }, + async createApiKeyInFlyout(keyName: string) { + await testSubjects.existOrFail('connectionDetailsApiKeyNameInput'); + await testSubjects.existOrFail('connectionDetailsApiKeySubmitBtn'); + await testSubjects.setValue('connectionDetailsApiKeyNameInput', keyName); + await testSubjects.click('connectionDetailsApiKeySubmitBtn'); + await testSubjects.existOrFail('connectionDetailsApiKeySuccessForm'); + await testSubjects.existOrFail('connectionDetailsApiKeyValueRow'); + expect(await testSubjects.getVisibleText('connectionDetailsApiKeySuccessForm')).contain( + keyName + ); + }, }; } diff --git a/x-pack/test_serverless/functional/test_suites/search/config.feature_flags.ts b/x-pack/test_serverless/functional/test_suites/search/config.feature_flags.ts index f05b5975c90cba..c4b29fdfb443d6 100644 --- a/x-pack/test_serverless/functional/test_suites/search/config.feature_flags.ts +++ b/x-pack/test_serverless/functional/test_suites/search/config.feature_flags.ts @@ -19,9 +19,11 @@ export default createTestConfig({ suiteTags: { exclude: ['skipSvlSearch'] }, // add feature flags kbnServerArgs: [ - `--xpack.security.roleManagementEnabled=true`, + `--xpack.cloud.id='ES3_FTR_TESTS:ZmFrZS1kb21haW4uY2xkLmVsc3RjLmNvJGZha2Vwcm9qZWN0aWQuZXMkZmFrZXByb2plY3RpZC5rYg=='`, + `--xpack.cloud.serverless.project_id='fakeprojectid'`, `--xpack.cloud.base_url='https://cloud.elastic.co'`, `--xpack.cloud.organization_url='/account/members'`, + `--xpack.security.roleManagementEnabled=true`, ], // load tests in the index file testFiles: [require.resolve('./index.feature_flags.ts')], diff --git a/x-pack/test_serverless/functional/test_suites/search/config.ts b/x-pack/test_serverless/functional/test_suites/search/config.ts index c2171c532bf23e..6853e75d987b84 100644 --- a/x-pack/test_serverless/functional/test_suites/search/config.ts +++ b/x-pack/test_serverless/functional/test_suites/search/config.ts @@ -18,4 +18,8 @@ export default createTestConfig({ // include settings from project controller // https://github.com/elastic/project-controller/blob/main/internal/project/esproject/config/elasticsearch.yml esServerArgs: [], + kbnServerArgs: [ + `--xpack.cloud.id='ES3_FTR_TESTS:ZmFrZS1kb21haW4uY2xkLmVsc3RjLmNvJGZha2Vwcm9qZWN0aWQuZXMkZmFrZXByb2plY3RpZC5rYg=='`, + `--xpack.cloud.serverless.project_id='fakeprojectid'`, + ], }); diff --git a/x-pack/test_serverless/functional/test_suites/search/search_homepage.ts b/x-pack/test_serverless/functional/test_suites/search/search_homepage.ts index 1f627921d1592c..93af4de797cfab 100644 --- a/x-pack/test_serverless/functional/test_suites/search/search_homepage.ts +++ b/x-pack/test_serverless/functional/test_suites/search/search_homepage.ts @@ -36,22 +36,48 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('has search homepage with Home sidenav', async () => { - pageObjects.svlSearchHomePage.expectToBeOnHomepage(); - pageObjects.svlSearchHomePage.expectHomepageHeader(); + await pageObjects.svlSearchHomePage.expectToBeOnHomepage(); + await pageObjects.svlSearchHomePage.expectHomepageHeader(); // Navigate to another page await pageObjects.svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'serverlessConnectors', }); - pageObjects.svlSearchHomePage.expectToNotBeOnHomepage(); + await pageObjects.svlSearchHomePage.expectToNotBeOnHomepage(); // Click Home in Side nav await pageObjects.svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'searchHomepage', }); - pageObjects.svlSearchHomePage.expectToBeOnHomepage(); + await pageObjects.svlSearchHomePage.expectToBeOnHomepage(); }); it('has embedded dev console', async () => { await testHasEmbeddedConsole(pageObjects); }); + + it('has console quickstart link on page', async () => { + await pageObjects.svlSearchHomePage.expectConsoleLinkExists(); + await pageObjects.svlCommonNavigation.devConsole.expectEmbeddedConsoleToBeClosed(); + await pageObjects.svlSearchHomePage.clickConsoleLink(); + await pageObjects.svlCommonNavigation.devConsole.expectEmbeddedConsoleToBeOpen(); + await pageObjects.svlCommonNavigation.devConsole.clickEmbeddedConsoleControlBar(); + await pageObjects.svlCommonNavigation.devConsole.expectEmbeddedConsoleToBeClosed(); + }); + + it('has endpoints link and flyout', async () => { + await pageObjects.svlSearchHomePage.expectEndpointsLinkExists(); + await pageObjects.svlSearchHomePage.clickEndpointsLink(); + await pageObjects.svlSearchHomePage.expectConnectionDetailsFlyoutToBeOpen(); + await pageObjects.svlSearchHomePage.expectEndpointsTabIsAvailable(); + await pageObjects.svlSearchHomePage.closeConnectionDetailsFlyout(); + }); + + it('can create an API key', async () => { + await pageObjects.svlSearchHomePage.expectEndpointsLinkExists(); + await pageObjects.svlSearchHomePage.clickEndpointsLink(); + await pageObjects.svlSearchHomePage.expectConnectionDetailsFlyoutToBeOpen(); + await pageObjects.svlSearchHomePage.expectAPIKeyTabIsAvailable(); + await pageObjects.svlSearchHomePage.createApiKeyInFlyout('ftr-test-key'); + await pageObjects.svlSearchHomePage.closeConnectionDetailsFlyout(); + }); }); } From 3812c9028272fbc97148cc24f5f18bc12c045976 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Tue, 9 Jul 2024 16:32:01 +0100 Subject: [PATCH 079/103] skip flaky suite (#187456) --- .../components/connectors/resilient/use_get_severity.test.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/cases/public/components/connectors/resilient/use_get_severity.test.tsx b/x-pack/plugins/cases/public/components/connectors/resilient/use_get_severity.test.tsx index 964daacb4a6bfe..bf2ba2a4ece3c0 100644 --- a/x-pack/plugins/cases/public/components/connectors/resilient/use_get_severity.test.tsx +++ b/x-pack/plugins/cases/public/components/connectors/resilient/use_get_severity.test.tsx @@ -19,7 +19,8 @@ jest.mock('./api'); const useKibanaMock = useKibana as jest.Mocked; -describe('useGetSeverity', () => { +// FLAKY: https://github.com/elastic/kibana/issues/187456 +describe.skip('useGetSeverity', () => { const { http } = useKibanaMock().services; let appMockRender: AppMockRenderer; From a3f7c7a8817640f14ba570c8d225704aa998d4ea Mon Sep 17 00:00:00 2001 From: Pierre Gayvallet Date: Tue, 9 Jul 2024 17:56:58 +0200 Subject: [PATCH 080/103] Add @kbn/crypto-browser to ui-shared-deps (#187740) ## Summary Fix https://github.com/elastic/kibana/issues/135718 --- packages/kbn-crypto-browser/BUILD.bazel | 32 +++++++++++++++++++ packages/kbn-ui-shared-deps-src/BUILD.bazel | 1 + .../kbn-ui-shared-deps-src/src/definitions.js | 1 + packages/kbn-ui-shared-deps-src/src/entry.js | 1 + 4 files changed, 35 insertions(+) create mode 100644 packages/kbn-crypto-browser/BUILD.bazel diff --git a/packages/kbn-crypto-browser/BUILD.bazel b/packages/kbn-crypto-browser/BUILD.bazel new file mode 100644 index 00000000000000..c959d62ffde685 --- /dev/null +++ b/packages/kbn-crypto-browser/BUILD.bazel @@ -0,0 +1,32 @@ +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") + +SRCS = glob( + [ + "**/*.ts", + ], + exclude = [ + "**/*.config.js", + "**/*.mock.*", + "**/*.test.*", + "**/*.stories.*", + "**/__snapshots__/**", + "**/integration_tests/**", + "**/mocks/**", + "**/scripts/**", + "**/storybook/**", + "**/test_fixtures/**", + "**/test_helpers/**", + ], +) + +BUNDLER_DEPS = [ + "@npm//tslib", +] + +js_library( + name = "kbn-crypto-browser", + package_name = "@kbn/crypto-browser", + srcs = ["package.json"] + SRCS, + deps = BUNDLER_DEPS, + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-ui-shared-deps-src/BUILD.bazel b/packages/kbn-ui-shared-deps-src/BUILD.bazel index 3d7dd870200475..cd723a8ed6401b 100644 --- a/packages/kbn-ui-shared-deps-src/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-src/BUILD.bazel @@ -28,6 +28,7 @@ webpack_cli( "//packages/kbn-monaco", "//packages/kbn-datemath", "//packages/kbn-analytics", + "//packages/kbn-crypto-browser", "//packages/kbn-es-query", "//packages/kbn-search-errors", "//packages/kbn-std", diff --git a/packages/kbn-ui-shared-deps-src/src/definitions.js b/packages/kbn-ui-shared-deps-src/src/definitions.js index b2b38e131fb804..98c152403dcff6 100644 --- a/packages/kbn-ui-shared-deps-src/src/definitions.js +++ b/packages/kbn-ui-shared-deps-src/src/definitions.js @@ -88,6 +88,7 @@ const externals = { tslib: '__kbnSharedDeps__.TsLib', uuid: '__kbnSharedDeps__.Uuid', '@kbn/analytics': '__kbnSharedDeps__.KbnAnalytics', + '@kbn/crypto-browser': '__kbnSharedDeps__.KbnCryptoBrowser', '@kbn/es-query': '__kbnSharedDeps__.KbnEsQuery', '@kbn/search-errors': '__kbnSharedDeps__.KbnSearchErrors', '@kbn/std': '__kbnSharedDeps__.KbnStd', diff --git a/packages/kbn-ui-shared-deps-src/src/entry.js b/packages/kbn-ui-shared-deps-src/src/entry.js index 1d0e88ef0efd83..a9d318721814be 100644 --- a/packages/kbn-ui-shared-deps-src/src/entry.js +++ b/packages/kbn-ui-shared-deps-src/src/entry.js @@ -60,6 +60,7 @@ export const Fflate = { unzlibSync, strFromU8 }; export const TsLib = require('tslib'); export const Uuid = require('uuid'); export const KbnAnalytics = require('@kbn/analytics'); +export const KbnCryptoBrowser = require('@kbn/crypto-browser'); export const KbnEsQuery = require('@kbn/es-query'); export const KbnSearchErrors = require('@kbn/search-errors'); export const KbnStd = require('@kbn/std'); From 7c5cf9c76e35925cba7e3bd57cc01d1fffae81a4 Mon Sep 17 00:00:00 2001 From: Carlos Crespo Date: Tue, 9 Jul 2024 17:59:17 +0200 Subject: [PATCH 081/103] [Infra] Fix date picker with relative date range (#187739) fixes [187735](https://github.com/elastic/kibana/issues/187735) ## Summary This PR fixes a problem with the Anomaly Detection component's date picker when dealing with relative dates https://github.com/elastic/kibana/assets/2767137/2f007a3e-1ee0-44ca-b4ae-8cdb56fbe06c https://github.com/elastic/kibana/assets/2767137/c3b036df-e73c-48d5-a27a-6ed75ffbc76a ### How to test The easiest way is to connect to an oblt cluster and create an ML job - Navigate to `Infrastructure` - Click on `Anomaly Detection` menu at the top of the page and create a ML job for hosts - Follow the same steps from the screen recordings above. --- .../anomalies_table/anomalies_table.tsx | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/x-pack/plugins/observability_solution/infra/public/components/ml/anomaly_detection/anomalies_table/anomalies_table.tsx b/x-pack/plugins/observability_solution/infra/public/components/ml/anomaly_detection/anomalies_table/anomalies_table.tsx index b38af534df6e7e..482d4c7294c5e5 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/ml/anomaly_detection/anomalies_table/anomalies_table.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/ml/anomaly_detection/anomalies_table/anomalies_table.tsx @@ -221,9 +221,9 @@ export const AnomaliesTable = ({ }: Props) => { const [search, setSearch] = useState(''); const trackMetric = useUiTracker({ app: 'infra_metrics' }); - const [timeRange, setTimeRange] = useState<{ start: number; end: number }>({ - start: datemathToEpochMillis(dateRange.from) || 0, - end: datemathToEpochMillis(dateRange.to, 'up') || 0, + const [timeRange, setTimeRange] = useState<{ start: string; end: string }>({ + start: dateRange.from, + end: dateRange.to, }); const { sorting, setSorting } = useSorting({ field: 'startTime', @@ -256,8 +256,8 @@ export const AnomaliesTable = ({ ({ isInvalid, start: startChange, end: endChange }: OnTimeChangeProps) => { if (!isInvalid) { setTimeRange({ - start: datemathToEpochMillis(startChange)!, - end: datemathToEpochMillis(endChange, 'up')!, + start: startChange, + end: endChange, }); } }, @@ -265,14 +265,17 @@ export const AnomaliesTable = ({ ); const getTimeRange = useCallback(() => { - if (hideDatePicker) { - return { - start: datemathToEpochMillis(dateRange.from) || 0, - end: datemathToEpochMillis(dateRange.to, 'up') || 0, - }; - } else { - return timeRange; - } + const { start, end } = hideDatePicker + ? { + start: dateRange.from, + end: dateRange.to, + } + : timeRange; + + return { + start: datemathToEpochMillis(start) || 0, + end: datemathToEpochMillis(end, 'up') || 0, + }; }, [dateRange.from, dateRange.to, hideDatePicker, timeRange]); const anomalyParams = useMemo(() => { @@ -483,8 +486,8 @@ export const AnomaliesTable = ({ {!hideDatePicker && ( Date: Tue, 9 Jul 2024 11:40:27 -0500 Subject: [PATCH 082/103] [Security solution] Entity previews flyout copy refresh (#187430) ## Summary Copy update per docs team's review [here](https://github.com/elastic/security-docs/issues/5484#issuecomment-2197358502): > Host preview > preview banner: `Preview host details` > link in the footer: `Show full host details` > > User preview > preview banner: `Preview user details` > link in the footer: `Show full user details` ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) --- .../document_details/right/components/host_entity_overview.tsx | 2 +- .../document_details/right/components/user_entity_overview.tsx | 2 +- .../public/flyout/entity_details/host_preview/footer.tsx | 2 +- .../public/flyout/entity_details/user_preview/footer.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx index e48b5f8fd4f9d8..39772a9b61c36c 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx @@ -67,7 +67,7 @@ export interface HostEntityOverviewProps { export const HOST_PREVIEW_BANNER = { title: i18n.translate('xpack.securitySolution.flyout.right.host.hostPreviewTitle', { - defaultMessage: 'Preview host', + defaultMessage: 'Preview host details', }), backgroundColor: 'warning', textColor: 'warning', diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx index 47938e5212e7cf..300c31a7f6ba17 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx @@ -68,7 +68,7 @@ export interface UserEntityOverviewProps { export const USER_PREVIEW_BANNER = { title: i18n.translate('xpack.securitySolution.flyout.right.user.userPreviewTitle', { - defaultMessage: 'Preview user', + defaultMessage: 'Preview user details', }), backgroundColor: 'warning', textColor: 'warning', diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/host_preview/footer.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/host_preview/footer.tsx index 4632c20e517afa..e550da28b532ad 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/host_preview/footer.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/host_preview/footer.tsx @@ -47,7 +47,7 @@ export const HostPreviewPanelFooter = ({ {i18n.translate('xpack.securitySolution.flyout.host.preview.viewDetailsLabel', { - defaultMessage: 'Open host details flyout', + defaultMessage: 'Show full host details', })} diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/user_preview/footer.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/user_preview/footer.tsx index 5fb1b73e1683b1..7f55feb7a347c1 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/user_preview/footer.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/user_preview/footer.tsx @@ -47,7 +47,7 @@ export const UserPreviewPanelFooter = ({ {i18n.translate('xpack.securitySolution.flyout.user.preview.viewDetailsLabel', { - defaultMessage: 'Open user details flyout', + defaultMessage: 'Show full user details', })} From ee62412c7b886065b677d14482c8e0be63fbde5a Mon Sep 17 00:00:00 2001 From: Achyut Jhunjhunwala Date: Tue, 9 Jul 2024 18:56:38 +0200 Subject: [PATCH 083/103] [Dataset Quality] Fix flaky integration tests [WIP] (#187851) ## Summary This PR closes https://github.com/elastic/kibana/issues/187589 closes https://github.com/elastic/kibana/issues/187566 ## Results - Tested locally against MKI and the tests are now passing :heavy_check_mark: - Tested locally for Stateful :heavy_check_mark: - Tested locally for Serverless :heavy_check_mark: --- .../dataset_quality/dataset_quality_flyout.ts | 17 +++---- .../page_objects/dataset_quality.ts | 46 +++---------------- .../dataset_quality/dataset_quality_flyout.ts | 19 ++++---- 3 files changed, 25 insertions(+), 57 deletions(-) diff --git a/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts b/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts index 6b96291734bcf1..52ccfad201a535 100644 --- a/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts +++ b/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts @@ -50,8 +50,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid const degradedDatasetName = datasetNames[2]; - // Failing: See https://github.com/elastic/kibana/issues/187589 - describe.skip('Flyout', () => { + describe('Flyout', () => { before(async () => { // Install Apache Integration and ingest logs for it await PageObjects.observabilityLogsExplorer.installPackage(apachePkg); @@ -150,17 +149,19 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid it('should shows the integration section for integrations', async () => { await PageObjects.datasetQuality.openDatasetFlyout(apacheAccessDatasetHumanName); - const integrationNameElements = await PageObjects.datasetQuality.getFlyoutElementsByText( - '[data-test-subj=datasetQualityFlyoutFieldValue]', - apacheIntegrationId - ); - await testSubjects.existOrFail( PageObjects.datasetQuality.testSubjectSelectors .datasetQualityFlyoutFieldsListIntegrationDetails ); - expect(integrationNameElements.length).to.eql(1); + await retry.tryForTime(5000, async () => { + const integrationNameExists = await PageObjects.datasetQuality.doesTextExist( + PageObjects.datasetQuality.testSubjectSelectors + .datasetQualityFlyoutFieldsListIntegrationDetails, + apacheIntegrationId + ); + expect(integrationNameExists).to.be(true); + }); await PageObjects.datasetQuality.closeFlyout(); }); diff --git a/x-pack/test/functional/page_objects/dataset_quality.ts b/x-pack/test/functional/page_objects/dataset_quality.ts index 7cb633a8113b65..7f918ce3ba76f1 100644 --- a/x-pack/test/functional/page_objects/dataset_quality.ts +++ b/x-pack/test/functional/page_objects/dataset_quality.ts @@ -347,12 +347,14 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv return refreshButton.click(); }, - async getFlyoutElementsByText(selector: string, text: string) { - const flyoutContainer: WebElementWrapper = await testSubjects.find( - testSubjectSelectors.datasetQualityFlyout - ); + async doesTextExist(selector: string, text: string) { + const textValues = await testSubjects.getVisibleTextAll(selector); + if (textValues && textValues.length > 0) { + const values = textValues[0].split('\n'); + return values.includes(text); + } - return getAllByText(flyoutContainer, selector, text); + return false; }, getFlyoutLogsExplorerButton() { @@ -373,15 +375,6 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv ); }, - async doestTextExistInFlyout(text: string, elementSelector: string) { - const flyoutContainer: WebElementWrapper = await testSubjects.find( - testSubjectSelectors.datasetQualityFlyoutBody - ); - - const elements = await getAllByText(flyoutContainer, elementSelector, text); - return elements.length > 0; - }, - // `excludeKeys` needed to circumvent `_stats` not available in Serverless https://github.com/elastic/kibana/issues/178954 // TODO: Remove `excludeKeys` when `_stats` is available in Serverless async parseFlyoutKpis(excludeKeys: string[] = []): Promise { @@ -554,28 +547,3 @@ async function getDatasetTableHeaderTexts(tableWrapper: WebElementWrapper) { headerElementWrappers.map((headerElementWrapper) => headerElementWrapper.getVisibleText()) ); } - -/** - * Get all elements matching the given selector and text - * @example - * const container = await testSubjects.find('myContainer'); - * const elements = await getAllByText(container, 'button', 'Click me'); - * - * @param container { WebElementWrapper } The container to search within - * @param selector { string } The selector to search for (or filter elements by) - * @param text { string } The text to search for within the filtered elements - */ -export async function getAllByText(container: WebElementWrapper, selector: string, text: string) { - const elements = await container.findAllByCssSelector(selector); - const matchingElements: WebElementWrapper[] = []; - - for (let i = 0; i < elements.length; i++) { - const element = elements[i]; - const elementText = await element.getVisibleText(); - if (elementText === text) { - matchingElements.push(element); - } - } - - return matchingElements; -} diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts index 7de972a7b2c883..2751abf569746f 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts @@ -54,10 +54,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const degradedDatasetName = datasetNames[2]; - // Failing: See https://github.com/elastic/kibana/issues/187566 - describe.skip('Flyout', function () { - // see details: https://github.com/elastic/kibana/issues/187624 - this.tags(['failsOnMKI']); + describe('Flyout', function () { before(async () => { // Install Apache Integration and ingest logs for it await PageObjects.observabilityLogsExplorer.installPackage(apachePkg); @@ -158,17 +155,19 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should shows the integration section for integrations', async () => { await PageObjects.datasetQuality.openDatasetFlyout(apacheAccessDatasetHumanName); - const integrationNameElements = await PageObjects.datasetQuality.getFlyoutElementsByText( - '[data-test-subj=datasetQualityFlyoutFieldValue]', - apacheIntegrationId - ); - await testSubjects.existOrFail( PageObjects.datasetQuality.testSubjectSelectors .datasetQualityFlyoutFieldsListIntegrationDetails ); - expect(integrationNameElements.length).to.eql(1); + await retry.tryForTime(5000, async () => { + const integrationNameExists = await PageObjects.datasetQuality.doesTextExist( + PageObjects.datasetQuality.testSubjectSelectors + .datasetQualityFlyoutFieldsListIntegrationDetails, + apacheIntegrationId + ); + expect(integrationNameExists).to.be(true); + }); await PageObjects.datasetQuality.closeFlyout(); }); From 8f95f955e6263ded0abcc62cf3ca53bb018cbe4a Mon Sep 17 00:00:00 2001 From: Melissa Alvarez Date: Tue, 9 Jul 2024 11:00:36 -0600 Subject: [PATCH 084/103] [ML] Functional tests: unskip anomaly detection results forecast flaky test (#187795) ## Summary Unskip skipped test due to flakiness: https://github.com/elastic/kibana/issues/164381 Initial investigation appears to indicate something in the testing environment - likely the chrome version. That has been updated since so letting the CI run to confirm. Flaky test runner build: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6494 ### 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) --- .../apps/ml/anomaly_detection_result_views/forecasts.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_result_views/forecasts.ts b/x-pack/test/functional/apps/ml/anomaly_detection_result_views/forecasts.ts index bdd3052f54c0a5..3a60e8fca97c27 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_result_views/forecasts.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_result_views/forecasts.ts @@ -39,8 +39,7 @@ export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); - // Failing: See https://github.com/elastic/kibana/issues/164381 - describe.skip('forecasts', function () { + describe('forecasts', function () { this.tags(['ml']); describe('with single metric job', function () { From 5bc0c7865e11b9b699d282c488286779b344f0e6 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 9 Jul 2024 19:18:50 +0200 Subject: [PATCH 085/103] [ES|QL] Update grammars: change quoting from backtick to quote for index names (#187212) Related to https://github.com/elastic/elasticsearch/pull/108395. This PR updates the ES|QL grammars (lexer and parser) to match the latest version in Elasticsearch. The PR adds support for index names wrapped by `""`, and triple quotes `"""index-name"""` to the ES|QL text editor and removes backticks. Screenshot 2024-07-09 at 09 25 22 Screenshot 2024-07-09 at 09 24 54 Screenshot 2024-07-09 at 09 25 03 --------- Co-authored-by: Quynh Nguyen Co-authored-by: Elastic Machine --- .../src/__tests__/ast_parser.from.test.ts | 30 + packages/kbn-esql-ast/src/antlr/esql_lexer.g4 | 41 +- .../kbn-esql-ast/src/antlr/esql_lexer.interp | 22 +- .../kbn-esql-ast/src/antlr/esql_lexer.tokens | 2 +- packages/kbn-esql-ast/src/antlr/esql_lexer.ts | 978 +++++----- .../kbn-esql-ast/src/antlr/esql_parser.g4 | 22 +- .../kbn-esql-ast/src/antlr/esql_parser.interp | 8 +- .../kbn-esql-ast/src/antlr/esql_parser.tokens | 2 +- .../kbn-esql-ast/src/antlr/esql_parser.ts | 1719 +++++++++-------- .../src/antlr/esql_parser_listener.ts | 32 +- packages/kbn-esql-ast/src/ast_factory.ts | 4 +- packages/kbn-esql-ast/src/ast_helpers.ts | 16 +- packages/kbn-esql-ast/src/ast_walker.ts | 21 +- .../src/utils/query_parsing_helpers.test.ts | 6 + .../test_suites/validation.command.from.ts | 13 +- .../test_suites/validation.command.metrics.ts | 11 +- .../esql_validation_meta_tests.json | 22 +- .../src/validation/validation.test.ts | 3 +- 18 files changed, 1603 insertions(+), 1349 deletions(-) diff --git a/packages/kbn-esql-ast/src/__tests__/ast_parser.from.test.ts b/packages/kbn-esql-ast/src/__tests__/ast_parser.from.test.ts index 00559da4fff9c4..a88b51f63ea166 100644 --- a/packages/kbn-esql-ast/src/__tests__/ast_parser.from.test.ts +++ b/packages/kbn-esql-ast/src/__tests__/ast_parser.from.test.ts @@ -60,6 +60,36 @@ describe('FROM', () => { ]); }); + it('can parse FROM query with single quote or triple quote', () => { + const text = '\tFROM "foo%" \t\t, """bar{{00-00}}""", \n baz'; + const { ast, errors } = parse(text); + + expect(errors.length).toBe(0); + expect(ast).toMatchObject([ + { + type: 'command', + name: 'from', + args: [ + { + type: 'source', + name: 'foo%', + sourceType: 'index', + }, + { + type: 'source', + name: 'bar{{00-00}}', + sourceType: 'index', + }, + { + type: 'source', + name: 'baz', + sourceType: 'index', + }, + ], + }, + ]); + }); + it('can parse FROM query with a single metadata column', () => { const text = 'from foo METADATA bar'; const { ast, errors } = parse(text); diff --git a/packages/kbn-esql-ast/src/antlr/esql_lexer.g4 b/packages/kbn-esql-ast/src/antlr/esql_lexer.g4 index d7a4b88e6d5c52..12a47a195dfda6 100644 --- a/packages/kbn-esql-ast/src/antlr/esql_lexer.g4 +++ b/packages/kbn-esql-ast/src/antlr/esql_lexer.g4 @@ -44,13 +44,15 @@ WS : [ \r\n\t]+ -> channel(HIDDEN) ; -fragment INDEX_UNQUOTED_IDENTIFIER_PART - : ~[=`|,[\]/ \t\r\n] - | '/' ~[*/] // allow single / but not followed by another / or * which would start a comment +// in 8.14 ` were not allowed +// this has been relaxed in 8.15 since " is used for quoting +fragment UNQUOTED_SOURCE_PART + : ~[:"=|,[\]/ \t\r\n] + | '/' ~[*/] // allow single / but not followed by another / or * which would start a comment -- used in index pattern date spec ; -INDEX_UNQUOTED_IDENTIFIER - : INDEX_UNQUOTED_IDENTIFIER_PART+ +UNQUOTED_SOURCE + : UNQUOTED_SOURCE_PART+ ; // @@ -212,15 +214,13 @@ mode FROM_MODE; FROM_PIPE : PIPE -> type(PIPE), popMode; FROM_OPENING_BRACKET : OPENING_BRACKET -> type(OPENING_BRACKET); FROM_CLOSING_BRACKET : CLOSING_BRACKET -> type(CLOSING_BRACKET); +FROM_COLON : COLON -> type(COLON); FROM_COMMA : COMMA -> type(COMMA); FROM_ASSIGN : ASSIGN -> type(ASSIGN); -FROM_QUOTED_STRING : QUOTED_STRING -> type(QUOTED_STRING); - METADATA : 'metadata'; -FROM_INDEX_UNQUOTED_IDENTIFIER - : INDEX_UNQUOTED_IDENTIFIER -> type(INDEX_UNQUOTED_IDENTIFIER) - ; +FROM_UNQUOTED_SOURCE : UNQUOTED_SOURCE -> type(UNQUOTED_SOURCE); +FROM_QUOTED_SOURCE : QUOTED_STRING -> type(QUOTED_STRING); FROM_LINE_COMMENT : LINE_COMMENT -> channel(HIDDEN) @@ -311,10 +311,6 @@ ENRICH_POLICY_NAME : (ENRICH_POLICY_NAME_BODY+ COLON)? ENRICH_POLICY_NAME_BODY+ ; -ENRICH_QUOTED_IDENTIFIER - : QUOTED_IDENTIFIER -> type(QUOTED_IDENTIFIER) - ; - ENRICH_MODE_UNQUOTED_VALUE : ENRICH_POLICY_NAME -> type(ENRICH_POLICY_NAME) ; @@ -331,7 +327,7 @@ ENRICH_WS : WS -> channel(HIDDEN) ; -// submode for Enrich to allow different lexing between policy identifier (loose) and field identifiers +// submode for Enrich to allow different lexing between policy source (loose) and field identifiers mode ENRICH_FIELD_MODE; ENRICH_FIELD_PIPE : PIPE -> type(PIPE), popMode, popMode; ENRICH_FIELD_ASSIGN : ASSIGN -> type(ASSIGN); @@ -363,13 +359,13 @@ ENRICH_FIELD_WS // LOOKUP ON key mode LOOKUP_MODE; LOOKUP_PIPE : PIPE -> type(PIPE), popMode; +LOOKUP_COLON : COLON -> type(COLON); LOOKUP_COMMA : COMMA -> type(COMMA); LOOKUP_DOT: DOT -> type(DOT); LOOKUP_ON : ON -> type(ON), pushMode(LOOKUP_FIELD_MODE); -LOOKUP_INDEX_UNQUOTED_IDENTIFIER - : INDEX_UNQUOTED_IDENTIFIER -> type(INDEX_UNQUOTED_IDENTIFIER) - ; +LOOKUP_UNQUOTED_SOURCE: UNQUOTED_SOURCE -> type(UNQUOTED_SOURCE); +LOOKUP_QUOTED_SOURCE : QUOTED_STRING -> type(QUOTED_STRING); LOOKUP_LINE_COMMENT : LINE_COMMENT -> channel(HIDDEN) @@ -496,9 +492,8 @@ SETTING_WS mode METRICS_MODE; METRICS_PIPE : PIPE -> type(PIPE), popMode; -METRICS_INDEX_UNQUOTED_IDENTIFIER - : INDEX_UNQUOTED_IDENTIFIER -> type(INDEX_UNQUOTED_IDENTIFIER), popMode, pushMode(CLOSING_METRICS_MODE) - ; +METRICS_UNQUOTED_SOURCE: UNQUOTED_SOURCE -> type(UNQUOTED_SOURCE), popMode, pushMode(CLOSING_METRICS_MODE); +METRICS_QUOTED_SOURCE : QUOTED_STRING -> type(QUOTED_STRING), popMode, pushMode(CLOSING_METRICS_MODE); METRICS_LINE_COMMENT : LINE_COMMENT -> channel(HIDDEN) @@ -515,6 +510,10 @@ METRICS_WS // TODO: remove this workaround mode - see https://github.com/elastic/elasticsearch/issues/108528 mode CLOSING_METRICS_MODE; +CLOSING_METRICS_COLON + : COLON -> type(COLON), popMode, pushMode(METRICS_MODE) + ; + CLOSING_METRICS_COMMA : COMMA -> type(COMMA), popMode, pushMode(METRICS_MODE) ; diff --git a/packages/kbn-esql-ast/src/antlr/esql_lexer.interp b/packages/kbn-esql-ast/src/antlr/esql_lexer.interp index 911e1371fd1297..f0826dc49df6e4 100644 --- a/packages/kbn-esql-ast/src/antlr/esql_lexer.interp +++ b/packages/kbn-esql-ast/src/antlr/esql_lexer.interp @@ -151,7 +151,7 @@ UNKNOWN_CMD LINE_COMMENT MULTILINE_COMMENT WS -INDEX_UNQUOTED_IDENTIFIER +UNQUOTED_SOURCE EXPLAIN_WS EXPLAIN_LINE_COMMENT EXPLAIN_MULTILINE_COMMENT @@ -277,8 +277,8 @@ UNKNOWN_CMD LINE_COMMENT MULTILINE_COMMENT WS -INDEX_UNQUOTED_IDENTIFIER_PART -INDEX_UNQUOTED_IDENTIFIER +UNQUOTED_SOURCE_PART +UNQUOTED_SOURCE EXPLAIN_OPENING_BRACKET EXPLAIN_PIPE EXPLAIN_WS @@ -345,11 +345,12 @@ EXPR_WS FROM_PIPE FROM_OPENING_BRACKET FROM_CLOSING_BRACKET +FROM_COLON FROM_COMMA FROM_ASSIGN -FROM_QUOTED_STRING METADATA -FROM_INDEX_UNQUOTED_IDENTIFIER +FROM_UNQUOTED_SOURCE +FROM_QUOTED_SOURCE FROM_LINE_COMMENT FROM_MULTILINE_COMMENT FROM_WS @@ -377,7 +378,6 @@ ON WITH ENRICH_POLICY_NAME_BODY ENRICH_POLICY_NAME -ENRICH_QUOTED_IDENTIFIER ENRICH_MODE_UNQUOTED_VALUE ENRICH_LINE_COMMENT ENRICH_MULTILINE_COMMENT @@ -393,10 +393,12 @@ ENRICH_FIELD_LINE_COMMENT ENRICH_FIELD_MULTILINE_COMMENT ENRICH_FIELD_WS LOOKUP_PIPE +LOOKUP_COLON LOOKUP_COMMA LOOKUP_DOT LOOKUP_ON -LOOKUP_INDEX_UNQUOTED_IDENTIFIER +LOOKUP_UNQUOTED_SOURCE +LOOKUP_QUOTED_SOURCE LOOKUP_LINE_COMMENT LOOKUP_MULTILINE_COMMENT LOOKUP_WS @@ -431,10 +433,12 @@ SETTING_LINE_COMMENT SETTTING_MULTILINE_COMMENT SETTING_WS METRICS_PIPE -METRICS_INDEX_UNQUOTED_IDENTIFIER +METRICS_UNQUOTED_SOURCE +METRICS_QUOTED_SOURCE METRICS_LINE_COMMENT METRICS_MULTILINE_COMMENT METRICS_WS +CLOSING_METRICS_COLON CLOSING_METRICS_COMMA CLOSING_METRICS_LINE_COMMENT CLOSING_METRICS_MULTILINE_COMMENT @@ -467,4 +471,4 @@ METRICS_MODE CLOSING_METRICS_MODE atn: -[4, 0, 124, 1422, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, 2, 185, 7, 185, 2, 186, 7, 186, 2, 187, 7, 187, 2, 188, 7, 188, 2, 189, 7, 189, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 4, 20, 567, 8, 20, 11, 20, 12, 20, 568, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 577, 8, 21, 10, 21, 12, 21, 580, 9, 21, 1, 21, 3, 21, 583, 8, 21, 1, 21, 3, 21, 586, 8, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 5, 22, 595, 8, 22, 10, 22, 12, 22, 598, 9, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 4, 23, 606, 8, 23, 11, 23, 12, 23, 607, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 3, 24, 615, 8, 24, 1, 25, 4, 25, 618, 8, 25, 11, 25, 12, 25, 619, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 3, 36, 659, 8, 36, 1, 36, 4, 36, 662, 8, 36, 11, 36, 12, 36, 663, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 3, 39, 673, 8, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 3, 41, 680, 8, 41, 1, 42, 1, 42, 1, 42, 5, 42, 685, 8, 42, 10, 42, 12, 42, 688, 9, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 5, 42, 696, 8, 42, 10, 42, 12, 42, 699, 9, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 706, 8, 42, 1, 42, 3, 42, 709, 8, 42, 3, 42, 711, 8, 42, 1, 43, 4, 43, 714, 8, 43, 11, 43, 12, 43, 715, 1, 44, 4, 44, 719, 8, 44, 11, 44, 12, 44, 720, 1, 44, 1, 44, 5, 44, 725, 8, 44, 10, 44, 12, 44, 728, 9, 44, 1, 44, 1, 44, 4, 44, 732, 8, 44, 11, 44, 12, 44, 733, 1, 44, 4, 44, 737, 8, 44, 11, 44, 12, 44, 738, 1, 44, 1, 44, 5, 44, 743, 8, 44, 10, 44, 12, 44, 746, 9, 44, 3, 44, 748, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 4, 44, 754, 8, 44, 11, 44, 12, 44, 755, 1, 44, 1, 44, 3, 44, 760, 8, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 76, 1, 76, 1, 77, 1, 77, 1, 78, 1, 78, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 5, 80, 882, 8, 80, 10, 80, 12, 80, 885, 9, 80, 1, 80, 1, 80, 4, 80, 889, 8, 80, 11, 80, 12, 80, 890, 3, 80, 893, 8, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 5, 83, 907, 8, 83, 10, 83, 12, 83, 910, 9, 83, 1, 83, 1, 83, 3, 83, 914, 8, 83, 1, 83, 4, 83, 917, 8, 83, 11, 83, 12, 83, 918, 3, 83, 921, 8, 83, 1, 84, 1, 84, 4, 84, 925, 8, 84, 11, 84, 12, 84, 926, 1, 84, 1, 84, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, 1, 103, 1, 103, 3, 103, 1012, 8, 103, 1, 104, 1, 104, 3, 104, 1016, 8, 104, 1, 104, 5, 104, 1019, 8, 104, 10, 104, 12, 104, 1022, 9, 104, 1, 104, 1, 104, 3, 104, 1026, 8, 104, 1, 104, 4, 104, 1029, 8, 104, 11, 104, 12, 104, 1030, 3, 104, 1033, 8, 104, 1, 105, 1, 105, 4, 105, 1037, 8, 105, 11, 105, 12, 105, 1038, 1, 106, 1, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 107, 1, 107, 1, 108, 1, 108, 1, 108, 1, 108, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 110, 1, 110, 1, 111, 1, 111, 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 1, 112, 1, 113, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, 1, 114, 1, 115, 1, 115, 1, 115, 1, 115, 1, 116, 1, 116, 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 1, 117, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 122, 1, 122, 1, 123, 4, 123, 1114, 8, 123, 11, 123, 12, 123, 1115, 1, 123, 1, 123, 3, 123, 1120, 8, 123, 1, 123, 4, 123, 1123, 8, 123, 11, 123, 12, 123, 1124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 125, 1, 125, 1, 125, 1, 125, 1, 126, 1, 126, 1, 126, 1, 126, 1, 127, 1, 127, 1, 127, 1, 127, 1, 128, 1, 128, 1, 128, 1, 128, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 130, 1, 130, 1, 130, 1, 130, 1, 131, 1, 131, 1, 131, 1, 131, 1, 132, 1, 132, 1, 132, 1, 132, 1, 133, 1, 133, 1, 133, 1, 133, 1, 134, 1, 134, 1, 134, 1, 134, 1, 135, 1, 135, 1, 135, 1, 135, 1, 136, 1, 136, 1, 136, 1, 136, 1, 137, 1, 137, 1, 137, 1, 137, 1, 138, 1, 138, 1, 138, 1, 138, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 141, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 143, 1, 143, 1, 143, 1, 143, 1, 144, 1, 144, 1, 144, 1, 144, 1, 145, 1, 145, 1, 145, 1, 145, 1, 146, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 148, 1, 148, 1, 148, 1, 148, 1, 149, 1, 149, 1, 149, 1, 149, 1, 150, 1, 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 151, 1, 152, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, 153, 1, 153, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 155, 1, 155, 1, 155, 1, 155, 1, 156, 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, 1, 158, 1, 159, 1, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 163, 1, 163, 1, 163, 1, 163, 1, 164, 1, 164, 1, 164, 1, 164, 1, 165, 1, 165, 1, 165, 1, 165, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 168, 1, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 169, 1, 169, 1, 170, 1, 170, 1, 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 4, 173, 1343, 8, 173, 11, 173, 12, 173, 1344, 1, 174, 1, 174, 1, 174, 1, 174, 1, 175, 1, 175, 1, 175, 1, 175, 1, 176, 1, 176, 1, 176, 1, 176, 1, 177, 1, 177, 1, 177, 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 179, 1, 179, 1, 179, 1, 179, 1, 180, 1, 180, 1, 180, 1, 180, 1, 181, 1, 181, 1, 181, 1, 181, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, 184, 1, 184, 1, 185, 1, 185, 1, 185, 1, 185, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 188, 1, 188, 1, 188, 1, 188, 1, 188, 1, 188, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 2, 596, 697, 0, 190, 16, 1, 18, 2, 20, 3, 22, 4, 24, 5, 26, 6, 28, 7, 30, 8, 32, 9, 34, 10, 36, 11, 38, 12, 40, 13, 42, 14, 44, 15, 46, 16, 48, 17, 50, 18, 52, 19, 54, 20, 56, 21, 58, 22, 60, 23, 62, 24, 64, 0, 66, 25, 68, 0, 70, 0, 72, 26, 74, 27, 76, 28, 78, 29, 80, 0, 82, 0, 84, 0, 86, 0, 88, 0, 90, 0, 92, 0, 94, 0, 96, 0, 98, 0, 100, 30, 102, 31, 104, 32, 106, 33, 108, 34, 110, 35, 112, 36, 114, 37, 116, 38, 118, 39, 120, 40, 122, 41, 124, 42, 126, 43, 128, 44, 130, 45, 132, 46, 134, 47, 136, 48, 138, 49, 140, 50, 142, 51, 144, 52, 146, 53, 148, 54, 150, 55, 152, 56, 154, 57, 156, 58, 158, 59, 160, 60, 162, 61, 164, 62, 166, 63, 168, 64, 170, 65, 172, 66, 174, 67, 176, 68, 178, 69, 180, 70, 182, 71, 184, 0, 186, 72, 188, 73, 190, 74, 192, 75, 194, 0, 196, 0, 198, 0, 200, 0, 202, 0, 204, 0, 206, 76, 208, 0, 210, 77, 212, 78, 214, 79, 216, 0, 218, 0, 220, 0, 222, 0, 224, 0, 226, 80, 228, 81, 230, 82, 232, 83, 234, 0, 236, 0, 238, 0, 240, 0, 242, 84, 244, 0, 246, 85, 248, 86, 250, 87, 252, 0, 254, 0, 256, 88, 258, 89, 260, 0, 262, 90, 264, 0, 266, 0, 268, 91, 270, 92, 272, 93, 274, 0, 276, 0, 278, 0, 280, 0, 282, 0, 284, 0, 286, 0, 288, 94, 290, 95, 292, 96, 294, 0, 296, 0, 298, 0, 300, 0, 302, 0, 304, 97, 306, 98, 308, 99, 310, 0, 312, 0, 314, 0, 316, 0, 318, 100, 320, 101, 322, 102, 324, 0, 326, 0, 328, 0, 330, 0, 332, 103, 334, 104, 336, 105, 338, 0, 340, 106, 342, 107, 344, 108, 346, 109, 348, 0, 350, 110, 352, 111, 354, 112, 356, 113, 358, 0, 360, 114, 362, 115, 364, 116, 366, 117, 368, 118, 370, 0, 372, 0, 374, 119, 376, 120, 378, 121, 380, 0, 382, 122, 384, 123, 386, 124, 388, 0, 390, 0, 392, 0, 394, 0, 16, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 35, 2, 0, 68, 68, 100, 100, 2, 0, 73, 73, 105, 105, 2, 0, 83, 83, 115, 115, 2, 0, 69, 69, 101, 101, 2, 0, 67, 67, 99, 99, 2, 0, 84, 84, 116, 116, 2, 0, 82, 82, 114, 114, 2, 0, 79, 79, 111, 111, 2, 0, 80, 80, 112, 112, 2, 0, 78, 78, 110, 110, 2, 0, 72, 72, 104, 104, 2, 0, 86, 86, 118, 118, 2, 0, 65, 65, 97, 97, 2, 0, 76, 76, 108, 108, 2, 0, 88, 88, 120, 120, 2, 0, 70, 70, 102, 102, 2, 0, 77, 77, 109, 109, 2, 0, 71, 71, 103, 103, 2, 0, 75, 75, 107, 107, 2, 0, 85, 85, 117, 117, 2, 0, 87, 87, 119, 119, 6, 0, 9, 10, 13, 13, 32, 32, 47, 47, 91, 91, 93, 93, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, 32, 10, 0, 9, 10, 13, 13, 32, 32, 44, 44, 47, 47, 61, 61, 91, 91, 93, 93, 96, 96, 124, 124, 2, 0, 42, 42, 47, 47, 1, 0, 48, 57, 2, 0, 65, 90, 97, 122, 8, 0, 34, 34, 78, 78, 82, 82, 84, 84, 92, 92, 110, 110, 114, 114, 116, 116, 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 2, 0, 43, 43, 45, 45, 1, 0, 96, 96, 2, 0, 66, 66, 98, 98, 2, 0, 89, 89, 121, 121, 11, 0, 9, 10, 13, 13, 32, 32, 34, 35, 44, 44, 47, 47, 58, 58, 60, 60, 62, 63, 92, 92, 124, 124, 1448, 0, 16, 1, 0, 0, 0, 0, 18, 1, 0, 0, 0, 0, 20, 1, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 24, 1, 0, 0, 0, 0, 26, 1, 0, 0, 0, 0, 28, 1, 0, 0, 0, 0, 30, 1, 0, 0, 0, 0, 32, 1, 0, 0, 0, 0, 34, 1, 0, 0, 0, 0, 36, 1, 0, 0, 0, 0, 38, 1, 0, 0, 0, 0, 40, 1, 0, 0, 0, 0, 42, 1, 0, 0, 0, 0, 44, 1, 0, 0, 0, 0, 46, 1, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 50, 1, 0, 0, 0, 0, 52, 1, 0, 0, 0, 0, 54, 1, 0, 0, 0, 0, 56, 1, 0, 0, 0, 0, 58, 1, 0, 0, 0, 0, 60, 1, 0, 0, 0, 0, 62, 1, 0, 0, 0, 0, 66, 1, 0, 0, 0, 1, 68, 1, 0, 0, 0, 1, 70, 1, 0, 0, 0, 1, 72, 1, 0, 0, 0, 1, 74, 1, 0, 0, 0, 1, 76, 1, 0, 0, 0, 2, 78, 1, 0, 0, 0, 2, 100, 1, 0, 0, 0, 2, 102, 1, 0, 0, 0, 2, 104, 1, 0, 0, 0, 2, 106, 1, 0, 0, 0, 2, 108, 1, 0, 0, 0, 2, 110, 1, 0, 0, 0, 2, 112, 1, 0, 0, 0, 2, 114, 1, 0, 0, 0, 2, 116, 1, 0, 0, 0, 2, 118, 1, 0, 0, 0, 2, 120, 1, 0, 0, 0, 2, 122, 1, 0, 0, 0, 2, 124, 1, 0, 0, 0, 2, 126, 1, 0, 0, 0, 2, 128, 1, 0, 0, 0, 2, 130, 1, 0, 0, 0, 2, 132, 1, 0, 0, 0, 2, 134, 1, 0, 0, 0, 2, 136, 1, 0, 0, 0, 2, 138, 1, 0, 0, 0, 2, 140, 1, 0, 0, 0, 2, 142, 1, 0, 0, 0, 2, 144, 1, 0, 0, 0, 2, 146, 1, 0, 0, 0, 2, 148, 1, 0, 0, 0, 2, 150, 1, 0, 0, 0, 2, 152, 1, 0, 0, 0, 2, 154, 1, 0, 0, 0, 2, 156, 1, 0, 0, 0, 2, 158, 1, 0, 0, 0, 2, 160, 1, 0, 0, 0, 2, 162, 1, 0, 0, 0, 2, 164, 1, 0, 0, 0, 2, 166, 1, 0, 0, 0, 2, 168, 1, 0, 0, 0, 2, 170, 1, 0, 0, 0, 2, 172, 1, 0, 0, 0, 2, 174, 1, 0, 0, 0, 2, 176, 1, 0, 0, 0, 2, 178, 1, 0, 0, 0, 2, 180, 1, 0, 0, 0, 2, 182, 1, 0, 0, 0, 2, 186, 1, 0, 0, 0, 2, 188, 1, 0, 0, 0, 2, 190, 1, 0, 0, 0, 2, 192, 1, 0, 0, 0, 3, 194, 1, 0, 0, 0, 3, 196, 1, 0, 0, 0, 3, 198, 1, 0, 0, 0, 3, 200, 1, 0, 0, 0, 3, 202, 1, 0, 0, 0, 3, 204, 1, 0, 0, 0, 3, 206, 1, 0, 0, 0, 3, 208, 1, 0, 0, 0, 3, 210, 1, 0, 0, 0, 3, 212, 1, 0, 0, 0, 3, 214, 1, 0, 0, 0, 4, 216, 1, 0, 0, 0, 4, 218, 1, 0, 0, 0, 4, 220, 1, 0, 0, 0, 4, 226, 1, 0, 0, 0, 4, 228, 1, 0, 0, 0, 4, 230, 1, 0, 0, 0, 4, 232, 1, 0, 0, 0, 5, 234, 1, 0, 0, 0, 5, 236, 1, 0, 0, 0, 5, 238, 1, 0, 0, 0, 5, 240, 1, 0, 0, 0, 5, 242, 1, 0, 0, 0, 5, 244, 1, 0, 0, 0, 5, 246, 1, 0, 0, 0, 5, 248, 1, 0, 0, 0, 5, 250, 1, 0, 0, 0, 6, 252, 1, 0, 0, 0, 6, 254, 1, 0, 0, 0, 6, 256, 1, 0, 0, 0, 6, 258, 1, 0, 0, 0, 6, 262, 1, 0, 0, 0, 6, 264, 1, 0, 0, 0, 6, 266, 1, 0, 0, 0, 6, 268, 1, 0, 0, 0, 6, 270, 1, 0, 0, 0, 6, 272, 1, 0, 0, 0, 7, 274, 1, 0, 0, 0, 7, 276, 1, 0, 0, 0, 7, 278, 1, 0, 0, 0, 7, 280, 1, 0, 0, 0, 7, 282, 1, 0, 0, 0, 7, 284, 1, 0, 0, 0, 7, 286, 1, 0, 0, 0, 7, 288, 1, 0, 0, 0, 7, 290, 1, 0, 0, 0, 7, 292, 1, 0, 0, 0, 8, 294, 1, 0, 0, 0, 8, 296, 1, 0, 0, 0, 8, 298, 1, 0, 0, 0, 8, 300, 1, 0, 0, 0, 8, 302, 1, 0, 0, 0, 8, 304, 1, 0, 0, 0, 8, 306, 1, 0, 0, 0, 8, 308, 1, 0, 0, 0, 9, 310, 1, 0, 0, 0, 9, 312, 1, 0, 0, 0, 9, 314, 1, 0, 0, 0, 9, 316, 1, 0, 0, 0, 9, 318, 1, 0, 0, 0, 9, 320, 1, 0, 0, 0, 9, 322, 1, 0, 0, 0, 10, 324, 1, 0, 0, 0, 10, 326, 1, 0, 0, 0, 10, 328, 1, 0, 0, 0, 10, 330, 1, 0, 0, 0, 10, 332, 1, 0, 0, 0, 10, 334, 1, 0, 0, 0, 10, 336, 1, 0, 0, 0, 11, 338, 1, 0, 0, 0, 11, 340, 1, 0, 0, 0, 11, 342, 1, 0, 0, 0, 11, 344, 1, 0, 0, 0, 11, 346, 1, 0, 0, 0, 12, 348, 1, 0, 0, 0, 12, 350, 1, 0, 0, 0, 12, 352, 1, 0, 0, 0, 12, 354, 1, 0, 0, 0, 12, 356, 1, 0, 0, 0, 13, 358, 1, 0, 0, 0, 13, 360, 1, 0, 0, 0, 13, 362, 1, 0, 0, 0, 13, 364, 1, 0, 0, 0, 13, 366, 1, 0, 0, 0, 13, 368, 1, 0, 0, 0, 14, 370, 1, 0, 0, 0, 14, 372, 1, 0, 0, 0, 14, 374, 1, 0, 0, 0, 14, 376, 1, 0, 0, 0, 14, 378, 1, 0, 0, 0, 15, 380, 1, 0, 0, 0, 15, 382, 1, 0, 0, 0, 15, 384, 1, 0, 0, 0, 15, 386, 1, 0, 0, 0, 15, 388, 1, 0, 0, 0, 15, 390, 1, 0, 0, 0, 15, 392, 1, 0, 0, 0, 15, 394, 1, 0, 0, 0, 16, 396, 1, 0, 0, 0, 18, 406, 1, 0, 0, 0, 20, 413, 1, 0, 0, 0, 22, 422, 1, 0, 0, 0, 24, 429, 1, 0, 0, 0, 26, 439, 1, 0, 0, 0, 28, 446, 1, 0, 0, 0, 30, 453, 1, 0, 0, 0, 32, 467, 1, 0, 0, 0, 34, 474, 1, 0, 0, 0, 36, 482, 1, 0, 0, 0, 38, 491, 1, 0, 0, 0, 40, 498, 1, 0, 0, 0, 42, 508, 1, 0, 0, 0, 44, 520, 1, 0, 0, 0, 46, 529, 1, 0, 0, 0, 48, 535, 1, 0, 0, 0, 50, 542, 1, 0, 0, 0, 52, 549, 1, 0, 0, 0, 54, 557, 1, 0, 0, 0, 56, 566, 1, 0, 0, 0, 58, 572, 1, 0, 0, 0, 60, 589, 1, 0, 0, 0, 62, 605, 1, 0, 0, 0, 64, 614, 1, 0, 0, 0, 66, 617, 1, 0, 0, 0, 68, 621, 1, 0, 0, 0, 70, 626, 1, 0, 0, 0, 72, 631, 1, 0, 0, 0, 74, 635, 1, 0, 0, 0, 76, 639, 1, 0, 0, 0, 78, 643, 1, 0, 0, 0, 80, 647, 1, 0, 0, 0, 82, 649, 1, 0, 0, 0, 84, 651, 1, 0, 0, 0, 86, 654, 1, 0, 0, 0, 88, 656, 1, 0, 0, 0, 90, 665, 1, 0, 0, 0, 92, 667, 1, 0, 0, 0, 94, 672, 1, 0, 0, 0, 96, 674, 1, 0, 0, 0, 98, 679, 1, 0, 0, 0, 100, 710, 1, 0, 0, 0, 102, 713, 1, 0, 0, 0, 104, 759, 1, 0, 0, 0, 106, 761, 1, 0, 0, 0, 108, 764, 1, 0, 0, 0, 110, 768, 1, 0, 0, 0, 112, 772, 1, 0, 0, 0, 114, 774, 1, 0, 0, 0, 116, 777, 1, 0, 0, 0, 118, 779, 1, 0, 0, 0, 120, 784, 1, 0, 0, 0, 122, 786, 1, 0, 0, 0, 124, 792, 1, 0, 0, 0, 126, 798, 1, 0, 0, 0, 128, 803, 1, 0, 0, 0, 130, 805, 1, 0, 0, 0, 132, 808, 1, 0, 0, 0, 134, 811, 1, 0, 0, 0, 136, 816, 1, 0, 0, 0, 138, 820, 1, 0, 0, 0, 140, 825, 1, 0, 0, 0, 142, 831, 1, 0, 0, 0, 144, 834, 1, 0, 0, 0, 146, 836, 1, 0, 0, 0, 148, 842, 1, 0, 0, 0, 150, 844, 1, 0, 0, 0, 152, 849, 1, 0, 0, 0, 154, 852, 1, 0, 0, 0, 156, 855, 1, 0, 0, 0, 158, 858, 1, 0, 0, 0, 160, 860, 1, 0, 0, 0, 162, 863, 1, 0, 0, 0, 164, 865, 1, 0, 0, 0, 166, 868, 1, 0, 0, 0, 168, 870, 1, 0, 0, 0, 170, 872, 1, 0, 0, 0, 172, 874, 1, 0, 0, 0, 174, 876, 1, 0, 0, 0, 176, 892, 1, 0, 0, 0, 178, 894, 1, 0, 0, 0, 180, 899, 1, 0, 0, 0, 182, 920, 1, 0, 0, 0, 184, 922, 1, 0, 0, 0, 186, 930, 1, 0, 0, 0, 188, 932, 1, 0, 0, 0, 190, 936, 1, 0, 0, 0, 192, 940, 1, 0, 0, 0, 194, 944, 1, 0, 0, 0, 196, 949, 1, 0, 0, 0, 198, 953, 1, 0, 0, 0, 200, 957, 1, 0, 0, 0, 202, 961, 1, 0, 0, 0, 204, 965, 1, 0, 0, 0, 206, 969, 1, 0, 0, 0, 208, 978, 1, 0, 0, 0, 210, 982, 1, 0, 0, 0, 212, 986, 1, 0, 0, 0, 214, 990, 1, 0, 0, 0, 216, 994, 1, 0, 0, 0, 218, 999, 1, 0, 0, 0, 220, 1003, 1, 0, 0, 0, 222, 1011, 1, 0, 0, 0, 224, 1032, 1, 0, 0, 0, 226, 1036, 1, 0, 0, 0, 228, 1040, 1, 0, 0, 0, 230, 1044, 1, 0, 0, 0, 232, 1048, 1, 0, 0, 0, 234, 1052, 1, 0, 0, 0, 236, 1057, 1, 0, 0, 0, 238, 1061, 1, 0, 0, 0, 240, 1065, 1, 0, 0, 0, 242, 1069, 1, 0, 0, 0, 244, 1072, 1, 0, 0, 0, 246, 1076, 1, 0, 0, 0, 248, 1080, 1, 0, 0, 0, 250, 1084, 1, 0, 0, 0, 252, 1088, 1, 0, 0, 0, 254, 1093, 1, 0, 0, 0, 256, 1098, 1, 0, 0, 0, 258, 1103, 1, 0, 0, 0, 260, 1110, 1, 0, 0, 0, 262, 1119, 1, 0, 0, 0, 264, 1126, 1, 0, 0, 0, 266, 1130, 1, 0, 0, 0, 268, 1134, 1, 0, 0, 0, 270, 1138, 1, 0, 0, 0, 272, 1142, 1, 0, 0, 0, 274, 1146, 1, 0, 0, 0, 276, 1152, 1, 0, 0, 0, 278, 1156, 1, 0, 0, 0, 280, 1160, 1, 0, 0, 0, 282, 1164, 1, 0, 0, 0, 284, 1168, 1, 0, 0, 0, 286, 1172, 1, 0, 0, 0, 288, 1176, 1, 0, 0, 0, 290, 1180, 1, 0, 0, 0, 292, 1184, 1, 0, 0, 0, 294, 1188, 1, 0, 0, 0, 296, 1193, 1, 0, 0, 0, 298, 1197, 1, 0, 0, 0, 300, 1201, 1, 0, 0, 0, 302, 1206, 1, 0, 0, 0, 304, 1210, 1, 0, 0, 0, 306, 1214, 1, 0, 0, 0, 308, 1218, 1, 0, 0, 0, 310, 1222, 1, 0, 0, 0, 312, 1228, 1, 0, 0, 0, 314, 1232, 1, 0, 0, 0, 316, 1236, 1, 0, 0, 0, 318, 1240, 1, 0, 0, 0, 320, 1244, 1, 0, 0, 0, 322, 1248, 1, 0, 0, 0, 324, 1252, 1, 0, 0, 0, 326, 1257, 1, 0, 0, 0, 328, 1261, 1, 0, 0, 0, 330, 1265, 1, 0, 0, 0, 332, 1269, 1, 0, 0, 0, 334, 1273, 1, 0, 0, 0, 336, 1277, 1, 0, 0, 0, 338, 1281, 1, 0, 0, 0, 340, 1286, 1, 0, 0, 0, 342, 1291, 1, 0, 0, 0, 344, 1295, 1, 0, 0, 0, 346, 1299, 1, 0, 0, 0, 348, 1303, 1, 0, 0, 0, 350, 1308, 1, 0, 0, 0, 352, 1318, 1, 0, 0, 0, 354, 1322, 1, 0, 0, 0, 356, 1326, 1, 0, 0, 0, 358, 1330, 1, 0, 0, 0, 360, 1335, 1, 0, 0, 0, 362, 1342, 1, 0, 0, 0, 364, 1346, 1, 0, 0, 0, 366, 1350, 1, 0, 0, 0, 368, 1354, 1, 0, 0, 0, 370, 1358, 1, 0, 0, 0, 372, 1363, 1, 0, 0, 0, 374, 1369, 1, 0, 0, 0, 376, 1373, 1, 0, 0, 0, 378, 1377, 1, 0, 0, 0, 380, 1381, 1, 0, 0, 0, 382, 1387, 1, 0, 0, 0, 384, 1391, 1, 0, 0, 0, 386, 1395, 1, 0, 0, 0, 388, 1399, 1, 0, 0, 0, 390, 1405, 1, 0, 0, 0, 392, 1411, 1, 0, 0, 0, 394, 1417, 1, 0, 0, 0, 396, 397, 7, 0, 0, 0, 397, 398, 7, 1, 0, 0, 398, 399, 7, 2, 0, 0, 399, 400, 7, 2, 0, 0, 400, 401, 7, 3, 0, 0, 401, 402, 7, 4, 0, 0, 402, 403, 7, 5, 0, 0, 403, 404, 1, 0, 0, 0, 404, 405, 6, 0, 0, 0, 405, 17, 1, 0, 0, 0, 406, 407, 7, 0, 0, 0, 407, 408, 7, 6, 0, 0, 408, 409, 7, 7, 0, 0, 409, 410, 7, 8, 0, 0, 410, 411, 1, 0, 0, 0, 411, 412, 6, 1, 1, 0, 412, 19, 1, 0, 0, 0, 413, 414, 7, 3, 0, 0, 414, 415, 7, 9, 0, 0, 415, 416, 7, 6, 0, 0, 416, 417, 7, 1, 0, 0, 417, 418, 7, 4, 0, 0, 418, 419, 7, 10, 0, 0, 419, 420, 1, 0, 0, 0, 420, 421, 6, 2, 2, 0, 421, 21, 1, 0, 0, 0, 422, 423, 7, 3, 0, 0, 423, 424, 7, 11, 0, 0, 424, 425, 7, 12, 0, 0, 425, 426, 7, 13, 0, 0, 426, 427, 1, 0, 0, 0, 427, 428, 6, 3, 0, 0, 428, 23, 1, 0, 0, 0, 429, 430, 7, 3, 0, 0, 430, 431, 7, 14, 0, 0, 431, 432, 7, 8, 0, 0, 432, 433, 7, 13, 0, 0, 433, 434, 7, 12, 0, 0, 434, 435, 7, 1, 0, 0, 435, 436, 7, 9, 0, 0, 436, 437, 1, 0, 0, 0, 437, 438, 6, 4, 3, 0, 438, 25, 1, 0, 0, 0, 439, 440, 7, 15, 0, 0, 440, 441, 7, 6, 0, 0, 441, 442, 7, 7, 0, 0, 442, 443, 7, 16, 0, 0, 443, 444, 1, 0, 0, 0, 444, 445, 6, 5, 4, 0, 445, 27, 1, 0, 0, 0, 446, 447, 7, 17, 0, 0, 447, 448, 7, 6, 0, 0, 448, 449, 7, 7, 0, 0, 449, 450, 7, 18, 0, 0, 450, 451, 1, 0, 0, 0, 451, 452, 6, 6, 0, 0, 452, 29, 1, 0, 0, 0, 453, 454, 7, 1, 0, 0, 454, 455, 7, 9, 0, 0, 455, 456, 7, 13, 0, 0, 456, 457, 7, 1, 0, 0, 457, 458, 7, 9, 0, 0, 458, 459, 7, 3, 0, 0, 459, 460, 7, 2, 0, 0, 460, 461, 7, 5, 0, 0, 461, 462, 7, 12, 0, 0, 462, 463, 7, 5, 0, 0, 463, 464, 7, 2, 0, 0, 464, 465, 1, 0, 0, 0, 465, 466, 6, 7, 0, 0, 466, 31, 1, 0, 0, 0, 467, 468, 7, 18, 0, 0, 468, 469, 7, 3, 0, 0, 469, 470, 7, 3, 0, 0, 470, 471, 7, 8, 0, 0, 471, 472, 1, 0, 0, 0, 472, 473, 6, 8, 1, 0, 473, 33, 1, 0, 0, 0, 474, 475, 7, 13, 0, 0, 475, 476, 7, 1, 0, 0, 476, 477, 7, 16, 0, 0, 477, 478, 7, 1, 0, 0, 478, 479, 7, 5, 0, 0, 479, 480, 1, 0, 0, 0, 480, 481, 6, 9, 0, 0, 481, 35, 1, 0, 0, 0, 482, 483, 7, 13, 0, 0, 483, 484, 7, 7, 0, 0, 484, 485, 7, 7, 0, 0, 485, 486, 7, 18, 0, 0, 486, 487, 7, 19, 0, 0, 487, 488, 7, 8, 0, 0, 488, 489, 1, 0, 0, 0, 489, 490, 6, 10, 5, 0, 490, 37, 1, 0, 0, 0, 491, 492, 7, 16, 0, 0, 492, 493, 7, 3, 0, 0, 493, 494, 7, 5, 0, 0, 494, 495, 7, 12, 0, 0, 495, 496, 1, 0, 0, 0, 496, 497, 6, 11, 6, 0, 497, 39, 1, 0, 0, 0, 498, 499, 7, 16, 0, 0, 499, 500, 7, 3, 0, 0, 500, 501, 7, 5, 0, 0, 501, 502, 7, 6, 0, 0, 502, 503, 7, 1, 0, 0, 503, 504, 7, 4, 0, 0, 504, 505, 7, 2, 0, 0, 505, 506, 1, 0, 0, 0, 506, 507, 6, 12, 7, 0, 507, 41, 1, 0, 0, 0, 508, 509, 7, 16, 0, 0, 509, 510, 7, 11, 0, 0, 510, 511, 5, 95, 0, 0, 511, 512, 7, 3, 0, 0, 512, 513, 7, 14, 0, 0, 513, 514, 7, 8, 0, 0, 514, 515, 7, 12, 0, 0, 515, 516, 7, 9, 0, 0, 516, 517, 7, 0, 0, 0, 517, 518, 1, 0, 0, 0, 518, 519, 6, 13, 8, 0, 519, 43, 1, 0, 0, 0, 520, 521, 7, 6, 0, 0, 521, 522, 7, 3, 0, 0, 522, 523, 7, 9, 0, 0, 523, 524, 7, 12, 0, 0, 524, 525, 7, 16, 0, 0, 525, 526, 7, 3, 0, 0, 526, 527, 1, 0, 0, 0, 527, 528, 6, 14, 9, 0, 528, 45, 1, 0, 0, 0, 529, 530, 7, 6, 0, 0, 530, 531, 7, 7, 0, 0, 531, 532, 7, 20, 0, 0, 532, 533, 1, 0, 0, 0, 533, 534, 6, 15, 0, 0, 534, 47, 1, 0, 0, 0, 535, 536, 7, 2, 0, 0, 536, 537, 7, 10, 0, 0, 537, 538, 7, 7, 0, 0, 538, 539, 7, 20, 0, 0, 539, 540, 1, 0, 0, 0, 540, 541, 6, 16, 10, 0, 541, 49, 1, 0, 0, 0, 542, 543, 7, 2, 0, 0, 543, 544, 7, 7, 0, 0, 544, 545, 7, 6, 0, 0, 545, 546, 7, 5, 0, 0, 546, 547, 1, 0, 0, 0, 547, 548, 6, 17, 0, 0, 548, 51, 1, 0, 0, 0, 549, 550, 7, 2, 0, 0, 550, 551, 7, 5, 0, 0, 551, 552, 7, 12, 0, 0, 552, 553, 7, 5, 0, 0, 553, 554, 7, 2, 0, 0, 554, 555, 1, 0, 0, 0, 555, 556, 6, 18, 0, 0, 556, 53, 1, 0, 0, 0, 557, 558, 7, 20, 0, 0, 558, 559, 7, 10, 0, 0, 559, 560, 7, 3, 0, 0, 560, 561, 7, 6, 0, 0, 561, 562, 7, 3, 0, 0, 562, 563, 1, 0, 0, 0, 563, 564, 6, 19, 0, 0, 564, 55, 1, 0, 0, 0, 565, 567, 8, 21, 0, 0, 566, 565, 1, 0, 0, 0, 567, 568, 1, 0, 0, 0, 568, 566, 1, 0, 0, 0, 568, 569, 1, 0, 0, 0, 569, 570, 1, 0, 0, 0, 570, 571, 6, 20, 0, 0, 571, 57, 1, 0, 0, 0, 572, 573, 5, 47, 0, 0, 573, 574, 5, 47, 0, 0, 574, 578, 1, 0, 0, 0, 575, 577, 8, 22, 0, 0, 576, 575, 1, 0, 0, 0, 577, 580, 1, 0, 0, 0, 578, 576, 1, 0, 0, 0, 578, 579, 1, 0, 0, 0, 579, 582, 1, 0, 0, 0, 580, 578, 1, 0, 0, 0, 581, 583, 5, 13, 0, 0, 582, 581, 1, 0, 0, 0, 582, 583, 1, 0, 0, 0, 583, 585, 1, 0, 0, 0, 584, 586, 5, 10, 0, 0, 585, 584, 1, 0, 0, 0, 585, 586, 1, 0, 0, 0, 586, 587, 1, 0, 0, 0, 587, 588, 6, 21, 11, 0, 588, 59, 1, 0, 0, 0, 589, 590, 5, 47, 0, 0, 590, 591, 5, 42, 0, 0, 591, 596, 1, 0, 0, 0, 592, 595, 3, 60, 22, 0, 593, 595, 9, 0, 0, 0, 594, 592, 1, 0, 0, 0, 594, 593, 1, 0, 0, 0, 595, 598, 1, 0, 0, 0, 596, 597, 1, 0, 0, 0, 596, 594, 1, 0, 0, 0, 597, 599, 1, 0, 0, 0, 598, 596, 1, 0, 0, 0, 599, 600, 5, 42, 0, 0, 600, 601, 5, 47, 0, 0, 601, 602, 1, 0, 0, 0, 602, 603, 6, 22, 11, 0, 603, 61, 1, 0, 0, 0, 604, 606, 7, 23, 0, 0, 605, 604, 1, 0, 0, 0, 606, 607, 1, 0, 0, 0, 607, 605, 1, 0, 0, 0, 607, 608, 1, 0, 0, 0, 608, 609, 1, 0, 0, 0, 609, 610, 6, 23, 11, 0, 610, 63, 1, 0, 0, 0, 611, 615, 8, 24, 0, 0, 612, 613, 5, 47, 0, 0, 613, 615, 8, 25, 0, 0, 614, 611, 1, 0, 0, 0, 614, 612, 1, 0, 0, 0, 615, 65, 1, 0, 0, 0, 616, 618, 3, 64, 24, 0, 617, 616, 1, 0, 0, 0, 618, 619, 1, 0, 0, 0, 619, 617, 1, 0, 0, 0, 619, 620, 1, 0, 0, 0, 620, 67, 1, 0, 0, 0, 621, 622, 3, 178, 81, 0, 622, 623, 1, 0, 0, 0, 623, 624, 6, 26, 12, 0, 624, 625, 6, 26, 13, 0, 625, 69, 1, 0, 0, 0, 626, 627, 3, 78, 31, 0, 627, 628, 1, 0, 0, 0, 628, 629, 6, 27, 14, 0, 629, 630, 6, 27, 15, 0, 630, 71, 1, 0, 0, 0, 631, 632, 3, 62, 23, 0, 632, 633, 1, 0, 0, 0, 633, 634, 6, 28, 11, 0, 634, 73, 1, 0, 0, 0, 635, 636, 3, 58, 21, 0, 636, 637, 1, 0, 0, 0, 637, 638, 6, 29, 11, 0, 638, 75, 1, 0, 0, 0, 639, 640, 3, 60, 22, 0, 640, 641, 1, 0, 0, 0, 641, 642, 6, 30, 11, 0, 642, 77, 1, 0, 0, 0, 643, 644, 5, 124, 0, 0, 644, 645, 1, 0, 0, 0, 645, 646, 6, 31, 15, 0, 646, 79, 1, 0, 0, 0, 647, 648, 7, 26, 0, 0, 648, 81, 1, 0, 0, 0, 649, 650, 7, 27, 0, 0, 650, 83, 1, 0, 0, 0, 651, 652, 5, 92, 0, 0, 652, 653, 7, 28, 0, 0, 653, 85, 1, 0, 0, 0, 654, 655, 8, 29, 0, 0, 655, 87, 1, 0, 0, 0, 656, 658, 7, 3, 0, 0, 657, 659, 7, 30, 0, 0, 658, 657, 1, 0, 0, 0, 658, 659, 1, 0, 0, 0, 659, 661, 1, 0, 0, 0, 660, 662, 3, 80, 32, 0, 661, 660, 1, 0, 0, 0, 662, 663, 1, 0, 0, 0, 663, 661, 1, 0, 0, 0, 663, 664, 1, 0, 0, 0, 664, 89, 1, 0, 0, 0, 665, 666, 5, 64, 0, 0, 666, 91, 1, 0, 0, 0, 667, 668, 5, 96, 0, 0, 668, 93, 1, 0, 0, 0, 669, 673, 8, 31, 0, 0, 670, 671, 5, 96, 0, 0, 671, 673, 5, 96, 0, 0, 672, 669, 1, 0, 0, 0, 672, 670, 1, 0, 0, 0, 673, 95, 1, 0, 0, 0, 674, 675, 5, 95, 0, 0, 675, 97, 1, 0, 0, 0, 676, 680, 3, 82, 33, 0, 677, 680, 3, 80, 32, 0, 678, 680, 3, 96, 40, 0, 679, 676, 1, 0, 0, 0, 679, 677, 1, 0, 0, 0, 679, 678, 1, 0, 0, 0, 680, 99, 1, 0, 0, 0, 681, 686, 5, 34, 0, 0, 682, 685, 3, 84, 34, 0, 683, 685, 3, 86, 35, 0, 684, 682, 1, 0, 0, 0, 684, 683, 1, 0, 0, 0, 685, 688, 1, 0, 0, 0, 686, 684, 1, 0, 0, 0, 686, 687, 1, 0, 0, 0, 687, 689, 1, 0, 0, 0, 688, 686, 1, 0, 0, 0, 689, 711, 5, 34, 0, 0, 690, 691, 5, 34, 0, 0, 691, 692, 5, 34, 0, 0, 692, 693, 5, 34, 0, 0, 693, 697, 1, 0, 0, 0, 694, 696, 8, 22, 0, 0, 695, 694, 1, 0, 0, 0, 696, 699, 1, 0, 0, 0, 697, 698, 1, 0, 0, 0, 697, 695, 1, 0, 0, 0, 698, 700, 1, 0, 0, 0, 699, 697, 1, 0, 0, 0, 700, 701, 5, 34, 0, 0, 701, 702, 5, 34, 0, 0, 702, 703, 5, 34, 0, 0, 703, 705, 1, 0, 0, 0, 704, 706, 5, 34, 0, 0, 705, 704, 1, 0, 0, 0, 705, 706, 1, 0, 0, 0, 706, 708, 1, 0, 0, 0, 707, 709, 5, 34, 0, 0, 708, 707, 1, 0, 0, 0, 708, 709, 1, 0, 0, 0, 709, 711, 1, 0, 0, 0, 710, 681, 1, 0, 0, 0, 710, 690, 1, 0, 0, 0, 711, 101, 1, 0, 0, 0, 712, 714, 3, 80, 32, 0, 713, 712, 1, 0, 0, 0, 714, 715, 1, 0, 0, 0, 715, 713, 1, 0, 0, 0, 715, 716, 1, 0, 0, 0, 716, 103, 1, 0, 0, 0, 717, 719, 3, 80, 32, 0, 718, 717, 1, 0, 0, 0, 719, 720, 1, 0, 0, 0, 720, 718, 1, 0, 0, 0, 720, 721, 1, 0, 0, 0, 721, 722, 1, 0, 0, 0, 722, 726, 3, 120, 52, 0, 723, 725, 3, 80, 32, 0, 724, 723, 1, 0, 0, 0, 725, 728, 1, 0, 0, 0, 726, 724, 1, 0, 0, 0, 726, 727, 1, 0, 0, 0, 727, 760, 1, 0, 0, 0, 728, 726, 1, 0, 0, 0, 729, 731, 3, 120, 52, 0, 730, 732, 3, 80, 32, 0, 731, 730, 1, 0, 0, 0, 732, 733, 1, 0, 0, 0, 733, 731, 1, 0, 0, 0, 733, 734, 1, 0, 0, 0, 734, 760, 1, 0, 0, 0, 735, 737, 3, 80, 32, 0, 736, 735, 1, 0, 0, 0, 737, 738, 1, 0, 0, 0, 738, 736, 1, 0, 0, 0, 738, 739, 1, 0, 0, 0, 739, 747, 1, 0, 0, 0, 740, 744, 3, 120, 52, 0, 741, 743, 3, 80, 32, 0, 742, 741, 1, 0, 0, 0, 743, 746, 1, 0, 0, 0, 744, 742, 1, 0, 0, 0, 744, 745, 1, 0, 0, 0, 745, 748, 1, 0, 0, 0, 746, 744, 1, 0, 0, 0, 747, 740, 1, 0, 0, 0, 747, 748, 1, 0, 0, 0, 748, 749, 1, 0, 0, 0, 749, 750, 3, 88, 36, 0, 750, 760, 1, 0, 0, 0, 751, 753, 3, 120, 52, 0, 752, 754, 3, 80, 32, 0, 753, 752, 1, 0, 0, 0, 754, 755, 1, 0, 0, 0, 755, 753, 1, 0, 0, 0, 755, 756, 1, 0, 0, 0, 756, 757, 1, 0, 0, 0, 757, 758, 3, 88, 36, 0, 758, 760, 1, 0, 0, 0, 759, 718, 1, 0, 0, 0, 759, 729, 1, 0, 0, 0, 759, 736, 1, 0, 0, 0, 759, 751, 1, 0, 0, 0, 760, 105, 1, 0, 0, 0, 761, 762, 7, 32, 0, 0, 762, 763, 7, 33, 0, 0, 763, 107, 1, 0, 0, 0, 764, 765, 7, 12, 0, 0, 765, 766, 7, 9, 0, 0, 766, 767, 7, 0, 0, 0, 767, 109, 1, 0, 0, 0, 768, 769, 7, 12, 0, 0, 769, 770, 7, 2, 0, 0, 770, 771, 7, 4, 0, 0, 771, 111, 1, 0, 0, 0, 772, 773, 5, 61, 0, 0, 773, 113, 1, 0, 0, 0, 774, 775, 5, 58, 0, 0, 775, 776, 5, 58, 0, 0, 776, 115, 1, 0, 0, 0, 777, 778, 5, 44, 0, 0, 778, 117, 1, 0, 0, 0, 779, 780, 7, 0, 0, 0, 780, 781, 7, 3, 0, 0, 781, 782, 7, 2, 0, 0, 782, 783, 7, 4, 0, 0, 783, 119, 1, 0, 0, 0, 784, 785, 5, 46, 0, 0, 785, 121, 1, 0, 0, 0, 786, 787, 7, 15, 0, 0, 787, 788, 7, 12, 0, 0, 788, 789, 7, 13, 0, 0, 789, 790, 7, 2, 0, 0, 790, 791, 7, 3, 0, 0, 791, 123, 1, 0, 0, 0, 792, 793, 7, 15, 0, 0, 793, 794, 7, 1, 0, 0, 794, 795, 7, 6, 0, 0, 795, 796, 7, 2, 0, 0, 796, 797, 7, 5, 0, 0, 797, 125, 1, 0, 0, 0, 798, 799, 7, 13, 0, 0, 799, 800, 7, 12, 0, 0, 800, 801, 7, 2, 0, 0, 801, 802, 7, 5, 0, 0, 802, 127, 1, 0, 0, 0, 803, 804, 5, 40, 0, 0, 804, 129, 1, 0, 0, 0, 805, 806, 7, 1, 0, 0, 806, 807, 7, 9, 0, 0, 807, 131, 1, 0, 0, 0, 808, 809, 7, 1, 0, 0, 809, 810, 7, 2, 0, 0, 810, 133, 1, 0, 0, 0, 811, 812, 7, 13, 0, 0, 812, 813, 7, 1, 0, 0, 813, 814, 7, 18, 0, 0, 814, 815, 7, 3, 0, 0, 815, 135, 1, 0, 0, 0, 816, 817, 7, 9, 0, 0, 817, 818, 7, 7, 0, 0, 818, 819, 7, 5, 0, 0, 819, 137, 1, 0, 0, 0, 820, 821, 7, 9, 0, 0, 821, 822, 7, 19, 0, 0, 822, 823, 7, 13, 0, 0, 823, 824, 7, 13, 0, 0, 824, 139, 1, 0, 0, 0, 825, 826, 7, 9, 0, 0, 826, 827, 7, 19, 0, 0, 827, 828, 7, 13, 0, 0, 828, 829, 7, 13, 0, 0, 829, 830, 7, 2, 0, 0, 830, 141, 1, 0, 0, 0, 831, 832, 7, 7, 0, 0, 832, 833, 7, 6, 0, 0, 833, 143, 1, 0, 0, 0, 834, 835, 5, 63, 0, 0, 835, 145, 1, 0, 0, 0, 836, 837, 7, 6, 0, 0, 837, 838, 7, 13, 0, 0, 838, 839, 7, 1, 0, 0, 839, 840, 7, 18, 0, 0, 840, 841, 7, 3, 0, 0, 841, 147, 1, 0, 0, 0, 842, 843, 5, 41, 0, 0, 843, 149, 1, 0, 0, 0, 844, 845, 7, 5, 0, 0, 845, 846, 7, 6, 0, 0, 846, 847, 7, 19, 0, 0, 847, 848, 7, 3, 0, 0, 848, 151, 1, 0, 0, 0, 849, 850, 5, 61, 0, 0, 850, 851, 5, 61, 0, 0, 851, 153, 1, 0, 0, 0, 852, 853, 5, 61, 0, 0, 853, 854, 5, 126, 0, 0, 854, 155, 1, 0, 0, 0, 855, 856, 5, 33, 0, 0, 856, 857, 5, 61, 0, 0, 857, 157, 1, 0, 0, 0, 858, 859, 5, 60, 0, 0, 859, 159, 1, 0, 0, 0, 860, 861, 5, 60, 0, 0, 861, 862, 5, 61, 0, 0, 862, 161, 1, 0, 0, 0, 863, 864, 5, 62, 0, 0, 864, 163, 1, 0, 0, 0, 865, 866, 5, 62, 0, 0, 866, 867, 5, 61, 0, 0, 867, 165, 1, 0, 0, 0, 868, 869, 5, 43, 0, 0, 869, 167, 1, 0, 0, 0, 870, 871, 5, 45, 0, 0, 871, 169, 1, 0, 0, 0, 872, 873, 5, 42, 0, 0, 873, 171, 1, 0, 0, 0, 874, 875, 5, 47, 0, 0, 875, 173, 1, 0, 0, 0, 876, 877, 5, 37, 0, 0, 877, 175, 1, 0, 0, 0, 878, 879, 3, 144, 64, 0, 879, 883, 3, 82, 33, 0, 880, 882, 3, 98, 41, 0, 881, 880, 1, 0, 0, 0, 882, 885, 1, 0, 0, 0, 883, 881, 1, 0, 0, 0, 883, 884, 1, 0, 0, 0, 884, 893, 1, 0, 0, 0, 885, 883, 1, 0, 0, 0, 886, 888, 3, 144, 64, 0, 887, 889, 3, 80, 32, 0, 888, 887, 1, 0, 0, 0, 889, 890, 1, 0, 0, 0, 890, 888, 1, 0, 0, 0, 890, 891, 1, 0, 0, 0, 891, 893, 1, 0, 0, 0, 892, 878, 1, 0, 0, 0, 892, 886, 1, 0, 0, 0, 893, 177, 1, 0, 0, 0, 894, 895, 5, 91, 0, 0, 895, 896, 1, 0, 0, 0, 896, 897, 6, 81, 0, 0, 897, 898, 6, 81, 0, 0, 898, 179, 1, 0, 0, 0, 899, 900, 5, 93, 0, 0, 900, 901, 1, 0, 0, 0, 901, 902, 6, 82, 15, 0, 902, 903, 6, 82, 15, 0, 903, 181, 1, 0, 0, 0, 904, 908, 3, 82, 33, 0, 905, 907, 3, 98, 41, 0, 906, 905, 1, 0, 0, 0, 907, 910, 1, 0, 0, 0, 908, 906, 1, 0, 0, 0, 908, 909, 1, 0, 0, 0, 909, 921, 1, 0, 0, 0, 910, 908, 1, 0, 0, 0, 911, 914, 3, 96, 40, 0, 912, 914, 3, 90, 37, 0, 913, 911, 1, 0, 0, 0, 913, 912, 1, 0, 0, 0, 914, 916, 1, 0, 0, 0, 915, 917, 3, 98, 41, 0, 916, 915, 1, 0, 0, 0, 917, 918, 1, 0, 0, 0, 918, 916, 1, 0, 0, 0, 918, 919, 1, 0, 0, 0, 919, 921, 1, 0, 0, 0, 920, 904, 1, 0, 0, 0, 920, 913, 1, 0, 0, 0, 921, 183, 1, 0, 0, 0, 922, 924, 3, 92, 38, 0, 923, 925, 3, 94, 39, 0, 924, 923, 1, 0, 0, 0, 925, 926, 1, 0, 0, 0, 926, 924, 1, 0, 0, 0, 926, 927, 1, 0, 0, 0, 927, 928, 1, 0, 0, 0, 928, 929, 3, 92, 38, 0, 929, 185, 1, 0, 0, 0, 930, 931, 3, 184, 84, 0, 931, 187, 1, 0, 0, 0, 932, 933, 3, 58, 21, 0, 933, 934, 1, 0, 0, 0, 934, 935, 6, 86, 11, 0, 935, 189, 1, 0, 0, 0, 936, 937, 3, 60, 22, 0, 937, 938, 1, 0, 0, 0, 938, 939, 6, 87, 11, 0, 939, 191, 1, 0, 0, 0, 940, 941, 3, 62, 23, 0, 941, 942, 1, 0, 0, 0, 942, 943, 6, 88, 11, 0, 943, 193, 1, 0, 0, 0, 944, 945, 3, 78, 31, 0, 945, 946, 1, 0, 0, 0, 946, 947, 6, 89, 14, 0, 947, 948, 6, 89, 15, 0, 948, 195, 1, 0, 0, 0, 949, 950, 3, 178, 81, 0, 950, 951, 1, 0, 0, 0, 951, 952, 6, 90, 12, 0, 952, 197, 1, 0, 0, 0, 953, 954, 3, 180, 82, 0, 954, 955, 1, 0, 0, 0, 955, 956, 6, 91, 16, 0, 956, 199, 1, 0, 0, 0, 957, 958, 3, 116, 50, 0, 958, 959, 1, 0, 0, 0, 959, 960, 6, 92, 17, 0, 960, 201, 1, 0, 0, 0, 961, 962, 3, 112, 48, 0, 962, 963, 1, 0, 0, 0, 963, 964, 6, 93, 18, 0, 964, 203, 1, 0, 0, 0, 965, 966, 3, 100, 42, 0, 966, 967, 1, 0, 0, 0, 967, 968, 6, 94, 19, 0, 968, 205, 1, 0, 0, 0, 969, 970, 7, 16, 0, 0, 970, 971, 7, 3, 0, 0, 971, 972, 7, 5, 0, 0, 972, 973, 7, 12, 0, 0, 973, 974, 7, 0, 0, 0, 974, 975, 7, 12, 0, 0, 975, 976, 7, 5, 0, 0, 976, 977, 7, 12, 0, 0, 977, 207, 1, 0, 0, 0, 978, 979, 3, 66, 25, 0, 979, 980, 1, 0, 0, 0, 980, 981, 6, 96, 20, 0, 981, 209, 1, 0, 0, 0, 982, 983, 3, 58, 21, 0, 983, 984, 1, 0, 0, 0, 984, 985, 6, 97, 11, 0, 985, 211, 1, 0, 0, 0, 986, 987, 3, 60, 22, 0, 987, 988, 1, 0, 0, 0, 988, 989, 6, 98, 11, 0, 989, 213, 1, 0, 0, 0, 990, 991, 3, 62, 23, 0, 991, 992, 1, 0, 0, 0, 992, 993, 6, 99, 11, 0, 993, 215, 1, 0, 0, 0, 994, 995, 3, 78, 31, 0, 995, 996, 1, 0, 0, 0, 996, 997, 6, 100, 14, 0, 997, 998, 6, 100, 15, 0, 998, 217, 1, 0, 0, 0, 999, 1000, 3, 120, 52, 0, 1000, 1001, 1, 0, 0, 0, 1001, 1002, 6, 101, 21, 0, 1002, 219, 1, 0, 0, 0, 1003, 1004, 3, 116, 50, 0, 1004, 1005, 1, 0, 0, 0, 1005, 1006, 6, 102, 17, 0, 1006, 221, 1, 0, 0, 0, 1007, 1012, 3, 82, 33, 0, 1008, 1012, 3, 80, 32, 0, 1009, 1012, 3, 96, 40, 0, 1010, 1012, 3, 170, 77, 0, 1011, 1007, 1, 0, 0, 0, 1011, 1008, 1, 0, 0, 0, 1011, 1009, 1, 0, 0, 0, 1011, 1010, 1, 0, 0, 0, 1012, 223, 1, 0, 0, 0, 1013, 1016, 3, 82, 33, 0, 1014, 1016, 3, 170, 77, 0, 1015, 1013, 1, 0, 0, 0, 1015, 1014, 1, 0, 0, 0, 1016, 1020, 1, 0, 0, 0, 1017, 1019, 3, 222, 103, 0, 1018, 1017, 1, 0, 0, 0, 1019, 1022, 1, 0, 0, 0, 1020, 1018, 1, 0, 0, 0, 1020, 1021, 1, 0, 0, 0, 1021, 1033, 1, 0, 0, 0, 1022, 1020, 1, 0, 0, 0, 1023, 1026, 3, 96, 40, 0, 1024, 1026, 3, 90, 37, 0, 1025, 1023, 1, 0, 0, 0, 1025, 1024, 1, 0, 0, 0, 1026, 1028, 1, 0, 0, 0, 1027, 1029, 3, 222, 103, 0, 1028, 1027, 1, 0, 0, 0, 1029, 1030, 1, 0, 0, 0, 1030, 1028, 1, 0, 0, 0, 1030, 1031, 1, 0, 0, 0, 1031, 1033, 1, 0, 0, 0, 1032, 1015, 1, 0, 0, 0, 1032, 1025, 1, 0, 0, 0, 1033, 225, 1, 0, 0, 0, 1034, 1037, 3, 224, 104, 0, 1035, 1037, 3, 184, 84, 0, 1036, 1034, 1, 0, 0, 0, 1036, 1035, 1, 0, 0, 0, 1037, 1038, 1, 0, 0, 0, 1038, 1036, 1, 0, 0, 0, 1038, 1039, 1, 0, 0, 0, 1039, 227, 1, 0, 0, 0, 1040, 1041, 3, 58, 21, 0, 1041, 1042, 1, 0, 0, 0, 1042, 1043, 6, 106, 11, 0, 1043, 229, 1, 0, 0, 0, 1044, 1045, 3, 60, 22, 0, 1045, 1046, 1, 0, 0, 0, 1046, 1047, 6, 107, 11, 0, 1047, 231, 1, 0, 0, 0, 1048, 1049, 3, 62, 23, 0, 1049, 1050, 1, 0, 0, 0, 1050, 1051, 6, 108, 11, 0, 1051, 233, 1, 0, 0, 0, 1052, 1053, 3, 78, 31, 0, 1053, 1054, 1, 0, 0, 0, 1054, 1055, 6, 109, 14, 0, 1055, 1056, 6, 109, 15, 0, 1056, 235, 1, 0, 0, 0, 1057, 1058, 3, 112, 48, 0, 1058, 1059, 1, 0, 0, 0, 1059, 1060, 6, 110, 18, 0, 1060, 237, 1, 0, 0, 0, 1061, 1062, 3, 116, 50, 0, 1062, 1063, 1, 0, 0, 0, 1063, 1064, 6, 111, 17, 0, 1064, 239, 1, 0, 0, 0, 1065, 1066, 3, 120, 52, 0, 1066, 1067, 1, 0, 0, 0, 1067, 1068, 6, 112, 21, 0, 1068, 241, 1, 0, 0, 0, 1069, 1070, 7, 12, 0, 0, 1070, 1071, 7, 2, 0, 0, 1071, 243, 1, 0, 0, 0, 1072, 1073, 3, 226, 105, 0, 1073, 1074, 1, 0, 0, 0, 1074, 1075, 6, 114, 22, 0, 1075, 245, 1, 0, 0, 0, 1076, 1077, 3, 58, 21, 0, 1077, 1078, 1, 0, 0, 0, 1078, 1079, 6, 115, 11, 0, 1079, 247, 1, 0, 0, 0, 1080, 1081, 3, 60, 22, 0, 1081, 1082, 1, 0, 0, 0, 1082, 1083, 6, 116, 11, 0, 1083, 249, 1, 0, 0, 0, 1084, 1085, 3, 62, 23, 0, 1085, 1086, 1, 0, 0, 0, 1086, 1087, 6, 117, 11, 0, 1087, 251, 1, 0, 0, 0, 1088, 1089, 3, 78, 31, 0, 1089, 1090, 1, 0, 0, 0, 1090, 1091, 6, 118, 14, 0, 1091, 1092, 6, 118, 15, 0, 1092, 253, 1, 0, 0, 0, 1093, 1094, 3, 178, 81, 0, 1094, 1095, 1, 0, 0, 0, 1095, 1096, 6, 119, 12, 0, 1096, 1097, 6, 119, 23, 0, 1097, 255, 1, 0, 0, 0, 1098, 1099, 7, 7, 0, 0, 1099, 1100, 7, 9, 0, 0, 1100, 1101, 1, 0, 0, 0, 1101, 1102, 6, 120, 24, 0, 1102, 257, 1, 0, 0, 0, 1103, 1104, 7, 20, 0, 0, 1104, 1105, 7, 1, 0, 0, 1105, 1106, 7, 5, 0, 0, 1106, 1107, 7, 10, 0, 0, 1107, 1108, 1, 0, 0, 0, 1108, 1109, 6, 121, 24, 0, 1109, 259, 1, 0, 0, 0, 1110, 1111, 8, 34, 0, 0, 1111, 261, 1, 0, 0, 0, 1112, 1114, 3, 260, 122, 0, 1113, 1112, 1, 0, 0, 0, 1114, 1115, 1, 0, 0, 0, 1115, 1113, 1, 0, 0, 0, 1115, 1116, 1, 0, 0, 0, 1116, 1117, 1, 0, 0, 0, 1117, 1118, 3, 360, 172, 0, 1118, 1120, 1, 0, 0, 0, 1119, 1113, 1, 0, 0, 0, 1119, 1120, 1, 0, 0, 0, 1120, 1122, 1, 0, 0, 0, 1121, 1123, 3, 260, 122, 0, 1122, 1121, 1, 0, 0, 0, 1123, 1124, 1, 0, 0, 0, 1124, 1122, 1, 0, 0, 0, 1124, 1125, 1, 0, 0, 0, 1125, 263, 1, 0, 0, 0, 1126, 1127, 3, 186, 85, 0, 1127, 1128, 1, 0, 0, 0, 1128, 1129, 6, 124, 25, 0, 1129, 265, 1, 0, 0, 0, 1130, 1131, 3, 262, 123, 0, 1131, 1132, 1, 0, 0, 0, 1132, 1133, 6, 125, 26, 0, 1133, 267, 1, 0, 0, 0, 1134, 1135, 3, 58, 21, 0, 1135, 1136, 1, 0, 0, 0, 1136, 1137, 6, 126, 11, 0, 1137, 269, 1, 0, 0, 0, 1138, 1139, 3, 60, 22, 0, 1139, 1140, 1, 0, 0, 0, 1140, 1141, 6, 127, 11, 0, 1141, 271, 1, 0, 0, 0, 1142, 1143, 3, 62, 23, 0, 1143, 1144, 1, 0, 0, 0, 1144, 1145, 6, 128, 11, 0, 1145, 273, 1, 0, 0, 0, 1146, 1147, 3, 78, 31, 0, 1147, 1148, 1, 0, 0, 0, 1148, 1149, 6, 129, 14, 0, 1149, 1150, 6, 129, 15, 0, 1150, 1151, 6, 129, 15, 0, 1151, 275, 1, 0, 0, 0, 1152, 1153, 3, 112, 48, 0, 1153, 1154, 1, 0, 0, 0, 1154, 1155, 6, 130, 18, 0, 1155, 277, 1, 0, 0, 0, 1156, 1157, 3, 116, 50, 0, 1157, 1158, 1, 0, 0, 0, 1158, 1159, 6, 131, 17, 0, 1159, 279, 1, 0, 0, 0, 1160, 1161, 3, 120, 52, 0, 1161, 1162, 1, 0, 0, 0, 1162, 1163, 6, 132, 21, 0, 1163, 281, 1, 0, 0, 0, 1164, 1165, 3, 258, 121, 0, 1165, 1166, 1, 0, 0, 0, 1166, 1167, 6, 133, 27, 0, 1167, 283, 1, 0, 0, 0, 1168, 1169, 3, 226, 105, 0, 1169, 1170, 1, 0, 0, 0, 1170, 1171, 6, 134, 22, 0, 1171, 285, 1, 0, 0, 0, 1172, 1173, 3, 186, 85, 0, 1173, 1174, 1, 0, 0, 0, 1174, 1175, 6, 135, 25, 0, 1175, 287, 1, 0, 0, 0, 1176, 1177, 3, 58, 21, 0, 1177, 1178, 1, 0, 0, 0, 1178, 1179, 6, 136, 11, 0, 1179, 289, 1, 0, 0, 0, 1180, 1181, 3, 60, 22, 0, 1181, 1182, 1, 0, 0, 0, 1182, 1183, 6, 137, 11, 0, 1183, 291, 1, 0, 0, 0, 1184, 1185, 3, 62, 23, 0, 1185, 1186, 1, 0, 0, 0, 1186, 1187, 6, 138, 11, 0, 1187, 293, 1, 0, 0, 0, 1188, 1189, 3, 78, 31, 0, 1189, 1190, 1, 0, 0, 0, 1190, 1191, 6, 139, 14, 0, 1191, 1192, 6, 139, 15, 0, 1192, 295, 1, 0, 0, 0, 1193, 1194, 3, 116, 50, 0, 1194, 1195, 1, 0, 0, 0, 1195, 1196, 6, 140, 17, 0, 1196, 297, 1, 0, 0, 0, 1197, 1198, 3, 120, 52, 0, 1198, 1199, 1, 0, 0, 0, 1199, 1200, 6, 141, 21, 0, 1200, 299, 1, 0, 0, 0, 1201, 1202, 3, 256, 120, 0, 1202, 1203, 1, 0, 0, 0, 1203, 1204, 6, 142, 28, 0, 1204, 1205, 6, 142, 29, 0, 1205, 301, 1, 0, 0, 0, 1206, 1207, 3, 66, 25, 0, 1207, 1208, 1, 0, 0, 0, 1208, 1209, 6, 143, 20, 0, 1209, 303, 1, 0, 0, 0, 1210, 1211, 3, 58, 21, 0, 1211, 1212, 1, 0, 0, 0, 1212, 1213, 6, 144, 11, 0, 1213, 305, 1, 0, 0, 0, 1214, 1215, 3, 60, 22, 0, 1215, 1216, 1, 0, 0, 0, 1216, 1217, 6, 145, 11, 0, 1217, 307, 1, 0, 0, 0, 1218, 1219, 3, 62, 23, 0, 1219, 1220, 1, 0, 0, 0, 1220, 1221, 6, 146, 11, 0, 1221, 309, 1, 0, 0, 0, 1222, 1223, 3, 78, 31, 0, 1223, 1224, 1, 0, 0, 0, 1224, 1225, 6, 147, 14, 0, 1225, 1226, 6, 147, 15, 0, 1226, 1227, 6, 147, 15, 0, 1227, 311, 1, 0, 0, 0, 1228, 1229, 3, 116, 50, 0, 1229, 1230, 1, 0, 0, 0, 1230, 1231, 6, 148, 17, 0, 1231, 313, 1, 0, 0, 0, 1232, 1233, 3, 120, 52, 0, 1233, 1234, 1, 0, 0, 0, 1234, 1235, 6, 149, 21, 0, 1235, 315, 1, 0, 0, 0, 1236, 1237, 3, 226, 105, 0, 1237, 1238, 1, 0, 0, 0, 1238, 1239, 6, 150, 22, 0, 1239, 317, 1, 0, 0, 0, 1240, 1241, 3, 58, 21, 0, 1241, 1242, 1, 0, 0, 0, 1242, 1243, 6, 151, 11, 0, 1243, 319, 1, 0, 0, 0, 1244, 1245, 3, 60, 22, 0, 1245, 1246, 1, 0, 0, 0, 1246, 1247, 6, 152, 11, 0, 1247, 321, 1, 0, 0, 0, 1248, 1249, 3, 62, 23, 0, 1249, 1250, 1, 0, 0, 0, 1250, 1251, 6, 153, 11, 0, 1251, 323, 1, 0, 0, 0, 1252, 1253, 3, 78, 31, 0, 1253, 1254, 1, 0, 0, 0, 1254, 1255, 6, 154, 14, 0, 1255, 1256, 6, 154, 15, 0, 1256, 325, 1, 0, 0, 0, 1257, 1258, 3, 120, 52, 0, 1258, 1259, 1, 0, 0, 0, 1259, 1260, 6, 155, 21, 0, 1260, 327, 1, 0, 0, 0, 1261, 1262, 3, 186, 85, 0, 1262, 1263, 1, 0, 0, 0, 1263, 1264, 6, 156, 25, 0, 1264, 329, 1, 0, 0, 0, 1265, 1266, 3, 182, 83, 0, 1266, 1267, 1, 0, 0, 0, 1267, 1268, 6, 157, 30, 0, 1268, 331, 1, 0, 0, 0, 1269, 1270, 3, 58, 21, 0, 1270, 1271, 1, 0, 0, 0, 1271, 1272, 6, 158, 11, 0, 1272, 333, 1, 0, 0, 0, 1273, 1274, 3, 60, 22, 0, 1274, 1275, 1, 0, 0, 0, 1275, 1276, 6, 159, 11, 0, 1276, 335, 1, 0, 0, 0, 1277, 1278, 3, 62, 23, 0, 1278, 1279, 1, 0, 0, 0, 1279, 1280, 6, 160, 11, 0, 1280, 337, 1, 0, 0, 0, 1281, 1282, 3, 78, 31, 0, 1282, 1283, 1, 0, 0, 0, 1283, 1284, 6, 161, 14, 0, 1284, 1285, 6, 161, 15, 0, 1285, 339, 1, 0, 0, 0, 1286, 1287, 7, 1, 0, 0, 1287, 1288, 7, 9, 0, 0, 1288, 1289, 7, 15, 0, 0, 1289, 1290, 7, 7, 0, 0, 1290, 341, 1, 0, 0, 0, 1291, 1292, 3, 58, 21, 0, 1292, 1293, 1, 0, 0, 0, 1293, 1294, 6, 163, 11, 0, 1294, 343, 1, 0, 0, 0, 1295, 1296, 3, 60, 22, 0, 1296, 1297, 1, 0, 0, 0, 1297, 1298, 6, 164, 11, 0, 1298, 345, 1, 0, 0, 0, 1299, 1300, 3, 62, 23, 0, 1300, 1301, 1, 0, 0, 0, 1301, 1302, 6, 165, 11, 0, 1302, 347, 1, 0, 0, 0, 1303, 1304, 3, 78, 31, 0, 1304, 1305, 1, 0, 0, 0, 1305, 1306, 6, 166, 14, 0, 1306, 1307, 6, 166, 15, 0, 1307, 349, 1, 0, 0, 0, 1308, 1309, 7, 15, 0, 0, 1309, 1310, 7, 19, 0, 0, 1310, 1311, 7, 9, 0, 0, 1311, 1312, 7, 4, 0, 0, 1312, 1313, 7, 5, 0, 0, 1313, 1314, 7, 1, 0, 0, 1314, 1315, 7, 7, 0, 0, 1315, 1316, 7, 9, 0, 0, 1316, 1317, 7, 2, 0, 0, 1317, 351, 1, 0, 0, 0, 1318, 1319, 3, 58, 21, 0, 1319, 1320, 1, 0, 0, 0, 1320, 1321, 6, 168, 11, 0, 1321, 353, 1, 0, 0, 0, 1322, 1323, 3, 60, 22, 0, 1323, 1324, 1, 0, 0, 0, 1324, 1325, 6, 169, 11, 0, 1325, 355, 1, 0, 0, 0, 1326, 1327, 3, 62, 23, 0, 1327, 1328, 1, 0, 0, 0, 1328, 1329, 6, 170, 11, 0, 1329, 357, 1, 0, 0, 0, 1330, 1331, 3, 180, 82, 0, 1331, 1332, 1, 0, 0, 0, 1332, 1333, 6, 171, 16, 0, 1333, 1334, 6, 171, 15, 0, 1334, 359, 1, 0, 0, 0, 1335, 1336, 5, 58, 0, 0, 1336, 361, 1, 0, 0, 0, 1337, 1343, 3, 90, 37, 0, 1338, 1343, 3, 80, 32, 0, 1339, 1343, 3, 120, 52, 0, 1340, 1343, 3, 82, 33, 0, 1341, 1343, 3, 96, 40, 0, 1342, 1337, 1, 0, 0, 0, 1342, 1338, 1, 0, 0, 0, 1342, 1339, 1, 0, 0, 0, 1342, 1340, 1, 0, 0, 0, 1342, 1341, 1, 0, 0, 0, 1343, 1344, 1, 0, 0, 0, 1344, 1342, 1, 0, 0, 0, 1344, 1345, 1, 0, 0, 0, 1345, 363, 1, 0, 0, 0, 1346, 1347, 3, 58, 21, 0, 1347, 1348, 1, 0, 0, 0, 1348, 1349, 6, 174, 11, 0, 1349, 365, 1, 0, 0, 0, 1350, 1351, 3, 60, 22, 0, 1351, 1352, 1, 0, 0, 0, 1352, 1353, 6, 175, 11, 0, 1353, 367, 1, 0, 0, 0, 1354, 1355, 3, 62, 23, 0, 1355, 1356, 1, 0, 0, 0, 1356, 1357, 6, 176, 11, 0, 1357, 369, 1, 0, 0, 0, 1358, 1359, 3, 78, 31, 0, 1359, 1360, 1, 0, 0, 0, 1360, 1361, 6, 177, 14, 0, 1361, 1362, 6, 177, 15, 0, 1362, 371, 1, 0, 0, 0, 1363, 1364, 3, 66, 25, 0, 1364, 1365, 1, 0, 0, 0, 1365, 1366, 6, 178, 20, 0, 1366, 1367, 6, 178, 15, 0, 1367, 1368, 6, 178, 31, 0, 1368, 373, 1, 0, 0, 0, 1369, 1370, 3, 58, 21, 0, 1370, 1371, 1, 0, 0, 0, 1371, 1372, 6, 179, 11, 0, 1372, 375, 1, 0, 0, 0, 1373, 1374, 3, 60, 22, 0, 1374, 1375, 1, 0, 0, 0, 1375, 1376, 6, 180, 11, 0, 1376, 377, 1, 0, 0, 0, 1377, 1378, 3, 62, 23, 0, 1378, 1379, 1, 0, 0, 0, 1379, 1380, 6, 181, 11, 0, 1380, 379, 1, 0, 0, 0, 1381, 1382, 3, 116, 50, 0, 1382, 1383, 1, 0, 0, 0, 1383, 1384, 6, 182, 17, 0, 1384, 1385, 6, 182, 15, 0, 1385, 1386, 6, 182, 7, 0, 1386, 381, 1, 0, 0, 0, 1387, 1388, 3, 58, 21, 0, 1388, 1389, 1, 0, 0, 0, 1389, 1390, 6, 183, 11, 0, 1390, 383, 1, 0, 0, 0, 1391, 1392, 3, 60, 22, 0, 1392, 1393, 1, 0, 0, 0, 1393, 1394, 6, 184, 11, 0, 1394, 385, 1, 0, 0, 0, 1395, 1396, 3, 62, 23, 0, 1396, 1397, 1, 0, 0, 0, 1397, 1398, 6, 185, 11, 0, 1398, 387, 1, 0, 0, 0, 1399, 1400, 3, 186, 85, 0, 1400, 1401, 1, 0, 0, 0, 1401, 1402, 6, 186, 15, 0, 1402, 1403, 6, 186, 0, 0, 1403, 1404, 6, 186, 25, 0, 1404, 389, 1, 0, 0, 0, 1405, 1406, 3, 182, 83, 0, 1406, 1407, 1, 0, 0, 0, 1407, 1408, 6, 187, 15, 0, 1408, 1409, 6, 187, 0, 0, 1409, 1410, 6, 187, 30, 0, 1410, 391, 1, 0, 0, 0, 1411, 1412, 3, 106, 45, 0, 1412, 1413, 1, 0, 0, 0, 1413, 1414, 6, 188, 15, 0, 1414, 1415, 6, 188, 0, 0, 1415, 1416, 6, 188, 32, 0, 1416, 393, 1, 0, 0, 0, 1417, 1418, 3, 78, 31, 0, 1418, 1419, 1, 0, 0, 0, 1419, 1420, 6, 189, 14, 0, 1420, 1421, 6, 189, 15, 0, 1421, 395, 1, 0, 0, 0, 65, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 568, 578, 582, 585, 594, 596, 607, 614, 619, 658, 663, 672, 679, 684, 686, 697, 705, 708, 710, 715, 720, 726, 733, 738, 744, 747, 755, 759, 883, 890, 892, 908, 913, 918, 920, 926, 1011, 1015, 1020, 1025, 1030, 1032, 1036, 1038, 1115, 1119, 1124, 1342, 1344, 33, 5, 2, 0, 5, 4, 0, 5, 6, 0, 5, 1, 0, 5, 3, 0, 5, 8, 0, 5, 12, 0, 5, 14, 0, 5, 10, 0, 5, 5, 0, 5, 11, 0, 0, 1, 0, 7, 69, 0, 5, 0, 0, 7, 29, 0, 4, 0, 0, 7, 70, 0, 7, 38, 0, 7, 36, 0, 7, 30, 0, 7, 25, 0, 7, 40, 0, 7, 80, 0, 5, 13, 0, 5, 7, 0, 7, 72, 0, 7, 90, 0, 7, 89, 0, 7, 88, 0, 5, 9, 0, 7, 71, 0, 5, 15, 0, 7, 33, 0] \ No newline at end of file +[4, 0, 124, 1450, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, 2, 185, 7, 185, 2, 186, 7, 186, 2, 187, 7, 187, 2, 188, 7, 188, 2, 189, 7, 189, 2, 190, 7, 190, 2, 191, 7, 191, 2, 192, 7, 192, 2, 193, 7, 193, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 4, 20, 575, 8, 20, 11, 20, 12, 20, 576, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 585, 8, 21, 10, 21, 12, 21, 588, 9, 21, 1, 21, 3, 21, 591, 8, 21, 1, 21, 3, 21, 594, 8, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 5, 22, 603, 8, 22, 10, 22, 12, 22, 606, 9, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 4, 23, 614, 8, 23, 11, 23, 12, 23, 615, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 3, 24, 623, 8, 24, 1, 25, 4, 25, 626, 8, 25, 11, 25, 12, 25, 627, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 3, 36, 667, 8, 36, 1, 36, 4, 36, 670, 8, 36, 11, 36, 12, 36, 671, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 3, 39, 681, 8, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 3, 41, 688, 8, 41, 1, 42, 1, 42, 1, 42, 5, 42, 693, 8, 42, 10, 42, 12, 42, 696, 9, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 5, 42, 704, 8, 42, 10, 42, 12, 42, 707, 9, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 714, 8, 42, 1, 42, 3, 42, 717, 8, 42, 3, 42, 719, 8, 42, 1, 43, 4, 43, 722, 8, 43, 11, 43, 12, 43, 723, 1, 44, 4, 44, 727, 8, 44, 11, 44, 12, 44, 728, 1, 44, 1, 44, 5, 44, 733, 8, 44, 10, 44, 12, 44, 736, 9, 44, 1, 44, 1, 44, 4, 44, 740, 8, 44, 11, 44, 12, 44, 741, 1, 44, 4, 44, 745, 8, 44, 11, 44, 12, 44, 746, 1, 44, 1, 44, 5, 44, 751, 8, 44, 10, 44, 12, 44, 754, 9, 44, 3, 44, 756, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 4, 44, 762, 8, 44, 11, 44, 12, 44, 763, 1, 44, 1, 44, 3, 44, 768, 8, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 76, 1, 76, 1, 77, 1, 77, 1, 78, 1, 78, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 5, 80, 890, 8, 80, 10, 80, 12, 80, 893, 9, 80, 1, 80, 1, 80, 4, 80, 897, 8, 80, 11, 80, 12, 80, 898, 3, 80, 901, 8, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 5, 83, 915, 8, 83, 10, 83, 12, 83, 918, 9, 83, 1, 83, 1, 83, 3, 83, 922, 8, 83, 1, 83, 4, 83, 925, 8, 83, 11, 83, 12, 83, 926, 3, 83, 929, 8, 83, 1, 84, 1, 84, 4, 84, 933, 8, 84, 11, 84, 12, 84, 934, 1, 84, 1, 84, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, 1, 103, 1, 103, 1, 104, 1, 104, 1, 104, 1, 104, 3, 104, 1024, 8, 104, 1, 105, 1, 105, 3, 105, 1028, 8, 105, 1, 105, 5, 105, 1031, 8, 105, 10, 105, 12, 105, 1034, 9, 105, 1, 105, 1, 105, 3, 105, 1038, 8, 105, 1, 105, 4, 105, 1041, 8, 105, 11, 105, 12, 105, 1042, 3, 105, 1045, 8, 105, 1, 106, 1, 106, 4, 106, 1049, 8, 106, 11, 106, 12, 106, 1050, 1, 107, 1, 107, 1, 107, 1, 107, 1, 108, 1, 108, 1, 108, 1, 108, 1, 109, 1, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 111, 1, 111, 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 1, 112, 1, 113, 1, 113, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, 1, 115, 1, 115, 1, 115, 1, 115, 1, 116, 1, 116, 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 1, 117, 1, 118, 1, 118, 1, 118, 1, 118, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 123, 1, 123, 1, 124, 4, 124, 1126, 8, 124, 11, 124, 12, 124, 1127, 1, 124, 1, 124, 3, 124, 1132, 8, 124, 1, 124, 4, 124, 1135, 8, 124, 11, 124, 12, 124, 1136, 1, 125, 1, 125, 1, 125, 1, 125, 1, 126, 1, 126, 1, 126, 1, 126, 1, 127, 1, 127, 1, 127, 1, 127, 1, 128, 1, 128, 1, 128, 1, 128, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 130, 1, 130, 1, 130, 1, 130, 1, 131, 1, 131, 1, 131, 1, 131, 1, 132, 1, 132, 1, 132, 1, 132, 1, 133, 1, 133, 1, 133, 1, 133, 1, 134, 1, 134, 1, 134, 1, 134, 1, 135, 1, 135, 1, 135, 1, 135, 1, 136, 1, 136, 1, 136, 1, 136, 1, 137, 1, 137, 1, 137, 1, 137, 1, 138, 1, 138, 1, 138, 1, 138, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 141, 1, 142, 1, 142, 1, 142, 1, 142, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 144, 1, 144, 1, 144, 1, 144, 1, 145, 1, 145, 1, 145, 1, 145, 1, 146, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 147, 1, 147, 1, 148, 1, 148, 1, 148, 1, 148, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 150, 1, 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 151, 1, 152, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, 153, 1, 153, 1, 154, 1, 154, 1, 154, 1, 154, 1, 155, 1, 155, 1, 155, 1, 155, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, 1, 158, 1, 159, 1, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 161, 1, 161, 1, 162, 1, 162, 1, 162, 1, 162, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 165, 1, 165, 1, 165, 1, 165, 1, 166, 1, 166, 1, 166, 1, 166, 1, 167, 1, 167, 1, 167, 1, 167, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 170, 1, 170, 1, 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 174, 1, 174, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 4, 175, 1359, 8, 175, 11, 175, 12, 175, 1360, 1, 176, 1, 176, 1, 176, 1, 176, 1, 177, 1, 177, 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 178, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 182, 1, 182, 1, 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, 184, 1, 184, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 187, 1, 187, 1, 187, 1, 187, 1, 188, 1, 188, 1, 188, 1, 188, 1, 189, 1, 189, 1, 189, 1, 189, 1, 190, 1, 190, 1, 190, 1, 190, 1, 190, 1, 190, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 192, 1, 192, 1, 192, 1, 192, 1, 192, 1, 192, 1, 193, 1, 193, 1, 193, 1, 193, 1, 193, 2, 604, 705, 0, 194, 16, 1, 18, 2, 20, 3, 22, 4, 24, 5, 26, 6, 28, 7, 30, 8, 32, 9, 34, 10, 36, 11, 38, 12, 40, 13, 42, 14, 44, 15, 46, 16, 48, 17, 50, 18, 52, 19, 54, 20, 56, 21, 58, 22, 60, 23, 62, 24, 64, 0, 66, 25, 68, 0, 70, 0, 72, 26, 74, 27, 76, 28, 78, 29, 80, 0, 82, 0, 84, 0, 86, 0, 88, 0, 90, 0, 92, 0, 94, 0, 96, 0, 98, 0, 100, 30, 102, 31, 104, 32, 106, 33, 108, 34, 110, 35, 112, 36, 114, 37, 116, 38, 118, 39, 120, 40, 122, 41, 124, 42, 126, 43, 128, 44, 130, 45, 132, 46, 134, 47, 136, 48, 138, 49, 140, 50, 142, 51, 144, 52, 146, 53, 148, 54, 150, 55, 152, 56, 154, 57, 156, 58, 158, 59, 160, 60, 162, 61, 164, 62, 166, 63, 168, 64, 170, 65, 172, 66, 174, 67, 176, 68, 178, 69, 180, 70, 182, 71, 184, 0, 186, 72, 188, 73, 190, 74, 192, 75, 194, 0, 196, 0, 198, 0, 200, 0, 202, 0, 204, 0, 206, 76, 208, 0, 210, 0, 212, 77, 214, 78, 216, 79, 218, 0, 220, 0, 222, 0, 224, 0, 226, 0, 228, 80, 230, 81, 232, 82, 234, 83, 236, 0, 238, 0, 240, 0, 242, 0, 244, 84, 246, 0, 248, 85, 250, 86, 252, 87, 254, 0, 256, 0, 258, 88, 260, 89, 262, 0, 264, 90, 266, 0, 268, 91, 270, 92, 272, 93, 274, 0, 276, 0, 278, 0, 280, 0, 282, 0, 284, 0, 286, 0, 288, 94, 290, 95, 292, 96, 294, 0, 296, 0, 298, 0, 300, 0, 302, 0, 304, 0, 306, 0, 308, 97, 310, 98, 312, 99, 314, 0, 316, 0, 318, 0, 320, 0, 322, 100, 324, 101, 326, 102, 328, 0, 330, 0, 332, 0, 334, 0, 336, 103, 338, 104, 340, 105, 342, 0, 344, 106, 346, 107, 348, 108, 350, 109, 352, 0, 354, 110, 356, 111, 358, 112, 360, 113, 362, 0, 364, 114, 366, 115, 368, 116, 370, 117, 372, 118, 374, 0, 376, 0, 378, 0, 380, 119, 382, 120, 384, 121, 386, 0, 388, 0, 390, 122, 392, 123, 394, 124, 396, 0, 398, 0, 400, 0, 402, 0, 16, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 35, 2, 0, 68, 68, 100, 100, 2, 0, 73, 73, 105, 105, 2, 0, 83, 83, 115, 115, 2, 0, 69, 69, 101, 101, 2, 0, 67, 67, 99, 99, 2, 0, 84, 84, 116, 116, 2, 0, 82, 82, 114, 114, 2, 0, 79, 79, 111, 111, 2, 0, 80, 80, 112, 112, 2, 0, 78, 78, 110, 110, 2, 0, 72, 72, 104, 104, 2, 0, 86, 86, 118, 118, 2, 0, 65, 65, 97, 97, 2, 0, 76, 76, 108, 108, 2, 0, 88, 88, 120, 120, 2, 0, 70, 70, 102, 102, 2, 0, 77, 77, 109, 109, 2, 0, 71, 71, 103, 103, 2, 0, 75, 75, 107, 107, 2, 0, 85, 85, 117, 117, 2, 0, 87, 87, 119, 119, 6, 0, 9, 10, 13, 13, 32, 32, 47, 47, 91, 91, 93, 93, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, 32, 11, 0, 9, 10, 13, 13, 32, 32, 34, 34, 44, 44, 47, 47, 58, 58, 61, 61, 91, 91, 93, 93, 124, 124, 2, 0, 42, 42, 47, 47, 1, 0, 48, 57, 2, 0, 65, 90, 97, 122, 8, 0, 34, 34, 78, 78, 82, 82, 84, 84, 92, 92, 110, 110, 114, 114, 116, 116, 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 2, 0, 43, 43, 45, 45, 1, 0, 96, 96, 2, 0, 66, 66, 98, 98, 2, 0, 89, 89, 121, 121, 11, 0, 9, 10, 13, 13, 32, 32, 34, 35, 44, 44, 47, 47, 58, 58, 60, 60, 62, 63, 92, 92, 124, 124, 1476, 0, 16, 1, 0, 0, 0, 0, 18, 1, 0, 0, 0, 0, 20, 1, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 24, 1, 0, 0, 0, 0, 26, 1, 0, 0, 0, 0, 28, 1, 0, 0, 0, 0, 30, 1, 0, 0, 0, 0, 32, 1, 0, 0, 0, 0, 34, 1, 0, 0, 0, 0, 36, 1, 0, 0, 0, 0, 38, 1, 0, 0, 0, 0, 40, 1, 0, 0, 0, 0, 42, 1, 0, 0, 0, 0, 44, 1, 0, 0, 0, 0, 46, 1, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 50, 1, 0, 0, 0, 0, 52, 1, 0, 0, 0, 0, 54, 1, 0, 0, 0, 0, 56, 1, 0, 0, 0, 0, 58, 1, 0, 0, 0, 0, 60, 1, 0, 0, 0, 0, 62, 1, 0, 0, 0, 0, 66, 1, 0, 0, 0, 1, 68, 1, 0, 0, 0, 1, 70, 1, 0, 0, 0, 1, 72, 1, 0, 0, 0, 1, 74, 1, 0, 0, 0, 1, 76, 1, 0, 0, 0, 2, 78, 1, 0, 0, 0, 2, 100, 1, 0, 0, 0, 2, 102, 1, 0, 0, 0, 2, 104, 1, 0, 0, 0, 2, 106, 1, 0, 0, 0, 2, 108, 1, 0, 0, 0, 2, 110, 1, 0, 0, 0, 2, 112, 1, 0, 0, 0, 2, 114, 1, 0, 0, 0, 2, 116, 1, 0, 0, 0, 2, 118, 1, 0, 0, 0, 2, 120, 1, 0, 0, 0, 2, 122, 1, 0, 0, 0, 2, 124, 1, 0, 0, 0, 2, 126, 1, 0, 0, 0, 2, 128, 1, 0, 0, 0, 2, 130, 1, 0, 0, 0, 2, 132, 1, 0, 0, 0, 2, 134, 1, 0, 0, 0, 2, 136, 1, 0, 0, 0, 2, 138, 1, 0, 0, 0, 2, 140, 1, 0, 0, 0, 2, 142, 1, 0, 0, 0, 2, 144, 1, 0, 0, 0, 2, 146, 1, 0, 0, 0, 2, 148, 1, 0, 0, 0, 2, 150, 1, 0, 0, 0, 2, 152, 1, 0, 0, 0, 2, 154, 1, 0, 0, 0, 2, 156, 1, 0, 0, 0, 2, 158, 1, 0, 0, 0, 2, 160, 1, 0, 0, 0, 2, 162, 1, 0, 0, 0, 2, 164, 1, 0, 0, 0, 2, 166, 1, 0, 0, 0, 2, 168, 1, 0, 0, 0, 2, 170, 1, 0, 0, 0, 2, 172, 1, 0, 0, 0, 2, 174, 1, 0, 0, 0, 2, 176, 1, 0, 0, 0, 2, 178, 1, 0, 0, 0, 2, 180, 1, 0, 0, 0, 2, 182, 1, 0, 0, 0, 2, 186, 1, 0, 0, 0, 2, 188, 1, 0, 0, 0, 2, 190, 1, 0, 0, 0, 2, 192, 1, 0, 0, 0, 3, 194, 1, 0, 0, 0, 3, 196, 1, 0, 0, 0, 3, 198, 1, 0, 0, 0, 3, 200, 1, 0, 0, 0, 3, 202, 1, 0, 0, 0, 3, 204, 1, 0, 0, 0, 3, 206, 1, 0, 0, 0, 3, 208, 1, 0, 0, 0, 3, 210, 1, 0, 0, 0, 3, 212, 1, 0, 0, 0, 3, 214, 1, 0, 0, 0, 3, 216, 1, 0, 0, 0, 4, 218, 1, 0, 0, 0, 4, 220, 1, 0, 0, 0, 4, 222, 1, 0, 0, 0, 4, 228, 1, 0, 0, 0, 4, 230, 1, 0, 0, 0, 4, 232, 1, 0, 0, 0, 4, 234, 1, 0, 0, 0, 5, 236, 1, 0, 0, 0, 5, 238, 1, 0, 0, 0, 5, 240, 1, 0, 0, 0, 5, 242, 1, 0, 0, 0, 5, 244, 1, 0, 0, 0, 5, 246, 1, 0, 0, 0, 5, 248, 1, 0, 0, 0, 5, 250, 1, 0, 0, 0, 5, 252, 1, 0, 0, 0, 6, 254, 1, 0, 0, 0, 6, 256, 1, 0, 0, 0, 6, 258, 1, 0, 0, 0, 6, 260, 1, 0, 0, 0, 6, 264, 1, 0, 0, 0, 6, 266, 1, 0, 0, 0, 6, 268, 1, 0, 0, 0, 6, 270, 1, 0, 0, 0, 6, 272, 1, 0, 0, 0, 7, 274, 1, 0, 0, 0, 7, 276, 1, 0, 0, 0, 7, 278, 1, 0, 0, 0, 7, 280, 1, 0, 0, 0, 7, 282, 1, 0, 0, 0, 7, 284, 1, 0, 0, 0, 7, 286, 1, 0, 0, 0, 7, 288, 1, 0, 0, 0, 7, 290, 1, 0, 0, 0, 7, 292, 1, 0, 0, 0, 8, 294, 1, 0, 0, 0, 8, 296, 1, 0, 0, 0, 8, 298, 1, 0, 0, 0, 8, 300, 1, 0, 0, 0, 8, 302, 1, 0, 0, 0, 8, 304, 1, 0, 0, 0, 8, 306, 1, 0, 0, 0, 8, 308, 1, 0, 0, 0, 8, 310, 1, 0, 0, 0, 8, 312, 1, 0, 0, 0, 9, 314, 1, 0, 0, 0, 9, 316, 1, 0, 0, 0, 9, 318, 1, 0, 0, 0, 9, 320, 1, 0, 0, 0, 9, 322, 1, 0, 0, 0, 9, 324, 1, 0, 0, 0, 9, 326, 1, 0, 0, 0, 10, 328, 1, 0, 0, 0, 10, 330, 1, 0, 0, 0, 10, 332, 1, 0, 0, 0, 10, 334, 1, 0, 0, 0, 10, 336, 1, 0, 0, 0, 10, 338, 1, 0, 0, 0, 10, 340, 1, 0, 0, 0, 11, 342, 1, 0, 0, 0, 11, 344, 1, 0, 0, 0, 11, 346, 1, 0, 0, 0, 11, 348, 1, 0, 0, 0, 11, 350, 1, 0, 0, 0, 12, 352, 1, 0, 0, 0, 12, 354, 1, 0, 0, 0, 12, 356, 1, 0, 0, 0, 12, 358, 1, 0, 0, 0, 12, 360, 1, 0, 0, 0, 13, 362, 1, 0, 0, 0, 13, 364, 1, 0, 0, 0, 13, 366, 1, 0, 0, 0, 13, 368, 1, 0, 0, 0, 13, 370, 1, 0, 0, 0, 13, 372, 1, 0, 0, 0, 14, 374, 1, 0, 0, 0, 14, 376, 1, 0, 0, 0, 14, 378, 1, 0, 0, 0, 14, 380, 1, 0, 0, 0, 14, 382, 1, 0, 0, 0, 14, 384, 1, 0, 0, 0, 15, 386, 1, 0, 0, 0, 15, 388, 1, 0, 0, 0, 15, 390, 1, 0, 0, 0, 15, 392, 1, 0, 0, 0, 15, 394, 1, 0, 0, 0, 15, 396, 1, 0, 0, 0, 15, 398, 1, 0, 0, 0, 15, 400, 1, 0, 0, 0, 15, 402, 1, 0, 0, 0, 16, 404, 1, 0, 0, 0, 18, 414, 1, 0, 0, 0, 20, 421, 1, 0, 0, 0, 22, 430, 1, 0, 0, 0, 24, 437, 1, 0, 0, 0, 26, 447, 1, 0, 0, 0, 28, 454, 1, 0, 0, 0, 30, 461, 1, 0, 0, 0, 32, 475, 1, 0, 0, 0, 34, 482, 1, 0, 0, 0, 36, 490, 1, 0, 0, 0, 38, 499, 1, 0, 0, 0, 40, 506, 1, 0, 0, 0, 42, 516, 1, 0, 0, 0, 44, 528, 1, 0, 0, 0, 46, 537, 1, 0, 0, 0, 48, 543, 1, 0, 0, 0, 50, 550, 1, 0, 0, 0, 52, 557, 1, 0, 0, 0, 54, 565, 1, 0, 0, 0, 56, 574, 1, 0, 0, 0, 58, 580, 1, 0, 0, 0, 60, 597, 1, 0, 0, 0, 62, 613, 1, 0, 0, 0, 64, 622, 1, 0, 0, 0, 66, 625, 1, 0, 0, 0, 68, 629, 1, 0, 0, 0, 70, 634, 1, 0, 0, 0, 72, 639, 1, 0, 0, 0, 74, 643, 1, 0, 0, 0, 76, 647, 1, 0, 0, 0, 78, 651, 1, 0, 0, 0, 80, 655, 1, 0, 0, 0, 82, 657, 1, 0, 0, 0, 84, 659, 1, 0, 0, 0, 86, 662, 1, 0, 0, 0, 88, 664, 1, 0, 0, 0, 90, 673, 1, 0, 0, 0, 92, 675, 1, 0, 0, 0, 94, 680, 1, 0, 0, 0, 96, 682, 1, 0, 0, 0, 98, 687, 1, 0, 0, 0, 100, 718, 1, 0, 0, 0, 102, 721, 1, 0, 0, 0, 104, 767, 1, 0, 0, 0, 106, 769, 1, 0, 0, 0, 108, 772, 1, 0, 0, 0, 110, 776, 1, 0, 0, 0, 112, 780, 1, 0, 0, 0, 114, 782, 1, 0, 0, 0, 116, 785, 1, 0, 0, 0, 118, 787, 1, 0, 0, 0, 120, 792, 1, 0, 0, 0, 122, 794, 1, 0, 0, 0, 124, 800, 1, 0, 0, 0, 126, 806, 1, 0, 0, 0, 128, 811, 1, 0, 0, 0, 130, 813, 1, 0, 0, 0, 132, 816, 1, 0, 0, 0, 134, 819, 1, 0, 0, 0, 136, 824, 1, 0, 0, 0, 138, 828, 1, 0, 0, 0, 140, 833, 1, 0, 0, 0, 142, 839, 1, 0, 0, 0, 144, 842, 1, 0, 0, 0, 146, 844, 1, 0, 0, 0, 148, 850, 1, 0, 0, 0, 150, 852, 1, 0, 0, 0, 152, 857, 1, 0, 0, 0, 154, 860, 1, 0, 0, 0, 156, 863, 1, 0, 0, 0, 158, 866, 1, 0, 0, 0, 160, 868, 1, 0, 0, 0, 162, 871, 1, 0, 0, 0, 164, 873, 1, 0, 0, 0, 166, 876, 1, 0, 0, 0, 168, 878, 1, 0, 0, 0, 170, 880, 1, 0, 0, 0, 172, 882, 1, 0, 0, 0, 174, 884, 1, 0, 0, 0, 176, 900, 1, 0, 0, 0, 178, 902, 1, 0, 0, 0, 180, 907, 1, 0, 0, 0, 182, 928, 1, 0, 0, 0, 184, 930, 1, 0, 0, 0, 186, 938, 1, 0, 0, 0, 188, 940, 1, 0, 0, 0, 190, 944, 1, 0, 0, 0, 192, 948, 1, 0, 0, 0, 194, 952, 1, 0, 0, 0, 196, 957, 1, 0, 0, 0, 198, 961, 1, 0, 0, 0, 200, 965, 1, 0, 0, 0, 202, 969, 1, 0, 0, 0, 204, 973, 1, 0, 0, 0, 206, 977, 1, 0, 0, 0, 208, 986, 1, 0, 0, 0, 210, 990, 1, 0, 0, 0, 212, 994, 1, 0, 0, 0, 214, 998, 1, 0, 0, 0, 216, 1002, 1, 0, 0, 0, 218, 1006, 1, 0, 0, 0, 220, 1011, 1, 0, 0, 0, 222, 1015, 1, 0, 0, 0, 224, 1023, 1, 0, 0, 0, 226, 1044, 1, 0, 0, 0, 228, 1048, 1, 0, 0, 0, 230, 1052, 1, 0, 0, 0, 232, 1056, 1, 0, 0, 0, 234, 1060, 1, 0, 0, 0, 236, 1064, 1, 0, 0, 0, 238, 1069, 1, 0, 0, 0, 240, 1073, 1, 0, 0, 0, 242, 1077, 1, 0, 0, 0, 244, 1081, 1, 0, 0, 0, 246, 1084, 1, 0, 0, 0, 248, 1088, 1, 0, 0, 0, 250, 1092, 1, 0, 0, 0, 252, 1096, 1, 0, 0, 0, 254, 1100, 1, 0, 0, 0, 256, 1105, 1, 0, 0, 0, 258, 1110, 1, 0, 0, 0, 260, 1115, 1, 0, 0, 0, 262, 1122, 1, 0, 0, 0, 264, 1131, 1, 0, 0, 0, 266, 1138, 1, 0, 0, 0, 268, 1142, 1, 0, 0, 0, 270, 1146, 1, 0, 0, 0, 272, 1150, 1, 0, 0, 0, 274, 1154, 1, 0, 0, 0, 276, 1160, 1, 0, 0, 0, 278, 1164, 1, 0, 0, 0, 280, 1168, 1, 0, 0, 0, 282, 1172, 1, 0, 0, 0, 284, 1176, 1, 0, 0, 0, 286, 1180, 1, 0, 0, 0, 288, 1184, 1, 0, 0, 0, 290, 1188, 1, 0, 0, 0, 292, 1192, 1, 0, 0, 0, 294, 1196, 1, 0, 0, 0, 296, 1201, 1, 0, 0, 0, 298, 1205, 1, 0, 0, 0, 300, 1209, 1, 0, 0, 0, 302, 1213, 1, 0, 0, 0, 304, 1218, 1, 0, 0, 0, 306, 1222, 1, 0, 0, 0, 308, 1226, 1, 0, 0, 0, 310, 1230, 1, 0, 0, 0, 312, 1234, 1, 0, 0, 0, 314, 1238, 1, 0, 0, 0, 316, 1244, 1, 0, 0, 0, 318, 1248, 1, 0, 0, 0, 320, 1252, 1, 0, 0, 0, 322, 1256, 1, 0, 0, 0, 324, 1260, 1, 0, 0, 0, 326, 1264, 1, 0, 0, 0, 328, 1268, 1, 0, 0, 0, 330, 1273, 1, 0, 0, 0, 332, 1277, 1, 0, 0, 0, 334, 1281, 1, 0, 0, 0, 336, 1285, 1, 0, 0, 0, 338, 1289, 1, 0, 0, 0, 340, 1293, 1, 0, 0, 0, 342, 1297, 1, 0, 0, 0, 344, 1302, 1, 0, 0, 0, 346, 1307, 1, 0, 0, 0, 348, 1311, 1, 0, 0, 0, 350, 1315, 1, 0, 0, 0, 352, 1319, 1, 0, 0, 0, 354, 1324, 1, 0, 0, 0, 356, 1334, 1, 0, 0, 0, 358, 1338, 1, 0, 0, 0, 360, 1342, 1, 0, 0, 0, 362, 1346, 1, 0, 0, 0, 364, 1351, 1, 0, 0, 0, 366, 1358, 1, 0, 0, 0, 368, 1362, 1, 0, 0, 0, 370, 1366, 1, 0, 0, 0, 372, 1370, 1, 0, 0, 0, 374, 1374, 1, 0, 0, 0, 376, 1379, 1, 0, 0, 0, 378, 1385, 1, 0, 0, 0, 380, 1391, 1, 0, 0, 0, 382, 1395, 1, 0, 0, 0, 384, 1399, 1, 0, 0, 0, 386, 1403, 1, 0, 0, 0, 388, 1409, 1, 0, 0, 0, 390, 1415, 1, 0, 0, 0, 392, 1419, 1, 0, 0, 0, 394, 1423, 1, 0, 0, 0, 396, 1427, 1, 0, 0, 0, 398, 1433, 1, 0, 0, 0, 400, 1439, 1, 0, 0, 0, 402, 1445, 1, 0, 0, 0, 404, 405, 7, 0, 0, 0, 405, 406, 7, 1, 0, 0, 406, 407, 7, 2, 0, 0, 407, 408, 7, 2, 0, 0, 408, 409, 7, 3, 0, 0, 409, 410, 7, 4, 0, 0, 410, 411, 7, 5, 0, 0, 411, 412, 1, 0, 0, 0, 412, 413, 6, 0, 0, 0, 413, 17, 1, 0, 0, 0, 414, 415, 7, 0, 0, 0, 415, 416, 7, 6, 0, 0, 416, 417, 7, 7, 0, 0, 417, 418, 7, 8, 0, 0, 418, 419, 1, 0, 0, 0, 419, 420, 6, 1, 1, 0, 420, 19, 1, 0, 0, 0, 421, 422, 7, 3, 0, 0, 422, 423, 7, 9, 0, 0, 423, 424, 7, 6, 0, 0, 424, 425, 7, 1, 0, 0, 425, 426, 7, 4, 0, 0, 426, 427, 7, 10, 0, 0, 427, 428, 1, 0, 0, 0, 428, 429, 6, 2, 2, 0, 429, 21, 1, 0, 0, 0, 430, 431, 7, 3, 0, 0, 431, 432, 7, 11, 0, 0, 432, 433, 7, 12, 0, 0, 433, 434, 7, 13, 0, 0, 434, 435, 1, 0, 0, 0, 435, 436, 6, 3, 0, 0, 436, 23, 1, 0, 0, 0, 437, 438, 7, 3, 0, 0, 438, 439, 7, 14, 0, 0, 439, 440, 7, 8, 0, 0, 440, 441, 7, 13, 0, 0, 441, 442, 7, 12, 0, 0, 442, 443, 7, 1, 0, 0, 443, 444, 7, 9, 0, 0, 444, 445, 1, 0, 0, 0, 445, 446, 6, 4, 3, 0, 446, 25, 1, 0, 0, 0, 447, 448, 7, 15, 0, 0, 448, 449, 7, 6, 0, 0, 449, 450, 7, 7, 0, 0, 450, 451, 7, 16, 0, 0, 451, 452, 1, 0, 0, 0, 452, 453, 6, 5, 4, 0, 453, 27, 1, 0, 0, 0, 454, 455, 7, 17, 0, 0, 455, 456, 7, 6, 0, 0, 456, 457, 7, 7, 0, 0, 457, 458, 7, 18, 0, 0, 458, 459, 1, 0, 0, 0, 459, 460, 6, 6, 0, 0, 460, 29, 1, 0, 0, 0, 461, 462, 7, 1, 0, 0, 462, 463, 7, 9, 0, 0, 463, 464, 7, 13, 0, 0, 464, 465, 7, 1, 0, 0, 465, 466, 7, 9, 0, 0, 466, 467, 7, 3, 0, 0, 467, 468, 7, 2, 0, 0, 468, 469, 7, 5, 0, 0, 469, 470, 7, 12, 0, 0, 470, 471, 7, 5, 0, 0, 471, 472, 7, 2, 0, 0, 472, 473, 1, 0, 0, 0, 473, 474, 6, 7, 0, 0, 474, 31, 1, 0, 0, 0, 475, 476, 7, 18, 0, 0, 476, 477, 7, 3, 0, 0, 477, 478, 7, 3, 0, 0, 478, 479, 7, 8, 0, 0, 479, 480, 1, 0, 0, 0, 480, 481, 6, 8, 1, 0, 481, 33, 1, 0, 0, 0, 482, 483, 7, 13, 0, 0, 483, 484, 7, 1, 0, 0, 484, 485, 7, 16, 0, 0, 485, 486, 7, 1, 0, 0, 486, 487, 7, 5, 0, 0, 487, 488, 1, 0, 0, 0, 488, 489, 6, 9, 0, 0, 489, 35, 1, 0, 0, 0, 490, 491, 7, 13, 0, 0, 491, 492, 7, 7, 0, 0, 492, 493, 7, 7, 0, 0, 493, 494, 7, 18, 0, 0, 494, 495, 7, 19, 0, 0, 495, 496, 7, 8, 0, 0, 496, 497, 1, 0, 0, 0, 497, 498, 6, 10, 5, 0, 498, 37, 1, 0, 0, 0, 499, 500, 7, 16, 0, 0, 500, 501, 7, 3, 0, 0, 501, 502, 7, 5, 0, 0, 502, 503, 7, 12, 0, 0, 503, 504, 1, 0, 0, 0, 504, 505, 6, 11, 6, 0, 505, 39, 1, 0, 0, 0, 506, 507, 7, 16, 0, 0, 507, 508, 7, 3, 0, 0, 508, 509, 7, 5, 0, 0, 509, 510, 7, 6, 0, 0, 510, 511, 7, 1, 0, 0, 511, 512, 7, 4, 0, 0, 512, 513, 7, 2, 0, 0, 513, 514, 1, 0, 0, 0, 514, 515, 6, 12, 7, 0, 515, 41, 1, 0, 0, 0, 516, 517, 7, 16, 0, 0, 517, 518, 7, 11, 0, 0, 518, 519, 5, 95, 0, 0, 519, 520, 7, 3, 0, 0, 520, 521, 7, 14, 0, 0, 521, 522, 7, 8, 0, 0, 522, 523, 7, 12, 0, 0, 523, 524, 7, 9, 0, 0, 524, 525, 7, 0, 0, 0, 525, 526, 1, 0, 0, 0, 526, 527, 6, 13, 8, 0, 527, 43, 1, 0, 0, 0, 528, 529, 7, 6, 0, 0, 529, 530, 7, 3, 0, 0, 530, 531, 7, 9, 0, 0, 531, 532, 7, 12, 0, 0, 532, 533, 7, 16, 0, 0, 533, 534, 7, 3, 0, 0, 534, 535, 1, 0, 0, 0, 535, 536, 6, 14, 9, 0, 536, 45, 1, 0, 0, 0, 537, 538, 7, 6, 0, 0, 538, 539, 7, 7, 0, 0, 539, 540, 7, 20, 0, 0, 540, 541, 1, 0, 0, 0, 541, 542, 6, 15, 0, 0, 542, 47, 1, 0, 0, 0, 543, 544, 7, 2, 0, 0, 544, 545, 7, 10, 0, 0, 545, 546, 7, 7, 0, 0, 546, 547, 7, 20, 0, 0, 547, 548, 1, 0, 0, 0, 548, 549, 6, 16, 10, 0, 549, 49, 1, 0, 0, 0, 550, 551, 7, 2, 0, 0, 551, 552, 7, 7, 0, 0, 552, 553, 7, 6, 0, 0, 553, 554, 7, 5, 0, 0, 554, 555, 1, 0, 0, 0, 555, 556, 6, 17, 0, 0, 556, 51, 1, 0, 0, 0, 557, 558, 7, 2, 0, 0, 558, 559, 7, 5, 0, 0, 559, 560, 7, 12, 0, 0, 560, 561, 7, 5, 0, 0, 561, 562, 7, 2, 0, 0, 562, 563, 1, 0, 0, 0, 563, 564, 6, 18, 0, 0, 564, 53, 1, 0, 0, 0, 565, 566, 7, 20, 0, 0, 566, 567, 7, 10, 0, 0, 567, 568, 7, 3, 0, 0, 568, 569, 7, 6, 0, 0, 569, 570, 7, 3, 0, 0, 570, 571, 1, 0, 0, 0, 571, 572, 6, 19, 0, 0, 572, 55, 1, 0, 0, 0, 573, 575, 8, 21, 0, 0, 574, 573, 1, 0, 0, 0, 575, 576, 1, 0, 0, 0, 576, 574, 1, 0, 0, 0, 576, 577, 1, 0, 0, 0, 577, 578, 1, 0, 0, 0, 578, 579, 6, 20, 0, 0, 579, 57, 1, 0, 0, 0, 580, 581, 5, 47, 0, 0, 581, 582, 5, 47, 0, 0, 582, 586, 1, 0, 0, 0, 583, 585, 8, 22, 0, 0, 584, 583, 1, 0, 0, 0, 585, 588, 1, 0, 0, 0, 586, 584, 1, 0, 0, 0, 586, 587, 1, 0, 0, 0, 587, 590, 1, 0, 0, 0, 588, 586, 1, 0, 0, 0, 589, 591, 5, 13, 0, 0, 590, 589, 1, 0, 0, 0, 590, 591, 1, 0, 0, 0, 591, 593, 1, 0, 0, 0, 592, 594, 5, 10, 0, 0, 593, 592, 1, 0, 0, 0, 593, 594, 1, 0, 0, 0, 594, 595, 1, 0, 0, 0, 595, 596, 6, 21, 11, 0, 596, 59, 1, 0, 0, 0, 597, 598, 5, 47, 0, 0, 598, 599, 5, 42, 0, 0, 599, 604, 1, 0, 0, 0, 600, 603, 3, 60, 22, 0, 601, 603, 9, 0, 0, 0, 602, 600, 1, 0, 0, 0, 602, 601, 1, 0, 0, 0, 603, 606, 1, 0, 0, 0, 604, 605, 1, 0, 0, 0, 604, 602, 1, 0, 0, 0, 605, 607, 1, 0, 0, 0, 606, 604, 1, 0, 0, 0, 607, 608, 5, 42, 0, 0, 608, 609, 5, 47, 0, 0, 609, 610, 1, 0, 0, 0, 610, 611, 6, 22, 11, 0, 611, 61, 1, 0, 0, 0, 612, 614, 7, 23, 0, 0, 613, 612, 1, 0, 0, 0, 614, 615, 1, 0, 0, 0, 615, 613, 1, 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 617, 1, 0, 0, 0, 617, 618, 6, 23, 11, 0, 618, 63, 1, 0, 0, 0, 619, 623, 8, 24, 0, 0, 620, 621, 5, 47, 0, 0, 621, 623, 8, 25, 0, 0, 622, 619, 1, 0, 0, 0, 622, 620, 1, 0, 0, 0, 623, 65, 1, 0, 0, 0, 624, 626, 3, 64, 24, 0, 625, 624, 1, 0, 0, 0, 626, 627, 1, 0, 0, 0, 627, 625, 1, 0, 0, 0, 627, 628, 1, 0, 0, 0, 628, 67, 1, 0, 0, 0, 629, 630, 3, 178, 81, 0, 630, 631, 1, 0, 0, 0, 631, 632, 6, 26, 12, 0, 632, 633, 6, 26, 13, 0, 633, 69, 1, 0, 0, 0, 634, 635, 3, 78, 31, 0, 635, 636, 1, 0, 0, 0, 636, 637, 6, 27, 14, 0, 637, 638, 6, 27, 15, 0, 638, 71, 1, 0, 0, 0, 639, 640, 3, 62, 23, 0, 640, 641, 1, 0, 0, 0, 641, 642, 6, 28, 11, 0, 642, 73, 1, 0, 0, 0, 643, 644, 3, 58, 21, 0, 644, 645, 1, 0, 0, 0, 645, 646, 6, 29, 11, 0, 646, 75, 1, 0, 0, 0, 647, 648, 3, 60, 22, 0, 648, 649, 1, 0, 0, 0, 649, 650, 6, 30, 11, 0, 650, 77, 1, 0, 0, 0, 651, 652, 5, 124, 0, 0, 652, 653, 1, 0, 0, 0, 653, 654, 6, 31, 15, 0, 654, 79, 1, 0, 0, 0, 655, 656, 7, 26, 0, 0, 656, 81, 1, 0, 0, 0, 657, 658, 7, 27, 0, 0, 658, 83, 1, 0, 0, 0, 659, 660, 5, 92, 0, 0, 660, 661, 7, 28, 0, 0, 661, 85, 1, 0, 0, 0, 662, 663, 8, 29, 0, 0, 663, 87, 1, 0, 0, 0, 664, 666, 7, 3, 0, 0, 665, 667, 7, 30, 0, 0, 666, 665, 1, 0, 0, 0, 666, 667, 1, 0, 0, 0, 667, 669, 1, 0, 0, 0, 668, 670, 3, 80, 32, 0, 669, 668, 1, 0, 0, 0, 670, 671, 1, 0, 0, 0, 671, 669, 1, 0, 0, 0, 671, 672, 1, 0, 0, 0, 672, 89, 1, 0, 0, 0, 673, 674, 5, 64, 0, 0, 674, 91, 1, 0, 0, 0, 675, 676, 5, 96, 0, 0, 676, 93, 1, 0, 0, 0, 677, 681, 8, 31, 0, 0, 678, 679, 5, 96, 0, 0, 679, 681, 5, 96, 0, 0, 680, 677, 1, 0, 0, 0, 680, 678, 1, 0, 0, 0, 681, 95, 1, 0, 0, 0, 682, 683, 5, 95, 0, 0, 683, 97, 1, 0, 0, 0, 684, 688, 3, 82, 33, 0, 685, 688, 3, 80, 32, 0, 686, 688, 3, 96, 40, 0, 687, 684, 1, 0, 0, 0, 687, 685, 1, 0, 0, 0, 687, 686, 1, 0, 0, 0, 688, 99, 1, 0, 0, 0, 689, 694, 5, 34, 0, 0, 690, 693, 3, 84, 34, 0, 691, 693, 3, 86, 35, 0, 692, 690, 1, 0, 0, 0, 692, 691, 1, 0, 0, 0, 693, 696, 1, 0, 0, 0, 694, 692, 1, 0, 0, 0, 694, 695, 1, 0, 0, 0, 695, 697, 1, 0, 0, 0, 696, 694, 1, 0, 0, 0, 697, 719, 5, 34, 0, 0, 698, 699, 5, 34, 0, 0, 699, 700, 5, 34, 0, 0, 700, 701, 5, 34, 0, 0, 701, 705, 1, 0, 0, 0, 702, 704, 8, 22, 0, 0, 703, 702, 1, 0, 0, 0, 704, 707, 1, 0, 0, 0, 705, 706, 1, 0, 0, 0, 705, 703, 1, 0, 0, 0, 706, 708, 1, 0, 0, 0, 707, 705, 1, 0, 0, 0, 708, 709, 5, 34, 0, 0, 709, 710, 5, 34, 0, 0, 710, 711, 5, 34, 0, 0, 711, 713, 1, 0, 0, 0, 712, 714, 5, 34, 0, 0, 713, 712, 1, 0, 0, 0, 713, 714, 1, 0, 0, 0, 714, 716, 1, 0, 0, 0, 715, 717, 5, 34, 0, 0, 716, 715, 1, 0, 0, 0, 716, 717, 1, 0, 0, 0, 717, 719, 1, 0, 0, 0, 718, 689, 1, 0, 0, 0, 718, 698, 1, 0, 0, 0, 719, 101, 1, 0, 0, 0, 720, 722, 3, 80, 32, 0, 721, 720, 1, 0, 0, 0, 722, 723, 1, 0, 0, 0, 723, 721, 1, 0, 0, 0, 723, 724, 1, 0, 0, 0, 724, 103, 1, 0, 0, 0, 725, 727, 3, 80, 32, 0, 726, 725, 1, 0, 0, 0, 727, 728, 1, 0, 0, 0, 728, 726, 1, 0, 0, 0, 728, 729, 1, 0, 0, 0, 729, 730, 1, 0, 0, 0, 730, 734, 3, 120, 52, 0, 731, 733, 3, 80, 32, 0, 732, 731, 1, 0, 0, 0, 733, 736, 1, 0, 0, 0, 734, 732, 1, 0, 0, 0, 734, 735, 1, 0, 0, 0, 735, 768, 1, 0, 0, 0, 736, 734, 1, 0, 0, 0, 737, 739, 3, 120, 52, 0, 738, 740, 3, 80, 32, 0, 739, 738, 1, 0, 0, 0, 740, 741, 1, 0, 0, 0, 741, 739, 1, 0, 0, 0, 741, 742, 1, 0, 0, 0, 742, 768, 1, 0, 0, 0, 743, 745, 3, 80, 32, 0, 744, 743, 1, 0, 0, 0, 745, 746, 1, 0, 0, 0, 746, 744, 1, 0, 0, 0, 746, 747, 1, 0, 0, 0, 747, 755, 1, 0, 0, 0, 748, 752, 3, 120, 52, 0, 749, 751, 3, 80, 32, 0, 750, 749, 1, 0, 0, 0, 751, 754, 1, 0, 0, 0, 752, 750, 1, 0, 0, 0, 752, 753, 1, 0, 0, 0, 753, 756, 1, 0, 0, 0, 754, 752, 1, 0, 0, 0, 755, 748, 1, 0, 0, 0, 755, 756, 1, 0, 0, 0, 756, 757, 1, 0, 0, 0, 757, 758, 3, 88, 36, 0, 758, 768, 1, 0, 0, 0, 759, 761, 3, 120, 52, 0, 760, 762, 3, 80, 32, 0, 761, 760, 1, 0, 0, 0, 762, 763, 1, 0, 0, 0, 763, 761, 1, 0, 0, 0, 763, 764, 1, 0, 0, 0, 764, 765, 1, 0, 0, 0, 765, 766, 3, 88, 36, 0, 766, 768, 1, 0, 0, 0, 767, 726, 1, 0, 0, 0, 767, 737, 1, 0, 0, 0, 767, 744, 1, 0, 0, 0, 767, 759, 1, 0, 0, 0, 768, 105, 1, 0, 0, 0, 769, 770, 7, 32, 0, 0, 770, 771, 7, 33, 0, 0, 771, 107, 1, 0, 0, 0, 772, 773, 7, 12, 0, 0, 773, 774, 7, 9, 0, 0, 774, 775, 7, 0, 0, 0, 775, 109, 1, 0, 0, 0, 776, 777, 7, 12, 0, 0, 777, 778, 7, 2, 0, 0, 778, 779, 7, 4, 0, 0, 779, 111, 1, 0, 0, 0, 780, 781, 5, 61, 0, 0, 781, 113, 1, 0, 0, 0, 782, 783, 5, 58, 0, 0, 783, 784, 5, 58, 0, 0, 784, 115, 1, 0, 0, 0, 785, 786, 5, 44, 0, 0, 786, 117, 1, 0, 0, 0, 787, 788, 7, 0, 0, 0, 788, 789, 7, 3, 0, 0, 789, 790, 7, 2, 0, 0, 790, 791, 7, 4, 0, 0, 791, 119, 1, 0, 0, 0, 792, 793, 5, 46, 0, 0, 793, 121, 1, 0, 0, 0, 794, 795, 7, 15, 0, 0, 795, 796, 7, 12, 0, 0, 796, 797, 7, 13, 0, 0, 797, 798, 7, 2, 0, 0, 798, 799, 7, 3, 0, 0, 799, 123, 1, 0, 0, 0, 800, 801, 7, 15, 0, 0, 801, 802, 7, 1, 0, 0, 802, 803, 7, 6, 0, 0, 803, 804, 7, 2, 0, 0, 804, 805, 7, 5, 0, 0, 805, 125, 1, 0, 0, 0, 806, 807, 7, 13, 0, 0, 807, 808, 7, 12, 0, 0, 808, 809, 7, 2, 0, 0, 809, 810, 7, 5, 0, 0, 810, 127, 1, 0, 0, 0, 811, 812, 5, 40, 0, 0, 812, 129, 1, 0, 0, 0, 813, 814, 7, 1, 0, 0, 814, 815, 7, 9, 0, 0, 815, 131, 1, 0, 0, 0, 816, 817, 7, 1, 0, 0, 817, 818, 7, 2, 0, 0, 818, 133, 1, 0, 0, 0, 819, 820, 7, 13, 0, 0, 820, 821, 7, 1, 0, 0, 821, 822, 7, 18, 0, 0, 822, 823, 7, 3, 0, 0, 823, 135, 1, 0, 0, 0, 824, 825, 7, 9, 0, 0, 825, 826, 7, 7, 0, 0, 826, 827, 7, 5, 0, 0, 827, 137, 1, 0, 0, 0, 828, 829, 7, 9, 0, 0, 829, 830, 7, 19, 0, 0, 830, 831, 7, 13, 0, 0, 831, 832, 7, 13, 0, 0, 832, 139, 1, 0, 0, 0, 833, 834, 7, 9, 0, 0, 834, 835, 7, 19, 0, 0, 835, 836, 7, 13, 0, 0, 836, 837, 7, 13, 0, 0, 837, 838, 7, 2, 0, 0, 838, 141, 1, 0, 0, 0, 839, 840, 7, 7, 0, 0, 840, 841, 7, 6, 0, 0, 841, 143, 1, 0, 0, 0, 842, 843, 5, 63, 0, 0, 843, 145, 1, 0, 0, 0, 844, 845, 7, 6, 0, 0, 845, 846, 7, 13, 0, 0, 846, 847, 7, 1, 0, 0, 847, 848, 7, 18, 0, 0, 848, 849, 7, 3, 0, 0, 849, 147, 1, 0, 0, 0, 850, 851, 5, 41, 0, 0, 851, 149, 1, 0, 0, 0, 852, 853, 7, 5, 0, 0, 853, 854, 7, 6, 0, 0, 854, 855, 7, 19, 0, 0, 855, 856, 7, 3, 0, 0, 856, 151, 1, 0, 0, 0, 857, 858, 5, 61, 0, 0, 858, 859, 5, 61, 0, 0, 859, 153, 1, 0, 0, 0, 860, 861, 5, 61, 0, 0, 861, 862, 5, 126, 0, 0, 862, 155, 1, 0, 0, 0, 863, 864, 5, 33, 0, 0, 864, 865, 5, 61, 0, 0, 865, 157, 1, 0, 0, 0, 866, 867, 5, 60, 0, 0, 867, 159, 1, 0, 0, 0, 868, 869, 5, 60, 0, 0, 869, 870, 5, 61, 0, 0, 870, 161, 1, 0, 0, 0, 871, 872, 5, 62, 0, 0, 872, 163, 1, 0, 0, 0, 873, 874, 5, 62, 0, 0, 874, 875, 5, 61, 0, 0, 875, 165, 1, 0, 0, 0, 876, 877, 5, 43, 0, 0, 877, 167, 1, 0, 0, 0, 878, 879, 5, 45, 0, 0, 879, 169, 1, 0, 0, 0, 880, 881, 5, 42, 0, 0, 881, 171, 1, 0, 0, 0, 882, 883, 5, 47, 0, 0, 883, 173, 1, 0, 0, 0, 884, 885, 5, 37, 0, 0, 885, 175, 1, 0, 0, 0, 886, 887, 3, 144, 64, 0, 887, 891, 3, 82, 33, 0, 888, 890, 3, 98, 41, 0, 889, 888, 1, 0, 0, 0, 890, 893, 1, 0, 0, 0, 891, 889, 1, 0, 0, 0, 891, 892, 1, 0, 0, 0, 892, 901, 1, 0, 0, 0, 893, 891, 1, 0, 0, 0, 894, 896, 3, 144, 64, 0, 895, 897, 3, 80, 32, 0, 896, 895, 1, 0, 0, 0, 897, 898, 1, 0, 0, 0, 898, 896, 1, 0, 0, 0, 898, 899, 1, 0, 0, 0, 899, 901, 1, 0, 0, 0, 900, 886, 1, 0, 0, 0, 900, 894, 1, 0, 0, 0, 901, 177, 1, 0, 0, 0, 902, 903, 5, 91, 0, 0, 903, 904, 1, 0, 0, 0, 904, 905, 6, 81, 0, 0, 905, 906, 6, 81, 0, 0, 906, 179, 1, 0, 0, 0, 907, 908, 5, 93, 0, 0, 908, 909, 1, 0, 0, 0, 909, 910, 6, 82, 15, 0, 910, 911, 6, 82, 15, 0, 911, 181, 1, 0, 0, 0, 912, 916, 3, 82, 33, 0, 913, 915, 3, 98, 41, 0, 914, 913, 1, 0, 0, 0, 915, 918, 1, 0, 0, 0, 916, 914, 1, 0, 0, 0, 916, 917, 1, 0, 0, 0, 917, 929, 1, 0, 0, 0, 918, 916, 1, 0, 0, 0, 919, 922, 3, 96, 40, 0, 920, 922, 3, 90, 37, 0, 921, 919, 1, 0, 0, 0, 921, 920, 1, 0, 0, 0, 922, 924, 1, 0, 0, 0, 923, 925, 3, 98, 41, 0, 924, 923, 1, 0, 0, 0, 925, 926, 1, 0, 0, 0, 926, 924, 1, 0, 0, 0, 926, 927, 1, 0, 0, 0, 927, 929, 1, 0, 0, 0, 928, 912, 1, 0, 0, 0, 928, 921, 1, 0, 0, 0, 929, 183, 1, 0, 0, 0, 930, 932, 3, 92, 38, 0, 931, 933, 3, 94, 39, 0, 932, 931, 1, 0, 0, 0, 933, 934, 1, 0, 0, 0, 934, 932, 1, 0, 0, 0, 934, 935, 1, 0, 0, 0, 935, 936, 1, 0, 0, 0, 936, 937, 3, 92, 38, 0, 937, 185, 1, 0, 0, 0, 938, 939, 3, 184, 84, 0, 939, 187, 1, 0, 0, 0, 940, 941, 3, 58, 21, 0, 941, 942, 1, 0, 0, 0, 942, 943, 6, 86, 11, 0, 943, 189, 1, 0, 0, 0, 944, 945, 3, 60, 22, 0, 945, 946, 1, 0, 0, 0, 946, 947, 6, 87, 11, 0, 947, 191, 1, 0, 0, 0, 948, 949, 3, 62, 23, 0, 949, 950, 1, 0, 0, 0, 950, 951, 6, 88, 11, 0, 951, 193, 1, 0, 0, 0, 952, 953, 3, 78, 31, 0, 953, 954, 1, 0, 0, 0, 954, 955, 6, 89, 14, 0, 955, 956, 6, 89, 15, 0, 956, 195, 1, 0, 0, 0, 957, 958, 3, 178, 81, 0, 958, 959, 1, 0, 0, 0, 959, 960, 6, 90, 12, 0, 960, 197, 1, 0, 0, 0, 961, 962, 3, 180, 82, 0, 962, 963, 1, 0, 0, 0, 963, 964, 6, 91, 16, 0, 964, 199, 1, 0, 0, 0, 965, 966, 3, 364, 174, 0, 966, 967, 1, 0, 0, 0, 967, 968, 6, 92, 17, 0, 968, 201, 1, 0, 0, 0, 969, 970, 3, 116, 50, 0, 970, 971, 1, 0, 0, 0, 971, 972, 6, 93, 18, 0, 972, 203, 1, 0, 0, 0, 973, 974, 3, 112, 48, 0, 974, 975, 1, 0, 0, 0, 975, 976, 6, 94, 19, 0, 976, 205, 1, 0, 0, 0, 977, 978, 7, 16, 0, 0, 978, 979, 7, 3, 0, 0, 979, 980, 7, 5, 0, 0, 980, 981, 7, 12, 0, 0, 981, 982, 7, 0, 0, 0, 982, 983, 7, 12, 0, 0, 983, 984, 7, 5, 0, 0, 984, 985, 7, 12, 0, 0, 985, 207, 1, 0, 0, 0, 986, 987, 3, 66, 25, 0, 987, 988, 1, 0, 0, 0, 988, 989, 6, 96, 20, 0, 989, 209, 1, 0, 0, 0, 990, 991, 3, 100, 42, 0, 991, 992, 1, 0, 0, 0, 992, 993, 6, 97, 21, 0, 993, 211, 1, 0, 0, 0, 994, 995, 3, 58, 21, 0, 995, 996, 1, 0, 0, 0, 996, 997, 6, 98, 11, 0, 997, 213, 1, 0, 0, 0, 998, 999, 3, 60, 22, 0, 999, 1000, 1, 0, 0, 0, 1000, 1001, 6, 99, 11, 0, 1001, 215, 1, 0, 0, 0, 1002, 1003, 3, 62, 23, 0, 1003, 1004, 1, 0, 0, 0, 1004, 1005, 6, 100, 11, 0, 1005, 217, 1, 0, 0, 0, 1006, 1007, 3, 78, 31, 0, 1007, 1008, 1, 0, 0, 0, 1008, 1009, 6, 101, 14, 0, 1009, 1010, 6, 101, 15, 0, 1010, 219, 1, 0, 0, 0, 1011, 1012, 3, 120, 52, 0, 1012, 1013, 1, 0, 0, 0, 1013, 1014, 6, 102, 22, 0, 1014, 221, 1, 0, 0, 0, 1015, 1016, 3, 116, 50, 0, 1016, 1017, 1, 0, 0, 0, 1017, 1018, 6, 103, 18, 0, 1018, 223, 1, 0, 0, 0, 1019, 1024, 3, 82, 33, 0, 1020, 1024, 3, 80, 32, 0, 1021, 1024, 3, 96, 40, 0, 1022, 1024, 3, 170, 77, 0, 1023, 1019, 1, 0, 0, 0, 1023, 1020, 1, 0, 0, 0, 1023, 1021, 1, 0, 0, 0, 1023, 1022, 1, 0, 0, 0, 1024, 225, 1, 0, 0, 0, 1025, 1028, 3, 82, 33, 0, 1026, 1028, 3, 170, 77, 0, 1027, 1025, 1, 0, 0, 0, 1027, 1026, 1, 0, 0, 0, 1028, 1032, 1, 0, 0, 0, 1029, 1031, 3, 224, 104, 0, 1030, 1029, 1, 0, 0, 0, 1031, 1034, 1, 0, 0, 0, 1032, 1030, 1, 0, 0, 0, 1032, 1033, 1, 0, 0, 0, 1033, 1045, 1, 0, 0, 0, 1034, 1032, 1, 0, 0, 0, 1035, 1038, 3, 96, 40, 0, 1036, 1038, 3, 90, 37, 0, 1037, 1035, 1, 0, 0, 0, 1037, 1036, 1, 0, 0, 0, 1038, 1040, 1, 0, 0, 0, 1039, 1041, 3, 224, 104, 0, 1040, 1039, 1, 0, 0, 0, 1041, 1042, 1, 0, 0, 0, 1042, 1040, 1, 0, 0, 0, 1042, 1043, 1, 0, 0, 0, 1043, 1045, 1, 0, 0, 0, 1044, 1027, 1, 0, 0, 0, 1044, 1037, 1, 0, 0, 0, 1045, 227, 1, 0, 0, 0, 1046, 1049, 3, 226, 105, 0, 1047, 1049, 3, 184, 84, 0, 1048, 1046, 1, 0, 0, 0, 1048, 1047, 1, 0, 0, 0, 1049, 1050, 1, 0, 0, 0, 1050, 1048, 1, 0, 0, 0, 1050, 1051, 1, 0, 0, 0, 1051, 229, 1, 0, 0, 0, 1052, 1053, 3, 58, 21, 0, 1053, 1054, 1, 0, 0, 0, 1054, 1055, 6, 107, 11, 0, 1055, 231, 1, 0, 0, 0, 1056, 1057, 3, 60, 22, 0, 1057, 1058, 1, 0, 0, 0, 1058, 1059, 6, 108, 11, 0, 1059, 233, 1, 0, 0, 0, 1060, 1061, 3, 62, 23, 0, 1061, 1062, 1, 0, 0, 0, 1062, 1063, 6, 109, 11, 0, 1063, 235, 1, 0, 0, 0, 1064, 1065, 3, 78, 31, 0, 1065, 1066, 1, 0, 0, 0, 1066, 1067, 6, 110, 14, 0, 1067, 1068, 6, 110, 15, 0, 1068, 237, 1, 0, 0, 0, 1069, 1070, 3, 112, 48, 0, 1070, 1071, 1, 0, 0, 0, 1071, 1072, 6, 111, 19, 0, 1072, 239, 1, 0, 0, 0, 1073, 1074, 3, 116, 50, 0, 1074, 1075, 1, 0, 0, 0, 1075, 1076, 6, 112, 18, 0, 1076, 241, 1, 0, 0, 0, 1077, 1078, 3, 120, 52, 0, 1078, 1079, 1, 0, 0, 0, 1079, 1080, 6, 113, 22, 0, 1080, 243, 1, 0, 0, 0, 1081, 1082, 7, 12, 0, 0, 1082, 1083, 7, 2, 0, 0, 1083, 245, 1, 0, 0, 0, 1084, 1085, 3, 228, 106, 0, 1085, 1086, 1, 0, 0, 0, 1086, 1087, 6, 115, 23, 0, 1087, 247, 1, 0, 0, 0, 1088, 1089, 3, 58, 21, 0, 1089, 1090, 1, 0, 0, 0, 1090, 1091, 6, 116, 11, 0, 1091, 249, 1, 0, 0, 0, 1092, 1093, 3, 60, 22, 0, 1093, 1094, 1, 0, 0, 0, 1094, 1095, 6, 117, 11, 0, 1095, 251, 1, 0, 0, 0, 1096, 1097, 3, 62, 23, 0, 1097, 1098, 1, 0, 0, 0, 1098, 1099, 6, 118, 11, 0, 1099, 253, 1, 0, 0, 0, 1100, 1101, 3, 78, 31, 0, 1101, 1102, 1, 0, 0, 0, 1102, 1103, 6, 119, 14, 0, 1103, 1104, 6, 119, 15, 0, 1104, 255, 1, 0, 0, 0, 1105, 1106, 3, 178, 81, 0, 1106, 1107, 1, 0, 0, 0, 1107, 1108, 6, 120, 12, 0, 1108, 1109, 6, 120, 24, 0, 1109, 257, 1, 0, 0, 0, 1110, 1111, 7, 7, 0, 0, 1111, 1112, 7, 9, 0, 0, 1112, 1113, 1, 0, 0, 0, 1113, 1114, 6, 121, 25, 0, 1114, 259, 1, 0, 0, 0, 1115, 1116, 7, 20, 0, 0, 1116, 1117, 7, 1, 0, 0, 1117, 1118, 7, 5, 0, 0, 1118, 1119, 7, 10, 0, 0, 1119, 1120, 1, 0, 0, 0, 1120, 1121, 6, 122, 25, 0, 1121, 261, 1, 0, 0, 0, 1122, 1123, 8, 34, 0, 0, 1123, 263, 1, 0, 0, 0, 1124, 1126, 3, 262, 123, 0, 1125, 1124, 1, 0, 0, 0, 1126, 1127, 1, 0, 0, 0, 1127, 1125, 1, 0, 0, 0, 1127, 1128, 1, 0, 0, 0, 1128, 1129, 1, 0, 0, 0, 1129, 1130, 3, 364, 174, 0, 1130, 1132, 1, 0, 0, 0, 1131, 1125, 1, 0, 0, 0, 1131, 1132, 1, 0, 0, 0, 1132, 1134, 1, 0, 0, 0, 1133, 1135, 3, 262, 123, 0, 1134, 1133, 1, 0, 0, 0, 1135, 1136, 1, 0, 0, 0, 1136, 1134, 1, 0, 0, 0, 1136, 1137, 1, 0, 0, 0, 1137, 265, 1, 0, 0, 0, 1138, 1139, 3, 264, 124, 0, 1139, 1140, 1, 0, 0, 0, 1140, 1141, 6, 125, 26, 0, 1141, 267, 1, 0, 0, 0, 1142, 1143, 3, 58, 21, 0, 1143, 1144, 1, 0, 0, 0, 1144, 1145, 6, 126, 11, 0, 1145, 269, 1, 0, 0, 0, 1146, 1147, 3, 60, 22, 0, 1147, 1148, 1, 0, 0, 0, 1148, 1149, 6, 127, 11, 0, 1149, 271, 1, 0, 0, 0, 1150, 1151, 3, 62, 23, 0, 1151, 1152, 1, 0, 0, 0, 1152, 1153, 6, 128, 11, 0, 1153, 273, 1, 0, 0, 0, 1154, 1155, 3, 78, 31, 0, 1155, 1156, 1, 0, 0, 0, 1156, 1157, 6, 129, 14, 0, 1157, 1158, 6, 129, 15, 0, 1158, 1159, 6, 129, 15, 0, 1159, 275, 1, 0, 0, 0, 1160, 1161, 3, 112, 48, 0, 1161, 1162, 1, 0, 0, 0, 1162, 1163, 6, 130, 19, 0, 1163, 277, 1, 0, 0, 0, 1164, 1165, 3, 116, 50, 0, 1165, 1166, 1, 0, 0, 0, 1166, 1167, 6, 131, 18, 0, 1167, 279, 1, 0, 0, 0, 1168, 1169, 3, 120, 52, 0, 1169, 1170, 1, 0, 0, 0, 1170, 1171, 6, 132, 22, 0, 1171, 281, 1, 0, 0, 0, 1172, 1173, 3, 260, 122, 0, 1173, 1174, 1, 0, 0, 0, 1174, 1175, 6, 133, 27, 0, 1175, 283, 1, 0, 0, 0, 1176, 1177, 3, 228, 106, 0, 1177, 1178, 1, 0, 0, 0, 1178, 1179, 6, 134, 23, 0, 1179, 285, 1, 0, 0, 0, 1180, 1181, 3, 186, 85, 0, 1181, 1182, 1, 0, 0, 0, 1182, 1183, 6, 135, 28, 0, 1183, 287, 1, 0, 0, 0, 1184, 1185, 3, 58, 21, 0, 1185, 1186, 1, 0, 0, 0, 1186, 1187, 6, 136, 11, 0, 1187, 289, 1, 0, 0, 0, 1188, 1189, 3, 60, 22, 0, 1189, 1190, 1, 0, 0, 0, 1190, 1191, 6, 137, 11, 0, 1191, 291, 1, 0, 0, 0, 1192, 1193, 3, 62, 23, 0, 1193, 1194, 1, 0, 0, 0, 1194, 1195, 6, 138, 11, 0, 1195, 293, 1, 0, 0, 0, 1196, 1197, 3, 78, 31, 0, 1197, 1198, 1, 0, 0, 0, 1198, 1199, 6, 139, 14, 0, 1199, 1200, 6, 139, 15, 0, 1200, 295, 1, 0, 0, 0, 1201, 1202, 3, 364, 174, 0, 1202, 1203, 1, 0, 0, 0, 1203, 1204, 6, 140, 17, 0, 1204, 297, 1, 0, 0, 0, 1205, 1206, 3, 116, 50, 0, 1206, 1207, 1, 0, 0, 0, 1207, 1208, 6, 141, 18, 0, 1208, 299, 1, 0, 0, 0, 1209, 1210, 3, 120, 52, 0, 1210, 1211, 1, 0, 0, 0, 1211, 1212, 6, 142, 22, 0, 1212, 301, 1, 0, 0, 0, 1213, 1214, 3, 258, 121, 0, 1214, 1215, 1, 0, 0, 0, 1215, 1216, 6, 143, 29, 0, 1216, 1217, 6, 143, 30, 0, 1217, 303, 1, 0, 0, 0, 1218, 1219, 3, 66, 25, 0, 1219, 1220, 1, 0, 0, 0, 1220, 1221, 6, 144, 20, 0, 1221, 305, 1, 0, 0, 0, 1222, 1223, 3, 100, 42, 0, 1223, 1224, 1, 0, 0, 0, 1224, 1225, 6, 145, 21, 0, 1225, 307, 1, 0, 0, 0, 1226, 1227, 3, 58, 21, 0, 1227, 1228, 1, 0, 0, 0, 1228, 1229, 6, 146, 11, 0, 1229, 309, 1, 0, 0, 0, 1230, 1231, 3, 60, 22, 0, 1231, 1232, 1, 0, 0, 0, 1232, 1233, 6, 147, 11, 0, 1233, 311, 1, 0, 0, 0, 1234, 1235, 3, 62, 23, 0, 1235, 1236, 1, 0, 0, 0, 1236, 1237, 6, 148, 11, 0, 1237, 313, 1, 0, 0, 0, 1238, 1239, 3, 78, 31, 0, 1239, 1240, 1, 0, 0, 0, 1240, 1241, 6, 149, 14, 0, 1241, 1242, 6, 149, 15, 0, 1242, 1243, 6, 149, 15, 0, 1243, 315, 1, 0, 0, 0, 1244, 1245, 3, 116, 50, 0, 1245, 1246, 1, 0, 0, 0, 1246, 1247, 6, 150, 18, 0, 1247, 317, 1, 0, 0, 0, 1248, 1249, 3, 120, 52, 0, 1249, 1250, 1, 0, 0, 0, 1250, 1251, 6, 151, 22, 0, 1251, 319, 1, 0, 0, 0, 1252, 1253, 3, 228, 106, 0, 1253, 1254, 1, 0, 0, 0, 1254, 1255, 6, 152, 23, 0, 1255, 321, 1, 0, 0, 0, 1256, 1257, 3, 58, 21, 0, 1257, 1258, 1, 0, 0, 0, 1258, 1259, 6, 153, 11, 0, 1259, 323, 1, 0, 0, 0, 1260, 1261, 3, 60, 22, 0, 1261, 1262, 1, 0, 0, 0, 1262, 1263, 6, 154, 11, 0, 1263, 325, 1, 0, 0, 0, 1264, 1265, 3, 62, 23, 0, 1265, 1266, 1, 0, 0, 0, 1266, 1267, 6, 155, 11, 0, 1267, 327, 1, 0, 0, 0, 1268, 1269, 3, 78, 31, 0, 1269, 1270, 1, 0, 0, 0, 1270, 1271, 6, 156, 14, 0, 1271, 1272, 6, 156, 15, 0, 1272, 329, 1, 0, 0, 0, 1273, 1274, 3, 120, 52, 0, 1274, 1275, 1, 0, 0, 0, 1275, 1276, 6, 157, 22, 0, 1276, 331, 1, 0, 0, 0, 1277, 1278, 3, 186, 85, 0, 1278, 1279, 1, 0, 0, 0, 1279, 1280, 6, 158, 28, 0, 1280, 333, 1, 0, 0, 0, 1281, 1282, 3, 182, 83, 0, 1282, 1283, 1, 0, 0, 0, 1283, 1284, 6, 159, 31, 0, 1284, 335, 1, 0, 0, 0, 1285, 1286, 3, 58, 21, 0, 1286, 1287, 1, 0, 0, 0, 1287, 1288, 6, 160, 11, 0, 1288, 337, 1, 0, 0, 0, 1289, 1290, 3, 60, 22, 0, 1290, 1291, 1, 0, 0, 0, 1291, 1292, 6, 161, 11, 0, 1292, 339, 1, 0, 0, 0, 1293, 1294, 3, 62, 23, 0, 1294, 1295, 1, 0, 0, 0, 1295, 1296, 6, 162, 11, 0, 1296, 341, 1, 0, 0, 0, 1297, 1298, 3, 78, 31, 0, 1298, 1299, 1, 0, 0, 0, 1299, 1300, 6, 163, 14, 0, 1300, 1301, 6, 163, 15, 0, 1301, 343, 1, 0, 0, 0, 1302, 1303, 7, 1, 0, 0, 1303, 1304, 7, 9, 0, 0, 1304, 1305, 7, 15, 0, 0, 1305, 1306, 7, 7, 0, 0, 1306, 345, 1, 0, 0, 0, 1307, 1308, 3, 58, 21, 0, 1308, 1309, 1, 0, 0, 0, 1309, 1310, 6, 165, 11, 0, 1310, 347, 1, 0, 0, 0, 1311, 1312, 3, 60, 22, 0, 1312, 1313, 1, 0, 0, 0, 1313, 1314, 6, 166, 11, 0, 1314, 349, 1, 0, 0, 0, 1315, 1316, 3, 62, 23, 0, 1316, 1317, 1, 0, 0, 0, 1317, 1318, 6, 167, 11, 0, 1318, 351, 1, 0, 0, 0, 1319, 1320, 3, 78, 31, 0, 1320, 1321, 1, 0, 0, 0, 1321, 1322, 6, 168, 14, 0, 1322, 1323, 6, 168, 15, 0, 1323, 353, 1, 0, 0, 0, 1324, 1325, 7, 15, 0, 0, 1325, 1326, 7, 19, 0, 0, 1326, 1327, 7, 9, 0, 0, 1327, 1328, 7, 4, 0, 0, 1328, 1329, 7, 5, 0, 0, 1329, 1330, 7, 1, 0, 0, 1330, 1331, 7, 7, 0, 0, 1331, 1332, 7, 9, 0, 0, 1332, 1333, 7, 2, 0, 0, 1333, 355, 1, 0, 0, 0, 1334, 1335, 3, 58, 21, 0, 1335, 1336, 1, 0, 0, 0, 1336, 1337, 6, 170, 11, 0, 1337, 357, 1, 0, 0, 0, 1338, 1339, 3, 60, 22, 0, 1339, 1340, 1, 0, 0, 0, 1340, 1341, 6, 171, 11, 0, 1341, 359, 1, 0, 0, 0, 1342, 1343, 3, 62, 23, 0, 1343, 1344, 1, 0, 0, 0, 1344, 1345, 6, 172, 11, 0, 1345, 361, 1, 0, 0, 0, 1346, 1347, 3, 180, 82, 0, 1347, 1348, 1, 0, 0, 0, 1348, 1349, 6, 173, 16, 0, 1349, 1350, 6, 173, 15, 0, 1350, 363, 1, 0, 0, 0, 1351, 1352, 5, 58, 0, 0, 1352, 365, 1, 0, 0, 0, 1353, 1359, 3, 90, 37, 0, 1354, 1359, 3, 80, 32, 0, 1355, 1359, 3, 120, 52, 0, 1356, 1359, 3, 82, 33, 0, 1357, 1359, 3, 96, 40, 0, 1358, 1353, 1, 0, 0, 0, 1358, 1354, 1, 0, 0, 0, 1358, 1355, 1, 0, 0, 0, 1358, 1356, 1, 0, 0, 0, 1358, 1357, 1, 0, 0, 0, 1359, 1360, 1, 0, 0, 0, 1360, 1358, 1, 0, 0, 0, 1360, 1361, 1, 0, 0, 0, 1361, 367, 1, 0, 0, 0, 1362, 1363, 3, 58, 21, 0, 1363, 1364, 1, 0, 0, 0, 1364, 1365, 6, 176, 11, 0, 1365, 369, 1, 0, 0, 0, 1366, 1367, 3, 60, 22, 0, 1367, 1368, 1, 0, 0, 0, 1368, 1369, 6, 177, 11, 0, 1369, 371, 1, 0, 0, 0, 1370, 1371, 3, 62, 23, 0, 1371, 1372, 1, 0, 0, 0, 1372, 1373, 6, 178, 11, 0, 1373, 373, 1, 0, 0, 0, 1374, 1375, 3, 78, 31, 0, 1375, 1376, 1, 0, 0, 0, 1376, 1377, 6, 179, 14, 0, 1377, 1378, 6, 179, 15, 0, 1378, 375, 1, 0, 0, 0, 1379, 1380, 3, 66, 25, 0, 1380, 1381, 1, 0, 0, 0, 1381, 1382, 6, 180, 20, 0, 1382, 1383, 6, 180, 15, 0, 1383, 1384, 6, 180, 32, 0, 1384, 377, 1, 0, 0, 0, 1385, 1386, 3, 100, 42, 0, 1386, 1387, 1, 0, 0, 0, 1387, 1388, 6, 181, 21, 0, 1388, 1389, 6, 181, 15, 0, 1389, 1390, 6, 181, 32, 0, 1390, 379, 1, 0, 0, 0, 1391, 1392, 3, 58, 21, 0, 1392, 1393, 1, 0, 0, 0, 1393, 1394, 6, 182, 11, 0, 1394, 381, 1, 0, 0, 0, 1395, 1396, 3, 60, 22, 0, 1396, 1397, 1, 0, 0, 0, 1397, 1398, 6, 183, 11, 0, 1398, 383, 1, 0, 0, 0, 1399, 1400, 3, 62, 23, 0, 1400, 1401, 1, 0, 0, 0, 1401, 1402, 6, 184, 11, 0, 1402, 385, 1, 0, 0, 0, 1403, 1404, 3, 364, 174, 0, 1404, 1405, 1, 0, 0, 0, 1405, 1406, 6, 185, 17, 0, 1406, 1407, 6, 185, 15, 0, 1407, 1408, 6, 185, 7, 0, 1408, 387, 1, 0, 0, 0, 1409, 1410, 3, 116, 50, 0, 1410, 1411, 1, 0, 0, 0, 1411, 1412, 6, 186, 18, 0, 1412, 1413, 6, 186, 15, 0, 1413, 1414, 6, 186, 7, 0, 1414, 389, 1, 0, 0, 0, 1415, 1416, 3, 58, 21, 0, 1416, 1417, 1, 0, 0, 0, 1417, 1418, 6, 187, 11, 0, 1418, 391, 1, 0, 0, 0, 1419, 1420, 3, 60, 22, 0, 1420, 1421, 1, 0, 0, 0, 1421, 1422, 6, 188, 11, 0, 1422, 393, 1, 0, 0, 0, 1423, 1424, 3, 62, 23, 0, 1424, 1425, 1, 0, 0, 0, 1425, 1426, 6, 189, 11, 0, 1426, 395, 1, 0, 0, 0, 1427, 1428, 3, 186, 85, 0, 1428, 1429, 1, 0, 0, 0, 1429, 1430, 6, 190, 15, 0, 1430, 1431, 6, 190, 0, 0, 1431, 1432, 6, 190, 28, 0, 1432, 397, 1, 0, 0, 0, 1433, 1434, 3, 182, 83, 0, 1434, 1435, 1, 0, 0, 0, 1435, 1436, 6, 191, 15, 0, 1436, 1437, 6, 191, 0, 0, 1437, 1438, 6, 191, 31, 0, 1438, 399, 1, 0, 0, 0, 1439, 1440, 3, 106, 45, 0, 1440, 1441, 1, 0, 0, 0, 1441, 1442, 6, 192, 15, 0, 1442, 1443, 6, 192, 0, 0, 1443, 1444, 6, 192, 33, 0, 1444, 401, 1, 0, 0, 0, 1445, 1446, 3, 78, 31, 0, 1446, 1447, 1, 0, 0, 0, 1447, 1448, 6, 193, 14, 0, 1448, 1449, 6, 193, 15, 0, 1449, 403, 1, 0, 0, 0, 65, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 576, 586, 590, 593, 602, 604, 615, 622, 627, 666, 671, 680, 687, 692, 694, 705, 713, 716, 718, 723, 728, 734, 741, 746, 752, 755, 763, 767, 891, 898, 900, 916, 921, 926, 928, 934, 1023, 1027, 1032, 1037, 1042, 1044, 1048, 1050, 1127, 1131, 1136, 1358, 1360, 34, 5, 2, 0, 5, 4, 0, 5, 6, 0, 5, 1, 0, 5, 3, 0, 5, 8, 0, 5, 12, 0, 5, 14, 0, 5, 10, 0, 5, 5, 0, 5, 11, 0, 0, 1, 0, 7, 69, 0, 5, 0, 0, 7, 29, 0, 4, 0, 0, 7, 70, 0, 7, 114, 0, 7, 38, 0, 7, 36, 0, 7, 25, 0, 7, 30, 0, 7, 40, 0, 7, 80, 0, 5, 13, 0, 5, 7, 0, 7, 90, 0, 7, 89, 0, 7, 72, 0, 7, 88, 0, 5, 9, 0, 7, 71, 0, 5, 15, 0, 7, 33, 0] \ No newline at end of file diff --git a/packages/kbn-esql-ast/src/antlr/esql_lexer.tokens b/packages/kbn-esql-ast/src/antlr/esql_lexer.tokens index 04798fc3dca8a0..63eb3a86419a31 100644 --- a/packages/kbn-esql-ast/src/antlr/esql_lexer.tokens +++ b/packages/kbn-esql-ast/src/antlr/esql_lexer.tokens @@ -22,7 +22,7 @@ UNKNOWN_CMD=21 LINE_COMMENT=22 MULTILINE_COMMENT=23 WS=24 -INDEX_UNQUOTED_IDENTIFIER=25 +UNQUOTED_SOURCE=25 EXPLAIN_WS=26 EXPLAIN_LINE_COMMENT=27 EXPLAIN_MULTILINE_COMMENT=28 diff --git a/packages/kbn-esql-ast/src/antlr/esql_lexer.ts b/packages/kbn-esql-ast/src/antlr/esql_lexer.ts index ff985e02ccf1d4..ab1f2d1a3b4d56 100644 --- a/packages/kbn-esql-ast/src/antlr/esql_lexer.ts +++ b/packages/kbn-esql-ast/src/antlr/esql_lexer.ts @@ -37,7 +37,7 @@ export default class esql_lexer extends Lexer { public static readonly LINE_COMMENT = 22; public static readonly MULTILINE_COMMENT = 23; public static readonly WS = 24; - public static readonly INDEX_UNQUOTED_IDENTIFIER = 25; + public static readonly UNQUOTED_SOURCE = 25; public static readonly EXPLAIN_WS = 26; public static readonly EXPLAIN_LINE_COMMENT = 27; public static readonly EXPLAIN_MULTILINE_COMMENT = 28; @@ -230,7 +230,7 @@ export default class esql_lexer extends Lexer { "UNKNOWN_CMD", "LINE_COMMENT", "MULTILINE_COMMENT", - "WS", "INDEX_UNQUOTED_IDENTIFIER", + "WS", "UNQUOTED_SOURCE", "EXPLAIN_WS", "EXPLAIN_LINE_COMMENT", "EXPLAIN_MULTILINE_COMMENT", @@ -321,7 +321,7 @@ export default class esql_lexer extends Lexer { "DISSECT", "DROP", "ENRICH", "EVAL", "EXPLAIN", "FROM", "GROK", "INLINESTATS", "KEEP", "LIMIT", "LOOKUP", "META", "METRICS", "MV_EXPAND", "RENAME", "ROW", "SHOW", "SORT", "STATS", "WHERE", "UNKNOWN_CMD", "LINE_COMMENT", "MULTILINE_COMMENT", - "WS", "INDEX_UNQUOTED_IDENTIFIER_PART", "INDEX_UNQUOTED_IDENTIFIER", "EXPLAIN_OPENING_BRACKET", + "WS", "UNQUOTED_SOURCE_PART", "UNQUOTED_SOURCE", "EXPLAIN_OPENING_BRACKET", "EXPLAIN_PIPE", "EXPLAIN_WS", "EXPLAIN_LINE_COMMENT", "EXPLAIN_MULTILINE_COMMENT", "PIPE", "DIGIT", "LETTER", "ESCAPE_SEQUENCE", "UNESCAPED_CHARS", "EXPONENT", "ASPERAND", "BACKQUOTE", "BACKQUOTE_BLOCK", "UNDERSCORE", "UNQUOTED_ID_BODY", @@ -332,32 +332,33 @@ export default class esql_lexer extends Lexer { "ASTERISK", "SLASH", "PERCENT", "NAMED_OR_POSITIONAL_PARAM", "OPENING_BRACKET", "CLOSING_BRACKET", "UNQUOTED_IDENTIFIER", "QUOTED_ID", "QUOTED_IDENTIFIER", "EXPR_LINE_COMMENT", "EXPR_MULTILINE_COMMENT", "EXPR_WS", "FROM_PIPE", - "FROM_OPENING_BRACKET", "FROM_CLOSING_BRACKET", "FROM_COMMA", "FROM_ASSIGN", - "FROM_QUOTED_STRING", "METADATA", "FROM_INDEX_UNQUOTED_IDENTIFIER", "FROM_LINE_COMMENT", - "FROM_MULTILINE_COMMENT", "FROM_WS", "PROJECT_PIPE", "PROJECT_DOT", "PROJECT_COMMA", - "UNQUOTED_ID_BODY_WITH_PATTERN", "UNQUOTED_ID_PATTERN", "ID_PATTERN", - "PROJECT_LINE_COMMENT", "PROJECT_MULTILINE_COMMENT", "PROJECT_WS", "RENAME_PIPE", - "RENAME_ASSIGN", "RENAME_COMMA", "RENAME_DOT", "AS", "RENAME_ID_PATTERN", + "FROM_OPENING_BRACKET", "FROM_CLOSING_BRACKET", "FROM_COLON", "FROM_COMMA", + "FROM_ASSIGN", "METADATA", "FROM_UNQUOTED_SOURCE", "FROM_QUOTED_SOURCE", + "FROM_LINE_COMMENT", "FROM_MULTILINE_COMMENT", "FROM_WS", "PROJECT_PIPE", + "PROJECT_DOT", "PROJECT_COMMA", "UNQUOTED_ID_BODY_WITH_PATTERN", "UNQUOTED_ID_PATTERN", + "ID_PATTERN", "PROJECT_LINE_COMMENT", "PROJECT_MULTILINE_COMMENT", "PROJECT_WS", + "RENAME_PIPE", "RENAME_ASSIGN", "RENAME_COMMA", "RENAME_DOT", "AS", "RENAME_ID_PATTERN", "RENAME_LINE_COMMENT", "RENAME_MULTILINE_COMMENT", "RENAME_WS", "ENRICH_PIPE", "ENRICH_OPENING_BRACKET", "ON", "WITH", "ENRICH_POLICY_NAME_BODY", "ENRICH_POLICY_NAME", - "ENRICH_QUOTED_IDENTIFIER", "ENRICH_MODE_UNQUOTED_VALUE", "ENRICH_LINE_COMMENT", - "ENRICH_MULTILINE_COMMENT", "ENRICH_WS", "ENRICH_FIELD_PIPE", "ENRICH_FIELD_ASSIGN", - "ENRICH_FIELD_COMMA", "ENRICH_FIELD_DOT", "ENRICH_FIELD_WITH", "ENRICH_FIELD_ID_PATTERN", - "ENRICH_FIELD_QUOTED_IDENTIFIER", "ENRICH_FIELD_LINE_COMMENT", "ENRICH_FIELD_MULTILINE_COMMENT", - "ENRICH_FIELD_WS", "LOOKUP_PIPE", "LOOKUP_COMMA", "LOOKUP_DOT", "LOOKUP_ON", - "LOOKUP_INDEX_UNQUOTED_IDENTIFIER", "LOOKUP_LINE_COMMENT", "LOOKUP_MULTILINE_COMMENT", - "LOOKUP_WS", "LOOKUP_FIELD_PIPE", "LOOKUP_FIELD_COMMA", "LOOKUP_FIELD_DOT", - "LOOKUP_FIELD_ID_PATTERN", "LOOKUP_FIELD_LINE_COMMENT", "LOOKUP_FIELD_MULTILINE_COMMENT", - "LOOKUP_FIELD_WS", "MVEXPAND_PIPE", "MVEXPAND_DOT", "MVEXPAND_QUOTED_IDENTIFIER", - "MVEXPAND_UNQUOTED_IDENTIFIER", "MVEXPAND_LINE_COMMENT", "MVEXPAND_MULTILINE_COMMENT", - "MVEXPAND_WS", "SHOW_PIPE", "INFO", "SHOW_LINE_COMMENT", "SHOW_MULTILINE_COMMENT", - "SHOW_WS", "META_PIPE", "FUNCTIONS", "META_LINE_COMMENT", "META_MULTILINE_COMMENT", + "ENRICH_MODE_UNQUOTED_VALUE", "ENRICH_LINE_COMMENT", "ENRICH_MULTILINE_COMMENT", + "ENRICH_WS", "ENRICH_FIELD_PIPE", "ENRICH_FIELD_ASSIGN", "ENRICH_FIELD_COMMA", + "ENRICH_FIELD_DOT", "ENRICH_FIELD_WITH", "ENRICH_FIELD_ID_PATTERN", "ENRICH_FIELD_QUOTED_IDENTIFIER", + "ENRICH_FIELD_LINE_COMMENT", "ENRICH_FIELD_MULTILINE_COMMENT", "ENRICH_FIELD_WS", + "LOOKUP_PIPE", "LOOKUP_COLON", "LOOKUP_COMMA", "LOOKUP_DOT", "LOOKUP_ON", + "LOOKUP_UNQUOTED_SOURCE", "LOOKUP_QUOTED_SOURCE", "LOOKUP_LINE_COMMENT", + "LOOKUP_MULTILINE_COMMENT", "LOOKUP_WS", "LOOKUP_FIELD_PIPE", "LOOKUP_FIELD_COMMA", + "LOOKUP_FIELD_DOT", "LOOKUP_FIELD_ID_PATTERN", "LOOKUP_FIELD_LINE_COMMENT", + "LOOKUP_FIELD_MULTILINE_COMMENT", "LOOKUP_FIELD_WS", "MVEXPAND_PIPE", + "MVEXPAND_DOT", "MVEXPAND_QUOTED_IDENTIFIER", "MVEXPAND_UNQUOTED_IDENTIFIER", + "MVEXPAND_LINE_COMMENT", "MVEXPAND_MULTILINE_COMMENT", "MVEXPAND_WS", + "SHOW_PIPE", "INFO", "SHOW_LINE_COMMENT", "SHOW_MULTILINE_COMMENT", "SHOW_WS", + "META_PIPE", "FUNCTIONS", "META_LINE_COMMENT", "META_MULTILINE_COMMENT", "META_WS", "SETTING_CLOSING_BRACKET", "COLON", "SETTING", "SETTING_LINE_COMMENT", - "SETTTING_MULTILINE_COMMENT", "SETTING_WS", "METRICS_PIPE", "METRICS_INDEX_UNQUOTED_IDENTIFIER", - "METRICS_LINE_COMMENT", "METRICS_MULTILINE_COMMENT", "METRICS_WS", "CLOSING_METRICS_COMMA", - "CLOSING_METRICS_LINE_COMMENT", "CLOSING_METRICS_MULTILINE_COMMENT", "CLOSING_METRICS_WS", - "CLOSING_METRICS_QUOTED_IDENTIFIER", "CLOSING_METRICS_UNQUOTED_IDENTIFIER", - "CLOSING_METRICS_BY", "CLOSING_METRICS_PIPE", + "SETTTING_MULTILINE_COMMENT", "SETTING_WS", "METRICS_PIPE", "METRICS_UNQUOTED_SOURCE", + "METRICS_QUOTED_SOURCE", "METRICS_LINE_COMMENT", "METRICS_MULTILINE_COMMENT", + "METRICS_WS", "CLOSING_METRICS_COLON", "CLOSING_METRICS_COMMA", "CLOSING_METRICS_LINE_COMMENT", + "CLOSING_METRICS_MULTILINE_COMMENT", "CLOSING_METRICS_WS", "CLOSING_METRICS_QUOTED_IDENTIFIER", + "CLOSING_METRICS_UNQUOTED_IDENTIFIER", "CLOSING_METRICS_BY", "CLOSING_METRICS_PIPE", ]; @@ -378,7 +379,7 @@ export default class esql_lexer extends Lexer { public get modeNames(): string[] { return esql_lexer.modeNames; } - public static readonly _serializedATN: number[] = [4,0,124,1422,6,-1,6, + public static readonly _serializedATN: number[] = [4,0,124,1450,6,-1,6, -1,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1, 2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8, 2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16, @@ -408,463 +409,474 @@ export default class esql_lexer extends Lexer { 2,169,7,169,2,170,7,170,2,171,7,171,2,172,7,172,2,173,7,173,2,174,7,174, 2,175,7,175,2,176,7,176,2,177,7,177,2,178,7,178,2,179,7,179,2,180,7,180, 2,181,7,181,2,182,7,182,2,183,7,183,2,184,7,184,2,185,7,185,2,186,7,186, - 2,187,7,187,2,188,7,188,2,189,7,189,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, - 1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3, - 1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5, - 1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7, - 1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9, - 1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1, - 11,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12, - 1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1, - 14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,16, - 1,16,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,18,1, - 18,1,18,1,18,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19, - 1,20,4,20,567,8,20,11,20,12,20,568,1,20,1,20,1,21,1,21,1,21,1,21,5,21,577, - 8,21,10,21,12,21,580,9,21,1,21,3,21,583,8,21,1,21,3,21,586,8,21,1,21,1, - 21,1,22,1,22,1,22,1,22,1,22,5,22,595,8,22,10,22,12,22,598,9,22,1,22,1,22, - 1,22,1,22,1,22,1,23,4,23,606,8,23,11,23,12,23,607,1,23,1,23,1,24,1,24,1, - 24,3,24,615,8,24,1,25,4,25,618,8,25,11,25,12,25,619,1,26,1,26,1,26,1,26, - 1,26,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1, - 30,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,32,1,32,1,33,1,33,1,34,1,34,1,34, - 1,35,1,35,1,36,1,36,3,36,659,8,36,1,36,4,36,662,8,36,11,36,12,36,663,1, - 37,1,37,1,38,1,38,1,39,1,39,1,39,3,39,673,8,39,1,40,1,40,1,41,1,41,1,41, - 3,41,680,8,41,1,42,1,42,1,42,5,42,685,8,42,10,42,12,42,688,9,42,1,42,1, - 42,1,42,1,42,1,42,1,42,5,42,696,8,42,10,42,12,42,699,9,42,1,42,1,42,1,42, - 1,42,1,42,3,42,706,8,42,1,42,3,42,709,8,42,3,42,711,8,42,1,43,4,43,714, - 8,43,11,43,12,43,715,1,44,4,44,719,8,44,11,44,12,44,720,1,44,1,44,5,44, - 725,8,44,10,44,12,44,728,9,44,1,44,1,44,4,44,732,8,44,11,44,12,44,733,1, - 44,4,44,737,8,44,11,44,12,44,738,1,44,1,44,5,44,743,8,44,10,44,12,44,746, - 9,44,3,44,748,8,44,1,44,1,44,1,44,1,44,4,44,754,8,44,11,44,12,44,755,1, - 44,1,44,3,44,760,8,44,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,47,1,47,1,47, - 1,47,1,48,1,48,1,49,1,49,1,49,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,52,1, - 52,1,53,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1,54,1,54,1,54,1,54,1,55,1,55, - 1,55,1,55,1,55,1,56,1,56,1,57,1,57,1,57,1,58,1,58,1,58,1,59,1,59,1,59,1, - 59,1,59,1,60,1,60,1,60,1,60,1,61,1,61,1,61,1,61,1,61,1,62,1,62,1,62,1,62, - 1,62,1,62,1,63,1,63,1,63,1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65,1,66,1, - 66,1,67,1,67,1,67,1,67,1,67,1,68,1,68,1,68,1,69,1,69,1,69,1,70,1,70,1,70, - 1,71,1,71,1,72,1,72,1,72,1,73,1,73,1,74,1,74,1,74,1,75,1,75,1,76,1,76,1, - 77,1,77,1,78,1,78,1,79,1,79,1,80,1,80,1,80,5,80,882,8,80,10,80,12,80,885, - 9,80,1,80,1,80,4,80,889,8,80,11,80,12,80,890,3,80,893,8,80,1,81,1,81,1, - 81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,1,83,1,83,5,83,907,8,83,10,83,12, - 83,910,9,83,1,83,1,83,3,83,914,8,83,1,83,4,83,917,8,83,11,83,12,83,918, - 3,83,921,8,83,1,84,1,84,4,84,925,8,84,11,84,12,84,926,1,84,1,84,1,85,1, - 85,1,86,1,86,1,86,1,86,1,87,1,87,1,87,1,87,1,88,1,88,1,88,1,88,1,89,1,89, - 1,89,1,89,1,89,1,90,1,90,1,90,1,90,1,91,1,91,1,91,1,91,1,92,1,92,1,92,1, - 92,1,93,1,93,1,93,1,93,1,94,1,94,1,94,1,94,1,95,1,95,1,95,1,95,1,95,1,95, - 1,95,1,95,1,95,1,96,1,96,1,96,1,96,1,97,1,97,1,97,1,97,1,98,1,98,1,98,1, - 98,1,99,1,99,1,99,1,99,1,100,1,100,1,100,1,100,1,100,1,101,1,101,1,101, - 1,101,1,102,1,102,1,102,1,102,1,103,1,103,1,103,1,103,3,103,1012,8,103, - 1,104,1,104,3,104,1016,8,104,1,104,5,104,1019,8,104,10,104,12,104,1022, - 9,104,1,104,1,104,3,104,1026,8,104,1,104,4,104,1029,8,104,11,104,12,104, - 1030,3,104,1033,8,104,1,105,1,105,4,105,1037,8,105,11,105,12,105,1038,1, - 106,1,106,1,106,1,106,1,107,1,107,1,107,1,107,1,108,1,108,1,108,1,108,1, - 109,1,109,1,109,1,109,1,109,1,110,1,110,1,110,1,110,1,111,1,111,1,111,1, - 111,1,112,1,112,1,112,1,112,1,113,1,113,1,113,1,114,1,114,1,114,1,114,1, - 115,1,115,1,115,1,115,1,116,1,116,1,116,1,116,1,117,1,117,1,117,1,117,1, - 118,1,118,1,118,1,118,1,118,1,119,1,119,1,119,1,119,1,119,1,120,1,120,1, - 120,1,120,1,120,1,121,1,121,1,121,1,121,1,121,1,121,1,121,1,122,1,122,1, - 123,4,123,1114,8,123,11,123,12,123,1115,1,123,1,123,3,123,1120,8,123,1, - 123,4,123,1123,8,123,11,123,12,123,1124,1,124,1,124,1,124,1,124,1,125,1, - 125,1,125,1,125,1,126,1,126,1,126,1,126,1,127,1,127,1,127,1,127,1,128,1, - 128,1,128,1,128,1,129,1,129,1,129,1,129,1,129,1,129,1,130,1,130,1,130,1, - 130,1,131,1,131,1,131,1,131,1,132,1,132,1,132,1,132,1,133,1,133,1,133,1, - 133,1,134,1,134,1,134,1,134,1,135,1,135,1,135,1,135,1,136,1,136,1,136,1, - 136,1,137,1,137,1,137,1,137,1,138,1,138,1,138,1,138,1,139,1,139,1,139,1, - 139,1,139,1,140,1,140,1,140,1,140,1,141,1,141,1,141,1,141,1,142,1,142,1, - 142,1,142,1,142,1,143,1,143,1,143,1,143,1,144,1,144,1,144,1,144,1,145,1, - 145,1,145,1,145,1,146,1,146,1,146,1,146,1,147,1,147,1,147,1,147,1,147,1, - 147,1,148,1,148,1,148,1,148,1,149,1,149,1,149,1,149,1,150,1,150,1,150,1, - 150,1,151,1,151,1,151,1,151,1,152,1,152,1,152,1,152,1,153,1,153,1,153,1, - 153,1,154,1,154,1,154,1,154,1,154,1,155,1,155,1,155,1,155,1,156,1,156,1, - 156,1,156,1,157,1,157,1,157,1,157,1,158,1,158,1,158,1,158,1,159,1,159,1, - 159,1,159,1,160,1,160,1,160,1,160,1,161,1,161,1,161,1,161,1,161,1,162,1, - 162,1,162,1,162,1,162,1,163,1,163,1,163,1,163,1,164,1,164,1,164,1,164,1, - 165,1,165,1,165,1,165,1,166,1,166,1,166,1,166,1,166,1,167,1,167,1,167,1, - 167,1,167,1,167,1,167,1,167,1,167,1,167,1,168,1,168,1,168,1,168,1,169,1, - 169,1,169,1,169,1,170,1,170,1,170,1,170,1,171,1,171,1,171,1,171,1,171,1, - 172,1,172,1,173,1,173,1,173,1,173,1,173,4,173,1343,8,173,11,173,12,173, - 1344,1,174,1,174,1,174,1,174,1,175,1,175,1,175,1,175,1,176,1,176,1,176, - 1,176,1,177,1,177,1,177,1,177,1,177,1,178,1,178,1,178,1,178,1,178,1,178, - 1,179,1,179,1,179,1,179,1,180,1,180,1,180,1,180,1,181,1,181,1,181,1,181, - 1,182,1,182,1,182,1,182,1,182,1,182,1,183,1,183,1,183,1,183,1,184,1,184, - 1,184,1,184,1,185,1,185,1,185,1,185,1,186,1,186,1,186,1,186,1,186,1,186, - 1,187,1,187,1,187,1,187,1,187,1,187,1,188,1,188,1,188,1,188,1,188,1,188, - 1,189,1,189,1,189,1,189,1,189,2,596,697,0,190,16,1,18,2,20,3,22,4,24,5, - 26,6,28,7,30,8,32,9,34,10,36,11,38,12,40,13,42,14,44,15,46,16,48,17,50, - 18,52,19,54,20,56,21,58,22,60,23,62,24,64,0,66,25,68,0,70,0,72,26,74,27, - 76,28,78,29,80,0,82,0,84,0,86,0,88,0,90,0,92,0,94,0,96,0,98,0,100,30,102, - 31,104,32,106,33,108,34,110,35,112,36,114,37,116,38,118,39,120,40,122,41, - 124,42,126,43,128,44,130,45,132,46,134,47,136,48,138,49,140,50,142,51,144, - 52,146,53,148,54,150,55,152,56,154,57,156,58,158,59,160,60,162,61,164,62, - 166,63,168,64,170,65,172,66,174,67,176,68,178,69,180,70,182,71,184,0,186, - 72,188,73,190,74,192,75,194,0,196,0,198,0,200,0,202,0,204,0,206,76,208, - 0,210,77,212,78,214,79,216,0,218,0,220,0,222,0,224,0,226,80,228,81,230, - 82,232,83,234,0,236,0,238,0,240,0,242,84,244,0,246,85,248,86,250,87,252, - 0,254,0,256,88,258,89,260,0,262,90,264,0,266,0,268,91,270,92,272,93,274, - 0,276,0,278,0,280,0,282,0,284,0,286,0,288,94,290,95,292,96,294,0,296,0, - 298,0,300,0,302,0,304,97,306,98,308,99,310,0,312,0,314,0,316,0,318,100, - 320,101,322,102,324,0,326,0,328,0,330,0,332,103,334,104,336,105,338,0,340, - 106,342,107,344,108,346,109,348,0,350,110,352,111,354,112,356,113,358,0, - 360,114,362,115,364,116,366,117,368,118,370,0,372,0,374,119,376,120,378, - 121,380,0,382,122,384,123,386,124,388,0,390,0,392,0,394,0,16,0,1,2,3,4, - 5,6,7,8,9,10,11,12,13,14,15,35,2,0,68,68,100,100,2,0,73,73,105,105,2,0, - 83,83,115,115,2,0,69,69,101,101,2,0,67,67,99,99,2,0,84,84,116,116,2,0,82, - 82,114,114,2,0,79,79,111,111,2,0,80,80,112,112,2,0,78,78,110,110,2,0,72, - 72,104,104,2,0,86,86,118,118,2,0,65,65,97,97,2,0,76,76,108,108,2,0,88,88, - 120,120,2,0,70,70,102,102,2,0,77,77,109,109,2,0,71,71,103,103,2,0,75,75, - 107,107,2,0,85,85,117,117,2,0,87,87,119,119,6,0,9,10,13,13,32,32,47,47, - 91,91,93,93,2,0,10,10,13,13,3,0,9,10,13,13,32,32,10,0,9,10,13,13,32,32, - 44,44,47,47,61,61,91,91,93,93,96,96,124,124,2,0,42,42,47,47,1,0,48,57,2, - 0,65,90,97,122,8,0,34,34,78,78,82,82,84,84,92,92,110,110,114,114,116,116, - 4,0,10,10,13,13,34,34,92,92,2,0,43,43,45,45,1,0,96,96,2,0,66,66,98,98,2, - 0,89,89,121,121,11,0,9,10,13,13,32,32,34,35,44,44,47,47,58,58,60,60,62, - 63,92,92,124,124,1448,0,16,1,0,0,0,0,18,1,0,0,0,0,20,1,0,0,0,0,22,1,0,0, - 0,0,24,1,0,0,0,0,26,1,0,0,0,0,28,1,0,0,0,0,30,1,0,0,0,0,32,1,0,0,0,0,34, - 1,0,0,0,0,36,1,0,0,0,0,38,1,0,0,0,0,40,1,0,0,0,0,42,1,0,0,0,0,44,1,0,0, - 0,0,46,1,0,0,0,0,48,1,0,0,0,0,50,1,0,0,0,0,52,1,0,0,0,0,54,1,0,0,0,0,56, - 1,0,0,0,0,58,1,0,0,0,0,60,1,0,0,0,0,62,1,0,0,0,0,66,1,0,0,0,1,68,1,0,0, - 0,1,70,1,0,0,0,1,72,1,0,0,0,1,74,1,0,0,0,1,76,1,0,0,0,2,78,1,0,0,0,2,100, - 1,0,0,0,2,102,1,0,0,0,2,104,1,0,0,0,2,106,1,0,0,0,2,108,1,0,0,0,2,110,1, - 0,0,0,2,112,1,0,0,0,2,114,1,0,0,0,2,116,1,0,0,0,2,118,1,0,0,0,2,120,1,0, - 0,0,2,122,1,0,0,0,2,124,1,0,0,0,2,126,1,0,0,0,2,128,1,0,0,0,2,130,1,0,0, - 0,2,132,1,0,0,0,2,134,1,0,0,0,2,136,1,0,0,0,2,138,1,0,0,0,2,140,1,0,0,0, - 2,142,1,0,0,0,2,144,1,0,0,0,2,146,1,0,0,0,2,148,1,0,0,0,2,150,1,0,0,0,2, - 152,1,0,0,0,2,154,1,0,0,0,2,156,1,0,0,0,2,158,1,0,0,0,2,160,1,0,0,0,2,162, - 1,0,0,0,2,164,1,0,0,0,2,166,1,0,0,0,2,168,1,0,0,0,2,170,1,0,0,0,2,172,1, - 0,0,0,2,174,1,0,0,0,2,176,1,0,0,0,2,178,1,0,0,0,2,180,1,0,0,0,2,182,1,0, - 0,0,2,186,1,0,0,0,2,188,1,0,0,0,2,190,1,0,0,0,2,192,1,0,0,0,3,194,1,0,0, - 0,3,196,1,0,0,0,3,198,1,0,0,0,3,200,1,0,0,0,3,202,1,0,0,0,3,204,1,0,0,0, - 3,206,1,0,0,0,3,208,1,0,0,0,3,210,1,0,0,0,3,212,1,0,0,0,3,214,1,0,0,0,4, - 216,1,0,0,0,4,218,1,0,0,0,4,220,1,0,0,0,4,226,1,0,0,0,4,228,1,0,0,0,4,230, - 1,0,0,0,4,232,1,0,0,0,5,234,1,0,0,0,5,236,1,0,0,0,5,238,1,0,0,0,5,240,1, - 0,0,0,5,242,1,0,0,0,5,244,1,0,0,0,5,246,1,0,0,0,5,248,1,0,0,0,5,250,1,0, - 0,0,6,252,1,0,0,0,6,254,1,0,0,0,6,256,1,0,0,0,6,258,1,0,0,0,6,262,1,0,0, - 0,6,264,1,0,0,0,6,266,1,0,0,0,6,268,1,0,0,0,6,270,1,0,0,0,6,272,1,0,0,0, - 7,274,1,0,0,0,7,276,1,0,0,0,7,278,1,0,0,0,7,280,1,0,0,0,7,282,1,0,0,0,7, - 284,1,0,0,0,7,286,1,0,0,0,7,288,1,0,0,0,7,290,1,0,0,0,7,292,1,0,0,0,8,294, - 1,0,0,0,8,296,1,0,0,0,8,298,1,0,0,0,8,300,1,0,0,0,8,302,1,0,0,0,8,304,1, - 0,0,0,8,306,1,0,0,0,8,308,1,0,0,0,9,310,1,0,0,0,9,312,1,0,0,0,9,314,1,0, - 0,0,9,316,1,0,0,0,9,318,1,0,0,0,9,320,1,0,0,0,9,322,1,0,0,0,10,324,1,0, - 0,0,10,326,1,0,0,0,10,328,1,0,0,0,10,330,1,0,0,0,10,332,1,0,0,0,10,334, - 1,0,0,0,10,336,1,0,0,0,11,338,1,0,0,0,11,340,1,0,0,0,11,342,1,0,0,0,11, - 344,1,0,0,0,11,346,1,0,0,0,12,348,1,0,0,0,12,350,1,0,0,0,12,352,1,0,0,0, - 12,354,1,0,0,0,12,356,1,0,0,0,13,358,1,0,0,0,13,360,1,0,0,0,13,362,1,0, - 0,0,13,364,1,0,0,0,13,366,1,0,0,0,13,368,1,0,0,0,14,370,1,0,0,0,14,372, - 1,0,0,0,14,374,1,0,0,0,14,376,1,0,0,0,14,378,1,0,0,0,15,380,1,0,0,0,15, - 382,1,0,0,0,15,384,1,0,0,0,15,386,1,0,0,0,15,388,1,0,0,0,15,390,1,0,0,0, - 15,392,1,0,0,0,15,394,1,0,0,0,16,396,1,0,0,0,18,406,1,0,0,0,20,413,1,0, - 0,0,22,422,1,0,0,0,24,429,1,0,0,0,26,439,1,0,0,0,28,446,1,0,0,0,30,453, - 1,0,0,0,32,467,1,0,0,0,34,474,1,0,0,0,36,482,1,0,0,0,38,491,1,0,0,0,40, - 498,1,0,0,0,42,508,1,0,0,0,44,520,1,0,0,0,46,529,1,0,0,0,48,535,1,0,0,0, - 50,542,1,0,0,0,52,549,1,0,0,0,54,557,1,0,0,0,56,566,1,0,0,0,58,572,1,0, - 0,0,60,589,1,0,0,0,62,605,1,0,0,0,64,614,1,0,0,0,66,617,1,0,0,0,68,621, - 1,0,0,0,70,626,1,0,0,0,72,631,1,0,0,0,74,635,1,0,0,0,76,639,1,0,0,0,78, - 643,1,0,0,0,80,647,1,0,0,0,82,649,1,0,0,0,84,651,1,0,0,0,86,654,1,0,0,0, - 88,656,1,0,0,0,90,665,1,0,0,0,92,667,1,0,0,0,94,672,1,0,0,0,96,674,1,0, - 0,0,98,679,1,0,0,0,100,710,1,0,0,0,102,713,1,0,0,0,104,759,1,0,0,0,106, - 761,1,0,0,0,108,764,1,0,0,0,110,768,1,0,0,0,112,772,1,0,0,0,114,774,1,0, - 0,0,116,777,1,0,0,0,118,779,1,0,0,0,120,784,1,0,0,0,122,786,1,0,0,0,124, - 792,1,0,0,0,126,798,1,0,0,0,128,803,1,0,0,0,130,805,1,0,0,0,132,808,1,0, - 0,0,134,811,1,0,0,0,136,816,1,0,0,0,138,820,1,0,0,0,140,825,1,0,0,0,142, - 831,1,0,0,0,144,834,1,0,0,0,146,836,1,0,0,0,148,842,1,0,0,0,150,844,1,0, - 0,0,152,849,1,0,0,0,154,852,1,0,0,0,156,855,1,0,0,0,158,858,1,0,0,0,160, - 860,1,0,0,0,162,863,1,0,0,0,164,865,1,0,0,0,166,868,1,0,0,0,168,870,1,0, - 0,0,170,872,1,0,0,0,172,874,1,0,0,0,174,876,1,0,0,0,176,892,1,0,0,0,178, - 894,1,0,0,0,180,899,1,0,0,0,182,920,1,0,0,0,184,922,1,0,0,0,186,930,1,0, - 0,0,188,932,1,0,0,0,190,936,1,0,0,0,192,940,1,0,0,0,194,944,1,0,0,0,196, - 949,1,0,0,0,198,953,1,0,0,0,200,957,1,0,0,0,202,961,1,0,0,0,204,965,1,0, - 0,0,206,969,1,0,0,0,208,978,1,0,0,0,210,982,1,0,0,0,212,986,1,0,0,0,214, - 990,1,0,0,0,216,994,1,0,0,0,218,999,1,0,0,0,220,1003,1,0,0,0,222,1011,1, - 0,0,0,224,1032,1,0,0,0,226,1036,1,0,0,0,228,1040,1,0,0,0,230,1044,1,0,0, - 0,232,1048,1,0,0,0,234,1052,1,0,0,0,236,1057,1,0,0,0,238,1061,1,0,0,0,240, - 1065,1,0,0,0,242,1069,1,0,0,0,244,1072,1,0,0,0,246,1076,1,0,0,0,248,1080, - 1,0,0,0,250,1084,1,0,0,0,252,1088,1,0,0,0,254,1093,1,0,0,0,256,1098,1,0, - 0,0,258,1103,1,0,0,0,260,1110,1,0,0,0,262,1119,1,0,0,0,264,1126,1,0,0,0, - 266,1130,1,0,0,0,268,1134,1,0,0,0,270,1138,1,0,0,0,272,1142,1,0,0,0,274, - 1146,1,0,0,0,276,1152,1,0,0,0,278,1156,1,0,0,0,280,1160,1,0,0,0,282,1164, - 1,0,0,0,284,1168,1,0,0,0,286,1172,1,0,0,0,288,1176,1,0,0,0,290,1180,1,0, - 0,0,292,1184,1,0,0,0,294,1188,1,0,0,0,296,1193,1,0,0,0,298,1197,1,0,0,0, - 300,1201,1,0,0,0,302,1206,1,0,0,0,304,1210,1,0,0,0,306,1214,1,0,0,0,308, - 1218,1,0,0,0,310,1222,1,0,0,0,312,1228,1,0,0,0,314,1232,1,0,0,0,316,1236, - 1,0,0,0,318,1240,1,0,0,0,320,1244,1,0,0,0,322,1248,1,0,0,0,324,1252,1,0, - 0,0,326,1257,1,0,0,0,328,1261,1,0,0,0,330,1265,1,0,0,0,332,1269,1,0,0,0, - 334,1273,1,0,0,0,336,1277,1,0,0,0,338,1281,1,0,0,0,340,1286,1,0,0,0,342, - 1291,1,0,0,0,344,1295,1,0,0,0,346,1299,1,0,0,0,348,1303,1,0,0,0,350,1308, - 1,0,0,0,352,1318,1,0,0,0,354,1322,1,0,0,0,356,1326,1,0,0,0,358,1330,1,0, - 0,0,360,1335,1,0,0,0,362,1342,1,0,0,0,364,1346,1,0,0,0,366,1350,1,0,0,0, - 368,1354,1,0,0,0,370,1358,1,0,0,0,372,1363,1,0,0,0,374,1369,1,0,0,0,376, - 1373,1,0,0,0,378,1377,1,0,0,0,380,1381,1,0,0,0,382,1387,1,0,0,0,384,1391, - 1,0,0,0,386,1395,1,0,0,0,388,1399,1,0,0,0,390,1405,1,0,0,0,392,1411,1,0, - 0,0,394,1417,1,0,0,0,396,397,7,0,0,0,397,398,7,1,0,0,398,399,7,2,0,0,399, - 400,7,2,0,0,400,401,7,3,0,0,401,402,7,4,0,0,402,403,7,5,0,0,403,404,1,0, - 0,0,404,405,6,0,0,0,405,17,1,0,0,0,406,407,7,0,0,0,407,408,7,6,0,0,408, - 409,7,7,0,0,409,410,7,8,0,0,410,411,1,0,0,0,411,412,6,1,1,0,412,19,1,0, - 0,0,413,414,7,3,0,0,414,415,7,9,0,0,415,416,7,6,0,0,416,417,7,1,0,0,417, - 418,7,4,0,0,418,419,7,10,0,0,419,420,1,0,0,0,420,421,6,2,2,0,421,21,1,0, - 0,0,422,423,7,3,0,0,423,424,7,11,0,0,424,425,7,12,0,0,425,426,7,13,0,0, - 426,427,1,0,0,0,427,428,6,3,0,0,428,23,1,0,0,0,429,430,7,3,0,0,430,431, - 7,14,0,0,431,432,7,8,0,0,432,433,7,13,0,0,433,434,7,12,0,0,434,435,7,1, - 0,0,435,436,7,9,0,0,436,437,1,0,0,0,437,438,6,4,3,0,438,25,1,0,0,0,439, - 440,7,15,0,0,440,441,7,6,0,0,441,442,7,7,0,0,442,443,7,16,0,0,443,444,1, - 0,0,0,444,445,6,5,4,0,445,27,1,0,0,0,446,447,7,17,0,0,447,448,7,6,0,0,448, - 449,7,7,0,0,449,450,7,18,0,0,450,451,1,0,0,0,451,452,6,6,0,0,452,29,1,0, - 0,0,453,454,7,1,0,0,454,455,7,9,0,0,455,456,7,13,0,0,456,457,7,1,0,0,457, - 458,7,9,0,0,458,459,7,3,0,0,459,460,7,2,0,0,460,461,7,5,0,0,461,462,7,12, - 0,0,462,463,7,5,0,0,463,464,7,2,0,0,464,465,1,0,0,0,465,466,6,7,0,0,466, - 31,1,0,0,0,467,468,7,18,0,0,468,469,7,3,0,0,469,470,7,3,0,0,470,471,7,8, - 0,0,471,472,1,0,0,0,472,473,6,8,1,0,473,33,1,0,0,0,474,475,7,13,0,0,475, - 476,7,1,0,0,476,477,7,16,0,0,477,478,7,1,0,0,478,479,7,5,0,0,479,480,1, - 0,0,0,480,481,6,9,0,0,481,35,1,0,0,0,482,483,7,13,0,0,483,484,7,7,0,0,484, - 485,7,7,0,0,485,486,7,18,0,0,486,487,7,19,0,0,487,488,7,8,0,0,488,489,1, - 0,0,0,489,490,6,10,5,0,490,37,1,0,0,0,491,492,7,16,0,0,492,493,7,3,0,0, - 493,494,7,5,0,0,494,495,7,12,0,0,495,496,1,0,0,0,496,497,6,11,6,0,497,39, - 1,0,0,0,498,499,7,16,0,0,499,500,7,3,0,0,500,501,7,5,0,0,501,502,7,6,0, - 0,502,503,7,1,0,0,503,504,7,4,0,0,504,505,7,2,0,0,505,506,1,0,0,0,506,507, - 6,12,7,0,507,41,1,0,0,0,508,509,7,16,0,0,509,510,7,11,0,0,510,511,5,95, - 0,0,511,512,7,3,0,0,512,513,7,14,0,0,513,514,7,8,0,0,514,515,7,12,0,0,515, - 516,7,9,0,0,516,517,7,0,0,0,517,518,1,0,0,0,518,519,6,13,8,0,519,43,1,0, - 0,0,520,521,7,6,0,0,521,522,7,3,0,0,522,523,7,9,0,0,523,524,7,12,0,0,524, - 525,7,16,0,0,525,526,7,3,0,0,526,527,1,0,0,0,527,528,6,14,9,0,528,45,1, - 0,0,0,529,530,7,6,0,0,530,531,7,7,0,0,531,532,7,20,0,0,532,533,1,0,0,0, - 533,534,6,15,0,0,534,47,1,0,0,0,535,536,7,2,0,0,536,537,7,10,0,0,537,538, - 7,7,0,0,538,539,7,20,0,0,539,540,1,0,0,0,540,541,6,16,10,0,541,49,1,0,0, - 0,542,543,7,2,0,0,543,544,7,7,0,0,544,545,7,6,0,0,545,546,7,5,0,0,546,547, - 1,0,0,0,547,548,6,17,0,0,548,51,1,0,0,0,549,550,7,2,0,0,550,551,7,5,0,0, - 551,552,7,12,0,0,552,553,7,5,0,0,553,554,7,2,0,0,554,555,1,0,0,0,555,556, - 6,18,0,0,556,53,1,0,0,0,557,558,7,20,0,0,558,559,7,10,0,0,559,560,7,3,0, - 0,560,561,7,6,0,0,561,562,7,3,0,0,562,563,1,0,0,0,563,564,6,19,0,0,564, - 55,1,0,0,0,565,567,8,21,0,0,566,565,1,0,0,0,567,568,1,0,0,0,568,566,1,0, - 0,0,568,569,1,0,0,0,569,570,1,0,0,0,570,571,6,20,0,0,571,57,1,0,0,0,572, - 573,5,47,0,0,573,574,5,47,0,0,574,578,1,0,0,0,575,577,8,22,0,0,576,575, - 1,0,0,0,577,580,1,0,0,0,578,576,1,0,0,0,578,579,1,0,0,0,579,582,1,0,0,0, - 580,578,1,0,0,0,581,583,5,13,0,0,582,581,1,0,0,0,582,583,1,0,0,0,583,585, - 1,0,0,0,584,586,5,10,0,0,585,584,1,0,0,0,585,586,1,0,0,0,586,587,1,0,0, - 0,587,588,6,21,11,0,588,59,1,0,0,0,589,590,5,47,0,0,590,591,5,42,0,0,591, - 596,1,0,0,0,592,595,3,60,22,0,593,595,9,0,0,0,594,592,1,0,0,0,594,593,1, - 0,0,0,595,598,1,0,0,0,596,597,1,0,0,0,596,594,1,0,0,0,597,599,1,0,0,0,598, - 596,1,0,0,0,599,600,5,42,0,0,600,601,5,47,0,0,601,602,1,0,0,0,602,603,6, - 22,11,0,603,61,1,0,0,0,604,606,7,23,0,0,605,604,1,0,0,0,606,607,1,0,0,0, - 607,605,1,0,0,0,607,608,1,0,0,0,608,609,1,0,0,0,609,610,6,23,11,0,610,63, - 1,0,0,0,611,615,8,24,0,0,612,613,5,47,0,0,613,615,8,25,0,0,614,611,1,0, - 0,0,614,612,1,0,0,0,615,65,1,0,0,0,616,618,3,64,24,0,617,616,1,0,0,0,618, - 619,1,0,0,0,619,617,1,0,0,0,619,620,1,0,0,0,620,67,1,0,0,0,621,622,3,178, - 81,0,622,623,1,0,0,0,623,624,6,26,12,0,624,625,6,26,13,0,625,69,1,0,0,0, - 626,627,3,78,31,0,627,628,1,0,0,0,628,629,6,27,14,0,629,630,6,27,15,0,630, - 71,1,0,0,0,631,632,3,62,23,0,632,633,1,0,0,0,633,634,6,28,11,0,634,73,1, - 0,0,0,635,636,3,58,21,0,636,637,1,0,0,0,637,638,6,29,11,0,638,75,1,0,0, - 0,639,640,3,60,22,0,640,641,1,0,0,0,641,642,6,30,11,0,642,77,1,0,0,0,643, - 644,5,124,0,0,644,645,1,0,0,0,645,646,6,31,15,0,646,79,1,0,0,0,647,648, - 7,26,0,0,648,81,1,0,0,0,649,650,7,27,0,0,650,83,1,0,0,0,651,652,5,92,0, - 0,652,653,7,28,0,0,653,85,1,0,0,0,654,655,8,29,0,0,655,87,1,0,0,0,656,658, - 7,3,0,0,657,659,7,30,0,0,658,657,1,0,0,0,658,659,1,0,0,0,659,661,1,0,0, - 0,660,662,3,80,32,0,661,660,1,0,0,0,662,663,1,0,0,0,663,661,1,0,0,0,663, - 664,1,0,0,0,664,89,1,0,0,0,665,666,5,64,0,0,666,91,1,0,0,0,667,668,5,96, - 0,0,668,93,1,0,0,0,669,673,8,31,0,0,670,671,5,96,0,0,671,673,5,96,0,0,672, - 669,1,0,0,0,672,670,1,0,0,0,673,95,1,0,0,0,674,675,5,95,0,0,675,97,1,0, - 0,0,676,680,3,82,33,0,677,680,3,80,32,0,678,680,3,96,40,0,679,676,1,0,0, - 0,679,677,1,0,0,0,679,678,1,0,0,0,680,99,1,0,0,0,681,686,5,34,0,0,682,685, - 3,84,34,0,683,685,3,86,35,0,684,682,1,0,0,0,684,683,1,0,0,0,685,688,1,0, - 0,0,686,684,1,0,0,0,686,687,1,0,0,0,687,689,1,0,0,0,688,686,1,0,0,0,689, - 711,5,34,0,0,690,691,5,34,0,0,691,692,5,34,0,0,692,693,5,34,0,0,693,697, - 1,0,0,0,694,696,8,22,0,0,695,694,1,0,0,0,696,699,1,0,0,0,697,698,1,0,0, - 0,697,695,1,0,0,0,698,700,1,0,0,0,699,697,1,0,0,0,700,701,5,34,0,0,701, - 702,5,34,0,0,702,703,5,34,0,0,703,705,1,0,0,0,704,706,5,34,0,0,705,704, - 1,0,0,0,705,706,1,0,0,0,706,708,1,0,0,0,707,709,5,34,0,0,708,707,1,0,0, - 0,708,709,1,0,0,0,709,711,1,0,0,0,710,681,1,0,0,0,710,690,1,0,0,0,711,101, - 1,0,0,0,712,714,3,80,32,0,713,712,1,0,0,0,714,715,1,0,0,0,715,713,1,0,0, - 0,715,716,1,0,0,0,716,103,1,0,0,0,717,719,3,80,32,0,718,717,1,0,0,0,719, - 720,1,0,0,0,720,718,1,0,0,0,720,721,1,0,0,0,721,722,1,0,0,0,722,726,3,120, - 52,0,723,725,3,80,32,0,724,723,1,0,0,0,725,728,1,0,0,0,726,724,1,0,0,0, - 726,727,1,0,0,0,727,760,1,0,0,0,728,726,1,0,0,0,729,731,3,120,52,0,730, - 732,3,80,32,0,731,730,1,0,0,0,732,733,1,0,0,0,733,731,1,0,0,0,733,734,1, - 0,0,0,734,760,1,0,0,0,735,737,3,80,32,0,736,735,1,0,0,0,737,738,1,0,0,0, - 738,736,1,0,0,0,738,739,1,0,0,0,739,747,1,0,0,0,740,744,3,120,52,0,741, - 743,3,80,32,0,742,741,1,0,0,0,743,746,1,0,0,0,744,742,1,0,0,0,744,745,1, - 0,0,0,745,748,1,0,0,0,746,744,1,0,0,0,747,740,1,0,0,0,747,748,1,0,0,0,748, - 749,1,0,0,0,749,750,3,88,36,0,750,760,1,0,0,0,751,753,3,120,52,0,752,754, - 3,80,32,0,753,752,1,0,0,0,754,755,1,0,0,0,755,753,1,0,0,0,755,756,1,0,0, - 0,756,757,1,0,0,0,757,758,3,88,36,0,758,760,1,0,0,0,759,718,1,0,0,0,759, - 729,1,0,0,0,759,736,1,0,0,0,759,751,1,0,0,0,760,105,1,0,0,0,761,762,7,32, - 0,0,762,763,7,33,0,0,763,107,1,0,0,0,764,765,7,12,0,0,765,766,7,9,0,0,766, - 767,7,0,0,0,767,109,1,0,0,0,768,769,7,12,0,0,769,770,7,2,0,0,770,771,7, - 4,0,0,771,111,1,0,0,0,772,773,5,61,0,0,773,113,1,0,0,0,774,775,5,58,0,0, - 775,776,5,58,0,0,776,115,1,0,0,0,777,778,5,44,0,0,778,117,1,0,0,0,779,780, - 7,0,0,0,780,781,7,3,0,0,781,782,7,2,0,0,782,783,7,4,0,0,783,119,1,0,0,0, - 784,785,5,46,0,0,785,121,1,0,0,0,786,787,7,15,0,0,787,788,7,12,0,0,788, - 789,7,13,0,0,789,790,7,2,0,0,790,791,7,3,0,0,791,123,1,0,0,0,792,793,7, - 15,0,0,793,794,7,1,0,0,794,795,7,6,0,0,795,796,7,2,0,0,796,797,7,5,0,0, - 797,125,1,0,0,0,798,799,7,13,0,0,799,800,7,12,0,0,800,801,7,2,0,0,801,802, - 7,5,0,0,802,127,1,0,0,0,803,804,5,40,0,0,804,129,1,0,0,0,805,806,7,1,0, - 0,806,807,7,9,0,0,807,131,1,0,0,0,808,809,7,1,0,0,809,810,7,2,0,0,810,133, - 1,0,0,0,811,812,7,13,0,0,812,813,7,1,0,0,813,814,7,18,0,0,814,815,7,3,0, - 0,815,135,1,0,0,0,816,817,7,9,0,0,817,818,7,7,0,0,818,819,7,5,0,0,819,137, - 1,0,0,0,820,821,7,9,0,0,821,822,7,19,0,0,822,823,7,13,0,0,823,824,7,13, - 0,0,824,139,1,0,0,0,825,826,7,9,0,0,826,827,7,19,0,0,827,828,7,13,0,0,828, - 829,7,13,0,0,829,830,7,2,0,0,830,141,1,0,0,0,831,832,7,7,0,0,832,833,7, - 6,0,0,833,143,1,0,0,0,834,835,5,63,0,0,835,145,1,0,0,0,836,837,7,6,0,0, - 837,838,7,13,0,0,838,839,7,1,0,0,839,840,7,18,0,0,840,841,7,3,0,0,841,147, - 1,0,0,0,842,843,5,41,0,0,843,149,1,0,0,0,844,845,7,5,0,0,845,846,7,6,0, - 0,846,847,7,19,0,0,847,848,7,3,0,0,848,151,1,0,0,0,849,850,5,61,0,0,850, - 851,5,61,0,0,851,153,1,0,0,0,852,853,5,61,0,0,853,854,5,126,0,0,854,155, - 1,0,0,0,855,856,5,33,0,0,856,857,5,61,0,0,857,157,1,0,0,0,858,859,5,60, - 0,0,859,159,1,0,0,0,860,861,5,60,0,0,861,862,5,61,0,0,862,161,1,0,0,0,863, - 864,5,62,0,0,864,163,1,0,0,0,865,866,5,62,0,0,866,867,5,61,0,0,867,165, - 1,0,0,0,868,869,5,43,0,0,869,167,1,0,0,0,870,871,5,45,0,0,871,169,1,0,0, - 0,872,873,5,42,0,0,873,171,1,0,0,0,874,875,5,47,0,0,875,173,1,0,0,0,876, - 877,5,37,0,0,877,175,1,0,0,0,878,879,3,144,64,0,879,883,3,82,33,0,880,882, - 3,98,41,0,881,880,1,0,0,0,882,885,1,0,0,0,883,881,1,0,0,0,883,884,1,0,0, - 0,884,893,1,0,0,0,885,883,1,0,0,0,886,888,3,144,64,0,887,889,3,80,32,0, - 888,887,1,0,0,0,889,890,1,0,0,0,890,888,1,0,0,0,890,891,1,0,0,0,891,893, - 1,0,0,0,892,878,1,0,0,0,892,886,1,0,0,0,893,177,1,0,0,0,894,895,5,91,0, - 0,895,896,1,0,0,0,896,897,6,81,0,0,897,898,6,81,0,0,898,179,1,0,0,0,899, - 900,5,93,0,0,900,901,1,0,0,0,901,902,6,82,15,0,902,903,6,82,15,0,903,181, - 1,0,0,0,904,908,3,82,33,0,905,907,3,98,41,0,906,905,1,0,0,0,907,910,1,0, - 0,0,908,906,1,0,0,0,908,909,1,0,0,0,909,921,1,0,0,0,910,908,1,0,0,0,911, - 914,3,96,40,0,912,914,3,90,37,0,913,911,1,0,0,0,913,912,1,0,0,0,914,916, - 1,0,0,0,915,917,3,98,41,0,916,915,1,0,0,0,917,918,1,0,0,0,918,916,1,0,0, - 0,918,919,1,0,0,0,919,921,1,0,0,0,920,904,1,0,0,0,920,913,1,0,0,0,921,183, - 1,0,0,0,922,924,3,92,38,0,923,925,3,94,39,0,924,923,1,0,0,0,925,926,1,0, - 0,0,926,924,1,0,0,0,926,927,1,0,0,0,927,928,1,0,0,0,928,929,3,92,38,0,929, - 185,1,0,0,0,930,931,3,184,84,0,931,187,1,0,0,0,932,933,3,58,21,0,933,934, - 1,0,0,0,934,935,6,86,11,0,935,189,1,0,0,0,936,937,3,60,22,0,937,938,1,0, - 0,0,938,939,6,87,11,0,939,191,1,0,0,0,940,941,3,62,23,0,941,942,1,0,0,0, - 942,943,6,88,11,0,943,193,1,0,0,0,944,945,3,78,31,0,945,946,1,0,0,0,946, - 947,6,89,14,0,947,948,6,89,15,0,948,195,1,0,0,0,949,950,3,178,81,0,950, - 951,1,0,0,0,951,952,6,90,12,0,952,197,1,0,0,0,953,954,3,180,82,0,954,955, - 1,0,0,0,955,956,6,91,16,0,956,199,1,0,0,0,957,958,3,116,50,0,958,959,1, - 0,0,0,959,960,6,92,17,0,960,201,1,0,0,0,961,962,3,112,48,0,962,963,1,0, - 0,0,963,964,6,93,18,0,964,203,1,0,0,0,965,966,3,100,42,0,966,967,1,0,0, - 0,967,968,6,94,19,0,968,205,1,0,0,0,969,970,7,16,0,0,970,971,7,3,0,0,971, - 972,7,5,0,0,972,973,7,12,0,0,973,974,7,0,0,0,974,975,7,12,0,0,975,976,7, - 5,0,0,976,977,7,12,0,0,977,207,1,0,0,0,978,979,3,66,25,0,979,980,1,0,0, - 0,980,981,6,96,20,0,981,209,1,0,0,0,982,983,3,58,21,0,983,984,1,0,0,0,984, - 985,6,97,11,0,985,211,1,0,0,0,986,987,3,60,22,0,987,988,1,0,0,0,988,989, - 6,98,11,0,989,213,1,0,0,0,990,991,3,62,23,0,991,992,1,0,0,0,992,993,6,99, - 11,0,993,215,1,0,0,0,994,995,3,78,31,0,995,996,1,0,0,0,996,997,6,100,14, - 0,997,998,6,100,15,0,998,217,1,0,0,0,999,1000,3,120,52,0,1000,1001,1,0, - 0,0,1001,1002,6,101,21,0,1002,219,1,0,0,0,1003,1004,3,116,50,0,1004,1005, - 1,0,0,0,1005,1006,6,102,17,0,1006,221,1,0,0,0,1007,1012,3,82,33,0,1008, - 1012,3,80,32,0,1009,1012,3,96,40,0,1010,1012,3,170,77,0,1011,1007,1,0,0, - 0,1011,1008,1,0,0,0,1011,1009,1,0,0,0,1011,1010,1,0,0,0,1012,223,1,0,0, - 0,1013,1016,3,82,33,0,1014,1016,3,170,77,0,1015,1013,1,0,0,0,1015,1014, - 1,0,0,0,1016,1020,1,0,0,0,1017,1019,3,222,103,0,1018,1017,1,0,0,0,1019, - 1022,1,0,0,0,1020,1018,1,0,0,0,1020,1021,1,0,0,0,1021,1033,1,0,0,0,1022, - 1020,1,0,0,0,1023,1026,3,96,40,0,1024,1026,3,90,37,0,1025,1023,1,0,0,0, - 1025,1024,1,0,0,0,1026,1028,1,0,0,0,1027,1029,3,222,103,0,1028,1027,1,0, - 0,0,1029,1030,1,0,0,0,1030,1028,1,0,0,0,1030,1031,1,0,0,0,1031,1033,1,0, - 0,0,1032,1015,1,0,0,0,1032,1025,1,0,0,0,1033,225,1,0,0,0,1034,1037,3,224, - 104,0,1035,1037,3,184,84,0,1036,1034,1,0,0,0,1036,1035,1,0,0,0,1037,1038, - 1,0,0,0,1038,1036,1,0,0,0,1038,1039,1,0,0,0,1039,227,1,0,0,0,1040,1041, - 3,58,21,0,1041,1042,1,0,0,0,1042,1043,6,106,11,0,1043,229,1,0,0,0,1044, - 1045,3,60,22,0,1045,1046,1,0,0,0,1046,1047,6,107,11,0,1047,231,1,0,0,0, - 1048,1049,3,62,23,0,1049,1050,1,0,0,0,1050,1051,6,108,11,0,1051,233,1,0, - 0,0,1052,1053,3,78,31,0,1053,1054,1,0,0,0,1054,1055,6,109,14,0,1055,1056, - 6,109,15,0,1056,235,1,0,0,0,1057,1058,3,112,48,0,1058,1059,1,0,0,0,1059, - 1060,6,110,18,0,1060,237,1,0,0,0,1061,1062,3,116,50,0,1062,1063,1,0,0,0, - 1063,1064,6,111,17,0,1064,239,1,0,0,0,1065,1066,3,120,52,0,1066,1067,1, - 0,0,0,1067,1068,6,112,21,0,1068,241,1,0,0,0,1069,1070,7,12,0,0,1070,1071, - 7,2,0,0,1071,243,1,0,0,0,1072,1073,3,226,105,0,1073,1074,1,0,0,0,1074,1075, - 6,114,22,0,1075,245,1,0,0,0,1076,1077,3,58,21,0,1077,1078,1,0,0,0,1078, - 1079,6,115,11,0,1079,247,1,0,0,0,1080,1081,3,60,22,0,1081,1082,1,0,0,0, - 1082,1083,6,116,11,0,1083,249,1,0,0,0,1084,1085,3,62,23,0,1085,1086,1,0, - 0,0,1086,1087,6,117,11,0,1087,251,1,0,0,0,1088,1089,3,78,31,0,1089,1090, - 1,0,0,0,1090,1091,6,118,14,0,1091,1092,6,118,15,0,1092,253,1,0,0,0,1093, - 1094,3,178,81,0,1094,1095,1,0,0,0,1095,1096,6,119,12,0,1096,1097,6,119, - 23,0,1097,255,1,0,0,0,1098,1099,7,7,0,0,1099,1100,7,9,0,0,1100,1101,1,0, - 0,0,1101,1102,6,120,24,0,1102,257,1,0,0,0,1103,1104,7,20,0,0,1104,1105, - 7,1,0,0,1105,1106,7,5,0,0,1106,1107,7,10,0,0,1107,1108,1,0,0,0,1108,1109, - 6,121,24,0,1109,259,1,0,0,0,1110,1111,8,34,0,0,1111,261,1,0,0,0,1112,1114, - 3,260,122,0,1113,1112,1,0,0,0,1114,1115,1,0,0,0,1115,1113,1,0,0,0,1115, - 1116,1,0,0,0,1116,1117,1,0,0,0,1117,1118,3,360,172,0,1118,1120,1,0,0,0, - 1119,1113,1,0,0,0,1119,1120,1,0,0,0,1120,1122,1,0,0,0,1121,1123,3,260,122, - 0,1122,1121,1,0,0,0,1123,1124,1,0,0,0,1124,1122,1,0,0,0,1124,1125,1,0,0, - 0,1125,263,1,0,0,0,1126,1127,3,186,85,0,1127,1128,1,0,0,0,1128,1129,6,124, - 25,0,1129,265,1,0,0,0,1130,1131,3,262,123,0,1131,1132,1,0,0,0,1132,1133, - 6,125,26,0,1133,267,1,0,0,0,1134,1135,3,58,21,0,1135,1136,1,0,0,0,1136, - 1137,6,126,11,0,1137,269,1,0,0,0,1138,1139,3,60,22,0,1139,1140,1,0,0,0, - 1140,1141,6,127,11,0,1141,271,1,0,0,0,1142,1143,3,62,23,0,1143,1144,1,0, - 0,0,1144,1145,6,128,11,0,1145,273,1,0,0,0,1146,1147,3,78,31,0,1147,1148, - 1,0,0,0,1148,1149,6,129,14,0,1149,1150,6,129,15,0,1150,1151,6,129,15,0, - 1151,275,1,0,0,0,1152,1153,3,112,48,0,1153,1154,1,0,0,0,1154,1155,6,130, - 18,0,1155,277,1,0,0,0,1156,1157,3,116,50,0,1157,1158,1,0,0,0,1158,1159, - 6,131,17,0,1159,279,1,0,0,0,1160,1161,3,120,52,0,1161,1162,1,0,0,0,1162, - 1163,6,132,21,0,1163,281,1,0,0,0,1164,1165,3,258,121,0,1165,1166,1,0,0, - 0,1166,1167,6,133,27,0,1167,283,1,0,0,0,1168,1169,3,226,105,0,1169,1170, - 1,0,0,0,1170,1171,6,134,22,0,1171,285,1,0,0,0,1172,1173,3,186,85,0,1173, - 1174,1,0,0,0,1174,1175,6,135,25,0,1175,287,1,0,0,0,1176,1177,3,58,21,0, - 1177,1178,1,0,0,0,1178,1179,6,136,11,0,1179,289,1,0,0,0,1180,1181,3,60, - 22,0,1181,1182,1,0,0,0,1182,1183,6,137,11,0,1183,291,1,0,0,0,1184,1185, - 3,62,23,0,1185,1186,1,0,0,0,1186,1187,6,138,11,0,1187,293,1,0,0,0,1188, - 1189,3,78,31,0,1189,1190,1,0,0,0,1190,1191,6,139,14,0,1191,1192,6,139,15, - 0,1192,295,1,0,0,0,1193,1194,3,116,50,0,1194,1195,1,0,0,0,1195,1196,6,140, - 17,0,1196,297,1,0,0,0,1197,1198,3,120,52,0,1198,1199,1,0,0,0,1199,1200, - 6,141,21,0,1200,299,1,0,0,0,1201,1202,3,256,120,0,1202,1203,1,0,0,0,1203, - 1204,6,142,28,0,1204,1205,6,142,29,0,1205,301,1,0,0,0,1206,1207,3,66,25, - 0,1207,1208,1,0,0,0,1208,1209,6,143,20,0,1209,303,1,0,0,0,1210,1211,3,58, - 21,0,1211,1212,1,0,0,0,1212,1213,6,144,11,0,1213,305,1,0,0,0,1214,1215, - 3,60,22,0,1215,1216,1,0,0,0,1216,1217,6,145,11,0,1217,307,1,0,0,0,1218, - 1219,3,62,23,0,1219,1220,1,0,0,0,1220,1221,6,146,11,0,1221,309,1,0,0,0, - 1222,1223,3,78,31,0,1223,1224,1,0,0,0,1224,1225,6,147,14,0,1225,1226,6, - 147,15,0,1226,1227,6,147,15,0,1227,311,1,0,0,0,1228,1229,3,116,50,0,1229, - 1230,1,0,0,0,1230,1231,6,148,17,0,1231,313,1,0,0,0,1232,1233,3,120,52,0, - 1233,1234,1,0,0,0,1234,1235,6,149,21,0,1235,315,1,0,0,0,1236,1237,3,226, - 105,0,1237,1238,1,0,0,0,1238,1239,6,150,22,0,1239,317,1,0,0,0,1240,1241, - 3,58,21,0,1241,1242,1,0,0,0,1242,1243,6,151,11,0,1243,319,1,0,0,0,1244, - 1245,3,60,22,0,1245,1246,1,0,0,0,1246,1247,6,152,11,0,1247,321,1,0,0,0, - 1248,1249,3,62,23,0,1249,1250,1,0,0,0,1250,1251,6,153,11,0,1251,323,1,0, - 0,0,1252,1253,3,78,31,0,1253,1254,1,0,0,0,1254,1255,6,154,14,0,1255,1256, - 6,154,15,0,1256,325,1,0,0,0,1257,1258,3,120,52,0,1258,1259,1,0,0,0,1259, - 1260,6,155,21,0,1260,327,1,0,0,0,1261,1262,3,186,85,0,1262,1263,1,0,0,0, - 1263,1264,6,156,25,0,1264,329,1,0,0,0,1265,1266,3,182,83,0,1266,1267,1, - 0,0,0,1267,1268,6,157,30,0,1268,331,1,0,0,0,1269,1270,3,58,21,0,1270,1271, - 1,0,0,0,1271,1272,6,158,11,0,1272,333,1,0,0,0,1273,1274,3,60,22,0,1274, - 1275,1,0,0,0,1275,1276,6,159,11,0,1276,335,1,0,0,0,1277,1278,3,62,23,0, - 1278,1279,1,0,0,0,1279,1280,6,160,11,0,1280,337,1,0,0,0,1281,1282,3,78, - 31,0,1282,1283,1,0,0,0,1283,1284,6,161,14,0,1284,1285,6,161,15,0,1285,339, - 1,0,0,0,1286,1287,7,1,0,0,1287,1288,7,9,0,0,1288,1289,7,15,0,0,1289,1290, - 7,7,0,0,1290,341,1,0,0,0,1291,1292,3,58,21,0,1292,1293,1,0,0,0,1293,1294, - 6,163,11,0,1294,343,1,0,0,0,1295,1296,3,60,22,0,1296,1297,1,0,0,0,1297, - 1298,6,164,11,0,1298,345,1,0,0,0,1299,1300,3,62,23,0,1300,1301,1,0,0,0, - 1301,1302,6,165,11,0,1302,347,1,0,0,0,1303,1304,3,78,31,0,1304,1305,1,0, - 0,0,1305,1306,6,166,14,0,1306,1307,6,166,15,0,1307,349,1,0,0,0,1308,1309, - 7,15,0,0,1309,1310,7,19,0,0,1310,1311,7,9,0,0,1311,1312,7,4,0,0,1312,1313, - 7,5,0,0,1313,1314,7,1,0,0,1314,1315,7,7,0,0,1315,1316,7,9,0,0,1316,1317, - 7,2,0,0,1317,351,1,0,0,0,1318,1319,3,58,21,0,1319,1320,1,0,0,0,1320,1321, - 6,168,11,0,1321,353,1,0,0,0,1322,1323,3,60,22,0,1323,1324,1,0,0,0,1324, - 1325,6,169,11,0,1325,355,1,0,0,0,1326,1327,3,62,23,0,1327,1328,1,0,0,0, - 1328,1329,6,170,11,0,1329,357,1,0,0,0,1330,1331,3,180,82,0,1331,1332,1, - 0,0,0,1332,1333,6,171,16,0,1333,1334,6,171,15,0,1334,359,1,0,0,0,1335,1336, - 5,58,0,0,1336,361,1,0,0,0,1337,1343,3,90,37,0,1338,1343,3,80,32,0,1339, - 1343,3,120,52,0,1340,1343,3,82,33,0,1341,1343,3,96,40,0,1342,1337,1,0,0, - 0,1342,1338,1,0,0,0,1342,1339,1,0,0,0,1342,1340,1,0,0,0,1342,1341,1,0,0, - 0,1343,1344,1,0,0,0,1344,1342,1,0,0,0,1344,1345,1,0,0,0,1345,363,1,0,0, - 0,1346,1347,3,58,21,0,1347,1348,1,0,0,0,1348,1349,6,174,11,0,1349,365,1, - 0,0,0,1350,1351,3,60,22,0,1351,1352,1,0,0,0,1352,1353,6,175,11,0,1353,367, - 1,0,0,0,1354,1355,3,62,23,0,1355,1356,1,0,0,0,1356,1357,6,176,11,0,1357, - 369,1,0,0,0,1358,1359,3,78,31,0,1359,1360,1,0,0,0,1360,1361,6,177,14,0, - 1361,1362,6,177,15,0,1362,371,1,0,0,0,1363,1364,3,66,25,0,1364,1365,1,0, - 0,0,1365,1366,6,178,20,0,1366,1367,6,178,15,0,1367,1368,6,178,31,0,1368, - 373,1,0,0,0,1369,1370,3,58,21,0,1370,1371,1,0,0,0,1371,1372,6,179,11,0, - 1372,375,1,0,0,0,1373,1374,3,60,22,0,1374,1375,1,0,0,0,1375,1376,6,180, - 11,0,1376,377,1,0,0,0,1377,1378,3,62,23,0,1378,1379,1,0,0,0,1379,1380,6, - 181,11,0,1380,379,1,0,0,0,1381,1382,3,116,50,0,1382,1383,1,0,0,0,1383,1384, - 6,182,17,0,1384,1385,6,182,15,0,1385,1386,6,182,7,0,1386,381,1,0,0,0,1387, - 1388,3,58,21,0,1388,1389,1,0,0,0,1389,1390,6,183,11,0,1390,383,1,0,0,0, - 1391,1392,3,60,22,0,1392,1393,1,0,0,0,1393,1394,6,184,11,0,1394,385,1,0, - 0,0,1395,1396,3,62,23,0,1396,1397,1,0,0,0,1397,1398,6,185,11,0,1398,387, - 1,0,0,0,1399,1400,3,186,85,0,1400,1401,1,0,0,0,1401,1402,6,186,15,0,1402, - 1403,6,186,0,0,1403,1404,6,186,25,0,1404,389,1,0,0,0,1405,1406,3,182,83, - 0,1406,1407,1,0,0,0,1407,1408,6,187,15,0,1408,1409,6,187,0,0,1409,1410, - 6,187,30,0,1410,391,1,0,0,0,1411,1412,3,106,45,0,1412,1413,1,0,0,0,1413, - 1414,6,188,15,0,1414,1415,6,188,0,0,1415,1416,6,188,32,0,1416,393,1,0,0, - 0,1417,1418,3,78,31,0,1418,1419,1,0,0,0,1419,1420,6,189,14,0,1420,1421, - 6,189,15,0,1421,395,1,0,0,0,65,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,568, - 578,582,585,594,596,607,614,619,658,663,672,679,684,686,697,705,708,710, - 715,720,726,733,738,744,747,755,759,883,890,892,908,913,918,920,926,1011, - 1015,1020,1025,1030,1032,1036,1038,1115,1119,1124,1342,1344,33,5,2,0,5, + 2,187,7,187,2,188,7,188,2,189,7,189,2,190,7,190,2,191,7,191,2,192,7,192, + 2,193,7,193,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3, + 1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,6, + 1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7, + 1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,10, + 1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11,1, + 11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,13, + 1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,14,1, + 14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16, + 1,16,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,1, + 18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,20,4,20,575,8,20,11,20, + 12,20,576,1,20,1,20,1,21,1,21,1,21,1,21,5,21,585,8,21,10,21,12,21,588,9, + 21,1,21,3,21,591,8,21,1,21,3,21,594,8,21,1,21,1,21,1,22,1,22,1,22,1,22, + 1,22,5,22,603,8,22,10,22,12,22,606,9,22,1,22,1,22,1,22,1,22,1,22,1,23,4, + 23,614,8,23,11,23,12,23,615,1,23,1,23,1,24,1,24,1,24,3,24,623,8,24,1,25, + 4,25,626,8,25,11,25,12,25,627,1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1, + 27,1,27,1,28,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,31, + 1,31,1,31,1,31,1,32,1,32,1,33,1,33,1,34,1,34,1,34,1,35,1,35,1,36,1,36,3, + 36,667,8,36,1,36,4,36,670,8,36,11,36,12,36,671,1,37,1,37,1,38,1,38,1,39, + 1,39,1,39,3,39,681,8,39,1,40,1,40,1,41,1,41,1,41,3,41,688,8,41,1,42,1,42, + 1,42,5,42,693,8,42,10,42,12,42,696,9,42,1,42,1,42,1,42,1,42,1,42,1,42,5, + 42,704,8,42,10,42,12,42,707,9,42,1,42,1,42,1,42,1,42,1,42,3,42,714,8,42, + 1,42,3,42,717,8,42,3,42,719,8,42,1,43,4,43,722,8,43,11,43,12,43,723,1,44, + 4,44,727,8,44,11,44,12,44,728,1,44,1,44,5,44,733,8,44,10,44,12,44,736,9, + 44,1,44,1,44,4,44,740,8,44,11,44,12,44,741,1,44,4,44,745,8,44,11,44,12, + 44,746,1,44,1,44,5,44,751,8,44,10,44,12,44,754,9,44,3,44,756,8,44,1,44, + 1,44,1,44,1,44,4,44,762,8,44,11,44,12,44,763,1,44,1,44,3,44,768,8,44,1, + 45,1,45,1,45,1,46,1,46,1,46,1,46,1,47,1,47,1,47,1,47,1,48,1,48,1,49,1,49, + 1,49,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,52,1,52,1,53,1,53,1,53,1,53,1, + 53,1,53,1,54,1,54,1,54,1,54,1,54,1,54,1,55,1,55,1,55,1,55,1,55,1,56,1,56, + 1,57,1,57,1,57,1,58,1,58,1,58,1,59,1,59,1,59,1,59,1,59,1,60,1,60,1,60,1, + 60,1,61,1,61,1,61,1,61,1,61,1,62,1,62,1,62,1,62,1,62,1,62,1,63,1,63,1,63, + 1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65,1,66,1,66,1,67,1,67,1,67,1,67,1, + 67,1,68,1,68,1,68,1,69,1,69,1,69,1,70,1,70,1,70,1,71,1,71,1,72,1,72,1,72, + 1,73,1,73,1,74,1,74,1,74,1,75,1,75,1,76,1,76,1,77,1,77,1,78,1,78,1,79,1, + 79,1,80,1,80,1,80,5,80,890,8,80,10,80,12,80,893,9,80,1,80,1,80,4,80,897, + 8,80,11,80,12,80,898,3,80,901,8,80,1,81,1,81,1,81,1,81,1,81,1,82,1,82,1, + 82,1,82,1,82,1,83,1,83,5,83,915,8,83,10,83,12,83,918,9,83,1,83,1,83,3,83, + 922,8,83,1,83,4,83,925,8,83,11,83,12,83,926,3,83,929,8,83,1,84,1,84,4,84, + 933,8,84,11,84,12,84,934,1,84,1,84,1,85,1,85,1,86,1,86,1,86,1,86,1,87,1, + 87,1,87,1,87,1,88,1,88,1,88,1,88,1,89,1,89,1,89,1,89,1,89,1,90,1,90,1,90, + 1,90,1,91,1,91,1,91,1,91,1,92,1,92,1,92,1,92,1,93,1,93,1,93,1,93,1,94,1, + 94,1,94,1,94,1,95,1,95,1,95,1,95,1,95,1,95,1,95,1,95,1,95,1,96,1,96,1,96, + 1,96,1,97,1,97,1,97,1,97,1,98,1,98,1,98,1,98,1,99,1,99,1,99,1,99,1,100, + 1,100,1,100,1,100,1,101,1,101,1,101,1,101,1,101,1,102,1,102,1,102,1,102, + 1,103,1,103,1,103,1,103,1,104,1,104,1,104,1,104,3,104,1024,8,104,1,105, + 1,105,3,105,1028,8,105,1,105,5,105,1031,8,105,10,105,12,105,1034,9,105, + 1,105,1,105,3,105,1038,8,105,1,105,4,105,1041,8,105,11,105,12,105,1042, + 3,105,1045,8,105,1,106,1,106,4,106,1049,8,106,11,106,12,106,1050,1,107, + 1,107,1,107,1,107,1,108,1,108,1,108,1,108,1,109,1,109,1,109,1,109,1,110, + 1,110,1,110,1,110,1,110,1,111,1,111,1,111,1,111,1,112,1,112,1,112,1,112, + 1,113,1,113,1,113,1,113,1,114,1,114,1,114,1,115,1,115,1,115,1,115,1,116, + 1,116,1,116,1,116,1,117,1,117,1,117,1,117,1,118,1,118,1,118,1,118,1,119, + 1,119,1,119,1,119,1,119,1,120,1,120,1,120,1,120,1,120,1,121,1,121,1,121, + 1,121,1,121,1,122,1,122,1,122,1,122,1,122,1,122,1,122,1,123,1,123,1,124, + 4,124,1126,8,124,11,124,12,124,1127,1,124,1,124,3,124,1132,8,124,1,124, + 4,124,1135,8,124,11,124,12,124,1136,1,125,1,125,1,125,1,125,1,126,1,126, + 1,126,1,126,1,127,1,127,1,127,1,127,1,128,1,128,1,128,1,128,1,129,1,129, + 1,129,1,129,1,129,1,129,1,130,1,130,1,130,1,130,1,131,1,131,1,131,1,131, + 1,132,1,132,1,132,1,132,1,133,1,133,1,133,1,133,1,134,1,134,1,134,1,134, + 1,135,1,135,1,135,1,135,1,136,1,136,1,136,1,136,1,137,1,137,1,137,1,137, + 1,138,1,138,1,138,1,138,1,139,1,139,1,139,1,139,1,139,1,140,1,140,1,140, + 1,140,1,141,1,141,1,141,1,141,1,142,1,142,1,142,1,142,1,143,1,143,1,143, + 1,143,1,143,1,144,1,144,1,144,1,144,1,145,1,145,1,145,1,145,1,146,1,146, + 1,146,1,146,1,147,1,147,1,147,1,147,1,148,1,148,1,148,1,148,1,149,1,149, + 1,149,1,149,1,149,1,149,1,150,1,150,1,150,1,150,1,151,1,151,1,151,1,151, + 1,152,1,152,1,152,1,152,1,153,1,153,1,153,1,153,1,154,1,154,1,154,1,154, + 1,155,1,155,1,155,1,155,1,156,1,156,1,156,1,156,1,156,1,157,1,157,1,157, + 1,157,1,158,1,158,1,158,1,158,1,159,1,159,1,159,1,159,1,160,1,160,1,160, + 1,160,1,161,1,161,1,161,1,161,1,162,1,162,1,162,1,162,1,163,1,163,1,163, + 1,163,1,163,1,164,1,164,1,164,1,164,1,164,1,165,1,165,1,165,1,165,1,166, + 1,166,1,166,1,166,1,167,1,167,1,167,1,167,1,168,1,168,1,168,1,168,1,168, + 1,169,1,169,1,169,1,169,1,169,1,169,1,169,1,169,1,169,1,169,1,170,1,170, + 1,170,1,170,1,171,1,171,1,171,1,171,1,172,1,172,1,172,1,172,1,173,1,173, + 1,173,1,173,1,173,1,174,1,174,1,175,1,175,1,175,1,175,1,175,4,175,1359, + 8,175,11,175,12,175,1360,1,176,1,176,1,176,1,176,1,177,1,177,1,177,1,177, + 1,178,1,178,1,178,1,178,1,179,1,179,1,179,1,179,1,179,1,180,1,180,1,180, + 1,180,1,180,1,180,1,181,1,181,1,181,1,181,1,181,1,181,1,182,1,182,1,182, + 1,182,1,183,1,183,1,183,1,183,1,184,1,184,1,184,1,184,1,185,1,185,1,185, + 1,185,1,185,1,185,1,186,1,186,1,186,1,186,1,186,1,186,1,187,1,187,1,187, + 1,187,1,188,1,188,1,188,1,188,1,189,1,189,1,189,1,189,1,190,1,190,1,190, + 1,190,1,190,1,190,1,191,1,191,1,191,1,191,1,191,1,191,1,192,1,192,1,192, + 1,192,1,192,1,192,1,193,1,193,1,193,1,193,1,193,2,604,705,0,194,16,1,18, + 2,20,3,22,4,24,5,26,6,28,7,30,8,32,9,34,10,36,11,38,12,40,13,42,14,44,15, + 46,16,48,17,50,18,52,19,54,20,56,21,58,22,60,23,62,24,64,0,66,25,68,0,70, + 0,72,26,74,27,76,28,78,29,80,0,82,0,84,0,86,0,88,0,90,0,92,0,94,0,96,0, + 98,0,100,30,102,31,104,32,106,33,108,34,110,35,112,36,114,37,116,38,118, + 39,120,40,122,41,124,42,126,43,128,44,130,45,132,46,134,47,136,48,138,49, + 140,50,142,51,144,52,146,53,148,54,150,55,152,56,154,57,156,58,158,59,160, + 60,162,61,164,62,166,63,168,64,170,65,172,66,174,67,176,68,178,69,180,70, + 182,71,184,0,186,72,188,73,190,74,192,75,194,0,196,0,198,0,200,0,202,0, + 204,0,206,76,208,0,210,0,212,77,214,78,216,79,218,0,220,0,222,0,224,0,226, + 0,228,80,230,81,232,82,234,83,236,0,238,0,240,0,242,0,244,84,246,0,248, + 85,250,86,252,87,254,0,256,0,258,88,260,89,262,0,264,90,266,0,268,91,270, + 92,272,93,274,0,276,0,278,0,280,0,282,0,284,0,286,0,288,94,290,95,292,96, + 294,0,296,0,298,0,300,0,302,0,304,0,306,0,308,97,310,98,312,99,314,0,316, + 0,318,0,320,0,322,100,324,101,326,102,328,0,330,0,332,0,334,0,336,103,338, + 104,340,105,342,0,344,106,346,107,348,108,350,109,352,0,354,110,356,111, + 358,112,360,113,362,0,364,114,366,115,368,116,370,117,372,118,374,0,376, + 0,378,0,380,119,382,120,384,121,386,0,388,0,390,122,392,123,394,124,396, + 0,398,0,400,0,402,0,16,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,35,2,0,68, + 68,100,100,2,0,73,73,105,105,2,0,83,83,115,115,2,0,69,69,101,101,2,0,67, + 67,99,99,2,0,84,84,116,116,2,0,82,82,114,114,2,0,79,79,111,111,2,0,80,80, + 112,112,2,0,78,78,110,110,2,0,72,72,104,104,2,0,86,86,118,118,2,0,65,65, + 97,97,2,0,76,76,108,108,2,0,88,88,120,120,2,0,70,70,102,102,2,0,77,77,109, + 109,2,0,71,71,103,103,2,0,75,75,107,107,2,0,85,85,117,117,2,0,87,87,119, + 119,6,0,9,10,13,13,32,32,47,47,91,91,93,93,2,0,10,10,13,13,3,0,9,10,13, + 13,32,32,11,0,9,10,13,13,32,32,34,34,44,44,47,47,58,58,61,61,91,91,93,93, + 124,124,2,0,42,42,47,47,1,0,48,57,2,0,65,90,97,122,8,0,34,34,78,78,82,82, + 84,84,92,92,110,110,114,114,116,116,4,0,10,10,13,13,34,34,92,92,2,0,43, + 43,45,45,1,0,96,96,2,0,66,66,98,98,2,0,89,89,121,121,11,0,9,10,13,13,32, + 32,34,35,44,44,47,47,58,58,60,60,62,63,92,92,124,124,1476,0,16,1,0,0,0, + 0,18,1,0,0,0,0,20,1,0,0,0,0,22,1,0,0,0,0,24,1,0,0,0,0,26,1,0,0,0,0,28,1, + 0,0,0,0,30,1,0,0,0,0,32,1,0,0,0,0,34,1,0,0,0,0,36,1,0,0,0,0,38,1,0,0,0, + 0,40,1,0,0,0,0,42,1,0,0,0,0,44,1,0,0,0,0,46,1,0,0,0,0,48,1,0,0,0,0,50,1, + 0,0,0,0,52,1,0,0,0,0,54,1,0,0,0,0,56,1,0,0,0,0,58,1,0,0,0,0,60,1,0,0,0, + 0,62,1,0,0,0,0,66,1,0,0,0,1,68,1,0,0,0,1,70,1,0,0,0,1,72,1,0,0,0,1,74,1, + 0,0,0,1,76,1,0,0,0,2,78,1,0,0,0,2,100,1,0,0,0,2,102,1,0,0,0,2,104,1,0,0, + 0,2,106,1,0,0,0,2,108,1,0,0,0,2,110,1,0,0,0,2,112,1,0,0,0,2,114,1,0,0,0, + 2,116,1,0,0,0,2,118,1,0,0,0,2,120,1,0,0,0,2,122,1,0,0,0,2,124,1,0,0,0,2, + 126,1,0,0,0,2,128,1,0,0,0,2,130,1,0,0,0,2,132,1,0,0,0,2,134,1,0,0,0,2,136, + 1,0,0,0,2,138,1,0,0,0,2,140,1,0,0,0,2,142,1,0,0,0,2,144,1,0,0,0,2,146,1, + 0,0,0,2,148,1,0,0,0,2,150,1,0,0,0,2,152,1,0,0,0,2,154,1,0,0,0,2,156,1,0, + 0,0,2,158,1,0,0,0,2,160,1,0,0,0,2,162,1,0,0,0,2,164,1,0,0,0,2,166,1,0,0, + 0,2,168,1,0,0,0,2,170,1,0,0,0,2,172,1,0,0,0,2,174,1,0,0,0,2,176,1,0,0,0, + 2,178,1,0,0,0,2,180,1,0,0,0,2,182,1,0,0,0,2,186,1,0,0,0,2,188,1,0,0,0,2, + 190,1,0,0,0,2,192,1,0,0,0,3,194,1,0,0,0,3,196,1,0,0,0,3,198,1,0,0,0,3,200, + 1,0,0,0,3,202,1,0,0,0,3,204,1,0,0,0,3,206,1,0,0,0,3,208,1,0,0,0,3,210,1, + 0,0,0,3,212,1,0,0,0,3,214,1,0,0,0,3,216,1,0,0,0,4,218,1,0,0,0,4,220,1,0, + 0,0,4,222,1,0,0,0,4,228,1,0,0,0,4,230,1,0,0,0,4,232,1,0,0,0,4,234,1,0,0, + 0,5,236,1,0,0,0,5,238,1,0,0,0,5,240,1,0,0,0,5,242,1,0,0,0,5,244,1,0,0,0, + 5,246,1,0,0,0,5,248,1,0,0,0,5,250,1,0,0,0,5,252,1,0,0,0,6,254,1,0,0,0,6, + 256,1,0,0,0,6,258,1,0,0,0,6,260,1,0,0,0,6,264,1,0,0,0,6,266,1,0,0,0,6,268, + 1,0,0,0,6,270,1,0,0,0,6,272,1,0,0,0,7,274,1,0,0,0,7,276,1,0,0,0,7,278,1, + 0,0,0,7,280,1,0,0,0,7,282,1,0,0,0,7,284,1,0,0,0,7,286,1,0,0,0,7,288,1,0, + 0,0,7,290,1,0,0,0,7,292,1,0,0,0,8,294,1,0,0,0,8,296,1,0,0,0,8,298,1,0,0, + 0,8,300,1,0,0,0,8,302,1,0,0,0,8,304,1,0,0,0,8,306,1,0,0,0,8,308,1,0,0,0, + 8,310,1,0,0,0,8,312,1,0,0,0,9,314,1,0,0,0,9,316,1,0,0,0,9,318,1,0,0,0,9, + 320,1,0,0,0,9,322,1,0,0,0,9,324,1,0,0,0,9,326,1,0,0,0,10,328,1,0,0,0,10, + 330,1,0,0,0,10,332,1,0,0,0,10,334,1,0,0,0,10,336,1,0,0,0,10,338,1,0,0,0, + 10,340,1,0,0,0,11,342,1,0,0,0,11,344,1,0,0,0,11,346,1,0,0,0,11,348,1,0, + 0,0,11,350,1,0,0,0,12,352,1,0,0,0,12,354,1,0,0,0,12,356,1,0,0,0,12,358, + 1,0,0,0,12,360,1,0,0,0,13,362,1,0,0,0,13,364,1,0,0,0,13,366,1,0,0,0,13, + 368,1,0,0,0,13,370,1,0,0,0,13,372,1,0,0,0,14,374,1,0,0,0,14,376,1,0,0,0, + 14,378,1,0,0,0,14,380,1,0,0,0,14,382,1,0,0,0,14,384,1,0,0,0,15,386,1,0, + 0,0,15,388,1,0,0,0,15,390,1,0,0,0,15,392,1,0,0,0,15,394,1,0,0,0,15,396, + 1,0,0,0,15,398,1,0,0,0,15,400,1,0,0,0,15,402,1,0,0,0,16,404,1,0,0,0,18, + 414,1,0,0,0,20,421,1,0,0,0,22,430,1,0,0,0,24,437,1,0,0,0,26,447,1,0,0,0, + 28,454,1,0,0,0,30,461,1,0,0,0,32,475,1,0,0,0,34,482,1,0,0,0,36,490,1,0, + 0,0,38,499,1,0,0,0,40,506,1,0,0,0,42,516,1,0,0,0,44,528,1,0,0,0,46,537, + 1,0,0,0,48,543,1,0,0,0,50,550,1,0,0,0,52,557,1,0,0,0,54,565,1,0,0,0,56, + 574,1,0,0,0,58,580,1,0,0,0,60,597,1,0,0,0,62,613,1,0,0,0,64,622,1,0,0,0, + 66,625,1,0,0,0,68,629,1,0,0,0,70,634,1,0,0,0,72,639,1,0,0,0,74,643,1,0, + 0,0,76,647,1,0,0,0,78,651,1,0,0,0,80,655,1,0,0,0,82,657,1,0,0,0,84,659, + 1,0,0,0,86,662,1,0,0,0,88,664,1,0,0,0,90,673,1,0,0,0,92,675,1,0,0,0,94, + 680,1,0,0,0,96,682,1,0,0,0,98,687,1,0,0,0,100,718,1,0,0,0,102,721,1,0,0, + 0,104,767,1,0,0,0,106,769,1,0,0,0,108,772,1,0,0,0,110,776,1,0,0,0,112,780, + 1,0,0,0,114,782,1,0,0,0,116,785,1,0,0,0,118,787,1,0,0,0,120,792,1,0,0,0, + 122,794,1,0,0,0,124,800,1,0,0,0,126,806,1,0,0,0,128,811,1,0,0,0,130,813, + 1,0,0,0,132,816,1,0,0,0,134,819,1,0,0,0,136,824,1,0,0,0,138,828,1,0,0,0, + 140,833,1,0,0,0,142,839,1,0,0,0,144,842,1,0,0,0,146,844,1,0,0,0,148,850, + 1,0,0,0,150,852,1,0,0,0,152,857,1,0,0,0,154,860,1,0,0,0,156,863,1,0,0,0, + 158,866,1,0,0,0,160,868,1,0,0,0,162,871,1,0,0,0,164,873,1,0,0,0,166,876, + 1,0,0,0,168,878,1,0,0,0,170,880,1,0,0,0,172,882,1,0,0,0,174,884,1,0,0,0, + 176,900,1,0,0,0,178,902,1,0,0,0,180,907,1,0,0,0,182,928,1,0,0,0,184,930, + 1,0,0,0,186,938,1,0,0,0,188,940,1,0,0,0,190,944,1,0,0,0,192,948,1,0,0,0, + 194,952,1,0,0,0,196,957,1,0,0,0,198,961,1,0,0,0,200,965,1,0,0,0,202,969, + 1,0,0,0,204,973,1,0,0,0,206,977,1,0,0,0,208,986,1,0,0,0,210,990,1,0,0,0, + 212,994,1,0,0,0,214,998,1,0,0,0,216,1002,1,0,0,0,218,1006,1,0,0,0,220,1011, + 1,0,0,0,222,1015,1,0,0,0,224,1023,1,0,0,0,226,1044,1,0,0,0,228,1048,1,0, + 0,0,230,1052,1,0,0,0,232,1056,1,0,0,0,234,1060,1,0,0,0,236,1064,1,0,0,0, + 238,1069,1,0,0,0,240,1073,1,0,0,0,242,1077,1,0,0,0,244,1081,1,0,0,0,246, + 1084,1,0,0,0,248,1088,1,0,0,0,250,1092,1,0,0,0,252,1096,1,0,0,0,254,1100, + 1,0,0,0,256,1105,1,0,0,0,258,1110,1,0,0,0,260,1115,1,0,0,0,262,1122,1,0, + 0,0,264,1131,1,0,0,0,266,1138,1,0,0,0,268,1142,1,0,0,0,270,1146,1,0,0,0, + 272,1150,1,0,0,0,274,1154,1,0,0,0,276,1160,1,0,0,0,278,1164,1,0,0,0,280, + 1168,1,0,0,0,282,1172,1,0,0,0,284,1176,1,0,0,0,286,1180,1,0,0,0,288,1184, + 1,0,0,0,290,1188,1,0,0,0,292,1192,1,0,0,0,294,1196,1,0,0,0,296,1201,1,0, + 0,0,298,1205,1,0,0,0,300,1209,1,0,0,0,302,1213,1,0,0,0,304,1218,1,0,0,0, + 306,1222,1,0,0,0,308,1226,1,0,0,0,310,1230,1,0,0,0,312,1234,1,0,0,0,314, + 1238,1,0,0,0,316,1244,1,0,0,0,318,1248,1,0,0,0,320,1252,1,0,0,0,322,1256, + 1,0,0,0,324,1260,1,0,0,0,326,1264,1,0,0,0,328,1268,1,0,0,0,330,1273,1,0, + 0,0,332,1277,1,0,0,0,334,1281,1,0,0,0,336,1285,1,0,0,0,338,1289,1,0,0,0, + 340,1293,1,0,0,0,342,1297,1,0,0,0,344,1302,1,0,0,0,346,1307,1,0,0,0,348, + 1311,1,0,0,0,350,1315,1,0,0,0,352,1319,1,0,0,0,354,1324,1,0,0,0,356,1334, + 1,0,0,0,358,1338,1,0,0,0,360,1342,1,0,0,0,362,1346,1,0,0,0,364,1351,1,0, + 0,0,366,1358,1,0,0,0,368,1362,1,0,0,0,370,1366,1,0,0,0,372,1370,1,0,0,0, + 374,1374,1,0,0,0,376,1379,1,0,0,0,378,1385,1,0,0,0,380,1391,1,0,0,0,382, + 1395,1,0,0,0,384,1399,1,0,0,0,386,1403,1,0,0,0,388,1409,1,0,0,0,390,1415, + 1,0,0,0,392,1419,1,0,0,0,394,1423,1,0,0,0,396,1427,1,0,0,0,398,1433,1,0, + 0,0,400,1439,1,0,0,0,402,1445,1,0,0,0,404,405,7,0,0,0,405,406,7,1,0,0,406, + 407,7,2,0,0,407,408,7,2,0,0,408,409,7,3,0,0,409,410,7,4,0,0,410,411,7,5, + 0,0,411,412,1,0,0,0,412,413,6,0,0,0,413,17,1,0,0,0,414,415,7,0,0,0,415, + 416,7,6,0,0,416,417,7,7,0,0,417,418,7,8,0,0,418,419,1,0,0,0,419,420,6,1, + 1,0,420,19,1,0,0,0,421,422,7,3,0,0,422,423,7,9,0,0,423,424,7,6,0,0,424, + 425,7,1,0,0,425,426,7,4,0,0,426,427,7,10,0,0,427,428,1,0,0,0,428,429,6, + 2,2,0,429,21,1,0,0,0,430,431,7,3,0,0,431,432,7,11,0,0,432,433,7,12,0,0, + 433,434,7,13,0,0,434,435,1,0,0,0,435,436,6,3,0,0,436,23,1,0,0,0,437,438, + 7,3,0,0,438,439,7,14,0,0,439,440,7,8,0,0,440,441,7,13,0,0,441,442,7,12, + 0,0,442,443,7,1,0,0,443,444,7,9,0,0,444,445,1,0,0,0,445,446,6,4,3,0,446, + 25,1,0,0,0,447,448,7,15,0,0,448,449,7,6,0,0,449,450,7,7,0,0,450,451,7,16, + 0,0,451,452,1,0,0,0,452,453,6,5,4,0,453,27,1,0,0,0,454,455,7,17,0,0,455, + 456,7,6,0,0,456,457,7,7,0,0,457,458,7,18,0,0,458,459,1,0,0,0,459,460,6, + 6,0,0,460,29,1,0,0,0,461,462,7,1,0,0,462,463,7,9,0,0,463,464,7,13,0,0,464, + 465,7,1,0,0,465,466,7,9,0,0,466,467,7,3,0,0,467,468,7,2,0,0,468,469,7,5, + 0,0,469,470,7,12,0,0,470,471,7,5,0,0,471,472,7,2,0,0,472,473,1,0,0,0,473, + 474,6,7,0,0,474,31,1,0,0,0,475,476,7,18,0,0,476,477,7,3,0,0,477,478,7,3, + 0,0,478,479,7,8,0,0,479,480,1,0,0,0,480,481,6,8,1,0,481,33,1,0,0,0,482, + 483,7,13,0,0,483,484,7,1,0,0,484,485,7,16,0,0,485,486,7,1,0,0,486,487,7, + 5,0,0,487,488,1,0,0,0,488,489,6,9,0,0,489,35,1,0,0,0,490,491,7,13,0,0,491, + 492,7,7,0,0,492,493,7,7,0,0,493,494,7,18,0,0,494,495,7,19,0,0,495,496,7, + 8,0,0,496,497,1,0,0,0,497,498,6,10,5,0,498,37,1,0,0,0,499,500,7,16,0,0, + 500,501,7,3,0,0,501,502,7,5,0,0,502,503,7,12,0,0,503,504,1,0,0,0,504,505, + 6,11,6,0,505,39,1,0,0,0,506,507,7,16,0,0,507,508,7,3,0,0,508,509,7,5,0, + 0,509,510,7,6,0,0,510,511,7,1,0,0,511,512,7,4,0,0,512,513,7,2,0,0,513,514, + 1,0,0,0,514,515,6,12,7,0,515,41,1,0,0,0,516,517,7,16,0,0,517,518,7,11,0, + 0,518,519,5,95,0,0,519,520,7,3,0,0,520,521,7,14,0,0,521,522,7,8,0,0,522, + 523,7,12,0,0,523,524,7,9,0,0,524,525,7,0,0,0,525,526,1,0,0,0,526,527,6, + 13,8,0,527,43,1,0,0,0,528,529,7,6,0,0,529,530,7,3,0,0,530,531,7,9,0,0,531, + 532,7,12,0,0,532,533,7,16,0,0,533,534,7,3,0,0,534,535,1,0,0,0,535,536,6, + 14,9,0,536,45,1,0,0,0,537,538,7,6,0,0,538,539,7,7,0,0,539,540,7,20,0,0, + 540,541,1,0,0,0,541,542,6,15,0,0,542,47,1,0,0,0,543,544,7,2,0,0,544,545, + 7,10,0,0,545,546,7,7,0,0,546,547,7,20,0,0,547,548,1,0,0,0,548,549,6,16, + 10,0,549,49,1,0,0,0,550,551,7,2,0,0,551,552,7,7,0,0,552,553,7,6,0,0,553, + 554,7,5,0,0,554,555,1,0,0,0,555,556,6,17,0,0,556,51,1,0,0,0,557,558,7,2, + 0,0,558,559,7,5,0,0,559,560,7,12,0,0,560,561,7,5,0,0,561,562,7,2,0,0,562, + 563,1,0,0,0,563,564,6,18,0,0,564,53,1,0,0,0,565,566,7,20,0,0,566,567,7, + 10,0,0,567,568,7,3,0,0,568,569,7,6,0,0,569,570,7,3,0,0,570,571,1,0,0,0, + 571,572,6,19,0,0,572,55,1,0,0,0,573,575,8,21,0,0,574,573,1,0,0,0,575,576, + 1,0,0,0,576,574,1,0,0,0,576,577,1,0,0,0,577,578,1,0,0,0,578,579,6,20,0, + 0,579,57,1,0,0,0,580,581,5,47,0,0,581,582,5,47,0,0,582,586,1,0,0,0,583, + 585,8,22,0,0,584,583,1,0,0,0,585,588,1,0,0,0,586,584,1,0,0,0,586,587,1, + 0,0,0,587,590,1,0,0,0,588,586,1,0,0,0,589,591,5,13,0,0,590,589,1,0,0,0, + 590,591,1,0,0,0,591,593,1,0,0,0,592,594,5,10,0,0,593,592,1,0,0,0,593,594, + 1,0,0,0,594,595,1,0,0,0,595,596,6,21,11,0,596,59,1,0,0,0,597,598,5,47,0, + 0,598,599,5,42,0,0,599,604,1,0,0,0,600,603,3,60,22,0,601,603,9,0,0,0,602, + 600,1,0,0,0,602,601,1,0,0,0,603,606,1,0,0,0,604,605,1,0,0,0,604,602,1,0, + 0,0,605,607,1,0,0,0,606,604,1,0,0,0,607,608,5,42,0,0,608,609,5,47,0,0,609, + 610,1,0,0,0,610,611,6,22,11,0,611,61,1,0,0,0,612,614,7,23,0,0,613,612,1, + 0,0,0,614,615,1,0,0,0,615,613,1,0,0,0,615,616,1,0,0,0,616,617,1,0,0,0,617, + 618,6,23,11,0,618,63,1,0,0,0,619,623,8,24,0,0,620,621,5,47,0,0,621,623, + 8,25,0,0,622,619,1,0,0,0,622,620,1,0,0,0,623,65,1,0,0,0,624,626,3,64,24, + 0,625,624,1,0,0,0,626,627,1,0,0,0,627,625,1,0,0,0,627,628,1,0,0,0,628,67, + 1,0,0,0,629,630,3,178,81,0,630,631,1,0,0,0,631,632,6,26,12,0,632,633,6, + 26,13,0,633,69,1,0,0,0,634,635,3,78,31,0,635,636,1,0,0,0,636,637,6,27,14, + 0,637,638,6,27,15,0,638,71,1,0,0,0,639,640,3,62,23,0,640,641,1,0,0,0,641, + 642,6,28,11,0,642,73,1,0,0,0,643,644,3,58,21,0,644,645,1,0,0,0,645,646, + 6,29,11,0,646,75,1,0,0,0,647,648,3,60,22,0,648,649,1,0,0,0,649,650,6,30, + 11,0,650,77,1,0,0,0,651,652,5,124,0,0,652,653,1,0,0,0,653,654,6,31,15,0, + 654,79,1,0,0,0,655,656,7,26,0,0,656,81,1,0,0,0,657,658,7,27,0,0,658,83, + 1,0,0,0,659,660,5,92,0,0,660,661,7,28,0,0,661,85,1,0,0,0,662,663,8,29,0, + 0,663,87,1,0,0,0,664,666,7,3,0,0,665,667,7,30,0,0,666,665,1,0,0,0,666,667, + 1,0,0,0,667,669,1,0,0,0,668,670,3,80,32,0,669,668,1,0,0,0,670,671,1,0,0, + 0,671,669,1,0,0,0,671,672,1,0,0,0,672,89,1,0,0,0,673,674,5,64,0,0,674,91, + 1,0,0,0,675,676,5,96,0,0,676,93,1,0,0,0,677,681,8,31,0,0,678,679,5,96,0, + 0,679,681,5,96,0,0,680,677,1,0,0,0,680,678,1,0,0,0,681,95,1,0,0,0,682,683, + 5,95,0,0,683,97,1,0,0,0,684,688,3,82,33,0,685,688,3,80,32,0,686,688,3,96, + 40,0,687,684,1,0,0,0,687,685,1,0,0,0,687,686,1,0,0,0,688,99,1,0,0,0,689, + 694,5,34,0,0,690,693,3,84,34,0,691,693,3,86,35,0,692,690,1,0,0,0,692,691, + 1,0,0,0,693,696,1,0,0,0,694,692,1,0,0,0,694,695,1,0,0,0,695,697,1,0,0,0, + 696,694,1,0,0,0,697,719,5,34,0,0,698,699,5,34,0,0,699,700,5,34,0,0,700, + 701,5,34,0,0,701,705,1,0,0,0,702,704,8,22,0,0,703,702,1,0,0,0,704,707,1, + 0,0,0,705,706,1,0,0,0,705,703,1,0,0,0,706,708,1,0,0,0,707,705,1,0,0,0,708, + 709,5,34,0,0,709,710,5,34,0,0,710,711,5,34,0,0,711,713,1,0,0,0,712,714, + 5,34,0,0,713,712,1,0,0,0,713,714,1,0,0,0,714,716,1,0,0,0,715,717,5,34,0, + 0,716,715,1,0,0,0,716,717,1,0,0,0,717,719,1,0,0,0,718,689,1,0,0,0,718,698, + 1,0,0,0,719,101,1,0,0,0,720,722,3,80,32,0,721,720,1,0,0,0,722,723,1,0,0, + 0,723,721,1,0,0,0,723,724,1,0,0,0,724,103,1,0,0,0,725,727,3,80,32,0,726, + 725,1,0,0,0,727,728,1,0,0,0,728,726,1,0,0,0,728,729,1,0,0,0,729,730,1,0, + 0,0,730,734,3,120,52,0,731,733,3,80,32,0,732,731,1,0,0,0,733,736,1,0,0, + 0,734,732,1,0,0,0,734,735,1,0,0,0,735,768,1,0,0,0,736,734,1,0,0,0,737,739, + 3,120,52,0,738,740,3,80,32,0,739,738,1,0,0,0,740,741,1,0,0,0,741,739,1, + 0,0,0,741,742,1,0,0,0,742,768,1,0,0,0,743,745,3,80,32,0,744,743,1,0,0,0, + 745,746,1,0,0,0,746,744,1,0,0,0,746,747,1,0,0,0,747,755,1,0,0,0,748,752, + 3,120,52,0,749,751,3,80,32,0,750,749,1,0,0,0,751,754,1,0,0,0,752,750,1, + 0,0,0,752,753,1,0,0,0,753,756,1,0,0,0,754,752,1,0,0,0,755,748,1,0,0,0,755, + 756,1,0,0,0,756,757,1,0,0,0,757,758,3,88,36,0,758,768,1,0,0,0,759,761,3, + 120,52,0,760,762,3,80,32,0,761,760,1,0,0,0,762,763,1,0,0,0,763,761,1,0, + 0,0,763,764,1,0,0,0,764,765,1,0,0,0,765,766,3,88,36,0,766,768,1,0,0,0,767, + 726,1,0,0,0,767,737,1,0,0,0,767,744,1,0,0,0,767,759,1,0,0,0,768,105,1,0, + 0,0,769,770,7,32,0,0,770,771,7,33,0,0,771,107,1,0,0,0,772,773,7,12,0,0, + 773,774,7,9,0,0,774,775,7,0,0,0,775,109,1,0,0,0,776,777,7,12,0,0,777,778, + 7,2,0,0,778,779,7,4,0,0,779,111,1,0,0,0,780,781,5,61,0,0,781,113,1,0,0, + 0,782,783,5,58,0,0,783,784,5,58,0,0,784,115,1,0,0,0,785,786,5,44,0,0,786, + 117,1,0,0,0,787,788,7,0,0,0,788,789,7,3,0,0,789,790,7,2,0,0,790,791,7,4, + 0,0,791,119,1,0,0,0,792,793,5,46,0,0,793,121,1,0,0,0,794,795,7,15,0,0,795, + 796,7,12,0,0,796,797,7,13,0,0,797,798,7,2,0,0,798,799,7,3,0,0,799,123,1, + 0,0,0,800,801,7,15,0,0,801,802,7,1,0,0,802,803,7,6,0,0,803,804,7,2,0,0, + 804,805,7,5,0,0,805,125,1,0,0,0,806,807,7,13,0,0,807,808,7,12,0,0,808,809, + 7,2,0,0,809,810,7,5,0,0,810,127,1,0,0,0,811,812,5,40,0,0,812,129,1,0,0, + 0,813,814,7,1,0,0,814,815,7,9,0,0,815,131,1,0,0,0,816,817,7,1,0,0,817,818, + 7,2,0,0,818,133,1,0,0,0,819,820,7,13,0,0,820,821,7,1,0,0,821,822,7,18,0, + 0,822,823,7,3,0,0,823,135,1,0,0,0,824,825,7,9,0,0,825,826,7,7,0,0,826,827, + 7,5,0,0,827,137,1,0,0,0,828,829,7,9,0,0,829,830,7,19,0,0,830,831,7,13,0, + 0,831,832,7,13,0,0,832,139,1,0,0,0,833,834,7,9,0,0,834,835,7,19,0,0,835, + 836,7,13,0,0,836,837,7,13,0,0,837,838,7,2,0,0,838,141,1,0,0,0,839,840,7, + 7,0,0,840,841,7,6,0,0,841,143,1,0,0,0,842,843,5,63,0,0,843,145,1,0,0,0, + 844,845,7,6,0,0,845,846,7,13,0,0,846,847,7,1,0,0,847,848,7,18,0,0,848,849, + 7,3,0,0,849,147,1,0,0,0,850,851,5,41,0,0,851,149,1,0,0,0,852,853,7,5,0, + 0,853,854,7,6,0,0,854,855,7,19,0,0,855,856,7,3,0,0,856,151,1,0,0,0,857, + 858,5,61,0,0,858,859,5,61,0,0,859,153,1,0,0,0,860,861,5,61,0,0,861,862, + 5,126,0,0,862,155,1,0,0,0,863,864,5,33,0,0,864,865,5,61,0,0,865,157,1,0, + 0,0,866,867,5,60,0,0,867,159,1,0,0,0,868,869,5,60,0,0,869,870,5,61,0,0, + 870,161,1,0,0,0,871,872,5,62,0,0,872,163,1,0,0,0,873,874,5,62,0,0,874,875, + 5,61,0,0,875,165,1,0,0,0,876,877,5,43,0,0,877,167,1,0,0,0,878,879,5,45, + 0,0,879,169,1,0,0,0,880,881,5,42,0,0,881,171,1,0,0,0,882,883,5,47,0,0,883, + 173,1,0,0,0,884,885,5,37,0,0,885,175,1,0,0,0,886,887,3,144,64,0,887,891, + 3,82,33,0,888,890,3,98,41,0,889,888,1,0,0,0,890,893,1,0,0,0,891,889,1,0, + 0,0,891,892,1,0,0,0,892,901,1,0,0,0,893,891,1,0,0,0,894,896,3,144,64,0, + 895,897,3,80,32,0,896,895,1,0,0,0,897,898,1,0,0,0,898,896,1,0,0,0,898,899, + 1,0,0,0,899,901,1,0,0,0,900,886,1,0,0,0,900,894,1,0,0,0,901,177,1,0,0,0, + 902,903,5,91,0,0,903,904,1,0,0,0,904,905,6,81,0,0,905,906,6,81,0,0,906, + 179,1,0,0,0,907,908,5,93,0,0,908,909,1,0,0,0,909,910,6,82,15,0,910,911, + 6,82,15,0,911,181,1,0,0,0,912,916,3,82,33,0,913,915,3,98,41,0,914,913,1, + 0,0,0,915,918,1,0,0,0,916,914,1,0,0,0,916,917,1,0,0,0,917,929,1,0,0,0,918, + 916,1,0,0,0,919,922,3,96,40,0,920,922,3,90,37,0,921,919,1,0,0,0,921,920, + 1,0,0,0,922,924,1,0,0,0,923,925,3,98,41,0,924,923,1,0,0,0,925,926,1,0,0, + 0,926,924,1,0,0,0,926,927,1,0,0,0,927,929,1,0,0,0,928,912,1,0,0,0,928,921, + 1,0,0,0,929,183,1,0,0,0,930,932,3,92,38,0,931,933,3,94,39,0,932,931,1,0, + 0,0,933,934,1,0,0,0,934,932,1,0,0,0,934,935,1,0,0,0,935,936,1,0,0,0,936, + 937,3,92,38,0,937,185,1,0,0,0,938,939,3,184,84,0,939,187,1,0,0,0,940,941, + 3,58,21,0,941,942,1,0,0,0,942,943,6,86,11,0,943,189,1,0,0,0,944,945,3,60, + 22,0,945,946,1,0,0,0,946,947,6,87,11,0,947,191,1,0,0,0,948,949,3,62,23, + 0,949,950,1,0,0,0,950,951,6,88,11,0,951,193,1,0,0,0,952,953,3,78,31,0,953, + 954,1,0,0,0,954,955,6,89,14,0,955,956,6,89,15,0,956,195,1,0,0,0,957,958, + 3,178,81,0,958,959,1,0,0,0,959,960,6,90,12,0,960,197,1,0,0,0,961,962,3, + 180,82,0,962,963,1,0,0,0,963,964,6,91,16,0,964,199,1,0,0,0,965,966,3,364, + 174,0,966,967,1,0,0,0,967,968,6,92,17,0,968,201,1,0,0,0,969,970,3,116,50, + 0,970,971,1,0,0,0,971,972,6,93,18,0,972,203,1,0,0,0,973,974,3,112,48,0, + 974,975,1,0,0,0,975,976,6,94,19,0,976,205,1,0,0,0,977,978,7,16,0,0,978, + 979,7,3,0,0,979,980,7,5,0,0,980,981,7,12,0,0,981,982,7,0,0,0,982,983,7, + 12,0,0,983,984,7,5,0,0,984,985,7,12,0,0,985,207,1,0,0,0,986,987,3,66,25, + 0,987,988,1,0,0,0,988,989,6,96,20,0,989,209,1,0,0,0,990,991,3,100,42,0, + 991,992,1,0,0,0,992,993,6,97,21,0,993,211,1,0,0,0,994,995,3,58,21,0,995, + 996,1,0,0,0,996,997,6,98,11,0,997,213,1,0,0,0,998,999,3,60,22,0,999,1000, + 1,0,0,0,1000,1001,6,99,11,0,1001,215,1,0,0,0,1002,1003,3,62,23,0,1003,1004, + 1,0,0,0,1004,1005,6,100,11,0,1005,217,1,0,0,0,1006,1007,3,78,31,0,1007, + 1008,1,0,0,0,1008,1009,6,101,14,0,1009,1010,6,101,15,0,1010,219,1,0,0,0, + 1011,1012,3,120,52,0,1012,1013,1,0,0,0,1013,1014,6,102,22,0,1014,221,1, + 0,0,0,1015,1016,3,116,50,0,1016,1017,1,0,0,0,1017,1018,6,103,18,0,1018, + 223,1,0,0,0,1019,1024,3,82,33,0,1020,1024,3,80,32,0,1021,1024,3,96,40,0, + 1022,1024,3,170,77,0,1023,1019,1,0,0,0,1023,1020,1,0,0,0,1023,1021,1,0, + 0,0,1023,1022,1,0,0,0,1024,225,1,0,0,0,1025,1028,3,82,33,0,1026,1028,3, + 170,77,0,1027,1025,1,0,0,0,1027,1026,1,0,0,0,1028,1032,1,0,0,0,1029,1031, + 3,224,104,0,1030,1029,1,0,0,0,1031,1034,1,0,0,0,1032,1030,1,0,0,0,1032, + 1033,1,0,0,0,1033,1045,1,0,0,0,1034,1032,1,0,0,0,1035,1038,3,96,40,0,1036, + 1038,3,90,37,0,1037,1035,1,0,0,0,1037,1036,1,0,0,0,1038,1040,1,0,0,0,1039, + 1041,3,224,104,0,1040,1039,1,0,0,0,1041,1042,1,0,0,0,1042,1040,1,0,0,0, + 1042,1043,1,0,0,0,1043,1045,1,0,0,0,1044,1027,1,0,0,0,1044,1037,1,0,0,0, + 1045,227,1,0,0,0,1046,1049,3,226,105,0,1047,1049,3,184,84,0,1048,1046,1, + 0,0,0,1048,1047,1,0,0,0,1049,1050,1,0,0,0,1050,1048,1,0,0,0,1050,1051,1, + 0,0,0,1051,229,1,0,0,0,1052,1053,3,58,21,0,1053,1054,1,0,0,0,1054,1055, + 6,107,11,0,1055,231,1,0,0,0,1056,1057,3,60,22,0,1057,1058,1,0,0,0,1058, + 1059,6,108,11,0,1059,233,1,0,0,0,1060,1061,3,62,23,0,1061,1062,1,0,0,0, + 1062,1063,6,109,11,0,1063,235,1,0,0,0,1064,1065,3,78,31,0,1065,1066,1,0, + 0,0,1066,1067,6,110,14,0,1067,1068,6,110,15,0,1068,237,1,0,0,0,1069,1070, + 3,112,48,0,1070,1071,1,0,0,0,1071,1072,6,111,19,0,1072,239,1,0,0,0,1073, + 1074,3,116,50,0,1074,1075,1,0,0,0,1075,1076,6,112,18,0,1076,241,1,0,0,0, + 1077,1078,3,120,52,0,1078,1079,1,0,0,0,1079,1080,6,113,22,0,1080,243,1, + 0,0,0,1081,1082,7,12,0,0,1082,1083,7,2,0,0,1083,245,1,0,0,0,1084,1085,3, + 228,106,0,1085,1086,1,0,0,0,1086,1087,6,115,23,0,1087,247,1,0,0,0,1088, + 1089,3,58,21,0,1089,1090,1,0,0,0,1090,1091,6,116,11,0,1091,249,1,0,0,0, + 1092,1093,3,60,22,0,1093,1094,1,0,0,0,1094,1095,6,117,11,0,1095,251,1,0, + 0,0,1096,1097,3,62,23,0,1097,1098,1,0,0,0,1098,1099,6,118,11,0,1099,253, + 1,0,0,0,1100,1101,3,78,31,0,1101,1102,1,0,0,0,1102,1103,6,119,14,0,1103, + 1104,6,119,15,0,1104,255,1,0,0,0,1105,1106,3,178,81,0,1106,1107,1,0,0,0, + 1107,1108,6,120,12,0,1108,1109,6,120,24,0,1109,257,1,0,0,0,1110,1111,7, + 7,0,0,1111,1112,7,9,0,0,1112,1113,1,0,0,0,1113,1114,6,121,25,0,1114,259, + 1,0,0,0,1115,1116,7,20,0,0,1116,1117,7,1,0,0,1117,1118,7,5,0,0,1118,1119, + 7,10,0,0,1119,1120,1,0,0,0,1120,1121,6,122,25,0,1121,261,1,0,0,0,1122,1123, + 8,34,0,0,1123,263,1,0,0,0,1124,1126,3,262,123,0,1125,1124,1,0,0,0,1126, + 1127,1,0,0,0,1127,1125,1,0,0,0,1127,1128,1,0,0,0,1128,1129,1,0,0,0,1129, + 1130,3,364,174,0,1130,1132,1,0,0,0,1131,1125,1,0,0,0,1131,1132,1,0,0,0, + 1132,1134,1,0,0,0,1133,1135,3,262,123,0,1134,1133,1,0,0,0,1135,1136,1,0, + 0,0,1136,1134,1,0,0,0,1136,1137,1,0,0,0,1137,265,1,0,0,0,1138,1139,3,264, + 124,0,1139,1140,1,0,0,0,1140,1141,6,125,26,0,1141,267,1,0,0,0,1142,1143, + 3,58,21,0,1143,1144,1,0,0,0,1144,1145,6,126,11,0,1145,269,1,0,0,0,1146, + 1147,3,60,22,0,1147,1148,1,0,0,0,1148,1149,6,127,11,0,1149,271,1,0,0,0, + 1150,1151,3,62,23,0,1151,1152,1,0,0,0,1152,1153,6,128,11,0,1153,273,1,0, + 0,0,1154,1155,3,78,31,0,1155,1156,1,0,0,0,1156,1157,6,129,14,0,1157,1158, + 6,129,15,0,1158,1159,6,129,15,0,1159,275,1,0,0,0,1160,1161,3,112,48,0,1161, + 1162,1,0,0,0,1162,1163,6,130,19,0,1163,277,1,0,0,0,1164,1165,3,116,50,0, + 1165,1166,1,0,0,0,1166,1167,6,131,18,0,1167,279,1,0,0,0,1168,1169,3,120, + 52,0,1169,1170,1,0,0,0,1170,1171,6,132,22,0,1171,281,1,0,0,0,1172,1173, + 3,260,122,0,1173,1174,1,0,0,0,1174,1175,6,133,27,0,1175,283,1,0,0,0,1176, + 1177,3,228,106,0,1177,1178,1,0,0,0,1178,1179,6,134,23,0,1179,285,1,0,0, + 0,1180,1181,3,186,85,0,1181,1182,1,0,0,0,1182,1183,6,135,28,0,1183,287, + 1,0,0,0,1184,1185,3,58,21,0,1185,1186,1,0,0,0,1186,1187,6,136,11,0,1187, + 289,1,0,0,0,1188,1189,3,60,22,0,1189,1190,1,0,0,0,1190,1191,6,137,11,0, + 1191,291,1,0,0,0,1192,1193,3,62,23,0,1193,1194,1,0,0,0,1194,1195,6,138, + 11,0,1195,293,1,0,0,0,1196,1197,3,78,31,0,1197,1198,1,0,0,0,1198,1199,6, + 139,14,0,1199,1200,6,139,15,0,1200,295,1,0,0,0,1201,1202,3,364,174,0,1202, + 1203,1,0,0,0,1203,1204,6,140,17,0,1204,297,1,0,0,0,1205,1206,3,116,50,0, + 1206,1207,1,0,0,0,1207,1208,6,141,18,0,1208,299,1,0,0,0,1209,1210,3,120, + 52,0,1210,1211,1,0,0,0,1211,1212,6,142,22,0,1212,301,1,0,0,0,1213,1214, + 3,258,121,0,1214,1215,1,0,0,0,1215,1216,6,143,29,0,1216,1217,6,143,30,0, + 1217,303,1,0,0,0,1218,1219,3,66,25,0,1219,1220,1,0,0,0,1220,1221,6,144, + 20,0,1221,305,1,0,0,0,1222,1223,3,100,42,0,1223,1224,1,0,0,0,1224,1225, + 6,145,21,0,1225,307,1,0,0,0,1226,1227,3,58,21,0,1227,1228,1,0,0,0,1228, + 1229,6,146,11,0,1229,309,1,0,0,0,1230,1231,3,60,22,0,1231,1232,1,0,0,0, + 1232,1233,6,147,11,0,1233,311,1,0,0,0,1234,1235,3,62,23,0,1235,1236,1,0, + 0,0,1236,1237,6,148,11,0,1237,313,1,0,0,0,1238,1239,3,78,31,0,1239,1240, + 1,0,0,0,1240,1241,6,149,14,0,1241,1242,6,149,15,0,1242,1243,6,149,15,0, + 1243,315,1,0,0,0,1244,1245,3,116,50,0,1245,1246,1,0,0,0,1246,1247,6,150, + 18,0,1247,317,1,0,0,0,1248,1249,3,120,52,0,1249,1250,1,0,0,0,1250,1251, + 6,151,22,0,1251,319,1,0,0,0,1252,1253,3,228,106,0,1253,1254,1,0,0,0,1254, + 1255,6,152,23,0,1255,321,1,0,0,0,1256,1257,3,58,21,0,1257,1258,1,0,0,0, + 1258,1259,6,153,11,0,1259,323,1,0,0,0,1260,1261,3,60,22,0,1261,1262,1,0, + 0,0,1262,1263,6,154,11,0,1263,325,1,0,0,0,1264,1265,3,62,23,0,1265,1266, + 1,0,0,0,1266,1267,6,155,11,0,1267,327,1,0,0,0,1268,1269,3,78,31,0,1269, + 1270,1,0,0,0,1270,1271,6,156,14,0,1271,1272,6,156,15,0,1272,329,1,0,0,0, + 1273,1274,3,120,52,0,1274,1275,1,0,0,0,1275,1276,6,157,22,0,1276,331,1, + 0,0,0,1277,1278,3,186,85,0,1278,1279,1,0,0,0,1279,1280,6,158,28,0,1280, + 333,1,0,0,0,1281,1282,3,182,83,0,1282,1283,1,0,0,0,1283,1284,6,159,31,0, + 1284,335,1,0,0,0,1285,1286,3,58,21,0,1286,1287,1,0,0,0,1287,1288,6,160, + 11,0,1288,337,1,0,0,0,1289,1290,3,60,22,0,1290,1291,1,0,0,0,1291,1292,6, + 161,11,0,1292,339,1,0,0,0,1293,1294,3,62,23,0,1294,1295,1,0,0,0,1295,1296, + 6,162,11,0,1296,341,1,0,0,0,1297,1298,3,78,31,0,1298,1299,1,0,0,0,1299, + 1300,6,163,14,0,1300,1301,6,163,15,0,1301,343,1,0,0,0,1302,1303,7,1,0,0, + 1303,1304,7,9,0,0,1304,1305,7,15,0,0,1305,1306,7,7,0,0,1306,345,1,0,0,0, + 1307,1308,3,58,21,0,1308,1309,1,0,0,0,1309,1310,6,165,11,0,1310,347,1,0, + 0,0,1311,1312,3,60,22,0,1312,1313,1,0,0,0,1313,1314,6,166,11,0,1314,349, + 1,0,0,0,1315,1316,3,62,23,0,1316,1317,1,0,0,0,1317,1318,6,167,11,0,1318, + 351,1,0,0,0,1319,1320,3,78,31,0,1320,1321,1,0,0,0,1321,1322,6,168,14,0, + 1322,1323,6,168,15,0,1323,353,1,0,0,0,1324,1325,7,15,0,0,1325,1326,7,19, + 0,0,1326,1327,7,9,0,0,1327,1328,7,4,0,0,1328,1329,7,5,0,0,1329,1330,7,1, + 0,0,1330,1331,7,7,0,0,1331,1332,7,9,0,0,1332,1333,7,2,0,0,1333,355,1,0, + 0,0,1334,1335,3,58,21,0,1335,1336,1,0,0,0,1336,1337,6,170,11,0,1337,357, + 1,0,0,0,1338,1339,3,60,22,0,1339,1340,1,0,0,0,1340,1341,6,171,11,0,1341, + 359,1,0,0,0,1342,1343,3,62,23,0,1343,1344,1,0,0,0,1344,1345,6,172,11,0, + 1345,361,1,0,0,0,1346,1347,3,180,82,0,1347,1348,1,0,0,0,1348,1349,6,173, + 16,0,1349,1350,6,173,15,0,1350,363,1,0,0,0,1351,1352,5,58,0,0,1352,365, + 1,0,0,0,1353,1359,3,90,37,0,1354,1359,3,80,32,0,1355,1359,3,120,52,0,1356, + 1359,3,82,33,0,1357,1359,3,96,40,0,1358,1353,1,0,0,0,1358,1354,1,0,0,0, + 1358,1355,1,0,0,0,1358,1356,1,0,0,0,1358,1357,1,0,0,0,1359,1360,1,0,0,0, + 1360,1358,1,0,0,0,1360,1361,1,0,0,0,1361,367,1,0,0,0,1362,1363,3,58,21, + 0,1363,1364,1,0,0,0,1364,1365,6,176,11,0,1365,369,1,0,0,0,1366,1367,3,60, + 22,0,1367,1368,1,0,0,0,1368,1369,6,177,11,0,1369,371,1,0,0,0,1370,1371, + 3,62,23,0,1371,1372,1,0,0,0,1372,1373,6,178,11,0,1373,373,1,0,0,0,1374, + 1375,3,78,31,0,1375,1376,1,0,0,0,1376,1377,6,179,14,0,1377,1378,6,179,15, + 0,1378,375,1,0,0,0,1379,1380,3,66,25,0,1380,1381,1,0,0,0,1381,1382,6,180, + 20,0,1382,1383,6,180,15,0,1383,1384,6,180,32,0,1384,377,1,0,0,0,1385,1386, + 3,100,42,0,1386,1387,1,0,0,0,1387,1388,6,181,21,0,1388,1389,6,181,15,0, + 1389,1390,6,181,32,0,1390,379,1,0,0,0,1391,1392,3,58,21,0,1392,1393,1,0, + 0,0,1393,1394,6,182,11,0,1394,381,1,0,0,0,1395,1396,3,60,22,0,1396,1397, + 1,0,0,0,1397,1398,6,183,11,0,1398,383,1,0,0,0,1399,1400,3,62,23,0,1400, + 1401,1,0,0,0,1401,1402,6,184,11,0,1402,385,1,0,0,0,1403,1404,3,364,174, + 0,1404,1405,1,0,0,0,1405,1406,6,185,17,0,1406,1407,6,185,15,0,1407,1408, + 6,185,7,0,1408,387,1,0,0,0,1409,1410,3,116,50,0,1410,1411,1,0,0,0,1411, + 1412,6,186,18,0,1412,1413,6,186,15,0,1413,1414,6,186,7,0,1414,389,1,0,0, + 0,1415,1416,3,58,21,0,1416,1417,1,0,0,0,1417,1418,6,187,11,0,1418,391,1, + 0,0,0,1419,1420,3,60,22,0,1420,1421,1,0,0,0,1421,1422,6,188,11,0,1422,393, + 1,0,0,0,1423,1424,3,62,23,0,1424,1425,1,0,0,0,1425,1426,6,189,11,0,1426, + 395,1,0,0,0,1427,1428,3,186,85,0,1428,1429,1,0,0,0,1429,1430,6,190,15,0, + 1430,1431,6,190,0,0,1431,1432,6,190,28,0,1432,397,1,0,0,0,1433,1434,3,182, + 83,0,1434,1435,1,0,0,0,1435,1436,6,191,15,0,1436,1437,6,191,0,0,1437,1438, + 6,191,31,0,1438,399,1,0,0,0,1439,1440,3,106,45,0,1440,1441,1,0,0,0,1441, + 1442,6,192,15,0,1442,1443,6,192,0,0,1443,1444,6,192,33,0,1444,401,1,0,0, + 0,1445,1446,3,78,31,0,1446,1447,1,0,0,0,1447,1448,6,193,14,0,1448,1449, + 6,193,15,0,1449,403,1,0,0,0,65,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,576, + 586,590,593,602,604,615,622,627,666,671,680,687,692,694,705,713,716,718, + 723,728,734,741,746,752,755,763,767,891,898,900,916,921,926,928,934,1023, + 1027,1032,1037,1042,1044,1048,1050,1127,1131,1136,1358,1360,34,5,2,0,5, 4,0,5,6,0,5,1,0,5,3,0,5,8,0,5,12,0,5,14,0,5,10,0,5,5,0,5,11,0,0,1,0,7,69, - 0,5,0,0,7,29,0,4,0,0,7,70,0,7,38,0,7,36,0,7,30,0,7,25,0,7,40,0,7,80,0,5, - 13,0,5,7,0,7,72,0,7,90,0,7,89,0,7,88,0,5,9,0,7,71,0,5,15,0,7,33,0]; + 0,5,0,0,7,29,0,4,0,0,7,70,0,7,114,0,7,38,0,7,36,0,7,25,0,7,30,0,7,40,0, + 7,80,0,5,13,0,5,7,0,7,90,0,7,89,0,7,72,0,7,88,0,5,9,0,7,71,0,5,15,0,7,33, + 0]; private static __ATN: ATN; public static get _ATN(): ATN { diff --git a/packages/kbn-esql-ast/src/antlr/esql_parser.g4 b/packages/kbn-esql-ast/src/antlr/esql_parser.g4 index 59c9ee6ca57707..bae91675fbb024 100644 --- a/packages/kbn-esql-ast/src/antlr/esql_parser.g4 +++ b/packages/kbn-esql-ast/src/antlr/esql_parser.g4 @@ -115,11 +115,21 @@ field ; fromCommand - : FROM indexIdentifier (COMMA indexIdentifier)* metadata? + : FROM indexPattern (COMMA indexPattern)* metadata? ; -indexIdentifier - : INDEX_UNQUOTED_IDENTIFIER +indexPattern + : clusterString COLON indexString + | indexString + ; + +clusterString + : UNQUOTED_SOURCE + ; + +indexString + : UNQUOTED_SOURCE + | QUOTED_STRING ; metadata @@ -128,7 +138,7 @@ metadata ; metadataOption - : METADATA indexIdentifier (COMMA indexIdentifier)* + : METADATA UNQUOTED_SOURCE (COMMA UNQUOTED_SOURCE)* ; deprecated_metadata @@ -136,7 +146,7 @@ deprecated_metadata ; metricsCommand - : METRICS indexIdentifier (COMMA indexIdentifier)* aggregates=fields? (BY grouping=fields)? + : METRICS indexPattern (COMMA indexPattern)* aggregates=fields? (BY grouping=fields)? ; evalCommand @@ -289,5 +299,5 @@ enrichWithClause ; lookupCommand - : LOOKUP tableName=INDEX_UNQUOTED_IDENTIFIER ON matchFields=qualifiedNamePatterns + : LOOKUP tableName=indexPattern ON matchFields=qualifiedNamePatterns ; \ No newline at end of file diff --git a/packages/kbn-esql-ast/src/antlr/esql_parser.interp b/packages/kbn-esql-ast/src/antlr/esql_parser.interp index 5900020590110b..6c5edef9e98f06 100644 --- a/packages/kbn-esql-ast/src/antlr/esql_parser.interp +++ b/packages/kbn-esql-ast/src/antlr/esql_parser.interp @@ -151,7 +151,7 @@ UNKNOWN_CMD LINE_COMMENT MULTILINE_COMMENT WS -INDEX_UNQUOTED_IDENTIFIER +UNQUOTED_SOURCE EXPLAIN_WS EXPLAIN_LINE_COMMENT EXPLAIN_MULTILINE_COMMENT @@ -269,7 +269,9 @@ rowCommand fields field fromCommand -indexIdentifier +indexPattern +clusterString +indexString metadata metadataOption deprecated_metadata @@ -312,4 +314,4 @@ lookupCommand atn: -[4, 1, 124, 554, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 122, 8, 1, 10, 1, 12, 1, 125, 9, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 133, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 149, 8, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 161, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 168, 8, 5, 10, 5, 12, 5, 171, 9, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 178, 8, 5, 1, 5, 1, 5, 3, 5, 182, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 190, 8, 5, 10, 5, 12, 5, 193, 9, 5, 1, 6, 1, 6, 3, 6, 197, 8, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 204, 8, 6, 1, 6, 1, 6, 1, 6, 3, 6, 209, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 216, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 222, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 5, 8, 230, 8, 8, 10, 8, 12, 8, 233, 9, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 243, 8, 9, 1, 9, 1, 9, 1, 9, 5, 9, 248, 8, 9, 10, 9, 12, 9, 251, 9, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 5, 10, 259, 8, 10, 10, 10, 12, 10, 262, 9, 10, 3, 10, 264, 8, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 5, 13, 276, 8, 13, 10, 13, 12, 13, 279, 9, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 286, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 292, 8, 15, 10, 15, 12, 15, 295, 9, 15, 1, 15, 3, 15, 298, 8, 15, 1, 16, 1, 16, 1, 17, 1, 17, 3, 17, 304, 8, 17, 1, 18, 1, 18, 1, 18, 1, 18, 5, 18, 310, 8, 18, 10, 18, 12, 18, 313, 9, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 5, 20, 323, 8, 20, 10, 20, 12, 20, 326, 9, 20, 1, 20, 3, 20, 329, 8, 20, 1, 20, 1, 20, 3, 20, 333, 8, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 3, 22, 340, 8, 22, 1, 22, 1, 22, 3, 22, 344, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 350, 8, 23, 1, 24, 1, 24, 1, 24, 5, 24, 355, 8, 24, 10, 24, 12, 24, 358, 9, 24, 1, 25, 1, 25, 1, 25, 5, 25, 363, 8, 25, 10, 25, 12, 25, 366, 9, 25, 1, 26, 1, 26, 1, 26, 5, 26, 371, 8, 26, 10, 26, 12, 26, 374, 9, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 393, 8, 29, 10, 29, 12, 29, 396, 9, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 404, 8, 29, 10, 29, 12, 29, 407, 9, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 415, 8, 29, 10, 29, 12, 29, 418, 9, 29, 1, 29, 1, 29, 3, 29, 422, 8, 29, 1, 30, 1, 30, 3, 30, 426, 8, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 435, 8, 32, 10, 32, 12, 32, 438, 9, 32, 1, 33, 1, 33, 3, 33, 442, 8, 33, 1, 33, 1, 33, 3, 33, 446, 8, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 458, 8, 36, 10, 36, 12, 36, 461, 9, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 471, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 5, 41, 483, 8, 41, 10, 41, 12, 41, 486, 9, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 3, 44, 496, 8, 44, 1, 45, 3, 45, 499, 8, 45, 1, 45, 1, 45, 1, 46, 3, 46, 504, 8, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 529, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 535, 8, 53, 10, 53, 12, 53, 538, 9, 53, 3, 53, 540, 8, 53, 1, 54, 1, 54, 1, 54, 3, 54, 545, 8, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 0, 4, 2, 10, 16, 18, 56, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 0, 7, 1, 0, 63, 64, 1, 0, 65, 67, 1, 0, 71, 72, 2, 0, 35, 35, 39, 39, 1, 0, 42, 43, 2, 0, 41, 41, 55, 55, 2, 0, 56, 56, 58, 62, 580, 0, 112, 1, 0, 0, 0, 2, 115, 1, 0, 0, 0, 4, 132, 1, 0, 0, 0, 6, 148, 1, 0, 0, 0, 8, 150, 1, 0, 0, 0, 10, 181, 1, 0, 0, 0, 12, 208, 1, 0, 0, 0, 14, 215, 1, 0, 0, 0, 16, 221, 1, 0, 0, 0, 18, 242, 1, 0, 0, 0, 20, 252, 1, 0, 0, 0, 22, 267, 1, 0, 0, 0, 24, 269, 1, 0, 0, 0, 26, 272, 1, 0, 0, 0, 28, 285, 1, 0, 0, 0, 30, 287, 1, 0, 0, 0, 32, 299, 1, 0, 0, 0, 34, 303, 1, 0, 0, 0, 36, 305, 1, 0, 0, 0, 38, 314, 1, 0, 0, 0, 40, 318, 1, 0, 0, 0, 42, 334, 1, 0, 0, 0, 44, 337, 1, 0, 0, 0, 46, 345, 1, 0, 0, 0, 48, 351, 1, 0, 0, 0, 50, 359, 1, 0, 0, 0, 52, 367, 1, 0, 0, 0, 54, 375, 1, 0, 0, 0, 56, 377, 1, 0, 0, 0, 58, 421, 1, 0, 0, 0, 60, 425, 1, 0, 0, 0, 62, 427, 1, 0, 0, 0, 64, 430, 1, 0, 0, 0, 66, 439, 1, 0, 0, 0, 68, 447, 1, 0, 0, 0, 70, 450, 1, 0, 0, 0, 72, 453, 1, 0, 0, 0, 74, 462, 1, 0, 0, 0, 76, 466, 1, 0, 0, 0, 78, 472, 1, 0, 0, 0, 80, 476, 1, 0, 0, 0, 82, 479, 1, 0, 0, 0, 84, 487, 1, 0, 0, 0, 86, 491, 1, 0, 0, 0, 88, 495, 1, 0, 0, 0, 90, 498, 1, 0, 0, 0, 92, 503, 1, 0, 0, 0, 94, 507, 1, 0, 0, 0, 96, 509, 1, 0, 0, 0, 98, 511, 1, 0, 0, 0, 100, 514, 1, 0, 0, 0, 102, 518, 1, 0, 0, 0, 104, 521, 1, 0, 0, 0, 106, 524, 1, 0, 0, 0, 108, 544, 1, 0, 0, 0, 110, 548, 1, 0, 0, 0, 112, 113, 3, 2, 1, 0, 113, 114, 5, 0, 0, 1, 114, 1, 1, 0, 0, 0, 115, 116, 6, 1, -1, 0, 116, 117, 3, 4, 2, 0, 117, 123, 1, 0, 0, 0, 118, 119, 10, 1, 0, 0, 119, 120, 5, 29, 0, 0, 120, 122, 3, 6, 3, 0, 121, 118, 1, 0, 0, 0, 122, 125, 1, 0, 0, 0, 123, 121, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 3, 1, 0, 0, 0, 125, 123, 1, 0, 0, 0, 126, 133, 3, 98, 49, 0, 127, 133, 3, 30, 15, 0, 128, 133, 3, 24, 12, 0, 129, 133, 3, 40, 20, 0, 130, 133, 3, 102, 51, 0, 131, 133, 3, 104, 52, 0, 132, 126, 1, 0, 0, 0, 132, 127, 1, 0, 0, 0, 132, 128, 1, 0, 0, 0, 132, 129, 1, 0, 0, 0, 132, 130, 1, 0, 0, 0, 132, 131, 1, 0, 0, 0, 133, 5, 1, 0, 0, 0, 134, 149, 3, 42, 21, 0, 135, 149, 3, 46, 23, 0, 136, 149, 3, 62, 31, 0, 137, 149, 3, 110, 55, 0, 138, 149, 3, 68, 34, 0, 139, 149, 3, 64, 32, 0, 140, 149, 3, 44, 22, 0, 141, 149, 3, 8, 4, 0, 142, 149, 3, 70, 35, 0, 143, 149, 3, 72, 36, 0, 144, 149, 3, 76, 38, 0, 145, 149, 3, 78, 39, 0, 146, 149, 3, 106, 53, 0, 147, 149, 3, 80, 40, 0, 148, 134, 1, 0, 0, 0, 148, 135, 1, 0, 0, 0, 148, 136, 1, 0, 0, 0, 148, 137, 1, 0, 0, 0, 148, 138, 1, 0, 0, 0, 148, 139, 1, 0, 0, 0, 148, 140, 1, 0, 0, 0, 148, 141, 1, 0, 0, 0, 148, 142, 1, 0, 0, 0, 148, 143, 1, 0, 0, 0, 148, 144, 1, 0, 0, 0, 148, 145, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 148, 147, 1, 0, 0, 0, 149, 7, 1, 0, 0, 0, 150, 151, 5, 20, 0, 0, 151, 152, 3, 10, 5, 0, 152, 9, 1, 0, 0, 0, 153, 154, 6, 5, -1, 0, 154, 155, 5, 48, 0, 0, 155, 182, 3, 10, 5, 7, 156, 182, 3, 14, 7, 0, 157, 182, 3, 12, 6, 0, 158, 160, 3, 14, 7, 0, 159, 161, 5, 48, 0, 0, 160, 159, 1, 0, 0, 0, 160, 161, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 163, 5, 45, 0, 0, 163, 164, 5, 44, 0, 0, 164, 169, 3, 14, 7, 0, 165, 166, 5, 38, 0, 0, 166, 168, 3, 14, 7, 0, 167, 165, 1, 0, 0, 0, 168, 171, 1, 0, 0, 0, 169, 167, 1, 0, 0, 0, 169, 170, 1, 0, 0, 0, 170, 172, 1, 0, 0, 0, 171, 169, 1, 0, 0, 0, 172, 173, 5, 54, 0, 0, 173, 182, 1, 0, 0, 0, 174, 175, 3, 14, 7, 0, 175, 177, 5, 46, 0, 0, 176, 178, 5, 48, 0, 0, 177, 176, 1, 0, 0, 0, 177, 178, 1, 0, 0, 0, 178, 179, 1, 0, 0, 0, 179, 180, 5, 49, 0, 0, 180, 182, 1, 0, 0, 0, 181, 153, 1, 0, 0, 0, 181, 156, 1, 0, 0, 0, 181, 157, 1, 0, 0, 0, 181, 158, 1, 0, 0, 0, 181, 174, 1, 0, 0, 0, 182, 191, 1, 0, 0, 0, 183, 184, 10, 4, 0, 0, 184, 185, 5, 34, 0, 0, 185, 190, 3, 10, 5, 5, 186, 187, 10, 3, 0, 0, 187, 188, 5, 51, 0, 0, 188, 190, 3, 10, 5, 4, 189, 183, 1, 0, 0, 0, 189, 186, 1, 0, 0, 0, 190, 193, 1, 0, 0, 0, 191, 189, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 11, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 194, 196, 3, 14, 7, 0, 195, 197, 5, 48, 0, 0, 196, 195, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 198, 1, 0, 0, 0, 198, 199, 5, 47, 0, 0, 199, 200, 3, 94, 47, 0, 200, 209, 1, 0, 0, 0, 201, 203, 3, 14, 7, 0, 202, 204, 5, 48, 0, 0, 203, 202, 1, 0, 0, 0, 203, 204, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 206, 5, 53, 0, 0, 206, 207, 3, 94, 47, 0, 207, 209, 1, 0, 0, 0, 208, 194, 1, 0, 0, 0, 208, 201, 1, 0, 0, 0, 209, 13, 1, 0, 0, 0, 210, 216, 3, 16, 8, 0, 211, 212, 3, 16, 8, 0, 212, 213, 3, 96, 48, 0, 213, 214, 3, 16, 8, 0, 214, 216, 1, 0, 0, 0, 215, 210, 1, 0, 0, 0, 215, 211, 1, 0, 0, 0, 216, 15, 1, 0, 0, 0, 217, 218, 6, 8, -1, 0, 218, 222, 3, 18, 9, 0, 219, 220, 7, 0, 0, 0, 220, 222, 3, 16, 8, 3, 221, 217, 1, 0, 0, 0, 221, 219, 1, 0, 0, 0, 222, 231, 1, 0, 0, 0, 223, 224, 10, 2, 0, 0, 224, 225, 7, 1, 0, 0, 225, 230, 3, 16, 8, 3, 226, 227, 10, 1, 0, 0, 227, 228, 7, 0, 0, 0, 228, 230, 3, 16, 8, 2, 229, 223, 1, 0, 0, 0, 229, 226, 1, 0, 0, 0, 230, 233, 1, 0, 0, 0, 231, 229, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 17, 1, 0, 0, 0, 233, 231, 1, 0, 0, 0, 234, 235, 6, 9, -1, 0, 235, 243, 3, 58, 29, 0, 236, 243, 3, 48, 24, 0, 237, 243, 3, 20, 10, 0, 238, 239, 5, 44, 0, 0, 239, 240, 3, 10, 5, 0, 240, 241, 5, 54, 0, 0, 241, 243, 1, 0, 0, 0, 242, 234, 1, 0, 0, 0, 242, 236, 1, 0, 0, 0, 242, 237, 1, 0, 0, 0, 242, 238, 1, 0, 0, 0, 243, 249, 1, 0, 0, 0, 244, 245, 10, 1, 0, 0, 245, 246, 5, 37, 0, 0, 246, 248, 3, 22, 11, 0, 247, 244, 1, 0, 0, 0, 248, 251, 1, 0, 0, 0, 249, 247, 1, 0, 0, 0, 249, 250, 1, 0, 0, 0, 250, 19, 1, 0, 0, 0, 251, 249, 1, 0, 0, 0, 252, 253, 3, 54, 27, 0, 253, 263, 5, 44, 0, 0, 254, 264, 5, 65, 0, 0, 255, 260, 3, 10, 5, 0, 256, 257, 5, 38, 0, 0, 257, 259, 3, 10, 5, 0, 258, 256, 1, 0, 0, 0, 259, 262, 1, 0, 0, 0, 260, 258, 1, 0, 0, 0, 260, 261, 1, 0, 0, 0, 261, 264, 1, 0, 0, 0, 262, 260, 1, 0, 0, 0, 263, 254, 1, 0, 0, 0, 263, 255, 1, 0, 0, 0, 263, 264, 1, 0, 0, 0, 264, 265, 1, 0, 0, 0, 265, 266, 5, 54, 0, 0, 266, 21, 1, 0, 0, 0, 267, 268, 3, 54, 27, 0, 268, 23, 1, 0, 0, 0, 269, 270, 5, 16, 0, 0, 270, 271, 3, 26, 13, 0, 271, 25, 1, 0, 0, 0, 272, 277, 3, 28, 14, 0, 273, 274, 5, 38, 0, 0, 274, 276, 3, 28, 14, 0, 275, 273, 1, 0, 0, 0, 276, 279, 1, 0, 0, 0, 277, 275, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 27, 1, 0, 0, 0, 279, 277, 1, 0, 0, 0, 280, 286, 3, 10, 5, 0, 281, 282, 3, 48, 24, 0, 282, 283, 5, 36, 0, 0, 283, 284, 3, 10, 5, 0, 284, 286, 1, 0, 0, 0, 285, 280, 1, 0, 0, 0, 285, 281, 1, 0, 0, 0, 286, 29, 1, 0, 0, 0, 287, 288, 5, 6, 0, 0, 288, 293, 3, 32, 16, 0, 289, 290, 5, 38, 0, 0, 290, 292, 3, 32, 16, 0, 291, 289, 1, 0, 0, 0, 292, 295, 1, 0, 0, 0, 293, 291, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 297, 1, 0, 0, 0, 295, 293, 1, 0, 0, 0, 296, 298, 3, 34, 17, 0, 297, 296, 1, 0, 0, 0, 297, 298, 1, 0, 0, 0, 298, 31, 1, 0, 0, 0, 299, 300, 5, 25, 0, 0, 300, 33, 1, 0, 0, 0, 301, 304, 3, 36, 18, 0, 302, 304, 3, 38, 19, 0, 303, 301, 1, 0, 0, 0, 303, 302, 1, 0, 0, 0, 304, 35, 1, 0, 0, 0, 305, 306, 5, 76, 0, 0, 306, 311, 3, 32, 16, 0, 307, 308, 5, 38, 0, 0, 308, 310, 3, 32, 16, 0, 309, 307, 1, 0, 0, 0, 310, 313, 1, 0, 0, 0, 311, 309, 1, 0, 0, 0, 311, 312, 1, 0, 0, 0, 312, 37, 1, 0, 0, 0, 313, 311, 1, 0, 0, 0, 314, 315, 5, 69, 0, 0, 315, 316, 3, 36, 18, 0, 316, 317, 5, 70, 0, 0, 317, 39, 1, 0, 0, 0, 318, 319, 5, 13, 0, 0, 319, 324, 3, 32, 16, 0, 320, 321, 5, 38, 0, 0, 321, 323, 3, 32, 16, 0, 322, 320, 1, 0, 0, 0, 323, 326, 1, 0, 0, 0, 324, 322, 1, 0, 0, 0, 324, 325, 1, 0, 0, 0, 325, 328, 1, 0, 0, 0, 326, 324, 1, 0, 0, 0, 327, 329, 3, 26, 13, 0, 328, 327, 1, 0, 0, 0, 328, 329, 1, 0, 0, 0, 329, 332, 1, 0, 0, 0, 330, 331, 5, 33, 0, 0, 331, 333, 3, 26, 13, 0, 332, 330, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 41, 1, 0, 0, 0, 334, 335, 5, 4, 0, 0, 335, 336, 3, 26, 13, 0, 336, 43, 1, 0, 0, 0, 337, 339, 5, 19, 0, 0, 338, 340, 3, 26, 13, 0, 339, 338, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 343, 1, 0, 0, 0, 341, 342, 5, 33, 0, 0, 342, 344, 3, 26, 13, 0, 343, 341, 1, 0, 0, 0, 343, 344, 1, 0, 0, 0, 344, 45, 1, 0, 0, 0, 345, 346, 5, 8, 0, 0, 346, 349, 3, 26, 13, 0, 347, 348, 5, 33, 0, 0, 348, 350, 3, 26, 13, 0, 349, 347, 1, 0, 0, 0, 349, 350, 1, 0, 0, 0, 350, 47, 1, 0, 0, 0, 351, 356, 3, 54, 27, 0, 352, 353, 5, 40, 0, 0, 353, 355, 3, 54, 27, 0, 354, 352, 1, 0, 0, 0, 355, 358, 1, 0, 0, 0, 356, 354, 1, 0, 0, 0, 356, 357, 1, 0, 0, 0, 357, 49, 1, 0, 0, 0, 358, 356, 1, 0, 0, 0, 359, 364, 3, 56, 28, 0, 360, 361, 5, 40, 0, 0, 361, 363, 3, 56, 28, 0, 362, 360, 1, 0, 0, 0, 363, 366, 1, 0, 0, 0, 364, 362, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, 51, 1, 0, 0, 0, 366, 364, 1, 0, 0, 0, 367, 372, 3, 50, 25, 0, 368, 369, 5, 38, 0, 0, 369, 371, 3, 50, 25, 0, 370, 368, 1, 0, 0, 0, 371, 374, 1, 0, 0, 0, 372, 370, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 53, 1, 0, 0, 0, 374, 372, 1, 0, 0, 0, 375, 376, 7, 2, 0, 0, 376, 55, 1, 0, 0, 0, 377, 378, 5, 80, 0, 0, 378, 57, 1, 0, 0, 0, 379, 422, 5, 49, 0, 0, 380, 381, 3, 92, 46, 0, 381, 382, 5, 71, 0, 0, 382, 422, 1, 0, 0, 0, 383, 422, 3, 90, 45, 0, 384, 422, 3, 92, 46, 0, 385, 422, 3, 86, 43, 0, 386, 422, 3, 60, 30, 0, 387, 422, 3, 94, 47, 0, 388, 389, 5, 69, 0, 0, 389, 394, 3, 88, 44, 0, 390, 391, 5, 38, 0, 0, 391, 393, 3, 88, 44, 0, 392, 390, 1, 0, 0, 0, 393, 396, 1, 0, 0, 0, 394, 392, 1, 0, 0, 0, 394, 395, 1, 0, 0, 0, 395, 397, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 398, 5, 70, 0, 0, 398, 422, 1, 0, 0, 0, 399, 400, 5, 69, 0, 0, 400, 405, 3, 86, 43, 0, 401, 402, 5, 38, 0, 0, 402, 404, 3, 86, 43, 0, 403, 401, 1, 0, 0, 0, 404, 407, 1, 0, 0, 0, 405, 403, 1, 0, 0, 0, 405, 406, 1, 0, 0, 0, 406, 408, 1, 0, 0, 0, 407, 405, 1, 0, 0, 0, 408, 409, 5, 70, 0, 0, 409, 422, 1, 0, 0, 0, 410, 411, 5, 69, 0, 0, 411, 416, 3, 94, 47, 0, 412, 413, 5, 38, 0, 0, 413, 415, 3, 94, 47, 0, 414, 412, 1, 0, 0, 0, 415, 418, 1, 0, 0, 0, 416, 414, 1, 0, 0, 0, 416, 417, 1, 0, 0, 0, 417, 419, 1, 0, 0, 0, 418, 416, 1, 0, 0, 0, 419, 420, 5, 70, 0, 0, 420, 422, 1, 0, 0, 0, 421, 379, 1, 0, 0, 0, 421, 380, 1, 0, 0, 0, 421, 383, 1, 0, 0, 0, 421, 384, 1, 0, 0, 0, 421, 385, 1, 0, 0, 0, 421, 386, 1, 0, 0, 0, 421, 387, 1, 0, 0, 0, 421, 388, 1, 0, 0, 0, 421, 399, 1, 0, 0, 0, 421, 410, 1, 0, 0, 0, 422, 59, 1, 0, 0, 0, 423, 426, 5, 52, 0, 0, 424, 426, 5, 68, 0, 0, 425, 423, 1, 0, 0, 0, 425, 424, 1, 0, 0, 0, 426, 61, 1, 0, 0, 0, 427, 428, 5, 10, 0, 0, 428, 429, 5, 31, 0, 0, 429, 63, 1, 0, 0, 0, 430, 431, 5, 18, 0, 0, 431, 436, 3, 66, 33, 0, 432, 433, 5, 38, 0, 0, 433, 435, 3, 66, 33, 0, 434, 432, 1, 0, 0, 0, 435, 438, 1, 0, 0, 0, 436, 434, 1, 0, 0, 0, 436, 437, 1, 0, 0, 0, 437, 65, 1, 0, 0, 0, 438, 436, 1, 0, 0, 0, 439, 441, 3, 10, 5, 0, 440, 442, 7, 3, 0, 0, 441, 440, 1, 0, 0, 0, 441, 442, 1, 0, 0, 0, 442, 445, 1, 0, 0, 0, 443, 444, 5, 50, 0, 0, 444, 446, 7, 4, 0, 0, 445, 443, 1, 0, 0, 0, 445, 446, 1, 0, 0, 0, 446, 67, 1, 0, 0, 0, 447, 448, 5, 9, 0, 0, 448, 449, 3, 52, 26, 0, 449, 69, 1, 0, 0, 0, 450, 451, 5, 2, 0, 0, 451, 452, 3, 52, 26, 0, 452, 71, 1, 0, 0, 0, 453, 454, 5, 15, 0, 0, 454, 459, 3, 74, 37, 0, 455, 456, 5, 38, 0, 0, 456, 458, 3, 74, 37, 0, 457, 455, 1, 0, 0, 0, 458, 461, 1, 0, 0, 0, 459, 457, 1, 0, 0, 0, 459, 460, 1, 0, 0, 0, 460, 73, 1, 0, 0, 0, 461, 459, 1, 0, 0, 0, 462, 463, 3, 50, 25, 0, 463, 464, 5, 84, 0, 0, 464, 465, 3, 50, 25, 0, 465, 75, 1, 0, 0, 0, 466, 467, 5, 1, 0, 0, 467, 468, 3, 18, 9, 0, 468, 470, 3, 94, 47, 0, 469, 471, 3, 82, 41, 0, 470, 469, 1, 0, 0, 0, 470, 471, 1, 0, 0, 0, 471, 77, 1, 0, 0, 0, 472, 473, 5, 7, 0, 0, 473, 474, 3, 18, 9, 0, 474, 475, 3, 94, 47, 0, 475, 79, 1, 0, 0, 0, 476, 477, 5, 14, 0, 0, 477, 478, 3, 48, 24, 0, 478, 81, 1, 0, 0, 0, 479, 484, 3, 84, 42, 0, 480, 481, 5, 38, 0, 0, 481, 483, 3, 84, 42, 0, 482, 480, 1, 0, 0, 0, 483, 486, 1, 0, 0, 0, 484, 482, 1, 0, 0, 0, 484, 485, 1, 0, 0, 0, 485, 83, 1, 0, 0, 0, 486, 484, 1, 0, 0, 0, 487, 488, 3, 54, 27, 0, 488, 489, 5, 36, 0, 0, 489, 490, 3, 58, 29, 0, 490, 85, 1, 0, 0, 0, 491, 492, 7, 5, 0, 0, 492, 87, 1, 0, 0, 0, 493, 496, 3, 90, 45, 0, 494, 496, 3, 92, 46, 0, 495, 493, 1, 0, 0, 0, 495, 494, 1, 0, 0, 0, 496, 89, 1, 0, 0, 0, 497, 499, 7, 0, 0, 0, 498, 497, 1, 0, 0, 0, 498, 499, 1, 0, 0, 0, 499, 500, 1, 0, 0, 0, 500, 501, 5, 32, 0, 0, 501, 91, 1, 0, 0, 0, 502, 504, 7, 0, 0, 0, 503, 502, 1, 0, 0, 0, 503, 504, 1, 0, 0, 0, 504, 505, 1, 0, 0, 0, 505, 506, 5, 31, 0, 0, 506, 93, 1, 0, 0, 0, 507, 508, 5, 30, 0, 0, 508, 95, 1, 0, 0, 0, 509, 510, 7, 6, 0, 0, 510, 97, 1, 0, 0, 0, 511, 512, 5, 5, 0, 0, 512, 513, 3, 100, 50, 0, 513, 99, 1, 0, 0, 0, 514, 515, 5, 69, 0, 0, 515, 516, 3, 2, 1, 0, 516, 517, 5, 70, 0, 0, 517, 101, 1, 0, 0, 0, 518, 519, 5, 17, 0, 0, 519, 520, 5, 106, 0, 0, 520, 103, 1, 0, 0, 0, 521, 522, 5, 12, 0, 0, 522, 523, 5, 110, 0, 0, 523, 105, 1, 0, 0, 0, 524, 525, 5, 3, 0, 0, 525, 528, 5, 90, 0, 0, 526, 527, 5, 88, 0, 0, 527, 529, 3, 50, 25, 0, 528, 526, 1, 0, 0, 0, 528, 529, 1, 0, 0, 0, 529, 539, 1, 0, 0, 0, 530, 531, 5, 89, 0, 0, 531, 536, 3, 108, 54, 0, 532, 533, 5, 38, 0, 0, 533, 535, 3, 108, 54, 0, 534, 532, 1, 0, 0, 0, 535, 538, 1, 0, 0, 0, 536, 534, 1, 0, 0, 0, 536, 537, 1, 0, 0, 0, 537, 540, 1, 0, 0, 0, 538, 536, 1, 0, 0, 0, 539, 530, 1, 0, 0, 0, 539, 540, 1, 0, 0, 0, 540, 107, 1, 0, 0, 0, 541, 542, 3, 50, 25, 0, 542, 543, 5, 36, 0, 0, 543, 545, 1, 0, 0, 0, 544, 541, 1, 0, 0, 0, 544, 545, 1, 0, 0, 0, 545, 546, 1, 0, 0, 0, 546, 547, 3, 50, 25, 0, 547, 109, 1, 0, 0, 0, 548, 549, 5, 11, 0, 0, 549, 550, 5, 25, 0, 0, 550, 551, 5, 88, 0, 0, 551, 552, 3, 52, 26, 0, 552, 111, 1, 0, 0, 0, 53, 123, 132, 148, 160, 169, 177, 181, 189, 191, 196, 203, 208, 215, 221, 229, 231, 242, 249, 260, 263, 277, 285, 293, 297, 303, 311, 324, 328, 332, 339, 343, 349, 356, 364, 372, 394, 405, 416, 421, 425, 436, 441, 445, 459, 470, 484, 495, 498, 503, 528, 536, 539, 544] \ No newline at end of file +[4, 1, 124, 567, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 126, 8, 1, 10, 1, 12, 1, 129, 9, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 137, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 153, 8, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 165, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 172, 8, 5, 10, 5, 12, 5, 175, 9, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 182, 8, 5, 1, 5, 1, 5, 3, 5, 186, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 194, 8, 5, 10, 5, 12, 5, 197, 9, 5, 1, 6, 1, 6, 3, 6, 201, 8, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 208, 8, 6, 1, 6, 1, 6, 1, 6, 3, 6, 213, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 220, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 226, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 5, 8, 234, 8, 8, 10, 8, 12, 8, 237, 9, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 247, 8, 9, 1, 9, 1, 9, 1, 9, 5, 9, 252, 8, 9, 10, 9, 12, 9, 255, 9, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 5, 10, 263, 8, 10, 10, 10, 12, 10, 266, 9, 10, 3, 10, 268, 8, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 5, 13, 280, 8, 13, 10, 13, 12, 13, 283, 9, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 290, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 296, 8, 15, 10, 15, 12, 15, 299, 9, 15, 1, 15, 3, 15, 302, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 309, 8, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 317, 8, 19, 1, 20, 1, 20, 1, 20, 1, 20, 5, 20, 323, 8, 20, 10, 20, 12, 20, 326, 9, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 5, 22, 336, 8, 22, 10, 22, 12, 22, 339, 9, 22, 1, 22, 3, 22, 342, 8, 22, 1, 22, 1, 22, 3, 22, 346, 8, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 3, 24, 353, 8, 24, 1, 24, 1, 24, 3, 24, 357, 8, 24, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 363, 8, 25, 1, 26, 1, 26, 1, 26, 5, 26, 368, 8, 26, 10, 26, 12, 26, 371, 9, 26, 1, 27, 1, 27, 1, 27, 5, 27, 376, 8, 27, 10, 27, 12, 27, 379, 9, 27, 1, 28, 1, 28, 1, 28, 5, 28, 384, 8, 28, 10, 28, 12, 28, 387, 9, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 5, 31, 406, 8, 31, 10, 31, 12, 31, 409, 9, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 5, 31, 417, 8, 31, 10, 31, 12, 31, 420, 9, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 5, 31, 428, 8, 31, 10, 31, 12, 31, 431, 9, 31, 1, 31, 1, 31, 3, 31, 435, 8, 31, 1, 32, 1, 32, 3, 32, 439, 8, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 448, 8, 34, 10, 34, 12, 34, 451, 9, 34, 1, 35, 1, 35, 3, 35, 455, 8, 35, 1, 35, 1, 35, 3, 35, 459, 8, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 5, 38, 471, 8, 38, 10, 38, 12, 38, 474, 9, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 3, 40, 484, 8, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 5, 43, 496, 8, 43, 10, 43, 12, 43, 499, 9, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 3, 46, 509, 8, 46, 1, 47, 3, 47, 512, 8, 47, 1, 47, 1, 47, 1, 48, 3, 48, 517, 8, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 542, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 5, 55, 548, 8, 55, 10, 55, 12, 55, 551, 9, 55, 3, 55, 553, 8, 55, 1, 56, 1, 56, 1, 56, 3, 56, 558, 8, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 0, 4, 2, 10, 16, 18, 58, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 0, 8, 1, 0, 63, 64, 1, 0, 65, 67, 2, 0, 25, 25, 30, 30, 1, 0, 71, 72, 2, 0, 35, 35, 39, 39, 1, 0, 42, 43, 2, 0, 41, 41, 55, 55, 2, 0, 56, 56, 58, 62, 592, 0, 116, 1, 0, 0, 0, 2, 119, 1, 0, 0, 0, 4, 136, 1, 0, 0, 0, 6, 152, 1, 0, 0, 0, 8, 154, 1, 0, 0, 0, 10, 185, 1, 0, 0, 0, 12, 212, 1, 0, 0, 0, 14, 219, 1, 0, 0, 0, 16, 225, 1, 0, 0, 0, 18, 246, 1, 0, 0, 0, 20, 256, 1, 0, 0, 0, 22, 271, 1, 0, 0, 0, 24, 273, 1, 0, 0, 0, 26, 276, 1, 0, 0, 0, 28, 289, 1, 0, 0, 0, 30, 291, 1, 0, 0, 0, 32, 308, 1, 0, 0, 0, 34, 310, 1, 0, 0, 0, 36, 312, 1, 0, 0, 0, 38, 316, 1, 0, 0, 0, 40, 318, 1, 0, 0, 0, 42, 327, 1, 0, 0, 0, 44, 331, 1, 0, 0, 0, 46, 347, 1, 0, 0, 0, 48, 350, 1, 0, 0, 0, 50, 358, 1, 0, 0, 0, 52, 364, 1, 0, 0, 0, 54, 372, 1, 0, 0, 0, 56, 380, 1, 0, 0, 0, 58, 388, 1, 0, 0, 0, 60, 390, 1, 0, 0, 0, 62, 434, 1, 0, 0, 0, 64, 438, 1, 0, 0, 0, 66, 440, 1, 0, 0, 0, 68, 443, 1, 0, 0, 0, 70, 452, 1, 0, 0, 0, 72, 460, 1, 0, 0, 0, 74, 463, 1, 0, 0, 0, 76, 466, 1, 0, 0, 0, 78, 475, 1, 0, 0, 0, 80, 479, 1, 0, 0, 0, 82, 485, 1, 0, 0, 0, 84, 489, 1, 0, 0, 0, 86, 492, 1, 0, 0, 0, 88, 500, 1, 0, 0, 0, 90, 504, 1, 0, 0, 0, 92, 508, 1, 0, 0, 0, 94, 511, 1, 0, 0, 0, 96, 516, 1, 0, 0, 0, 98, 520, 1, 0, 0, 0, 100, 522, 1, 0, 0, 0, 102, 524, 1, 0, 0, 0, 104, 527, 1, 0, 0, 0, 106, 531, 1, 0, 0, 0, 108, 534, 1, 0, 0, 0, 110, 537, 1, 0, 0, 0, 112, 557, 1, 0, 0, 0, 114, 561, 1, 0, 0, 0, 116, 117, 3, 2, 1, 0, 117, 118, 5, 0, 0, 1, 118, 1, 1, 0, 0, 0, 119, 120, 6, 1, -1, 0, 120, 121, 3, 4, 2, 0, 121, 127, 1, 0, 0, 0, 122, 123, 10, 1, 0, 0, 123, 124, 5, 29, 0, 0, 124, 126, 3, 6, 3, 0, 125, 122, 1, 0, 0, 0, 126, 129, 1, 0, 0, 0, 127, 125, 1, 0, 0, 0, 127, 128, 1, 0, 0, 0, 128, 3, 1, 0, 0, 0, 129, 127, 1, 0, 0, 0, 130, 137, 3, 102, 51, 0, 131, 137, 3, 30, 15, 0, 132, 137, 3, 24, 12, 0, 133, 137, 3, 44, 22, 0, 134, 137, 3, 106, 53, 0, 135, 137, 3, 108, 54, 0, 136, 130, 1, 0, 0, 0, 136, 131, 1, 0, 0, 0, 136, 132, 1, 0, 0, 0, 136, 133, 1, 0, 0, 0, 136, 134, 1, 0, 0, 0, 136, 135, 1, 0, 0, 0, 137, 5, 1, 0, 0, 0, 138, 153, 3, 46, 23, 0, 139, 153, 3, 50, 25, 0, 140, 153, 3, 66, 33, 0, 141, 153, 3, 114, 57, 0, 142, 153, 3, 72, 36, 0, 143, 153, 3, 68, 34, 0, 144, 153, 3, 48, 24, 0, 145, 153, 3, 8, 4, 0, 146, 153, 3, 74, 37, 0, 147, 153, 3, 76, 38, 0, 148, 153, 3, 80, 40, 0, 149, 153, 3, 82, 41, 0, 150, 153, 3, 110, 55, 0, 151, 153, 3, 84, 42, 0, 152, 138, 1, 0, 0, 0, 152, 139, 1, 0, 0, 0, 152, 140, 1, 0, 0, 0, 152, 141, 1, 0, 0, 0, 152, 142, 1, 0, 0, 0, 152, 143, 1, 0, 0, 0, 152, 144, 1, 0, 0, 0, 152, 145, 1, 0, 0, 0, 152, 146, 1, 0, 0, 0, 152, 147, 1, 0, 0, 0, 152, 148, 1, 0, 0, 0, 152, 149, 1, 0, 0, 0, 152, 150, 1, 0, 0, 0, 152, 151, 1, 0, 0, 0, 153, 7, 1, 0, 0, 0, 154, 155, 5, 20, 0, 0, 155, 156, 3, 10, 5, 0, 156, 9, 1, 0, 0, 0, 157, 158, 6, 5, -1, 0, 158, 159, 5, 48, 0, 0, 159, 186, 3, 10, 5, 7, 160, 186, 3, 14, 7, 0, 161, 186, 3, 12, 6, 0, 162, 164, 3, 14, 7, 0, 163, 165, 5, 48, 0, 0, 164, 163, 1, 0, 0, 0, 164, 165, 1, 0, 0, 0, 165, 166, 1, 0, 0, 0, 166, 167, 5, 45, 0, 0, 167, 168, 5, 44, 0, 0, 168, 173, 3, 14, 7, 0, 169, 170, 5, 38, 0, 0, 170, 172, 3, 14, 7, 0, 171, 169, 1, 0, 0, 0, 172, 175, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 176, 1, 0, 0, 0, 175, 173, 1, 0, 0, 0, 176, 177, 5, 54, 0, 0, 177, 186, 1, 0, 0, 0, 178, 179, 3, 14, 7, 0, 179, 181, 5, 46, 0, 0, 180, 182, 5, 48, 0, 0, 181, 180, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 184, 5, 49, 0, 0, 184, 186, 1, 0, 0, 0, 185, 157, 1, 0, 0, 0, 185, 160, 1, 0, 0, 0, 185, 161, 1, 0, 0, 0, 185, 162, 1, 0, 0, 0, 185, 178, 1, 0, 0, 0, 186, 195, 1, 0, 0, 0, 187, 188, 10, 4, 0, 0, 188, 189, 5, 34, 0, 0, 189, 194, 3, 10, 5, 5, 190, 191, 10, 3, 0, 0, 191, 192, 5, 51, 0, 0, 192, 194, 3, 10, 5, 4, 193, 187, 1, 0, 0, 0, 193, 190, 1, 0, 0, 0, 194, 197, 1, 0, 0, 0, 195, 193, 1, 0, 0, 0, 195, 196, 1, 0, 0, 0, 196, 11, 1, 0, 0, 0, 197, 195, 1, 0, 0, 0, 198, 200, 3, 14, 7, 0, 199, 201, 5, 48, 0, 0, 200, 199, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 202, 1, 0, 0, 0, 202, 203, 5, 47, 0, 0, 203, 204, 3, 98, 49, 0, 204, 213, 1, 0, 0, 0, 205, 207, 3, 14, 7, 0, 206, 208, 5, 48, 0, 0, 207, 206, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 209, 1, 0, 0, 0, 209, 210, 5, 53, 0, 0, 210, 211, 3, 98, 49, 0, 211, 213, 1, 0, 0, 0, 212, 198, 1, 0, 0, 0, 212, 205, 1, 0, 0, 0, 213, 13, 1, 0, 0, 0, 214, 220, 3, 16, 8, 0, 215, 216, 3, 16, 8, 0, 216, 217, 3, 100, 50, 0, 217, 218, 3, 16, 8, 0, 218, 220, 1, 0, 0, 0, 219, 214, 1, 0, 0, 0, 219, 215, 1, 0, 0, 0, 220, 15, 1, 0, 0, 0, 221, 222, 6, 8, -1, 0, 222, 226, 3, 18, 9, 0, 223, 224, 7, 0, 0, 0, 224, 226, 3, 16, 8, 3, 225, 221, 1, 0, 0, 0, 225, 223, 1, 0, 0, 0, 226, 235, 1, 0, 0, 0, 227, 228, 10, 2, 0, 0, 228, 229, 7, 1, 0, 0, 229, 234, 3, 16, 8, 3, 230, 231, 10, 1, 0, 0, 231, 232, 7, 0, 0, 0, 232, 234, 3, 16, 8, 2, 233, 227, 1, 0, 0, 0, 233, 230, 1, 0, 0, 0, 234, 237, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 235, 236, 1, 0, 0, 0, 236, 17, 1, 0, 0, 0, 237, 235, 1, 0, 0, 0, 238, 239, 6, 9, -1, 0, 239, 247, 3, 62, 31, 0, 240, 247, 3, 52, 26, 0, 241, 247, 3, 20, 10, 0, 242, 243, 5, 44, 0, 0, 243, 244, 3, 10, 5, 0, 244, 245, 5, 54, 0, 0, 245, 247, 1, 0, 0, 0, 246, 238, 1, 0, 0, 0, 246, 240, 1, 0, 0, 0, 246, 241, 1, 0, 0, 0, 246, 242, 1, 0, 0, 0, 247, 253, 1, 0, 0, 0, 248, 249, 10, 1, 0, 0, 249, 250, 5, 37, 0, 0, 250, 252, 3, 22, 11, 0, 251, 248, 1, 0, 0, 0, 252, 255, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 19, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 256, 257, 3, 58, 29, 0, 257, 267, 5, 44, 0, 0, 258, 268, 5, 65, 0, 0, 259, 264, 3, 10, 5, 0, 260, 261, 5, 38, 0, 0, 261, 263, 3, 10, 5, 0, 262, 260, 1, 0, 0, 0, 263, 266, 1, 0, 0, 0, 264, 262, 1, 0, 0, 0, 264, 265, 1, 0, 0, 0, 265, 268, 1, 0, 0, 0, 266, 264, 1, 0, 0, 0, 267, 258, 1, 0, 0, 0, 267, 259, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 269, 1, 0, 0, 0, 269, 270, 5, 54, 0, 0, 270, 21, 1, 0, 0, 0, 271, 272, 3, 58, 29, 0, 272, 23, 1, 0, 0, 0, 273, 274, 5, 16, 0, 0, 274, 275, 3, 26, 13, 0, 275, 25, 1, 0, 0, 0, 276, 281, 3, 28, 14, 0, 277, 278, 5, 38, 0, 0, 278, 280, 3, 28, 14, 0, 279, 277, 1, 0, 0, 0, 280, 283, 1, 0, 0, 0, 281, 279, 1, 0, 0, 0, 281, 282, 1, 0, 0, 0, 282, 27, 1, 0, 0, 0, 283, 281, 1, 0, 0, 0, 284, 290, 3, 10, 5, 0, 285, 286, 3, 52, 26, 0, 286, 287, 5, 36, 0, 0, 287, 288, 3, 10, 5, 0, 288, 290, 1, 0, 0, 0, 289, 284, 1, 0, 0, 0, 289, 285, 1, 0, 0, 0, 290, 29, 1, 0, 0, 0, 291, 292, 5, 6, 0, 0, 292, 297, 3, 32, 16, 0, 293, 294, 5, 38, 0, 0, 294, 296, 3, 32, 16, 0, 295, 293, 1, 0, 0, 0, 296, 299, 1, 0, 0, 0, 297, 295, 1, 0, 0, 0, 297, 298, 1, 0, 0, 0, 298, 301, 1, 0, 0, 0, 299, 297, 1, 0, 0, 0, 300, 302, 3, 38, 19, 0, 301, 300, 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 31, 1, 0, 0, 0, 303, 304, 3, 34, 17, 0, 304, 305, 5, 114, 0, 0, 305, 306, 3, 36, 18, 0, 306, 309, 1, 0, 0, 0, 307, 309, 3, 36, 18, 0, 308, 303, 1, 0, 0, 0, 308, 307, 1, 0, 0, 0, 309, 33, 1, 0, 0, 0, 310, 311, 5, 25, 0, 0, 311, 35, 1, 0, 0, 0, 312, 313, 7, 2, 0, 0, 313, 37, 1, 0, 0, 0, 314, 317, 3, 40, 20, 0, 315, 317, 3, 42, 21, 0, 316, 314, 1, 0, 0, 0, 316, 315, 1, 0, 0, 0, 317, 39, 1, 0, 0, 0, 318, 319, 5, 76, 0, 0, 319, 324, 5, 25, 0, 0, 320, 321, 5, 38, 0, 0, 321, 323, 5, 25, 0, 0, 322, 320, 1, 0, 0, 0, 323, 326, 1, 0, 0, 0, 324, 322, 1, 0, 0, 0, 324, 325, 1, 0, 0, 0, 325, 41, 1, 0, 0, 0, 326, 324, 1, 0, 0, 0, 327, 328, 5, 69, 0, 0, 328, 329, 3, 40, 20, 0, 329, 330, 5, 70, 0, 0, 330, 43, 1, 0, 0, 0, 331, 332, 5, 13, 0, 0, 332, 337, 3, 32, 16, 0, 333, 334, 5, 38, 0, 0, 334, 336, 3, 32, 16, 0, 335, 333, 1, 0, 0, 0, 336, 339, 1, 0, 0, 0, 337, 335, 1, 0, 0, 0, 337, 338, 1, 0, 0, 0, 338, 341, 1, 0, 0, 0, 339, 337, 1, 0, 0, 0, 340, 342, 3, 26, 13, 0, 341, 340, 1, 0, 0, 0, 341, 342, 1, 0, 0, 0, 342, 345, 1, 0, 0, 0, 343, 344, 5, 33, 0, 0, 344, 346, 3, 26, 13, 0, 345, 343, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 45, 1, 0, 0, 0, 347, 348, 5, 4, 0, 0, 348, 349, 3, 26, 13, 0, 349, 47, 1, 0, 0, 0, 350, 352, 5, 19, 0, 0, 351, 353, 3, 26, 13, 0, 352, 351, 1, 0, 0, 0, 352, 353, 1, 0, 0, 0, 353, 356, 1, 0, 0, 0, 354, 355, 5, 33, 0, 0, 355, 357, 3, 26, 13, 0, 356, 354, 1, 0, 0, 0, 356, 357, 1, 0, 0, 0, 357, 49, 1, 0, 0, 0, 358, 359, 5, 8, 0, 0, 359, 362, 3, 26, 13, 0, 360, 361, 5, 33, 0, 0, 361, 363, 3, 26, 13, 0, 362, 360, 1, 0, 0, 0, 362, 363, 1, 0, 0, 0, 363, 51, 1, 0, 0, 0, 364, 369, 3, 58, 29, 0, 365, 366, 5, 40, 0, 0, 366, 368, 3, 58, 29, 0, 367, 365, 1, 0, 0, 0, 368, 371, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 369, 370, 1, 0, 0, 0, 370, 53, 1, 0, 0, 0, 371, 369, 1, 0, 0, 0, 372, 377, 3, 60, 30, 0, 373, 374, 5, 40, 0, 0, 374, 376, 3, 60, 30, 0, 375, 373, 1, 0, 0, 0, 376, 379, 1, 0, 0, 0, 377, 375, 1, 0, 0, 0, 377, 378, 1, 0, 0, 0, 378, 55, 1, 0, 0, 0, 379, 377, 1, 0, 0, 0, 380, 385, 3, 54, 27, 0, 381, 382, 5, 38, 0, 0, 382, 384, 3, 54, 27, 0, 383, 381, 1, 0, 0, 0, 384, 387, 1, 0, 0, 0, 385, 383, 1, 0, 0, 0, 385, 386, 1, 0, 0, 0, 386, 57, 1, 0, 0, 0, 387, 385, 1, 0, 0, 0, 388, 389, 7, 3, 0, 0, 389, 59, 1, 0, 0, 0, 390, 391, 5, 80, 0, 0, 391, 61, 1, 0, 0, 0, 392, 435, 5, 49, 0, 0, 393, 394, 3, 96, 48, 0, 394, 395, 5, 71, 0, 0, 395, 435, 1, 0, 0, 0, 396, 435, 3, 94, 47, 0, 397, 435, 3, 96, 48, 0, 398, 435, 3, 90, 45, 0, 399, 435, 3, 64, 32, 0, 400, 435, 3, 98, 49, 0, 401, 402, 5, 69, 0, 0, 402, 407, 3, 92, 46, 0, 403, 404, 5, 38, 0, 0, 404, 406, 3, 92, 46, 0, 405, 403, 1, 0, 0, 0, 406, 409, 1, 0, 0, 0, 407, 405, 1, 0, 0, 0, 407, 408, 1, 0, 0, 0, 408, 410, 1, 0, 0, 0, 409, 407, 1, 0, 0, 0, 410, 411, 5, 70, 0, 0, 411, 435, 1, 0, 0, 0, 412, 413, 5, 69, 0, 0, 413, 418, 3, 90, 45, 0, 414, 415, 5, 38, 0, 0, 415, 417, 3, 90, 45, 0, 416, 414, 1, 0, 0, 0, 417, 420, 1, 0, 0, 0, 418, 416, 1, 0, 0, 0, 418, 419, 1, 0, 0, 0, 419, 421, 1, 0, 0, 0, 420, 418, 1, 0, 0, 0, 421, 422, 5, 70, 0, 0, 422, 435, 1, 0, 0, 0, 423, 424, 5, 69, 0, 0, 424, 429, 3, 98, 49, 0, 425, 426, 5, 38, 0, 0, 426, 428, 3, 98, 49, 0, 427, 425, 1, 0, 0, 0, 428, 431, 1, 0, 0, 0, 429, 427, 1, 0, 0, 0, 429, 430, 1, 0, 0, 0, 430, 432, 1, 0, 0, 0, 431, 429, 1, 0, 0, 0, 432, 433, 5, 70, 0, 0, 433, 435, 1, 0, 0, 0, 434, 392, 1, 0, 0, 0, 434, 393, 1, 0, 0, 0, 434, 396, 1, 0, 0, 0, 434, 397, 1, 0, 0, 0, 434, 398, 1, 0, 0, 0, 434, 399, 1, 0, 0, 0, 434, 400, 1, 0, 0, 0, 434, 401, 1, 0, 0, 0, 434, 412, 1, 0, 0, 0, 434, 423, 1, 0, 0, 0, 435, 63, 1, 0, 0, 0, 436, 439, 5, 52, 0, 0, 437, 439, 5, 68, 0, 0, 438, 436, 1, 0, 0, 0, 438, 437, 1, 0, 0, 0, 439, 65, 1, 0, 0, 0, 440, 441, 5, 10, 0, 0, 441, 442, 5, 31, 0, 0, 442, 67, 1, 0, 0, 0, 443, 444, 5, 18, 0, 0, 444, 449, 3, 70, 35, 0, 445, 446, 5, 38, 0, 0, 446, 448, 3, 70, 35, 0, 447, 445, 1, 0, 0, 0, 448, 451, 1, 0, 0, 0, 449, 447, 1, 0, 0, 0, 449, 450, 1, 0, 0, 0, 450, 69, 1, 0, 0, 0, 451, 449, 1, 0, 0, 0, 452, 454, 3, 10, 5, 0, 453, 455, 7, 4, 0, 0, 454, 453, 1, 0, 0, 0, 454, 455, 1, 0, 0, 0, 455, 458, 1, 0, 0, 0, 456, 457, 5, 50, 0, 0, 457, 459, 7, 5, 0, 0, 458, 456, 1, 0, 0, 0, 458, 459, 1, 0, 0, 0, 459, 71, 1, 0, 0, 0, 460, 461, 5, 9, 0, 0, 461, 462, 3, 56, 28, 0, 462, 73, 1, 0, 0, 0, 463, 464, 5, 2, 0, 0, 464, 465, 3, 56, 28, 0, 465, 75, 1, 0, 0, 0, 466, 467, 5, 15, 0, 0, 467, 472, 3, 78, 39, 0, 468, 469, 5, 38, 0, 0, 469, 471, 3, 78, 39, 0, 470, 468, 1, 0, 0, 0, 471, 474, 1, 0, 0, 0, 472, 470, 1, 0, 0, 0, 472, 473, 1, 0, 0, 0, 473, 77, 1, 0, 0, 0, 474, 472, 1, 0, 0, 0, 475, 476, 3, 54, 27, 0, 476, 477, 5, 84, 0, 0, 477, 478, 3, 54, 27, 0, 478, 79, 1, 0, 0, 0, 479, 480, 5, 1, 0, 0, 480, 481, 3, 18, 9, 0, 481, 483, 3, 98, 49, 0, 482, 484, 3, 86, 43, 0, 483, 482, 1, 0, 0, 0, 483, 484, 1, 0, 0, 0, 484, 81, 1, 0, 0, 0, 485, 486, 5, 7, 0, 0, 486, 487, 3, 18, 9, 0, 487, 488, 3, 98, 49, 0, 488, 83, 1, 0, 0, 0, 489, 490, 5, 14, 0, 0, 490, 491, 3, 52, 26, 0, 491, 85, 1, 0, 0, 0, 492, 497, 3, 88, 44, 0, 493, 494, 5, 38, 0, 0, 494, 496, 3, 88, 44, 0, 495, 493, 1, 0, 0, 0, 496, 499, 1, 0, 0, 0, 497, 495, 1, 0, 0, 0, 497, 498, 1, 0, 0, 0, 498, 87, 1, 0, 0, 0, 499, 497, 1, 0, 0, 0, 500, 501, 3, 58, 29, 0, 501, 502, 5, 36, 0, 0, 502, 503, 3, 62, 31, 0, 503, 89, 1, 0, 0, 0, 504, 505, 7, 6, 0, 0, 505, 91, 1, 0, 0, 0, 506, 509, 3, 94, 47, 0, 507, 509, 3, 96, 48, 0, 508, 506, 1, 0, 0, 0, 508, 507, 1, 0, 0, 0, 509, 93, 1, 0, 0, 0, 510, 512, 7, 0, 0, 0, 511, 510, 1, 0, 0, 0, 511, 512, 1, 0, 0, 0, 512, 513, 1, 0, 0, 0, 513, 514, 5, 32, 0, 0, 514, 95, 1, 0, 0, 0, 515, 517, 7, 0, 0, 0, 516, 515, 1, 0, 0, 0, 516, 517, 1, 0, 0, 0, 517, 518, 1, 0, 0, 0, 518, 519, 5, 31, 0, 0, 519, 97, 1, 0, 0, 0, 520, 521, 5, 30, 0, 0, 521, 99, 1, 0, 0, 0, 522, 523, 7, 7, 0, 0, 523, 101, 1, 0, 0, 0, 524, 525, 5, 5, 0, 0, 525, 526, 3, 104, 52, 0, 526, 103, 1, 0, 0, 0, 527, 528, 5, 69, 0, 0, 528, 529, 3, 2, 1, 0, 529, 530, 5, 70, 0, 0, 530, 105, 1, 0, 0, 0, 531, 532, 5, 17, 0, 0, 532, 533, 5, 106, 0, 0, 533, 107, 1, 0, 0, 0, 534, 535, 5, 12, 0, 0, 535, 536, 5, 110, 0, 0, 536, 109, 1, 0, 0, 0, 537, 538, 5, 3, 0, 0, 538, 541, 5, 90, 0, 0, 539, 540, 5, 88, 0, 0, 540, 542, 3, 54, 27, 0, 541, 539, 1, 0, 0, 0, 541, 542, 1, 0, 0, 0, 542, 552, 1, 0, 0, 0, 543, 544, 5, 89, 0, 0, 544, 549, 3, 112, 56, 0, 545, 546, 5, 38, 0, 0, 546, 548, 3, 112, 56, 0, 547, 545, 1, 0, 0, 0, 548, 551, 1, 0, 0, 0, 549, 547, 1, 0, 0, 0, 549, 550, 1, 0, 0, 0, 550, 553, 1, 0, 0, 0, 551, 549, 1, 0, 0, 0, 552, 543, 1, 0, 0, 0, 552, 553, 1, 0, 0, 0, 553, 111, 1, 0, 0, 0, 554, 555, 3, 54, 27, 0, 555, 556, 5, 36, 0, 0, 556, 558, 1, 0, 0, 0, 557, 554, 1, 0, 0, 0, 557, 558, 1, 0, 0, 0, 558, 559, 1, 0, 0, 0, 559, 560, 3, 54, 27, 0, 560, 113, 1, 0, 0, 0, 561, 562, 5, 11, 0, 0, 562, 563, 3, 32, 16, 0, 563, 564, 5, 88, 0, 0, 564, 565, 3, 56, 28, 0, 565, 115, 1, 0, 0, 0, 54, 127, 136, 152, 164, 173, 181, 185, 193, 195, 200, 207, 212, 219, 225, 233, 235, 246, 253, 264, 267, 281, 289, 297, 301, 308, 316, 324, 337, 341, 345, 352, 356, 362, 369, 377, 385, 407, 418, 429, 434, 438, 449, 454, 458, 472, 483, 497, 508, 511, 516, 541, 549, 552, 557] \ No newline at end of file diff --git a/packages/kbn-esql-ast/src/antlr/esql_parser.tokens b/packages/kbn-esql-ast/src/antlr/esql_parser.tokens index 04798fc3dca8a0..63eb3a86419a31 100644 --- a/packages/kbn-esql-ast/src/antlr/esql_parser.tokens +++ b/packages/kbn-esql-ast/src/antlr/esql_parser.tokens @@ -22,7 +22,7 @@ UNKNOWN_CMD=21 LINE_COMMENT=22 MULTILINE_COMMENT=23 WS=24 -INDEX_UNQUOTED_IDENTIFIER=25 +UNQUOTED_SOURCE=25 EXPLAIN_WS=26 EXPLAIN_LINE_COMMENT=27 EXPLAIN_MULTILINE_COMMENT=28 diff --git a/packages/kbn-esql-ast/src/antlr/esql_parser.ts b/packages/kbn-esql-ast/src/antlr/esql_parser.ts index 5181349c62c88d..1c8ce9f0d86e5c 100644 --- a/packages/kbn-esql-ast/src/antlr/esql_parser.ts +++ b/packages/kbn-esql-ast/src/antlr/esql_parser.ts @@ -42,7 +42,7 @@ export default class esql_parser extends Parser { public static readonly LINE_COMMENT = 22; public static readonly MULTILINE_COMMENT = 23; public static readonly WS = 24; - public static readonly INDEX_UNQUOTED_IDENTIFIER = 25; + public static readonly UNQUOTED_SOURCE = 25; public static readonly EXPLAIN_WS = 26; public static readonly EXPLAIN_LINE_COMMENT = 27; public static readonly EXPLAIN_MULTILINE_COMMENT = 28; @@ -159,213 +159,216 @@ export default class esql_parser extends Parser { public static readonly RULE_fields = 13; public static readonly RULE_field = 14; public static readonly RULE_fromCommand = 15; - public static readonly RULE_indexIdentifier = 16; - public static readonly RULE_metadata = 17; - public static readonly RULE_metadataOption = 18; - public static readonly RULE_deprecated_metadata = 19; - public static readonly RULE_metricsCommand = 20; - public static readonly RULE_evalCommand = 21; - public static readonly RULE_statsCommand = 22; - public static readonly RULE_inlinestatsCommand = 23; - public static readonly RULE_qualifiedName = 24; - public static readonly RULE_qualifiedNamePattern = 25; - public static readonly RULE_qualifiedNamePatterns = 26; - public static readonly RULE_identifier = 27; - public static readonly RULE_identifierPattern = 28; - public static readonly RULE_constant = 29; - public static readonly RULE_params = 30; - public static readonly RULE_limitCommand = 31; - public static readonly RULE_sortCommand = 32; - public static readonly RULE_orderExpression = 33; - public static readonly RULE_keepCommand = 34; - public static readonly RULE_dropCommand = 35; - public static readonly RULE_renameCommand = 36; - public static readonly RULE_renameClause = 37; - public static readonly RULE_dissectCommand = 38; - public static readonly RULE_grokCommand = 39; - public static readonly RULE_mvExpandCommand = 40; - public static readonly RULE_commandOptions = 41; - public static readonly RULE_commandOption = 42; - public static readonly RULE_booleanValue = 43; - public static readonly RULE_numericValue = 44; - public static readonly RULE_decimalValue = 45; - public static readonly RULE_integerValue = 46; - public static readonly RULE_string = 47; - public static readonly RULE_comparisonOperator = 48; - public static readonly RULE_explainCommand = 49; - public static readonly RULE_subqueryExpression = 50; - public static readonly RULE_showCommand = 51; - public static readonly RULE_metaCommand = 52; - public static readonly RULE_enrichCommand = 53; - public static readonly RULE_enrichWithClause = 54; - public static readonly RULE_lookupCommand = 55; - public static readonly literalNames: (string | null)[] = [ null, "'dissect'", - "'drop'", "'enrich'", - "'eval'", "'explain'", - "'from'", "'grok'", - "'inlinestats'", - "'keep'", "'limit'", - "'lookup'", - "'meta'", "'metrics'", - "'mv_expand'", - "'rename'", - "'row'", "'show'", - "'sort'", "'stats'", - "'where'", null, - null, null, - null, null, - null, null, - null, "'|'", - null, null, - null, "'by'", - "'and'", "'asc'", - "'='", "'::'", - "','", "'desc'", - "'.'", "'false'", - "'first'", "'last'", - "'('", "'in'", - "'is'", "'like'", - "'not'", "'null'", - "'nulls'", "'or'", - "'?'", "'rlike'", - "')'", "'true'", - "'=='", "'=~'", - "'!='", "'<'", - "'<='", "'>'", - "'>='", "'+'", - "'-'", "'*'", - "'/'", "'%'", - null, null, - "']'", null, - null, null, - null, null, - "'metadata'", - null, null, - null, null, - null, null, - null, "'as'", - null, null, - null, "'on'", - "'with'", null, - null, null, - null, null, - null, null, - null, null, - null, null, - null, null, - null, null, - null, "'info'", - null, null, - null, "'functions'", - null, null, + public static readonly RULE_indexPattern = 16; + public static readonly RULE_clusterString = 17; + public static readonly RULE_indexString = 18; + public static readonly RULE_metadata = 19; + public static readonly RULE_metadataOption = 20; + public static readonly RULE_deprecated_metadata = 21; + public static readonly RULE_metricsCommand = 22; + public static readonly RULE_evalCommand = 23; + public static readonly RULE_statsCommand = 24; + public static readonly RULE_inlinestatsCommand = 25; + public static readonly RULE_qualifiedName = 26; + public static readonly RULE_qualifiedNamePattern = 27; + public static readonly RULE_qualifiedNamePatterns = 28; + public static readonly RULE_identifier = 29; + public static readonly RULE_identifierPattern = 30; + public static readonly RULE_constant = 31; + public static readonly RULE_params = 32; + public static readonly RULE_limitCommand = 33; + public static readonly RULE_sortCommand = 34; + public static readonly RULE_orderExpression = 35; + public static readonly RULE_keepCommand = 36; + public static readonly RULE_dropCommand = 37; + public static readonly RULE_renameCommand = 38; + public static readonly RULE_renameClause = 39; + public static readonly RULE_dissectCommand = 40; + public static readonly RULE_grokCommand = 41; + public static readonly RULE_mvExpandCommand = 42; + public static readonly RULE_commandOptions = 43; + public static readonly RULE_commandOption = 44; + public static readonly RULE_booleanValue = 45; + public static readonly RULE_numericValue = 46; + public static readonly RULE_decimalValue = 47; + public static readonly RULE_integerValue = 48; + public static readonly RULE_string = 49; + public static readonly RULE_comparisonOperator = 50; + public static readonly RULE_explainCommand = 51; + public static readonly RULE_subqueryExpression = 52; + public static readonly RULE_showCommand = 53; + public static readonly RULE_metaCommand = 54; + public static readonly RULE_enrichCommand = 55; + public static readonly RULE_enrichWithClause = 56; + public static readonly RULE_lookupCommand = 57; + public static readonly literalNames: (string | null)[] = [ null, "'dissect'", + "'drop'", "'enrich'", + "'eval'", "'explain'", + "'from'", "'grok'", + "'inlinestats'", + "'keep'", "'limit'", + "'lookup'", + "'meta'", "'metrics'", + "'mv_expand'", + "'rename'", + "'row'", "'show'", + "'sort'", "'stats'", + "'where'", null, + null, null, + null, null, + null, null, + null, "'|'", + null, null, + null, "'by'", + "'and'", "'asc'", + "'='", "'::'", + "','", "'desc'", + "'.'", "'false'", + "'first'", "'last'", + "'('", "'in'", + "'is'", "'like'", + "'not'", "'null'", + "'nulls'", "'or'", + "'?'", "'rlike'", + "')'", "'true'", + "'=='", "'=~'", + "'!='", "'<'", + "'<='", "'>'", + "'>='", "'+'", + "'-'", "'*'", + "'/'", "'%'", + null, null, + "']'", null, + null, null, + null, null, + "'metadata'", + null, null, + null, null, + null, null, + null, "'as'", + null, null, + null, "'on'", + "'with'", null, + null, null, + null, null, + null, null, + null, null, + null, null, + null, null, + null, null, + null, "'info'", + null, null, + null, "'functions'", + null, null, null, "':'" ]; - public static readonly symbolicNames: (string | null)[] = [ null, "DISSECT", - "DROP", "ENRICH", - "EVAL", "EXPLAIN", - "FROM", "GROK", - "INLINESTATS", - "KEEP", "LIMIT", - "LOOKUP", "META", - "METRICS", - "MV_EXPAND", - "RENAME", "ROW", - "SHOW", "SORT", - "STATS", "WHERE", - "UNKNOWN_CMD", - "LINE_COMMENT", - "MULTILINE_COMMENT", - "WS", "INDEX_UNQUOTED_IDENTIFIER", - "EXPLAIN_WS", - "EXPLAIN_LINE_COMMENT", - "EXPLAIN_MULTILINE_COMMENT", - "PIPE", "QUOTED_STRING", - "INTEGER_LITERAL", - "DECIMAL_LITERAL", - "BY", "AND", - "ASC", "ASSIGN", - "CAST_OP", - "COMMA", "DESC", - "DOT", "FALSE", - "FIRST", "LAST", - "LP", "IN", - "IS", "LIKE", - "NOT", "NULL", - "NULLS", "OR", - "PARAM", "RLIKE", - "RP", "TRUE", - "EQ", "CIEQ", - "NEQ", "LT", - "LTE", "GT", - "GTE", "PLUS", - "MINUS", "ASTERISK", - "SLASH", "PERCENT", - "NAMED_OR_POSITIONAL_PARAM", - "OPENING_BRACKET", - "CLOSING_BRACKET", - "UNQUOTED_IDENTIFIER", - "QUOTED_IDENTIFIER", - "EXPR_LINE_COMMENT", - "EXPR_MULTILINE_COMMENT", - "EXPR_WS", - "METADATA", - "FROM_LINE_COMMENT", - "FROM_MULTILINE_COMMENT", - "FROM_WS", - "ID_PATTERN", - "PROJECT_LINE_COMMENT", - "PROJECT_MULTILINE_COMMENT", - "PROJECT_WS", - "AS", "RENAME_LINE_COMMENT", - "RENAME_MULTILINE_COMMENT", - "RENAME_WS", - "ON", "WITH", - "ENRICH_POLICY_NAME", - "ENRICH_LINE_COMMENT", - "ENRICH_MULTILINE_COMMENT", - "ENRICH_WS", - "ENRICH_FIELD_LINE_COMMENT", - "ENRICH_FIELD_MULTILINE_COMMENT", - "ENRICH_FIELD_WS", - "LOOKUP_LINE_COMMENT", - "LOOKUP_MULTILINE_COMMENT", - "LOOKUP_WS", - "LOOKUP_FIELD_LINE_COMMENT", - "LOOKUP_FIELD_MULTILINE_COMMENT", - "LOOKUP_FIELD_WS", - "MVEXPAND_LINE_COMMENT", - "MVEXPAND_MULTILINE_COMMENT", - "MVEXPAND_WS", - "INFO", "SHOW_LINE_COMMENT", - "SHOW_MULTILINE_COMMENT", - "SHOW_WS", - "FUNCTIONS", - "META_LINE_COMMENT", - "META_MULTILINE_COMMENT", - "META_WS", - "COLON", "SETTING", - "SETTING_LINE_COMMENT", - "SETTTING_MULTILINE_COMMENT", - "SETTING_WS", - "METRICS_LINE_COMMENT", - "METRICS_MULTILINE_COMMENT", - "METRICS_WS", - "CLOSING_METRICS_LINE_COMMENT", - "CLOSING_METRICS_MULTILINE_COMMENT", + public static readonly symbolicNames: (string | null)[] = [ null, "DISSECT", + "DROP", "ENRICH", + "EVAL", "EXPLAIN", + "FROM", "GROK", + "INLINESTATS", + "KEEP", "LIMIT", + "LOOKUP", "META", + "METRICS", + "MV_EXPAND", + "RENAME", "ROW", + "SHOW", "SORT", + "STATS", "WHERE", + "UNKNOWN_CMD", + "LINE_COMMENT", + "MULTILINE_COMMENT", + "WS", "UNQUOTED_SOURCE", + "EXPLAIN_WS", + "EXPLAIN_LINE_COMMENT", + "EXPLAIN_MULTILINE_COMMENT", + "PIPE", "QUOTED_STRING", + "INTEGER_LITERAL", + "DECIMAL_LITERAL", + "BY", "AND", + "ASC", "ASSIGN", + "CAST_OP", + "COMMA", "DESC", + "DOT", "FALSE", + "FIRST", "LAST", + "LP", "IN", + "IS", "LIKE", + "NOT", "NULL", + "NULLS", "OR", + "PARAM", "RLIKE", + "RP", "TRUE", + "EQ", "CIEQ", + "NEQ", "LT", + "LTE", "GT", + "GTE", "PLUS", + "MINUS", "ASTERISK", + "SLASH", "PERCENT", + "NAMED_OR_POSITIONAL_PARAM", + "OPENING_BRACKET", + "CLOSING_BRACKET", + "UNQUOTED_IDENTIFIER", + "QUOTED_IDENTIFIER", + "EXPR_LINE_COMMENT", + "EXPR_MULTILINE_COMMENT", + "EXPR_WS", + "METADATA", + "FROM_LINE_COMMENT", + "FROM_MULTILINE_COMMENT", + "FROM_WS", + "ID_PATTERN", + "PROJECT_LINE_COMMENT", + "PROJECT_MULTILINE_COMMENT", + "PROJECT_WS", + "AS", "RENAME_LINE_COMMENT", + "RENAME_MULTILINE_COMMENT", + "RENAME_WS", + "ON", "WITH", + "ENRICH_POLICY_NAME", + "ENRICH_LINE_COMMENT", + "ENRICH_MULTILINE_COMMENT", + "ENRICH_WS", + "ENRICH_FIELD_LINE_COMMENT", + "ENRICH_FIELD_MULTILINE_COMMENT", + "ENRICH_FIELD_WS", + "LOOKUP_LINE_COMMENT", + "LOOKUP_MULTILINE_COMMENT", + "LOOKUP_WS", + "LOOKUP_FIELD_LINE_COMMENT", + "LOOKUP_FIELD_MULTILINE_COMMENT", + "LOOKUP_FIELD_WS", + "MVEXPAND_LINE_COMMENT", + "MVEXPAND_MULTILINE_COMMENT", + "MVEXPAND_WS", + "INFO", "SHOW_LINE_COMMENT", + "SHOW_MULTILINE_COMMENT", + "SHOW_WS", + "FUNCTIONS", + "META_LINE_COMMENT", + "META_MULTILINE_COMMENT", + "META_WS", + "COLON", "SETTING", + "SETTING_LINE_COMMENT", + "SETTTING_MULTILINE_COMMENT", + "SETTING_WS", + "METRICS_LINE_COMMENT", + "METRICS_MULTILINE_COMMENT", + "METRICS_WS", + "CLOSING_METRICS_LINE_COMMENT", + "CLOSING_METRICS_MULTILINE_COMMENT", "CLOSING_METRICS_WS" ]; // tslint:disable:no-trailing-whitespace public static readonly ruleNames: string[] = [ - "singleStatement", "query", "sourceCommand", "processingCommand", "whereCommand", - "booleanExpression", "regexBooleanExpression", "valueExpression", "operatorExpression", - "primaryExpression", "functionExpression", "dataType", "rowCommand", "fields", - "field", "fromCommand", "indexIdentifier", "metadata", "metadataOption", - "deprecated_metadata", "metricsCommand", "evalCommand", "statsCommand", - "inlinestatsCommand", "qualifiedName", "qualifiedNamePattern", "qualifiedNamePatterns", - "identifier", "identifierPattern", "constant", "params", "limitCommand", - "sortCommand", "orderExpression", "keepCommand", "dropCommand", "renameCommand", - "renameClause", "dissectCommand", "grokCommand", "mvExpandCommand", "commandOptions", - "commandOption", "booleanValue", "numericValue", "decimalValue", "integerValue", - "string", "comparisonOperator", "explainCommand", "subqueryExpression", - "showCommand", "metaCommand", "enrichCommand", "enrichWithClause", "lookupCommand", + "singleStatement", "query", "sourceCommand", "processingCommand", "whereCommand", + "booleanExpression", "regexBooleanExpression", "valueExpression", "operatorExpression", + "primaryExpression", "functionExpression", "dataType", "rowCommand", "fields", + "field", "fromCommand", "indexPattern", "clusterString", "indexString", + "metadata", "metadataOption", "deprecated_metadata", "metricsCommand", + "evalCommand", "statsCommand", "inlinestatsCommand", "qualifiedName", + "qualifiedNamePattern", "qualifiedNamePatterns", "identifier", "identifierPattern", + "constant", "params", "limitCommand", "sortCommand", "orderExpression", + "keepCommand", "dropCommand", "renameCommand", "renameClause", "dissectCommand", + "grokCommand", "mvExpandCommand", "commandOptions", "commandOption", "booleanValue", + "numericValue", "decimalValue", "integerValue", "string", "comparisonOperator", + "explainCommand", "subqueryExpression", "showCommand", "metaCommand", + "enrichCommand", "enrichWithClause", "lookupCommand", ]; public get grammarFileName(): string { return "esql_parser.g4"; } public get literalNames(): (string | null)[] { return esql_parser.literalNames; } @@ -388,9 +391,9 @@ export default class esql_parser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 112; + this.state = 116; this.query(0); - this.state = 113; + this.state = 117; this.match(esql_parser.EOF); } } @@ -432,11 +435,11 @@ export default class esql_parser extends Parser { this._ctx = localctx; _prevctx = localctx; - this.state = 116; + this.state = 120; this.sourceCommand(); } this._ctx.stop = this._input.LT(-1); - this.state = 123; + this.state = 127; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 0, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { @@ -449,18 +452,18 @@ export default class esql_parser extends Parser { { localctx = new CompositeQueryContext(this, new QueryContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, esql_parser.RULE_query); - this.state = 118; + this.state = 122; if (!(this.precpred(this._ctx, 1))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 1)"); } - this.state = 119; + this.state = 123; this.match(esql_parser.PIPE); - this.state = 120; + this.state = 124; this.processingCommand(); } } } - this.state = 125; + this.state = 129; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 0, this._ctx); } @@ -485,48 +488,48 @@ export default class esql_parser extends Parser { let localctx: SourceCommandContext = new SourceCommandContext(this, this._ctx, this.state); this.enterRule(localctx, 4, esql_parser.RULE_sourceCommand); try { - this.state = 132; + this.state = 136; this._errHandler.sync(this); switch (this._input.LA(1)) { case 5: this.enterOuterAlt(localctx, 1); { - this.state = 126; + this.state = 130; this.explainCommand(); } break; case 6: this.enterOuterAlt(localctx, 2); { - this.state = 127; + this.state = 131; this.fromCommand(); } break; case 16: this.enterOuterAlt(localctx, 3); { - this.state = 128; + this.state = 132; this.rowCommand(); } break; case 13: this.enterOuterAlt(localctx, 4); { - this.state = 129; + this.state = 133; this.metricsCommand(); } break; case 17: this.enterOuterAlt(localctx, 5); { - this.state = 130; + this.state = 134; this.showCommand(); } break; case 12: this.enterOuterAlt(localctx, 6); { - this.state = 131; + this.state = 135; this.metaCommand(); } break; @@ -553,104 +556,104 @@ export default class esql_parser extends Parser { let localctx: ProcessingCommandContext = new ProcessingCommandContext(this, this._ctx, this.state); this.enterRule(localctx, 6, esql_parser.RULE_processingCommand); try { - this.state = 148; + this.state = 152; this._errHandler.sync(this); switch (this._input.LA(1)) { case 4: this.enterOuterAlt(localctx, 1); { - this.state = 134; + this.state = 138; this.evalCommand(); } break; case 8: this.enterOuterAlt(localctx, 2); { - this.state = 135; + this.state = 139; this.inlinestatsCommand(); } break; case 10: this.enterOuterAlt(localctx, 3); { - this.state = 136; + this.state = 140; this.limitCommand(); } break; case 11: this.enterOuterAlt(localctx, 4); { - this.state = 137; + this.state = 141; this.lookupCommand(); } break; case 9: this.enterOuterAlt(localctx, 5); { - this.state = 138; + this.state = 142; this.keepCommand(); } break; case 18: this.enterOuterAlt(localctx, 6); { - this.state = 139; + this.state = 143; this.sortCommand(); } break; case 19: this.enterOuterAlt(localctx, 7); { - this.state = 140; + this.state = 144; this.statsCommand(); } break; case 20: this.enterOuterAlt(localctx, 8); { - this.state = 141; + this.state = 145; this.whereCommand(); } break; case 2: this.enterOuterAlt(localctx, 9); { - this.state = 142; + this.state = 146; this.dropCommand(); } break; case 15: this.enterOuterAlt(localctx, 10); { - this.state = 143; + this.state = 147; this.renameCommand(); } break; case 1: this.enterOuterAlt(localctx, 11); { - this.state = 144; + this.state = 148; this.dissectCommand(); } break; case 7: this.enterOuterAlt(localctx, 12); { - this.state = 145; + this.state = 149; this.grokCommand(); } break; case 3: this.enterOuterAlt(localctx, 13); { - this.state = 146; + this.state = 150; this.enrichCommand(); } break; case 14: this.enterOuterAlt(localctx, 14); { - this.state = 147; + this.state = 151; this.mvExpandCommand(); } break; @@ -679,9 +682,9 @@ export default class esql_parser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 150; + this.state = 154; this.match(esql_parser.WHERE); - this.state = 151; + this.state = 155; this.booleanExpression(0); } } @@ -719,7 +722,7 @@ export default class esql_parser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 181; + this.state = 185; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 6, this._ctx) ) { case 1: @@ -728,9 +731,9 @@ export default class esql_parser extends Parser { this._ctx = localctx; _prevctx = localctx; - this.state = 154; + this.state = 158; this.match(esql_parser.NOT); - this.state = 155; + this.state = 159; this.booleanExpression(7); } break; @@ -739,7 +742,7 @@ export default class esql_parser extends Parser { localctx = new BooleanDefaultContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 156; + this.state = 160; this.valueExpression(); } break; @@ -748,7 +751,7 @@ export default class esql_parser extends Parser { localctx = new RegexExpressionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 157; + this.state = 161; this.regexBooleanExpression(); } break; @@ -757,41 +760,41 @@ export default class esql_parser extends Parser { localctx = new LogicalInContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 158; + this.state = 162; this.valueExpression(); - this.state = 160; + this.state = 164; this._errHandler.sync(this); _la = this._input.LA(1); if (_la===48) { { - this.state = 159; + this.state = 163; this.match(esql_parser.NOT); } } - this.state = 162; + this.state = 166; this.match(esql_parser.IN); - this.state = 163; + this.state = 167; this.match(esql_parser.LP); - this.state = 164; + this.state = 168; this.valueExpression(); - this.state = 169; + this.state = 173; this._errHandler.sync(this); _la = this._input.LA(1); while (_la===38) { { { - this.state = 165; + this.state = 169; this.match(esql_parser.COMMA); - this.state = 166; + this.state = 170; this.valueExpression(); } } - this.state = 171; + this.state = 175; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 172; + this.state = 176; this.match(esql_parser.RP); } break; @@ -800,27 +803,27 @@ export default class esql_parser extends Parser { localctx = new IsNullContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 174; + this.state = 178; this.valueExpression(); - this.state = 175; + this.state = 179; this.match(esql_parser.IS); - this.state = 177; + this.state = 181; this._errHandler.sync(this); _la = this._input.LA(1); if (_la===48) { { - this.state = 176; + this.state = 180; this.match(esql_parser.NOT); } } - this.state = 179; + this.state = 183; this.match(esql_parser.NULL); } break; } this._ctx.stop = this._input.LT(-1); - this.state = 191; + this.state = 195; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 8, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { @@ -830,7 +833,7 @@ export default class esql_parser extends Parser { } _prevctx = localctx; { - this.state = 189; + this.state = 193; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 7, this._ctx) ) { case 1: @@ -838,13 +841,13 @@ export default class esql_parser extends Parser { localctx = new LogicalBinaryContext(this, new BooleanExpressionContext(this, _parentctx, _parentState)); (localctx as LogicalBinaryContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, esql_parser.RULE_booleanExpression); - this.state = 183; + this.state = 187; if (!(this.precpred(this._ctx, 4))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 4)"); } - this.state = 184; + this.state = 188; (localctx as LogicalBinaryContext)._operator = this.match(esql_parser.AND); - this.state = 185; + this.state = 189; (localctx as LogicalBinaryContext)._right = this.booleanExpression(5); } break; @@ -853,20 +856,20 @@ export default class esql_parser extends Parser { localctx = new LogicalBinaryContext(this, new BooleanExpressionContext(this, _parentctx, _parentState)); (localctx as LogicalBinaryContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, esql_parser.RULE_booleanExpression); - this.state = 186; + this.state = 190; if (!(this.precpred(this._ctx, 3))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 3)"); } - this.state = 187; + this.state = 191; (localctx as LogicalBinaryContext)._operator = this.match(esql_parser.OR); - this.state = 188; + this.state = 192; (localctx as LogicalBinaryContext)._right = this.booleanExpression(4); } break; } } } - this.state = 193; + this.state = 197; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 8, this._ctx); } @@ -892,48 +895,48 @@ export default class esql_parser extends Parser { this.enterRule(localctx, 12, esql_parser.RULE_regexBooleanExpression); let _la: number; try { - this.state = 208; + this.state = 212; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 11, this._ctx) ) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 194; + this.state = 198; this.valueExpression(); - this.state = 196; + this.state = 200; this._errHandler.sync(this); _la = this._input.LA(1); if (_la===48) { { - this.state = 195; + this.state = 199; this.match(esql_parser.NOT); } } - this.state = 198; + this.state = 202; localctx._kind = this.match(esql_parser.LIKE); - this.state = 199; + this.state = 203; localctx._pattern = this.string_(); } break; case 2: this.enterOuterAlt(localctx, 2); { - this.state = 201; + this.state = 205; this.valueExpression(); - this.state = 203; + this.state = 207; this._errHandler.sync(this); _la = this._input.LA(1); if (_la===48) { { - this.state = 202; + this.state = 206; this.match(esql_parser.NOT); } } - this.state = 205; + this.state = 209; localctx._kind = this.match(esql_parser.RLIKE); - this.state = 206; + this.state = 210; localctx._pattern = this.string_(); } break; @@ -958,14 +961,14 @@ export default class esql_parser extends Parser { let localctx: ValueExpressionContext = new ValueExpressionContext(this, this._ctx, this.state); this.enterRule(localctx, 14, esql_parser.RULE_valueExpression); try { - this.state = 215; + this.state = 219; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 12, this._ctx) ) { case 1: localctx = new ValueExpressionDefaultContext(this, localctx); this.enterOuterAlt(localctx, 1); { - this.state = 210; + this.state = 214; this.operatorExpression(0); } break; @@ -973,11 +976,11 @@ export default class esql_parser extends Parser { localctx = new ComparisonContext(this, localctx); this.enterOuterAlt(localctx, 2); { - this.state = 211; + this.state = 215; (localctx as ComparisonContext)._left = this.operatorExpression(0); - this.state = 212; + this.state = 216; this.comparisonOperator(); - this.state = 213; + this.state = 217; (localctx as ComparisonContext)._right = this.operatorExpression(0); } break; @@ -1017,7 +1020,7 @@ export default class esql_parser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 221; + this.state = 225; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 13, this._ctx) ) { case 1: @@ -1026,7 +1029,7 @@ export default class esql_parser extends Parser { this._ctx = localctx; _prevctx = localctx; - this.state = 218; + this.state = 222; this.primaryExpression(0); } break; @@ -1035,7 +1038,7 @@ export default class esql_parser extends Parser { localctx = new ArithmeticUnaryContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 219; + this.state = 223; (localctx as ArithmeticUnaryContext)._operator = this._input.LT(1); _la = this._input.LA(1); if(!(_la===63 || _la===64)) { @@ -1045,13 +1048,13 @@ export default class esql_parser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 220; + this.state = 224; this.operatorExpression(3); } break; } this._ctx.stop = this._input.LT(-1); - this.state = 231; + this.state = 235; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 15, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { @@ -1061,7 +1064,7 @@ export default class esql_parser extends Parser { } _prevctx = localctx; { - this.state = 229; + this.state = 233; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 14, this._ctx) ) { case 1: @@ -1069,11 +1072,11 @@ export default class esql_parser extends Parser { localctx = new ArithmeticBinaryContext(this, new OperatorExpressionContext(this, _parentctx, _parentState)); (localctx as ArithmeticBinaryContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, esql_parser.RULE_operatorExpression); - this.state = 223; + this.state = 227; if (!(this.precpred(this._ctx, 2))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 2)"); } - this.state = 224; + this.state = 228; (localctx as ArithmeticBinaryContext)._operator = this._input.LT(1); _la = this._input.LA(1); if(!(((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & 7) !== 0))) { @@ -1083,7 +1086,7 @@ export default class esql_parser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 225; + this.state = 229; (localctx as ArithmeticBinaryContext)._right = this.operatorExpression(3); } break; @@ -1092,11 +1095,11 @@ export default class esql_parser extends Parser { localctx = new ArithmeticBinaryContext(this, new OperatorExpressionContext(this, _parentctx, _parentState)); (localctx as ArithmeticBinaryContext)._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, esql_parser.RULE_operatorExpression); - this.state = 226; + this.state = 230; if (!(this.precpred(this._ctx, 1))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 1)"); } - this.state = 227; + this.state = 231; (localctx as ArithmeticBinaryContext)._operator = this._input.LT(1); _la = this._input.LA(1); if(!(_la===63 || _la===64)) { @@ -1106,14 +1109,14 @@ export default class esql_parser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 228; + this.state = 232; (localctx as ArithmeticBinaryContext)._right = this.operatorExpression(2); } break; } } } - this.state = 233; + this.state = 237; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 15, this._ctx); } @@ -1152,7 +1155,7 @@ export default class esql_parser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 242; + this.state = 246; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 16, this._ctx) ) { case 1: @@ -1161,7 +1164,7 @@ export default class esql_parser extends Parser { this._ctx = localctx; _prevctx = localctx; - this.state = 235; + this.state = 239; this.constant(); } break; @@ -1170,7 +1173,7 @@ export default class esql_parser extends Parser { localctx = new DereferenceContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 236; + this.state = 240; this.qualifiedName(); } break; @@ -1179,7 +1182,7 @@ export default class esql_parser extends Parser { localctx = new FunctionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 237; + this.state = 241; this.functionExpression(); } break; @@ -1188,17 +1191,17 @@ export default class esql_parser extends Parser { localctx = new ParenthesizedExpressionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 238; + this.state = 242; this.match(esql_parser.LP); - this.state = 239; + this.state = 243; this.booleanExpression(0); - this.state = 240; + this.state = 244; this.match(esql_parser.RP); } break; } this._ctx.stop = this._input.LT(-1); - this.state = 249; + this.state = 253; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 17, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { @@ -1211,18 +1214,18 @@ export default class esql_parser extends Parser { { localctx = new InlineCastContext(this, new PrimaryExpressionContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, esql_parser.RULE_primaryExpression); - this.state = 244; + this.state = 248; if (!(this.precpred(this._ctx, 1))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 1)"); } - this.state = 245; + this.state = 249; this.match(esql_parser.CAST_OP); - this.state = 246; + this.state = 250; this.dataType(); } } } - this.state = 251; + this.state = 255; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 17, this._ctx); } @@ -1250,16 +1253,16 @@ export default class esql_parser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 252; + this.state = 256; this.identifier(); - this.state = 253; + this.state = 257; this.match(esql_parser.LP); - this.state = 263; + this.state = 267; this._errHandler.sync(this); switch (this._input.LA(1)) { case 65: { - this.state = 254; + this.state = 258; this.match(esql_parser.ASTERISK); } break; @@ -1280,21 +1283,21 @@ export default class esql_parser extends Parser { case 72: { { - this.state = 255; + this.state = 259; this.booleanExpression(0); - this.state = 260; + this.state = 264; this._errHandler.sync(this); _la = this._input.LA(1); while (_la===38) { { { - this.state = 256; + this.state = 260; this.match(esql_parser.COMMA); - this.state = 257; + this.state = 261; this.booleanExpression(0); } } - this.state = 262; + this.state = 266; this._errHandler.sync(this); _la = this._input.LA(1); } @@ -1306,7 +1309,7 @@ export default class esql_parser extends Parser { default: break; } - this.state = 265; + this.state = 269; this.match(esql_parser.RP); } } @@ -1332,7 +1335,7 @@ export default class esql_parser extends Parser { localctx = new ToDataTypeContext(this, localctx); this.enterOuterAlt(localctx, 1); { - this.state = 267; + this.state = 271; this.identifier(); } } @@ -1357,9 +1360,9 @@ export default class esql_parser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 269; + this.state = 273; this.match(esql_parser.ROW); - this.state = 270; + this.state = 274; this.fields(); } } @@ -1385,23 +1388,23 @@ export default class esql_parser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 272; + this.state = 276; this.field(); - this.state = 277; + this.state = 281; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 20, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 273; + this.state = 277; this.match(esql_parser.COMMA); - this.state = 274; + this.state = 278; this.field(); } } } - this.state = 279; + this.state = 283; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 20, this._ctx); } @@ -1426,24 +1429,24 @@ export default class esql_parser extends Parser { let localctx: FieldContext = new FieldContext(this, this._ctx, this.state); this.enterRule(localctx, 28, esql_parser.RULE_field); try { - this.state = 285; + this.state = 289; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 21, this._ctx) ) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 280; + this.state = 284; this.booleanExpression(0); } break; case 2: this.enterOuterAlt(localctx, 2); { - this.state = 281; + this.state = 285; this.qualifiedName(); - this.state = 282; + this.state = 286; this.match(esql_parser.ASSIGN); - this.state = 283; + this.state = 287; this.booleanExpression(0); } break; @@ -1471,34 +1474,34 @@ export default class esql_parser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 287; + this.state = 291; this.match(esql_parser.FROM); - this.state = 288; - this.indexIdentifier(); - this.state = 293; + this.state = 292; + this.indexPattern(); + this.state = 297; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 22, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 289; + this.state = 293; this.match(esql_parser.COMMA); - this.state = 290; - this.indexIdentifier(); + this.state = 294; + this.indexPattern(); } } } - this.state = 295; + this.state = 299; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 22, this._ctx); } - this.state = 297; + this.state = 301; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 23, this._ctx) ) { case 1: { - this.state = 296; + this.state = 300; this.metadata(); } break; @@ -1520,14 +1523,89 @@ export default class esql_parser extends Parser { return localctx; } // @RuleVersion(0) - public indexIdentifier(): IndexIdentifierContext { - let localctx: IndexIdentifierContext = new IndexIdentifierContext(this, this._ctx, this.state); - this.enterRule(localctx, 32, esql_parser.RULE_indexIdentifier); + public indexPattern(): IndexPatternContext { + let localctx: IndexPatternContext = new IndexPatternContext(this, this._ctx, this.state); + this.enterRule(localctx, 32, esql_parser.RULE_indexPattern); + try { + this.state = 308; + this._errHandler.sync(this); + switch ( this._interp.adaptivePredict(this._input, 24, this._ctx) ) { + case 1: + this.enterOuterAlt(localctx, 1); + { + this.state = 303; + this.clusterString(); + this.state = 304; + this.match(esql_parser.COLON); + this.state = 305; + this.indexString(); + } + break; + case 2: + this.enterOuterAlt(localctx, 2); + { + this.state = 307; + this.indexString(); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localctx; + } + // @RuleVersion(0) + public clusterString(): ClusterStringContext { + let localctx: ClusterStringContext = new ClusterStringContext(this, this._ctx, this.state); + this.enterRule(localctx, 34, esql_parser.RULE_clusterString); try { this.enterOuterAlt(localctx, 1); { - this.state = 299; - this.match(esql_parser.INDEX_UNQUOTED_IDENTIFIER); + this.state = 310; + this.match(esql_parser.UNQUOTED_SOURCE); + } + } + catch (re) { + if (re instanceof RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localctx; + } + // @RuleVersion(0) + public indexString(): IndexStringContext { + let localctx: IndexStringContext = new IndexStringContext(this, this._ctx, this.state); + this.enterRule(localctx, 36, esql_parser.RULE_indexString); + let _la: number; + try { + this.enterOuterAlt(localctx, 1); + { + this.state = 312; + _la = this._input.LA(1); + if(!(_la===25 || _la===30)) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } } } catch (re) { @@ -1547,22 +1625,22 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public metadata(): MetadataContext { let localctx: MetadataContext = new MetadataContext(this, this._ctx, this.state); - this.enterRule(localctx, 34, esql_parser.RULE_metadata); + this.enterRule(localctx, 38, esql_parser.RULE_metadata); try { - this.state = 303; + this.state = 316; this._errHandler.sync(this); switch (this._input.LA(1)) { case 76: this.enterOuterAlt(localctx, 1); { - this.state = 301; + this.state = 314; this.metadataOption(); } break; case 69: this.enterOuterAlt(localctx, 2); { - this.state = 302; + this.state = 315; this.deprecated_metadata(); } break; @@ -1587,32 +1665,32 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public metadataOption(): MetadataOptionContext { let localctx: MetadataOptionContext = new MetadataOptionContext(this, this._ctx, this.state); - this.enterRule(localctx, 36, esql_parser.RULE_metadataOption); + this.enterRule(localctx, 40, esql_parser.RULE_metadataOption); try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 305; + this.state = 318; this.match(esql_parser.METADATA); - this.state = 306; - this.indexIdentifier(); - this.state = 311; + this.state = 319; + this.match(esql_parser.UNQUOTED_SOURCE); + this.state = 324; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 25, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 26, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 307; + this.state = 320; this.match(esql_parser.COMMA); - this.state = 308; - this.indexIdentifier(); + this.state = 321; + this.match(esql_parser.UNQUOTED_SOURCE); } } } - this.state = 313; + this.state = 326; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 25, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 26, this._ctx); } } } @@ -1633,15 +1711,15 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public deprecated_metadata(): Deprecated_metadataContext { let localctx: Deprecated_metadataContext = new Deprecated_metadataContext(this, this._ctx, this.state); - this.enterRule(localctx, 38, esql_parser.RULE_deprecated_metadata); + this.enterRule(localctx, 42, esql_parser.RULE_deprecated_metadata); try { this.enterOuterAlt(localctx, 1); { - this.state = 314; + this.state = 327; this.match(esql_parser.OPENING_BRACKET); - this.state = 315; + this.state = 328; this.metadataOption(); - this.state = 316; + this.state = 329; this.match(esql_parser.CLOSING_BRACKET); } } @@ -1662,51 +1740,51 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public metricsCommand(): MetricsCommandContext { let localctx: MetricsCommandContext = new MetricsCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 40, esql_parser.RULE_metricsCommand); + this.enterRule(localctx, 44, esql_parser.RULE_metricsCommand); try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 318; + this.state = 331; this.match(esql_parser.METRICS); - this.state = 319; - this.indexIdentifier(); - this.state = 324; + this.state = 332; + this.indexPattern(); + this.state = 337; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 26, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 27, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 320; + this.state = 333; this.match(esql_parser.COMMA); - this.state = 321; - this.indexIdentifier(); + this.state = 334; + this.indexPattern(); } } } - this.state = 326; + this.state = 339; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 26, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 27, this._ctx); } - this.state = 328; + this.state = 341; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 27, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 28, this._ctx) ) { case 1: { - this.state = 327; + this.state = 340; localctx._aggregates = this.fields(); } break; } - this.state = 332; + this.state = 345; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 28, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 29, this._ctx) ) { case 1: { - this.state = 330; + this.state = 343; this.match(esql_parser.BY); - this.state = 331; + this.state = 344; localctx._grouping = this.fields(); } break; @@ -1730,13 +1808,13 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public evalCommand(): EvalCommandContext { let localctx: EvalCommandContext = new EvalCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 42, esql_parser.RULE_evalCommand); + this.enterRule(localctx, 46, esql_parser.RULE_evalCommand); try { this.enterOuterAlt(localctx, 1); { - this.state = 334; + this.state = 347; this.match(esql_parser.EVAL); - this.state = 335; + this.state = 348; this.fields(); } } @@ -1757,30 +1835,30 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public statsCommand(): StatsCommandContext { let localctx: StatsCommandContext = new StatsCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 44, esql_parser.RULE_statsCommand); + this.enterRule(localctx, 48, esql_parser.RULE_statsCommand); try { this.enterOuterAlt(localctx, 1); { - this.state = 337; + this.state = 350; this.match(esql_parser.STATS); - this.state = 339; + this.state = 352; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 29, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 30, this._ctx) ) { case 1: { - this.state = 338; + this.state = 351; localctx._stats = this.fields(); } break; } - this.state = 343; + this.state = 356; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 30, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 31, this._ctx) ) { case 1: { - this.state = 341; + this.state = 354; this.match(esql_parser.BY); - this.state = 342; + this.state = 355; localctx._grouping = this.fields(); } break; @@ -1804,22 +1882,22 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public inlinestatsCommand(): InlinestatsCommandContext { let localctx: InlinestatsCommandContext = new InlinestatsCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 46, esql_parser.RULE_inlinestatsCommand); + this.enterRule(localctx, 50, esql_parser.RULE_inlinestatsCommand); try { this.enterOuterAlt(localctx, 1); { - this.state = 345; + this.state = 358; this.match(esql_parser.INLINESTATS); - this.state = 346; + this.state = 359; localctx._stats = this.fields(); - this.state = 349; + this.state = 362; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 31, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 32, this._ctx) ) { case 1: { - this.state = 347; + this.state = 360; this.match(esql_parser.BY); - this.state = 348; + this.state = 361; localctx._grouping = this.fields(); } break; @@ -1843,30 +1921,30 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public qualifiedName(): QualifiedNameContext { let localctx: QualifiedNameContext = new QualifiedNameContext(this, this._ctx, this.state); - this.enterRule(localctx, 48, esql_parser.RULE_qualifiedName); + this.enterRule(localctx, 52, esql_parser.RULE_qualifiedName); try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 351; + this.state = 364; this.identifier(); - this.state = 356; + this.state = 369; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 32, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 33, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 352; + this.state = 365; this.match(esql_parser.DOT); - this.state = 353; + this.state = 366; this.identifier(); } } } - this.state = 358; + this.state = 371; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 32, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 33, this._ctx); } } } @@ -1887,30 +1965,30 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public qualifiedNamePattern(): QualifiedNamePatternContext { let localctx: QualifiedNamePatternContext = new QualifiedNamePatternContext(this, this._ctx, this.state); - this.enterRule(localctx, 50, esql_parser.RULE_qualifiedNamePattern); + this.enterRule(localctx, 54, esql_parser.RULE_qualifiedNamePattern); try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 359; + this.state = 372; this.identifierPattern(); - this.state = 364; + this.state = 377; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 33, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 34, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 360; + this.state = 373; this.match(esql_parser.DOT); - this.state = 361; + this.state = 374; this.identifierPattern(); } } } - this.state = 366; + this.state = 379; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 33, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 34, this._ctx); } } } @@ -1931,30 +2009,30 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public qualifiedNamePatterns(): QualifiedNamePatternsContext { let localctx: QualifiedNamePatternsContext = new QualifiedNamePatternsContext(this, this._ctx, this.state); - this.enterRule(localctx, 52, esql_parser.RULE_qualifiedNamePatterns); + this.enterRule(localctx, 56, esql_parser.RULE_qualifiedNamePatterns); try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 367; + this.state = 380; this.qualifiedNamePattern(); - this.state = 372; + this.state = 385; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 34, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 35, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 368; + this.state = 381; this.match(esql_parser.COMMA); - this.state = 369; + this.state = 382; this.qualifiedNamePattern(); } } } - this.state = 374; + this.state = 387; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 34, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 35, this._ctx); } } } @@ -1975,12 +2053,12 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public identifier(): IdentifierContext { let localctx: IdentifierContext = new IdentifierContext(this, this._ctx, this.state); - this.enterRule(localctx, 54, esql_parser.RULE_identifier); + this.enterRule(localctx, 58, esql_parser.RULE_identifier); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 375; + this.state = 388; _la = this._input.LA(1); if(!(_la===71 || _la===72)) { this._errHandler.recoverInline(this); @@ -2008,11 +2086,11 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public identifierPattern(): IdentifierPatternContext { let localctx: IdentifierPatternContext = new IdentifierPatternContext(this, this._ctx, this.state); - this.enterRule(localctx, 56, esql_parser.RULE_identifierPattern); + this.enterRule(localctx, 60, esql_parser.RULE_identifierPattern); try { this.enterOuterAlt(localctx, 1); { - this.state = 377; + this.state = 390; this.match(esql_parser.ID_PATTERN); } } @@ -2033,17 +2111,17 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public constant(): ConstantContext { let localctx: ConstantContext = new ConstantContext(this, this._ctx, this.state); - this.enterRule(localctx, 58, esql_parser.RULE_constant); + this.enterRule(localctx, 62, esql_parser.RULE_constant); let _la: number; try { - this.state = 421; + this.state = 434; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 38, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 39, this._ctx) ) { case 1: localctx = new NullLiteralContext(this, localctx); this.enterOuterAlt(localctx, 1); { - this.state = 379; + this.state = 392; this.match(esql_parser.NULL); } break; @@ -2051,9 +2129,9 @@ export default class esql_parser extends Parser { localctx = new QualifiedIntegerLiteralContext(this, localctx); this.enterOuterAlt(localctx, 2); { - this.state = 380; + this.state = 393; this.integerValue(); - this.state = 381; + this.state = 394; this.match(esql_parser.UNQUOTED_IDENTIFIER); } break; @@ -2061,7 +2139,7 @@ export default class esql_parser extends Parser { localctx = new DecimalLiteralContext(this, localctx); this.enterOuterAlt(localctx, 3); { - this.state = 383; + this.state = 396; this.decimalValue(); } break; @@ -2069,7 +2147,7 @@ export default class esql_parser extends Parser { localctx = new IntegerLiteralContext(this, localctx); this.enterOuterAlt(localctx, 4); { - this.state = 384; + this.state = 397; this.integerValue(); } break; @@ -2077,7 +2155,7 @@ export default class esql_parser extends Parser { localctx = new BooleanLiteralContext(this, localctx); this.enterOuterAlt(localctx, 5); { - this.state = 385; + this.state = 398; this.booleanValue(); } break; @@ -2085,7 +2163,7 @@ export default class esql_parser extends Parser { localctx = new InputParamsContext(this, localctx); this.enterOuterAlt(localctx, 6); { - this.state = 386; + this.state = 399; this.params(); } break; @@ -2093,7 +2171,7 @@ export default class esql_parser extends Parser { localctx = new StringLiteralContext(this, localctx); this.enterOuterAlt(localctx, 7); { - this.state = 387; + this.state = 400; this.string_(); } break; @@ -2101,27 +2179,27 @@ export default class esql_parser extends Parser { localctx = new NumericArrayLiteralContext(this, localctx); this.enterOuterAlt(localctx, 8); { - this.state = 388; + this.state = 401; this.match(esql_parser.OPENING_BRACKET); - this.state = 389; + this.state = 402; this.numericValue(); - this.state = 394; + this.state = 407; this._errHandler.sync(this); _la = this._input.LA(1); while (_la===38) { { { - this.state = 390; + this.state = 403; this.match(esql_parser.COMMA); - this.state = 391; + this.state = 404; this.numericValue(); } } - this.state = 396; + this.state = 409; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 397; + this.state = 410; this.match(esql_parser.CLOSING_BRACKET); } break; @@ -2129,27 +2207,27 @@ export default class esql_parser extends Parser { localctx = new BooleanArrayLiteralContext(this, localctx); this.enterOuterAlt(localctx, 9); { - this.state = 399; + this.state = 412; this.match(esql_parser.OPENING_BRACKET); - this.state = 400; + this.state = 413; this.booleanValue(); - this.state = 405; + this.state = 418; this._errHandler.sync(this); _la = this._input.LA(1); while (_la===38) { { { - this.state = 401; + this.state = 414; this.match(esql_parser.COMMA); - this.state = 402; + this.state = 415; this.booleanValue(); } } - this.state = 407; + this.state = 420; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 408; + this.state = 421; this.match(esql_parser.CLOSING_BRACKET); } break; @@ -2157,27 +2235,27 @@ export default class esql_parser extends Parser { localctx = new StringArrayLiteralContext(this, localctx); this.enterOuterAlt(localctx, 10); { - this.state = 410; + this.state = 423; this.match(esql_parser.OPENING_BRACKET); - this.state = 411; + this.state = 424; this.string_(); - this.state = 416; + this.state = 429; this._errHandler.sync(this); _la = this._input.LA(1); while (_la===38) { { { - this.state = 412; + this.state = 425; this.match(esql_parser.COMMA); - this.state = 413; + this.state = 426; this.string_(); } } - this.state = 418; + this.state = 431; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 419; + this.state = 432; this.match(esql_parser.CLOSING_BRACKET); } break; @@ -2200,16 +2278,16 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public params(): ParamsContext { let localctx: ParamsContext = new ParamsContext(this, this._ctx, this.state); - this.enterRule(localctx, 60, esql_parser.RULE_params); + this.enterRule(localctx, 64, esql_parser.RULE_params); try { - this.state = 425; + this.state = 438; this._errHandler.sync(this); switch (this._input.LA(1)) { case 52: localctx = new InputParamContext(this, localctx); this.enterOuterAlt(localctx, 1); { - this.state = 423; + this.state = 436; this.match(esql_parser.PARAM); } break; @@ -2217,7 +2295,7 @@ export default class esql_parser extends Parser { localctx = new InputNamedOrPositionalParamContext(this, localctx); this.enterOuterAlt(localctx, 2); { - this.state = 424; + this.state = 437; this.match(esql_parser.NAMED_OR_POSITIONAL_PARAM); } break; @@ -2242,13 +2320,13 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public limitCommand(): LimitCommandContext { let localctx: LimitCommandContext = new LimitCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 62, esql_parser.RULE_limitCommand); + this.enterRule(localctx, 66, esql_parser.RULE_limitCommand); try { this.enterOuterAlt(localctx, 1); { - this.state = 427; + this.state = 440; this.match(esql_parser.LIMIT); - this.state = 428; + this.state = 441; this.match(esql_parser.INTEGER_LITERAL); } } @@ -2269,32 +2347,32 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public sortCommand(): SortCommandContext { let localctx: SortCommandContext = new SortCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 64, esql_parser.RULE_sortCommand); + this.enterRule(localctx, 68, esql_parser.RULE_sortCommand); try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 430; + this.state = 443; this.match(esql_parser.SORT); - this.state = 431; + this.state = 444; this.orderExpression(); - this.state = 436; + this.state = 449; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 40, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 41, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 432; + this.state = 445; this.match(esql_parser.COMMA); - this.state = 433; + this.state = 446; this.orderExpression(); } } } - this.state = 438; + this.state = 451; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 40, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 41, this._ctx); } } } @@ -2315,19 +2393,19 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public orderExpression(): OrderExpressionContext { let localctx: OrderExpressionContext = new OrderExpressionContext(this, this._ctx, this.state); - this.enterRule(localctx, 66, esql_parser.RULE_orderExpression); + this.enterRule(localctx, 70, esql_parser.RULE_orderExpression); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 439; + this.state = 452; this.booleanExpression(0); - this.state = 441; + this.state = 454; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 41, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 42, this._ctx) ) { case 1: { - this.state = 440; + this.state = 453; localctx._ordering = this._input.LT(1); _la = this._input.LA(1); if(!(_la===35 || _la===39)) { @@ -2340,14 +2418,14 @@ export default class esql_parser extends Parser { } break; } - this.state = 445; + this.state = 458; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 42, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 43, this._ctx) ) { case 1: { - this.state = 443; + this.state = 456; this.match(esql_parser.NULLS); - this.state = 444; + this.state = 457; localctx._nullOrdering = this._input.LT(1); _la = this._input.LA(1); if(!(_la===42 || _la===43)) { @@ -2379,13 +2457,13 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public keepCommand(): KeepCommandContext { let localctx: KeepCommandContext = new KeepCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 68, esql_parser.RULE_keepCommand); + this.enterRule(localctx, 72, esql_parser.RULE_keepCommand); try { this.enterOuterAlt(localctx, 1); { - this.state = 447; + this.state = 460; this.match(esql_parser.KEEP); - this.state = 448; + this.state = 461; this.qualifiedNamePatterns(); } } @@ -2406,13 +2484,13 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public dropCommand(): DropCommandContext { let localctx: DropCommandContext = new DropCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 70, esql_parser.RULE_dropCommand); + this.enterRule(localctx, 74, esql_parser.RULE_dropCommand); try { this.enterOuterAlt(localctx, 1); { - this.state = 450; + this.state = 463; this.match(esql_parser.DROP); - this.state = 451; + this.state = 464; this.qualifiedNamePatterns(); } } @@ -2433,32 +2511,32 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public renameCommand(): RenameCommandContext { let localctx: RenameCommandContext = new RenameCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 72, esql_parser.RULE_renameCommand); + this.enterRule(localctx, 76, esql_parser.RULE_renameCommand); try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 453; + this.state = 466; this.match(esql_parser.RENAME); - this.state = 454; + this.state = 467; this.renameClause(); - this.state = 459; + this.state = 472; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 43, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 44, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 455; + this.state = 468; this.match(esql_parser.COMMA); - this.state = 456; + this.state = 469; this.renameClause(); } } } - this.state = 461; + this.state = 474; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 43, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 44, this._ctx); } } } @@ -2479,15 +2557,15 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public renameClause(): RenameClauseContext { let localctx: RenameClauseContext = new RenameClauseContext(this, this._ctx, this.state); - this.enterRule(localctx, 74, esql_parser.RULE_renameClause); + this.enterRule(localctx, 78, esql_parser.RULE_renameClause); try { this.enterOuterAlt(localctx, 1); { - this.state = 462; + this.state = 475; localctx._oldName = this.qualifiedNamePattern(); - this.state = 463; + this.state = 476; this.match(esql_parser.AS); - this.state = 464; + this.state = 477; localctx._newName = this.qualifiedNamePattern(); } } @@ -2508,22 +2586,22 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public dissectCommand(): DissectCommandContext { let localctx: DissectCommandContext = new DissectCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 76, esql_parser.RULE_dissectCommand); + this.enterRule(localctx, 80, esql_parser.RULE_dissectCommand); try { this.enterOuterAlt(localctx, 1); { - this.state = 466; + this.state = 479; this.match(esql_parser.DISSECT); - this.state = 467; + this.state = 480; this.primaryExpression(0); - this.state = 468; + this.state = 481; this.string_(); - this.state = 470; + this.state = 483; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 44, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 45, this._ctx) ) { case 1: { - this.state = 469; + this.state = 482; this.commandOptions(); } break; @@ -2547,15 +2625,15 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public grokCommand(): GrokCommandContext { let localctx: GrokCommandContext = new GrokCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 78, esql_parser.RULE_grokCommand); + this.enterRule(localctx, 82, esql_parser.RULE_grokCommand); try { this.enterOuterAlt(localctx, 1); { - this.state = 472; + this.state = 485; this.match(esql_parser.GROK); - this.state = 473; + this.state = 486; this.primaryExpression(0); - this.state = 474; + this.state = 487; this.string_(); } } @@ -2576,13 +2654,13 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public mvExpandCommand(): MvExpandCommandContext { let localctx: MvExpandCommandContext = new MvExpandCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 80, esql_parser.RULE_mvExpandCommand); + this.enterRule(localctx, 84, esql_parser.RULE_mvExpandCommand); try { this.enterOuterAlt(localctx, 1); { - this.state = 476; + this.state = 489; this.match(esql_parser.MV_EXPAND); - this.state = 477; + this.state = 490; this.qualifiedName(); } } @@ -2603,30 +2681,30 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public commandOptions(): CommandOptionsContext { let localctx: CommandOptionsContext = new CommandOptionsContext(this, this._ctx, this.state); - this.enterRule(localctx, 82, esql_parser.RULE_commandOptions); + this.enterRule(localctx, 86, esql_parser.RULE_commandOptions); try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 479; + this.state = 492; this.commandOption(); - this.state = 484; + this.state = 497; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 45, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 46, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 480; + this.state = 493; this.match(esql_parser.COMMA); - this.state = 481; + this.state = 494; this.commandOption(); } } } - this.state = 486; + this.state = 499; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 45, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 46, this._ctx); } } } @@ -2647,15 +2725,15 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public commandOption(): CommandOptionContext { let localctx: CommandOptionContext = new CommandOptionContext(this, this._ctx, this.state); - this.enterRule(localctx, 84, esql_parser.RULE_commandOption); + this.enterRule(localctx, 88, esql_parser.RULE_commandOption); try { this.enterOuterAlt(localctx, 1); { - this.state = 487; + this.state = 500; this.identifier(); - this.state = 488; + this.state = 501; this.match(esql_parser.ASSIGN); - this.state = 489; + this.state = 502; this.constant(); } } @@ -2676,12 +2754,12 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public booleanValue(): BooleanValueContext { let localctx: BooleanValueContext = new BooleanValueContext(this, this._ctx, this.state); - this.enterRule(localctx, 86, esql_parser.RULE_booleanValue); + this.enterRule(localctx, 90, esql_parser.RULE_booleanValue); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 491; + this.state = 504; _la = this._input.LA(1); if(!(_la===41 || _la===55)) { this._errHandler.recoverInline(this); @@ -2709,22 +2787,22 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public numericValue(): NumericValueContext { let localctx: NumericValueContext = new NumericValueContext(this, this._ctx, this.state); - this.enterRule(localctx, 88, esql_parser.RULE_numericValue); + this.enterRule(localctx, 92, esql_parser.RULE_numericValue); try { - this.state = 495; + this.state = 508; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 46, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 47, this._ctx) ) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 493; + this.state = 506; this.decimalValue(); } break; case 2: this.enterOuterAlt(localctx, 2); { - this.state = 494; + this.state = 507; this.integerValue(); } break; @@ -2747,17 +2825,17 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public decimalValue(): DecimalValueContext { let localctx: DecimalValueContext = new DecimalValueContext(this, this._ctx, this.state); - this.enterRule(localctx, 90, esql_parser.RULE_decimalValue); + this.enterRule(localctx, 94, esql_parser.RULE_decimalValue); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 498; + this.state = 511; this._errHandler.sync(this); _la = this._input.LA(1); if (_la===63 || _la===64) { { - this.state = 497; + this.state = 510; _la = this._input.LA(1); if(!(_la===63 || _la===64)) { this._errHandler.recoverInline(this); @@ -2769,7 +2847,7 @@ export default class esql_parser extends Parser { } } - this.state = 500; + this.state = 513; this.match(esql_parser.DECIMAL_LITERAL); } } @@ -2790,17 +2868,17 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public integerValue(): IntegerValueContext { let localctx: IntegerValueContext = new IntegerValueContext(this, this._ctx, this.state); - this.enterRule(localctx, 92, esql_parser.RULE_integerValue); + this.enterRule(localctx, 96, esql_parser.RULE_integerValue); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 503; + this.state = 516; this._errHandler.sync(this); _la = this._input.LA(1); if (_la===63 || _la===64) { { - this.state = 502; + this.state = 515; _la = this._input.LA(1); if(!(_la===63 || _la===64)) { this._errHandler.recoverInline(this); @@ -2812,7 +2890,7 @@ export default class esql_parser extends Parser { } } - this.state = 505; + this.state = 518; this.match(esql_parser.INTEGER_LITERAL); } } @@ -2833,11 +2911,11 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public string_(): StringContext { let localctx: StringContext = new StringContext(this, this._ctx, this.state); - this.enterRule(localctx, 94, esql_parser.RULE_string); + this.enterRule(localctx, 98, esql_parser.RULE_string); try { this.enterOuterAlt(localctx, 1); { - this.state = 507; + this.state = 520; this.match(esql_parser.QUOTED_STRING); } } @@ -2858,12 +2936,12 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public comparisonOperator(): ComparisonOperatorContext { let localctx: ComparisonOperatorContext = new ComparisonOperatorContext(this, this._ctx, this.state); - this.enterRule(localctx, 96, esql_parser.RULE_comparisonOperator); + this.enterRule(localctx, 100, esql_parser.RULE_comparisonOperator); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 509; + this.state = 522; _la = this._input.LA(1); if(!(((((_la - 56)) & ~0x1F) === 0 && ((1 << (_la - 56)) & 125) !== 0))) { this._errHandler.recoverInline(this); @@ -2891,13 +2969,13 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public explainCommand(): ExplainCommandContext { let localctx: ExplainCommandContext = new ExplainCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 98, esql_parser.RULE_explainCommand); + this.enterRule(localctx, 102, esql_parser.RULE_explainCommand); try { this.enterOuterAlt(localctx, 1); { - this.state = 511; + this.state = 524; this.match(esql_parser.EXPLAIN); - this.state = 512; + this.state = 525; this.subqueryExpression(); } } @@ -2918,15 +2996,15 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public subqueryExpression(): SubqueryExpressionContext { let localctx: SubqueryExpressionContext = new SubqueryExpressionContext(this, this._ctx, this.state); - this.enterRule(localctx, 100, esql_parser.RULE_subqueryExpression); + this.enterRule(localctx, 104, esql_parser.RULE_subqueryExpression); try { this.enterOuterAlt(localctx, 1); { - this.state = 514; + this.state = 527; this.match(esql_parser.OPENING_BRACKET); - this.state = 515; + this.state = 528; this.query(0); - this.state = 516; + this.state = 529; this.match(esql_parser.CLOSING_BRACKET); } } @@ -2947,14 +3025,14 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public showCommand(): ShowCommandContext { let localctx: ShowCommandContext = new ShowCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 102, esql_parser.RULE_showCommand); + this.enterRule(localctx, 106, esql_parser.RULE_showCommand); try { localctx = new ShowInfoContext(this, localctx); this.enterOuterAlt(localctx, 1); { - this.state = 518; + this.state = 531; this.match(esql_parser.SHOW); - this.state = 519; + this.state = 532; this.match(esql_parser.INFO); } } @@ -2975,14 +3053,14 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public metaCommand(): MetaCommandContext { let localctx: MetaCommandContext = new MetaCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 104, esql_parser.RULE_metaCommand); + this.enterRule(localctx, 108, esql_parser.RULE_metaCommand); try { localctx = new MetaFunctionsContext(this, localctx); this.enterOuterAlt(localctx, 1); { - this.state = 521; + this.state = 534; this.match(esql_parser.META); - this.state = 522; + this.state = 535; this.match(esql_parser.FUNCTIONS); } } @@ -3003,53 +3081,53 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public enrichCommand(): EnrichCommandContext { let localctx: EnrichCommandContext = new EnrichCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 106, esql_parser.RULE_enrichCommand); + this.enterRule(localctx, 110, esql_parser.RULE_enrichCommand); try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 524; + this.state = 537; this.match(esql_parser.ENRICH); - this.state = 525; + this.state = 538; localctx._policyName = this.match(esql_parser.ENRICH_POLICY_NAME); - this.state = 528; + this.state = 541; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 49, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 50, this._ctx) ) { case 1: { - this.state = 526; + this.state = 539; this.match(esql_parser.ON); - this.state = 527; + this.state = 540; localctx._matchField = this.qualifiedNamePattern(); } break; } - this.state = 539; + this.state = 552; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 51, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 52, this._ctx) ) { case 1: { - this.state = 530; + this.state = 543; this.match(esql_parser.WITH); - this.state = 531; + this.state = 544; this.enrichWithClause(); - this.state = 536; + this.state = 549; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 50, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 51, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 532; + this.state = 545; this.match(esql_parser.COMMA); - this.state = 533; + this.state = 546; this.enrichWithClause(); } } } - this.state = 538; + this.state = 551; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 50, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 51, this._ctx); } } break; @@ -3073,23 +3151,23 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public enrichWithClause(): EnrichWithClauseContext { let localctx: EnrichWithClauseContext = new EnrichWithClauseContext(this, this._ctx, this.state); - this.enterRule(localctx, 108, esql_parser.RULE_enrichWithClause); + this.enterRule(localctx, 112, esql_parser.RULE_enrichWithClause); try { this.enterOuterAlt(localctx, 1); { - this.state = 544; + this.state = 557; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 52, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 53, this._ctx) ) { case 1: { - this.state = 541; + this.state = 554; localctx._newName = this.qualifiedNamePattern(); - this.state = 542; + this.state = 555; this.match(esql_parser.ASSIGN); } break; } - this.state = 546; + this.state = 559; localctx._enrichField = this.qualifiedNamePattern(); } } @@ -3110,17 +3188,17 @@ export default class esql_parser extends Parser { // @RuleVersion(0) public lookupCommand(): LookupCommandContext { let localctx: LookupCommandContext = new LookupCommandContext(this, this._ctx, this.state); - this.enterRule(localctx, 110, esql_parser.RULE_lookupCommand); + this.enterRule(localctx, 114, esql_parser.RULE_lookupCommand); try { this.enterOuterAlt(localctx, 1); { - this.state = 548; + this.state = 561; this.match(esql_parser.LOOKUP); - this.state = 549; - localctx._tableName = this.match(esql_parser.INDEX_UNQUOTED_IDENTIFIER); - this.state = 550; + this.state = 562; + localctx._tableName = this.indexPattern(); + this.state = 563; this.match(esql_parser.ON); - this.state = 551; + this.state = 564; localctx._matchFields = this.qualifiedNamePatterns(); } } @@ -3185,7 +3263,7 @@ export default class esql_parser extends Parser { return true; } - public static readonly _serializedATN: number[] = [4,1,124,554,2,0,7,0, + public static readonly _serializedATN: number[] = [4,1,124,567,2,0,7,0, 2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9, 2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2, 17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24, @@ -3193,179 +3271,183 @@ export default class esql_parser extends Parser { 31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38, 2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2, 46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53, - 7,53,2,54,7,54,2,55,7,55,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,5,1,122,8, - 1,10,1,12,1,125,9,1,1,2,1,2,1,2,1,2,1,2,1,2,3,2,133,8,2,1,3,1,3,1,3,1,3, - 1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,149,8,3,1,4,1,4,1,4,1,5,1,5, - 1,5,1,5,1,5,1,5,1,5,3,5,161,8,5,1,5,1,5,1,5,1,5,1,5,5,5,168,8,5,10,5,12, - 5,171,9,5,1,5,1,5,1,5,1,5,1,5,3,5,178,8,5,1,5,1,5,3,5,182,8,5,1,5,1,5,1, - 5,1,5,1,5,1,5,5,5,190,8,5,10,5,12,5,193,9,5,1,6,1,6,3,6,197,8,6,1,6,1,6, - 1,6,1,6,1,6,3,6,204,8,6,1,6,1,6,1,6,3,6,209,8,6,1,7,1,7,1,7,1,7,1,7,3,7, - 216,8,7,1,8,1,8,1,8,1,8,3,8,222,8,8,1,8,1,8,1,8,1,8,1,8,1,8,5,8,230,8,8, - 10,8,12,8,233,9,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,3,9,243,8,9,1,9,1,9,1, - 9,5,9,248,8,9,10,9,12,9,251,9,9,1,10,1,10,1,10,1,10,1,10,1,10,5,10,259, - 8,10,10,10,12,10,262,9,10,3,10,264,8,10,1,10,1,10,1,11,1,11,1,12,1,12,1, - 12,1,13,1,13,1,13,5,13,276,8,13,10,13,12,13,279,9,13,1,14,1,14,1,14,1,14, - 1,14,3,14,286,8,14,1,15,1,15,1,15,1,15,5,15,292,8,15,10,15,12,15,295,9, - 15,1,15,3,15,298,8,15,1,16,1,16,1,17,1,17,3,17,304,8,17,1,18,1,18,1,18, - 1,18,5,18,310,8,18,10,18,12,18,313,9,18,1,19,1,19,1,19,1,19,1,20,1,20,1, - 20,1,20,5,20,323,8,20,10,20,12,20,326,9,20,1,20,3,20,329,8,20,1,20,1,20, - 3,20,333,8,20,1,21,1,21,1,21,1,22,1,22,3,22,340,8,22,1,22,1,22,3,22,344, - 8,22,1,23,1,23,1,23,1,23,3,23,350,8,23,1,24,1,24,1,24,5,24,355,8,24,10, - 24,12,24,358,9,24,1,25,1,25,1,25,5,25,363,8,25,10,25,12,25,366,9,25,1,26, - 1,26,1,26,5,26,371,8,26,10,26,12,26,374,9,26,1,27,1,27,1,28,1,28,1,29,1, - 29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,5,29,393,8,29, - 10,29,12,29,396,9,29,1,29,1,29,1,29,1,29,1,29,1,29,5,29,404,8,29,10,29, - 12,29,407,9,29,1,29,1,29,1,29,1,29,1,29,1,29,5,29,415,8,29,10,29,12,29, - 418,9,29,1,29,1,29,3,29,422,8,29,1,30,1,30,3,30,426,8,30,1,31,1,31,1,31, - 1,32,1,32,1,32,1,32,5,32,435,8,32,10,32,12,32,438,9,32,1,33,1,33,3,33,442, - 8,33,1,33,1,33,3,33,446,8,33,1,34,1,34,1,34,1,35,1,35,1,35,1,36,1,36,1, - 36,1,36,5,36,458,8,36,10,36,12,36,461,9,36,1,37,1,37,1,37,1,37,1,38,1,38, - 1,38,1,38,3,38,471,8,38,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,41,1,41,1, - 41,5,41,483,8,41,10,41,12,41,486,9,41,1,42,1,42,1,42,1,42,1,43,1,43,1,44, - 1,44,3,44,496,8,44,1,45,3,45,499,8,45,1,45,1,45,1,46,3,46,504,8,46,1,46, - 1,46,1,47,1,47,1,48,1,48,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,51,1,51,1, - 51,1,52,1,52,1,52,1,53,1,53,1,53,1,53,3,53,529,8,53,1,53,1,53,1,53,1,53, - 5,53,535,8,53,10,53,12,53,538,9,53,3,53,540,8,53,1,54,1,54,1,54,3,54,545, - 8,54,1,54,1,54,1,55,1,55,1,55,1,55,1,55,1,55,0,4,2,10,16,18,56,0,2,4,6, - 8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54, - 56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102, - 104,106,108,110,0,7,1,0,63,64,1,0,65,67,1,0,71,72,2,0,35,35,39,39,1,0,42, - 43,2,0,41,41,55,55,2,0,56,56,58,62,580,0,112,1,0,0,0,2,115,1,0,0,0,4,132, - 1,0,0,0,6,148,1,0,0,0,8,150,1,0,0,0,10,181,1,0,0,0,12,208,1,0,0,0,14,215, - 1,0,0,0,16,221,1,0,0,0,18,242,1,0,0,0,20,252,1,0,0,0,22,267,1,0,0,0,24, - 269,1,0,0,0,26,272,1,0,0,0,28,285,1,0,0,0,30,287,1,0,0,0,32,299,1,0,0,0, - 34,303,1,0,0,0,36,305,1,0,0,0,38,314,1,0,0,0,40,318,1,0,0,0,42,334,1,0, - 0,0,44,337,1,0,0,0,46,345,1,0,0,0,48,351,1,0,0,0,50,359,1,0,0,0,52,367, - 1,0,0,0,54,375,1,0,0,0,56,377,1,0,0,0,58,421,1,0,0,0,60,425,1,0,0,0,62, - 427,1,0,0,0,64,430,1,0,0,0,66,439,1,0,0,0,68,447,1,0,0,0,70,450,1,0,0,0, - 72,453,1,0,0,0,74,462,1,0,0,0,76,466,1,0,0,0,78,472,1,0,0,0,80,476,1,0, - 0,0,82,479,1,0,0,0,84,487,1,0,0,0,86,491,1,0,0,0,88,495,1,0,0,0,90,498, - 1,0,0,0,92,503,1,0,0,0,94,507,1,0,0,0,96,509,1,0,0,0,98,511,1,0,0,0,100, - 514,1,0,0,0,102,518,1,0,0,0,104,521,1,0,0,0,106,524,1,0,0,0,108,544,1,0, - 0,0,110,548,1,0,0,0,112,113,3,2,1,0,113,114,5,0,0,1,114,1,1,0,0,0,115,116, - 6,1,-1,0,116,117,3,4,2,0,117,123,1,0,0,0,118,119,10,1,0,0,119,120,5,29, - 0,0,120,122,3,6,3,0,121,118,1,0,0,0,122,125,1,0,0,0,123,121,1,0,0,0,123, - 124,1,0,0,0,124,3,1,0,0,0,125,123,1,0,0,0,126,133,3,98,49,0,127,133,3,30, - 15,0,128,133,3,24,12,0,129,133,3,40,20,0,130,133,3,102,51,0,131,133,3,104, - 52,0,132,126,1,0,0,0,132,127,1,0,0,0,132,128,1,0,0,0,132,129,1,0,0,0,132, - 130,1,0,0,0,132,131,1,0,0,0,133,5,1,0,0,0,134,149,3,42,21,0,135,149,3,46, - 23,0,136,149,3,62,31,0,137,149,3,110,55,0,138,149,3,68,34,0,139,149,3,64, - 32,0,140,149,3,44,22,0,141,149,3,8,4,0,142,149,3,70,35,0,143,149,3,72,36, - 0,144,149,3,76,38,0,145,149,3,78,39,0,146,149,3,106,53,0,147,149,3,80,40, - 0,148,134,1,0,0,0,148,135,1,0,0,0,148,136,1,0,0,0,148,137,1,0,0,0,148,138, - 1,0,0,0,148,139,1,0,0,0,148,140,1,0,0,0,148,141,1,0,0,0,148,142,1,0,0,0, - 148,143,1,0,0,0,148,144,1,0,0,0,148,145,1,0,0,0,148,146,1,0,0,0,148,147, - 1,0,0,0,149,7,1,0,0,0,150,151,5,20,0,0,151,152,3,10,5,0,152,9,1,0,0,0,153, - 154,6,5,-1,0,154,155,5,48,0,0,155,182,3,10,5,7,156,182,3,14,7,0,157,182, - 3,12,6,0,158,160,3,14,7,0,159,161,5,48,0,0,160,159,1,0,0,0,160,161,1,0, - 0,0,161,162,1,0,0,0,162,163,5,45,0,0,163,164,5,44,0,0,164,169,3,14,7,0, - 165,166,5,38,0,0,166,168,3,14,7,0,167,165,1,0,0,0,168,171,1,0,0,0,169,167, - 1,0,0,0,169,170,1,0,0,0,170,172,1,0,0,0,171,169,1,0,0,0,172,173,5,54,0, - 0,173,182,1,0,0,0,174,175,3,14,7,0,175,177,5,46,0,0,176,178,5,48,0,0,177, - 176,1,0,0,0,177,178,1,0,0,0,178,179,1,0,0,0,179,180,5,49,0,0,180,182,1, - 0,0,0,181,153,1,0,0,0,181,156,1,0,0,0,181,157,1,0,0,0,181,158,1,0,0,0,181, - 174,1,0,0,0,182,191,1,0,0,0,183,184,10,4,0,0,184,185,5,34,0,0,185,190,3, - 10,5,5,186,187,10,3,0,0,187,188,5,51,0,0,188,190,3,10,5,4,189,183,1,0,0, - 0,189,186,1,0,0,0,190,193,1,0,0,0,191,189,1,0,0,0,191,192,1,0,0,0,192,11, - 1,0,0,0,193,191,1,0,0,0,194,196,3,14,7,0,195,197,5,48,0,0,196,195,1,0,0, - 0,196,197,1,0,0,0,197,198,1,0,0,0,198,199,5,47,0,0,199,200,3,94,47,0,200, - 209,1,0,0,0,201,203,3,14,7,0,202,204,5,48,0,0,203,202,1,0,0,0,203,204,1, - 0,0,0,204,205,1,0,0,0,205,206,5,53,0,0,206,207,3,94,47,0,207,209,1,0,0, - 0,208,194,1,0,0,0,208,201,1,0,0,0,209,13,1,0,0,0,210,216,3,16,8,0,211,212, - 3,16,8,0,212,213,3,96,48,0,213,214,3,16,8,0,214,216,1,0,0,0,215,210,1,0, - 0,0,215,211,1,0,0,0,216,15,1,0,0,0,217,218,6,8,-1,0,218,222,3,18,9,0,219, - 220,7,0,0,0,220,222,3,16,8,3,221,217,1,0,0,0,221,219,1,0,0,0,222,231,1, - 0,0,0,223,224,10,2,0,0,224,225,7,1,0,0,225,230,3,16,8,3,226,227,10,1,0, - 0,227,228,7,0,0,0,228,230,3,16,8,2,229,223,1,0,0,0,229,226,1,0,0,0,230, - 233,1,0,0,0,231,229,1,0,0,0,231,232,1,0,0,0,232,17,1,0,0,0,233,231,1,0, - 0,0,234,235,6,9,-1,0,235,243,3,58,29,0,236,243,3,48,24,0,237,243,3,20,10, - 0,238,239,5,44,0,0,239,240,3,10,5,0,240,241,5,54,0,0,241,243,1,0,0,0,242, - 234,1,0,0,0,242,236,1,0,0,0,242,237,1,0,0,0,242,238,1,0,0,0,243,249,1,0, - 0,0,244,245,10,1,0,0,245,246,5,37,0,0,246,248,3,22,11,0,247,244,1,0,0,0, - 248,251,1,0,0,0,249,247,1,0,0,0,249,250,1,0,0,0,250,19,1,0,0,0,251,249, - 1,0,0,0,252,253,3,54,27,0,253,263,5,44,0,0,254,264,5,65,0,0,255,260,3,10, - 5,0,256,257,5,38,0,0,257,259,3,10,5,0,258,256,1,0,0,0,259,262,1,0,0,0,260, - 258,1,0,0,0,260,261,1,0,0,0,261,264,1,0,0,0,262,260,1,0,0,0,263,254,1,0, - 0,0,263,255,1,0,0,0,263,264,1,0,0,0,264,265,1,0,0,0,265,266,5,54,0,0,266, - 21,1,0,0,0,267,268,3,54,27,0,268,23,1,0,0,0,269,270,5,16,0,0,270,271,3, - 26,13,0,271,25,1,0,0,0,272,277,3,28,14,0,273,274,5,38,0,0,274,276,3,28, - 14,0,275,273,1,0,0,0,276,279,1,0,0,0,277,275,1,0,0,0,277,278,1,0,0,0,278, - 27,1,0,0,0,279,277,1,0,0,0,280,286,3,10,5,0,281,282,3,48,24,0,282,283,5, - 36,0,0,283,284,3,10,5,0,284,286,1,0,0,0,285,280,1,0,0,0,285,281,1,0,0,0, - 286,29,1,0,0,0,287,288,5,6,0,0,288,293,3,32,16,0,289,290,5,38,0,0,290,292, - 3,32,16,0,291,289,1,0,0,0,292,295,1,0,0,0,293,291,1,0,0,0,293,294,1,0,0, - 0,294,297,1,0,0,0,295,293,1,0,0,0,296,298,3,34,17,0,297,296,1,0,0,0,297, - 298,1,0,0,0,298,31,1,0,0,0,299,300,5,25,0,0,300,33,1,0,0,0,301,304,3,36, - 18,0,302,304,3,38,19,0,303,301,1,0,0,0,303,302,1,0,0,0,304,35,1,0,0,0,305, - 306,5,76,0,0,306,311,3,32,16,0,307,308,5,38,0,0,308,310,3,32,16,0,309,307, - 1,0,0,0,310,313,1,0,0,0,311,309,1,0,0,0,311,312,1,0,0,0,312,37,1,0,0,0, - 313,311,1,0,0,0,314,315,5,69,0,0,315,316,3,36,18,0,316,317,5,70,0,0,317, - 39,1,0,0,0,318,319,5,13,0,0,319,324,3,32,16,0,320,321,5,38,0,0,321,323, - 3,32,16,0,322,320,1,0,0,0,323,326,1,0,0,0,324,322,1,0,0,0,324,325,1,0,0, - 0,325,328,1,0,0,0,326,324,1,0,0,0,327,329,3,26,13,0,328,327,1,0,0,0,328, - 329,1,0,0,0,329,332,1,0,0,0,330,331,5,33,0,0,331,333,3,26,13,0,332,330, - 1,0,0,0,332,333,1,0,0,0,333,41,1,0,0,0,334,335,5,4,0,0,335,336,3,26,13, - 0,336,43,1,0,0,0,337,339,5,19,0,0,338,340,3,26,13,0,339,338,1,0,0,0,339, - 340,1,0,0,0,340,343,1,0,0,0,341,342,5,33,0,0,342,344,3,26,13,0,343,341, - 1,0,0,0,343,344,1,0,0,0,344,45,1,0,0,0,345,346,5,8,0,0,346,349,3,26,13, - 0,347,348,5,33,0,0,348,350,3,26,13,0,349,347,1,0,0,0,349,350,1,0,0,0,350, - 47,1,0,0,0,351,356,3,54,27,0,352,353,5,40,0,0,353,355,3,54,27,0,354,352, - 1,0,0,0,355,358,1,0,0,0,356,354,1,0,0,0,356,357,1,0,0,0,357,49,1,0,0,0, - 358,356,1,0,0,0,359,364,3,56,28,0,360,361,5,40,0,0,361,363,3,56,28,0,362, - 360,1,0,0,0,363,366,1,0,0,0,364,362,1,0,0,0,364,365,1,0,0,0,365,51,1,0, - 0,0,366,364,1,0,0,0,367,372,3,50,25,0,368,369,5,38,0,0,369,371,3,50,25, - 0,370,368,1,0,0,0,371,374,1,0,0,0,372,370,1,0,0,0,372,373,1,0,0,0,373,53, - 1,0,0,0,374,372,1,0,0,0,375,376,7,2,0,0,376,55,1,0,0,0,377,378,5,80,0,0, - 378,57,1,0,0,0,379,422,5,49,0,0,380,381,3,92,46,0,381,382,5,71,0,0,382, - 422,1,0,0,0,383,422,3,90,45,0,384,422,3,92,46,0,385,422,3,86,43,0,386,422, - 3,60,30,0,387,422,3,94,47,0,388,389,5,69,0,0,389,394,3,88,44,0,390,391, - 5,38,0,0,391,393,3,88,44,0,392,390,1,0,0,0,393,396,1,0,0,0,394,392,1,0, - 0,0,394,395,1,0,0,0,395,397,1,0,0,0,396,394,1,0,0,0,397,398,5,70,0,0,398, - 422,1,0,0,0,399,400,5,69,0,0,400,405,3,86,43,0,401,402,5,38,0,0,402,404, - 3,86,43,0,403,401,1,0,0,0,404,407,1,0,0,0,405,403,1,0,0,0,405,406,1,0,0, - 0,406,408,1,0,0,0,407,405,1,0,0,0,408,409,5,70,0,0,409,422,1,0,0,0,410, - 411,5,69,0,0,411,416,3,94,47,0,412,413,5,38,0,0,413,415,3,94,47,0,414,412, - 1,0,0,0,415,418,1,0,0,0,416,414,1,0,0,0,416,417,1,0,0,0,417,419,1,0,0,0, - 418,416,1,0,0,0,419,420,5,70,0,0,420,422,1,0,0,0,421,379,1,0,0,0,421,380, - 1,0,0,0,421,383,1,0,0,0,421,384,1,0,0,0,421,385,1,0,0,0,421,386,1,0,0,0, - 421,387,1,0,0,0,421,388,1,0,0,0,421,399,1,0,0,0,421,410,1,0,0,0,422,59, - 1,0,0,0,423,426,5,52,0,0,424,426,5,68,0,0,425,423,1,0,0,0,425,424,1,0,0, - 0,426,61,1,0,0,0,427,428,5,10,0,0,428,429,5,31,0,0,429,63,1,0,0,0,430,431, - 5,18,0,0,431,436,3,66,33,0,432,433,5,38,0,0,433,435,3,66,33,0,434,432,1, - 0,0,0,435,438,1,0,0,0,436,434,1,0,0,0,436,437,1,0,0,0,437,65,1,0,0,0,438, - 436,1,0,0,0,439,441,3,10,5,0,440,442,7,3,0,0,441,440,1,0,0,0,441,442,1, - 0,0,0,442,445,1,0,0,0,443,444,5,50,0,0,444,446,7,4,0,0,445,443,1,0,0,0, - 445,446,1,0,0,0,446,67,1,0,0,0,447,448,5,9,0,0,448,449,3,52,26,0,449,69, - 1,0,0,0,450,451,5,2,0,0,451,452,3,52,26,0,452,71,1,0,0,0,453,454,5,15,0, - 0,454,459,3,74,37,0,455,456,5,38,0,0,456,458,3,74,37,0,457,455,1,0,0,0, - 458,461,1,0,0,0,459,457,1,0,0,0,459,460,1,0,0,0,460,73,1,0,0,0,461,459, - 1,0,0,0,462,463,3,50,25,0,463,464,5,84,0,0,464,465,3,50,25,0,465,75,1,0, - 0,0,466,467,5,1,0,0,467,468,3,18,9,0,468,470,3,94,47,0,469,471,3,82,41, - 0,470,469,1,0,0,0,470,471,1,0,0,0,471,77,1,0,0,0,472,473,5,7,0,0,473,474, - 3,18,9,0,474,475,3,94,47,0,475,79,1,0,0,0,476,477,5,14,0,0,477,478,3,48, - 24,0,478,81,1,0,0,0,479,484,3,84,42,0,480,481,5,38,0,0,481,483,3,84,42, - 0,482,480,1,0,0,0,483,486,1,0,0,0,484,482,1,0,0,0,484,485,1,0,0,0,485,83, - 1,0,0,0,486,484,1,0,0,0,487,488,3,54,27,0,488,489,5,36,0,0,489,490,3,58, - 29,0,490,85,1,0,0,0,491,492,7,5,0,0,492,87,1,0,0,0,493,496,3,90,45,0,494, - 496,3,92,46,0,495,493,1,0,0,0,495,494,1,0,0,0,496,89,1,0,0,0,497,499,7, - 0,0,0,498,497,1,0,0,0,498,499,1,0,0,0,499,500,1,0,0,0,500,501,5,32,0,0, - 501,91,1,0,0,0,502,504,7,0,0,0,503,502,1,0,0,0,503,504,1,0,0,0,504,505, - 1,0,0,0,505,506,5,31,0,0,506,93,1,0,0,0,507,508,5,30,0,0,508,95,1,0,0,0, - 509,510,7,6,0,0,510,97,1,0,0,0,511,512,5,5,0,0,512,513,3,100,50,0,513,99, - 1,0,0,0,514,515,5,69,0,0,515,516,3,2,1,0,516,517,5,70,0,0,517,101,1,0,0, - 0,518,519,5,17,0,0,519,520,5,106,0,0,520,103,1,0,0,0,521,522,5,12,0,0,522, - 523,5,110,0,0,523,105,1,0,0,0,524,525,5,3,0,0,525,528,5,90,0,0,526,527, - 5,88,0,0,527,529,3,50,25,0,528,526,1,0,0,0,528,529,1,0,0,0,529,539,1,0, - 0,0,530,531,5,89,0,0,531,536,3,108,54,0,532,533,5,38,0,0,533,535,3,108, - 54,0,534,532,1,0,0,0,535,538,1,0,0,0,536,534,1,0,0,0,536,537,1,0,0,0,537, - 540,1,0,0,0,538,536,1,0,0,0,539,530,1,0,0,0,539,540,1,0,0,0,540,107,1,0, - 0,0,541,542,3,50,25,0,542,543,5,36,0,0,543,545,1,0,0,0,544,541,1,0,0,0, - 544,545,1,0,0,0,545,546,1,0,0,0,546,547,3,50,25,0,547,109,1,0,0,0,548,549, - 5,11,0,0,549,550,5,25,0,0,550,551,5,88,0,0,551,552,3,52,26,0,552,111,1, - 0,0,0,53,123,132,148,160,169,177,181,189,191,196,203,208,215,221,229,231, - 242,249,260,263,277,285,293,297,303,311,324,328,332,339,343,349,356,364, - 372,394,405,416,421,425,436,441,445,459,470,484,495,498,503,528,536,539, - 544]; + 7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,1,0,1,0,1,0,1,1,1,1,1,1,1, + 1,1,1,1,1,5,1,126,8,1,10,1,12,1,129,9,1,1,2,1,2,1,2,1,2,1,2,1,2,3,2,137, + 8,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,153,8,3, + 1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,165,8,5,1,5,1,5,1,5,1,5,1,5, + 5,5,172,8,5,10,5,12,5,175,9,5,1,5,1,5,1,5,1,5,1,5,3,5,182,8,5,1,5,1,5,3, + 5,186,8,5,1,5,1,5,1,5,1,5,1,5,1,5,5,5,194,8,5,10,5,12,5,197,9,5,1,6,1,6, + 3,6,201,8,6,1,6,1,6,1,6,1,6,1,6,3,6,208,8,6,1,6,1,6,1,6,3,6,213,8,6,1,7, + 1,7,1,7,1,7,1,7,3,7,220,8,7,1,8,1,8,1,8,1,8,3,8,226,8,8,1,8,1,8,1,8,1,8, + 1,8,1,8,5,8,234,8,8,10,8,12,8,237,9,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,3, + 9,247,8,9,1,9,1,9,1,9,5,9,252,8,9,10,9,12,9,255,9,9,1,10,1,10,1,10,1,10, + 1,10,1,10,5,10,263,8,10,10,10,12,10,266,9,10,3,10,268,8,10,1,10,1,10,1, + 11,1,11,1,12,1,12,1,12,1,13,1,13,1,13,5,13,280,8,13,10,13,12,13,283,9,13, + 1,14,1,14,1,14,1,14,1,14,3,14,290,8,14,1,15,1,15,1,15,1,15,5,15,296,8,15, + 10,15,12,15,299,9,15,1,15,3,15,302,8,15,1,16,1,16,1,16,1,16,1,16,3,16,309, + 8,16,1,17,1,17,1,18,1,18,1,19,1,19,3,19,317,8,19,1,20,1,20,1,20,1,20,5, + 20,323,8,20,10,20,12,20,326,9,20,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22, + 5,22,336,8,22,10,22,12,22,339,9,22,1,22,3,22,342,8,22,1,22,1,22,3,22,346, + 8,22,1,23,1,23,1,23,1,24,1,24,3,24,353,8,24,1,24,1,24,3,24,357,8,24,1,25, + 1,25,1,25,1,25,3,25,363,8,25,1,26,1,26,1,26,5,26,368,8,26,10,26,12,26,371, + 9,26,1,27,1,27,1,27,5,27,376,8,27,10,27,12,27,379,9,27,1,28,1,28,1,28,5, + 28,384,8,28,10,28,12,28,387,9,28,1,29,1,29,1,30,1,30,1,31,1,31,1,31,1,31, + 1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,5,31,406,8,31,10,31,12,31, + 409,9,31,1,31,1,31,1,31,1,31,1,31,1,31,5,31,417,8,31,10,31,12,31,420,9, + 31,1,31,1,31,1,31,1,31,1,31,1,31,5,31,428,8,31,10,31,12,31,431,9,31,1,31, + 1,31,3,31,435,8,31,1,32,1,32,3,32,439,8,32,1,33,1,33,1,33,1,34,1,34,1,34, + 1,34,5,34,448,8,34,10,34,12,34,451,9,34,1,35,1,35,3,35,455,8,35,1,35,1, + 35,3,35,459,8,35,1,36,1,36,1,36,1,37,1,37,1,37,1,38,1,38,1,38,1,38,5,38, + 471,8,38,10,38,12,38,474,9,38,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,3, + 40,484,8,40,1,41,1,41,1,41,1,41,1,42,1,42,1,42,1,43,1,43,1,43,5,43,496, + 8,43,10,43,12,43,499,9,43,1,44,1,44,1,44,1,44,1,45,1,45,1,46,1,46,3,46, + 509,8,46,1,47,3,47,512,8,47,1,47,1,47,1,48,3,48,517,8,48,1,48,1,48,1,49, + 1,49,1,50,1,50,1,51,1,51,1,51,1,52,1,52,1,52,1,52,1,53,1,53,1,53,1,54,1, + 54,1,54,1,55,1,55,1,55,1,55,3,55,542,8,55,1,55,1,55,1,55,1,55,5,55,548, + 8,55,10,55,12,55,551,9,55,3,55,553,8,55,1,56,1,56,1,56,3,56,558,8,56,1, + 56,1,56,1,57,1,57,1,57,1,57,1,57,1,57,0,4,2,10,16,18,58,0,2,4,6,8,10,12, + 14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60, + 62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106, + 108,110,112,114,0,8,1,0,63,64,1,0,65,67,2,0,25,25,30,30,1,0,71,72,2,0,35, + 35,39,39,1,0,42,43,2,0,41,41,55,55,2,0,56,56,58,62,592,0,116,1,0,0,0,2, + 119,1,0,0,0,4,136,1,0,0,0,6,152,1,0,0,0,8,154,1,0,0,0,10,185,1,0,0,0,12, + 212,1,0,0,0,14,219,1,0,0,0,16,225,1,0,0,0,18,246,1,0,0,0,20,256,1,0,0,0, + 22,271,1,0,0,0,24,273,1,0,0,0,26,276,1,0,0,0,28,289,1,0,0,0,30,291,1,0, + 0,0,32,308,1,0,0,0,34,310,1,0,0,0,36,312,1,0,0,0,38,316,1,0,0,0,40,318, + 1,0,0,0,42,327,1,0,0,0,44,331,1,0,0,0,46,347,1,0,0,0,48,350,1,0,0,0,50, + 358,1,0,0,0,52,364,1,0,0,0,54,372,1,0,0,0,56,380,1,0,0,0,58,388,1,0,0,0, + 60,390,1,0,0,0,62,434,1,0,0,0,64,438,1,0,0,0,66,440,1,0,0,0,68,443,1,0, + 0,0,70,452,1,0,0,0,72,460,1,0,0,0,74,463,1,0,0,0,76,466,1,0,0,0,78,475, + 1,0,0,0,80,479,1,0,0,0,82,485,1,0,0,0,84,489,1,0,0,0,86,492,1,0,0,0,88, + 500,1,0,0,0,90,504,1,0,0,0,92,508,1,0,0,0,94,511,1,0,0,0,96,516,1,0,0,0, + 98,520,1,0,0,0,100,522,1,0,0,0,102,524,1,0,0,0,104,527,1,0,0,0,106,531, + 1,0,0,0,108,534,1,0,0,0,110,537,1,0,0,0,112,557,1,0,0,0,114,561,1,0,0,0, + 116,117,3,2,1,0,117,118,5,0,0,1,118,1,1,0,0,0,119,120,6,1,-1,0,120,121, + 3,4,2,0,121,127,1,0,0,0,122,123,10,1,0,0,123,124,5,29,0,0,124,126,3,6,3, + 0,125,122,1,0,0,0,126,129,1,0,0,0,127,125,1,0,0,0,127,128,1,0,0,0,128,3, + 1,0,0,0,129,127,1,0,0,0,130,137,3,102,51,0,131,137,3,30,15,0,132,137,3, + 24,12,0,133,137,3,44,22,0,134,137,3,106,53,0,135,137,3,108,54,0,136,130, + 1,0,0,0,136,131,1,0,0,0,136,132,1,0,0,0,136,133,1,0,0,0,136,134,1,0,0,0, + 136,135,1,0,0,0,137,5,1,0,0,0,138,153,3,46,23,0,139,153,3,50,25,0,140,153, + 3,66,33,0,141,153,3,114,57,0,142,153,3,72,36,0,143,153,3,68,34,0,144,153, + 3,48,24,0,145,153,3,8,4,0,146,153,3,74,37,0,147,153,3,76,38,0,148,153,3, + 80,40,0,149,153,3,82,41,0,150,153,3,110,55,0,151,153,3,84,42,0,152,138, + 1,0,0,0,152,139,1,0,0,0,152,140,1,0,0,0,152,141,1,0,0,0,152,142,1,0,0,0, + 152,143,1,0,0,0,152,144,1,0,0,0,152,145,1,0,0,0,152,146,1,0,0,0,152,147, + 1,0,0,0,152,148,1,0,0,0,152,149,1,0,0,0,152,150,1,0,0,0,152,151,1,0,0,0, + 153,7,1,0,0,0,154,155,5,20,0,0,155,156,3,10,5,0,156,9,1,0,0,0,157,158,6, + 5,-1,0,158,159,5,48,0,0,159,186,3,10,5,7,160,186,3,14,7,0,161,186,3,12, + 6,0,162,164,3,14,7,0,163,165,5,48,0,0,164,163,1,0,0,0,164,165,1,0,0,0,165, + 166,1,0,0,0,166,167,5,45,0,0,167,168,5,44,0,0,168,173,3,14,7,0,169,170, + 5,38,0,0,170,172,3,14,7,0,171,169,1,0,0,0,172,175,1,0,0,0,173,171,1,0,0, + 0,173,174,1,0,0,0,174,176,1,0,0,0,175,173,1,0,0,0,176,177,5,54,0,0,177, + 186,1,0,0,0,178,179,3,14,7,0,179,181,5,46,0,0,180,182,5,48,0,0,181,180, + 1,0,0,0,181,182,1,0,0,0,182,183,1,0,0,0,183,184,5,49,0,0,184,186,1,0,0, + 0,185,157,1,0,0,0,185,160,1,0,0,0,185,161,1,0,0,0,185,162,1,0,0,0,185,178, + 1,0,0,0,186,195,1,0,0,0,187,188,10,4,0,0,188,189,5,34,0,0,189,194,3,10, + 5,5,190,191,10,3,0,0,191,192,5,51,0,0,192,194,3,10,5,4,193,187,1,0,0,0, + 193,190,1,0,0,0,194,197,1,0,0,0,195,193,1,0,0,0,195,196,1,0,0,0,196,11, + 1,0,0,0,197,195,1,0,0,0,198,200,3,14,7,0,199,201,5,48,0,0,200,199,1,0,0, + 0,200,201,1,0,0,0,201,202,1,0,0,0,202,203,5,47,0,0,203,204,3,98,49,0,204, + 213,1,0,0,0,205,207,3,14,7,0,206,208,5,48,0,0,207,206,1,0,0,0,207,208,1, + 0,0,0,208,209,1,0,0,0,209,210,5,53,0,0,210,211,3,98,49,0,211,213,1,0,0, + 0,212,198,1,0,0,0,212,205,1,0,0,0,213,13,1,0,0,0,214,220,3,16,8,0,215,216, + 3,16,8,0,216,217,3,100,50,0,217,218,3,16,8,0,218,220,1,0,0,0,219,214,1, + 0,0,0,219,215,1,0,0,0,220,15,1,0,0,0,221,222,6,8,-1,0,222,226,3,18,9,0, + 223,224,7,0,0,0,224,226,3,16,8,3,225,221,1,0,0,0,225,223,1,0,0,0,226,235, + 1,0,0,0,227,228,10,2,0,0,228,229,7,1,0,0,229,234,3,16,8,3,230,231,10,1, + 0,0,231,232,7,0,0,0,232,234,3,16,8,2,233,227,1,0,0,0,233,230,1,0,0,0,234, + 237,1,0,0,0,235,233,1,0,0,0,235,236,1,0,0,0,236,17,1,0,0,0,237,235,1,0, + 0,0,238,239,6,9,-1,0,239,247,3,62,31,0,240,247,3,52,26,0,241,247,3,20,10, + 0,242,243,5,44,0,0,243,244,3,10,5,0,244,245,5,54,0,0,245,247,1,0,0,0,246, + 238,1,0,0,0,246,240,1,0,0,0,246,241,1,0,0,0,246,242,1,0,0,0,247,253,1,0, + 0,0,248,249,10,1,0,0,249,250,5,37,0,0,250,252,3,22,11,0,251,248,1,0,0,0, + 252,255,1,0,0,0,253,251,1,0,0,0,253,254,1,0,0,0,254,19,1,0,0,0,255,253, + 1,0,0,0,256,257,3,58,29,0,257,267,5,44,0,0,258,268,5,65,0,0,259,264,3,10, + 5,0,260,261,5,38,0,0,261,263,3,10,5,0,262,260,1,0,0,0,263,266,1,0,0,0,264, + 262,1,0,0,0,264,265,1,0,0,0,265,268,1,0,0,0,266,264,1,0,0,0,267,258,1,0, + 0,0,267,259,1,0,0,0,267,268,1,0,0,0,268,269,1,0,0,0,269,270,5,54,0,0,270, + 21,1,0,0,0,271,272,3,58,29,0,272,23,1,0,0,0,273,274,5,16,0,0,274,275,3, + 26,13,0,275,25,1,0,0,0,276,281,3,28,14,0,277,278,5,38,0,0,278,280,3,28, + 14,0,279,277,1,0,0,0,280,283,1,0,0,0,281,279,1,0,0,0,281,282,1,0,0,0,282, + 27,1,0,0,0,283,281,1,0,0,0,284,290,3,10,5,0,285,286,3,52,26,0,286,287,5, + 36,0,0,287,288,3,10,5,0,288,290,1,0,0,0,289,284,1,0,0,0,289,285,1,0,0,0, + 290,29,1,0,0,0,291,292,5,6,0,0,292,297,3,32,16,0,293,294,5,38,0,0,294,296, + 3,32,16,0,295,293,1,0,0,0,296,299,1,0,0,0,297,295,1,0,0,0,297,298,1,0,0, + 0,298,301,1,0,0,0,299,297,1,0,0,0,300,302,3,38,19,0,301,300,1,0,0,0,301, + 302,1,0,0,0,302,31,1,0,0,0,303,304,3,34,17,0,304,305,5,114,0,0,305,306, + 3,36,18,0,306,309,1,0,0,0,307,309,3,36,18,0,308,303,1,0,0,0,308,307,1,0, + 0,0,309,33,1,0,0,0,310,311,5,25,0,0,311,35,1,0,0,0,312,313,7,2,0,0,313, + 37,1,0,0,0,314,317,3,40,20,0,315,317,3,42,21,0,316,314,1,0,0,0,316,315, + 1,0,0,0,317,39,1,0,0,0,318,319,5,76,0,0,319,324,5,25,0,0,320,321,5,38,0, + 0,321,323,5,25,0,0,322,320,1,0,0,0,323,326,1,0,0,0,324,322,1,0,0,0,324, + 325,1,0,0,0,325,41,1,0,0,0,326,324,1,0,0,0,327,328,5,69,0,0,328,329,3,40, + 20,0,329,330,5,70,0,0,330,43,1,0,0,0,331,332,5,13,0,0,332,337,3,32,16,0, + 333,334,5,38,0,0,334,336,3,32,16,0,335,333,1,0,0,0,336,339,1,0,0,0,337, + 335,1,0,0,0,337,338,1,0,0,0,338,341,1,0,0,0,339,337,1,0,0,0,340,342,3,26, + 13,0,341,340,1,0,0,0,341,342,1,0,0,0,342,345,1,0,0,0,343,344,5,33,0,0,344, + 346,3,26,13,0,345,343,1,0,0,0,345,346,1,0,0,0,346,45,1,0,0,0,347,348,5, + 4,0,0,348,349,3,26,13,0,349,47,1,0,0,0,350,352,5,19,0,0,351,353,3,26,13, + 0,352,351,1,0,0,0,352,353,1,0,0,0,353,356,1,0,0,0,354,355,5,33,0,0,355, + 357,3,26,13,0,356,354,1,0,0,0,356,357,1,0,0,0,357,49,1,0,0,0,358,359,5, + 8,0,0,359,362,3,26,13,0,360,361,5,33,0,0,361,363,3,26,13,0,362,360,1,0, + 0,0,362,363,1,0,0,0,363,51,1,0,0,0,364,369,3,58,29,0,365,366,5,40,0,0,366, + 368,3,58,29,0,367,365,1,0,0,0,368,371,1,0,0,0,369,367,1,0,0,0,369,370,1, + 0,0,0,370,53,1,0,0,0,371,369,1,0,0,0,372,377,3,60,30,0,373,374,5,40,0,0, + 374,376,3,60,30,0,375,373,1,0,0,0,376,379,1,0,0,0,377,375,1,0,0,0,377,378, + 1,0,0,0,378,55,1,0,0,0,379,377,1,0,0,0,380,385,3,54,27,0,381,382,5,38,0, + 0,382,384,3,54,27,0,383,381,1,0,0,0,384,387,1,0,0,0,385,383,1,0,0,0,385, + 386,1,0,0,0,386,57,1,0,0,0,387,385,1,0,0,0,388,389,7,3,0,0,389,59,1,0,0, + 0,390,391,5,80,0,0,391,61,1,0,0,0,392,435,5,49,0,0,393,394,3,96,48,0,394, + 395,5,71,0,0,395,435,1,0,0,0,396,435,3,94,47,0,397,435,3,96,48,0,398,435, + 3,90,45,0,399,435,3,64,32,0,400,435,3,98,49,0,401,402,5,69,0,0,402,407, + 3,92,46,0,403,404,5,38,0,0,404,406,3,92,46,0,405,403,1,0,0,0,406,409,1, + 0,0,0,407,405,1,0,0,0,407,408,1,0,0,0,408,410,1,0,0,0,409,407,1,0,0,0,410, + 411,5,70,0,0,411,435,1,0,0,0,412,413,5,69,0,0,413,418,3,90,45,0,414,415, + 5,38,0,0,415,417,3,90,45,0,416,414,1,0,0,0,417,420,1,0,0,0,418,416,1,0, + 0,0,418,419,1,0,0,0,419,421,1,0,0,0,420,418,1,0,0,0,421,422,5,70,0,0,422, + 435,1,0,0,0,423,424,5,69,0,0,424,429,3,98,49,0,425,426,5,38,0,0,426,428, + 3,98,49,0,427,425,1,0,0,0,428,431,1,0,0,0,429,427,1,0,0,0,429,430,1,0,0, + 0,430,432,1,0,0,0,431,429,1,0,0,0,432,433,5,70,0,0,433,435,1,0,0,0,434, + 392,1,0,0,0,434,393,1,0,0,0,434,396,1,0,0,0,434,397,1,0,0,0,434,398,1,0, + 0,0,434,399,1,0,0,0,434,400,1,0,0,0,434,401,1,0,0,0,434,412,1,0,0,0,434, + 423,1,0,0,0,435,63,1,0,0,0,436,439,5,52,0,0,437,439,5,68,0,0,438,436,1, + 0,0,0,438,437,1,0,0,0,439,65,1,0,0,0,440,441,5,10,0,0,441,442,5,31,0,0, + 442,67,1,0,0,0,443,444,5,18,0,0,444,449,3,70,35,0,445,446,5,38,0,0,446, + 448,3,70,35,0,447,445,1,0,0,0,448,451,1,0,0,0,449,447,1,0,0,0,449,450,1, + 0,0,0,450,69,1,0,0,0,451,449,1,0,0,0,452,454,3,10,5,0,453,455,7,4,0,0,454, + 453,1,0,0,0,454,455,1,0,0,0,455,458,1,0,0,0,456,457,5,50,0,0,457,459,7, + 5,0,0,458,456,1,0,0,0,458,459,1,0,0,0,459,71,1,0,0,0,460,461,5,9,0,0,461, + 462,3,56,28,0,462,73,1,0,0,0,463,464,5,2,0,0,464,465,3,56,28,0,465,75,1, + 0,0,0,466,467,5,15,0,0,467,472,3,78,39,0,468,469,5,38,0,0,469,471,3,78, + 39,0,470,468,1,0,0,0,471,474,1,0,0,0,472,470,1,0,0,0,472,473,1,0,0,0,473, + 77,1,0,0,0,474,472,1,0,0,0,475,476,3,54,27,0,476,477,5,84,0,0,477,478,3, + 54,27,0,478,79,1,0,0,0,479,480,5,1,0,0,480,481,3,18,9,0,481,483,3,98,49, + 0,482,484,3,86,43,0,483,482,1,0,0,0,483,484,1,0,0,0,484,81,1,0,0,0,485, + 486,5,7,0,0,486,487,3,18,9,0,487,488,3,98,49,0,488,83,1,0,0,0,489,490,5, + 14,0,0,490,491,3,52,26,0,491,85,1,0,0,0,492,497,3,88,44,0,493,494,5,38, + 0,0,494,496,3,88,44,0,495,493,1,0,0,0,496,499,1,0,0,0,497,495,1,0,0,0,497, + 498,1,0,0,0,498,87,1,0,0,0,499,497,1,0,0,0,500,501,3,58,29,0,501,502,5, + 36,0,0,502,503,3,62,31,0,503,89,1,0,0,0,504,505,7,6,0,0,505,91,1,0,0,0, + 506,509,3,94,47,0,507,509,3,96,48,0,508,506,1,0,0,0,508,507,1,0,0,0,509, + 93,1,0,0,0,510,512,7,0,0,0,511,510,1,0,0,0,511,512,1,0,0,0,512,513,1,0, + 0,0,513,514,5,32,0,0,514,95,1,0,0,0,515,517,7,0,0,0,516,515,1,0,0,0,516, + 517,1,0,0,0,517,518,1,0,0,0,518,519,5,31,0,0,519,97,1,0,0,0,520,521,5,30, + 0,0,521,99,1,0,0,0,522,523,7,7,0,0,523,101,1,0,0,0,524,525,5,5,0,0,525, + 526,3,104,52,0,526,103,1,0,0,0,527,528,5,69,0,0,528,529,3,2,1,0,529,530, + 5,70,0,0,530,105,1,0,0,0,531,532,5,17,0,0,532,533,5,106,0,0,533,107,1,0, + 0,0,534,535,5,12,0,0,535,536,5,110,0,0,536,109,1,0,0,0,537,538,5,3,0,0, + 538,541,5,90,0,0,539,540,5,88,0,0,540,542,3,54,27,0,541,539,1,0,0,0,541, + 542,1,0,0,0,542,552,1,0,0,0,543,544,5,89,0,0,544,549,3,112,56,0,545,546, + 5,38,0,0,546,548,3,112,56,0,547,545,1,0,0,0,548,551,1,0,0,0,549,547,1,0, + 0,0,549,550,1,0,0,0,550,553,1,0,0,0,551,549,1,0,0,0,552,543,1,0,0,0,552, + 553,1,0,0,0,553,111,1,0,0,0,554,555,3,54,27,0,555,556,5,36,0,0,556,558, + 1,0,0,0,557,554,1,0,0,0,557,558,1,0,0,0,558,559,1,0,0,0,559,560,3,54,27, + 0,560,113,1,0,0,0,561,562,5,11,0,0,562,563,3,32,16,0,563,564,5,88,0,0,564, + 565,3,56,28,0,565,115,1,0,0,0,54,127,136,152,164,173,181,185,193,195,200, + 207,212,219,225,233,235,246,253,264,267,281,289,297,301,308,316,324,337, + 341,345,352,356,362,369,377,385,407,418,429,434,438,449,454,458,472,483, + 497,508,511,516,541,549,552,557]; private static __ATN: ATN; public static get _ATN(): ATN { @@ -4262,11 +4344,11 @@ export class FromCommandContext extends ParserRuleContext { public FROM(): TerminalNode { return this.getToken(esql_parser.FROM, 0); } - public indexIdentifier_list(): IndexIdentifierContext[] { - return this.getTypedRuleContexts(IndexIdentifierContext) as IndexIdentifierContext[]; + public indexPattern_list(): IndexPatternContext[] { + return this.getTypedRuleContexts(IndexPatternContext) as IndexPatternContext[]; } - public indexIdentifier(i: number): IndexIdentifierContext { - return this.getTypedRuleContext(IndexIdentifierContext, i) as IndexIdentifierContext; + public indexPattern(i: number): IndexPatternContext { + return this.getTypedRuleContext(IndexPatternContext, i) as IndexPatternContext; } public COMMA_list(): TerminalNode[] { return this.getTokens(esql_parser.COMMA); @@ -4293,25 +4375,82 @@ export class FromCommandContext extends ParserRuleContext { } -export class IndexIdentifierContext extends ParserRuleContext { +export class IndexPatternContext extends ParserRuleContext { constructor(parser?: esql_parser, parent?: ParserRuleContext, invokingState?: number) { super(parent, invokingState); this.parser = parser; } - public INDEX_UNQUOTED_IDENTIFIER(): TerminalNode { - return this.getToken(esql_parser.INDEX_UNQUOTED_IDENTIFIER, 0); + public clusterString(): ClusterStringContext { + return this.getTypedRuleContext(ClusterStringContext, 0) as ClusterStringContext; + } + public COLON(): TerminalNode { + return this.getToken(esql_parser.COLON, 0); + } + public indexString(): IndexStringContext { + return this.getTypedRuleContext(IndexStringContext, 0) as IndexStringContext; } public get ruleIndex(): number { - return esql_parser.RULE_indexIdentifier; + return esql_parser.RULE_indexPattern; } public enterRule(listener: esql_parserListener): void { - if(listener.enterIndexIdentifier) { - listener.enterIndexIdentifier(this); + if(listener.enterIndexPattern) { + listener.enterIndexPattern(this); } } public exitRule(listener: esql_parserListener): void { - if(listener.exitIndexIdentifier) { - listener.exitIndexIdentifier(this); + if(listener.exitIndexPattern) { + listener.exitIndexPattern(this); + } + } +} + + +export class ClusterStringContext extends ParserRuleContext { + constructor(parser?: esql_parser, parent?: ParserRuleContext, invokingState?: number) { + super(parent, invokingState); + this.parser = parser; + } + public UNQUOTED_SOURCE(): TerminalNode { + return this.getToken(esql_parser.UNQUOTED_SOURCE, 0); + } + public get ruleIndex(): number { + return esql_parser.RULE_clusterString; + } + public enterRule(listener: esql_parserListener): void { + if(listener.enterClusterString) { + listener.enterClusterString(this); + } + } + public exitRule(listener: esql_parserListener): void { + if(listener.exitClusterString) { + listener.exitClusterString(this); + } + } +} + + +export class IndexStringContext extends ParserRuleContext { + constructor(parser?: esql_parser, parent?: ParserRuleContext, invokingState?: number) { + super(parent, invokingState); + this.parser = parser; + } + public UNQUOTED_SOURCE(): TerminalNode { + return this.getToken(esql_parser.UNQUOTED_SOURCE, 0); + } + public QUOTED_STRING(): TerminalNode { + return this.getToken(esql_parser.QUOTED_STRING, 0); + } + public get ruleIndex(): number { + return esql_parser.RULE_indexString; + } + public enterRule(listener: esql_parserListener): void { + if(listener.enterIndexString) { + listener.enterIndexString(this); + } + } + public exitRule(listener: esql_parserListener): void { + if(listener.exitIndexString) { + listener.exitIndexString(this); } } } @@ -4352,11 +4491,11 @@ export class MetadataOptionContext extends ParserRuleContext { public METADATA(): TerminalNode { return this.getToken(esql_parser.METADATA, 0); } - public indexIdentifier_list(): IndexIdentifierContext[] { - return this.getTypedRuleContexts(IndexIdentifierContext) as IndexIdentifierContext[]; + public UNQUOTED_SOURCE_list(): TerminalNode[] { + return this.getTokens(esql_parser.UNQUOTED_SOURCE); } - public indexIdentifier(i: number): IndexIdentifierContext { - return this.getTypedRuleContext(IndexIdentifierContext, i) as IndexIdentifierContext; + public UNQUOTED_SOURCE(i: number): TerminalNode { + return this.getToken(esql_parser.UNQUOTED_SOURCE, i); } public COMMA_list(): TerminalNode[] { return this.getTokens(esql_parser.COMMA); @@ -4364,7 +4503,7 @@ export class MetadataOptionContext extends ParserRuleContext { public COMMA(i: number): TerminalNode { return this.getToken(esql_parser.COMMA, i); } - public get ruleIndex(): number { + public get ruleIndex(): number { return esql_parser.RULE_metadataOption; } public enterRule(listener: esql_parserListener): void { @@ -4420,11 +4559,11 @@ export class MetricsCommandContext extends ParserRuleContext { public METRICS(): TerminalNode { return this.getToken(esql_parser.METRICS, 0); } - public indexIdentifier_list(): IndexIdentifierContext[] { - return this.getTypedRuleContexts(IndexIdentifierContext) as IndexIdentifierContext[]; + public indexPattern_list(): IndexPatternContext[] { + return this.getTypedRuleContexts(IndexPatternContext) as IndexPatternContext[]; } - public indexIdentifier(i: number): IndexIdentifierContext { - return this.getTypedRuleContext(IndexIdentifierContext, i) as IndexIdentifierContext; + public indexPattern(i: number): IndexPatternContext { + return this.getTypedRuleContext(IndexPatternContext, i) as IndexPatternContext; } public COMMA_list(): TerminalNode[] { return this.getTokens(esql_parser.COMMA); @@ -5776,7 +5915,7 @@ export class EnrichWithClauseContext extends ParserRuleContext { export class LookupCommandContext extends ParserRuleContext { - public _tableName!: Token; + public _tableName!: IndexPatternContext; public _matchFields!: QualifiedNamePatternsContext; constructor(parser?: esql_parser, parent?: ParserRuleContext, invokingState?: number) { super(parent, invokingState); @@ -5788,8 +5927,8 @@ export class LookupCommandContext extends ParserRuleContext { public ON(): TerminalNode { return this.getToken(esql_parser.ON, 0); } - public INDEX_UNQUOTED_IDENTIFIER(): TerminalNode { - return this.getToken(esql_parser.INDEX_UNQUOTED_IDENTIFIER, 0); + public indexPattern(): IndexPatternContext { + return this.getTypedRuleContext(IndexPatternContext, 0) as IndexPatternContext; } public qualifiedNamePatterns(): QualifiedNamePatternsContext { return this.getTypedRuleContext(QualifiedNamePatternsContext, 0) as QualifiedNamePatternsContext; diff --git a/packages/kbn-esql-ast/src/antlr/esql_parser_listener.ts b/packages/kbn-esql-ast/src/antlr/esql_parser_listener.ts index eee7a421a1593d..e6a28c8d718285 100644 --- a/packages/kbn-esql-ast/src/antlr/esql_parser_listener.ts +++ b/packages/kbn-esql-ast/src/antlr/esql_parser_listener.ts @@ -33,7 +33,9 @@ import { RowCommandContext } from "./esql_parser"; import { FieldsContext } from "./esql_parser"; import { FieldContext } from "./esql_parser"; import { FromCommandContext } from "./esql_parser"; -import { IndexIdentifierContext } from "./esql_parser"; +import { IndexPatternContext } from "./esql_parser"; +import { ClusterStringContext } from "./esql_parser"; +import { IndexStringContext } from "./esql_parser"; import { MetadataContext } from "./esql_parser"; import { MetadataOptionContext } from "./esql_parser"; import { Deprecated_metadataContext } from "./esql_parser"; @@ -419,15 +421,35 @@ export default class esql_parserListener extends ParseTreeListener { */ exitFromCommand?: (ctx: FromCommandContext) => void; /** - * Enter a parse tree produced by `esql_parser.indexIdentifier`. + * Enter a parse tree produced by `esql_parser.indexPattern`. * @param ctx the parse tree */ - enterIndexIdentifier?: (ctx: IndexIdentifierContext) => void; + enterIndexPattern?: (ctx: IndexPatternContext) => void; /** - * Exit a parse tree produced by `esql_parser.indexIdentifier`. + * Exit a parse tree produced by `esql_parser.indexPattern`. * @param ctx the parse tree */ - exitIndexIdentifier?: (ctx: IndexIdentifierContext) => void; + exitIndexPattern?: (ctx: IndexPatternContext) => void; + /** + * Enter a parse tree produced by `esql_parser.clusterString`. + * @param ctx the parse tree + */ + enterClusterString?: (ctx: ClusterStringContext) => void; + /** + * Exit a parse tree produced by `esql_parser.clusterString`. + * @param ctx the parse tree + */ + exitClusterString?: (ctx: ClusterStringContext) => void; + /** + * Enter a parse tree produced by `esql_parser.indexString`. + * @param ctx the parse tree + */ + enterIndexString?: (ctx: IndexStringContext) => void; + /** + * Exit a parse tree produced by `esql_parser.indexString`. + * @param ctx the parse tree + */ + exitIndexString?: (ctx: IndexStringContext) => void; /** * Enter a parse tree produced by `esql_parser.metadata`. * @param ctx the parse tree diff --git a/packages/kbn-esql-ast/src/ast_factory.ts b/packages/kbn-esql-ast/src/ast_factory.ts index 9d76ff3a7cd4d6..18c2a3c7ecbecd 100644 --- a/packages/kbn-esql-ast/src/ast_factory.ts +++ b/packages/kbn-esql-ast/src/ast_factory.ts @@ -29,7 +29,7 @@ import { default as esql_parser, type MetaCommandContext, type MetricsCommandContext, - IndexIdentifierContext, + IndexPatternContext, } from './antlr/esql_parser'; import { default as ESQLParserListener } from './antlr/esql_parser_listener'; import { @@ -154,7 +154,7 @@ export class AstListener implements ESQLParserListener { type: 'command', args: [], sources: ctx - .getTypedRuleContexts(IndexIdentifierContext) + .getTypedRuleContexts(IndexPatternContext) .map((sourceCtx) => createSource(sourceCtx)), }; this.ast.push(node); diff --git a/packages/kbn-esql-ast/src/ast_helpers.ts b/packages/kbn-esql-ast/src/ast_helpers.ts index 76e130f2338077..f3c5ad0b0df18f 100644 --- a/packages/kbn-esql-ast/src/ast_helpers.ts +++ b/packages/kbn-esql-ast/src/ast_helpers.ts @@ -275,12 +275,24 @@ function safeBackticksRemoval(text: string | undefined) { return text?.replace(TICKS_REGEX, '').replace(DOUBLE_TICKS_REGEX, SINGLE_BACKTICK) || ''; } +function sanitizeSourceString(ctx: ParserRuleContext) { + const contextText = ctx.getText(); + // If wrapped by triple quote, remove + if (contextText.startsWith(`"""`) && contextText.endsWith(`"""`)) { + return contextText.replace(/\"\"\"/g, ''); + } + // If wrapped by single quote, remove + if (contextText.startsWith(`"`) && contextText.endsWith(`"`)) { + return contextText.slice(1, -1); + } + return contextText; +} + export function sanitizeIdentifierString(ctx: ParserRuleContext) { const result = getUnquotedText(ctx)?.getText() || safeBackticksRemoval(getQuotedText(ctx)?.getText()) || safeBackticksRemoval(ctx.getText()); // for some reason some quoted text is not detected correctly by the parser - // TODO - understand why is now returned as the match text for the FROM command return result === '' ? '' : result; } @@ -321,7 +333,7 @@ export function createSource( ctx: ParserRuleContext, type: 'index' | 'policy' = 'index' ): ESQLSource { - const text = sanitizeIdentifierString(ctx); + const text = sanitizeSourceString(ctx); return { type: 'source', name: text, diff --git a/packages/kbn-esql-ast/src/ast_walker.ts b/packages/kbn-esql-ast/src/ast_walker.ts index 870301b938a659..33aa91f66a2a6d 100644 --- a/packages/kbn-esql-ast/src/ast_walker.ts +++ b/packages/kbn-esql-ast/src/ast_walker.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { type ParserRuleContext } from 'antlr4'; +import { ParserRuleContext, TerminalNode } from 'antlr4'; import { default as esql_parser, ArithmeticBinaryContext, @@ -57,10 +57,10 @@ import { StringLiteralContext, type ValueExpressionContext, ValueExpressionDefaultContext, - IndexIdentifierContext, InlineCastContext, InputNamedOrPositionalParamContext, InputParamContext, + IndexPatternContext, } from './antlr/esql_parser'; import { createSource, @@ -98,16 +98,27 @@ import type { } from './types'; export function collectAllSourceIdentifiers(ctx: FromCommandContext): ESQLAstItem[] { - const fromContexts = ctx.getTypedRuleContexts(IndexIdentifierContext); - + const fromContexts = ctx.getTypedRuleContexts(IndexPatternContext); return fromContexts.map((sourceCtx) => createSource(sourceCtx)); } +function terminalNodeToParserRuleContext(node: TerminalNode): ParserRuleContext { + const context = new ParserRuleContext(); + context.start = node.symbol; + context.stop = node.symbol; + context.children = [node]; + return context; +} function extractIdentifiers( ctx: KeepCommandContext | DropCommandContext | MvExpandCommandContext | MetadataOptionContext ) { if (ctx instanceof MetadataOptionContext) { - return wrapIdentifierAsArray(ctx.indexIdentifier_list()); + return ctx + .UNQUOTED_SOURCE_list() + .map((node) => { + return terminalNodeToParserRuleContext(node); + }) + .flat(); } if (ctx instanceof MvExpandCommandContext) { return wrapIdentifierAsArray(ctx.qualifiedName()); diff --git a/packages/kbn-esql-utils/src/utils/query_parsing_helpers.test.ts b/packages/kbn-esql-utils/src/utils/query_parsing_helpers.test.ts index b1bafc2ce43597..ab5c1ca04ac7f4 100644 --- a/packages/kbn-esql-utils/src/utils/query_parsing_helpers.test.ts +++ b/packages/kbn-esql-utils/src/utils/query_parsing_helpers.test.ts @@ -64,6 +64,12 @@ describe('esql query helpers', () => { 'METRICS pods load=avg(cpu), writes=max(rate(indexing_requests)) BY pod | SORT pod' ); expect(idxPattern16).toBe('pods'); + + const idxPattern17 = getIndexPatternFromESQLQuery('FROM "$foo%"'); + expect(idxPattern17).toBe('$foo%'); + + const idxPattern18 = getIndexPatternFromESQLQuery('FROM """foo-{{mm-dd_yy}}"""'); + expect(idxPattern18).toBe('foo-{{mm-dd_yy}}'); }); }); diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.from.ts b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.from.ts index 74301ced77e630..06d23a30c441d2 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.from.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.from.ts @@ -20,7 +20,7 @@ export const validationFromCommandTestSuite = (setup: helpers.Setup) => { "SyntaxError: mismatched input 'f' expecting {'explain', 'from', 'meta', 'metrics', 'row', 'show'}", ]); await expectErrors('from ', [ - "SyntaxError: missing INDEX_UNQUOTED_IDENTIFIER at ''", + "SyntaxError: mismatched input '' expecting {UNQUOTED_SOURCE, QUOTED_STRING}", ]); }); @@ -30,6 +30,8 @@ export const validationFromCommandTestSuite = (setup: helpers.Setup) => { await expectErrors('from index', []); await expectErrors('FROM index', []); + await expectErrors('FROM "index"', []); + await expectErrors('FROM """index"""', []); await expectErrors('FrOm index', []); await expectErrors('from index, other_index', []); await expectErrors('from index, other_index,.secret_index', []); @@ -65,10 +67,10 @@ export const validationFromCommandTestSuite = (setup: helpers.Setup) => { const { expectErrors } = await setup(); await expectErrors('from index,', [ - "SyntaxError: missing INDEX_UNQUOTED_IDENTIFIER at ''", + "SyntaxError: mismatched input '' expecting {UNQUOTED_SOURCE, QUOTED_STRING}", ]); await expectErrors(`FROM index\n, \tother_index\t,\n \t `, [ - "SyntaxError: missing INDEX_UNQUOTED_IDENTIFIER at ''", + "SyntaxError: mismatched input '' expecting {UNQUOTED_SOURCE, QUOTED_STRING}", ]); await expectErrors(`from assignment = 1`, [ @@ -80,10 +82,7 @@ export const validationFromCommandTestSuite = (setup: helpers.Setup) => { test('errors on invalid syntax', async () => { const { expectErrors } = await setup(); - await expectErrors('FROM `index`', [ - "SyntaxError: token recognition error at: '`'", - "SyntaxError: token recognition error at: '`'", - ]); + await expectErrors('FROM `index`', ['Unknown index [`index`]']); await expectErrors(`from assignment = 1`, [ "SyntaxError: mismatched input '=' expecting ", 'Unknown index [assignment]', diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.metrics.ts b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.metrics.ts index 5d1ddb0865ea53..44c15c722a1ded 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.metrics.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/test_suites/validation.command.metrics.ts @@ -19,7 +19,7 @@ export const validationMetricsCommandTestSuite = (setup: helpers.Setup) => { "SyntaxError: mismatched input 'm' expecting {'explain', 'from', 'meta', 'metrics', 'row', 'show'}", ]); await expectErrors('metrics ', [ - "SyntaxError: missing INDEX_UNQUOTED_IDENTIFIER at ''", + "SyntaxError: mismatched input '' expecting {UNQUOTED_SOURCE, QUOTED_STRING}", ]); }); @@ -61,10 +61,10 @@ export const validationMetricsCommandTestSuite = (setup: helpers.Setup) => { const { expectErrors } = await setup(); await expectErrors('metrics index,', [ - "SyntaxError: missing INDEX_UNQUOTED_IDENTIFIER at ''", + "SyntaxError: mismatched input '' expecting {UNQUOTED_SOURCE, QUOTED_STRING}", ]); await expectErrors(`metrics index\n, \tother_index\t,\n \t `, [ - "SyntaxError: missing INDEX_UNQUOTED_IDENTIFIER at ''", + "SyntaxError: mismatched input '' expecting {UNQUOTED_SOURCE, QUOTED_STRING}", ]); }); @@ -75,10 +75,7 @@ export const validationMetricsCommandTestSuite = (setup: helpers.Setup) => { "SyntaxError: token recognition error at: '='", "SyntaxError: token recognition error at: '1'", ]); - await expectErrors('metrics `index`', [ - "SyntaxError: token recognition error at: '`'", - "SyntaxError: token recognition error at: '`'", - ]); + await expectErrors('metrics `index`', ['Unknown index [`index`]']); }); test('errors on unknown index', async () => { diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json b/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json index daf8d7c6de8621..c49f5c7af82dfb 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json +++ b/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json @@ -8662,7 +8662,8 @@ { "query": "from a_index | enrich `this``is fine`", "error": [ - "SyntaxError: mismatched input '`this``is fine`' expecting ENRICH_POLICY_NAME" + "SyntaxError: extraneous input 'fine`' expecting ", + "Unknown policy [`this``is]" ], "warning": [] }, @@ -26377,7 +26378,7 @@ { "query": "from ", "error": [ - "SyntaxError: missing INDEX_UNQUOTED_IDENTIFIER at ''" + "SyntaxError: mismatched input '' expecting {UNQUOTED_SOURCE, QUOTED_STRING}" ], "warning": [] }, @@ -26391,6 +26392,16 @@ "error": [], "warning": [] }, + { + "query": "FROM \"index\"", + "error": [], + "warning": [] + }, + { + "query": "FROM \"\"\"index\"\"\"", + "error": [], + "warning": [] + }, { "query": "FrOm index", "error": [], @@ -26539,14 +26550,14 @@ { "query": "from index,", "error": [ - "SyntaxError: missing INDEX_UNQUOTED_IDENTIFIER at ''" + "SyntaxError: mismatched input '' expecting {UNQUOTED_SOURCE, QUOTED_STRING}" ], "warning": [] }, { "query": "FROM index\n, \tother_index\t,\n \t ", "error": [ - "SyntaxError: missing INDEX_UNQUOTED_IDENTIFIER at ''" + "SyntaxError: mismatched input '' expecting {UNQUOTED_SOURCE, QUOTED_STRING}" ], "warning": [] }, @@ -26561,8 +26572,7 @@ { "query": "FROM `index`", "error": [ - "SyntaxError: token recognition error at: '`'", - "SyntaxError: token recognition error at: '`'" + "Unknown index [`index`]" ], "warning": [] }, diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts index 6c1b66574862c3..14d9c50d5c88c1 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts @@ -1359,7 +1359,8 @@ describe('validation logic', () => { ]); testErrorsAndWarnings(`from a_index | enrich policy `, []); testErrorsAndWarnings('from a_index | enrich `this``is fine`', [ - "SyntaxError: mismatched input '`this``is fine`' expecting ENRICH_POLICY_NAME", + "SyntaxError: extraneous input 'fine`' expecting ", + 'Unknown policy [`this``is]', ]); testErrorsAndWarnings('from a_index | enrich this is fine', [ "SyntaxError: mismatched input 'is' expecting ", From 41ee64709f8c7ca1e0bc72ac4b5a74076d68ba26 Mon Sep 17 00:00:00 2001 From: Alex Szabo Date: Tue, 9 Jul 2024 19:36:34 +0200 Subject: [PATCH 086/103] [CI] Remove kme leftovers (#187762) ## Summary These were used for testing the migration from the kibana-buildkite infra to the elastic-wide buildkite infra. Now we're done with most of the migration, we can clean these up. --- .buildkite/pipeline-utils/agent_images.ts | 17 ++++++- .../ci-stats/pick_test_group_run_order.ts | 25 ++-------- .buildkite/pipelines/flaky_tests/pipeline.ts | 38 ++------------- .buildkite/pipelines/on_merge.yml | 14 ------ .buildkite/pull_requests.json | 46 ------------------- .buildkite/scripts/common/vault_fns.sh | 14 ++---- catalog-info.yaml | 28 ----------- 7 files changed, 28 insertions(+), 154 deletions(-) diff --git a/.buildkite/pipeline-utils/agent_images.ts b/.buildkite/pipeline-utils/agent_images.ts index 0606f036b1c647..d139f7953e00fa 100644 --- a/.buildkite/pipeline-utils/agent_images.ts +++ b/.buildkite/pipeline-utils/agent_images.ts @@ -52,4 +52,19 @@ function getAgentImageConfig({ returnYaml = false } = {}): string | AgentImageCo return config; } -export { getAgentImageConfig }; +const expandAgentQueue = (queueName: string = 'n2-4-spot') => { + const [kind, cores, addition] = queueName.split('-'); + const additionalProps = + { + spot: { preemptible: true }, + virt: { localSsdInterface: 'nvme', enableNestedVirtualization: true, localSsds: 1 }, + }[addition] || {}; + + return { + ...getAgentImageConfig(), + machineType: `${kind}-standard-${cores}`, + ...additionalProps, + }; +}; + +export { getAgentImageConfig, expandAgentQueue }; diff --git a/.buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts b/.buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts index 20b2d366e60675..a24214b1e62b0d 100644 --- a/.buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts +++ b/.buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts @@ -16,27 +16,10 @@ import { BuildkiteClient, BuildkiteStep } from '../buildkite'; import { CiStatsClient, TestGroupRunOrderResponse } from './client'; import DISABLED_JEST_CONFIGS from '../../disabled_jest_configs.json'; -import { getAgentImageConfig } from '#pipeline-utils'; +import { expandAgentQueue } from '#pipeline-utils'; type RunGroup = TestGroupRunOrderResponse['types'][0]; -// TODO: remove this after https://github.com/elastic/kibana-operations/issues/15 is finalized -/** This function bridges the agent targeting between gobld and kibana-buildkite agent targeting */ -const getAgentRule = (queueName: string = 'n2-4-spot') => { - if (process.env?.BUILDKITE_AGENT_META_DATA_QUEUE === 'gobld') { - const [kind, cores, spot] = queueName.split('-'); - return { - ...getAgentImageConfig(), - machineType: `${kind}-standard-${cores}`, - preemptible: spot === 'spot', - }; - } else { - return { - queue: queueName, - }; - } -}; - const getRequiredEnv = (name: string) => { const value = process.env[name]; if (typeof value !== 'string' || !value) { @@ -436,7 +419,7 @@ export async function pickTestGroupRunOrder() { parallelism: unit.count, timeout_in_minutes: 120, key: 'jest', - agents: getAgentRule('n2-4-spot'), + agents: expandAgentQueue('n2-4-spot'), retry: { automatic: [ { exit_status: '-1', limit: 3 }, @@ -454,7 +437,7 @@ export async function pickTestGroupRunOrder() { parallelism: integration.count, timeout_in_minutes: 120, key: 'jest-integration', - agents: getAgentRule('n2-4-spot'), + agents: expandAgentQueue('n2-4-spot'), retry: { automatic: [ { exit_status: '-1', limit: 3 }, @@ -488,7 +471,7 @@ export async function pickTestGroupRunOrder() { label: title, command: getRequiredEnv('FTR_CONFIGS_SCRIPT'), timeout_in_minutes: 90, - agents: getAgentRule(queue), + agents: expandAgentQueue(queue), env: { FTR_CONFIG_GROUP_KEY: key, ...FTR_EXTRA_ARGS, diff --git a/.buildkite/pipelines/flaky_tests/pipeline.ts b/.buildkite/pipelines/flaky_tests/pipeline.ts index 6a5b7da38a1436..d77504deacb454 100644 --- a/.buildkite/pipelines/flaky_tests/pipeline.ts +++ b/.buildkite/pipelines/flaky_tests/pipeline.ts @@ -7,7 +7,7 @@ */ import { groups } from './groups.json'; -import { BuildkiteStep } from '#pipeline-utils'; +import { BuildkiteStep, expandAgentQueue } from '#pipeline-utils'; const configJson = process.env.KIBANA_FLAKY_TEST_RUNNER_CONFIG; if (!configJson) { @@ -32,34 +32,6 @@ if (Number.isNaN(concurrency)) { const BASE_JOBS = 1; const MAX_JOBS = 500; -// TODO: remove this after https://github.com/elastic/kibana-operations/issues/15 is finalized -/** This function bridges the agent targeting between gobld and kibana-buildkite agent targeting */ -const getAgentRule = (queueName: string = 'n2-4-spot') => { - if ( - process.env.BUILDKITE_AGENT_META_DATA_QUEUE === 'gobld' || - process.env.BUILDKITE_AGENT_META_DATA_PROVIDER === 'k8s' - ) { - const [kind, cores, addition] = queueName.split('-'); - const additionalProps = - { - spot: { preemptible: true }, - virt: { localSsdInterface: 'nvme', enableNestedVirtualization: true, localSsds: 1 }, - }[addition] || {}; - - return { - provider: 'gcp', - image: 'family/kibana-ubuntu-2004', - imageProject: 'elastic-images-prod', - machineType: `${kind}-standard-${cores}`, - ...additionalProps, - }; - } else { - return { - queue: queueName, - }; - } -}; - function getTestSuitesFromJson(json: string) { const fail = (errorMsg: string) => { console.error('+++ Invalid test config provided'); @@ -150,7 +122,7 @@ const pipeline = { steps.push({ command: '.buildkite/scripts/steps/build_kibana.sh', label: 'Build Kibana Distribution and Plugins', - agents: getAgentRule('c2-8'), + agents: expandAgentQueue('c2-8'), key: 'build', if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''", }); @@ -173,7 +145,7 @@ for (const testSuite of testSuites) { concurrency, concurrency_group: process.env.UUID, concurrency_method: 'eager', - agents: getAgentRule('n2-4-spot'), + agents: expandAgentQueue('n2-4-spot'), depends_on: 'build', timeout_in_minutes: 150, cancel_on_build_failing: true, @@ -197,7 +169,7 @@ for (const testSuite of testSuites) { steps.push({ command: `.buildkite/scripts/steps/functional/${suiteName}.sh`, label: group.name, - agents: getAgentRule(agentQueue), + agents: expandAgentQueue(agentQueue), key: `cypress-suite-${suiteIndex++}`, depends_on: 'build', timeout_in_minutes: 150, @@ -233,7 +205,7 @@ pipeline.steps.push({ pipeline.steps.push({ command: 'ts-node .buildkite/pipelines/flaky_tests/post_stats_on_pr.ts', label: 'Post results on Github pull request', - agents: getAgentRule('n2-4-spot'), + agents: expandAgentQueue('n2-4-spot'), timeout_in_minutes: 15, retry: { automatic: [{ exit_status: '-1', limit: 3 }], diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml index ae6c05721ae843..d6f838414cff4d 100644 --- a/.buildkite/pipelines/on_merge.yml +++ b/.buildkite/pipelines/on_merge.yml @@ -23,20 +23,6 @@ steps: imageProject: elastic-images-prod provider: gcp machineType: n2-standard-2 - # TODO: this can probably be deleted after the migration https://github.com/elastic/kibana-operations/issues/15 - plugins: - - chronotc/monorepo-diff#v2.0.4: - watch: - - path: - - 'versions.json' - config: - command: 'ts-node .buildkite/scripts/steps/trigger_pipeline.ts kibana-buildkite-pipelines-deploy main' - label: 'Trigger pipeline deploy' - agents: - image: family/kibana-ubuntu-2004 - imageProject: elastic-images-prod - provider: gcp - machineType: n2-standard-2 - command: .buildkite/scripts/steps/on_merge_build_and_metrics.sh label: Build Kibana Distribution and Plugins diff --git a/.buildkite/pull_requests.json b/.buildkite/pull_requests.json index 0c6714d1c75b77..0758e0255247f6 100644 --- a/.buildkite/pull_requests.json +++ b/.buildkite/pull_requests.json @@ -45,52 +45,6 @@ "/__snapshots__/", "\\.test\\.(ts|tsx|js|jsx)" ] - }, - { - "repoOwner": "elastic", - "repoName": "kibana", - "pipelineSlug": "kibana-kme-test", - - "enabled": true, - "allow_org_users": true, - "allowed_repo_permissions": ["admin", "write"], - "set_commit_status": true, - "commit_status_context": "kibana-ci-test", - "build_on_commit": true, - "build_on_comment": false, - "trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))", - "skip_ci_labels": [], - "labels": ["kme-test"], - "skip_target_branches": ["6.8", "7.11", "7.12"], - "enable_skippable_commits": true, - "skip_ci_on_only_changed": [ - "^dev_docs/", - "^docs/", - "^rfcs/", - "^\\.github/", - "\\.md$", - "\\.mdx$", - "^api_docs/.+\\.devdocs\\.json$", - "^\\.backportrc\\.json$", - "^nav-kibana-dev\\.docnav\\.json$", - "^src/dev/prs/kibana_qa_pr_list\\.json$", - "^\\.buildkite/pull_requests\\.json$", - "^\\.catalog-info\\.yaml$" - ], - "always_require_ci_on_changed": [ - "^docs/developer/plugin-list.asciidoc$", - "^\\.github/CODEOWNERS$", - "/plugins/[^/]+/readme\\.(md|asciidoc)$" - ], - "kibana_versions_check": true, - "kibana_build_reuse": true, - "kibana_build_reuse_pipeline_slugs": ["kibana-kme-test", "kibana-on-merge"], - "kibana_build_reuse_regexes": [ - "^test/", - "^x-pack/test/", - "/__snapshots__/", - "\\.test\\.(ts|tsx|js|jsx)" - ] } ] } diff --git a/.buildkite/scripts/common/vault_fns.sh b/.buildkite/scripts/common/vault_fns.sh index c9c51b2c7bb92c..fa99b214c1be62 100644 --- a/.buildkite/scripts/common/vault_fns.sh +++ b/.buildkite/scripts/common/vault_fns.sh @@ -1,17 +1,9 @@ #!/bin/bash -# TODO: rewrite after https://github.com/elastic/kibana-operations/issues/15 is done export LEGACY_VAULT_ADDR="https://secrets.elastic.co:8200" -if [[ "${VAULT_ADDR:-}" == "$LEGACY_VAULT_ADDR" ]]; then - VAULT_PATH_PREFIX="secret/kibana-issues/dev" - VAULT_KV_PREFIX="secret/kibana-issues/dev" - IS_LEGACY_VAULT_ADDR=true -else - VAULT_PATH_PREFIX="secret/ci/elastic-kibana" - VAULT_KV_PREFIX="kv/ci-shared/kibana-deployments" - IS_LEGACY_VAULT_ADDR=false -fi -export IS_LEGACY_VAULT_ADDR +export VAULT_PATH_PREFIX="secret/ci/elastic-kibana" +export VAULT_KV_PREFIX="kv/ci-shared/kibana-deployments" +export IS_LEGACY_VAULT_ADDR=false retry() { local retries=$1; shift diff --git a/catalog-info.yaml b/catalog-info.yaml index aae8fc1af81d83..4af2698ca6cca4 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -97,34 +97,6 @@ spec: # yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json apiVersion: backstage.io/v1alpha1 kind: Resource -metadata: - name: buildkite-pipeline-kibana-kme-test -spec: - implementation: - apiVersion: buildkite.elastic.dev/v1 - kind: Pipeline - metadata: - description: Temporary pipeline for testing Kibana KME work - name: kibana-kme-test - spec: - pipeline_file: .buildkite/scripts/pipelines/pull_request/pipeline.sh - provider_settings: - build_branches: false - build_pull_requests: true - publish_commit_status: false - trigger_mode: none - repository: elastic/kibana - teams: - kibana-operations: - access_level: MANAGE_BUILD_AND_READ - everyone: - access_level: READ_ONLY - owner: group:kibana-operations - type: buildkite-pipeline ---- -# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json -apiVersion: backstage.io/v1alpha1 -kind: Resource metadata: name: buildkite-pipeline-kibana-sonarqube description: Run a SonarQube scan From 75f9377dd4f2b5d8bc0689e58058dde347568f7f Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Wed, 10 Jul 2024 03:51:19 +1000 Subject: [PATCH 087/103] Update kubernetes templates for elastic-agent (#187881) Automated by https://buildkite.com/elastic/elastic-agent/builds/10272 --- x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts b/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts index 4b7068336bbc50..6eff632c06abb5 100644 --- a/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts +++ b/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts @@ -42,7 +42,7 @@ spec: # - -c # - >- # mkdir -p /usr/share/elastic-agent/state/inputs.d && - # curl -sL https://github.com/elastic/elastic-agent/archive/8.15.tar.gz | tar xz -C /usr/share/elastic-agent/state/inputs.d --strip=5 "elastic-agent-8.15/deploy/kubernetes/elastic-agent/templates.d" + # curl -sL https://github.com/elastic/elastic-agent/archive/8.16.tar.gz | tar xz -C /usr/share/elastic-agent/state/inputs.d --strip=5 "elastic-agent-8.16/deploy/kubernetes/elastic-agent/templates.d" # securityContext: # runAsUser: 0 # volumeMounts: From 4f8d54a75427537d3a4bcca11e160c97fcd895e1 Mon Sep 17 00:00:00 2001 From: Christos Nasikas Date: Tue, 9 Jul 2024 20:59:01 +0300 Subject: [PATCH 088/103] [ResponseOps][Cases] Make custom fields and the cases webhook GA (#187880) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary This PR makes the custom fields and the cases web hook GA. Screenshot 2024-07-09 at 6 51 24 PM Screenshot 2024-07-09 at 6 51 15 PM ## Release notes Cases custom fields and the cases webhook are now GA. ### 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) --- .../plugins/cases/docs/openapi/bundled.yaml | 12 -------- .../case_configure_response_properties.yaml | 29 +++++++++---------- .../schemas/case_response_properties.yaml | 17 +++++------ .../schemas/create_case_request.yaml | 1 - .../set_case_configuration_request.yaml | 1 - .../update_case_configuration_request.yaml | 5 ++-- .../schemas/update_case_request.yaml | 1 - .../public/components/custom_fields/index.tsx | 10 +------ .../connector_types/cases_webhook/webhook.tsx | 1 - 9 files changed, 25 insertions(+), 52 deletions(-) diff --git a/x-pack/plugins/cases/docs/openapi/bundled.yaml b/x-pack/plugins/cases/docs/openapi/bundled.yaml index 08032c30e7f501..7aeea6de8e052b 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.yaml +++ b/x-pack/plugins/cases/docs/openapi/bundled.yaml @@ -281,7 +281,6 @@ paths: - elastic customFields: type: array - x-technical-preview: true description: Custom fields configuration details. items: type: object @@ -478,7 +477,6 @@ paths: - elastic customFields: type: array - x-technical-preview: true description: Custom fields configuration details. items: type: object @@ -677,7 +675,6 @@ paths: - elastic customFields: type: array - x-technical-preview: true description: Custom fields configuration details. items: type: object @@ -1548,7 +1545,6 @@ paths: - elastic customFields: type: array - x-technical-preview: true description: Custom fields configuration details. items: type: object @@ -1746,7 +1742,6 @@ paths: - elastic customFields: type: array - x-technical-preview: true description: Custom fields configuration details. items: type: object @@ -1946,7 +1941,6 @@ paths: - elastic customFields: type: array - x-technical-preview: true description: Custom fields configuration details. items: type: object @@ -3305,7 +3299,6 @@ components: type: array description: | Custom field values for a case. Any optional custom fields that are not specified in the request are set to null. - x-technical-preview: true minItems: 0 maxItems: 10 items: @@ -3804,7 +3797,6 @@ components: customFields: type: array description: Custom field values for the case. - x-technical-preview: true items: type: object properties: @@ -3933,7 +3925,6 @@ components: type: array description: | Custom field values for a case. Any optional custom fields that are not specified in the request are set to null. - x-technical-preview: true minItems: 0 maxItems: 10 items: @@ -4053,7 +4044,6 @@ components: $ref: '#/components/schemas/connector_types' customFields: type: array - x-technical-preview: true description: Custom field values in the template. items: type: object @@ -4135,7 +4125,6 @@ components: customFields: type: array description: Custom fields case configuration. - x-technical-preview: true minItems: 0 maxItems: 10 items: @@ -4216,7 +4205,6 @@ components: customFields: type: array description: Custom fields case configuration. - x-technical-preview: true items: type: object required: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml index 26a7ed41685a1f..1085e1f8ef974d 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml @@ -1,6 +1,6 @@ closure_type: $ref: 'closure_types.yaml' -connector: +connector: type: object properties: $ref: 'case_configure_connector_properties.yaml' @@ -12,14 +12,13 @@ created_at: created_by: type: object required: - - email - - full_name - - username + - email + - full_name + - username properties: $ref: 'user_properties.yaml' customFields: type: array - x-technical-preview: true description: Custom fields configuration details. items: type: object @@ -27,8 +26,8 @@ customFields: $ref: 'case_configure_customfields.yaml' error: type: - - "string" - - "null" + - 'string' + - 'null' examples: - null id: @@ -58,22 +57,22 @@ templates: $ref: 'templates.yaml' updated_at: type: - - "string" - - "null" + - 'string' + - 'null' format: date-time examples: - 2022-06-01T19:58:48.169Z updated_by: type: - - "object" - - "null" + - 'object' + - 'null' required: - - email - - full_name - - username + - email + - full_name + - username properties: $ref: 'user_properties.yaml' version: type: string examples: - - WzIwNzMsMV0= \ No newline at end of file + - WzIwNzMsMV0= diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml index 5aaa73416bacdd..a0ef24983502f3 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml @@ -27,13 +27,13 @@ properties: $ref: 'assignees.yaml' category: type: - - "string" - - "null" + - 'string' + - 'null' description: The case category. closed_at: type: - - "string" - - "null" + - 'string' + - 'null' format: date-time closed_by: $ref: 'case_response_closed_by_properties.yaml' @@ -81,7 +81,6 @@ properties: customFields: type: array description: Custom field values for the case. - x-technical-preview: true items: type: object properties: @@ -92,8 +91,8 @@ properties: - A case description. duration: type: - - "integer" - - "null" + - 'integer' + - 'null' description: > The elapsed time from the creation of the case to its closure (in seconds). If the case has not been closed, the duration is set to null. If the case @@ -135,8 +134,8 @@ properties: - 0 updated_at: type: - - "string" - - "null" + - 'string' + - 'null' format: date-time updated_by: $ref: 'case_response_updated_by_properties.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml index d58dea6472c21c..94e9ecae9254d3 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml @@ -40,7 +40,6 @@ properties: description: > Custom field values for a case. Any optional custom fields that are not specified in the request are set to null. - x-technical-preview: true minItems: 0 maxItems: 10 items: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/set_case_configuration_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/set_case_configuration_request.yaml index 6bcfad6a736c1f..dd275406264b54 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/set_case_configuration_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/set_case_configuration_request.yaml @@ -21,7 +21,6 @@ properties: customFields: type: array description: Custom fields case configuration. - x-technical-preview: true minItems: 0 maxItems: 10 items: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml index 56db4597f8b954..e359eea8e1030c 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml @@ -2,7 +2,7 @@ title: Update case configuration request description: > You can update settings such as the closure type, custom fields, templates, and the default connector for cases. type: object -required: +required: - version properties: closure_type: @@ -20,7 +20,6 @@ properties: customFields: type: array description: Custom fields case configuration. - x-technical-preview: true items: type: object required: @@ -38,4 +37,4 @@ properties: To retrieve the version value, use the get configuration API. type: string examples: - - WzIwMiwxXQ== \ No newline at end of file + - WzIwMiwxXQ== diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml index 3288f5a9476c03..8062128c03450b 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml @@ -34,7 +34,6 @@ properties: description: > Custom field values for a case. Any optional custom fields that are not specified in the request are set to null. - x-technical-preview: true minItems: 0 maxItems: 10 items: diff --git a/x-pack/plugins/cases/public/components/custom_fields/index.tsx b/x-pack/plugins/cases/public/components/custom_fields/index.tsx index a5068df682ad19..afe3a4ad04b32b 100644 --- a/x-pack/plugins/cases/public/components/custom_fields/index.tsx +++ b/x-pack/plugins/cases/public/components/custom_fields/index.tsx @@ -21,7 +21,6 @@ import { useCasesContext } from '../cases_context/use_cases_context'; import type { CustomFieldsConfiguration } from '../../../common/types/domain'; import { MAX_CUSTOM_FIELDS_PER_CASE } from '../../../common/constants'; import { CustomFieldsList } from './custom_fields_list'; -import { ExperimentalBadge } from '../experimental_badge/experimental_badge'; export interface Props { customFields: CustomFieldsConfiguration; @@ -68,14 +67,7 @@ const CustomFieldsComponent: React.FC = ({ return canAddCustomFields ? ( - {i18n.TITLE} - - - - - } + title={

{i18n.TITLE}

} description={

{i18n.DESCRIPTION}

} data-test-subj="custom-fields-form-group" > diff --git a/x-pack/plugins/stack_connectors/public/connector_types/cases_webhook/webhook.tsx b/x-pack/plugins/stack_connectors/public/connector_types/cases_webhook/webhook.tsx index 6e86df15c09c73..c5475532608130 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/cases_webhook/webhook.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/cases_webhook/webhook.tsx @@ -27,7 +27,6 @@ export function getConnectorType(): ConnectorTypeModel< defaultMessage: 'Send a request to a Case Management web service.', } ), - isExperimental: true, actionTypeTitle: i18n.translate( 'xpack.stackConnectors.components.casesWebhookxpack.stackConnectors.components.casesWebhook.connectorTypeTitle', { From 369277fcbcc9ad7af322e56460532b675e19e775 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Tue, 9 Jul 2024 13:05:08 -0500 Subject: [PATCH 089/103] Revert "[CI] Remove kme leftovers (#187762)" This reverts commit 41ee64709f8c7ca1e0bc72ac4b5a74076d68ba26. --- .buildkite/pipeline-utils/agent_images.ts | 17 +------ .../ci-stats/pick_test_group_run_order.ts | 25 ++++++++-- .buildkite/pipelines/flaky_tests/pipeline.ts | 38 +++++++++++++-- .buildkite/pipelines/on_merge.yml | 14 ++++++ .buildkite/pull_requests.json | 46 +++++++++++++++++++ .buildkite/scripts/common/vault_fns.sh | 14 ++++-- catalog-info.yaml | 28 +++++++++++ 7 files changed, 154 insertions(+), 28 deletions(-) diff --git a/.buildkite/pipeline-utils/agent_images.ts b/.buildkite/pipeline-utils/agent_images.ts index d139f7953e00fa..0606f036b1c647 100644 --- a/.buildkite/pipeline-utils/agent_images.ts +++ b/.buildkite/pipeline-utils/agent_images.ts @@ -52,19 +52,4 @@ function getAgentImageConfig({ returnYaml = false } = {}): string | AgentImageCo return config; } -const expandAgentQueue = (queueName: string = 'n2-4-spot') => { - const [kind, cores, addition] = queueName.split('-'); - const additionalProps = - { - spot: { preemptible: true }, - virt: { localSsdInterface: 'nvme', enableNestedVirtualization: true, localSsds: 1 }, - }[addition] || {}; - - return { - ...getAgentImageConfig(), - machineType: `${kind}-standard-${cores}`, - ...additionalProps, - }; -}; - -export { getAgentImageConfig, expandAgentQueue }; +export { getAgentImageConfig }; diff --git a/.buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts b/.buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts index a24214b1e62b0d..20b2d366e60675 100644 --- a/.buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts +++ b/.buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts @@ -16,10 +16,27 @@ import { BuildkiteClient, BuildkiteStep } from '../buildkite'; import { CiStatsClient, TestGroupRunOrderResponse } from './client'; import DISABLED_JEST_CONFIGS from '../../disabled_jest_configs.json'; -import { expandAgentQueue } from '#pipeline-utils'; +import { getAgentImageConfig } from '#pipeline-utils'; type RunGroup = TestGroupRunOrderResponse['types'][0]; +// TODO: remove this after https://github.com/elastic/kibana-operations/issues/15 is finalized +/** This function bridges the agent targeting between gobld and kibana-buildkite agent targeting */ +const getAgentRule = (queueName: string = 'n2-4-spot') => { + if (process.env?.BUILDKITE_AGENT_META_DATA_QUEUE === 'gobld') { + const [kind, cores, spot] = queueName.split('-'); + return { + ...getAgentImageConfig(), + machineType: `${kind}-standard-${cores}`, + preemptible: spot === 'spot', + }; + } else { + return { + queue: queueName, + }; + } +}; + const getRequiredEnv = (name: string) => { const value = process.env[name]; if (typeof value !== 'string' || !value) { @@ -419,7 +436,7 @@ export async function pickTestGroupRunOrder() { parallelism: unit.count, timeout_in_minutes: 120, key: 'jest', - agents: expandAgentQueue('n2-4-spot'), + agents: getAgentRule('n2-4-spot'), retry: { automatic: [ { exit_status: '-1', limit: 3 }, @@ -437,7 +454,7 @@ export async function pickTestGroupRunOrder() { parallelism: integration.count, timeout_in_minutes: 120, key: 'jest-integration', - agents: expandAgentQueue('n2-4-spot'), + agents: getAgentRule('n2-4-spot'), retry: { automatic: [ { exit_status: '-1', limit: 3 }, @@ -471,7 +488,7 @@ export async function pickTestGroupRunOrder() { label: title, command: getRequiredEnv('FTR_CONFIGS_SCRIPT'), timeout_in_minutes: 90, - agents: expandAgentQueue(queue), + agents: getAgentRule(queue), env: { FTR_CONFIG_GROUP_KEY: key, ...FTR_EXTRA_ARGS, diff --git a/.buildkite/pipelines/flaky_tests/pipeline.ts b/.buildkite/pipelines/flaky_tests/pipeline.ts index d77504deacb454..6a5b7da38a1436 100644 --- a/.buildkite/pipelines/flaky_tests/pipeline.ts +++ b/.buildkite/pipelines/flaky_tests/pipeline.ts @@ -7,7 +7,7 @@ */ import { groups } from './groups.json'; -import { BuildkiteStep, expandAgentQueue } from '#pipeline-utils'; +import { BuildkiteStep } from '#pipeline-utils'; const configJson = process.env.KIBANA_FLAKY_TEST_RUNNER_CONFIG; if (!configJson) { @@ -32,6 +32,34 @@ if (Number.isNaN(concurrency)) { const BASE_JOBS = 1; const MAX_JOBS = 500; +// TODO: remove this after https://github.com/elastic/kibana-operations/issues/15 is finalized +/** This function bridges the agent targeting between gobld and kibana-buildkite agent targeting */ +const getAgentRule = (queueName: string = 'n2-4-spot') => { + if ( + process.env.BUILDKITE_AGENT_META_DATA_QUEUE === 'gobld' || + process.env.BUILDKITE_AGENT_META_DATA_PROVIDER === 'k8s' + ) { + const [kind, cores, addition] = queueName.split('-'); + const additionalProps = + { + spot: { preemptible: true }, + virt: { localSsdInterface: 'nvme', enableNestedVirtualization: true, localSsds: 1 }, + }[addition] || {}; + + return { + provider: 'gcp', + image: 'family/kibana-ubuntu-2004', + imageProject: 'elastic-images-prod', + machineType: `${kind}-standard-${cores}`, + ...additionalProps, + }; + } else { + return { + queue: queueName, + }; + } +}; + function getTestSuitesFromJson(json: string) { const fail = (errorMsg: string) => { console.error('+++ Invalid test config provided'); @@ -122,7 +150,7 @@ const pipeline = { steps.push({ command: '.buildkite/scripts/steps/build_kibana.sh', label: 'Build Kibana Distribution and Plugins', - agents: expandAgentQueue('c2-8'), + agents: getAgentRule('c2-8'), key: 'build', if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''", }); @@ -145,7 +173,7 @@ for (const testSuite of testSuites) { concurrency, concurrency_group: process.env.UUID, concurrency_method: 'eager', - agents: expandAgentQueue('n2-4-spot'), + agents: getAgentRule('n2-4-spot'), depends_on: 'build', timeout_in_minutes: 150, cancel_on_build_failing: true, @@ -169,7 +197,7 @@ for (const testSuite of testSuites) { steps.push({ command: `.buildkite/scripts/steps/functional/${suiteName}.sh`, label: group.name, - agents: expandAgentQueue(agentQueue), + agents: getAgentRule(agentQueue), key: `cypress-suite-${suiteIndex++}`, depends_on: 'build', timeout_in_minutes: 150, @@ -205,7 +233,7 @@ pipeline.steps.push({ pipeline.steps.push({ command: 'ts-node .buildkite/pipelines/flaky_tests/post_stats_on_pr.ts', label: 'Post results on Github pull request', - agents: expandAgentQueue('n2-4-spot'), + agents: getAgentRule('n2-4-spot'), timeout_in_minutes: 15, retry: { automatic: [{ exit_status: '-1', limit: 3 }], diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml index d6f838414cff4d..ae6c05721ae843 100644 --- a/.buildkite/pipelines/on_merge.yml +++ b/.buildkite/pipelines/on_merge.yml @@ -23,6 +23,20 @@ steps: imageProject: elastic-images-prod provider: gcp machineType: n2-standard-2 + # TODO: this can probably be deleted after the migration https://github.com/elastic/kibana-operations/issues/15 + plugins: + - chronotc/monorepo-diff#v2.0.4: + watch: + - path: + - 'versions.json' + config: + command: 'ts-node .buildkite/scripts/steps/trigger_pipeline.ts kibana-buildkite-pipelines-deploy main' + label: 'Trigger pipeline deploy' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-2 - command: .buildkite/scripts/steps/on_merge_build_and_metrics.sh label: Build Kibana Distribution and Plugins diff --git a/.buildkite/pull_requests.json b/.buildkite/pull_requests.json index 0758e0255247f6..0c6714d1c75b77 100644 --- a/.buildkite/pull_requests.json +++ b/.buildkite/pull_requests.json @@ -45,6 +45,52 @@ "/__snapshots__/", "\\.test\\.(ts|tsx|js|jsx)" ] + }, + { + "repoOwner": "elastic", + "repoName": "kibana", + "pipelineSlug": "kibana-kme-test", + + "enabled": true, + "allow_org_users": true, + "allowed_repo_permissions": ["admin", "write"], + "set_commit_status": true, + "commit_status_context": "kibana-ci-test", + "build_on_commit": true, + "build_on_comment": false, + "trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))", + "skip_ci_labels": [], + "labels": ["kme-test"], + "skip_target_branches": ["6.8", "7.11", "7.12"], + "enable_skippable_commits": true, + "skip_ci_on_only_changed": [ + "^dev_docs/", + "^docs/", + "^rfcs/", + "^\\.github/", + "\\.md$", + "\\.mdx$", + "^api_docs/.+\\.devdocs\\.json$", + "^\\.backportrc\\.json$", + "^nav-kibana-dev\\.docnav\\.json$", + "^src/dev/prs/kibana_qa_pr_list\\.json$", + "^\\.buildkite/pull_requests\\.json$", + "^\\.catalog-info\\.yaml$" + ], + "always_require_ci_on_changed": [ + "^docs/developer/plugin-list.asciidoc$", + "^\\.github/CODEOWNERS$", + "/plugins/[^/]+/readme\\.(md|asciidoc)$" + ], + "kibana_versions_check": true, + "kibana_build_reuse": true, + "kibana_build_reuse_pipeline_slugs": ["kibana-kme-test", "kibana-on-merge"], + "kibana_build_reuse_regexes": [ + "^test/", + "^x-pack/test/", + "/__snapshots__/", + "\\.test\\.(ts|tsx|js|jsx)" + ] } ] } diff --git a/.buildkite/scripts/common/vault_fns.sh b/.buildkite/scripts/common/vault_fns.sh index fa99b214c1be62..c9c51b2c7bb92c 100644 --- a/.buildkite/scripts/common/vault_fns.sh +++ b/.buildkite/scripts/common/vault_fns.sh @@ -1,9 +1,17 @@ #!/bin/bash +# TODO: rewrite after https://github.com/elastic/kibana-operations/issues/15 is done export LEGACY_VAULT_ADDR="https://secrets.elastic.co:8200" -export VAULT_PATH_PREFIX="secret/ci/elastic-kibana" -export VAULT_KV_PREFIX="kv/ci-shared/kibana-deployments" -export IS_LEGACY_VAULT_ADDR=false +if [[ "${VAULT_ADDR:-}" == "$LEGACY_VAULT_ADDR" ]]; then + VAULT_PATH_PREFIX="secret/kibana-issues/dev" + VAULT_KV_PREFIX="secret/kibana-issues/dev" + IS_LEGACY_VAULT_ADDR=true +else + VAULT_PATH_PREFIX="secret/ci/elastic-kibana" + VAULT_KV_PREFIX="kv/ci-shared/kibana-deployments" + IS_LEGACY_VAULT_ADDR=false +fi +export IS_LEGACY_VAULT_ADDR retry() { local retries=$1; shift diff --git a/catalog-info.yaml b/catalog-info.yaml index 4af2698ca6cca4..aae8fc1af81d83 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -97,6 +97,34 @@ spec: # yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json apiVersion: backstage.io/v1alpha1 kind: Resource +metadata: + name: buildkite-pipeline-kibana-kme-test +spec: + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + description: Temporary pipeline for testing Kibana KME work + name: kibana-kme-test + spec: + pipeline_file: .buildkite/scripts/pipelines/pull_request/pipeline.sh + provider_settings: + build_branches: false + build_pull_requests: true + publish_commit_status: false + trigger_mode: none + repository: elastic/kibana + teams: + kibana-operations: + access_level: MANAGE_BUILD_AND_READ + everyone: + access_level: READ_ONLY + owner: group:kibana-operations + type: buildkite-pipeline +--- +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource metadata: name: buildkite-pipeline-kibana-sonarqube description: Run a SonarQube scan From 4b38ffde3e472dcba8d4c6d254ceea9b3e4dfbe0 Mon Sep 17 00:00:00 2001 From: DeDe Morton Date: Tue, 9 Jul 2024 11:24:33 -0700 Subject: [PATCH 090/103] [docs] Add note about accessing Azure OpenAI through a proxy (#186436) ## Summary Closes https://github.com/elastic/observability-docs/issues/4005. ### Checklist n/a --- .../connectors/action-types/openai.asciidoc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/management/connectors/action-types/openai.asciidoc b/docs/management/connectors/action-types/openai.asciidoc index 49033b92cd7408..968f5a1e30f3a6 100644 --- a/docs/management/connectors/action-types/openai.asciidoc +++ b/docs/management/connectors/action-types/openai.asciidoc @@ -4,8 +4,8 @@ OpenAI ++++ :frontmatter-description: Add a connector that can send requests to an OpenAI provider. -:frontmatter-tags-products: [kibana] -:frontmatter-tags-content-type: [how-to] +:frontmatter-tags-products: [kibana] +:frontmatter-tags-content-type: [how-to] :frontmatter-tags-user-goals: [configure] @@ -21,6 +21,17 @@ You can create connectors in *{stack-manage-app} > {connectors-ui}*. For exampl image::management/connectors/images/gen-ai-connector.png[OpenAI connector] // NOTE: This is an autogenerated screenshot. Do not edit it directly. +[IMPORTANT] +==== +Elastic provides no official support for connecting to the Azure OpenAI service through a proxy. +However if you must use a proxy, +ensure that the proxy supports streaming and is SSE-compatible. +Elastic will only parse streamed responses. + +To validate that your connectivity problems are caused by using a proxy, +you can attempt to set up the connector and access the Azure OpenAI service without using a proxy. +==== + [float] [[openai-connector-configuration]] ==== Connector configuration @@ -46,7 +57,7 @@ image::management/connectors/images/gen-ai-params-test.png[OpenAI params test] The OpenAI actions have the following configuration properties. -Body:: A JSON payload sent to the OpenAI API URL. For example: +Body:: A JSON payload sent to the OpenAI API URL. For example: + [source,text] -- From d8947189680a1c50dd3595af080bd770d49be0be Mon Sep 17 00:00:00 2001 From: Brad White Date: Tue, 9 Jul 2024 12:30:12 -0600 Subject: [PATCH 091/103] [FIPS / Build] Move OpenSSL compile to builder step (#187814) ## Summary This moves the OpenSSL compilation and it's dependencies into the builder step for the FIPS Docker image. This reduces (582MB to 445MB) the FIPS image to ~15MB larger than the Kibana image ### Testing 1. `docker pull docker.elastic.co/kibana-ci/kibana-ubi-fips:8.16.0-SNAPSHOT-5d7290bf1c8af263aedd6d617279ff15cef7de03` 2. `docker run --rm -it -p 5601:5601/tcp docker.elastic.co/kibana-ci/kibana-ubi-fips:8.16.0-SNAPSHOT-5d7290bf1c8af263aedd6d617279ff15cef7de03` 3. `docker exec -it bash` 4. `node/glibc-217/bin/node --enable-fips --openssl-config="$HOME/config/nodejs.cnf" -p 'crypto.getFips()'` 5. Output should be `1` indicating FIPS is working successfully. --- .../templates/base/Dockerfile | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile b/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile index ecb93cfd50792d..a8daba08d37b4e 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile +++ b/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile @@ -12,7 +12,7 @@ FROM {{{baseImageName}}} AS builder {{#ubi}} -RUN microdnf install -y findutils tar gzip +RUN microdnf install -y findutils tar gzip{{#fips}} perl make gcc{{/fips}} {{/ubi}} {{#ubuntu}} RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl @@ -37,6 +37,30 @@ WORKDIR /usr/share/kibana RUN tar \ --strip-components=1 \ -zxf /tmp/kibana.tar.gz + +{{#fips}} +# OpenSSL requires specific versions that are FIPS certified. +# +# See: +# https://github.com/openssl/openssl/blob/openssl-3.0/README-FIPS.md +# https://www.openssl.org/docs/man3.0/man7/fips_module.html +RUN set -e ; \ + OPENSSL_VERSION='3.0.8'; \ + OPENSSL_PATH=/usr/share/kibana/openssl ; \ + mkdir "${OPENSSL_PATH}"; \ + curl --retry 8 -S -L -O "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" ; \ + curl --retry 8 -S -L -O "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz.sha256" ; \ + echo "$(cat openssl-${OPENSSL_VERSION}.tar.gz.sha256) openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c ; \ + tar -zxf "openssl-${OPENSSL_VERSION}.tar.gz" ; \ + rm -rf openssl-${OPENSSL_VERSION}.tar* ; \ + cd "/usr/share/kibana/openssl-${OPENSSL_VERSION}" ; \ + ./Configure --prefix="${OPENSSL_PATH}" --openssldir="${OPENSSL_PATH}/ssl" --libdir="${OPENSSL_PATH}/lib" enable-fips; \ + make -j $(nproc) > /dev/null ; \ + make install > /dev/null ; \ + rm -rf "/usr/share/kibana/openssl-${OPENSSL_VERSION}" ; \ + chown -R 1000:0 "${OPENSSL_PATH}"; + +{{/fips}} # Ensure that group permissions are the same as user permissions. # This will help when relying on GID-0 to run Kibana, rather than UID-1000. # OpenShift does this, for example. @@ -90,7 +114,7 @@ EXPOSE 5601 RUN for iter in {1..10}; do \ microdnf update --setopt=tsflags=nodocs -y && \ microdnf install --setopt=tsflags=nodocs -y \ - fontconfig freetype shadow-utils nss findutils {{#fips}}perl make gcc tar {{/fips}}&& \ + fontconfig freetype shadow-utils nss findutils && \ microdnf clean all && exit_code=0 && break || exit_code=$? && echo "microdnf error: retry $iter in 10s" && \ sleep 10; \ done; \ @@ -127,30 +151,6 @@ RUN fc-cache -v WORKDIR /usr/share/kibana {{#fips}} -# OpenSSL requires specific versions that are FIPS certified. Further, the FIPS modules -# need to be compiled on the machine to pass its own self validation on startup. -# -# See: -# https://github.com/openssl/openssl/blob/openssl-3.0/README-FIPS.md -# https://www.openssl.org/docs/man3.0/man7/fips_module.html - -# Ideally we would handle this in the builder step, but OpenSSL requires linking of many submodules. -RUN set -e ; \ - OPENSSL_VERSION='3.0.8'; \ - OPENSSL_PATH=/usr/share/kibana/openssl ; \ - mkdir "${OPENSSL_PATH}"; \ - curl --retry 8 -S -L -O "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" ; \ - curl --retry 8 -S -L -O "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz.sha256" ; \ - echo "$(cat openssl-${OPENSSL_VERSION}.tar.gz.sha256) openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c ; \ - tar -zxf "openssl-${OPENSSL_VERSION}.tar.gz" ; \ - rm -rf openssl-${OPENSSL_VERSION}.tar* ; \ - cd "/usr/share/kibana/openssl-${OPENSSL_VERSION}" ; \ - ./Configure --prefix="${OPENSSL_PATH}" --openssldir="${OPENSSL_PATH}/ssl" --libdir="${OPENSSL_PATH}/lib" enable-fips; \ - make -j $(nproc) > /dev/null ; \ - make install > /dev/null ; \ - rm -rf "/usr/share/kibana/openssl-${OPENSSL_VERSION}" ; \ - chown -R 1000:0 "${OPENSSL_PATH}"; - # Enable FIPS for Kibana only. In the future we can override OS wide with ENV OPENSSL_CONF RUN /usr/bin/echo -e '\n--enable-fips' >> config/node.options RUN /usr/bin/echo '--openssl-config=/usr/share/kibana/config/nodejs.cnf' >> config/node.options From 799800d26d2edfaef5e424813d9f597774a95c25 Mon Sep 17 00:00:00 2001 From: Saarika Bhasi <55930906+saarikabhasi@users.noreply.github.com> Date: Tue, 9 Jul 2024 14:41:27 -0400 Subject: [PATCH 092/103] [Index management] Enable semantic_text feature (#187792) This PR enables semantic_text feature by default. How to test: 1. Spin up Serverless or stack instance locally 2. Navigate to index management-> index overview page-> index mappings 3. Click add new field 4. Ensure semantic_text field type is shown in Field type form by default Tested in ESS and Serverless locally ### Checklist Delete any items that are not applicable to this PR. - [ ] [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 --- .../__jest__/client_integration/helpers/setup_environment.tsx | 2 +- .../index_details_page/index_details_page.test.tsx | 1 - x-pack/plugins/index_management/public/plugin.ts | 2 +- x-pack/plugins/index_management/server/config.ts | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx b/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx index 19490125e88403..633ed96ec82258 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx @@ -86,7 +86,7 @@ const appDependencies = { editableIndexSettings: 'all', enableMappingsSourceFieldSection: true, enableTogglingDataRetention: true, - enableSemanticText: false, + enableSemanticText: true, }, overlays: { openConfirm: jest.fn(), diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx index c79efbbf53f536..9998dbf0e98741 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx @@ -671,7 +671,6 @@ describe('', () => { testBed = await setup({ httpSetup, dependencies: { - config: { enableSemanticText: true }, docLinks: { links: { ml: '', diff --git a/x-pack/plugins/index_management/public/plugin.ts b/x-pack/plugins/index_management/public/plugin.ts index f6ae66d8e52bcd..136174dfac1656 100644 --- a/x-pack/plugins/index_management/public/plugin.ts +++ b/x-pack/plugins/index_management/public/plugin.ts @@ -74,7 +74,7 @@ export class IndexMgmtUIPlugin editableIndexSettings: editableIndexSettings ?? 'all', enableMappingsSourceFieldSection: enableMappingsSourceFieldSection ?? true, enableTogglingDataRetention: enableTogglingDataRetention ?? true, - enableSemanticText: enableSemanticText ?? false, + enableSemanticText: enableSemanticText ?? true, }; } diff --git a/x-pack/plugins/index_management/server/config.ts b/x-pack/plugins/index_management/server/config.ts index 8625274e31d2a5..f2d1808a442866 100644 --- a/x-pack/plugins/index_management/server/config.ts +++ b/x-pack/plugins/index_management/server/config.ts @@ -36,7 +36,7 @@ const schemaLatest = schema.object( // deprecated as unused after index details page has been implemented enableIndexDetailsPage: schema.boolean({ defaultValue: false }), // deprecate as unused after semantic text is enabled everywhere - enableSemanticText: schema.boolean({ defaultValue: false }), + enableSemanticText: schema.boolean({ defaultValue: true }), }), enableIndexStats: offeringBasedSchema({ // Index stats information is disabled in serverless; refer to the serverless.yml file as the source of truth From 4b8ba30dd429131a280ec7df9bf21a02480063a4 Mon Sep 17 00:00:00 2001 From: Lola Date: Tue, 9 Jul 2024 15:21:19 -0400 Subject: [PATCH 093/103] [Cloud Security] fix vulnerability dashboard ftr flaky test (#187790) ## Summary Summarize your PR. If it involves visual changes include a screenshot or gif. Fix Flaky Vulnerability Dashboard Test --- .../routes/vulnerabilities_dashboard.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/x-pack/test/cloud_security_posture_api/routes/vulnerabilities_dashboard.ts b/x-pack/test/cloud_security_posture_api/routes/vulnerabilities_dashboard.ts index aa2887a04da212..8f2a2fa2693d47 100644 --- a/x-pack/test/cloud_security_posture_api/routes/vulnerabilities_dashboard.ts +++ b/x-pack/test/cloud_security_posture_api/routes/vulnerabilities_dashboard.ts @@ -186,16 +186,13 @@ export default function ({ getService }: FtrProviderContext) { describe('Vulnerability Dashboard API', async () => { beforeEach(async () => { + await index.removeFindings(); + await index.removeScores(); await waitForPluginInitialized(); await index.addScores(scoresVulnerabilitiesMock); await index.addFindings(vulnerabilitiesLatestMock); }); - afterEach(async () => { - await index.removeFindings(); - await index.removeScores(); - }); - it('responds with a 200 status code and matching data mock', async () => { const { body } = await supertest .get(`/internal/cloud_security_posture/vulnerabilities_dashboard`) From 45b0c251913b6978195291a5d317972fe8c83ddb Mon Sep 17 00:00:00 2001 From: Rickyanto Ang Date: Tue, 9 Jul 2024 13:01:00 -0700 Subject: [PATCH 094/103] [Cloud Security]Fix for flaky FTRs caused by duplicate names (#187784) ## Summary This PR is to address the following flaky FTRs https://github.com/elastic/kibana/issues/186302 https://github.com/elastic/kibana/issues/186315 https://github.com/elastic/kibana/issues/186387 https://github.com/elastic/kibana/issues/186389 The flakiness are being caused by having duplicate names for the integration when adding them. We tried adding wait before clicking on the Save button however that doesn't seem to work as it starts failing in the flaky test runner This PR gives the Integration a specific name (not relying on auto naming) --- .../add_cis_integration_form_page.ts | 8 ++++ .../cnvm/cis_integration_cnvm.ts | 11 ++++-- .../cspm/cis_integration_aws.ts | 36 ++++++++--------- .../cspm/cis_integration_azure.ts | 24 ++++++------ .../cspm/cis_integration_gcp.ts | 26 ++++++------- .../kspm/cis_integration_eks.ts | 39 ++++++++++--------- .../kspm/cis_integration_k8s.ts | 2 +- .../pages/findings.ts | 12 +++--- 8 files changed, 86 insertions(+), 72 deletions(-) diff --git a/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts b/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts index 1b2eda553dba2a..bf555e7fe72e4c 100644 --- a/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts +++ b/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { v4 as uuidv4 } from 'uuid'; import type { FtrProviderContext } from '../ftr_provider_context'; export function AddCisIntegrationFormPageProvider({ @@ -282,6 +283,12 @@ export function AddCisIntegrationFormPageProvider({ return await testSubjects.find(`button-replace-${secretField}`); }; + const inputUniqueIntegrationName = async () => { + const flyout = await testSubjects.find('createPackagePolicy_page'); + const nameField = await flyout.findAllByCssSelector('input[id="name"]'); + await nameField[0].type(uuidv4()); + }; + return { cisAzure, cisAws, @@ -316,5 +323,6 @@ export function AddCisIntegrationFormPageProvider({ isOptionChecked, checkIntegrationPliAuthBlockExists, getReplaceSecretButton, + inputUniqueIntegrationName, }; } diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cnvm/cis_integration_cnvm.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cnvm/cis_integration_cnvm.ts index 1b57e9a65d41e9..a91d35ea668be0 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cnvm/cis_integration_cnvm.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cnvm/cis_integration_cnvm.ts @@ -23,12 +23,13 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.navigateToAddIntegrationCspmPage(); }); - // FLAKY: https://github.com/elastic/kibana/issues/186302 - describe.skip('CNVM AWS', () => { + describe('CNVM AWS', () => { it('Hyperlink on PostInstallation Modal should have the correct URL', async () => { await cisIntegration.navigateToAddIntegrationCnvmPage(); + await cisIntegration.inputUniqueIntegrationName(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect( (await cisIntegration.getUrlOnPostInstallModal()) === 'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-whatis-howdoesitwork.html' @@ -50,8 +51,10 @@ export default function (providerContext: FtrProviderContext) { it('Clicking on Launch CloudFormation on post intall modal should lead user to Cloud Formation page', async () => { await cisIntegration.navigateToAddIntegrationCnvmPage(); + await cisIntegration.inputUniqueIntegrationName(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect( ( await cisIntegration.clickLaunchAndGetCurrentUrl( diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts index 5523e051209129..10c2f0560237cd 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts @@ -48,11 +48,11 @@ export default function (providerContext: FtrProviderContext) { it('Hyperlink on PostInstallation Modal should have the correct URL', async () => { await cisIntegration.clickOptionButton(CIS_AWS_OPTION_TEST_ID); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegrationAws.getPostInstallCloudFormationModal()) !== undefined).to.be( true ); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect( (await cisIntegration.getUrlOnPostInstallModal()) === 'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-whatis-howdoesitwork.html' @@ -73,7 +73,7 @@ export default function (providerContext: FtrProviderContext) { it('Clicking on Launch CloudFormation on post intall modal should lead user to Cloud Formation page', async () => { await cisIntegration.clickOptionButton(CIS_AWS_OPTION_TEST_ID); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect( ( await cisIntegration.clickLaunchAndGetCurrentUrl( @@ -92,7 +92,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(AWS_MANUAL_TEST_ID); await cisIntegration.fillInTextField(ROLE_ARN_TEST_ID, roleArn); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); expect((await cisIntegration.getFieldValueInEditPage(ROLE_ARN_TEST_ID)) === roleArn).to.be( @@ -109,7 +109,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(AWS_MANUAL_TEST_ID); await cisIntegration.clickOptionButton(AWS_CREDENTIAL_SELECTOR); await cisIntegration.selectValue(AWS_CREDENTIAL_SELECTOR, 'direct_access_keys'); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickOptionButton(AWS_MANUAL_TEST_ID); await cisIntegration.fillInTextField(DIRECT_ACCESS_KEY_ID_TEST_ID, directAccessKeyId); await cisIntegration.fillInTextField( @@ -117,7 +117,7 @@ export default function (providerContext: FtrProviderContext) { directAccessSecretKey ); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); expect( @@ -137,7 +137,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(AWS_MANUAL_TEST_ID); await cisIntegration.clickOptionButton(AWS_CREDENTIAL_SELECTOR); await cisIntegration.selectValue(AWS_CREDENTIAL_SELECTOR, 'temporary_keys'); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickOptionButton(AWS_MANUAL_TEST_ID); await cisIntegration.fillInTextField(TEMP_ACCESS_KEY_ID_TEST_ID, accessKeyId); await cisIntegration.fillInTextField( @@ -149,7 +149,7 @@ export default function (providerContext: FtrProviderContext) { tempAccessSessionToken ); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); await cisIntegration.clickFirstElementOnIntegrationTable(); @@ -172,7 +172,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(AWS_MANUAL_TEST_ID); await cisIntegration.clickOptionButton(AWS_CREDENTIAL_SELECTOR); await cisIntegration.selectValue(AWS_CREDENTIAL_SELECTOR, 'shared_credentials'); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickOptionButton(AWS_MANUAL_TEST_ID); await cisIntegration.fillInTextField(SHARED_CREDENTIALS_FILE_TEST_ID, sharedCredentialFile); await cisIntegration.fillInTextField( @@ -180,7 +180,7 @@ export default function (providerContext: FtrProviderContext) { sharedCredentialProfileName ); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); await cisIntegration.clickFirstElementOnIntegrationTable(); @@ -200,7 +200,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(CIS_AWS_OPTION_TEST_ID); await cisIntegration.clickOptionButton(AWS_SINGLE_ACCOUNT_TEST_ID); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect( (await cisIntegration.getUrlOnPostInstallModal()) === 'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-whatis-howdoesitwork.html' @@ -216,7 +216,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(AWS_MANUAL_TEST_ID); await cisIntegration.fillInTextField(ROLE_ARN_TEST_ID, roleArn); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); expect((await cisIntegration.getFieldValueInEditPage(ROLE_ARN_TEST_ID)) === roleArn).to.be( @@ -234,7 +234,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(AWS_MANUAL_TEST_ID); await cisIntegration.clickOptionButton(AWS_CREDENTIAL_SELECTOR); await cisIntegration.selectValue(AWS_CREDENTIAL_SELECTOR, 'direct_access_keys'); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickOptionButton(AWS_MANUAL_TEST_ID); await cisIntegration.fillInTextField(DIRECT_ACCESS_KEY_ID_TEST_ID, directAccessKeyId); await cisIntegration.fillInTextField( @@ -242,7 +242,7 @@ export default function (providerContext: FtrProviderContext) { directAccessSecretKey ); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); expect( @@ -263,7 +263,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(AWS_MANUAL_TEST_ID); await cisIntegration.clickOptionButton(AWS_CREDENTIAL_SELECTOR); await cisIntegration.selectValue(AWS_CREDENTIAL_SELECTOR, 'temporary_keys'); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickOptionButton(AWS_MANUAL_TEST_ID); await cisIntegration.fillInTextField(TEMP_ACCESS_KEY_ID_TEST_ID, accessKeyId); await cisIntegration.fillInTextField( @@ -275,7 +275,7 @@ export default function (providerContext: FtrProviderContext) { tempAccessSessionToken ); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); await cisIntegration.clickFirstElementOnIntegrationTable(); @@ -299,7 +299,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(AWS_MANUAL_TEST_ID); await cisIntegration.clickOptionButton(AWS_CREDENTIAL_SELECTOR); await cisIntegration.selectValue(AWS_CREDENTIAL_SELECTOR, 'shared_credentials'); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickOptionButton(AWS_MANUAL_TEST_ID); await cisIntegration.fillInTextField(SHARED_CREDENTIALS_FILE_TEST_ID, sharedCredentialFile); await cisIntegration.fillInTextField( @@ -307,7 +307,7 @@ export default function (providerContext: FtrProviderContext) { sharedCredentialProfileName ); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); await cisIntegration.clickFirstElementOnIntegrationTable(); diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts index 99cc57905d46e5..4415ec5a341609 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts @@ -53,7 +53,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(CIS_AZURE_OPTION_TEST_ID); await cisIntegration.clickOptionButton(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.ARM_TEMPLATE); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegrationAzure.getPostInstallArmTemplateModal()) !== undefined).to.be( true ); @@ -70,7 +70,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.MANUAL); await cisIntegration.selectValue(AZURE_CREDENTIAL_SELECTOR, 'managed_identity'); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); }); }); @@ -83,7 +83,7 @@ export default function (providerContext: FtrProviderContext) { AZURE_CREDENTIAL_SELECTOR, 'service_principal_with_client_secret' ); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.fillInTextField( CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_ID, clientId @@ -97,7 +97,7 @@ export default function (providerContext: FtrProviderContext) { clientSecret ); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); await cisIntegration.clickFirstElementOnIntegrationTable(); @@ -123,7 +123,7 @@ export default function (providerContext: FtrProviderContext) { AZURE_CREDENTIAL_SELECTOR, 'service_principal_with_client_certificate' ); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.fillInTextField( CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_ID, clientId @@ -137,7 +137,7 @@ export default function (providerContext: FtrProviderContext) { clientCertificatePath ); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); await cisIntegration.clickFirstElementOnIntegrationTable(); @@ -164,7 +164,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(CIS_AZURE_OPTION_TEST_ID); await cisIntegration.clickOptionButton(CIS_AZURE_SINGLE_SUB_TEST_ID); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegrationAzure.getPostInstallArmTemplateModal()) !== undefined).to.be( true ); @@ -182,7 +182,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.MANUAL); await cisIntegration.selectValue(AZURE_CREDENTIAL_SELECTOR, 'managed_identity'); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); }); }); @@ -195,7 +195,7 @@ export default function (providerContext: FtrProviderContext) { AZURE_CREDENTIAL_SELECTOR, 'service_principal_with_client_secret' ); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.fillInTextField( CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_ID, clientId @@ -209,7 +209,7 @@ export default function (providerContext: FtrProviderContext) { clientSecret ); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); await cisIntegration.clickFirstElementOnIntegrationTable(); @@ -235,7 +235,7 @@ export default function (providerContext: FtrProviderContext) { AZURE_CREDENTIAL_SELECTOR, 'service_principal_with_client_certificate' ); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.fillInTextField( CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_ID, clientId @@ -249,7 +249,7 @@ export default function (providerContext: FtrProviderContext) { clientCertificatePath ); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); await cisIntegration.clickFirstElementOnIntegrationTable(); diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_gcp.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_gcp.ts index 121bf7cc2e5749..6ce0c8fed57493 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_gcp.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_gcp.ts @@ -63,7 +63,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(GCP_ORGANIZATION_TEST_ID); await cisIntegration.clickOptionButton(GCP_CLOUD_SHELL_TEST_ID); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegrationGcp.isPostInstallGoogleCloudShellModal(true)) === true).to.be( true ); @@ -79,7 +79,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.fillInTextField('organization_id_test_id', organizationName); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect( (await cisIntegrationGcp.isPostInstallGoogleCloudShellModal( true, @@ -102,7 +102,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(GCP_CLOUD_SHELL_TEST_ID); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegrationGcp.isPostInstallGoogleCloudShellModal(false)) === true).to.be( true ); @@ -111,7 +111,7 @@ export default function (providerContext: FtrProviderContext) { it('Hyperlink on PostInstallation Modal should have the correct URL', async () => { await cisIntegration.clickOptionButton(CIS_GCP_OPTION_TEST_ID); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect( (await cisIntegration.getUrlOnPostInstallModal()) === 'https://cloud.google.com/shell/docs' @@ -121,7 +121,7 @@ export default function (providerContext: FtrProviderContext) { it('Clicking on Launch CloudShell on post intall modal should lead user to CloudShell page', async () => { await cisIntegration.clickOptionButton(CIS_GCP_OPTION_TEST_ID); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect( ( await cisIntegration.clickLaunchAndGetCurrentUrl( @@ -143,7 +143,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.fillInTextField(PRJ_ID_TEST_ID, projectName); await cisIntegration.fillInTextField(CREDENTIALS_FILE_TEST_ID, credentialFileName); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); expect( @@ -167,7 +167,7 @@ export default function (providerContext: FtrProviderContext) { ); await cisIntegration.fillInTextField(CREDENTIALS_JSON_TEST_ID, credentialJsonName); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); expect( @@ -183,7 +183,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(GCP_SINGLE_ACCOUNT_TEST_ID); await cisIntegration.clickOptionButton(GCP_CLOUD_SHELL_TEST_ID); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegrationGcp.isPostInstallGoogleCloudShellModal(false)) === true).to.be( true ); @@ -195,7 +195,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.clickOptionButton(GCP_CLOUD_SHELL_TEST_ID); await cisIntegration.fillInTextField('project_id_test_id', projectName); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect( (await cisIntegrationGcp.isPostInstallGoogleCloudShellModal(false, '', projectName)) === true @@ -230,7 +230,7 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.fillInTextField(PRJ_ID_TEST_ID, projectName); await cisIntegration.fillInTextField(CREDENTIALS_FILE_TEST_ID, credentialFileName); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); expect( @@ -248,7 +248,7 @@ export default function (providerContext: FtrProviderContext) { ); await cisIntegration.fillInTextField(CREDENTIALS_JSON_TEST_ID, credentialJsonName); await cisIntegration.clickSaveIntegrationButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.navigateToIntegrationCspList(); expect( (await cisIntegration.getFieldValueInEditPage(CREDENTIALS_JSON_TEST_ID)) === @@ -268,7 +268,7 @@ export default function (providerContext: FtrProviderContext) { ); await cisIntegration.fillInTextField(CREDENTIALS_JSON_TEST_ID, credentialJsonName); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); expect( @@ -286,7 +286,7 @@ export default function (providerContext: FtrProviderContext) { ); await cisIntegration.fillInTextField(CREDENTIALS_FILE_TEST_ID, credentialFileName); await cisIntegration.clickSaveIntegrationButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.navigateToIntegrationCspList(); expect( (await cisIntegration.getFieldValueInEditPage(CREDENTIALS_FILE_TEST_ID)) === diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts index db567d335b0ffe..f8d7736938f929 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts @@ -35,14 +35,14 @@ export default function (providerContext: FtrProviderContext) { await cisIntegration.navigateToAddIntegrationKspmPage(); }); - // FLAKY: https://github.com/elastic/kibana/issues/186306 - describe.skip('KSPM EKS Assume Role', async () => { + describe('KSPM EKS Assume Role', async () => { it('KSPM EKS Assume Role workflow', async () => { const roleArn = 'RoleArnTestValue'; await cisIntegration.clickOptionButton(CIS_EKS_OPTION_TEST_ID); + await cisIntegration.inputUniqueIntegrationName(); await cisIntegration.fillInTextField(ROLE_ARN_TEST_ID, roleArn); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); expect((await cisIntegration.getFieldValueInEditPage(ROLE_ARN_TEST_ID)) === roleArn).to.be( @@ -51,22 +51,23 @@ export default function (providerContext: FtrProviderContext) { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/186315 - describe.skip('KSPM EKS Direct Access', async () => { + describe('KSPM EKS Direct Access', async () => { it('KSPM EKS Direct Access Workflow', async () => { const directAccessKeyId = 'directAccessKeyIdTest'; const directAccessSecretKey = 'directAccessSecretKeyTest'; await cisIntegration.clickOptionButton(CIS_EKS_OPTION_TEST_ID); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickOptionButton(EKS_DIRECT_ACCESS_TEST_ID); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); + await cisIntegration.inputUniqueIntegrationName(); await cisIntegration.fillInTextField(DIRECT_ACCESS_KEY_ID_TEST_ID, directAccessKeyId); await cisIntegration.fillInTextField( DIRECT_ACCESS_SECRET_KEY_TEST_ID, directAccessSecretKey ); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); expect( @@ -77,16 +78,16 @@ export default function (providerContext: FtrProviderContext) { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/186389 - describe.skip('KSPM EKS Temporary Keys', () => { + describe('KSPM EKS Temporary Keys', () => { it('KSPM EKS Temporary Keys Workflow', async () => { const accessKeyId = 'accessKeyIdTest'; const accessKeySecretKey = 'accessKeySecretKeyTest'; const tempAccessSessionToken = 'tempAccessSessionTokenTest'; await cisIntegration.clickOptionButton(CIS_EKS_OPTION_TEST_ID); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickOptionButton(EKS_TEMPORARY_KEYS_TEST_ID); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); + await cisIntegration.inputUniqueIntegrationName(); await cisIntegration.fillInTextField(TEMP_ACCESS_KEY_ID_TEST_ID, accessKeyId); await cisIntegration.fillInTextField( TEMP_ACCESS_KEY_SECRET_KEY_TEST_ID, @@ -96,8 +97,9 @@ export default function (providerContext: FtrProviderContext) { TEMP_ACCESS_SESSION_TOKEN_TEST_ID, tempAccessSessionToken ); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); await cisIntegration.clickFirstElementOnIntegrationTable(); @@ -112,22 +114,23 @@ export default function (providerContext: FtrProviderContext) { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/186387 - describe.skip('KSPM EKS Shared Credentials', () => { + describe('KSPM EKS Shared Credentials', () => { it('KSPM EKS Shared Credentials Workflow', async () => { const sharedCredentialFile = 'sharedCredentialFileTest'; const sharedCredentialProfileName = 'sharedCredentialProfileNameTest'; await cisIntegration.clickOptionButton(CIS_EKS_OPTION_TEST_ID); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickOptionButton(EKS_SHARED_CREDENTIAL_TEST_ID); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); + await cisIntegration.inputUniqueIntegrationName(); await cisIntegration.fillInTextField(SHARED_CREDENTIALS_FILE_TEST_ID, sharedCredentialFile); await cisIntegration.fillInTextField( SHARED_CREDETIALS_PROFILE_NAME_TEST_ID, sharedCredentialProfileName ); + await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); await cisIntegration.clickFirstElementOnIntegrationTable(); diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_k8s.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_k8s.ts index ae2ede4046d110..872c786e3ce28b 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_k8s.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_k8s.ts @@ -25,7 +25,7 @@ export default function (providerContext: FtrProviderContext) { describe('KSPM K8S', () => { it('KSPM K8S Workflow', async () => { await cisIntegration.clickSaveButton(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect((await cisIntegration.getPostInstallModal()) !== undefined).to.be(true); await cisIntegration.navigateToIntegrationCspList(); await cisIntegration.clickFirstElementOnIntegrationTable(); diff --git a/x-pack/test/cloud_security_posture_functional/pages/findings.ts b/x-pack/test/cloud_security_posture_functional/pages/findings.ts index 16e63fac3491e1..3ea3475b857630 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/findings.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/findings.ts @@ -139,7 +139,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { 'Findings table to be loaded', async () => (await latestFindingsTable.getRowsCount()) === data.length ); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); }); afterEach(async () => { @@ -172,7 +172,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { for (const [columnName, dir, sortingMethod] of testCases) { await latestFindingsTable.toggleColumnSort(columnName, dir); /* This sleep or delay is added to allow some time for the column to settle down before we get the value and to prevent the test from getting the wrong value*/ - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); const values = (await latestFindingsTable.getColumnValues(columnName)).filter(Boolean); expect(values).to.not.be.empty(); const sorted = values @@ -297,7 +297,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { 'Findings table to be loaded', async () => (await latestFindingsTable.getRowsCount()) === data.length + 1 ); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await distributionBar.filterBy('passed'); @@ -328,7 +328,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { 'Findings table to be loaded', async () => (await latestFindingsTable.getRowsCount()) === data.length ); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); await distributionBar.filterBy('passed'); @@ -346,7 +346,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await cspSecurity.logout(); await cspSecurity.login('csp_read_user'); await findings.navigateToLatestFindingsPage(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect(await latestFindingsTable.getRowsCount()).to.be.greaterThan(0); }); @@ -356,7 +356,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await findings.navigateToLatestFindingsPage(); - pageObjects.header.waitUntilLoadingHasFinished(); + await pageObjects.header.waitUntilLoadingHasFinished(); expect(await findings.getUnprivilegedPrompt()); }); }); From 7b29dccc088f709667bd976f523ef64aec841ea2 Mon Sep 17 00:00:00 2001 From: Ido Cohen <90558359+CohenIdo@users.noreply.github.com> Date: Wed, 10 Jul 2024 00:35:15 +0300 Subject: [PATCH 095/103] [Cloud Security] Metering integration tests --- package.json | 1 + .../defend_for_containers_metering.ts | 3 +- .../services/usage_reporting_service.ts | 4 +- .../server/config.ts | 8 +- .../server/plugin.ts | 2 +- .../apis/cloud_security_posture/helper.ts | 70 ++++ .../security/cloud_security_posture/index.ts | 1 + .../cloud_security_metering.ts | 363 ++++++++++++++++++ .../serverless_metering/mock_data.ts | 110 ++++++ .../serverless_metering/mock_usage_server.ts | 62 +++ .../test_suites/security/config.ts | 2 + yarn.lock | 10 +- 12 files changed, 631 insertions(+), 5 deletions(-) create mode 100644 x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/cloud_security_metering.ts create mode 100644 x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/mock_data.ts create mode 100644 x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/mock_usage_server.ts diff --git a/package.json b/package.json index 1370f8012f3f39..845c3432a2decd 100644 --- a/package.json +++ b/package.json @@ -948,6 +948,7 @@ "@mapbox/mapbox-gl-rtl-text": "0.2.3", "@mapbox/mapbox-gl-supported": "2.0.1", "@mapbox/vector-tile": "1.3.1", + "@mswjs/http-middleware": "^0.10.1", "@opentelemetry/api": "^1.1.0", "@opentelemetry/api-metrics": "^0.31.0", "@opentelemetry/exporter-metrics-otlp-grpc": "^0.34.0", diff --git a/x-pack/plugins/security_solution_serverless/server/cloud_security/defend_for_containers_metering.ts b/x-pack/plugins/security_solution_serverless/server/cloud_security/defend_for_containers_metering.ts index 949eb709ec3a57..61240df94f9b2b 100644 --- a/x-pack/plugins/security_solution_serverless/server/cloud_security/defend_for_containers_metering.ts +++ b/x-pack/plugins/security_solution_serverless/server/cloud_security/defend_for_containers_metering.ts @@ -76,7 +76,8 @@ export const getUsageRecords = async ( { range: { 'event.ingested': { - gt: searchFrom.toISOString(), + // gt: searchFrom.toISOString(), Tech debt: https://github.com/elastic/security-team/issues/9895 + gte: `now-30m`, }, }, }, diff --git a/x-pack/plugins/security_solution_serverless/server/common/services/usage_reporting_service.ts b/x-pack/plugins/security_solution_serverless/server/common/services/usage_reporting_service.ts index 994cbfe2733043..0e47b982e692e7 100644 --- a/x-pack/plugins/security_solution_serverless/server/common/services/usage_reporting_service.ts +++ b/x-pack/plugins/security_solution_serverless/server/common/services/usage_reporting_service.ts @@ -19,11 +19,13 @@ export class UsageReportingService { records: UsageRecord[], url = USAGE_SERVICE_USAGE_URL ): Promise { + const isHttps = url.includes('https'); + return fetch(url, { method: 'post', body: JSON.stringify(records), headers: { 'Content-Type': 'application/json' }, - agent, + agent: isHttps ? agent : undefined, // Conditionally add agent if URL is HTTPS for supporting integration tests. }); } } diff --git a/x-pack/plugins/security_solution_serverless/server/config.ts b/x-pack/plugins/security_solution_serverless/server/config.ts index 60336c6f6e5f39..4b9700aaca6b22 100644 --- a/x-pack/plugins/security_solution_serverless/server/config.ts +++ b/x-pack/plugins/security_solution_serverless/server/config.ts @@ -17,11 +17,17 @@ export const configSchema = schema.object({ enabled: schema.boolean({ defaultValue: false }), productTypes, /** - * Usage Reporting: the interval between runs of the task + * Usage Reporting: the interval between runs of the endpoint task */ usageReportingTaskInterval: schema.string({ defaultValue: '5m' }), + /** + * Usage Reporting: the interval between runs of the cloud security task + */ + + cloudSecurityUsageReportingTaskInterval: schema.string({ defaultValue: '30m' }), + /** * Usage Reporting: timeout value for how long the task should run. */ diff --git a/x-pack/plugins/security_solution_serverless/server/plugin.ts b/x-pack/plugins/security_solution_serverless/server/plugin.ts index d63152f1694902..f81a8e013e290f 100644 --- a/x-pack/plugins/security_solution_serverless/server/plugin.ts +++ b/x-pack/plugins/security_solution_serverless/server/plugin.ts @@ -113,7 +113,7 @@ export class SecuritySolutionServerlessPlugin this.cloudSecurityUsageReportingTask ?.start({ taskManager: pluginsSetup.taskManager, - interval: cloudSecurityMetringTaskProperties.interval, + interval: this.config.cloudSecurityUsageReportingTaskInterval, }) .catch(() => {}); diff --git a/x-pack/test/api_integration/apis/cloud_security_posture/helper.ts b/x-pack/test/api_integration/apis/cloud_security_posture/helper.ts index 00bcffd553af11..77dd859bed4d9e 100644 --- a/x-pack/test/api_integration/apis/cloud_security_posture/helper.ts +++ b/x-pack/test/api_integration/apis/cloud_security_posture/helper.ts @@ -145,6 +145,76 @@ export async function createPackagePolicy( return postPackageResponse.item; } +export async function createCloudDefendPackagePolicy( + supertest: SuperTestAgent, + agentPolicyId: string, + roleAuthc?: RoleCredentials, + internalRequestHeader?: { 'x-elastic-internal-origin': string; 'kbn-xsrf': string } +) { + const version = '1.2.5'; + const installationPayload = { + policy_id: agentPolicyId, + package: { + name: 'cloud_defend', + version, + }, + name: 'cloud_defend-1', + description: '', + namespace: 'default', + inputs: { + 'cloud_defend-cloud_defend/control': { + enabled: true, + vars: { + configuration: + 'process:\n selectors:\n - name: allProcesses\n operation: [fork, exec]\n responses:\n - match: [allProcesses]\n actions: [log]\nfile:\n selectors:\n - name: executableChanges\n operation: [createExecutable, modifyExecutable]\n responses:\n - match: [executableChanges]\n actions: [alert]\n', + }, + streams: { + 'cloud_defend.alerts': { + enabled: true, + }, + 'cloud_defend.file': { + enabled: true, + }, + 'cloud_defend.heartbeat': { + enabled: true, + vars: { + period: '30m', + }, + }, + 'cloud_defend.metrics': { + enabled: true, + vars: { + period: '24h', + }, + }, + 'cloud_defend.process': { + enabled: true, + }, + }, + }, + }, + force: true, + }; + + const { body: postPackageResponse } = + roleAuthc && internalRequestHeader + ? await supertest + .post(`/api/fleet/package_policies`) + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(internalRequestHeader) + .set(roleAuthc.apiKeyHeader) + .send(installationPayload) + .expect(200) + : await supertest + .post(`/api/fleet/package_policies`) + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set('kbn-xsrf', 'xxxx') + .send(installationPayload) + .expect(200); + + return postPackageResponse.item; +} + export const createUser = async (security: SecurityService, userName: string, roleName: string) => { await security.user.create(userName, { password: 'changeme', diff --git a/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/index.ts b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/index.ts index 460f4ac43bb431..f3bc56e16a5ae3 100644 --- a/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/index.ts +++ b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/index.ts @@ -17,6 +17,7 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./benchmark/v2')); loadTestFile(require.resolve('./find_csp_benchmark_rule')); loadTestFile(require.resolve('./telemetry')); + loadTestFile(require.resolve('./serverless_metering/cloud_security_metering')); // TODO: migrate status_unprivileged tests from stateful, if it feasible in serverless with the new security model // loadTestFile(require.resolve('./status/status_unprivileged')); 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 new file mode 100644 index 00000000000000..78f7ae579d3181 --- /dev/null +++ b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/cloud_security_metering.ts @@ -0,0 +1,363 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { + LATEST_FINDINGS_INDEX_DEFAULT_NS, + LATEST_VULNERABILITIES_INDEX_DEFAULT_NS, +} from '@kbn/cloud-security-posture-plugin/common/constants'; +import * as http from 'http'; +import { RoleCredentials } from '../../../../../shared/services'; +import { getMockFindings, getMockDefendForContainersHeartbeats } from './mock_data'; // eslint-disable-line @kbn/imports/no_boundary_crossing +import type { FtrProviderContext } from '../../../../ftr_provider_context'; +import { + deleteIndex, + addIndex, + createPackagePolicy, + createCloudDefendPackagePolicy, +} from '../../../../../../test/api_integration/apis/cloud_security_posture/helper'; // eslint-disable-line @kbn/imports/no_boundary_crossing +import { UsageRecord, getInterceptedRequestPayload, setupMockServer } from './mock_usage_server'; // eslint-disable-line @kbn/imports/no_boundary_crossing + +const CLOUD_DEFEND_HEARTBEAT_INDEX_DEFAULT_NS = 'metrics-cloud_defend.heartbeat-default'; + +export default function (providerContext: FtrProviderContext) { + const mockUsageApiApp = setupMockServer(); + const { getService } = providerContext; + const retry = getService('retry'); + const kibanaServer = getService('kibanaServer'); + const esArchiver = getService('esArchiver'); + const es = getService('es'); + const svlCommonApi = getService('svlCommonApi'); + const svlUserManager = getService('svlUserManager'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + + /* + This test aims to intercept the usage API request sent by the metering background task manager. + The task manager is running by default in security serverless project in the background and sending usage API requests to the usage API. + This test mocks the usage API server and intercepts the usage API request sent by the metering background task manager. + */ + describe('Intercept the usage API request sent by the metering background task manager', function () { + this.tags(['skipMKI']); + + let mockUsageApiServer: http.Server; + let agentPolicyId: string; + let roleAuthc: RoleCredentials; + let internalRequestHeader: { 'x-elastic-internal-origin': string; 'kbn-xsrf': string }; + before(async () => { + mockUsageApiServer = mockUsageApiApp.listen(8081); // Start the usage api mock server on port 8081 + }); + + beforeEach(async () => { + roleAuthc = await svlUserManager.createApiKeyForRole('admin'); + internalRequestHeader = svlCommonApi.getInternalRequestHeader(); + + await kibanaServer.savedObjects.cleanStandardList(); + await esArchiver.load('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); + + const { body: agentPolicyResponse } = await supertestWithoutAuth + .post(`/api/fleet/agent_policies`) + .set(internalRequestHeader) + .set(roleAuthc.apiKeyHeader) + .send({ + name: 'Test policy', + namespace: 'default', + }); + + agentPolicyId = agentPolicyResponse.item.id; + + await deleteIndex(es, [ + LATEST_FINDINGS_INDEX_DEFAULT_NS, + LATEST_VULNERABILITIES_INDEX_DEFAULT_NS, + CLOUD_DEFEND_HEARTBEAT_INDEX_DEFAULT_NS, + ]); + }); + + afterEach(async () => { + await deleteIndex(es, [ + LATEST_FINDINGS_INDEX_DEFAULT_NS, + LATEST_VULNERABILITIES_INDEX_DEFAULT_NS, + ]); + await kibanaServer.savedObjects.cleanStandardList(); + await esArchiver.unload('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); + await deleteIndex(es, [ + LATEST_FINDINGS_INDEX_DEFAULT_NS, + LATEST_VULNERABILITIES_INDEX_DEFAULT_NS, + CLOUD_DEFEND_HEARTBEAT_INDEX_DEFAULT_NS, + ]); + }); + after(async () => { + await svlUserManager.invalidateApiKeyForRole(roleAuthc); + mockUsageApiServer.close(); + }); + + it('Should intercept usage API request for CSPM', async () => { + await createPackagePolicy( + supertestWithoutAuth, + agentPolicyId, + 'cspm', + 'cloudbeat/cis_aws', + 'aws', + 'cspm', + 'CSPM-1', + roleAuthc, + internalRequestHeader + ); + const billableFindings = getMockFindings({ + postureType: 'cspm', + isBillableAsset: true, + numberOfFindings: 5, + }); + + const notBillableFindings = getMockFindings({ + postureType: 'cspm', + isBillableAsset: false, + numberOfFindings: 10, + }); + + await addIndex( + es, + [...billableFindings, ...notBillableFindings], + LATEST_FINDINGS_INDEX_DEFAULT_NS + ); + + let interceptedRequestBody: UsageRecord[] = []; + await retry.try(async () => { + interceptedRequestBody = getInterceptedRequestPayload(); + expect(interceptedRequestBody.length).to.greaterThan(0); + if (interceptedRequestBody.length > 0) { + const usageSubTypes = interceptedRequestBody.map((record) => record.usage.sub_type); + expect(usageSubTypes).to.contain('cspm'); + } + }); + + expect(interceptedRequestBody[0].usage.type).to.be('cloud_security'); + expect(interceptedRequestBody[0].usage.quantity).to.be(billableFindings.length); + }); + + it('Should intercept usage API request for KSPM', async () => { + await createPackagePolicy( + supertestWithoutAuth, + agentPolicyId, + 'kspm', + 'cloudbeat/cis_k8s', + 'vanilla', + 'kspm', + 'KSPM-1', + roleAuthc, + internalRequestHeader + ); + const billableFindings = getMockFindings({ + postureType: 'kspm', + isBillableAsset: true, + numberOfFindings: 3, + }); + + const notBillableFindings = getMockFindings({ + postureType: 'kspm', + isBillableAsset: false, + numberOfFindings: 11, + }); + + await addIndex( + es, + [...billableFindings, ...notBillableFindings], + LATEST_FINDINGS_INDEX_DEFAULT_NS + ); + + let interceptedRequestBody: UsageRecord[] = []; + + await retry.try(async () => { + interceptedRequestBody = getInterceptedRequestPayload(); + expect(interceptedRequestBody.length).to.greaterThan(0); + if (interceptedRequestBody.length > 0) { + const usageSubTypes = interceptedRequestBody.map((record) => record.usage.sub_type); + expect(usageSubTypes).to.contain('kspm'); + } + }); + + expect(interceptedRequestBody[0].usage.type).to.be('cloud_security'); + expect(interceptedRequestBody[0].usage.quantity).to.be(billableFindings.length); + }); + + it('Should intercept usage API request for CNVM', async () => { + await createPackagePolicy( + supertestWithoutAuth, + agentPolicyId, + 'vuln_mgmt', + 'cloudbeat/vuln_mgmt_aws', + 'aws', + 'vuln_mgmt', + 'CNVM-1', + roleAuthc, + internalRequestHeader + ); + + const billableFindings = getMockFindings({ + postureType: 'cnvm', + numberOfFindings: 2, + }); + + await addIndex(es, billableFindings, LATEST_VULNERABILITIES_INDEX_DEFAULT_NS); + + let interceptedRequestBody: UsageRecord[] = []; + + await retry.try(async () => { + interceptedRequestBody = getInterceptedRequestPayload(); + expect(interceptedRequestBody.length).to.greaterThan(0); + if (interceptedRequestBody.length > 0) { + const usageSubTypes = interceptedRequestBody.map((record) => record.usage.sub_type); + expect(usageSubTypes).to.contain('cnvm'); + } + }); + + expect(interceptedRequestBody[0].usage.type).to.be('cloud_security'); + expect(interceptedRequestBody[0].usage.quantity).to.be(billableFindings.length); + }); + + it('Should intercept usage API request for Defend for Containers', async () => { + await createCloudDefendPackagePolicy( + supertestWithoutAuth, + agentPolicyId, + roleAuthc, + internalRequestHeader + ); + + const blockActionEnabledHeartbeats = getMockDefendForContainersHeartbeats({ + isBlockActionEnables: true, + numberOfHearbeats: 2, + }); + + const blockActionDisabledHeartbeats = getMockDefendForContainersHeartbeats({ + isBlockActionEnables: false, + numberOfHearbeats: 2, + }); + await addIndex( + es, + [...blockActionEnabledHeartbeats, ...blockActionDisabledHeartbeats], + CLOUD_DEFEND_HEARTBEAT_INDEX_DEFAULT_NS + ); + + let interceptedRequestBody: UsageRecord[] = []; + + await retry.try(async () => { + interceptedRequestBody = getInterceptedRequestPayload(); + expect(interceptedRequestBody.length).to.greaterThan(0); + if (interceptedRequestBody.length > 0) { + const usageSubTypes = interceptedRequestBody.map((record) => record.usage.sub_type); + expect(usageSubTypes).to.contain('cloud_defend'); + } + }); + + expect(interceptedRequestBody.length).to.be(blockActionEnabledHeartbeats.length); + expect(interceptedRequestBody[0].usage.type).to.be('cloud_security'); + }); + + it('Should intercept usage API request with all integrations usage records', async () => { + // Create one package policy - it takes care forCSPM, KSMP and CNVM + await createPackagePolicy( + supertestWithoutAuth, + agentPolicyId, + 'cspm', + 'cloudbeat/cis_aws', + 'aws', + 'cspm', + 'CSPM-1', + roleAuthc, + internalRequestHeader + ); + + // Create Defend for Containers package policy + await createCloudDefendPackagePolicy( + supertestWithoutAuth, + agentPolicyId, + roleAuthc, + internalRequestHeader + ); + const billableFindingsCSPM = getMockFindings({ + postureType: 'cspm', + isBillableAsset: true, + numberOfFindings: 5, + }); + + const notBillableFindingsCSPM = getMockFindings({ + postureType: 'cspm', + isBillableAsset: false, + numberOfFindings: 10, + }); + + const billableFindingsKSPM = getMockFindings({ + postureType: 'kspm', + isBillableAsset: true, + numberOfFindings: 3, + }); + + const billableFindingsCNVM = getMockFindings({ + postureType: 'cnvm', + numberOfFindings: 2, + }); + + const notBillableFindingsKSPM = getMockFindings({ + postureType: 'kspm', + isBillableAsset: false, + numberOfFindings: 11, + }); + + const blockActionEnabledHeartbeats = getMockDefendForContainersHeartbeats({ + isBlockActionEnables: true, + numberOfHearbeats: 2, + }); + + const blockActionDisabledHeartbeats = getMockDefendForContainersHeartbeats({ + isBlockActionEnables: false, + numberOfHearbeats: 2, + }); + + await Promise.all([ + addIndex( + es, + [ + ...billableFindingsCSPM, + ...notBillableFindingsCSPM, + ...billableFindingsKSPM, + ...notBillableFindingsKSPM, + ], + LATEST_FINDINGS_INDEX_DEFAULT_NS + ), + addIndex(es, [...billableFindingsCNVM], LATEST_VULNERABILITIES_INDEX_DEFAULT_NS), + addIndex( + es, + [...blockActionEnabledHeartbeats, ...blockActionDisabledHeartbeats], + CLOUD_DEFEND_HEARTBEAT_INDEX_DEFAULT_NS + ), + ]); + + // Intercept and verify usage API request + let interceptedRequestBody: UsageRecord[] = []; + + await retry.try(async () => { + interceptedRequestBody = getInterceptedRequestPayload(); + const usageSubTypes = interceptedRequestBody.map((record) => record.usage.sub_type); + + expect(usageSubTypes).to.contain('cspm'); + expect(usageSubTypes).to.contain('kspm'); + expect(usageSubTypes).to.contain('cnvm'); + expect(usageSubTypes).to.contain('cloud_defend'); + }); + + const totalUsageQuantity = interceptedRequestBody.reduce( + (acc, record) => acc + record.usage.quantity, + 0 + ); + expect(totalUsageQuantity).to.be( + billableFindingsCSPM.length + + billableFindingsKSPM.length + + billableFindingsCNVM.length + + blockActionEnabledHeartbeats.length + ); + }); + }); +} diff --git a/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/mock_data.ts b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/mock_data.ts new file mode 100644 index 00000000000000..2455c8e1762cc3 --- /dev/null +++ b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/mock_data.ts @@ -0,0 +1,110 @@ +/* + * Copyright 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 Chance from 'chance'; + +const chance = new Chance(); + +// see https://github.com/elastic/security-team/issues/8970 for billable asset definition +export const BILLABLE_ASSETS_CONFIG = { + cspm: [ + // 'aws-ebs', we can't include EBS volumes until https://github.com/elastic/security-team/issues/9283 is resolved + // 'aws-ec2', we can't include EC2 instances until https://github.com/elastic/security-team/issues/9254 is resolved + 'aws-s3', + 'aws-rds', + 'azure-disk', + 'azure-document-db-database-account', + 'azure-flexible-mysql-server-db', + 'azure-flexible-postgresql-server-db', + 'azure-mysql-server-db', + 'azure-postgresql-server-db', + 'azure-sql-server', + 'azure-storage-account', + 'azure-vm', + 'gcp-bigquery-dataset', + 'gcp-compute-disk', + 'gcp-compute-instance', + 'gcp-sqladmin-instance', + 'gcp-storage-bucket', + ], + kspm: ['Node', 'node'], +}; +export const getMockFindings = ({ + postureType, + isBillableAsset, + numberOfFindings, +}: { + postureType: string; + isBillableAsset?: boolean; + numberOfFindings: number; +}) => { + return Array.from({ length: numberOfFindings }, () => mockFiniding(postureType, isBillableAsset)); +}; + +const mockFiniding = (postureType: string, isBillableAsset?: boolean) => { + if (postureType === 'cspm') { + const randomAsset = isBillableAsset + ? chance.pickone(BILLABLE_ASSETS_CONFIG.cspm) + : 'not-billable-asset'; + return { + resource: { id: chance.guid(), sub_type: randomAsset }, + rule: { + benchmark: { + posture_type: 'cspm', + }, + }, + }; + } + if (postureType === 'kspm') { + const randomAsset = isBillableAsset + ? chance.pickone(BILLABLE_ASSETS_CONFIG.kspm) + : 'not-billable-asset'; + + return { + resource: { id: chance.guid(), sub_type: randomAsset }, + rule: { + benchmark: { + posture_type: 'kspm', + }, + }, + agent: { id: chance.guid() }, + }; + } + if (postureType === 'cnvm') { + return { + cloud: { + instance: { + id: chance.guid(), + }, + }, + }; + } +}; + +export const getMockDefendForContainersHeartbeats = ({ + isBlockActionEnables, + numberOfHearbeats, +}: { + isBlockActionEnables: boolean; + numberOfHearbeats: number; +}) => { + return Array.from({ length: numberOfHearbeats }, () => + mockDefendForContainersHeartbeats(isBlockActionEnables) + ); +}; +const mockDefendForContainersHeartbeats = (isBlockActionEnables: boolean) => { + return { + agent: { + id: chance.guid(), + }, + cloud_defend: { + block_action_enabled: isBlockActionEnables, + }, + event: { + ingested: new Date().toISOString(), + }, + }; +}; diff --git a/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/mock_usage_server.ts b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/mock_usage_server.ts new file mode 100644 index 00000000000000..1ed5e8d7ff09ec --- /dev/null +++ b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/mock_usage_server.ts @@ -0,0 +1,62 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { createServer } from '@mswjs/http-middleware'; + +import { http, HttpResponse, StrictResponse } from 'msw'; + +export const setupMockServer = () => { + const server = createServer(usageAPIHandler); + + return server; +}; +export interface UsageRecord { + id: string; + usage_timestamp: string; + creation_timestamp: string; + usage: UsageMetrics; + source: UsageSource; +} + +export interface UsageMetrics { + type: string; + sub_type?: string; + quantity: number; + period_seconds?: number; + cause?: string; + metadata?: unknown; +} + +export interface UsageSource { + id: string; + instance_group_id: string; + metadata?: UsageSourceMetadata; +} + +export interface UsageSourceMetadata { + tier?: string; +} + +interface UsageResponse { + response: UsageRecord[]; +} + +let interceptedRequestPayload: UsageRecord[] = []; + +const usageAPIHandler = http.post( + 'api/v1/usage', + async ({ request }): Promise> => { + const payload = (await request.clone().json()) as UsageRecord[]; + interceptedRequestPayload = payload; + + return HttpResponse.json({ + response: payload, + }); + } +); + +export const getInterceptedRequestPayload = (): UsageRecord[] => interceptedRequestPayload; diff --git a/x-pack/test_serverless/api_integration/test_suites/security/config.ts b/x-pack/test_serverless/api_integration/test_suites/security/config.ts index 4de07d59ea56aa..b97ed389605611 100644 --- a/x-pack/test_serverless/api_integration/test_suites/security/config.ts +++ b/x-pack/test_serverless/api_integration/test_suites/security/config.ts @@ -23,5 +23,7 @@ export default createTestConfig({ `--xpack.task_manager.unsafe.exclude_task_types=${JSON.stringify(['Fleet-Metrics-Task'])}`, // useful for testing (also enabled in MKI QA) '--coreApp.allowDynamicConfigOverrides=true', + `--xpack.securitySolutionServerless.cloudSecurityUsageReportingTaskInterval=5s`, + `--xpack.securitySolutionServerless.usageReportingApiUrl=http://localhost:8081/api/v1/usage`, ], }); diff --git a/yarn.lock b/yarn.lock index cad73b99f3c3ed..6b704845c2b85d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7406,6 +7406,14 @@ resolved "https://registry.yarnpkg.com/@mswjs/cookies/-/cookies-1.1.0.tgz#1528eb43630caf83a1d75d5332b30e75e9bb1b5b" integrity sha512-0ZcCVQxifZmhwNBoQIrystCb+2sWBY2Zw8lpfJBPCHGCA/HWqehITeCRVIv4VMy8MPlaHo2w2pTHFV2pFfqKPw== +"@mswjs/http-middleware@^0.10.1": + version "0.10.1" + resolved "https://registry.yarnpkg.com/@mswjs/http-middleware/-/http-middleware-0.10.1.tgz#7ff38c5398ba01efe98e16a0da24d612ffd69ccc" + integrity sha512-I58RDHXzwKjMjaSO7aV7X0zUzbAvUEEDYsL9+I6Ro0zF5LgjnNdpZoMufG/WoYEenhDCgv7K+HMpLxGuhlfjKA== + dependencies: + express "^4.18.2" + strict-event-emitter "^0.5.1" + "@mswjs/interceptors@^0.29.0": version "0.29.1" resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.29.1.tgz#e77fc58b5188569041d0440b25c9e9ebb1ccd60a" @@ -17512,7 +17520,7 @@ expr-eval@^2.0.2: resolved "https://registry.yarnpkg.com/expr-eval/-/expr-eval-2.0.2.tgz#fa6f044a7b0c93fde830954eb9c5b0f7fbc7e201" integrity sha512-4EMSHGOPSwAfBiibw3ndnP0AvjDWLsMvGOvWEZ2F96IGk0bIVdjQisOHxReSkE13mHcfbuCiXw+G4y0zv6N8Eg== -express@^4.17.1, express@^4.17.3: +express@^4.17.1, express@^4.17.3, express@^4.18.2: version "4.19.2" resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465" integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q== From 62a62a2a7f7eb8721bee70fd02aa147a4d47d1c8 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 10 Jul 2024 06:59:37 +0200 Subject: [PATCH 096/103] [api-docs] 2024-07-10 Daily api_docs build (#187931) Generated by https://buildkite.com/elastic/kibana-api-docs-daily/builds/764 --- 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/assets_data_access.mdx | 2 +- api_docs/banners.mdx | 2 +- api_docs/bfetch.mdx | 2 +- api_docs/canvas.mdx | 2 +- api_docs/cases.mdx | 2 +- api_docs/charts.mdx | 2 +- api_docs/cloud.mdx | 2 +- api_docs/cloud_data_migration.mdx | 2 +- api_docs/cloud_defend.mdx | 2 +- api_docs/cloud_experiments.mdx | 2 +- api_docs/cloud_security_posture.mdx | 2 +- api_docs/console.mdx | 2 +- api_docs/content_management.mdx | 2 +- api_docs/controls.mdx | 2 +- api_docs/custom_integrations.mdx | 2 +- api_docs/dashboard.mdx | 2 +- api_docs/dashboard_enhanced.mdx | 2 +- api_docs/data.mdx | 2 +- api_docs/data_quality.devdocs.json | 63 +- api_docs/data_quality.mdx | 7 +- api_docs/data_query.mdx | 2 +- api_docs/data_search.mdx | 2 +- api_docs/data_view_editor.mdx | 2 +- api_docs/data_view_field_editor.mdx | 2 +- api_docs/data_view_management.mdx | 2 +- api_docs/data_views.devdocs.json | 8 +- api_docs/data_views.mdx | 2 +- api_docs/data_visualizer.mdx | 2 +- api_docs/dataset_quality.mdx | 2 +- api_docs/deprecations_by_api.mdx | 6 +- api_docs/deprecations_by_plugin.mdx | 5 +- api_docs/deprecations_by_team.mdx | 2 +- api_docs/dev_tools.mdx | 2 +- api_docs/discover.mdx | 2 +- api_docs/discover_enhanced.mdx | 2 +- api_docs/discover_shared.mdx | 2 +- api_docs/ecs_data_quality_dashboard.mdx | 2 +- api_docs/elastic_assistant.mdx | 2 +- api_docs/embeddable.mdx | 2 +- api_docs/embeddable_enhanced.mdx | 2 +- api_docs/encrypted_saved_objects.mdx | 2 +- api_docs/enterprise_search.mdx | 2 +- api_docs/entity_manager.mdx | 2 +- api_docs/es_ui_shared.mdx | 2 +- api_docs/esql.devdocs.json | 547 ++++ api_docs/esql.mdx | 33 + api_docs/esql_data_grid.mdx | 2 +- api_docs/event_annotation.mdx | 2 +- api_docs/event_annotation_listing.mdx | 2 +- api_docs/event_log.mdx | 2 +- api_docs/exploratory_view.mdx | 4 +- 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.devdocs.json | 112 + api_docs/expression_metric_vis.mdx | 4 +- api_docs/expression_partition_vis.mdx | 2 +- api_docs/expression_repeat_image.mdx | 2 +- api_docs/expression_reveal_image.mdx | 2 +- api_docs/expression_shape.mdx | 2 +- api_docs/expression_tagcloud.mdx | 2 +- api_docs/expression_x_y.mdx | 2 +- api_docs/expressions.mdx | 2 +- api_docs/features.mdx | 2 +- api_docs/field_formats.mdx | 2 +- api_docs/fields_metadata.mdx | 2 +- api_docs/file_upload.mdx | 2 +- api_docs/files.mdx | 2 +- api_docs/files_management.mdx | 2 +- api_docs/fleet.mdx | 2 +- api_docs/global_search.mdx | 2 +- api_docs/guided_onboarding.mdx | 2 +- api_docs/home.mdx | 2 +- api_docs/image_embeddable.mdx | 2 +- api_docs/index_lifecycle_management.mdx | 2 +- api_docs/index_management.mdx | 2 +- api_docs/infra.mdx | 2 +- api_docs/ingest_pipelines.mdx | 2 +- api_docs/inspector.mdx | 2 +- api_docs/integration_assistant.mdx | 2 +- api_docs/interactive_setup.mdx | 2 +- api_docs/investigate.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.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_utils.mdx | 2 +- api_docs/kbn_axe_config.mdx | 2 +- api_docs/kbn_bfetch_error.mdx | 2 +- api_docs/kbn_calculate_auto.mdx | 2 +- .../kbn_calculate_width_from_char_count.mdx | 2 +- api_docs/kbn_cases_components.mdx | 2 +- api_docs/kbn_cell_actions.mdx | 2 +- api_docs/kbn_chart_expressions_common.mdx | 2 +- api_docs/kbn_chart_icons.mdx | 2 +- api_docs/kbn_ci_stats_core.mdx | 2 +- api_docs/kbn_ci_stats_performance_metrics.mdx | 2 +- api_docs/kbn_ci_stats_reporter.mdx | 2 +- api_docs/kbn_cli_dev_mode.mdx | 2 +- api_docs/kbn_code_editor.mdx | 2 +- api_docs/kbn_code_editor_mock.mdx | 2 +- api_docs/kbn_code_owners.mdx | 2 +- api_docs/kbn_coloring.mdx | 2 +- api_docs/kbn_config.mdx | 2 +- api_docs/kbn_config_mocks.mdx | 2 +- api_docs/kbn_config_schema.mdx | 2 +- .../kbn_content_management_content_editor.mdx | 2 +- ...tent_management_tabbed_table_list_view.mdx | 2 +- ...nt_management_table_list_view.devdocs.json | 6 +- ...kbn_content_management_table_list_view.mdx | 2 +- ...tent_management_table_list_view_common.mdx | 2 +- ...agement_table_list_view_table.devdocs.json | 24 +- ...ntent_management_table_list_view_table.mdx | 4 +- .../kbn_content_management_user_profiles.mdx | 2 +- api_docs/kbn_content_management_utils.mdx | 2 +- api_docs/kbn_core_analytics_browser.mdx | 2 +- .../kbn_core_analytics_browser_internal.mdx | 2 +- api_docs/kbn_core_analytics_browser_mocks.mdx | 2 +- api_docs/kbn_core_analytics_server.mdx | 2 +- .../kbn_core_analytics_server_internal.mdx | 2 +- api_docs/kbn_core_analytics_server_mocks.mdx | 2 +- api_docs/kbn_core_application_browser.mdx | 2 +- .../kbn_core_application_browser_internal.mdx | 2 +- .../kbn_core_application_browser_mocks.mdx | 2 +- api_docs/kbn_core_application_common.mdx | 2 +- api_docs/kbn_core_apps_browser_internal.mdx | 2 +- api_docs/kbn_core_apps_browser_mocks.mdx | 2 +- api_docs/kbn_core_apps_server_internal.mdx | 2 +- api_docs/kbn_core_base_browser_mocks.mdx | 2 +- api_docs/kbn_core_base_common.mdx | 2 +- api_docs/kbn_core_base_server_internal.mdx | 2 +- api_docs/kbn_core_base_server_mocks.mdx | 2 +- .../kbn_core_capabilities_browser_mocks.mdx | 2 +- api_docs/kbn_core_capabilities_common.mdx | 2 +- api_docs/kbn_core_capabilities_server.mdx | 2 +- .../kbn_core_capabilities_server_mocks.mdx | 2 +- api_docs/kbn_core_chrome_browser.devdocs.json | 2 +- api_docs/kbn_core_chrome_browser.mdx | 2 +- api_docs/kbn_core_chrome_browser_mocks.mdx | 2 +- api_docs/kbn_core_config_server_internal.mdx | 2 +- api_docs/kbn_core_custom_branding_browser.mdx | 2 +- ..._core_custom_branding_browser_internal.mdx | 2 +- ...kbn_core_custom_branding_browser_mocks.mdx | 2 +- api_docs/kbn_core_custom_branding_common.mdx | 2 +- api_docs/kbn_core_custom_branding_server.mdx | 2 +- ...n_core_custom_branding_server_internal.mdx | 2 +- .../kbn_core_custom_branding_server_mocks.mdx | 2 +- api_docs/kbn_core_deprecations_browser.mdx | 2 +- ...kbn_core_deprecations_browser_internal.mdx | 2 +- .../kbn_core_deprecations_browser_mocks.mdx | 2 +- api_docs/kbn_core_deprecations_common.mdx | 2 +- api_docs/kbn_core_deprecations_server.mdx | 2 +- .../kbn_core_deprecations_server_internal.mdx | 2 +- .../kbn_core_deprecations_server_mocks.mdx | 2 +- api_docs/kbn_core_doc_links_browser.mdx | 2 +- api_docs/kbn_core_doc_links_browser_mocks.mdx | 2 +- api_docs/kbn_core_doc_links_server.mdx | 2 +- api_docs/kbn_core_doc_links_server_mocks.mdx | 2 +- ...e_elasticsearch_client_server_internal.mdx | 2 +- ...core_elasticsearch_client_server_mocks.mdx | 2 +- api_docs/kbn_core_elasticsearch_server.mdx | 2 +- ...kbn_core_elasticsearch_server_internal.mdx | 2 +- .../kbn_core_elasticsearch_server_mocks.mdx | 2 +- .../kbn_core_environment_server_internal.mdx | 2 +- .../kbn_core_environment_server_mocks.mdx | 2 +- .../kbn_core_execution_context_browser.mdx | 2 +- ...ore_execution_context_browser_internal.mdx | 2 +- ...n_core_execution_context_browser_mocks.mdx | 2 +- .../kbn_core_execution_context_common.mdx | 2 +- .../kbn_core_execution_context_server.mdx | 2 +- ...core_execution_context_server_internal.mdx | 2 +- ...bn_core_execution_context_server_mocks.mdx | 2 +- api_docs/kbn_core_fatal_errors_browser.mdx | 2 +- .../kbn_core_fatal_errors_browser_mocks.mdx | 2 +- api_docs/kbn_core_http_browser.mdx | 2 +- api_docs/kbn_core_http_browser_internal.mdx | 2 +- api_docs/kbn_core_http_browser_mocks.mdx | 2 +- api_docs/kbn_core_http_common.mdx | 2 +- .../kbn_core_http_context_server_mocks.mdx | 2 +- ...re_http_request_handler_context_server.mdx | 2 +- api_docs/kbn_core_http_resources_server.mdx | 2 +- ...bn_core_http_resources_server_internal.mdx | 2 +- .../kbn_core_http_resources_server_mocks.mdx | 2 +- .../kbn_core_http_router_server_internal.mdx | 2 +- .../kbn_core_http_router_server_mocks.mdx | 2 +- api_docs/kbn_core_http_server.devdocs.json | 72 +- api_docs/kbn_core_http_server.mdx | 2 +- api_docs/kbn_core_http_server_internal.mdx | 2 +- api_docs/kbn_core_http_server_mocks.mdx | 2 +- api_docs/kbn_core_i18n_browser.mdx | 2 +- api_docs/kbn_core_i18n_browser_mocks.mdx | 2 +- api_docs/kbn_core_i18n_server.mdx | 2 +- api_docs/kbn_core_i18n_server_internal.mdx | 2 +- api_docs/kbn_core_i18n_server_mocks.mdx | 2 +- ...n_core_injected_metadata_browser_mocks.mdx | 2 +- ...kbn_core_integrations_browser_internal.mdx | 2 +- .../kbn_core_integrations_browser_mocks.mdx | 2 +- api_docs/kbn_core_lifecycle_browser.mdx | 2 +- api_docs/kbn_core_lifecycle_browser_mocks.mdx | 2 +- api_docs/kbn_core_lifecycle_server.mdx | 2 +- api_docs/kbn_core_lifecycle_server_mocks.mdx | 2 +- api_docs/kbn_core_logging_browser_mocks.mdx | 2 +- api_docs/kbn_core_logging_common_internal.mdx | 2 +- api_docs/kbn_core_logging_server.mdx | 2 +- api_docs/kbn_core_logging_server_internal.mdx | 2 +- api_docs/kbn_core_logging_server_mocks.mdx | 2 +- ...ore_metrics_collectors_server_internal.mdx | 2 +- ...n_core_metrics_collectors_server_mocks.mdx | 2 +- api_docs/kbn_core_metrics_server.mdx | 2 +- api_docs/kbn_core_metrics_server_internal.mdx | 2 +- api_docs/kbn_core_metrics_server_mocks.mdx | 2 +- api_docs/kbn_core_mount_utils_browser.mdx | 2 +- api_docs/kbn_core_node_server.mdx | 2 +- api_docs/kbn_core_node_server_internal.mdx | 2 +- api_docs/kbn_core_node_server_mocks.mdx | 2 +- api_docs/kbn_core_notifications_browser.mdx | 2 +- ...bn_core_notifications_browser_internal.mdx | 2 +- .../kbn_core_notifications_browser_mocks.mdx | 2 +- api_docs/kbn_core_overlays_browser.mdx | 2 +- .../kbn_core_overlays_browser_internal.mdx | 2 +- api_docs/kbn_core_overlays_browser_mocks.mdx | 2 +- api_docs/kbn_core_plugins_browser.mdx | 2 +- api_docs/kbn_core_plugins_browser_mocks.mdx | 2 +- .../kbn_core_plugins_contracts_browser.mdx | 2 +- .../kbn_core_plugins_contracts_server.mdx | 2 +- api_docs/kbn_core_plugins_server.mdx | 2 +- api_docs/kbn_core_plugins_server_mocks.mdx | 2 +- api_docs/kbn_core_preboot_server.mdx | 2 +- api_docs/kbn_core_preboot_server_mocks.mdx | 2 +- api_docs/kbn_core_rendering_browser_mocks.mdx | 2 +- .../kbn_core_rendering_server_internal.mdx | 2 +- api_docs/kbn_core_rendering_server_mocks.mdx | 2 +- api_docs/kbn_core_root_server_internal.mdx | 2 +- .../kbn_core_saved_objects_api_browser.mdx | 2 +- .../kbn_core_saved_objects_api_server.mdx | 2 +- ...bn_core_saved_objects_api_server_mocks.mdx | 2 +- ...ore_saved_objects_base_server_internal.mdx | 2 +- ...n_core_saved_objects_base_server_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_browser.mdx | 2 +- ...bn_core_saved_objects_browser_internal.mdx | 2 +- .../kbn_core_saved_objects_browser_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_common.mdx | 2 +- ..._objects_import_export_server_internal.mdx | 2 +- ...ved_objects_import_export_server_mocks.mdx | 2 +- ...aved_objects_migration_server_internal.mdx | 2 +- ...e_saved_objects_migration_server_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_server.mdx | 2 +- ...kbn_core_saved_objects_server_internal.mdx | 2 +- .../kbn_core_saved_objects_server_mocks.mdx | 2 +- .../kbn_core_saved_objects_utils_server.mdx | 2 +- api_docs/kbn_core_security_browser.mdx | 2 +- .../kbn_core_security_browser_internal.mdx | 2 +- api_docs/kbn_core_security_browser_mocks.mdx | 2 +- api_docs/kbn_core_security_common.mdx | 2 +- .../kbn_core_security_server.devdocs.json | 2841 ++++++++++++++--- api_docs/kbn_core_security_server.mdx | 7 +- .../kbn_core_security_server_internal.mdx | 2 +- ...bn_core_security_server_mocks.devdocs.json | 38 + api_docs/kbn_core_security_server_mocks.mdx | 4 +- 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.devdocs.json | 56 + api_docs/kbn_data_view_utils.mdx | 4 +- 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 +- .../kbn_deeplinks_observability.devdocs.json | 30 +- api_docs/kbn_deeplinks_observability.mdx | 4 +- api_docs/kbn_deeplinks_search.devdocs.json | 8 +- 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.mdx | 2 +- api_docs/kbn_ebt_tools.mdx | 2 +- api_docs/kbn_ecs_data_quality_dashboard.mdx | 2 +- api_docs/kbn_elastic_agent_utils.mdx | 2 +- api_docs/kbn_elastic_assistant.mdx | 2 +- api_docs/kbn_elastic_assistant_common.mdx | 2 +- api_docs/kbn_entities_schema.devdocs.json | 23 +- api_docs/kbn_entities_schema.mdx | 4 +- 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.devdocs.json | 98 +- api_docs/kbn_esql_ast.mdx | 4 +- api_docs/kbn_esql_utils.mdx | 2 +- ..._esql_validation_autocomplete.devdocs.json | 32 +- api_docs/kbn_esql_validation_autocomplete.mdx | 2 +- api_docs/kbn_event_annotation_common.mdx | 2 +- api_docs/kbn_event_annotation_components.mdx | 2 +- api_docs/kbn_expandable_flyout.mdx | 2 +- api_docs/kbn_field_types.mdx | 2 +- api_docs/kbn_field_utils.mdx | 2 +- api_docs/kbn_find_used_node_modules.mdx | 2 +- api_docs/kbn_formatters.mdx | 2 +- .../kbn_ftr_common_functional_services.mdx | 2 +- .../kbn_ftr_common_functional_ui_services.mdx | 2 +- api_docs/kbn_generate.mdx | 2 +- api_docs/kbn_generate_console_definitions.mdx | 2 +- api_docs/kbn_generate_csv.mdx | 2 +- api_docs/kbn_grouping.mdx | 2 +- api_docs/kbn_guided_onboarding.mdx | 2 +- api_docs/kbn_handlebars.mdx | 2 +- api_docs/kbn_hapi_mocks.mdx | 2 +- api_docs/kbn_health_gateway_server.mdx | 2 +- api_docs/kbn_home_sample_data_card.mdx | 2 +- api_docs/kbn_home_sample_data_tab.mdx | 2 +- api_docs/kbn_i18n.mdx | 2 +- api_docs/kbn_i18n_react.mdx | 2 +- api_docs/kbn_import_resolver.mdx | 2 +- api_docs/kbn_index_management.mdx | 2 +- api_docs/kbn_inference_integration_flyout.mdx | 2 +- api_docs/kbn_infra_forge.mdx | 2 +- api_docs/kbn_interpreter.mdx | 2 +- api_docs/kbn_io_ts_utils.mdx | 2 +- api_docs/kbn_ipynb.mdx | 2 +- api_docs/kbn_jest_serializers.mdx | 2 +- api_docs/kbn_journeys.mdx | 2 +- api_docs/kbn_json_ast.mdx | 2 +- api_docs/kbn_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 +- api_docs/kbn_management_cards_navigation.mdx | 2 +- .../kbn_management_settings_application.mdx | 2 +- ...ent_settings_components_field_category.mdx | 2 +- ...gement_settings_components_field_input.mdx | 2 +- ...nagement_settings_components_field_row.mdx | 2 +- ...bn_management_settings_components_form.mdx | 2 +- ...n_management_settings_field_definition.mdx | 2 +- api_docs/kbn_management_settings_ids.mdx | 2 +- ...n_management_settings_section_registry.mdx | 2 +- api_docs/kbn_management_settings_types.mdx | 2 +- .../kbn_management_settings_utilities.mdx | 2 +- api_docs/kbn_management_storybook_config.mdx | 2 +- api_docs/kbn_mapbox_gl.mdx | 2 +- api_docs/kbn_maps_vector_tile_utils.mdx | 2 +- api_docs/kbn_ml_agg_utils.mdx | 2 +- api_docs/kbn_ml_anomaly_utils.mdx | 2 +- api_docs/kbn_ml_cancellable_search.mdx | 2 +- api_docs/kbn_ml_category_validator.mdx | 2 +- api_docs/kbn_ml_chi2test.mdx | 2 +- .../kbn_ml_data_frame_analytics_utils.mdx | 2 +- api_docs/kbn_ml_data_grid.mdx | 2 +- api_docs/kbn_ml_date_picker.mdx | 2 +- api_docs/kbn_ml_date_utils.mdx | 2 +- api_docs/kbn_ml_error_utils.mdx | 2 +- api_docs/kbn_ml_in_memory_table.mdx | 2 +- api_docs/kbn_ml_is_defined.mdx | 2 +- api_docs/kbn_ml_is_populated_object.mdx | 2 +- api_docs/kbn_ml_kibana_theme.mdx | 2 +- api_docs/kbn_ml_local_storage.mdx | 2 +- api_docs/kbn_ml_nested_property.mdx | 2 +- api_docs/kbn_ml_number_utils.mdx | 2 +- api_docs/kbn_ml_query_utils.mdx | 2 +- api_docs/kbn_ml_random_sampler_utils.mdx | 2 +- api_docs/kbn_ml_route_utils.mdx | 2 +- api_docs/kbn_ml_runtime_field_utils.mdx | 2 +- api_docs/kbn_ml_string_hash.mdx | 2 +- api_docs/kbn_ml_time_buckets.mdx | 2 +- api_docs/kbn_ml_trained_models_utils.mdx | 2 +- api_docs/kbn_ml_ui_actions.mdx | 2 +- api_docs/kbn_ml_url_state.mdx | 2 +- api_docs/kbn_mock_idp_utils.mdx | 2 +- api_docs/kbn_monaco.mdx | 2 +- api_docs/kbn_object_versioning.mdx | 2 +- api_docs/kbn_observability_alert_details.mdx | 2 +- .../kbn_observability_alerting_test_data.mdx | 2 +- ...ility_get_padded_alert_time_range_util.mdx | 2 +- api_docs/kbn_openapi_bundler.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.devdocs.json | 269 ++ api_docs/kbn_recently_accessed.mdx | 33 + 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_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 +- ...n_security_api_key_management.devdocs.json | 108 +- api_docs/kbn_security_api_key_management.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 +- ..._security_plugin_types_server.devdocs.json | 2336 ++++++++++---- api_docs/kbn_security_plugin_types_server.mdx | 4 +- api_docs/kbn_security_solution_features.mdx | 2 +- api_docs/kbn_security_solution_navigation.mdx | 2 +- api_docs/kbn_security_solution_side_nav.mdx | 2 +- ...kbn_security_solution_storybook_config.mdx | 2 +- .../kbn_securitysolution_autocomplete.mdx | 2 +- api_docs/kbn_securitysolution_data_table.mdx | 2 +- api_docs/kbn_securitysolution_ecs.mdx | 2 +- api_docs/kbn_securitysolution_es_utils.mdx | 2 +- ...ritysolution_exception_list_components.mdx | 2 +- api_docs/kbn_securitysolution_hook_utils.mdx | 2 +- ..._securitysolution_io_ts_alerting_types.mdx | 2 +- .../kbn_securitysolution_io_ts_list_types.mdx | 2 +- api_docs/kbn_securitysolution_io_ts_types.mdx | 2 +- api_docs/kbn_securitysolution_io_ts_utils.mdx | 2 +- api_docs/kbn_securitysolution_list_api.mdx | 2 +- .../kbn_securitysolution_list_constants.mdx | 2 +- api_docs/kbn_securitysolution_list_hooks.mdx | 2 +- api_docs/kbn_securitysolution_list_utils.mdx | 2 +- api_docs/kbn_securitysolution_rules.mdx | 2 +- api_docs/kbn_securitysolution_t_grid.mdx | 2 +- api_docs/kbn_securitysolution_utils.mdx | 2 +- api_docs/kbn_server_http_tools.mdx | 2 +- api_docs/kbn_server_route_repository.mdx | 2 +- api_docs/kbn_serverless_common_settings.mdx | 2 +- .../kbn_serverless_observability_settings.mdx | 2 +- api_docs/kbn_serverless_project_switcher.mdx | 2 +- api_docs/kbn_serverless_search_settings.mdx | 2 +- api_docs/kbn_serverless_security_settings.mdx | 2 +- api_docs/kbn_serverless_storybook_config.mdx | 2 +- api_docs/kbn_shared_svg.mdx | 2 +- api_docs/kbn_shared_ux_avatar_solution.mdx | 2 +- .../kbn_shared_ux_button_exit_full_screen.mdx | 2 +- api_docs/kbn_shared_ux_button_toolbar.mdx | 2 +- api_docs/kbn_shared_ux_card_no_data.mdx | 2 +- api_docs/kbn_shared_ux_card_no_data_mocks.mdx | 2 +- api_docs/kbn_shared_ux_chrome_navigation.mdx | 2 +- api_docs/kbn_shared_ux_error_boundary.mdx | 2 +- api_docs/kbn_shared_ux_file_context.mdx | 2 +- api_docs/kbn_shared_ux_file_image.mdx | 2 +- api_docs/kbn_shared_ux_file_image_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_picker.mdx | 2 +- api_docs/kbn_shared_ux_file_types.mdx | 2 +- api_docs/kbn_shared_ux_file_upload.mdx | 2 +- api_docs/kbn_shared_ux_file_util.mdx | 2 +- api_docs/kbn_shared_ux_link_redirect_app.mdx | 2 +- .../kbn_shared_ux_link_redirect_app_mocks.mdx | 2 +- api_docs/kbn_shared_ux_markdown.mdx | 2 +- api_docs/kbn_shared_ux_markdown_mocks.mdx | 2 +- .../kbn_shared_ux_page_analytics_no_data.mdx | 2 +- ...shared_ux_page_analytics_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_page_kibana_no_data.mdx | 2 +- ...bn_shared_ux_page_kibana_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_page_kibana_template.mdx | 2 +- ...n_shared_ux_page_kibana_template_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_no_data.mdx | 2 +- .../kbn_shared_ux_page_no_data_config.mdx | 2 +- ...bn_shared_ux_page_no_data_config_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_no_data_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_solution_nav.mdx | 2 +- .../kbn_shared_ux_prompt_no_data_views.mdx | 2 +- ...n_shared_ux_prompt_no_data_views_mocks.mdx | 2 +- api_docs/kbn_shared_ux_prompt_not_found.mdx | 2 +- api_docs/kbn_shared_ux_router.mdx | 2 +- api_docs/kbn_shared_ux_router_mocks.mdx | 2 +- api_docs/kbn_shared_ux_storybook_config.mdx | 2 +- api_docs/kbn_shared_ux_storybook_mock.mdx | 2 +- api_docs/kbn_shared_ux_tabbed_modal.mdx | 2 +- api_docs/kbn_shared_ux_utility.mdx | 2 +- api_docs/kbn_slo_schema.mdx | 2 +- api_docs/kbn_some_dev_log.mdx | 2 +- api_docs/kbn_sort_predicates.mdx | 2 +- api_docs/kbn_std.mdx | 2 +- api_docs/kbn_stdio_dev_helpers.mdx | 2 +- api_docs/kbn_storybook.mdx | 2 +- api_docs/kbn_telemetry_tools.mdx | 2 +- api_docs/kbn_test.mdx | 2 +- api_docs/kbn_test_eui_helpers.devdocs.json | 167 +- api_docs/kbn_test_eui_helpers.mdx | 4 +- 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.devdocs.json | 11 + api_docs/kbn_ui_shared_deps_src.mdx | 4 +- 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_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.devdocs.json | 71 + api_docs/lens.mdx | 4 +- 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 | 43 +- api_docs/presentation_panel.mdx | 2 +- api_docs/presentation_util.mdx | 2 +- api_docs/profiling.mdx | 2 +- api_docs/profiling_data_access.mdx | 2 +- api_docs/remote_clusters.mdx | 2 +- api_docs/reporting.mdx | 2 +- api_docs/rollup.mdx | 2 +- api_docs/rule_registry.mdx | 2 +- api_docs/runtime_fields.mdx | 2 +- api_docs/saved_objects.mdx | 2 +- api_docs/saved_objects_finder.mdx | 2 +- api_docs/saved_objects_management.mdx | 2 +- api_docs/saved_objects_tagging.mdx | 2 +- api_docs/saved_objects_tagging_oss.mdx | 2 +- api_docs/saved_search.mdx | 2 +- api_docs/screenshot_mode.mdx | 2 +- api_docs/screenshotting.mdx | 2 +- api_docs/search_connectors.mdx | 2 +- api_docs/search_homepage.mdx | 2 +- api_docs/search_inference_endpoints.mdx | 2 +- api_docs/search_notebooks.mdx | 2 +- api_docs/search_playground.mdx | 2 +- api_docs/security.devdocs.json | 885 +++-- api_docs/security.mdx | 4 +- 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 | 4 +- 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 +- 727 files changed, 7059 insertions(+), 2314 deletions(-) create mode 100644 api_docs/esql.devdocs.json create mode 100644 api_docs/esql.mdx create mode 100644 api_docs/kbn_recently_accessed.devdocs.json create mode 100644 api_docs/kbn_recently_accessed.mdx diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 096066e0ce5bd0..4ab36f970a7631 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-07-09 +date: 2024-07-10 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 56e1e3c05dc9ce..ae76364c4ec724 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-07-09 +date: 2024-07-10 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 59d2a889752204..f858eb52a31b02 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-07-09 +date: 2024-07-10 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 6c0a62c9c13410..b531df2cf8a7bb 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-07-09 +date: 2024-07-10 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 39480138681d21..7dc9cabc2a4131 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-07-09 +date: 2024-07-10 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 c3150722d0adb8..f5f06b8e74070c 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-07-09 +date: 2024-07-10 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 9f794fe86c6b73..8f86fdb36cd2a7 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-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess'] --- import apmDataAccessObj from './apm_data_access.devdocs.json'; diff --git a/api_docs/assets_data_access.mdx b/api_docs/assets_data_access.mdx index f82175b8f2b380..6ba79a185aef3e 100644 --- a/api_docs/assets_data_access.mdx +++ b/api_docs/assets_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetsDataAccess title: "assetsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the assetsDataAccess plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetsDataAccess'] --- import assetsDataAccessObj from './assets_data_access.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 5614bdf511a312..244eb9bae85c01 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-07-09 +date: 2024-07-10 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 5eb1c8f800a490..3ca9e70563e6f8 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-07-09 +date: 2024-07-10 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 a85993e163b537..97fda29eaa639c 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-07-09 +date: 2024-07-10 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 e4106724469cad..7f35d571cec41e 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-07-09 +date: 2024-07-10 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 e34208dde9c2d1..406b5aa2fda76e 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-07-09 +date: 2024-07-10 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 803baa19d1b0d6..b57f89c35c1379 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-07-09 +date: 2024-07-10 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 688d7754196386..3674bbfd1c5b3b 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-07-09 +date: 2024-07-10 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 fb38869a0e18a1..791d46b97f4708 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-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend'] --- import cloudDefendObj from './cloud_defend.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index 8c6deb39773307..158ee1ce6978f6 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index 4ed908f53f2782..4cf82bac4f4f42 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-07-09 +date: 2024-07-10 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 02950d752e811b..05af1aff6e9fb2 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-07-09 +date: 2024-07-10 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 d60d0a1fbb45b8..2336fc498da8f3 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-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] --- import contentManagementObj from './content_management.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index f8470abe439d02..23d9b1b0f3db57 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-07-09 +date: 2024-07-10 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 e57c81077c45ec..a249305bca74b6 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-07-09 +date: 2024-07-10 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 8f8ca8f4e77002..59e0235903c55d 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-07-09 +date: 2024-07-10 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 1bcb7f25a63c55..734405a4a261b0 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-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.mdx b/api_docs/data.mdx index a9cef4ffe9dce2..7481ab2d2ab76a 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-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_quality.devdocs.json b/api_docs/data_quality.devdocs.json index 9ed104a5f220da..1abc27872df38d 100644 --- a/api_docs/data_quality.devdocs.json +++ b/api_docs/data_quality.devdocs.json @@ -47,70 +47,9 @@ "common": { "classes": [], "functions": [], - "interfaces": [ - { - "parentPluginId": "dataQuality", - "id": "def-common.DataQualityLocatorParams", - "type": "Interface", - "tags": [], - "label": "DataQualityLocatorParams", - "description": [], - "signature": [ - { - "pluginId": "dataQuality", - "scope": "common", - "docId": "kibDataQualityPluginApi", - "section": "def-common.DataQualityLocatorParams", - "text": "DataQualityLocatorParams" - }, - " extends ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - } - ], - "path": "x-pack/plugins/data_quality/common/locators/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "dataQuality", - "id": "def-common.DataQualityLocatorParams.filters", - "type": "Object", - "tags": [], - "label": "filters", - "description": [], - "signature": [ - "Filters | undefined" - ], - "path": "x-pack/plugins/data_quality/common/locators/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - } - ], + "interfaces": [], "enums": [], "misc": [ - { - "parentPluginId": "dataQuality", - "id": "def-common.DATA_QUALITY_LOCATOR_ID", - "type": "string", - "tags": [], - "label": "DATA_QUALITY_LOCATOR_ID", - "description": [], - "signature": [ - "\"DATA_QUALITY_LOCATOR\"" - ], - "path": "x-pack/plugins/data_quality/common/locators/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "dataQuality", "id": "def-common.DATA_QUALITY_URL_STATE_KEY", diff --git a/api_docs/data_quality.mdx b/api_docs/data_quality.mdx index 7b4ccf434823e3..9f5495e0c79d12 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-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataQuality'] --- import dataQualityObj from './data_quality.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 8 | 0 | 8 | 0 | +| 5 | 0 | 5 | 0 | ## Client @@ -33,9 +33,6 @@ Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux ## Common -### Interfaces - - ### Consts, variables and types diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 8de4d0592f7ea4..3c71d748fa9cdd 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-07-09 +date: 2024-07-10 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 37f8ceb15cc784..70e71ee5aa5c44 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-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index f3807615bcee70..8984de2773bb77 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-07-09 +date: 2024-07-10 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 dd4529822585ab..f78c44f5962640 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-07-09 +date: 2024-07-10 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 d0b434a81c5087..3e1e9f293c4827 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-07-09 +date: 2024-07-10 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 0b0e2fb4147bb2..611d75c419502a 100644 --- a/api_docs/data_views.devdocs.json +++ b/api_docs/data_views.devdocs.json @@ -12992,6 +12992,10 @@ "plugin": "controls", "path": "src/plugins/controls/public/services/options_list/options_list_service.ts" }, + { + "plugin": "@kbn/lens-embeddable-utils", + "path": "packages/kbn-lens-embeddable-utils/config_builder/columns/breakdown.ts" + }, { "plugin": "triggersActionsUi", "path": "x-pack/plugins/triggers_actions_ui/public/common/lib/data_apis.ts" @@ -13116,10 +13120,6 @@ "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.tsx" }, - { - "plugin": "@kbn/lens-embeddable-utils", - "path": "packages/kbn-lens-embeddable-utils/config_builder/columns/breakdown.ts" - }, { "plugin": "@kbn/ml-data-view-utils", "path": "x-pack/packages/ml/data_view_utils/actions/data_view_handler.ts" diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index f70820a6b113cb..db20d4edea7971 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-07-09 +date: 2024-07-10 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 05b840fe8c3d36..56cf47d4c4aa30 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-07-09 +date: 2024-07-10 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 be1082197b1d33..fe5acec36e9328 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-07-09 +date: 2024-07-10 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 f2079fd416fad8..338694c6a2a55b 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-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -17,7 +17,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Referencing plugin(s) | Remove By | | ---------------|-----------|-----------| | | ml, stackAlerts | - | -| | data, @kbn/search-errors, savedObjectsManagement, unifiedSearch, @kbn/unified-field-list, lens, controls, triggersActionsUi, dataVisualizer, canvas, presentationUtil, logsShared, fleet, ml, @kbn/lens-embeddable-utils, @kbn/ml-data-view-utils, enterpriseSearch, graph, visTypeTimeseries, exploratoryView, stackAlerts, infra, securitySolution, timelines, transform, upgradeAssistant, uptime, ux, maps, dataViewManagement, eventAnnotationListing, inputControlVis, visDefaultEditor, visTypeTimelion, visTypeVega | - | +| | data, @kbn/search-errors, savedObjectsManagement, unifiedSearch, @kbn/unified-field-list, lens, controls, @kbn/lens-embeddable-utils, triggersActionsUi, dataVisualizer, canvas, presentationUtil, logsShared, fleet, ml, @kbn/ml-data-view-utils, enterpriseSearch, graph, visTypeTimeseries, exploratoryView, stackAlerts, infra, securitySolution, timelines, transform, upgradeAssistant, uptime, ux, maps, dataViewManagement, eventAnnotationListing, inputControlVis, visDefaultEditor, visTypeTimelion, visTypeVega | - | | | 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 | - | @@ -39,7 +39,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | securitySolution | - | | | cloudDefend, osquery, securitySolution, synthetics | - | | | cloudDefend, osquery, securitySolution, synthetics | - | -| | alerting, observabilityAIAssistant, fleet, cloudSecurityPosture, enterpriseSearch, securitySolution, serverlessSearch, transform, upgradeAssistant, apm, entityManager, observabilityOnboarding, synthetics, security | - | | | cases, securitySolution, security | - | | | @kbn/securitysolution-data-table, securitySolution | - | | | @kbn/securitysolution-data-table, securitySolution | - | @@ -66,6 +65,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | securitySolution | - | | | @kbn/monaco, securitySolution | - | | | fleet, cloudSecurityPosture, exploratoryView, osquery, synthetics | - | +| | alerting, observabilityAIAssistant, fleet, cloudSecurityPosture, enterpriseSearch, serverlessSearch, transform, upgradeAssistant, apm, entityManager, observabilityOnboarding, synthetics, security | - | | | actions, alerting | - | | | visualizations, lens, controls, dashboard, discover | - | | | discover, @kbn/reporting-public | - | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 3d6bec3acdf4bb..850dc5df41ba7d 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-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -1328,8 +1328,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 7 more | 8.8.0 | | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 7 more | 8.8.0 | | | [get_is_alert_suppression_active.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.ts#:~:text=license%24), [create_threat_signals.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/threat_mapping/create_threat_signals.ts#:~:text=license%24), [query.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/query.ts#:~:text=license%24), [threshold.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/threshold/threshold.ts#:~:text=license%24), [get_is_alert_suppression_active.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.test.ts#:~:text=license%24), [get_is_alert_suppression_active.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.test.ts#:~:text=license%24), [get_is_alert_suppression_active.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.test.ts#:~:text=license%24) | 8.8.0 | -| | [request_context_factory.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/request_context_factory.ts#:~:text=authc), [route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/route.ts#:~:text=authc), [create_signals_migration_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts#:~:text=authc), [delete_signals_migration_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts#:~:text=authc), [finalize_signals_migration_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts#:~:text=authc), [common.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts#:~:text=authc) | - | -| | [endpoint_app_context_services.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts#:~:text=authc), [open_close_signals_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts#:~:text=authc), [open_close_signals_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts#:~:text=authc), [file_info_handler.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.ts#:~:text=authc), [file_download_handler.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.ts#:~:text=authc), [response_actions.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts#:~:text=authc), [list.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts#:~:text=authc), [response_actions.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts#:~:text=authc), [state.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/routes/actions/state.test.ts#:~:text=authc), [index.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/routes/suggestions/index.test.ts#:~:text=authc)+ 14 more | - | +| | [route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/route.ts#:~:text=authc) | - | | | [suggest_user_profiles_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/users/suggest_user_profiles_route.ts#:~:text=userProfiles), [suggest_user_profiles_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/users/suggest_user_profiles_route.ts#:~:text=userProfiles) | - | | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx#:~:text=DeprecatedCellValueElementProps), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx#:~:text=DeprecatedCellValueElementProps) | - | | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx#:~:text=DeprecatedRowRenderer), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx#:~:text=DeprecatedRowRenderer) | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index ba8f747f2b66bc..995499eb7b72d7 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-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index e19d6a97753546..c4cec9086a33bc 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-07-09 +date: 2024-07-10 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 c8feab13c40f02..a41a75aa111def 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-07-09 +date: 2024-07-10 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 aeb8137f43e933..38b90b7b8cf23f 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-07-09 +date: 2024-07-10 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 f68e0f66f9d2d0..58256861789601 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-07-09 +date: 2024-07-10 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 ee89b9fcaa377f..8dcfb6b5e7e6fc 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-07-09 +date: 2024-07-10 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 b9f54e85c98a37..a1059962f6c5ab 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-07-09 +date: 2024-07-10 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 33b17b1b3e0845..3bc3433fb2d123 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-07-09 +date: 2024-07-10 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 a9019137412ae6..452beb639c4d64 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-07-09 +date: 2024-07-10 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 cf1cb411d4e83b..fb85d36c29136f 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-07-09 +date: 2024-07-10 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 38f98bde1d9b52..4ae1a33d050c8a 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-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/entity_manager.mdx b/api_docs/entity_manager.mdx index f85d2feea348f9..65803da229e882 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-07-09 +date: 2024-07-10 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 ad72afddd7a281..59bdc7a01f9256 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-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/esql.devdocs.json b/api_docs/esql.devdocs.json new file mode 100644 index 00000000000000..f3d9e7db3931ce --- /dev/null +++ b/api_docs/esql.devdocs.json @@ -0,0 +1,547 @@ +{ + "id": "esql", + "client": { + "classes": [], + "functions": [ + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLangEditor", + "type": "Function", + "tags": [], + "label": "TextBasedLangEditor", + "description": [], + "signature": [ + "(props: ", + { + "pluginId": "@kbn/text-based-editor", + "scope": "public", + "docId": "kibKbnTextBasedEditorPluginApi", + "section": "def-public.TextBasedLanguagesEditorProps", + "text": "TextBasedLanguagesEditorProps" + }, + ") => JSX.Element" + ], + "path": "src/plugins/esql/public/create_editor.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLangEditor.$1", + "type": "Object", + "tags": [], + "label": "props", + "description": [], + "signature": [ + { + "pluginId": "@kbn/text-based-editor", + "scope": "public", + "docId": "kibKbnTextBasedEditorPluginApi", + "section": "def-public.TextBasedLanguagesEditorProps", + "text": "TextBasedLanguagesEditorProps" + } + ], + "path": "src/plugins/esql/public/create_editor.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "esql", + "id": "def-public.EsqlPluginStart", + "type": "Interface", + "tags": [], + "label": "EsqlPluginStart", + "description": [], + "path": "src/plugins/esql/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "esql", + "id": "def-public.EsqlPluginStart.Editor", + "type": "CompoundType", + "tags": [], + "label": "Editor", + "description": [], + "signature": [ + "React.ComponentClass<", + { + "pluginId": "@kbn/text-based-editor", + "scope": "public", + "docId": "kibKbnTextBasedEditorPluginApi", + "section": "def-public.TextBasedLanguagesEditorProps", + "text": "TextBasedLanguagesEditorProps" + }, + ", any> | React.FunctionComponent<", + { + "pluginId": "@kbn/text-based-editor", + "scope": "public", + "docId": "kibKbnTextBasedEditorPluginApi", + "section": "def-public.TextBasedLanguagesEditorProps", + "text": "TextBasedLanguagesEditorProps" + }, + ">" + ], + "path": "src/plugins/esql/public/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps", + "type": "Interface", + "tags": [], + "label": "TextBasedLanguagesEditorProps", + "description": [], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.query", + "type": "Object", + "tags": [], + "label": "query", + "description": [ + "The aggregate type query" + ], + "signature": [ + "{ esql: string; }" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.onTextLangQueryChange", + "type": "Function", + "tags": [], + "label": "onTextLangQueryChange", + "description": [ + "Callback running everytime the query changes" + ], + "signature": [ + "(query: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + ") => void" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.onTextLangQueryChange.$1", + "type": "Object", + "tags": [], + "label": "query", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + } + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.onTextLangQuerySubmit", + "type": "Function", + "tags": [], + "label": "onTextLangQuerySubmit", + "description": [ + "Callback running when the user submits the query" + ], + "signature": [ + "(query?: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined, abortController?: AbortController | undefined) => Promise" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.onTextLangQuerySubmit.$1", + "type": "Object", + "tags": [], + "label": "query", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.onTextLangQuerySubmit.$2", + "type": "Object", + "tags": [], + "label": "abortController", + "description": [], + "signature": [ + "AbortController | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.expandCodeEditor", + "type": "Function", + "tags": [], + "label": "expandCodeEditor", + "description": [ + "Can be used to expand/minimize the editor" + ], + "signature": [ + "(status: boolean) => void" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.expandCodeEditor.$1", + "type": "boolean", + "tags": [], + "label": "status", + "description": [], + "signature": [ + "boolean" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.isCodeEditorExpanded", + "type": "boolean", + "tags": [], + "label": "isCodeEditorExpanded", + "description": [ + "If it is true, the editor initializes with height EDITOR_INITIAL_HEIGHT_EXPANDED" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.detectTimestamp", + "type": "CompoundType", + "tags": [], + "label": "detectTimestamp", + "description": [ + "If it is true, the editor displays the message @timestamp found\nThe text based queries are relying on adhoc dataviews which\ncan have an @timestamp timefield or nothing" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.errors", + "type": "Array", + "tags": [], + "label": "errors", + "description": [ + "Array of errors" + ], + "signature": [ + "Error[] | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.warning", + "type": "string", + "tags": [], + "label": "warning", + "description": [ + "Warning string as it comes from ES" + ], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.isLoading", + "type": "CompoundType", + "tags": [], + "label": "isLoading", + "description": [ + "Disables the editor and displays loading icon in run button\nIt is also used for hiding the history component if it is not defined" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.isDisabled", + "type": "CompoundType", + "tags": [], + "label": "isDisabled", + "description": [ + "Disables the editor" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.isDarkMode", + "type": "CompoundType", + "tags": [], + "label": "isDarkMode", + "description": [ + "Indicator if the editor is on dark mode" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.dataTestSubj", + "type": "string", + "tags": [], + "label": "dataTestSubj", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.hideMinimizeButton", + "type": "CompoundType", + "tags": [], + "label": "hideMinimizeButton", + "description": [ + "If true it hides the minimize button and the user can't return to the minimized version\nUseful when the application doesn't want to give this capability" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.hideRunQueryText", + "type": "CompoundType", + "tags": [], + "label": "hideRunQueryText", + "description": [ + "Hide the Run query information which appears on the footer" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.editorIsInline", + "type": "CompoundType", + "tags": [], + "label": "editorIsInline", + "description": [ + "This is used for applications (such as the inline editing flyout in dashboards)\nwhich want to add the editor without being part of the Unified search component\nIt renders a submit query button inside the editor" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.disableSubmitAction", + "type": "CompoundType", + "tags": [], + "label": "disableSubmitAction", + "description": [ + "Disables the submit query action" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.allowQueryCancellation", + "type": "CompoundType", + "tags": [], + "label": "allowQueryCancellation", + "description": [ + "when set to true enables query cancellation" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.hideTimeFilterInfo", + "type": "CompoundType", + "tags": [], + "label": "hideTimeFilterInfo", + "description": [ + "hide @timestamp info" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.hideQueryHistory", + "type": "CompoundType", + "tags": [], + "label": "hideQueryHistory", + "description": [ + "hide query history" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "esql", + "id": "def-public.TextBasedLanguagesEditorProps.hideHeaderWhenExpanded", + "type": "CompoundType", + "tags": [], + "label": "hideHeaderWhenExpanded", + "description": [ + "hide header buttons when editor is expanded" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-text-based-editor/src/text_based_languages_editor.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/esql.mdx b/api_docs/esql.mdx new file mode 100644 index 00000000000000..447a914e099b70 --- /dev/null +++ b/api_docs/esql.mdx @@ -0,0 +1,33 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibEsqlPluginApi +slug: /kibana-dev-docs/api/esql +title: "esql" +image: https://source.unsplash.com/400x175/?github +description: API docs for the esql plugin +date: 2024-07-10 +tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esql'] +--- +import esqlObj from './esql.devdocs.json'; + + + +Contact [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 29 | 0 | 10 | 0 | + +## Client + +### Functions + + +### Interfaces + + diff --git a/api_docs/esql_data_grid.mdx b/api_docs/esql_data_grid.mdx index 3f2c0a4d9c670b..7c87152fde9f7f 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-07-09 +date: 2024-07-10 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 8b68077abbcc75..8fb24e06e94162 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-07-09 +date: 2024-07-10 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 2e26b580d7ab1d..c73d5f0e92f685 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-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing'] --- import eventAnnotationListingObj from './event_annotation_listing.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 5dceb029dd2918..bc1e9181691d2b 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/exploratory_view.mdx b/api_docs/exploratory_view.mdx index 6ace7f03b7e987..cab6253f892060 100644 --- a/api_docs/exploratory_view.mdx +++ b/api_docs/exploratory_view.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/exploratoryView title: "exploratoryView" image: https://source.unsplash.com/400x175/?github description: API docs for the exploratoryView plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'exploratoryView'] --- import exploratoryViewObj from './exploratory_view.devdocs.json'; -Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. +Contact [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index ae10832e86007d..95e5b3c81624b6 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index 60112b987fa25c..58efbcc9484171 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index 8d28641ef91100..a295c8a8243e7b 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 24380d9cb7a28b..cd4aef9931b14f 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index 8c2aa4cbee4bfb..49ef48ead111d1 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index 55f8f70299ab9b..2ff72cba1fb0a0 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.devdocs.json b/api_docs/expression_metric_vis.devdocs.json index 3212eb93a18fe1..920c0a7b141d0b 100644 --- a/api_docs/expression_metric_vis.devdocs.json +++ b/api_docs/expression_metric_vis.devdocs.json @@ -449,6 +449,62 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "expressionMetricVis", + "id": "def-common.MetricArguments.titlesTextAlign", + "type": "CompoundType", + "tags": [], + "label": "titlesTextAlign", + "description": [], + "signature": [ + "\"right\" | \"left\" | \"center\"" + ], + "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "expressionMetricVis", + "id": "def-common.MetricArguments.valuesTextAlign", + "type": "CompoundType", + "tags": [], + "label": "valuesTextAlign", + "description": [], + "signature": [ + "\"right\" | \"left\" | \"center\"" + ], + "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "expressionMetricVis", + "id": "def-common.MetricArguments.iconAlign", + "type": "CompoundType", + "tags": [], + "label": "iconAlign", + "description": [], + "signature": [ + "\"right\" | \"left\"" + ], + "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "expressionMetricVis", + "id": "def-common.MetricArguments.valueFontSize", + "type": "CompoundType", + "tags": [], + "label": "valueFontSize", + "description": [], + "signature": [ + "number | \"default\" | \"fit\"" + ], + "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "expressionMetricVis", "id": "def-common.MetricArguments.color", @@ -745,6 +801,62 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "expressionMetricVis", + "id": "def-common.MetricVisParam.titlesTextAlign", + "type": "CompoundType", + "tags": [], + "label": "titlesTextAlign", + "description": [], + "signature": [ + "\"right\" | \"left\" | \"center\"" + ], + "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "expressionMetricVis", + "id": "def-common.MetricVisParam.valuesTextAlign", + "type": "CompoundType", + "tags": [], + "label": "valuesTextAlign", + "description": [], + "signature": [ + "\"right\" | \"left\" | \"center\"" + ], + "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "expressionMetricVis", + "id": "def-common.MetricVisParam.iconAlign", + "type": "CompoundType", + "tags": [], + "label": "iconAlign", + "description": [], + "signature": [ + "\"right\" | \"left\"" + ], + "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "expressionMetricVis", + "id": "def-common.MetricVisParam.valueFontSize", + "type": "CompoundType", + "tags": [], + "label": "valueFontSize", + "description": [], + "signature": [ + "number | \"default\" | \"fit\"" + ], + "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "expressionMetricVis", "id": "def-common.MetricVisParam.maxCols", diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index 81a907caa006e3..5bc7e3f71791be 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 67 | 0 | 67 | 2 | +| 75 | 0 | 75 | 2 | ## Client diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index a3321202f8de61..9a13222ea8881e 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index cb0416e763aaba..e66da6d59b9e52 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index cf12bc2eb835f3..cb683edbaae50a 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index 8425f9b438d210..74c9fbe913ab7b 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index 6229db242f0b13..baf2e18810dc45 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index 5c5befc88992ef..9ba2df560cd901 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 33e5dcb1c9e299..bcf331fcaea877 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.mdx b/api_docs/features.mdx index 3623e4b7381635..98d623a0718dcf 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index 4aa09771437ed3..315f282888a626 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/fields_metadata.mdx b/api_docs/fields_metadata.mdx index 07e9cc79559819..f1f73851b4e032 100644 --- a/api_docs/fields_metadata.mdx +++ b/api_docs/fields_metadata.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldsMetadata title: "fieldsMetadata" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldsMetadata plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldsMetadata'] --- import fieldsMetadataObj from './fields_metadata.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index d7bb8672d1bbbf..3e7c2f343df8ab 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.mdx b/api_docs/files.mdx index 336c7b989982dc..2ce43154bd9019 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx index 08229e66440de9..319a8d826876e4 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index cf34eb3c65364e..dae9096e934917 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index f673e4f74ddefe..4deccbece2ccb8 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index 0f0f71be5ab1f6..4ce7402a8af27a 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 39f790b1342994..c36206ccfa0db9 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/image_embeddable.mdx b/api_docs/image_embeddable.mdx index 7d008c8cda1466..2a2aea8bbd1675 100644 --- a/api_docs/image_embeddable.mdx +++ b/api_docs/image_embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/imageEmbeddable title: "imageEmbeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the imageEmbeddable plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'imageEmbeddable'] --- import imageEmbeddableObj from './image_embeddable.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 2198168f7de1e3..b94c808b00a1c1 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index 6897a3353fc850..2b9c65a69a7625 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index 46eb5f1b08eead..dd9cea8435c0cd 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/ingest_pipelines.mdx b/api_docs/ingest_pipelines.mdx index 7bda5d0e3d79aa..888aeb53975b99 100644 --- a/api_docs/ingest_pipelines.mdx +++ b/api_docs/ingest_pipelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ingestPipelines title: "ingestPipelines" image: https://source.unsplash.com/400x175/?github description: API docs for the ingestPipelines plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ingestPipelines'] --- import ingestPipelinesObj from './ingest_pipelines.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index e17918db58afca..19aeeacae8fb75 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/integration_assistant.mdx b/api_docs/integration_assistant.mdx index e508673b99e2e7..f854290a8e46d4 100644 --- a/api_docs/integration_assistant.mdx +++ b/api_docs/integration_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/integrationAssistant title: "integrationAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the integrationAssistant plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'integrationAssistant'] --- import integrationAssistantObj from './integration_assistant.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 706fd017d0bd14..bfed0056159518 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/investigate.mdx b/api_docs/investigate.mdx index 3564bad1539b14..1297a4e4a49c30 100644 --- a/api_docs/investigate.mdx +++ b/api_docs/investigate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/investigate title: "investigate" image: https://source.unsplash.com/400x175/?github description: API docs for the investigate plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'investigate'] --- import investigateObj from './investigate.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index 59e2e0458b0f13..4e19d3760cbe76 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_actions_types.mdx b/api_docs/kbn_actions_types.mdx index 5cf407eec09494..eed3dae813b411 100644 --- a/api_docs/kbn_actions_types.mdx +++ b/api_docs/kbn_actions_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-actions-types title: "@kbn/actions-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/actions-types plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/actions-types'] --- import kbnActionsTypesObj from './kbn_actions_types.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 026905a20e4222..f0fe73b3dc7c3b 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_pattern_analysis.mdx b/api_docs/kbn_aiops_log_pattern_analysis.mdx index cfd1a74d550493..10ec613aaa5846 100644 --- a/api_docs/kbn_aiops_log_pattern_analysis.mdx +++ b/api_docs/kbn_aiops_log_pattern_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-pattern-analysis title: "@kbn/aiops-log-pattern-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-pattern-analysis plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-pattern-analysis'] --- import kbnAiopsLogPatternAnalysisObj from './kbn_aiops_log_pattern_analysis.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_rate_analysis.mdx b/api_docs/kbn_aiops_log_rate_analysis.mdx index cf1d55a4eba09b..3cb4e7842beb22 100644 --- a/api_docs/kbn_aiops_log_rate_analysis.mdx +++ b/api_docs/kbn_aiops_log_rate_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-rate-analysis title: "@kbn/aiops-log-rate-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-rate-analysis plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-rate-analysis'] --- import kbnAiopsLogRateAnalysisObj from './kbn_aiops_log_rate_analysis.devdocs.json'; diff --git a/api_docs/kbn_alerting_api_integration_helpers.mdx b/api_docs/kbn_alerting_api_integration_helpers.mdx index 7229c00805c463..8b77837af86e9b 100644 --- a/api_docs/kbn_alerting_api_integration_helpers.mdx +++ b/api_docs/kbn_alerting_api_integration_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-api-integration-helpers title: "@kbn/alerting-api-integration-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-api-integration-helpers plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-api-integration-helpers'] --- import kbnAlertingApiIntegrationHelpersObj from './kbn_alerting_api_integration_helpers.devdocs.json'; diff --git a/api_docs/kbn_alerting_comparators.mdx b/api_docs/kbn_alerting_comparators.mdx index c15e5c9d98814b..df854a85297b1b 100644 --- a/api_docs/kbn_alerting_comparators.mdx +++ b/api_docs/kbn_alerting_comparators.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-comparators title: "@kbn/alerting-comparators" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-comparators plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-comparators'] --- import kbnAlertingComparatorsObj from './kbn_alerting_comparators.devdocs.json'; diff --git a/api_docs/kbn_alerting_state_types.mdx b/api_docs/kbn_alerting_state_types.mdx index c9f4894e32a847..f1fa88189271dd 100644 --- a/api_docs/kbn_alerting_state_types.mdx +++ b/api_docs/kbn_alerting_state_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-state-types title: "@kbn/alerting-state-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-state-types plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-state-types'] --- import kbnAlertingStateTypesObj from './kbn_alerting_state_types.devdocs.json'; diff --git a/api_docs/kbn_alerting_types.mdx b/api_docs/kbn_alerting_types.mdx index a85c7f65b836ae..0b00923d69f536 100644 --- a/api_docs/kbn_alerting_types.mdx +++ b/api_docs/kbn_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-types title: "@kbn/alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-types plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-types'] --- import kbnAlertingTypesObj from './kbn_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index 536f700643823c..8258b4fb967f3f 100644 --- a/api_docs/kbn_alerts_as_data_utils.mdx +++ b/api_docs/kbn_alerts_as_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-as-data-utils title: "@kbn/alerts-as-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-as-data-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-as-data-utils'] --- import kbnAlertsAsDataUtilsObj from './kbn_alerts_as_data_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts_grouping.mdx b/api_docs/kbn_alerts_grouping.mdx index 046fba053c0967..50d4f1bd7ceded 100644 --- a/api_docs/kbn_alerts_grouping.mdx +++ b/api_docs/kbn_alerts_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-grouping title: "@kbn/alerts-grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-grouping plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-grouping'] --- import kbnAlertsGroupingObj from './kbn_alerts_grouping.devdocs.json'; diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index 8fbd9e6f4c10dd..ce145ff3877d14 100644 --- a/api_docs/kbn_alerts_ui_shared.mdx +++ b/api_docs/kbn_alerts_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-ui-shared title: "@kbn/alerts-ui-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-ui-shared plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 20a3a8dc846677..736cd4795a2ba6 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_collection_utils.mdx b/api_docs/kbn_analytics_collection_utils.mdx index 61471dadcc39a4..1f5b0b1a14c5d1 100644 --- a/api_docs/kbn_analytics_collection_utils.mdx +++ b/api_docs/kbn_analytics_collection_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-collection-utils title: "@kbn/analytics-collection-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-collection-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-collection-utils'] --- import kbnAnalyticsCollectionUtilsObj from './kbn_analytics_collection_utils.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index b03700b40d54cb..607b5dc80ad404 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_data_view.mdx b/api_docs/kbn_apm_data_view.mdx index 679a62fc5ac1f5..1569c9f838b352 100644 --- a/api_docs/kbn_apm_data_view.mdx +++ b/api_docs/kbn_apm_data_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-data-view title: "@kbn/apm-data-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-data-view plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-data-view'] --- import kbnApmDataViewObj from './kbn_apm_data_view.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 9cb8d8f1f5ab86..40a798b29cb84a 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index 171175c92c49a9..2217f8afe67faf 100644 --- a/api_docs/kbn_apm_synthtrace_client.mdx +++ b/api_docs/kbn_apm_synthtrace_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace-client title: "@kbn/apm-synthtrace-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace-client plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] --- import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index efd66334ac7baf..2f6c7452458493 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index d873cf82d0148a..e9d0d7b94a8111 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_bfetch_error.mdx b/api_docs/kbn_bfetch_error.mdx index 8cf1337712acc0..57a414c2e6a96b 100644 --- a/api_docs/kbn_bfetch_error.mdx +++ b/api_docs/kbn_bfetch_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-bfetch-error title: "@kbn/bfetch-error" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/bfetch-error plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bfetch-error'] --- import kbnBfetchErrorObj from './kbn_bfetch_error.devdocs.json'; diff --git a/api_docs/kbn_calculate_auto.mdx b/api_docs/kbn_calculate_auto.mdx index 91299eadcdb612..cee6fda7b11f25 100644 --- a/api_docs/kbn_calculate_auto.mdx +++ b/api_docs/kbn_calculate_auto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-auto title: "@kbn/calculate-auto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-auto plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-auto'] --- import kbnCalculateAutoObj from './kbn_calculate_auto.devdocs.json'; diff --git a/api_docs/kbn_calculate_width_from_char_count.mdx b/api_docs/kbn_calculate_width_from_char_count.mdx index 79b85cddb8cd87..aa375bc54d8ce2 100644 --- a/api_docs/kbn_calculate_width_from_char_count.mdx +++ b/api_docs/kbn_calculate_width_from_char_count.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-width-from-char-count title: "@kbn/calculate-width-from-char-count" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-width-from-char-count plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-width-from-char-count'] --- import kbnCalculateWidthFromCharCountObj from './kbn_calculate_width_from_char_count.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index 1760c4e447c04f..dd2d4cc67ff9cb 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_cell_actions.mdx b/api_docs/kbn_cell_actions.mdx index 32bf933999b25a..8b9f911f3c2e49 100644 --- a/api_docs/kbn_cell_actions.mdx +++ b/api_docs/kbn_cell_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cell-actions title: "@kbn/cell-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cell-actions plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cell-actions'] --- import kbnCellActionsObj from './kbn_cell_actions.devdocs.json'; diff --git a/api_docs/kbn_chart_expressions_common.mdx b/api_docs/kbn_chart_expressions_common.mdx index ad00bf16869409..ab062d7aacab65 100644 --- a/api_docs/kbn_chart_expressions_common.mdx +++ b/api_docs/kbn_chart_expressions_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-expressions-common title: "@kbn/chart-expressions-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-expressions-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-expressions-common'] --- import kbnChartExpressionsCommonObj from './kbn_chart_expressions_common.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index 0d093b4155ebd9..6c2278cc5c26ca 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index e81db5b2eec237..b59a2000ddd5ed 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 03fdbac88bfd9a..dca01b8e5534e0 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index 0211a48eb90f8e..c7e7d48d429538 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index 9b81e1457bda73..1735337e2d9a46 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 4fbefc50ea6fe3..e7e3677c0f03c4 100644 --- a/api_docs/kbn_code_editor.mdx +++ b/api_docs/kbn_code_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor title: "@kbn/code-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; diff --git a/api_docs/kbn_code_editor_mock.mdx b/api_docs/kbn_code_editor_mock.mdx index ed17d8c6a8df69..bd271acb335cc5 100644 --- a/api_docs/kbn_code_editor_mock.mdx +++ b/api_docs/kbn_code_editor_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor-mock title: "@kbn/code-editor-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor-mock plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor-mock'] --- import kbnCodeEditorMockObj from './kbn_code_editor_mock.devdocs.json'; diff --git a/api_docs/kbn_code_owners.mdx b/api_docs/kbn_code_owners.mdx index 324b3553b77735..6d9a8f8321992d 100644 --- a/api_docs/kbn_code_owners.mdx +++ b/api_docs/kbn_code_owners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-owners title: "@kbn/code-owners" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-owners plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-owners'] --- import kbnCodeOwnersObj from './kbn_code_owners.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index 90ce92ea8f9050..1c25a103149959 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index 514409c17604ba..42a189cc367239 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index 6e9b16e4631a6e..12456f1ab6a0f7 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index e4dd77810aa0ca..81633a93e69bac 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_content_editor.mdx b/api_docs/kbn_content_management_content_editor.mdx index 879b27192725d1..6dec8394e07270 100644 --- a/api_docs/kbn_content_management_content_editor.mdx +++ b/api_docs/kbn_content_management_content_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-editor title: "@kbn/content-management-content-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-content-editor plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor'] --- import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json'; diff --git a/api_docs/kbn_content_management_tabbed_table_list_view.mdx b/api_docs/kbn_content_management_tabbed_table_list_view.mdx index 0722f7032796a8..fd9ae186bc217e 100644 --- a/api_docs/kbn_content_management_tabbed_table_list_view.mdx +++ b/api_docs/kbn_content_management_tabbed_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-tabbed-table-list-view title: "@kbn/content-management-tabbed-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-tabbed-table-list-view plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-tabbed-table-list-view'] --- import kbnContentManagementTabbedTableListViewObj from './kbn_content_management_tabbed_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view.devdocs.json b/api_docs/kbn_content_management_table_list_view.devdocs.json index f3827b9ca8123c..2768884c3da7a8 100644 --- a/api_docs/kbn_content_management_table_list_view.devdocs.json +++ b/api_docs/kbn_content_management_table_list_view.devdocs.json @@ -19,7 +19,7 @@ "section": "def-common.UserContentCommonSchema", "text": "UserContentCommonSchema" }, - ">({ title, description, entityName, entityNamePlural, initialFilter, headingId, initialPageSize, listingLimit, urlStateEnabled, customTableColumn, emptyPrompt, findItems, createItem, editItem, deleteItems, getDetailViewLink, getOnClickTitle, rowItemActions, id: listingId, contentEditor, children, titleColumnName, additionalRightSideActions, withoutPageTemplateWrapper, createdByEnabled, }: ", + ">({ title, description, entityName, entityNamePlural, initialFilter, headingId, initialPageSize, listingLimit, urlStateEnabled, customTableColumn, emptyPrompt, findItems, createItem, editItem, deleteItems, getDetailViewLink, getOnClickTitle, rowItemActions, id: listingId, contentEditor, children, titleColumnName, additionalRightSideActions, withoutPageTemplateWrapper, createdByEnabled, recentlyAccessed, }: ", { "pluginId": "@kbn/content-management-table-list-view", "scope": "public", @@ -38,7 +38,7 @@ "id": "def-public.TableListView.$1", "type": "CompoundType", "tags": [], - "label": "{\n title,\n description,\n entityName,\n entityNamePlural,\n initialFilter,\n headingId,\n initialPageSize,\n listingLimit,\n urlStateEnabled = true,\n customTableColumn,\n emptyPrompt,\n findItems,\n createItem,\n editItem,\n deleteItems,\n getDetailViewLink,\n getOnClickTitle,\n rowItemActions,\n id: listingId,\n contentEditor,\n children,\n titleColumnName,\n additionalRightSideActions,\n withoutPageTemplateWrapper,\n createdByEnabled,\n}", + "label": "{\n title,\n description,\n entityName,\n entityNamePlural,\n initialFilter,\n headingId,\n initialPageSize,\n listingLimit,\n urlStateEnabled = true,\n customTableColumn,\n emptyPrompt,\n findItems,\n createItem,\n editItem,\n deleteItems,\n getDetailViewLink,\n getOnClickTitle,\n rowItemActions,\n id: listingId,\n contentEditor,\n children,\n titleColumnName,\n additionalRightSideActions,\n withoutPageTemplateWrapper,\n createdByEnabled,\n recentlyAccessed,\n}", "description": [], "signature": [ { @@ -79,7 +79,7 @@ "section": "def-public.TableListViewTableProps", "text": "TableListViewTableProps" }, - ", \"id\" | \"entityName\" | \"entityNamePlural\" | \"initialFilter\" | \"headingId\" | \"initialPageSize\" | \"listingLimit\" | \"urlStateEnabled\" | \"customTableColumn\" | \"emptyPrompt\" | \"findItems\" | \"createItem\" | \"editItem\" | \"deleteItems\" | \"getDetailViewLink\" | \"getOnClickTitle\" | \"rowItemActions\" | \"contentEditor\" | \"titleColumnName\" | \"withoutPageTemplateWrapper\" | \"createdByEnabled\"> & { title: string; description?: string | undefined; additionalRightSideActions?: React.ReactNode[] | undefined; children?: React.ReactNode; }" + ", \"id\" | \"entityName\" | \"entityNamePlural\" | \"initialFilter\" | \"headingId\" | \"initialPageSize\" | \"listingLimit\" | \"urlStateEnabled\" | \"customTableColumn\" | \"emptyPrompt\" | \"findItems\" | \"createItem\" | \"editItem\" | \"deleteItems\" | \"getDetailViewLink\" | \"getOnClickTitle\" | \"rowItemActions\" | \"contentEditor\" | \"titleColumnName\" | \"withoutPageTemplateWrapper\" | \"createdByEnabled\" | \"recentlyAccessed\"> & { title: string; description?: string | undefined; additionalRightSideActions?: React.ReactNode[] | undefined; children?: React.ReactNode; }" ], "path": "packages/content-management/table_list_view/src/table_list_view.tsx", "deprecated": false, diff --git a/api_docs/kbn_content_management_table_list_view.mdx b/api_docs/kbn_content_management_table_list_view.mdx index 939f6d5092f0d0..1be41f9b757d78 100644 --- a/api_docs/kbn_content_management_table_list_view.mdx +++ b/api_docs/kbn_content_management_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view title: "@kbn/content-management-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view'] --- import kbnContentManagementTableListViewObj from './kbn_content_management_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_common.mdx b/api_docs/kbn_content_management_table_list_view_common.mdx index 31e619f9852bcb..704cbfbb1c73dd 100644 --- a/api_docs/kbn_content_management_table_list_view_common.mdx +++ b/api_docs/kbn_content_management_table_list_view_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-common title: "@kbn/content-management-table-list-view-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-common'] --- import kbnContentManagementTableListViewCommonObj from './kbn_content_management_table_list_view_common.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_table.devdocs.json b/api_docs/kbn_content_management_table_list_view_table.devdocs.json index da65a4c9272424..2cd0fa155534b2 100644 --- a/api_docs/kbn_content_management_table_list_view_table.devdocs.json +++ b/api_docs/kbn_content_management_table_list_view_table.devdocs.json @@ -109,7 +109,7 @@ "section": "def-common.UserContentCommonSchema", "text": "UserContentCommonSchema" }, - ">({ tableCaption, entityName, entityNamePlural, initialFilter: initialQuery, headingId, initialPageSize, listingLimit, urlStateEnabled, customTableColumn, emptyPrompt, rowItemActions, findItems, createItem, editItem, deleteItems, getDetailViewLink, getOnClickTitle, id: listingId, contentEditor, titleColumnName, withoutPageTemplateWrapper, onFetchSuccess, refreshListBouncer, setPageDataTestSubject, createdByEnabled, }: ", + ">({ tableCaption, entityName, entityNamePlural, initialFilter: initialQuery, headingId, initialPageSize, listingLimit, urlStateEnabled, customTableColumn, emptyPrompt, rowItemActions, findItems, createItem, editItem, deleteItems, getDetailViewLink, getOnClickTitle, id: listingId, contentEditor, titleColumnName, withoutPageTemplateWrapper, onFetchSuccess, refreshListBouncer, setPageDataTestSubject, createdByEnabled, recentlyAccessed, }: ", { "pluginId": "@kbn/content-management-table-list-view-table", "scope": "public", @@ -833,6 +833,28 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-public.TableListViewTableProps.recentlyAccessed", + "type": "Object", + "tags": [], + "label": "recentlyAccessed", + "description": [], + "signature": [ + "Pick<", + { + "pluginId": "@kbn/recently-accessed", + "scope": "common", + "docId": "kibKbnRecentlyAccessedPluginApi", + "section": "def-common.RecentlyAccessed", + "text": "RecentlyAccessed" + }, + ", \"get\"> | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/table_list_view_table.tsx", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/content-management-table-list-view-table", "id": "def-public.TableListViewTableProps.tableCaption", diff --git a/api_docs/kbn_content_management_table_list_view_table.mdx b/api_docs/kbn_content_management_table_list_view_table.mdx index 74be3983e76dbf..ebb114e7b287d7 100644 --- a/api_docs/kbn_content_management_table_list_view_table.mdx +++ b/api_docs/kbn_content_management_table_list_view_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-table title: "@kbn/content-management-table-list-view-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-table plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-table'] --- import kbnContentManagementTableListViewTableObj from './kbn_content_management_table_list_view_table.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 48 | 0 | 32 | 3 | +| 49 | 0 | 33 | 3 | ## Client diff --git a/api_docs/kbn_content_management_user_profiles.mdx b/api_docs/kbn_content_management_user_profiles.mdx index 2b81c3ba9cb2fe..9125238ffbf9a1 100644 --- a/api_docs/kbn_content_management_user_profiles.mdx +++ b/api_docs/kbn_content_management_user_profiles.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-user-profiles title: "@kbn/content-management-user-profiles" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-user-profiles plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-user-profiles'] --- import kbnContentManagementUserProfilesObj from './kbn_content_management_user_profiles.devdocs.json'; diff --git a/api_docs/kbn_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index 35e16d09a66e9c..5e93e81da185aa 100644 --- a/api_docs/kbn_content_management_utils.mdx +++ b/api_docs/kbn_content_management_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-utils title: "@kbn/content-management-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-utils'] --- import kbnContentManagementUtilsObj from './kbn_content_management_utils.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index fcde91201ab8db..74d8ac8a69aaa6 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index 0b42f6c90100e6..31198a58c5d299 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index f9e3cc6381c29f..dd32608997acc5 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index 150ee1257fee87..e3918cdf78c32f 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index 04d6ad1681d203..64817a1ced0bbc 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index b8916d269cc1e9..ba48c0d6d912b2 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index da66c9c3b30fa5..d22cc4c43127db 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index f1faad6e0067e6..2b815d6b948328 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index 7f963bdf82777c..34fee76ee5c361 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index 3d95f710172986..ee76f51d569bf1 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index 4cf5f768f4995a..5656d0d02eb520 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index 25549d6384f103..1762ed09c72b9f 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index 78b83d613ebebc..2b4aa6e4593f46 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 0556f0f0e9f16b..a34ef4d8ceb9e7 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index fec3cff347d846..e4580bbb89dcb0 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index a98ef6914e73c7..2d5ef1cbda0e9c 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index 4c3adbf26bc60d..fa7602c4113c1d 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index bb3dc3876d0b42..aad00c5dd32470 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index b43ac1eb3aaeac..755cc577569bb6 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index f495847303fc9f..8e66c47f788797 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index 8a60d6e77ed4d1..5ae4c0b4a07bab 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.devdocs.json b/api_docs/kbn_core_chrome_browser.devdocs.json index 21ff311b608320..2a76c438cc5efb 100644 --- a/api_docs/kbn_core_chrome_browser.devdocs.json +++ b/api_docs/kbn_core_chrome_browser.devdocs.json @@ -3716,7 +3716,7 @@ "label": "AppDeepLinkId", "description": [], "signature": [ - "\"fleet\" | \"graph\" | \"ml\" | \"monitoring\" | \"metrics\" | \"management\" | \"synthetics\" | \"ux\" | \"apm\" | \"logs\" | \"profiling\" | \"dashboards\" | \"observabilityAIAssistant\" | \"home\" | \"canvas\" | \"integrations\" | \"discover\" | \"observability-overview\" | \"appSearch\" | \"dev_tools\" | \"maps\" | \"visualize\" | \"dev_tools:console\" | \"dev_tools:searchprofiler\" | \"dev_tools:painless_lab\" | \"dev_tools:grokdebugger\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:singleMetricViewer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:logRateAnalysis\" | \"ml:logPatternAnalysis\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:dataViews\" | \"management:spaces\" | \"management:settings\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:data_quality\" | \"management:filesManagement\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:cross_cluster_replication\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"searchPlayground\" | \"searchInferenceEndpoints\" | \"searchHomepage\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\" | \"observability-logs-explorer\" | \"observabilityOnboarding\" | \"slo\" | \"logs:settings\" | \"logs:stream\" | \"logs:log-categories\" | \"logs:anomalies\" | \"observability-overview:cases\" | \"observability-overview:alerts\" | \"observability-overview:rules\" | \"observability-overview:cases_create\" | \"observability-overview:cases_configure\" | \"metrics:settings\" | \"metrics:hosts\" | \"metrics:inventory\" | \"metrics:metrics-explorer\" | \"metrics:assetDetails\" | \"apm:traces\" | \"apm:dependencies\" | \"apm:service-map\" | \"apm:settings\" | \"apm:services\" | \"apm:service-groups-list\" | \"apm:storage-explorer\" | \"synthetics:overview\" | \"synthetics:certificates\" | \"profiling:stacktraces\" | \"profiling:flamegraphs\" | \"profiling:functions\" | \"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:network\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:attack_discovery\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-all\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:hosts-sessions\" | \"securitySolutionUI:hosts-uncommon_processes\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-flows\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:users-all\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:entity_analytics-asset-classification\" | \"securitySolutionUI:coverage-overview\" | \"securitySolutionUI:notes-management\" | \"fleet:settings\" | \"fleet:policies\" | \"fleet:data_streams\" | \"fleet:enrollment_tokens\" | \"fleet:uninstall_tokens\" | \"fleet:agents\"" + "\"fleet\" | \"graph\" | \"ml\" | \"monitoring\" | \"metrics\" | \"management\" | \"synthetics\" | \"ux\" | \"apm\" | \"logs\" | \"profiling\" | \"dashboards\" | \"observabilityAIAssistant\" | \"home\" | \"canvas\" | \"integrations\" | \"discover\" | \"observability-overview\" | \"appSearch\" | \"dev_tools\" | \"maps\" | \"visualize\" | \"dev_tools:console\" | \"dev_tools:searchprofiler\" | \"dev_tools:painless_lab\" | \"dev_tools:grokdebugger\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:singleMetricViewer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:logRateAnalysis\" | \"ml:logPatternAnalysis\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:dataViews\" | \"management:spaces\" | \"management:settings\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:data_quality\" | \"management:filesManagement\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:cross_cluster_replication\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"enterpriseSearchRelevance\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"searchPlayground\" | \"searchInferenceEndpoints\" | \"searchHomepage\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\" | \"enterpriseSearchRelevance:inferenceEndpoints\" | \"observability-logs-explorer\" | \"observabilityOnboarding\" | \"slo\" | \"logs:settings\" | \"logs:stream\" | \"logs:log-categories\" | \"logs:anomalies\" | \"observability-overview:cases\" | \"observability-overview:alerts\" | \"observability-overview:rules\" | \"observability-overview:cases_create\" | \"observability-overview:cases_configure\" | \"metrics:settings\" | \"metrics:hosts\" | \"metrics:inventory\" | \"metrics:metrics-explorer\" | \"metrics:assetDetails\" | \"apm:traces\" | \"apm:dependencies\" | \"apm:service-map\" | \"apm:settings\" | \"apm:services\" | \"apm:service-groups-list\" | \"apm:storage-explorer\" | \"synthetics:overview\" | \"synthetics:certificates\" | \"profiling:stacktraces\" | \"profiling:flamegraphs\" | \"profiling:functions\" | \"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:network\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:attack_discovery\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-all\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:hosts-sessions\" | \"securitySolutionUI:hosts-uncommon_processes\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-flows\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:users-all\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:entity_analytics-asset-classification\" | \"securitySolutionUI:coverage-overview\" | \"securitySolutionUI:notes-management\" | \"fleet:settings\" | \"fleet:policies\" | \"fleet:data_streams\" | \"fleet:enrollment_tokens\" | \"fleet:uninstall_tokens\" | \"fleet:agents\"" ], "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", "deprecated": false, diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index 1086abae2b215b..493424c84b150a 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index 62f7b570e4eca1..e88d9096178e4c 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index e1bde0474cae7a..8cbbd7d26095e3 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser.mdx b/api_docs/kbn_core_custom_branding_browser.mdx index e5468ddc4919cf..70ea4b5dc374a8 100644 --- a/api_docs/kbn_core_custom_branding_browser.mdx +++ b/api_docs/kbn_core_custom_branding_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser title: "@kbn/core-custom-branding-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser'] --- import kbnCoreCustomBrandingBrowserObj from './kbn_core_custom_branding_browser.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_internal.mdx b/api_docs/kbn_core_custom_branding_browser_internal.mdx index 8096f4620c7ce2..078a23e6efa3f4 100644 --- a/api_docs/kbn_core_custom_branding_browser_internal.mdx +++ b/api_docs/kbn_core_custom_branding_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-internal title: "@kbn/core-custom-branding-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-internal'] --- import kbnCoreCustomBrandingBrowserInternalObj from './kbn_core_custom_branding_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_mocks.mdx b/api_docs/kbn_core_custom_branding_browser_mocks.mdx index dda9d9b03975c6..3d9e1988958e3b 100644 --- a/api_docs/kbn_core_custom_branding_browser_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-mocks title: "@kbn/core-custom-branding-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-mocks'] --- import kbnCoreCustomBrandingBrowserMocksObj from './kbn_core_custom_branding_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_common.mdx b/api_docs/kbn_core_custom_branding_common.mdx index efb3d8c9ed2a3f..aac7b29574900d 100644 --- a/api_docs/kbn_core_custom_branding_common.mdx +++ b/api_docs/kbn_core_custom_branding_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-common title: "@kbn/core-custom-branding-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-common'] --- import kbnCoreCustomBrandingCommonObj from './kbn_core_custom_branding_common.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server.mdx b/api_docs/kbn_core_custom_branding_server.mdx index 8407c18d9dbcc0..863b10f8b7b9d2 100644 --- a/api_docs/kbn_core_custom_branding_server.mdx +++ b/api_docs/kbn_core_custom_branding_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server title: "@kbn/core-custom-branding-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server'] --- import kbnCoreCustomBrandingServerObj from './kbn_core_custom_branding_server.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_internal.mdx b/api_docs/kbn_core_custom_branding_server_internal.mdx index 17f9c83d7b6d8c..ecbbc9243ae4e8 100644 --- a/api_docs/kbn_core_custom_branding_server_internal.mdx +++ b/api_docs/kbn_core_custom_branding_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-internal title: "@kbn/core-custom-branding-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-internal'] --- import kbnCoreCustomBrandingServerInternalObj from './kbn_core_custom_branding_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_mocks.mdx b/api_docs/kbn_core_custom_branding_server_mocks.mdx index 5a4bbd836d77e9..b71725ff3b2aec 100644 --- a/api_docs/kbn_core_custom_branding_server_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-mocks title: "@kbn/core-custom-branding-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-mocks'] --- import kbnCoreCustomBrandingServerMocksObj from './kbn_core_custom_branding_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index 459e0abfecb150..dd01ec2331d2de 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index fbb92ae3c4927b..4edbb3c64da343 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index db58daa3dc4c23..11b836687315cd 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index 6341af0909c1fa..b92429db69761f 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index fea078a886534a..d5e1e17da2f2b6 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index 9e35638fe84853..0a185cfe29232e 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index c128ca473df8b1..75766509858231 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 4831dce8dd2a06..bf18087d74d2cf 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index 664f1d96ac2d08..c615e730a495b2 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index f6d9eb3e892a3d..5e4434442a073f 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index bee1dcfa6a53e2..853b804f99a55c 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index e7d76027875e64..acb40a74aa0fc1 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index 5378b1943c94c2..dd28589a8219c6 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index 0f29505f85d228..468df05588325a 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index f10aca9ec19952..31c6d9abee8b94 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index cf45779818e766..61f74a13f0e680 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index 8b742ef47ea4d3..a99628a5feb285 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index 22dc6d6fd2e28c..139c7d6f533cae 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index 898bb2ab07218b..b7f710f7e048d9 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index 785761fd8670f3..a04dabf41596de 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index f52bc3b6dd3e04..7300d7f4befad5 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index c86e95d8e7c096..cd45ea1a09ee3c 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index cb8b66a4c5859f..024a8076e810c6 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index 50c8cd918d317e..3acd65471f5f39 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index c642fcbc622419..042a1ca06100d6 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index 323642c224ac40..a3731a178b6718 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index 56b67697fabc80..0b7dbf9b8af591 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index f76ca30b74ea7b..10b55c9a7963ef 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index d74fa065174a6f..62df39457ebbf9 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index 85d753f6ccda05..aa625c1430ef57 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index 67aff7366d4b5b..c712c870c39edd 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index 11abb16b7388e5..e9702014d9cb43 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index b28bb841aea210..d472cafb7def1e 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index a7f5197d057e38..301bf37a89c5ad 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index 80ba56edce2f9a..d677d7278ee77e 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index 5bd4269119990c..e751633cab599e 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index 7a78f6a7b77322..fc96eb6839be22 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index 12b67e02c9cf0e..8e56ceb6a2d676 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.devdocs.json b/api_docs/kbn_core_http_server.devdocs.json index f0d1328317f97d..6a882bc634e549 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -9638,6 +9638,10 @@ "plugin": "reporting", "path": "x-pack/plugins/reporting/server/test_helpers/create_mock_reportingplugin.ts" }, + { + "plugin": "searchInferenceEndpoints", + "path": "x-pack/plugins/search_inference_endpoints/server/routes.ts" + }, { "plugin": "serverlessSearch", "path": "x-pack/plugins/serverless_search/server/routes/connectors_routes.ts" @@ -14638,6 +14642,22 @@ "plugin": "infra", "path": "x-pack/plugins/observability_solution/infra/server/lib/adapters/framework/kibana_framework_adapter.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_cluster_health/get_cluster_health_route.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_space_health/get_space_health_route.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.ts" + }, { "plugin": "osquery", "path": "x-pack/plugins/osquery/server/routes/live_query/get_live_query_details_route.ts" @@ -14710,22 +14730,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_status/get_prebuilt_rules_status_route.ts" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_cluster_health/get_cluster_health_route.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_space_health/get_space_health_route.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.ts" @@ -15317,10 +15321,6 @@ "plugin": "infra", "path": "x-pack/plugins/observability_solution/infra/server/lib/adapters/framework/kibana_framework_adapter.ts" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/install_prebuilt_rules_and_timelines/install_prebuilt_rules_and_timelines_route.ts" - }, { "plugin": "osquery", "path": "x-pack/plugins/osquery/server/routes/saved_query/update_saved_query_route.ts" @@ -15329,6 +15329,10 @@ "plugin": "osquery", "path": "x-pack/plugins/osquery/server/routes/pack/update_pack_route.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/install_prebuilt_rules_and_timelines/install_prebuilt_rules_and_timelines_route.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_update_rules/route.ts" @@ -16078,15 +16082,19 @@ }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/index.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_cluster_health/get_cluster_health_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/index.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_rule_health/get_rule_health_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_space_health/get_space_health_route.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/setup/setup_health_route.ts" }, { "plugin": "osquery", @@ -16106,35 +16114,31 @@ }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_installation/review_rule_installation_route.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/index.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/index.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_cluster_health/get_cluster_health_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_installation/review_rule_installation_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_rule_health/get_rule_health_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/get_space_health/get_space_health_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_route.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/detection_engine_health/setup/setup_health_route.ts" + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_route.ts" }, { "plugin": "securitySolution", diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 5596729a19e5b5..c931520b056aaf 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 6c60c5f95888dc..9759c12e3d3753 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index 8df92ed2ed404b..52194d1e3ba22a 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index 6550a4170a723a..35b2cca10f6266 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index 306b32ec55c1a9..2644102b52276f 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index f849d6e5cead01..b2f26ad7f762a6 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index cdddc0eb5e5e4e..e49c256c48da4e 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index b5e51e530e50dd..29622e5b8cfce8 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index de9f97d537e428..80c612eed5595a 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index bed7da38edbb42..c92d1b62d82f99 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index 9976d4b739156e..b173cfa0a04cec 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 7534a661104963..43c26797343272 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index 576be6a0480771..7da2b4413e8dc6 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index 7d3abe3f0c9dc2..7ba907b57a4e04 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index 0f501a54064563..da470e8c5d7033 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks'] --- import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx index 677ea84bfa21a6..00fb9dd2ebcec8 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks'] --- import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx index d066406eb194eb..42a0e8343c5f61 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal'] --- import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index e36cdb66b8bdbf..910f2873610ad6 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index 87f35c880d4865..8590695194b429 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index 03c8d13082f19c..d512ae1f0b0037 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index 0ff44ccb2e7262..81edad85cffac7 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index b5131595599a60..fefa72fd3b6668 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index a7631cf8c39bc0..9d6f8be46e00b7 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index b3bc256921f77c..2daf307ef4f4f3 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index c0c3c776bfa33b..64a7b50c476087 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index 623d9f05fd146c..46374089703e0e 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 07b5c87f8e1a61..152930feda4112 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index 0af8a380b89861..12522b90f06f2a 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index 8733bac0f473d9..8c8c3b805224aa 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index 34ad00eaeb7a76..d232bafe0fa825 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index ac75d8f1910b9d..3c30b302f76f9c 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index 906a5258c34156..5dc7556ad8bf93 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index b1a65946aacee3..a19c448fcc3457 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index f58effd94bdd30..ad9a4f45df10d6 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index d23b118d230031..66c479cb3a4c2d 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index cafedc5b681bad..dc6502ea5f1fef 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index 921d52cf93af54..309d207ba9c512 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_browser.mdx b/api_docs/kbn_core_plugins_contracts_browser.mdx index db3657b741db64..aea6137d6b2f64 100644 --- a/api_docs/kbn_core_plugins_contracts_browser.mdx +++ b/api_docs/kbn_core_plugins_contracts_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-browser title: "@kbn/core-plugins-contracts-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-browser'] --- import kbnCorePluginsContractsBrowserObj from './kbn_core_plugins_contracts_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_server.mdx b/api_docs/kbn_core_plugins_contracts_server.mdx index e76953060daa7c..0138ec86854929 100644 --- a/api_docs/kbn_core_plugins_contracts_server.mdx +++ b/api_docs/kbn_core_plugins_contracts_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-server title: "@kbn/core-plugins-contracts-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-server'] --- import kbnCorePluginsContractsServerObj from './kbn_core_plugins_contracts_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index 91ff579000f9ea..45e7b983181e70 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server'] --- import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx index 046427404d6269..fb8e18373612af 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks'] --- import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index 1da976fb44be49..4c8f4bedf0b628 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index 480c70239ab382..3b1283d55ff632 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index 23c9a3263b297d..63648a80c8df25 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index 511c802b6d1416..85402f60a8cd4a 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index e9dc751143066b..bd24e8b6521dea 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index 57f88ea5c51dfc..dc8ed6970a5a30 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal'] --- import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index 8fe186570a1264..2be2c17cd383dd 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index 694f4eb097689c..02238a9b756851 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index e5c4b705bd85f6..e22c55d5cbd2d1 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index d37ce6bcdc6e1c..1f9e3651952aff 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index a6611bbed76dbb..1705bf294d5ddb 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index eba8f921ec522b..71c5bd38274409 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index 8778e778c0fe5c..e778e345e2eef3 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index 56e8c07c0f0da9..cc080a849348a2 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index 554b28e4d8a6b2..f749372d27e69a 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index db08f52c6122d2..e4e89e985e55a9 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index 2dd11ab51188fd..18ab4d127f0942 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index 7645e5be4a95a5..adefadd41522ad 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index 5eebde469fa1d2..bef401cec68d06 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index 654bb0d9a30caa..aa02f2c204c336 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index a3b05a0a497fb9..365461b782a273 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index 74d85c41a162b8..864cfb892c1e55 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index f1089272a33c0c..0b0b7e49ce06ae 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser.mdx b/api_docs/kbn_core_security_browser.mdx index c1cb8444bc83b4..d501f71665274d 100644 --- a/api_docs/kbn_core_security_browser.mdx +++ b/api_docs/kbn_core_security_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser title: "@kbn/core-security-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser'] --- import kbnCoreSecurityBrowserObj from './kbn_core_security_browser.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_internal.mdx b/api_docs/kbn_core_security_browser_internal.mdx index f55fdf09091ffb..60a4bfc184eade 100644 --- a/api_docs/kbn_core_security_browser_internal.mdx +++ b/api_docs/kbn_core_security_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-internal title: "@kbn/core-security-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-internal'] --- import kbnCoreSecurityBrowserInternalObj from './kbn_core_security_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_mocks.mdx b/api_docs/kbn_core_security_browser_mocks.mdx index 718c42829ed7ee..08455631e32c63 100644 --- a/api_docs/kbn_core_security_browser_mocks.mdx +++ b/api_docs/kbn_core_security_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-mocks title: "@kbn/core-security-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-mocks'] --- import kbnCoreSecurityBrowserMocksObj from './kbn_core_security_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_security_common.mdx b/api_docs/kbn_core_security_common.mdx index 371aaf08307d58..0ee6a3841131f5 100644 --- a/api_docs/kbn_core_security_common.mdx +++ b/api_docs/kbn_core_security_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-common title: "@kbn/core-security-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-common'] --- import kbnCoreSecurityCommonObj from './kbn_core_security_common.devdocs.json'; diff --git a/api_docs/kbn_core_security_server.devdocs.json b/api_docs/kbn_core_security_server.devdocs.json index fb144f1f8e2d8b..ca536ef16c4827 100644 --- a/api_docs/kbn_core_security_server.devdocs.json +++ b/api_docs/kbn_core_security_server.devdocs.json @@ -18,94 +18,1708 @@ }, "common": { "classes": [], - "functions": [], + "functions": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.isCreateRestAPIKeyParams", + "type": "Function", + "tags": [], + "label": "isCreateRestAPIKeyParams", + "description": [], + "signature": [ + "(params: any) => boolean" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.isCreateRestAPIKeyParams.$1", + "type": "Any", + "tags": [], + "label": "params", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], "interfaces": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditEvent", + "id": "def-common.APIKeys", + "type": "Interface", + "tags": [], + "label": "APIKeys", + "description": [ + "\nInterface for managing API keys in Elasticsearch, including creation,\nvalidation, and invalidation of API keys,\nas well as checking the status of API key features." + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.areAPIKeysEnabled", + "type": "Function", + "tags": [], + "label": "areAPIKeysEnabled", + "description": [ + "\nDetermines if API Keys are enabled in Elasticsearch." + ], + "signature": [ + "() => Promise" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.areCrossClusterAPIKeysEnabled", + "type": "Function", + "tags": [], + "label": "areCrossClusterAPIKeysEnabled", + "description": [ + "\nDetermines if Cross-Cluster API Keys are enabled in Elasticsearch." + ], + "signature": [ + "() => Promise" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [ + "\nTries to create an API key for the current user.\n\nReturns newly created API key or `null` if API keys are disabled.\n\nUser needs `manage_api_key` privilege to create REST API keys and `manage_security` for Cross-Cluster API keys.\n" + ], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ", createParams: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateAPIKeyParams", + "text": "CreateAPIKeyParams" + }, + ") => Promise<", + "SecurityCreateApiKeyResponse", + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.create.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [ + "Request instance." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.create.$2", + "type": "CompoundType", + "tags": [], + "label": "createParams", + "description": [ + "The params to create an API key" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateAPIKeyParams", + "text": "CreateAPIKeyParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.update", + "type": "Function", + "tags": [], + "label": "update", + "description": [ + "\nAttempts update an API key with the provided 'role_descriptors' and 'metadata'\n\nReturns `updated`, `true` if the update was successful, `false` if there was nothing to update\n\nUser needs `manage_api_key` privilege to update REST API keys and `manage_security` for cross-cluster API keys.\n" + ], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ", updateParams: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateAPIKeyParams", + "text": "UpdateAPIKeyParams" + }, + ") => Promise<", + "SecurityUpdateApiKeyResponse", + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.update.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [ + "Request instance." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.update.$2", + "type": "CompoundType", + "tags": [], + "label": "updateParams", + "description": [ + "The params to edit an API key" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateAPIKeyParams", + "text": "UpdateAPIKeyParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.grantAsInternalUser", + "type": "Function", + "tags": [], + "label": "grantAsInternalUser", + "description": [ + "\nTries to grant an API key for the current user." + ], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ", createParams: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyParams", + "text": "CreateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams", + "text": "CreateRestAPIKeyWithKibanaPrivilegesParams" + }, + ") => Promise<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.GrantAPIKeyResult", + "text": "GrantAPIKeyResult" + }, + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.grantAsInternalUser.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [ + "Request instance." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.grantAsInternalUser.$2", + "type": "CompoundType", + "tags": [], + "label": "createParams", + "description": [ + "Create operation parameters." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyParams", + "text": "CreateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams", + "text": "CreateRestAPIKeyWithKibanaPrivilegesParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.validate", + "type": "Function", + "tags": [], + "label": "validate", + "description": [ + "\nTries to validate an API key." + ], + "signature": [ + "(apiKeyPrams: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.ValidateAPIKeyParams", + "text": "ValidateAPIKeyParams" + }, + ") => Promise" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.validate.$1", + "type": "Object", + "tags": [], + "label": "apiKeyPrams", + "description": [ + "ValidateAPIKeyParams." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.ValidateAPIKeyParams", + "text": "ValidateAPIKeyParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.invalidate", + "type": "Function", + "tags": [], + "label": "invalidate", + "description": [ + "\nTries to invalidate an API keys." + ], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ", params: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", + "text": "InvalidateAPIKeysParams" + }, + ") => Promise<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeyResult", + "text": "InvalidateAPIKeyResult" + }, + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.invalidate.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [ + "Request instance." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.invalidate.$2", + "type": "Object", + "tags": [], + "label": "params", + "description": [ + "The params to invalidate an API keys." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", + "text": "InvalidateAPIKeysParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.invalidateAsInternalUser", + "type": "Function", + "tags": [], + "label": "invalidateAsInternalUser", + "description": [ + "\nTries to invalidate the API keys by using the internal user." + ], + "signature": [ + "(params: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", + "text": "InvalidateAPIKeysParams" + }, + ") => Promise<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeyResult", + "text": "InvalidateAPIKeyResult" + }, + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeys.invalidateAsInternalUser.$1", + "type": "Object", + "tags": [], + "label": "params", + "description": [ + "The params to invalidate the API keys." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", + "text": "InvalidateAPIKeysParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeysServiceWithContext", + "type": "Interface", + "tags": [], + "label": "APIKeysServiceWithContext", + "description": [ + "\nPublic API Keys service exposed through core context to manage\nAPI keys in Elasticsearch, including creation,\nvalidation, and invalidation of API keys,\nas well as checking the status of API key features." + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeysServiceWithContext.areAPIKeysEnabled", + "type": "Function", + "tags": [], + "label": "areAPIKeysEnabled", + "description": [ + "\nDetermines if API Keys are enabled in Elasticsearch." + ], + "signature": [ + "() => Promise" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeysServiceWithContext.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [ + "\nTries to create an API key for the current user.\n\nReturns newly created API key or `null` if API keys are disabled.\n\nUser needs `manage_api_key` privilege to create REST API keys and `manage_security` for Cross-Cluster API keys.\n" + ], + "signature": [ + "(createParams: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateAPIKeyParams", + "text": "CreateAPIKeyParams" + }, + ") => Promise<", + "SecurityCreateApiKeyResponse", + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeysServiceWithContext.create.$1", + "type": "CompoundType", + "tags": [], + "label": "createParams", + "description": [ + "The params to create an API key" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateAPIKeyParams", + "text": "CreateAPIKeyParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys_context.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeysServiceWithContext.update", + "type": "Function", + "tags": [], + "label": "update", + "description": [ + "\nAttempts update an API key with the provided 'role_descriptors' and 'metadata'\n\nReturns `updated`, `true` if the update was successful, `false` if there was nothing to update\n\nUser needs `manage_api_key` privilege to update REST API keys and `manage_security` for cross-cluster API keys.\n" + ], + "signature": [ + "(updateParams: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateAPIKeyParams", + "text": "UpdateAPIKeyParams" + }, + ") => Promise<", + "SecurityUpdateApiKeyResponse", + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeysServiceWithContext.update.$1", + "type": "CompoundType", + "tags": [], + "label": "updateParams", + "description": [ + "The params to edit an API key" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateAPIKeyParams", + "text": "UpdateAPIKeyParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys_context.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeysServiceWithContext.validate", + "type": "Function", + "tags": [], + "label": "validate", + "description": [ + "\nTries to validate an API key." + ], + "signature": [ + "(apiKeyPrams: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.ValidateAPIKeyParams", + "text": "ValidateAPIKeyParams" + }, + ") => Promise" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeysServiceWithContext.validate.$1", + "type": "Object", + "tags": [], + "label": "apiKeyPrams", + "description": [ + "ValidateAPIKeyParams." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.ValidateAPIKeyParams", + "text": "ValidateAPIKeyParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys_context.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeysServiceWithContext.invalidate", + "type": "Function", + "tags": [], + "label": "invalidate", + "description": [ + "\nTries to invalidate an API keys." + ], + "signature": [ + "(params: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", + "text": "InvalidateAPIKeysParams" + }, + ") => Promise<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeyResult", + "text": "InvalidateAPIKeyResult" + }, + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.APIKeysServiceWithContext.invalidate.$1", + "type": "Object", + "tags": [], + "label": "params", + "description": [ + "The params to invalidate an API keys." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", + "text": "InvalidateAPIKeysParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys_context.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditEvent", + "type": "Interface", + "tags": [], + "label": "AuditEvent", + "description": [ + "\nAudit event schema using ECS format: https://www.elastic.co/guide/en/ecs/1.12/index.html\n\nIf you add additional fields to the schema ensure you update the Kibana Filebeat module:\nhttps://github.com/elastic/beats/tree/master/filebeat/module/kibana\n" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuditEvent", + "text": "AuditEvent" + }, + " extends ", + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.LogMeta", + "text": "LogMeta" + } + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditEvent.message", + "type": "string", + "tags": [], + "label": "message", + "description": [ + "\nLog message" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditEvent.kibana", + "type": "Object", + "tags": [], + "label": "kibana", + "description": [ + "\nKibana specific fields" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuditKibana", + "text": "AuditKibana" + }, + " | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditEvent.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [ + "\nFields describing an HTTP request" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuditHttp", + "text": "AuditHttp" + }, + " | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditHttp", + "type": "Interface", + "tags": [], + "label": "AuditHttp", + "description": [ + "\nAudit http schema using ECS format" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuditHttp", + "text": "AuditHttp" + }, + " extends ", + "EcsHttp" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditHttp.request", + "type": "Object", + "tags": [], + "label": "request", + "description": [ + "\nHTTP request details" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuditRequest", + "text": "AuditRequest" + }, + " | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditKibana", + "type": "Interface", + "tags": [], + "label": "AuditKibana", + "description": [ + "\nAudit kibana schema using ECS format" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditKibana.space_id", + "type": "string", + "tags": [], + "label": "space_id", + "description": [ + "\nThe ID of the space associated with this event." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditKibana.session_id", + "type": "string", + "tags": [], + "label": "session_id", + "description": [ + "\nThe ID of the user session associated with this event. Each login attempt\nresults in a unique session id." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditKibana.saved_object", + "type": "Object", + "tags": [], + "label": "saved_object", + "description": [ + "\nSaved object that was created, changed, deleted or accessed as part of this event." + ], + "signature": [ + "{ type: string; id: string; name?: string | undefined; } | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditKibana.authentication_provider", + "type": "string", + "tags": [], + "label": "authentication_provider", + "description": [ + "\nName of authentication provider associated with a login event." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditKibana.authentication_type", + "type": "string", + "tags": [], + "label": "authentication_type", + "description": [ + "\nType of authentication provider associated with a login event." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditKibana.authentication_realm", + "type": "string", + "tags": [], + "label": "authentication_realm", + "description": [ + "\nName of Elasticsearch realm that has authenticated the user." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditKibana.lookup_realm", + "type": "string", + "tags": [], + "label": "lookup_realm", + "description": [ + "\nName of Elasticsearch realm where the user details were retrieved from." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditKibana.add_to_spaces", + "type": "Object", + "tags": [], + "label": "add_to_spaces", + "description": [ + "\nSet of space IDs that a saved object was shared to." + ], + "signature": [ + "readonly string[] | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditKibana.delete_from_spaces", + "type": "Object", + "tags": [], + "label": "delete_from_spaces", + "description": [ + "\nSet of space IDs that a saved object was removed from." + ], + "signature": [ + "readonly string[] | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditKibana.unauthorized_spaces", + "type": "Object", + "tags": [], + "label": "unauthorized_spaces", + "description": [ + "\nSet of space IDs that are not authorized for an action." + ], + "signature": [ + "readonly string[] | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditKibana.unauthorized_types", + "type": "Object", + "tags": [], + "label": "unauthorized_types", + "description": [ + "\nSet of types that are not authorized for an action." + ], + "signature": [ + "readonly string[] | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditLogger", + "type": "Interface", + "tags": [], + "label": "AuditLogger", + "description": [], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_logger.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditLogger.log", + "type": "Function", + "tags": [], + "label": "log", + "description": [ + "\nLogs an {@link AuditEvent} and automatically adds meta data about the\ncurrent user, space and correlation id.\n\nGuidelines around what events should be logged and how they should be\nstructured can be found in: `/x-pack/plugins/security/README.md`\n" + ], + "signature": [ + "(event: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuditEvent", + "text": "AuditEvent" + }, + " | undefined) => void" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_logger.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditLogger.log.$1", + "type": "Object", + "tags": [], + "label": "event", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuditEvent", + "text": "AuditEvent" + }, + " | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_logger.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditLogger.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [ + "\nIndicates whether audit logging is enabled or not.\n\nUseful for skipping resource-intense operations that don't need to be performed when audit\nlogging is disabled." + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_logger.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditRequest", + "type": "Interface", + "tags": [], + "label": "AuditRequest", + "description": [ + "\nAudit request schema using ECS format" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuditRequest", + "text": "AuditRequest" + }, + " extends { body?: { bytes?: number | undefined; content?: string | undefined; } | undefined; bytes?: number | undefined; id?: string | undefined; method?: string | undefined; mime_type?: string | undefined; referrer?: string | undefined; }" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditRequest.headers", + "type": "Object", + "tags": [], + "label": "headers", + "description": [ + "\nHTTP request headers" + ], + "signature": [ + "{ 'x-forwarded-for'?: string | undefined; } | undefined" + ], + "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditRequestHandlerContext", + "type": "Interface", + "tags": [], + "label": "AuditRequestHandlerContext", + "description": [], + "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuditRequestHandlerContext.logger", + "type": "Object", + "tags": [], + "label": "logger", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuditLogger", + "text": "AuditLogger" + } + ], + "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuthcRequestHandlerContext", + "type": "Interface", + "tags": [], + "label": "AuthcRequestHandlerContext", + "description": [], + "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuthcRequestHandlerContext.getCurrentUser", + "type": "Function", + "tags": [], + "label": "getCurrentUser", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + " | null" + ], + "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuthcRequestHandlerContext.apiKeys", + "type": "Object", + "tags": [], + "label": "apiKeys", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.APIKeysServiceWithContext", + "text": "APIKeysServiceWithContext" + } + ], + "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreAuditService", + "type": "Interface", + "tags": [], + "label": "CoreAuditService", + "description": [], + "path": "packages/core/security/core-security-server/src/audit.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreAuditService.asScoped", + "type": "Function", + "tags": [], + "label": "asScoped", + "description": [ + "\nCreates an {@link AuditLogger} scoped to the current request.\n\nThis audit logger logs events with all required user and session info and should be used for\nall user-initiated actions.\n" + ], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ") => ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuditLogger", + "text": "AuditLogger" + } + ], + "path": "packages/core/security/core-security-server/src/audit.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreAuditService.asScoped.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server/src/audit.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreAuditService.withoutRequest", + "type": "Object", + "tags": [], + "label": "withoutRequest", + "description": [ + "\n{@link AuditLogger} for background tasks only.\n\nThis audit logger logs events without any user or session info and should never be used to log\nuser-initiated actions.\n" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuditLogger", + "text": "AuditLogger" + } + ], + "path": "packages/core/security/core-security-server/src/audit.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreAuthenticationService", + "type": "Interface", + "tags": [], + "label": "CoreAuthenticationService", + "description": [ + "\nCore's authentication service\n" + ], + "path": "packages/core/security/core-security-server/src/authc.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreAuthenticationService.getCurrentUser", + "type": "Function", + "tags": [], + "label": "getCurrentUser", + "description": [ + "\nRetrieve the user bound to the provided request, or null if\nno user is authenticated.\n" + ], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ") => ", + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + " | null" + ], + "path": "packages/core/security/core-security-server/src/authc.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreAuthenticationService.getCurrentUser.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [ + "The request to retrieve the authenticated user for." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server/src/authc.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreAuthenticationService.apiKeys", + "type": "Object", + "tags": [], + "label": "apiKeys", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.APIKeys", + "text": "APIKeys" + } + ], + "path": "packages/core/security/core-security-server/src/authc.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreFipsService", + "type": "Interface", + "tags": [], + "label": "CoreFipsService", + "description": [ + "\nCore's FIPS service\n" + ], + "path": "packages/core/security/core-security-server/src/fips.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreFipsService.isEnabled", + "type": "Function", + "tags": [], + "label": "isEnabled", + "description": [ + "\nCheck if Kibana is configured to run in FIPS mode" + ], + "signature": [ + "() => boolean" + ], + "path": "packages/core/security/core-security-server/src/fips.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreSecurityDelegateContract", "type": "Interface", "tags": [], - "label": "AuditEvent", + "label": "CoreSecurityDelegateContract", "description": [ - "\nAudit event schema using ECS format: https://www.elastic.co/guide/en/ecs/1.12/index.html\n\nIf you add additional fields to the schema ensure you update the Kibana Filebeat module:\nhttps://github.com/elastic/beats/tree/master/filebeat/module/kibana\n" + "\nThe contract exposed by the security provider for Core to\nconsume and re-expose via its security service.\n" ], - "signature": [ + "path": "packages/core/security/core-security-server/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.AuditEvent", - "text": "AuditEvent" + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreSecurityDelegateContract.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreAuthenticationService", + "text": "CoreAuthenticationService" + } + ], + "path": "packages/core/security/core-security-server/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false }, - " extends ", { - "pluginId": "@kbn/logging", - "scope": "common", - "docId": "kibKbnLoggingPluginApi", - "section": "def-common.LogMeta", - "text": "LogMeta" + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreSecurityDelegateContract.audit", + "type": "Object", + "tags": [], + "label": "audit", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreAuditService", + "text": "CoreAuditService" + } + ], + "path": "packages/core/security/core-security-server/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false } ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateCrossClusterAPIKeyParams", + "type": "Interface", + "tags": [], + "label": "CreateCrossClusterAPIKeyParams", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditEvent.message", + "id": "def-common.CreateCrossClusterAPIKeyParams.type", "type": "string", "tags": [], - "label": "message", - "description": [ - "\nLog message" + "label": "type", + "description": [], + "signature": [ + "\"cross_cluster\"" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditEvent.kibana", - "type": "Object", + "id": "def-common.CreateCrossClusterAPIKeyParams.expiration", + "type": "string", "tags": [], - "label": "kibana", - "description": [ - "\nKibana specific fields" - ], + "label": "expiration", + "description": [], "signature": [ - { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.AuditKibana", - "text": "AuditKibana" - }, - " | undefined" + "string | undefined" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditEvent.http", + "id": "def-common.CreateCrossClusterAPIKeyParams.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateCrossClusterAPIKeyParams.metadata", "type": "Object", "tags": [], - "label": "http", - "description": [ - "\nFields describing an HTTP request" + "label": "metadata", + "description": [], + "signature": [ + "{ [key: string]: any; } | undefined" ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateCrossClusterAPIKeyParams.access", + "type": "Object", + "tags": [], + "label": "access", + "description": [], "signature": [ - { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.AuditHttp", - "text": "AuditHttp" - }, - " | undefined" + "{ search?: { names: string[]; query?: unknown; field_security?: unknown; allow_restricted_indices?: boolean | undefined; }[] | undefined; replication?: { names: string[]; }[] | undefined; }" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -114,48 +1728,176 @@ }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditHttp", + "id": "def-common.CreateRestAPIKeyParams", "type": "Interface", "tags": [], - "label": "AuditHttp", - "description": [ - "\nAudit http schema using ECS format" - ], - "signature": [ + "label": "CreateRestAPIKeyParams", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.AuditHttp", - "text": "AuditHttp" + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateRestAPIKeyParams.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"rest\" | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false }, - " extends ", - "EcsHttp" + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateRestAPIKeyParams.expiration", + "type": "string", + "tags": [], + "label": "expiration", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateRestAPIKeyParams.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateRestAPIKeyParams.role_descriptors", + "type": "Object", + "tags": [], + "label": "role_descriptors", + "description": [], + "signature": [ + "{ [x: string]: { [key: string]: any; }; }" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateRestAPIKeyParams.metadata", + "type": "Object", + "tags": [], + "label": "metadata", + "description": [], + "signature": [ + "{ [key: string]: any; } | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + } ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams", + "type": "Interface", + "tags": [], + "label": "CreateRestAPIKeyWithKibanaPrivilegesParams", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditHttp.request", + "id": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"rest\" | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams.expiration", + "type": "string", + "tags": [], + "label": "expiration", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams.metadata", "type": "Object", "tags": [], - "label": "request", - "description": [ - "\nHTTP request details" + "label": "metadata", + "description": [], + "signature": [ + "{ [key: string]: any; } | undefined" ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams.kibana_role_descriptors", + "type": "Object", + "tags": [], + "label": "kibana_role_descriptors", + "description": [], "signature": [ + "{ [x: string]: { elasticsearch: ", { "pluginId": "@kbn/core-security-server", "scope": "common", "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.AuditRequest", - "text": "AuditRequest" + "section": "def-common.ElasticsearchPrivilegesType", + "text": "ElasticsearchPrivilegesType" }, - " | undefined" + " & { [key: string]: unknown; }; kibana: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.KibanaPrivilegesType", + "text": "KibanaPrivilegesType" + }, + "; }; }" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -164,266 +1906,214 @@ }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditKibana", + "id": "def-common.ElasticsearchPrivilegesType", "type": "Interface", "tags": [], - "label": "AuditKibana", + "label": "ElasticsearchPrivilegesType", "description": [ - "\nAudit kibana schema using ECS format" + "\nType representing Elasticsearch specific portion of the role definition." ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/roles/schema.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditKibana.space_id", - "type": "string", + "id": "def-common.ElasticsearchPrivilegesType.cluster", + "type": "Array", "tags": [], - "label": "space_id", - "description": [ - "\nThe ID of the space associated with this event." - ], + "label": "cluster", + "description": [], "signature": [ - "string | undefined" + "string[] | undefined" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/roles/schema.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditKibana.session_id", - "type": "string", + "id": "def-common.ElasticsearchPrivilegesType.remote_cluster", + "type": "Array", "tags": [], - "label": "session_id", - "description": [ - "\nThe ID of the user session associated with this event. Each login attempt\nresults in a unique session id." - ], + "label": "remote_cluster", + "description": [], "signature": [ - "string | undefined" + "{ privileges: string[]; clusters: string[]; }[] | undefined" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/roles/schema.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditKibana.saved_object", - "type": "Object", + "id": "def-common.ElasticsearchPrivilegesType.indices", + "type": "Array", "tags": [], - "label": "saved_object", - "description": [ - "\nSaved object that was created, changed, deleted or accessed as part of this event." - ], + "label": "indices", + "description": [], "signature": [ - "{ type: string; id: string; name?: string | undefined; } | undefined" + "{ names: string[]; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; privileges: string[]; query?: string | undefined; allow_restricted_indices?: boolean | undefined; }[] | undefined" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/roles/schema.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditKibana.authentication_provider", - "type": "string", + "id": "def-common.ElasticsearchPrivilegesType.remote_indices", + "type": "Array", "tags": [], - "label": "authentication_provider", - "description": [ - "\nName of authentication provider associated with a login event." - ], + "label": "remote_indices", + "description": [], "signature": [ - "string | undefined" + "{ clusters: string[]; names: string[]; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; privileges: string[]; query?: string | undefined; allow_restricted_indices?: boolean | undefined; }[] | undefined" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/roles/schema.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditKibana.authentication_type", - "type": "string", + "id": "def-common.ElasticsearchPrivilegesType.run_as", + "type": "Array", "tags": [], - "label": "authentication_type", - "description": [ - "\nType of authentication provider associated with a login event." - ], + "label": "run_as", + "description": [], "signature": [ - "string | undefined" + "string[] | undefined" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/roles/schema.ts", "deprecated": false, "trackAdoption": false - }, + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.GrantAPIKeyResult", + "type": "Interface", + "tags": [], + "label": "GrantAPIKeyResult", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditKibana.authentication_realm", + "id": "def-common.GrantAPIKeyResult.id", "type": "string", "tags": [], - "label": "authentication_realm", + "label": "id", "description": [ - "\nName of Elasticsearch realm that has authenticated the user." - ], - "signature": [ - "string | undefined" + "\nUnique id for this API key" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditKibana.lookup_realm", + "id": "def-common.GrantAPIKeyResult.name", "type": "string", "tags": [], - "label": "lookup_realm", + "label": "name", "description": [ - "\nName of Elasticsearch realm where the user details were retrieved from." - ], - "signature": [ - "string | undefined" + "\nName for this API key" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditKibana.add_to_spaces", - "type": "Object", + "id": "def-common.GrantAPIKeyResult.api_key", + "type": "string", "tags": [], - "label": "add_to_spaces", + "label": "api_key", "description": [ - "\nSet of space IDs that a saved object was shared to." - ], - "signature": [ - "readonly string[] | undefined" + "\nGenerated API key" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false - }, + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.InvalidateAPIKeyResult", + "type": "Interface", + "tags": [], + "label": "InvalidateAPIKeyResult", + "description": [ + "\nThe return value when invalidating an API key in Elasticsearch." + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditKibana.delete_from_spaces", - "type": "Object", + "id": "def-common.InvalidateAPIKeyResult.invalidated_api_keys", + "type": "Array", "tags": [], - "label": "delete_from_spaces", + "label": "invalidated_api_keys", "description": [ - "\nSet of space IDs that a saved object was removed from." + "\nThe IDs of the API keys that were invalidated as part of the request." ], "signature": [ - "readonly string[] | undefined" + "string[]" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditKibana.unauthorized_spaces", - "type": "Object", + "id": "def-common.InvalidateAPIKeyResult.previously_invalidated_api_keys", + "type": "Array", "tags": [], - "label": "unauthorized_spaces", + "label": "previously_invalidated_api_keys", "description": [ - "\nSet of space IDs that are not authorized for an action." + "\nThe IDs of the API keys that were already invalidated." ], "signature": [ - "readonly string[] | undefined" + "string[]" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditKibana.unauthorized_types", - "type": "Object", + "id": "def-common.InvalidateAPIKeyResult.error_count", + "type": "number", "tags": [], - "label": "unauthorized_types", + "label": "error_count", "description": [ - "\nSet of types that are not authorized for an action." + "\nThe number of errors that were encountered when invalidating the API keys." ], - "signature": [ - "readonly string[] | undefined" - ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditLogger", - "type": "Interface", - "tags": [], - "label": "AuditLogger", - "description": [], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_logger.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditLogger.log", - "type": "Function", + "id": "def-common.InvalidateAPIKeyResult.error_details", + "type": "Array", "tags": [], - "label": "log", + "label": "error_details", "description": [ - "\nLogs an {@link AuditEvent} and automatically adds meta data about the\ncurrent user, space and correlation id.\n\nGuidelines around what events should be logged and how they should be\nstructured can be found in: `/x-pack/plugins/security/README.md`\n" + "\nDetails about these errors. This field is not present in the response when error_count is 0." ], "signature": [ - "(event: ", - { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.AuditEvent", - "text": "AuditEvent" - }, - " | undefined) => void" - ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_logger.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditLogger.log.$1", - "type": "Object", - "tags": [], - "label": "event", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.AuditEvent", - "text": "AuditEvent" - }, - " | undefined" - ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_logger.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditLogger.enabled", - "type": "boolean", - "tags": [], - "label": "enabled", - "description": [ - "\nIndicates whether audit logging is enabled or not.\n\nUseful for skipping resource-intense operations that don't need to be performed when audit\nlogging is disabled." + "{ type?: string | undefined; reason?: string | undefined; caused_by?: { type?: string | undefined; reason?: string | undefined; } | undefined; }[] | undefined" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_logger.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -432,40 +2122,30 @@ }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditRequest", + "id": "def-common.InvalidateAPIKeysParams", "type": "Interface", "tags": [], - "label": "AuditRequest", + "label": "InvalidateAPIKeysParams", "description": [ - "\nAudit request schema using ECS format" - ], - "signature": [ - { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.AuditRequest", - "text": "AuditRequest" - }, - " extends { body?: { bytes?: number | undefined; content?: string | undefined; } | undefined; bytes?: number | undefined; id?: string | undefined; method?: string | undefined; mime_type?: string | undefined; referrer?: string | undefined; }" + "\nRepresents the params for invalidating multiple API keys" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditRequest.headers", - "type": "Object", + "id": "def-common.InvalidateAPIKeysParams.ids", + "type": "Array", "tags": [], - "label": "headers", + "label": "ids", "description": [ - "\nHTTP request headers" + "\nList of unique API key IDs" ], "signature": [ - "{ 'x-forwarded-for'?: string | undefined; } | undefined" + "string[]" ], - "path": "packages/core/security/core-security-server/src/audit_logging/audit_events.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -474,10 +2154,10 @@ }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditRequestHandlerContext", + "id": "def-common.SecurityRequestHandlerContext", "type": "Interface", "tags": [], - "label": "AuditRequestHandlerContext", + "label": "SecurityRequestHandlerContext", "description": [], "path": "packages/core/security/core-security-server/src/request_handler_context.ts", "deprecated": false, @@ -485,125 +2165,101 @@ "children": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuditRequestHandlerContext.logger", + "id": "def-common.SecurityRequestHandlerContext.authc", "type": "Object", "tags": [], - "label": "logger", + "label": "authc", "description": [], "signature": [ { "pluginId": "@kbn/core-security-server", "scope": "common", "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.AuditLogger", - "text": "AuditLogger" + "section": "def-common.AuthcRequestHandlerContext", + "text": "AuthcRequestHandlerContext" } ], "path": "packages/core/security/core-security-server/src/request_handler_context.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuthcRequestHandlerContext", - "type": "Interface", - "tags": [], - "label": "AuthcRequestHandlerContext", - "description": [], - "path": "packages/core/security/core-security-server/src/request_handler_context.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.AuthcRequestHandlerContext.getCurrentUser", - "type": "Function", + "id": "def-common.SecurityRequestHandlerContext.audit", + "type": "Object", "tags": [], - "label": "getCurrentUser", + "label": "audit", "description": [], "signature": [ - "() => ", { - "pluginId": "@kbn/core-security-common", + "pluginId": "@kbn/core-security-server", "scope": "common", - "docId": "kibKbnCoreSecurityCommonPluginApi", - "section": "def-common.AuthenticatedUser", - "text": "AuthenticatedUser" - }, - " | null" + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuditRequestHandlerContext", + "text": "AuditRequestHandlerContext" + } ], "path": "packages/core/security/core-security-server/src/request_handler_context.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] + "trackAdoption": false } ], "initialIsOpen": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.CoreAuditService", + "id": "def-common.SecurityServiceSetup", "type": "Interface", "tags": [], - "label": "CoreAuditService", - "description": [], - "path": "packages/core/security/core-security-server/src/audit.ts", + "label": "SecurityServiceSetup", + "description": [ + "\nSetup contract for Core's security service.\n" + ], + "path": "packages/core/security/core-security-server/src/contracts.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.CoreAuditService.asScoped", + "id": "def-common.SecurityServiceSetup.registerSecurityDelegate", "type": "Function", "tags": [], - "label": "asScoped", + "label": "registerSecurityDelegate", "description": [ - "\nCreates an {@link AuditLogger} scoped to the current request.\n\nThis audit logger logs events with all required user and session info and should be used for\nall user-initiated actions.\n" + "\nRegister the security implementation that then will be used and re-exposed by Core.\n" ], "signature": [ - "(request: ", - { - "pluginId": "@kbn/core-http-server", - "scope": "common", - "docId": "kibKbnCoreHttpServerPluginApi", - "section": "def-common.KibanaRequest", - "text": "KibanaRequest" - }, - ") => ", + "(api: ", { "pluginId": "@kbn/core-security-server", "scope": "common", "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.AuditLogger", - "text": "AuditLogger" - } + "section": "def-common.CoreSecurityDelegateContract", + "text": "CoreSecurityDelegateContract" + }, + ") => void" ], - "path": "packages/core/security/core-security-server/src/audit.ts", + "path": "packages/core/security/core-security-server/src/contracts.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.CoreAuditService.asScoped.$1", + "id": "def-common.SecurityServiceSetup.registerSecurityDelegate.$1", "type": "Object", "tags": [], - "label": "request", + "label": "api", "description": [], "signature": [ { - "pluginId": "@kbn/core-http-server", + "pluginId": "@kbn/core-security-server", "scope": "common", - "docId": "kibKbnCoreHttpServerPluginApi", - "section": "def-common.KibanaRequest", - "text": "KibanaRequest" - }, - "" + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreSecurityDelegateContract", + "text": "CoreSecurityDelegateContract" + } ], - "path": "packages/core/security/core-security-server/src/audit.ts", + "path": "packages/core/security/core-security-server/src/contracts.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -613,23 +2269,23 @@ }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.CoreAuditService.withoutRequest", + "id": "def-common.SecurityServiceSetup.fips", "type": "Object", "tags": [], - "label": "withoutRequest", + "label": "fips", "description": [ - "\n{@link AuditLogger} for background tasks only.\n\nThis audit logger logs events without any user or session info and should never be used to log\nuser-initiated actions.\n" + "\nThe {@link CoreFipsService | FIPS service}" ], "signature": [ { "pluginId": "@kbn/core-security-server", "scope": "common", "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.AuditLogger", - "text": "AuditLogger" + "section": "def-common.CoreFipsService", + "text": "CoreFipsService" } ], - "path": "packages/core/security/core-security-server/src/audit.ts", + "path": "packages/core/security/core-security-server/src/contracts.ts", "deprecated": false, "trackAdoption": false } @@ -638,163 +2294,220 @@ }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.CoreAuthenticationService", + "id": "def-common.SecurityServiceStart", "type": "Interface", "tags": [], - "label": "CoreAuthenticationService", + "label": "SecurityServiceStart", "description": [ - "\nCore's authentication service\n" + "\nStart contract for Core's security service.\n" ], - "path": "packages/core/security/core-security-server/src/authc.ts", + "path": "packages/core/security/core-security-server/src/contracts.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.CoreAuthenticationService.getCurrentUser", - "type": "Function", + "id": "def-common.SecurityServiceStart.authc", + "type": "Object", "tags": [], - "label": "getCurrentUser", + "label": "authc", "description": [ - "\nRetrieve the user bound to the provided request, or null if\nno user is authenticated.\n" + "\nThe {@link CoreAuthenticationService | authentication service}" ], "signature": [ - "(request: ", - { - "pluginId": "@kbn/core-http-server", - "scope": "common", - "docId": "kibKbnCoreHttpServerPluginApi", - "section": "def-common.KibanaRequest", - "text": "KibanaRequest" - }, - ") => ", { - "pluginId": "@kbn/core-security-common", + "pluginId": "@kbn/core-security-server", "scope": "common", - "docId": "kibKbnCoreSecurityCommonPluginApi", - "section": "def-common.AuthenticatedUser", - "text": "AuthenticatedUser" - }, - " | null" + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreAuthenticationService", + "text": "CoreAuthenticationService" + } ], - "path": "packages/core/security/core-security-server/src/authc.ts", + "path": "packages/core/security/core-security-server/src/contracts.ts", "deprecated": false, - "trackAdoption": false, - "children": [ + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityServiceStart.audit", + "type": "Object", + "tags": [], + "label": "audit", + "description": [ + "\nThe {@link CoreAuditService | audit service}" + ], + "signature": [ { - "parentPluginId": "@kbn/core-security-server", - "id": "def-common.CoreAuthenticationService.getCurrentUser.$1", - "type": "Object", - "tags": [], - "label": "request", - "description": [ - "The request to retrieve the authenticated user for." - ], - "signature": [ - { - "pluginId": "@kbn/core-http-server", - "scope": "common", - "docId": "kibKbnCoreHttpServerPluginApi", - "section": "def-common.KibanaRequest", - "text": "KibanaRequest" - }, - "" - ], - "path": "packages/core/security/core-security-server/src/authc.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreAuditService", + "text": "CoreAuditService" } ], - "returnComment": [] + "path": "packages/core/security/core-security-server/src/contracts.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.CoreFipsService", + "id": "def-common.UpdateCrossClusterAPIKeyParams", "type": "Interface", "tags": [], - "label": "CoreFipsService", - "description": [ - "\nCore's FIPS service\n" - ], - "path": "packages/core/security/core-security-server/src/fips.ts", + "label": "UpdateCrossClusterAPIKeyParams", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.CoreFipsService.isEnabled", - "type": "Function", + "id": "def-common.UpdateCrossClusterAPIKeyParams.id", + "type": "string", "tags": [], - "label": "isEnabled", - "description": [ - "\nCheck if Kibana is configured to run in FIPS mode" + "label": "id", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.UpdateCrossClusterAPIKeyParams.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"cross_cluster\"" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.UpdateCrossClusterAPIKeyParams.expiration", + "type": "string", + "tags": [], + "label": "expiration", + "description": [], + "signature": [ + "string | undefined" ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.UpdateCrossClusterAPIKeyParams.metadata", + "type": "Object", + "tags": [], + "label": "metadata", + "description": [], "signature": [ - "() => boolean" + "{ [key: string]: any; } | undefined" ], - "path": "packages/core/security/core-security-server/src/fips.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.UpdateCrossClusterAPIKeyParams.access", + "type": "Object", + "tags": [], + "label": "access", + "description": [], + "signature": [ + "{ search?: { names: string[]; query?: unknown; field_security?: unknown; allow_restricted_indices?: boolean | undefined; }[] | undefined; replication?: { names: string[]; }[] | undefined; }" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.CoreSecurityDelegateContract", + "id": "def-common.UpdateRestAPIKeyParams", "type": "Interface", "tags": [], - "label": "CoreSecurityDelegateContract", - "description": [ - "\nThe contract exposed by the security provider for Core to\nconsume and re-expose via its security service.\n" - ], - "path": "packages/core/security/core-security-server/src/api_provider.ts", + "label": "UpdateRestAPIKeyParams", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.CoreSecurityDelegateContract.authc", + "id": "def-common.UpdateRestAPIKeyParams.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.UpdateRestAPIKeyParams.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"rest\" | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.UpdateRestAPIKeyParams.expiration", + "type": "string", + "tags": [], + "label": "expiration", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.UpdateRestAPIKeyParams.role_descriptors", "type": "Object", "tags": [], - "label": "authc", + "label": "role_descriptors", "description": [], "signature": [ - { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.CoreAuthenticationService", - "text": "CoreAuthenticationService" - } + "{ [x: string]: { [key: string]: unknown; }; }" ], - "path": "packages/core/security/core-security-server/src/api_provider.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.CoreSecurityDelegateContract.audit", + "id": "def-common.UpdateRestAPIKeyParams.metadata", "type": "Object", "tags": [], - "label": "audit", + "label": "metadata", "description": [], "signature": [ - { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.CoreAuditService", - "text": "CoreAuditService" - } + "{ [key: string]: any; } | undefined" ], - "path": "packages/core/security/core-security-server/src/api_provider.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -803,138 +2516,95 @@ }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.SecurityRequestHandlerContext", + "id": "def-common.UpdateRestAPIKeyWithKibanaPrivilegesParams", "type": "Interface", "tags": [], - "label": "SecurityRequestHandlerContext", + "label": "UpdateRestAPIKeyWithKibanaPrivilegesParams", "description": [], - "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.SecurityRequestHandlerContext.authc", - "type": "Object", + "id": "def-common.UpdateRestAPIKeyWithKibanaPrivilegesParams.id", + "type": "string", "tags": [], - "label": "authc", + "label": "id", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.UpdateRestAPIKeyWithKibanaPrivilegesParams.type", + "type": "string", + "tags": [], + "label": "type", "description": [], "signature": [ - { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.AuthcRequestHandlerContext", - "text": "AuthcRequestHandlerContext" - } + "\"rest\" | undefined" ], - "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.SecurityRequestHandlerContext.audit", - "type": "Object", + "id": "def-common.UpdateRestAPIKeyWithKibanaPrivilegesParams.expiration", + "type": "string", "tags": [], - "label": "audit", + "label": "expiration", "description": [], "signature": [ - { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.AuditRequestHandlerContext", - "text": "AuditRequestHandlerContext" - } + "string | undefined" ], - "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/core-security-server", - "id": "def-common.SecurityServiceSetup", - "type": "Interface", - "tags": [], - "label": "SecurityServiceSetup", - "description": [ - "\nSetup contract for Core's security service.\n" - ], - "path": "packages/core/security/core-security-server/src/contracts.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.SecurityServiceSetup.registerSecurityDelegate", - "type": "Function", + "id": "def-common.UpdateRestAPIKeyWithKibanaPrivilegesParams.metadata", + "type": "Object", "tags": [], - "label": "registerSecurityDelegate", - "description": [ - "\nRegister the security implementation that then will be used and re-exposed by Core.\n" - ], + "label": "metadata", + "description": [], "signature": [ - "(api: ", - { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.CoreSecurityDelegateContract", - "text": "CoreSecurityDelegateContract" - }, - ") => void" + "{ [key: string]: any; } | undefined" ], - "path": "packages/core/security/core-security-server/src/contracts.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/core-security-server", - "id": "def-common.SecurityServiceSetup.registerSecurityDelegate.$1", - "type": "Object", - "tags": [], - "label": "api", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.CoreSecurityDelegateContract", - "text": "CoreSecurityDelegateContract" - } - ], - "path": "packages/core/security/core-security-server/src/contracts.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] + "trackAdoption": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.SecurityServiceSetup.fips", + "id": "def-common.UpdateRestAPIKeyWithKibanaPrivilegesParams.kibana_role_descriptors", "type": "Object", "tags": [], - "label": "fips", - "description": [ - "\nThe {@link CoreFipsService | FIPS service}" - ], + "label": "kibana_role_descriptors", + "description": [], "signature": [ + "{ [x: string]: { elasticsearch: ", { "pluginId": "@kbn/core-security-server", "scope": "common", "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.CoreFipsService", - "text": "CoreFipsService" - } + "section": "def-common.ElasticsearchPrivilegesType", + "text": "ElasticsearchPrivilegesType" + }, + " & { [key: string]: unknown; }; kibana: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.KibanaPrivilegesType", + "text": "KibanaPrivilegesType" + }, + "; }; }" ], - "path": "packages/core/security/core-security-server/src/contracts.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -943,58 +2613,40 @@ }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.SecurityServiceStart", + "id": "def-common.ValidateAPIKeyParams", "type": "Interface", "tags": [], - "label": "SecurityServiceStart", + "label": "ValidateAPIKeyParams", "description": [ - "\nStart contract for Core's security service.\n" + "\nRepresents the parameters for validating API Key credentials." ], - "path": "packages/core/security/core-security-server/src/contracts.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.SecurityServiceStart.authc", - "type": "Object", + "id": "def-common.ValidateAPIKeyParams.id", + "type": "string", "tags": [], - "label": "authc", + "label": "id", "description": [ - "\nThe {@link CoreAuthenticationService | authentication service}" - ], - "signature": [ - { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.CoreAuthenticationService", - "text": "CoreAuthenticationService" - } + "\nUnique id for this API key" ], - "path": "packages/core/security/core-security-server/src/contracts.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/core-security-server", - "id": "def-common.SecurityServiceStart.audit", - "type": "Object", + "id": "def-common.ValidateAPIKeyParams.api_key", + "type": "string", "tags": [], - "label": "audit", + "label": "api_key", "description": [ - "\nThe {@link CoreAuditService | audit service}" - ], - "signature": [ - { - "pluginId": "@kbn/core-security-server", - "scope": "common", - "docId": "kibKbnCoreSecurityServerPluginApi", - "section": "def-common.CoreAuditService", - "text": "CoreAuditService" - } + "\nGenerated API Key (secret)" ], - "path": "packages/core/security/core-security-server/src/contracts.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -1045,6 +2697,133 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateAPIKeyParams", + "type": "Type", + "tags": [], + "label": "CreateAPIKeyParams", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyParams", + "text": "CreateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams", + "text": "CreateRestAPIKeyWithKibanaPrivilegesParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateCrossClusterAPIKeyParams", + "text": "CreateCrossClusterAPIKeyParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CreateAPIKeyResult", + "type": "Type", + "tags": [], + "label": "CreateAPIKeyResult", + "description": [ + "\nResponse of Kibana Create API key endpoint." + ], + "signature": [ + "SecurityCreateApiKeyResponse" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.KibanaPrivilegesType", + "type": "Type", + "tags": [], + "label": "KibanaPrivilegesType", + "description": [ + "\nType representing Kibana specific portion of the role definition." + ], + "signature": [ + "{ spaces: string[]; base?: string[] | undefined; feature?: Record | undefined; }[]" + ], + "path": "packages/core/security/core-security-server/src/roles/schema.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.UpdateAPIKeyParams", + "type": "Type", + "tags": [], + "label": "UpdateAPIKeyParams", + "description": [ + "\nRequest body of Kibana Update API key endpoint." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateRestAPIKeyParams", + "text": "UpdateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateCrossClusterAPIKeyParams", + "text": "UpdateCrossClusterAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateRestAPIKeyWithKibanaPrivilegesParams", + "text": "UpdateRestAPIKeyWithKibanaPrivilegesParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.UpdateAPIKeyResult", + "type": "Type", + "tags": [], + "label": "UpdateAPIKeyResult", + "description": [ + "\nResponse of Kibana Update API key endpoint." + ], + "signature": [ + "SecurityUpdateApiKeyResponse" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "objects": [] diff --git a/api_docs/kbn_core_security_server.mdx b/api_docs/kbn_core_security_server.mdx index e76d5d248794e3..6a08b94c80e040 100644 --- a/api_docs/kbn_core_security_server.mdx +++ b/api_docs/kbn_core_security_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server title: "@kbn/core-security-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server'] --- import kbnCoreSecurityServerObj from './kbn_core_security_server.devdocs.json'; @@ -21,10 +21,13 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 52 | 0 | 16 | 0 | +| 146 | 1 | 63 | 0 | ## Common +### Functions + + ### Interfaces diff --git a/api_docs/kbn_core_security_server_internal.mdx b/api_docs/kbn_core_security_server_internal.mdx index 97e9a6aa5eddb5..804cabb86c0460 100644 --- a/api_docs/kbn_core_security_server_internal.mdx +++ b/api_docs/kbn_core_security_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-internal title: "@kbn/core-security-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-internal'] --- import kbnCoreSecurityServerInternalObj from './kbn_core_security_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_mocks.devdocs.json b/api_docs/kbn_core_security_server_mocks.devdocs.json index b9910d935968b8..686b62e5af8fcf 100644 --- a/api_docs/kbn_core_security_server_mocks.devdocs.json +++ b/api_docs/kbn_core_security_server_mocks.devdocs.json @@ -90,6 +90,44 @@ } ], "objects": [ + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.apiKeysMock", + "type": "Object", + "tags": [], + "label": "apiKeysMock", + "description": [], + "path": "packages/core/security/core-security-server-mocks/src/api_keys.mock.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.apiKeysMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.APIKeys", + "text": "APIKeys" + }, + ">" + ], + "path": "packages/core/security/core-security-server-mocks/src/api_keys.mock.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/core-security-server-mocks", "id": "def-common.auditLoggerMock", diff --git a/api_docs/kbn_core_security_server_mocks.mdx b/api_docs/kbn_core_security_server_mocks.mdx index 4837bea5d82898..ae701990499aff 100644 --- a/api_docs/kbn_core_security_server_mocks.mdx +++ b/api_docs/kbn_core_security_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-mocks title: "@kbn/core-security-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-mocks'] --- import kbnCoreSecurityServerMocksObj from './kbn_core_security_server_mocks.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 13 | 0 | 13 | 2 | +| 15 | 0 | 15 | 2 | ## Common diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index eae8617e6fe549..70a3d735210f25 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index a9296a333acaf5..50fc2868a81146 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index d4dbdd18692374..3ea24300b04bfb 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index 0b37e06fcc38c7..c0c9aea180781c 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index 14e0d72778eccc..8d92cb58d7dff1 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index 042e552861a7aa..790d150256c1df 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index 02cb90067ad44c..52ee66138de128 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx index 730e11f40bd820..7a7f7d25c8c48d 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.mdx +++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server title: "@kbn/core-test-helpers-kbn-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-kbn-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_model_versions.mdx b/api_docs/kbn_core_test_helpers_model_versions.mdx index 5c82e09bc66019..487a34b3ef4c90 100644 --- a/api_docs/kbn_core_test_helpers_model_versions.mdx +++ b/api_docs/kbn_core_test_helpers_model_versions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-model-versions title: "@kbn/core-test-helpers-model-versions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-model-versions plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-model-versions'] --- import kbnCoreTestHelpersModelVersionsObj from './kbn_core_test_helpers_model_versions.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index e5d18270b29045..dee2943242a7fe 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index 39c90eea55dc25..f2c36574705f38 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils'] --- import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index cc711a972530ac..37914f9a0f76e6 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index f5e13361357f46..1494ef582037c1 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index bca627eb63e233..f48fda3b2d940b 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index 9bd6a2f4e21f88..87b9a14ed0bd8f 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index e6934d5ef4f0f9..89df44e037de5a 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index 37c1136c9968aa..61cf393dc5b220 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index 208c63217e13e1..3bd7e6978e4292 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index d1495c6f87dfe9..ee4c1be1132443 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index 3eeb3b2230a88b..71e9fdb216c661 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index 1cf3e2b8be0c44..837180b140b680 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index 77ba5dec8902c2..651f8f3b04c405 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index 71e9dd73f06e3f..e117c9b70b1b9b 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser.mdx b/api_docs/kbn_core_user_profile_browser.mdx index ab5718fa6d08eb..cf88f775fb2286 100644 --- a/api_docs/kbn_core_user_profile_browser.mdx +++ b/api_docs/kbn_core_user_profile_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser title: "@kbn/core-user-profile-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser'] --- import kbnCoreUserProfileBrowserObj from './kbn_core_user_profile_browser.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_internal.mdx b/api_docs/kbn_core_user_profile_browser_internal.mdx index c9e78b7d26df79..10dafaded4540a 100644 --- a/api_docs/kbn_core_user_profile_browser_internal.mdx +++ b/api_docs/kbn_core_user_profile_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-internal title: "@kbn/core-user-profile-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-internal'] --- import kbnCoreUserProfileBrowserInternalObj from './kbn_core_user_profile_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_mocks.mdx b/api_docs/kbn_core_user_profile_browser_mocks.mdx index ca3566253f9cf1..2a3f26390cb3f7 100644 --- a/api_docs/kbn_core_user_profile_browser_mocks.mdx +++ b/api_docs/kbn_core_user_profile_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-mocks title: "@kbn/core-user-profile-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-mocks'] --- import kbnCoreUserProfileBrowserMocksObj from './kbn_core_user_profile_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_common.mdx b/api_docs/kbn_core_user_profile_common.mdx index 05792794b0a523..a9f16e272eec7b 100644 --- a/api_docs/kbn_core_user_profile_common.mdx +++ b/api_docs/kbn_core_user_profile_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-common title: "@kbn/core-user-profile-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-common'] --- import kbnCoreUserProfileCommonObj from './kbn_core_user_profile_common.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server.mdx b/api_docs/kbn_core_user_profile_server.mdx index e56fff27beafdb..520109e83ebfd9 100644 --- a/api_docs/kbn_core_user_profile_server.mdx +++ b/api_docs/kbn_core_user_profile_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server title: "@kbn/core-user-profile-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server'] --- import kbnCoreUserProfileServerObj from './kbn_core_user_profile_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_internal.mdx b/api_docs/kbn_core_user_profile_server_internal.mdx index 027d32961861c3..88ea1fc2cdf9c3 100644 --- a/api_docs/kbn_core_user_profile_server_internal.mdx +++ b/api_docs/kbn_core_user_profile_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-internal title: "@kbn/core-user-profile-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-internal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-internal'] --- import kbnCoreUserProfileServerInternalObj from './kbn_core_user_profile_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_mocks.mdx b/api_docs/kbn_core_user_profile_server_mocks.mdx index deb44c2a5a93d9..ebe45ba4fb7e92 100644 --- a/api_docs/kbn_core_user_profile_server_mocks.mdx +++ b/api_docs/kbn_core_user_profile_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-mocks title: "@kbn/core-user-profile-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-mocks'] --- import kbnCoreUserProfileServerMocksObj from './kbn_core_user_profile_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index 8a62f537cfc8e7..04f0ef9bb29499 100644 --- a/api_docs/kbn_core_user_settings_server.mdx +++ b/api_docs/kbn_core_user_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server title: "@kbn/core-user-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server'] --- import kbnCoreUserSettingsServerObj from './kbn_core_user_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_mocks.mdx b/api_docs/kbn_core_user_settings_server_mocks.mdx index cb81dc195b531d..69cf0df1e043c2 100644 --- a/api_docs/kbn_core_user_settings_server_mocks.mdx +++ b/api_docs/kbn_core_user_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-mocks title: "@kbn/core-user-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-mocks'] --- import kbnCoreUserSettingsServerMocksObj from './kbn_core_user_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index a6de3df2ee8d3c..c5b4476e389178 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index 3612cdf26c0ca1..c1465d219dd7b0 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_custom_icons.mdx b/api_docs/kbn_custom_icons.mdx index 8bd13f416db1bc..6408d98650279c 100644 --- a/api_docs/kbn_custom_icons.mdx +++ b/api_docs/kbn_custom_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-icons title: "@kbn/custom-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-icons plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-icons'] --- import kbnCustomIconsObj from './kbn_custom_icons.devdocs.json'; diff --git a/api_docs/kbn_custom_integrations.mdx b/api_docs/kbn_custom_integrations.mdx index 2f4fb0a2b850c9..1adaa5c99a61b7 100644 --- a/api_docs/kbn_custom_integrations.mdx +++ b/api_docs/kbn_custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-integrations title: "@kbn/custom-integrations" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-integrations plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-integrations'] --- import kbnCustomIntegrationsObj from './kbn_custom_integrations.devdocs.json'; diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx index fec53bf278c1f1..1fe60a7a662b77 100644 --- a/api_docs/kbn_cypress_config.mdx +++ b/api_docs/kbn_cypress_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cypress-config title: "@kbn/cypress-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cypress-config plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config'] --- import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json'; diff --git a/api_docs/kbn_data_forge.mdx b/api_docs/kbn_data_forge.mdx index d757d1cb65f5b6..5ae49ee44b2c7e 100644 --- a/api_docs/kbn_data_forge.mdx +++ b/api_docs/kbn_data_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-forge title: "@kbn/data-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-forge plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-forge'] --- import kbnDataForgeObj from './kbn_data_forge.devdocs.json'; diff --git a/api_docs/kbn_data_service.mdx b/api_docs/kbn_data_service.mdx index db827308451c81..5a572d6760ccb3 100644 --- a/api_docs/kbn_data_service.mdx +++ b/api_docs/kbn_data_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-service title: "@kbn/data-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-service plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-service'] --- import kbnDataServiceObj from './kbn_data_service.devdocs.json'; diff --git a/api_docs/kbn_data_stream_adapter.mdx b/api_docs/kbn_data_stream_adapter.mdx index 10b51c92bdbf61..2ce275aabd524f 100644 --- a/api_docs/kbn_data_stream_adapter.mdx +++ b/api_docs/kbn_data_stream_adapter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-stream-adapter title: "@kbn/data-stream-adapter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-stream-adapter plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-stream-adapter'] --- import kbnDataStreamAdapterObj from './kbn_data_stream_adapter.devdocs.json'; diff --git a/api_docs/kbn_data_view_utils.devdocs.json b/api_docs/kbn_data_view_utils.devdocs.json index bbef9faf79cd53..c1b48a5d1f3b4f 100644 --- a/api_docs/kbn_data_view_utils.devdocs.json +++ b/api_docs/kbn_data_view_utils.devdocs.json @@ -19,6 +19,62 @@ "common": { "classes": [], "functions": [ + { + "parentPluginId": "@kbn/data-view-utils", + "id": "def-common.convertDatatableColumnToDataViewFieldSpec", + "type": "Function", + "tags": [], + "label": "convertDatatableColumnToDataViewFieldSpec", + "description": [ + "\nConvert a datatable column to a DataViewFieldSpec" + ], + "signature": [ + "(column: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + }, + ") => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldSpec", + "text": "FieldSpec" + } + ], + "path": "packages/kbn-data-view-utils/src/utils/convert_to_data_view_field_spec.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/data-view-utils", + "id": "def-common.convertDatatableColumnToDataViewFieldSpec.$1", + "type": "Object", + "tags": [], + "label": "column", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + } + ], + "path": "packages/kbn-data-view-utils/src/utils/convert_to_data_view_field_spec.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/data-view-utils", "id": "def-common.createRegExpPatternFrom", diff --git a/api_docs/kbn_data_view_utils.mdx b/api_docs/kbn_data_view_utils.mdx index 35fcf27583c482..9c77d0b2f7f14c 100644 --- a/api_docs/kbn_data_view_utils.mdx +++ b/api_docs/kbn_data_view_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-view-utils title: "@kbn/data-view-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-view-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-view-utils'] --- import kbnDataViewUtilsObj from './kbn_data_view_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 5 | 0 | 4 | 0 | +| 7 | 0 | 5 | 0 | ## Common diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index a2149161db461d..c004445a6d6df2 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_analytics.mdx b/api_docs/kbn_deeplinks_analytics.mdx index 6516a6992e1674..ead9a6580c1fc6 100644 --- a/api_docs/kbn_deeplinks_analytics.mdx +++ b/api_docs/kbn_deeplinks_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-analytics title: "@kbn/deeplinks-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-analytics plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-analytics'] --- import kbnDeeplinksAnalyticsObj from './kbn_deeplinks_analytics.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_devtools.mdx b/api_docs/kbn_deeplinks_devtools.mdx index 81a9e07573cf91..5e49e88e152293 100644 --- a/api_docs/kbn_deeplinks_devtools.mdx +++ b/api_docs/kbn_deeplinks_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-devtools title: "@kbn/deeplinks-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-devtools plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_fleet.mdx b/api_docs/kbn_deeplinks_fleet.mdx index 9eda3599e2dfc6..85ca3b08993de6 100644 --- a/api_docs/kbn_deeplinks_fleet.mdx +++ b/api_docs/kbn_deeplinks_fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-fleet title: "@kbn/deeplinks-fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-fleet plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-fleet'] --- import kbnDeeplinksFleetObj from './kbn_deeplinks_fleet.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index ed558c6f415c37..3bcb897c161c48 100644 --- a/api_docs/kbn_deeplinks_management.mdx +++ b/api_docs/kbn_deeplinks_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-management title: "@kbn/deeplinks-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-management plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-management'] --- import kbnDeeplinksManagementObj from './kbn_deeplinks_management.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_ml.mdx b/api_docs/kbn_deeplinks_ml.mdx index 371a0d04a5484f..784d7b561bd15a 100644 --- a/api_docs/kbn_deeplinks_ml.mdx +++ b/api_docs/kbn_deeplinks_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-ml title: "@kbn/deeplinks-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-ml plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-ml'] --- import kbnDeeplinksMlObj from './kbn_deeplinks_ml.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_observability.devdocs.json b/api_docs/kbn_deeplinks_observability.devdocs.json index 2a2d36cdb72824..3b151a497e3c5b 100644 --- a/api_docs/kbn_deeplinks_observability.devdocs.json +++ b/api_docs/kbn_deeplinks_observability.devdocs.json @@ -22,18 +22,18 @@ "interfaces": [ { "parentPluginId": "@kbn/deeplinks-observability", - "id": "def-common.DatasetQualityLocatorParams", + "id": "def-common.DataQualityLocatorParams", "type": "Interface", "tags": [], - "label": "DatasetQualityLocatorParams", + "label": "DataQualityLocatorParams", "description": [], "signature": [ { "pluginId": "@kbn/deeplinks-observability", "scope": "common", "docId": "kibKbnDeeplinksObservabilityPluginApi", - "section": "def-common.DatasetQualityLocatorParams", - "text": "DatasetQualityLocatorParams" + "section": "def-common.DataQualityLocatorParams", + "text": "DataQualityLocatorParams" }, " extends ", { @@ -50,7 +50,7 @@ "children": [ { "parentPluginId": "@kbn/deeplinks-observability", - "id": "def-common.DatasetQualityLocatorParams.filters", + "id": "def-common.DataQualityLocatorParams.filters", "type": "Object", "tags": [], "label": "filters", @@ -61,6 +61,20 @@ "path": "packages/deeplinks/observability/locators/dataset_quality.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.DataQualityLocatorParams.flyout", + "type": "Object", + "tags": [], + "label": "flyout", + "description": [], + "signature": [ + "{ dataset: DatasetConfig; } | undefined" + ], + "path": "packages/deeplinks/observability/locators/dataset_quality.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -754,13 +768,13 @@ }, { "parentPluginId": "@kbn/deeplinks-observability", - "id": "def-common.DATASET_QUALITY_LOCATOR_ID", + "id": "def-common.DATA_QUALITY_LOCATOR_ID", "type": "string", "tags": [], - "label": "DATASET_QUALITY_LOCATOR_ID", + "label": "DATA_QUALITY_LOCATOR_ID", "description": [], "signature": [ - "\"DATASET_QUALITY_LOCATOR\"" + "\"DATA_QUALITY_LOCATOR\"" ], "path": "packages/deeplinks/observability/locators/dataset_quality.ts", "deprecated": false, diff --git a/api_docs/kbn_deeplinks_observability.mdx b/api_docs/kbn_deeplinks_observability.mdx index 86d5dd2c3efb05..e6a307fa8b6465 100644 --- a/api_docs/kbn_deeplinks_observability.mdx +++ b/api_docs/kbn_deeplinks_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-observability title: "@kbn/deeplinks-observability" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-observability plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-observability'] --- import kbnDeeplinksObservabilityObj from './kbn_deeplinks_observability.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 55 | 0 | 43 | 0 | +| 56 | 0 | 44 | 0 | ## Common diff --git a/api_docs/kbn_deeplinks_search.devdocs.json b/api_docs/kbn_deeplinks_search.devdocs.json index 312aad5a35d80e..d3659c3bf083c8 100644 --- a/api_docs/kbn_deeplinks_search.devdocs.json +++ b/api_docs/kbn_deeplinks_search.devdocs.json @@ -30,7 +30,7 @@ "label": "DeepLinkId", "description": [], "signature": [ - "\"appSearch\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"searchPlayground\" | \"searchInferenceEndpoints\" | \"searchHomepage\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\"" + "\"appSearch\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"enterpriseSearchRelevance\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"searchPlayground\" | \"searchInferenceEndpoints\" | \"searchHomepage\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\" | \"enterpriseSearchRelevance:inferenceEndpoints\"" ], "path": "packages/deeplinks/search/deep_links.ts", "deprecated": false, @@ -114,13 +114,13 @@ }, { "parentPluginId": "@kbn/deeplinks-search", - "id": "def-common.ENTERPRISE_SEARCH_INFERENCE_ENDPOINTS_APP_ID", + "id": "def-common.ENTERPRISE_SEARCH_RELEVANCE_APP_ID", "type": "string", "tags": [], - "label": "ENTERPRISE_SEARCH_INFERENCE_ENDPOINTS_APP_ID", + "label": "ENTERPRISE_SEARCH_RELEVANCE_APP_ID", "description": [], "signature": [ - "\"enterpriseSearchInferenceEndpoints\"" + "\"enterpriseSearchRelevance\"" ], "path": "packages/deeplinks/search/constants.ts", "deprecated": false, diff --git a/api_docs/kbn_deeplinks_search.mdx b/api_docs/kbn_deeplinks_search.mdx index 5006993ab7bf58..8a8806d97c2449 100644 --- a/api_docs/kbn_deeplinks_search.mdx +++ b/api_docs/kbn_deeplinks_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-search title: "@kbn/deeplinks-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-search plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_security.mdx b/api_docs/kbn_deeplinks_security.mdx index 230253c75efe95..32002cd4fabaa4 100644 --- a/api_docs/kbn_deeplinks_security.mdx +++ b/api_docs/kbn_deeplinks_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-security title: "@kbn/deeplinks-security" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-security plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-security'] --- import kbnDeeplinksSecurityObj from './kbn_deeplinks_security.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_shared.mdx b/api_docs/kbn_deeplinks_shared.mdx index 8754e80b0c2951..1230f5cd39b947 100644 --- a/api_docs/kbn_deeplinks_shared.mdx +++ b/api_docs/kbn_deeplinks_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-shared title: "@kbn/deeplinks-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-shared plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-shared'] --- import kbnDeeplinksSharedObj from './kbn_deeplinks_shared.devdocs.json'; diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index df1ab900aef163..3d4837d7f869d4 100644 --- a/api_docs/kbn_default_nav_analytics.mdx +++ b/api_docs/kbn_default_nav_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-analytics title: "@kbn/default-nav-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-analytics plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-analytics'] --- import kbnDefaultNavAnalyticsObj from './kbn_default_nav_analytics.devdocs.json'; diff --git a/api_docs/kbn_default_nav_devtools.mdx b/api_docs/kbn_default_nav_devtools.mdx index 45a3b76ab4b574..fd9f605ebfa8ff 100644 --- a/api_docs/kbn_default_nav_devtools.mdx +++ b/api_docs/kbn_default_nav_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-devtools title: "@kbn/default-nav-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-devtools plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-devtools'] --- import kbnDefaultNavDevtoolsObj from './kbn_default_nav_devtools.devdocs.json'; diff --git a/api_docs/kbn_default_nav_management.mdx b/api_docs/kbn_default_nav_management.mdx index dad78c414e3ead..1bb36ed0a2d57d 100644 --- a/api_docs/kbn_default_nav_management.mdx +++ b/api_docs/kbn_default_nav_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-management title: "@kbn/default-nav-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-management plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-management'] --- import kbnDefaultNavManagementObj from './kbn_default_nav_management.devdocs.json'; diff --git a/api_docs/kbn_default_nav_ml.mdx b/api_docs/kbn_default_nav_ml.mdx index 96f57d83edca98..17b6385fcb5104 100644 --- a/api_docs/kbn_default_nav_ml.mdx +++ b/api_docs/kbn_default_nav_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-ml title: "@kbn/default-nav-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-ml plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-ml'] --- import kbnDefaultNavMlObj from './kbn_default_nav_ml.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index b962fe962b01a0..e12d1fb934996b 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 54f5461df533c9..1ae344ef56f127 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index 030ee2f59ebe2c..01cc6e54a6d09a 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index 3b7a7278452842..378560e2f9dbb3 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_discover_utils.mdx b/api_docs/kbn_discover_utils.mdx index 937235a9945c28..c790db3a17d388 100644 --- a/api_docs/kbn_discover_utils.mdx +++ b/api_docs/kbn_discover_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-discover-utils title: "@kbn/discover-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/discover-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-utils'] --- import kbnDiscoverUtilsObj from './kbn_discover_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index 079158c906b488..03b4b3317e082e 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index e8eedc9b350d80..7bf4159ded7fed 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_dom_drag_drop.mdx b/api_docs/kbn_dom_drag_drop.mdx index 538c23bdbfc3a1..9c93ea2205a55a 100644 --- a/api_docs/kbn_dom_drag_drop.mdx +++ b/api_docs/kbn_dom_drag_drop.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dom-drag-drop title: "@kbn/dom-drag-drop" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dom-drag-drop plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dom-drag-drop'] --- import kbnDomDragDropObj from './kbn_dom_drag_drop.devdocs.json'; diff --git a/api_docs/kbn_ebt.mdx b/api_docs/kbn_ebt.mdx index 49c57c623e9df0..499e44b7202cad 100644 --- a/api_docs/kbn_ebt.mdx +++ b/api_docs/kbn_ebt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt title: "@kbn/ebt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt'] --- import kbnEbtObj from './kbn_ebt.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index 955875e54964e3..602bef774c217b 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_ecs_data_quality_dashboard.mdx b/api_docs/kbn_ecs_data_quality_dashboard.mdx index 0d562c897bd3f2..b9ffb6f6e264f6 100644 --- a/api_docs/kbn_ecs_data_quality_dashboard.mdx +++ b/api_docs/kbn_ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs-data-quality-dashboard title: "@kbn/ecs-data-quality-dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs-data-quality-dashboard plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs-data-quality-dashboard'] --- import kbnEcsDataQualityDashboardObj from './kbn_ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/kbn_elastic_agent_utils.mdx b/api_docs/kbn_elastic_agent_utils.mdx index 4bf65e3122f2c6..c2ce5f9f909ca8 100644 --- a/api_docs/kbn_elastic_agent_utils.mdx +++ b/api_docs/kbn_elastic_agent_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-agent-utils title: "@kbn/elastic-agent-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-agent-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-agent-utils'] --- import kbnElasticAgentUtilsObj from './kbn_elastic_agent_utils.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index f9fb2031ec9768..bc572016322d8e 100644 --- a/api_docs/kbn_elastic_assistant.mdx +++ b/api_docs/kbn_elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant title: "@kbn/elastic-assistant" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant'] --- import kbnElasticAssistantObj from './kbn_elastic_assistant.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant_common.mdx b/api_docs/kbn_elastic_assistant_common.mdx index f6184753a263ac..b75806470bb969 100644 --- a/api_docs/kbn_elastic_assistant_common.mdx +++ b/api_docs/kbn_elastic_assistant_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant-common title: "@kbn/elastic-assistant-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant-common'] --- import kbnElasticAssistantCommonObj from './kbn_elastic_assistant_common.devdocs.json'; diff --git a/api_docs/kbn_entities_schema.devdocs.json b/api_docs/kbn_entities_schema.devdocs.json index cf8d585a18f804..bcb6b2ff87c2b2 100644 --- a/api_docs/kbn_entities_schema.devdocs.json +++ b/api_docs/kbn_entities_schema.devdocs.json @@ -43,7 +43,7 @@ "label": "EntityDefinition", "description": [], "signature": [ - "{ id: string; type: string; name: string; history: { interval: moment.Duration; timestampField: string; lookbackPeriod?: moment.Duration | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }; managed: boolean; indexPatterns: string[]; identityFields: ({ field: string; optional: boolean; } | { field: string; optional: boolean; })[]; displayNameTemplate: string; description?: string | undefined; filter?: string | undefined; metadata?: ({ source: string; destination?: string | undefined; limit?: number | undefined; } | { source: string; destination: string; limit: number; })[] | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", + "{ id: string; type: string; version: string; name: string; history: { interval: moment.Duration; timestampField: string; lookbackPeriod?: moment.Duration | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }; managed: boolean; indexPatterns: string[]; identityFields: ({ field: string; optional: boolean; } | { field: string; optional: boolean; })[]; displayNameTemplate: string; description?: string | undefined; filter?: string | undefined; metadata?: ({ source: string; destination?: string | undefined; limit?: number | undefined; } | { source: string; destination: string; limit: number; })[] | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", { "pluginId": "@kbn/entities-schema", "scope": "common", @@ -221,7 +221,7 @@ "label": "entityDefinitionSchema", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodString; name: Zod.ZodString; description: Zod.ZodOptional; type: Zod.ZodString; filter: Zod.ZodOptional; indexPatterns: Zod.ZodArray; identityFields: Zod.ZodArray, Zod.ZodEffects]>, \"many\">; displayNameTemplate: Zod.ZodString; metadata: Zod.ZodOptional; limit: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { source: string; destination?: string | undefined; limit?: number | undefined; }, { source: string; destination?: string | undefined; limit?: number | undefined; }>, Zod.ZodEffects]>, \"many\">>; metrics: Zod.ZodOptional; name: Zod.ZodString; description: Zod.ZodOptional; type: Zod.ZodString; filter: Zod.ZodOptional; indexPatterns: Zod.ZodArray; identityFields: Zod.ZodArray, Zod.ZodEffects]>, \"many\">; displayNameTemplate: Zod.ZodString; metadata: Zod.ZodOptional; limit: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { source: string; destination?: string | undefined; limit?: number | undefined; }, { source: string; destination?: string | undefined; limit?: number | undefined; }>, Zod.ZodEffects]>, \"many\">>; metrics: Zod.ZodOptional, \"many\">>; staticFields: Zod.ZodOptional>; managed: Zod.ZodDefault>; history: Zod.ZodObject<{ timestampField: Zod.ZodString; interval: Zod.ZodEffects, moment.Duration, string>; lookbackPeriod: Zod.ZodOptional>; settings: Zod.ZodOptional; syncDelay: Zod.ZodOptional; frequency: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { interval: moment.Duration; timestampField: string; lookbackPeriod?: moment.Duration | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }, { interval: string; timestampField: string; lookbackPeriod?: string | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }>; latest: Zod.ZodOptional; syncDelay: Zod.ZodOptional; frequency: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }, { settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; type: string; name: string; history: { interval: moment.Duration; timestampField: string; lookbackPeriod?: moment.Duration | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }; managed: boolean; indexPatterns: string[]; identityFields: ({ field: string; optional: boolean; } | { field: string; optional: boolean; })[]; displayNameTemplate: string; description?: string | undefined; filter?: string | undefined; metadata?: ({ source: string; destination?: string | undefined; limit?: number | undefined; } | { source: string; destination: string; limit: number; })[] | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", + "; filter?: string | undefined; } | { name: string; aggregation: \"doc_count\"; filter?: string | undefined; } | { name: string; field: string; percentile: number; aggregation: \"percentile\"; filter?: string | undefined; })[]; equation: string; }>, \"many\">>; staticFields: Zod.ZodOptional>; managed: Zod.ZodDefault>; history: Zod.ZodObject<{ timestampField: Zod.ZodString; interval: Zod.ZodEffects, moment.Duration, string>; lookbackPeriod: Zod.ZodOptional>; settings: Zod.ZodOptional; syncDelay: Zod.ZodOptional; frequency: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { interval: moment.Duration; timestampField: string; lookbackPeriod?: moment.Duration | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }, { interval: string; timestampField: string; lookbackPeriod?: string | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }>; latest: Zod.ZodOptional; syncDelay: Zod.ZodOptional; frequency: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }, { settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; type: string; version: string; name: string; history: { interval: moment.Duration; timestampField: string; lookbackPeriod?: moment.Duration | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }; managed: boolean; indexPatterns: string[]; identityFields: ({ field: string; optional: boolean; } | { field: string; optional: boolean; })[]; displayNameTemplate: string; description?: string | undefined; filter?: string | undefined; metadata?: ({ source: string; destination?: string | undefined; limit?: number | undefined; } | { source: string; destination: string; limit: number; })[] | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", { "pluginId": "@kbn/entities-schema", "scope": "common", @@ -269,7 +269,7 @@ "section": "def-common.BasicAggregations", "text": "BasicAggregations" }, - "; filter?: string | undefined; } | { name: string; aggregation: \"doc_count\"; filter?: string | undefined; } | { name: string; field: string; percentile: number; aggregation: \"percentile\"; filter?: string | undefined; })[]; equation: string; }[] | undefined; staticFields?: Record | undefined; latest?: { settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; } | undefined; }, { id: string; type: string; name: string; history: { interval: string; timestampField: string; lookbackPeriod?: string | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }; indexPatterns: string[]; identityFields: (string | { field: string; optional: boolean; })[]; displayNameTemplate: string; description?: string | undefined; filter?: string | undefined; metadata?: (string | { source: string; destination?: string | undefined; limit?: number | undefined; })[] | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", + "; filter?: string | undefined; } | { name: string; aggregation: \"doc_count\"; filter?: string | undefined; } | { name: string; field: string; percentile: number; aggregation: \"percentile\"; filter?: string | undefined; })[]; equation: string; }[] | undefined; staticFields?: Record | undefined; latest?: { settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; } | undefined; }, { id: string; type: string; version: string; name: string; history: { interval: string; timestampField: string; lookbackPeriod?: string | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }; indexPatterns: string[]; identityFields: (string | { field: string; optional: boolean; })[]; displayNameTemplate: string; description?: string | undefined; filter?: string | undefined; metadata?: (string | { source: string; destination?: string | undefined; limit?: number | undefined; })[] | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", { "pluginId": "@kbn/entities-schema", "scope": "common", @@ -467,6 +467,21 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/entities-schema", + "id": "def-common.semVerSchema", + "type": "Object", + "tags": [], + "label": "semVerSchema", + "description": [], + "signature": [ + "Zod.ZodEffects" + ], + "path": "x-pack/packages/kbn-entities-schema/src/schema/common.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ] } diff --git a/api_docs/kbn_entities_schema.mdx b/api_docs/kbn_entities_schema.mdx index 03a08d0d54cf22..db23747c07d579 100644 --- a/api_docs/kbn_entities_schema.mdx +++ b/api_docs/kbn_entities_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-entities-schema title: "@kbn/entities-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/entities-schema plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/entities-schema'] --- import kbnEntitiesSchemaObj from './kbn_entities_schema.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 18 | 0 | 18 | 0 | +| 19 | 0 | 19 | 0 | ## Common diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 7cf1b70304a8fd..74e15499c98c8c 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es'] --- import kbnEsObj from './kbn_es.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 58d019d0bf8fad..e0bdec105a323b 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index acfaba698e7faf..bb67567945bfc4 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 2a985320900f7f..09fa30e6660648 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 82d8789b637176..bd52515236889a 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index ae03b6127e3d0c..996cdd292a3c29 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_esql_ast.devdocs.json b/api_docs/kbn_esql_ast.devdocs.json index ba60e35d615c33..9811a14a8fa62d 100644 --- a/api_docs/kbn_esql_ast.devdocs.json +++ b/api_docs/kbn_esql_ast.devdocs.json @@ -341,7 +341,13 @@ "text": "ESQLAstNode" }, "[]) => ", - "ESQLParamLiteral", + { + "pluginId": "@kbn/esql-ast", + "scope": "common", + "docId": "kibKbnEsqlAstPluginApi", + "section": "def-common.ESQLParamLiteral", + "text": "ESQLParamLiteral" + }, "[]" ], "path": "packages/kbn-esql-ast/src/walker/walker.ts", @@ -1508,6 +1514,88 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/esql-ast", + "id": "def-common.ESQLParamLiteral", + "type": "Interface", + "tags": [], + "label": "ESQLParamLiteral", + "description": [], + "signature": [ + { + "pluginId": "@kbn/esql-ast", + "scope": "common", + "docId": "kibKbnEsqlAstPluginApi", + "section": "def-common.ESQLParamLiteral", + "text": "ESQLParamLiteral" + }, + " extends ", + "ESQLAstBaseItem", + "" + ], + "path": "packages/kbn-esql-ast/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/esql-ast", + "id": "def-common.ESQLParamLiteral.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"literal\"" + ], + "path": "packages/kbn-esql-ast/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/esql-ast", + "id": "def-common.ESQLParamLiteral.literalType", + "type": "string", + "tags": [], + "label": "literalType", + "description": [], + "signature": [ + "\"param\"" + ], + "path": "packages/kbn-esql-ast/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/esql-ast", + "id": "def-common.ESQLParamLiteral.paramType", + "type": "Uncategorized", + "tags": [], + "label": "paramType", + "description": [], + "signature": [ + "ParamType" + ], + "path": "packages/kbn-esql-ast/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/esql-ast", + "id": "def-common.ESQLParamLiteral.value", + "type": "CompoundType", + "tags": [], + "label": "value", + "description": [], + "signature": [ + "string | number" + ], + "path": "packages/kbn-esql-ast/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/esql-ast", "id": "def-common.ESQLSource", @@ -2015,7 +2103,13 @@ " | ", "ESQLStringLiteral", " | ", - "ESQLParamLiteral", + { + "pluginId": "@kbn/esql-ast", + "scope": "common", + "docId": "kibKbnEsqlAstPluginApi", + "section": "def-common.ESQLParamLiteral", + "text": "ESQLParamLiteral" + }, "" ], "path": "packages/kbn-esql-ast/src/types.ts", diff --git a/api_docs/kbn_esql_ast.mdx b/api_docs/kbn_esql_ast.mdx index 409e43359b6b83..c26af5141e0d24 100644 --- a/api_docs/kbn_esql_ast.mdx +++ b/api_docs/kbn_esql_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-ast title: "@kbn/esql-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-ast plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-ast'] --- import kbnEsqlAstObj from './kbn_esql_ast.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 99 | 1 | 96 | 11 | +| 104 | 1 | 101 | 10 | ## Common diff --git a/api_docs/kbn_esql_utils.mdx b/api_docs/kbn_esql_utils.mdx index 0aac396b0a5e58..d4ce11a10185b3 100644 --- a/api_docs/kbn_esql_utils.mdx +++ b/api_docs/kbn_esql_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-utils title: "@kbn/esql-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-utils'] --- import kbnEsqlUtilsObj from './kbn_esql_utils.devdocs.json'; diff --git a/api_docs/kbn_esql_validation_autocomplete.devdocs.json b/api_docs/kbn_esql_validation_autocomplete.devdocs.json index 79100a05ac2858..56830eaa4f756d 100644 --- a/api_docs/kbn_esql_validation_autocomplete.devdocs.json +++ b/api_docs/kbn_esql_validation_autocomplete.devdocs.json @@ -628,7 +628,13 @@ " | ", "ESQLStringLiteral", " | ", - "ESQLParamLiteral", + { + "pluginId": "@kbn/esql-ast", + "scope": "common", + "docId": "kibKbnEsqlAstPluginApi", + "section": "def-common.ESQLParamLiteral", + "text": "ESQLParamLiteral" + }, " | ", { "pluginId": "@kbn/esql-ast", @@ -740,7 +746,13 @@ " | ", "ESQLStringLiteral", " | ", - "ESQLParamLiteral", + { + "pluginId": "@kbn/esql-ast", + "scope": "common", + "docId": "kibKbnEsqlAstPluginApi", + "section": "def-common.ESQLParamLiteral", + "text": "ESQLParamLiteral" + }, " | ", { "pluginId": "@kbn/esql-ast", @@ -836,7 +848,13 @@ " | ", "ESQLStringLiteral", " | ", - "ESQLParamLiteral", + { + "pluginId": "@kbn/esql-ast", + "scope": "common", + "docId": "kibKbnEsqlAstPluginApi", + "section": "def-common.ESQLParamLiteral", + "text": "ESQLParamLiteral" + }, " | ", { "pluginId": "@kbn/esql-ast", @@ -940,7 +958,13 @@ " | ", "ESQLStringLiteral", " | ", - "ESQLParamLiteral", + { + "pluginId": "@kbn/esql-ast", + "scope": "common", + "docId": "kibKbnEsqlAstPluginApi", + "section": "def-common.ESQLParamLiteral", + "text": "ESQLParamLiteral" + }, " | ", { "pluginId": "@kbn/esql-ast", diff --git a/api_docs/kbn_esql_validation_autocomplete.mdx b/api_docs/kbn_esql_validation_autocomplete.mdx index 54d5544dfae3a2..6005c598f97986 100644 --- a/api_docs/kbn_esql_validation_autocomplete.mdx +++ b/api_docs/kbn_esql_validation_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-validation-autocomplete title: "@kbn/esql-validation-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-validation-autocomplete plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-validation-autocomplete'] --- import kbnEsqlValidationAutocompleteObj from './kbn_esql_validation_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index 90452a569323b9..9e6436015f568c 100644 --- a/api_docs/kbn_event_annotation_common.mdx +++ b/api_docs/kbn_event_annotation_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-common title: "@kbn/event-annotation-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-common'] --- import kbnEventAnnotationCommonObj from './kbn_event_annotation_common.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_components.mdx b/api_docs/kbn_event_annotation_components.mdx index 022224ae640829..675787e44b4857 100644 --- a/api_docs/kbn_event_annotation_components.mdx +++ b/api_docs/kbn_event_annotation_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-components title: "@kbn/event-annotation-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-components plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-components'] --- import kbnEventAnnotationComponentsObj from './kbn_event_annotation_components.devdocs.json'; diff --git a/api_docs/kbn_expandable_flyout.mdx b/api_docs/kbn_expandable_flyout.mdx index dffd8f52dd1550..7c31260958bbf6 100644 --- a/api_docs/kbn_expandable_flyout.mdx +++ b/api_docs/kbn_expandable_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-expandable-flyout title: "@kbn/expandable-flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/expandable-flyout plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/expandable-flyout'] --- import kbnExpandableFlyoutObj from './kbn_expandable_flyout.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index dc400e31bde169..6c08526725b10e 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_field_utils.mdx b/api_docs/kbn_field_utils.mdx index 23af3158f039a0..7dd29ed4b3ee65 100644 --- a/api_docs/kbn_field_utils.mdx +++ b/api_docs/kbn_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-utils title: "@kbn/field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-utils'] --- import kbnFieldUtilsObj from './kbn_field_utils.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index 7ab020263de7e9..421592b70fbe87 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_formatters.mdx b/api_docs/kbn_formatters.mdx index 197ec0ddd43d8e..1a6c7b6f84ffee 100644 --- a/api_docs/kbn_formatters.mdx +++ b/api_docs/kbn_formatters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-formatters title: "@kbn/formatters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/formatters plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/formatters'] --- import kbnFormattersObj from './kbn_formatters.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index e56080047a545a..bbe87749889cfd 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_ui_services.mdx b/api_docs/kbn_ftr_common_functional_ui_services.mdx index fdb06c43b43936..2a0ffa26fcef86 100644 --- a/api_docs/kbn_ftr_common_functional_ui_services.mdx +++ b/api_docs/kbn_ftr_common_functional_ui_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-ui-services title: "@kbn/ftr-common-functional-ui-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-ui-services plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-ui-services'] --- import kbnFtrCommonFunctionalUiServicesObj from './kbn_ftr_common_functional_ui_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index 48b9532c8c2407..774fe7fb04566e 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_generate_console_definitions.mdx b/api_docs/kbn_generate_console_definitions.mdx index b0282d6e6fe6bf..6e8b03b0915968 100644 --- a/api_docs/kbn_generate_console_definitions.mdx +++ b/api_docs/kbn_generate_console_definitions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-console-definitions title: "@kbn/generate-console-definitions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-console-definitions plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-console-definitions'] --- import kbnGenerateConsoleDefinitionsObj from './kbn_generate_console_definitions.devdocs.json'; diff --git a/api_docs/kbn_generate_csv.mdx b/api_docs/kbn_generate_csv.mdx index 5c4d3964ae8aa1..fdcf2f4d89afae 100644 --- a/api_docs/kbn_generate_csv.mdx +++ b/api_docs/kbn_generate_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-csv title: "@kbn/generate-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-csv plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv'] --- import kbnGenerateCsvObj from './kbn_generate_csv.devdocs.json'; diff --git a/api_docs/kbn_grouping.mdx b/api_docs/kbn_grouping.mdx index 945768bb9e5907..a495ad1c6d2e07 100644 --- a/api_docs/kbn_grouping.mdx +++ b/api_docs/kbn_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-grouping title: "@kbn/grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/grouping plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/grouping'] --- import kbnGroupingObj from './kbn_grouping.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index 3ddd9004d5bd93..34e162a443d281 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index 9a04a6ac2d41a6..094412e8b5682b 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index bd0f10e3f2f7ad..c34e4c3ea3f072 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx index 20b2eae2f7b3a5..12426866b6e814 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server'] --- import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index f8905056b6964d..8a5f9c1afce587 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index 3d1c353f16c2de..e08496320d2a2d 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index e26e50409e91a7..9a5a1047820c99 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx index cc84a9d96eff23..b060a6760686e3 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react'] --- import kbnI18nReactObj from './kbn_i18n_react.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index 5ffa24e29075de..c47b58d8e3bf94 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_index_management.mdx b/api_docs/kbn_index_management.mdx index 67ce5e8cc6dfea..85e08645d57796 100644 --- a/api_docs/kbn_index_management.mdx +++ b/api_docs/kbn_index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-index-management title: "@kbn/index-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/index-management plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/index-management'] --- import kbnIndexManagementObj from './kbn_index_management.devdocs.json'; diff --git a/api_docs/kbn_inference_integration_flyout.mdx b/api_docs/kbn_inference_integration_flyout.mdx index 9482370f2098eb..1e743744d845d2 100644 --- a/api_docs/kbn_inference_integration_flyout.mdx +++ b/api_docs/kbn_inference_integration_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-inference_integration_flyout title: "@kbn/inference_integration_flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/inference_integration_flyout plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/inference_integration_flyout'] --- import kbnInferenceIntegrationFlyoutObj from './kbn_inference_integration_flyout.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index 5942980525cf1f..8b4de71f7ddbeb 100644 --- a/api_docs/kbn_infra_forge.mdx +++ b/api_docs/kbn_infra_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-infra-forge title: "@kbn/infra-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/infra-forge plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/infra-forge'] --- import kbnInfraForgeObj from './kbn_infra_forge.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 9f75bdc13c9cc9..64123585efa901 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index 8b86cea224f66a..e4ab643d9af9d1 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_ipynb.mdx b/api_docs/kbn_ipynb.mdx index 7191c53657e0c1..b23b257e4101c5 100644 --- a/api_docs/kbn_ipynb.mdx +++ b/api_docs/kbn_ipynb.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ipynb title: "@kbn/ipynb" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ipynb plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ipynb'] --- import kbnIpynbObj from './kbn_ipynb.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 885a833b848e80..a3f7c879315190 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index 06baa35ff2d4be..9e177417e52a5d 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_json_ast.mdx b/api_docs/kbn_json_ast.mdx index c4bf0298cab274..5f427ab32ad72e 100644 --- a/api_docs/kbn_json_ast.mdx +++ b/api_docs/kbn_json_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-ast title: "@kbn/json-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-ast plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_json_schemas.mdx b/api_docs/kbn_json_schemas.mdx index d17b72c5d78a32..f5453b314c11a1 100644 --- a/api_docs/kbn_json_schemas.mdx +++ b/api_docs/kbn_json_schemas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-schemas title: "@kbn/json-schemas" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-schemas plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-schemas'] --- import kbnJsonSchemasObj from './kbn_json_schemas.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 7b7504802df25e..1ea1f37beabe67 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index ac6609227b665a..1b47ad998cf41b 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_lens_embeddable_utils.mdx b/api_docs/kbn_lens_embeddable_utils.mdx index 850a3c590f8fbc..96583dd6dcac96 100644 --- a/api_docs/kbn_lens_embeddable_utils.mdx +++ b/api_docs/kbn_lens_embeddable_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-embeddable-utils title: "@kbn/lens-embeddable-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-embeddable-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-embeddable-utils'] --- import kbnLensEmbeddableUtilsObj from './kbn_lens_embeddable_utils.devdocs.json'; diff --git a/api_docs/kbn_lens_formula_docs.mdx b/api_docs/kbn_lens_formula_docs.mdx index 5ec041d5c749c6..b7c542d83bb2fd 100644 --- a/api_docs/kbn_lens_formula_docs.mdx +++ b/api_docs/kbn_lens_formula_docs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-formula-docs title: "@kbn/lens-formula-docs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-formula-docs plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-formula-docs'] --- import kbnLensFormulaDocsObj from './kbn_lens_formula_docs.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index d3a88fe215040e..5091928b667783 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index 9c41b224c50fea..12b7a262dd653c 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_content_badge.mdx b/api_docs/kbn_managed_content_badge.mdx index b89de140a27b3a..77c4bac2298289 100644 --- a/api_docs/kbn_managed_content_badge.mdx +++ b/api_docs/kbn_managed_content_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-content-badge title: "@kbn/managed-content-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-content-badge plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-content-badge'] --- import kbnManagedContentBadgeObj from './kbn_managed_content_badge.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index 7a27ffffde80ca..a1dab6d429a7d1 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_management_cards_navigation.mdx b/api_docs/kbn_management_cards_navigation.mdx index 18176ee9ca6021..1f3a24ca873555 100644 --- a/api_docs/kbn_management_cards_navigation.mdx +++ b/api_docs/kbn_management_cards_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-cards-navigation title: "@kbn/management-cards-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-cards-navigation plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-cards-navigation'] --- import kbnManagementCardsNavigationObj from './kbn_management_cards_navigation.devdocs.json'; diff --git a/api_docs/kbn_management_settings_application.mdx b/api_docs/kbn_management_settings_application.mdx index b4b296032e909e..1718efdec3a87f 100644 --- a/api_docs/kbn_management_settings_application.mdx +++ b/api_docs/kbn_management_settings_application.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-application title: "@kbn/management-settings-application" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-application plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-application'] --- import kbnManagementSettingsApplicationObj from './kbn_management_settings_application.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_category.mdx b/api_docs/kbn_management_settings_components_field_category.mdx index a6c83fb1bc8f4d..db9cee8230a0dc 100644 --- a/api_docs/kbn_management_settings_components_field_category.mdx +++ b/api_docs/kbn_management_settings_components_field_category.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-category title: "@kbn/management-settings-components-field-category" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-category plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-category'] --- import kbnManagementSettingsComponentsFieldCategoryObj from './kbn_management_settings_components_field_category.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_input.mdx b/api_docs/kbn_management_settings_components_field_input.mdx index ce2df8e5b25cba..8a805df3d3a399 100644 --- a/api_docs/kbn_management_settings_components_field_input.mdx +++ b/api_docs/kbn_management_settings_components_field_input.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-input title: "@kbn/management-settings-components-field-input" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-input plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-input'] --- import kbnManagementSettingsComponentsFieldInputObj from './kbn_management_settings_components_field_input.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_row.mdx b/api_docs/kbn_management_settings_components_field_row.mdx index ac523aa0416dd3..db8386221e3356 100644 --- a/api_docs/kbn_management_settings_components_field_row.mdx +++ b/api_docs/kbn_management_settings_components_field_row.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-row title: "@kbn/management-settings-components-field-row" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-row plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-row'] --- import kbnManagementSettingsComponentsFieldRowObj from './kbn_management_settings_components_field_row.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_form.mdx b/api_docs/kbn_management_settings_components_form.mdx index 8a64499c8321e5..02363df9d634b7 100644 --- a/api_docs/kbn_management_settings_components_form.mdx +++ b/api_docs/kbn_management_settings_components_form.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-form title: "@kbn/management-settings-components-form" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-form plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-form'] --- import kbnManagementSettingsComponentsFormObj from './kbn_management_settings_components_form.devdocs.json'; diff --git a/api_docs/kbn_management_settings_field_definition.mdx b/api_docs/kbn_management_settings_field_definition.mdx index bfed7b76b6060d..7aebba70952172 100644 --- a/api_docs/kbn_management_settings_field_definition.mdx +++ b/api_docs/kbn_management_settings_field_definition.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-field-definition title: "@kbn/management-settings-field-definition" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-field-definition plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-field-definition'] --- import kbnManagementSettingsFieldDefinitionObj from './kbn_management_settings_field_definition.devdocs.json'; diff --git a/api_docs/kbn_management_settings_ids.mdx b/api_docs/kbn_management_settings_ids.mdx index 784348ccc434ac..71eb1446f75b90 100644 --- a/api_docs/kbn_management_settings_ids.mdx +++ b/api_docs/kbn_management_settings_ids.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-ids title: "@kbn/management-settings-ids" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-ids plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-ids'] --- import kbnManagementSettingsIdsObj from './kbn_management_settings_ids.devdocs.json'; diff --git a/api_docs/kbn_management_settings_section_registry.mdx b/api_docs/kbn_management_settings_section_registry.mdx index 087ad1b156ecaa..7c1e5e14dcc2ab 100644 --- a/api_docs/kbn_management_settings_section_registry.mdx +++ b/api_docs/kbn_management_settings_section_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-section-registry title: "@kbn/management-settings-section-registry" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-section-registry plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-section-registry'] --- import kbnManagementSettingsSectionRegistryObj from './kbn_management_settings_section_registry.devdocs.json'; diff --git a/api_docs/kbn_management_settings_types.mdx b/api_docs/kbn_management_settings_types.mdx index 04e967817f5bec..45119a3317a4b6 100644 --- a/api_docs/kbn_management_settings_types.mdx +++ b/api_docs/kbn_management_settings_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-types title: "@kbn/management-settings-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-types plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-types'] --- import kbnManagementSettingsTypesObj from './kbn_management_settings_types.devdocs.json'; diff --git a/api_docs/kbn_management_settings_utilities.mdx b/api_docs/kbn_management_settings_utilities.mdx index 0b299726b544d0..e048b8839f2a2d 100644 --- a/api_docs/kbn_management_settings_utilities.mdx +++ b/api_docs/kbn_management_settings_utilities.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-utilities title: "@kbn/management-settings-utilities" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-utilities plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-utilities'] --- import kbnManagementSettingsUtilitiesObj from './kbn_management_settings_utilities.devdocs.json'; diff --git a/api_docs/kbn_management_storybook_config.mdx b/api_docs/kbn_management_storybook_config.mdx index 78c19265dc11f4..5002ea91da03fd 100644 --- a/api_docs/kbn_management_storybook_config.mdx +++ b/api_docs/kbn_management_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-storybook-config title: "@kbn/management-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-storybook-config plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-storybook-config'] --- import kbnManagementStorybookConfigObj from './kbn_management_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 97d381b8e263cc..85b4d01c8731d3 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_maps_vector_tile_utils.mdx b/api_docs/kbn_maps_vector_tile_utils.mdx index b3383c6fc054bf..bfccdc8d37f70f 100644 --- a/api_docs/kbn_maps_vector_tile_utils.mdx +++ b/api_docs/kbn_maps_vector_tile_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-maps-vector-tile-utils title: "@kbn/maps-vector-tile-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/maps-vector-tile-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/maps-vector-tile-utils'] --- import kbnMapsVectorTileUtilsObj from './kbn_maps_vector_tile_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index ff022fd4098b44..daf0cea9ed7a21 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_anomaly_utils.mdx b/api_docs/kbn_ml_anomaly_utils.mdx index 61537f4a1be4ca..1dc34236ad32ef 100644 --- a/api_docs/kbn_ml_anomaly_utils.mdx +++ b/api_docs/kbn_ml_anomaly_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-anomaly-utils title: "@kbn/ml-anomaly-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-anomaly-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-anomaly-utils'] --- import kbnMlAnomalyUtilsObj from './kbn_ml_anomaly_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_cancellable_search.mdx b/api_docs/kbn_ml_cancellable_search.mdx index 1006c08221c4b2..1e8a952d479270 100644 --- a/api_docs/kbn_ml_cancellable_search.mdx +++ b/api_docs/kbn_ml_cancellable_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-cancellable-search title: "@kbn/ml-cancellable-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-cancellable-search plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-cancellable-search'] --- import kbnMlCancellableSearchObj from './kbn_ml_cancellable_search.devdocs.json'; diff --git a/api_docs/kbn_ml_category_validator.mdx b/api_docs/kbn_ml_category_validator.mdx index f9c0a415626417..363be1682f841c 100644 --- a/api_docs/kbn_ml_category_validator.mdx +++ b/api_docs/kbn_ml_category_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-category-validator title: "@kbn/ml-category-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-category-validator plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-category-validator'] --- import kbnMlCategoryValidatorObj from './kbn_ml_category_validator.devdocs.json'; diff --git a/api_docs/kbn_ml_chi2test.mdx b/api_docs/kbn_ml_chi2test.mdx index 7244fc9f1399f6..632420bf2fad9d 100644 --- a/api_docs/kbn_ml_chi2test.mdx +++ b/api_docs/kbn_ml_chi2test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-chi2test title: "@kbn/ml-chi2test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-chi2test plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-chi2test'] --- import kbnMlChi2testObj from './kbn_ml_chi2test.devdocs.json'; diff --git a/api_docs/kbn_ml_data_frame_analytics_utils.mdx b/api_docs/kbn_ml_data_frame_analytics_utils.mdx index 55b9791fa27337..7cdc4e877f2cf0 100644 --- a/api_docs/kbn_ml_data_frame_analytics_utils.mdx +++ b/api_docs/kbn_ml_data_frame_analytics_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-frame-analytics-utils title: "@kbn/ml-data-frame-analytics-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-frame-analytics-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-frame-analytics-utils'] --- import kbnMlDataFrameAnalyticsUtilsObj from './kbn_ml_data_frame_analytics_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_data_grid.mdx b/api_docs/kbn_ml_data_grid.mdx index 65980b4809fb96..da8839726a1766 100644 --- a/api_docs/kbn_ml_data_grid.mdx +++ b/api_docs/kbn_ml_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-grid title: "@kbn/ml-data-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-grid plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-grid'] --- import kbnMlDataGridObj from './kbn_ml_data_grid.devdocs.json'; diff --git a/api_docs/kbn_ml_date_picker.mdx b/api_docs/kbn_ml_date_picker.mdx index 02491f27034d16..606ce4780c7017 100644 --- a/api_docs/kbn_ml_date_picker.mdx +++ b/api_docs/kbn_ml_date_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-picker title: "@kbn/ml-date-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-picker plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-picker'] --- import kbnMlDatePickerObj from './kbn_ml_date_picker.devdocs.json'; diff --git a/api_docs/kbn_ml_date_utils.mdx b/api_docs/kbn_ml_date_utils.mdx index 45eff4760ee26e..0bbdd8a7357e6f 100644 --- a/api_docs/kbn_ml_date_utils.mdx +++ b/api_docs/kbn_ml_date_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-utils title: "@kbn/ml-date-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-utils'] --- import kbnMlDateUtilsObj from './kbn_ml_date_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_error_utils.mdx b/api_docs/kbn_ml_error_utils.mdx index ab69959755eca6..730aebc4e40934 100644 --- a/api_docs/kbn_ml_error_utils.mdx +++ b/api_docs/kbn_ml_error_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-error-utils title: "@kbn/ml-error-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-error-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-error-utils'] --- import kbnMlErrorUtilsObj from './kbn_ml_error_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_in_memory_table.mdx b/api_docs/kbn_ml_in_memory_table.mdx index 97f5b22c20e038..ab23d4ca1a5c91 100644 --- a/api_docs/kbn_ml_in_memory_table.mdx +++ b/api_docs/kbn_ml_in_memory_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-in-memory-table title: "@kbn/ml-in-memory-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-in-memory-table plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-in-memory-table'] --- import kbnMlInMemoryTableObj from './kbn_ml_in_memory_table.devdocs.json'; diff --git a/api_docs/kbn_ml_is_defined.mdx b/api_docs/kbn_ml_is_defined.mdx index 0aa6a9294274c3..9091ae8ebd0d0e 100644 --- a/api_docs/kbn_ml_is_defined.mdx +++ b/api_docs/kbn_ml_is_defined.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-defined title: "@kbn/ml-is-defined" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-defined plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-defined'] --- import kbnMlIsDefinedObj from './kbn_ml_is_defined.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index 5bc58b4ab29e7b..bf66b55a15af06 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_kibana_theme.mdx b/api_docs/kbn_ml_kibana_theme.mdx index 30078356d43ffa..527409b93aa1e9 100644 --- a/api_docs/kbn_ml_kibana_theme.mdx +++ b/api_docs/kbn_ml_kibana_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-kibana-theme title: "@kbn/ml-kibana-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-kibana-theme plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-kibana-theme'] --- import kbnMlKibanaThemeObj from './kbn_ml_kibana_theme.devdocs.json'; diff --git a/api_docs/kbn_ml_local_storage.mdx b/api_docs/kbn_ml_local_storage.mdx index c2fab682158a4b..ade93f4976d2dd 100644 --- a/api_docs/kbn_ml_local_storage.mdx +++ b/api_docs/kbn_ml_local_storage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-local-storage title: "@kbn/ml-local-storage" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-local-storage plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-local-storage'] --- import kbnMlLocalStorageObj from './kbn_ml_local_storage.devdocs.json'; diff --git a/api_docs/kbn_ml_nested_property.mdx b/api_docs/kbn_ml_nested_property.mdx index 0e71ba311f3cc8..e8b45372798bec 100644 --- a/api_docs/kbn_ml_nested_property.mdx +++ b/api_docs/kbn_ml_nested_property.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-nested-property title: "@kbn/ml-nested-property" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-nested-property plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-nested-property'] --- import kbnMlNestedPropertyObj from './kbn_ml_nested_property.devdocs.json'; diff --git a/api_docs/kbn_ml_number_utils.mdx b/api_docs/kbn_ml_number_utils.mdx index 835039597aa7ff..39db829036539a 100644 --- a/api_docs/kbn_ml_number_utils.mdx +++ b/api_docs/kbn_ml_number_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-number-utils title: "@kbn/ml-number-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-number-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-number-utils'] --- import kbnMlNumberUtilsObj from './kbn_ml_number_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index 0d109f34bc4f51..569858f1cca626 100644 --- a/api_docs/kbn_ml_query_utils.mdx +++ b/api_docs/kbn_ml_query_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-query-utils title: "@kbn/ml-query-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-query-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-query-utils'] --- import kbnMlQueryUtilsObj from './kbn_ml_query_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_random_sampler_utils.mdx b/api_docs/kbn_ml_random_sampler_utils.mdx index efad24db230693..c80056ab85de0e 100644 --- a/api_docs/kbn_ml_random_sampler_utils.mdx +++ b/api_docs/kbn_ml_random_sampler_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-random-sampler-utils title: "@kbn/ml-random-sampler-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-random-sampler-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-random-sampler-utils'] --- import kbnMlRandomSamplerUtilsObj from './kbn_ml_random_sampler_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_route_utils.mdx b/api_docs/kbn_ml_route_utils.mdx index c1fece43923f37..a5355d0238ee7b 100644 --- a/api_docs/kbn_ml_route_utils.mdx +++ b/api_docs/kbn_ml_route_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-route-utils title: "@kbn/ml-route-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-route-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-route-utils'] --- import kbnMlRouteUtilsObj from './kbn_ml_route_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_runtime_field_utils.mdx b/api_docs/kbn_ml_runtime_field_utils.mdx index 74644502aff39b..06e09a80c911a6 100644 --- a/api_docs/kbn_ml_runtime_field_utils.mdx +++ b/api_docs/kbn_ml_runtime_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-runtime-field-utils title: "@kbn/ml-runtime-field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-runtime-field-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-runtime-field-utils'] --- import kbnMlRuntimeFieldUtilsObj from './kbn_ml_runtime_field_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index 97462d503b78bd..5f357c296b7942 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_time_buckets.mdx b/api_docs/kbn_ml_time_buckets.mdx index 1c39672f5e2df2..c0c8dd81f22094 100644 --- a/api_docs/kbn_ml_time_buckets.mdx +++ b/api_docs/kbn_ml_time_buckets.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-time-buckets title: "@kbn/ml-time-buckets" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-time-buckets plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-time-buckets'] --- import kbnMlTimeBucketsObj from './kbn_ml_time_buckets.devdocs.json'; diff --git a/api_docs/kbn_ml_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index acf4af07efdb0b..6b6707e0a21e91 100644 --- a/api_docs/kbn_ml_trained_models_utils.mdx +++ b/api_docs/kbn_ml_trained_models_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-trained-models-utils title: "@kbn/ml-trained-models-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-trained-models-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-trained-models-utils'] --- import kbnMlTrainedModelsUtilsObj from './kbn_ml_trained_models_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_ui_actions.mdx b/api_docs/kbn_ml_ui_actions.mdx index cb29649614e39c..0db0964faef93b 100644 --- a/api_docs/kbn_ml_ui_actions.mdx +++ b/api_docs/kbn_ml_ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-ui-actions title: "@kbn/ml-ui-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-ui-actions plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-ui-actions'] --- import kbnMlUiActionsObj from './kbn_ml_ui_actions.devdocs.json'; diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index 6b6e2fe6d34fd5..7ca46a3d4ede88 100644 --- a/api_docs/kbn_ml_url_state.mdx +++ b/api_docs/kbn_ml_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-url-state title: "@kbn/ml-url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-url-state plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; diff --git a/api_docs/kbn_mock_idp_utils.mdx b/api_docs/kbn_mock_idp_utils.mdx index 88ac70409c1102..c5fdd3a40296ae 100644 --- a/api_docs/kbn_mock_idp_utils.mdx +++ b/api_docs/kbn_mock_idp_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mock-idp-utils title: "@kbn/mock-idp-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mock-idp-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mock-idp-utils'] --- import kbnMockIdpUtilsObj from './kbn_mock_idp_utils.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index cb50c19d04a9ad..b535d75a8af009 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_object_versioning.mdx b/api_docs/kbn_object_versioning.mdx index dee6a9dcb42813..c096003007485c 100644 --- a/api_docs/kbn_object_versioning.mdx +++ b/api_docs/kbn_object_versioning.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-object-versioning title: "@kbn/object-versioning" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/object-versioning plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/object-versioning'] --- import kbnObjectVersioningObj from './kbn_object_versioning.devdocs.json'; diff --git a/api_docs/kbn_observability_alert_details.mdx b/api_docs/kbn_observability_alert_details.mdx index c405579e9f465f..e35bff754e051b 100644 --- a/api_docs/kbn_observability_alert_details.mdx +++ b/api_docs/kbn_observability_alert_details.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alert-details title: "@kbn/observability-alert-details" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alert-details plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alert-details'] --- import kbnObservabilityAlertDetailsObj from './kbn_observability_alert_details.devdocs.json'; diff --git a/api_docs/kbn_observability_alerting_test_data.mdx b/api_docs/kbn_observability_alerting_test_data.mdx index 9924c95c9a34e1..7f044e2b150b17 100644 --- a/api_docs/kbn_observability_alerting_test_data.mdx +++ b/api_docs/kbn_observability_alerting_test_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alerting-test-data title: "@kbn/observability-alerting-test-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alerting-test-data plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alerting-test-data'] --- import kbnObservabilityAlertingTestDataObj from './kbn_observability_alerting_test_data.devdocs.json'; diff --git a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx index 2014c95c4c3487..dfe0d2671b37cd 100644 --- a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx +++ b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-get-padded-alert-time-range-util title: "@kbn/observability-get-padded-alert-time-range-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-get-padded-alert-time-range-util plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-get-padded-alert-time-range-util'] --- import kbnObservabilityGetPaddedAlertTimeRangeUtilObj from './kbn_observability_get_padded_alert_time_range_util.devdocs.json'; diff --git a/api_docs/kbn_openapi_bundler.mdx b/api_docs/kbn_openapi_bundler.mdx index 61e6f419b90f82..c245d9a606f1ea 100644 --- a/api_docs/kbn_openapi_bundler.mdx +++ b/api_docs/kbn_openapi_bundler.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-bundler title: "@kbn/openapi-bundler" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-bundler plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-bundler'] --- import kbnOpenapiBundlerObj from './kbn_openapi_bundler.devdocs.json'; diff --git a/api_docs/kbn_openapi_generator.mdx b/api_docs/kbn_openapi_generator.mdx index 422af3b6140e36..aec8f452011b94 100644 --- a/api_docs/kbn_openapi_generator.mdx +++ b/api_docs/kbn_openapi_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-generator title: "@kbn/openapi-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-generator plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-generator'] --- import kbnOpenapiGeneratorObj from './kbn_openapi_generator.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index 722df1697e829a..6d9e606ebd8eb4 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index 7dbae17bcf545f..8a70b608998e2f 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index 19c3bd2cc9ed41..eee329fa9599bb 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_panel_loader.mdx b/api_docs/kbn_panel_loader.mdx index c9725297c9842f..1a08570e9a5032 100644 --- a/api_docs/kbn_panel_loader.mdx +++ b/api_docs/kbn_panel_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-panel-loader title: "@kbn/panel-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/panel-loader plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/panel-loader'] --- import kbnPanelLoaderObj from './kbn_panel_loader.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index 0a9ec50d257a4d..910dc86ec01c80 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_check.mdx b/api_docs/kbn_plugin_check.mdx index 87ce43cac874dd..71f2af8f818f96 100644 --- a/api_docs/kbn_plugin_check.mdx +++ b/api_docs/kbn_plugin_check.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-check title: "@kbn/plugin-check" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-check plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-check'] --- import kbnPluginCheckObj from './kbn_plugin_check.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index 696f801a977e9c..54fcf8a30cdc30 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index b142fbb353f280..9e208e0540f25c 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_presentation_containers.mdx b/api_docs/kbn_presentation_containers.mdx index e0f7bb5acdadea..846d4679f21df5 100644 --- a/api_docs/kbn_presentation_containers.mdx +++ b/api_docs/kbn_presentation_containers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-containers title: "@kbn/presentation-containers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-containers plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-containers'] --- import kbnPresentationContainersObj from './kbn_presentation_containers.devdocs.json'; diff --git a/api_docs/kbn_presentation_publishing.mdx b/api_docs/kbn_presentation_publishing.mdx index 72b2179b517019..275699efbbedbb 100644 --- a/api_docs/kbn_presentation_publishing.mdx +++ b/api_docs/kbn_presentation_publishing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-publishing title: "@kbn/presentation-publishing" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-publishing plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-publishing'] --- import kbnPresentationPublishingObj from './kbn_presentation_publishing.devdocs.json'; diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index 4842e6a2b56615..33627894827402 100644 --- a/api_docs/kbn_profiling_utils.mdx +++ b/api_docs/kbn_profiling_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-profiling-utils title: "@kbn/profiling-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/profiling-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/profiling-utils'] --- import kbnProfilingUtilsObj from './kbn_profiling_utils.devdocs.json'; diff --git a/api_docs/kbn_random_sampling.mdx b/api_docs/kbn_random_sampling.mdx index 951256c39e536b..5328846f12fe30 100644 --- a/api_docs/kbn_random_sampling.mdx +++ b/api_docs/kbn_random_sampling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-random-sampling title: "@kbn/random-sampling" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/random-sampling plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/random-sampling'] --- import kbnRandomSamplingObj from './kbn_random_sampling.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index 71f7a6297be1ad..6ef174063cebdd 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_react_hooks.mdx b/api_docs/kbn_react_hooks.mdx index 9d129916ceec28..7ea167bd57b8eb 100644 --- a/api_docs/kbn_react_hooks.mdx +++ b/api_docs/kbn_react_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-hooks title: "@kbn/react-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-hooks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-hooks'] --- import kbnReactHooksObj from './kbn_react_hooks.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_common.mdx b/api_docs/kbn_react_kibana_context_common.mdx index d43937348fb600..769ead4b28a350 100644 --- a/api_docs/kbn_react_kibana_context_common.mdx +++ b/api_docs/kbn_react_kibana_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-common title: "@kbn/react-kibana-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-common'] --- import kbnReactKibanaContextCommonObj from './kbn_react_kibana_context_common.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_render.mdx b/api_docs/kbn_react_kibana_context_render.mdx index 88d9bf660bd001..e87259ceaaf007 100644 --- a/api_docs/kbn_react_kibana_context_render.mdx +++ b/api_docs/kbn_react_kibana_context_render.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-render title: "@kbn/react-kibana-context-render" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-render plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-render'] --- import kbnReactKibanaContextRenderObj from './kbn_react_kibana_context_render.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_root.mdx b/api_docs/kbn_react_kibana_context_root.mdx index d435ea6427be67..469defcaff4d39 100644 --- a/api_docs/kbn_react_kibana_context_root.mdx +++ b/api_docs/kbn_react_kibana_context_root.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-root title: "@kbn/react-kibana-context-root" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-root plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-root'] --- import kbnReactKibanaContextRootObj from './kbn_react_kibana_context_root.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_styled.mdx b/api_docs/kbn_react_kibana_context_styled.mdx index 63a01de3117431..4525093694536a 100644 --- a/api_docs/kbn_react_kibana_context_styled.mdx +++ b/api_docs/kbn_react_kibana_context_styled.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-styled title: "@kbn/react-kibana-context-styled" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-styled plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-styled'] --- import kbnReactKibanaContextStyledObj from './kbn_react_kibana_context_styled.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_theme.mdx b/api_docs/kbn_react_kibana_context_theme.mdx index 65978f536556a9..9c7c73a5f7eb10 100644 --- a/api_docs/kbn_react_kibana_context_theme.mdx +++ b/api_docs/kbn_react_kibana_context_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-theme title: "@kbn/react-kibana-context-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-theme plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-theme'] --- import kbnReactKibanaContextThemeObj from './kbn_react_kibana_context_theme.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_mount.mdx b/api_docs/kbn_react_kibana_mount.mdx index b7631257ad2190..e10de0f6f30561 100644 --- a/api_docs/kbn_react_kibana_mount.mdx +++ b/api_docs/kbn_react_kibana_mount.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-mount title: "@kbn/react-kibana-mount" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-mount plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-mount'] --- import kbnReactKibanaMountObj from './kbn_react_kibana_mount.devdocs.json'; diff --git a/api_docs/kbn_recently_accessed.devdocs.json b/api_docs/kbn_recently_accessed.devdocs.json new file mode 100644 index 00000000000000..972588291edf76 --- /dev/null +++ b/api_docs/kbn_recently_accessed.devdocs.json @@ -0,0 +1,269 @@ +{ + "id": "@kbn/recently-accessed", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [ + { + "parentPluginId": "@kbn/recently-accessed", + "id": "def-common.RecentlyAccessedService", + "type": "Class", + "tags": [], + "label": "RecentlyAccessedService", + "description": [], + "path": "packages/kbn-recently-accessed/src/recently_accessed_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/recently-accessed", + "id": "def-common.RecentlyAccessedService.start", + "type": "Function", + "tags": [], + "label": "start", + "description": [], + "signature": [ + "({ http, key }: StartDeps) => ", + { + "pluginId": "@kbn/recently-accessed", + "scope": "common", + "docId": "kibKbnRecentlyAccessedPluginApi", + "section": "def-common.RecentlyAccessed", + "text": "RecentlyAccessed" + } + ], + "path": "packages/kbn-recently-accessed/src/recently_accessed_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/recently-accessed", + "id": "def-common.RecentlyAccessedService.start.$1", + "type": "Object", + "tags": [], + "label": "{ http, key }", + "description": [], + "signature": [ + "StartDeps" + ], + "path": "packages/kbn-recently-accessed/src/recently_accessed_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/recently-accessed", + "id": "def-common.RecentlyAccessed", + "type": "Interface", + "tags": [], + "label": "RecentlyAccessed", + "description": [ + "\n{@link RecentlyAccessed | APIs} for recently accessed history." + ], + "path": "packages/kbn-recently-accessed/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/recently-accessed", + "id": "def-common.RecentlyAccessed.add", + "type": "Function", + "tags": [], + "label": "add", + "description": [ + "\nAdds a new item to the recently accessed history.\n" + ], + "signature": [ + "(link: string, label: string, id: string) => void" + ], + "path": "packages/kbn-recently-accessed/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/recently-accessed", + "id": "def-common.RecentlyAccessed.add.$1", + "type": "string", + "tags": [], + "label": "link", + "description": [ + "a relative URL to the resource (not including the {@link HttpStart.basePath | `http.basePath`})" + ], + "signature": [ + "string" + ], + "path": "packages/kbn-recently-accessed/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/recently-accessed", + "id": "def-common.RecentlyAccessed.add.$2", + "type": "string", + "tags": [], + "label": "label", + "description": [ + "the label to display in the UI" + ], + "signature": [ + "string" + ], + "path": "packages/kbn-recently-accessed/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/recently-accessed", + "id": "def-common.RecentlyAccessed.add.$3", + "type": "string", + "tags": [], + "label": "id", + "description": [ + "a unique string used to de-duplicate the recently accessed list." + ], + "signature": [ + "string" + ], + "path": "packages/kbn-recently-accessed/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/recently-accessed", + "id": "def-common.RecentlyAccessed.get", + "type": "Function", + "tags": [], + "label": "get", + "description": [ + "\nGets an Array of the current recently accessed history.\n" + ], + "signature": [ + "() => ", + { + "pluginId": "@kbn/recently-accessed", + "scope": "common", + "docId": "kibKbnRecentlyAccessedPluginApi", + "section": "def-common.RecentlyAccessedHistoryItem", + "text": "RecentlyAccessedHistoryItem" + }, + "[]" + ], + "path": "packages/kbn-recently-accessed/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/recently-accessed", + "id": "def-common.RecentlyAccessed.get$", + "type": "Function", + "tags": [], + "label": "get$", + "description": [ + "\nGets an Observable of the array of recently accessed history.\n" + ], + "signature": [ + "() => ", + "Observable", + "<", + { + "pluginId": "@kbn/recently-accessed", + "scope": "common", + "docId": "kibKbnRecentlyAccessedPluginApi", + "section": "def-common.RecentlyAccessedHistoryItem", + "text": "RecentlyAccessedHistoryItem" + }, + "[]>" + ], + "path": "packages/kbn-recently-accessed/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/recently-accessed", + "id": "def-common.RecentlyAccessedHistoryItem", + "type": "Interface", + "tags": [], + "label": "RecentlyAccessedHistoryItem", + "description": [], + "path": "packages/kbn-recently-accessed/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/recently-accessed", + "id": "def-common.RecentlyAccessedHistoryItem.link", + "type": "string", + "tags": [], + "label": "link", + "description": [], + "path": "packages/kbn-recently-accessed/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/recently-accessed", + "id": "def-common.RecentlyAccessedHistoryItem.label", + "type": "string", + "tags": [], + "label": "label", + "description": [], + "path": "packages/kbn-recently-accessed/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/recently-accessed", + "id": "def-common.RecentlyAccessedHistoryItem.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/kbn-recently-accessed/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_recently_accessed.mdx b/api_docs/kbn_recently_accessed.mdx new file mode 100644 index 00000000000000..ecdd49ce284cb0 --- /dev/null +++ b/api_docs/kbn_recently_accessed.mdx @@ -0,0 +1,33 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnRecentlyAccessedPluginApi +slug: /kibana-dev-docs/api/kbn-recently-accessed +title: "@kbn/recently-accessed" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/recently-accessed plugin +date: 2024-07-10 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/recently-accessed'] +--- +import kbnRecentlyAccessedObj from './kbn_recently_accessed.devdocs.json'; + + + +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 14 | 0 | 7 | 0 | + +## Common + +### Classes + + +### Interfaces + + diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index f1fa3104d03fac..9e448cd5df8d95 100644 --- a/api_docs/kbn_repo_file_maps.mdx +++ b/api_docs/kbn_repo_file_maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-file-maps title: "@kbn/repo-file-maps" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-file-maps plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-file-maps'] --- import kbnRepoFileMapsObj from './kbn_repo_file_maps.devdocs.json'; diff --git a/api_docs/kbn_repo_linter.mdx b/api_docs/kbn_repo_linter.mdx index f4cdffdcac021f..63f06084fc55ac 100644 --- a/api_docs/kbn_repo_linter.mdx +++ b/api_docs/kbn_repo_linter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-linter title: "@kbn/repo-linter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-linter plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-linter'] --- import kbnRepoLinterObj from './kbn_repo_linter.devdocs.json'; diff --git a/api_docs/kbn_repo_path.mdx b/api_docs/kbn_repo_path.mdx index caa046bede4365..fcd60fbf614172 100644 --- a/api_docs/kbn_repo_path.mdx +++ b/api_docs/kbn_repo_path.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-path title: "@kbn/repo-path" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-path plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-path'] --- import kbnRepoPathObj from './kbn_repo_path.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index c0ae43523df83f..19302432908614 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_reporting_common.mdx b/api_docs/kbn_reporting_common.mdx index eb7e0c948d4b27..a7901d9ecdf417 100644 --- a/api_docs/kbn_reporting_common.mdx +++ b/api_docs/kbn_reporting_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-common title: "@kbn/reporting-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_csv_share_panel.mdx b/api_docs/kbn_reporting_csv_share_panel.mdx index d099fee886f5c1..8013b2c5852860 100644 --- a/api_docs/kbn_reporting_csv_share_panel.mdx +++ b/api_docs/kbn_reporting_csv_share_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-csv-share-panel title: "@kbn/reporting-csv-share-panel" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-csv-share-panel plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-csv-share-panel'] --- import kbnReportingCsvSharePanelObj from './kbn_reporting_csv_share_panel.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv.mdx b/api_docs/kbn_reporting_export_types_csv.mdx index ecdc0f512a6254..a7e19c8f8815ca 100644 --- a/api_docs/kbn_reporting_export_types_csv.mdx +++ b/api_docs/kbn_reporting_export_types_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv title: "@kbn/reporting-export-types-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv'] --- import kbnReportingExportTypesCsvObj from './kbn_reporting_export_types_csv.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv_common.mdx b/api_docs/kbn_reporting_export_types_csv_common.mdx index 2e185bd3e9c09a..0311edc4a85542 100644 --- a/api_docs/kbn_reporting_export_types_csv_common.mdx +++ b/api_docs/kbn_reporting_export_types_csv_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv-common title: "@kbn/reporting-export-types-csv-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv-common'] --- import kbnReportingExportTypesCsvCommonObj from './kbn_reporting_export_types_csv_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf.mdx b/api_docs/kbn_reporting_export_types_pdf.mdx index 77a9baff0a4e70..e6dce93a89500f 100644 --- a/api_docs/kbn_reporting_export_types_pdf.mdx +++ b/api_docs/kbn_reporting_export_types_pdf.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf title: "@kbn/reporting-export-types-pdf" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf'] --- import kbnReportingExportTypesPdfObj from './kbn_reporting_export_types_pdf.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf_common.mdx b/api_docs/kbn_reporting_export_types_pdf_common.mdx index f03e1164abca5a..a570271c52a7dd 100644 --- a/api_docs/kbn_reporting_export_types_pdf_common.mdx +++ b/api_docs/kbn_reporting_export_types_pdf_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf-common title: "@kbn/reporting-export-types-pdf-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf-common'] --- import kbnReportingExportTypesPdfCommonObj from './kbn_reporting_export_types_pdf_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png.mdx b/api_docs/kbn_reporting_export_types_png.mdx index d668328d20e234..48a3dd740958a7 100644 --- a/api_docs/kbn_reporting_export_types_png.mdx +++ b/api_docs/kbn_reporting_export_types_png.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png title: "@kbn/reporting-export-types-png" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png'] --- import kbnReportingExportTypesPngObj from './kbn_reporting_export_types_png.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png_common.mdx b/api_docs/kbn_reporting_export_types_png_common.mdx index 8ce4258543b46e..d886a858f369e1 100644 --- a/api_docs/kbn_reporting_export_types_png_common.mdx +++ b/api_docs/kbn_reporting_export_types_png_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png-common title: "@kbn/reporting-export-types-png-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png-common'] --- import kbnReportingExportTypesPngCommonObj from './kbn_reporting_export_types_png_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_mocks_server.mdx b/api_docs/kbn_reporting_mocks_server.mdx index 8712180c101d52..cd5bd0462b4038 100644 --- a/api_docs/kbn_reporting_mocks_server.mdx +++ b/api_docs/kbn_reporting_mocks_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-mocks-server title: "@kbn/reporting-mocks-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-mocks-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-mocks-server'] --- import kbnReportingMocksServerObj from './kbn_reporting_mocks_server.devdocs.json'; diff --git a/api_docs/kbn_reporting_public.mdx b/api_docs/kbn_reporting_public.mdx index f52846975e6069..9365b7b86b4f7b 100644 --- a/api_docs/kbn_reporting_public.mdx +++ b/api_docs/kbn_reporting_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-public title: "@kbn/reporting-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-public plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-public'] --- import kbnReportingPublicObj from './kbn_reporting_public.devdocs.json'; diff --git a/api_docs/kbn_reporting_server.mdx b/api_docs/kbn_reporting_server.mdx index 6f7f12a59850ff..d52b51314d80e6 100644 --- a/api_docs/kbn_reporting_server.mdx +++ b/api_docs/kbn_reporting_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-server title: "@kbn/reporting-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-server'] --- import kbnReportingServerObj from './kbn_reporting_server.devdocs.json'; diff --git a/api_docs/kbn_resizable_layout.mdx b/api_docs/kbn_resizable_layout.mdx index be41eba0c6a6c7..86aa9a218ab137 100644 --- a/api_docs/kbn_resizable_layout.mdx +++ b/api_docs/kbn_resizable_layout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-resizable-layout title: "@kbn/resizable-layout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/resizable-layout plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/resizable-layout'] --- import kbnResizableLayoutObj from './kbn_resizable_layout.devdocs.json'; diff --git a/api_docs/kbn_response_ops_feature_flag_service.mdx b/api_docs/kbn_response_ops_feature_flag_service.mdx index b2289667ccc4ef..88a57b7b4635d1 100644 --- a/api_docs/kbn_response_ops_feature_flag_service.mdx +++ b/api_docs/kbn_response_ops_feature_flag_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-response-ops-feature-flag-service title: "@kbn/response-ops-feature-flag-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/response-ops-feature-flag-service plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/response-ops-feature-flag-service'] --- import kbnResponseOpsFeatureFlagServiceObj from './kbn_response_ops_feature_flag_service.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index 3c983f8067808f..f8f10883aa8061 100644 --- a/api_docs/kbn_rison.mdx +++ b/api_docs/kbn_rison.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison title: "@kbn/rison" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rison plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rollup.mdx b/api_docs/kbn_rollup.mdx index 99a5af6503be76..2a815b0d45a475 100644 --- a/api_docs/kbn_rollup.mdx +++ b/api_docs/kbn_rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rollup title: "@kbn/rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rollup plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rollup'] --- import kbnRollupObj from './kbn_rollup.devdocs.json'; diff --git a/api_docs/kbn_router_to_openapispec.mdx b/api_docs/kbn_router_to_openapispec.mdx index 4962e236dd4705..68054b59c5003d 100644 --- a/api_docs/kbn_router_to_openapispec.mdx +++ b/api_docs/kbn_router_to_openapispec.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-to-openapispec title: "@kbn/router-to-openapispec" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-to-openapispec plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-to-openapispec'] --- import kbnRouterToOpenapispecObj from './kbn_router_to_openapispec.devdocs.json'; diff --git a/api_docs/kbn_router_utils.mdx b/api_docs/kbn_router_utils.mdx index 9361a07a5911fb..418bb52e19f8cc 100644 --- a/api_docs/kbn_router_utils.mdx +++ b/api_docs/kbn_router_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-utils title: "@kbn/router-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-utils'] --- import kbnRouterUtilsObj from './kbn_router_utils.devdocs.json'; diff --git a/api_docs/kbn_rrule.mdx b/api_docs/kbn_rrule.mdx index 54d0ccd633422c..11286b6e453a15 100644 --- a/api_docs/kbn_rrule.mdx +++ b/api_docs/kbn_rrule.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rrule title: "@kbn/rrule" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rrule plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rrule'] --- import kbnRruleObj from './kbn_rrule.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 77115422dbec47..21340cf60f9b9a 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index d241357c284f90..96958af47e9eba 100644 --- a/api_docs/kbn_saved_objects_settings.mdx +++ b/api_docs/kbn_saved_objects_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-saved-objects-settings title: "@kbn/saved-objects-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/saved-objects-settings plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-objects-settings'] --- import kbnSavedObjectsSettingsObj from './kbn_saved_objects_settings.devdocs.json'; diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index de2ea6e8885890..2e038b0b4f076b 100644 --- a/api_docs/kbn_search_api_panels.mdx +++ b/api_docs/kbn_search_api_panels.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-api-panels title: "@kbn/search-api-panels" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-api-panels plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-panels'] --- import kbnSearchApiPanelsObj from './kbn_search_api_panels.devdocs.json'; diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index e2e90e6248dead..aeef4d14be70bc 100644 --- a/api_docs/kbn_search_connectors.mdx +++ b/api_docs/kbn_search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-connectors title: "@kbn/search-connectors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-connectors plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-connectors'] --- import kbnSearchConnectorsObj from './kbn_search_connectors.devdocs.json'; diff --git a/api_docs/kbn_search_errors.mdx b/api_docs/kbn_search_errors.mdx index 5009b6f1dd9229..ad3f912e30ba83 100644 --- a/api_docs/kbn_search_errors.mdx +++ b/api_docs/kbn_search_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-errors title: "@kbn/search-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-errors plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-errors'] --- import kbnSearchErrorsObj from './kbn_search_errors.devdocs.json'; diff --git a/api_docs/kbn_search_index_documents.mdx b/api_docs/kbn_search_index_documents.mdx index 7a39ecf13f5804..4b91e9d44176aa 100644 --- a/api_docs/kbn_search_index_documents.mdx +++ b/api_docs/kbn_search_index_documents.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-index-documents title: "@kbn/search-index-documents" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-index-documents plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-index-documents'] --- import kbnSearchIndexDocumentsObj from './kbn_search_index_documents.devdocs.json'; diff --git a/api_docs/kbn_search_response_warnings.mdx b/api_docs/kbn_search_response_warnings.mdx index cd01e2a84fc1df..81fd7b1d386ea1 100644 --- a/api_docs/kbn_search_response_warnings.mdx +++ b/api_docs/kbn_search_response_warnings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-response-warnings title: "@kbn/search-response-warnings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-response-warnings plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-response-warnings'] --- import kbnSearchResponseWarningsObj from './kbn_search_response_warnings.devdocs.json'; diff --git a/api_docs/kbn_search_types.mdx b/api_docs/kbn_search_types.mdx index 51cb27c0dced73..26ff8eb125c384 100644 --- a/api_docs/kbn_search_types.mdx +++ b/api_docs/kbn_search_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-types title: "@kbn/search-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-types plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-types'] --- import kbnSearchTypesObj from './kbn_search_types.devdocs.json'; diff --git a/api_docs/kbn_security_api_key_management.devdocs.json b/api_docs/kbn_security_api_key_management.devdocs.json index 5fd86dcf3f8c8c..661a3acf9b5c9c 100644 --- a/api_docs/kbn_security_api_key_management.devdocs.json +++ b/api_docs/kbn_security_api_key_management.devdocs.json @@ -186,10 +186,10 @@ "signature": [ "(apiKey: ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CreateAPIKeyParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateAPIKeyParams", "text": "CreateAPIKeyParams" }, ") => Promise<", @@ -209,10 +209,10 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CreateAPIKeyParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateAPIKeyParams", "text": "CreateAPIKeyParams" } ], @@ -234,10 +234,10 @@ "signature": [ "(apiKey: ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.UpdateAPIKeyParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateAPIKeyParams", "text": "UpdateAPIKeyParams" }, ") => Promise<", @@ -257,10 +257,10 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.UpdateAPIKeyParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateAPIKeyParams", "text": "UpdateAPIKeyParams" } ], @@ -532,10 +532,10 @@ }, ") => ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CreateAPIKeyParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateAPIKeyParams", "text": "CreateAPIKeyParams" } ], @@ -586,10 +586,10 @@ }, ") => ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.UpdateAPIKeyParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateAPIKeyParams", "text": "UpdateAPIKeyParams" } ], @@ -976,7 +976,7 @@ "label": "sort", "description": [], "signature": [ - "{ field: \"id\" | \"type\" | \"name\" | \"username\" | \"profile_uid\" | \"metadata\" | \"expired\" | \"creation\" | \"expiration\" | \"role_descriptors\" | \"realm\" | \"invalidated\" | \"realm_type\" | \"limited_by\" | \"_sort\"; direction: \"asc\" | \"desc\"; }" + "{ field: \"id\" | \"type\" | \"name\" | \"username\" | \"profile_uid\" | \"metadata\" | \"expired\" | \"creation\" | \"realm\" | \"role_descriptors\" | \"expiration\" | \"invalidated\" | \"realm_type\" | \"limited_by\" | \"_sort\"; direction: \"asc\" | \"desc\"; }" ], "path": "x-pack/packages/security/api_key_management/src/components/api_keys_api_client.ts", "deprecated": false, @@ -1131,9 +1131,31 @@ "label": "CreateAPIKeyParams", "description": [], "signature": [ - "Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { name: string; role_descriptors: Record>; }> | Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { name: string; kibana_role_descriptors: Record | undefined; } & { spaces: string[] | \"*\"[]; }>[]; elasticsearch: Readonly<{ cluster?: string[] | undefined; indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; }>[] | undefined; remote_cluster?: Readonly<{} & { privileges: string[]; clusters: string[]; }>[] | undefined; remote_indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; clusters: string[]; }>[] | undefined; run_as?: string[] | undefined; } & {}>; }>>; }> | Readonly<{ metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { type: \"cross_cluster\"; name: string; access: Readonly<{ search?: Readonly<{ query?: any; field_security?: any; allow_restricted_indices?: boolean | undefined; } & { names: string[]; }>[] | undefined; replication?: Readonly<{} & { names: string[]; }>[] | undefined; } & {}>; }>" + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyParams", + "text": "CreateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams", + "text": "CreateRestAPIKeyWithKibanaPrivilegesParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateCrossClusterAPIKeyParams", + "text": "CreateCrossClusterAPIKeyParams" + } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -1150,7 +1172,7 @@ "signature": [ "SecurityCreateApiKeyResponse" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -1163,7 +1185,7 @@ "label": "QueryApiKeySortOptions", "description": [], "signature": [ - "{ field: \"id\" | \"type\" | \"name\" | \"username\" | \"profile_uid\" | \"metadata\" | \"expired\" | \"creation\" | \"expiration\" | \"role_descriptors\" | \"realm\" | \"invalidated\" | \"realm_type\" | \"limited_by\" | \"_sort\"; direction: \"asc\" | \"desc\"; }" + "{ field: \"id\" | \"type\" | \"name\" | \"username\" | \"profile_uid\" | \"metadata\" | \"expired\" | \"creation\" | \"realm\" | \"role_descriptors\" | \"expiration\" | \"invalidated\" | \"realm_type\" | \"limited_by\" | \"_sort\"; direction: \"asc\" | \"desc\"; }" ], "path": "x-pack/packages/security/api_key_management/src/components/api_keys_api_client.ts", "deprecated": false, @@ -1180,9 +1202,31 @@ "\nRequest body of Kibana Update API key endpoint." ], "signature": [ - "Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { id: string; role_descriptors: Record>; }> | Readonly<{ metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { id: string; type: \"cross_cluster\"; access: Readonly<{ search?: Readonly<{ query?: any; field_security?: any; allow_restricted_indices?: boolean | undefined; } & { names: string[]; }>[] | undefined; replication?: Readonly<{} & { names: string[]; }>[] | undefined; } & {}>; }> | Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { id: string; kibana_role_descriptors: Record | undefined; } & { spaces: string[] | \"*\"[]; }>[]; elasticsearch: Readonly<{ cluster?: string[] | undefined; indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; }>[] | undefined; remote_cluster?: Readonly<{} & { privileges: string[]; clusters: string[]; }>[] | undefined; remote_indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; clusters: string[]; }>[] | undefined; run_as?: string[] | undefined; } & {}>; }>>; }>" + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateRestAPIKeyParams", + "text": "UpdateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateCrossClusterAPIKeyParams", + "text": "UpdateCrossClusterAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateRestAPIKeyWithKibanaPrivilegesParams", + "text": "UpdateRestAPIKeyWithKibanaPrivilegesParams" + } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -1199,7 +1243,7 @@ "signature": [ "SecurityUpdateApiKeyResponse" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/kbn_security_api_key_management.mdx b/api_docs/kbn_security_api_key_management.mdx index 9c95241ecaa83e..398771a54e6eb7 100644 --- a/api_docs/kbn_security_api_key_management.mdx +++ b/api_docs/kbn_security_api_key_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-api-key-management title: "@kbn/security-api-key-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-api-key-management plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-api-key-management'] --- import kbnSecurityApiKeyManagementObj from './kbn_security_api_key_management.devdocs.json'; diff --git a/api_docs/kbn_security_form_components.mdx b/api_docs/kbn_security_form_components.mdx index 27f10f009c4d4f..8339f1657ea663 100644 --- a/api_docs/kbn_security_form_components.mdx +++ b/api_docs/kbn_security_form_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-form-components title: "@kbn/security-form-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-form-components plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-form-components'] --- import kbnSecurityFormComponentsObj from './kbn_security_form_components.devdocs.json'; diff --git a/api_docs/kbn_security_hardening.mdx b/api_docs/kbn_security_hardening.mdx index bf16364236051a..67ea2e26e27322 100644 --- a/api_docs/kbn_security_hardening.mdx +++ b/api_docs/kbn_security_hardening.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-hardening title: "@kbn/security-hardening" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-hardening plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-hardening'] --- import kbnSecurityHardeningObj from './kbn_security_hardening.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_common.mdx b/api_docs/kbn_security_plugin_types_common.mdx index ace424adb9be5d..cbf7d1e0325c62 100644 --- a/api_docs/kbn_security_plugin_types_common.mdx +++ b/api_docs/kbn_security_plugin_types_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-common title: "@kbn/security-plugin-types-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-common plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-common'] --- import kbnSecurityPluginTypesCommonObj from './kbn_security_plugin_types_common.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_public.mdx b/api_docs/kbn_security_plugin_types_public.mdx index 654c86d26238bc..2b9bf0f8a94c88 100644 --- a/api_docs/kbn_security_plugin_types_public.mdx +++ b/api_docs/kbn_security_plugin_types_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-public title: "@kbn/security-plugin-types-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-public plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-public'] --- import kbnSecurityPluginTypesPublicObj from './kbn_security_plugin_types_public.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_server.devdocs.json b/api_docs/kbn_security_plugin_types_server.devdocs.json index dbd001d28def13..7650af308a8fd5 100644 --- a/api_docs/kbn_security_plugin_types_server.devdocs.json +++ b/api_docs/kbn_security_plugin_types_server.devdocs.json @@ -62,15 +62,15 @@ "label": "getRestApiKeyWithKibanaPrivilegesSchema", "description": [], "signature": [ - "(getBasePrivilegeNames: () => { global: string[]; space: string[]; }) => ExtendedObjectType<{ type: ", + "(getBasePrivilegeNames: () => { global: string[]; space: string[]; }) => ", { "pluginId": "@kbn/config-schema", "scope": "common", "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.Type", - "text": "Type" + "section": "def-common.ObjectType", + "text": "ObjectType" }, - "<\"rest\" | undefined>; name: ", + "<{ type: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -78,7 +78,7 @@ "section": "def-common.Type", "text": "Type" }, - "; expiration: ", + "<\"rest\" | undefined>; name: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -86,7 +86,7 @@ "section": "def-common.Type", "text": "Type" }, - "; role_descriptors: ", + "; expiration: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -94,7 +94,7 @@ "section": "def-common.Type", "text": "Type" }, - ">>; metadata: ", + "; metadata: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -102,7 +102,7 @@ "section": "def-common.Type", "text": "Type" }, - " | undefined>; }, { role_descriptors: null; kibana_role_descriptors: ", + " | undefined>; kibana_role_descriptors: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -143,23 +143,15 @@ "label": "getUpdateRestApiKeyWithKibanaPrivilegesSchema", "description": [], "signature": [ - "(getBasePrivilegeNames: () => { global: string[]; space: string[]; }) => ExtendedObjectType<{ type: ", - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.Type", - "text": "Type" - }, - "<\"rest\" | undefined>; name: ", + "(getBasePrivilegeNames: () => { global: string[]; space: string[]; }) => ", { "pluginId": "@kbn/config-schema", "scope": "common", "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.Type", - "text": "Type" + "section": "def-common.ObjectType", + "text": "ObjectType" }, - "; expiration: ", + "<{ type: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -167,7 +159,7 @@ "section": "def-common.Type", "text": "Type" }, - "; role_descriptors: ", + "<\"rest\" | undefined>; expiration: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -175,7 +167,7 @@ "section": "def-common.Type", "text": "Type" }, - ">>; metadata: ", + "; metadata: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -183,7 +175,7 @@ "section": "def-common.Type", "text": "Type" }, - " | undefined>; }, { role_descriptors: null; name: null; id: ", + " | undefined>; id: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -223,6 +215,39 @@ ], "returnComment": [], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.isCreateRestAPIKeyParams", + "type": "Function", + "tags": [], + "label": "isCreateRestAPIKeyParams", + "description": [], + "signature": [ + "(params: any) => boolean" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.isCreateRestAPIKeyParams.$1", + "type": "Any", + "tags": [], + "label": "params", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false } ], "interfaces": [ @@ -536,8 +561,10 @@ "type": "Interface", "tags": [], "label": "APIKeys", - "description": [], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "description": [ + "\nInterface for managing API keys in Elasticsearch, including creation,\nvalidation, and invalidation of API keys,\nas well as checking the status of API key features." + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -553,7 +580,7 @@ "signature": [ "() => Promise" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -571,7 +598,7 @@ "signature": [ "() => Promise" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -597,17 +624,17 @@ }, ", createParams: ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CreateAPIKeyParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateAPIKeyParams", "text": "CreateAPIKeyParams" }, ") => Promise<", "SecurityCreateApiKeyResponse", " | null>" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -630,7 +657,7 @@ }, "" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -646,14 +673,98 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CreateAPIKeyParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateAPIKeyParams", "text": "CreateAPIKeyParams" } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.update", + "type": "Function", + "tags": [], + "label": "update", + "description": [ + "\nAttempts update an API key with the provided 'role_descriptors' and 'metadata'\n\nReturns `updated`, `true` if the update was successful, `false` if there was nothing to update\n\nUser needs `manage_api_key` privilege to update REST API keys and `manage_security` for cross-cluster API keys.\n" + ], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ", updateParams: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateAPIKeyParams", + "text": "UpdateAPIKeyParams" + }, + ") => Promise<", + "SecurityUpdateApiKeyResponse", + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.update.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [ + "Request instance." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.update.$2", + "type": "CompoundType", + "tags": [], + "label": "updateParams", + "description": [ + "The params to edit an API key" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateAPIKeyParams", + "text": "UpdateAPIKeyParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -679,17 +790,33 @@ "section": "def-common.KibanaRequest", "text": "KibanaRequest" }, - ", createParams: Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { name: string; role_descriptors: Record>; }> | Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { name: string; kibana_role_descriptors: Record | undefined; } & { spaces: string[] | \"*\"[]; }>[]; elasticsearch: Readonly<{ cluster?: string[] | undefined; indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; }>[] | undefined; remote_cluster?: Readonly<{} & { privileges: string[]; clusters: string[]; }>[] | undefined; remote_indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; clusters: string[]; }>[] | undefined; run_as?: string[] | undefined; } & {}>; }>>; }>) => Promise<", + ", createParams: ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.GrantAPIKeyResult", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyParams", + "text": "CreateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams", + "text": "CreateRestAPIKeyWithKibanaPrivilegesParams" + }, + ") => Promise<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.GrantAPIKeyResult", "text": "GrantAPIKeyResult" }, " | null>" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -712,7 +839,7 @@ }, "" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -727,9 +854,23 @@ "Create operation parameters." ], "signature": [ - "Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { name: string; role_descriptors: Record>; }> | Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { name: string; kibana_role_descriptors: Record | undefined; } & { spaces: string[] | \"*\"[]; }>[]; elasticsearch: Readonly<{ cluster?: string[] | undefined; indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; }>[] | undefined; remote_cluster?: Readonly<{} & { privileges: string[]; clusters: string[]; }>[] | undefined; remote_indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; clusters: string[]; }>[] | undefined; run_as?: string[] | undefined; } & {}>; }>>; }>" + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyParams", + "text": "CreateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams", + "text": "CreateRestAPIKeyWithKibanaPrivilegesParams" + } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -749,15 +890,15 @@ "signature": [ "(apiKeyPrams: ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.ValidateAPIKeyParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.ValidateAPIKeyParams", "text": "ValidateAPIKeyParams" }, ") => Promise" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -772,14 +913,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.ValidateAPIKeyParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.ValidateAPIKeyParams", "text": "ValidateAPIKeyParams" } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -807,23 +948,23 @@ }, ", params: ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.InvalidateAPIKeysParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", "text": "InvalidateAPIKeysParams" }, ") => Promise<", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.InvalidateAPIKeyResult", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeyResult", "text": "InvalidateAPIKeyResult" }, " | null>" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -846,7 +987,7 @@ }, "" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -862,14 +1003,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.InvalidateAPIKeysParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", "text": "InvalidateAPIKeysParams" } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -889,23 +1030,23 @@ "signature": [ "(params: ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.InvalidateAPIKeysParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", "text": "InvalidateAPIKeysParams" }, ") => Promise<", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.InvalidateAPIKeyResult", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeyResult", "text": "InvalidateAPIKeyResult" }, " | null>" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -920,14 +1061,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.InvalidateAPIKeysParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", "text": "InvalidateAPIKeysParams" } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -940,45 +1081,569 @@ }, { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.AppActions", + "id": "def-server.APIKeys", "type": "Interface", "tags": [], - "label": "AppActions", - "description": [], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/actions/app.ts", + "label": "APIKeys", + "description": [ + "\nInterface for managing API keys in Elasticsearch, including creation,\nvalidation, and invalidation of API keys,\nas well as checking the status of API key features." + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.AppActions.get", + "id": "def-server.APIKeys.areAPIKeysEnabled", "type": "Function", "tags": [], - "label": "get", - "description": [], + "label": "areAPIKeysEnabled", + "description": [ + "\nDetermines if API Keys are enabled in Elasticsearch." + ], "signature": [ - "(operation: string) => string" + "() => Promise" ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/actions/app.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.AppActions.get.$1", - "type": "string", - "tags": [], - "label": "operation", - "description": [], - "signature": [ - "string" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/actions/app.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.areCrossClusterAPIKeysEnabled", + "type": "Function", + "tags": [], + "label": "areCrossClusterAPIKeysEnabled", + "description": [ + "\nDetermines if Cross-Cluster API Keys are enabled in Elasticsearch." + ], + "signature": [ + "() => Promise" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [ + "\nTries to create an API key for the current user.\n\nReturns newly created API key or `null` if API keys are disabled.\n\nUser needs `manage_api_key` privilege to create REST API keys and `manage_security` for Cross-Cluster API keys.\n" + ], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ", createParams: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateAPIKeyParams", + "text": "CreateAPIKeyParams" + }, + ") => Promise<", + "SecurityCreateApiKeyResponse", + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.create.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [ + "Request instance." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.create.$2", + "type": "CompoundType", + "tags": [], + "label": "createParams", + "description": [ + "The params to create an API key" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateAPIKeyParams", + "text": "CreateAPIKeyParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.update", + "type": "Function", + "tags": [], + "label": "update", + "description": [ + "\nAttempts update an API key with the provided 'role_descriptors' and 'metadata'\n\nReturns `updated`, `true` if the update was successful, `false` if there was nothing to update\n\nUser needs `manage_api_key` privilege to update REST API keys and `manage_security` for cross-cluster API keys.\n" + ], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ", updateParams: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateAPIKeyParams", + "text": "UpdateAPIKeyParams" + }, + ") => Promise<", + "SecurityUpdateApiKeyResponse", + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.update.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [ + "Request instance." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.update.$2", + "type": "CompoundType", + "tags": [], + "label": "updateParams", + "description": [ + "The params to edit an API key" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateAPIKeyParams", + "text": "UpdateAPIKeyParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.grantAsInternalUser", + "type": "Function", + "tags": [], + "label": "grantAsInternalUser", + "description": [ + "\nTries to grant an API key for the current user." + ], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ", createParams: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyParams", + "text": "CreateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams", + "text": "CreateRestAPIKeyWithKibanaPrivilegesParams" + }, + ") => Promise<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.GrantAPIKeyResult", + "text": "GrantAPIKeyResult" + }, + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.grantAsInternalUser.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [ + "Request instance." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.grantAsInternalUser.$2", + "type": "CompoundType", + "tags": [], + "label": "createParams", + "description": [ + "Create operation parameters." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyParams", + "text": "CreateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams", + "text": "CreateRestAPIKeyWithKibanaPrivilegesParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.validate", + "type": "Function", + "tags": [], + "label": "validate", + "description": [ + "\nTries to validate an API key." + ], + "signature": [ + "(apiKeyPrams: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.ValidateAPIKeyParams", + "text": "ValidateAPIKeyParams" + }, + ") => Promise" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.validate.$1", + "type": "Object", + "tags": [], + "label": "apiKeyPrams", + "description": [ + "ValidateAPIKeyParams." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.ValidateAPIKeyParams", + "text": "ValidateAPIKeyParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.invalidate", + "type": "Function", + "tags": [], + "label": "invalidate", + "description": [ + "\nTries to invalidate an API keys." + ], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ", params: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", + "text": "InvalidateAPIKeysParams" + }, + ") => Promise<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeyResult", + "text": "InvalidateAPIKeyResult" + }, + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.invalidate.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [ + "Request instance." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.invalidate.$2", + "type": "Object", + "tags": [], + "label": "params", + "description": [ + "The params to invalidate an API keys." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", + "text": "InvalidateAPIKeysParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.invalidateAsInternalUser", + "type": "Function", + "tags": [], + "label": "invalidateAsInternalUser", + "description": [ + "\nTries to invalidate the API keys by using the internal user." + ], + "signature": [ + "(params: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", + "text": "InvalidateAPIKeysParams" + }, + ") => Promise<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeyResult", + "text": "InvalidateAPIKeyResult" + }, + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.APIKeys.invalidateAsInternalUser.$1", + "type": "Object", + "tags": [], + "label": "params", + "description": [ + "The params to invalidate the API keys." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", + "text": "InvalidateAPIKeysParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.AppActions", + "type": "Interface", + "tags": [], + "label": "AppActions", + "description": [], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/actions/app.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.AppActions.get", + "type": "Function", + "tags": [], + "label": "get", + "description": [], + "signature": [ + "(operation: string) => string" + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/actions/app.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.AppActions.get.$1", + "type": "string", + "tags": [], + "label": "operation", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/actions/app.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], "returnComment": [] } ], @@ -1550,10 +2215,10 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.APIKeys", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.APIKeys", "text": "APIKeys" } ], @@ -2169,35 +2834,257 @@ }, { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckPrivileges.globally", + "id": "def-server.CheckPrivileges.globally", + "type": "Function", + "tags": [], + "label": "globally", + "description": [], + "signature": [ + "(privileges: ", + { + "pluginId": "@kbn/security-plugin-types-server", + "scope": "server", + "docId": "kibKbnSecurityPluginTypesServerPluginApi", + "section": "def-server.CheckPrivilegesPayload", + "text": "CheckPrivilegesPayload" + }, + ", options?: ", + { + "pluginId": "@kbn/security-plugin-types-server", + "scope": "server", + "docId": "kibKbnSecurityPluginTypesServerPluginApi", + "section": "def-server.CheckPrivilegesOptions", + "text": "CheckPrivilegesOptions" + }, + " | undefined) => Promise<", + { + "pluginId": "@kbn/security-plugin-types-server", + "scope": "server", + "docId": "kibKbnSecurityPluginTypesServerPluginApi", + "section": "def-server.CheckPrivilegesResponse", + "text": "CheckPrivilegesResponse" + }, + ">" + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckPrivileges.globally.$1", + "type": "Object", + "tags": [], + "label": "privileges", + "description": [], + "signature": [ + { + "pluginId": "@kbn/security-plugin-types-server", + "scope": "server", + "docId": "kibKbnSecurityPluginTypesServerPluginApi", + "section": "def-server.CheckPrivilegesPayload", + "text": "CheckPrivilegesPayload" + } + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckPrivileges.globally.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/security-plugin-types-server", + "scope": "server", + "docId": "kibKbnSecurityPluginTypesServerPluginApi", + "section": "def-server.CheckPrivilegesOptions", + "text": "CheckPrivilegesOptions" + }, + " | undefined" + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckPrivilegesOptions", + "type": "Interface", + "tags": [], + "label": "CheckPrivilegesOptions", + "description": [ + "\nOptions to influce the privilege checks." + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckPrivilegesOptions.requireLoginAction", + "type": "CompoundType", + "tags": [], + "label": "requireLoginAction", + "description": [ + "\nWhether or not the `login` action should be required (default: true).\nSetting this to false is not advised except for special circumstances, when you do not require\nthe request to belong to a user capable of logging into Kibana." + ], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckPrivilegesPayload", + "type": "Interface", + "tags": [], + "label": "CheckPrivilegesPayload", + "description": [ + "\nPrivileges that can be checked for the Kibana users." + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckPrivilegesPayload.kibana", + "type": "CompoundType", + "tags": [], + "label": "kibana", + "description": [ + "\nA list of the Kibana specific privileges (usually generated with `security.authz.actions.*.get(...)`)." + ], + "signature": [ + "string | string[] | undefined" + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckPrivilegesPayload.elasticsearch", + "type": "Object", + "tags": [], + "label": "elasticsearch", + "description": [ + "\nA set of the Elasticsearch cluster and index privileges." + ], + "signature": [ + "{ cluster: string[]; index: Record; } | undefined" + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckPrivilegesResponse", + "type": "Interface", + "tags": [], + "label": "CheckPrivilegesResponse", + "description": [], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckPrivilegesResponse.hasAllRequested", + "type": "boolean", + "tags": [], + "label": "hasAllRequested", + "description": [], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckPrivilegesResponse.username", + "type": "string", + "tags": [], + "label": "username", + "description": [], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckPrivilegesResponse.privileges", + "type": "Object", + "tags": [], + "label": "privileges", + "description": [], + "signature": [ + "{ kibana: { resource?: string | undefined; privilege: string; authorized: boolean; }[]; elasticsearch: { cluster: { privilege: string; authorized: boolean; }[]; index: { [indexName: string]: { privilege: string; authorized: boolean; }[]; }; }; }" + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckUserProfilesPrivileges", + "type": "Interface", + "tags": [], + "label": "CheckUserProfilesPrivileges", + "description": [ + "\nAn interface to check users profiles privileges in a specific context (only a single-space context is supported at\nthe moment)." + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckUserProfilesPrivileges.atSpace", "type": "Function", "tags": [], - "label": "globally", + "label": "atSpace", "description": [], "signature": [ - "(privileges: ", - { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CheckPrivilegesPayload", - "text": "CheckPrivilegesPayload" - }, - ", options?: ", + "(spaceId: string, privileges: ", { "pluginId": "@kbn/security-plugin-types-server", "scope": "server", "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CheckPrivilegesOptions", - "text": "CheckPrivilegesOptions" + "section": "def-server.CheckUserProfilesPrivilegesPayload", + "text": "CheckUserProfilesPrivilegesPayload" }, - " | undefined) => Promise<", + ") => Promise<", { "pluginId": "@kbn/security-plugin-types-server", "scope": "server", "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CheckPrivilegesResponse", - "text": "CheckPrivilegesResponse" + "section": "def-server.CheckUserProfilesPrivilegesResponse", + "text": "CheckUserProfilesPrivilegesResponse" }, ">" ], @@ -2207,19 +3094,13 @@ "children": [ { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckPrivileges.globally.$1", - "type": "Object", + "id": "def-server.CheckUserProfilesPrivileges.atSpace.$1", + "type": "string", "tags": [], - "label": "privileges", + "label": "spaceId", "description": [], "signature": [ - { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CheckPrivilegesPayload", - "text": "CheckPrivilegesPayload" - } + "string" ], "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", "deprecated": false, @@ -2228,25 +3109,24 @@ }, { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckPrivileges.globally.$2", + "id": "def-server.CheckUserProfilesPrivileges.atSpace.$2", "type": "Object", "tags": [], - "label": "options", + "label": "privileges", "description": [], "signature": [ { "pluginId": "@kbn/security-plugin-types-server", "scope": "server", "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CheckPrivilegesOptions", - "text": "CheckPrivilegesOptions" - }, - " | undefined" + "section": "def-server.CheckUserProfilesPrivilegesPayload", + "text": "CheckUserProfilesPrivilegesPayload" + } ], "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", "deprecated": false, "trackAdoption": false, - "isRequired": false + "isRequired": true } ], "returnComment": [] @@ -2256,12 +3136,12 @@ }, { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckPrivilegesOptions", + "id": "def-server.CheckUserProfilesPrivilegesPayload", "type": "Interface", "tags": [], - "label": "CheckPrivilegesOptions", + "label": "CheckUserProfilesPrivilegesPayload", "description": [ - "\nOptions to influce the privilege checks." + "\nPrivileges that can be checked for the users profiles (only Kibana specific privileges are supported at the moment)." ], "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", "deprecated": false, @@ -2269,65 +3149,227 @@ "children": [ { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckPrivilegesOptions.requireLoginAction", - "type": "CompoundType", + "id": "def-server.CheckUserProfilesPrivilegesPayload.kibana", + "type": "Array", "tags": [], - "label": "requireLoginAction", + "label": "kibana", "description": [ - "\nWhether or not the `login` action should be required (default: true).\nSetting this to false is not advised except for special circumstances, when you do not require\nthe request to belong to a user capable of logging into Kibana." + "\nA list of the Kibana specific privileges (usually generated with `security.authz.actions.*.get(...)`)." ], "signature": [ - "boolean | undefined" + "string[]" + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckUserProfilesPrivilegesResponse", + "type": "Interface", + "tags": [], + "label": "CheckUserProfilesPrivilegesResponse", + "description": [ + "\nResponse of the check privileges operation for the users profiles." + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckUserProfilesPrivilegesResponse.hasPrivilegeUids", + "type": "Array", + "tags": [], + "label": "hasPrivilegeUids", + "description": [ + "\nThe subset of the requested profile IDs of the users that have all the requested privileges." + ], + "signature": [ + "string[]" + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CheckUserProfilesPrivilegesResponse.errors", + "type": "Object", + "tags": [], + "label": "errors", + "description": [ + "\nAn errors object that may be returned from ES that contains a `count` of UIDs that have errors in the `details` property.\n\nEach entry in `details` will contain an error `type`, e.g 'resource_not_found_exception', and a `reason` message, e.g. 'profile document not found'" + ], + "signature": [ + "{ count: number; details: Record; } | undefined" ], "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckPrivilegesPayload", - "type": "Interface", - "tags": [], - "label": "CheckPrivilegesPayload", - "description": [ - "\nPrivileges that can be checked for the Kibana users." - ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CreateCrossClusterAPIKeyParams", + "type": "Interface", + "tags": [], + "label": "CreateCrossClusterAPIKeyParams", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CreateCrossClusterAPIKeyParams.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"cross_cluster\"" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CreateCrossClusterAPIKeyParams.expiration", + "type": "string", + "tags": [], + "label": "expiration", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CreateCrossClusterAPIKeyParams.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CreateCrossClusterAPIKeyParams.metadata", + "type": "Object", + "tags": [], + "label": "metadata", + "description": [], + "signature": [ + "{ [key: string]: any; } | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CreateCrossClusterAPIKeyParams.access", + "type": "Object", + "tags": [], + "label": "access", + "description": [], + "signature": [ + "{ search?: { names: string[]; query?: unknown; field_security?: unknown; allow_restricted_indices?: boolean | undefined; }[] | undefined; replication?: { names: string[]; }[] | undefined; }" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CreateRestAPIKeyParams", + "type": "Interface", + "tags": [], + "label": "CreateRestAPIKeyParams", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CreateRestAPIKeyParams.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"rest\" | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CreateRestAPIKeyParams.expiration", + "type": "string", + "tags": [], + "label": "expiration", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CreateRestAPIKeyParams.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckPrivilegesPayload.kibana", - "type": "CompoundType", + "id": "def-server.CreateRestAPIKeyParams.role_descriptors", + "type": "Object", "tags": [], - "label": "kibana", - "description": [ - "\nA list of the Kibana specific privileges (usually generated with `security.authz.actions.*.get(...)`)." - ], + "label": "role_descriptors", + "description": [], "signature": [ - "string | string[] | undefined" + "{ [x: string]: { [key: string]: any; }; }" ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckPrivilegesPayload.elasticsearch", + "id": "def-server.CreateRestAPIKeyParams.metadata", "type": "Object", "tags": [], - "label": "elasticsearch", - "description": [ - "\nA set of the Elasticsearch cluster and index privileges." - ], + "label": "metadata", + "description": [], "signature": [ - "{ cluster: string[]; index: Record; } | undefined" + "{ [key: string]: any; } | undefined" ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -2336,213 +3378,181 @@ }, { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckPrivilegesResponse", + "id": "def-server.CreateRestAPIKeyWithKibanaPrivilegesParams", "type": "Interface", "tags": [], - "label": "CheckPrivilegesResponse", + "label": "CreateRestAPIKeyWithKibanaPrivilegesParams", "description": [], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckPrivilegesResponse.hasAllRequested", - "type": "boolean", + "id": "def-server.CreateRestAPIKeyWithKibanaPrivilegesParams.type", + "type": "string", "tags": [], - "label": "hasAllRequested", + "label": "type", "description": [], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "signature": [ + "\"rest\" | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckPrivilegesResponse.username", + "id": "def-server.CreateRestAPIKeyWithKibanaPrivilegesParams.expiration", "type": "string", "tags": [], - "label": "username", + "label": "expiration", "description": [], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckPrivilegesResponse.privileges", + "id": "def-server.CreateRestAPIKeyWithKibanaPrivilegesParams.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.CreateRestAPIKeyWithKibanaPrivilegesParams.metadata", "type": "Object", "tags": [], - "label": "privileges", + "label": "metadata", "description": [], "signature": [ - "{ kibana: { resource?: string | undefined; privilege: string; authorized: boolean; }[]; elasticsearch: { cluster: { privilege: string; authorized: boolean; }[]; index: { [indexName: string]: { privilege: string; authorized: boolean; }[]; }; }; }" + "{ [key: string]: any; } | undefined" ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckUserProfilesPrivileges", - "type": "Interface", - "tags": [], - "label": "CheckUserProfilesPrivileges", - "description": [ - "\nAn interface to check users profiles privileges in a specific context (only a single-space context is supported at\nthe moment)." - ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckUserProfilesPrivileges.atSpace", - "type": "Function", + "id": "def-server.CreateRestAPIKeyWithKibanaPrivilegesParams.kibana_role_descriptors", + "type": "Object", "tags": [], - "label": "atSpace", + "label": "kibana_role_descriptors", "description": [], "signature": [ - "(spaceId: string, privileges: ", + "{ [x: string]: { elasticsearch: ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CheckUserProfilesPrivilegesPayload", - "text": "CheckUserProfilesPrivilegesPayload" + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.ElasticsearchPrivilegesType", + "text": "ElasticsearchPrivilegesType" }, - ") => Promise<", + " & { [key: string]: unknown; }; kibana: ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CheckUserProfilesPrivilegesResponse", - "text": "CheckUserProfilesPrivilegesResponse" + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.KibanaPrivilegesType", + "text": "KibanaPrivilegesType" }, - ">" + "; }; }" ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckUserProfilesPrivileges.atSpace.$1", - "type": "string", - "tags": [], - "label": "spaceId", - "description": [], - "signature": [ - "string" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckUserProfilesPrivileges.atSpace.$2", - "type": "Object", - "tags": [], - "label": "privileges", - "description": [], - "signature": [ - { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CheckUserProfilesPrivilegesPayload", - "text": "CheckUserProfilesPrivilegesPayload" - } - ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] + "trackAdoption": false } ], "initialIsOpen": false }, { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckUserProfilesPrivilegesPayload", + "id": "def-server.ElasticsearchPrivilegesType", "type": "Interface", "tags": [], - "label": "CheckUserProfilesPrivilegesPayload", + "label": "ElasticsearchPrivilegesType", "description": [ - "\nPrivileges that can be checked for the users profiles (only Kibana specific privileges are supported at the moment)." + "\nType representing Elasticsearch specific portion of the role definition." ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "path": "packages/core/security/core-security-server/src/roles/schema.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckUserProfilesPrivilegesPayload.kibana", + "id": "def-server.ElasticsearchPrivilegesType.cluster", "type": "Array", "tags": [], - "label": "kibana", - "description": [ - "\nA list of the Kibana specific privileges (usually generated with `security.authz.actions.*.get(...)`)." - ], + "label": "cluster", + "description": [], "signature": [ - "string[]" + "string[] | undefined" ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "path": "packages/core/security/core-security-server/src/roles/schema.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckUserProfilesPrivilegesResponse", - "type": "Interface", - "tags": [], - "label": "CheckUserProfilesPrivilegesResponse", - "description": [ - "\nResponse of the check privileges operation for the users profiles." - ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckUserProfilesPrivilegesResponse.hasPrivilegeUids", + "id": "def-server.ElasticsearchPrivilegesType.remote_cluster", "type": "Array", "tags": [], - "label": "hasPrivilegeUids", - "description": [ - "\nThe subset of the requested profile IDs of the users that have all the requested privileges." + "label": "remote_cluster", + "description": [], + "signature": [ + "{ privileges: string[]; clusters: string[]; }[] | undefined" ], + "path": "packages/core/security/core-security-server/src/roles/schema.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.ElasticsearchPrivilegesType.indices", + "type": "Array", + "tags": [], + "label": "indices", + "description": [], "signature": [ - "string[]" + "{ names: string[]; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; privileges: string[]; query?: string | undefined; allow_restricted_indices?: boolean | undefined; }[] | undefined" ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "path": "packages/core/security/core-security-server/src/roles/schema.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CheckUserProfilesPrivilegesResponse.errors", - "type": "Object", + "id": "def-server.ElasticsearchPrivilegesType.remote_indices", + "type": "Array", "tags": [], - "label": "errors", - "description": [ - "\nAn errors object that may be returned from ES that contains a `count` of UIDs that have errors in the `details` property.\n\nEach entry in `details` will contain an error `type`, e.g 'resource_not_found_exception', and a `reason` message, e.g. 'profile document not found'" + "label": "remote_indices", + "description": [], + "signature": [ + "{ clusters: string[]; names: string[]; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; privileges: string[]; query?: string | undefined; allow_restricted_indices?: boolean | undefined; }[] | undefined" ], + "path": "packages/core/security/core-security-server/src/roles/schema.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.ElasticsearchPrivilegesType.run_as", + "type": "Array", + "tags": [], + "label": "run_as", + "description": [], "signature": [ - "{ count: number; details: Record; } | undefined" + "string[] | undefined" ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/check_privileges.ts", + "path": "packages/core/security/core-security-server/src/roles/schema.ts", "deprecated": false, "trackAdoption": false } @@ -2556,7 +3566,7 @@ "tags": [], "label": "GrantAPIKeyResult", "description": [], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2569,7 +3579,7 @@ "description": [ "\nUnique id for this API key" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, @@ -2582,7 +3592,7 @@ "description": [ "\nName for this API key" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, @@ -2595,7 +3605,7 @@ "description": [ "\nGenerated API key" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -2725,7 +3735,7 @@ "description": [ "\nThe return value when invalidating an API key in Elasticsearch." ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2741,7 +3751,7 @@ "signature": [ "string[]" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, @@ -2757,7 +3767,7 @@ "signature": [ "string[]" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, @@ -2770,7 +3780,7 @@ "description": [ "\nThe number of errors that were encountered when invalidating the API keys." ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, @@ -2786,7 +3796,7 @@ "signature": [ "{ type?: string | undefined; reason?: string | undefined; caused_by?: { type?: string | undefined; reason?: string | undefined; } | undefined; }[] | undefined" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -2802,7 +3812,7 @@ "description": [ "\nRepresents the params for invalidating multiple API keys" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2812,11 +3822,13 @@ "type": "Array", "tags": [], "label": "ids", - "description": [], + "description": [ + "\nList of unique API key IDs" + ], "signature": [ "string[]" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -3277,32 +4289,8 @@ "path": "x-pack/plugins/enterprise_search/server/lib/indices/create_api_key.ts" }, { - "plugin": "enterpriseSearch", - "path": "x-pack/plugins/enterprise_search/server/routes/enterprise_search/api_keys.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts" + "plugin": "enterpriseSearch", + "path": "x-pack/plugins/enterprise_search/server/routes/enterprise_search/api_keys.ts" }, { "plugin": "serverlessSearch", @@ -3403,30 +4391,6 @@ { "plugin": "fleet", "path": "x-pack/plugins/fleet/server/routes/setup/handlers.test.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/state.test.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/routes/suggestions/index.test.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.test.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts" } ] }, @@ -3543,65 +4507,324 @@ "children": [ { "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.UIActions.get", - "type": "Function", + "id": "def-server.UIActions.get", + "type": "Function", + "tags": [], + "label": "get", + "description": [], + "signature": [ + "(featureId: keyof ", + { + "pluginId": "@kbn/core-capabilities-common", + "scope": "common", + "docId": "kibKbnCoreCapabilitiesCommonPluginApi", + "section": "def-common.Capabilities", + "text": "Capabilities" + }, + ", ...uiCapabilityParts: string[]) => string" + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/actions/ui.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UIActions.get.$1", + "type": "CompoundType", + "tags": [], + "label": "featureId", + "description": [], + "signature": [ + "keyof ", + { + "pluginId": "@kbn/core-capabilities-common", + "scope": "common", + "docId": "kibKbnCoreCapabilitiesCommonPluginApi", + "section": "def-common.Capabilities", + "text": "Capabilities" + } + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/actions/ui.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UIActions.get.$2", + "type": "Array", + "tags": [], + "label": "uiCapabilityParts", + "description": [], + "signature": [ + "string[]" + ], + "path": "x-pack/packages/security/plugin_types_server/src/authorization/actions/ui.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateCrossClusterAPIKeyParams", + "type": "Interface", + "tags": [], + "label": "UpdateCrossClusterAPIKeyParams", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateCrossClusterAPIKeyParams.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateCrossClusterAPIKeyParams.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"cross_cluster\"" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateCrossClusterAPIKeyParams.expiration", + "type": "string", + "tags": [], + "label": "expiration", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateCrossClusterAPIKeyParams.metadata", + "type": "Object", + "tags": [], + "label": "metadata", + "description": [], + "signature": [ + "{ [key: string]: any; } | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateCrossClusterAPIKeyParams.access", + "type": "Object", + "tags": [], + "label": "access", + "description": [], + "signature": [ + "{ search?: { names: string[]; query?: unknown; field_security?: unknown; allow_restricted_indices?: boolean | undefined; }[] | undefined; replication?: { names: string[]; }[] | undefined; }" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateRestAPIKeyParams", + "type": "Interface", + "tags": [], + "label": "UpdateRestAPIKeyParams", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateRestAPIKeyParams.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateRestAPIKeyParams.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"rest\" | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateRestAPIKeyParams.expiration", + "type": "string", + "tags": [], + "label": "expiration", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateRestAPIKeyParams.role_descriptors", + "type": "Object", + "tags": [], + "label": "role_descriptors", + "description": [], + "signature": [ + "{ [x: string]: { [key: string]: unknown; }; }" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateRestAPIKeyParams.metadata", + "type": "Object", + "tags": [], + "label": "metadata", + "description": [], + "signature": [ + "{ [key: string]: any; } | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateRestAPIKeyWithKibanaPrivilegesParams", + "type": "Interface", + "tags": [], + "label": "UpdateRestAPIKeyWithKibanaPrivilegesParams", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateRestAPIKeyWithKibanaPrivilegesParams.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateRestAPIKeyWithKibanaPrivilegesParams.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"rest\" | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateRestAPIKeyWithKibanaPrivilegesParams.expiration", + "type": "string", + "tags": [], + "label": "expiration", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateRestAPIKeyWithKibanaPrivilegesParams.metadata", + "type": "Object", + "tags": [], + "label": "metadata", + "description": [], + "signature": [ + "{ [key: string]: any; } | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-server", + "id": "def-server.UpdateRestAPIKeyWithKibanaPrivilegesParams.kibana_role_descriptors", + "type": "Object", "tags": [], - "label": "get", + "label": "kibana_role_descriptors", "description": [], "signature": [ - "(featureId: keyof ", + "{ [x: string]: { elasticsearch: ", { - "pluginId": "@kbn/core-capabilities-common", + "pluginId": "@kbn/core-security-server", "scope": "common", - "docId": "kibKbnCoreCapabilitiesCommonPluginApi", - "section": "def-common.Capabilities", - "text": "Capabilities" + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.ElasticsearchPrivilegesType", + "text": "ElasticsearchPrivilegesType" }, - ", ...uiCapabilityParts: string[]) => string" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/actions/ui.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + " & { [key: string]: unknown; }; kibana: ", { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.UIActions.get.$1", - "type": "CompoundType", - "tags": [], - "label": "featureId", - "description": [], - "signature": [ - "keyof ", - { - "pluginId": "@kbn/core-capabilities-common", - "scope": "common", - "docId": "kibKbnCoreCapabilitiesCommonPluginApi", - "section": "def-common.Capabilities", - "text": "Capabilities" - } - ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/actions/ui.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.KibanaPrivilegesType", + "text": "KibanaPrivilegesType" }, - { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.UIActions.get.$2", - "type": "Array", - "tags": [], - "label": "uiCapabilityParts", - "description": [], - "signature": [ - "string[]" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/actions/ui.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } + "; }; }" ], - "returnComment": [] + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -3866,7 +5089,7 @@ "description": [ "\nRepresents the parameters for validating API Key credentials." ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -3879,7 +5102,7 @@ "description": [ "\nUnique id for this API key" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, @@ -3892,7 +5115,7 @@ "description": [ "\nGenerated API Key (secret)" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -4209,9 +5432,31 @@ "label": "CreateAPIKeyParams", "description": [], "signature": [ - "Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { name: string; role_descriptors: Record>; }> | Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { name: string; kibana_role_descriptors: Record | undefined; } & { spaces: string[] | \"*\"[]; }>[]; elasticsearch: Readonly<{ cluster?: string[] | undefined; indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; }>[] | undefined; remote_cluster?: Readonly<{} & { privileges: string[]; clusters: string[]; }>[] | undefined; remote_indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; clusters: string[]; }>[] | undefined; run_as?: string[] | undefined; } & {}>; }>>; }> | Readonly<{ metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { type: \"cross_cluster\"; name: string; access: Readonly<{ search?: Readonly<{ query?: any; field_security?: any; allow_restricted_indices?: boolean | undefined; } & { names: string[]; }>[] | undefined; replication?: Readonly<{} & { names: string[]; }>[] | undefined; } & {}>; }>" + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyParams", + "text": "CreateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams", + "text": "CreateRestAPIKeyWithKibanaPrivilegesParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateCrossClusterAPIKeyParams", + "text": "CreateCrossClusterAPIKeyParams" + } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -4228,67 +5473,7 @@ "signature": [ "SecurityCreateApiKeyResponse" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CreateCrossClusterAPIKeyParams", - "type": "Type", - "tags": [], - "label": "CreateCrossClusterAPIKeyParams", - "description": [], - "signature": [ - "{ readonly metadata?: Readonly<{} & {}> | undefined; readonly expiration?: string | undefined; readonly type: \"cross_cluster\"; readonly name: string; readonly access: Readonly<{ search?: Readonly<{ query?: any; field_security?: any; allow_restricted_indices?: boolean | undefined; } & { names: string[]; }>[] | undefined; replication?: Readonly<{} & { names: string[]; }>[] | undefined; } & {}>; }" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CreateRestAPIKeyParams", - "type": "Type", - "tags": [], - "label": "CreateRestAPIKeyParams", - "description": [], - "signature": [ - "{ readonly type?: \"rest\" | undefined; readonly metadata?: Readonly<{} & {}> | undefined; readonly expiration?: string | undefined; readonly name: string; readonly role_descriptors: Record>; }" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.CreateRestAPIKeyWithKibanaPrivilegesParams", - "type": "Type", - "tags": [], - "label": "CreateRestAPIKeyWithKibanaPrivilegesParams", - "description": [], - "signature": [ - "{ readonly type?: \"rest\" | undefined; readonly metadata?: Readonly<{} & {}> | undefined; readonly expiration?: string | undefined; readonly name: string; readonly kibana_role_descriptors: Record | undefined; } & { spaces: string[] | \"*\"[]; }>[]; elasticsearch: Readonly<{ cluster?: string[] | undefined; indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; }>[] | undefined; remote_cluster?: Readonly<{} & { privileges: string[]; clusters: string[]; }>[] | undefined; remote_indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; clusters: string[]; }>[] | undefined; run_as?: string[] | undefined; } & {}>; }>>; }" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.ElasticsearchPrivilegesType", - "type": "Type", - "tags": [], - "label": "ElasticsearchPrivilegesType", - "description": [], - "signature": [ - "{ readonly cluster?: string[] | undefined; readonly indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; }>[] | undefined; readonly remote_cluster?: Readonly<{} & { privileges: string[]; clusters: string[]; }>[] | undefined; readonly remote_indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; clusters: string[]; }>[] | undefined; readonly run_as?: string[] | undefined; }" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/role_schema.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -4314,11 +5499,13 @@ "type": "Type", "tags": [], "label": "KibanaPrivilegesType", - "description": [], + "description": [ + "\nType representing Kibana specific portion of the role definition." + ], "signature": [ - "Readonly<{ base?: string[] | undefined; feature?: Record | undefined; } & { spaces: string[] | \"*\"[]; }>[]" + "{ spaces: string[]; base?: string[] | undefined; feature?: Record | undefined; }[]" ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/role_schema.ts", + "path": "packages/core/security/core-security-server/src/roles/schema.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -4333,9 +5520,31 @@ "\nRequest body of Kibana Update API key endpoint." ], "signature": [ - "Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { id: string; role_descriptors: Record>; }> | Readonly<{ metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { id: string; type: \"cross_cluster\"; access: Readonly<{ search?: Readonly<{ query?: any; field_security?: any; allow_restricted_indices?: boolean | undefined; } & { names: string[]; }>[] | undefined; replication?: Readonly<{} & { names: string[]; }>[] | undefined; } & {}>; }> | Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { id: string; kibana_role_descriptors: Record | undefined; } & { spaces: string[] | \"*\"[]; }>[]; elasticsearch: Readonly<{ cluster?: string[] | undefined; indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; }>[] | undefined; remote_cluster?: Readonly<{} & { privileges: string[]; clusters: string[]; }>[] | undefined; remote_indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; clusters: string[]; }>[] | undefined; run_as?: string[] | undefined; } & {}>; }>>; }>" + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateRestAPIKeyParams", + "text": "UpdateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateCrossClusterAPIKeyParams", + "text": "UpdateCrossClusterAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateRestAPIKeyWithKibanaPrivilegesParams", + "text": "UpdateRestAPIKeyWithKibanaPrivilegesParams" + } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -4352,52 +5561,7 @@ "signature": [ "SecurityUpdateApiKeyResponse" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.UpdateCrossClusterAPIKeyParams", - "type": "Type", - "tags": [], - "label": "UpdateCrossClusterAPIKeyParams", - "description": [], - "signature": [ - "{ readonly metadata?: Readonly<{} & {}> | undefined; readonly expiration?: string | undefined; readonly id: string; readonly type: \"cross_cluster\"; readonly access: Readonly<{ search?: Readonly<{ query?: any; field_security?: any; allow_restricted_indices?: boolean | undefined; } & { names: string[]; }>[] | undefined; replication?: Readonly<{} & { names: string[]; }>[] | undefined; } & {}>; }" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.UpdateRestAPIKeyParams", - "type": "Type", - "tags": [], - "label": "UpdateRestAPIKeyParams", - "description": [], - "signature": [ - "{ readonly type?: \"rest\" | undefined; readonly metadata?: Readonly<{} & {}> | undefined; readonly expiration?: string | undefined; readonly id: string; readonly role_descriptors: Record>; }" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/security-plugin-types-server", - "id": "def-server.UpdateRestAPIKeyWithKibanaPrivilegesParams", - "type": "Type", - "tags": [], - "label": "UpdateRestAPIKeyWithKibanaPrivilegesParams", - "description": [], - "signature": [ - "{ readonly type?: \"rest\" | undefined; readonly metadata?: Readonly<{} & {}> | undefined; readonly expiration?: string | undefined; readonly id: string; readonly kibana_role_descriptors: Record | undefined; } & { spaces: string[] | \"*\"[]; }>[]; elasticsearch: Readonly<{ cluster?: string[] | undefined; indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; }>[] | undefined; remote_cluster?: Readonly<{} & { privileges: string[]; clusters: string[]; }>[] | undefined; remote_indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; clusters: string[]; }>[] | undefined; run_as?: string[] | undefined; } & {}>; }>>; }" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -4442,7 +5606,7 @@ "section": "def-common.ObjectType", "text": "ObjectType" }, - "; name: ", + "<\"cross_cluster\">; name: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -4466,23 +5630,7 @@ "section": "def-common.Type", "text": "Type" }, - "; role_descriptors: ", - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.Type", - "text": "Type" - }, - ">>; metadata: ", - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.Type", - "text": "Type" - }, - " | undefined>; }, { type: ", + "; metadata: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -4490,7 +5638,7 @@ "section": "def-common.Type", "text": "Type" }, - "<\"cross_cluster\">; role_descriptors: null; access: ", + " | undefined>; access: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -4514,7 +5662,7 @@ "section": "def-common.Type", "text": "Type" }, - "[] | undefined>; }>; }>>" + "[] | undefined>; }>; }>" ], "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", "deprecated": false, @@ -4662,23 +5810,7 @@ "section": "def-common.ObjectType", "text": "ObjectType" }, - "; name: ", - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.Type", - "text": "Type" - }, - "; expiration: ", + "<{ id: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -4686,7 +5818,7 @@ "section": "def-common.Type", "text": "Type" }, - "; role_descriptors: ", + "; type: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -4694,7 +5826,7 @@ "section": "def-common.Type", "text": "Type" }, - ">>; metadata: ", + "<\"cross_cluster\">; expiration: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -4702,7 +5834,7 @@ "section": "def-common.Type", "text": "Type" }, - " | undefined>; }, { type: ", + "; metadata: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -4710,7 +5842,7 @@ "section": "def-common.Type", "text": "Type" }, - "<\"cross_cluster\">; role_descriptors: null; access: ", + " | undefined>; access: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -4734,15 +5866,7 @@ "section": "def-common.Type", "text": "Type" }, - "[] | undefined>; }>; }>, { name: null; id: ", - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.Type", - "text": "Type" - }, - "; }>>" + "[] | undefined>; }>; }>" ], "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", "deprecated": false, @@ -4764,7 +5888,7 @@ "section": "def-common.ObjectType", "text": "ObjectType" }, - "; name: ", + "; type: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -4780,7 +5904,7 @@ "section": "def-common.Type", "text": "Type" }, - "; expiration: ", + "<\"rest\" | undefined>; expiration: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -4804,15 +5928,7 @@ "section": "def-common.Type", "text": "Type" }, - " | undefined>; }, { name: null; id: ", - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.Type", - "text": "Type" - }, - "; }>>" + " | undefined>; }>" ], "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", "deprecated": false, diff --git a/api_docs/kbn_security_plugin_types_server.mdx b/api_docs/kbn_security_plugin_types_server.mdx index 7c6aa2da3511c5..6fb35919dcbb73 100644 --- a/api_docs/kbn_security_plugin_types_server.mdx +++ b/api_docs/kbn_security_plugin_types_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-server title: "@kbn/security-plugin-types-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-server plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-server'] --- import kbnSecurityPluginTypesServerObj from './kbn_security_plugin_types_server.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 216 | 0 | 121 | 0 | +| 275 | 1 | 154 | 0 | ## Server diff --git a/api_docs/kbn_security_solution_features.mdx b/api_docs/kbn_security_solution_features.mdx index b21ee6f8c49252..6fccd11ffda47e 100644 --- a/api_docs/kbn_security_solution_features.mdx +++ b/api_docs/kbn_security_solution_features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-features title: "@kbn/security-solution-features" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-features plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-features'] --- import kbnSecuritySolutionFeaturesObj from './kbn_security_solution_features.devdocs.json'; diff --git a/api_docs/kbn_security_solution_navigation.mdx b/api_docs/kbn_security_solution_navigation.mdx index 0b83757f314ee0..22a52c912f52ae 100644 --- a/api_docs/kbn_security_solution_navigation.mdx +++ b/api_docs/kbn_security_solution_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-navigation title: "@kbn/security-solution-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-navigation plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-navigation'] --- import kbnSecuritySolutionNavigationObj from './kbn_security_solution_navigation.devdocs.json'; diff --git a/api_docs/kbn_security_solution_side_nav.mdx b/api_docs/kbn_security_solution_side_nav.mdx index 8057980cadb7a1..4061b2105608cc 100644 --- a/api_docs/kbn_security_solution_side_nav.mdx +++ b/api_docs/kbn_security_solution_side_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-side-nav title: "@kbn/security-solution-side-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-side-nav plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-side-nav'] --- import kbnSecuritySolutionSideNavObj from './kbn_security_solution_side_nav.devdocs.json'; diff --git a/api_docs/kbn_security_solution_storybook_config.mdx b/api_docs/kbn_security_solution_storybook_config.mdx index b5b0d157c24acc..94b036a30f18d5 100644 --- a/api_docs/kbn_security_solution_storybook_config.mdx +++ b/api_docs/kbn_security_solution_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-storybook-config title: "@kbn/security-solution-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-storybook-config plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-storybook-config'] --- import kbnSecuritySolutionStorybookConfigObj from './kbn_security_solution_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 5dd49e562276dd..5b89ab28fc2deb 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_data_table.mdx b/api_docs/kbn_securitysolution_data_table.mdx index 847ada8f39c8ff..7627255900a2c2 100644 --- a/api_docs/kbn_securitysolution_data_table.mdx +++ b/api_docs/kbn_securitysolution_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-data-table title: "@kbn/securitysolution-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-data-table plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-data-table'] --- import kbnSecuritysolutionDataTableObj from './kbn_securitysolution_data_table.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_ecs.mdx b/api_docs/kbn_securitysolution_ecs.mdx index e9d5e398486b6a..b03df41ad2bd0b 100644 --- a/api_docs/kbn_securitysolution_ecs.mdx +++ b/api_docs/kbn_securitysolution_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-ecs title: "@kbn/securitysolution-ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-ecs plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-ecs'] --- import kbnSecuritysolutionEcsObj from './kbn_securitysolution_ecs.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index 57d5f1abad1906..4ecb54c33c0250 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index fff4914fe6a2f1..673d2bb6967b2e 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 954af3189ec594..fa6b4d00e19d3e 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index 5d0f2d29fcb494..f686d368ed6e27 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index adde037bf8f76d..9be381985de487 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index e43f20cdf9b71f..ec4eee272f4244 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index 70fb3ceefef022..8f4665c8344a80 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index 26f187818b0d12..462ee376ae04dd 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 100e35128e49b6..efacc5115aead2 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index b2150310488deb..52c0b338efc78c 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index 8dc005863aaae5..935ba90bb1416f 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 0334b7101d4107..0bc1f725c5e351 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index 0974a12d88dd57..0f604c0b5d5af4 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 17e8687117b289..77f52b193a9e4e 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index 906161232d75ce..f5ec57b43def95 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index a651a0ed8e5967..aa4b39ab8955f3 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_serverless_common_settings.mdx b/api_docs/kbn_serverless_common_settings.mdx index 52f01f02c37a5a..be90ae8a969f37 100644 --- a/api_docs/kbn_serverless_common_settings.mdx +++ b/api_docs/kbn_serverless_common_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-common-settings title: "@kbn/serverless-common-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-common-settings plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-common-settings'] --- import kbnServerlessCommonSettingsObj from './kbn_serverless_common_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_observability_settings.mdx b/api_docs/kbn_serverless_observability_settings.mdx index b34d7c3f130ade..9c26e99f4e3ac4 100644 --- a/api_docs/kbn_serverless_observability_settings.mdx +++ b/api_docs/kbn_serverless_observability_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-observability-settings title: "@kbn/serverless-observability-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-observability-settings plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-observability-settings'] --- import kbnServerlessObservabilitySettingsObj from './kbn_serverless_observability_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index 0654aa98964e38..28bc7f0f7e5c55 100644 --- a/api_docs/kbn_serverless_project_switcher.mdx +++ b/api_docs/kbn_serverless_project_switcher.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-project-switcher title: "@kbn/serverless-project-switcher" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-project-switcher plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-project-switcher'] --- import kbnServerlessProjectSwitcherObj from './kbn_serverless_project_switcher.devdocs.json'; diff --git a/api_docs/kbn_serverless_search_settings.mdx b/api_docs/kbn_serverless_search_settings.mdx index b95f3d8c270a9e..9617cb297fbbde 100644 --- a/api_docs/kbn_serverless_search_settings.mdx +++ b/api_docs/kbn_serverless_search_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-search-settings title: "@kbn/serverless-search-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-search-settings plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-search-settings'] --- import kbnServerlessSearchSettingsObj from './kbn_serverless_search_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_security_settings.mdx b/api_docs/kbn_serverless_security_settings.mdx index 87842d991d9745..a8763cbf46030a 100644 --- a/api_docs/kbn_serverless_security_settings.mdx +++ b/api_docs/kbn_serverless_security_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-security-settings title: "@kbn/serverless-security-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-security-settings plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-security-settings'] --- import kbnServerlessSecuritySettingsObj from './kbn_serverless_security_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_storybook_config.mdx b/api_docs/kbn_serverless_storybook_config.mdx index f21be827265cbb..ed25b3fc9e73ea 100644 --- a/api_docs/kbn_serverless_storybook_config.mdx +++ b/api_docs/kbn_serverless_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-storybook-config title: "@kbn/serverless-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-storybook-config plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-storybook-config'] --- import kbnServerlessStorybookConfigObj from './kbn_serverless_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index ae711cf27009dd..4424874cd02a6f 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index ce8b7138b3f6a5..5b673495bc8ae6 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index 2b9f134fc1a71f..9884b2d1ce6dde 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index f6b0046b47e5f7..43f7f939640c61 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index 714b36ef1c651a..d9a4e5f49d6fd8 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index 3c6075bbedff69..ea4cf0b64ae9e7 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_chrome_navigation.mdx b/api_docs/kbn_shared_ux_chrome_navigation.mdx index 3f830a73d4ac27..f5795800ff1fe5 100644 --- a/api_docs/kbn_shared_ux_chrome_navigation.mdx +++ b/api_docs/kbn_shared_ux_chrome_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-chrome-navigation title: "@kbn/shared-ux-chrome-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-chrome-navigation plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-chrome-navigation'] --- import kbnSharedUxChromeNavigationObj from './kbn_shared_ux_chrome_navigation.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_error_boundary.mdx b/api_docs/kbn_shared_ux_error_boundary.mdx index bf856b962f65d6..bca4b029bd2d82 100644 --- a/api_docs/kbn_shared_ux_error_boundary.mdx +++ b/api_docs/kbn_shared_ux_error_boundary.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-error-boundary title: "@kbn/shared-ux-error-boundary" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-error-boundary plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-error-boundary'] --- import kbnSharedUxErrorBoundaryObj from './kbn_shared_ux_error_boundary.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index dd93e338a49b6d..878b30b25aae98 100644 --- a/api_docs/kbn_shared_ux_file_context.mdx +++ b/api_docs/kbn_shared_ux_file_context.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context title: "@kbn/shared-ux-file-context" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-context plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-context'] --- import kbnSharedUxFileContextObj from './kbn_shared_ux_file_context.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image.mdx b/api_docs/kbn_shared_ux_file_image.mdx index e06be2cf1ae868..35787edd06aa51 100644 --- a/api_docs/kbn_shared_ux_file_image.mdx +++ b/api_docs/kbn_shared_ux_file_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image title: "@kbn/shared-ux-file-image" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image'] --- import kbnSharedUxFileImageObj from './kbn_shared_ux_file_image.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image_mocks.mdx b/api_docs/kbn_shared_ux_file_image_mocks.mdx index 5bcc1d6dd2210f..f50cb79d2e939a 100644 --- a/api_docs/kbn_shared_ux_file_image_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks title: "@kbn/shared-ux-file-image-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image-mocks'] --- import kbnSharedUxFileImageMocksObj from './kbn_shared_ux_file_image_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_mocks.mdx b/api_docs/kbn_shared_ux_file_mocks.mdx index 7a390a371b9855..d5c4844146ddf6 100644 --- a/api_docs/kbn_shared_ux_file_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks title: "@kbn/shared-ux-file-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-mocks'] --- import kbnSharedUxFileMocksObj from './kbn_shared_ux_file_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_picker.mdx b/api_docs/kbn_shared_ux_file_picker.mdx index b3eddac9002385..d643ac3730a450 100644 --- a/api_docs/kbn_shared_ux_file_picker.mdx +++ b/api_docs/kbn_shared_ux_file_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-picker title: "@kbn/shared-ux-file-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-picker plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-picker'] --- import kbnSharedUxFilePickerObj from './kbn_shared_ux_file_picker.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_types.mdx b/api_docs/kbn_shared_ux_file_types.mdx index b98be1af3526a0..bd27c66bec82d1 100644 --- a/api_docs/kbn_shared_ux_file_types.mdx +++ b/api_docs/kbn_shared_ux_file_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-types title: "@kbn/shared-ux-file-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-types plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-types'] --- import kbnSharedUxFileTypesObj from './kbn_shared_ux_file_types.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_upload.mdx b/api_docs/kbn_shared_ux_file_upload.mdx index 49889a486b35ef..cb6953a271a929 100644 --- a/api_docs/kbn_shared_ux_file_upload.mdx +++ b/api_docs/kbn_shared_ux_file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-upload title: "@kbn/shared-ux-file-upload" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-upload plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-upload'] --- import kbnSharedUxFileUploadObj from './kbn_shared_ux_file_upload.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_util.mdx b/api_docs/kbn_shared_ux_file_util.mdx index fe5d366e3204da..82c14e1e5f4f51 100644 --- a/api_docs/kbn_shared_ux_file_util.mdx +++ b/api_docs/kbn_shared_ux_file_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util title: "@kbn/shared-ux-file-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-util plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-util'] --- import kbnSharedUxFileUtilObj from './kbn_shared_ux_file_util.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx index e7e61258e81121..4700851eda9388 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app'] --- import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index 7c1a0a4799703a..47d635c6aedabd 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index 1d8f6e8a14c327..1ac01342d945d7 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown'] --- import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx index 8f4ffc93536e31..62a4db0f57045a 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks'] --- import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index f90b3d07d556e1..3bee76770978da 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index 409ea87af405c1..d6d6eb0d2b608d 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index 3599ac1d45c671..6743c0370d0287 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index 8a8fbf40762328..b82e0ad2249df9 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index 0a99623c45ee78..d46cb4f512a150 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index a003943ace5fec..f6bf13ff3deea9 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index d811eb76f4f32a..2c280356ae0802 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index 9807cff5789c2c..cba88a3bc13b30 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index 937c53dd2f21bc..f47914382acfcf 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index 3f77f2e595402d..a9ada0e17b0bc3 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index 4c55d88218b17b..b288e58eac4ca2 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index 29e6f400f90198..09eb7da739fd20 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index 507995b46b07ec..c39e05952056eb 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index 8d2e867e0829d5..edb04f116aedba 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.mdx +++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found title: "@kbn/shared-ux-prompt-not-found" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-not-found plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-not-found'] --- import kbnSharedUxPromptNotFoundObj from './kbn_shared_ux_prompt_not_found.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index 69aee6a46de941..5a0e6f853368a5 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index 5296751e7f6c1a..cefea5217586b3 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index ca374d345179fc..cbb8e21ada263c 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index b7a7ca637f243b..f66ce28c9d6f66 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_tabbed_modal.mdx b/api_docs/kbn_shared_ux_tabbed_modal.mdx index 807a274717f065..6cdc1785c89842 100644 --- a/api_docs/kbn_shared_ux_tabbed_modal.mdx +++ b/api_docs/kbn_shared_ux_tabbed_modal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-tabbed-modal title: "@kbn/shared-ux-tabbed-modal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-tabbed-modal plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-tabbed-modal'] --- import kbnSharedUxTabbedModalObj from './kbn_shared_ux_tabbed_modal.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index 0db9b623abdb48..32a43d0fb70928 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index e10cfefa7e37fe..3cfe5369312536 100644 --- a/api_docs/kbn_slo_schema.mdx +++ b/api_docs/kbn_slo_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-slo-schema title: "@kbn/slo-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/slo-schema plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 5d4f631d15a18e..a0ef1f4ffc40cb 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_sort_predicates.mdx b/api_docs/kbn_sort_predicates.mdx index 3871ca4aab2663..eaaee1a53d074a 100644 --- a/api_docs/kbn_sort_predicates.mdx +++ b/api_docs/kbn_sort_predicates.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-predicates title: "@kbn/sort-predicates" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-predicates plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-predicates'] --- import kbnSortPredicatesObj from './kbn_sort_predicates.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 0745405dc9a156..9f6a46ac3272de 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index ff38938a9cf6a6..4209b964ab11d1 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index 54d1eca651229e..6e5c89a25a3cbc 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index cb369874340442..4cb600291c5fbf 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index b25472babcf81e..f11108590ac7d6 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_eui_helpers.devdocs.json b/api_docs/kbn_test_eui_helpers.devdocs.json index aab4d099fcc9a1..d3276c2634aba6 100644 --- a/api_docs/kbn_test_eui_helpers.devdocs.json +++ b/api_docs/kbn_test_eui_helpers.devdocs.json @@ -140,7 +140,7 @@ "tags": [], "label": "selected", "description": [ - "\nReturns selected value of button group" + "\nReturns selected option of button group" ], "signature": [ "HTMLElement" @@ -186,6 +186,171 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiSelectTestHarness", + "type": "Class", + "tags": [], + "label": "EuiSelectTestHarness", + "description": [], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiSelectTestHarness.testId", + "type": "string", + "tags": [], + "label": "#testId", + "description": [], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiSelectTestHarness.selectEl", + "type": "Object", + "tags": [], + "label": "#selectEl", + "description": [ + "\nReturns select or throws" + ], + "signature": [ + "HTMLElement" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiSelectTestHarness.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiSelectTestHarness.Unnamed.$1", + "type": "string", + "tags": [], + "label": "testId", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiSelectTestHarness.testId", + "type": "string", + "tags": [], + "label": "testId", + "description": [ + "\nReturns `data-test-subj` of select" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiSelectTestHarness.self", + "type": "CompoundType", + "tags": [], + "label": "self", + "description": [ + "\nReturns button select if found, otherwise `null`" + ], + "signature": [ + "HTMLElement | null" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiSelectTestHarness.options", + "type": "Array", + "tags": [], + "label": "options", + "description": [ + "\nReturns all options of select" + ], + "signature": [ + "HTMLOptionElement[]" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiSelectTestHarness.selected", + "type": "string", + "tags": [], + "label": "selected", + "description": [ + "\nReturns selected option" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiSelectTestHarness.select", + "type": "Function", + "tags": [], + "label": "select", + "description": [ + "\nSelect option by value" + ], + "signature": [ + "(optionName: string | RegExp) => void" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiSelectTestHarness.select.$1", + "type": "CompoundType", + "tags": [], + "label": "optionName", + "description": [], + "signature": [ + "string | RegExp" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/test-eui-helpers", "id": "def-common.EuiSuperDatePickerTestHarness", diff --git a/api_docs/kbn_test_eui_helpers.mdx b/api_docs/kbn_test_eui_helpers.mdx index f96a386cb8ed13..5099ea7eb04137 100644 --- a/api_docs/kbn_test_eui_helpers.mdx +++ b/api_docs/kbn_test_eui_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-eui-helpers title: "@kbn/test-eui-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-eui-helpers plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-eui-helpers'] --- import kbnTestEuiHelpersObj from './kbn_test_eui_helpers.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 25 | 0 | 13 | 0 | +| 36 | 0 | 18 | 0 | ## Common diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 93131030a565fe..4f82466404486d 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index ebab933870827f..8f2c2bcb8f4424 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_text_based_editor.mdx b/api_docs/kbn_text_based_editor.mdx index 5a4309ae18d55b..a889d2a241ffbf 100644 --- a/api_docs/kbn_text_based_editor.mdx +++ b/api_docs/kbn_text_based_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-text-based-editor title: "@kbn/text-based-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/text-based-editor plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/text-based-editor'] --- import kbnTextBasedEditorObj from './kbn_text_based_editor.devdocs.json'; diff --git a/api_docs/kbn_timerange.mdx b/api_docs/kbn_timerange.mdx index 709a03157915b9..91a3eecc08f459 100644 --- a/api_docs/kbn_timerange.mdx +++ b/api_docs/kbn_timerange.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-timerange title: "@kbn/timerange" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/timerange plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/timerange'] --- import kbnTimerangeObj from './kbn_timerange.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index dc160105e78a58..c3f6006e3fcad8 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_triggers_actions_ui_types.mdx b/api_docs/kbn_triggers_actions_ui_types.mdx index 636b8be20610f8..5ca83bdf1a6ece 100644 --- a/api_docs/kbn_triggers_actions_ui_types.mdx +++ b/api_docs/kbn_triggers_actions_ui_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-triggers-actions-ui-types title: "@kbn/triggers-actions-ui-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/triggers-actions-ui-types plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/triggers-actions-ui-types'] --- import kbnTriggersActionsUiTypesObj from './kbn_triggers_actions_ui_types.devdocs.json'; diff --git a/api_docs/kbn_try_in_console.mdx b/api_docs/kbn_try_in_console.mdx index 949a959470f6e8..cddcb821d229ee 100644 --- a/api_docs/kbn_try_in_console.mdx +++ b/api_docs/kbn_try_in_console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-try-in-console title: "@kbn/try-in-console" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/try-in-console plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/try-in-console'] --- import kbnTryInConsoleObj from './kbn_try_in_console.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index 3ce429bac4a27b..990674c0960cc0 100644 --- a/api_docs/kbn_ts_projects.mdx +++ b/api_docs/kbn_ts_projects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-projects title: "@kbn/ts-projects" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ts-projects plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-projects'] --- import kbnTsProjectsObj from './kbn_ts_projects.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index 4863e314d89a5d..90f571914c374f 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx index 303b7a77218826..fe5a4f694bb40b 100644 --- a/api_docs/kbn_ui_actions_browser.mdx +++ b/api_docs/kbn_ui_actions_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-actions-browser title: "@kbn/ui-actions-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-actions-browser plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-actions-browser'] --- import kbnUiActionsBrowserObj from './kbn_ui_actions_browser.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.devdocs.json b/api_docs/kbn_ui_shared_deps_src.devdocs.json index 5a4f7663f18a04..cdcc1a191f022c 100644 --- a/api_docs/kbn_ui_shared_deps_src.devdocs.json +++ b/api_docs/kbn_ui_shared_deps_src.devdocs.json @@ -524,6 +524,17 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/ui-shared-deps-src", + "id": "def-common.externals.kbncryptobrowser", + "type": "string", + "tags": [], + "label": "'@kbn/crypto-browser'", + "description": [], + "path": "packages/kbn-ui-shared-deps-src/src/definitions.js", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/ui-shared-deps-src", "id": "def-common.externals.kbnesquery", diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index 7c0e9167c87a6d..5de7a71863db8d 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kiban | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 55 | 0 | 46 | 0 | +| 56 | 0 | 47 | 0 | ## Common diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 86fda35b01e2c6..b2aeefbd8b4cac 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_unified_data_table.mdx b/api_docs/kbn_unified_data_table.mdx index d69f9c8c5c1a89..23f6481b3b6ba8 100644 --- a/api_docs/kbn_unified_data_table.mdx +++ b/api_docs/kbn_unified_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-data-table title: "@kbn/unified-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-data-table plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-data-table'] --- import kbnUnifiedDataTableObj from './kbn_unified_data_table.devdocs.json'; diff --git a/api_docs/kbn_unified_doc_viewer.mdx b/api_docs/kbn_unified_doc_viewer.mdx index b29a49446008f9..0ec1e020d9a494 100644 --- a/api_docs/kbn_unified_doc_viewer.mdx +++ b/api_docs/kbn_unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-doc-viewer title: "@kbn/unified-doc-viewer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-doc-viewer plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-doc-viewer'] --- import kbnUnifiedDocViewerObj from './kbn_unified_doc_viewer.devdocs.json'; diff --git a/api_docs/kbn_unified_field_list.mdx b/api_docs/kbn_unified_field_list.mdx index 7d5a9c54157624..5d9f33596721d1 100644 --- a/api_docs/kbn_unified_field_list.mdx +++ b/api_docs/kbn_unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-field-list title: "@kbn/unified-field-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-field-list plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-field-list'] --- import kbnUnifiedFieldListObj from './kbn_unified_field_list.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_badge.mdx b/api_docs/kbn_unsaved_changes_badge.mdx index cff3206d2d904b..ea1be4f0240a82 100644 --- a/api_docs/kbn_unsaved_changes_badge.mdx +++ b/api_docs/kbn_unsaved_changes_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-badge title: "@kbn/unsaved-changes-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-badge plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-badge'] --- import kbnUnsavedChangesBadgeObj from './kbn_unsaved_changes_badge.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_prompt.mdx b/api_docs/kbn_unsaved_changes_prompt.mdx index 9a07953f5ef7b3..c9d96e19e8089f 100644 --- a/api_docs/kbn_unsaved_changes_prompt.mdx +++ b/api_docs/kbn_unsaved_changes_prompt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-prompt title: "@kbn/unsaved-changes-prompt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-prompt plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-prompt'] --- import kbnUnsavedChangesPromptObj from './kbn_unsaved_changes_prompt.devdocs.json'; diff --git a/api_docs/kbn_use_tracked_promise.mdx b/api_docs/kbn_use_tracked_promise.mdx index 3a6350ce0f4619..ed43dfa3580b38 100644 --- a/api_docs/kbn_use_tracked_promise.mdx +++ b/api_docs/kbn_use_tracked_promise.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-use-tracked-promise title: "@kbn/use-tracked-promise" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/use-tracked-promise plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/use-tracked-promise'] --- import kbnUseTrackedPromiseObj from './kbn_use_tracked_promise.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index 4d51c61d4f468d..da98e9e683b05e 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index 3a8b5546675b91..0d23d9d6e3ddb6 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index 6016643b3d27e0..c154ac78aff316 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index 16358c94b7da88..2760fb6498ffc0 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_visualization_ui_components.mdx b/api_docs/kbn_visualization_ui_components.mdx index 16b7d652dfe9bb..2ffdc37c2f3625 100644 --- a/api_docs/kbn_visualization_ui_components.mdx +++ b/api_docs/kbn_visualization_ui_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-ui-components title: "@kbn/visualization-ui-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-ui-components plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-ui-components'] --- import kbnVisualizationUiComponentsObj from './kbn_visualization_ui_components.devdocs.json'; diff --git a/api_docs/kbn_visualization_utils.mdx b/api_docs/kbn_visualization_utils.mdx index 35cd7528e17576..6d48065cf5a6fc 100644 --- a/api_docs/kbn_visualization_utils.mdx +++ b/api_docs/kbn_visualization_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-utils title: "@kbn/visualization-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-utils'] --- import kbnVisualizationUtilsObj from './kbn_visualization_utils.devdocs.json'; diff --git a/api_docs/kbn_xstate_utils.mdx b/api_docs/kbn_xstate_utils.mdx index 7cd72ea98a4e04..bc8ac208631811 100644 --- a/api_docs/kbn_xstate_utils.mdx +++ b/api_docs/kbn_xstate_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-xstate-utils title: "@kbn/xstate-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/xstate-utils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/xstate-utils'] --- import kbnXstateUtilsObj from './kbn_xstate_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index 6f87b3d59c2269..e20d7586b76618 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kbn_zod_helpers.mdx b/api_docs/kbn_zod_helpers.mdx index 01deacde43e620..e2b68abc0a3245 100644 --- a/api_docs/kbn_zod_helpers.mdx +++ b/api_docs/kbn_zod_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod-helpers title: "@kbn/zod-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/zod-helpers plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod-helpers'] --- import kbnZodHelpersObj from './kbn_zod_helpers.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index f994ec347d18b8..b211d3d85375e9 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 3019bde1572f70..edfac50200b65a 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index 431ebf3a2d6186..6879db37872f56 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index 7d4b442e3b28af..cb0b3d58dda461 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.devdocs.json b/api_docs/lens.devdocs.json index 28c0c308162ca0..0534b92e8b64c1 100644 --- a/api_docs/lens.devdocs.json +++ b/api_docs/lens.devdocs.json @@ -4455,6 +4455,63 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "lens", + "id": "def-public.MetricVisualizationState.titlesTextAlign", + "type": "CompoundType", + "tags": [], + "label": "titlesTextAlign", + "description": [], + "signature": [ + "\"right\" | \"left\" | \"center\" | undefined" + ], + "path": "x-pack/plugins/lens/public/visualizations/metric/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "lens", + "id": "def-public.MetricVisualizationState.valuesTextAlign", + "type": "CompoundType", + "tags": [], + "label": "valuesTextAlign", + "description": [], + "signature": [ + "\"right\" | \"left\" | \"center\" | undefined" + ], + "path": "x-pack/plugins/lens/public/visualizations/metric/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "lens", + "id": "def-public.MetricVisualizationState.iconAlign", + "type": "CompoundType", + "tags": [], + "label": "iconAlign", + "description": [], + "signature": [ + "\"right\" | \"left\" | undefined" + ], + "path": "x-pack/plugins/lens/public/visualizations/metric/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "lens", + "id": "def-public.MetricVisualizationState.valueFontMode", + "type": "CompoundType", + "tags": [], + "label": "valueFontMode", + "description": [], + "signature": [ + "ValueFontMode", + " | undefined" + ], + "path": "x-pack/plugins/lens/public/visualizations/metric/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "lens", "id": "def-public.MetricVisualizationState.color", @@ -4469,6 +4526,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "lens", + "id": "def-public.MetricVisualizationState.icon", + "type": "string", + "tags": [], + "label": "icon", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/lens/public/visualizations/metric/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "lens", "id": "def-public.MetricVisualizationState.palette", diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index c3d5cb143c0e79..2f8b8605a7eb77 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 672 | 0 | 570 | 62 | +| 677 | 0 | 575 | 63 | ## Client diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index de74ce08f2e16b..5bc44e9854e706 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index 09495a17a5d3b5..9ecd9d9bd5811b 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 4fc4c85abc9f50..ca13a48f61e326 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/links.mdx b/api_docs/links.mdx index 560e44067a7ea5..41ee754c5045d4 100644 --- a/api_docs/links.mdx +++ b/api_docs/links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/links title: "links" image: https://source.unsplash.com/400x175/?github description: API docs for the links plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'links'] --- import linksObj from './links.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index a2d3af9cc76f56..5e1b2229e8f720 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/logs_data_access.mdx b/api_docs/logs_data_access.mdx index 035befc30e2414..b09764d682764d 100644 --- a/api_docs/logs_data_access.mdx +++ b/api_docs/logs_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsDataAccess title: "logsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the logsDataAccess plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsDataAccess'] --- import logsDataAccessObj from './logs_data_access.devdocs.json'; diff --git a/api_docs/logs_explorer.mdx b/api_docs/logs_explorer.mdx index b1b1874c1a1085..586cf3c3419fee 100644 --- a/api_docs/logs_explorer.mdx +++ b/api_docs/logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsExplorer title: "logsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the logsExplorer plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsExplorer'] --- import logsExplorerObj from './logs_explorer.devdocs.json'; diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx index 455b1b62caf67c..b5d4e58649f4a1 100644 --- a/api_docs/logs_shared.mdx +++ b/api_docs/logs_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsShared title: "logsShared" image: https://source.unsplash.com/400x175/?github description: API docs for the logsShared plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared'] --- import logsSharedObj from './logs_shared.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 9efd852c72ca9b..e58e039bb493f5 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 47e0f72e43f1b1..b3620ad0311327 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 1541454bbeea53..e292b96e8f1287 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/metrics_data_access.mdx b/api_docs/metrics_data_access.mdx index 94a27bc9aec2d2..b852e1b255fbb5 100644 --- a/api_docs/metrics_data_access.mdx +++ b/api_docs/metrics_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/metricsDataAccess title: "metricsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the metricsDataAccess plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsDataAccess'] --- import metricsDataAccessObj from './metrics_data_access.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 380e40ca6d5664..ea10715eade146 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/mock_idp_plugin.mdx b/api_docs/mock_idp_plugin.mdx index d6d2f2c8ac194d..3fcc0874fadf1c 100644 --- a/api_docs/mock_idp_plugin.mdx +++ b/api_docs/mock_idp_plugin.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mockIdpPlugin title: "mockIdpPlugin" image: https://source.unsplash.com/400x175/?github description: API docs for the mockIdpPlugin plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mockIdpPlugin'] --- import mockIdpPluginObj from './mock_idp_plugin.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index dcbdf082713120..9ffc042d9afaf1 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index 74d85a0245195b..f9ea2f7a9b8cee 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index 380cd978db995b..ddb54acf97fb0c 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index bd93f2dc714f94..1a23a284aa1637 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/no_data_page.mdx b/api_docs/no_data_page.mdx index f79178e58cd425..dc1108ff5804e6 100644 --- a/api_docs/no_data_page.mdx +++ b/api_docs/no_data_page.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/noDataPage title: "noDataPage" image: https://source.unsplash.com/400x175/?github description: API docs for the noDataPage plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'noDataPage'] --- import noDataPageObj from './no_data_page.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index 5e5755bad1a4df..fa70830dd135c3 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 3449ee952dca5f..10d70f8c5ce85b 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index d2d8baa627bcbe..3a47267ac6556d 100644 --- a/api_docs/observability_a_i_assistant.mdx +++ b/api_docs/observability_a_i_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistant title: "observabilityAIAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistant plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant_app.mdx b/api_docs/observability_a_i_assistant_app.mdx index 1b834afc8f3325..5c81008f885a3b 100644 --- a/api_docs/observability_a_i_assistant_app.mdx +++ b/api_docs/observability_a_i_assistant_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistantApp title: "observabilityAIAssistantApp" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistantApp plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistantApp'] --- import observabilityAIAssistantAppObj from './observability_a_i_assistant_app.devdocs.json'; diff --git a/api_docs/observability_ai_assistant_management.mdx b/api_docs/observability_ai_assistant_management.mdx index 9c33efa5ef117c..6f2e347af77e6f 100644 --- a/api_docs/observability_ai_assistant_management.mdx +++ b/api_docs/observability_ai_assistant_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAiAssistantManagement title: "observabilityAiAssistantManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAiAssistantManagement plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAiAssistantManagement'] --- import observabilityAiAssistantManagementObj from './observability_ai_assistant_management.devdocs.json'; diff --git a/api_docs/observability_logs_explorer.mdx b/api_docs/observability_logs_explorer.mdx index 231481cbb3217a..1c041f0f374c6a 100644 --- a/api_docs/observability_logs_explorer.mdx +++ b/api_docs/observability_logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityLogsExplorer title: "observabilityLogsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityLogsExplorer plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityLogsExplorer'] --- import observabilityLogsExplorerObj from './observability_logs_explorer.devdocs.json'; diff --git a/api_docs/observability_onboarding.mdx b/api_docs/observability_onboarding.mdx index 02f2807beb89d5..9b4fb87da68344 100644 --- a/api_docs/observability_onboarding.mdx +++ b/api_docs/observability_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityOnboarding title: "observabilityOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityOnboarding plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding'] --- import observabilityOnboardingObj from './observability_onboarding.devdocs.json'; diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx index dd1bbf734cd350..d07ee8fefae243 100644 --- a/api_docs/observability_shared.mdx +++ b/api_docs/observability_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityShared title: "observabilityShared" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityShared plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityShared'] --- import observabilitySharedObj from './observability_shared.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 9e1a61f471a7c6..8ddb05533db162 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/painless_lab.mdx b/api_docs/painless_lab.mdx index aa0bef6692c8e0..cd29c113f08376 100644 --- a/api_docs/painless_lab.mdx +++ b/api_docs/painless_lab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/painlessLab title: "painlessLab" image: https://source.unsplash.com/400x175/?github description: API docs for the painlessLab plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'painlessLab'] --- import painlessLabObj from './painless_lab.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index d152b01f9130ad..a9e589fb817c9e 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -15,13 +15,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 811 | 695 | 42 | +| 812 | 696 | 42 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 49694 | 237 | 37903 | 1897 | +| 49918 | 239 | 38033 | 1897 | ## Plugin Directory @@ -57,7 +57,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 129 | 0 | 123 | 12 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 54 | 0 | 51 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3199 | 31 | 2590 | 24 | -| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 8 | 0 | 8 | 0 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 5 | 0 | 5 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin provides the ability to create data views via a modal flyout inside Kibana apps | 35 | 0 | 25 | 5 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Reusable data view field editor across Kibana | 72 | 0 | 33 | 1 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Data view management app | 2 | 0 | 2 | 0 | @@ -76,18 +76,19 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | Adds dashboards for discovering and managing Enterprise Search products. | 5 | 0 | 5 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | Entity manager plugin for entity assets (inventory, topology, etc) | 8 | 0 | 8 | 1 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 99 | 3 | 97 | 3 | +| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 29 | 0 | 10 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 2 | 0 | 2 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | The Event Annotation service contains expressions for event annotations | 201 | 0 | 201 | 6 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | The listing page for event annotations. | 15 | 0 | 15 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 112 | 0 | 112 | 11 | -| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 126 | 0 | 126 | 12 | +| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 126 | 0 | 126 | 12 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'error' renderer to expressions | 17 | 0 | 15 | 2 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression Gauge plugin adds a `gauge` renderer and function to the expression plugin. The renderer will display the `gauge` chart. | 59 | 0 | 58 | 2 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression Heatmap plugin adds a `heatmap` renderer and function to the expression plugin. The renderer will display the `heatmap` chart. | 112 | 0 | 108 | 2 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'image' function and renderer to expressions | 26 | 0 | 26 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Adds a `metric` renderer and function to the expression plugin. The renderer will display the `legacy metric` chart. | 51 | 0 | 51 | 2 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'metric' function and renderer to expressions | 32 | 0 | 27 | 0 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Adds a `metric` renderer and function to the expression plugin. The renderer will display the `metric` chart. | 67 | 0 | 67 | 2 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Adds a `metric` renderer and function to the expression plugin. The renderer will display the `metric` chart. | 75 | 0 | 75 | 2 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression Partition Visualization plugin adds a `partitionVis` renderer and `pieVis`, `mosaicVis`, `treemapVis`, `waffleVis` functions to the expression plugin. The renderer will display the `pie`, `waffle`, `treemap` and `mosaic` charts. | 73 | 0 | 73 | 2 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'repeatImage' function and renderer to expressions | 32 | 0 | 32 | 0 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'revealImage' function and renderer to expressions | 14 | 0 | 14 | 3 | @@ -125,7 +126,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | kibanaUsageCollection | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 610 | 3 | 417 | 9 | | | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | - | 5 | 0 | 5 | 1 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 672 | 0 | 570 | 62 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 677 | 0 | 575 | 63 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 8 | 0 | 8 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 4 | 0 | 4 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 117 | 0 | 42 | 10 | @@ -179,7 +180,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | Plugin to provide access to and rendering of python notebooks for use in the persistent developer console. | 8 | 0 | 8 | 1 | | | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | - | 18 | 0 | 10 | 1 | | searchprofiler | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | -| | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 415 | 0 | 206 | 1 | +| | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 438 | 0 | 222 | 1 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 191 | 0 | 121 | 37 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | ESS customizations for Security Solution. | 6 | 0 | 6 | 0 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | Serverless customizations for security. | 7 | 0 | 7 | 0 | @@ -193,13 +194,12 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides the Spaces feature, which allows saved objects to be organized into meaningful categories. | 260 | 0 | 66 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 25 | 0 | 25 | 3 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 10 | 0 | 10 | 0 | -| synthetics | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | This plugin visualizes data from Synthetics and Heartbeat, and integrates with other Observability solutions. | 0 | 0 | 0 | 0 | +| synthetics | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | This plugin visualizes data from Synthetics and Heartbeat, and integrates with other Observability solutions. | 0 | 0 | 0 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 102 | 0 | 59 | 5 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 45 | 0 | 1 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 31 | 0 | 26 | 6 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 1 | 0 | 1 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 0 | 0 | -| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 29 | 0 | 10 | 0 | | | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | Elastic threat intelligence helps you see if you are open to or have been subject to current or historical known threats | 30 | 0 | 14 | 4 | | | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | - | 228 | 1 | 184 | 18 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the transforms features provided by Elastic. Transforms enable you to convert existing Elasticsearch indices into summarized indices, which provide opportunities for new insights and analytics. | 4 | 0 | 4 | 1 | @@ -211,7 +211,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | The `unifiedHistogram` plugin provides UI components to create a layout including a resizable histogram and a main display. | 71 | 0 | 36 | 6 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains all the key functionality of Kibana's unified search experience.Contains all the key functionality of Kibana's unified search experience. | 152 | 2 | 113 | 23 | | upgradeAssistant | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | -| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | This plugin visualizes data from Heartbeat, and integrates with other Observability solutions. | 1 | 0 | 1 | 0 | +| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | This plugin visualizes data from Heartbeat, and integrates with other Observability solutions. | 1 | 0 | 1 | 0 | | urlDrilldown | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Adds drilldown implementations to Kibana | 0 | 0 | 0 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 12 | 0 | 12 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 56 | 0 | 16 | 2 | @@ -278,7 +278,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 8 | 0 | 8 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 3 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 10 | 0 | 10 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 48 | 0 | 32 | 3 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 49 | 0 | 33 | 3 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 30 | 0 | 30 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 195 | 1 | 128 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 101 | 0 | 0 | 0 | @@ -418,9 +418,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 8 | 0 | 8 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 8 | 0 | 8 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 20 | 0 | 6 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 52 | 0 | 16 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 146 | 1 | 63 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 16 | 0 | 16 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 13 | 0 | 13 | 2 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 15 | 0 | 15 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 12 | 0 | 2 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 21 | 0 | 20 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 20 | 0 | 3 | 0 | @@ -461,14 +461,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 51 | 0 | 51 | 1 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 14 | 0 | 9 | 0 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 80 | 0 | 80 | 1 | -| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 5 | 0 | 4 | 0 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 7 | 0 | 5 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 44 | 0 | 43 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 7 | 0 | 7 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 5 | 0 | 5 | 0 | | | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 4 | 0 | 4 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 3 | 0 | 3 | 0 | -| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 55 | 0 | 43 | 0 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 56 | 0 | 44 | 0 | | | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | - | 17 | 0 | 17 | 0 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 5 | 0 | 5 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 0 | @@ -490,14 +490,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 35 | 0 | 34 | 0 | | | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 160 | 0 | 134 | 9 | | | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 362 | 0 | 336 | 0 | -| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 18 | 0 | 18 | 0 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 19 | 0 | 19 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 52 | 0 | 37 | 7 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 32 | 0 | 19 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 11 | 0 | 6 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 269 | 1 | 209 | 15 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 26 | 0 | 26 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 1 | 0 | -| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 99 | 1 | 96 | 11 | +| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 104 | 1 | 101 | 10 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 53 | 0 | 51 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 193 | 0 | 182 | 10 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 39 | 0 | 39 | 0 | @@ -608,6 +608,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 18 | 0 | 3 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 11 | 0 | 2 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 11 | 0 | 8 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 14 | 0 | 7 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 18 | 0 | 18 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 40 | 0 | 38 | 5 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 13 | 0 | 9 | 0 | @@ -643,7 +644,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 7 | 0 | 7 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 118 | 0 | 59 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 51 | 0 | 25 | 0 | -| | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 216 | 0 | 121 | 0 | +| | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 275 | 1 | 154 | 0 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 14 | 0 | 14 | 6 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 54 | 0 | 49 | 0 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 30 | 0 | 24 | 0 | @@ -721,7 +722,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 41 | 2 | 21 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 5 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 315 | 4 | 267 | 13 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 25 | 0 | 13 | 0 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 36 | 0 | 18 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 131 | 3 | 98 | 2 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 1 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 33 | 0 | 13 | 0 | @@ -732,7 +733,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 39 | 0 | 25 | 1 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 86 | 0 | 86 | 1 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 42 | 0 | 28 | 0 | -| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 55 | 0 | 46 | 0 | +| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 56 | 0 | 47 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 9 | 0 | 8 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the unified data table which can be integrated into apps | 153 | 0 | 81 | 1 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 18 | 0 | 17 | 5 | diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx index 5377b64c59d8bd..044039be72e2f8 100644 --- a/api_docs/presentation_panel.mdx +++ b/api_docs/presentation_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationPanel title: "presentationPanel" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationPanel plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationPanel'] --- import presentationPanelObj from './presentation_panel.devdocs.json'; diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 2cf99c9268efca..8a4f3cf4f1d1e8 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index 5fc10548933798..66b8099faa64b5 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/profiling_data_access.mdx b/api_docs/profiling_data_access.mdx index c81cc064925b0d..2d1fb75fa9ebce 100644 --- a/api_docs/profiling_data_access.mdx +++ b/api_docs/profiling_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profilingDataAccess title: "profilingDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the profilingDataAccess plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profilingDataAccess'] --- import profilingDataAccessObj from './profiling_data_access.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 61ae6d3ac7bc4f..1332a6bbe1307c 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index e85a65b36c59fb..aaf34bf8ec7ca1 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index 905ccaead09c74..a85cd6355abed9 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index fe3d512ee6f209..3c0bac39f60e8d 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 92cd07cb6a86db..469dd74c891714 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index c16fb0c31ecab5..46bf950d7cc7cd 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index 2d65a9e00b0a43..27f188c099000a 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 47bc1753e03e3c..c59950e900de12 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index 343c998820d527..4511c56481e6bc 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index d42770557cf897..a4e7160e19728f 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index f2d736be63446c..bfcdcd6c94b374 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 850b0930150ee5..68ce1ae4d60228 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index 5aa11ebce00553..d338a09e37e070 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/search_connectors.mdx b/api_docs/search_connectors.mdx index fb4ee5e644b260..379fd5ffceb98b 100644 --- a/api_docs/search_connectors.mdx +++ b/api_docs/search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchConnectors title: "searchConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the searchConnectors plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchConnectors'] --- import searchConnectorsObj from './search_connectors.devdocs.json'; diff --git a/api_docs/search_homepage.mdx b/api_docs/search_homepage.mdx index a0d0813d0d9c91..e4cd144d11b561 100644 --- a/api_docs/search_homepage.mdx +++ b/api_docs/search_homepage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchHomepage title: "searchHomepage" image: https://source.unsplash.com/400x175/?github description: API docs for the searchHomepage plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchHomepage'] --- import searchHomepageObj from './search_homepage.devdocs.json'; diff --git a/api_docs/search_inference_endpoints.mdx b/api_docs/search_inference_endpoints.mdx index 1d24c2f2d0127d..2e7befc9dd3651 100644 --- a/api_docs/search_inference_endpoints.mdx +++ b/api_docs/search_inference_endpoints.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchInferenceEndpoints title: "searchInferenceEndpoints" image: https://source.unsplash.com/400x175/?github description: API docs for the searchInferenceEndpoints plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchInferenceEndpoints'] --- import searchInferenceEndpointsObj from './search_inference_endpoints.devdocs.json'; diff --git a/api_docs/search_notebooks.mdx b/api_docs/search_notebooks.mdx index a2ca0c503916f5..3047177c85e7e5 100644 --- a/api_docs/search_notebooks.mdx +++ b/api_docs/search_notebooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchNotebooks title: "searchNotebooks" image: https://source.unsplash.com/400x175/?github description: API docs for the searchNotebooks plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchNotebooks'] --- import searchNotebooksObj from './search_notebooks.devdocs.json'; diff --git a/api_docs/search_playground.mdx b/api_docs/search_playground.mdx index 64611dafd82733..c75eeb689a0d59 100644 --- a/api_docs/search_playground.mdx +++ b/api_docs/search_playground.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchPlayground title: "searchPlayground" image: https://source.unsplash.com/400x175/?github description: API docs for the searchPlayground plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchPlayground'] --- import searchPlaygroundObj from './search_playground.devdocs.json'; diff --git a/api_docs/security.devdocs.json b/api_docs/security.devdocs.json index 6923618136dcd5..5d7daa39f03601 100644 --- a/api_docs/security.devdocs.json +++ b/api_docs/security.devdocs.json @@ -1829,8 +1829,10 @@ "type": "Interface", "tags": [], "label": "APIKeys", - "description": [], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "description": [ + "\nInterface for managing API keys in Elasticsearch, including creation,\nvalidation, and invalidation of API keys,\nas well as checking the status of API key features." + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1846,7 +1848,7 @@ "signature": [ "() => Promise" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -1864,7 +1866,7 @@ "signature": [ "() => Promise" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -1890,17 +1892,17 @@ }, ", createParams: ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CreateAPIKeyParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateAPIKeyParams", "text": "CreateAPIKeyParams" }, ") => Promise<", "SecurityCreateApiKeyResponse", " | null>" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1923,7 +1925,7 @@ }, "" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1939,14 +1941,98 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.CreateAPIKeyParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateAPIKeyParams", "text": "CreateAPIKeyParams" } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "security", + "id": "def-server.APIKeys.update", + "type": "Function", + "tags": [], + "label": "update", + "description": [ + "\nAttempts update an API key with the provided 'role_descriptors' and 'metadata'\n\nReturns `updated`, `true` if the update was successful, `false` if there was nothing to update\n\nUser needs `manage_api_key` privilege to update REST API keys and `manage_security` for cross-cluster API keys.\n" + ], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ", updateParams: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateAPIKeyParams", + "text": "UpdateAPIKeyParams" + }, + ") => Promise<", + "SecurityUpdateApiKeyResponse", + " | null>" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-server.APIKeys.update.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [ + "Request instance." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "security", + "id": "def-server.APIKeys.update.$2", + "type": "CompoundType", + "tags": [], + "label": "updateParams", + "description": [ + "The params to edit an API key" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.UpdateAPIKeyParams", + "text": "UpdateAPIKeyParams" + } + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1972,17 +2058,33 @@ "section": "def-common.KibanaRequest", "text": "KibanaRequest" }, - ", createParams: Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { name: string; role_descriptors: Record>; }> | Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { name: string; kibana_role_descriptors: Record | undefined; } & { spaces: string[] | \"*\"[]; }>[]; elasticsearch: Readonly<{ cluster?: string[] | undefined; indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; }>[] | undefined; remote_cluster?: Readonly<{} & { privileges: string[]; clusters: string[]; }>[] | undefined; remote_indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; clusters: string[]; }>[] | undefined; run_as?: string[] | undefined; } & {}>; }>>; }>) => Promise<", + ", createParams: ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.GrantAPIKeyResult", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyParams", + "text": "CreateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams", + "text": "CreateRestAPIKeyWithKibanaPrivilegesParams" + }, + ") => Promise<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.GrantAPIKeyResult", "text": "GrantAPIKeyResult" }, " | null>" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2005,7 +2107,7 @@ }, "" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2020,9 +2122,23 @@ "Create operation parameters." ], "signature": [ - "Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { name: string; role_descriptors: Record>; }> | Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { name: string; kibana_role_descriptors: Record | undefined; } & { spaces: string[] | \"*\"[]; }>[]; elasticsearch: Readonly<{ cluster?: string[] | undefined; indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; }>[] | undefined; remote_cluster?: Readonly<{} & { privileges: string[]; clusters: string[]; }>[] | undefined; remote_indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; clusters: string[]; }>[] | undefined; run_as?: string[] | undefined; } & {}>; }>>; }>" + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyParams", + "text": "CreateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams", + "text": "CreateRestAPIKeyWithKibanaPrivilegesParams" + } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2042,15 +2158,15 @@ "signature": [ "(apiKeyPrams: ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.ValidateAPIKeyParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.ValidateAPIKeyParams", "text": "ValidateAPIKeyParams" }, ") => Promise" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2065,14 +2181,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.ValidateAPIKeyParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.ValidateAPIKeyParams", "text": "ValidateAPIKeyParams" } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2100,23 +2216,23 @@ }, ", params: ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.InvalidateAPIKeysParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", "text": "InvalidateAPIKeysParams" }, ") => Promise<", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.InvalidateAPIKeyResult", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeyResult", "text": "InvalidateAPIKeyResult" }, " | null>" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2139,7 +2255,7 @@ }, "" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2155,14 +2271,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.InvalidateAPIKeysParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", "text": "InvalidateAPIKeysParams" } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2182,23 +2298,23 @@ "signature": [ "(params: ", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.InvalidateAPIKeysParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", "text": "InvalidateAPIKeysParams" }, ") => Promise<", { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.InvalidateAPIKeyResult", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeyResult", "text": "InvalidateAPIKeyResult" }, " | null>" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2213,14 +2329,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.InvalidateAPIKeysParams", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.InvalidateAPIKeysParams", "text": "InvalidateAPIKeysParams" } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2984,10 +3100,10 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-server", - "scope": "server", - "docId": "kibKbnSecurityPluginTypesServerPluginApi", - "section": "def-server.APIKeys", + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.APIKeys", "text": "APIKeys" } ], @@ -3985,51 +4101,79 @@ }, { "parentPluginId": "security", - "id": "def-server.GrantAPIKeyResult", + "id": "def-server.CreateCrossClusterAPIKeyParams", "type": "Interface", "tags": [], - "label": "GrantAPIKeyResult", + "label": "CreateCrossClusterAPIKeyParams", "description": [], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "security", - "id": "def-server.GrantAPIKeyResult.id", + "id": "def-server.CreateCrossClusterAPIKeyParams.type", "type": "string", "tags": [], - "label": "id", - "description": [ - "\nUnique id for this API key" + "label": "type", + "description": [], + "signature": [ + "\"cross_cluster\"" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "security", - "id": "def-server.GrantAPIKeyResult.name", + "id": "def-server.CreateCrossClusterAPIKeyParams.expiration", "type": "string", "tags": [], - "label": "name", - "description": [ - "\nName for this API key" + "label": "expiration", + "description": [], + "signature": [ + "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "security", - "id": "def-server.GrantAPIKeyResult.api_key", + "id": "def-server.CreateCrossClusterAPIKeyParams.name", "type": "string", "tags": [], - "label": "api_key", - "description": [ - "\nGenerated API key" + "label": "name", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.CreateCrossClusterAPIKeyParams.metadata", + "type": "Object", + "tags": [], + "label": "metadata", + "description": [], + "signature": [ + "{ [key: string]: any; } | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.CreateCrossClusterAPIKeyParams.access", + "type": "Object", + "tags": [], + "label": "access", + "description": [], + "signature": [ + "{ search?: { names: string[]; query?: unknown; field_security?: unknown; allow_restricted_indices?: boolean | undefined; }[] | undefined; replication?: { names: string[]; }[] | undefined; }" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -4038,78 +4182,395 @@ }, { "parentPluginId": "security", - "id": "def-server.InvalidateAPIKeyResult", + "id": "def-server.CreateRestAPIKeyParams", "type": "Interface", "tags": [], - "label": "InvalidateAPIKeyResult", - "description": [ - "\nThe return value when invalidating an API key in Elasticsearch." - ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "label": "CreateRestAPIKeyParams", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "security", - "id": "def-server.InvalidateAPIKeyResult.invalidated_api_keys", - "type": "Array", + "id": "def-server.CreateRestAPIKeyParams.type", + "type": "string", "tags": [], - "label": "invalidated_api_keys", - "description": [ - "\nThe IDs of the API keys that were invalidated as part of the request." - ], + "label": "type", + "description": [], "signature": [ - "string[]" + "\"rest\" | undefined" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "security", - "id": "def-server.InvalidateAPIKeyResult.previously_invalidated_api_keys", - "type": "Array", + "id": "def-server.CreateRestAPIKeyParams.expiration", + "type": "string", "tags": [], - "label": "previously_invalidated_api_keys", - "description": [ - "\nThe IDs of the API keys that were already invalidated." - ], + "label": "expiration", + "description": [], "signature": [ - "string[]" + "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "security", - "id": "def-server.InvalidateAPIKeyResult.error_count", - "type": "number", + "id": "def-server.CreateRestAPIKeyParams.name", + "type": "string", "tags": [], - "label": "error_count", - "description": [ - "\nThe number of errors that were encountered when invalidating the API keys." - ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "label": "name", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "security", - "id": "def-server.InvalidateAPIKeyResult.error_details", - "type": "Array", + "id": "def-server.CreateRestAPIKeyParams.role_descriptors", + "type": "Object", "tags": [], - "label": "error_details", - "description": [ - "\nDetails about these errors. This field is not present in the response when error_count is 0." - ], + "label": "role_descriptors", + "description": [], "signature": [ - "{ type?: string | undefined; reason?: string | undefined; caused_by?: { type?: string | undefined; reason?: string | undefined; } | undefined; }[] | undefined" + "{ [x: string]: { [key: string]: any; }; }" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false - } + }, + { + "parentPluginId": "security", + "id": "def-server.CreateRestAPIKeyParams.metadata", + "type": "Object", + "tags": [], + "label": "metadata", + "description": [], + "signature": [ + "{ [key: string]: any; } | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "security", + "id": "def-server.CreateRestAPIKeyWithKibanaPrivilegesParams", + "type": "Interface", + "tags": [], + "label": "CreateRestAPIKeyWithKibanaPrivilegesParams", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-server.CreateRestAPIKeyWithKibanaPrivilegesParams.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"rest\" | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.CreateRestAPIKeyWithKibanaPrivilegesParams.expiration", + "type": "string", + "tags": [], + "label": "expiration", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.CreateRestAPIKeyWithKibanaPrivilegesParams.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.CreateRestAPIKeyWithKibanaPrivilegesParams.metadata", + "type": "Object", + "tags": [], + "label": "metadata", + "description": [], + "signature": [ + "{ [key: string]: any; } | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.CreateRestAPIKeyWithKibanaPrivilegesParams.kibana_role_descriptors", + "type": "Object", + "tags": [], + "label": "kibana_role_descriptors", + "description": [], + "signature": [ + "{ [x: string]: { elasticsearch: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.ElasticsearchPrivilegesType", + "text": "ElasticsearchPrivilegesType" + }, + " & { [key: string]: unknown; }; kibana: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.KibanaPrivilegesType", + "text": "KibanaPrivilegesType" + }, + "; }; }" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "security", + "id": "def-server.ElasticsearchPrivilegesType", + "type": "Interface", + "tags": [], + "label": "ElasticsearchPrivilegesType", + "description": [ + "\nType representing Elasticsearch specific portion of the role definition." + ], + "path": "packages/core/security/core-security-server/src/roles/schema.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-server.ElasticsearchPrivilegesType.cluster", + "type": "Array", + "tags": [], + "label": "cluster", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/core/security/core-security-server/src/roles/schema.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.ElasticsearchPrivilegesType.remote_cluster", + "type": "Array", + "tags": [], + "label": "remote_cluster", + "description": [], + "signature": [ + "{ privileges: string[]; clusters: string[]; }[] | undefined" + ], + "path": "packages/core/security/core-security-server/src/roles/schema.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.ElasticsearchPrivilegesType.indices", + "type": "Array", + "tags": [], + "label": "indices", + "description": [], + "signature": [ + "{ names: string[]; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; privileges: string[]; query?: string | undefined; allow_restricted_indices?: boolean | undefined; }[] | undefined" + ], + "path": "packages/core/security/core-security-server/src/roles/schema.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.ElasticsearchPrivilegesType.remote_indices", + "type": "Array", + "tags": [], + "label": "remote_indices", + "description": [], + "signature": [ + "{ clusters: string[]; names: string[]; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; privileges: string[]; query?: string | undefined; allow_restricted_indices?: boolean | undefined; }[] | undefined" + ], + "path": "packages/core/security/core-security-server/src/roles/schema.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.ElasticsearchPrivilegesType.run_as", + "type": "Array", + "tags": [], + "label": "run_as", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/core/security/core-security-server/src/roles/schema.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "security", + "id": "def-server.GrantAPIKeyResult", + "type": "Interface", + "tags": [], + "label": "GrantAPIKeyResult", + "description": [], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-server.GrantAPIKeyResult.id", + "type": "string", + "tags": [], + "label": "id", + "description": [ + "\nUnique id for this API key" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.GrantAPIKeyResult.name", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "\nName for this API key" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.GrantAPIKeyResult.api_key", + "type": "string", + "tags": [], + "label": "api_key", + "description": [ + "\nGenerated API key" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "security", + "id": "def-server.InvalidateAPIKeyResult", + "type": "Interface", + "tags": [], + "label": "InvalidateAPIKeyResult", + "description": [ + "\nThe return value when invalidating an API key in Elasticsearch." + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-server.InvalidateAPIKeyResult.invalidated_api_keys", + "type": "Array", + "tags": [], + "label": "invalidated_api_keys", + "description": [ + "\nThe IDs of the API keys that were invalidated as part of the request." + ], + "signature": [ + "string[]" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.InvalidateAPIKeyResult.previously_invalidated_api_keys", + "type": "Array", + "tags": [], + "label": "previously_invalidated_api_keys", + "description": [ + "\nThe IDs of the API keys that were already invalidated." + ], + "signature": [ + "string[]" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.InvalidateAPIKeyResult.error_count", + "type": "number", + "tags": [], + "label": "error_count", + "description": [ + "\nThe number of errors that were encountered when invalidating the API keys." + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.InvalidateAPIKeyResult.error_details", + "type": "Array", + "tags": [], + "label": "error_details", + "description": [ + "\nDetails about these errors. This field is not present in the response when error_count is 0." + ], + "signature": [ + "{ type?: string | undefined; reason?: string | undefined; caused_by?: { type?: string | undefined; reason?: string | undefined; } | undefined; }[] | undefined" + ], + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", + "deprecated": false, + "trackAdoption": false + } ], "initialIsOpen": false }, @@ -4122,7 +4583,7 @@ "description": [ "\nRepresents the params for invalidating multiple API keys" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -4132,11 +4593,13 @@ "type": "Array", "tags": [], "label": "ids", - "description": [], + "description": [ + "\nList of unique API key IDs" + ], "signature": [ "string[]" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -4734,7 +5197,7 @@ "description": [ "\nRepresents the parameters for validating API Key credentials." ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -4747,7 +5210,7 @@ "description": [ "\nUnique id for this API key" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false }, @@ -4760,7 +5223,7 @@ "description": [ "\nGenerated API Key (secret)" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false } @@ -5092,9 +5555,31 @@ "label": "CreateAPIKeyParams", "description": [], "signature": [ - "Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { name: string; role_descriptors: Record>; }> | Readonly<{ type?: \"rest\" | undefined; metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { name: string; kibana_role_descriptors: Record | undefined; } & { spaces: string[] | \"*\"[]; }>[]; elasticsearch: Readonly<{ cluster?: string[] | undefined; indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; }>[] | undefined; remote_cluster?: Readonly<{} & { privileges: string[]; clusters: string[]; }>[] | undefined; remote_indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; clusters: string[]; }>[] | undefined; run_as?: string[] | undefined; } & {}>; }>>; }> | Readonly<{ metadata?: Readonly<{} & {}> | undefined; expiration?: string | undefined; } & { type: \"cross_cluster\"; name: string; access: Readonly<{ search?: Readonly<{ query?: any; field_security?: any; allow_restricted_indices?: boolean | undefined; } & { names: string[]; }>[] | undefined; replication?: Readonly<{} & { names: string[]; }>[] | undefined; } & {}>; }>" + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyParams", + "text": "CreateRestAPIKeyParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateRestAPIKeyWithKibanaPrivilegesParams", + "text": "CreateRestAPIKeyWithKibanaPrivilegesParams" + }, + " | ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CreateCrossClusterAPIKeyParams", + "text": "CreateCrossClusterAPIKeyParams" + } ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -5111,67 +5596,7 @@ "signature": [ "SecurityCreateApiKeyResponse" ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "security", - "id": "def-server.CreateCrossClusterAPIKeyParams", - "type": "Type", - "tags": [], - "label": "CreateCrossClusterAPIKeyParams", - "description": [], - "signature": [ - "{ readonly metadata?: Readonly<{} & {}> | undefined; readonly expiration?: string | undefined; readonly type: \"cross_cluster\"; readonly name: string; readonly access: Readonly<{ search?: Readonly<{ query?: any; field_security?: any; allow_restricted_indices?: boolean | undefined; } & { names: string[]; }>[] | undefined; replication?: Readonly<{} & { names: string[]; }>[] | undefined; } & {}>; }" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "security", - "id": "def-server.CreateRestAPIKeyParams", - "type": "Type", - "tags": [], - "label": "CreateRestAPIKeyParams", - "description": [], - "signature": [ - "{ readonly type?: \"rest\" | undefined; readonly metadata?: Readonly<{} & {}> | undefined; readonly expiration?: string | undefined; readonly name: string; readonly role_descriptors: Record>; }" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "security", - "id": "def-server.CreateRestAPIKeyWithKibanaPrivilegesParams", - "type": "Type", - "tags": [], - "label": "CreateRestAPIKeyWithKibanaPrivilegesParams", - "description": [], - "signature": [ - "{ readonly type?: \"rest\" | undefined; readonly metadata?: Readonly<{} & {}> | undefined; readonly expiration?: string | undefined; readonly name: string; readonly kibana_role_descriptors: Record | undefined; } & { spaces: string[] | \"*\"[]; }>[]; elasticsearch: Readonly<{ cluster?: string[] | undefined; indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; }>[] | undefined; remote_cluster?: Readonly<{} & { privileges: string[]; clusters: string[]; }>[] | undefined; remote_indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; clusters: string[]; }>[] | undefined; run_as?: string[] | undefined; } & {}>; }>>; }" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authentication/api_keys/api_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "security", - "id": "def-server.ElasticsearchPrivilegesType", - "type": "Type", - "tags": [], - "label": "ElasticsearchPrivilegesType", - "description": [], - "signature": [ - "{ readonly cluster?: string[] | undefined; readonly indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; }>[] | undefined; readonly remote_cluster?: Readonly<{} & { privileges: string[]; clusters: string[]; }>[] | undefined; readonly remote_indices?: Readonly<{ query?: string | undefined; field_security?: Record<\"except\" | \"grant\", string[]> | undefined; allow_restricted_indices?: boolean | undefined; } & { names: string[]; privileges: string[]; clusters: string[]; }>[] | undefined; readonly run_as?: string[] | undefined; }" - ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/role_schema.ts", + "path": "packages/core/security/core-security-server/src/authentication/api_keys/api_keys.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -5182,11 +5607,13 @@ "type": "Type", "tags": [], "label": "KibanaPrivilegesType", - "description": [], + "description": [ + "\nType representing Kibana specific portion of the role definition." + ], "signature": [ - "Readonly<{ base?: string[] | undefined; feature?: Record | undefined; } & { spaces: string[] | \"*\"[]; }>[]" + "{ spaces: string[]; base?: string[] | undefined; feature?: Record | undefined; }[]" ], - "path": "x-pack/packages/security/plugin_types_server/src/authorization/role_schema.ts", + "path": "packages/core/security/core-security-server/src/roles/schema.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -5316,29 +5743,9 @@ "plugin": "ml", "path": "x-pack/plugins/ml/server/routes/annotations.ts" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/request_context_factory.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/route.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts" } ] }, @@ -5491,30 +5898,6 @@ "plugin": "enterpriseSearch", "path": "x-pack/plugins/enterprise_search/server/routes/enterprise_search/api_keys.ts" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts" - }, { "plugin": "serverlessSearch", "path": "x-pack/plugins/serverless_search/server/routes/api_key_routes.ts" @@ -5614,30 +5997,6 @@ { "plugin": "fleet", "path": "x-pack/plugins/fleet/server/routes/setup/handlers.test.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/routes/actions/state.test.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/endpoint/routes/suggestions/index.test.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.test.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts" } ] }, diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 426eb872fc138b..6fe96f75244440 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 415 | 0 | 206 | 1 | +| 438 | 0 | 222 | 1 | ## Client diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json index e07a045ba77225..b5d8334c5d5b0d 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -485,7 +485,7 @@ "\nExperimental flag needed to enable the link" ], "signature": [ - "\"assistantKnowledgeBaseByDefault\" | \"assistantModelEvaluation\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"responseActionScanEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutDisabled\" | \"securitySolutionNotesEnabled\" | \"entityAlertPreviewEnabled\" | \"newUserDetailsFlyoutManagedUser\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"AIAssistantOnRuleCreationFormEnabled\" | \"disableTimelineSaveTour\" | \"alertSuppressionForEsqlRuleEnabled\" | \"riskEnginePrivilegesRouteEnabled\" | \"alertSuppressionForMachineLearningRuleEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"prebuiltRulesCustomizationEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"aiAssistantFlyoutMode\" | \"valueListItemsModalEnabled\" | \"bulkCustomHighlightedFieldsEnabled\" | \"manualRuleRunEnabled\" | \"filterProcessDescendantsForEventFiltersEnabled\" | undefined" + "\"assistantKnowledgeBaseByDefault\" | \"assistantModelEvaluation\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"responseActionsSentinelOneKillProcessEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"responseActionScanEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutDisabled\" | \"securitySolutionNotesEnabled\" | \"entityAlertPreviewEnabled\" | \"newUserDetailsFlyoutManagedUser\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"AIAssistantOnRuleCreationFormEnabled\" | \"disableTimelineSaveTour\" | \"alertSuppressionForEsqlRuleEnabled\" | \"riskEnginePrivilegesRouteEnabled\" | \"alertSuppressionForMachineLearningRuleEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"prebuiltRulesCustomizationEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"valueListItemsModalEnabled\" | \"bulkCustomHighlightedFieldsEnabled\" | \"manualRuleRunEnabled\" | \"filterProcessDescendantsForEventFiltersEnabled\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -565,7 +565,7 @@ "\nExperimental flag needed to disable the link. Opposite of experimentalKey" ], "signature": [ - "\"assistantKnowledgeBaseByDefault\" | \"assistantModelEvaluation\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"responseActionScanEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutDisabled\" | \"securitySolutionNotesEnabled\" | \"entityAlertPreviewEnabled\" | \"newUserDetailsFlyoutManagedUser\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"AIAssistantOnRuleCreationFormEnabled\" | \"disableTimelineSaveTour\" | \"alertSuppressionForEsqlRuleEnabled\" | \"riskEnginePrivilegesRouteEnabled\" | \"alertSuppressionForMachineLearningRuleEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"prebuiltRulesCustomizationEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"aiAssistantFlyoutMode\" | \"valueListItemsModalEnabled\" | \"bulkCustomHighlightedFieldsEnabled\" | \"manualRuleRunEnabled\" | \"filterProcessDescendantsForEventFiltersEnabled\" | undefined" + "\"assistantKnowledgeBaseByDefault\" | \"assistantModelEvaluation\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"responseActionsSentinelOneKillProcessEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"responseActionScanEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutDisabled\" | \"securitySolutionNotesEnabled\" | \"entityAlertPreviewEnabled\" | \"newUserDetailsFlyoutManagedUser\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"AIAssistantOnRuleCreationFormEnabled\" | \"disableTimelineSaveTour\" | \"alertSuppressionForEsqlRuleEnabled\" | \"riskEnginePrivilegesRouteEnabled\" | \"alertSuppressionForMachineLearningRuleEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"prebuiltRulesCustomizationEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"valueListItemsModalEnabled\" | \"bulkCustomHighlightedFieldsEnabled\" | \"manualRuleRunEnabled\" | \"filterProcessDescendantsForEventFiltersEnabled\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -1964,7 +1964,7 @@ "label": "experimentalFeatures", "description": [], "signature": [ - "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly responseActionScanEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutDisabled: boolean; readonly securitySolutionNotesEnabled: boolean; readonly entityAlertPreviewEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly AIAssistantOnRuleCreationFormEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly alertSuppressionForEsqlRuleEnabled: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForMachineLearningRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; readonly manualRuleRunEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; }" + "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly responseActionScanEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutDisabled: boolean; readonly securitySolutionNotesEnabled: boolean; readonly entityAlertPreviewEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly AIAssistantOnRuleCreationFormEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly alertSuppressionForEsqlRuleEnabled: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForMachineLearningRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; readonly manualRuleRunEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/public/types.ts", "deprecated": false, @@ -3071,7 +3071,7 @@ "\nThe security solution generic experimental features" ], "signature": [ - "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly responseActionScanEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutDisabled: boolean; readonly securitySolutionNotesEnabled: boolean; readonly entityAlertPreviewEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly AIAssistantOnRuleCreationFormEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly alertSuppressionForEsqlRuleEnabled: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForMachineLearningRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; readonly manualRuleRunEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; }" + "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly responseActionScanEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutDisabled: boolean; readonly securitySolutionNotesEnabled: boolean; readonly entityAlertPreviewEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly AIAssistantOnRuleCreationFormEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly alertSuppressionForEsqlRuleEnabled: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForMachineLearningRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; readonly manualRuleRunEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/server/plugin_contract.ts", "deprecated": false, @@ -3247,7 +3247,7 @@ "label": "ExperimentalFeatures", "description": [], "signature": [ - "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly responseActionScanEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutDisabled: boolean; readonly securitySolutionNotesEnabled: boolean; readonly entityAlertPreviewEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly AIAssistantOnRuleCreationFormEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly alertSuppressionForEsqlRuleEnabled: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForMachineLearningRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; readonly manualRuleRunEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; }" + "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly responseActionScanEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutDisabled: boolean; readonly securitySolutionNotesEnabled: boolean; readonly entityAlertPreviewEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly assistantKnowledgeBaseByDefault: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly AIAssistantOnRuleCreationFormEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly alertSuppressionForEsqlRuleEnabled: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForMachineLearningRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; readonly manualRuleRunEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, @@ -3313,7 +3313,7 @@ "\nA list of allowed values that can be used in `xpack.securitySolution.enableExperimental`.\nThis object is then used to validate and parse the value entered." ], "signature": [ - "{ readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: true; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly extendedRuleExecutionLoggingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionsEnabled: true; readonly endpointResponseActionsEnabled: true; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: true; readonly responseActionsSentinelOneV1Enabled: true; readonly responseActionsSentinelOneV2Enabled: true; readonly responseActionsSentinelOneGetFileEnabled: true; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: true; readonly responseActionScanEnabled: false; readonly alertsPageChartsEnabled: true; readonly alertTypeEnabled: false; readonly expandableFlyoutDisabled: false; readonly securitySolutionNotesEnabled: false; readonly entityAlertPreviewEnabled: false; readonly assistantModelEvaluation: false; readonly assistantKnowledgeBaseByDefault: false; readonly newUserDetailsFlyoutManagedUser: false; readonly riskScoringPersistence: true; readonly riskScoringRoutesEnabled: true; readonly esqlRulesDisabled: false; readonly protectionUpdatesEnabled: true; readonly AIAssistantOnRuleCreationFormEnabled: false; readonly disableTimelineSaveTour: false; readonly alertSuppressionForEsqlRuleEnabled: false; readonly riskEnginePrivilegesRouteEnabled: true; readonly alertSuppressionForMachineLearningRuleEnabled: false; readonly sentinelOneDataInAnalyzerEnabled: true; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: true; readonly jamfDataInAnalyzerEnabled: false; readonly timelineEsqlTabDisabled: false; readonly unifiedComponentsInTimelineEnabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; readonly prebuiltRulesCustomizationEnabled: false; readonly malwareOnWriteScanOptionAvailable: true; readonly unifiedManifestEnabled: true; readonly aiAssistantFlyoutMode: true; readonly valueListItemsModalEnabled: true; readonly bulkCustomHighlightedFieldsEnabled: false; readonly manualRuleRunEnabled: false; readonly filterProcessDescendantsForEventFiltersEnabled: false; }" + "{ readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: true; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly extendedRuleExecutionLoggingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionsEnabled: true; readonly endpointResponseActionsEnabled: true; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: true; readonly responseActionsSentinelOneV1Enabled: true; readonly responseActionsSentinelOneV2Enabled: true; readonly responseActionsSentinelOneGetFileEnabled: true; readonly responseActionsSentinelOneKillProcessEnabled: false; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: true; readonly responseActionScanEnabled: false; readonly alertsPageChartsEnabled: true; readonly alertTypeEnabled: false; readonly expandableFlyoutDisabled: false; readonly securitySolutionNotesEnabled: false; readonly entityAlertPreviewEnabled: false; readonly assistantModelEvaluation: false; readonly assistantKnowledgeBaseByDefault: false; readonly newUserDetailsFlyoutManagedUser: false; readonly riskScoringPersistence: true; readonly riskScoringRoutesEnabled: true; readonly esqlRulesDisabled: false; readonly protectionUpdatesEnabled: true; readonly AIAssistantOnRuleCreationFormEnabled: false; readonly disableTimelineSaveTour: false; readonly alertSuppressionForEsqlRuleEnabled: false; readonly riskEnginePrivilegesRouteEnabled: true; readonly alertSuppressionForMachineLearningRuleEnabled: false; readonly sentinelOneDataInAnalyzerEnabled: true; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: true; readonly jamfDataInAnalyzerEnabled: false; readonly timelineEsqlTabDisabled: false; readonly unifiedComponentsInTimelineEnabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; readonly prebuiltRulesCustomizationEnabled: false; readonly malwareOnWriteScanOptionAvailable: true; readonly unifiedManifestEnabled: true; readonly valueListItemsModalEnabled: true; readonly bulkCustomHighlightedFieldsEnabled: false; readonly manualRuleRunEnabled: false; readonly filterProcessDescendantsForEventFiltersEnabled: false; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index 2beb77b8f021ad..b7b2be2be7482e 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/security_solution_ess.mdx b/api_docs/security_solution_ess.mdx index 6f910f41ef9fa7..ebb118cace66db 100644 --- a/api_docs/security_solution_ess.mdx +++ b/api_docs/security_solution_ess.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionEss title: "securitySolutionEss" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionEss plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionEss'] --- import securitySolutionEssObj from './security_solution_ess.devdocs.json'; diff --git a/api_docs/security_solution_serverless.mdx b/api_docs/security_solution_serverless.mdx index c45b80b05022b2..9553b08dccff10 100644 --- a/api_docs/security_solution_serverless.mdx +++ b/api_docs/security_solution_serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionServerless title: "securitySolutionServerless" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionServerless plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionServerless'] --- import securitySolutionServerlessObj from './security_solution_serverless.devdocs.json'; diff --git a/api_docs/serverless.mdx b/api_docs/serverless.mdx index 5edadd4df85841..57a0aa2229dee7 100644 --- a/api_docs/serverless.mdx +++ b/api_docs/serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverless title: "serverless" image: https://source.unsplash.com/400x175/?github description: API docs for the serverless plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverless'] --- import serverlessObj from './serverless.devdocs.json'; diff --git a/api_docs/serverless_observability.mdx b/api_docs/serverless_observability.mdx index a0d2eb5ba6340c..bff2ac08d57f2f 100644 --- a/api_docs/serverless_observability.mdx +++ b/api_docs/serverless_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessObservability title: "serverlessObservability" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessObservability plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessObservability'] --- import serverlessObservabilityObj from './serverless_observability.devdocs.json'; diff --git a/api_docs/serverless_search.mdx b/api_docs/serverless_search.mdx index 5caf420464062a..7b7a7522bea8c2 100644 --- a/api_docs/serverless_search.mdx +++ b/api_docs/serverless_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessSearch title: "serverlessSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessSearch plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessSearch'] --- import serverlessSearchObj from './serverless_search.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 780c2b3b45e421..c9f4cec316f79c 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index 3131c5c2c6108e..1ff559bbbd72b3 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/slo.mdx b/api_docs/slo.mdx index 1bceb41948c735..e70711708aece3 100644 --- a/api_docs/slo.mdx +++ b/api_docs/slo.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/slo title: "slo" image: https://source.unsplash.com/400x175/?github description: API docs for the slo plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'slo'] --- import sloObj from './slo.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index b12b6a9ec84e19..145d3e958e8196 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index e47eb24a3ffced..ed9a8c59472727 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index 7bd81f0d77fe70..1293d7b86b30b8 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index 0d8eeb21ffb4b1..087f7d8ac7ccab 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index cafa9df73c7d77..79ed70ae22e348 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index bd107e8ace5ae7..a4b2e92dba1520 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 156c0703d5d000..05150e6ac611e1 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index f998b3df27e236..0db1faf7d8cb42 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index c930712b12bcf1..0e37f1419e1643 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index ef23eb49129ccc..bccc09ec31398a 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index 99e3b0e874c36b..42ae21461db928 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index 2a2604e67dd170..7570d1d8f78398 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index e4b742cbd7d1f1..d461dc87124a54 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 882b2c6be20442..5fd2c4e8ccc02c 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 5aa9989c99e79d..fce6bfd75d2508 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_doc_viewer.mdx b/api_docs/unified_doc_viewer.mdx index 1caa3e13cf3c64..4fe43ee8c187e1 100644 --- a/api_docs/unified_doc_viewer.mdx +++ b/api_docs/unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedDocViewer title: "unifiedDocViewer" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedDocViewer plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedDocViewer'] --- import unifiedDocViewerObj from './unified_doc_viewer.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index e523bb984eb860..079600b222919e 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index bf5e4d88739908..d0be2830ce3ba1 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index 9be2c3796bffdf..85e0450ad4b93f 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/uptime.mdx b/api_docs/uptime.mdx index 41ab261a2f6a19..ff2be9d4589cae 100644 --- a/api_docs/uptime.mdx +++ b/api_docs/uptime.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/uptime title: "uptime" image: https://source.unsplash.com/400x175/?github description: API docs for the uptime plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uptime'] --- import uptimeObj from './uptime.devdocs.json'; This plugin visualizes data from Heartbeat, and integrates with other Observability solutions. -Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. +Contact [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 57e7235cc89b41..411863237c3737 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 57af900f407c7c..826632b661f6eb 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index 04268f31c0558c..2590939f79170b 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index 00204bf4434c2e..ed8c293707c3a8 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index 0524cbaa8be377..82e9d4bb264946 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index 88bc88e7f03a23..ef2b0c31508117 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index 90f824637708d1..6fde86032473ed 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index 986e5117524d03..05412076e4ccdb 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index f89789624e87cf..f39474618a0835 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 3f26a6dc228f4d..9263d0a13bed51 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index c32fdb26962813..fcff5b44cd7b42 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 85f6705d4d4cc2..f128139595729d 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index 62f1b17b448d9e..959b152aca56af 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 210f5acd288f13..f45a58c6bfa54e 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2024-07-09 +date: 2024-07-10 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; From 48d4d9ed2c67771a7746422a9203d0008b52b6f9 Mon Sep 17 00:00:00 2001 From: Dima Arnautov Date: Wed, 10 Jul 2024 12:01:24 +0300 Subject: [PATCH 097/103] [ML] API integration tests for `/trained_models/model_downloads` endpoint (#187865) ## Summary Part of #182235 Adds API integration tests for the `GET /internal/ml/trained_models/model_downloads` endpoint ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --- .../apis/ml/trained_models/index.ts | 1 + .../apis/ml/trained_models/model_downloads.ts | 136 ++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 x-pack/test/api_integration/apis/ml/trained_models/model_downloads.ts diff --git a/x-pack/test/api_integration/apis/ml/trained_models/index.ts b/x-pack/test/api_integration/apis/ml/trained_models/index.ts index 1bb92dca1ec565..c9bf98545e2b4d 100644 --- a/x-pack/test/api_integration/apis/ml/trained_models/index.ts +++ b/x-pack/test/api_integration/apis/ml/trained_models/index.ts @@ -15,5 +15,6 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./delete_model')); loadTestFile(require.resolve('./put_model')); loadTestFile(require.resolve('./start_stop_deployment')); + loadTestFile(require.resolve('./model_downloads')); }); } diff --git a/x-pack/test/api_integration/apis/ml/trained_models/model_downloads.ts b/x-pack/test/api_integration/apis/ml/trained_models/model_downloads.ts new file mode 100644 index 00000000000000..7954a7b31e9009 --- /dev/null +++ b/x-pack/test/api_integration/apis/ml/trained_models/model_downloads.ts @@ -0,0 +1,136 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { type NodesInfoNodeInfo } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { USER } from '../../../../functional/services/ml/security_common'; +import { getCommonRequestHeader } from '../../../../functional/services/ml/common_api'; + +export default ({ getService }: FtrProviderContext) => { + const supertest = getService('supertestWithoutAuth'); + const ml = getService('ml'); + const deployment = getService('deployment'); + const esSupertest = getService('esSupertest'); + + describe('GET trained_models/model_downloads', function () { + before(async () => { + await ml.api.initSavedObjects(); + await ml.testResources.setKibanaTimeZoneToUTC(); + }); + + after(async () => { + await ml.api.cleanMlIndices(); + }); + + it('returns the list of models available for download', async () => { + const isCloud = await deployment.isCloud(); + + const { body: mlNodesResponse } = await esSupertest.get('/_nodes/ml:true/os'); + + // Check that all ML nodes are Intel-based. + const areMlNodesIntelBased = Object.values( + mlNodesResponse.nodes as Record + ).every((node) => node.os?.name === 'Linux' && node.os?.arch === 'amd64'); + + const isIntelBased = isCloud || areMlNodesIntelBased; + + const { body, status } = await supertest + .get(`/internal/ml/trained_models/model_downloads`) + .auth(USER.ML_POWERUSER, ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER)) + .set(getCommonRequestHeader('1')); + ml.api.assertResponseStatusCode(200, status, body); + + expect(body.length).to.eql(5); + + expect(body).to.eql([ + { + modelName: 'elser', + hidden: true, + version: 1, + config: { + input: { + field_names: ['text_field'], + }, + }, + description: 'Elastic Learned Sparse EncodeR v1 (Tech Preview)', + type: ['elastic', 'pytorch', 'text_expansion'], + model_id: '.elser_model_1', + }, + { + modelName: 'elser', + version: 2, + config: { + input: { + field_names: ['text_field'], + }, + }, + description: 'Elastic Learned Sparse EncodeR v2', + type: ['elastic', 'pytorch', 'text_expansion'], + model_id: '.elser_model_2', + ...(isIntelBased ? { default: true } : { recommended: true }), + }, + { + modelName: 'elser', + version: 2, + os: 'Linux', + arch: 'amd64', + config: { + input: { + field_names: ['text_field'], + }, + }, + description: 'Elastic Learned Sparse EncodeR v2, optimized for linux-x86_64', + type: ['elastic', 'pytorch', 'text_expansion'], + model_id: '.elser_model_2_linux-x86_64', + ...(isIntelBased ? { recommended: true } : {}), + }, + { + modelName: 'e5', + version: 1, + config: { + input: { + field_names: ['text_field'], + }, + }, + description: 'E5 (EmbEddings from bidirEctional Encoder rEpresentations)', + license: 'MIT', + licenseUrl: 'https://huggingface.co/elastic/multilingual-e5-small', + type: ['pytorch', 'text_embedding'], + model_id: '.multilingual-e5-small', + ...(isIntelBased ? { default: true } : { recommended: true }), + }, + { + modelName: 'e5', + version: 1, + os: 'Linux', + arch: 'amd64', + config: { + input: { + field_names: ['text_field'], + }, + }, + description: + 'E5 (EmbEddings from bidirEctional Encoder rEpresentations), optimized for linux-x86_64', + license: 'MIT', + licenseUrl: 'https://huggingface.co/elastic/multilingual-e5-small_linux-x86_64', + type: ['pytorch', 'text_embedding'], + model_id: '.multilingual-e5-small_linux-x86_64', + ...(isIntelBased ? { recommended: true } : {}), + }, + ]); + }); + + it('returns an error for unauthorized user', async () => { + const { body, status } = await supertest + .get(`/internal/ml/trained_models/model_downloads`) + .auth(USER.ML_UNAUTHORIZED, ml.securityCommon.getPasswordForUser(USER.ML_UNAUTHORIZED)) + .set(getCommonRequestHeader('1')); + ml.api.assertResponseStatusCode(403, status, body); + }); + }); +}; From 657ea46c72ccbe4c6b8be2892546cdf3b26dc8fc Mon Sep 17 00:00:00 2001 From: mohamedhamed-ahmed Date: Wed, 10 Jul 2024 12:33:25 +0300 Subject: [PATCH 098/103] [Dataset Quality] Filter out irrelevant breakdown fields (#187900) closes https://github.com/elastic/kibana/issues/187898 --- .../dataset_quality/public/hooks/use_degraded_docs_chart.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.tsx index 03da29c7e04eab..9d459f8227a402 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.tsx @@ -14,7 +14,6 @@ import { useEuiTheme } from '@elastic/eui'; import { type DataView, DataViewField } from '@kbn/data-views-plugin/common'; import { useDatasetQualityContext } from '../components/dataset_quality/context'; import { DEFAULT_LOGS_DATA_VIEW } from '../../common/constants'; -import { indexNameToDataStreamParts } from '../../common/utils'; import { getLensAttributes } from '../components/flyout/degraded_docs_trend/lens_attributes'; import { useCreateDataView } from './use_create_dataview'; import { useRedirectLink } from './use_redirect_link'; @@ -193,7 +192,7 @@ export const useDegradedDocsChart = ({ dataStream }: DegradedDocsChartDeps) => { }; function getDataViewIndexPattern(dataStream: string | undefined) { - return dataStream ? `${indexNameToDataStreamParts(dataStream).type}-*-*` : DEFAULT_LOGS_DATA_VIEW; + return dataStream ?? DEFAULT_LOGS_DATA_VIEW; } function getDataViewField(dataView: DataView | undefined, fieldName: string | undefined) { From 7517bdc54c27e1d6e99cc6a462e35bc41f3ec0ae Mon Sep 17 00:00:00 2001 From: Jeramy Soucy Date: Wed, 10 Jul 2024 11:50:26 +0200 Subject: [PATCH 099/103] Adds link to ESO developer documentation in nav (#187867) ## Summary Adds link to the new encrypted saved objects developer documentation in the left hand navigation under "key concepts". --- nav-kibana-dev.docnav.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nav-kibana-dev.docnav.json b/nav-kibana-dev.docnav.json index 050aee9d2e972a..60d0494de9c717 100644 --- a/nav-kibana-dev.docnav.json +++ b/nav-kibana-dev.docnav.json @@ -80,6 +80,10 @@ "id": "kibDevDocsSavedObjectsIntro", "label": "Saved objects" }, + { + "id": "kibDevDocsEncryptedSavedObjectsIntro", + "label": "Encrypted Saved objects" + }, { "id": "kibDevDocsPersistableStateIntro" }, @@ -614,4 +618,4 @@ ] } ] -} +} \ No newline at end of file From 59d58721d854c7d114444b5bbd9ebe7579ec8d53 Mon Sep 17 00:00:00 2001 From: Pierre Gayvallet Date: Wed, 10 Jul 2024 11:58:29 +0200 Subject: [PATCH 100/103] Get rid of the infamous `10s` delay in Core's integration tests (#187858) ## Summary Fix https://github.com/elastic/kibana/issues/130240 --- .../migrations/group1/7_13_0_failed_action_tasks.test.ts | 2 -- .../migrations/group1/7_13_0_unknown_types.test.ts | 2 -- .../saved_objects/migrations/group2/batch_size_bytes.test.ts | 2 -- .../group2/batch_size_bytes_exceeds_es_content_length.test.ts | 2 -- .../migrations/group2/check_target_mappings.test.ts | 3 --- .../saved_objects/migrations/group2/cleanup.test.ts | 3 +-- .../migrations/group2/collects_corrupt_docs.test.ts | 2 -- .../migrations/group2/corrupt_outdated_docs.test.ts | 2 -- .../migrations/group2/multiple_kibana_nodes.test.ts | 1 - .../saved_objects/migrations/group2/outdated_docs.test.ts | 2 -- .../migrations/group3/deferred_migrations.test.ts | 2 -- .../migrations/group3/migration_from_older_v1.test.ts | 2 -- .../saved_objects/migrations/group3/multiple_es_nodes.test.ts | 4 ---- .../saved_objects/migrations/group3/read_batch_size.test.ts | 2 -- .../saved_objects/migrations/group3/rewriting_id.test.ts | 2 -- .../saved_objects/migrations/group3/skip_migration.test.ts | 2 -- .../migrations/group3/wait_for_migration_completion.test.ts | 2 -- .../saved_objects/migrations/group4/v2_md5_to_mv.test.ts | 3 +-- .../migrations/group4/v2_with_mv_same_stack_version.test.ts | 3 +-- .../migrations/group4/v2_with_mv_stack_version_bump.test.ts | 3 +-- .../saved_objects/migrations/group5/active_delete.test.ts | 2 -- .../group5/active_delete_multiple_instances.test.ts | 2 -- .../saved_objects/migrations/group5/skip_reindex.test.ts | 2 -- .../migrations/shared_suites/zdt/basic_document_migration.ts | 3 +-- .../migrations/shared_suites/zdt/standard_workflow.ts | 3 +-- .../saved_objects/migrations/zdt_1/basic_downgrade.test.ts | 3 +-- .../migrations/zdt_1/conversion_failures.test.ts | 3 +-- .../saved_objects/migrations/zdt_1/create_index.test.ts | 3 +-- .../saved_objects/migrations/zdt_1/document_cleanup.test.ts | 2 -- .../migrations/zdt_1/mapping_version_conflict.test.ts | 3 +-- .../saved_objects/migrations/zdt_1/rerun_same_version.test.ts | 3 +-- .../saved_objects/migrations/zdt_1/update_mappings.test.ts | 3 +-- .../saved_objects/migrations/zdt_2/outdated_doc_query.test.ts | 3 +-- .../migrations/zdt_2/root_field_addition.test.ts | 3 +-- .../saved_objects/migrations/zdt_2/type_addition.test.ts | 3 +-- .../migrations/zdt_2/v2_to_zdt_partial_failure.test.ts | 3 +-- .../saved_objects/migrations/zdt_2/v2_to_zdt_switch.test.ts | 3 +-- .../migrations/zdt_v2_compat/basic_document_migration.test.ts | 3 +-- .../migrations/zdt_v2_compat/create_index.test.ts | 3 +-- .../migrations/zdt_v2_compat/switch_to_model_version.test.ts | 3 +-- .../migrations/zdt_v2_compat/update_mappings.test.ts | 3 +-- .../saved_objects/service/lib/bulk_update.test.ts | 2 -- .../saved_objects/service/lib/update.test.ts | 2 -- .../saved_objects/validation/validator.test.ts | 2 -- 44 files changed, 21 insertions(+), 90 deletions(-) diff --git a/src/core/server/integration_tests/saved_objects/migrations/group1/7_13_0_failed_action_tasks.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group1/7_13_0_failed_action_tasks.test.ts index 89478ea377f6c9..16e0043062a631 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group1/7_13_0_failed_action_tasks.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group1/7_13_0_failed_action_tasks.test.ts @@ -57,8 +57,6 @@ describe('migration from 7.13 to 7.14+ with many failed action_tasks', () => { if (esServer) { await esServer.stop(); } - - await new Promise((resolve) => setTimeout(resolve, 10000)); }); const getCounts = async ( diff --git a/src/core/server/integration_tests/saved_objects/migrations/group1/7_13_0_unknown_types.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group1/7_13_0_unknown_types.test.ts index 6b06337a367db9..d9c4f0d7f33aed 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group1/7_13_0_unknown_types.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group1/7_13_0_unknown_types.test.ts @@ -58,8 +58,6 @@ describe('migration v2', () => { if (esServer) { await esServer.stop(); } - - await new Promise((resolve) => setTimeout(resolve, 10000)); }); describe('when `discardUnknownObjects` does not match current kibana version', () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/batch_size_bytes.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group2/batch_size_bytes.test.ts index bea50cf32ce351..e6c3ad412e7464 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group2/batch_size_bytes.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group2/batch_size_bytes.test.ts @@ -89,8 +89,6 @@ describe('migration v2', () => { if (esServer) { await esServer.stop(); } - - await new Promise((resolve) => setTimeout(resolve, 10000)); }); it('completes the migration even when a full batch would exceed ES http.max_content_length', async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/batch_size_bytes_exceeds_es_content_length.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group2/batch_size_bytes_exceeds_es_content_length.test.ts index 95baed313bd8c2..4cdc89006c9831 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group2/batch_size_bytes_exceeds_es_content_length.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group2/batch_size_bytes_exceeds_es_content_length.test.ts @@ -58,8 +58,6 @@ describe('migration v2', () => { if (esServer) { await esServer.stop(); } - - await new Promise((resolve) => setTimeout(resolve, 10000)); }); it('fails with a descriptive message when maxBatchSizeBytes exceeds ES http.max_content_length', async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/check_target_mappings.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group2/check_target_mappings.test.ts index e79084ebdc34a1..600a00e24e9fdb 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group2/check_target_mappings.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group2/check_target_mappings.test.ts @@ -17,7 +17,6 @@ import { createTestServers, type TestElasticsearchUtils, } from '@kbn/core-test-helpers-kbn-server'; -import { delay } from '../test_utils'; const logFilePath = Path.join(__dirname, 'check_target_mappings.log'); @@ -33,7 +32,6 @@ describe('migration v2 - CHECK_TARGET_MAPPINGS', () => { afterEach(async () => { await root?.shutdown(); await esServer?.stop(); - await delay(10); }); it('is not run for new installations', async () => { @@ -80,7 +78,6 @@ describe('migration v2 - CHECK_TARGET_MAPPINGS', () => { // stop Kibana and remove logs await root.shutdown(); - await delay(10); await fs.unlink(logFilePath).catch(() => {}); root = createRoot(); diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/cleanup.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group2/cleanup.test.ts index 7f04f37589f69d..7c93c1477cf4a7 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group2/cleanup.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group2/cleanup.test.ts @@ -13,7 +13,7 @@ import JSON5 from 'json5'; import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import { SavedObjectsType } from '@kbn/core-saved-objects-server'; import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; -import { getMigrationDocLink, delay } from '../test_utils'; +import { getMigrationDocLink } from '../test_utils'; import { clearLog, currentVersion, @@ -71,7 +71,6 @@ describe('migration v2', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); }); diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/collects_corrupt_docs.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group2/collects_corrupt_docs.test.ts index 45b28e8ac3082f..dbc5ea193ad560 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group2/collects_corrupt_docs.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group2/collects_corrupt_docs.test.ts @@ -42,8 +42,6 @@ describe('migration v2 with corrupt saved object documents', () => { if (esServer) { await esServer.stop(); } - - await new Promise((resolve) => setTimeout(resolve, 10000)); }); it('collects corrupt saved object documents across batches', async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/corrupt_outdated_docs.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group2/corrupt_outdated_docs.test.ts index 384cdcbfa8abda..728625003637e3 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group2/corrupt_outdated_docs.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group2/corrupt_outdated_docs.test.ts @@ -40,8 +40,6 @@ describe('migration v2 with corrupt saved object documents', () => { if (esServer) { await esServer.stop(); } - - await new Promise((resolve) => setTimeout(resolve, 10000)); }); it.skip('collects corrupt saved object documents across batches', async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kibana_nodes.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kibana_nodes.test.ts index 80d75d757ca4d8..d82863f01928c1 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kibana_nodes.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kibana_nodes.test.ts @@ -171,7 +171,6 @@ describe.skip('migration v2', () => { if (esServer) { await esServer.stop(); - await delay(10000); } }); diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/outdated_docs.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group2/outdated_docs.test.ts index 79a76c72adefcc..e7579a7ce4a912 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group2/outdated_docs.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group2/outdated_docs.test.ts @@ -41,8 +41,6 @@ describe('migration v2', () => { if (esServer) { await esServer.stop(); } - - await new Promise((resolve) => setTimeout(resolve, 10000)); }); it('migrates the documents to the highest version', async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/deferred_migrations.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group3/deferred_migrations.test.ts index 8a40466ee2588d..41c9501d7e6b2d 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group3/deferred_migrations.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group3/deferred_migrations.test.ts @@ -12,7 +12,6 @@ import type { SavedObjectsType, SavedObjectUnsanitizedDoc, } from '@kbn/core-saved-objects-server'; -import { delay } from '../test_utils'; import '../jest_matchers'; import { @@ -36,7 +35,6 @@ describe('deferred migrations', () => { afterAll(async () => { await server?.stop(); - await delay(10); }); beforeEach(async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/migration_from_older_v1.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group3/migration_from_older_v1.test.ts index d32c2f0902b4ef..45ffbb709854c2 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group3/migration_from_older_v1.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group3/migration_from_older_v1.test.ts @@ -170,8 +170,6 @@ describe('migrating from 7.3.0-xpack which used v1 migrations', () => { if (esServer) { await esServer.stop(); } - - await new Promise((resolve) => setTimeout(resolve, 10000)); }; beforeAll(async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/multiple_es_nodes.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group3/multiple_es_nodes.test.ts index e4350c431977b7..73e31881b0a914 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group3/multiple_es_nodes.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group3/multiple_es_nodes.test.ts @@ -103,10 +103,6 @@ describe('migration v2', () => { await removeLogFile(); }); - afterAll(async () => { - await new Promise((resolve) => setTimeout(resolve, 10000)); - }); - afterEach(async () => { if (root) { await root.shutdown(); diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/read_batch_size.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group3/read_batch_size.test.ts index 0fce643975c533..3a91a8477d4e5e 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group3/read_batch_size.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group3/read_batch_size.test.ts @@ -13,7 +13,6 @@ import { createRootWithCorePlugins, type TestElasticsearchUtils, } from '@kbn/core-test-helpers-kbn-server'; -import { delay } from '../test_utils'; import { startElasticsearch } from '../kibana_migrator_test_kit'; const logFilePath = Path.join(__dirname, 'read_batch_size.log'); @@ -33,7 +32,6 @@ describe('migration v2 - read batch size', () => { afterEach(async () => { await root?.shutdown(); await esServer?.stop(); - await delay(10); }); it('reduces the read batchSize in half if a batch exceeds maxReadBatchSizeBytes', async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/rewriting_id.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group3/rewriting_id.test.ts index 6079469cf49822..70768bd3f7009d 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group3/rewriting_id.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group3/rewriting_id.test.ts @@ -108,8 +108,6 @@ describe('migration v2', () => { if (esServer) { await esServer.stop(); } - - await new Promise((resolve) => setTimeout(resolve, 10000)); }); it('rewrites id deterministically for SO with namespaceType: "multiple" and "multiple-isolated"', async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/skip_migration.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group3/skip_migration.test.ts index e24c50d2cb4c96..54ac46754acc44 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group3/skip_migration.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group3/skip_migration.test.ts @@ -71,8 +71,6 @@ describe('starting with `migration.skip: true` when indices are up to date', () if (esServer) { await esServer.stop(); } - - await new Promise((resolve) => setTimeout(resolve, 10000)); }); it('starts and display the correct service status', async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/wait_for_migration_completion.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group3/wait_for_migration_completion.test.ts index 459cfc921badf0..266e821abf7e32 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group3/wait_for_migration_completion.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group3/wait_for_migration_completion.test.ts @@ -40,8 +40,6 @@ describe('migration with waitForCompletion=true', () => { if (esServer) { await esServer.stop(); } - - await new Promise((resolve) => setTimeout(resolve, 10000)); }); it('waits for another instance to complete the migration', async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group4/v2_md5_to_mv.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group4/v2_md5_to_mv.test.ts index 4e1cb4d06e38f8..1277370f45835b 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group4/v2_md5_to_mv.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group4/v2_md5_to_mv.test.ts @@ -19,7 +19,7 @@ import { readLog, startElasticsearch, } from '../kibana_migrator_test_kit'; -import { delay, createType } from '../test_utils'; +import { createType } from '../test_utils'; import '../jest_matchers'; const logFilePath = Path.join(__dirname, 'v2_md5_to_mv.test.log'); @@ -270,6 +270,5 @@ describe('V2 algorithm', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); }); diff --git a/src/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_same_stack_version.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_same_stack_version.test.ts index bfc105ee7d160c..ba4a19de81741f 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_same_stack_version.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_same_stack_version.test.ts @@ -14,7 +14,7 @@ import { SavedObjectsBulkCreateObject } from '@kbn/core-saved-objects-api-server import { modelVersionToVirtualVersion } from '@kbn/core-saved-objects-base-server-internal'; import '../jest_matchers'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, createType, parseLogFile } from '../test_utils'; +import { createType, parseLogFile } from '../test_utils'; import { getBaseMigratorParams } from '../fixtures/zdt_base.fixtures'; const logFilePath = Path.join(__dirname, 'v2_with_mv_same_stack_version.test.log'); @@ -31,7 +31,6 @@ describe('V2 algorithm - using model versions - upgrade without stack version in afterAll(async () => { await esServer?.stop(); - await delay(10); }); const getTestModelVersionType = ({ beforeUpgrade }: { beforeUpgrade: boolean }) => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_stack_version_bump.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_stack_version_bump.test.ts index 7a5d8a686f084e..f24dc6fd427fe9 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_stack_version_bump.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_stack_version_bump.test.ts @@ -14,7 +14,7 @@ import { SavedObjectsBulkCreateObject } from '@kbn/core-saved-objects-api-server import { modelVersionToVirtualVersion } from '@kbn/core-saved-objects-base-server-internal'; import '../jest_matchers'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, createType, parseLogFile } from '../test_utils'; +import { createType, parseLogFile } from '../test_utils'; import { getBaseMigratorParams } from '../fixtures/zdt_base.fixtures'; const logFilePath = Path.join(__dirname, 'v2_with_mv_stack_version_bump.test.log'); @@ -31,7 +31,6 @@ describe('V2 algorithm - using model versions - stack version bump scenario', () afterAll(async () => { await esServer?.stop(); - await delay(10); }); const getTestSwitchType = ({ beforeUpgrade }: { beforeUpgrade: boolean }) => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group5/active_delete.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group5/active_delete.test.ts index d950129dac69a0..cd1a98fa3ee578 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group5/active_delete.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group5/active_delete.test.ts @@ -22,7 +22,6 @@ import { getIncompatibleMappingsMigrator, getNonDeprecatedMappingsMigrator, } from '../kibana_migrator_test_kit'; -import { delay } from '../test_utils'; describe('when upgrading to a new stack version', () => { let esServer: TestElasticsearchUtils['es']; @@ -34,7 +33,6 @@ describe('when upgrading to a new stack version', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); describe('if the mappings match (diffMappings() === false)', () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group5/active_delete_multiple_instances.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group5/active_delete_multiple_instances.test.ts index e297b39847f10c..e0233cccb3fb7b 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group5/active_delete_multiple_instances.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group5/active_delete_multiple_instances.test.ts @@ -23,7 +23,6 @@ import { startElasticsearch, } from '../kibana_migrator_test_kit'; import { baselineTypes } from './active_delete.fixtures'; -import { delay } from '../test_utils'; import { createBaselineArchive } from '../kibana_migrator_archive_utils'; const PARALLEL_MIGRATORS = 6; @@ -146,7 +145,6 @@ describe('multiple migrator instances running in parallel', () => { afterAll(async () => { // await esClient?.indices.delete({ index: `${kibanaIndex}_${currentVersion}_001` }); await esServer?.stop(); - await delay(10); }); const getAggregatedTypesCount = async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/group5/skip_reindex.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group5/skip_reindex.test.ts index 4d244314d3acb8..b93f96671d96ff 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group5/skip_reindex.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group5/skip_reindex.test.ts @@ -20,7 +20,6 @@ import { startElasticsearch, KibanaMigratorTestKit, } from '../kibana_migrator_test_kit'; -import { delay } from '../test_utils'; describe('when migrating to a new version', () => { let esServer: TestElasticsearchUtils['es']; @@ -144,6 +143,5 @@ describe('when migrating to a new version', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); }); diff --git a/src/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/basic_document_migration.ts b/src/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/basic_document_migration.ts index 0c43a40478d03b..9e3d01dd0ecec6 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/basic_document_migration.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/basic_document_migration.ts @@ -11,7 +11,7 @@ import { range, sortBy } from 'lodash'; import { SavedObjectsBulkCreateObject } from '@kbn/core-saved-objects-api-server'; import '../../jest_matchers'; import { getKibanaMigratorTestKit } from '../../kibana_migrator_test_kit'; -import { delay, parseLogFile } from '../../test_utils'; +import { parseLogFile } from '../../test_utils'; import { EsRunner, EsServer } from '../../test_types'; import { getBaseMigratorParams, @@ -35,7 +35,6 @@ export function createBasicDocumentsMigrationTest({ afterAll(async () => { await esServer?.stop(); - await delay(10); }); const createBaseline = async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/standard_workflow.ts b/src/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/standard_workflow.ts index b22e522d1d2c14..f0709e8720ce76 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/standard_workflow.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/standard_workflow.ts @@ -11,7 +11,7 @@ import { range } from 'lodash'; import { SavedObjectsBulkCreateObject } from '@kbn/core-saved-objects-api-server'; import '../../jest_matchers'; import { getKibanaMigratorTestKit } from '../../kibana_migrator_test_kit'; -import { delay, parseLogFile } from '../../test_utils'; +import { parseLogFile } from '../../test_utils'; import { EsRunner, EsServer } from '../../test_types'; import { getBaseMigratorParams, @@ -36,7 +36,6 @@ export function createStandardWorkflowTest({ afterAll(async () => { await esServer?.stop(); - await delay(10); }); const createBaseline = async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/basic_downgrade.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_1/basic_downgrade.test.ts index 8968fe7bac4084..c541f57a6111a0 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/basic_downgrade.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_1/basic_downgrade.test.ts @@ -13,7 +13,7 @@ import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import { SavedObjectsBulkCreateObject } from '@kbn/core-saved-objects-api-server'; import '../jest_matchers'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, parseLogFile, createType } from '../test_utils'; +import { parseLogFile, createType } from '../test_utils'; import { getBaseMigratorParams } from '../fixtures/zdt_base.fixtures'; export const logFilePath = Path.join(__dirname, 'basic_downgrade.test.log'); @@ -28,7 +28,6 @@ describe('ZDT upgrades - basic downgrade', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); const typeV1 = createType({ diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/conversion_failures.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_1/conversion_failures.test.ts index 05f8f30edacc6d..b9821dc62442b0 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/conversion_failures.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_1/conversion_failures.test.ts @@ -13,7 +13,7 @@ import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import { SavedObjectsBulkCreateObject } from '@kbn/core-saved-objects-api-server'; import '../jest_matchers'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, parseLogFile } from '../test_utils'; +import { parseLogFile } from '../test_utils'; import { getBaseMigratorParams, getSampleAType, @@ -31,7 +31,6 @@ describe('ZDT upgrades - encountering conversion failures', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); beforeEach(async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/create_index.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_1/create_index.test.ts index f0b049b8307db1..6f12311009e215 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/create_index.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_1/create_index.test.ts @@ -11,7 +11,7 @@ import fs from 'fs/promises'; import '../jest_matchers'; import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, parseLogFile } from '../test_utils'; +import { parseLogFile } from '../test_utils'; import { getBaseMigratorParams, getFooType, getBarType } from '../fixtures/zdt_base.fixtures'; export const logFilePath = Path.join(__dirname, 'create_index.test.log'); @@ -26,7 +26,6 @@ describe('ZDT upgrades - running on a fresh cluster', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); it('create the index with the correct mappings and meta', async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/document_cleanup.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_1/document_cleanup.test.ts index ab707f792fbe93..e0341915c7dd32 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/document_cleanup.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_1/document_cleanup.test.ts @@ -13,7 +13,6 @@ import { SearchResponse } from '@elastic/elasticsearch/lib/api/types'; import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import { SavedObjectsBulkCreateObject } from '@kbn/core-saved-objects-api-server'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay } from '../test_utils'; import { getBaseMigratorParams, getDeletedType, @@ -35,7 +34,6 @@ describe('ZDT upgrades - document cleanup', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); const createBaseline = async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/mapping_version_conflict.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_1/mapping_version_conflict.test.ts index 7b0658fbd977ec..a19db9811462c8 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/mapping_version_conflict.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_1/mapping_version_conflict.test.ts @@ -11,7 +11,7 @@ import fs from 'fs/promises'; import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import '../jest_matchers'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, parseLogFile } from '../test_utils'; +import { parseLogFile } from '../test_utils'; import { getBaseMigratorParams, getFooType, @@ -33,7 +33,6 @@ describe('ZDT upgrades - mapping model version conflict', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); const createBaseline = async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/rerun_same_version.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_1/rerun_same_version.test.ts index 398a133bf990a1..6c4d8688450bf3 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/rerun_same_version.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_1/rerun_same_version.test.ts @@ -11,7 +11,7 @@ import fs from 'fs/promises'; import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import '../jest_matchers'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, parseLogFile } from '../test_utils'; +import { parseLogFile } from '../test_utils'; import { getBaseMigratorParams, getFooType, getBarType } from '../fixtures/zdt_base.fixtures'; export const logFilePath = Path.join(__dirname, 'rerun_same_version.test.log'); @@ -26,7 +26,6 @@ describe('ZDT upgrades - rerun migration on same version', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); const createBaseline = async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/update_mappings.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_1/update_mappings.test.ts index c51c712f34452f..82ff0a1c0d5ecb 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/update_mappings.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_1/update_mappings.test.ts @@ -11,7 +11,7 @@ import fs from 'fs/promises'; import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import '../jest_matchers'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, parseLogFile } from '../test_utils'; +import { parseLogFile } from '../test_utils'; import { getBaseMigratorParams, getFooType, @@ -31,7 +31,6 @@ describe('ZDT upgrades - basic mapping update', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); const createBaseline = async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/outdated_doc_query.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_2/outdated_doc_query.test.ts index cc901b56f3818d..f403fe6c3579a8 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/outdated_doc_query.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_2/outdated_doc_query.test.ts @@ -12,7 +12,7 @@ import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import '../jest_matchers'; import { SavedObjectsModelVersionMap, SavedObject } from '@kbn/core-saved-objects-server'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, createType } from '../test_utils'; +import { createType } from '../test_utils'; import { getBaseMigratorParams } from '../fixtures/zdt_base.fixtures'; import { SavedObjectsSerializer, @@ -114,7 +114,6 @@ describe('getOutdatedDocumentsQuery', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); it('creates a query returning the expected documents', async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/root_field_addition.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_2/root_field_addition.test.ts index 47f853187b18fc..1ce530a9c46c11 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/root_field_addition.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_2/root_field_addition.test.ts @@ -27,7 +27,7 @@ import fs from 'fs/promises'; import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import '../jest_matchers'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, parseLogFile } from '../test_utils'; +import { parseLogFile } from '../test_utils'; import { getBaseMigratorParams, getFooType } from '../fixtures/zdt_base.fixtures'; export const logFilePath = Path.join(__dirname, 'root_field_addition.test.log'); @@ -42,7 +42,6 @@ describe('ZDT upgrades - introducing new root fields', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); const baseMappings = { diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/type_addition.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_2/type_addition.test.ts index 61697df6ecef6c..770fade1d436c8 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/type_addition.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_2/type_addition.test.ts @@ -11,7 +11,7 @@ import fs from 'fs/promises'; import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import '../jest_matchers'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, parseLogFile } from '../test_utils'; +import { parseLogFile } from '../test_utils'; import { getBaseMigratorParams, getFooType, getBarType } from '../fixtures/zdt_base.fixtures'; export const logFilePath = Path.join(__dirname, 'type_addition.test.log'); @@ -26,7 +26,6 @@ describe('ZDT upgrades - introducing a new SO type', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); const createBaseline = async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_partial_failure.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_partial_failure.test.ts index 0cfebd3d8514be..fb3c11e68299f8 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_partial_failure.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_partial_failure.test.ts @@ -13,7 +13,7 @@ import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import { SavedObjectsBulkCreateObject } from '@kbn/core-saved-objects-api-server'; import '../jest_matchers'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, parseLogFile, createType } from '../test_utils'; +import { parseLogFile, createType } from '../test_utils'; import { getBaseMigratorParams, noopMigration } from '../fixtures/zdt_base.fixtures'; const logFilePath = Path.join(__dirname, 'v2_to_zdt_partial_failure.test.log'); @@ -28,7 +28,6 @@ describe('ZDT with v2 compat - recovering from partially migrated state', () => afterAll(async () => { await esServer?.stop(); - await delay(10); }); const typeBefore = createType({ diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_switch.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_switch.test.ts index 4a92a9d14eef48..dfbe0aeba88669 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_switch.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_switch.test.ts @@ -18,7 +18,7 @@ import { startElasticsearch, currentVersion, } from '../kibana_migrator_test_kit'; -import { delay, parseLogFile } from '../test_utils'; +import { parseLogFile } from '../test_utils'; import { getBaseMigratorParams, getSampleAType } from '../fixtures/zdt_base.fixtures'; export const logFilePath = Path.join(__dirname, 'v2_to_zdt_switch.test.log'); @@ -35,7 +35,6 @@ describe('ZDT upgrades - switching from v2 algorithm', () => { afterEach(async () => { await esServer?.stop(); - await delay(10); }); const createBaseline = async ({ diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/basic_document_migration.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/basic_document_migration.test.ts index c71ca527f12709..5bd16f0110c633 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/basic_document_migration.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/basic_document_migration.test.ts @@ -13,7 +13,7 @@ import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import { SavedObjectsBulkCreateObject } from '@kbn/core-saved-objects-api-server'; import '../jest_matchers'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, parseLogFile } from '../test_utils'; +import { parseLogFile } from '../test_utils'; import { getBaseMigratorParams, getSampleAType, @@ -32,7 +32,6 @@ describe('ZDT with v2 compat - basic document migration', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); const createBaseline = async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/create_index.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/create_index.test.ts index 6f1b8257ddb26f..d9f76907087beb 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/create_index.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/create_index.test.ts @@ -11,7 +11,7 @@ import fs from 'fs/promises'; import '../jest_matchers'; import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, parseLogFile } from '../test_utils'; +import { parseLogFile } from '../test_utils'; import { getBaseMigratorParams, getFooType, getLegacyType } from '../fixtures/zdt_base.fixtures'; const logFilePath = Path.join(__dirname, 'create_index.test.log'); @@ -26,7 +26,6 @@ describe('ZDT with v2 compat - running on a fresh cluster', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); it('create the index with the correct mappings and meta', async () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/switch_to_model_version.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/switch_to_model_version.test.ts index 1aa65bc1cdd029..fa72c8f1edae89 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/switch_to_model_version.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/switch_to_model_version.test.ts @@ -13,7 +13,7 @@ import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import { SavedObjectsBulkCreateObject } from '@kbn/core-saved-objects-api-server'; import '../jest_matchers'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, parseLogFile, createType } from '../test_utils'; +import { parseLogFile, createType } from '../test_utils'; import { getBaseMigratorParams, noopMigration } from '../fixtures/zdt_base.fixtures'; const logFilePath = Path.join(__dirname, 'switch_to_model_version.test.log'); @@ -28,7 +28,6 @@ describe('ZDT with v2 compat - type switching from migration to model version', afterAll(async () => { await esServer?.stop(); - await delay(10); }); const typeBefore = createType({ diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/update_mappings.test.ts b/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/update_mappings.test.ts index 0c4956105fc783..9f3e58d6812fa4 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/update_mappings.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/update_mappings.test.ts @@ -11,7 +11,7 @@ import fs from 'fs/promises'; import { type TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'; import '../jest_matchers'; import { getKibanaMigratorTestKit, startElasticsearch } from '../kibana_migrator_test_kit'; -import { delay, parseLogFile } from '../test_utils'; +import { parseLogFile } from '../test_utils'; import { getBaseMigratorParams, getFooType, @@ -32,7 +32,6 @@ describe('ZDT with v2 compat - basic mapping update', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); const createBaseline = async () => { diff --git a/src/core/server/integration_tests/saved_objects/service/lib/bulk_update.test.ts b/src/core/server/integration_tests/saved_objects/service/lib/bulk_update.test.ts index 98af19ec5c9d0e..4cd661add5053a 100644 --- a/src/core/server/integration_tests/saved_objects/service/lib/bulk_update.test.ts +++ b/src/core/server/integration_tests/saved_objects/service/lib/bulk_update.test.ts @@ -17,7 +17,6 @@ import { getKibanaMigratorTestKit, startElasticsearch, } from '../../migrations/kibana_migrator_test_kit'; -import { delay } from '../../migrations/test_utils'; import { getBaseMigratorParams } from '../../migrations/fixtures/zdt_base.fixtures'; export const logFilePath = Path.join(__dirname, 'bulk_update.test.log'); @@ -32,7 +31,6 @@ describe('SOR - bulk_update API', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); const getCrossVersionType = (version: 'v1' | 'v2'): SavedObjectsType => { diff --git a/src/core/server/integration_tests/saved_objects/service/lib/update.test.ts b/src/core/server/integration_tests/saved_objects/service/lib/update.test.ts index f9205086ceb2ee..b4c9c912f73312 100644 --- a/src/core/server/integration_tests/saved_objects/service/lib/update.test.ts +++ b/src/core/server/integration_tests/saved_objects/service/lib/update.test.ts @@ -17,7 +17,6 @@ import { getKibanaMigratorTestKit, startElasticsearch, } from '../../migrations/kibana_migrator_test_kit'; -import { delay } from '../../migrations/test_utils'; import { getBaseMigratorParams } from '../../migrations/fixtures/zdt_base.fixtures'; export const logFilePath = Path.join(__dirname, 'update.test.log'); @@ -93,7 +92,6 @@ describe('SOR - update API', () => { afterAll(async () => { await esServer?.stop(); - await delay(10); }); const setup = async () => { diff --git a/src/core/server/integration_tests/saved_objects/validation/validator.test.ts b/src/core/server/integration_tests/saved_objects/validation/validator.test.ts index a0dc22440f1df8..4f79a8618df023 100644 --- a/src/core/server/integration_tests/saved_objects/validation/validator.test.ts +++ b/src/core/server/integration_tests/saved_objects/validation/validator.test.ts @@ -164,8 +164,6 @@ describe.skip('validates saved object types when a schema is provided', () => { if (esServer) { await esServer.stop(); } - - await new Promise((resolve) => setTimeout(resolve, 10000)); }); it('does nothing when no schema is provided', async () => { From ea2509914f2238c646bb63eb5bbbb240365fd04d Mon Sep 17 00:00:00 2001 From: Alex Szabo Date: Wed, 10 Jul 2024 12:08:16 +0200 Subject: [PATCH 101/103] [BK] Migrate es-forward (+add versions.json dependent triggering) (#184018) ## Goal We'd like to introduce a way to run pipelines that have a dependency on the currently active branch set (managed in [versions.json](./versions.json)). With this, we'd like to migrate over the `es-forward` pipelines (currently: [this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-15-forward-compatibility), and [this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-14-forward-compatibility)) to the new buildkite infra. ## Summary This PR introduces a new pipeline: https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs (through [trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml)). The purpose of this new pipeline is to take the name of a "pipelineSet" that refers to a pipeline, and based on the `versions.json` file, work out what are the branches on which the referred pipeline should be triggered. ### Example: `Trigger ES forward compatibility tests` - a scheduled run on [kibana-trigger-version-dependent-jobs](https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs) with the env var `TRIGGER_PIPELINE_SET=es-forward` runs - the pipeline implementation for `kibana-trigger-version-dependent-jobs` works out (looking at `versions.json`), that the `es-forward` set should trigger https://buildkite.com/elastic/kibana-es-forward (doesn't exist prior to the PR) for (7.17+8.14) and (7.17+8.15) - the pipeline implementation uploads two trigger steps, running https://buildkite.com/elastic/kibana-es-forward in two instances with the relevant parameterization. Since the trigger parameters are derived from the `versions.json` file, if we move on and close `8.14`, and open up `8.16`, this will follow, without having to update the pipeline resources or schedules. ## Changes - 2 pipelines created: [trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml), [kibana-es-forward.yml](.buildkite/pipeline-resource-definitions/kibana-es-forward.yml) - [x] add kibana-es-forward.yml - implementation for `trigger-version-dependent-jobs` added - branch configuration removed from pipelines (kibana-artifacts-staging, kibana-artifacts-snapshot, kibana-artifacts-trigger) - added a script for checking RREs validity (moved a few files) ## Verification I've used the migration staging pipeline (*) to run this: - https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/130 - Env: `TRIGGER_PIPELINE_SET="artifacts-trigger"` - Result: [(success):](https://buildkite.com/elastic/kibana-artifacts-trigger/builds/10806) it triggered for 8.14 only (as expected) - https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/131 - Env: `TRIGGER_PIPELINE_SET="es-forward"` - Result: (success): it generated 2 trigger steps, but since the es-forward pipeline doesn't exist, the upload step failed - https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/132 - Env: `TRIGGER_PIPELINE_SET="artifacts-snapshot"` - Result: (success): it triggered jobs for all 3 open branches (main/8.14/7.17) - https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/134 - Env: `TRIGGER_PIPELINE_SET="artifacts-staging"` - Result: (success): it triggered 8.14 / 7.14, but not for main (*note: this migration staging pipeline will come in handy even after the migration, to stage newly created pipelines without creating the resource up-front) --- .../pipeline-resource-definitions/README.md | 28 +++ .../_new_pipeline.yml} | 0 .../kibana-artifacts-snapshot.yml | 18 -- .../kibana-artifacts-staging.yml | 14 -- .../kibana-artifacts-trigger.yml | 10 - .../kibana-es-forward-testing.yml | 41 ++++ .../locations.yml | 2 + .../{ => scripts}/fix-location-collection.ts | 12 +- .../scripts/validate-pipeline-definition.sh | 28 +++ .../trigger-version-dependent-jobs.yml | 71 +++++++ .buildkite/pipeline-utils/utils.test.ts | 45 +++++ .buildkite/pipeline-utils/utils.ts | 42 +++- .buildkite/scripts/common/util.sh | 6 + .../pipeline.sh | 5 + .../pipeline.test.ts | 77 ++++++++ .../pipeline.ts | 179 ++++++++++++++++++ .buildkite/scripts/steps/artifacts/cloud.sh | 5 + .buildkite/scripts/steps/artifacts/publish.sh | 9 + 18 files changed, 543 insertions(+), 49 deletions(-) create mode 100644 .buildkite/pipeline-resource-definitions/README.md rename .buildkite/pipeline-resource-definitions/{_template/template.yml => _templates/_new_pipeline.yml} (100%) create mode 100644 .buildkite/pipeline-resource-definitions/kibana-es-forward-testing.yml rename .buildkite/pipeline-resource-definitions/{ => scripts}/fix-location-collection.ts (83%) create mode 100755 .buildkite/pipeline-resource-definitions/scripts/validate-pipeline-definition.sh create mode 100644 .buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml create mode 100644 .buildkite/pipeline-utils/utils.test.ts create mode 100755 .buildkite/scripts/pipelines/trigger_version_dependent_jobs/pipeline.sh create mode 100644 .buildkite/scripts/pipelines/trigger_version_dependent_jobs/pipeline.test.ts create mode 100755 .buildkite/scripts/pipelines/trigger_version_dependent_jobs/pipeline.ts diff --git a/.buildkite/pipeline-resource-definitions/README.md b/.buildkite/pipeline-resource-definitions/README.md new file mode 100644 index 00000000000000..07a3e54fd93bde --- /dev/null +++ b/.buildkite/pipeline-resource-definitions/README.md @@ -0,0 +1,28 @@ +# Buildkite pipeline resource definitions + +## Overview +The pipeline resources are "RRE" (real resource entities) that are used to create/maintain buildkite pipelines. + +The resources described in these files are parsed and loaded to Backstage (https://backstage.elastic.dev). +From there, [Terrazzo](https://buildkite.com/elastic/terrazzo/) is generating and updating the buildkite pipelines. + +These pipelines are referenced indirectly through the root's [`catalog-info.yaml`](../../catalog-info.yaml) file in order to reduce bloat in the main resources file. +There's a location file that collects files defined in this folder ([locations.yml](locations.yml)), this file needs to be updated in order to keep track of local files. + +Available parameters and further help can be found here: https://docs.elastic.dev/ci/getting-started-with-buildkite-at-elastic + +## Creating a new pipeline resource definition +The easiest way to create a new pipeline is either by copying and editing a similar pipeline, +or by copying a blank template (see [_new_pipeline.yml](_templates/_new_pipeline.yml)) and editing that. + +You can validate your pipeline's structural integrity, and it's conformity to baseline rules by running the following command: +```bash +.buildkite/pipeline-resource-definitions/scripts/validate-pipeline-definition.sh +``` + +Once you've added the file, you should update the [locations.yml](locations.yml) file to include the new pipeline, or run the following command to update it: +```bash +.buildkite/pipeline-resource-definitions/scripts/fix-location-collection.ts +``` + +Add your pipeline implementation, commit & push & merge. The pipeline resource will appear in Backstage within minutes, then the pipeline will be added to Buildkite within ~10 minutes. \ No newline at end of file diff --git a/.buildkite/pipeline-resource-definitions/_template/template.yml b/.buildkite/pipeline-resource-definitions/_templates/_new_pipeline.yml similarity index 100% rename from .buildkite/pipeline-resource-definitions/_template/template.yml rename to .buildkite/pipeline-resource-definitions/_templates/_new_pipeline.yml diff --git a/.buildkite/pipeline-resource-definitions/kibana-artifacts-snapshot.yml b/.buildkite/pipeline-resource-definitions/kibana-artifacts-snapshot.yml index 46c31b20ec009a..e1c40f690f4ec7 100644 --- a/.buildkite/pipeline-resource-definitions/kibana-artifacts-snapshot.yml +++ b/.buildkite/pipeline-resource-definitions/kibana-artifacts-snapshot.yml @@ -22,7 +22,6 @@ spec: ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts' allow_rebuilds: true - branch_configuration: main 8.15 8.14 7.17 default_branch: main repository: elastic/kibana pipeline_file: .buildkite/pipelines/artifacts.yml @@ -44,20 +43,3 @@ spec: access_level: MANAGE_BUILD_AND_READ kibana-tech-leads: access_level: MANAGE_BUILD_AND_READ - schedules: - Daily build (main): - cronline: 0 7 * * * America/New_York - message: Daily build - branch: main - Daily build (8.15): - cronline: 0 7 * * * America/New_York - message: Daily build - branch: '8.15' - Daily build (8.14): - cronline: 0 7 * * * America/New_York - message: Daily build - branch: '8.14' - Daily build (7.17): - cronline: 0 7 * * * America/New_York - message: Daily build - branch: '7.17' diff --git a/.buildkite/pipeline-resource-definitions/kibana-artifacts-staging.yml b/.buildkite/pipeline-resource-definitions/kibana-artifacts-staging.yml index c3cb560290280c..71bcc4079c50d8 100644 --- a/.buildkite/pipeline-resource-definitions/kibana-artifacts-staging.yml +++ b/.buildkite/pipeline-resource-definitions/kibana-artifacts-staging.yml @@ -23,7 +23,6 @@ spec: ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts' allow_rebuilds: true - branch_configuration: 7.17 8.14 8.15 repository: elastic/kibana pipeline_file: .buildkite/pipelines/artifacts.yml skip_intermediate_builds: false @@ -44,16 +43,3 @@ spec: access_level: MANAGE_BUILD_AND_READ kibana-tech-leads: access_level: MANAGE_BUILD_AND_READ - schedules: - Daily build (8.15): - cronline: 0 7 * * * America/New_York - message: Daily build - branch: '8.15' - Daily build (8.14): - cronline: 0 7 * * * America/New_York - message: Daily build - branch: '8.14' - Daily build (7.17): - cronline: 0 7 * * * America/New_York - message: Daily build - branch: '7.17' diff --git a/.buildkite/pipeline-resource-definitions/kibana-artifacts-trigger.yml b/.buildkite/pipeline-resource-definitions/kibana-artifacts-trigger.yml index 7d83453dab7837..8a9585762de83e 100644 --- a/.buildkite/pipeline-resource-definitions/kibana-artifacts-trigger.yml +++ b/.buildkite/pipeline-resource-definitions/kibana-artifacts-trigger.yml @@ -23,7 +23,6 @@ spec: ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts' allow_rebuilds: true - branch_configuration: 8.15 8.14 default_branch: main repository: elastic/kibana pipeline_file: .buildkite/pipelines/artifacts_trigger.yml @@ -45,12 +44,3 @@ spec: access_level: MANAGE_BUILD_AND_READ kibana-tech-leads: access_level: MANAGE_BUILD_AND_READ - schedules: - Daily build (8.15): - cronline: 0 */2 * * * America/New_York - message: Daily build - branch: '8.15' - Daily build (8.14): - cronline: 0 */2 * * * America/New_York - message: Daily build - branch: '8.14' diff --git a/.buildkite/pipeline-resource-definitions/kibana-es-forward-testing.yml b/.buildkite/pipeline-resource-definitions/kibana-es-forward-testing.yml new file mode 100644 index 00000000000000..dea4426e60e1b9 --- /dev/null +++ b/.buildkite/pipeline-resource-definitions/kibana-es-forward-testing.yml @@ -0,0 +1,41 @@ +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: bk-kibana-es-forward-compatibility-testing + description: Forward compatibility testing between Kibana 7.17 and ES 8+ + links: + - url: 'https://buildkite.com/elastic/kibana-es-forward-compatibility-testing' + title: Pipeline link +spec: + type: buildkite-pipeline + system: buildkite + owner: 'group:kibana-operations' + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: kibana / ES Forward Compatibility Testing + description: Forward compatibility testing between Kibana 7.17 and ES 8+ + spec: + env: + SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts' + ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' + allow_rebuilds: false + branch_configuration: main + default_branch: main + repository: elastic/kibana + pipeline_file: .buildkite/pipelines/es_forward.yml # Note: this file exists in 7.17 only + skip_intermediate_builds: false + provider_settings: + prefix_pull_request_fork_branch_names: false + trigger_mode: none + teams: + kibana-operations: + access_level: MANAGE_BUILD_AND_READ + appex-qa: + access_level: MANAGE_BUILD_AND_READ + kibana-tech-leads: + access_level: MANAGE_BUILD_AND_READ + everyone: + access_level: BUILD_AND_READ diff --git a/.buildkite/pipeline-resource-definitions/locations.yml b/.buildkite/pipeline-resource-definitions/locations.yml index c4e07b0d055c11..35115b00e273b0 100644 --- a/.buildkite/pipeline-resource-definitions/locations.yml +++ b/.buildkite/pipeline-resource-definitions/locations.yml @@ -14,6 +14,7 @@ spec: - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-artifacts-staging.yml - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-artifacts-trigger.yml - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-coverage-daily.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-es-forward-testing.yml - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-es-serverless-snapshots.yml - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-es-snapshots.yml - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-esql-grammar-sync.yml @@ -41,3 +42,4 @@ spec: - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-gen-ai.yml - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-investigations.yml - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-rule-management.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml diff --git a/.buildkite/pipeline-resource-definitions/fix-location-collection.ts b/.buildkite/pipeline-resource-definitions/scripts/fix-location-collection.ts similarity index 83% rename from .buildkite/pipeline-resource-definitions/fix-location-collection.ts rename to .buildkite/pipeline-resource-definitions/scripts/fix-location-collection.ts index d4e36f2559a898..1173cddeb15aa2 100755 --- a/.buildkite/pipeline-resource-definitions/fix-location-collection.ts +++ b/.buildkite/pipeline-resource-definitions/scripts/fix-location-collection.ts @@ -11,7 +11,7 @@ import jsYaml from 'js-yaml'; import path from 'path'; import { execSync } from 'child_process'; -const EXCLUDE_LIST = ['locations.yml', '_template/template.yml']; +const EXCLUDE_LIST = ['locations.yml', '_templates']; const REPO_FILES_BASE = 'https://github.com/elastic/kibana/blob/main'; type BackstageLocationResource = object & { @@ -20,19 +20,19 @@ type BackstageLocationResource = object & { async function main() { const repoRoot = execSync('git rev-parse --show-toplevel').toString().trim(); - const resourceDefinitionsFolder = path.resolve( + const resourceDefinitionsRoot = path.resolve( repoRoot, '.buildkite', 'pipeline-resource-definitions' ); const resourceDefinitionsBaseUrl = `${REPO_FILES_BASE}/.buildkite/pipeline-resource-definitions`; - const locationFile = path.resolve(resourceDefinitionsFolder, 'locations.yml'); + const locationFile = path.resolve(resourceDefinitionsRoot, 'locations.yml'); const locationFileLines = fs.readFileSync(locationFile, 'utf8').split('\n'); - const pipelines = readDirRecursively(resourceDefinitionsFolder) + const pipelines = readDirRecursively(resourceDefinitionsRoot) .filter((file) => file.endsWith('.yml')) - .map((file) => file.replace(`${resourceDefinitionsFolder}/`, '')) - .filter((f) => !EXCLUDE_LIST.includes(f)); + .map((file) => file.replace(`${resourceDefinitionsRoot}/`, '')) + .filter((f) => EXCLUDE_LIST.every((excludeExpr) => !f.match(excludeExpr))); const preamble = locationFileLines.slice(0, 1); diff --git a/.buildkite/pipeline-resource-definitions/scripts/validate-pipeline-definition.sh b/.buildkite/pipeline-resource-definitions/scripts/validate-pipeline-definition.sh new file mode 100755 index 00000000000000..cd153b23f10ab8 --- /dev/null +++ b/.buildkite/pipeline-resource-definitions/scripts/validate-pipeline-definition.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# This script is used to validate a single RRE for a pipeline definition. + +TARGET_FILE=$1 + +if [ -z "$TARGET_FILE" ]; then + echo "Usage: $0 " + exit 1 +fi + +echo "Validating $TARGET_FILE..." +ABSOLUTE_PATH=$(realpath "$TARGET_FILE") +FILE_NAME=$(basename "$ABSOLUTE_PATH") +FOLDER_NAME=$(dirname "$ABSOLUTE_PATH") + +docker run -it \ + --mount type=bind,source="$FOLDER_NAME",target=/home/app/ \ + docker.elastic.co/ci-agent-images/pipelib \ + rre validate --backstage-entity-aware "/home/app/$FILE_NAME" + +if [ $? -ne 0 ]; then + echo "$FILE_NAME invalid ❌" + exit 1 +else + echo "$FILE_NAME valid ✅" + exit 0 +fi diff --git a/.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml b/.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml new file mode 100644 index 00000000000000..ea474356b137d1 --- /dev/null +++ b/.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml @@ -0,0 +1,71 @@ +### +# For more information on authoring pipeline definitions, +# follow the guides at https://docs.elastic.dev/ci/getting-started-with-buildkite-at-elastic +### +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: bk-kibana-trigger-version-dependent-jobs + description: 'Trigger version-dependent jobs' + links: + - url: 'https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs' + title: Pipeline link +spec: + type: buildkite-pipeline + system: buildkite + owner: 'group:kibana-operations' + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: kibana / trigger version-dependent jobs + description: 'Trigger version-dependent jobs' + spec: + env: + SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts' + ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' + + allow_rebuilds: false + branch_configuration: main + default_branch: main + repository: elastic/kibana + pipeline_file: .buildkite/scripts/pipelines/trigger_version_dependent_jobs/pipeline.sh + skip_intermediate_builds: false + provider_settings: + prefix_pull_request_fork_branch_names: false + skip_pull_request_builds_for_existing_commits: true + trigger_mode: none + teams: + kibana-operations: + access_level: MANAGE_BUILD_AND_READ + appex-qa: + access_level: MANAGE_BUILD_AND_READ + kibana-tech-leads: + access_level: MANAGE_BUILD_AND_READ + everyone: + access_level: BUILD_AND_READ + schedules: + Trigger ES forward compatibility tests: + cronline: 0 5 * * * + message: Trigger ES forward compatibility tests + env: + TRIGGER_PIPELINE_SET: es-forward + Trigger artifact staging builds: + cronline: 0 7 * * * America/New_York + message: Trigger artifact staging builds + env: + TRIGGER_PIPELINE_SET: artifacts-staging + MESSAGE: Daily staging build + Trigger artifact snapshot builds: + cronline: 0 7 * * * America/New_York + message: Trigger artifact snapshot builds + env: + TRIGGER_PIPELINE_SET: artifacts-snapshot + MESSAGE: Daily snapshot build + Run kibana-artifacts-trigger: + cronline: 0 */2 * * * America/New_York + message: Trigger 'kibana-artifacts-trigger' + env: + TRIGGER_PIPELINE_SET: artifacts-trigger + MESSAGE: Daily build diff --git a/.buildkite/pipeline-utils/utils.test.ts b/.buildkite/pipeline-utils/utils.test.ts new file mode 100644 index 00000000000000..2fece6082bc5c7 --- /dev/null +++ b/.buildkite/pipeline-utils/utils.test.ts @@ -0,0 +1,45 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/* eslint-disable @typescript-eslint/no-unused-expressions */ + +import { expect } from 'chai'; +import { getKibanaDir, getVersionsFile } from './utils'; +import fs from 'fs'; + +// TODO: replace mocha with jest, and write tests that mock FS + +describe('getKibanaDir', () => { + it('should return the kibana directory', () => { + const kibanaDir = getKibanaDir(); + + expect(kibanaDir).to.be.ok; + expect(fs.existsSync(kibanaDir)).to.be.true; + }); +}); + +describe('getVersionsFile', () => { + it('should return the versions file', () => { + const versionsFile = getVersionsFile(); + + expect(versionsFile).to.be.ok; + expect(versionsFile.versions).to.be.an('array'); + }); + + it('should correctly find prevMajor and prevMinor versions', () => { + const versionsFile = getVersionsFile(); + + expect(versionsFile.prevMajors).to.be.an('array'); + expect(versionsFile.prevMajors.length).to.eql(1); + expect(versionsFile.prevMajors[0].branch).to.eql('7.17'); + + expect(versionsFile.prevMinors).to.be.an('array'); + }); + + // TODO: write more tests with mocking... +}); diff --git a/.buildkite/pipeline-utils/utils.ts b/.buildkite/pipeline-utils/utils.ts index e9a5cf91933342..9f7a27d6e1518d 100644 --- a/.buildkite/pipeline-utils/utils.ts +++ b/.buildkite/pipeline-utils/utils.ts @@ -7,6 +7,8 @@ */ import { execSync } from 'child_process'; +import fs from 'fs'; +import path from 'path'; const getKibanaDir = (() => { let kibanaDir: string | undefined; @@ -21,4 +23,42 @@ const getKibanaDir = (() => { }; })(); -export { getKibanaDir }; +export interface Version { + branch: string; + version: string; +} +export interface VersionsFile { + versions: Array< + { + previousMajor?: boolean; + previousMinor?: boolean; + currentMajor?: boolean; + currentMinor?: boolean; + } & Version + >; +} +const getVersionsFile = (() => { + let versions: VersionsFile & { + prevMinors: Version[]; + prevMajors: Version[]; + current: Version; + }; + const versionsFileName = 'versions.json'; + try { + const versionsJSON = JSON.parse( + fs.readFileSync(path.join(getKibanaDir(), versionsFileName)).toString() + ); + versions = { + versions: versionsJSON.versions, + prevMinors: versionsJSON.versions.filter((v: any) => v.previousMinor), + prevMajors: versionsJSON.versions.filter((v: any) => v.previousMajor), + current: versionsJSON.versions.find((v: any) => v.currentMajor && v.currentMinor), + }; + } catch (error) { + throw new Error(`Failed to read ${versionsFileName}: ${error}`); + } + + return () => versions; +})(); + +export { getKibanaDir, getVersionsFile }; diff --git a/.buildkite/scripts/common/util.sh b/.buildkite/scripts/common/util.sh index 5630fed40bf93b..bc5983e2496691 100755 --- a/.buildkite/scripts/common/util.sh +++ b/.buildkite/scripts/common/util.sh @@ -172,3 +172,9 @@ npm_install_global() { download_artifact() { retry 3 1 timeout 3m buildkite-agent artifact download "$@" } + +print_if_dry_run() { + if [[ "${DRY_RUN:-}" =~ ^(1|true)$ ]]; then + echo "DRY_RUN is enabled." + fi +} diff --git a/.buildkite/scripts/pipelines/trigger_version_dependent_jobs/pipeline.sh b/.buildkite/scripts/pipelines/trigger_version_dependent_jobs/pipeline.sh new file mode 100755 index 00000000000000..500372eb915960 --- /dev/null +++ b/.buildkite/scripts/pipelines/trigger_version_dependent_jobs/pipeline.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -euo pipefail + +ts-node .buildkite/scripts/pipelines/trigger_version_dependent_jobs/pipeline.ts diff --git a/.buildkite/scripts/pipelines/trigger_version_dependent_jobs/pipeline.test.ts b/.buildkite/scripts/pipelines/trigger_version_dependent_jobs/pipeline.test.ts new file mode 100644 index 00000000000000..45475301f1c49d --- /dev/null +++ b/.buildkite/scripts/pipelines/trigger_version_dependent_jobs/pipeline.test.ts @@ -0,0 +1,77 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +/* eslint-disable @typescript-eslint/no-unused-expressions */ + +import { getVersionsFile } from '#pipeline-utils'; +import { expect } from 'chai'; + +import { + getArtifactBuildTriggers, + getArtifactSnapshotPipelineTriggers, + getESForwardPipelineTriggers, + getArtifactStagingPipelineTriggers, +} from './pipeline'; + +const versionsFile = getVersionsFile(); + +describe('pipeline trigger combinations', () => { + it('should trigger the correct pipelines for "es-forward"', () => { + const esForwardTriggers = getESForwardPipelineTriggers(); + // tests 7.17 against 8.x versions + const targets = versionsFile.versions.filter((v) => v.currentMajor === true); + + expect(esForwardTriggers.length).to.eql(targets.length); + + expect(esForwardTriggers.every((trigger) => trigger.build?.branch === '7.17')).to.be.true; + + const targetedManifests = esForwardTriggers.map((t) => t.build?.env?.ES_SNAPSHOT_MANIFEST); + targets.forEach((t) => + expect(targetedManifests).to.include( + `https://storage.googleapis.com/kibana-ci-es-snapshots-daily/${t.version}/manifest-latest-verified.json` + ) + ); + }); + + it('should trigger the correct pipelines for "artifacts-snapshot"', () => { + const snapshotTriggers = getArtifactSnapshotPipelineTriggers(); + // triggers for all open branches + const branches = versionsFile.versions.map((v) => v.branch); + + expect(snapshotTriggers.length).to.eql(branches.length); + + branches.forEach((b) => { + expect(snapshotTriggers.some((trigger) => trigger.build?.branch === b)).to.be.true; + }); + }); + + it('should trigger the correct pipelines for "artifacts-trigger"', () => { + const triggerTriggers = getArtifactBuildTriggers(); + // all currentMajor+prevMinor branches + const branches = versionsFile.versions + .filter((v) => v.currentMajor === true && v.previousMinor === true) + .map((v) => v.branch); + + expect(triggerTriggers.length).to.eql(branches.length); + branches.forEach((b) => { + expect(triggerTriggers.some((trigger) => trigger.build?.branch === b)).to.be.true; + }); + }); + + it('should trigger the correct pipelines for "artifacts-staging"', () => { + const stagingTriggers = getArtifactStagingPipelineTriggers(); + // all branches that are not currentMajor+currentMinor + const branches = versionsFile.versions + .filter((v) => !v.currentMajor || !v.currentMinor) + .map((v) => v.branch); + + expect(stagingTriggers.length).to.eql(branches.length); + branches.forEach((b) => { + expect(stagingTriggers.some((trigger) => trigger.build?.branch === b)).to.be.true; + }); + }); +}); diff --git a/.buildkite/scripts/pipelines/trigger_version_dependent_jobs/pipeline.ts b/.buildkite/scripts/pipelines/trigger_version_dependent_jobs/pipeline.ts new file mode 100755 index 00000000000000..314e3d21646882 --- /dev/null +++ b/.buildkite/scripts/pipelines/trigger_version_dependent_jobs/pipeline.ts @@ -0,0 +1,179 @@ +#!/usr/bin/env ts-node +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { getVersionsFile, BuildkiteTriggerStep } from '#pipeline-utils'; + +const pipelineSets = { + 'es-forward': 'kibana-es-forward-compatibility-testing', + 'artifacts-snapshot': 'kibana-artifacts-snapshot', + 'artifacts-staging': 'kibana-artifacts-staging', + 'artifacts-trigger': 'kibana-artifacts-trigger', +}; + +/** + * This pipeline is used to emit trigger steps onto different pipelines, based on dynamic parameters retrieved from the repository. + */ +async function main() { + const pipelineSetNames = Object.keys(pipelineSets); + const pipelineSetName: string | undefined = process.env.TRIGGER_PIPELINE_SET; + const pipelineSteps: BuildkiteTriggerStep[] = []; + + if (!pipelineSetName) { + throw new Error( + `Env var TRIGGER_PIPELINE_SET is required, and can be one of: ${pipelineSetNames}` + ); + } else if (!pipelineSetNames.includes(pipelineSetName)) { + throw new Error( + `Invalid value for TRIGGER_PIPELINE_SET (${pipelineSetName}), can be one of: ${pipelineSetNames}` + ); + } + + switch (pipelineSetName) { + case 'es-forward': { + pipelineSteps.push(...getESForwardPipelineTriggers()); + break; + } + case 'artifacts-snapshot': { + pipelineSteps.push(...getArtifactSnapshotPipelineTriggers()); + break; + } + case 'artifacts-staging': { + pipelineSteps.push(...getArtifactStagingPipelineTriggers()); + break; + } + case 'artifacts-trigger': { + pipelineSteps.push(...getArtifactBuildTriggers()); + break; + } + default: { + throw new Error(`Unknown pipeline set: ${pipelineSetName}`); + } + } + + emitPipeline(pipelineSteps); +} + +/** + * This pipeline is testing the forward compatibility of Kibana with different versions of Elasticsearch. + * Should be triggered for combinations of (Kibana@7.17 + ES@8.x {current open branches on the same major}) + */ +export function getESForwardPipelineTriggers(): BuildkiteTriggerStep[] { + const versions = getVersionsFile(); + const kibanaPrevMajor = versions.prevMajors[0]; + const targetESVersions = [versions.prevMinors, versions.current].flat(); + + return targetESVersions.map(({ version }) => { + return { + trigger: pipelineSets['es-forward'], + async: true, + label: `Triggering Kibana ${kibanaPrevMajor.version} + ES ${version} forward compatibility`, + build: { + message: process.env.MESSAGE || `ES forward-compatibility test for ES ${version}`, + branch: kibanaPrevMajor.branch, + commit: 'HEAD', + env: { + ES_SNAPSHOT_MANIFEST: `https://storage.googleapis.com/kibana-ci-es-snapshots-daily/${version}/manifest-latest-verified.json`, + DRY_RUN: process.env.DRY_RUN, + }, + }, + } as BuildkiteTriggerStep; + }); +} + +/** + * This pipeline creates Kibana artifact snapshots for all open branches. + * Should be triggered for all open branches in the versions.json: 7.x, 8.x + */ +export function getArtifactSnapshotPipelineTriggers() { + // Trigger for all named branches + const versions = getVersionsFile(); + const targetVersions = [versions.prevMajors, versions.prevMinors, versions.current].flat(); + + return targetVersions.map(({ branch }) => { + return { + trigger: pipelineSets['artifacts-snapshot'], + async: true, + label: `Triggering snapshot artifact builds for ${branch}`, + build: { + message: process.env.MESSAGE || `Snapshot artifact build for ${branch}`, + branch, + commit: 'HEAD', + env: { + DRY_RUN: process.env.DRY_RUN, + }, + }, + } as BuildkiteTriggerStep; + }); +} + +/** + * This pipeline creates Kibana artifacts for branches that are not the current main. + * Should be triggered for all open branches in the versions.json: 7.x, 8.x, but not main. + */ +export function getArtifactStagingPipelineTriggers() { + // Trigger for all branches, that are not current minor+major + const versions = getVersionsFile(); + const targetVersions = [versions.prevMajors, versions.prevMinors].flat(); + + return targetVersions.map(({ branch }) => { + return { + trigger: pipelineSets['artifacts-staging'], + async: true, + label: `Triggering staging artifact builds for ${branch}`, + build: { + message: process.env.MESSAGE || `Staging artifact build for ${branch}`, + branch, + commit: 'HEAD', + env: { + DRY_RUN: process.env.DRY_RUN, + }, + }, + } as BuildkiteTriggerStep; + }); +} + +/** + * This pipeline checks if there are any changes in the incorporated $BEATS_MANIFEST_LATEST_URL (beats version) + * and triggers a staging artifact build. + * Should be triggered only for the active minor versions that are not `main` and not `7.17`. + * + * TODO: we could basically do the check logic of .buildkite/scripts/steps/artifacts/trigger.sh in here, and remove kibana-artifacts-trigger + */ +export function getArtifactBuildTriggers() { + const versions = getVersionsFile(); + const targetVersions = versions.prevMinors; + + return targetVersions.map( + ({ branch }) => + ({ + trigger: pipelineSets['artifacts-trigger'], + async: true, + label: `Triggering artifact build for ${branch}`, + build: { + message: process.env.MESSAGE || `Artifact build for ${branch}`, + branch, + commit: 'HEAD', + env: { + DRY_RUN: process.env.DRY_RUN, + }, + }, + } as BuildkiteTriggerStep) + ); +} + +function emitPipeline(pipelineSteps: BuildkiteTriggerStep[]) { + console.log(JSON.stringify(pipelineSteps, null, 2)); +} + +if (require.main === module) { + main().catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/.buildkite/scripts/steps/artifacts/cloud.sh b/.buildkite/scripts/steps/artifacts/cloud.sh index e12cf7958c86ec..86fa86f37bd3cf 100644 --- a/.buildkite/scripts/steps/artifacts/cloud.sh +++ b/.buildkite/scripts/steps/artifacts/cloud.sh @@ -7,6 +7,11 @@ set -euo pipefail source "$(dirname "$0")/../../common/util.sh" source .buildkite/scripts/steps/artifacts/env.sh +if [[ "${DRY_RUN:-}" =~ ^(true|1)$ ]]; then + echo "--- Nothing to do in DRY_RUN mode" + exit 0 +fi + echo "--- Push docker image" mkdir -p target diff --git a/.buildkite/scripts/steps/artifacts/publish.sh b/.buildkite/scripts/steps/artifacts/publish.sh index 40ea04fc33fea5..c272acac22614c 100644 --- a/.buildkite/scripts/steps/artifacts/publish.sh +++ b/.buildkite/scripts/steps/artifacts/publish.sh @@ -5,6 +5,8 @@ set -euo pipefail source .buildkite/scripts/common/util.sh source .buildkite/scripts/steps/artifacts/env.sh +print_if_dry_run + echo "--- Download and verify artifacts" function download { download_artifact "$1" . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}" @@ -60,6 +62,7 @@ if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]]; then download_artifact beats_manifest.json /tmp --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}" export BEATS_MANIFEST_URL=$(jq -r .manifest_url /tmp/beats_manifest.json) + PUBLISH_CMD=$(cat < EOF docker run --rm \ --name release-manager \ -e VAULT_ADDR \ @@ -76,6 +79,12 @@ if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]]; then --qualifier "$VERSION_QUALIFIER" \ --dependency "beats:$BEATS_MANIFEST_URL" \ --artifact-set main +EOF) + if [[ "${DRY_RUN:-}" =~ ^(1|true)$ ]]; then + PUBLISH_CMD+=(" --dry-run") + fi + + "${PUBLISH_CMD[@]}" KIBANA_SUMMARY=$(curl -s "$KIBANA_MANIFEST_LATEST" | jq -re '.summary_url') From 4b19cc7f17c6ebc740402783fee875f547d7d892 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Wed, 10 Jul 2024 12:19:25 +0200 Subject: [PATCH 102/103] [Discover] Add functional tests for DocViewer extension (#187742) - Closes https://github.com/elastic/kibana/issues/186265 --- .../example_data_source_profile/profile.tsx | 11 ++++ .../context_awareness/_data_source_profile.ts | 61 +++++++++++++++++++ .../context_awareness/_data_source_profile.ts | 61 +++++++++++++++++++ 3 files changed, 133 insertions(+) diff --git a/src/plugins/discover/public/context_awareness/profile_providers/example_data_source_profile/profile.tsx b/src/plugins/discover/public/context_awareness/profile_providers/example_data_source_profile/profile.tsx index 080c2ffed222b9..6b705b00c1ba19 100644 --- a/src/plugins/discover/public/context_awareness/profile_providers/example_data_source_profile/profile.tsx +++ b/src/plugins/discover/public/context_awareness/profile_providers/example_data_source_profile/profile.tsx @@ -52,6 +52,17 @@ export const exampleDataSourceProfileProvider: DataSourceProfileProvider = { ); }, }), + getDocViewer: (prev) => (params) => { + const recordId = params.record.id; + const prevValue = prev(params); + return { + title: `Record #${recordId}`, + docViewsRegistry: (registry) => { + registry.enableById('doc_view_logs_overview'); + return prevValue.docViewsRegistry(registry); + }, + }; + }, }, resolve: (params) => { let indexPattern: string | undefined; diff --git a/test/functional/apps/discover/context_awareness/_data_source_profile.ts b/test/functional/apps/discover/context_awareness/_data_source_profile.ts index d203f33c887e8a..f3f7e35d7030bc 100644 --- a/test/functional/apps/discover/context_awareness/_data_source_profile.ts +++ b/test/functional/apps/discover/context_awareness/_data_source_profile.ts @@ -14,6 +14,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['common', 'timePicker', 'discover', 'unifiedFieldList']); const testSubjects = getService('testSubjects'); const dataViews = getService('dataViews'); + const dataGrid = getService('dataGrid'); describe('data source profile', () => { describe('ES|QL mode', () => { @@ -58,6 +59,40 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await logLevels[2].getVisibleText()).to.be('Info'); }); }); + + describe('doc viewer extension', () => { + it('should not render custom doc viewer view', async () => { + const state = kbnRison.encode({ + dataSource: { type: 'esql' }, + query: { esql: 'from my-example-* | sort @timestamp desc' }, + }); + await PageObjects.common.navigateToApp('discover', { + hash: `/?_a=${state}`, + }); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await dataGrid.clickRowToggle({ rowIndex: 0 }); + await testSubjects.existOrFail('docViewerTab-doc_view_table'); + await testSubjects.existOrFail('docViewerTab-doc_view_source'); + await testSubjects.missingOrFail('docViewerTab-doc_view_logs_overview'); + expect(await testSubjects.getVisibleText('docViewerRowDetailsTitle')).to.be('Result'); + }); + + it('should render custom doc viewer view', async () => { + const state = kbnRison.encode({ + dataSource: { type: 'esql' }, + query: { esql: 'from my-example-logs | sort @timestamp desc' }, + }); + await PageObjects.common.navigateToApp('discover', { + hash: `/?_a=${state}`, + }); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await dataGrid.clickRowToggle({ rowIndex: 0 }); + await testSubjects.existOrFail('docViewerTab-doc_view_table'); + await testSubjects.existOrFail('docViewerTab-doc_view_source'); + await testSubjects.existOrFail('docViewerTab-doc_view_logs_overview'); + expect(await testSubjects.getVisibleText('docViewerRowDetailsTitle')).to.be('Record #0'); + }); + }); }); describe('data view mode', () => { @@ -92,6 +127,32 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await logLevels[2].getVisibleText()).to.be('Info'); }); }); + + describe('doc viewer extension', () => { + it('should not render custom doc viewer view', async () => { + await PageObjects.common.navigateToApp('discover'); + await dataViews.switchTo('my-example-*'); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await dataGrid.clickRowToggle({ rowIndex: 0 }); + await testSubjects.existOrFail('docViewerTab-doc_view_table'); + await testSubjects.existOrFail('docViewerTab-doc_view_source'); + await testSubjects.missingOrFail('docViewerTab-doc_view_logs_overview'); + expect(await testSubjects.getVisibleText('docViewerRowDetailsTitle')).to.be('Document'); + }); + + it('should render custom doc viewer view', async () => { + await PageObjects.common.navigateToApp('discover'); + await dataViews.switchTo('my-example-logs'); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await dataGrid.clickRowToggle({ rowIndex: 0 }); + await testSubjects.existOrFail('docViewerTab-doc_view_table'); + await testSubjects.existOrFail('docViewerTab-doc_view_source'); + await testSubjects.existOrFail('docViewerTab-doc_view_logs_overview'); + expect(await testSubjects.getVisibleText('docViewerRowDetailsTitle')).to.be( + 'Record #my-example-logs::XdQFDpABfGznVC1bCHLo::' + ); + }); + }); }); }); } diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/_data_source_profile.ts b/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/_data_source_profile.ts index 317835958b0a99..9ce2e79d8f5862 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/_data_source_profile.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/_data_source_profile.ts @@ -13,6 +13,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['common', 'timePicker', 'discover', 'unifiedFieldList']); const testSubjects = getService('testSubjects'); const dataViews = getService('dataViews'); + const dataGrid = getService('dataGrid'); describe('data source profile', () => { describe('ES|QL mode', () => { @@ -53,6 +54,40 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await logLevels[2].getVisibleText()).to.be('Info'); }); }); + + describe('doc viewer extension', () => { + it('should not render custom doc viewer view', async () => { + const state = kbnRison.encode({ + dataSource: { type: 'esql' }, + query: { esql: 'from my-example-* | sort @timestamp desc' }, + }); + await PageObjects.common.navigateToApp('discover', { + hash: `/?_a=${state}`, + }); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await dataGrid.clickRowToggle({ rowIndex: 0 }); + await testSubjects.existOrFail('docViewerTab-doc_view_table'); + await testSubjects.existOrFail('docViewerTab-doc_view_source'); + await testSubjects.missingOrFail('docViewerTab-doc_view_logs_overview'); + expect(await testSubjects.getVisibleText('docViewerRowDetailsTitle')).to.be('Result'); + }); + + it('should render custom doc viewer view', async () => { + const state = kbnRison.encode({ + dataSource: { type: 'esql' }, + query: { esql: 'from my-example-logs | sort @timestamp desc' }, + }); + await PageObjects.common.navigateToApp('discover', { + hash: `/?_a=${state}`, + }); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await dataGrid.clickRowToggle({ rowIndex: 0 }); + await testSubjects.existOrFail('docViewerTab-doc_view_table'); + await testSubjects.existOrFail('docViewerTab-doc_view_source'); + await testSubjects.existOrFail('docViewerTab-doc_view_logs_overview'); + expect(await testSubjects.getVisibleText('docViewerRowDetailsTitle')).to.be('Record #0'); + }); + }); }); describe('data view mode', () => { @@ -83,6 +118,32 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await logLevels[2].getVisibleText()).to.be('Info'); }); }); + + describe('doc viewer extension', () => { + it('should not render custom doc viewer view', async () => { + await PageObjects.common.navigateToApp('discover'); + await dataViews.switchTo('my-example-*'); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await dataGrid.clickRowToggle({ rowIndex: 0 }); + await testSubjects.existOrFail('docViewerTab-doc_view_table'); + await testSubjects.existOrFail('docViewerTab-doc_view_source'); + await testSubjects.missingOrFail('docViewerTab-doc_view_logs_overview'); + expect(await testSubjects.getVisibleText('docViewerRowDetailsTitle')).to.be('Document'); + }); + + it('should render custom doc viewer view', async () => { + await PageObjects.common.navigateToApp('discover'); + await dataViews.switchTo('my-example-logs'); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await dataGrid.clickRowToggle({ rowIndex: 0 }); + await testSubjects.existOrFail('docViewerTab-doc_view_table'); + await testSubjects.existOrFail('docViewerTab-doc_view_source'); + await testSubjects.existOrFail('docViewerTab-doc_view_logs_overview'); + expect(await testSubjects.getVisibleText('docViewerRowDetailsTitle')).to.be( + 'Record #my-example-logs::XdQFDpABfGznVC1bCHLo::' + ); + }); + }); }); }); } From 40a2bdf651b0eabe5977367ad1b875e7581f0e31 Mon Sep 17 00:00:00 2001 From: Kevin Delemme Date: Wed, 10 Jul 2024 12:35:49 +0200 Subject: [PATCH 103/103] change codeownsers investigate plugin (#187939) Change ownership of investigate plugin to obs-ux-management --- .github/CODEOWNERS | 2 +- x-pack/plugins/observability_solution/investigate/kibana.jsonc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 98ff703cf09680..bb9fa9d83a5cd2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -506,7 +506,7 @@ x-pack/plugins/integration_assistant @elastic/security-solution src/plugins/interactive_setup @elastic/kibana-security test/interactive_setup_api_integration/plugins/test_endpoints @elastic/kibana-security packages/kbn-interpreter @elastic/kibana-visualizations -x-pack/plugins/observability_solution/investigate @elastic/obs-ai-assistant +x-pack/plugins/observability_solution/investigate @elastic/obs-ux-management-team packages/kbn-io-ts-utils @elastic/obs-knowledge-team packages/kbn-ipynb @elastic/search-kibana packages/kbn-jest-serializers @elastic/kibana-operations diff --git a/x-pack/plugins/observability_solution/investigate/kibana.jsonc b/x-pack/plugins/observability_solution/investigate/kibana.jsonc index ff0d3a58670d86..b3421fca1541c6 100644 --- a/x-pack/plugins/observability_solution/investigate/kibana.jsonc +++ b/x-pack/plugins/observability_solution/investigate/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/investigate-plugin", - "owner": "@elastic/obs-ai-assistant", + "owner": "@elastic/obs-ux-management-team", "plugin": { "id": "investigate", "server": true,