From 090fa5dc33c7a844c7d3b8e13a708da4754b500d Mon Sep 17 00:00:00 2001 From: James Gowdy Date: Wed, 21 Dec 2022 09:14:23 +0000 Subject: [PATCH 01/36] [ML] Add delete annotations option to delete and reset job modals (#147537) Adds a switch to the delete and reset job modals to tell elasticsearch to also delete any user created annotations when deleting or reseting the job. **Delete job** ![image](https://user-images.githubusercontent.com/22172091/207633225-714a0f13-b401-4921-8175-fabcf5da734b.png) **Reset job** ![image](https://user-images.githubusercontent.com/22172091/207633276-d7a1ef6c-ef5e-4b26-8df3-7be57626e8f6.png) --- .../delete_job_modal/delete_job_modal.tsx | 23 +++- .../reset_job_modal/reset_job_modal.tsx | 16 ++- .../jobs/jobs_list/components/utils.d.ts | 12 +- .../jobs/jobs_list/components/utils.js | 8 +- .../application/services/job_service.js | 8 +- .../services/ml_api_service/jobs.ts | 8 +- .../ml/server/models/job_service/jobs.ts | 18 ++- .../plugins/ml/server/routes/job_service.ts | 13 +- .../routes/schemas/job_service_schema.ts | 6 + .../delete_job_and_delete_annotations.ts | 126 ++++++++++++++++++ .../apps/ml/anomaly_detection_jobs/index.ts | 1 + x-pack/test/functional/services/ml/api.ts | 8 ++ .../test/functional/services/ml/job_table.ts | 12 ++ 13 files changed, 228 insertions(+), 31 deletions(-) create mode 100644 x-pack/test/functional/apps/ml/anomaly_detection_jobs/delete_job_and_delete_annotations.ts diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/delete_job_modal/delete_job_modal.tsx b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/delete_job_modal/delete_job_modal.tsx index b7cadf0def05a..d840d2e016d5e 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/delete_job_modal/delete_job_modal.tsx +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/delete_job_modal/delete_job_modal.tsx @@ -18,6 +18,7 @@ import { EuiButton, EuiLoadingSpinner, EuiText, + EuiSwitch, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -42,6 +43,7 @@ export const DeleteJobModal: FC = ({ setShowFunction, unsetShowFunction, const [jobIds, setJobIds] = useState([]); const [canDelete, setCanDelete] = useState(false); const [hasManagedJob, setHasManagedJob] = useState(false); + const [deleteUserAnnotations, setDeleteUserAnnotations] = useState(false); useEffect(() => { if (typeof setShowFunction === 'function') { @@ -60,6 +62,7 @@ export const DeleteJobModal: FC = ({ setShowFunction, unsetShowFunction, setHasManagedJob(jobs.some((job) => isManagedJob(job))); setModalVisible(true); setDeleting(false); + setDeleteUserAnnotations(false); }, []); const closeModal = useCallback(() => { @@ -69,14 +72,16 @@ export const DeleteJobModal: FC = ({ setShowFunction, unsetShowFunction, const deleteJob = useCallback(() => { setDeleting(true); - deleteJobs(jobIds.map((id) => ({ id }))); + deleteJobs( + jobIds.map((id) => ({ id })), + deleteUserAnnotations + ); setTimeout(() => { closeModal(); refreshJobs(); }, DELETING_JOBS_REFRESH_INTERVAL_MS); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [jobIds, refreshJobs]); + }, [jobIds, deleteUserAnnotations, closeModal, refreshJobs]); if (modalVisible === false || jobIds.length === 0) { return null; @@ -133,6 +138,18 @@ export const DeleteJobModal: FC = ({ setShowFunction, unsetShowFunction, jobsCount: jobIds.length, }} /> + + setDeleteUserAnnotations(e.target.checked)} + data-test-subj="mlDeleteJobConfirmModalDeleteAnnotationsSwitch" + /> )} diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/reset_job_modal/reset_job_modal.tsx b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/reset_job_modal/reset_job_modal.tsx index 97f6255d213fa..335b19bd3a794 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/reset_job_modal/reset_job_modal.tsx +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/reset_job_modal/reset_job_modal.tsx @@ -17,6 +17,7 @@ import { EuiButtonEmpty, EuiButton, EuiText, + EuiSwitch, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -41,6 +42,7 @@ export const ResetJobModal: FC = ({ setShowFunction, unsetShowFunction, r const [jobIds, setJobIds] = useState([]); const [jobs, setJobs] = useState([]); const [hasManagedJob, setHasManagedJob] = useState(false); + const [deleteUserAnnotations, setDeleteUserAnnotations] = useState(false); useEffect(() => { if (typeof setShowFunction === 'function') { @@ -61,6 +63,7 @@ export const ResetJobModal: FC = ({ setShowFunction, unsetShowFunction, r setModalVisible(true); setResetting(false); + setDeleteUserAnnotations(false); }, []); const closeModal = useCallback(() => { @@ -69,13 +72,12 @@ export const ResetJobModal: FC = ({ setShowFunction, unsetShowFunction, r const resetJob = useCallback(async () => { setResetting(true); - await resetJobs(jobIds); + await resetJobs(jobIds, deleteUserAnnotations); closeModal(); setTimeout(() => { refreshJobs(); }, RESETTING_JOBS_REFRESH_INTERVAL_MS); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [jobIds, refreshJobs]); + }, [closeModal, deleteUserAnnotations, jobIds, refreshJobs]); if (modalVisible === false || jobIds.length === 0) { return null; @@ -124,6 +126,14 @@ export const ResetJobModal: FC = ({ setShowFunction, unsetShowFunction, r jobsCount: jobIds.length, }} /> + + setDeleteUserAnnotations(e.target.checked)} + /> diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/utils.d.ts b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/utils.d.ts index 3a4c092e1533b..8358afc3b0ef8 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/utils.d.ts +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/utils.d.ts @@ -9,6 +9,14 @@ import { CombinedJobWithStats } from '../../../../../common/types/anomaly_detect export function stopDatafeeds(jobs: Array<{ id: string }>, callback?: () => void): Promise; export function closeJobs(jobs: Array<{ id: string }>, callback?: () => void): Promise; -export function deleteJobs(jobs: Array<{ id: string }>, callback?: () => void): Promise; -export function resetJobs(jobIds: string[], callback?: () => void): Promise; +export function deleteJobs( + jobs: Array<{ id: string }>, + deleteUserAnnotations?: boolean, + callback?: () => void +): Promise; +export function resetJobs( + jobIds: string[], + deleteUserAnnotations?: boolean, + callback?: () => void +): Promise; export function loadFullJob(jobId: string): Promise; diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/utils.js b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/utils.js index 430244c52e69c..ea8a43b51c47d 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/utils.js +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/utils.js @@ -320,9 +320,9 @@ export function closeJobs(jobs, finish = () => {}) { }); } -export function resetJobs(jobIds, finish = () => {}) { +export function resetJobs(jobIds, deleteUserAnnotations, finish = () => {}) { mlJobService - .resetJobs(jobIds) + .resetJobs(jobIds, deleteUserAnnotations) .then((resp) => { showResults(resp, JOB_ACTION.RESET); finish(); @@ -338,10 +338,10 @@ export function resetJobs(jobIds, finish = () => {}) { }); } -export function deleteJobs(jobs, finish = () => {}) { +export function deleteJobs(jobs, deleteUserAnnotations, finish = () => {}) { const jobIds = jobs.map((j) => j.id); mlJobService - .deleteJobs(jobIds) + .deleteJobs(jobIds, deleteUserAnnotations) .then((resp) => { showResults(resp, JOB_STATE.DELETED); finish(); diff --git a/x-pack/plugins/ml/public/application/services/job_service.js b/x-pack/plugins/ml/public/application/services/job_service.js index 32cd957ff0f20..42868c657de1a 100644 --- a/x-pack/plugins/ml/public/application/services/job_service.js +++ b/x-pack/plugins/ml/public/application/services/job_service.js @@ -379,16 +379,16 @@ class JobService { return ml.jobs.stopDatafeeds(dIds); } - deleteJobs(jIds) { - return ml.jobs.deleteJobs(jIds); + deleteJobs(jIds, deleteUserAnnotations) { + return ml.jobs.deleteJobs(jIds, deleteUserAnnotations); } closeJobs(jIds) { return ml.jobs.closeJobs(jIds); } - resetJobs(jIds) { - return ml.jobs.resetJobs(jIds); + resetJobs(jIds, deleteUserAnnotations) { + return ml.jobs.resetJobs(jIds, deleteUserAnnotations); } validateDetector(detector) { diff --git a/x-pack/plugins/ml/public/application/services/ml_api_service/jobs.ts b/x-pack/plugins/ml/public/application/services/ml_api_service/jobs.ts index b1dc81d510e53..0e209c01ddb6a 100644 --- a/x-pack/plugins/ml/public/application/services/ml_api_service/jobs.ts +++ b/x-pack/plugins/ml/public/application/services/ml_api_service/jobs.ts @@ -124,8 +124,8 @@ export const jobsApiProvider = (httpService: HttpService) => ({ }); }, - deleteJobs(jobIds: string[]) { - const body = JSON.stringify({ jobIds }); + deleteJobs(jobIds: string[], deleteUserAnnotations?: boolean) { + const body = JSON.stringify({ jobIds, deleteUserAnnotations }); return httpService.http({ path: `${ML_BASE_PATH}/jobs/delete_jobs`, method: 'POST', @@ -142,8 +142,8 @@ export const jobsApiProvider = (httpService: HttpService) => ({ }); }, - resetJobs(jobIds: string[]) { - const body = JSON.stringify({ jobIds }); + resetJobs(jobIds: string[], deleteUserAnnotations?: boolean) { + const body = JSON.stringify({ jobIds, deleteUserAnnotations }); return httpService.http({ path: `${ML_BASE_PATH}/jobs/reset_jobs`, method: 'POST', diff --git a/x-pack/plugins/ml/server/models/job_service/jobs.ts b/x-pack/plugins/ml/server/models/job_service/jobs.ts index c525de2a4052e..de2869899b65f 100644 --- a/x-pack/plugins/ml/server/models/job_service/jobs.ts +++ b/x-pack/plugins/ml/server/models/job_service/jobs.ts @@ -75,11 +75,17 @@ export function jobsProvider( const { getLatestBucketTimestampByJob } = resultsServiceProvider(mlClient); const calMngr = new CalendarManager(mlClient); - async function forceDeleteJob(jobId: string) { - await mlClient.deleteJob({ job_id: jobId, force: true, wait_for_completion: false }); + async function forceDeleteJob(jobId: string, deleteUserAnnotations = false) { + await mlClient.deleteJob({ + job_id: jobId, + force: true, + wait_for_completion: false, + // @ts-expect-error delete_user_annotations is not in types yet + delete_user_annotations: deleteUserAnnotations, + }); } - async function deleteJobs(jobIds: string[]) { + async function deleteJobs(jobIds: string[], deleteUserAnnotations = false) { const results: Results = {}; const datafeedIds = await getDatafeedIdsByJobId(); @@ -92,7 +98,7 @@ export function jobsProvider( if (datafeedResp.acknowledged) { try { - await forceDeleteJob(jobId); + await forceDeleteJob(jobId, deleteUserAnnotations); results[jobId] = { deleted: true }; } catch (error) { if (isRequestTimeout(error)) { @@ -152,7 +158,7 @@ export function jobsProvider( return results; } - async function resetJobs(jobIds: string[]) { + async function resetJobs(jobIds: string[], deleteUserAnnotations = false) { const results: ResetJobsResponse = {}; for (const jobId of jobIds) { try { @@ -160,6 +166,8 @@ export function jobsProvider( const { task } = await mlClient.resetJob({ job_id: jobId, wait_for_completion: false, + // @ts-expect-error delete_user_annotations is not in types yet + delete_user_annotations: deleteUserAnnotations, }); results[jobId] = { reset: true, task }; } catch (error) { diff --git a/x-pack/plugins/ml/server/routes/job_service.ts b/x-pack/plugins/ml/server/routes/job_service.ts index 24aead28bb705..6a465b2e8ad1d 100644 --- a/x-pack/plugins/ml/server/routes/job_service.ts +++ b/x-pack/plugins/ml/server/routes/job_service.ts @@ -25,6 +25,7 @@ import { jobsExistSchema, datafeedPreviewSchema, bulkCreateSchema, + deleteJobsSchema, } from './schemas/job_service_schema'; import { jobIdSchema } from './schemas/anomaly_detectors_schema'; @@ -119,7 +120,7 @@ export function jobServiceRoutes({ router, routeGuard }: RouteInitialization) { { path: '/api/ml/jobs/delete_jobs', validate: { - body: jobIdsSchema, + body: deleteJobsSchema, }, options: { tags: ['access:ml:canDeleteJob'], @@ -128,8 +129,8 @@ export function jobServiceRoutes({ router, routeGuard }: RouteInitialization) { routeGuard.fullLicenseAPIGuard(async ({ client, mlClient, request, response }) => { try { const { deleteJobs } = jobServiceProvider(client, mlClient); - const { jobIds } = request.body; - const resp = await deleteJobs(jobIds); + const { jobIds, deleteUserAnnotations } = request.body; + const resp = await deleteJobs(jobIds, deleteUserAnnotations); return response.ok({ body: resp, @@ -187,7 +188,7 @@ export function jobServiceRoutes({ router, routeGuard }: RouteInitialization) { { path: '/api/ml/jobs/reset_jobs', validate: { - body: jobIdsSchema, + body: deleteJobsSchema, }, options: { tags: ['access:ml:canResetJob'], @@ -196,8 +197,8 @@ export function jobServiceRoutes({ router, routeGuard }: RouteInitialization) { routeGuard.fullLicenseAPIGuard(async ({ client, mlClient, request, response }) => { try { const { resetJobs } = jobServiceProvider(client, mlClient); - const { jobIds } = request.body; - const resp = await resetJobs(jobIds); + const { jobIds, deleteUserAnnotations } = request.body; + const resp = await resetJobs(jobIds, deleteUserAnnotations); return response.ok({ body: resp, diff --git a/x-pack/plugins/ml/server/routes/schemas/job_service_schema.ts b/x-pack/plugins/ml/server/routes/schemas/job_service_schema.ts index 655350d367652..88a715f493e09 100644 --- a/x-pack/plugins/ml/server/routes/schemas/job_service_schema.ts +++ b/x-pack/plugins/ml/server/routes/schemas/job_service_schema.ts @@ -66,6 +66,12 @@ export const jobIdsSchema = schema.object({ jobIds: schema.arrayOf(schema.string()), }); +export const deleteJobsSchema = schema.object({ + /** List of job IDs. */ + jobIds: schema.arrayOf(schema.string()), + deleteUserAnnotations: schema.maybe(schema.boolean()), +}); + export const optionalJobIdsSchema = schema.object({ /** Optional list of job IDs. */ jobIds: schema.maybe(schema.arrayOf(schema.string())), diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/delete_job_and_delete_annotations.ts b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/delete_job_and_delete_annotations.ts new file mode 100644 index 0000000000000..13ab18934f942 --- /dev/null +++ b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/delete_job_and_delete_annotations.ts @@ -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 { ANNOTATION_TYPE } from '@kbn/ml-plugin/common/constants/annotations'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { + SINGLE_METRIC_JOB_CONFIG, + MULTI_METRIC_JOB_CONFIG, +} from '../../../../api_integration/apis/ml/jobs/common_jobs'; + +export default function ({ getService }: FtrProviderContext) { + const config = getService('config'); + const esNode = config.get('esTestCluster.ccs') + ? getService('remoteEsArchiver' as 'esArchiver') + : getService('esArchiver'); + const ml = getService('ml'); + + const remoteName = 'ftr-remote:'; + const indexPatternName = 'ft_farequote'; + const indexPatternString = config.get('esTestCluster.ccs') + ? remoteName + indexPatternName + : indexPatternName; + + const testSetupJobConfigs = [SINGLE_METRIC_JOB_CONFIG, MULTI_METRIC_JOB_CONFIG]; + + async function createAnnotation(jobId: string, annotation: string) { + await ml.api.indexAnnotation({ + timestamp: 1549756524346, + end_timestamp: 1549766472273, + annotation, + job_id: jobId, + type: ANNOTATION_TYPE.ANNOTATION, + detector_index: 0, + event: 'user', + }); + } + + const testConfigs = [ + { + suiteTitle: 'does not delete annotations', + deleteAnnotations: false, + expectedAnnotations: { + beforeDelete: 1, + afterDelete: 1, + }, + jobId: SINGLE_METRIC_JOB_CONFIG.job_id, + }, + { + suiteTitle: 'deletes annotations', + deleteAnnotations: true, + expectedAnnotations: { + beforeDelete: 1, + afterDelete: 0, + }, + jobId: SINGLE_METRIC_JOB_CONFIG.job_id, + }, + ]; + + describe('delete job', function () { + this.tags(['ml']); + before(async () => { + await esNode.loadIfNeeded('x-pack/test/functional/es_archives/ml/farequote'); + await ml.testResources.createIndexPatternIfNeeded(indexPatternString, '@timestamp'); + await ml.testResources.setKibanaTimeZoneToUTC(); + + await ml.securityUI.loginAsMlPowerUser(); + }); + + after(async () => { + await ml.api.cleanMlIndices(); + await ml.testResources.deleteIndexPatternByTitle(indexPatternString); + }); + + for (const { suiteTitle, jobId, deleteAnnotations, expectedAnnotations } of testConfigs) { + describe(suiteTitle, function () { + before(async () => { + for (const job of testSetupJobConfigs) { + await ml.api.createAnomalyDetectionJob(job); + } + }); + + after(async () => { + await ml.api.cleanMlIndices(); + }); + + it('deletes the job', async () => { + await ml.testExecution.logTestStep('create annotation'); + await createAnnotation(jobId, 'test test test'); + + await ml.testExecution.logTestStep('check annotation count'); + await ml.api.assertAnnotationsCount(jobId, expectedAnnotations.beforeDelete); + + await ml.testExecution.logTestStep('job creation loads the job management page'); + await ml.navigation.navigateToMl(); + await ml.navigation.navigateToJobManagement(); + + await ml.testExecution.logTestStep('job deletion triggers the delete action'); + await ml.jobTable.clickDeleteJobAction(jobId); + + await ml.testExecution.logTestStep('check delete annotations switch'); + await ml.jobTable.clickDeleteAnnotationsInDeleteJobModal(deleteAnnotations); + await ml.testExecution.logTestStep('job deletion confirms the delete modal'); + await ml.jobTable.confirmDeleteJobModal(); + await ml.api.waitForAnomalyDetectionJobNotToExist(jobId, 30 * 1000); + + await ml.testExecution.logTestStep( + 'job deletion does not display the deleted job in the job list any more' + ); + await ml.jobTable.filterWithSearchString(jobId, 0); + + await ml.testExecution.logTestStep( + 'job deletion does not have results for the deleted job any more' + ); + await ml.api.assertNoJobResultsExist(jobId); + + await ml.testExecution.logTestStep('check annotation count after job deletion'); + await ml.api.assertAnnotationsCount(jobId, expectedAnnotations.afterDelete); + }); + }); + } + }); +} diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/index.ts b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/index.ts index 7696e4f97eea8..96c8bd3352393 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/index.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/index.ts @@ -48,6 +48,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./categorization_job')); loadTestFile(require.resolve('./date_nanos_job')); loadTestFile(require.resolve('./custom_urls')); + loadTestFile(require.resolve('./delete_job_and_delete_annotations')); } }); } diff --git a/x-pack/test/functional/services/ml/api.ts b/x-pack/test/functional/services/ml/api.ts index 2eea4aeee484e..d79d513ed7f47 100644 --- a/x-pack/test/functional/services/ml/api.ts +++ b/x-pack/test/functional/services/ml/api.ts @@ -1119,6 +1119,14 @@ export function MachineLearningAPIProvider({ getService }: FtrProviderContext) { }); }, + async assertAnnotationsCount(jobId: string, expectedCount: number) { + const annotations = await this.getAnnotations(jobId); + expect(annotations.length).to.eql( + expectedCount, + `expected annotation count of ${expectedCount}, got ${annotations.length}` + ); + }, + async runDFAJob(dfaId: string) { log.debug(`Starting data frame analytics job '${dfaId}'...`); const { body: startResponse, status } = await esSupertest diff --git a/x-pack/test/functional/services/ml/job_table.ts b/x-pack/test/functional/services/ml/job_table.ts index a9e307aeaf587..892cf539b3afb 100644 --- a/x-pack/test/functional/services/ml/job_table.ts +++ b/x-pack/test/functional/services/ml/job_table.ts @@ -467,6 +467,18 @@ export function MachineLearningJobTableProvider( await testSubjects.missingOrFail('mlDeleteJobConfirmModal', { timeout: 30 * 1000 }); } + public async clickDeleteAnnotationsInDeleteJobModal(checked: boolean) { + await testSubjects.setEuiSwitch( + 'mlDeleteJobConfirmModal > mlDeleteJobConfirmModalDeleteAnnotationsSwitch', + checked ? 'check' : 'uncheck' + ); + const isChecked = await testSubjects.isEuiSwitchChecked( + 'mlDeleteJobConfirmModal > mlDeleteJobConfirmModalDeleteAnnotationsSwitch' + ); + + expect(isChecked).to.eql(checked, `Expected delete annotations switch to be ${checked}`); + } + public async clickOpenJobInSingleMetricViewerButton(jobId: string) { await testSubjects.click(this.rowSelector(jobId, 'mlOpenJobsInSingleMetricViewerButton')); await testSubjects.existOrFail('~mlPageSingleMetricViewer'); From 6522ea0975d11017997e1918b59625ef3bafb807 Mon Sep 17 00:00:00 2001 From: Maryam Saeidi Date: Wed, 21 Dec 2022 10:17:50 +0100 Subject: [PATCH 02/36] [AO] Use new API in Alert Summary Widget and remove rule prop (#147784) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves #147762 ## ๐Ÿ“ Summary Use new API in Alert Summary Widget and remove rule prop ## ๐Ÿงช How to test No functionality has changed from the user's perspective, you should see the Alert Summary Widget work as before on the rule details page. ![image](https://user-images.githubusercontent.com/12370520/208632625-0d3935fd-661a-45ce-bdb1-5a87e2da87cd.png) --- .../helpers/get_alert_summary_time_range.tsx | 4 +- .../public/pages/rule_details/index.tsx | 17 +- .../hooks/use_load_alert_summary.test.ts | 71 ++++++--- .../hooks/use_load_alert_summary.ts | 149 ++++++------------ .../mock/alert_summary_widget/index.ts | 18 ++- .../public/application/sections/index.tsx | 4 +- ...test.tsx => alert_summary_widget.test.tsx} | 39 +---- ...s_summary.tsx => alert_summary_widget.tsx} | 29 +--- .../components/alert_summary_widget_ui.tsx | 2 +- .../components/alert_summary/index.tsx | 4 +- .../components/alert_summary/types.ts | 10 +- .../public/common/get_rule_alerts_summary.tsx | 8 +- .../triggers_actions_ui/public/mocks.ts | 6 +- .../triggers_actions_ui/public/plugin.ts | 10 +- 14 files changed, 152 insertions(+), 219 deletions(-) rename x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/{rule_alerts_summary.test.tsx => alert_summary_widget.test.tsx} (60%) rename x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/{rule_alerts_summary.tsx => alert_summary_widget.tsx} (53%) diff --git a/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.tsx b/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.tsx index 661899c6cefe0..dea999736fdfd 100644 --- a/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.tsx +++ b/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.tsx @@ -5,11 +5,12 @@ * 2.0. */ +import type { AlertSummaryTimeRange } from '@kbn/triggers-actions-ui-plugin/public/application/hooks/use_load_alert_summary'; import React from 'react'; import { getAbsoluteTimeRange } from '@kbn/data-plugin/common'; import { FormattedMessage } from '@kbn/i18n-react'; -export const getDefaultAlertSummaryTimeRange = () => { +export const getDefaultAlertSummaryTimeRange = (): AlertSummaryTimeRange => { const { to, from } = getAbsoluteTimeRange({ from: 'now-30d', to: 'now', @@ -18,6 +19,7 @@ export const getDefaultAlertSummaryTimeRange = () => { return { utcFrom: from, utcTo: to, + fixedInterval: '1d', title: ( (''); + const [featureIds, setFeatureIds] = useState(); const [ruleType, setRuleType] = useState>(); const [ruleToDelete, setRuleToDelete] = useState([]); const [isPageLoading, setIsPageLoading] = useState(false); @@ -187,8 +187,8 @@ export function RuleDetailsPage() { setRuleType(matchedRuleType); if (rule.consumer === ALERTS_FEATURE_ID && matchedRuleType && matchedRuleType.producer) { - setFeatures(matchedRuleType.producer); - } else setFeatures(rule.consumer); + setFeatureIds([matchedRuleType.producer] as ValidFeatureId[]); + } else setFeatureIds([rule.consumer] as ValidFeatureId[]); } }, [rule, ruleTypes]); @@ -260,13 +260,13 @@ export function RuleDetailsPage() { - {esQuery && features && ( + {esQuery && featureIds && ( @@ -385,8 +385,7 @@ export function RuleDetailsPage() { onAlertSummaryWidgetClick(status)} timeRange={defaultAlertTimeRange} filter={alertSummaryWidgetFilter.current} diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.test.ts index 660d5c6a7a5c3..6937c636d1952 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.test.ts @@ -5,26 +5,35 @@ * 2.0. */ -import { ALERTS_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { renderHook } from '@testing-library/react-hooks'; +import { ValidFeatureId } from '@kbn/rule-data-utils'; import { useKibana } from '../../common/lib/kibana'; -import { mockAggsResponse, mockAlertSummaryTimeRange } from '../mock/alert_summary_widget'; +import { mockAlertSummaryResponse, mockAlertSummaryTimeRange } from '../mock/alert_summary_widget'; import { useLoadAlertSummary } from './use_load_alert_summary'; jest.mock('../../common/lib/kibana'); const useKibanaMock = useKibana as jest.Mocked; -describe('useLoadRuleAlertsAggs', () => { +describe('useLoadAlertSummary', () => { + const featureIds: ValidFeatureId[] = ['apm']; + const mockedPostAPI = jest.fn(); + + beforeAll(() => { + useKibanaMock().services.http.post = mockedPostAPI; + }); + beforeEach(() => { jest.clearAllMocks(); - useKibanaMock().services.http.post = jest.fn().mockResolvedValue({ ...mockAggsResponse() }); - useKibanaMock().services.http.get = jest.fn().mockResolvedValue({ index_name: ['mock_index'] }); }); - it('should return the expected data from the Elasticsearch Aggs. query', async () => { + it('should return the mocked data from API', async () => { + mockedPostAPI.mockResolvedValue({ + ...mockAlertSummaryResponse(), + }); + const { result, waitForNextUpdate } = renderHook(() => useLoadAlertSummary({ - features: ALERTS_FEATURE_ID, + featureIds, timeRange: mockAlertSummaryTimeRange, }) ); @@ -34,43 +43,65 @@ describe('useLoadRuleAlertsAggs', () => { }); await waitForNextUpdate(); + const { alertSummary, error } = result.current; expect(alertSummary).toEqual({ active: 1, - recovered: 7, + recovered: 1, }); expect(error).toBeFalsy(); }); - it('should have the correct query body sent to Elasticsearch', async () => { + it('should call API with correct input', async () => { const ruleId = 'c95bc120-1d56-11ed-9cc7-e7214ada1128'; - const { utcFrom, utcTo } = mockAlertSummaryTimeRange; + const { utcFrom, utcTo, fixedInterval } = mockAlertSummaryTimeRange; const filter = { term: { 'kibana.alert.rule.uuid': ruleId, }, }; + mockedPostAPI.mockResolvedValue({ + ...mockAlertSummaryResponse(), + }); + const { waitForNextUpdate } = renderHook(() => useLoadAlertSummary({ - features: ALERTS_FEATURE_ID, + featureIds, timeRange: mockAlertSummaryTimeRange, filter, }) ); await waitForNextUpdate(); - const body = - `{"index":"mock_index","size":0,` + - `"query":{"bool":{"filter":[{"range":{"@timestamp":{"gte":"${utcFrom}","lt":"${utcTo}"}}},` + - `{"bool":{"should":[{"term":{"kibana.alert.status":"active"}},{"term":{"kibana.alert.status":"recovered"}}]}},` + - `{"term":{"kibana.alert.rule.uuid":"c95bc120-1d56-11ed-9cc7-e7214ada1128"}}]}},` + - `"aggs":{"total":{"filters":{"filters":{"totalActiveAlerts":{"term":{"kibana.alert.status":"active"}},"totalRecoveredAlerts":{"term":{"kibana.alert.status":"recovered"}}}}}}}`; - - expect(useKibanaMock().services.http.post).toHaveBeenCalledWith( - '/internal/rac/alerts/find', + + const body = JSON.stringify({ + fixed_interval: fixedInterval, + gte: utcFrom, + lte: utcTo, + featureIds, + filter: [filter], + }); + expect(mockedPostAPI).toHaveBeenCalledWith( + '/internal/rac/alerts/_alert_summary', expect.objectContaining({ body, }) ); }); + + it('should return error if API call fails', async () => { + const error = new Error('Fetch Alert Summary Failed'); + mockedPostAPI.mockRejectedValueOnce(error); + + const { result, waitForNextUpdate } = renderHook(() => + useLoadAlertSummary({ + featureIds, + timeRange: mockAlertSummaryTimeRange, + }) + ); + + await waitForNextUpdate(); + + expect(result.current.error).toMatch(error.message); + }); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.ts b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.ts index cc1dc5137b5f8..2a4b9a2e9670e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.ts @@ -6,6 +6,7 @@ */ import { useEffect, useState, useCallback, useRef } from 'react'; +import type { ValidFeatureId } from '@kbn/rule-data-utils'; import { estypes } from '@elastic/elasticsearch'; import { AsApiContract } from '@kbn/actions-plugin/common'; import { HttpSetup } from '@kbn/core/public'; @@ -15,21 +16,26 @@ import { useKibana } from '../../common/lib/kibana'; export interface AlertSummaryTimeRange { utcFrom: string; utcTo: string; + // fixed_interval condition in ES query such as '1m', '1d' + fixedInterval: string; title: JSX.Element | string; } interface UseLoadAlertSummaryProps { - features: string; + featureIds?: ValidFeatureId[]; timeRange: AlertSummaryTimeRange; filter?: estypes.QueryDslQueryContainer; } + interface AlertSummary { - active: number; - recovered: number; + activeAlertCount: number; + activeAlerts?: object[]; + recoveredAlertCount: number; + recoveredAlerts?: object[]; error?: string; } -interface LoadAlertSummary { +interface LoadAlertSummaryResponse { isLoading: boolean; alertSummary: { active: number; @@ -38,42 +44,35 @@ interface LoadAlertSummary { error?: string; } -interface IndexName { - index: string; -} - -export function useLoadAlertSummary({ features, timeRange, filter }: UseLoadAlertSummaryProps) { +export function useLoadAlertSummary({ featureIds, timeRange, filter }: UseLoadAlertSummaryProps) { const { http } = useKibana().services; - const [alertSummary, setAlertSummary] = useState({ + const [alertSummary, setAlertSummary] = useState({ isLoading: true, alertSummary: { active: 0, recovered: 0 }, }); const isCancelledRef = useRef(false); const abortCtrlRef = useRef(new AbortController()); - const loadRuleAlertsAgg = useCallback(async () => { + const loadAlertSummary = useCallback(async () => { + if (!featureIds) return; isCancelledRef.current = false; abortCtrlRef.current.abort(); abortCtrlRef.current = new AbortController(); + try { - if (!features) return; - const { index } = await fetchIndexNameAPI({ - http, - features, - }); - const { active, recovered, error } = await fetchRuleAlertsAggByTimeRange({ + const { activeAlertCount, recoveredAlertCount, error } = await fetchAlertSummary({ + featureIds, + filter, http, - index, signal: abortCtrlRef.current.signal, timeRange, - filter, }); if (error) throw error; if (!isCancelledRef.current) { - setAlertSummary((oldState: LoadAlertSummary) => ({ + setAlertSummary((oldState) => ({ ...oldState, alertSummary: { - active, - recovered, + active: activeAlertCount, + recovered: recoveredAlertCount, }, isLoading: false, })); @@ -81,120 +80,60 @@ export function useLoadAlertSummary({ features, timeRange, filter }: UseLoadAler } catch (error) { if (!isCancelledRef.current) { if (error.name !== 'AbortError') { - setAlertSummary((oldState: LoadAlertSummary) => ({ + setAlertSummary((oldState) => ({ ...oldState, isLoading: false, - error, + error: error.message, })); } } } - }, [features, filter, http, timeRange]); + }, [featureIds, filter, http, timeRange]); + useEffect(() => { - loadRuleAlertsAgg(); - }, [loadRuleAlertsAgg]); + loadAlertSummary(); + }, [loadAlertSummary]); return alertSummary; } -async function fetchIndexNameAPI({ - http, - features, -}: { - http: HttpSetup; - features: string; -}): Promise { - const res = await http.get<{ index_name: string[] }>(`${BASE_RAC_ALERTS_API_PATH}/index`, { - query: { features }, - }); - return { - index: res.index_name[0], - }; -} - -async function fetchRuleAlertsAggByTimeRange({ +async function fetchAlertSummary({ + featureIds, + filter, http, - index, signal, - timeRange: { utcFrom, utcTo }, - filter, + timeRange: { utcFrom, utcTo, fixedInterval }, }: { http: HttpSetup; - index: string; + featureIds: ValidFeatureId[]; signal: AbortSignal; timeRange: AlertSummaryTimeRange; filter?: estypes.QueryDslQueryContainer; }): Promise { try { - const res = await http.post>(`${BASE_RAC_ALERTS_API_PATH}/find`, { + const res = await http.post>(`${BASE_RAC_ALERTS_API_PATH}/_alert_summary`, { signal, body: JSON.stringify({ - index, - size: 0, - query: { - bool: { - filter: [ - { - range: { - '@timestamp': { - gte: utcFrom, - lt: utcTo, - }, - }, - }, - { - bool: { - should: [ - { - term: { - 'kibana.alert.status': 'active', - }, - }, - { - term: { - 'kibana.alert.status': 'recovered', - }, - }, - ], - }, - }, - ...(filter ? [filter] : []), - ], - }, - }, - aggs: { - total: { - filters: { - filters: { - totalActiveAlerts: { - term: { - 'kibana.alert.status': 'active', - }, - }, - totalRecoveredAlerts: { - term: { - 'kibana.alert.status': 'recovered', - }, - }, - }, - }, - }, - }, + fixed_interval: fixedInterval, + gte: utcFrom, + lte: utcTo, + featureIds, + filter: [filter], }), }); - const active = res?.aggregations?.total.buckets.totalActiveAlerts?.doc_count ?? 0; - const recovered = res?.aggregations?.total.buckets.totalRecoveredAlerts?.doc_count ?? 0; + const activeAlertCount = res?.activeAlertCount ?? 0; + const recoveredAlertCount = res?.recoveredAlertCount ?? 0; return { - active, - recovered, + activeAlertCount, + recoveredAlertCount, }; } catch (error) { return { error, - active: 0, - recovered: 0, + activeAlertCount: 0, + recoveredAlertCount: 0, }; } } diff --git a/x-pack/plugins/triggers_actions_ui/public/application/mock/alert_summary_widget/index.ts b/x-pack/plugins/triggers_actions_ui/public/application/mock/alert_summary_widget/index.ts index ea3b2bdee41c1..accaea20a2529 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/mock/alert_summary_widget/index.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/mock/alert_summary_widget/index.ts @@ -69,18 +69,24 @@ export const mockRule = (): Rule => { }; }; -export const mockAggsResponse = () => { +export const mockAlertSummaryResponse = () => { return { - aggregations: { - total: { - buckets: { totalActiveAlerts: { doc_count: 1 }, totalRecoveredAlerts: { doc_count: 7 } }, - }, - }, + activeAlertCount: 1, + recoveredAlertCount: 1, + activeAlerts: [ + { key_as_string: '1671321600000', key: 1671321600000, doc_count: 0 }, + { key_as_string: '1671408000000', key: 1671408000000, doc_count: 2 }, + ], + recoveredAlerts: [ + { key_as_string: '2022-12-18T00:00:00.000Z', key: 1671321600000, doc_count: 0 }, + { key_as_string: '2022-12-19T00:00:00.000Z', key: 1671408000000, doc_count: 1 }, + ], }; }; export const mockAlertSummaryTimeRange: AlertSummaryTimeRange = { utcFrom: 'mockedUtcFrom', utcTo: 'mockedUtcTo', + fixedInterval: 'mockedFixedInterval', title: 'mockedTitle', }; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/index.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/index.tsx index 2e476855926d4..75942f6b4268d 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/index.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/index.tsx @@ -58,8 +58,8 @@ export const RuleDefinition = suspendedComponentWithProps( export const RuleTagBadge = suspendedComponentWithProps( lazy(() => import('./rules_list/components/rule_tag_badge')) ); -export const RuleAlertsSummary = suspendedComponentWithProps( - lazy(() => import('./rule_details/components/alert_summary/rule_alerts_summary')) +export const AlertSummaryWidget = suspendedComponentWithProps( + lazy(() => import('./rule_details/components/alert_summary/alert_summary_widget')) ); export const RuleStatusPanel = suspendedComponentWithProps( lazy(() => import('./rule_details/components/rule_status_panel')) diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/rule_alerts_summary.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/alert_summary_widget.test.tsx similarity index 60% rename from x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/rule_alerts_summary.test.tsx rename to x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/alert_summary_widget.test.tsx index 04250620fb42e..3746be22eb51e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/rule_alerts_summary.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/alert_summary_widget.test.tsx @@ -7,45 +7,21 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { nextTick } from '@kbn/test-jest-helpers'; -import { RuleAlertsSummary } from './rule_alerts_summary'; +import { AlertSummaryWidget } from './alert_summary_widget'; import { mount, ReactWrapper } from 'enzyme'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; -import { ALERTS_FEATURE_ID } from '@kbn/alerting-plugin/common'; -import { mockAlertSummaryTimeRange, mockRule } from '../../../../mock/alert_summary_widget'; +import { mockAlertSummaryTimeRange } from '../../../../mock/alert_summary_widget'; jest.mock('@kbn/kibana-react-plugin/public/ui_settings/use_ui_setting', () => ({ useUiSetting: jest.fn().mockImplementation(() => true), })); -jest.mock('../../../../hooks/use_load_rule_types', () => ({ - useLoadRuleTypes: jest.fn(), -})); - jest.mock('../../../../hooks/use_load_alert_summary', () => ({ useLoadAlertSummary: jest.fn().mockReturnValue({ alertSummary: { active: 1, recovered: 7 }, }), })); -const { useLoadRuleTypes } = jest.requireMock('../../../../hooks/use_load_rule_types'); -const ruleTypes = [ - { - id: 'test_rule_type', - name: 'some rule type', - actionGroups: [{ id: 'default', name: 'Default' }], - recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, - actionVariables: { context: [], state: [] }, - defaultActionGroupId: 'default', - producer: ALERTS_FEATURE_ID, - minimumLicenseRequired: 'basic', - enabledInLicense: true, - authorizedConsumers: { - [ALERTS_FEATURE_ID]: { read: true, all: false }, - }, - ruleTaskTimeout: '1m', - }, -]; - describe('Rule Alert Summary', () => { let wrapper: ReactWrapper; const mockedTimeRange = { @@ -54,15 +30,10 @@ describe('Rule Alert Summary', () => { }; async function setup() { - const mockedRule = mockRule(); - - useLoadRuleTypes.mockReturnValue({ ruleTypes }); - wrapper = mount( - @@ -75,7 +46,7 @@ describe('Rule Alert Summary', () => { } beforeAll(async () => setup()); it('should render the Rule Alerts Summary component', async () => { - expect(wrapper.find('[data-test-subj="ruleAlertsSummary"]')).toBeTruthy(); + expect(wrapper.find('[data-test-subj="alertSummaryWidget"]')).toBeTruthy(); }); it('should show zeros for all alerts counters', async () => { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/rule_alerts_summary.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/alert_summary_widget.tsx similarity index 53% rename from x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/rule_alerts_summary.tsx rename to x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/alert_summary_widget.tsx index d298ca93187d9..7561c5ad5407b 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/rule_alerts_summary.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/alert_summary_widget.tsx @@ -6,43 +6,30 @@ */ import { EuiLoadingSpinner } from '@elastic/eui'; -import { ALERTS_FEATURE_ID } from '@kbn/alerting-plugin/common'; -import React, { useEffect, useState } from 'react'; +import React from 'react'; import { useLoadAlertSummary } from '../../../../hooks/use_load_alert_summary'; -import { useLoadRuleTypes } from '../../../../hooks/use_load_rule_types'; -import { RuleAlertsSummaryProps } from '.'; +import { AlertSummaryWidgetProps } from '.'; import { AlertSummaryWidgetError, AlertsSummaryWidgetUI } from './components'; -export const RuleAlertsSummary = ({ +export const AlertSummaryWidget = ({ + featureIds, filter, - filteredRuleTypes, onClick, - rule, timeRange, -}: RuleAlertsSummaryProps) => { - const [features, setFeatures] = useState(''); - const { ruleTypes } = useLoadRuleTypes({ - filteredRuleTypes, - }); +}: AlertSummaryWidgetProps) => { const { alertSummary: { active, recovered }, isLoading, error, } = useLoadAlertSummary({ - features, + featureIds, filter, timeRange, }); - useEffect(() => { - const matchedRuleType = ruleTypes.find((type) => type.id === rule.ruleTypeId); - if (rule.consumer === ALERTS_FEATURE_ID && matchedRuleType && matchedRuleType.producer) { - setFeatures(matchedRuleType.producer); - } else setFeatures(rule.consumer); - }, [rule, ruleTypes]); - if (isLoading) return ; if (error) return ; + return ( void; timeRange: AlertSummaryTimeRange; - filter?: estypes.QueryDslQueryContainer; } diff --git a/x-pack/plugins/triggers_actions_ui/public/common/get_rule_alerts_summary.tsx b/x-pack/plugins/triggers_actions_ui/public/common/get_rule_alerts_summary.tsx index 0f39a623475b8..6cdfc6f82a025 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/get_rule_alerts_summary.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/get_rule_alerts_summary.tsx @@ -6,9 +6,9 @@ */ import React from 'react'; -import { RuleAlertsSummary } from '../application/sections'; -import { RuleAlertsSummaryProps } from '../application/sections/rule_details/components/alert_summary'; +import { AlertSummaryWidget } from '../application/sections'; +import { AlertSummaryWidgetProps } from '../application/sections/rule_details/components/alert_summary'; -export const getRuleAlertsSummaryLazy = (props: RuleAlertsSummaryProps) => { - return ; +export const getAlertSummaryWidgetLazy = (props: AlertSummaryWidgetProps) => { + return ; }; diff --git a/x-pack/plugins/triggers_actions_ui/public/mocks.ts b/x-pack/plugins/triggers_actions_ui/public/mocks.ts index d753feb597a6c..9e34e20ab1c78 100644 --- a/x-pack/plugins/triggers_actions_ui/public/mocks.ts +++ b/x-pack/plugins/triggers_actions_ui/public/mocks.ts @@ -42,7 +42,7 @@ import { EditConnectorFlyoutProps } from './application/sections/action_connecto import { getActionFormLazy } from './common/get_action_form'; import { ActionAccordionFormProps } from './application/sections/action_connector_form/action_form'; import { getFieldBrowserLazy } from './common/get_field_browser'; -import { getRuleAlertsSummaryLazy } from './common/get_rule_alerts_summary'; +import { getAlertSummaryWidgetLazy } from './common/get_rule_alerts_summary'; import { getRuleDefinitionLazy } from './common/get_rule_definition'; import { getRuleStatusPanelLazy } from './common/get_rule_status_panel'; import { getRuleSnoozeModalLazy } from './common/get_rule_snooze_modal'; @@ -121,8 +121,8 @@ function createStartMock(): TriggersAndActionsUIPublicPluginStart { rulesListProps: {}, }); }, - getRuleAlertsSummary: (props) => { - return getRuleAlertsSummaryLazy(props); + getAlertSummaryWidget: (props) => { + return getAlertSummaryWidgetLazy(props); }, getRuleDefinition: (props) => { return getRuleDefinitionLazy({ ...props, actionTypeRegistry, ruleTypeRegistry }); diff --git a/x-pack/plugins/triggers_actions_ui/public/plugin.ts b/x-pack/plugins/triggers_actions_ui/public/plugin.ts index 9bfc31db44c55..df7ae4af58761 100644 --- a/x-pack/plugins/triggers_actions_ui/public/plugin.ts +++ b/x-pack/plugins/triggers_actions_ui/public/plugin.ts @@ -79,8 +79,8 @@ import { ActionAccordionFormProps } from './application/sections/action_connecto import type { FieldBrowserProps } from './application/sections/field_browser/types'; import { getRuleDefinitionLazy } from './common/get_rule_definition'; import { RuleStatusPanelProps } from './application/sections/rule_details/components/rule_status_panel'; -import { RuleAlertsSummaryProps } from './application/sections/rule_details/components/alert_summary'; -import { getRuleAlertsSummaryLazy } from './common/get_rule_alerts_summary'; +import { AlertSummaryWidgetProps } from './application/sections/rule_details/components/alert_summary'; +import { getAlertSummaryWidgetLazy } from './common/get_rule_alerts_summary'; import { RuleSnoozeModalProps } from './application/sections/rules_list/components/rule_snooze_modal'; import { getRuleSnoozeModalLazy } from './common/get_rule_snooze_modal'; @@ -128,7 +128,7 @@ export interface TriggersAndActionsUIPublicPluginStart { ) => ReactElement; getRuleDefinition: (props: RuleDefinitionProps) => ReactElement; getRuleStatusPanel: (props: RuleStatusPanelProps) => ReactElement; - getRuleAlertsSummary: (props: RuleAlertsSummaryProps) => ReactElement; + getAlertSummaryWidget: (props: AlertSummaryWidgetProps) => ReactElement; getRuleSnoozeModal: (props: RuleSnoozeModalProps) => ReactElement; } @@ -427,8 +427,8 @@ export class Plugin getRuleStatusPanel: (props: RuleStatusPanelProps) => { return getRuleStatusPanelLazy(props); }, - getRuleAlertsSummary: (props: RuleAlertsSummaryProps) => { - return getRuleAlertsSummaryLazy(props); + getAlertSummaryWidget: (props: AlertSummaryWidgetProps) => { + return getAlertSummaryWidgetLazy(props); }, getRuleSnoozeModal: (props: RuleSnoozeModalProps) => { return getRuleSnoozeModalLazy(props); From b6a5e63a584436cecca13f284786839fbf228b9e Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Wed, 21 Dec 2022 11:25:55 +0200 Subject: [PATCH 03/36] [TSVB] Uses filters from other applications (#147861) ## Summary Fixes: #147743 This problem appears only in TSVB because we don't update input on load visualization as we got new empty filter, and we should update embeddable handler with this new value. Co-authored-by: Stratoula Kalafateli --- .../public/application/components/vis_editor_visualization.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/vis_types/timeseries/public/application/components/vis_editor_visualization.js b/src/plugins/vis_types/timeseries/public/application/components/vis_editor_visualization.js index 3cdf2ccd13d6f..326ba3734f45d 100644 --- a/src/plugins/vis_types/timeseries/public/application/components/vis_editor_visualization.js +++ b/src/plugins/vis_types/timeseries/public/application/components/vis_editor_visualization.js @@ -52,9 +52,10 @@ class VisEditorVisualizationUI extends Component { return; } - const { onDataChange, embeddableHandler } = this.props; + const { onDataChange, embeddableHandler, timeRange, filters, query } = this.props; this._handler = embeddableHandler; + this._handler.updateInput({ timeRange, filters, query }); await this._handler.render(this._visEl.current); this.props.eventEmitter.emit('embeddableRendered'); From 3aff6fad8698a46830c7536c6723c096328faec6 Mon Sep 17 00:00:00 2001 From: Tomasz Ciecierski Date: Wed, 21 Dec 2022 10:49:36 +0100 Subject: [PATCH 04/36] [Osquery] Fix policy being updated twice if osquery has global pack (#147118) --- .../osquery/cypress/e2e/all/packs.cy.ts | 6 +++ .../osquery/server/lib/update_global_packs.ts | 46 ++++++++----------- x-pack/plugins/osquery/server/plugin.ts | 17 ++++--- 3 files changed, 32 insertions(+), 37 deletions(-) diff --git a/x-pack/plugins/osquery/cypress/e2e/all/packs.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/packs.cy.ts index 0b394e2a9d424..e9a3c992495dd 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/packs.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/packs.cy.ts @@ -449,6 +449,12 @@ describe('ALL - Packs', () => { queries: {}, }); }); + cy.visit('/app/fleet/policies'); + cy.contains('td', 'testGlobal') + .parent() + .within(() => { + cy.contains('rev. 2').click(); + }); }); it('add proper shard to policies packs config', () => { const shardPack = 'shardPack'; diff --git a/x-pack/plugins/osquery/server/lib/update_global_packs.ts b/x-pack/plugins/osquery/server/lib/update_global_packs.ts index e0ff7b1fcffe2..523e79443fbdb 100644 --- a/x-pack/plugins/osquery/server/lib/update_global_packs.ts +++ b/x-pack/plugins/osquery/server/lib/update_global_packs.ts @@ -5,13 +5,9 @@ * 2.0. */ -import type { - ElasticsearchClient, - SavedObjectsClient, - SavedObjectsFindResponse, -} from '@kbn/core/server'; -import { has, map, mapKeys, set, unset } from 'lodash'; -import type { PackagePolicy } from '@kbn/fleet-plugin/common'; +import type { SavedObjectsClient, SavedObjectsFindResponse } from '@kbn/core/server'; +import { has, map, mapKeys, set } from 'lodash'; +import type { NewPackagePolicy } from '@kbn/fleet-plugin/common'; import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; import produce from 'immer'; import { convertShardsToObject } from '../routes/utils'; @@ -22,15 +18,13 @@ import { convertSOQueriesToPackConfig } from '../routes/pack/utils'; import type { PackSavedObject } from '../common/types'; export const updateGlobalPacksCreateCallback = async ( - packagePolicy: PackagePolicy, + packagePolicy: NewPackagePolicy, packsClient: SavedObjectsClient, allPacks: SavedObjectsFindResponse, - osqueryContext: OsqueryAppContextService, - esClient: ElasticsearchClient + osqueryContext: OsqueryAppContextService ) => { const agentPolicyService = osqueryContext.getAgentPolicyService(); - const packagePolicyService = osqueryContext.getPackagePolicyService(); const agentPoliciesResult = await agentPolicyService?.getByIds(packsClient, [ packagePolicy.policy_id, ]); @@ -71,25 +65,21 @@ export const updateGlobalPacksCreateCallback = async ( }) ); - await packagePolicyService?.update( - packsClient, - esClient, - packagePolicy.id, - produce(packagePolicy, (draft) => { - unset(draft, 'id'); - if (!has(draft, 'inputs[0].streams')) { - set(draft, 'inputs[0].streams', []); - } + return produce(packagePolicy, (draft) => { + if (!has(draft, 'inputs[0].streams')) { + set(draft, 'inputs[0].streams', []); + } - map(packsContainingShardForPolicy, (pack) => { - set(draft, `inputs[0].config.osquery.value.packs.${pack.attributes.name}`, { - shard: 100, - queries: convertSOQueriesToPackConfig(pack.attributes.queries), - }); + map(packsContainingShardForPolicy, (pack) => { + set(draft, `inputs[0].config.osquery.value.packs.${pack.attributes.name}`, { + shard: 100, + queries: convertSOQueriesToPackConfig(pack.attributes.queries), }); + }); - return draft; - }) - ); + return draft; + }); } + + return packagePolicy; }; diff --git a/x-pack/plugins/osquery/server/plugin.ts b/x-pack/plugins/osquery/server/plugin.ts index 660b5518a66d9..fd23d67741dbc 100644 --- a/x-pack/plugins/osquery/server/plugin.ts +++ b/x-pack/plugins/osquery/server/plugin.ts @@ -13,10 +13,10 @@ import type { Logger, } from '@kbn/core/server'; import { SavedObjectsClient } from '@kbn/core/server'; -import type { PackagePolicy } from '@kbn/fleet-plugin/common'; import type { DataRequestHandlerContext } from '@kbn/data-plugin/server'; import type { DataViewsService } from '@kbn/data-views-plugin/common'; +import type { NewPackagePolicy, UpdatePackagePolicy } from '@kbn/fleet-plugin/common'; import type { PackSavedObjectAttributes } from './common/types'; import { updateGlobalPacksCreateCallback } from './lib/update_global_packs'; import { packSavedObjectType } from '../common/types'; @@ -136,9 +136,9 @@ export class OsqueryPlugin implements Plugin => { - if (packagePolicy.package?.name === OSQUERY_INTEGRATION_NAME) { + 'packagePolicyCreate', + async (newPackagePolicy: NewPackagePolicy): Promise => { + if (newPackagePolicy.package?.name === OSQUERY_INTEGRATION_NAME) { await this.initialize(core, dataViewsService); const allPacks = await client.find({ @@ -146,17 +146,16 @@ export class OsqueryPlugin implements Plugin Date: Wed, 21 Dec 2022 12:28:18 +0200 Subject: [PATCH 05/36] [Text based languages] Enable index patterns (#147423) ## Summary Closes https://github.com/elastic/kibana/issues/144295 Closes https://github.com/elastic/kibana/issues/143623 1. Enables adhoc dataviews to work with text based languages. Write now if a user has created an adhoc dataview and switch to text based mode it fails. This PR fixes it. 2. Enables queries referencing index patterns. Until now we allow only queries that reference existing dataviews. This PR extends that to work with all valid index patterns. ### How it works It creates an adhoc dataview and try to find: - if a @timestamp field exists, it uses that - If not it uses the first date field if it exists - If the field doesn't exist, it hides the time picker (no time filter) This was decided after discussing this with the ESQL WG. Having only one date field and in preference the @timestamp field is the recommended way here and we feel that this will be the correct approach for the first milestones. ![sql](https://user-images.githubusercontent.com/17003240/208081884-76215970-5b74-4e4a-9667-81346b34432f.gif) ### 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 --- ...query_state_to_ast_with_validation.test.ts | 73 +++----- ...ased_query_state_to_ast_with_validation.ts | 46 ++--- .../discover/public/__mocks__/data_view.ts | 8 + .../__snapshots__/context.test.ts.snap | 3 + .../application/main/discover_main_route.tsx | 11 +- .../main/hooks/use_adhoc_data_views.test.ts | 25 +++ .../main/hooks/use_adhoc_data_views.ts | 12 +- .../main/hooks/use_discover_state.ts | 5 +- .../use_test_based_query_language.test.ts | 50 +++++- .../hooks/use_text_based_query_language.ts | 48 +++-- .../application/main/utils/fetch_all.ts | 2 +- .../application/main/utils/fetch_sql.ts | 6 +- .../main/utils/resolve_data_view.ts | 30 ++-- .../embeddable/saved_search_embeddable.tsx | 3 +- .../dataview_picker/change_dataview.tsx | 15 +- .../helpers.test.ts | 36 ---- .../text_based_languages_editor/helpers.ts | 39 ----- .../apps/discover/group2/_sql_view.ts | 15 ++ .../lens/public/app_plugin/lens_top_nav.tsx | 12 +- .../datasources/form_based/form_based.tsx | 2 +- .../datasources/text_based/datapanel.tsx | 7 +- .../fetch_data_from_aggregate_query.ts | 6 +- .../text_based/layerpanel.test.tsx | 2 +- .../datasources/text_based/layerpanel.tsx | 3 +- .../datasources/text_based/to_expression.ts | 3 +- .../public/datasources/text_based/types.ts | 1 + .../datasources/text_based/utils.test.ts | 165 ++++++++++++++++++ .../public/datasources/text_based/utils.ts | 39 ++++- .../apps/discover/visualize_field.ts | 18 ++ .../apps/lens/group1/text_based_languages.ts | 21 +++ 30 files changed, 477 insertions(+), 229 deletions(-) diff --git a/src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.test.ts b/src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.test.ts index d326f9cc70fa1..e9ded5d83b8c0 100644 --- a/src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.test.ts +++ b/src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.test.ts @@ -5,12 +5,11 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { DataViewsContract } from '@kbn/data-views-plugin/common'; +import { createStubDataView } from '@kbn/data-views-plugin/common/mocks'; import { textBasedQueryStateToAstWithValidation } from './text_based_query_state_to_ast_with_validation'; describe('textBasedQueryStateToAstWithValidation', () => { it('returns undefined for a non text based query', async () => { - const dataViewsService = {} as unknown as DataViewsContract; const actual = await textBasedQueryStateToAstWithValidation({ filters: [], query: { language: 'lucene', query: '' }, @@ -18,30 +17,19 @@ describe('textBasedQueryStateToAstWithValidation', () => { from: 'now', to: 'now+7d', }, - dataViewsService, }); expect(actual).toBeUndefined(); }); it('returns an object with the correct structure for an SQL query with existing dataview', async () => { - const dataViewsService = { - getIdsWithTitle: jest.fn(() => { - return [ - { - title: 'foo', - id: 'bar', - }, - ]; - }), - get: jest.fn(() => { - return { - title: 'foo', - id: 'bar', - timeFieldName: 'baz', - }; - }), - } as unknown as DataViewsContract; + const dataView = createStubDataView({ + spec: { + id: 'foo', + title: 'foo', + timeFieldName: '@timestamp', + }, + }); const actual = await textBasedQueryStateToAstWithValidation({ filters: [], query: { sql: 'SELECT * FROM foo' }, @@ -49,7 +37,7 @@ describe('textBasedQueryStateToAstWithValidation', () => { from: 'now', to: 'now+7d', }, - dataViewsService, + dataView, }); expect(actual).toHaveProperty( @@ -68,35 +56,20 @@ describe('textBasedQueryStateToAstWithValidation', () => { ); }); - it('returns an error for text based language with non existing dataview', async () => { - const dataViewsService = { - getIdsWithTitle: jest.fn(() => { - return [ - { - title: 'foo', - id: 'bar', - }, - ]; - }), - get: jest.fn(() => { - return { - title: 'foo', - id: 'bar', - timeFieldName: 'baz', - }; - }), - } as unknown as DataViewsContract; - - await expect( - textBasedQueryStateToAstWithValidation({ - filters: [], - query: { sql: 'SELECT * FROM another_dataview' }, - time: { - from: 'now', - to: 'now+7d', - }, - dataViewsService, + it('returns an object with the correct structure for text based language with non existing dataview', async () => { + const actual = await textBasedQueryStateToAstWithValidation({ + filters: [], + query: { sql: 'SELECT * FROM index_pattern_with_no_data_view' }, + time: { + from: 'now', + to: 'now+7d', + }, + }); + expect(actual).toHaveProperty( + 'chain.2.arguments', + expect.objectContaining({ + query: ['SELECT * FROM index_pattern_with_no_data_view'], }) - ).rejects.toThrow('No data view found for index pattern another_dataview'); + ); }); }); diff --git a/src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.ts b/src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.ts index c065e8af8e914..4d38aad530f45 100644 --- a/src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.ts +++ b/src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.ts @@ -5,27 +5,17 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { - isOfAggregateQueryType, - getIndexPatternFromSQLQuery, - Query, - AggregateQuery, -} from '@kbn/es-query'; -import type { DataViewsContract } from '@kbn/data-views-plugin/common'; +import { isOfAggregateQueryType, Query } from '@kbn/es-query'; +import type { DataView } from '@kbn/data-views-plugin/common'; import type { QueryState } from '..'; import { textBasedQueryStateToExpressionAst } from './text_based_query_state_to_ast'; interface Args extends QueryState { - dataViewsService: DataViewsContract; + dataView?: DataView; inputQuery?: Query; + timeFieldName?: string; } -const getIndexPatternFromAggregateQuery = (query: AggregateQuery) => { - if ('sql' in query) { - return getIndexPatternFromSQLQuery(query.sql); - } -}; - /** * Converts QueryState to expression AST * @param filters array of kibana filters @@ -37,29 +27,17 @@ export async function textBasedQueryStateToAstWithValidation({ query, inputQuery, time, - dataViewsService, + dataView, }: Args) { let ast; if (query && isOfAggregateQueryType(query)) { - // sql query - const idxPattern = getIndexPatternFromAggregateQuery(query); - const idsTitles = await dataViewsService.getIdsWithTitle(); - const dataViewIdTitle = idsTitles.find(({ title }) => title === idxPattern); - - if (dataViewIdTitle) { - const dataView = await dataViewsService.get(dataViewIdTitle.id); - const timeFieldName = dataView.timeFieldName; - - ast = textBasedQueryStateToExpressionAst({ - filters, - query, - inputQuery, - time, - timeFieldName, - }); - } else { - throw new Error(`No data view found for index pattern ${idxPattern}`); - } + ast = textBasedQueryStateToExpressionAst({ + filters, + query, + inputQuery, + time, + timeFieldName: dataView?.timeFieldName, + }); } return ast; } diff --git a/src/plugins/discover/public/__mocks__/data_view.ts b/src/plugins/discover/public/__mocks__/data_view.ts index feb58b59e4e02..a70c7a6480187 100644 --- a/src/plugins/discover/public/__mocks__/data_view.ts +++ b/src/plugins/discover/public/__mocks__/data_view.ts @@ -63,6 +63,14 @@ const fields = [ filterable: true, aggregatable: true, }, + { + name: '@timestamp', + type: 'date', + displayName: '@timestamp', + scripted: false, + filterable: true, + aggregatable: true, + }, ] as DataView['fields']; export const buildDataViewMock = ({ diff --git a/src/plugins/discover/public/application/context/services/__snapshots__/context.test.ts.snap b/src/plugins/discover/public/application/context/services/__snapshots__/context.test.ts.snap index 4d0fae8f1f5a6..48bbf85bb9314 100644 --- a/src/plugins/discover/public/application/context/services/__snapshots__/context.test.ts.snap +++ b/src/plugins/discover/public/application/context/services/__snapshots__/context.test.ts.snap @@ -46,6 +46,9 @@ Object { Object { "field": "object.value", }, + Object { + "field": "@timestamp", + }, ], "query": Object { "bool": Object { diff --git a/src/plugins/discover/public/application/main/discover_main_route.tsx b/src/plugins/discover/public/application/main/discover_main_route.tsx index e6b2ca1d197bb..8706930721136 100644 --- a/src/plugins/discover/public/application/main/discover_main_route.tsx +++ b/src/plugins/discover/public/application/main/discover_main_route.tsx @@ -8,6 +8,7 @@ import React, { useEffect, useState, memo, useCallback, useMemo } from 'react'; import { useParams, useHistory } from 'react-router-dom'; import { DataViewListItem } from '@kbn/data-plugin/public'; +import { isOfAggregateQueryType } from '@kbn/es-query'; import { DataViewSavedObjectConflictError } from '@kbn/data-views-plugin/public'; import { redirectWhenMissing } from '@kbn/kibana-utils-plugin/public'; import { useExecutionContext } from '@kbn/kibana-react-plugin/public'; @@ -101,7 +102,7 @@ export function DiscoverMainRoute(props: Props) { } const { appStateContainer } = getState({ history, savedSearch: nextSavedSearch, services }); - const { index } = appStateContainer.getState(); + const { index, query } = appStateContainer.getState(); const ip = await loadDataView( data.dataViews, config, @@ -110,7 +111,13 @@ export function DiscoverMainRoute(props: Props) { ); const ipList = ip.list; - const dataViewData = resolveDataView(ip, nextSavedSearch.searchSource, toastNotifications); + const isTextBasedQuery = query && isOfAggregateQueryType(query); + const dataViewData = resolveDataView( + ip, + nextSavedSearch.searchSource, + toastNotifications, + isTextBasedQuery + ); await data.dataViews.refreshFields(dataViewData); setDataViewList(ipList); diff --git a/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts b/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts index e14defbdeb585..ef5f5a60b21d6 100644 --- a/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts +++ b/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts @@ -132,4 +132,29 @@ describe('useAdHocDataViews', () => { }); expect(updatedDataView!.id).toEqual('updated-mock-id'); }); + + it('should update the adHocList correctly for text based mode', async () => { + const hook = renderHook((d: DataView) => + useAdHocDataViews({ + dataView: mockDataView, + savedSearch: savedSearchMock, + stateContainer: { + appStateContainer: { getState: jest.fn().mockReturnValue({}) }, + replaceUrlAppState: jest.fn(), + kbnUrlStateStorage: { + kbnUrlControls: { flush: jest.fn() }, + }, + } as unknown as GetStateReturn, + setUrlTracking: jest.fn(), + dataViews: mockDiscoverServices.dataViews, + filterManager: mockDiscoverServices.filterManager, + toastNotifications: mockDiscoverServices.toastNotifications, + isTextBasedMode: true, + }) + ); + + const adHocList = await hook.result.current.adHocDataViewList; + expect(adHocList.length).toBe(1); + expect(adHocList[0].id).toEqual('mock-id'); + }); }); diff --git a/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts b/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts index e3782c698fd33..1871fb9273d2c 100644 --- a/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts +++ b/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts @@ -32,6 +32,7 @@ export const useAdHocDataViews = ({ dataViews, toastNotifications, trackUiMetric, + isTextBasedMode, }: { dataView: DataView; savedSearch: SavedSearch; @@ -41,6 +42,7 @@ export const useAdHocDataViews = ({ filterManager: FilterManager; toastNotifications: ToastsStart; trackUiMetric?: (metricType: string, eventName: string | string[], count?: number) => void; + isTextBasedMode?: boolean; }) => { const [adHocDataViewList, setAdHocDataViewList] = useState( !dataView.isPersisted() ? [dataView] : [] @@ -50,11 +52,14 @@ export const useAdHocDataViews = ({ if (!dataView.isPersisted()) { setAdHocDataViewList((prev) => { const existing = prev.find((prevDataView) => prevDataView.id === dataView.id); - return existing ? prev : [...prev, dataView]; + return existing ? prev : isTextBasedMode ? [dataView] : [...prev, dataView]; }); - trackUiMetric?.(METRIC_TYPE.COUNT, ADHOC_DATA_VIEW_RENDER_EVENT); + // increase the counter only for dataview mode + if (!isTextBasedMode) { + trackUiMetric?.(METRIC_TYPE.COUNT, ADHOC_DATA_VIEW_RENDER_EVENT); + } } - }, [dataView, trackUiMetric]); + }, [dataView, isTextBasedMode, trackUiMetric]); /** * Takes care of checking data view id references in filters @@ -125,5 +130,6 @@ export const useAdHocDataViews = ({ persistDataView, updateAdHocDataViewId, onAddAdHocDataViews, + setAdHocDataViewList, }; }; diff --git a/src/plugins/discover/public/application/main/hooks/use_discover_state.ts b/src/plugins/discover/public/application/main/hooks/use_discover_state.ts index df61c909c6a8e..bc8b97fb6f32b 100644 --- a/src/plugins/discover/public/application/main/hooks/use_discover_state.ts +++ b/src/plugins/discover/public/application/main/hooks/use_discover_state.ts @@ -8,6 +8,7 @@ import { useMemo, useEffect, useState, useCallback } from 'react'; import { isEqual } from 'lodash'; import { History } from 'history'; +import { isOfAggregateQueryType } from '@kbn/es-query'; import { type DataViewListItem, type DataView, DataViewType } from '@kbn/data-views-plugin/public'; import { SavedSearch, getSavedSearch } from '@kbn/saved-search-plugin/public'; import type { SortOrder } from '@kbn/saved-search-plugin/public'; @@ -125,6 +126,7 @@ export function useDiscoverState({ /** * Adhoc data views functionality */ + const isTextBasedMode = state?.query && isOfAggregateQueryType(state?.query); const { adHocDataViewList, persistDataView, updateAdHocDataViewId, onAddAdHocDataViews } = useAdHocDataViews({ dataView, @@ -135,6 +137,7 @@ export function useDiscoverState({ filterManager, toastNotifications, trackUiMetric, + isTextBasedMode, }); const [savedDataViewList, setSavedDataViewList] = useState(initialDataViewList); @@ -169,7 +172,7 @@ export function useDiscoverState({ documents$: data$.documents$, dataViews, stateContainer, - dataViewList: savedDataViewList, + dataViewList: [...savedDataViewList, ...adHocDataViewList], savedSearch, }); diff --git a/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.ts b/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.ts index d79004bf2d796..1ba9ba28fbb72 100644 --- a/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.ts +++ b/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.ts @@ -8,6 +8,7 @@ import { renderHook } from '@testing-library/react-hooks'; import { waitFor } from '@testing-library/react'; +import { DataViewsContract } from '@kbn/data-plugin/public'; import { discoverServiceMock } from '../../../__mocks__/services'; import { useTextBasedQueryLanguage } from './use_text_based_query_language'; import { AppState, GetStateReturn } from '../services/discover_state'; @@ -22,7 +23,8 @@ import { savedSearchMock } from '../../../__mocks__/saved_search'; function getHookProps( replaceUrlAppState: (newState: Partial) => Promise, - query: AggregateQuery | Query | undefined + query: AggregateQuery | Query | undefined, + dataViewsService?: DataViewsContract ) { const stateContainer = { replaceUrlAppState, @@ -43,7 +45,7 @@ function getHookProps( return { documents$, - dataViews: discoverServiceMock.dataViews, + dataViews: dataViewsService ?? discoverServiceMock.dataViews, stateContainer, dataViewList: [dataViewMock as DataViewListItem], savedSearch: savedSearchMock, @@ -72,7 +74,7 @@ describe('useTextBasedQueryLanguage', () => { renderHook(() => useTextBasedQueryLanguage(props)); await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(1)); - expect(replaceUrlAppState).toHaveBeenCalledWith({ index: 'the-data-view-id' }); + expect(replaceUrlAppState).toHaveBeenCalledWith({ columns: [], index: 'the-data-view-id' }); replaceUrlAppState.mockReset(); @@ -159,6 +161,7 @@ describe('useTextBasedQueryLanguage', () => { await waitFor(() => { expect(replaceUrlAppState).toHaveBeenCalledWith({ + columns: [], index: 'the-data-view-id', }); }); @@ -315,4 +318,45 @@ describe('useTextBasedQueryLanguage', () => { columns: ['field1'], }); }); + + test('changing a text based query with an index pattern that not corresponds to a dataview should return results', async () => { + const replaceUrlAppState = jest.fn(); + const dataViewsCreateMock = discoverServiceMock.dataViews.create as jest.Mock; + dataViewsCreateMock.mockImplementation(() => ({ + ...dataViewMock, + })); + const dataViewsService = { + ...discoverServiceMock.dataViews, + create: dataViewsCreateMock, + }; + const props = getHookProps(replaceUrlAppState, query, dataViewsService); + const { documents$ } = props; + + renderHook(() => useTextBasedQueryLanguage(props)); + + documents$.next(msgComplete); + await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(2)); + replaceUrlAppState.mockReset(); + + documents$.next({ + recordRawType: RecordRawType.PLAIN, + fetchStatus: FetchStatus.COMPLETE, + result: [ + { + id: '1', + raw: { field1: 1 }, + flattened: { field1: 1 }, + } as unknown as DataTableRecord, + ], + query: { sql: 'SELECT field1 from the-data-view-*' }, + }); + await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(1)); + + await waitFor(() => { + expect(replaceUrlAppState).toHaveBeenCalledWith({ + index: 'the-data-view-id', + columns: ['field1'], + }); + }); + }); }); diff --git a/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts b/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts index 1521ca1b673a0..4b69302877639 100644 --- a/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts +++ b/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts @@ -13,7 +13,7 @@ import { Query, } from '@kbn/es-query'; import { useCallback, useEffect, useRef } from 'react'; -import { DataViewListItem, DataViewsContract } from '@kbn/data-views-plugin/public'; +import type { DataViewListItem, DataViewsContract, DataView } from '@kbn/data-views-plugin/public'; import { SavedSearch } from '@kbn/saved-search-plugin/public'; import type { GetStateReturn } from '../services/discover_state'; import type { DataDocuments$ } from './use_saved_search'; @@ -35,7 +35,7 @@ export function useTextBasedQueryLanguage({ documents$: DataDocuments$; stateContainer: GetStateReturn; dataViews: DataViewsContract; - dataViewList: DataViewListItem[]; + dataViewList: Array; savedSearch: SavedSearch; }) { const prev = useRef<{ query: AggregateQuery | Query | undefined; columns: string[] }>({ @@ -78,30 +78,44 @@ export function useTextBasedQueryLanguage({ prev.current = { columns: firstRowColumns, query }; nextColumns = firstRowColumns; } + if (firstRowColumns && initialFetch) { prev.current = { columns: firstRowColumns, query }; } } const indexPatternFromQuery = getIndexPatternFromSQLQuery(query.sql); - const dataViewObj = dataViewList.find(({ title }) => title === indexPatternFromQuery); + let dataViewObj = dataViewList.find(({ title }) => title === indexPatternFromQuery); + + // no dataview found but the index pattern is valid + // create an adhoc instance instead + if (!dataViewObj) { + dataViewObj = await dataViews.create({ + title: indexPatternFromQuery, + }); - if (dataViewObj) { - // don't set the columns on initial fetch, to prevent overwriting existing state - const addColumnsToState = Boolean( - nextColumns.length && (!initialFetch || !stateColumns?.length) - ); - // no need to reset index to state if it hasn't changed - const addDataViewToState = Boolean(dataViewObj.id !== index); - if (!addColumnsToState && !addDataViewToState) { - return; + if (dataViewObj.fields.getByName('@timestamp')?.type === 'date') { + dataViewObj.timeFieldName = '@timestamp'; + } else if (dataViewObj.fields.getByType('date')?.length) { + const dateFields = dataViewObj.fields.getByType('date'); + dataViewObj.timeFieldName = dateFields[0].name; } + } - const nextState = { - ...(addDataViewToState && { index: dataViewObj.id }), - ...(addColumnsToState && { columns: nextColumns }), - }; - stateContainer.replaceUrlAppState(nextState); + // don't set the columns on initial fetch, to prevent overwriting existing state + const addColumnsToState = Boolean( + nextColumns.length && (!initialFetch || !stateColumns?.length) + ); + // no need to reset index to state if it hasn't changed + const addDataViewToState = Boolean(dataViewObj.id !== index); + if (!addColumnsToState && !addDataViewToState) { + return; } + + const nextState = { + ...(addDataViewToState && { index: dataViewObj.id }), + columns: nextColumns, + }; + stateContainer.replaceUrlAppState(nextState); } else { // cleanup for a "regular" query cleanup(); diff --git a/src/plugins/discover/public/application/main/utils/fetch_all.ts b/src/plugins/discover/public/application/main/utils/fetch_all.ts index 3057a7992f693..b16358c8b5740 100644 --- a/src/plugins/discover/public/application/main/utils/fetch_all.ts +++ b/src/plugins/discover/public/application/main/utils/fetch_all.ts @@ -88,7 +88,7 @@ export function fetchAll( // Start fetching all required requests const documents = useSql && query - ? fetchSql(query, services.dataViews, data, services.expressions, inspectorAdapters) + ? fetchSql(query, dataView, data, services.expressions, inspectorAdapters) : fetchDocuments(searchSource.createCopy(), fetchDeps); // Handle results of the individual queries and forward the results to the corresponding dataSubjects diff --git a/src/plugins/discover/public/application/main/utils/fetch_sql.ts b/src/plugins/discover/public/application/main/utils/fetch_sql.ts index 07a8177d84365..b61d5334e4453 100644 --- a/src/plugins/discover/public/application/main/utils/fetch_sql.ts +++ b/src/plugins/discover/public/application/main/utils/fetch_sql.ts @@ -12,7 +12,7 @@ import type { Adapters } from '@kbn/inspector-plugin/common'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { ExpressionsStart } from '@kbn/expressions-plugin/public'; import type { Datatable } from '@kbn/expressions-plugin/public'; -import type { DataViewsContract } from '@kbn/data-views-plugin/common'; +import type { DataView } from '@kbn/data-views-plugin/common'; import { textBasedQueryStateToAstWithValidation } from '@kbn/data-plugin/common'; import { DataTableRecord } from '../../../types'; @@ -25,7 +25,7 @@ interface SQLErrorResponse { export function fetchSql( query: Query | AggregateQuery, - dataViewsService: DataViewsContract, + dataView: DataView, data: DataPublicPluginStart, expressions: ExpressionsStart, inspectorAdapters: Adapters, @@ -37,7 +37,7 @@ export function fetchSql( filters, query, time: timeRange, - dataViewsService, + dataView, inputQuery, }) .then((ast) => { diff --git a/src/plugins/discover/public/application/main/utils/resolve_data_view.ts b/src/plugins/discover/public/application/main/utils/resolve_data_view.ts index 1558f03bef0c0..c68f69ead1796 100644 --- a/src/plugins/discover/public/application/main/utils/resolve_data_view.ts +++ b/src/plugins/discover/public/application/main/utils/resolve_data_view.ts @@ -138,7 +138,8 @@ export async function loadDataView( export function resolveDataView( ip: DataViewData, searchSource: ISearchSource, - toastNotifications: ToastsStart + toastNotifications: ToastsStart, + isTextBasedQuery?: boolean ) { const { loaded: loadedDataView, stateVal, stateValFound } = ip; @@ -170,19 +171,20 @@ export function resolveDataView( }); return ownDataView; } - - toastNotifications.addWarning({ - title: warningTitle, - text: i18n.translate('discover.showingDefaultDataViewWarningDescription', { - defaultMessage: - 'Showing the default data view: "{loadedDataViewTitle}" ({loadedDataViewId})', - values: { - loadedDataViewTitle: loadedDataView.getIndexPattern(), - loadedDataViewId: loadedDataView.id, - }, - }), - 'data-test-subj': 'dscDataViewNotFoundShowDefaultWarning', - }); + if (!Boolean(isTextBasedQuery)) { + toastNotifications.addWarning({ + title: warningTitle, + text: i18n.translate('discover.showingDefaultDataViewWarningDescription', { + defaultMessage: + 'Showing the default data view: "{loadedDataViewTitle}" ({loadedDataViewId})', + values: { + loadedDataViewTitle: loadedDataView.getIndexPattern(), + loadedDataViewId: loadedDataView.id, + }, + }), + 'data-test-subj': 'dscDataViewNotFoundShowDefaultWarning', + }); + } } return loadedDataView; diff --git a/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx b/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx index a98fb03539127..81e25fd3c6b8d 100644 --- a/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx +++ b/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx @@ -219,6 +219,7 @@ export class SavedSearchEmbeddable : child; const query = this.savedSearch.searchSource.getField('query'); + const dataView = this.savedSearch.searchSource.getField('index')!; const recordRawType = getRawRecordType(query); const useSql = recordRawType === RecordRawType.PLAIN; @@ -227,7 +228,7 @@ export class SavedSearchEmbeddable if (useSql && query) { const result = await fetchSql( this.savedSearch.searchSource.getField('query')!, - this.services.dataViews, + dataView, this.services.data, this.services.expressions, this.services.inspector, diff --git a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx index e218f27dadc55..ca6d8d0aaccc5 100644 --- a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx +++ b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx @@ -116,15 +116,13 @@ export function ChangeDataView({ setDataViewsList(dataViewsRefs); }; fetchDataViews(); - }, [data, currentDataViewId, adHocDataViews, savedDataViews]); + }, [data, currentDataViewId, adHocDataViews, savedDataViews, isTextBasedLangSelected]); useEffect(() => { - if (trigger.label) { - if (textBasedLanguage) { - setTriggerLabel(textBasedLanguage.toUpperCase()); - } else { - setTriggerLabel(trigger.label); - } + if (textBasedLanguage) { + setTriggerLabel(textBasedLanguage.toUpperCase()); + } else { + setTriggerLabel(trigger.label); } }, [textBasedLanguage, trigger.label]); @@ -157,7 +155,8 @@ export function ChangeDataView({ {...rest} > <> - {isAdHocSelected && ( + {/* we don't want to display the adHoc icon on text based mode */} + {isAdHocSelected && !isTextBasedLangSelected && ( { endLineNumber: Number(lineNumber), severity: monaco.MarkerSeverity.Error, }; - } else if (error.message.includes('No data view found')) { - const dataviewString = getIndexPatternFromSQLQuery(code); - const temp = code.split(dataviewString); - const lastChar = temp[0]?.charAt(temp[0]?.length - 1); - const additionnalLength = lastChar === '"' || "'" ? 2 : 0; - // 5 is the length of FROM + space - const errorLength = 5 + dataviewString.length + additionnalLength; - // no dataview found error message - const hasLines = /\r|\n/.exec(code); - if (hasLines) { - const linesText = code.split(/\r|\n/); - let indexWithError = 1; - let lineWithError = ''; - linesText.forEach((line, index) => { - if (line.includes('FROM') || line.includes('from')) { - indexWithError = index + 1; - lineWithError = line; - } - }); - const lineWithErrorUpperCase = lineWithError.toUpperCase(); - return { - message: error.message, - startColumn: lineWithErrorUpperCase.indexOf('FROM') + 1, - startLineNumber: indexWithError, - endColumn: lineWithErrorUpperCase.indexOf('FROM') + 1 + errorLength, - endLineNumber: indexWithError, - severity: monaco.MarkerSeverity.Error, - }; - } else { - return { - message: error.message, - startColumn: code.toUpperCase().indexOf('FROM') + 1, - startLineNumber: 1, - endColumn: code.toUpperCase().indexOf('FROM') + 1 + errorLength, - endLineNumber: 1, - severity: monaco.MarkerSeverity.Error, - }; - } } else { // unknown error message return { diff --git a/test/functional/apps/discover/group2/_sql_view.ts b/test/functional/apps/discover/group2/_sql_view.ts index b52a147d09867..4ae63f0e6b1f1 100644 --- a/test/functional/apps/discover/group2/_sql_view.ts +++ b/test/functional/apps/discover/group2/_sql_view.ts @@ -113,6 +113,21 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { cell = await dataGrid.getCellElement(0, 3); expect(await cell.getVisibleText()).to.be('2269'); }); + + it('should query an index pattern that doesnt translate to a dataview correctly', async function () { + await PageObjects.discover.selectTextBaseLang('SQL'); + const testQuery = `SELECT "@tags", geo.dest, count(*) occurred FROM "logstash*" + GROUP BY "@tags", geo.dest + HAVING occurred > 20 + ORDER BY occurred DESC`; + + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + const cell = await dataGrid.getCellElement(0, 3); + expect(await cell.getVisibleText()).to.be('2269'); + }); }); }); } diff --git a/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx b/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx index 6019389284fea..2b94c0bf20c6e 100644 --- a/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx +++ b/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx @@ -411,13 +411,20 @@ export const LensTopNavMenu = ({ const dataViewId = datasourceMap[activeDatasourceId].getUsedDataView( datasourceStates[activeDatasourceId].state ); - const dataView = await data.dataViews.get(dataViewId); + const dataView = dataViewId ? await data.dataViews.get(dataViewId) : undefined; setCurrentIndexPattern(dataView ?? indexPatterns[0]); } }; setCurrentPattern(); - }, [activeDatasourceId, datasourceMap, datasourceStates, indexPatterns, data.dataViews]); + }, [ + activeDatasourceId, + datasourceMap, + datasourceStates, + indexPatterns, + data.dataViews, + isOnTextBasedMode, + ]); useEffect(() => { if (typeof query === 'object' && query !== null && isOfAggregateQueryType(query)) { @@ -979,6 +986,7 @@ export const LensTopNavMenu = ({ } } } + return ( { async function fetchData() { if (query && isOfAggregateQueryType(query) && !isEqual(query, prevQuery)) { + const frameDataViews = frame.dataViews; const stateFromQuery = await getStateFromAggregateQuery( state, query, dataViews, data, - expressions + expressions, + frameDataViews ); setDataHasLoaded(true); @@ -73,7 +76,7 @@ export function TextBasedDataPanel({ } } fetchData(); - }, [data, dataViews, expressions, prevQuery, query, setState, state]); + }, [data, dataViews, expressions, prevQuery, query, setState, state, frame.dataViews]); const { fieldList } = state; diff --git a/x-pack/plugins/lens/public/datasources/text_based/fetch_data_from_aggregate_query.ts b/x-pack/plugins/lens/public/datasources/text_based/fetch_data_from_aggregate_query.ts index b41289d11e8fb..0bd710375ab41 100644 --- a/x-pack/plugins/lens/public/datasources/text_based/fetch_data_from_aggregate_query.ts +++ b/x-pack/plugins/lens/public/datasources/text_based/fetch_data_from_aggregate_query.ts @@ -10,7 +10,7 @@ import { Query, AggregateQuery, Filter } from '@kbn/es-query'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { ExpressionsStart } from '@kbn/expressions-plugin/public'; import type { Datatable } from '@kbn/expressions-plugin/public'; -import type { DataViewsContract } from '@kbn/data-views-plugin/common'; +import type { DataView } from '@kbn/data-views-plugin/common'; import { textBasedQueryStateToAstWithValidation } from '@kbn/data-plugin/common'; interface TextBasedLanguagesErrorResponse { @@ -22,7 +22,7 @@ interface TextBasedLanguagesErrorResponse { export function fetchDataFromAggregateQuery( query: Query | AggregateQuery, - dataViewsService: DataViewsContract, + dataView: DataView, data: DataPublicPluginStart, expressions: ExpressionsStart, filters?: Filter[], @@ -33,7 +33,7 @@ export function fetchDataFromAggregateQuery( filters, query, time: timeRange, - dataViewsService, + dataView, inputQuery, }) .then((ast) => { diff --git a/x-pack/plugins/lens/public/datasources/text_based/layerpanel.test.tsx b/x-pack/plugins/lens/public/datasources/text_based/layerpanel.test.tsx index bc2d64e8ac55d..d6e4be8c99387 100644 --- a/x-pack/plugins/lens/public/datasources/text_based/layerpanel.test.tsx +++ b/x-pack/plugins/lens/public/datasources/text_based/layerpanel.test.tsx @@ -78,7 +78,7 @@ describe('Layer Data Panel', () => { expect(instance.find(ChangeIndexPattern).prop('trigger')).toStrictEqual({ fontWeight: 'normal', isDisabled: true, - label: 'My fake index pattern', + label: 'my-fake-index-pattern', size: 's', title: 'my-fake-index-pattern', }); diff --git a/x-pack/plugins/lens/public/datasources/text_based/layerpanel.tsx b/x-pack/plugins/lens/public/datasources/text_based/layerpanel.tsx index 879d28a607c7f..62f99cbfb42d9 100644 --- a/x-pack/plugins/lens/public/datasources/text_based/layerpanel.tsx +++ b/x-pack/plugins/lens/public/datasources/text_based/layerpanel.tsx @@ -18,7 +18,8 @@ export interface TextBasedLayerPanelProps extends DatasourceLayerPanelProps ref.id === layer.index); + const dataView = state.indexPatternRefs.find((ref) => ref.id === layer.index); + const notFoundTitleLabel = i18n.translate('xpack.lens.layerPanel.missingDataView', { defaultMessage: 'Data view not found', }); diff --git a/x-pack/plugins/lens/public/datasources/text_based/to_expression.ts b/x-pack/plugins/lens/public/datasources/text_based/to_expression.ts index dba9a93555ce2..e0c6889a59c79 100644 --- a/x-pack/plugins/lens/public/datasources/text_based/to_expression.ts +++ b/x-pack/plugins/lens/public/datasources/text_based/to_expression.ts @@ -34,7 +34,8 @@ function getExpressionForLayer(layer: TextBasedLayer, refs: IndexPatternRef[]): }; } }); - const timeFieldName = refs.find((r) => r.id === layer.index)?.timeField; + const timeFieldName = layer.timeField ?? undefined; + const textBasedQueryToAst = textBasedQueryStateToExpressionAst({ query: layer.query, timeFieldName, diff --git a/x-pack/plugins/lens/public/datasources/text_based/types.ts b/x-pack/plugins/lens/public/datasources/text_based/types.ts index 0e30e0d517054..0594fdcf2fbc2 100644 --- a/x-pack/plugins/lens/public/datasources/text_based/types.ts +++ b/x-pack/plugins/lens/public/datasources/text_based/types.ts @@ -43,4 +43,5 @@ export interface IndexPatternRef { id: string; title: string; timeField?: string; + name?: string; } diff --git a/x-pack/plugins/lens/public/datasources/text_based/utils.test.ts b/x-pack/plugins/lens/public/datasources/text_based/utils.test.ts index 1698ae536f44f..8db05279d593e 100644 --- a/x-pack/plugins/lens/public/datasources/text_based/utils.test.ts +++ b/x-pack/plugins/lens/public/datasources/text_based/utils.test.ts @@ -189,6 +189,14 @@ describe('Text based languages utils', () => { timeFieldName: 'timeField', }) ), + create: jest.fn().mockReturnValue( + Promise.resolve({ + id: '1', + title: 'my-fake-index-pattern', + timeFieldName: 'timeField', + isPersisted: () => false, + }) + ), }, dataMock, expressionsMock @@ -281,5 +289,162 @@ describe('Text based languages utils', () => { }, }); }); + + it('should return the correct state for not existing dataview', async () => { + const state = { + layers: { + first: { + allColumns: [], + columns: [], + query: undefined, + index: '', + }, + }, + indexPatternRefs: [], + fieldList: [], + initialContext: { + contextualFields: ['bytes', 'dest'], + query: { sql: 'SELECT * FROM "foo"' }, + fieldName: '', + dataViewSpec: { + title: 'foo', + id: '1', + name: 'Foo', + }, + }, + }; + const dataViewsMock = dataViewPluginMocks.createStartContract(); + const dataMock = dataPluginMock.createStartContract(); + const expressionsMock = expressionsPluginMock.createStartContract(); + const updatedState = await getStateFromAggregateQuery( + state, + { sql: 'SELECT * FROM my-fake-index-*' }, + { + ...dataViewsMock, + getIdsWithTitle: jest.fn().mockReturnValue( + Promise.resolve([ + { id: '1', title: 'my-fake-index-pattern' }, + { id: '2', title: 'my-fake-restricted-pattern' }, + { id: '3', title: 'my-compatible-pattern' }, + ]) + ), + get: jest.fn().mockReturnValue( + Promise.resolve({ + id: '1', + title: 'my-fake-index-pattern', + timeFieldName: 'timeField', + }) + ), + create: jest.fn().mockReturnValue( + Promise.resolve({ + id: 'adHoc-id', + title: 'my-fake-index-*', + name: 'my-fake-index-*', + timeFieldName: 'timeField', + isPersisted: () => false, + fields: { + getByName: jest.fn().mockReturnValue({ + type: 'date', + }), + }, + }) + ), + }, + dataMock, + expressionsMock + ); + + expect(updatedState).toStrictEqual({ + initialContext: { + contextualFields: ['bytes', 'dest'], + query: { sql: 'SELECT * FROM "foo"' }, + fieldName: '', + dataViewSpec: { + title: 'foo', + id: '1', + name: 'Foo', + }, + }, + fieldList: [ + { + name: 'timestamp', + id: 'timestamp', + meta: { + type: 'date', + }, + }, + { + name: 'bytes', + id: 'bytes', + meta: { + type: 'number', + }, + }, + { + name: 'memory', + id: 'memory', + meta: { + type: 'number', + }, + }, + ], + indexPatternRefs: [ + { + id: '3', + timeField: 'timeField', + title: 'my-compatible-pattern', + }, + { + id: '1', + timeField: 'timeField', + title: 'my-fake-index-pattern', + }, + { + id: '2', + timeField: 'timeField', + title: 'my-fake-restricted-pattern', + }, + { + id: 'adHoc-id', + timeField: '@timestamp', + title: 'my-fake-index-*', + }, + ], + layers: { + first: { + allColumns: [ + { + fieldName: 'timestamp', + columnId: 'timestamp', + meta: { + type: 'date', + }, + }, + { + fieldName: 'bytes', + columnId: 'bytes', + meta: { + type: 'number', + }, + }, + { + fieldName: 'memory', + columnId: 'memory', + meta: { + type: 'number', + }, + }, + ], + columns: [], + errors: [], + index: 'adHoc-id', + query: { + sql: 'SELECT * FROM my-fake-index-*', + }, + timeField: '@timestamp', + }, + }, + }); + }); }); }); diff --git a/x-pack/plugins/lens/public/datasources/text_based/utils.ts b/x-pack/plugins/lens/public/datasources/text_based/utils.ts index 5078c967ff9e8..a521b9f245a34 100644 --- a/x-pack/plugins/lens/public/datasources/text_based/utils.ts +++ b/x-pack/plugins/lens/public/datasources/text_based/utils.ts @@ -14,6 +14,7 @@ import { generateId } from '../../id_generator'; import { fetchDataFromAggregateQuery } from './fetch_data_from_aggregate_query'; import type { IndexPatternRef, TextBasedPrivateState, TextBasedLayerColumn } from './types'; +import type { DataViewsState } from '../../state_management'; export async function loadIndexPatternRefs( indexPatternsService: DataViewsPublicPluginStart @@ -64,9 +65,12 @@ export async function getStateFromAggregateQuery( query: AggregateQuery, dataViews: DataViewsPublicPluginStart, data: DataPublicPluginStart, - expressions: ExpressionsStart + expressions: ExpressionsStart, + frameDataViews?: DataViewsState ) { - const indexPatternRefs: IndexPatternRef[] = await loadIndexPatternRefs(dataViews); + let indexPatternRefs: IndexPatternRef[] = frameDataViews?.indexPatternRefs.length + ? frameDataViews.indexPatternRefs + : await loadIndexPatternRefs(dataViews); const errors: Error[] = []; const layerIds = Object.keys(state.layers); const context = state.initialContext; @@ -74,14 +78,37 @@ export async function getStateFromAggregateQuery( // fetch the pattern from the query const indexPattern = getIndexPatternFromTextBasedQuery(query); // get the id of the dataview - const index = indexPatternRefs.find((r) => r.title === indexPattern)?.id ?? ''; + let dataViewId = indexPatternRefs.find((r) => r.title === indexPattern)?.id ?? ''; let columnsFromQuery: DatatableColumn[] = []; let allColumns: TextBasedLayerColumn[] = []; let timeFieldName; try { - const table = await fetchDataFromAggregateQuery(query, dataViews, data, expressions); - const dataView = await dataViews.get(index); + const dataView = dataViewId + ? await dataViews.get(dataViewId) + : await dataViews.create({ + title: indexPattern, + }); + if (!dataViewId && !dataView.isPersisted()) { + if (dataView && dataView.id) { + if (dataView.fields.getByName('@timestamp')?.type === 'date') { + dataView.timeFieldName = '@timestamp'; + } else if (dataView.fields.getByType('date')?.length) { + const dateFields = dataView.fields.getByType('date'); + dataView.timeFieldName = dateFields[0].name; + } + dataViewId = dataView?.id; + indexPatternRefs = [ + ...indexPatternRefs, + { + id: dataView.id, + title: dataView.name, + timeField: dataView.timeFieldName, + }, + ]; + } + } timeFieldName = dataView.timeFieldName; + const table = await fetchDataFromAggregateQuery(query, dataView, data, expressions); columnsFromQuery = table?.columns ?? []; allColumns = getAllColumns(state.layers[newLayerId].allColumns, columnsFromQuery); } catch (e) { @@ -91,7 +118,7 @@ export async function getStateFromAggregateQuery( const tempState = { layers: { [newLayerId]: { - index, + index: dataViewId, query, columns: state.layers[newLayerId].columns ?? [], allColumns, diff --git a/x-pack/test/functional/apps/discover/visualize_field.ts b/x-pack/test/functional/apps/discover/visualize_field.ts index 1d5923cb112e1..0abd41d94976c 100644 --- a/x-pack/test/functional/apps/discover/visualize_field.ts +++ b/x-pack/test/functional/apps/discover/visualize_field.ts @@ -147,5 +147,23 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { expect(await dimensions[1].getVisibleText()).to.be('average'); }); }); + + it('should visualize correctly text based language queries based on index patterns', async () => { + await PageObjects.discover.selectTextBaseLang('SQL'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await monacoEditor.setCodeEditorValue( + 'SELECT extension, AVG("bytes") as average FROM "logstash*" GROUP BY extension' + ); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await testSubjects.click('textBased-visualize'); + + await retry.try(async () => { + const dimensions = await testSubjects.findAll('lns-dimensionTrigger-textBased'); + expect(dimensions).to.have.length(2); + expect(await dimensions[1].getVisibleText()).to.be('average'); + }); + }); }); } diff --git a/x-pack/test/functional/apps/lens/group1/text_based_languages.ts b/x-pack/test/functional/apps/lens/group1/text_based_languages.ts index 138c5fea4b898..2050bead5a91f 100644 --- a/x-pack/test/functional/apps/lens/group1/text_based_languages.ts +++ b/x-pack/test/functional/apps/lens/group1/text_based_languages.ts @@ -51,8 +51,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await switchToTextBasedLanguage('SQL'); expect(await testSubjects.exists('showQueryBarMenu')).to.be(false); expect(await testSubjects.exists('addFilter')).to.be(false); + await testSubjects.click('unifiedTextLangEditor-expand'); const textBasedQuery = await monacoEditor.getCodeEditorValue(); expect(textBasedQuery).to.be('SELECT * FROM "log*"'); + await testSubjects.click('unifiedTextLangEditor-minimize'); }); it('should allow adding and using a field', async () => { @@ -137,5 +139,24 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await testSubjects.exists('addFilter')).to.be(true); expect(await queryBar.getQueryString()).to.be(''); }); + + it('should allow using an index pattern that is not translated to a dataview', async () => { + await switchToTextBasedLanguage('SQL'); + await testSubjects.click('unifiedTextLangEditor-expand'); + await monacoEditor.setCodeEditorValue( + 'SELECT extension, AVG("bytes") as average FROM "logstash*" GROUP BY extension' + ); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.switchToVisualization('lnsMetric'); + await PageObjects.lens.configureTextBasedLanguagesDimension({ + dimension: 'lnsMetric_primaryMetricDimensionPanel > lns-empty-dimension', + field: 'average', + }); + + await PageObjects.lens.waitForVisualization('mtrVis'); + const metricData = await PageObjects.lens.getMetricVisualizationData(); + expect(metricData[0].title).to.eql('average'); + }); }); } From d01b5de25257b5a617e5d0c6810145b7d0edfbf4 Mon Sep 17 00:00:00 2001 From: Dario Gieselaar Date: Wed, 21 Dec 2022 11:38:42 +0100 Subject: [PATCH 06/36] [Profiling] Show values of highlighted sample in TopN chart (#147431) Closes https://github.com/elastic/prodfiler/issues/2842 --- x-pack/plugins/profiling/common/topn.ts | 11 +++- .../public/components/chart_grid.tsx | 2 + .../components/stack_traces_view/index.tsx | 20 +++---- .../public/components/stacked_bar_chart.tsx | 54 ++++++++++--------- .../profiling/public/components/subchart.tsx | 54 ++++++++++++++++--- .../public/utils/formatters/as_number.ts | 6 +++ 6 files changed, 106 insertions(+), 41 deletions(-) diff --git a/x-pack/plugins/profiling/common/topn.ts b/x-pack/plugins/profiling/common/topn.ts index bce287cf281f1..70d0f38624559 100644 --- a/x-pack/plugins/profiling/common/topn.ts +++ b/x-pack/plugins/profiling/common/topn.ts @@ -19,11 +19,13 @@ export const OTHER_BUCKET_LABEL = i18n.translate('xpack.profiling.topn.otherBuck export interface CountPerTime { Timestamp: number; + Percentage: number; Count: number | null; } export interface TopNSample extends CountPerTime { Category: string; + Percentage: number; } export interface TopNSamples { @@ -157,6 +159,8 @@ export function createTopNSamples( // from the total const otherFrameCountsByTimestamp = new Map(); + const totalFrameCountsByTimestamp = new Map(); + let addOtherBucket = false; for (let i = 0; i < response.over_time.buckets.length; i++) { @@ -170,6 +174,8 @@ export function createTopNSamples( } otherFrameCountsByTimestamp.set(timestamp, valueForOtherBucket); + + totalFrameCountsByTimestamp.set(timestamp, bucket.count.value ?? 0); } // Only add the 'other' bucket if at least one value per timestamp is > 0 @@ -190,10 +196,12 @@ export function createTopNSamples( for (const category of bucketsByCategories.keys()) { const frameCountsByTimestamp = bucketsByCategories.get(category); for (const timestamp of timestamps) { + const count = frameCountsByTimestamp.get(timestamp) ?? 0; const sample: TopNSample = { Timestamp: timestamp, - Count: frameCountsByTimestamp.get(timestamp) ?? 0, + Count: count, Category: category, + Percentage: (count / totalFrameCountsByTimestamp.get(timestamp)!) * 100, }; samples.push(sample); } @@ -233,6 +241,7 @@ export function groupSamplesByCategory({ } const series = seriesByCategory.get(sample.Category)!; series.push({ + Percentage: sample.Percentage, Timestamp: sample.Timestamp, Count: sample.Count, }); diff --git a/x-pack/plugins/profiling/public/components/chart_grid.tsx b/x-pack/plugins/profiling/public/components/chart_grid.tsx index ac6cab8dd4102..957222fc30c1f 100644 --- a/x-pack/plugins/profiling/public/components/chart_grid.tsx +++ b/x-pack/plugins/profiling/public/components/chart_grid.tsx @@ -44,6 +44,7 @@ export const ChartGrid: React.FC = ({ limit, charts, showFrames metadata={subchart.Metadata} height={200} data={subchart.Series} + sample={null} showAxes onShowMoreClick={() => { setSelectedSubchart(subchart); @@ -71,6 +72,7 @@ export const ChartGrid: React.FC = ({ limit, charts, showFrames metadata={selectedSubchart.Metadata} height={200} data={selectedSubchart.Series} + sample={null} showAxes onShowMoreClick={null} showFrames={showFrames} diff --git a/x-pack/plugins/profiling/public/components/stack_traces_view/index.tsx b/x-pack/plugins/profiling/public/components/stack_traces_view/index.tsx index 19834410c6b7a..849a927d649a9 100644 --- a/x-pack/plugins/profiling/public/components/stack_traces_view/index.tsx +++ b/x-pack/plugins/profiling/public/components/stack_traces_view/index.tsx @@ -8,7 +8,7 @@ import { EuiButton, EuiButtonGroup, EuiFlexGroup, EuiFlexItem, EuiPanel } from ' import { i18n } from '@kbn/i18n'; import React, { useState } from 'react'; import { StackTracesDisplayOption, TopNType } from '../../../common/stack_traces'; -import { groupSamplesByCategory, TopNResponse, TopNSubchart } from '../../../common/topn'; +import { groupSamplesByCategory, TopNResponse, TopNSample } from '../../../common/topn'; import { useProfilingParams } from '../../hooks/use_profiling_params'; import { useProfilingRouter } from '../../hooks/use_profiling_router'; import { useProfilingRoutePath } from '../../hooks/use_profiling_route_path'; @@ -78,9 +78,12 @@ export function StackTracesView() { [topNType, timeRange.start, timeRange.end, fetchTopN, kuery] ); - const [highlightedSubchart, setHighlightedSubchart] = useState( - undefined - ); + const [highlightedSample, setHighlightedSample] = useState(null); + + const highlightedSubchart = + (highlightedSample && + state.data?.charts.find((chart) => chart.Category === highlightedSample?.Category)) || + null; const { data } = state; @@ -143,14 +146,13 @@ export function StackTracesView() { }, }); }} - onSampleClick={(sample) => { - setHighlightedSubchart( - data?.charts.find((subchart) => subchart.Category === sample.Category) - ); + onSampleOver={(sample) => { + setHighlightedSample(sample); }} onSampleOut={() => { - setHighlightedSubchart(undefined); + setHighlightedSample(null); }} + highlightedSample={highlightedSample} highlightedSubchart={highlightedSubchart} showFrames={topNType === TopNType.Traces} /> diff --git a/x-pack/plugins/profiling/public/components/stacked_bar_chart.tsx b/x-pack/plugins/profiling/public/components/stacked_bar_chart.tsx index 977a439d9ce9d..b6b7e8d8940cd 100644 --- a/x-pack/plugins/profiling/public/components/stacked_bar_chart.tsx +++ b/x-pack/plugins/profiling/public/components/stacked_bar_chart.tsx @@ -26,10 +26,15 @@ import { useProfilingChartsTheme } from '../hooks/use_profiling_charts_theme'; import { asPercentage } from '../utils/formatters/as_percentage'; import { SubChart } from './subchart'; -function SubchartTooltip({ +const SubchartTooltip = ({ highlightedSubchart, + highlightedSample, showFrames, -}: TooltipInfo & { highlightedSubchart: TopNSubchart; showFrames: boolean }) { +}: TooltipInfo & { + highlightedSubchart: TopNSubchart; + highlightedSample: TopNSample | null; + showFrames: boolean; +}) => { // max tooltip width - 2 * padding (16px) const width = 224; return ( @@ -39,8 +44,9 @@ function SubchartTooltip({ color={highlightedSubchart.Color} category={highlightedSubchart.Category} label={highlightedSubchart.Label} - percentage={highlightedSubchart.Percentage} data={highlightedSubchart.Series} + percentage={highlightedSubchart.Percentage} + sample={highlightedSample} showFrames={showFrames} /* we don't show metadata in tooltips */ metadata={[]} @@ -52,15 +58,16 @@ function SubchartTooltip({ /> ); -} +}; export interface StackedBarChartProps { height: number; asPercentages: boolean; onBrushEnd: (range: { rangeFrom: string; rangeTo: string }) => void; - onSampleClick: (sample: TopNSample) => void; + onSampleOver: (sample: TopNSample) => void; onSampleOut: () => void; - highlightedSubchart?: TopNSubchart; + highlightedSample: TopNSample | null; + highlightedSubchart: TopNSubchart | null; charts: TopNSubchart[]; showFrames: boolean; } @@ -69,8 +76,9 @@ export const StackedBarChart: React.FC = ({ height, asPercentages, onBrushEnd, - onSampleClick, onSampleOut, + onSampleOver, + highlightedSample, highlightedSubchart, charts, showFrames, @@ -79,6 +87,17 @@ export const StackedBarChart: React.FC = ({ const { chartsBaseTheme, chartsTheme } = useProfilingChartsTheme(); + const customTooltip = highlightedSubchart + ? (props: TooltipInfo) => ( + + ) + : () => <>; + return ( = ({ }} baseTheme={chartsBaseTheme} theme={chartsTheme} - onElementClick={(events) => { + onElementOver={(events) => { const [value] = events[0] as XYChartElementEvent; - onSampleClick(value.datum as TopNSample); - }} - onElementOver={() => { - onSampleOut(); + onSampleOver(value.datum as TopNSample); }} onElementOut={() => { onSampleOut(); }} /> - ( - - ) - : () => <> - } - /> + {charts.map((chart) => ( ['style']; showFrames: boolean; padTitle: boolean; + sample: TopNSample | null; } const NUM_DISPLAYED_FRAMES = 5; @@ -71,6 +77,7 @@ export const SubChart: React.FC = ({ style, showFrames, padTitle, + sample, }) => { const theme = useEuiTheme(); @@ -196,7 +203,23 @@ export const SubChart: React.FC = ({ )} - {asPercentage(percentage / 100)} + + {sample ? ( + + {asPercentage(sample.Percentage / 100)} + + ) : null} + + + {sample + ? i18n.translate('xpack.profiling.stackFrames.subChart.avg', { + defaultMessage: 'avg. {percentage}', + values: { percentage: asPercentage(percentage / 100) }, + }) + : asPercentage(percentage / 100)} + + + @@ -220,6 +243,23 @@ export const SubChart: React.FC = ({ curve={CurveType.CURVE_STEP_AFTER} color={color} /> + {sample ? ( + } + markerPosition={Position.Top} + hideTooltips + /> + ) : null} {showAxes ? ( = ({ backgroundColor: `rgba(255, 255, 255, 0.75)`, }} > - {i18n.translate('xpack.profiling.maxValue', { - defaultMessage: 'Max: {max}', - values: { max: Math.max(...data.map((value) => value.Count ?? 0)) }, - })} + {sample + ? asNumber(sample.Count!) + : i18n.translate('xpack.profiling.maxValue', { + defaultMessage: 'Max: {max}', + values: { max: asNumber(Math.max(...data.map((value) => value.Count ?? 0))) }, + })} ) : null} diff --git a/x-pack/plugins/profiling/public/utils/formatters/as_number.ts b/x-pack/plugins/profiling/public/utils/formatters/as_number.ts index 365cd876ad69e..3b6600f82d6ae 100644 --- a/x-pack/plugins/profiling/public/utils/formatters/as_number.ts +++ b/x-pack/plugins/profiling/public/utils/formatters/as_number.ts @@ -5,7 +5,13 @@ * 2.0. */ +import { NOT_AVAILABLE_LABEL } from '../../../common'; + export function asNumber(value: number): string { + if (isNaN(value)) { + return NOT_AVAILABLE_LABEL; + } + if (value === 0) { return '0'; } From 56519fa4af98fa4d560b9286d9dd834647b6ebfb Mon Sep 17 00:00:00 2001 From: Anton Dosov Date: Wed, 21 Dec 2022 12:30:15 +0100 Subject: [PATCH 07/36] [Reporting] Fixes a sharpness issue in some charts in PDF reports (#147854) ## Summary Fixes the bug that pdf reports can be generated with blurry text, for example: ![Screenshot 2022-12-21 at 11 22 52](https://user-images.githubusercontent.com/7784120/208882394-2dff0abb-923e-4430-a322-4e03f8c38792.png) Fixed version example: ![Screenshot 2022-12-21 at 11 23 06](https://user-images.githubusercontent.com/7784120/208882431-080d6fb6-39f1-49a8-a791-286fb3e8e6f0.png) The bug happened because the device pixel ration was changing mid-capture. The the page was opened with scaleFactor=1. Before the screenshot is captured, the viewport is resized to scaleFactor=2. This could cause issues with `` based charts as most of them don't redraw on devicePixelRatio changes (this has to be fixed separately). This fix attempts to open the page with the final scaleFactor (which in the most cases is 2) ### Release Notes Fixes a sharpness issue in some charts in PDF reports Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../browsers/chromium/driver_factory/index.ts | 3 ++- .../server/screenshots/index.test.ts | 18 ++++++++++++++++++ .../screenshotting/server/screenshots/index.ts | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts b/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts index 984fa0470d216..5acc6616236da 100644 --- a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts +++ b/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts @@ -36,7 +36,7 @@ import { getMetrics, PerformanceMetrics } from './metrics'; interface CreatePageOptions { browserTimezone?: string; - defaultViewport: { width?: number }; + defaultViewport: { width?: number; deviceScaleFactor?: number }; openUrlTimeout: number; } @@ -145,6 +145,7 @@ export class HeadlessChromiumDriverFactory { const viewport = { ...DEFAULT_VIEWPORT, width: defaultViewport.width ?? DEFAULT_VIEWPORT.width, + deviceScaleFactor: defaultViewport.deviceScaleFactor ?? DEFAULT_VIEWPORT.deviceScaleFactor, }; logger.debug( diff --git a/x-pack/plugins/screenshotting/server/screenshots/index.test.ts b/x-pack/plugins/screenshotting/server/screenshots/index.test.ts index 70aca733a03d1..fbd5f0501ea95 100644 --- a/x-pack/plugins/screenshotting/server/screenshots/index.test.ts +++ b/x-pack/plugins/screenshotting/server/screenshots/index.test.ts @@ -191,6 +191,24 @@ describe('Screenshot Observable Pipeline', () => { expect(result).toHaveProperty('results'); expect(result.results).toMatchSnapshot(); }); + + it("initial page is create with layout's width and deviceScaleFactor", async () => { + const result = await lastValueFrom( + screenshots.getScreenshots(options as PngScreenshotOptions) + ); + + expect(driverFactory.createPage).toBeCalledWith( + expect.objectContaining({ + defaultViewport: { + width: layout.width, + deviceScaleFactor: layout.getBrowserZoom(), + }, + }), // config with layout + expect.anything() // logger + ); + + expect(result).toHaveProperty('results'); + }); }); describe('cloud', () => { diff --git a/x-pack/plugins/screenshotting/server/screenshots/index.ts b/x-pack/plugins/screenshotting/server/screenshots/index.ts index c45a0583ffe72..f8dd839dfc55c 100644 --- a/x-pack/plugins/screenshotting/server/screenshots/index.ts +++ b/x-pack/plugins/screenshotting/server/screenshots/index.ts @@ -120,7 +120,7 @@ export class Screenshots { { browserTimezone, openUrlTimeout: durationToNumber(this.config.capture.timeouts.openUrl), - defaultViewport: { width: layout.width }, + defaultViewport: { width: layout.width, deviceScaleFactor: layout.getBrowserZoom() }, }, this.logger ) From 4e0a0a5d4f47d8bb738e42763002d3f3f1d9cb1d Mon Sep 17 00:00:00 2001 From: Dario Gieselaar Date: Wed, 21 Dec 2022 12:44:40 +0100 Subject: [PATCH 08/36] [Profiling] change order of tabs (#147518) Closes https://github.com/elastic/prodfiler/issues/2811 --- .../get_stack_traces_tabs.ts | 30 +++++++++---------- .../profiling/public/routing/index.tsx | 4 +-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/x-pack/plugins/profiling/public/components/stack_traces_view/get_stack_traces_tabs.ts b/x-pack/plugins/profiling/public/components/stack_traces_view/get_stack_traces_tabs.ts index 435333ce68987..3b06074ba9db9 100644 --- a/x-pack/plugins/profiling/public/components/stack_traces_view/get_stack_traces_tabs.ts +++ b/x-pack/plugins/profiling/public/components/stack_traces_view/get_stack_traces_tabs.ts @@ -20,24 +20,18 @@ export function getStackTracesTabs({ profilingRouter: StatefulProfilingRouter; }): Required['tabs'] { return [ - { - label: i18n.translate('xpack.profiling.stackTracesView.containersTabLabel', { - defaultMessage: 'Containers', - }), - topNType: TopNType.Containers, - }, - { - label: i18n.translate('xpack.profiling.stackTracesView.deploymentsTabLabel', { - defaultMessage: 'Deployments', - }), - topNType: TopNType.Deployments, - }, { label: i18n.translate('xpack.profiling.stackTracesView.threadsTabLabel', { defaultMessage: 'Threads', }), topNType: TopNType.Threads, }, + { + label: i18n.translate('xpack.profiling.stackTracesView.tracesTabLabel', { + defaultMessage: 'Traces', + }), + topNType: TopNType.Traces, + }, { label: i18n.translate('xpack.profiling.stackTracesView.hostsTabLabel', { defaultMessage: 'Hosts', @@ -45,10 +39,16 @@ export function getStackTracesTabs({ topNType: TopNType.Hosts, }, { - label: i18n.translate('xpack.profiling.stackTracesView.tracesTabLabel', { - defaultMessage: 'Traces', + label: i18n.translate('xpack.profiling.stackTracesView.deploymentsTabLabel', { + defaultMessage: 'Deployments', }), - topNType: TopNType.Traces, + topNType: TopNType.Deployments, + }, + { + label: i18n.translate('xpack.profiling.stackTracesView.containersTabLabel', { + defaultMessage: 'Containers', + }), + topNType: TopNType.Containers, }, ].map((tab) => ({ label: tab.label, diff --git a/x-pack/plugins/profiling/public/routing/index.tsx b/x-pack/plugins/profiling/public/routing/index.tsx index d44f4a0655c00..d7b79abc0a9a7 100644 --- a/x-pack/plugins/profiling/public/routing/index.tsx +++ b/x-pack/plugins/profiling/public/routing/index.tsx @@ -61,7 +61,7 @@ const routes = { }, }, '/stacktraces': { - element: , + element: , }, '/flamegraphs': { element: ( @@ -179,7 +179,7 @@ const routes = { }, }, '/': { - element: , + element: , }, }, element: , From e9b2e603ff37eb465c7b9e72d7015fa186ca58b6 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Wed, 21 Dec 2022 09:05:27 -0500 Subject: [PATCH 09/36] Update kubernetes templates for elastic-agent (#143275) Automated by https://fleet-ci.elastic.co/job/elastic-agent/job/elastic-agent-mbp/job/main/509/ Co-authored-by: obscloudnativemonitoring Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Jaime Soriano Pastor Co-authored-by: Andrew Gizas --- .../server/services/elastic_agent_manifest.ts | 35 +++++++++++++++++-- 1 file changed, 32 insertions(+), 3 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 af6ae76a646b0..7ae83f9cece5c 100644 --- a/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts +++ b/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts @@ -33,11 +33,24 @@ spec: serviceAccountName: elastic-agent hostNetwork: true dnsPolicy: ClusterFirstWithHostNet + # Uncomment if using hints feature + #initContainers: + # - name: k8s-templates-downloader + # image: busybox:1.28 + # command: ['sh'] + # args: + # - -c + # - >- + # mkdir -p /etc/elastic-agent/inputs.d && + # wget -O - https://github.com/elastic/elastic-agent/archive/main.tar.gz | tar xz -C /etc/elastic-agent/inputs.d --strip=5 "elastic-agent-main/deploy/kubernetes/elastic-agent/templates.d" + # volumeMounts: + # - name: external-inputs + # mountPath: /etc/elastic-agent/inputs.d containers: - name: elastic-agent image: docker.elastic.co/beats/elastic-agent:VERSION args: [ - "-c", "/etc/agent.yml", + "-c", "/etc/elastic-agent/agent.yml", "-e", ] env: @@ -56,6 +69,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.name + - name: STATE_PATH + value: "/etc/elastic-agent" securityContext: runAsUser: 0 resources: @@ -66,9 +81,12 @@ spec: memory: 400Mi volumeMounts: - name: datastreams - mountPath: /etc/agent.yml + mountPath: /etc/elastic-agent/agent.yml readOnly: true subPath: agent.yml + # Uncomment if using hints feature + #- name: external-inputs + # mountPath: /etc/elastic-agent/inputs.d - name: proc mountPath: /hostfs/proc readOnly: true @@ -92,6 +110,9 @@ spec: configMap: defaultMode: 0640 name: agent-node-datastreams + # Uncomment if using hints feature + #- name: external-inputs + # emptyDir: {} - name: proc hostPath: path: /proc @@ -220,6 +241,10 @@ rules: resources: - podsecuritypolicies verbs: ["get", "list", "watch"] + - apiGroups: [ "storage.k8s.io" ] + resources: + - storageclasses + verbs: [ "get", "list", "watch" ] --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role @@ -262,7 +287,7 @@ metadata: `; export const elasticAgentManagedManifest = `--- -# For more information refer to https://www.elastic.co/guide/en/fleet/current/running-on-kubernetes-managed-by-fleet.html +# For more information https://www.elastic.co/guide/en/fleet/current/running-on-kubernetes-managed-by-fleet.html apiVersion: apps/v1 kind: DaemonSet metadata: @@ -491,6 +516,10 @@ rules: resources: - podsecuritypolicies verbs: ["get", "list", "watch"] + - apiGroups: [ "storage.k8s.io" ] + resources: + - storageclasses + verbs: [ "get", "list", "watch" ] --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role From 9db24f8e6199cb3284066d73ca718b6cbfcfe38f Mon Sep 17 00:00:00 2001 From: Juan Pablo Djeredjian Date: Wed, 21 Dec 2022 15:13:21 +0100 Subject: [PATCH 10/36] [ResponseOps] Create Rule Result Service (#147278) Relates to https://github.com/elastic/kibana/issues/135127 ## Summary Creates `RuleResultService`, which can be used to set and get values for the rules last execution: `errors`, `warnings` and `outcomeMessages`. ### Checklist Delete any items that are not applicable to this PR. - [ ] [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 ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- x-pack/plugins/alerting/common/rule.ts | 2 +- .../public/lib/common_transformations.test.ts | 12 +- .../server/lib/last_run_status.test.ts | 171 +++++++++++++++--- .../alerting/server/lib/last_run_status.ts | 43 +++-- x-pack/plugins/alerting/server/mocks.ts | 21 ++- .../monitoring/rule_result_service.test.ts | 72 ++++++++ .../server/monitoring/rule_result_service.ts | 60 ++++++ .../rules_client/lib/get_alert_from_raw.ts | 11 ++ .../saved_objects/migrations/8.6/index.ts | 3 + .../alerting/server/task_runner/fixtures.ts | 3 +- .../server/task_runner/task_runner.ts | 13 +- .../task_runner/task_runner_cancel.test.ts | 3 +- x-pack/plugins/alerting/server/types.ts | 13 +- 13 files changed, 382 insertions(+), 45 deletions(-) create mode 100644 x-pack/plugins/alerting/server/monitoring/rule_result_service.test.ts create mode 100644 x-pack/plugins/alerting/server/monitoring/rule_result_service.ts diff --git a/x-pack/plugins/alerting/common/rule.ts b/x-pack/plugins/alerting/common/rule.ts index b13c996e5bf78..17cfa1fbf4a05 100644 --- a/x-pack/plugins/alerting/common/rule.ts +++ b/x-pack/plugins/alerting/common/rule.ts @@ -94,7 +94,7 @@ export interface RuleAggregations { export interface RuleLastRun { outcome: RuleLastRunOutcomes; warning?: RuleExecutionStatusErrorReasons | RuleExecutionStatusWarningReasons | null; - outcomeMsg?: string | null; + outcomeMsg?: string[] | null; alertsCount: { active?: number | null; new?: number | null; diff --git a/x-pack/plugins/alerting/public/lib/common_transformations.test.ts b/x-pack/plugins/alerting/public/lib/common_transformations.test.ts index 6b7026f1ea593..4747ad98412c9 100644 --- a/x-pack/plugins/alerting/public/lib/common_transformations.test.ts +++ b/x-pack/plugins/alerting/public/lib/common_transformations.test.ts @@ -81,7 +81,7 @@ describe('common_transformations', () => { }, last_run: { outcome: RuleLastRunOutcomeValues[2], - outcome_msg: 'this is just a test', + outcome_msg: ['this is just a test'], warning: RuleExecutionStatusErrorReasons.Unknown, alerts_count: { new: 1, @@ -134,7 +134,9 @@ describe('common_transformations', () => { "recovered": 3, }, "outcome": "failed", - "outcomeMsg": "this is just a test", + "outcomeMsg": Array [ + "this is just a test", + ], "warning": "unknown", }, "monitoring": Object { @@ -253,7 +255,7 @@ describe('common_transformations', () => { }, last_run: { outcome: 'failed', - outcome_msg: 'this is just a test', + outcome_msg: ['this is just a test'], warning: RuleExecutionStatusErrorReasons.Unknown, alerts_count: { new: 1, @@ -295,7 +297,9 @@ describe('common_transformations', () => { "recovered": 3, }, "outcome": "failed", - "outcomeMsg": "this is just a test", + "outcomeMsg": Array [ + "this is just a test", + ], "warning": "unknown", }, "monitoring": Object { diff --git a/x-pack/plugins/alerting/server/lib/last_run_status.test.ts b/x-pack/plugins/alerting/server/lib/last_run_status.test.ts index da44325ba3cbd..d6b6f62b1b60a 100644 --- a/x-pack/plugins/alerting/server/lib/last_run_status.test.ts +++ b/x-pack/plugins/alerting/server/lib/last_run_status.test.ts @@ -8,9 +8,14 @@ import { lastRunFromState } from './last_run_status'; import { ActionsCompletion } from '../../common'; import { RuleRunMetrics } from './rule_run_metrics_store'; -const getMetrics = (): RuleRunMetrics => { +import { RuleResultServiceResults, RuleResultService } from '../monitoring/rule_result_service'; + +const getMetrics = ({ + hasReachedAlertLimit = false, + triggeredActionsStatus = ActionsCompletion.COMPLETE, +}): RuleRunMetrics => { return { - triggeredActionsStatus: ActionsCompletion.COMPLETE, + triggeredActionsStatus, esSearchDurationMs: 3, numSearches: 1, numberOfActiveAlerts: 10, @@ -19,16 +24,33 @@ const getMetrics = (): RuleRunMetrics => { numberOfRecoveredAlerts: 11, numberOfTriggeredActions: 5, totalSearchDurationMs: 2, - hasReachedAlertLimit: false, + hasReachedAlertLimit, }; }; +const getRuleResultService = ({ + errors = [], + warnings = [], + outcomeMessage = '', +}: Partial) => { + const ruleResultService = new RuleResultService(); + const { addLastRunError, addLastRunWarning, setLastRunOutcomeMessage } = + ruleResultService.getLastRunSetters(); + errors.forEach((error) => addLastRunError(error)); + warnings.forEach((warning) => addLastRunWarning(warning)); + setLastRunOutcomeMessage(outcomeMessage); + return ruleResultService; +}; + describe('lastRunFromState', () => { - it('successfuly outcome', () => { - const result = lastRunFromState({ metrics: getMetrics() }); + it('returns successful outcome if no errors or warnings reported', () => { + const result = lastRunFromState( + { metrics: getMetrics({}) }, + getRuleResultService({ outcomeMessage: 'Rule executed succesfully' }) + ); expect(result.lastRun.outcome).toEqual('succeeded'); - expect(result.lastRun.outcomeMsg).toEqual(null); + expect(result.lastRun.outcomeMsg).toEqual(['Rule executed succesfully']); expect(result.lastRun.warning).toEqual(null); expect(result.lastRun.alertsCount).toEqual({ @@ -39,18 +61,39 @@ describe('lastRunFromState', () => { }); }); - it('limited reached outcome', () => { - const result = lastRunFromState({ - metrics: { - ...getMetrics(), - hasReachedAlertLimit: true, - }, - }); + it('returns a warning outcome if rules last execution reported one', () => { + const result = lastRunFromState( + { metrics: getMetrics({}) }, + getRuleResultService({ + warnings: ['MOCK_WARNING'], + outcomeMessage: 'Rule execution reported a warning', + }) + ); expect(result.lastRun.outcome).toEqual('warning'); - expect(result.lastRun.outcomeMsg).toEqual( - 'Rule reported more than the maximum number of alerts in a single run. Alerts may be missed and recovery notifications may be delayed' + expect(result.lastRun.outcomeMsg).toEqual(['Rule execution reported a warning']); + expect(result.lastRun.warning).toEqual(null); + + expect(result.lastRun.alertsCount).toEqual({ + active: 10, + new: 12, + recovered: 11, + ignored: 0, + }); + }); + + it('returns warning if rule has reached alert limit and alert circuit breaker opens', () => { + const result = lastRunFromState( + { + metrics: getMetrics({ hasReachedAlertLimit: true }), + }, + getRuleResultService({}) ); + + expect(result.lastRun.outcome).toEqual('warning'); + expect(result.lastRun.outcomeMsg).toEqual([ + 'Rule reported more than the maximum number of alerts in a single run. Alerts may be missed and recovery notifications may be delayed', + ]); expect(result.lastRun.warning).toEqual('maxAlerts'); expect(result.lastRun.alertsCount).toEqual({ @@ -61,18 +104,76 @@ describe('lastRunFromState', () => { }); }); - it('partial triggered actions status outcome', () => { - const result = lastRunFromState({ - metrics: { - ...getMetrics(), - triggeredActionsStatus: ActionsCompletion.PARTIAL, + it('returns warning if rules actions completition is partial and action circuit breaker opens', () => { + const result = lastRunFromState( + { + metrics: getMetrics({ triggeredActionsStatus: ActionsCompletion.PARTIAL }), }, + getRuleResultService({}) + ); + + expect(result.lastRun.outcome).toEqual('warning'); + expect(result.lastRun.outcomeMsg).toEqual([ + 'The maximum number of actions for this rule type was reached; excess actions were not triggered.', + ]); + expect(result.lastRun.warning).toEqual('maxExecutableActions'); + + expect(result.lastRun.alertsCount).toEqual({ + active: 10, + new: 12, + recovered: 11, + ignored: 0, }); + }); + + it('overwrites rule execution warning if rule has reached alert limit; outcome messages are merged', () => { + const ruleExecutionOutcomeMessage = 'Rule execution reported a warning'; + const frameworkOutcomeMessage = + 'Rule reported more than the maximum number of alerts in a single run. Alerts may be missed and recovery notifications may be delayed'; + const result = lastRunFromState( + { + metrics: getMetrics({ hasReachedAlertLimit: true }), + }, + getRuleResultService({ + warnings: ['MOCK_WARNING'], + outcomeMessage: 'Rule execution reported a warning', + }) + ); expect(result.lastRun.outcome).toEqual('warning'); - expect(result.lastRun.outcomeMsg).toEqual( - 'The maximum number of actions for this rule type was reached; excess actions were not triggered.' + expect(result.lastRun.outcomeMsg).toEqual([ + frameworkOutcomeMessage, + ruleExecutionOutcomeMessage, + ]); + expect(result.lastRun.warning).toEqual('maxAlerts'); + + expect(result.lastRun.alertsCount).toEqual({ + active: 10, + new: 12, + recovered: 11, + ignored: 0, + }); + }); + + it('overwrites rule execution warning if rule has reached action limit; outcome messages are merged', () => { + const ruleExecutionOutcomeMessage = 'Rule execution reported a warning'; + const frameworkOutcomeMessage = + 'The maximum number of actions for this rule type was reached; excess actions were not triggered.'; + const result = lastRunFromState( + { + metrics: getMetrics({ triggeredActionsStatus: ActionsCompletion.PARTIAL }), + }, + getRuleResultService({ + warnings: ['MOCK_WARNING'], + outcomeMessage: 'Rule execution reported a warning', + }) ); + + expect(result.lastRun.outcome).toEqual('warning'); + expect(result.lastRun.outcomeMsg).toEqual([ + frameworkOutcomeMessage, + ruleExecutionOutcomeMessage, + ]); expect(result.lastRun.warning).toEqual('maxExecutableActions'); expect(result.lastRun.alertsCount).toEqual({ @@ -82,4 +183,30 @@ describe('lastRunFromState', () => { ignored: 0, }); }); + + it('overwrites warning outcome to error if rule execution reports an error', () => { + const result = lastRunFromState( + { + metrics: getMetrics({ hasReachedAlertLimit: true }), + }, + getRuleResultService({ + errors: ['MOCK_ERROR'], + outcomeMessage: 'Rule execution reported an error', + }) + ); + + expect(result.lastRun.outcome).toEqual('failed'); + expect(result.lastRun.outcomeMsg).toEqual([ + 'Rule reported more than the maximum number of alerts in a single run. Alerts may be missed and recovery notifications may be delayed', + 'Rule execution reported an error', + ]); + expect(result.lastRun.warning).toEqual('maxAlerts'); + + expect(result.lastRun.alertsCount).toEqual({ + active: 10, + new: 12, + recovered: 11, + ignored: 0, + }); + }); }); diff --git a/x-pack/plugins/alerting/server/lib/last_run_status.ts b/x-pack/plugins/alerting/server/lib/last_run_status.ts index d7027fc7c2770..d2bc22cadb285 100644 --- a/x-pack/plugins/alerting/server/lib/last_run_status.ts +++ b/x-pack/plugins/alerting/server/lib/last_run_status.ts @@ -8,44 +8,64 @@ import { RuleTaskStateAndMetrics } from '../task_runner/types'; import { getReasonFromError } from './error_with_reason'; import { getEsErrorMessage } from './errors'; -import { ActionsCompletion } from '../../common'; +import { ActionsCompletion, RuleLastRunOutcomes } from '../../common'; import { RuleLastRunOutcomeValues, - RuleLastRunOutcomes, RuleExecutionStatusWarningReasons, RawRuleLastRun, RuleLastRun, } from '../types'; import { translations } from '../constants/translations'; import { RuleRunMetrics } from './rule_run_metrics_store'; +import { RuleResultService } from '../monitoring/rule_result_service'; export interface ILastRun { lastRun: RuleLastRun; metrics: RuleRunMetrics | null; } -export const lastRunFromState = (stateWithMetrics: RuleTaskStateAndMetrics): ILastRun => { - const { metrics } = stateWithMetrics; +export const lastRunFromState = ( + stateWithMetrics: RuleTaskStateAndMetrics, + ruleResultService: RuleResultService +): ILastRun => { let outcome: RuleLastRunOutcomes = RuleLastRunOutcomeValues[0]; // Check for warning states - let warning = null; - let outcomeMsg = null; + let warning: RuleLastRun['warning'] = null; + const outcomeMsg: string[] = []; + + const { errors, warnings, outcomeMessage } = ruleResultService.getLastRunResults(); + const { metrics } = stateWithMetrics; + + if (warnings.length > 0) { + outcome = RuleLastRunOutcomeValues[1]; + } // We only have a single warning field so prioritizing the alert circuit breaker over the actions circuit breaker if (metrics.hasReachedAlertLimit) { outcome = RuleLastRunOutcomeValues[1]; warning = RuleExecutionStatusWarningReasons.MAX_ALERTS; - outcomeMsg = translations.taskRunner.warning.maxAlerts; + outcomeMsg.push(translations.taskRunner.warning.maxAlerts); } else if (metrics.triggeredActionsStatus === ActionsCompletion.PARTIAL) { outcome = RuleLastRunOutcomeValues[1]; warning = RuleExecutionStatusWarningReasons.MAX_EXECUTABLE_ACTIONS; - outcomeMsg = translations.taskRunner.warning.maxExecutableActions; + outcomeMsg.push(translations.taskRunner.warning.maxExecutableActions); + } + + // Overwrite outcome to be error if last run reported any errors + if (errors.length > 0) { + outcome = RuleLastRunOutcomeValues[2]; + } + + // Optionally push outcome message reported by + // rule execution to the Framework's outcome message array + if (outcomeMessage) { + outcomeMsg.push(outcomeMessage); } return { lastRun: { outcome, - outcomeMsg: outcomeMsg || null, + outcomeMsg: outcomeMsg.length > 0 ? outcomeMsg : null, warning: warning || null, alertsCount: { active: metrics.numberOfActiveAlerts, @@ -59,11 +79,12 @@ export const lastRunFromState = (stateWithMetrics: RuleTaskStateAndMetrics): ILa }; export const lastRunFromError = (error: Error): ILastRun => { + const esErrorMessage = getEsErrorMessage(error); return { lastRun: { outcome: RuleLastRunOutcomeValues[2], warning: getReasonFromError(error), - outcomeMsg: getEsErrorMessage(error), + outcomeMsg: esErrorMessage ? [esErrorMessage] : null, alertsCount: {}, }, metrics: null, @@ -82,6 +103,6 @@ export const lastRunToRaw = (lastRun: ILastRun['lastRun']): RawRuleLastRun => { ignored: alertsCount.ignored || 0, }, warning: warning ?? null, - outcomeMsg: outcomeMsg ?? null, + outcomeMsg: outcomeMsg && !Array.isArray(outcomeMsg) ? [outcomeMsg] : outcomeMsg, }; }; diff --git a/x-pack/plugins/alerting/server/mocks.ts b/x-pack/plugins/alerting/server/mocks.ts index 18f0a66bb1657..aaafa3e32da15 100644 --- a/x-pack/plugins/alerting/server/mocks.ts +++ b/x-pack/plugins/alerting/server/mocks.ts @@ -14,7 +14,12 @@ import { searchSourceCommonMock } from '@kbn/data-plugin/common/search/search_so import { rulesClientMock } from './rules_client.mock'; import { PluginSetupContract, PluginStartContract } from './plugin'; import { Alert, AlertFactoryDoneUtils } from './alert'; -import { AlertInstanceContext, AlertInstanceState, PublicRuleMonitoringService } from './types'; +import { + AlertInstanceContext, + AlertInstanceState, + PublicRuleResultService, + PublicRuleMonitoringService, +} from './types'; export { rulesClientMock }; @@ -108,6 +113,18 @@ const createRuleMonitoringServiceMock = () => { return mock; }; +const createRuleLastRunServiceMock = () => { + const mock = { + getLastRunErrors: jest.fn(), + getLastRunWarnings: jest.fn(), + getLastRunOutcomeMessages: jest.fn(), + getLastRunResults: jest.fn(), + getLastRunSetters: jest.fn(), + } as unknown as jest.Mocked; + + return mock; +}; + const createRuleExecutorServicesMock = < InstanceState extends AlertInstanceState = AlertInstanceState, InstanceContext extends AlertInstanceContext = AlertInstanceContext @@ -143,3 +160,5 @@ export const alertsMock = { }; export const ruleMonitoringServiceMock = { create: createRuleMonitoringServiceMock }; + +export const ruleLastRunServiceMock = { create: createRuleLastRunServiceMock }; diff --git a/x-pack/plugins/alerting/server/monitoring/rule_result_service.test.ts b/x-pack/plugins/alerting/server/monitoring/rule_result_service.test.ts new file mode 100644 index 0000000000000..5012c9902faca --- /dev/null +++ b/x-pack/plugins/alerting/server/monitoring/rule_result_service.test.ts @@ -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 { PublicLastRunSetters } from '../types'; +import { RuleResultServiceResults, RuleResultService } from './rule_result_service'; + +describe('RuleResultService', () => { + let ruleResultService: RuleResultService; + let lastRunSetters: PublicLastRunSetters; + + beforeEach(() => { + ruleResultService = new RuleResultService(); + lastRunSetters = ruleResultService.getLastRunSetters(); + }); + + test('should return empty errors array if no errors were added', () => { + expect(ruleResultService.getLastRunErrors()).toEqual([]); + }); + + test('should return empty warnings array if no warnings were added', () => { + expect(ruleResultService.getLastRunWarnings()).toEqual([]); + }); + + test('should return empty outcome messages array if none were added', () => { + expect(ruleResultService.getLastRunOutcomeMessage()).toEqual(''); + }); + + test('should return errors array with added error', () => { + lastRunSetters.addLastRunError('First error'); + expect(ruleResultService.getLastRunErrors()).toEqual(['First error']); + }); + + test('should return warnings array with added warning', () => { + lastRunSetters.addLastRunWarning('Second warning'); + expect(ruleResultService.getLastRunWarnings()).toEqual(['Second warning']); + }); + + test('should return outcome messages array with added outcome message', () => { + lastRunSetters.setLastRunOutcomeMessage('Third outcome message'); + expect(ruleResultService.getLastRunOutcomeMessage()).toEqual('Third outcome message'); + }); + + test('should return last run object with added errors, warnings and outcome messages', () => { + lastRunSetters.addLastRunError('error'); + lastRunSetters.addLastRunWarning('warning'); + lastRunSetters.setLastRunOutcomeMessage('outcome message'); + const expectedLastRun: RuleResultServiceResults = { + errors: ['error'], + warnings: ['warning'], + outcomeMessage: 'outcome message', + }; + expect(ruleResultService.getLastRunResults()).toEqual(expectedLastRun); + }); + + test('should return last run object with multiple added errors, warnings and the last outcome messag reported', () => { + lastRunSetters.addLastRunError('first error'); + lastRunSetters.addLastRunError('second error'); + lastRunSetters.setLastRunOutcomeMessage('first outcome message'); + lastRunSetters.setLastRunOutcomeMessage('second outcome message'); + lastRunSetters.setLastRunOutcomeMessage('last outcome message'); + const expectedLastRun = { + errors: ['first error', 'second error'], + warnings: [], + outcomeMessage: 'last outcome message', + }; + expect(ruleResultService.getLastRunResults()).toEqual(expectedLastRun); + }); +}); diff --git a/x-pack/plugins/alerting/server/monitoring/rule_result_service.ts b/x-pack/plugins/alerting/server/monitoring/rule_result_service.ts new file mode 100644 index 0000000000000..54ac2240c662e --- /dev/null +++ b/x-pack/plugins/alerting/server/monitoring/rule_result_service.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { PublicLastRunSetters } from '../types'; + +export interface RuleResultServiceResults { + errors: string[]; + warnings: string[]; + outcomeMessage: string; +} + +export class RuleResultService { + private errors: string[] = []; + private warnings: string[] = []; + private outcomeMessage: string = ''; + + public getLastRunErrors(): string[] { + return this.errors; + } + + public getLastRunWarnings(): string[] { + return this.warnings; + } + + public getLastRunOutcomeMessage(): string { + return this.outcomeMessage; + } + + public getLastRunResults(): RuleResultServiceResults { + return { + errors: this.errors, + warnings: this.warnings, + outcomeMessage: this.outcomeMessage, + }; + } + + public getLastRunSetters(): PublicLastRunSetters { + return { + addLastRunError: this.addLastRunError.bind(this), + addLastRunWarning: this.addLastRunWarning.bind(this), + setLastRunOutcomeMessage: this.setLastRunOutcomeMessage.bind(this), + }; + } + + private addLastRunError(error: string) { + this.errors.push(error); + } + + private addLastRunWarning(warning: string) { + this.warnings.push(warning); + } + + private setLastRunOutcomeMessage(outcomeMessage: string) { + this.outcomeMessage = outcomeMessage; + } +} diff --git a/x-pack/plugins/alerting/server/rules_client/lib/get_alert_from_raw.ts b/x-pack/plugins/alerting/server/rules_client/lib/get_alert_from_raw.ts index 849442f4556e3..41330fe9b7eb6 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/get_alert_from_raw.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/get_alert_from_raw.ts @@ -86,6 +86,7 @@ export function getPartialRuleFromRaw( schedule, actions, snoozeSchedule, + lastRun, ...partialRawRule }: Partial, references: SavedObjectReference[] | undefined, @@ -139,6 +140,16 @@ export function getPartialRuleFromRaw( ? { monitoring: convertMonitoringFromRawAndVerify(context.logger, id, monitoring) } : {}), ...(nextRun ? { nextRun: new Date(nextRun) } : {}), + ...(lastRun + ? { + lastRun: { + ...lastRun, + ...(lastRun.outcomeMsg && !Array.isArray(lastRun.outcomeMsg) + ? { outcomeMsg: lastRun.outcomeMsg ? [lastRun.outcomeMsg] : null } + : { outcomeMsg: lastRun.outcomeMsg }), + }, + } + : {}), }; return includeLegacyId diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/8.6/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/8.6/index.ts index d4535008bfbe6..b3d362fc4dd77 100644 --- a/x-pack/plugins/alerting/server/saved_objects/migrations/8.6/index.ts +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/8.6/index.ts @@ -85,6 +85,9 @@ function migrateLastRun( return { ...doc, + // @ts-expect-error - we are changing the type of rule.lastRun.outcomeMsg to be string[] + // instead of string. Since this change was introduced after the migration was created, + // we will expect the TS error and handle the transformation on the API side. attributes: { ...attributes, ...(lastRun ? { lastRun } : {}), diff --git a/x-pack/plugins/alerting/server/task_runner/fixtures.ts b/x-pack/plugins/alerting/server/task_runner/fixtures.ts index 218a8660a819f..3b77714d76119 100644 --- a/x-pack/plugins/alerting/server/task_runner/fixtures.ts +++ b/x-pack/plugins/alerting/server/task_runner/fixtures.ts @@ -110,7 +110,8 @@ export const generateSavedObjectParams = ({ }, lastRun: { outcome, - outcomeMsg: error?.message || warning?.message || null, + outcomeMsg: + (error?.message && [error?.message]) || (warning?.message && [warning?.message]) || null, warning: error?.reason || warning?.reason || null, alertsCount: { active: 0, 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 4bde4489dc00b..785592190c637 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner.ts @@ -70,6 +70,7 @@ import { getPublicAlertFactory } from '../alert/create_alert_factory'; import { TaskRunnerTimer, TaskRunnerTimerSpan } from './task_runner_timer'; import { RuleMonitoringService } from '../monitoring/rule_monitoring_service'; import { ILastRun, lastRunFromState, lastRunToRaw } from '../lib/last_run_status'; +import { RuleResultService } from '../monitoring/rule_result_service'; const FALLBACK_RETRY_INTERVAL = '5m'; const CONNECTIVITY_RETRY_INTERVAL = '5m'; @@ -113,6 +114,7 @@ export class TaskRunner< private cancelled: boolean; private stackTraceLog: StackTraceLog | null; private ruleMonitoring: RuleMonitoringService; + private ruleResult: RuleResultService; constructor( ruleType: NormalizedRuleType< @@ -146,6 +148,7 @@ export class TaskRunner< this.alertingEventLogger = new AlertingEventLogger(this.context.eventLogger); this.stackTraceLog = null; this.ruleMonitoring = new RuleMonitoringService(); + this.ruleResult = new RuleResultService(); } private async updateRuleSavedObject( @@ -334,6 +337,7 @@ export class TaskRunner< shouldWriteAlerts: () => this.shouldLogAndScheduleActionsForAlerts(), shouldStopExecution: () => this.cancelled, ruleMonitoringService: this.ruleMonitoring.getLastRunMetricsSetters(), + ruleResultService: this.ruleResult.getLastRunSetters(), }, params, state: ruleTypeState as RuleState, @@ -579,7 +583,7 @@ export class TaskRunner< ILastRun >( stateWithMetrics, - (ruleRunStateWithMetrics) => lastRunFromState(ruleRunStateWithMetrics), + (ruleRunStateWithMetrics) => lastRunFromState(ruleRunStateWithMetrics, this.ruleResult), (err: ElasticsearchError) => lastRunFromError(err) ); @@ -637,6 +641,7 @@ export class TaskRunner< executionStatus )} - ${JSON.stringify(lastRun)}` ); + await this.updateRuleSavedObject(ruleId, namespace, { executionStatus: ruleExecutionStatusToRaw(executionStatus), nextRun, @@ -818,7 +823,9 @@ export class TaskRunner< nextRun = getNextRun({ startDate: startedAt, interval: taskSchedule.interval }); } - const outcomeMsg = `${this.ruleType.id}:${ruleId}: execution cancelled due to timeout - exceeded rule type timeout of ${this.ruleType.ruleTaskTimeout}`; + const outcomeMsg = [ + `${this.ruleType.id}:${ruleId}: execution cancelled due to timeout - exceeded rule type timeout of ${this.ruleType.ruleTaskTimeout}`, + ]; const date = new Date(); // Update the rule saved object with execution status const executionStatus: RuleExecutionStatus = { @@ -826,7 +833,7 @@ export class TaskRunner< status: 'error', error: { reason: RuleExecutionStatusErrorReasons.Timeout, - message: outcomeMsg, + message: outcomeMsg.join(' '), }, }; this.logger.debug( 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 ebfff148a7016..49a21d62d302e 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 @@ -219,8 +219,9 @@ describe('Task Runner Cancel', () => { lastRun: { alertsCount: {}, outcome: 'failed', - outcomeMsg: + outcomeMsg: [ 'test:1: execution cancelled due to timeout - exceeded rule type timeout of 5m', + ], warning: 'timeout', }, monitoring: { diff --git a/x-pack/plugins/alerting/server/types.ts b/x-pack/plugins/alerting/server/types.ts index 3cd3807649f2e..5bdf65e4c564f 100644 --- a/x-pack/plugins/alerting/server/types.ts +++ b/x-pack/plugins/alerting/server/types.ts @@ -84,6 +84,7 @@ export interface RuleExecutorServices< shouldWriteAlerts: () => boolean; shouldStopExecution: () => boolean; ruleMonitoringService?: PublicRuleMonitoringService; + ruleResultService?: PublicRuleResultService; } export interface RuleExecutorOptions< @@ -314,7 +315,7 @@ export type RuleTypeRegistry = PublicMethodsOf; export type RulesClientApi = PublicMethodsOf; -export interface PublicRuleMonitoringService { +export interface PublicMetricsSetters { setLastRunMetricsTotalSearchDurationMs: (totalSearchDurationMs: number) => void; setLastRunMetricsTotalIndexingDurationMs: (totalIndexingDurationMs: number) => void; setLastRunMetricsTotalAlertsDetected: (totalAlertDetected: number) => void; @@ -322,5 +323,15 @@ export interface PublicRuleMonitoringService { setLastRunMetricsGapDurationS: (gapDurationS: number) => void; } +export interface PublicLastRunSetters { + addLastRunError: (outcome: string) => void; + addLastRunWarning: (outcomeMsg: string) => void; + setLastRunOutcomeMessage: (warning: string) => void; +} + +export type PublicRuleMonitoringService = PublicMetricsSetters; + +export type PublicRuleResultService = PublicLastRunSetters; + export interface RawRuleLastRun extends SavedObjectAttributes, RuleLastRun {} export interface RawRuleMonitoring extends SavedObjectAttributes, RuleMonitoring {} From 690595ce484eaf348b8b4ab10ce5a8da47afabe3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 21 Dec 2022 08:51:20 -0600 Subject: [PATCH 11/36] Update dependency selenium-webdriver to ^4.7.1 (main) (#147905) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [selenium-webdriver](https://togithub.com/SeleniumHQ/selenium/tree/trunk/javascript/node/selenium-webdriver#readme) ([source](https://togithub.com/SeleniumHQ/selenium)) | [`^4.7.0` -> `^4.7.1`](https://renovatebot.com/diffs/npm/selenium-webdriver/4.7.0/4.7.1) | [![age](https://badges.renovateapi.com/packages/npm/selenium-webdriver/4.7.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/selenium-webdriver/4.7.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/selenium-webdriver/4.7.1/compatibility-slim/4.7.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/selenium-webdriver/4.7.1/confidence-slim/4.7.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
SeleniumHQ/selenium ### [`v4.7.1`](https://togithub.com/SeleniumHQ/selenium/compare/0a5b49d16f08308454f0f9204985b84ec5a13918...a379331ad6c9ece40d2ad7ec5982e8e0ac819cfd) [Compare Source](https://togithub.com/SeleniumHQ/selenium/compare/0a5b49d16f08308454f0f9204985b84ec5a13918...a379331ad6c9ece40d2ad7ec5982e8e0ac819cfd)
--- ### Configuration ๐Ÿ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). ๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. โ™ป **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. ๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/elastic/kibana). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 80226ef8705c6..17ce2e5a35166 100644 --- a/package.json +++ b/package.json @@ -1115,7 +1115,7 @@ "resolve": "^1.22.0", "rxjs-marbles": "^7.0.1", "sass-loader": "^10.4.1", - "selenium-webdriver": "^4.7.0", + "selenium-webdriver": "^4.7.1", "simple-git": "^3.15.1", "sinon": "^7.4.2", "sort-package-json": "^1.53.1", diff --git a/yarn.lock b/yarn.lock index dcbbfe163413e..a47fa25857973 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24324,10 +24324,10 @@ select-hose@^2.0.0: resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= -selenium-webdriver@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.7.0.tgz#20be2021f1c5c4d6fc7cab8e2fa552b2e0779912" - integrity sha512-ZB/77G6xKz96beiUIq6RSdU/Klccg8Fg6lGvEmsVSeLwOWjmJDRehBeXE/y59mytOqitYSewFzJsSU5Xov1X+Q== +selenium-webdriver@^4.7.1: + version "4.7.1" + resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.7.1.tgz#29be9eaac1bd5aa37728c3e5cca352b1e98ec85d" + integrity sha512-IfTM9OE8HtCKjOJwyudbAVtAHQKOJK8mu2qrXXbKyj4lqgXF+2lYW4rSZXCV6SLQRWZ+DVGkomCmFzq5orD/ZA== dependencies: jszip "^3.10.0" tmp "^0.2.1" From 10fa7584e6fdfe4bf72aebb10369dc1b7e8b97c7 Mon Sep 17 00:00:00 2001 From: Paul Tavares <56442535+paul-tavares@users.noreply.github.com> Date: Wed, 21 Dec 2022 10:06:08 -0500 Subject: [PATCH 12/36] [Security Solution][Endpoint] Fix `get-file` response action that was reporting uploaded file as Deleted (#147881) ## Summary - Fixes the server side utility that retrieves file information to ensure it property determines if a file has chunks and does not incorrectly set the file status to `DELETED` --- .../services/actions/action_files.test.ts | 4 ++-- .../endpoint/services/actions/action_files.ts | 15 +++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_files.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_files.test.ts index ffbe39f0435a5..6033361162f60 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_files.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_files.test.ts @@ -95,8 +95,8 @@ describe('Action Files service', () => { status: 'DELETED', }); - expect(loggerMock.debug).toHaveBeenCalledWith( - 'File with id [123] has no data chunks. Status will be adjusted to DELETED' + expect(loggerMock.warn).toHaveBeenCalledWith( + 'File with id [123] has no data chunks in index [.fleet-file-data-endpoint]. File status will be adjusted to DELETED' ); }); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_files.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_files.ts index 18e09d2689623..8ad0da272152d 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_files.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_files.ts @@ -93,8 +93,8 @@ export const getFileInfo = async ( fileHasChunks = await doesFileHaveChunks(esClient, fileId); if (!fileHasChunks) { - logger.debug( - `File with id [${fileId}] has no data chunks. Status will be adjusted to DELETED` + logger.warn( + `File with id [${fileId}] has no data chunks in index [${FILE_STORAGE_DATA_INDEX}]. File status will be adjusted to DELETED` ); } } @@ -118,10 +118,17 @@ const doesFileHaveChunks = async ( ): Promise => { const chunks = await esClient.search({ index: FILE_STORAGE_DATA_INDEX, + size: 0, body: { query: { - term: { - bid: fileId, + bool: { + filter: [ + { + term: { + bid: fileId, + }, + }, + ], }, }, // Setting `_source` to false - we don't need the actual document to be returned From fe872cc69666347ae73dbf9025d3414bb57137be Mon Sep 17 00:00:00 2001 From: Paul Tavares <56442535+paul-tavares@users.noreply.github.com> Date: Wed, 21 Dec 2022 10:08:08 -0500 Subject: [PATCH 13/36] [Fleet|Security Solution] Update Fleet `package_policy` list API to (optionally) include count of agents (#147785) ## Summary - Updates the fleet`/api/fleet/package_policies` List api to support a new `withAgentCount` param. When set to `true`, the each `PackagePolicy` will include a `agents: number` property that indicates the number of agents using that package policy. - Update the Endpoint Policy List (in security solution) to use this new `agents` count property and removes code that was previously using the Agents Fleet API. --- .../common/types/models/package_policy.ts | 1 + .../routes/package_policy/handlers.test.ts | 104 +++++++++++++++++- .../server/routes/package_policy/handlers.ts | 7 ++ .../agent_policy_agent_count.test.ts | 74 +++++++++++++ .../agent_policy_agent_count.ts | 79 +++++++++++++ ...ackage_policy_assigned_agent_count.test.ts | 89 +++++++++++++++ ...te_package_policy_assigned_agents_count.ts | 33 ++++++ .../server/services/package_policy_service.ts | 2 +- .../server/types/rest_spec/package_policy.ts | 4 +- .../pages/policy/view/policy_list.tsx | 49 +-------- .../management/services/policies/hooks.ts | 28 +---- .../translations/translations/fr-FR.json | 1 - .../translations/translations/ja-JP.json | 1 - .../translations/translations/zh-CN.json | 1 - 14 files changed, 396 insertions(+), 77 deletions(-) create mode 100644 x-pack/plugins/fleet/server/services/agent_policies/agent_policy_agent_count.test.ts create mode 100644 x-pack/plugins/fleet/server/services/agent_policies/agent_policy_agent_count.ts create mode 100644 x-pack/plugins/fleet/server/services/package_policies/populate_package_policy_assigned_agent_count.test.ts create mode 100644 x-pack/plugins/fleet/server/services/package_policies/populate_package_policy_assigned_agents_count.ts diff --git a/x-pack/plugins/fleet/common/types/models/package_policy.ts b/x-pack/plugins/fleet/common/types/models/package_policy.ts index 5bd10687328c3..a0609a5c5be52 100644 --- a/x-pack/plugins/fleet/common/types/models/package_policy.ts +++ b/x-pack/plugins/fleet/common/types/models/package_policy.ts @@ -89,6 +89,7 @@ export interface PackagePolicy extends Omit { id: string; inputs: PackagePolicyInput[]; version?: string; + agents?: number; revision: number; updated_at: string; updated_by: string; diff --git a/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts b/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts index 5ade3dd8e1699..14da6cfa0cab5 100644 --- a/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts +++ b/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts @@ -27,6 +27,8 @@ import type { import type { FleetRequestHandler } from '../../types'; import type { PackagePolicy } from '../../types'; +import { getPackagePoliciesHandler } from './handlers'; + import { registerRoutes } from '.'; const packagePolicyServiceMock = packagePolicyService as jest.Mocked; @@ -64,7 +66,34 @@ jest.mock( delete: jest.fn(), get: jest.fn(), getByIDs: jest.fn(), - list: jest.fn(), + list: jest.fn(async (_, __) => { + return { + total: 1, + perPage: 10, + page: 1, + items: [ + { + id: `123`, + name: `Package Policy 123`, + description: '', + created_at: '2022-12-19T20:43:45.879Z', + created_by: 'elastic', + updated_at: '2022-12-19T20:43:45.879Z', + updated_by: 'elastic', + policy_id: `agent-policy-id-a`, + enabled: true, + inputs: [], + namespace: 'default', + package: { + name: 'a-package', + title: 'package A', + version: '1.0.0', + }, + revision: 1, + }, + ], + }; + }), listIds: jest.fn(), update: jest.fn(), // @ts-ignore @@ -437,4 +466,77 @@ describe('When calling package policy', () => { }); }); }); + + describe('list api handler', () => { + it('should return agent count when `withAgentCount` query param is used', async () => { + const request = httpServerMock.createKibanaRequest({ + query: { + withAgentCount: true, + }, + }); + ( + (await context.core).elasticsearch.client.asInternalUser.search as jest.Mock + ).mockImplementation(() => { + return { + took: 3, + timed_out: false, + _shards: { + total: 2, + successful: 2, + skipped: 0, + failed: 0, + }, + hits: { + total: 100, + max_score: 0, + hits: [], + }, + aggregations: { + agent_counts: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'agent-policy-id-a', + doc_count: 100, + }, + ], + }, + }, + }; + }); + + await getPackagePoliciesHandler(context, request, response); + + expect(response.ok).toHaveBeenCalledWith({ + body: { + page: 1, + perPage: 10, + total: 1, + items: [ + { + agents: 100, + created_at: '2022-12-19T20:43:45.879Z', + created_by: 'elastic', + description: '', + enabled: true, + id: '123', + inputs: [], + name: 'Package Policy 123', + namespace: 'default', + package: { + name: 'a-package', + title: 'package A', + version: '1.0.0', + }, + policy_id: 'agent-policy-id-a', + revision: 1, + updated_at: '2022-12-19T20:43:45.879Z', + updated_by: 'elastic', + }, + ], + }, + }); + }); + }); }); diff --git a/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts b/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts index ab3af0cb0a16c..045f32cbf6c6e 100644 --- a/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts @@ -13,6 +13,8 @@ import type { RequestHandler } from '@kbn/core/server'; import { groupBy, keyBy } from 'lodash'; +import { populatePackagePolicyAssignedAgentsCount } from '../../services/package_policies/populate_package_policy_assigned_agents_count'; + import { agentPolicyService, appContextService, packagePolicyService } from '../../services'; import type { GetPackagePoliciesRequestSchema, @@ -85,6 +87,7 @@ export const getPackagePoliciesHandler: FleetRequestHandler< undefined, TypeOf > = async (context, request, response) => { + const esClient = (await context.core).elasticsearch.client.asInternalUser; const fleetContext = await context.fleet; const soClient = fleetContext.internalSoClient; const limitedToPackages = fleetContext.limitedToPackages; @@ -108,6 +111,10 @@ export const getPackagePoliciesHandler: FleetRequestHandler< }); } + if (request.query.withAgentCount) { + await populatePackagePolicyAssignedAgentsCount(esClient, items); + } + // agnostic to package-level RBAC return response.ok({ body: { diff --git a/x-pack/plugins/fleet/server/services/agent_policies/agent_policy_agent_count.test.ts b/x-pack/plugins/fleet/server/services/agent_policies/agent_policy_agent_count.test.ts new file mode 100644 index 0000000000000..3662f7a9ace4b --- /dev/null +++ b/x-pack/plugins/fleet/server/services/agent_policies/agent_policy_agent_count.test.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. + */ + +import type { ElasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; +import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; + +import { getAgentCountForAgentPolicies } from './agent_policy_agent_count'; + +describe('When using `getAgentCountForAgentPolicies()`', () => { + let esClientMock: ElasticsearchClientMock; + let agentPolicyIds: string[]; + let aggrBuckets: Array<{ key: string; doc_count: number }>; + + beforeEach(() => { + agentPolicyIds = ['agent-policy-id-a', 'agent-policy-id-b']; + + aggrBuckets = [ + { + key: 'agent-policy-id-a', + doc_count: 100, + }, + { + key: 'agent-policy-id-b', + doc_count: 50, + }, + ]; + + esClientMock = elasticsearchServiceMock.createClusterClient().asInternalUser; + esClientMock.search.mockImplementation(async () => { + return { + took: 3, + timed_out: false, + _shards: { + total: 2, + successful: 2, + skipped: 0, + failed: 0, + }, + hits: { + total: 100, + max_score: 0, + hits: [], + }, + aggregations: { + agent_counts: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: aggrBuckets, + }, + }, + }; + }); + }); + + it('should return an object with counts', async () => { + await expect(getAgentCountForAgentPolicies(esClientMock, agentPolicyIds)).resolves.toEqual({ + 'agent-policy-id-a': 100, + 'agent-policy-id-b': 50, + }); + }); + + it('should always return the policy id count, even if agent counts are not found for it', async () => { + aggrBuckets.pop(); + + await expect(getAgentCountForAgentPolicies(esClientMock, agentPolicyIds)).resolves.toEqual({ + 'agent-policy-id-a': 100, + 'agent-policy-id-b': 0, + }); + }); +}); diff --git a/x-pack/plugins/fleet/server/services/agent_policies/agent_policy_agent_count.ts b/x-pack/plugins/fleet/server/services/agent_policies/agent_policy_agent_count.ts new file mode 100644 index 0000000000000..55319c90db231 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/agent_policies/agent_policy_agent_count.ts @@ -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 { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; + +import { AGENTS_INDEX } from '../../../common'; + +/** + * Given a list of Agent Policy IDs, an object will be returned with the agent policy id as the key + * and the number of active agents using that agent policy. + * @param esClient + * @param agentPolicyIds + */ +export const getAgentCountForAgentPolicies = async ( + esClient: ElasticsearchClient, + agentPolicyIds: string[] +): Promise> => { + if (agentPolicyIds.length === 0) { + return {}; + } + + const searchPromise = esClient.search< + unknown, + Record<'agent_counts', { buckets: Array<{ key: string; doc_count: number }> }> + >({ + index: AGENTS_INDEX, + body: { + query: { + bool: { + filter: [ + { + term: { + active: 'true', + }, + }, + { + terms: { + policy_id: agentPolicyIds, + }, + }, + ], + }, + }, + aggs: { + agent_counts: { + terms: { + field: 'policy_id', + size: agentPolicyIds.length, + }, + }, + }, + size: 0, + }, + }); + + const response: Record = agentPolicyIds.reduce>( + (acc, agentPolicyId) => { + acc[agentPolicyId] = 0; + return acc; + }, + {} + ); + + const searchResponse = await searchPromise; + + if (searchResponse.aggregations?.agent_counts.buckets) { + const buckets = searchResponse.aggregations?.agent_counts.buckets; + + for (const { key: agentPolicyId, doc_count: count } of buckets) { + response[agentPolicyId] = count; + } + } + + return response; +}; diff --git a/x-pack/plugins/fleet/server/services/package_policies/populate_package_policy_assigned_agent_count.test.ts b/x-pack/plugins/fleet/server/services/package_policies/populate_package_policy_assigned_agent_count.test.ts new file mode 100644 index 0000000000000..2ee589974b5ac --- /dev/null +++ b/x-pack/plugins/fleet/server/services/package_policies/populate_package_policy_assigned_agent_count.test.ts @@ -0,0 +1,89 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; +import type { ElasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; + +import type { PackagePolicy } from '../../../common'; + +import { populatePackagePolicyAssignedAgentsCount } from './populate_package_policy_assigned_agents_count'; + +describe('When using populatePackagePolicyAssignedAgentCount()', () => { + let esClientMock: ElasticsearchClientMock; + let packagePolicies: PackagePolicy[]; + + beforeEach(() => { + esClientMock = elasticsearchServiceMock.createClusterClient().asInternalUser; + esClientMock.search.mockImplementation(async () => { + return { + took: 3, + timed_out: false, + _shards: { + total: 2, + successful: 2, + skipped: 0, + failed: 0, + }, + hits: { + total: 100, + max_score: 0, + hits: [], + }, + aggregations: { + agent_counts: { + doc_count_error_upper_bound: 0, + sum_other_doc_count: 0, + buckets: [ + { + key: 'agent-policy-id-a', + doc_count: 100, + }, + { + key: 'agent-policy-id-b', + doc_count: 50, + }, + ], + }, + }, + }; + }); + + packagePolicies = Array.from({ length: 15 }, (_, n) => { + const now = new Date().toISOString(); + + return { + id: `package-policy-${n}`, + name: `Package Policy ${n}`, + description: '', + created_at: now, + created_by: 'elastic', + updated_at: now, + updated_by: 'elastic', + policy_id: `agent-policy-id-${n % 2 > 0 ? 'a' : 'b'}`, + enabled: true, + inputs: [], + namespace: 'default', + package: { + name: 'a-package', + title: 'package A', + version: '1.0.0', + }, + revision: 1, + }; + }); + }); + + it('should add `agents` property to each package policy', async () => { + await populatePackagePolicyAssignedAgentsCount(esClientMock, packagePolicies); + + packagePolicies.forEach((packagePolicy, index) => { + const expectedCount = index % 2 > 0 ? 100 : 50; + + expect(packagePolicy.agents).toEqual(expectedCount); + }); + }); +}); diff --git a/x-pack/plugins/fleet/server/services/package_policies/populate_package_policy_assigned_agents_count.ts b/x-pack/plugins/fleet/server/services/package_policies/populate_package_policy_assigned_agents_count.ts new file mode 100644 index 0000000000000..e4da9be8723a8 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/package_policies/populate_package_policy_assigned_agents_count.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 { ElasticsearchClient } from '@kbn/core/server'; + +import { getAgentCountForAgentPolicies } from '../agent_policies/agent_policy_agent_count'; + +import type { PackagePolicy } from '../../../common'; + +/** + * Mutates each of the Package Policies passed on input and adds `agents` property to it with the + * count of agents currently using the given agent policy. + * @param esClient + * @param packagePolicies + */ +export const populatePackagePolicyAssignedAgentsCount = async ( + esClient: ElasticsearchClient, + packagePolicies: PackagePolicy[] +): Promise => { + const agentPolicyIds = Array.from( + new Set(packagePolicies.map((policy) => policy.policy_id)) + ); + + const agentPolicyAgentCounts = await getAgentCountForAgentPolicies(esClient, agentPolicyIds); + + for (const packagePolicy of packagePolicies) { + packagePolicy.agents = agentPolicyAgentCounts[packagePolicy.policy_id] ?? 0; + } +}; diff --git a/x-pack/plugins/fleet/server/services/package_policy_service.ts b/x-pack/plugins/fleet/server/services/package_policy_service.ts index 4a88b43a57be1..c1638e63b67c0 100644 --- a/x-pack/plugins/fleet/server/services/package_policy_service.ts +++ b/x-pack/plugins/fleet/server/services/package_policy_service.ts @@ -84,7 +84,7 @@ export interface PackagePolicyClient { list( soClient: SavedObjectsClientContract, - options: ListWithKuery + options: ListWithKuery & { withAgentCount?: boolean } ): Promise>; listIds( diff --git a/x-pack/plugins/fleet/server/types/rest_spec/package_policy.ts b/x-pack/plugins/fleet/server/types/rest_spec/package_policy.ts index 0f5542dd7e9bb..97bb73f0f4651 100644 --- a/x-pack/plugins/fleet/server/types/rest_spec/package_policy.ts +++ b/x-pack/plugins/fleet/server/types/rest_spec/package_policy.ts @@ -16,7 +16,9 @@ import { import { ListWithKuerySchema, BulkRequestBodySchema } from './common'; export const GetPackagePoliciesRequestSchema = { - query: ListWithKuerySchema, + query: ListWithKuerySchema.extends({ + withAgentCount: schema.maybe(schema.boolean()), + }), }; export const BulkGetPackagePoliciesRequestSchema = { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx index ff2c194d435b4..6b77d4a615a72 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx @@ -28,7 +28,6 @@ import { EndpointPolicyLink } from '../../../components/endpoint_policy_link'; import type { PolicyData, PolicyDetailsRouteState } from '../../../../../common/endpoint/types'; import { useUrlPagination } from '../../../hooks/use_url_pagination'; import { - useGetAgentCountForPolicy, useGetEndpointSecurityPackage, useGetEndpointSpecificPolicies, } from '../../../services/policies/hooks'; @@ -57,31 +56,10 @@ export const PolicyList = memo(() => { perPage: pagination.pageSize, }); - // endpoint count per policy - const policyIds = useMemo(() => data?.items.map((policies) => policies.id) ?? [], [data]); - const agentPolicyIds = useMemo( - () => data?.items.map((policies) => policies.policy_id) ?? [], - [data] - ); - const { data: endpointCount = { items: [] } } = useGetAgentCountForPolicy({ - agentPolicyIds, - customQueryOptions: { - enabled: agentPolicyIds.length > 0, - onError: (err) => { - toasts.addDanger( - i18n.translate('xpack.securitySolution.policyList.endpointCountError', { - defaultMessage: 'Error retrieving endpoint counts', - }) - ); - }, - }, - }); - // grab endpoint version for empty page const { data: endpointPackageInfo, isFetching: packageIsFetching } = useGetEndpointSecurityPackage({ customQueryOptions: { - enabled: agentPolicyIds.length === 0, onError: (err) => { toasts.addDanger( i18n.translate('xpack.securitySolution.policyList.packageVersionError', { @@ -92,28 +70,6 @@ export const PolicyList = memo(() => { }, }); - const policyIdToEndpointCount = useMemo(() => { - const map = new Map(); - - for (const agentPolicy of endpointCount?.items) { - if (agentPolicy.package_policies) { - for (const packagePolicy of agentPolicy.package_policies) { - if (policyIds.includes(packagePolicy.id)) { - map.set(packagePolicy.id, agentPolicy.agents ?? 0); - } - } - } - } - - // error with the endpointCount api call, set default count to 0 - if (policyIds.length > 0 && map.size === 0) { - for (const policy of policyIds) { - map.set(policy, 0); - } - } - return map; - }, [endpointCount, policyIds]); - const totalItemCount = useMemo(() => data?.total ?? 0, [data]); const policyListPath = useMemo(() => getPoliciesPath(search), [search]); @@ -262,7 +218,8 @@ export const PolicyList = memo(() => { }), width: '8%', render: (policy: PolicyData) => { - const count = policyIdToEndpointCount.get(policy.id); + const count = policy.agents ?? 0; + return ( { }, }, ]; - }, [backLink, policyIdToEndpointCount, authLoading, canReadEndpointList]); + }, [backLink, authLoading, canReadEndpointList]); const handleTableOnChange = useCallback( ({ page }: CriteriaWithPagination) => { diff --git a/x-pack/plugins/security_solution/public/management/services/policies/hooks.ts b/x-pack/plugins/security_solution/public/management/services/policies/hooks.ts index 3c0810b0d551b..6254120445e43 100644 --- a/x-pack/plugins/security_solution/public/management/services/policies/hooks.ts +++ b/x-pack/plugins/security_solution/public/management/services/policies/hooks.ts @@ -7,10 +7,10 @@ import type { QueryObserverResult, UseQueryOptions } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query'; import type { IHttpFetchError } from '@kbn/core-http-browser'; -import type { GetAgentPoliciesResponse, GetPackagesResponse } from '@kbn/fleet-plugin/common'; +import type { GetPackagesResponse } from '@kbn/fleet-plugin/common'; import { useHttp } from '../../../common/lib/kibana'; import { MANAGEMENT_DEFAULT_PAGE_SIZE } from '../../common/constants'; -import { sendBulkGetAgentPolicyList, sendGetEndpointSecurityPackage } from './ingest'; +import { sendGetEndpointSecurityPackage } from './ingest'; import type { GetPolicyListResponse } from '../../pages/policy/types'; import { sendGetEndpointSpecificPackagePolicies } from './policies'; import type { ServerApiError } from '../../../common/types'; @@ -34,6 +34,7 @@ export function useGetEndpointSpecificPolicies( query: { page, perPage, + withAgentCount: true, }, }); }, @@ -45,29 +46,6 @@ export function useGetEndpointSpecificPolicies( ); } -/** - * @param policyIds: list of policyIds to grab the agent policies list for - * @param customQueryOptions: useQuery options such as enabled, which will set whether the query automatically runs or not - * - * This hook returns the fleet agent policies list filtered by policy id - */ -export function useGetAgentCountForPolicy({ - agentPolicyIds, - customQueryOptions, -}: { - agentPolicyIds: string[]; - customQueryOptions?: UseQueryOptions; -}): QueryObserverResult { - const http = useHttp(); - return useQuery( - ['endpointCountForPolicy', agentPolicyIds], - () => { - return sendBulkGetAgentPolicyList(http, agentPolicyIds); - }, - customQueryOptions - ); -} - /** * This hook returns the endpoint security package which contains endpoint version info */ diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 1adb04143a921..d4f80bb59def9 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -30527,7 +30527,6 @@ "xpack.securitySolution.policy.list.updatedAt": "Derniรจre mise ร  jour", "xpack.securitySolution.policyDetails.backToEndpointList": "Afficher tous les points de terminaison", "xpack.securitySolution.policyDetails.backToPolicyButton": "Retour ร  la liste des politiques", - "xpack.securitySolution.policyList.endpointCountError": "Erreur lors de la rรฉcupรฉration du nombre de points de terminaison", "xpack.securitySolution.policyList.packageVersionError": "Erreur lors de la rรฉcupรฉration de la version du pack de points de terminaison", "xpack.securitySolution.policyStatusText.failure": "ร‰chec", "xpack.securitySolution.policyStatusText.success": "Succรจs", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 4b400b601676d..efcbca27732db 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -30498,7 +30498,6 @@ "xpack.securitySolution.policy.list.updatedAt": "ๆœ€็ต‚ๆ›ดๆ–ฐ", "xpack.securitySolution.policyDetails.backToEndpointList": "ใ™ในใฆใฎใ‚จใƒณใƒ‰ใƒใ‚คใƒณใƒˆใ‚’่กจ็คบ", "xpack.securitySolution.policyDetails.backToPolicyButton": "ใƒใƒชใ‚ทใƒผใƒชใ‚นใƒˆใซๆˆปใ‚‹", - "xpack.securitySolution.policyList.endpointCountError": "ใ‚จใƒณใƒ‰ใƒใ‚คใƒณใƒˆๆ•ฐใฎๅ–ๅพ—ใ‚จใƒฉใƒผ", "xpack.securitySolution.policyList.packageVersionError": "ใ‚จใƒณใƒ‰ใƒใ‚คใƒณใƒˆใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใƒใƒผใ‚ธใƒงใƒณใฎๅ–ๅพ—ใ‚จใƒฉใƒผ", "xpack.securitySolution.policyStatusText.failure": "ๅคฑๆ•—", "xpack.securitySolution.policyStatusText.success": "ๆˆๅŠŸ", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 6c85d5cd66c47..95da870e5b03c 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -30531,7 +30531,6 @@ "xpack.securitySolution.policy.list.updatedAt": "ไธŠๆฌกๆ›ดๆ–ฐๆ—ถ้—ด", "xpack.securitySolution.policyDetails.backToEndpointList": "ๆŸฅ็œ‹ๆ‰€ๆœ‰็ปˆ็ซฏ", "xpack.securitySolution.policyDetails.backToPolicyButton": "่ฟ”ๅ›žๅˆฐ็ญ–็•ฅๅˆ—่กจ", - "xpack.securitySolution.policyList.endpointCountError": "ๆฃ€็ดข็ปˆ็ซฏ่ฎกๆ•ฐๆ—ถๅ‡บ้”™", "xpack.securitySolution.policyList.packageVersionError": "ๆฃ€็ดข็ปˆ็ซฏ่ฝฏไปถๅŒ…็‰ˆๆœฌๆ—ถๅ‡บ้”™", "xpack.securitySolution.policyStatusText.failure": "ๅคฑ่ดฅ", "xpack.securitySolution.policyStatusText.success": "ๆˆๅŠŸ", From 390d22aae70cc4a1443f2f8fe84ca4178ac6d5c2 Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Wed, 21 Dec 2022 10:18:49 -0500 Subject: [PATCH 14/36] [Fleet] Show the has upgrade button when ugprade is available (#147879) --- .../package_policies_table.tsx | 16 +--- .../detail/policies/package_policies.tsx | 15 +-- x-pack/plugins/fleet/public/hooks/index.ts | 2 +- .../use_is_package_policy_upgradable.test.tsx | 70 ++++++++++++++ .../use_is_package_policy_upgradable.tsx | 52 ++++++++++ .../hooks/use_package_installations.tsx | 95 ------------------- 6 files changed, 131 insertions(+), 119 deletions(-) create mode 100644 x-pack/plugins/fleet/public/hooks/use_is_package_policy_upgradable.test.tsx create mode 100644 x-pack/plugins/fleet/public/hooks/use_is_package_policy_upgradable.tsx delete mode 100644 x-pack/plugins/fleet/public/hooks/use_package_installations.tsx 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 57e0630353830..01f82c01954cc 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 @@ -32,7 +32,7 @@ import { import { useAuthz, useLink, - usePackageInstallations, + useIsPackagePolicyUpgradable, usePermissionCheck, useStartServices, } from '../../../../../hooks'; @@ -62,7 +62,7 @@ export const PackagePoliciesTable: React.FunctionComponent = ({ const { application } = useStartServices(); const canWriteIntegrationPolicies = useAuthz().integrations.writeIntegrationPolicies; const canReadIntegrationPolicies = useAuthz().integrations.readIntegrationPolicies; - const { updatableIntegrations } = usePackageInstallations(); + const { isPackagePolicyUpgradable } = useIsPackagePolicyUpgradable(); const { getHref } = useLink(); const permissionCheck = usePermissionCheck(); @@ -80,15 +80,7 @@ export const PackagePoliciesTable: React.FunctionComponent = ({ namespacesValues.add(packagePolicy.namespace); } - const updatableIntegrationRecord = updatableIntegrations.get( - packagePolicy.package?.name ?? '' - ); - - const hasUpgrade = - !!updatableIntegrationRecord && - updatableIntegrationRecord.policiesToUpgrade.some( - ({ pkgPolicyId }) => pkgPolicyId === packagePolicy.id - ); + const hasUpgrade = isPackagePolicyUpgradable(packagePolicy); return { ...packagePolicy, @@ -105,7 +97,7 @@ export const PackagePoliciesTable: React.FunctionComponent = ({ .map(toFilterOption); return [mappedPackagePolicies, namespaceFilterOptions]; - }, [originalPackagePolicies, updatableIntegrations]); + }, [originalPackagePolicies, isPackagePolicyUpgradable]); const columns = useMemo( (): EuiInMemoryTableProps['columns'] => [ 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 bb30f6ff96e91..3399f98515f57 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 @@ -27,7 +27,7 @@ import { useUrlPagination, useGetPackageInstallStatus, AgentPolicyRefreshContext, - usePackageInstallations, + useIsPackagePolicyUpgradable, useAuthz, } from '../../../../../hooks'; import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '../../../../../constants'; @@ -108,7 +108,7 @@ export const PackagePoliciesPage = ({ name, version }: PackagePoliciesPanelProps perPage: pagination.pageSize, kuery: `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name: ${name}`, }); - const { updatableIntegrations } = usePackageInstallations(); + const { isPackagePolicyUpgradable } = useIsPackagePolicyUpgradable(); const canWriteIntegrationPolicies = useAuthz().integrations.writeIntegrationPolicies; @@ -121,14 +121,7 @@ export const PackagePoliciesPage = ({ name, version }: PackagePoliciesPanelProps } const newPolicies = data.items.map(({ agentPolicy, packagePolicy }) => { - const updatableIntegrationRecord = updatableIntegrations.get( - packagePolicy.package?.name ?? '' - ); - const hasUpgrade = - !!updatableIntegrationRecord && - updatableIntegrationRecord.policiesToUpgrade.some( - ({ pkgPolicyId }) => pkgPolicyId === packagePolicy.id - ); + const hasUpgrade = isPackagePolicyUpgradable(packagePolicy); return { agentPolicy, @@ -140,7 +133,7 @@ export const PackagePoliciesPage = ({ name, version }: PackagePoliciesPanelProps }); return newPolicies; - }, [data?.items, updatableIntegrations]); + }, [data?.items, isPackagePolicyUpgradable]); const showAddAgentHelpForPackagePolicyId = packageAndAgentPolicies.find( ({ agentPolicy }) => agentPolicy?.id === showAddAgentHelpForPolicyId diff --git a/x-pack/plugins/fleet/public/hooks/index.ts b/x-pack/plugins/fleet/public/hooks/index.ts index 236392144e18b..d9411572badc9 100644 --- a/x-pack/plugins/fleet/public/hooks/index.ts +++ b/x-pack/plugins/fleet/public/hooks/index.ts @@ -25,7 +25,7 @@ export * from './use_ui_extension'; export * from './use_intra_app_state'; export * from './use_platform'; export * from './use_agent_policy_refresh'; -export * from './use_package_installations'; +export * from './use_is_package_policy_upgradable'; export * from './use_agent_enrollment_flyout_data'; export * from './use_flyout_context'; export * from './use_is_guided_onboarding_active'; diff --git a/x-pack/plugins/fleet/public/hooks/use_is_package_policy_upgradable.test.tsx b/x-pack/plugins/fleet/public/hooks/use_is_package_policy_upgradable.test.tsx new file mode 100644 index 0000000000000..c5aa4d30a2837 --- /dev/null +++ b/x-pack/plugins/fleet/public/hooks/use_is_package_policy_upgradable.test.tsx @@ -0,0 +1,70 @@ +/* + * Copyright 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 { useIsPackagePolicyUpgradable } from './use_is_package_policy_upgradable'; +import { useGetPackages } from './use_request/epm'; + +jest.mock('./use_request/epm'); + +const mockedUseGetPackages = useGetPackages as jest.MockedFunction; + +describe('useIsPackagePolicyUpgradable', () => { + beforeEach(() => { + mockedUseGetPackages.mockReturnValue({ + error: null, + isInitialRequest: false, + isLoading: false, + data: { + items: [ + { + status: 'installed', + savedObject: { + attributes: { + name: 'test', + version: '1.0.0', + }, + }, + }, + ], + }, + } as any); + }); + it('should return true with an upgradable package policy', () => { + const { result } = renderHook(() => useIsPackagePolicyUpgradable()); + const isUpgradable = result.current.isPackagePolicyUpgradable({ + package: { + name: 'test', + version: '0.9.0', + }, + } as any); + expect(isUpgradable).toBeTruthy(); + }); + + it('should return false with a non upgradable package policy', () => { + const { result } = renderHook(() => useIsPackagePolicyUpgradable()); + const isUpgradable = result.current.isPackagePolicyUpgradable({ + package: { + name: 'test', + version: '1.0.0', + }, + } as any); + expect(isUpgradable).toBeFalsy(); + }); + + it('should return false with a non installed package', () => { + const { result } = renderHook(() => useIsPackagePolicyUpgradable()); + const isUpgradable = result.current.isPackagePolicyUpgradable({ + package: { + name: 'idonotexists', + version: '1.0.0', + }, + } as any); + expect(isUpgradable).toBeFalsy(); + }); +}); diff --git a/x-pack/plugins/fleet/public/hooks/use_is_package_policy_upgradable.tsx b/x-pack/plugins/fleet/public/hooks/use_is_package_policy_upgradable.tsx new file mode 100644 index 0000000000000..9e6e34c443ef7 --- /dev/null +++ b/x-pack/plugins/fleet/public/hooks/use_is_package_policy_upgradable.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 { useCallback, useMemo } from 'react'; +import semverLt from 'semver/functions/lt'; + +import { installationStatuses } from '../../common/constants'; +import type { PackagePolicy } from '../types'; + +import { useGetPackages } from './use_request/epm'; + +export const useIsPackagePolicyUpgradable = () => { + const { data: allPackages, isLoading: isLoadingPackages } = useGetPackages({ + prerelease: true, + }); + + const allInstalledPackages = useMemo( + () => (allPackages?.items || []).filter((pkg) => pkg.status === installationStatuses.Installed), + [allPackages?.items] + ); + + const isPackagePolicyUpgradable = useCallback( + (pkgPolicy: PackagePolicy) => { + if (!pkgPolicy.package) { + return false; + } + const { name, version } = pkgPolicy.package; + const installedPackage = allInstalledPackages.find( + (installedPkg) => + 'savedObject' in installedPkg && installedPkg.savedObject.attributes.name === name + ); + if ( + installedPackage && + 'savedObject' in installedPackage && + semverLt(version, installedPackage.savedObject.attributes.version) + ) { + return true; + } + return false; + }, + [allInstalledPackages] + ); + + return { + isPackagePolicyUpgradable, + isLoadingPackages, + }; +}; diff --git a/x-pack/plugins/fleet/public/hooks/use_package_installations.tsx b/x-pack/plugins/fleet/public/hooks/use_package_installations.tsx deleted file mode 100644 index e4dabcff4e8a0..0000000000000 --- a/x-pack/plugins/fleet/public/hooks/use_package_installations.tsx +++ /dev/null @@ -1,95 +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 { useMemo } from 'react'; -import semverLt from 'semver/functions/lt'; - -import { installationStatuses } from '../../common/constants'; -import type { PackagePolicy } from '../types'; - -import { useGetPackages } from './use_request/epm'; -import { useGetAgentPolicies } from './use_request/agent_policy'; - -interface UpdatableIntegration { - currentVersion: string; - policiesToUpgrade: Array<{ - id: string; - name: string; - agentsCount: number; - pkgPolicyId: string; - pkgPolicyName: string; - pkgPolicyIntegrationVersion: string; - }>; -} - -export const usePackageInstallations = () => { - const { data: allPackages, isLoading: isLoadingPackages } = useGetPackages({ - prerelease: true, - }); - - const { data: agentPolicyData, isLoading: isLoadingPolicies } = useGetAgentPolicies({ - full: true, - }); - - const allInstalledPackages = useMemo( - () => (allPackages?.items || []).filter((pkg) => pkg.status === installationStatuses.Installed), - [allPackages?.items] - ); - - const updatablePackages = useMemo( - () => - allInstalledPackages.filter( - (item) => - 'savedObject' in item && semverLt(item.savedObject.attributes.version, item.version) - ), - [allInstalledPackages] - ); - - const updatableIntegrations = useMemo>( - () => - (agentPolicyData?.items || []).reduce((result, policy) => { - policy.package_policies?.forEach((pkgPolicy: PackagePolicy) => { - if (!pkgPolicy.package) return false; - const { name, version } = pkgPolicy.package; - const installedPackage = allInstalledPackages.find( - (installedPkg) => - 'savedObject' in installedPkg && installedPkg.savedObject.attributes.name === name - ); - if ( - installedPackage && - 'savedObject' in installedPackage && - semverLt(version, installedPackage.savedObject.attributes.version) - ) { - const packageData = result.get(name) ?? { - currentVersion: installedPackage.savedObject.attributes.version, - policiesToUpgrade: [], - }; - packageData.policiesToUpgrade.push({ - id: policy.id, - name: policy.name, - agentsCount: policy.agents ?? 0, - pkgPolicyId: pkgPolicy.id, - pkgPolicyName: pkgPolicy.name, - pkgPolicyIntegrationVersion: version, - }); - result.set(name, packageData); - } - }); - return result; - }, new Map()), - [allInstalledPackages, agentPolicyData] - ); - - return { - allPackages, - allInstalledPackages, - updatablePackages, - updatableIntegrations, - isLoadingPackages, - isLoadingPolicies, - }; -}; From b184f0615e56bc1dadf73a116dcbc4725d3a3153 Mon Sep 17 00:00:00 2001 From: Thom Heymann <190132+thomheymann@users.noreply.github.com> Date: Wed, 21 Dec 2022 15:27:15 +0000 Subject: [PATCH 15/36] Include Cross-Origin-Opener-Policy in default response headers (#147874) Part of #141780 ## Release notes Include Cross-Origin-Opener-Policy in default response headers ## Testing Load Kibana; you should see Kibana respond with `Cross-Origin-Opener-Policy: same-origin` header for page loads and API requests. --- docs/setup/settings.asciidoc | 4 ++++ .../src/__snapshots__/http_config.test.ts.snap | 1 + .../security_response_headers_config.test.ts | 18 ++++++++++++++++++ .../src/security_response_headers_config.ts | 13 +++++++++++++ .../src/core_usage_data_service.test.ts | 1 + .../src/core_usage_data_service.ts | 1 + .../src/core_usage_data_service.mock.ts | 1 + .../src/core_usage_data.ts | 1 + .../http/lifecycle_handlers.test.ts | 1 + .../resources/base/bin/kibana-docker | 1 + .../collectors/core/core_usage_collector.ts | 6 ++++++ .../server/collectors/core/core_usage_data.ts | 1 + src/plugins/telemetry/schema/oss_plugins.json | 8 +++++++- 13 files changed, 56 insertions(+), 1 deletion(-) diff --git a/docs/setup/settings.asciidoc b/docs/setup/settings.asciidoc index c32d305b22d9a..0ed772d70154c 100644 --- a/docs/setup/settings.asciidoc +++ b/docs/setup/settings.asciidoc @@ -418,6 +418,10 @@ https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options[`X-Fra {kib} in other webpages using iframes. When set to `true`, secure headers are used to disable embedding, which adds the `frame-ancestors: 'self'` directive to the `Content-Security-Policy` response header and adds the `X-Frame-Options: SAMEORIGIN` response header. *Default:* `false` +[[server-securityResponseHeaders-crossOriginOpenerPolicy]] `server.securityResponseHeaders.crossOriginOpenerPolicy`:: +Controls whether the https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy[`Cross-Origin-Opener-Policy`] header is used in all +responses to the client from the {kib} server, and specifies what value is used. Allowed values are `unsafe-none`, `same-origin-allow-popups`, `same-origin`, or `null`. To disable, set to `null`. *Default:* `"same-origin"` + `server.customResponseHeaders` {ess-icon}:: Header names and values to send on all responses to the client from the {kib} server. *Default: `{}`* diff --git a/packages/core/http/core-http-server-internal/src/__snapshots__/http_config.test.ts.snap b/packages/core/http/core-http-server-internal/src/__snapshots__/http_config.test.ts.snap index bb81f7b3bc924..4742ac4d1fe48 100644 --- a/packages/core/http/core-http-server-internal/src/__snapshots__/http_config.test.ts.snap +++ b/packages/core/http/core-http-server-internal/src/__snapshots__/http_config.test.ts.snap @@ -69,6 +69,7 @@ Object { }, "rewriteBasePath": false, "securityResponseHeaders": Object { + "crossOriginOpenerPolicy": "same-origin", "disableEmbedding": false, "permissionsPolicy": null, "referrerPolicy": "no-referrer-when-downgrade", diff --git a/packages/core/http/core-http-server-internal/src/security_response_headers_config.test.ts b/packages/core/http/core-http-server-internal/src/security_response_headers_config.test.ts index b1c8bb23102f5..fec05a22e656e 100644 --- a/packages/core/http/core-http-server-internal/src/security_response_headers_config.test.ts +++ b/packages/core/http/core-http-server-internal/src/security_response_headers_config.test.ts @@ -18,6 +18,7 @@ describe('parseRawSecurityResponseHeadersConfig', () => { expect(result.disableEmbedding).toBe(false); expect(result.securityResponseHeaders).toMatchInlineSnapshot(` Object { + "Cross-Origin-Opener-Policy": "same-origin", "Referrer-Policy": "no-referrer-when-downgrade", "X-Content-Type-Options": "nosniff", } @@ -96,4 +97,21 @@ describe('parseRawSecurityResponseHeadersConfig', () => { expect(result.disableEmbedding).toBe(true); }); }); + + describe('crossOriginOpenerPolicy', () => { + it('a custom value results in the expected Cross-Origin-Opener-Policy header', () => { + const crossOriginOpenerPolicy = 'same-origin-allow-popups'; + const config = schema.validate({ crossOriginOpenerPolicy }); + const result = parse(config); + expect(result.securityResponseHeaders['Cross-Origin-Opener-Policy']).toEqual( + crossOriginOpenerPolicy + ); + }); + + it('a null value removes the Cross-Origin-Opener-Policy header', () => { + const config = schema.validate({ crossOriginOpenerPolicy: null }); + const result = parse(config); + expect(result.securityResponseHeaders['Cross-Origin-Opener-Policy']).toBeUndefined(); + }); + }); }); diff --git a/packages/core/http/core-http-server-internal/src/security_response_headers_config.ts b/packages/core/http/core-http-server-internal/src/security_response_headers_config.ts index 917d737d59297..684be49a61eb8 100644 --- a/packages/core/http/core-http-server-internal/src/security_response_headers_config.ts +++ b/packages/core/http/core-http-server-internal/src/security_response_headers_config.ts @@ -38,6 +38,16 @@ export const securityResponseHeadersSchema = schema.object({ defaultValue: null, }), disableEmbedding: schema.boolean({ defaultValue: false }), // is used to control X-Frame-Options and CSP headers + crossOriginOpenerPolicy: schema.oneOf( + // See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy + [ + schema.literal('unsafe-none'), + schema.literal('same-origin-allow-popups'), + schema.literal('same-origin'), + schema.literal(null), + ], + { defaultValue: 'same-origin' } + ), }); /** @@ -64,6 +74,9 @@ export function parseRawSecurityResponseHeadersConfig( if (raw.permissionsPolicy) { securityResponseHeaders['Permissions-Policy'] = raw.permissionsPolicy; } + if (raw.crossOriginOpenerPolicy) { + securityResponseHeaders['Cross-Origin-Opener-Policy'] = raw.crossOriginOpenerPolicy; + } if (disableEmbedding) { securityResponseHeaders['X-Frame-Options'] = 'SAMEORIGIN'; } diff --git a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.test.ts b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.test.ts index 4d4f0507a1e5c..0cdd3af093912 100644 --- a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.test.ts +++ b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.test.ts @@ -308,6 +308,7 @@ describe('CoreUsageDataService', () => { }, "rewriteBasePath": false, "securityResponseHeaders": Object { + "crossOriginOpenerPolicy": "same-origin", "disableEmbedding": false, "permissionsPolicyConfigured": false, "referrerPolicy": "no-referrer-when-downgrade", diff --git a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts index cc969ebbddab2..bd9fe1ac47859 100644 --- a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts +++ b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts @@ -325,6 +325,7 @@ export class CoreUsageDataService http.securityResponseHeaders.permissionsPolicy ?? undefined ), disableEmbedding: http.securityResponseHeaders.disableEmbedding, + crossOriginOpenerPolicy: http.securityResponseHeaders.crossOriginOpenerPolicy ?? 'NULL', }, }, diff --git a/packages/core/usage-data/core-usage-data-server-mocks/src/core_usage_data_service.mock.ts b/packages/core/usage-data/core-usage-data-server-mocks/src/core_usage_data_service.mock.ts index 364b12523d914..3b81d25460d9d 100644 --- a/packages/core/usage-data/core-usage-data-server-mocks/src/core_usage_data_service.mock.ts +++ b/packages/core/usage-data/core-usage-data-server-mocks/src/core_usage_data_service.mock.ts @@ -105,6 +105,7 @@ const createStartContractMock = () => { referrerPolicy: 'no-referrer-when-downgrade', permissionsPolicyConfigured: false, disableEmbedding: false, + crossOriginOpenerPolicy: 'same-origin', }, xsrf: { disableProtection: false, diff --git a/packages/core/usage-data/core-usage-data-server/src/core_usage_data.ts b/packages/core/usage-data/core-usage-data-server/src/core_usage_data.ts index 685a86390a6bd..c10ad14d9f7f3 100644 --- a/packages/core/usage-data/core-usage-data-server/src/core_usage_data.ts +++ b/packages/core/usage-data/core-usage-data-server/src/core_usage_data.ts @@ -116,6 +116,7 @@ export interface CoreConfigUsageData { referrerPolicy: string; permissionsPolicyConfigured: boolean; disableEmbedding: boolean; + crossOriginOpenerPolicy: string; }; }; diff --git a/src/core/server/integration_tests/http/lifecycle_handlers.test.ts b/src/core/server/integration_tests/http/lifecycle_handlers.test.ts index 26c17a17b41bb..4b1462cd2f106 100644 --- a/src/core/server/integration_tests/http/lifecycle_handlers.test.ts +++ b/src/core/server/integration_tests/http/lifecycle_handlers.test.ts @@ -60,6 +60,7 @@ describe('core lifecycle handlers', () => { xContentTypeOptions: 'nosniff', referrerPolicy: 'strict-origin-when-cross-origin', permissionsPolicy: null, + crossOriginOpenerPolicy: 'same-origin', }, customResponseHeaders: { 'some-header': 'some-value', diff --git a/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker b/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker index a7fba2f23a50b..f820a141afdad 100755 --- a/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker +++ b/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker @@ -165,6 +165,7 @@ kibana_vars=( server.securityResponseHeaders.referrerPolicy server.securityResponseHeaders.strictTransportSecurity server.securityResponseHeaders.xContentTypeOptions + server.securityResponseHeaders.crossOriginOpenerPolicy server.shutdownTimeout server.socketTimeout server.ssl.cert diff --git a/src/plugins/kibana_usage_collection/server/collectors/core/core_usage_collector.ts b/src/plugins/kibana_usage_collection/server/collectors/core/core_usage_collector.ts index 28a921dd20162..8559546ee6d68 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/core/core_usage_collector.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/core/core_usage_collector.ts @@ -277,6 +277,12 @@ export function getCoreUsageCollector( 'Indicates if security headers to disable embedding have been configured.', }, }, + crossOriginOpenerPolicy: { + type: 'keyword', + _meta: { + description: 'The crossOriginOpenerPolicy response header, "NULL" if disabled.', + }, + }, }, }, diff --git a/src/plugins/kibana_usage_collection/server/collectors/core/core_usage_data.ts b/src/plugins/kibana_usage_collection/server/collectors/core/core_usage_data.ts index 2e5084f1b9ae5..04a6b71d66658 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/core/core_usage_data.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/core/core_usage_data.ts @@ -253,6 +253,7 @@ export interface CoreConfigUsageData { referrerPolicy: string; permissionsPolicyConfigured: boolean; disableEmbedding: boolean; + crossOriginOpenerPolicy: string; }; }; diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index deef2fc562954..a71933ab1ae72 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -6758,6 +6758,12 @@ "_meta": { "description": "Indicates if security headers to disable embedding have been configured." } + }, + "crossOriginOpenerPolicy": { + "type": "keyword", + "_meta": { + "description": "The crossOriginOpenerPolicy response header, \"NULL\" if disabled." + } } } } @@ -10549,4 +10555,4 @@ } } } -} +} \ No newline at end of file From b3d7ecb68df66e2a49ed9ad04003ae645b26fb6c Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Wed, 21 Dec 2022 10:28:00 -0500 Subject: [PATCH 16/36] [Synthetics] unskip flaky test (#147859) ## Summary Resolves https://github.com/elastic/kibana/issues/146014 Unskip flaky test. https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1664 --- .../apis/synthetics/get_monitor_overview.ts | 13 ++++++------- .../apis/uptime/rest/fixtures/http_monitor.json | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/x-pack/test/api_integration/apis/synthetics/get_monitor_overview.ts b/x-pack/test/api_integration/apis/synthetics/get_monitor_overview.ts index 0aa940941f98a..cb84210c473c4 100644 --- a/x-pack/test/api_integration/apis/synthetics/get_monitor_overview.ts +++ b/x-pack/test/api_integration/apis/synthetics/get_monitor_overview.ts @@ -17,8 +17,7 @@ import { FtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from '../uptime/rest/helper/get_fixture_json'; export default function ({ getService }: FtrProviderContext) { - // Failing: See https://github.com/elastic/kibana/issues/146014 - describe.skip('GetMonitorsOverview', function () { + describe('GetMonitorsOverview', function () { this.tags('skipCloud'); const supertest = getService('supertest'); @@ -170,9 +169,9 @@ export default function ({ getService }: FtrProviderContext) { ); savedMonitors = savedResponse; - const apiResponse = await supertest.get( - `/s/${SPACE_ID}${SYNTHETICS_API_URLS.SYNTHETICS_OVERVIEW}` - ); + const apiResponse = await supertest + .get(`/s/${SPACE_ID}${SYNTHETICS_API_URLS.SYNTHETICS_OVERVIEW}`) + .query({ sortField: 'status' }); expect(apiResponse.body.monitors).eql([ { id: savedMonitors[0].attributes[ConfigKey.MONITOR_QUERY_ID], @@ -180,7 +179,7 @@ export default function ({ getService }: FtrProviderContext) { name: 'test monitor a', location: { id: 'eu-west-01', - label: 'Europe West', + label: 'Europe East', geo: { lat: 33.2343132435, lon: 73.2342343434, @@ -212,7 +211,7 @@ export default function ({ getService }: FtrProviderContext) { name: 'test monitor b', location: { id: 'eu-west-01', - label: 'Europe West', + label: 'Europe East', geo: { lat: 33.2343132435, lon: 73.2342343434, diff --git a/x-pack/test/api_integration/apis/uptime/rest/fixtures/http_monitor.json b/x-pack/test/api_integration/apis/uptime/rest/fixtures/http_monitor.json index 218cc5b1b9770..af4cfb976fda6 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/fixtures/http_monitor.json +++ b/x-pack/test/api_integration/apis/uptime/rest/fixtures/http_monitor.json @@ -56,7 +56,7 @@ "locations": [ { "id": "eu-west-01", - "label": "Europe West", + "label": "Europe East", "geo": { "lat": 33.2343132435, "lon": 73.2342343434 From 042403e606e59468024b9a822ab7a9c199a487f5 Mon Sep 17 00:00:00 2001 From: Giorgos Bamparopoulos Date: Wed, 21 Dec 2022 15:36:08 +0000 Subject: [PATCH 17/36] [APM] Add parallel builds for cypress tests (#142598) - Tests runs initiated by the flaky test runner are not recorded or parallelized --- .buildkite/pipelines/pull_request/apm_cypress.yml | 1 + .buildkite/scripts/steps/functional/apm_cypress.sh | 11 +++++++++-- x-pack/plugins/apm/dev_docs/testing.md | 11 ++++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipelines/pull_request/apm_cypress.yml b/.buildkite/pipelines/pull_request/apm_cypress.yml index c9bb4485f07ef..a64590e337ee4 100644 --- a/.buildkite/pipelines/pull_request/apm_cypress.yml +++ b/.buildkite/pipelines/pull_request/apm_cypress.yml @@ -5,6 +5,7 @@ steps: queue: n2-4-spot depends_on: build timeout_in_minutes: 120 + parallelism: 4 retry: automatic: - exit_status: '-1' diff --git a/.buildkite/scripts/steps/functional/apm_cypress.sh b/.buildkite/scripts/steps/functional/apm_cypress.sh index 34e94baf180f9..ff14df87377cd 100755 --- a/.buildkite/scripts/steps/functional/apm_cypress.sh +++ b/.buildkite/scripts/steps/functional/apm_cypress.sh @@ -10,6 +10,14 @@ APM_CYPRESS_RECORD_KEY="$(retry 5 5 vault read -field=CYPRESS_RECORD_KEY secret/ .buildkite/scripts/download_build_artifacts.sh export JOB=kibana-apm-cypress +IS_FLAKY_TEST_RUNNER=${CLI_COUNT:-0} + +# Disable parallel tests and dashboard recording when running them in the flaky test runner +if [[ "$IS_FLAKY_TEST_RUNNER" -ne 1 ]]; then + CYPRESS_ARGS="--record --key "$APM_CYPRESS_RECORD_KEY" --parallel --ci-build-id "${BUILDKITE_BUILD_ID}"" +else + CYPRESS_ARGS="" +fi echo "--- APM Cypress Tests" @@ -17,5 +25,4 @@ cd "$XPACK_DIR" node plugins/apm/scripts/test/e2e.js \ --kibana-install-dir "$KIBANA_BUILD_LOCATION" \ - --record \ - --key "$APM_CYPRESS_RECORD_KEY" + $CYPRESS_ARGS diff --git a/x-pack/plugins/apm/dev_docs/testing.md b/x-pack/plugins/apm/dev_docs/testing.md index 8362e0c8f7451..015995af63155 100644 --- a/x-pack/plugins/apm/dev_docs/testing.md +++ b/x-pack/plugins/apm/dev_docs/testing.md @@ -70,7 +70,16 @@ node scripts/test/api --runner --basic --updateSnapshots ## E2E Tests (Cypress) -The E2E tests are located in [`x-pack/plugins/apm/ftr_e2e`](../ftr_e2e) +The E2E tests are located in [`x-pack/plugins/apm/ftr_e2e`](../ftr_e2e). + +Test runs are recorded to the [Cypress Dashboard](https://dashboard.cypress.io). Tests run on buildkite PR pipeline are parallelized (4 parallel jobs) and are orchestrated by the Cypress dashboard service. It can be configured in [.buildkite/pipelines/pull_request/apm_cypress.yml](https://github.com/elastic/kibana/blob/main/.buildkite/pipelines/pull_request/apm_cypress.yml) with the property `parallelism`. + +```yml + ... + depends_on: build + parallelism: 4 + ... +``` [Test tips and best practices](../ftr_e2e/README.md) From f1de9a4bc04aad8e43a49269fc63ccd936e3673b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 21 Dec 2022 16:47:17 +0100 Subject: [PATCH 18/36] Update react-query to ^4.20.2 (main) (#147908) --- package.json | 4 ++-- yarn.lock | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 17ce2e5a35166..1375d106c615f 100644 --- a/package.json +++ b/package.json @@ -452,8 +452,8 @@ "@opentelemetry/semantic-conventions": "^1.4.0", "@reduxjs/toolkit": "1.7.2", "@slack/webhook": "^5.0.4", - "@tanstack/react-query": "^4.19.1", - "@tanstack/react-query-devtools": "^4.19.1", + "@tanstack/react-query": "^4.20.2", + "@tanstack/react-query-devtools": "^4.20.2", "@turf/along": "6.0.1", "@turf/area": "6.0.1", "@turf/bbox": "6.0.1", diff --git a/yarn.lock b/yarn.lock index a47fa25857973..9398e7bb4c1b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6062,26 +6062,26 @@ dependencies: remove-accents "0.4.2" -"@tanstack/query-core@4.19.1": - version "4.19.1" - resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-4.19.1.tgz#2e92d9e8a50884eb231c5beb4386e131ebe34306" - integrity sha512-Zp0aIose5C8skBzqbVFGk9HJsPtUhRVDVNWIqVzFbGQQgYSeLZMd3Sdb4+EnA5wl1J7X+bre2PJGnQg9x/zHOA== +"@tanstack/query-core@4.20.4": + version "4.20.4" + resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-4.20.4.tgz#1f7975a2db26a8bc2f382bad8a44cd422c846b17" + integrity sha512-lhLtGVNJDsJ/DyZXrLzekDEywQqRVykgBqTmkv0La32a/RleILXy6JMLBb7UmS3QCatg/F/0N9/5b0i5j6IKcA== -"@tanstack/react-query-devtools@^4.19.1": - version "4.19.1" - resolved "https://registry.yarnpkg.com/@tanstack/react-query-devtools/-/react-query-devtools-4.19.1.tgz#850058df8dba932362838c17f566bd717044449b" - integrity sha512-U63A+ly9JLPJj7ryR9omdXT3n+gS7jlExrHty4klsd/6xdUhC38CKZyZ0Gi3vctaVYRGTU8/vI+uKzBYdFqLaA== +"@tanstack/react-query-devtools@^4.20.2": + version "4.20.4" + resolved "https://registry.yarnpkg.com/@tanstack/react-query-devtools/-/react-query-devtools-4.20.4.tgz#a58c742faacc03a0735006eb30e6a1f215957310" + integrity sha512-4e4wOmqAYjLS1RQ7gRBLCk3koCjbOfCMvbxS3CPCAN5+FLBemLAvoYvFJ/i/7DPsIsltGwsnd7YAFFGMzdSx7A== dependencies: "@tanstack/match-sorter-utils" "^8.7.0" superjson "^1.10.0" use-sync-external-store "^1.2.0" -"@tanstack/react-query@^4.19.1": - version "4.19.1" - resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-4.19.1.tgz#43356dd537127e76d75f5a2769eb23dafd9a3690" - integrity sha512-5dvHvmc0vrWI03AJugzvKfirxCyCLe+qawrWFCXdu8t7dklIhJ7D5ZhgTypv7mMtIpdHPcECtCiT/+V74wCn2A== +"@tanstack/react-query@^4.20.2": + version "4.20.4" + resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-4.20.4.tgz#562b34fb919adea884eccaba2b5be50e8ba7fb16" + integrity sha512-SJRxx13k/csb9lXAJfycgVA1N/yU/h3bvRNWP0+aHMfMjmbyX82FdoAcckDBbOdEyAupvb0byelNHNeypCFSyA== dependencies: - "@tanstack/query-core" "4.19.1" + "@tanstack/query-core" "4.20.4" use-sync-external-store "^1.2.0" "@testim/chrome-version@^1.1.3": From a6232c48351f06004352562384272da170d3554e Mon Sep 17 00:00:00 2001 From: Ying Mao Date: Wed, 21 Dec 2022 10:56:08 -0500 Subject: [PATCH 19/36] [ResponseOps] Retry bulk update conflicts in task manager (#147808) Resolves https://github.com/elastic/kibana/issues/145316, https://github.com/elastic/kibana/issues/141849, https://github.com/elastic/kibana/issues/141864 ## Summary Adds a retry on conflict error to the saved objects bulk update call made by task manager. Errors are returned by the saved object client inside an array (with a success response). Previously, we were not inspecting the response array, just returning the full data. With this PR, we are inspecting the response array specifically for conflict errors and retrying the update for just those tasks. This `bulkUpdate` function is used both internally by task manager and externally by the rules client. I default the number of retries to 0 for bulk updates from the task manager in order to preserve existing behavior (and in order not to increase the amount of time it takes for task manager to run) but use 3 retries when used externally. Also unskipped the two flaky disable tests and ran them through the flaky test runner 400 times with no failures. * https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1652 * https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1653 * https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1660 * https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1661 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../lib/retry_on_bulk_update_conflict.test.ts | 309 ++++++++++++++++++ .../lib/retry_on_bulk_update_conflict.ts | 123 +++++++ x-pack/plugins/task_manager/server/plugin.ts | 1 + .../task_manager/server/task_scheduling.ts | 6 +- .../task_manager/server/task_store.test.ts | 111 ++++++- .../plugins/task_manager/server/task_store.ts | 55 ++-- .../group1/tests/alerting/disable.ts | 3 +- .../spaces_only/tests/alerting/disable.ts | 3 +- 8 files changed, 579 insertions(+), 32 deletions(-) create mode 100644 x-pack/plugins/task_manager/server/lib/retry_on_bulk_update_conflict.test.ts create mode 100644 x-pack/plugins/task_manager/server/lib/retry_on_bulk_update_conflict.ts diff --git a/x-pack/plugins/task_manager/server/lib/retry_on_bulk_update_conflict.test.ts b/x-pack/plugins/task_manager/server/lib/retry_on_bulk_update_conflict.test.ts new file mode 100644 index 0000000000000..00c4a613fd425 --- /dev/null +++ b/x-pack/plugins/task_manager/server/lib/retry_on_bulk_update_conflict.test.ts @@ -0,0 +1,309 @@ +/* + * Copyright 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 { loggingSystemMock, savedObjectsRepositoryMock } from '@kbn/core/server/mocks'; +import { SerializedConcreteTaskInstance, TaskStatus } from '../task'; +import { NUM_RETRIES, retryOnBulkUpdateConflict } from './retry_on_bulk_update_conflict'; + +const mockSavedObjectsRepository = savedObjectsRepositoryMock.create(); +const mockLogger = loggingSystemMock.create().get(); +const mockedDate = new Date('2019-02-12T21:01:22.479Z'); + +const task1 = { + type: 'task', + id: 'task:123456', + attributes: { + runAt: mockedDate.toISOString(), + scheduledAt: mockedDate.toISOString(), + startedAt: null, + retryAt: null, + params: `{ "hello": "world" }`, + state: `{ "id": "123456" }`, + taskType: 'alert', + attempts: 3, + status: 'idle' as TaskStatus, + ownerId: null, + traceparent: '', + }, +}; + +const task2 = { + type: 'task', + id: 'task:324242', + attributes: { + runAt: mockedDate.toISOString(), + scheduledAt: mockedDate.toISOString(), + startedAt: null, + retryAt: null, + params: `{ "hello": "world" }`, + state: `{ "foo": "bar" }`, + taskType: 'report', + attempts: 3, + status: 'idle' as TaskStatus, + ownerId: null, + traceparent: '', + }, +}; + +const task3 = { + type: 'task', + id: 'task:xyaaa', + attributes: { + runAt: mockedDate.toISOString(), + scheduledAt: mockedDate.toISOString(), + startedAt: null, + retryAt: null, + params: `{ "goodbye": "world" }`, + state: `{ "foo": "bar" }`, + taskType: 'action', + attempts: 3, + status: 'idle' as TaskStatus, + ownerId: null, + traceparent: '', + }, +}; + +describe('retryOnBulkUpdateConflict', () => { + beforeEach(() => { + jest.resetAllMocks(); + }); + + test('should not retry when all updates are successful', async () => { + const savedObjectResponse = [ + { + id: task1.id, + type: task1.type, + attributes: task1.attributes, + references: [], + }, + ]; + mockSavedObjectsRepository.bulkUpdate.mockResolvedValueOnce({ + saved_objects: savedObjectResponse, + }); + const { savedObjects } = await retryOnBulkUpdateConflict({ + logger: mockLogger, + savedObjectsRepository: mockSavedObjectsRepository, + objects: [task1], + }); + + expect(mockSavedObjectsRepository.bulkUpdate).toHaveBeenCalledTimes(1); + expect(savedObjects).toEqual(savedObjectResponse); + }); + + test('should throw error when saved objects bulkUpdate throws an error', async () => { + mockSavedObjectsRepository.bulkUpdate.mockImplementationOnce(() => { + throw new Error('fail'); + }); + await expect(() => + retryOnBulkUpdateConflict({ + logger: mockLogger, + savedObjectsRepository: mockSavedObjectsRepository, + objects: [task1], + }) + ).rejects.toThrowErrorMatchingInlineSnapshot(`"fail"`); + }); + + test('should not retry and return non-conflict errors', async () => { + const savedObjectResponse = [ + { + id: task1.id, + type: task1.type, + attributes: task1.attributes, + references: [], + }, + { + id: task2.id, + type: task2.type, + attributes: task2.attributes, + error: { + error: `Not a conflict`, + message: `Some error that's not a conflict`, + statusCode: 404, + }, + references: [], + }, + ]; + mockSavedObjectsRepository.bulkUpdate.mockResolvedValueOnce({ + saved_objects: savedObjectResponse, + }); + const { savedObjects } = await retryOnBulkUpdateConflict({ + logger: mockLogger, + savedObjectsRepository: mockSavedObjectsRepository, + objects: [task1, task2], + }); + + expect(mockSavedObjectsRepository.bulkUpdate).toHaveBeenCalledTimes(1); + expect(savedObjects).toEqual(savedObjectResponse); + }); + + test(`should return conflict errors when number of retries exceeds ${NUM_RETRIES}`, async () => { + const savedObjectResponse = [ + { + id: task2.id, + type: task2.type, + attributes: task2.attributes, + error: { + error: `Conflict`, + message: `There was a conflict`, + statusCode: 409, + }, + references: [], + }, + ]; + mockSavedObjectsRepository.bulkUpdate.mockResolvedValue({ + saved_objects: savedObjectResponse, + }); + const { savedObjects } = await retryOnBulkUpdateConflict({ + logger: mockLogger, + savedObjectsRepository: mockSavedObjectsRepository, + objects: [task2], + }); + + expect(mockSavedObjectsRepository.bulkUpdate).toHaveBeenCalledTimes(NUM_RETRIES + 1); + expect(savedObjects).toEqual(savedObjectResponse); + + expect(mockLogger.warn).toBeCalledWith('Bulk update saved object conflicts, exceeded retries'); + }); + + test('should retry as expected when there are conflicts', async () => { + mockSavedObjectsRepository.bulkUpdate + .mockResolvedValueOnce({ + saved_objects: [ + { + id: task1.id, + type: task1.type, + attributes: task1.attributes, + references: [], + }, + { + id: task2.id, + type: task2.type, + attributes: task2.attributes, + error: { + error: `Conflict`, + message: `This is a conflict`, + statusCode: 409, + }, + references: [], + }, + { + id: task3.id, + type: task3.type, + attributes: task3.attributes, + error: { + error: `Conflict`, + message: `This is a conflict`, + statusCode: 409, + }, + references: [], + }, + ], + }) + .mockResolvedValueOnce({ + saved_objects: [ + { + id: task2.id, + type: task2.type, + attributes: task2.attributes, + error: { + error: `Conflict`, + message: `This is a conflict`, + statusCode: 409, + }, + references: [], + }, + { + id: task3.id, + type: task3.type, + attributes: task3.attributes, + references: [], + }, + ], + }) + .mockResolvedValueOnce({ + saved_objects: [ + { + id: task2.id, + type: task2.type, + attributes: task2.attributes, + error: { + error: `Conflict`, + message: `This is a conflict`, + statusCode: 409, + }, + references: [], + }, + ], + }) + .mockResolvedValueOnce({ + saved_objects: [ + { + id: task2.id, + type: task2.type, + attributes: task2.attributes, + error: { + error: `Conflict`, + message: `This is a conflict`, + statusCode: 409, + }, + references: [], + }, + ], + }) + .mockResolvedValueOnce({ + saved_objects: [ + { + id: task2.id, + type: task2.type, + attributes: task2.attributes, + references: [], + }, + ], + }); + const { savedObjects } = await retryOnBulkUpdateConflict({ + logger: mockLogger, + savedObjectsRepository: mockSavedObjectsRepository, + objects: [task1, task2, task3], + retries: 5, + }); + + expect(mockSavedObjectsRepository.bulkUpdate).toHaveBeenCalledTimes(5); + expect(mockSavedObjectsRepository.bulkUpdate).toHaveBeenNthCalledWith( + 1, + [task1, task2, task3], + undefined + ); + expect(mockSavedObjectsRepository.bulkUpdate).toHaveBeenNthCalledWith( + 2, + [task2, task3], + undefined + ); + expect(mockSavedObjectsRepository.bulkUpdate).toHaveBeenNthCalledWith(3, [task2], undefined); + expect(mockSavedObjectsRepository.bulkUpdate).toHaveBeenNthCalledWith(4, [task2], undefined); + expect(mockSavedObjectsRepository.bulkUpdate).toHaveBeenNthCalledWith(5, [task2], undefined); + expect(savedObjects).toEqual([ + { + id: task1.id, + type: task1.type, + attributes: task1.attributes, + references: [], + }, + { + id: task3.id, + type: task3.type, + attributes: task3.attributes, + references: [], + }, + { + id: task2.id, + type: task2.type, + attributes: task2.attributes, + references: [], + }, + ]); + }); +}); diff --git a/x-pack/plugins/task_manager/server/lib/retry_on_bulk_update_conflict.ts b/x-pack/plugins/task_manager/server/lib/retry_on_bulk_update_conflict.ts new file mode 100644 index 0000000000000..cdf4d9234e541 --- /dev/null +++ b/x-pack/plugins/task_manager/server/lib/retry_on_bulk_update_conflict.ts @@ -0,0 +1,123 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + ISavedObjectsRepository, + Logger, + SavedObjectsBulkUpdateObject, + SavedObjectsBulkUpdateOptions, + SavedObjectsUpdateResponse, +} from '@kbn/core/server'; + +export const NUM_RETRIES = 2; + +interface RetryOnBulkUpdateConflictOpts { + logger: Logger; + savedObjectsRepository: ISavedObjectsRepository; + objects: Array>; + options?: SavedObjectsBulkUpdateOptions; + retries?: number; +} + +interface RetryOnBulkUpdateConflictResults { + savedObjects: Array>; +} + +export const retryOnBulkUpdateConflict = async ({ + logger, + savedObjectsRepository, + objects, + options, + retries = NUM_RETRIES, +}: RetryOnBulkUpdateConflictOpts): Promise> => { + return retryOnBulkUpdateConflictHelper({ + logger, + savedObjectsRepository, + objects, + options, + retries, + }); +}; + +const retryOnBulkUpdateConflictHelper = async ({ + logger, + savedObjectsRepository, + objects, + options, + retries = NUM_RETRIES, + accResults = [], +}: RetryOnBulkUpdateConflictOpts & { + accResults?: Array>; +}): Promise> => { + try { + const { saved_objects: savedObjectsResults } = await savedObjectsRepository.bulkUpdate( + objects, + options + ); + + const currResults: Array> = []; + const currConflicts: Array> = []; + const objectsToRetry: Array> = []; + savedObjectsResults.forEach( + (savedObjectResult: SavedObjectsUpdateResponse, index: number) => { + if (savedObjectResult.error && savedObjectResult.error.statusCode === 409) { + // The SavedObjectsRepository maintains the order of the docs + // so we can rely on the index in the `docs` to match an error + // on the same index in the `bulkUpdate` result + objectsToRetry.push(objects[index]); + currConflicts.push(savedObjectResult); + } else { + // Save results, whether they are successful or non-conflict errors + currResults.push(savedObjectResult); + } + } + ); + + const results = + retries <= 0 + ? [...accResults, ...currResults, ...currConflicts] + : [...accResults, ...currResults]; + + if (objectsToRetry.length === 0) { + return { + savedObjects: results, + }; + } + + if (retries <= 0) { + logger.warn(`Bulk update saved object conflicts, exceeded retries`); + + return { + savedObjects: results, + }; + } + + await waitBeforeNextRetry(retries); + + return retryOnBulkUpdateConflictHelper({ + logger, + savedObjectsRepository, + objects: objectsToRetry, + options, + retries: retries - 1, + accResults: results, + }); + } catch (err) { + throw err; + } +}; + +export const randomDelayMs = Math.floor(Math.random() * 100); +export const getExponentialDelayMultiplier = (retries: number) => 1 + (NUM_RETRIES - retries) ** 2; +export const RETRY_IF_CONFLICTS_DELAY = 250; +export const waitBeforeNextRetry = async (retries: number): Promise => { + const exponentialDelayMultiplier = getExponentialDelayMultiplier(retries); + + await new Promise((resolve) => + setTimeout(resolve, RETRY_IF_CONFLICTS_DELAY * exponentialDelayMultiplier + randomDelayMs) + ); +}; diff --git a/x-pack/plugins/task_manager/server/plugin.ts b/x-pack/plugins/task_manager/server/plugin.ts index c96474b1c0a1a..3ee6bfb133b51 100644 --- a/x-pack/plugins/task_manager/server/plugin.ts +++ b/x-pack/plugins/task_manager/server/plugin.ts @@ -205,6 +205,7 @@ export class TaskManagerPlugin const serializer = savedObjects.createSerializer(); const taskStore = new TaskStore({ + logger: this.logger, serializer, savedObjectsRepository, esClient: elasticsearch.client.asInternalUser, diff --git a/x-pack/plugins/task_manager/server/task_scheduling.ts b/x-pack/plugins/task_manager/server/task_scheduling.ts index 22d80fdf21828..ac4294c12baaf 100644 --- a/x-pack/plugins/task_manager/server/task_scheduling.ts +++ b/x-pack/plugins/task_manager/server/task_scheduling.ts @@ -43,6 +43,7 @@ import { EphemeralTaskRejectedDueToCapacityError } from './task_running'; const VERSION_CONFLICT_STATUS = 409; const BULK_ACTION_SIZE = 100; +const BULK_UPDATE_NUM_RETRIES = 3; export interface TaskSchedulingOpts { logger: Logger; taskStore: TaskStore; @@ -264,7 +265,10 @@ export class TaskScheduling { } private async bulkUpdateTasksHelper(updatedTasks: ConcreteTaskInstance[]) { - return (await this.store.bulkUpdate(updatedTasks)).reduce( + // Performs bulk update with retries + return ( + await this.store.bulkUpdate(updatedTasks, BULK_UPDATE_NUM_RETRIES) + ).reduce( (acc, task) => { if (task.tag === 'ok') { acc.tasks.push(task.value); diff --git a/x-pack/plugins/task_manager/server/task_store.test.ts b/x-pack/plugins/task_manager/server/task_store.test.ts index dfc21a7142ece..5d1484101cd0c 100644 --- a/x-pack/plugins/task_manager/server/task_store.test.ts +++ b/x-pack/plugins/task_manager/server/task_store.test.ts @@ -15,7 +15,11 @@ import { TaskLifecycleResult, SerializedConcreteTaskInstance, } from './task'; -import { elasticsearchServiceMock, savedObjectsServiceMock } from '@kbn/core/server/mocks'; +import { + elasticsearchServiceMock, + savedObjectsServiceMock, + loggingSystemMock, +} from '@kbn/core/server/mocks'; import { TaskStore, SearchOpts, AggregationOpts } from './task_store'; import { savedObjectsRepositoryMock } from '@kbn/core/server/mocks'; import { SavedObjectAttributes, SavedObjectsErrorHelpers } from '@kbn/core/server'; @@ -25,6 +29,7 @@ import { AdHocTaskCounter } from './lib/adhoc_task_counter'; const savedObjectsClient = savedObjectsRepositoryMock.create(); const serializer = savedObjectsServiceMock.createSerializer(); +const logger = loggingSystemMock.create().get(); const adHocTaskCounter = new AdHocTaskCounter(); const randomId = () => `id-${_.random(1, 20)}`; @@ -67,6 +72,7 @@ describe('TaskStore', () => { store = new TaskStore({ index: 'tasky', taskManagerId: '', + logger, serializer, esClient: elasticsearchServiceMock.createClusterClient().asInternalUser, definitions: taskDefinitions, @@ -233,6 +239,7 @@ describe('TaskStore', () => { index: 'tasky', taskManagerId: '', serializer, + logger, esClient, definitions: taskDefinitions, savedObjectsRepository: savedObjectsClient, @@ -302,6 +309,7 @@ describe('TaskStore', () => { index: 'tasky', taskManagerId: '', serializer, + logger, esClient, definitions: taskDefinitions, savedObjectsRepository: savedObjectsClient, @@ -400,6 +408,7 @@ describe('TaskStore', () => { index: 'tasky', taskManagerId: '', serializer, + logger, esClient, definitions: taskDefinitions, savedObjectsRepository: savedObjectsClient, @@ -503,6 +512,7 @@ describe('TaskStore', () => { index: 'tasky', taskManagerId: '', serializer, + logger, esClient: elasticsearchServiceMock.createClusterClient().asInternalUser, definitions: taskDefinitions, savedObjectsRepository: savedObjectsClient, @@ -510,6 +520,98 @@ describe('TaskStore', () => { }); }); + test('correctly returns errors from saved object bulk update', async () => { + const task = { + runAt: mockedDate, + scheduledAt: mockedDate, + startedAt: null, + retryAt: null, + id: 'task:324242', + params: { hello: 'world' }, + state: { foo: 'bar' }, + taskType: 'report', + attempts: 3, + status: 'idle' as TaskStatus, + version: '123', + ownerId: null, + traceparent: '', + }; + + savedObjectsClient.bulkUpdate.mockResolvedValueOnce({ + saved_objects: [ + { + id: task.id, + type: task.taskType, + attributes: { + runAt: mockedDate.toISOString(), + scheduledAt: mockedDate.toISOString(), + startedAt: null, + retryAt: null, + params: `{ "hello": "world" }`, + state: `{ "foo": "bar" }`, + taskType: 'report', + attempts: 3, + status: 'idle' as TaskStatus, + ownerId: null, + traceparent: '', + }, + error: { + error: `Not a conflict`, + message: `Some error that's not a conflict`, + statusCode: 404, + }, + references: [], + }, + ], + }); + const result = await store.bulkUpdate([task]); + expect(result).toEqual([ + { + error: { + entity: { + attempts: 3, + id: 'task:324242', + ownerId: null, + params: { hello: 'world' }, + retryAt: null, + runAt: mockedDate, + scheduledAt: mockedDate, + startedAt: null, + state: { foo: 'bar' }, + status: 'idle', + taskType: 'report', + traceparent: '', + version: '123', + }, + error: { + attributes: { + attempts: 3, + ownerId: null, + params: '{ "hello": "world" }', + retryAt: null, + runAt: mockedDate.toISOString(), + scheduledAt: mockedDate.toISOString(), + startedAt: null, + state: '{ "foo": "bar" }', + status: 'idle', + taskType: 'report', + traceparent: '', + }, + error: { + error: 'Not a conflict', + message: "Some error that's not a conflict", + statusCode: 404, + }, + id: 'task:324242', + references: [], + type: 'report', + }, + }, + tag: 'err', + }, + ]); + }); + test('pushes error from saved objects client to errors$', async () => { const task = { runAt: mockedDate, @@ -544,6 +646,7 @@ describe('TaskStore', () => { index: 'tasky', taskManagerId: '', serializer, + logger, esClient: elasticsearchServiceMock.createClusterClient().asInternalUser, definitions: taskDefinitions, savedObjectsRepository: savedObjectsClient, @@ -578,6 +681,7 @@ describe('TaskStore', () => { index: 'tasky', taskManagerId: '', serializer, + logger, esClient: elasticsearchServiceMock.createClusterClient().asInternalUser, definitions: taskDefinitions, savedObjectsRepository: savedObjectsClient, @@ -612,6 +716,7 @@ describe('TaskStore', () => { index: 'tasky', taskManagerId: '', serializer, + logger, esClient: elasticsearchServiceMock.createClusterClient().asInternalUser, definitions: taskDefinitions, savedObjectsRepository: savedObjectsClient, @@ -697,6 +802,7 @@ describe('TaskStore', () => { index: 'tasky', taskManagerId: '', serializer, + logger, esClient: elasticsearchServiceMock.createClusterClient().asInternalUser, definitions: taskDefinitions, savedObjectsRepository: savedObjectsClient, @@ -717,6 +823,7 @@ describe('TaskStore', () => { index: 'tasky', taskManagerId: '', serializer, + logger, esClient: elasticsearchServiceMock.createClusterClient().asInternalUser, definitions: taskDefinitions, savedObjectsRepository: savedObjectsClient, @@ -735,6 +842,7 @@ describe('TaskStore', () => { index: 'tasky', taskManagerId: '', serializer, + logger, esClient: elasticsearchServiceMock.createClusterClient().asInternalUser, definitions: taskDefinitions, savedObjectsRepository: savedObjectsClient, @@ -753,6 +861,7 @@ describe('TaskStore', () => { index: 'tasky', taskManagerId: '', serializer, + logger, esClient: elasticsearchServiceMock.createClusterClient().asInternalUser, definitions: taskDefinitions, savedObjectsRepository: savedObjectsClient, diff --git a/x-pack/plugins/task_manager/server/task_store.ts b/x-pack/plugins/task_manager/server/task_store.ts index e810ea5c1ef3e..aca1d2af956dc 100644 --- a/x-pack/plugins/task_manager/server/task_store.ts +++ b/x-pack/plugins/task_manager/server/task_store.ts @@ -15,6 +15,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { SavedObjectsBulkDeleteResponse } from '@kbn/core/server'; import { + Logger, SavedObject, ISavedObjectsSerializer, SavedObjectsRawDoc, @@ -35,8 +36,10 @@ import { import { TaskTypeDictionary } from './task_type_dictionary'; import { AdHocTaskCounter } from './lib/adhoc_task_counter'; +import { retryOnBulkUpdateConflict } from './lib/retry_on_bulk_update_conflict'; export interface StoreOpts { + logger: Logger; esClient: ElasticsearchClient; index: string; taskManagerId: string; @@ -94,6 +97,7 @@ export class TaskStore { public readonly errors$ = new Subject(); private esClient: ElasticsearchClient; + private logger: Logger; private definitions: TaskTypeDictionary; private savedObjectsRepository: ISavedObjectsRepository; private serializer: ISavedObjectsSerializer; @@ -111,6 +115,7 @@ export class TaskStore { constructor(opts: StoreOpts) { this.esClient = opts.esClient; this.index = opts.index; + this.logger = opts.logger; this.taskManagerId = opts.taskManagerId; this.definitions = opts.definitions; this.serializer = opts.serializer; @@ -246,34 +251,45 @@ export class TaskStore { * @param {Array} docs * @returns {Promise>} */ - public async bulkUpdate(docs: ConcreteTaskInstance[]): Promise { + public async bulkUpdate( + docs: ConcreteTaskInstance[], + retries: number = 0 + ): Promise { const attributesByDocId = docs.reduce((attrsById, doc) => { attrsById.set(doc.id, taskInstanceToAttributes(doc)); return attrsById; }, new Map()); - let updatedSavedObjects: Array; + let updatedSavedObjects: Array>; try { - ({ saved_objects: updatedSavedObjects } = - await this.savedObjectsRepository.bulkUpdate( - docs.map((doc) => ({ + ({ savedObjects: updatedSavedObjects } = + await retryOnBulkUpdateConflict({ + logger: this.logger, + savedObjectsRepository: this.savedObjectsRepository, + objects: docs.map((doc) => ({ type: 'task', id: doc.id, options: { version: doc.version }, attributes: attributesByDocId.get(doc.id)!, })), - { + options: { refresh: false, - } - )); + }, + retries, + })); } catch (e) { this.errors$.next(e); throw e; } - return updatedSavedObjects.map((updatedSavedObject, index) => - isSavedObjectsUpdateResponse(updatedSavedObject) - ? asOk( + return updatedSavedObjects.map((updatedSavedObject) => { + const doc = docs.find((d) => d.id === updatedSavedObject.id); + return updatedSavedObject.error !== undefined + ? asErr({ + entity: doc, + error: updatedSavedObject, + }) + : asOk( savedObjectToConcreteTaskInstance({ ...updatedSavedObject, attributes: defaults( @@ -281,15 +297,8 @@ export class TaskStore { attributesByDocId.get(updatedSavedObject.id)! ), }) - ) - : asErr({ - // The SavedObjectsRepository maintains the order of the docs - // so we can rely on the index in the `docs` to match an error - // on the same index in the `bulkUpdate` result - entity: docs[index], - error: updatedSavedObject, - }) - ); + ); + }) as BulkUpdateResult[]; } /** @@ -535,9 +544,3 @@ function ensureAggregationOnlyReturnsTaskObjects(opts: AggregationOpts): Aggrega query, }; } - -function isSavedObjectsUpdateResponse( - result: SavedObjectsUpdateResponse | Error -): result is SavedObjectsUpdateResponse { - return result && typeof (result as SavedObjectsUpdateResponse).id === 'string'; -} diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/disable.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/disable.ts index a645d89998093..df9fc34e17014 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/disable.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/disable.ts @@ -26,8 +26,7 @@ export default function createDisableAlertTests({ getService }: FtrProviderConte const supertest = getService('supertest'); const supertestWithoutAuth = getService('supertestWithoutAuth'); - // Failing: See https://github.com/elastic/kibana/issues/141849 - describe.skip('disable', () => { + describe('disable', () => { const objectRemover = new ObjectRemover(supertest); after(() => objectRemover.removeAll()); diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/disable.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/disable.ts index dab57143e0b6d..d4149c9cf2fb8 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/disable.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/disable.ts @@ -26,8 +26,7 @@ export default function createDisableRuleTests({ getService }: FtrProviderContex const retry = getService('retry'); const supertest = getService('supertest'); - // Failing: See https://github.com/elastic/kibana/issues/141864 - describe.skip('disable', () => { + describe('disable', () => { const objectRemover = new ObjectRemover(supertestWithoutAuth); const ruleUtils = new RuleUtils({ space: Spaces.space1, supertestWithoutAuth }); From af77f5a261e9183b35de5b7ad617171e1b12ffc0 Mon Sep 17 00:00:00 2001 From: Nick Peihl Date: Wed, 21 Dec 2022 11:00:28 -0500 Subject: [PATCH 20/36] [Expressions] Replace React.lazy and withSuspense with async imports in expressions plugins (#147693) Fixes #147648 ## Summary Replace React.lazy and withSuspense with async imports in expressions plugins The `withSuspense` method shows a loading state (`EuiLoadingSpinner`) while React.lazy imports the component module. However, expression renderers have a second loading state after the module is imported. This causes a flash of two separate loading states . Unfortunately, this caused a much larger problem with reporting where the report was triggered before the second loading state was complete. Using async imports rather than `React.lazy` ensures that components are fully available before the expression renderers call their `done` method. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../public/components/index.ts | 2 +- .../public/components/metric_component.tsx | 30 +++++++++---------- .../expression_renderers/metric_renderer.tsx | 28 ++++++++--------- .../components/repeat_image_component.tsx | 5 +--- .../repeat_image_renderer.tsx | 20 ++++++------- .../components/reveal_image_component.tsx | 6 +--- .../reveal_image_renderer.tsx | 22 +++++++------- .../public/components/progress/index.ts | 6 ++-- .../progress/progress_component.tsx | 15 +++------- .../components/progress/progress_drawer.tsx | 5 +--- .../public/components/shape/index.ts | 6 ++-- .../components/shape/shape_component.tsx | 13 ++------ .../public/components/shape/shape_drawer.tsx | 5 +--- .../progress_renderer.tsx | 18 +++++------ .../expression_renderers/shape_renderer.tsx | 18 +++++------ src/plugins/expression_shape/public/index.ts | 4 +-- .../shape_preview/shape_preview.tsx | 8 ++--- 17 files changed, 87 insertions(+), 124 deletions(-) diff --git a/src/plugins/expression_metric/public/components/index.ts b/src/plugins/expression_metric/public/components/index.ts index cb7865e5f0b8c..7bf615d240578 100644 --- a/src/plugins/expression_metric/public/components/index.ts +++ b/src/plugins/expression_metric/public/components/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export * from './metric_component'; +export { MetricComponent } from './metric_component'; diff --git a/src/plugins/expression_metric/public/components/metric_component.tsx b/src/plugins/expression_metric/public/components/metric_component.tsx index 9955dc5fa99f8..b9766999592ab 100644 --- a/src/plugins/expression_metric/public/components/metric_component.tsx +++ b/src/plugins/expression_metric/public/components/metric_component.tsx @@ -8,7 +8,6 @@ import React, { FunctionComponent, CSSProperties } from 'react'; import numeral from '@elastic/numeral'; - interface Props { /** The text to display under the metric */ label?: string; @@ -22,24 +21,23 @@ interface Props { metricFormat?: string; } -const Metric: FunctionComponent = ({ +export const MetricComponent: FunctionComponent = ({ label, metric, labelFont, metricFont, metricFormat, -}) => ( -
-
- {metricFormat ? numeral(metric).format(metricFormat) : metric} -
- {label && ( -
- {label} +}) => { + return ( +
+
+ {metricFormat ? numeral(metric).format(metricFormat) : metric}
- )} -
-); - -// eslint-disable-next-line import/no-default-export -export { Metric as default }; + {label && ( +
+ {label} +
+ )} +
+ ); +}; diff --git a/src/plugins/expression_metric/public/expression_renderers/metric_renderer.tsx b/src/plugins/expression_metric/public/expression_renderers/metric_renderer.tsx index 2019d8e597be2..3efe33769c557 100644 --- a/src/plugins/expression_metric/public/expression_renderers/metric_renderer.tsx +++ b/src/plugins/expression_metric/public/expression_renderers/metric_renderer.tsx @@ -5,10 +5,11 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import React, { CSSProperties, lazy } from 'react'; +import React, { CSSProperties } from 'react'; import { Observable } from 'rxjs'; import { CoreTheme } from '@kbn/core/public'; import { render, unmountComponentAtNode } from 'react-dom'; +import { EuiErrorBoundary } from '@elastic/eui'; import { ExpressionRenderDefinition, IInterpreterRenderHandlers, @@ -16,7 +17,6 @@ import { import { i18n } from '@kbn/i18n'; import { CoreSetup } from '@kbn/core/public'; import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; -import { withSuspense } from '@kbn/presentation-util-plugin/public'; import { defaultTheme$ } from '@kbn/presentation-util-plugin/common'; import { MetricRendererConfig } from '../../common/types'; @@ -31,9 +31,6 @@ const strings = { }), }; -const LazyMetricComponent = lazy(() => import('../components/metric_component')); -const MetricComponent = withSuspense(LazyMetricComponent); - export const getMetricRenderer = (theme$: Observable = defaultTheme$) => (): ExpressionRenderDefinition => ({ @@ -46,20 +43,23 @@ export const getMetricRenderer = config: MetricRendererConfig, handlers: IInterpreterRenderHandlers ) => { + const { MetricComponent } = await import('../components/metric_component'); handlers.onDestroy(() => { unmountComponentAtNode(domNode); }); render( - - - , + + + + + , domNode, () => handlers.done() ); diff --git a/src/plugins/expression_repeat_image/public/components/repeat_image_component.tsx b/src/plugins/expression_repeat_image/public/components/repeat_image_component.tsx index 430ef903e234f..a7c56b755cab8 100644 --- a/src/plugins/expression_repeat_image/public/components/repeat_image_component.tsx +++ b/src/plugins/expression_repeat_image/public/components/repeat_image_component.tsx @@ -53,7 +53,7 @@ function createImageJSX(img: HTMLImageElement | null) { return ; } -function RepeatImageComponent({ +export function RepeatImageComponent({ max, count, emptyImage: emptyImageSrc, @@ -98,6 +98,3 @@ function RepeatImageComponent({
); } -// default export required for React.Lazy -// eslint-disable-next-line import/no-default-export -export { RepeatImageComponent as default }; diff --git a/src/plugins/expression_repeat_image/public/expression_renderers/repeat_image_renderer.tsx b/src/plugins/expression_repeat_image/public/expression_renderers/repeat_image_renderer.tsx index 4435a696b2944..b5d3af35e660d 100644 --- a/src/plugins/expression_repeat_image/public/expression_renderers/repeat_image_renderer.tsx +++ b/src/plugins/expression_repeat_image/public/expression_renderers/repeat_image_renderer.tsx @@ -5,9 +5,10 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import React, { lazy } from 'react'; +import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { Observable } from 'rxjs'; +import { EuiErrorBoundary } from '@elastic/eui'; import { CoreTheme } from '@kbn/core/public'; import { ExpressionRenderDefinition, @@ -17,7 +18,6 @@ import { i18n } from '@kbn/i18n'; import { I18nProvider } from '@kbn/i18n-react'; import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; import { CoreSetup } from '@kbn/core/public'; -import { withSuspense } from '@kbn/presentation-util-plugin/public'; import { defaultTheme$, getElasticOutline, isValidUrl } from '@kbn/presentation-util-plugin/common'; import { RepeatImageRendererConfig } from '../../common/types'; @@ -32,9 +32,6 @@ const strings = { }), }; -const LazyRepeatImageComponent = lazy(() => import('../components/repeat_image_component')); -const RepeatImageComponent = withSuspense(LazyRepeatImageComponent, null); - export const getRepeatImageRenderer = (theme$: Observable = defaultTheme$) => (): ExpressionRenderDefinition => ({ @@ -47,6 +44,7 @@ export const getRepeatImageRenderer = config: RepeatImageRendererConfig, handlers: IInterpreterRenderHandlers ) => { + const { RepeatImageComponent } = await import('../components/repeat_image_component'); const { elasticOutline } = await getElasticOutline(); const settings = { ...config, @@ -59,11 +57,13 @@ export const getRepeatImageRenderer = }); render( - - - - - , + + + + + + + , domNode ); }, diff --git a/src/plugins/expression_reveal_image/public/components/reveal_image_component.tsx b/src/plugins/expression_reveal_image/public/components/reveal_image_component.tsx index c9516feb12b5c..8f4030955c606 100644 --- a/src/plugins/expression_reveal_image/public/components/reveal_image_component.tsx +++ b/src/plugins/expression_reveal_image/public/components/reveal_image_component.tsx @@ -46,7 +46,7 @@ interface AlignerStyles { backgroundImage?: string; } -function RevealImageComponent({ +export function RevealImageComponent({ onLoaded, parentNode, percent, @@ -152,7 +152,3 @@ function RevealImageComponent({ ); } - -// default export required for React.Lazy -// eslint-disable-next-line import/no-default-export -export { RevealImageComponent as default }; diff --git a/src/plugins/expression_reveal_image/public/expression_renderers/reveal_image_renderer.tsx b/src/plugins/expression_reveal_image/public/expression_renderers/reveal_image_renderer.tsx index 01018b344de47..0213daaf8e934 100644 --- a/src/plugins/expression_reveal_image/public/expression_renderers/reveal_image_renderer.tsx +++ b/src/plugins/expression_reveal_image/public/expression_renderers/reveal_image_renderer.tsx @@ -5,9 +5,10 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import React, { lazy } from 'react'; +import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { Observable } from 'rxjs'; +import { EuiErrorBoundary } from '@elastic/eui'; import { CoreTheme } from '@kbn/core/public'; import { I18nProvider } from '@kbn/i18n-react'; import { @@ -17,7 +18,6 @@ import { import { i18n } from '@kbn/i18n'; import { CoreSetup } from '@kbn/core/public'; import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; -import { withSuspense } from '@kbn/presentation-util-plugin/public'; import { defaultTheme$ } from '@kbn/presentation-util-plugin/common'; import { RevealImageRendererConfig } from '../../common/types'; @@ -32,9 +32,6 @@ export const strings = { }), }; -const LazyRevealImageComponent = lazy(() => import('../components/reveal_image_component')); -const RevealImageComponent = withSuspense(LazyRevealImageComponent, null); - export const getRevealImageRenderer = (theme$: Observable = defaultTheme$) => (): ExpressionRenderDefinition => ({ @@ -42,21 +39,24 @@ export const getRevealImageRenderer = displayName: strings.getDisplayName(), help: strings.getHelpDescription(), reuseDomNode: true, - render: ( + render: async ( domNode: HTMLElement, config: RevealImageRendererConfig, handlers: IInterpreterRenderHandlers ) => { + const { RevealImageComponent } = await import('../components/reveal_image_component'); handlers.onDestroy(() => { unmountComponentAtNode(domNode); }); render( - - - - - , + + + + + + + , domNode ); }, diff --git a/src/plugins/expression_shape/public/components/progress/index.ts b/src/plugins/expression_shape/public/components/progress/index.ts index 3aa7e6212cf09..170fe4e88f5ef 100644 --- a/src/plugins/expression_shape/public/components/progress/index.ts +++ b/src/plugins/expression_shape/public/components/progress/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -import { lazy } from 'react'; - -export const LazyProgressComponent = lazy(() => import('./progress_component')); -export const LazyProgressDrawer = lazy(() => import('./progress_drawer')); +export { ProgressComponent } from './progress_component'; +export { ProgressDrawerComponent } from './progress_drawer'; diff --git a/src/plugins/expression_shape/public/components/progress/progress_component.tsx b/src/plugins/expression_shape/public/components/progress/progress_component.tsx index 22ded93149e83..f61f26b126766 100644 --- a/src/plugins/expression_shape/public/components/progress/progress_component.tsx +++ b/src/plugins/expression_shape/public/components/progress/progress_component.tsx @@ -9,23 +9,20 @@ import React, { CSSProperties, RefCallback, useCallback, useEffect, useRef, useState } from 'react'; import { useResizeObserver } from '@elastic/eui'; import { IInterpreterRenderHandlers } from '@kbn/expressions-plugin/common'; -import { withSuspense } from '@kbn/presentation-util-plugin/public'; import { NodeDimensions, ProgressRendererConfig } from '../../../common/types'; import { ShapeRef, SvgConfig, SvgTextAttributes } from '../reusable/types'; import { getShapeContentElement } from '../reusable/shape_factory'; import { getTextAttributes, getViewBox } from './utils'; import { getId } from '../../../common/lib'; import { getDefaultShapeData } from '../reusable'; -import { LazyProgressDrawer } from '../..'; - -const ProgressDrawer = withSuspense(LazyProgressDrawer); +import { ProgressDrawerComponent } from './progress_drawer'; interface ProgressComponentProps extends ProgressRendererConfig { onLoaded: IInterpreterRenderHandlers['done']; parentNode: HTMLElement; } -function ProgressComponent({ +export function ProgressComponent({ onLoaded, parentNode, shape: shapeType, @@ -113,7 +110,7 @@ function ProgressComponent({ return (
- {BarProgress && } - +
); } - -// default export required for React.Lazy -// eslint-disable-next-line import/no-default-export -export { ProgressComponent as default }; diff --git a/src/plugins/expression_shape/public/components/progress/progress_drawer.tsx b/src/plugins/expression_shape/public/components/progress/progress_drawer.tsx index 0d5ed96d35dd5..e308dcd78c747 100644 --- a/src/plugins/expression_shape/public/components/progress/progress_drawer.tsx +++ b/src/plugins/expression_shape/public/components/progress/progress_drawer.tsx @@ -9,11 +9,8 @@ import React, { Ref } from 'react'; import { ShapeDrawer, ShapeRef, ShapeDrawerComponentProps } from '../reusable'; import { getShape } from './shapes'; -const ProgressDrawerComponent = React.forwardRef( +export const ProgressDrawerComponent = React.forwardRef( (props: ShapeDrawerComponentProps, ref: Ref) => ( ) ); - -// eslint-disable-next-line import/no-default-export -export { ProgressDrawerComponent as default }; diff --git a/src/plugins/expression_shape/public/components/shape/index.ts b/src/plugins/expression_shape/public/components/shape/index.ts index 12c852090ab4d..a63cf17523a7b 100644 --- a/src/plugins/expression_shape/public/components/shape/index.ts +++ b/src/plugins/expression_shape/public/components/shape/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -import { lazy } from 'react'; - -export const LazyShapeComponent = lazy(() => import('./shape_component')); -export const LazyShapeDrawer = lazy(() => import('./shape_drawer')); +export { ShapeComponent } from './shape_component'; +export { ShapeDrawerComponent } from './shape_drawer'; diff --git a/src/plugins/expression_shape/public/components/shape/shape_component.tsx b/src/plugins/expression_shape/public/components/shape/shape_component.tsx index ef3259e9b8300..7e14dc07c2442 100644 --- a/src/plugins/expression_shape/public/components/shape/shape_component.tsx +++ b/src/plugins/expression_shape/public/components/shape/shape_component.tsx @@ -8,7 +8,6 @@ import React, { useState, useEffect, useCallback, RefCallback } from 'react'; import { useResizeObserver } from '@elastic/eui'; -import { withSuspense } from '@kbn/presentation-util-plugin/public'; import { ShapeRef, ShapeAttributes, @@ -18,11 +17,9 @@ import { } from '../reusable'; import { Dimensions, ShapeComponentProps } from './types'; import { getViewBox } from '../../../common/lib'; -import { LazyShapeDrawer } from '../..'; +import { ShapeDrawerComponent } from '../..'; -const ShapeDrawer = withSuspense(LazyShapeDrawer); - -function ShapeComponent({ +export function ShapeComponent({ onLoaded, parentNode, shape: shapeType, @@ -78,7 +75,7 @@ function ShapeComponent({ return (
- ); } - -// default export required for React.Lazy -// eslint-disable-next-line import/no-default-export -export { ShapeComponent as default }; diff --git a/src/plugins/expression_shape/public/components/shape/shape_drawer.tsx b/src/plugins/expression_shape/public/components/shape/shape_drawer.tsx index 7647b07aa58cb..a13c8c12d20d3 100644 --- a/src/plugins/expression_shape/public/components/shape/shape_drawer.tsx +++ b/src/plugins/expression_shape/public/components/shape/shape_drawer.tsx @@ -9,11 +9,8 @@ import React, { Ref } from 'react'; import { ShapeDrawer, ShapeRef, ShapeDrawerComponentProps } from '../reusable'; import { getShape } from './shapes'; -const ShapeDrawerComponent = React.forwardRef( +export const ShapeDrawerComponent = React.forwardRef( (props: ShapeDrawerComponentProps, ref: Ref) => ( ) ); - -// eslint-disable-next-line import/no-default-export -export { ShapeDrawerComponent as default }; diff --git a/src/plugins/expression_shape/public/expression_renderers/progress_renderer.tsx b/src/plugins/expression_shape/public/expression_renderers/progress_renderer.tsx index 77f98068378fc..5de93c0b374aa 100644 --- a/src/plugins/expression_shape/public/expression_renderers/progress_renderer.tsx +++ b/src/plugins/expression_shape/public/expression_renderers/progress_renderer.tsx @@ -8,6 +8,7 @@ import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { Observable } from 'rxjs'; +import { EuiErrorBoundary } from '@elastic/eui'; import { CoreTheme } from '@kbn/core/public'; import { ExpressionRenderDefinition, @@ -17,12 +18,8 @@ import { i18n } from '@kbn/i18n'; import { I18nProvider } from '@kbn/i18n-react'; import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; import { CoreSetup } from '@kbn/core/public'; -import { withSuspense } from '@kbn/presentation-util-plugin/public'; import { defaultTheme$ } from '@kbn/presentation-util-plugin/common'; import { ProgressRendererConfig } from '../../common/types'; -import { LazyProgressComponent } from '../components/progress'; - -const ProgressComponent = withSuspense(LazyProgressComponent); const strings = { getDisplayName: () => @@ -47,16 +44,19 @@ export const getProgressRenderer = config: ProgressRendererConfig, handlers: IInterpreterRenderHandlers ) => { + const { ProgressComponent } = await import('../components/progress'); handlers.onDestroy(() => { unmountComponentAtNode(domNode); }); render( - - - - - , + + + + + + + , domNode ); }, diff --git a/src/plugins/expression_shape/public/expression_renderers/shape_renderer.tsx b/src/plugins/expression_shape/public/expression_renderers/shape_renderer.tsx index df99a511b635c..4e6c154486f6f 100644 --- a/src/plugins/expression_shape/public/expression_renderers/shape_renderer.tsx +++ b/src/plugins/expression_shape/public/expression_renderers/shape_renderer.tsx @@ -8,6 +8,7 @@ import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { Observable } from 'rxjs'; +import { EuiErrorBoundary } from '@elastic/eui'; import { CoreTheme } from '@kbn/core/public'; import { I18nProvider } from '@kbn/i18n-react'; import { @@ -17,10 +18,8 @@ import { import { i18n } from '@kbn/i18n'; import { CoreSetup } from '@kbn/core/public'; import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; -import { withSuspense } from '@kbn/presentation-util-plugin/public'; import { defaultTheme$ } from '@kbn/presentation-util-plugin/common'; import { ShapeRendererConfig } from '../../common/types'; -import { LazyShapeComponent } from '../components/shape'; const strings = { getDisplayName: () => @@ -33,8 +32,6 @@ const strings = { }), }; -const ShapeComponent = withSuspense(LazyShapeComponent); - export const getShapeRenderer = (theme$: Observable = defaultTheme$) => (): ExpressionRenderDefinition => ({ @@ -47,16 +44,19 @@ export const getShapeRenderer = config: ShapeRendererConfig, handlers: IInterpreterRenderHandlers ) => { + const { ShapeComponent } = await import('../components/shape'); handlers.onDestroy(() => { unmountComponentAtNode(domNode); }); render( - - - - - , + + + + + + + , domNode ); }, diff --git a/src/plugins/expression_shape/public/index.ts b/src/plugins/expression_shape/public/index.ts index be260c4c8c80b..ed1380d97e1bd 100755 --- a/src/plugins/expression_shape/public/index.ts +++ b/src/plugins/expression_shape/public/index.ts @@ -21,8 +21,8 @@ export { progressRendererFactory, } from './expression_renderers'; -export { LazyShapeDrawer } from './components/shape'; -export { LazyProgressDrawer } from './components/progress'; +export { ShapeDrawerComponent } from './components/shape'; +export { ProgressDrawerComponent } from './components/progress'; export { getDefaultShapeData } from './components/reusable'; export type { diff --git a/x-pack/plugins/canvas/public/components/shape_preview/shape_preview.tsx b/x-pack/plugins/canvas/public/components/shape_preview/shape_preview.tsx index 46782f4730f77..5879e0024e3cb 100644 --- a/x-pack/plugins/canvas/public/components/shape_preview/shape_preview.tsx +++ b/x-pack/plugins/canvas/public/components/shape_preview/shape_preview.tsx @@ -8,21 +8,17 @@ import React, { FC, RefCallback, useCallback, useState } from 'react'; import PropTypes from 'prop-types'; import { - LazyShapeDrawer, - ShapeDrawerComponentProps, + ShapeDrawerComponent, getDefaultShapeData, SvgConfig, ShapeRef, ViewBoxParams, } from '@kbn/expression-shape-plugin/public'; -import { withSuspense } from '@kbn/presentation-util-plugin/public'; interface Props { shape?: string; } -const ShapeDrawer = withSuspense(LazyShapeDrawer); - function getViewBox(defaultWidth: number, defaultViewBox: ViewBoxParams): ViewBoxParams { const { minX, minY, width, height } = defaultViewBox; return { @@ -45,7 +41,7 @@ export const ShapePreview: FC = ({ shape }) => { if (!shape) return
; return (
- Date: Wed, 21 Dec 2022 11:02:01 -0500 Subject: [PATCH 21/36] [Onboarding] ECMA MVP cleanup (#147702) --- .github/CODEOWNERS | 9 +++++++-- .../cloud_data_migration/server/plugin.ts | 1 - .../security_and_spaces/tests/catalogue.ts | 1 - .../test/ui_capabilities/spaces_only/tests/catalogue.ts | 1 - 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2854907fe2d10..0e3865ae5b28f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -311,7 +311,11 @@ /x-pack/plugins/licensing/ @elastic/kibana-core /x-pack/plugins/global_search/ @elastic/kibana-core /x-pack/plugins/cloud/ @elastic/kibana-core -/x-pack/plugins/cloud_integrations/ @elastic/kibana-core +/x-pack/plugins/cloud_integrations/cloud_chat/ @elastic/kibana-core +/x-pack/plugins/cloud_integrations/cloud_experiments/ @elastic/kibana-core +/x-pack/plugins/cloud_integrations/cloud_full_story/ @elastic/kibana-core +/x-pack/plugins/cloud_integrations/cloud_gain_sight/ @elastic/kibana-core +/x-pack/plugins/cloud_integrations/cloud_links/ @elastic/kibana-core /x-pack/test/saved_objects_field_count/ @elastic/kibana-core /src/plugins/saved_objects_management/ @elastic/kibana-core /src/plugins/advanced_settings/ @elastic/kibana-core @@ -425,9 +429,10 @@ /x-pack/plugins/ingest_pipelines/ @elastic/platform-deployment-management #CC# /x-pack/plugins/cross_cluster_replication/ @elastic/platform-deployment-management -# Management Experience - Platform Onboarding +# Platform Onboarding /src/plugins/guided_onboarding/ @elastic/platform-onboarding /examples/guided_onboarding_example/ @elastic/platform-onboarding +/x-pack/plugins/cloud_integrations/cloud_data_migration/ @elastic/platform-onboarding # Security Solution /x-pack/test/endpoint_api_integration_no_ingest/ @elastic/security-solution diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/server/plugin.ts b/x-pack/plugins/cloud_integrations/cloud_data_migration/server/plugin.ts index 0207b157ec14e..8d840a4a05d07 100644 --- a/x-pack/plugins/cloud_integrations/cloud_data_migration/server/plugin.ts +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/server/plugin.ts @@ -17,7 +17,6 @@ export class CloudDataMigrationPlugin implements Plugin { management: { data: [PLUGIN_ID], }, - catalogue: [PLUGIN_ID], privileges: [ { requiredClusterPrivileges: ['manage'], diff --git a/x-pack/test/ui_capabilities/security_and_spaces/tests/catalogue.ts b/x-pack/test/ui_capabilities/security_and_spaces/tests/catalogue.ts index 2422bd8e115c6..1934a22da6ddb 100644 --- a/x-pack/test/ui_capabilities/security_and_spaces/tests/catalogue.ts +++ b/x-pack/test/ui_capabilities/security_and_spaces/tests/catalogue.ts @@ -18,7 +18,6 @@ export default function catalogueTests({ getService }: FtrProviderContext) { const esFeatureExceptions = [ 'security', 'index_lifecycle_management', - 'migrate_data', 'snapshot_restore', 'rollup_jobs', 'reporting', diff --git a/x-pack/test/ui_capabilities/spaces_only/tests/catalogue.ts b/x-pack/test/ui_capabilities/spaces_only/tests/catalogue.ts index 222b2c78c69e7..60f13694a6326 100644 --- a/x-pack/test/ui_capabilities/spaces_only/tests/catalogue.ts +++ b/x-pack/test/ui_capabilities/spaces_only/tests/catalogue.ts @@ -18,7 +18,6 @@ export default function catalogueTests({ getService }: FtrProviderContext) { const esFeatureExceptions = [ 'security', 'index_lifecycle_management', - 'migrate_data', 'snapshot_restore', 'rollup_jobs', 'reporting', From 0b7b8878d91d9fde96bf6e8705faf261dc7bbc54 Mon Sep 17 00:00:00 2001 From: Kevin Delemme Date: Wed, 21 Dec 2022 11:21:29 -0500 Subject: [PATCH 22/36] feat(slo): improve sort and filter capabilities (#147877) --- .../observability/server/saved_objects/slo.ts | 2 +- .../server/services/slo/find_slo.test.ts | 63 +++++- .../server/services/slo/find_slo.ts | 21 +- .../services/slo/slo_repository.test.ts | 185 ++++++++++++++++-- .../server/services/slo/slo_repository.ts | 71 ++++++- .../server/types/rest_specs/slo.ts | 7 + .../server/types/schema/indicators.ts | 20 ++ 7 files changed, 346 insertions(+), 23 deletions(-) diff --git a/x-pack/plugins/observability/server/saved_objects/slo.ts b/x-pack/plugins/observability/server/saved_objects/slo.ts index f63ef3881b9d5..253c91f0a7b2c 100644 --- a/x-pack/plugins/observability/server/saved_objects/slo.ts +++ b/x-pack/plugins/observability/server/saved_objects/slo.ts @@ -19,7 +19,7 @@ export const slo: SavedObjectsType = { mappings: { dynamic: false, properties: { - name: { type: 'text' }, + name: { type: 'keyword' }, description: { type: 'text' }, indicator: { properties: { diff --git a/x-pack/plugins/observability/server/services/slo/find_slo.test.ts b/x-pack/plugins/observability/server/services/slo/find_slo.test.ts index 1ac802183c22a..050075aa6c05a 100644 --- a/x-pack/plugins/observability/server/services/slo/find_slo.test.ts +++ b/x-pack/plugins/observability/server/services/slo/find_slo.test.ts @@ -11,7 +11,7 @@ import { FindSLO } from './find_slo'; import { createSLO, createPaginatedSLO } from './fixtures/slo'; import { createSLIClientMock, createSLORepositoryMock } from './mocks'; import { SLIClient } from './sli_client'; -import { SLORepository } from './slo_repository'; +import { SLORepository, SortField, SortDirection } from './slo_repository'; describe('FindSLO', () => { let mockRepository: jest.Mocked; @@ -34,6 +34,7 @@ describe('FindSLO', () => { expect(mockRepository.find).toHaveBeenCalledWith( { name: undefined }, + { field: SortField.Name, direction: SortDirection.Asc }, { page: 1, perPage: 25 } ); @@ -95,6 +96,7 @@ describe('FindSLO', () => { expect(mockRepository.find).toHaveBeenCalledWith( { name: undefined }, + { field: SortField.Name, direction: SortDirection.Asc }, { page: 1, perPage: 25 } ); }); @@ -108,6 +110,21 @@ describe('FindSLO', () => { expect(mockRepository.find).toHaveBeenCalledWith( { name: 'Availability' }, + { field: SortField.Name, direction: SortDirection.Asc }, + { page: 1, perPage: 25 } + ); + }); + + it('calls the repository with the indicator_type filter criteria', async () => { + const slo = createSLO(); + mockRepository.find.mockResolvedValueOnce(createPaginatedSLO(slo)); + mockSLIClient.fetchCurrentSLIData.mockResolvedValueOnce(someIndicatorData(slo)); + + await findSLO.execute({ indicator_types: ['sli.kql.custom'] }); + + expect(mockRepository.find).toHaveBeenCalledWith( + { indicatorTypes: ['sli.kql.custom'] }, + { field: SortField.Name, direction: SortDirection.Asc }, { page: 1, perPage: 25 } ); }); @@ -121,6 +138,7 @@ describe('FindSLO', () => { expect(mockRepository.find).toHaveBeenCalledWith( { name: 'My SLO*' }, + { field: SortField.Name, direction: SortDirection.Asc }, { page: 2, perPage: 100 } ); }); @@ -134,6 +152,49 @@ describe('FindSLO', () => { expect(mockRepository.find).toHaveBeenCalledWith( { name: undefined }, + { field: SortField.Name, direction: SortDirection.Asc }, + { page: 1, perPage: 25 } + ); + }); + + it('sorts by name by default when not specified', async () => { + const slo = createSLO(); + mockRepository.find.mockResolvedValueOnce(createPaginatedSLO(slo)); + mockSLIClient.fetchCurrentSLIData.mockResolvedValueOnce(someIndicatorData(slo)); + + await findSLO.execute({ sort_by: undefined }); + + expect(mockRepository.find).toHaveBeenCalledWith( + { name: undefined }, + { field: SortField.Name, direction: SortDirection.Asc }, + { page: 1, perPage: 25 } + ); + }); + + it('sorts by indicator type', async () => { + const slo = createSLO(); + mockRepository.find.mockResolvedValueOnce(createPaginatedSLO(slo)); + mockSLIClient.fetchCurrentSLIData.mockResolvedValueOnce(someIndicatorData(slo)); + + await findSLO.execute({ sort_by: 'indicator_type' }); + + expect(mockRepository.find).toHaveBeenCalledWith( + { name: undefined }, + { field: SortField.IndicatorType, direction: SortDirection.Asc }, + { page: 1, perPage: 25 } + ); + }); + + it('sorts by indicator type in descending order', async () => { + const slo = createSLO(); + mockRepository.find.mockResolvedValueOnce(createPaginatedSLO(slo)); + mockSLIClient.fetchCurrentSLIData.mockResolvedValueOnce(someIndicatorData(slo)); + + await findSLO.execute({ sort_by: 'indicator_type', sort_direction: 'desc' }); + + expect(mockRepository.find).toHaveBeenCalledWith( + { name: undefined }, + { field: SortField.IndicatorType, direction: SortDirection.Desc }, { page: 1, perPage: 25 } ); }); diff --git a/x-pack/plugins/observability/server/services/slo/find_slo.ts b/x-pack/plugins/observability/server/services/slo/find_slo.ts index 5ae71131dc511..abe7f438babad 100644 --- a/x-pack/plugins/observability/server/services/slo/find_slo.ts +++ b/x-pack/plugins/observability/server/services/slo/find_slo.ts @@ -9,7 +9,15 @@ import { IndicatorData, SLO, SLOId, SLOWithSummary } from '../../domain/models'; import { computeErrorBudget, computeSLI } from '../../domain/services'; import { FindSLOParams, FindSLOResponse, findSLOResponseSchema } from '../../types/rest_specs'; import { SLIClient } from './sli_client'; -import { Criteria, Paginated, Pagination, SLORepository } from './slo_repository'; +import { + Criteria, + Paginated, + Pagination, + SLORepository, + Sort, + SortField, + SortDirection, +} from './slo_repository'; const DEFAULT_PAGE = 1; const DEFAULT_PER_PAGE = 25; @@ -20,9 +28,11 @@ export class FindSLO { public async execute(params: FindSLOParams): Promise { const pagination: Pagination = toPagination(params); const criteria: Criteria = toCriteria(params); + const sort: Sort = toSort(params); const { results: sloList, ...resultMeta }: Paginated = await this.repository.find( criteria, + sort, pagination ); const indicatorDataBySlo = await this.sliClient.fetchCurrentSLIData(sloList); @@ -71,5 +81,12 @@ function toPagination(params: FindSLOParams): Pagination { } function toCriteria(params: FindSLOParams): Criteria { - return { name: params.name }; + return { name: params.name, indicatorTypes: params.indicator_types }; +} + +function toSort(params: FindSLOParams): Sort { + return { + field: params.sort_by === 'indicator_type' ? SortField.IndicatorType : SortField.Name, + direction: params.sort_direction === 'desc' ? SortDirection.Desc : SortDirection.Asc, + }; } diff --git a/x-pack/plugins/observability/server/services/slo/slo_repository.test.ts b/x-pack/plugins/observability/server/services/slo/slo_repository.test.ts index f34b26fc92ccc..60b898bf93d1f 100644 --- a/x-pack/plugins/observability/server/services/slo/slo_repository.test.ts +++ b/x-pack/plugins/observability/server/services/slo/slo_repository.test.ts @@ -14,7 +14,13 @@ import { savedObjectsClientMock } from '@kbn/core/server/mocks'; import { SLO, StoredSLO } from '../../domain/models'; import { SO_SLO_TYPE } from '../../saved_objects'; -import { KibanaSavedObjectsSLORepository } from './slo_repository'; +import { + KibanaSavedObjectsSLORepository, + Pagination, + Sort, + SortDirection, + SortField, +} from './slo_repository'; import { createAPMTransactionDurationIndicator, createSLO, aStoredSLO } from './fixtures/slo'; import { SLONotFound } from '../../errors'; import { sloSchema } from '../../types/schema'; @@ -99,13 +105,129 @@ describe('KibanaSavedObjectsSLORepository', () => { }); describe('find', () => { - const DEFAULT_PAGINATION = { page: 1, perPage: 25 }; + const DEFAULT_PAGINATION: Pagination = { page: 1, perPage: 25 }; + const DEFAULT_SORTING: Sort = { + field: SortField.Name, + direction: SortDirection.Asc, + }; + + describe('Name filter', () => { + it('includes the filter on name with wildcard when provided', async () => { + const repository = new KibanaSavedObjectsSLORepository(soClientMock); + soClientMock.find.mockResolvedValueOnce(aFindResponse(SOME_SLO)); + + const result = await repository.find( + { name: 'availability*' }, + DEFAULT_SORTING, + DEFAULT_PAGINATION + ); + + expect(result).toEqual({ + page: 1, + perPage: 25, + total: 1, + results: [SOME_SLO], + }); + expect(soClientMock.find).toHaveBeenCalledWith({ + type: SO_SLO_TYPE, + page: 1, + perPage: 25, + filter: `(slo.attributes.name: *availability*)`, + sortField: 'name', + sortOrder: 'asc', + }); + }); + + it('includes the filter on name with added wildcard when not provided', async () => { + const repository = new KibanaSavedObjectsSLORepository(soClientMock); + soClientMock.find.mockResolvedValueOnce(aFindResponse(SOME_SLO)); + + const result = await repository.find( + { name: 'availa' }, + DEFAULT_SORTING, + DEFAULT_PAGINATION + ); + + expect(result).toEqual({ + page: 1, + perPage: 25, + total: 1, + results: [SOME_SLO], + }); + expect(soClientMock.find).toHaveBeenCalledWith({ + type: SO_SLO_TYPE, + page: 1, + perPage: 25, + filter: `(slo.attributes.name: *availa*)`, + sortField: 'name', + sortOrder: 'asc', + }); + }); + }); + + describe('indicatorTypes filter', () => { + it('includes the filter on indicator types when provided', async () => { + const repository = new KibanaSavedObjectsSLORepository(soClientMock); + soClientMock.find.mockResolvedValueOnce(aFindResponse(SOME_SLO)); + + const result = await repository.find( + { indicatorTypes: ['sli.kql.custom'] }, + DEFAULT_SORTING, + DEFAULT_PAGINATION + ); - it('includes the filter on name with wildcard when provided', async () => { + expect(result).toEqual({ + page: 1, + perPage: 25, + total: 1, + results: [SOME_SLO], + }); + expect(soClientMock.find).toHaveBeenCalledWith({ + type: SO_SLO_TYPE, + page: 1, + perPage: 25, + filter: `(slo.attributes.indicator.type: sli.kql.custom)`, + sortField: 'name', + sortOrder: 'asc', + }); + }); + + it('includes the filter on indicator types as logical OR when provided', async () => { + const repository = new KibanaSavedObjectsSLORepository(soClientMock); + soClientMock.find.mockResolvedValueOnce(aFindResponse(SOME_SLO)); + + const result = await repository.find( + { indicatorTypes: ['sli.kql.custom', 'sli.apm.transaction_duration'] }, + DEFAULT_SORTING, + DEFAULT_PAGINATION + ); + + expect(result).toEqual({ + page: 1, + perPage: 25, + total: 1, + results: [SOME_SLO], + }); + expect(soClientMock.find).toHaveBeenCalledWith({ + type: SO_SLO_TYPE, + page: 1, + perPage: 25, + filter: `(slo.attributes.indicator.type: sli.kql.custom or slo.attributes.indicator.type: sli.apm.transaction_duration)`, + sortField: 'name', + sortOrder: 'asc', + }); + }); + }); + + it('includes filter on name and indicator types', async () => { const repository = new KibanaSavedObjectsSLORepository(soClientMock); soClientMock.find.mockResolvedValueOnce(aFindResponse(SOME_SLO)); - const result = await repository.find({ name: 'availability*' }, DEFAULT_PAGINATION); + const result = await repository.find( + { name: 'latency', indicatorTypes: ['sli.kql.custom', 'sli.apm.transaction_duration'] }, + DEFAULT_SORTING, + DEFAULT_PAGINATION + ); expect(result).toEqual({ page: 1, @@ -117,15 +239,17 @@ describe('KibanaSavedObjectsSLORepository', () => { type: SO_SLO_TYPE, page: 1, perPage: 25, - filter: `slo.attributes.name: availability*`, + filter: `(slo.attributes.name: *latency*) and (slo.attributes.indicator.type: sli.kql.custom or slo.attributes.indicator.type: sli.apm.transaction_duration)`, + sortField: 'name', + sortOrder: 'asc', }); }); - it('includes the filter on name with added wildcard when not provided', async () => { + it('does not include the filter when no criteria provided', async () => { const repository = new KibanaSavedObjectsSLORepository(soClientMock); soClientMock.find.mockResolvedValueOnce(aFindResponse(SOME_SLO)); - const result = await repository.find({ name: 'availa' }, DEFAULT_PAGINATION); + const result = await repository.find({}, DEFAULT_SORTING, DEFAULT_PAGINATION); expect(result).toEqual({ page: 1, @@ -137,26 +261,61 @@ describe('KibanaSavedObjectsSLORepository', () => { type: SO_SLO_TYPE, page: 1, perPage: 25, - filter: `slo.attributes.name: availa*`, + sortField: 'name', + sortOrder: 'asc', }); }); - it('does not include the filter when no criteria provided', async () => { + it('sorts by name ascending', async () => { const repository = new KibanaSavedObjectsSLORepository(soClientMock); soClientMock.find.mockResolvedValueOnce(aFindResponse(SOME_SLO)); - const result = await repository.find({}, DEFAULT_PAGINATION); + await repository.find({}, DEFAULT_SORTING, DEFAULT_PAGINATION); - expect(result).toEqual({ + expect(soClientMock.find).toHaveBeenCalledWith({ + type: SO_SLO_TYPE, page: 1, perPage: 25, - total: 1, - results: [SOME_SLO], + sortField: 'name', + sortOrder: 'asc', }); + }); + + it('sorts by name descending', async () => { + const repository = new KibanaSavedObjectsSLORepository(soClientMock); + soClientMock.find.mockResolvedValueOnce(aFindResponse(SOME_SLO)); + + await repository.find( + {}, + { field: SortField.Name, direction: SortDirection.Desc }, + DEFAULT_PAGINATION + ); + + expect(soClientMock.find).toHaveBeenCalledWith({ + type: SO_SLO_TYPE, + page: 1, + perPage: 25, + sortField: 'name', + sortOrder: 'desc', + }); + }); + + it('sorts by indicator type', async () => { + const repository = new KibanaSavedObjectsSLORepository(soClientMock); + soClientMock.find.mockResolvedValueOnce(aFindResponse(SOME_SLO)); + + await repository.find( + {}, + { field: SortField.IndicatorType, direction: SortDirection.Asc }, + DEFAULT_PAGINATION + ); + expect(soClientMock.find).toHaveBeenCalledWith({ type: SO_SLO_TYPE, page: 1, perPage: 25, + sortField: 'indicator.type', + sortOrder: 'asc', }); }); }); diff --git a/x-pack/plugins/observability/server/services/slo/slo_repository.ts b/x-pack/plugins/observability/server/services/slo/slo_repository.ts index 79edbce1fc751..207cdb9832f9a 100644 --- a/x-pack/plugins/observability/server/services/slo/slo_repository.ts +++ b/x-pack/plugins/observability/server/services/slo/slo_repository.ts @@ -17,8 +17,11 @@ import { SO_SLO_TYPE } from '../../saved_objects'; import { SLONotFound } from '../../errors'; import { sloSchema } from '../../types/schema'; +type ObjectValues = T[keyof T]; + export interface Criteria { name?: string; + indicatorTypes?: string[]; } export interface Pagination { @@ -26,6 +29,25 @@ export interface Pagination { perPage: number; } +export const SortDirection = { + Asc: 'Asc', + Desc: 'Desc', +} as const; + +type SortDirection = ObjectValues; + +export const SortField = { + Name: 'Name', + IndicatorType: 'IndicatorType', +}; + +type SortField = ObjectValues; + +export interface Sort { + field: SortField; + direction: SortDirection; +} + export interface Paginated { page: number; perPage: number; @@ -37,7 +59,7 @@ export interface SLORepository { save(slo: SLO): Promise; findById(id: string): Promise; deleteById(id: string): Promise; - find(criteria: Criteria, pagination: Pagination): Promise>; + find(criteria: Criteria, sort: Sort, pagination: Pagination): Promise>; } export class KibanaSavedObjectsSLORepository implements SLORepository { @@ -75,13 +97,16 @@ export class KibanaSavedObjectsSLORepository implements SLORepository { } } - async find(criteria: Criteria, pagination: Pagination): Promise> { + async find(criteria: Criteria, sort: Sort, pagination: Pagination): Promise> { const filterKuery = buildFilterKuery(criteria); + const { sortField, sortOrder } = buildSortQuery(sort); const response = await this.soClient.find({ type: SO_SLO_TYPE, page: pagination.page, perPage: pagination.perPage, filter: filterKuery, + sortField, + sortOrder, }); return { @@ -96,11 +121,37 @@ export class KibanaSavedObjectsSLORepository implements SLORepository { function buildFilterKuery(criteria: Criteria): string | undefined { const filters: string[] = []; if (!!criteria.name) { - filters.push(`slo.attributes.name: ${addWildcardIfAbsent(criteria.name)}`); + filters.push(`(slo.attributes.name: ${addWildcardsIfAbsent(criteria.name)})`); + } + + if (!!criteria.indicatorTypes) { + const indicatorTypesFilter: string[] = criteria.indicatorTypes.map( + (indicatorType) => `slo.attributes.indicator.type: ${indicatorType}` + ); + filters.push(`(${indicatorTypesFilter.join(' or ')})`); } + return filters.length > 0 ? filters.join(' and ') : undefined; } +function buildSortQuery(sort: Sort): { sortField: string; sortOrder: 'asc' | 'desc' } { + let sortField: string; + switch (sort.field) { + case SortField.IndicatorType: + sortField = 'indicator.type'; + break; + case SortField.Name: + default: + sortField = 'name'; + break; + } + + return { + sortField, + sortOrder: sort.direction === SortDirection.Desc ? 'desc' : 'asc', + }; +} + function toStoredSLO(slo: SLO): StoredSLO { return sloSchema.encode(slo); } @@ -115,7 +166,15 @@ function toSLO(storedSLO: StoredSLO): SLO { } const WILDCARD_CHAR = '*'; -function addWildcardIfAbsent(value: string): string { - if (value.substring(value.length - 1) === WILDCARD_CHAR) return value; - return `${value}${WILDCARD_CHAR}`; +function addWildcardsIfAbsent(value: string): string { + let updatedValue = value; + if (updatedValue.substring(0, 1) !== WILDCARD_CHAR) { + updatedValue = `${WILDCARD_CHAR}${updatedValue}`; + } + + if (value.substring(value.length - 1) !== WILDCARD_CHAR) { + updatedValue = `${updatedValue}${WILDCARD_CHAR}`; + } + + return updatedValue; } diff --git a/x-pack/plugins/observability/server/types/rest_specs/slo.ts b/x-pack/plugins/observability/server/types/rest_specs/slo.ts index 40253ad998b12..b13d1c9cb5f65 100644 --- a/x-pack/plugins/observability/server/types/rest_specs/slo.ts +++ b/x-pack/plugins/observability/server/types/rest_specs/slo.ts @@ -11,6 +11,7 @@ import { budgetingMethodSchema, dateType, indicatorSchema, + indicatorTypesArraySchema, objectiveSchema, optionalSettingsSchema, settingsSchema, @@ -48,11 +49,17 @@ const getSLOParamsSchema = t.type({ }), }); +const sortDirectionSchema = t.union([t.literal('asc'), t.literal('desc')]); +const sortBySchema = t.union([t.literal('name'), t.literal('indicator_type')]); + const findSLOParamsSchema = t.partial({ query: t.partial({ name: t.string, + indicator_types: indicatorTypesArraySchema, page: t.string, per_page: t.string, + sort_by: sortBySchema, + sort_direction: sortDirectionSchema, }), }); diff --git a/x-pack/plugins/observability/server/types/schema/indicators.ts b/x-pack/plugins/observability/server/types/schema/indicators.ts index a430ee421a346..d9b2f9bbe51f7 100644 --- a/x-pack/plugins/observability/server/types/schema/indicators.ts +++ b/x-pack/plugins/observability/server/types/schema/indicators.ts @@ -67,6 +67,25 @@ const indicatorTypesSchema = t.union([ kqlCustomIndicatorTypeSchema, ]); +// Validate that a string is a comma separated list of indicator types, +// e.g. sli.kql.custom,sli.apm.transaction_duration +// Transform to an array of indicator type +const indicatorTypesArraySchema = new t.Type( + 'indicatorTypesArray', + (input: unknown): input is string[] => + Array.isArray(input) && input.every((i) => typeof i === 'string'), + (input: unknown, context: t.Context) => { + if (typeof input === 'string') { + const values = input.split(','); + if (values.every((value) => typeof value === 'string' && indicatorTypesSchema.is(value))) { + return t.success(values); + } + } + return t.failure(input, context); + }, + (values: string[]): string => values.join(',') +); + const indicatorSchema = t.union([ apmTransactionDurationIndicatorSchema, apmTransactionErrorRateIndicatorSchema, @@ -81,6 +100,7 @@ export { kqlCustomIndicatorSchema, kqlCustomIndicatorTypeSchema, indicatorSchema, + indicatorTypesArraySchema, indicatorTypesSchema, indicatorDataSchema, }; From b3ed8261e196e3cd4d4fc400fcb297b993b02b4d Mon Sep 17 00:00:00 2001 From: Shahzad Date: Wed, 21 Dec 2022 17:22:05 +0100 Subject: [PATCH 23/36] [Synthetics] Fixes errors overview sparklines (#147669) --- .../scripts/pipelines/pull_request/pipeline.ts | 14 ++++++++++++-- .../configurations/lens_attributes.ts | 6 +++++- .../lens_columns/overall_column.ts | 17 +++++++++++------ .../synthetics/kpi_over_time_config.ts | 8 +++----- .../monitor_error_sparklines.tsx | 2 +- 5 files changed, 32 insertions(+), 15 deletions(-) diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index 10c643b151b3f..24eb543701647 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -131,11 +131,21 @@ const uploadPipeline = (pipelineContent: string | object) => { pipeline.push(getPipeline('.buildkite/pipelines/pull_request/observability_plugin.yml')); } - if (await doAnyChangesMatch([/^x-pack\/plugins\/synthetics/])) { + if ( + await doAnyChangesMatch([ + /^x-pack\/plugins\/synthetics/, + /^x-pack\/plugins\/observability\/public\/components\/shared\/exploratory_view/, + ]) + ) { pipeline.push(getPipeline('.buildkite/pipelines/pull_request/synthetics_plugin.yml')); } - if (await doAnyChangesMatch([/^x-pack\/plugins\/ux/])) { + if ( + await doAnyChangesMatch([ + /^x-pack\/plugins\/ux/, + /^x-pack\/plugins\/observability\/public\/components\/shared\/exploratory_view/, + ]) + ) { pipeline.push(getPipeline('.buildkite/pipelines/pull_request/ux_plugin_e2e.yml')); } diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts index c93b6ef2cadd0..d7af11d2e8358 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts @@ -123,7 +123,7 @@ export const parseCustomFieldName = ( return { ...(currField ?? {}), - fieldName: selectedMetricField, + fieldName: currField?.field ?? selectedMetricField, columnLabel: currField?.label, columnField: currField?.field, }; @@ -563,6 +563,7 @@ export class LensAttributes { const fieldMetaInfo = this.getFieldMeta(sourceField, layerConfig, metricOption); const { + format, formula, fieldMeta, columnType, @@ -577,6 +578,7 @@ export class LensAttributes { return getDistributionInPercentageColumn({ layerId, formula, + format, label: columnLabel ?? label, dataView: layerConfig.dataView, lensFormulaHelper: this.lensFormulaHelper!, @@ -679,9 +681,11 @@ export class LensAttributes { paramFilters, showPercentileAnnotations, formula, + format, } = metricOption; const fieldMeta = layerConfig.dataView.getFieldByName(fieldName!); return { + format, formula, palette, fieldMeta, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_columns/overall_column.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_columns/overall_column.ts index 348c45def81ab..eeae6964318a2 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_columns/overall_column.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_columns/overall_column.ts @@ -14,6 +14,7 @@ export function getDistributionInPercentageColumn({ columnFilter, lensFormulaHelper, formula, + format, }: { label?: string; columnFilter?: string; @@ -21,6 +22,7 @@ export function getDistributionInPercentageColumn({ lensFormulaHelper: FormulaPublicApi; dataView: DataView; formula?: string; + format?: string; }) { const yAxisColId = `y-axis-column-${layerId}`; @@ -36,12 +38,15 @@ export function getDistributionInPercentageColumn({ { formula: lensFormula, label, - format: { - id: 'percent', - params: { - decimals: 0, - }, - }, + format: + format === 'percent' || !format + ? { + id: 'percent', + params: { + decimals: 0, + }, + } + : undefined, }, { columns: {}, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/kpi_over_time_config.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/kpi_over_time_config.ts index 3aa92587a867c..8aace1b7a2a1f 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/kpi_over_time_config.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/kpi_over_time_config.ts @@ -97,15 +97,13 @@ export function getSyntheticsKPIConfig({ dataView }: ConfigProps): SeriesConfig }, { label: 'Monitor Errors', - id: 'state.id', - // columnType: FORMULA_COLUMN, - // formula: "unique_count(state.id, kql='status.up: 0')", - field: 'state.id', + id: 'monitor_errors', columnType: OPERATION_COLUMN, + field: 'state.id', columnFilters: [ { language: 'kuery', - query: `summary: * and summary.down > 0 and and monitor.status: "down"`, + query: `summary.down > 0`, }, ], }, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_error_sparklines.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_error_sparklines.tsx index 6f2781a53d37e..84e64027a5276 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_error_sparklines.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_error_sparklines.tsx @@ -46,7 +46,7 @@ export const MonitorErrorSparklines = ({ from, to, monitorId }: Props) => { 'observer.geo.name': [selectedLocation?.label], }, dataType: 'synthetics', - selectedMetricField: 'state.up', + selectedMetricField: 'monitor_errors', name: 'Monitor errors', color: euiTheme.colors.danger, operationType: 'unique_count', From 9dac4890ec99e70ab241ee0ba9b06143ac74dad0 Mon Sep 17 00:00:00 2001 From: Rodney Norris Date: Wed, 21 Dec 2022 10:34:46 -0600 Subject: [PATCH 24/36] [Enterprise Search][Engines] Update navigation (#147893) ## Summary Update the Enterprise Search navigation when engines are enabled. ### Screenshots With engines FF off: image With engines FF on: image --- .../applications/shared/layout/nav.test.tsx | 143 ++++++++++++++++-- .../public/applications/shared/layout/nav.tsx | 92 +++++++++-- 2 files changed, 210 insertions(+), 25 deletions(-) diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx index a995b5e4b6f45..43bf011c420d1 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx @@ -20,6 +20,7 @@ import { useEnterpriseSearchNav } from './nav'; describe('useEnterpriseSearchContentNav', () => { beforeEach(() => { jest.clearAllMocks(); + mockKibanaValues.uiSettings.get.mockReturnValue(false); }); it('returns an array of top-level Enterprise Search nav items', () => { @@ -28,7 +29,6 @@ describe('useEnterpriseSearchContentNav', () => { hasWorkplaceSearchAccess: true, }; setMockValues({ productAccess: fullProductAccess }); - mockKibanaValues.uiSettings.get.mockReturnValue(true); expect(useEnterpriseSearchNav()).toEqual([ { @@ -53,11 +53,6 @@ describe('useEnterpriseSearchContentNav', () => { ], name: 'Content', }, - { - id: 'enterpriseSearchEngines', - name: 'Engines', - href: '/app/enterprise_search/content/engines', - }, { id: 'enterpriseSearchAnalytics', items: [ @@ -205,17 +200,145 @@ describe('useEnterpriseSearchContentNav', () => { setMockValues({ productAccess: fullProductAccess }); const esNav = useEnterpriseSearchNav(); - expect(esNav.find((item) => item.id === 'enterpriseSearchEngines')).toBeUndefined(); + expect(esNav.find((item) => item.id === 'enginesSearch')).toBeUndefined(); }); - it('includes engines when feature flag is on', () => { +}); + +describe('useEnterpriseSearchContentNav Engines feature flag', () => { + beforeEach(() => { + jest.clearAllMocks(); + mockKibanaValues.uiSettings.get.mockReturnValue(true); + }); + + it('returns an array of top-level Enterprise Search nav items', () => { const fullProductAccess: ProductAccess = { hasAppSearchAccess: true, hasWorkplaceSearchAccess: true, }; setMockValues({ productAccess: fullProductAccess }); - mockKibanaValues.uiSettings.get.mockReturnValue(true); + + expect(useEnterpriseSearchNav()).toEqual([ + { + href: '/app/enterprise_search/overview', + id: 'es_overview', + name: 'Overview', + }, + { + id: 'content', + items: [ + { + href: '/app/enterprise_search/content/search_indices', + id: 'search_indices', + name: 'Indices', + }, + { + href: '/app/enterprise_search/content/settings', + id: 'settings', + items: undefined, + name: 'Settings', + }, + ], + name: 'Content', + }, + { + id: 'enginesSearch', + name: 'Search', + items: [ + { + href: '/app/enterprise_search/elasticsearch', + id: 'elasticsearch', + name: 'Elasticsearch', + }, + { + id: 'enterpriseSearchEngines', + name: 'Engines', + href: '/app/enterprise_search/content/engines', + }, + ], + }, + { + id: 'enterpriseSearchAnalytics', + items: [ + { + href: '/app/enterprise_search/analytics', + id: 'analytics_collections', + name: 'Collections', + }, + ], + name: 'Behavorial Analytics', + }, + { + id: 'standaloneExperiences', + items: [ + { + href: '/app/enterprise_search/app_search', + id: 'app_search', + name: 'App Search', + }, + { + href: '/app/enterprise_search/workplace_search', + id: 'workplace_search', + name: 'Workplace Search', + }, + ], + name: 'Standalone Experiences', + }, + ]); + expect(mockKibanaValues.uiSettings.get).toHaveBeenCalledWith(enableEnginesSection, false); + }); + + it('excludes standalone experiences when the user has no access to them', () => { + const fullProductAccess: ProductAccess = { + hasAppSearchAccess: false, + hasWorkplaceSearchAccess: false, + }; + setMockValues({ productAccess: fullProductAccess }); + + const esNav = useEnterpriseSearchNav(); + expect(esNav.find((item) => item.id === 'standaloneExperiences')).toBeUndefined(); + }); + it('excludes App Search when the user has no access to it', () => { + const fullProductAccess: ProductAccess = { + hasAppSearchAccess: false, + hasWorkplaceSearchAccess: true, + }; + setMockValues({ productAccess: fullProductAccess }); const esNav = useEnterpriseSearchNav(); - expect(esNav.find((item) => item.id === 'enterpriseSearchEngines')).not.toBeUndefined(); + const standAloneNav = esNav.find((item) => item.id === 'standaloneExperiences'); + expect(standAloneNav).not.toBeUndefined(); + expect(standAloneNav).toEqual({ + id: 'standaloneExperiences', + items: [ + { + href: '/app/enterprise_search/workplace_search', + id: 'workplace_search', + name: 'Workplace Search', + }, + ], + name: 'Standalone Experiences', + }); + }); + it('excludes Workplace Search when the user has no access to it', () => { + const fullProductAccess: ProductAccess = { + hasAppSearchAccess: true, + hasWorkplaceSearchAccess: false, + }; + setMockValues({ productAccess: fullProductAccess }); + + const esNav = useEnterpriseSearchNav(); + const standAloneNav = esNav.find((item) => item.id === 'standaloneExperiences'); + expect(standAloneNav).not.toBeUndefined(); + expect(standAloneNav).toEqual({ + id: 'standaloneExperiences', + items: [ + { + href: '/app/enterprise_search/app_search', + id: 'app_search', + name: 'App Search', + }, + ], + name: 'Standalone Experiences', + }); }); }); 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 f37b61662558c..ad61d22ccfcb9 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 @@ -75,21 +75,6 @@ export const useEnterpriseSearchNav = () => { defaultMessage: 'Content', }), }, - ...(enginesSectionEnabled - ? [ - { - id: 'enterpriseSearchEngines', - name: i18n.translate('xpack.enterpriseSearch.nav.enginesTitle', { - defaultMessage: 'Engines', - }), - ...generateNavLink({ - shouldNotCreateHref: true, - shouldShowActiveForSubroutes: true, - to: ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL + ENGINES_PATH, - }), - }, - ] - : []), { id: 'enterpriseSearchAnalytics', items: [ @@ -167,5 +152,82 @@ export const useEnterpriseSearchNav = () => { }, ]; + if (enginesSectionEnabled) { + return [ + navItems[0], // Overview + navItems[1], // Content + { + id: 'enginesSearch', // TODO: just search? or wait for that + items: [ + { + id: 'elasticsearch', + name: i18n.translate('xpack.enterpriseSearch.nav.elasticsearchTitle', { + defaultMessage: 'Elasticsearch', + }), + ...generateNavLink({ + shouldNotCreateHref: true, + to: ELASTICSEARCH_PLUGIN.URL, + }), + }, + { + id: 'enterpriseSearchEngines', + name: i18n.translate('xpack.enterpriseSearch.nav.enginesTitle', { + defaultMessage: 'Engines', + }), + ...generateNavLink({ + shouldNotCreateHref: true, + shouldShowActiveForSubroutes: true, + to: ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL + ENGINES_PATH, + }), + }, + ], + name: i18n.translate('xpack.enterpriseSearch.nav.searchTitle', { + defaultMessage: 'Search', + }), + }, + navItems[2], // Behavioural Analytics + ...(productAccess.hasAppSearchAccess || productAccess.hasWorkplaceSearchAccess + ? [ + { + id: 'standaloneExperiences', + items: [ + ...(productAccess.hasAppSearchAccess + ? [ + { + id: 'app_search', + name: i18n.translate('xpack.enterpriseSearch.nav.appSearchTitle', { + defaultMessage: 'App Search', + }), + ...generateNavLink({ + shouldNotCreateHref: true, + to: APP_SEARCH_PLUGIN.URL, + }), + }, + ] + : []), + ...(productAccess.hasWorkplaceSearchAccess + ? [ + { + id: 'workplace_search', + name: i18n.translate('xpack.enterpriseSearch.nav.workplaceSearchTitle', { + defaultMessage: 'Workplace Search', + }), + ...generateNavLink({ + shouldNotCreateHref: true, + to: WORKPLACE_SEARCH_PLUGIN.URL, + }), + }, + ] + : []), + ], + name: i18n.translate('xpack.enterpriseSearch.nav.standaloneExperiencesTitle', { + defaultMessage: 'Standalone Experiences', + }), + }, + ] + : []), + ]; + } + return navItems; }; From e16953e71a1166cc75fe42167e576345ae137588 Mon Sep 17 00:00:00 2001 From: Sander Philipse <94373878+sphilipse@users.noreply.github.com> Date: Wed, 21 Dec 2022 17:37:39 +0100 Subject: [PATCH 25/36] [Enterprise Search] Fix styling for reorderable tables (#147929) This updates Enterprise Search table styling to match what it was before recent EUI updates. Before: Screenshot 2022-12-21 at 16 29 58 After: Screenshot 2022-12-21 at 16 33 29 --- .../components/search_index/search_index.tsx | 2 +- .../reorderable_table/reorderable_table.scss | 20 ++++++++----------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx index 7e5a7c2284f13..afb754c07d785 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx @@ -112,7 +112,7 @@ export const SearchIndex: React.FC = () => { content: , id: SearchIndexTabId.INDEX_MAPPINGS, name: i18n.translate('xpack.enterpriseSearch.content.searchIndex.indexMappingsTabLabel', { - defaultMessage: 'Index Mappings', + defaultMessage: 'Index mappings', }), }, ]; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/tables/reorderable_table/reorderable_table.scss b/x-pack/plugins/enterprise_search/public/applications/shared/tables/reorderable_table/reorderable_table.scss index c2bb212fe6939..33bc894a0737b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/tables/reorderable_table/reorderable_table.scss +++ b/x-pack/plugins/enterprise_search/public/applications/shared/tables/reorderable_table/reorderable_table.scss @@ -1,5 +1,11 @@ .reorderableTable { + &Header { + > .euiFlexGroup { + margin: $euiSizeXS 0; + } + } + &NoItems { border-top: $euiBorderThin; background-color: $euiColorEmptyShade; @@ -9,18 +15,8 @@ border-top: $euiBorderThin; background-color: $euiColorEmptyShade; - > .euiFlexGroup { - margin: 0; - } - - > .euiFlexGroup:nth-child(2) > .euiFlexItem { - margin-top: 0; - } - } - - &Header { - > .euiFlexGroup { - margin: ($euiSizeM * -1) 0; + > .euiFlexGroup > .euiFlexItem { + margin: $euiSizeM 0; } } From b61066d82a68fb26da1f1cd9e1b59f5a9f3d16ed Mon Sep 17 00:00:00 2001 From: "Quynh Nguyen (Quinn)" <43350163+qn895@users.noreply.github.com> Date: Wed, 21 Dec 2022 10:48:49 -0600 Subject: [PATCH 26/36] [ML][Fleet] Update Transform installation mechanism to support upgrade paths (#142920) ## Summary This PR: - Adds index aliases to the destination index for Transforms: - It will automatically appends `{{package-version}}` name to the `destination_index_name` specified in transform.yml - Create a `{destination_index_name}.all` that points to all the destination indices from all the previous versions and new version - Create a `{destination_index_name}.latest` that points to just the destination index of the new version - Upgrading package to a new version no longer deletes the destination index - Downgrading package to an older version (e.g. from v3 to v1) will: - Delete the transform from the newer version (v3), create transform for the older version (v1) - If the older version was previously installed and the destination index of the older version v1 already exists: update the alias `{destination_index_name}.latest` to point to destination index v1. - If the older version was never installed and destination index of the older version v1 does not exist: create the destination index with `{destination_index_name}.all` and `{destination_index_name}.latest` alias. - Support installing transforms concurrently and sequentially. - If the `order` is specified in the `transform.yml`'s `_meta` section, and all the numerical order are unique, transforms will be created and started sequentially. If not, they will be created and started concurrently. - Support versioning of transforms. If `fleet_transform_version` is specified in `transform.yml`'s `_meta` section: - If `fleet_transform_version` changed (either incremented or decremented): delete old transform, keep the old destination index, install new index templates, component templates, and transform - If `fleet_transform_version` remains the same: keep old transform, keep the old destination index, do nothing new - Fixes an issue with the mappings and template not being applied to the destination index correctly when the destination index has an ingest pipeline. Previously, when the transform is associated with an ingest pipeline, we add the ingest pipeline to the settings when calling `PUT index/{transform-destination-index}`. This in turns makes the settings and mappings from the component templates not apply correctly to the destination. This PR changes so that it will add the pipeline to the component template. Technical changes: - [Adds a new `ElasticsearchAssetType` for `index` ](https://github.com/elastic/kibana/pull/142920/files#diff-395b753abcf65cdc07993651d6211a49194a76c0497e5f234ea13736cf24a2c0) - [Adds a new `version` for `PACKAGES_SAVED_OBJECT_TYPE` ](https://github.com/elastic/kibana/pull/142920/files#diff-4e164e3802d5171bf96a2cf9c91c20e97c5e0b74b2f93187a072d9a3139f1c18) ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../migrations/check_registered_types.test.ts | 2 +- .../plugins/fleet/common/types/models/epm.ts | 7 +- .../integrations/sections/epm/constants.tsx | 3 + .../fleet/server/saved_objects/index.ts | 1 + .../services/epm/elasticsearch/index/index.ts | 8 + .../elasticsearch/index/update_settings.ts | 31 + .../epm/elasticsearch/transform/common.ts | 5 + .../epm/elasticsearch/transform/install.ts | 370 ++++++-- .../epm/elasticsearch/transform/remove.ts | 8 +- .../transform/transforms.test.ts | 804 ++++++++++++++---- .../server/services/epm/packages/remove.ts | 22 +- 11 files changed, 1034 insertions(+), 227 deletions(-) create mode 100644 x-pack/plugins/fleet/server/services/epm/elasticsearch/index/index.ts create mode 100644 x-pack/plugins/fleet/server/services/epm/elasticsearch/index/update_settings.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts b/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts index de9981618a01b..b24f0acc004b0 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts @@ -85,7 +85,7 @@ describe('checking migration metadata changes on all registered SO types', () => "endpoint:user-artifact": "f94c250a52b30d0a2d32635f8b4c5bdabd1e25c0", "endpoint:user-artifact-manifest": "8c14d49a385d5d1307d956aa743ec78de0b2be88", "enterprise_search_telemetry": "fafcc8318528d34f721c42d1270787c52565bad5", - "epm-packages": "fe3716a54188b3c71327fa060dd6780a674d3994", + "epm-packages": "2915aee4302d4b00472ed05c21f59b7d498b5206", "epm-packages-assets": "9fd3d6726ac77369249e9a973902c2cd615fc771", "event_loop_delays_daily": "d2ed39cf669577d90921c176499908b4943fb7bd", "exception-list": "fe8cc004fd2742177cdb9300f4a67689463faf9c", diff --git a/x-pack/plugins/fleet/common/types/models/epm.ts b/x-pack/plugins/fleet/common/types/models/epm.ts index d8d0dc250edc1..b9f471f1b4d43 100644 --- a/x-pack/plugins/fleet/common/types/models/epm.ts +++ b/x-pack/plugins/fleet/common/types/models/epm.ts @@ -101,6 +101,7 @@ export enum KibanaSavedObjectType { } export enum ElasticsearchAssetType { + index = 'index', componentTemplate = 'component_template', ingestPipeline = 'ingest_pipeline', indexTemplate = 'index_template', @@ -109,6 +110,10 @@ export enum ElasticsearchAssetType { dataStreamIlmPolicy = 'data_stream_ilm_policy', mlModel = 'ml_model', } +export type FleetElasticsearchAssetType = Exclude< + ElasticsearchAssetType, + ElasticsearchAssetType.index +>; export type DataType = typeof dataTypes; export type MonitoringType = typeof monitoringTypes; @@ -313,7 +318,7 @@ export type ElasticsearchAssetParts = AssetParts & { export type KibanaAssetTypeToParts = Record; export type ElasticsearchAssetTypeToParts = Record< - ElasticsearchAssetType, + FleetElasticsearchAssetType, ElasticsearchAssetParts[] >; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/constants.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/constants.tsx index 1fe4b7b38434d..1b183f13b4426 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/constants.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/constants.tsx @@ -35,6 +35,9 @@ export const AssetTitleMap: Record = { transform: i18n.translate('xpack.fleet.epm.assetTitles.transforms', { defaultMessage: 'Transforms', }), + index: i18n.translate('xpack.fleet.epm.assetTitles.indices', { + defaultMessage: 'Indices', + }), index_pattern: i18n.translate('xpack.fleet.epm.assetTitles.indexPatterns', { defaultMessage: 'Index patterns', }), diff --git a/x-pack/plugins/fleet/server/saved_objects/index.ts b/x-pack/plugins/fleet/server/saved_objects/index.ts index 8a061552a77ed..6c87e894e5777 100644 --- a/x-pack/plugins/fleet/server/saved_objects/index.ts +++ b/x-pack/plugins/fleet/server/saved_objects/index.ts @@ -262,6 +262,7 @@ const getSavedObjectTypes = ( properties: { id: { type: 'keyword' }, type: { type: 'keyword' }, + version: { type: 'keyword' }, }, }, installed_kibana: { diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/index/index.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/index/index.ts new file mode 100644 index 0000000000000..79d89d70ac672 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/index/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 { updateIndexSettings } from './update_settings'; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/index/update_settings.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/index/update_settings.ts new file mode 100644 index 0000000000000..a381f19a3d9fa --- /dev/null +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/index/update_settings.ts @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; + +import type { IndicesIndexSettings } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; + +import { retryTransientEsErrors } from '../retry'; + +export async function updateIndexSettings( + esClient: ElasticsearchClient, + index: string, + settings: IndicesIndexSettings +): Promise { + if (index) { + try { + await retryTransientEsErrors(() => + esClient.indices.putSettings({ + index, + body: settings, + }) + ); + } catch (err) { + throw new Error(`could not update index settings for ${index}`); + } + } +} diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/common.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/common.ts index e08d973f8df0e..46e85d7f9df62 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/common.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/common.ts @@ -6,3 +6,8 @@ */ export { getAsset } from '../../archive'; + +// Index alias that points to just one destination index from the latest package version +export const TRANSFORM_DEST_IDX_ALIAS_LATEST_SFX = '.latest'; +// Index alias that points to all of the destination indices from all the package versions +export const TRANSFORM_DEST_IDX_ALIAS_ALL_SFX = '.all'; 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 4999c07a2aec1..e8881bb247e12 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 @@ -9,6 +9,7 @@ import type { ElasticsearchClient, Logger, SavedObjectsClientContract } from '@k import { errors } from '@elastic/elasticsearch'; import { safeLoad } from 'js-yaml'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import { uniqBy } from 'lodash'; import { PACKAGE_TEMPLATE_SUFFIX, @@ -35,7 +36,7 @@ import { getInstallation } from '../../packages'; import { retryTransientEsErrors } from '../retry'; import { deleteTransforms } from './remove'; -import { getAsset } from './common'; +import { getAsset, TRANSFORM_DEST_IDX_ALIAS_LATEST_SFX } from './common'; const DEFAULT_TRANSFORM_TEMPLATES_PRIORITY = 250; enum TRANSFORM_SPECS_TYPES { @@ -55,6 +56,8 @@ interface DestinationIndexTemplateInstallation extends TransformModuleBase { interface TransformInstallation extends TransformModuleBase { installationName: string; content: any; + transformVersion?: string; + installationOrder?: number; } const installLegacyTransformsAssets = async ( @@ -67,6 +70,13 @@ const installLegacyTransformsAssets = async ( esReferences: EsAssetReference[] = [], previousInstalledTransformEsAssets: EsAssetReference[] = [] ) => { + await deleteTransforms( + esClient, + previousInstalledTransformEsAssets.map((asset) => asset.id), + // For legacy transforms, delete destination indices upon deleting transforms + true + ); + let installedTransforms: EsAssetReference[] = []; if (transformPaths.length > 0) { const transformRefs = transformPaths.reduce((acc, path) => { @@ -126,11 +136,16 @@ const installLegacyTransformsAssets = async ( const processTransformAssetsPerModule = ( installablePackage: InstallablePackage, installNameSuffix: string, - transformPaths: string[] + transformPaths: string[], + previousInstalledTransformEsAssets: EsAssetReference[] = [] ) => { const transformsSpecifications = new Map(); const destinationIndexTemplates: DestinationIndexTemplateInstallation[] = []; const transforms: TransformInstallation[] = []; + const aliasesRefs: string[] = []; + const transformsToRemove: EsAssetReference[] = []; + const transformsToRemoveWithDestIndex: EsAssetReference[] = []; + const indicesToAddRefs: EsAssetReference[] = []; transformPaths.forEach((path: string) => { const { transformModuleId, fileName } = getTransformFolderAndFileNames( @@ -150,38 +165,143 @@ const processTransformAssetsPerModule = ( if (fileName === TRANSFORM_SPECS_TYPES.FIELDS) { const validFields = processFields(content); const mappings = generateMappings(validFields); + const templateName = getTransformAssetNameForInstallation( + installablePackage, + transformModuleId, + 'template' + ); + const indexToModify = destinationIndexTemplates.findIndex( + (t) => t.transformModuleId === transformModuleId && t.installationName === templateName + ); + const template = { + transformModuleId, + _meta: getESAssetMetadata({ packageName: installablePackage.name }), + installationName: getTransformAssetNameForInstallation( + installablePackage, + transformModuleId, + 'template' + ), + template: {}, + } as DestinationIndexTemplateInstallation; + if (indexToModify === -1) { + destinationIndexTemplates.push(template); + } else { + destinationIndexTemplates[indexToModify] = template; + } packageAssets?.set('mappings', mappings); } if (fileName === TRANSFORM_SPECS_TYPES.TRANSFORM) { + const installationOrder = + isFinite(content._meta?.order) && content._meta?.order >= 0 ? content._meta?.order : 0; + const transformVersion = content._meta?.fleet_transform_version ?? '0.1.0'; + // The โ€œallโ€ alias for the transform destination indices will be adjusted to include the new transform destination index as well as everything it previously included + const allIndexAliasName = `${content.dest.index}.all`; + // The โ€œlatestโ€ alias for the transform destination indices will point solely to the new transform destination index + const latestIndexAliasName = `${content.dest.index}.latest`; + + transformsSpecifications + .get(transformModuleId) + ?.set('originalDestinationIndexName', content.dest.index); + + // Create two aliases associated with the destination index + // for better handling during upgrades + const alias = { + [allIndexAliasName]: {}, + [latestIndexAliasName]: {}, + }; + + const versionedIndexName = `${content.dest.index}-${installNameSuffix}`; + content.dest.index = versionedIndexName; + indicesToAddRefs.push({ + id: versionedIndexName, + type: ElasticsearchAssetType.index, + }); transformsSpecifications.get(transformModuleId)?.set('destinationIndex', content.dest); + transformsSpecifications.get(transformModuleId)?.set('destinationIndexAlias', alias); transformsSpecifications.get(transformModuleId)?.set('transform', content); - content._meta = getESAssetMetadata({ packageName: installablePackage.name }); - transforms.push({ + transformsSpecifications.get(transformModuleId)?.set('transformVersion', transformVersion); + content._meta = { + ...(content._meta ?? {}), + ...getESAssetMetadata({ packageName: installablePackage.name }), + }; + + const installationName = getTransformAssetNameForInstallation( + installablePackage, transformModuleId, - installationName: getTransformAssetNameForInstallation( - installablePackage, + // transform_id is versioned by fleet_transform_version and not by package version + `default-${transformVersion}` + ); + + const currentTransformSameAsPrev = + previousInstalledTransformEsAssets.find((t) => t.id === installationName) !== undefined; + if (previousInstalledTransformEsAssets.length === 0) { + aliasesRefs.push(allIndexAliasName, latestIndexAliasName); + transforms.push({ transformModuleId, - `default-${installNameSuffix}` - ), - content, - }); + installationName, + installationOrder, + transformVersion, + content, + }); + transformsSpecifications.get(transformModuleId)?.set('transformVersionChanged', true); + } else { + if (!currentTransformSameAsPrev) { + // If upgrading from old json schema to new yml schema + // We need to make sure to delete those transforms by matching the legacy naming convention + const versionFromOldJsonSchema = previousInstalledTransformEsAssets.find((t) => + t.id.startsWith( + getLegacyTransformNameForInstallation( + installablePackage, + `${transformModuleId}/default.json` + ) + ) + ); + + if (versionFromOldJsonSchema !== undefined) { + transformsToRemoveWithDestIndex.push(versionFromOldJsonSchema); + } + + // If upgrading from yml to newer version of yaml + // Match using new naming convention + const installNameWithoutVersion = installationName.split(transformVersion)[0]; + const prevVersion = previousInstalledTransformEsAssets.find((t) => + t.id.startsWith(installNameWithoutVersion) + ); + if (prevVersion !== undefined) { + transformsToRemove.push(prevVersion); + } + transforms.push({ + transformModuleId, + installationName, + installationOrder, + transformVersion, + content, + }); + transformsSpecifications.get(transformModuleId)?.set('transformVersionChanged', true); + aliasesRefs.push(allIndexAliasName, latestIndexAliasName); + } else { + transformsSpecifications.get(transformModuleId)?.set('transformVersionChanged', false); + } + } } + // Create index templates for destination indices if destination_index_template OR fields are defined if (fileName === TRANSFORM_SPECS_TYPES.MANIFEST) { if (isPopulatedObject(content, ['start']) && content.start === false) { transformsSpecifications.get(transformModuleId)?.set('start', false); } - // If manifest.yml contains destination_index_template - // Combine the mappings and other index template settings from manifest.yml into a single index template - // Create the index template and track the template in EsAssetReferences - if ( - isPopulatedObject(content, ['destination_index_template']) || - isPopulatedObject(packageAssets.get('mappings')) - ) { - const destinationIndexTemplate = - (content.destination_index_template as Record) ?? {}; - destinationIndexTemplates.push({ + + if (content.destination_index_template) { + const templateName = getTransformAssetNameForInstallation( + installablePackage, + transformModuleId, + 'template' + ); + const indexToModify = destinationIndexTemplates.findIndex( + (t) => t.transformModuleId === transformModuleId && t.installationName === templateName + ); + const template = { transformModuleId, _meta: getESAssetMetadata({ packageName: installablePackage.name }), installationName: getTransformAssetNameForInstallation( @@ -189,9 +309,14 @@ const processTransformAssetsPerModule = ( transformModuleId, 'template' ), - template: destinationIndexTemplate, - } as DestinationIndexTemplateInstallation); - packageAssets.set('destinationIndexTemplate', destinationIndexTemplate); + template: content.destination_index_template, + } as DestinationIndexTemplateInstallation; + if (indexToModify === -1) { + destinationIndexTemplates.push(template); + } else { + destinationIndexTemplates[indexToModify] = template; + } + packageAssets.set('destinationIndexTemplate', template); } } }); @@ -199,30 +324,42 @@ const processTransformAssetsPerModule = ( const indexTemplatesRefs = destinationIndexTemplates.map((template) => ({ id: template.installationName, type: ElasticsearchAssetType.indexTemplate, + version: transformsSpecifications.get(template.transformModuleId)?.get('transformVersion'), })); const componentTemplatesRefs = [ ...destinationIndexTemplates.map((template) => ({ id: `${template.installationName}${USER_SETTINGS_TEMPLATE_SUFFIX}`, type: ElasticsearchAssetType.componentTemplate, + version: transformsSpecifications.get(template.transformModuleId)?.get('transformVersion'), })), ...destinationIndexTemplates.map((template) => ({ id: `${template.installationName}${PACKAGE_TEMPLATE_SUFFIX}`, type: ElasticsearchAssetType.componentTemplate, + version: transformsSpecifications.get(template.transformModuleId)?.get('transformVersion'), })), ]; - const transformRefs = transforms.map((t) => ({ + const sortedTransforms = transforms.sort( + (t1, t2) => (t1.installationOrder ?? 0) - (t2.installationOrder ?? 1) + ); + + const transformRefs = sortedTransforms.map((t) => ({ id: t.installationName, type: ElasticsearchAssetType.transform, + version: t.transformVersion, })); return { + indicesToAddRefs, indexTemplatesRefs, componentTemplatesRefs, transformRefs, - transforms, + transforms: sortedTransforms, destinationIndexTemplates, transformsSpecifications, + aliasesRefs, + transformsToRemove, + transformsToRemoveWithDestIndex, }; }; @@ -239,21 +376,60 @@ const installTransformsAssets = async ( let installedTransforms: EsAssetReference[] = []; if (transformPaths.length > 0) { const { + indicesToAddRefs, indexTemplatesRefs, componentTemplatesRefs, transformRefs, transforms, destinationIndexTemplates, transformsSpecifications, - } = processTransformAssetsPerModule(installablePackage, installNameSuffix, transformPaths); + aliasesRefs, + transformsToRemove, + transformsToRemoveWithDestIndex, + } = processTransformAssetsPerModule( + installablePackage, + installNameSuffix, + transformPaths, + previousInstalledTransformEsAssets + ); + + // ensure the .latest alias points to only the latest + // by removing any associate of old destination indices + await Promise.all( + aliasesRefs + .filter((a) => a.endsWith(TRANSFORM_DEST_IDX_ALIAS_LATEST_SFX)) + .map((alias) => deleteAliasFromIndices({ esClient, logger, alias })) + ); + + // delete all previous transform + await Promise.all([ + deleteTransforms( + esClient, + transformsToRemoveWithDestIndex.map((asset) => asset.id), + // Delete destination indices if specified or if from old json schema + true + ), + deleteTransforms( + esClient, + transformsToRemove.map((asset) => asset.id), + // Else, keep destination indices by default + false + ), + ]); + // get and save refs associated with the transforms before installing esReferences = await updateEsAssetReferences( savedObjectsClient, installablePackage.name, esReferences, { - assetsToAdd: [...indexTemplatesRefs, ...componentTemplatesRefs, ...transformRefs], - assetsToRemove: previousInstalledTransformEsAssets, + assetsToAdd: [ + ...indicesToAddRefs, + ...indexTemplatesRefs, + ...componentTemplatesRefs, + ...transformRefs, + ], + assetsToRemove: [...transformsToRemove, ...transformsToRemoveWithDestIndex], } ); @@ -261,10 +437,15 @@ const installTransformsAssets = async ( await Promise.all( destinationIndexTemplates .map((destinationIndexTemplate) => { - const customMappings = - transformsSpecifications - .get(destinationIndexTemplate.transformModuleId) - ?.get('mappings') ?? {}; + const transformSpec = transformsSpecifications.get( + destinationIndexTemplate.transformModuleId + ); + const customMappings = transformSpec?.get('mappings') ?? {}; + const pipelineId = transformSpec?.get('destinationIndex')?.pipeline; + const transformVersionChanged = transformSpec?.get('transformVersionChanged') ?? true; + + if (!transformVersionChanged) return; + const registryElasticsearch: RegistryElasticsearch = { 'index_template.settings': destinationIndexTemplate.template.settings, 'index_template.mappings': destinationIndexTemplate.template.mappings, @@ -275,7 +456,11 @@ const installTransformsAssets = async ( templateName: destinationIndexTemplate.installationName, registryElasticsearch, packageName: installablePackage.name, - defaultSettings: {}, + defaultSettings: { + // Adding destination pipeline here because else these templates will be overridden + // by index setting + ...(pipelineId ? { default_pipeline: pipelineId } : {}), + }, }); if (destinationIndexTemplate || customMappings) { @@ -285,10 +470,12 @@ const installTransformsAssets = async ( componentTemplates, indexTemplate: { templateName: destinationIndexTemplate.installationName, - // @ts-expect-error We don't need to pass data_stream property here - // as this template is applied to only an index and not a data stream + // @ts-expect-error data_stream property is not needed here indexTemplate: { - template: { settings: undefined, mappings: undefined }, + template: { + settings: undefined, + mappings: undefined, + }, priority: DEFAULT_TRANSFORM_TEMPLATES_PRIORITY, index_patterns: [ transformsSpecifications @@ -309,37 +496,81 @@ const installTransformsAssets = async ( await Promise.all( transforms.map(async (transform) => { const index = transform.content.dest.index; - const pipelineId = transform.content.dest.pipeline; + const aliases = transformsSpecifications + .get(transform.transformModuleId) + ?.get('destinationIndexAlias'); try { - await retryTransientEsErrors( + const resp = await retryTransientEsErrors( () => esClient.indices.create( { index, - ...(pipelineId ? { settings: { default_pipeline: pipelineId } } : {}), + aliases, }, { ignore: [400] } ), { logger } ); + logger.debug(`Created destination index: ${index}`); + + // If index already exists, we still need to update the destination index alias + // to point '{destinationIndexName}.latest' to the versioned index + // @ts-ignore status is a valid field of resp + if (resp.status === 400 && aliases) { + await retryTransientEsErrors( + () => + esClient.indices.updateAliases({ + body: { + actions: Object.keys(aliases).map((alias) => ({ add: { index, alias } })), + }, + }), + { logger } + ); + logger.debug(`Created aliases for destination index: ${index}`); + } } catch (err) { + logger.error( + `Error creating destination index: ${JSON.stringify({ + index, + aliases: transformsSpecifications + .get(transform.transformModuleId) + ?.get('destinationIndexAlias'), + })} with error ${err}` + ); + throw new Error(err.message); } }) ); - // create & optionally start transforms - const transformsPromises = transforms.map(async (transform) => { - return handleTransformInstall({ - esClient, - logger, - transform, - startTransform: transformsSpecifications.get(transform.transformModuleId)?.get('start'), + // If the transforms have specific installation order, install & optionally start transforms sequentially + const shouldInstallSequentially = + uniqBy(transforms, 'installationOrder').length === transforms.length; + + if (shouldInstallSequentially) { + for (const transform of transforms) { + const installTransform = await handleTransformInstall({ + esClient, + logger, + transform, + startTransform: transformsSpecifications.get(transform.transformModuleId)?.get('start'), + }); + installedTransforms.push(installTransform); + } + } else { + // Else, create & start all the transforms at once for speed + const transformsPromises = transforms.map(async (transform) => { + return handleTransformInstall({ + esClient, + logger, + transform, + startTransform: transformsSpecifications.get(transform.transformModuleId)?.get('start'), + }); }); - }); - installedTransforms = await Promise.all(transformsPromises).then((results) => results.flat()); + installedTransforms = await Promise.all(transformsPromises).then((results) => results.flat()); + } } return { installedTransforms, esReferences }; @@ -364,7 +595,7 @@ export const installTransforms = async ( previousInstalledTransformEsAssets = installation.installed_es.filter( ({ type, id }) => type === ElasticsearchAssetType.transform ); - if (previousInstalledTransformEsAssets.length) { + if (previousInstalledTransformEsAssets.length > 0) { logger.debug( `Found previous transform references:\n ${JSON.stringify( previousInstalledTransformEsAssets @@ -373,12 +604,6 @@ export const installTransforms = async ( } } - // delete all previous transform - await deleteTransforms( - esClient, - previousInstalledTransformEsAssets.map((asset) => asset.id) - ); - const installNameSuffix = `${installablePackage.version}`; // If package contains legacy transform specifications (i.e. with json instead of yml) @@ -412,6 +637,36 @@ export const isTransform = (path: string) => { return !path.endsWith('/') && pathParts.type === ElasticsearchAssetType.transform; }; +async function deleteAliasFromIndices({ + esClient, + logger, + alias, +}: { + esClient: ElasticsearchClient; + logger: Logger; + alias: string; +}) { + try { + const resp = await esClient.indices.getAlias({ name: alias }); + const indicesMatchingAlias = Object.keys(resp); + logger.debug(`Deleting alias: '${alias}' matching indices ${indicesMatchingAlias}`); + + if (indicesMatchingAlias.length > 0) { + await retryTransientEsErrors( + () => + // defer validation on put if the source index is not available + esClient.indices.deleteAlias( + { index: indicesMatchingAlias, name: alias }, + { ignore: [404] } + ), + { logger } + ); + logger.debug(`Deleted alias: '${alias}' matching indices ${indicesMatchingAlias}`); + } + } catch (err) { + logger.error(`Error deleting alias: ${alias}`); + } +} async function handleTransformInstall({ esClient, logger, @@ -434,6 +689,7 @@ async function handleTransformInstall({ }), { logger } ); + logger.debug(`Created transform: ${transform.installationName}`); } catch (err) { // swallow the error if the transform already exists. const isAlreadyExistError = @@ -460,12 +716,12 @@ async function handleTransformInstall({ const getLegacyTransformNameForInstallation = ( installablePackage: InstallablePackage, path: string, - suffix: string + suffix?: string ) => { const pathPaths = path.split('/'); const filename = pathPaths?.pop()?.split('.')[0]; const folderName = pathPaths?.pop(); - return `${installablePackage.name}.${folderName}-${filename}-${suffix}`; + return `${installablePackage.name}.${folderName}-${filename}${suffix ? '-' + suffix : ''}`; }; const getTransformAssetNameForInstallation = ( diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.ts index f10eddd3d5e65..77996674f402e 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.ts @@ -21,7 +21,11 @@ export const stopTransforms = async (transformIds: string[], esClient: Elasticse } }; -export const deleteTransforms = async (esClient: ElasticsearchClient, transformIds: string[]) => { +export const deleteTransforms = async ( + esClient: ElasticsearchClient, + transformIds: string[], + deleteDestinationIndices = false +) => { const logger = appContextService.getLogger(); if (transformIds.length) { logger.info(`Deleting currently installed transform ids ${transformIds}`); @@ -40,7 +44,7 @@ export const deleteTransforms = async (esClient: ElasticsearchClient, transformI { ignore: [404] } ); logger.info(`Deleted: ${transformId}`); - if (transformResponse?.transforms) { + if (deleteDestinationIndices && transformResponse?.transforms) { // expect this to be 1 for (const transform of transformResponse.transforms) { await esClient.transport.request( diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transforms.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transforms.test.ts index aeeeb59e12b38..77537f200628d 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transforms.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transforms.test.ts @@ -42,7 +42,10 @@ describe('test transform install', () => { let esClient: ReturnType; let savedObjectsClient: jest.Mocked; - const getYamlTestData = (autoStart: boolean | undefined = undefined) => { + const getYamlTestData = ( + autoStart: boolean | undefined = undefined, + transformVersion: string = '0.1.0' + ) => { const start = autoStart === undefined ? '' @@ -93,6 +96,7 @@ pivot: field: agent.id description: Merges latest endpoint and Agent metadata documents. _meta: + fleet_transform_version: ${transformVersion} managed: true`, FIELDS: `- name: '@timestamp' type: date @@ -101,15 +105,15 @@ _meta: path: event.ingested`, }; }; - const getExpectedData = () => { + const getExpectedData = (transformVersion: string) => { return { TRANSFORM: { - transform_id: 'logs-endpoint.metadata_current-default-0.16.0-dev.0', + transform_id: `logs-endpoint.metadata_current-default-${transformVersion}`, defer_validation: true, body: { description: 'Merges latest endpoint and Agent metadata documents.', dest: { - index: '.metrics-endpoint.metadata_united_default', + index: '.metrics-endpoint.metadata_united_default-0.16.0-dev.0', }, frequency: '1s', pivot: { @@ -141,7 +145,7 @@ _meta: field: 'updated_at', }, }, - _meta: meta, + _meta: { fleet_transform_version: transformVersion, ...meta }, }, }, }; @@ -165,9 +169,10 @@ _meta: jest.clearAllMocks(); }); - test('can install new versions and removes older version when start is not defined', async () => { - const sourceData = getYamlTestData(); - const expectedData = getExpectedData(); + test('can install new versions and removes older version when fleet_transform_version increased', async () => { + // Old fleet_transform_version is 0.1.0, fleet_transform_version to be installed is 0.1.0 + const sourceData = getYamlTestData(undefined, '0.2.0'); + const expectedData = getExpectedData('0.2.0'); const previousInstallation: Installation = { installed_es: [ @@ -176,7 +181,7 @@ _meta: type: ElasticsearchAssetType.ingestPipeline, }, { - id: 'endpoint.metadata_current-default-0.15.0-dev.0', + id: 'logs-endpoint.metadata_current-default-0.1.0', type: ElasticsearchAssetType.transform, }, ], @@ -189,20 +194,17 @@ _meta: type: ElasticsearchAssetType.ingestPipeline, }, { - id: 'endpoint.metadata_current-default-0.15.0-dev.0', + id: 'logs-endpoint.metadata_current-default-0.2.0', type: ElasticsearchAssetType.transform, }, { - id: 'endpoint.metadata_current-default-0.16.0-dev.0', - type: ElasticsearchAssetType.transform, - }, - { - id: 'endpoint.metadata-default-0.16.0-dev.0', + id: 'logs-endpoint.metadata_current-default-0.2.0', type: ElasticsearchAssetType.transform, }, ], } as unknown as Installation; (getAsset as jest.MockedFunction) + .mockReturnValueOnce(Buffer.from(sourceData.FIELDS, 'utf8')) .mockReturnValueOnce(Buffer.from(sourceData.MANIFEST, 'utf8')) .mockReturnValueOnce(Buffer.from(sourceData.TRANSFORM, 'utf8')); @@ -239,6 +241,7 @@ _meta: version: '0.16.0-dev.0', } as unknown as RegistryPackage, [ + 'endpoint-0.16.0-dev.0/elasticsearch/transform/metadata_current/fields/fields.yml', 'endpoint-0.16.0-dev.0/elasticsearch/transform/metadata_current/manifest.yml', 'endpoint-0.16.0-dev.0/elasticsearch/transform/metadata_current/transform.yml', ], @@ -248,19 +251,11 @@ _meta: previousInstallation.installed_es ); - expect(esClient.transform.getTransform.mock.calls).toEqual([ - [ - { - transform_id: 'endpoint.metadata_current-default-0.15.0-dev.0', - }, - { ignore: [404] }, - ], - ]); // Stop and delete previously installed transforms expect(esClient.transform.stopTransform.mock.calls).toEqual([ [ { - transform_id: 'endpoint.metadata_current-default-0.15.0-dev.0', + transform_id: 'logs-endpoint.metadata_current-default-0.1.0', force: true, }, { ignore: [404] }, @@ -269,70 +264,62 @@ _meta: expect(esClient.transform.deleteTransform.mock.calls).toEqual([ [ { - transform_id: 'endpoint.metadata_current-default-0.15.0-dev.0', + transform_id: 'logs-endpoint.metadata_current-default-0.1.0', force: true, }, { ignore: [404] }, ], ]); - // Delete destination index - expect(esClient.transport.request.mock.calls).toEqual([ - [ - { - method: 'DELETE', - path: '/mock-old-destination-index', - }, - { ignore: [404] }, - ], - ]); + // Destination index should not be deleted when transform is deleted + expect(esClient.transport.request.mock.calls).toEqual([]); // Create a @package component template and an empty @custom component template expect(esClient.cluster.putComponentTemplate.mock.calls).toEqual([ [ { + name: 'logs-endpoint.metadata_current-template@package', body: { - _meta: meta, template: { + settings: { + index: { + codec: 'best_compression', + refresh_interval: '5s', + number_of_shards: 1, + number_of_routing_shards: 30, + hidden: true, + mapping: { total_fields: { limit: '10000' } }, + }, + }, mappings: { - _meta: {}, - date_detection: false, - dynamic: false, + properties: { '@timestamp': { type: 'date' } }, dynamic_templates: [ { strings_as_keyword: { - mapping: { ignore_above: 1024, type: 'keyword' }, match_mapping_type: 'string', + mapping: { ignore_above: 1024, type: 'keyword' }, }, }, ], - properties: {}, - }, - settings: { - index: { - codec: 'best_compression', - hidden: true, - mapping: { total_fields: { limit: '10000' } }, - number_of_routing_shards: 30, - number_of_shards: 1, - refresh_interval: '5s', - }, + dynamic: false, + _meta: {}, + date_detection: false, }, }, + _meta: { managed_by: 'fleet', managed: true, package: { name: 'endpoint' } }, }, create: false, - name: 'logs-endpoint.metadata_current-template@package', }, { ignore: [404] }, ], [ { + name: 'logs-endpoint.metadata_current-template@custom', body: { - _meta: meta, template: { settings: {} }, + _meta: { managed_by: 'fleet', managed: true, package: { name: 'endpoint' } }, }, create: true, - name: 'logs-endpoint.metadata_current-template@custom', }, { ignore: [404] }, ], @@ -349,7 +336,7 @@ _meta: 'logs-endpoint.metadata_current-template@package', 'logs-endpoint.metadata_current-template@custom', ], - index_patterns: ['.metrics-endpoint.metadata_united_default'], + index_patterns: ['.metrics-endpoint.metadata_united_default-0.16.0-dev.0'], priority: 250, template: { mappings: undefined, settings: undefined }, }, @@ -361,14 +348,23 @@ _meta: // Destination index is created before transform is created expect(esClient.indices.create.mock.calls).toEqual([ - [{ index: '.metrics-endpoint.metadata_united_default' }, { ignore: [400] }], + [ + { + aliases: { + '.metrics-endpoint.metadata_united_default.all': {}, + '.metrics-endpoint.metadata_united_default.latest': {}, + }, + index: '.metrics-endpoint.metadata_united_default-0.16.0-dev.0', + }, + { ignore: [400] }, + ], ]); expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); expect(esClient.transform.startTransform.mock.calls).toEqual([ [ { - transform_id: 'logs-endpoint.metadata_current-default-0.16.0-dev.0', + transform_id: 'logs-endpoint.metadata_current-default-0.2.0', }, { ignore: [409] }, ], @@ -385,21 +381,29 @@ _meta: id: 'metrics-endpoint.policy-0.16.0-dev.0', type: ElasticsearchAssetType.ingestPipeline, }, + { + id: '.metrics-endpoint.metadata_united_default-0.16.0-dev.0', + type: ElasticsearchAssetType.index, + }, { id: 'logs-endpoint.metadata_current-template', type: ElasticsearchAssetType.indexTemplate, + version: '0.2.0', }, { id: 'logs-endpoint.metadata_current-template@custom', type: ElasticsearchAssetType.componentTemplate, + version: '0.2.0', }, { id: 'logs-endpoint.metadata_current-template@package', type: ElasticsearchAssetType.componentTemplate, + version: '0.2.0', }, { - id: 'logs-endpoint.metadata_current-default-0.16.0-dev.0', + id: 'logs-endpoint.metadata_current-default-0.2.0', type: ElasticsearchAssetType.transform, + version: '0.2.0', }, ], }, @@ -410,104 +414,39 @@ _meta: ]); }); - test('can install new version when no older version', async () => { - const sourceData = getYamlTestData(true); - const expectedData = getExpectedData(); + test('can install new versions and removes older version when upgraded from old json schema to new yml schema', async () => { + const sourceData = getYamlTestData(undefined, '0.2.0'); + const expectedData = getExpectedData('0.2.0'); const previousInstallation: Installation = { - installed_es: [], - } as unknown as Installation; - - const currentInstallation: Installation = { installed_es: [ { - id: 'metrics-endpoint.metadata-current-default-0.16.0-dev.0', - type: ElasticsearchAssetType.transform, - }, - ], - } as unknown as Installation; - (getAsset as jest.MockedFunction).mockReturnValueOnce( - Buffer.from(sourceData.TRANSFORM, 'utf8') - ); - (getInstallation as jest.MockedFunction) - .mockReturnValueOnce(Promise.resolve(previousInstallation)) - .mockReturnValueOnce(Promise.resolve(currentInstallation)); - - ( - getInstallationObject as jest.MockedFunction - ).mockReturnValueOnce( - Promise.resolve({ - attributes: { installed_es: [] }, - } as unknown as SavedObject) - ); - - await installTransforms( - { - name: 'endpoint', - version: '0.16.0-dev.0', - } as unknown as RegistryPackage, - ['endpoint-0.16.0-dev.0/elasticsearch/transform/metadata_current/transform.yml'], - esClient, - savedObjectsClient, - loggerMock.create(), - previousInstallation.installed_es - ); - - expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); - expect(esClient.transform.startTransform.mock.calls).toEqual([ - [ - { - transform_id: 'logs-endpoint.metadata_current-default-0.16.0-dev.0', - }, - { ignore: [409] }, - ], - ]); - - expect(savedObjectsClient.update.mock.calls).toEqual([ - [ - 'epm-packages', - 'endpoint', - { - installed_es: [ - { id: 'logs-endpoint.metadata_current-default-0.16.0-dev.0', type: 'transform' }, - ], + id: 'metrics-endpoint.policy-0.1.0-dev.0', + type: ElasticsearchAssetType.ingestPipeline, }, { - refresh: false, + id: 'endpoint.metadata_current-default-0.1.0', + type: ElasticsearchAssetType.transform, }, ], - ]); - }); - - test('can combine settings fields.yml & manifest.yml and not start transform automatically', async () => { - const sourceData = getYamlTestData(false); - const expectedData = getExpectedData(); + } as unknown as Installation; - const previousInstallation: Installation = { + const currentInstallation: Installation = { installed_es: [ { - id: 'endpoint.metadata-current-default-0.15.0-dev.0', - type: ElasticsearchAssetType.transform, - }, - { - id: 'logs-endpoint.metadata_current-template', - type: ElasticsearchAssetType.indexTemplate, + id: 'metrics-endpoint.policy-0.16.0-dev.0', + type: ElasticsearchAssetType.ingestPipeline, }, { - id: 'logs-endpoint.metadata_current-template@custom', - type: ElasticsearchAssetType.componentTemplate, + id: 'logs-endpoint.metadata_current-default-0.2.0', + type: ElasticsearchAssetType.transform, }, { - id: 'logs-endpoint.metadata_current-template@package', - type: ElasticsearchAssetType.componentTemplate, + id: 'logs-endpoint.metadata_current-default-0.2.0', + type: ElasticsearchAssetType.transform, }, ], } as unknown as Installation; - - const currentInstallation: Installation = { - installed_es: [], - } as unknown as Installation; - (getAsset as jest.MockedFunction) .mockReturnValueOnce(Buffer.from(sourceData.FIELDS, 'utf8')) .mockReturnValueOnce(Buffer.from(sourceData.MANIFEST, 'utf8')) @@ -521,10 +460,13 @@ _meta: getInstallationObject as jest.MockedFunction ).mockReturnValueOnce( Promise.resolve({ - attributes: { installed_es: currentInstallation.installed_es }, + attributes: { + installed_es: previousInstallation.installed_es, + }, } as unknown as SavedObject) ); + // Mock transform from old version esClient.transform.getTransform.mockResponseOnce({ count: 1, transforms: [ @@ -553,43 +495,38 @@ _meta: previousInstallation.installed_es ); - expect(esClient.transform.getTransform.mock.calls).toEqual([ + // Stop and delete previously installed transforms + expect(esClient.transform.stopTransform.mock.calls).toEqual([ [ { - transform_id: 'endpoint.metadata-current-default-0.15.0-dev.0', + transform_id: 'endpoint.metadata_current-default-0.1.0', + force: true, }, { ignore: [404] }, ], ]); - - // Transform from old version is stopped & deleted - expect(esClient.transform.stopTransform.mock.calls).toEqual([ + expect(esClient.transform.deleteTransform.mock.calls).toEqual([ [ { - transform_id: 'endpoint.metadata-current-default-0.15.0-dev.0', + transform_id: 'endpoint.metadata_current-default-0.1.0', force: true, }, { ignore: [404] }, ], ]); - expect(esClient.transform.deleteTransform.mock.calls).toEqual([ + // Destination index from previous version using legacy schema should be deleted + expect(esClient.transport.request.mock.calls).toEqual([ [ { - transform_id: 'endpoint.metadata-current-default-0.15.0-dev.0', - force: true, + method: 'DELETE', + path: '/mock-old-destination-index', }, { ignore: [404] }, ], ]); - // Destination index from old version is also deleted - expect(esClient.transport.request.mock.calls).toEqual([ - [{ method: 'DELETE', path: '/mock-old-destination-index' }, { ignore: [404] }], - ]); - - // Component templates are created with mappings from fields.yml - // and template from manifest + // Create a @package component template and an empty @custom component template expect(esClient.cluster.putComponentTemplate.mock.calls).toEqual([ [ { @@ -621,7 +558,7 @@ _meta: date_detection: false, }, }, - _meta: meta, + _meta: { managed_by: 'fleet', managed: true, package: { name: 'endpoint' } }, }, create: false, }, @@ -632,13 +569,14 @@ _meta: name: 'logs-endpoint.metadata_current-template@custom', body: { template: { settings: {} }, - _meta: meta, + _meta: { managed_by: 'fleet', managed: true, package: { name: 'endpoint' } }, }, create: true, }, { ignore: [404] }, ], ]); + // Index template composed of the two component templates created // with index pattern matching the destination index expect(esClient.indices.putIndexTemplate.mock.calls).toEqual([ @@ -650,7 +588,7 @@ _meta: 'logs-endpoint.metadata_current-template@package', 'logs-endpoint.metadata_current-template@custom', ], - index_patterns: ['.metrics-endpoint.metadata_united_default'], + index_patterns: ['.metrics-endpoint.metadata_united_default-0.16.0-dev.0'], priority: 250, template: { mappings: undefined, settings: undefined }, }, @@ -662,11 +600,557 @@ _meta: // Destination index is created before transform is created expect(esClient.indices.create.mock.calls).toEqual([ - [{ index: '.metrics-endpoint.metadata_united_default' }, { ignore: [400] }], + [ + { + aliases: { + '.metrics-endpoint.metadata_united_default.all': {}, + '.metrics-endpoint.metadata_united_default.latest': {}, + }, + index: '.metrics-endpoint.metadata_united_default-0.16.0-dev.0', + }, + { ignore: [400] }, + ], ]); - // New transform created but not not started automatically if start: false in manifest.yml expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); + expect(esClient.transform.startTransform.mock.calls).toEqual([ + [ + { + transform_id: 'logs-endpoint.metadata_current-default-0.2.0', + }, + { ignore: [409] }, + ], + ]); + + // Saved object is updated with newly created index templates, component templates, transform + expect(savedObjectsClient.update.mock.calls).toEqual([ + [ + 'epm-packages', + 'endpoint', + { + installed_es: [ + { + id: 'metrics-endpoint.policy-0.1.0-dev.0', + type: ElasticsearchAssetType.ingestPipeline, + }, + { + id: '.metrics-endpoint.metadata_united_default-0.16.0-dev.0', + type: ElasticsearchAssetType.index, + }, + { + id: 'logs-endpoint.metadata_current-template', + type: ElasticsearchAssetType.indexTemplate, + version: '0.2.0', + }, + { + id: 'logs-endpoint.metadata_current-template@custom', + type: ElasticsearchAssetType.componentTemplate, + version: '0.2.0', + }, + { + id: 'logs-endpoint.metadata_current-template@package', + type: ElasticsearchAssetType.componentTemplate, + version: '0.2.0', + }, + { + id: 'logs-endpoint.metadata_current-default-0.2.0', + type: ElasticsearchAssetType.transform, + version: '0.2.0', + }, + ], + }, + { + refresh: false, + }, + ], + ]); + }); + + test('creates index and component templates even if no manifest.yml', async () => { + // Old fleet_transform_version is 0.1.0, fleet_transform_version to be installed is 0.1.0 + const sourceData = getYamlTestData(false, '0.2.0'); + const expectedData = getExpectedData('0.2.0'); + + const previousInstallation: Installation = { + installed_es: [ + { + id: 'metrics-endpoint.policy-0.16.0-dev.0', + type: ElasticsearchAssetType.ingestPipeline, + }, + { + id: 'logs-endpoint.metadata_current-default-0.1.0', + type: ElasticsearchAssetType.transform, + }, + ], + } as unknown as Installation; + + const currentInstallation: Installation = { + installed_es: [ + { + id: 'metrics-endpoint.policy-0.16.0-dev.0', + type: ElasticsearchAssetType.ingestPipeline, + }, + { + id: 'logs-endpoint.metadata_current-default-0.2.0', + type: ElasticsearchAssetType.transform, + }, + { + id: 'logs-endpoint.metadata_current-default-0.2.0', + type: ElasticsearchAssetType.transform, + }, + ], + } as unknown as Installation; + (getAsset as jest.MockedFunction) + .mockReturnValueOnce(Buffer.from(sourceData.FIELDS, 'utf8')) + .mockReturnValueOnce(Buffer.from(sourceData.TRANSFORM, 'utf8')); + + (getInstallation as jest.MockedFunction) + .mockReturnValueOnce(Promise.resolve(previousInstallation)) + .mockReturnValueOnce(Promise.resolve(currentInstallation)); + + ( + getInstallationObject as jest.MockedFunction + ).mockReturnValueOnce( + Promise.resolve({ + attributes: { + installed_es: previousInstallation.installed_es, + }, + } as unknown as SavedObject) + ); + + // Mock transform from old version + esClient.transform.getTransform.mockResponseOnce({ + count: 1, + transforms: [ + // @ts-expect-error incomplete data + { + dest: { + index: 'mock-old-destination-index', + }, + }, + ], + }); + + await installTransforms( + { + name: 'endpoint', + version: '0.16.0-dev.0', + } as unknown as RegistryPackage, + [ + 'endpoint-0.16.0-dev.0/elasticsearch/transform/metadata_current/fields/fields.yml', + 'endpoint-0.16.0-dev.0/elasticsearch/transform/metadata_current/transform.yml', + ], + esClient, + savedObjectsClient, + loggerMock.create(), + previousInstallation.installed_es + ); + + // Stop and delete previously installed transforms + expect(esClient.transform.stopTransform.mock.calls).toEqual([ + [ + { + transform_id: 'logs-endpoint.metadata_current-default-0.1.0', + force: true, + }, + { ignore: [404] }, + ], + ]); + expect(esClient.transform.deleteTransform.mock.calls).toEqual([ + [ + { + transform_id: 'logs-endpoint.metadata_current-default-0.1.0', + force: true, + }, + { ignore: [404] }, + ], + ]); + + // Destination index should not be deleted when transform is deleted + expect(esClient.transport.request.mock.calls).toEqual([]); + + // Create a @package component template and an empty @custom component template + expect(esClient.cluster.putComponentTemplate.mock.calls).toEqual([ + [ + { + name: 'logs-endpoint.metadata_current-template@package', + body: { + template: { + settings: { index: { mapping: { total_fields: { limit: '10000' } } } }, + mappings: { properties: { '@timestamp': { type: 'date' } } }, + }, + _meta: meta, + }, + create: false, + }, + { ignore: [404] }, + ], + [ + { + name: 'logs-endpoint.metadata_current-template@custom', + body: { + template: { settings: {} }, + _meta: { managed_by: 'fleet', managed: true, package: { name: 'endpoint' } }, + }, + create: true, + }, + { ignore: [404] }, + ], + ]); + + // Index template composed of the two component templates created + // with index pattern matching the destination index + expect(esClient.indices.putIndexTemplate.mock.calls).toEqual([ + [ + { + body: { + _meta: meta, + composed_of: [ + 'logs-endpoint.metadata_current-template@package', + 'logs-endpoint.metadata_current-template@custom', + ], + index_patterns: ['.metrics-endpoint.metadata_united_default-0.16.0-dev.0'], + priority: 250, + template: { mappings: undefined, settings: undefined }, + }, + name: 'logs-endpoint.metadata_current-template', + }, + { ignore: [404] }, + ], + ]); + + // Destination index is created before transform is created + expect(esClient.indices.create.mock.calls).toEqual([ + [ + { + aliases: { + '.metrics-endpoint.metadata_united_default.all': {}, + '.metrics-endpoint.metadata_united_default.latest': {}, + }, + index: '.metrics-endpoint.metadata_united_default-0.16.0-dev.0', + }, + { ignore: [400] }, + ], + ]); + + expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); + expect(esClient.transform.startTransform.mock.calls).toEqual([ + [ + { + transform_id: 'logs-endpoint.metadata_current-default-0.2.0', + }, + { ignore: [409] }, + ], + ]); + + // Saved object is updated with newly created index templates, component templates, transform + expect(savedObjectsClient.update.mock.calls).toEqual([ + [ + 'epm-packages', + 'endpoint', + { + installed_es: [ + { + id: 'metrics-endpoint.policy-0.16.0-dev.0', + type: ElasticsearchAssetType.ingestPipeline, + }, + { + id: '.metrics-endpoint.metadata_united_default-0.16.0-dev.0', + type: ElasticsearchAssetType.index, + }, + { + id: 'logs-endpoint.metadata_current-template', + type: ElasticsearchAssetType.indexTemplate, + version: '0.2.0', + }, + { + id: 'logs-endpoint.metadata_current-template@custom', + type: ElasticsearchAssetType.componentTemplate, + version: '0.2.0', + }, + { + id: 'logs-endpoint.metadata_current-template@package', + type: ElasticsearchAssetType.componentTemplate, + version: '0.2.0', + }, + { + id: 'logs-endpoint.metadata_current-default-0.2.0', + type: ElasticsearchAssetType.transform, + version: '0.2.0', + }, + ], + }, + { + refresh: false, + }, + ], + ]); + }); + + test('can install new version when an older version does not exist', async () => { + const sourceData = getYamlTestData(false, '0.2.0'); + const expectedData = getExpectedData('0.2.0'); + + const previousInstallation: Installation = { + installed_es: [], + } as unknown as Installation; + + const currentInstallation: Installation = { + installed_es: [ + { + id: `logs-endpoint.metadata_current-default-0.2.0`, + type: ElasticsearchAssetType.transform, + }, + ], + } as unknown as Installation; + (getAsset as jest.MockedFunction) + .mockReturnValueOnce(Buffer.from(sourceData.MANIFEST, 'utf8')) + .mockReturnValueOnce(Buffer.from(sourceData.TRANSFORM, 'utf8')); + + (getInstallation as jest.MockedFunction) + .mockReturnValueOnce(Promise.resolve(previousInstallation)) + .mockReturnValueOnce(Promise.resolve(currentInstallation)); + + ( + getInstallationObject as jest.MockedFunction + ).mockReturnValueOnce( + Promise.resolve({ + attributes: { installed_es: [] }, + } as unknown as SavedObject) + ); + + await installTransforms( + { + name: 'endpoint', + version: '0.16.0-dev.0', + } as unknown as RegistryPackage, + [ + 'endpoint-0.16.0-dev.0/elasticsearch/transform/metadata_current/manifest.yml', + 'endpoint-0.16.0-dev.0/elasticsearch/transform/metadata_current/transform.yml', + ], + esClient, + savedObjectsClient, + loggerMock.create(), + previousInstallation.installed_es + ); + + expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); + // Does not start transform because start is set to false in manifest.yml + expect(esClient.transform.startTransform.mock.calls).toEqual([]); + }); + + test('can downgrade to older version when force: true', async () => { + const sourceData = getYamlTestData(false, '0.1.0'); + const expectedData = getExpectedData('0.1.0'); + + const previousInstallation: Installation = { + installed_es: [ + { + id: `logs-endpoint.metadata_current-default-0.2.0`, + type: ElasticsearchAssetType.transform, + }, + { + id: 'logs-endpoint.metadata_current-template', + type: ElasticsearchAssetType.indexTemplate, + }, + { + id: 'logs-endpoint.metadata_current-template@custom', + type: ElasticsearchAssetType.componentTemplate, + }, + { + id: 'logs-endpoint.metadata_current-template@package', + type: ElasticsearchAssetType.componentTemplate, + }, + ], + } as unknown as Installation; + + const currentInstallation: Installation = { + installed_es: [ + { + id: `logs-endpoint.metadata_current-default-0.1.0`, + type: ElasticsearchAssetType.transform, + }, + { + id: 'logs-endpoint.metadata_current-template', + type: ElasticsearchAssetType.indexTemplate, + }, + { + id: 'logs-endpoint.metadata_current-template@custom', + type: ElasticsearchAssetType.componentTemplate, + }, + { + id: 'logs-endpoint.metadata_current-template@package', + type: ElasticsearchAssetType.componentTemplate, + }, + ], + } as unknown as Installation; + (getAsset as jest.MockedFunction) + .mockReturnValueOnce(Buffer.from(sourceData.MANIFEST, 'utf8')) + .mockReturnValueOnce(Buffer.from(sourceData.TRANSFORM, 'utf8')); + + (getInstallation as jest.MockedFunction) + .mockReturnValueOnce(Promise.resolve(previousInstallation)) + .mockReturnValueOnce(Promise.resolve(currentInstallation)); + + ( + getInstallationObject as jest.MockedFunction + ).mockReturnValueOnce( + Promise.resolve({ + attributes: { installed_es: [] }, + } as unknown as SavedObject) + ); + + // Mock resp for when index from older version already exists + esClient.indices.create.mockReturnValueOnce( + // @ts-expect-error mock error instead of successful IndicesCreateResponse + Promise.resolve({ + error: { + type: 'resource_already_exists_exception', + }, + status: 400, + }) + ); + + await installTransforms( + { + name: 'endpoint', + version: '0.16.0-dev.0', + } as unknown as RegistryPackage, + [ + 'endpoint-0.16.0-dev.0/elasticsearch/transform/metadata_current/manifest.yml', + 'endpoint-0.16.0-dev.0/elasticsearch/transform/metadata_current/transform.yml', + ], + esClient, + savedObjectsClient, + loggerMock.create(), + previousInstallation.installed_es + ); + + expect(esClient.indices.create.mock.calls).toEqual([ + [ + { + index: '.metrics-endpoint.metadata_united_default-0.16.0-dev.0', + aliases: { + '.metrics-endpoint.metadata_united_default.all': {}, + '.metrics-endpoint.metadata_united_default.latest': {}, + }, + }, + { ignore: [400] }, + ], + ]); + + // If downgrading to and older version, and destination index already exists + // aliases should still be updated to point .latest to this index + expect(esClient.indices.updateAliases.mock.calls).toEqual([ + [ + { + body: { + actions: [ + { + add: { + index: '.metrics-endpoint.metadata_united_default-0.16.0-dev.0', + alias: '.metrics-endpoint.metadata_united_default.all', + }, + }, + { + add: { + index: '.metrics-endpoint.metadata_united_default-0.16.0-dev.0', + alias: '.metrics-endpoint.metadata_united_default.latest', + }, + }, + ], + }, + }, + ], + ]); + + expect(esClient.transform.deleteTransform.mock.calls).toEqual([ + [ + { force: true, transform_id: 'logs-endpoint.metadata_current-default-0.2.0' }, + { ignore: [404] }, + ], + ]); + expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); + }); + + test('retain old transforms and do nothing if fleet_transform_version is the same', async () => { + // Old fleet_transform_version is 0.1.0, fleet_transform_version to be installed is 0.1.0 + const sourceData = getYamlTestData(false, '0.1.0'); + + const previousInstallation: Installation = { + installed_es: [ + { + id: 'logs-endpoint.metadata_current-default-0.1.0', + type: ElasticsearchAssetType.transform, + }, + { + id: 'logs-endpoint.metadata_current-template', + type: ElasticsearchAssetType.indexTemplate, + }, + { + id: 'logs-endpoint.metadata_current-template@custom', + type: ElasticsearchAssetType.componentTemplate, + }, + { + id: 'logs-endpoint.metadata_current-template@package', + type: ElasticsearchAssetType.componentTemplate, + }, + ], + } as unknown as Installation; + + const currentInstallation: Installation = { + installed_es: [ + { + id: 'endpoint.metadata-current-default-0.1.0', + type: ElasticsearchAssetType.transform, + }, + ], + } as unknown as Installation; + + (getAsset as jest.MockedFunction) + .mockReturnValueOnce(Buffer.from(sourceData.FIELDS, 'utf8')) + .mockReturnValueOnce(Buffer.from(sourceData.MANIFEST, 'utf8')) + .mockReturnValueOnce(Buffer.from(sourceData.TRANSFORM, 'utf8')); + + (getInstallation as jest.MockedFunction) + .mockReturnValueOnce(Promise.resolve(previousInstallation)) + .mockReturnValueOnce(Promise.resolve(currentInstallation)); + + ( + getInstallationObject as jest.MockedFunction + ).mockReturnValueOnce( + Promise.resolve({ + attributes: { installed_es: currentInstallation.installed_es }, + } as unknown as SavedObject) + ); + + await installTransforms( + { + name: 'endpoint', + version: '0.16.0-dev.0', + } as unknown as RegistryPackage, + [ + 'endpoint-0.16.0-dev.0/elasticsearch/transform/metadata_current/fields/fields.yml', + 'endpoint-0.16.0-dev.0/elasticsearch/transform/metadata_current/manifest.yml', + 'endpoint-0.16.0-dev.0/elasticsearch/transform/metadata_current/transform.yml', + ], + esClient, + savedObjectsClient, + loggerMock.create(), + previousInstallation.installed_es + ); + + // Transform from old version is neither stopped nor deleted + expect(esClient.transform.stopTransform.mock.calls).toEqual([]); + expect(esClient.transform.deleteTransform.mock.calls).toEqual([]); + + // Destination index from old version is not deleted + expect(esClient.transport.request.mock.calls).toEqual([]); + + // No new destination index is created + expect(esClient.indices.create.mock.calls).toEqual([]); + // No new transform is created or started + expect(esClient.transform.putTransform.mock.calls).toEqual([]); expect(esClient.transform.startTransform.mock.calls).toEqual([]); }); }); diff --git a/x-pack/plugins/fleet/server/services/epm/packages/remove.ts b/x-pack/plugins/fleet/server/services/epm/packages/remove.ts index c994320ab829a..61780c7977166 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/remove.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/remove.ts @@ -17,6 +17,8 @@ import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common/constants'; import { SavedObjectsUtils, SavedObjectsErrorHelpers } from '@kbn/core/server'; +import { updateIndexSettings } from '../elasticsearch/index/update_settings'; + import { PACKAGE_POLICY_SAVED_OBJECT_TYPE, PACKAGES_SAVED_OBJECT_TYPE, @@ -143,7 +145,7 @@ function deleteESAssets( } else if (assetType === ElasticsearchAssetType.componentTemplate) { return deleteComponentTemplate(esClient, id); } else if (assetType === ElasticsearchAssetType.transform) { - return deleteTransforms(esClient, [id]); + return deleteTransforms(esClient, [id], true); } else if (assetType === ElasticsearchAssetType.dataStreamIlmPolicy) { return deleteIlms(esClient, [id]); } else if (assetType === ElasticsearchAssetType.ilmPolicy) { @@ -164,27 +166,35 @@ async function deleteAssets( esClient: ElasticsearchClient ) { const logger = appContextService.getLogger(); + // must unset default_pipelines settings in indices first, or pipelines associated with an index cannot not be deleted // must delete index templates first, or component templates which reference them cannot be deleted // must delete ingestPipelines first, or ml models referenced in them cannot be deleted. // separate the assets into Index Templates and other assets. - type Tuple = [EsAssetReference[], EsAssetReference[]]; - const [indexTemplatesAndPipelines, otherAssets] = installedEs.reduce( - ([indexAssetTypes, otherAssetTypes], asset) => { + type Tuple = [EsAssetReference[], EsAssetReference[], EsAssetReference[]]; + const [indexTemplatesAndPipelines, indexAssets, otherAssets] = installedEs.reduce( + ([indexTemplateAndPipelineTypes, indexAssetTypes, otherAssetTypes], asset) => { if ( asset.type === ElasticsearchAssetType.indexTemplate || asset.type === ElasticsearchAssetType.ingestPipeline ) { + indexTemplateAndPipelineTypes.push(asset); + } else if (asset.type === ElasticsearchAssetType.index) { indexAssetTypes.push(asset); } else { otherAssetTypes.push(asset); } - return [indexAssetTypes, otherAssetTypes]; + return [indexTemplateAndPipelineTypes, indexAssetTypes, otherAssetTypes]; }, - [[], []] + [[], [], []] ); try { + // must first unset any default pipeline associated with any existing indices + // by setting empty string + await Promise.all( + indexAssets.map((asset) => updateIndexSettings(esClient, asset.id, { default_pipeline: '' })) + ); // must delete index templates and pipelines first await Promise.all(deleteESAssets(indexTemplatesAndPipelines, esClient)); // then the other asset types From 57dad8fc079d75d52995448ab11ac874a12d96c8 Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Wed, 21 Dec 2022 18:12:54 +0100 Subject: [PATCH 27/36] Prevent future convertToMultiNamespaceType migrations (#147369) Addresses https://github.com/elastic/kibana/issues/147344 --- .../advanced/sharing-saved-objects.asciidoc | 3 +++ .../test_helpers/repository.test.common.ts | 2 ++ .../src/core/document_migrator.test.ts | 12 ++++------ .../src/core/document_migrator.ts | 24 +++++++------------ .../src/kibana_migrator.ts | 5 ++++ .../src/migration.ts | 1 + .../src/saved_objects_type.ts | 1 + 7 files changed, 25 insertions(+), 23 deletions(-) diff --git a/docs/developer/advanced/sharing-saved-objects.asciidoc b/docs/developer/advanced/sharing-saved-objects.asciidoc index 6121201bb07c5..b221dbc275dd0 100644 --- a/docs/developer/advanced/sharing-saved-objects.asciidoc +++ b/docs/developer/advanced/sharing-saved-objects.asciidoc @@ -4,6 +4,9 @@ This guide describes the "Sharing saved objects" effort, and the breaking changes that plugin developers need to be aware of for the planned 8.0 release of {kib}. It also describes how developers can take advantage of this feature. +From 8.7.0, as a step towards _zero downtime upgrades_, plugins are no longer allowed to update existing single space saved object types to become shareable. +Note that new saved object types can still be defined as `'multiple'` or `'multiple-isolated'`. + [[sharing-saved-objects-overview]] === Overview diff --git a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/test_helpers/repository.test.common.ts b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/test_helpers/repository.test.common.ts index 396686b735e2f..99b87279c8b62 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/test_helpers/repository.test.common.ts +++ b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/test_helpers/repository.test.common.ts @@ -97,6 +97,7 @@ export const expectErrorInvalidType = (obj: TypeIdTuple, overrides?: Record { return new DocumentMigrator({ typeRegistry: registry, kibanaVersion: KIBANA_VERSION, + convertVersion: ALLOWED_CONVERT_VERSION, log: loggerMock.create(), }); }; diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts index a0dd1cfddc3a4..f8d2948510531 100644 --- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts +++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts @@ -55,7 +55,6 @@ describe('DocumentMigrator', () => { return { kibanaVersion, typeRegistry: createRegistry(), - minimumConvertVersion: '0.0.0', // no minimum version unless we specify it for a test case log: mockLogger, }; } @@ -63,6 +62,7 @@ describe('DocumentMigrator', () => { describe('validation', () => { const createDefinition = (migrations: any) => ({ kibanaVersion: '3.2.3', + convertVersion: '8.0.0', typeRegistry: createRegistry({ name: 'foo', migrations: migrations as any, @@ -163,7 +163,6 @@ describe('DocumentMigrator', () => { name: 'foo', convertToMultiNamespaceTypeVersion: 'bar', }), - minimumConvertVersion: '0.0.0', log: mockLogger, }; expect(() => new DocumentMigrator(invalidDefinition)).toThrow( @@ -179,7 +178,6 @@ describe('DocumentMigrator', () => { convertToMultiNamespaceTypeVersion: 'bar', namespaceType: 'multiple', }), - minimumConvertVersion: '0.0.0', log: mockLogger, }; expect(() => new DocumentMigrator(invalidDefinition)).toThrow( @@ -187,7 +185,7 @@ describe('DocumentMigrator', () => { ); }); - it('validates convertToMultiNamespaceTypeVersion is not less than the minimum allowed version', () => { + it('validates convertToMultiNamespaceTypeVersion matches the convertVersion, if specified', () => { const invalidDefinition = { kibanaVersion: '3.2.3', typeRegistry: createRegistry({ @@ -195,11 +193,11 @@ describe('DocumentMigrator', () => { convertToMultiNamespaceTypeVersion: '3.2.4', namespaceType: 'multiple', }), - // not using a minimumConvertVersion parameter, the default is 8.0.0 + convertVersion: '3.2.3', log: mockLogger, }; expect(() => new DocumentMigrator(invalidDefinition)).toThrowError( - `Invalid convertToMultiNamespaceTypeVersion for type foo. Value '3.2.4' cannot be less than '8.0.0'.` + `Invalid convertToMultiNamespaceTypeVersion for type foo. Value '3.2.4' cannot be any other than '3.2.3'.` ); }); @@ -211,7 +209,6 @@ describe('DocumentMigrator', () => { convertToMultiNamespaceTypeVersion: '3.2.4', namespaceType: 'multiple', }), - minimumConvertVersion: '0.0.0', log: mockLogger, }; expect(() => new DocumentMigrator(invalidDefinition)).toThrowError( @@ -227,7 +224,6 @@ describe('DocumentMigrator', () => { convertToMultiNamespaceTypeVersion: '3.1.1', namespaceType: 'multiple', }), - minimumConvertVersion: '0.0.0', log: mockLogger, }; expect(() => new DocumentMigrator(invalidDefinition)).toThrowError( diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts index 1040699a99e9d..c737489dd2231 100644 --- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts +++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts @@ -66,8 +66,6 @@ import { import { MigrationLogger } from './migration_logger'; import { TransformSavedObjectDocumentError } from '.'; -const DEFAULT_MINIMUM_CONVERT_VERSION = '8.0.0'; - export type MigrateFn = (doc: SavedObjectUnsanitizedDoc) => SavedObjectUnsanitizedDoc; export type MigrateAndConvertFn = (doc: SavedObjectUnsanitizedDoc) => SavedObjectUnsanitizedDoc[]; @@ -95,7 +93,7 @@ interface TransformOptions { interface DocumentMigratorOptions { kibanaVersion: string; typeRegistry: ISavedObjectTypeRegistry; - minimumConvertVersion?: string; + convertVersion?: string; log: Logger; } @@ -142,7 +140,7 @@ export interface VersionedTransformer { * A concrete implementation of the VersionedTransformer interface. */ export class DocumentMigrator implements VersionedTransformer { - private documentMigratorOptions: Omit; + private documentMigratorOptions: Omit; private migrations?: ActiveMigrations; private transformDoc?: ApplyTransformsFn; @@ -152,17 +150,12 @@ export class DocumentMigrator implements VersionedTransformer { * @param {DocumentMigratorOptions} opts * @prop {string} kibanaVersion - The current version of Kibana * @prop {SavedObjectTypeRegistry} typeRegistry - The type registry to get type migrations from - * @prop {string} minimumConvertVersion - The minimum version of Kibana in which documents can be converted to multi-namespace types + * @prop {string} convertVersion - The version of Kibana in which documents can be converted to multi-namespace types * @prop {Logger} log - The migration logger * @memberof DocumentMigrator */ - constructor({ - typeRegistry, - kibanaVersion, - minimumConvertVersion = DEFAULT_MINIMUM_CONVERT_VERSION, - log, - }: DocumentMigratorOptions) { - validateMigrationDefinition(typeRegistry, kibanaVersion, minimumConvertVersion); + constructor({ typeRegistry, kibanaVersion, convertVersion, log }: DocumentMigratorOptions) { + validateMigrationDefinition(typeRegistry, kibanaVersion, convertVersion); this.documentMigratorOptions = { typeRegistry, kibanaVersion, log }; } @@ -300,7 +293,7 @@ function validateMigrationsMapObject( function validateMigrationDefinition( registry: ISavedObjectTypeRegistry, kibanaVersion: string, - minimumConvertVersion: string + convertVersion?: string ) { function assertObjectOrFunction(entity: any, prefix: string) { if (!entity || (typeof entity !== 'function' && typeof entity !== 'object')) { @@ -321,9 +314,9 @@ function validateMigrationDefinition( throw new Error( `Invalid convertToMultiNamespaceTypeVersion for type ${type}. Expected value to be a semver, but got '${convertToMultiNamespaceTypeVersion}'.` ); - } else if (Semver.lt(convertToMultiNamespaceTypeVersion, minimumConvertVersion)) { + } else if (convertVersion && Semver.neq(convertToMultiNamespaceTypeVersion, convertVersion)) { throw new Error( - `Invalid convertToMultiNamespaceTypeVersion for type ${type}. Value '${convertToMultiNamespaceTypeVersion}' cannot be less than '${minimumConvertVersion}'.` + `Invalid convertToMultiNamespaceTypeVersion for type ${type}. Value '${convertToMultiNamespaceTypeVersion}' cannot be any other than '${convertVersion}'.` ); } else if (Semver.gt(convertToMultiNamespaceTypeVersion, kibanaVersion)) { throw new Error( @@ -345,6 +338,7 @@ function validateMigrationDefinition( ); } if (convertToMultiNamespaceTypeVersion) { + // CHECKPOINT 1 assertValidConvertToMultiNamespaceType( namespaceType, convertToMultiNamespaceTypeVersion, diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/kibana_migrator.ts b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/kibana_migrator.ts index 3432021249886..58a5a741a6163 100644 --- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/kibana_migrator.ts +++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/kibana_migrator.ts @@ -37,6 +37,10 @@ import { createIndexMap } from './core/build_index_map'; import { runResilientMigrator } from './run_resilient_migrator'; import { migrateRawDocsSafely } from './core/migrate_raw_docs'; +// ensure plugins don't try to convert SO namespaceTypes after 8.0.0 +// see https://github.com/elastic/kibana/issues/147344 +const ALLOWED_CONVERT_VERSION = '8.0.0'; + export interface KibanaMigratorOptions { client: ElasticsearchClient; typeRegistry: ISavedObjectTypeRegistry; @@ -92,6 +96,7 @@ export class KibanaMigrator implements IKibanaMigrator { this.kibanaVersion = kibanaVersion; this.documentMigrator = new DocumentMigrator({ kibanaVersion: this.kibanaVersion, + convertVersion: ALLOWED_CONVERT_VERSION, typeRegistry, log: this.log, }); diff --git a/packages/core/saved-objects/core-saved-objects-server/src/migration.ts b/packages/core/saved-objects/core-saved-objects-server/src/migration.ts index 4634edef3d2bf..9ac9444a8dbee 100644 --- a/packages/core/saved-objects/core-saved-objects-server/src/migration.ts +++ b/packages/core/saved-objects/core-saved-objects-server/src/migration.ts @@ -76,6 +76,7 @@ export interface SavedObjectMigrationContext { readonly migrationVersion: string; /** * The version in which this object type is being converted to a multi-namespace type + * @deprecated Converting to multi-namespace clashes with the ZDT requirement for serverless */ readonly convertToMultiNamespaceTypeVersion?: string; /** diff --git a/packages/core/saved-objects/core-saved-objects-server/src/saved_objects_type.ts b/packages/core/saved-objects/core-saved-objects-server/src/saved_objects_type.ts index e36212e7913f3..8c5ff2b9fa542 100644 --- a/packages/core/saved-objects/core-saved-objects-server/src/saved_objects_type.ts +++ b/packages/core/saved-objects/core-saved-objects-server/src/saved_objects_type.ts @@ -113,6 +113,7 @@ export interface SavedObjectsType { * ``` * * Note: migration function(s) can be optionally specified for any of these versions and will not interfere with the conversion process. + * @deprecated Converting to multi-namespace clashes with the ZDT requirement for serverless */ convertToMultiNamespaceTypeVersion?: string; /** From d632738057104149b6e5bb5c2d85cbe172a2a7a8 Mon Sep 17 00:00:00 2001 From: Kevin Qualters <56408403+kqualters-elastic@users.noreply.github.com> Date: Wed, 21 Dec 2022 13:56:57 -0500 Subject: [PATCH 28/36] [Security Solution] [Timeline] User current user name instead of 'elastic' when creating notes, rule author for investigation guides (#142280) ## Summary Resolves: https://github.com/elastic/kibana/issues/139788 Changes the createTimeline function to use the kibana.alert.rule.created_by string for investigation guide author name in timeline, and uses the actively logged in user for regular comments, so that what is displayed does not oscillate from hard coded 'elastic' to the current user name. ### 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: Michael Olorunnisola --- .../public/common/mock/global_state.ts | 1 + .../public/common/mock/timeline_results.ts | 3 + .../components/alerts_table/actions.test.tsx | 5 + .../components/alerts_table/actions.tsx | 6 + .../components/alerts_table/types.ts | 1 + .../components/notes/add_note/index.test.tsx | 13 ++ .../components/notes/add_note/index.tsx | 23 ++- .../components/notes/helpers.test.tsx | 3 +- .../timelines/components/notes/helpers.tsx | 8 +- .../components/open_timeline/helpers.ts | 3 +- .../components/open_timeline/types.ts | 2 + .../components/timeline/body/index.test.tsx | 195 ++++++++++++------ .../components/timeline/body/index.tsx | 5 +- .../timelines/store/timeline/defaults.ts | 1 + .../timelines/store/timeline/epic.test.ts | 1 + .../public/timelines/store/timeline/model.ts | 2 + .../timelines/store/timeline/reducer.test.ts | 1 + 17 files changed, 197 insertions(+), 76 deletions(-) diff --git a/x-pack/plugins/security_solution/public/common/mock/global_state.ts b/x-pack/plugins/security_solution/public/common/mock/global_state.ts index c04f9a1b7ecc9..f243f21055865 100644 --- a/x-pack/plugins/security_solution/public/common/mock/global_state.ts +++ b/x-pack/plugins/security_solution/public/common/mock/global_state.ts @@ -349,6 +349,7 @@ export const mockGlobalState: State = { resolveTimelineConfig: undefined, pinnedEventIds: {}, pinnedEventsSaveObject: {}, + selectAll: false, sessionViewConfig: null, show: false, sort: [ diff --git a/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts b/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts index d8c498e7f5952..6032df5a04756 100644 --- a/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts +++ b/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts @@ -1993,6 +1993,7 @@ export const mockTimelineModel: TimelineModel = { highlightedDropAndProviderId: '', historyIds: [], id: 'ef579e40-jibber-jabber', + selectAll: false, indexNames: [], isFavorite: false, isLive: false, @@ -2184,6 +2185,7 @@ export const defaultTimelineProps: CreateTimelineProps = { pinnedEventsSaveObject: {}, queryFields: [], savedObjectId: null, + selectAll: false, selectedEventIds: {}, sessionViewConfig: null, show: false, @@ -2205,6 +2207,7 @@ export const defaultTimelineProps: CreateTimelineProps = { to: '2018-11-05T19:03:25.937Z', notes: null, ruleNote: '# this is some markdown documentation', + ruleAuthor: ['elastic'], }; export const mockTimelineDetails: TimelineEventsDetailsItem[] = [ diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.test.tsx index fbd14853c88f5..47d2426cb17ff 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.test.tsx @@ -439,6 +439,7 @@ describe('alert actions', () => { queryFields: [], resolveTimelineConfig: undefined, savedObjectId: null, + selectAll: false, selectedEventIds: {}, sessionViewConfig: null, show: true, @@ -457,7 +458,9 @@ describe('alert actions', () => { version: null, }, to: '2018-11-05T19:03:25.937Z', + resolveTimelineConfig: undefined, ruleNote: '# this is some markdown documentation', + ruleAuthor: ['elastic'], }; expect(mockGetExceptionFilter).not.toHaveBeenCalled(); @@ -506,6 +509,7 @@ describe('alert actions', () => { const defaultTimelinePropsWithoutNote = { ...defaultTimelineProps }; delete defaultTimelinePropsWithoutNote.ruleNote; + delete defaultTimelinePropsWithoutNote.ruleAuthor; expect(updateTimelineIsLoading).toHaveBeenCalledWith({ id: TimelineId.active, @@ -1121,6 +1125,7 @@ describe('alert actions', () => { }; delete timelineProps.ruleNote; + delete timelineProps.ruleAuthor; await sendAlertToTimelineAction({ createTimeline, diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx index 90d628b14e49f..74e9b92fd4956 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx @@ -22,6 +22,7 @@ import { ALERT_RULE_TYPE, ALERT_RULE_NOTE, ALERT_RULE_PARAMETERS, + ALERT_RULE_CREATED_BY, ALERT_SUPPRESSION_START, ALERT_SUPPRESSION_END, ALERT_SUPPRESSION_DOCS_COUNT, @@ -473,6 +474,7 @@ const createThresholdTimeline = async ( const alertDoc = formattedAlertData[0]; const params = getField(alertDoc, ALERT_RULE_PARAMETERS); + const ruleAuthor = getField(alertDoc, ALERT_RULE_CREATED_BY); const filters: Filter[] = (params as MightHaveFilters).filters ?? (alertDoc.signal?.rule as MightHaveFilters)?.filters ?? @@ -521,6 +523,7 @@ const createThresholdTimeline = async ( }, to: thresholdTo, ruleNote: noteContent, + ruleAuthor, }); } catch (error) { const { toasts } = KibanaServices.get().notifications; @@ -940,6 +943,7 @@ export const sendAlertToTimelineAction = async ({ const ecsData: Ecs = Array.isArray(ecs) ? ecs[0] : ecs; const ruleNote = getField(ecsData, ALERT_RULE_NOTE); + const ruleAuthor = getField(ecsData, ALERT_RULE_CREATED_BY); const noteContent = Array.isArray(ruleNote) && ruleNote.length > 0 ? ruleNote[0] : ''; const ruleTimelineId = getField(ecsData, ALERT_RULE_TIMELINE_ID); const timelineId = !isEmpty(ruleTimelineId) @@ -1062,6 +1066,7 @@ export const sendAlertToTimelineAction = async ({ }, to, ruleNote: noteContent, + ruleAuthor, notes: notes ?? null, }); } @@ -1127,6 +1132,7 @@ export const sendAlertToTimelineAction = async ({ }, to, ruleNote: noteContent, + ruleAuthor, }); } }; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/types.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_table/types.ts index e19f9994afc8b..d60515169a2a5 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/types.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/types.ts @@ -67,6 +67,7 @@ export interface CreateTimelineProps { to: string; notes: NoteResult[] | null; ruleNote?: string; + ruleAuthor?: string | string[]; } export type CreateTimeline = ({ from, timeline, to }: CreateTimelineProps) => void; diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.test.tsx index a9e286390b88a..e883ea10b0a6c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.test.tsx @@ -9,6 +9,10 @@ import { mount } from 'enzyme'; import React from 'react'; import { TestProviders } from '../../../../common/mock'; +import { useCurrentUser } from '../../../../common/lib/kibana/hooks'; + +import { securityMock } from '@kbn/security-plugin/public/mocks'; +import type { AuthenticatedUser } from '@kbn/security-plugin/common'; import { AddNote } from '.'; const mockDispatch = jest.fn(); @@ -20,8 +24,17 @@ jest.mock('react-redux', () => { useDispatch: () => mockDispatch, }; }); +jest.mock('../../../../common/lib/kibana/hooks'); describe('AddNote', () => { + let authenticatedUser: AuthenticatedUser; + + beforeEach(() => { + (useCurrentUser as jest.Mock).mockReturnValue(authenticatedUser); + authenticatedUser = securityMock.createMockAuthenticatedUser({ + roles: ['superuser'], + }); + }); const note = 'The contents of a new note'; const props = { associateNote: jest.fn(), diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.tsx index 3ec407ba78e63..9e216b24f7843 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.tsx @@ -12,12 +12,13 @@ import { EuiFlexItem, EuiScreenReaderOnly, } from '@elastic/eui'; -import React, { useCallback } from 'react'; +import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; import { useDispatch } from 'react-redux'; import { appActions } from '../../../../common/store/app'; import type { Note } from '../../../../common/lib/note'; +import { useCurrentUser } from '../../../../common/lib/kibana'; import type { AssociateNote, UpdateInternalNewNote } from '../helpers'; import { updateAndAssociateNode } from '../helpers'; import * as i18n from '../translations'; @@ -54,22 +55,24 @@ export const AddNote = React.memo<{ autoFocusDisabled?: boolean; }>(({ associateNote, newNote, onCancelAddNote, updateNewNote, autoFocusDisabled = false }) => { const dispatch = useDispatch(); - + const authenticatedUser = useCurrentUser(); const updateNote = useCallback( (note: Note) => dispatch(appActions.updateNote({ note })), [dispatch] ); - const handleClick = useCallback( - () => + const handleClick = useCallback(() => { + const user = authenticatedUser?.username; + if (user) { updateAndAssociateNode({ associateNote, newNote, updateNewNote, updateNote, - }), - [associateNote, newNote, updateNewNote, updateNote] - ); + user, + }); + } + }, [associateNote, newNote, updateNewNote, updateNote, authenticatedUser]); const onKeyDown = useCallback( (e: React.KeyboardEvent) => { @@ -84,6 +87,10 @@ export const AddNote = React.memo<{ [onCancelAddNote] ); + const isAddNoteDisabled = useMemo(() => { + return newNote.trim().length === 0; + }, [newNote]); + return (
@@ -105,7 +112,7 @@ export const AddNote = React.memo<{ diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/helpers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/helpers.test.tsx index 25d61a449e793..572ac49310b8e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/notes/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/notes/helpers.test.tsx @@ -13,9 +13,10 @@ describe('createNote', () => { // Notice the required trailing whitespace which is required otherwise // markdown renderers will not render the list correctly const note = '- [ ] \n\n- [ ] '; - expect(createNote({ newNote: note })).toEqual( + expect(createNote({ newNote: note, user: 'elastic' })).toEqual( expect.objectContaining({ note, + user: 'elastic', }) ); }); diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/helpers.tsx index d3c992d5696a6..ca5d2dfdee788 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/notes/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/notes/helpers.tsx @@ -71,13 +71,13 @@ export const NotesCount = React.memo<{ NotesCount.displayName = 'NotesCount'; /** Creates a new instance of a `note` */ -export const createNote = ({ newNote }: { newNote: string }): Note => ({ +export const createNote = ({ newNote, user }: { newNote: string; user: string }): Note => ({ created: moment.utc().toDate(), id: uuid.v4(), lastEdit: null, note: newNote, saveObjectId: null, - user: 'elastic', // TODO: get the logged-in Kibana user + user, version: null, }); @@ -86,6 +86,7 @@ interface UpdateAndAssociateNodeParams { newNote: string; updateNewNote: UpdateInternalNewNote; updateNote: UpdateNote; + user: string; } export const updateAndAssociateNode = ({ @@ -93,8 +94,9 @@ export const updateAndAssociateNode = ({ newNote, updateNewNote, updateNote, + user, }: UpdateAndAssociateNodeParams) => { - const note = createNote({ newNote }); + const note = createNote({ newNote, user }); updateNote(note); // perform IO to store the newly-created note associateNote(note.id); // associate the note with the (opaque) thing updateNewNote(''); // clear the input diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts index bf5e2cb4466f0..b82051c11a8a0 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts @@ -413,6 +413,7 @@ export const dispatchUpdateTimeline = timeline, to, ruleNote, + ruleAuthor, }: UpdateTimeline): (() => void) => () => { if (!isEmpty(timeline.indexNames)) { @@ -464,7 +465,7 @@ export const dispatchUpdateTimeline = } if (duplicate && ruleNote != null && !isEmpty(ruleNote)) { - const newNote = createNote({ newNote: ruleNote }); + const newNote = createNote({ newNote: ruleNote, user: ruleAuthor || 'elastic' }); dispatch(dispatchUpdateNote({ note: newNote })); dispatch(dispatchAddGlobalTimelineNote({ noteId: newNote.id, id })); } diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/types.ts b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/types.ts index 723d9ebc605df..ae684966cb298 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/types.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/types.ts @@ -219,6 +219,7 @@ export interface UpdateTimeline { timeline: TimelineModel; to: string; ruleNote?: string; + ruleAuthor?: string; } export type DispatchUpdateTimeline = ({ @@ -230,6 +231,7 @@ export type DispatchUpdateTimeline = ({ timeline, to, ruleNote, + ruleAuthor, }: UpdateTimeline) => () => void; export enum TimelineTabsStyle { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.test.tsx index 559baabd7640c..dc3bbc2ae45b9 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.test.tsx @@ -6,8 +6,12 @@ */ import React from 'react'; +import type { Store } from 'redux'; +import { mount } from 'enzyme'; import { waitFor } from '@testing-library/react'; +import type { DroppableProps, DraggableProps } from 'react-beautiful-dnd'; +import { useKibana, useCurrentUser } from '../../../../common/lib/kibana'; import { DefaultCellRenderer } from '../cell_rendering/default_cell_renderer'; import '../../../../common/mock/match_media'; import { mockBrowserFields } from '../../../../common/containers/source/mock'; @@ -33,10 +37,13 @@ import { TimelineId, TimelineTabs } from '../../../../../common/types/timeline'; import { defaultRowRenderers } from './renderers'; import type { State } from '../../../../common/store'; import { createStore } from '../../../../common/store'; -import { mount } from 'enzyme'; import type { UseFieldBrowserOptionsProps } from '../../fields_browser'; jest.mock('../../../../common/hooks/use_app_toasts'); +jest.mock( + '../../../../detections/components/alerts_table/timeline_actions/use_add_to_case_actions' +); + jest.mock('../../../../common/components/user_privileges', () => { return { useUserPrivileges: () => ({ @@ -49,6 +56,9 @@ jest.mock('../../../../common/components/user_privileges', () => { }); const mockUseFieldBrowserOptions = jest.fn(); +const mockUseKibana = useKibana as jest.Mock; +const mockUseCurrentUser = useCurrentUser as jest.Mock>>; +const mockCasesContract = jest.requireActual('@kbn/cases-plugin/public/mocks'); jest.mock('../../fields_browser', () => ({ useFieldBrowserOptions: (props: UseFieldBrowserOptionsProps) => mockUseFieldBrowserOptions(props), })); @@ -62,43 +72,7 @@ const useAddToTimeline = () => ({ startDragToTimeline: jest.fn(), }); -jest.mock('../../../../common/lib/kibana', () => { - const originalModule = jest.requireActual('../../../../common/lib/kibana'); - const mockCasesContract = jest.requireActual('@kbn/cases-plugin/public/mocks'); - return { - ...originalModule, - useKibana: jest.fn().mockReturnValue({ - services: { - application: { - navigateToApp: jest.fn(), - getUrlForApp: jest.fn(), - capabilities: { - siem: { crud_alerts: true, read_alerts: true }, - }, - }, - cases: mockCasesContract.mockCasesContract(), - data: { - search: jest.fn(), - query: jest.fn(), - dataViews: jest.fn(), - }, - uiSettings: { - get: jest.fn(), - }, - savedObjects: { - client: {}, - }, - timelines: { - getLastUpdated: jest.fn(), - getLoadingPanel: jest.fn(), - getFieldBrowser: jest.fn(), - getUseAddToTimeline: () => useAddToTimeline, - }, - }, - }), - }; -}); - +jest.mock('../../../../common/lib/kibana'); const mockSort: Sort[] = [ { columnId: '@timestamp', @@ -118,7 +92,48 @@ jest.mock('react-redux', () => { }; }); -jest.mock('../../../../common/components/link_to'); +jest.mock('../../../../common/components/link_to', () => { + const originalModule = jest.requireActual('../../../../common/components/link_to'); + return { + ...originalModule, + useGetSecuritySolutionUrl: () => + jest.fn(({ deepLinkId }: { deepLinkId: string }) => `/${deepLinkId}`), + useNavigateTo: () => { + return { navigateTo: jest.fn() }; + }, + useAppUrl: () => { + return { getAppUrl: jest.fn() }; + }, + }; +}); + +jest.mock('../../../../common/components/links', () => { + const originalModule = jest.requireActual('../../../../common/components/links'); + return { + ...originalModule, + useGetSecuritySolutionUrl: () => + jest.fn(({ deepLinkId }: { deepLinkId: string }) => `/${deepLinkId}`), + useNavigateTo: () => { + return { navigateTo: jest.fn() }; + }, + useAppUrl: () => { + return { getAppUrl: jest.fn() }; + }, + }; +}); + +jest.mock( + '../../../../detections/components/alerts_table/timeline_actions/use_open_alert_details', + () => { + return { + useOpenAlertDetailsAction: () => { + return { + alertDetailsActionItems: [], + }; + }, + }; + } +); // Prevent Resolver from rendering jest.mock('../../graph_overlay'); @@ -146,31 +161,58 @@ jest.mock('suricata-sid-db', () => { db: [], }; }); +jest.mock( + '../../../../detections/components/alerts_table/timeline_actions/use_add_to_case_actions', + () => { + return { + useAddToCaseActions: () => { + return { + addToCaseActionItems: [], + }; + }, + }; + } +); + jest.mock('react-beautiful-dnd', () => { const original = jest.requireActual('react-beautiful-dnd'); return { ...original, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - Droppable: ({ children }: { children: any }) => + Droppable: ({ children }: { children: DroppableProps['children'] }) => children( { - draggableProps: { - style: {}, + droppableProps: { + 'data-rbd-droppable-context-id': '', + 'data-rbd-droppable-id': '', }, innerRef: jest.fn(), }, - {} + { + isDraggingOver: false, + isUsingPlaceholder: false, + } ), - // eslint-disable-next-line @typescript-eslint/no-explicit-any - Draggable: ({ children }: { children: any }) => + Draggable: ({ children }: { children: DraggableProps['children'] }) => children( { draggableProps: { - style: {}, + 'data-rbd-draggable-context-id': '', + 'data-rbd-draggable-id': '', }, innerRef: jest.fn(), }, - {} + { + isDragging: false, + isDropAnimating: false, + }, + { + draggableId: '', + mode: 'SNAP', + source: { + droppableId: '', + index: 0, + }, + } ), DraggableProvided: () => <>, DraggableStateSnapshot: () => <>, @@ -180,19 +222,52 @@ jest.mock('react-beautiful-dnd', () => { }); describe('Body', () => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const getWrapper = async (childrenComponent: JSX.Element, store?: any) => { + const getWrapper = async (childrenComponent: JSX.Element, store?: { store: Store }) => { const wrapper = mount(childrenComponent, { wrappingComponent: TestProviders, wrappingComponentProps: store ?? {}, }); await waitFor(() => wrapper.find('[data-test-subj="suricataRefs"]').exists()); + return wrapper; }; const mockRefetch = jest.fn(); let appToastsMock: jest.Mocked>; beforeEach(() => { + mockUseCurrentUser.mockReturnValue({ username: 'test-username' }); + mockUseKibana.mockReturnValue({ + services: { + application: { + navigateToApp: jest.fn(), + getUrlForApp: jest.fn(), + capabilities: { + siem: { crud_alerts: true, read_alerts: true }, + }, + }, + cases: mockCasesContract.mockCasesContract(), + data: { + search: jest.fn(), + query: jest.fn(), + dataViews: jest.fn(), + }, + uiSettings: { + get: jest.fn(), + }, + savedObjects: { + client: {}, + }, + timelines: { + getLastUpdated: jest.fn(), + getLoadingPanel: jest.fn(), + getFieldBrowser: jest.fn(), + getUseAddToTimeline: () => useAddToTimeline, + }, + }, + useNavigateTo: jest.fn().mockReturnValue({ + navigateTo: jest.fn(), + }), + }); appToastsMock = useAppToastsMock.create(); (useAppToasts as jest.Mock).mockReturnValue(appToastsMock); }); @@ -214,8 +289,7 @@ describe('Body', () => { trailingControlColumns: [], }; - // FLAKY: https://github.com/elastic/kibana/issues/145187 - describe.skip('rendering', () => { + describe('rendering', () => { beforeEach(() => { mockDispatch.mockClear(); }); @@ -234,7 +308,6 @@ describe('Body', () => { const wrapper = await getWrapper(); expect(wrapper.find('[data-test-subj="events"]').first().exists()).toEqual(true); }); - test('it renders a tooltip for timestamp', async () => { const { storage } = createSecuritySolutionStorageMock(); const headersJustTimestamp = defaultHeaders.filter((h) => h.id === '@timestamp'); @@ -289,7 +362,7 @@ describe('Body', () => { addaNoteToEvent(wrapper, 'hello world'); wrapper.update(); expect(mockDispatch).toHaveBeenNthCalledWith( - 3, + 2, expect.objectContaining({ payload: { eventId: '1', @@ -304,7 +377,7 @@ describe('Body', () => { }) ); expect(mockDispatch).toHaveBeenNthCalledWith( - 4, + 3, timelineActions.pinEvent({ eventId: '1', id: 'timeline-test', @@ -372,8 +445,8 @@ describe('Body', () => { wrapper.find(`[data-test-subj="expand-event"]`).first().simulate('click'); wrapper.update(); - expect(mockDispatch).toBeCalledTimes(2); - expect(mockDispatch.mock.calls[1][0]).toEqual({ + expect(mockDispatch).toBeCalledTimes(1); + expect(mockDispatch.mock.calls[0][0]).toEqual({ payload: { id: 'timeline-test', panelView: 'eventDetail', @@ -393,8 +466,8 @@ describe('Body', () => { wrapper.find(`[data-test-subj="expand-event"]`).first().simulate('click'); wrapper.update(); - expect(mockDispatch).toBeCalledTimes(2); - expect(mockDispatch.mock.calls[1][0]).toEqual({ + expect(mockDispatch).toBeCalledTimes(1); + expect(mockDispatch.mock.calls[0][0]).toEqual({ payload: { id: 'timeline-test', panelView: 'eventDetail', @@ -414,8 +487,8 @@ describe('Body', () => { wrapper.find(`[data-test-subj="expand-event"]`).first().simulate('click'); wrapper.update(); - expect(mockDispatch).toBeCalledTimes(2); - expect(mockDispatch.mock.calls[1][0]).toEqual({ + expect(mockDispatch).toBeCalledTimes(1); + expect(mockDispatch.mock.calls[0][0]).toEqual({ payload: { id: 'timeline-test', panelView: 'eventDetail', diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx index 6f2b7cc73b52e..0dcba8b852a3d 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx @@ -88,6 +88,7 @@ export const StatefulBody = React.memo( selectedEventIds, show, queryFields, + selectAll, } = timelineDefaults, } = useSelector((state: State) => timelineBodySelector(state, id)); @@ -135,10 +136,10 @@ export const StatefulBody = React.memo( // Sync to selectAll so parent components can select all events useEffect(() => { - if (!isSelectAllChecked) { + if (selectAll && !isSelectAllChecked) { onSelectAll({ isSelected: true }); } - }, [isSelectAllChecked, onSelectAll]); + }, [isSelectAllChecked, onSelectAll, selectAll]); const enabledRowRenderers = useMemo(() => { if ( diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/defaults.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/defaults.ts index 4121415addad7..04a2d23e217cf 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/defaults.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/defaults.ts @@ -60,6 +60,7 @@ export const timelineDefaults: SubsetTimelineModel & pinnedEventIds: {}, pinnedEventsSaveObject: {}, savedObjectId: null, + selectAll: false, sessionViewConfig: null, show: false, sort: [ diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.test.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.test.ts index 5f0cf0bcd09a0..c22c80ae5f67b 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.test.ts @@ -158,6 +158,7 @@ describe('Epic Timeline', () => { pinnedEventsSaveObject: {}, dateRange: { start: '2019-10-30T21:06:27.644Z', end: '2019-10-31T21:06:27.644Z' }, savedObjectId: '11169110-fc22-11e9-8ca9-072f15ce2685', + selectAll: false, selectedEventIds: {}, sessionViewConfig: null, show: true, diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts index 8a96fc81d1ebf..5fb4b65d093e1 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts @@ -130,6 +130,7 @@ export interface TimelineModel { /** If selectAll checkbox in header is checked **/ isSelectAllChecked: boolean; isLoading: boolean; + selectAll: boolean; } export type SubsetTimelineModel = Readonly< @@ -171,6 +172,7 @@ export type SubsetTimelineModel = Readonly< | 'pinnedEventIds' | 'pinnedEventsSaveObject' | 'dateRange' + | 'selectAll' | 'selectedEventIds' | 'sessionViewConfig' | 'show' diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts index 4d8d2a3cb528c..7719ae5e1ae81 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts @@ -123,6 +123,7 @@ const basicTimeline: TimelineModel = { pinnedEventsSaveObject: {}, queryFields: [], savedObjectId: null, + selectAll: false, selectedEventIds: {}, sessionViewConfig: null, show: true, From 2a02b23ef310aab3cb9501f9210ab8abcd021cdc Mon Sep 17 00:00:00 2001 From: Luke Gmys Date: Wed, 21 Dec 2022 20:33:47 +0100 Subject: [PATCH 29/36] [Security Solution] Clean connectors before custom query rule test (#147921) --- .../cypress/e2e/detection_rules/custom_query_rule.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule.cy.ts index 43825c9c662fd..ae1bb250fc605 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule.cy.ts @@ -79,7 +79,7 @@ import { } from '../../tasks/alerts_detection_rules'; import { createCustomRuleEnabled } from '../../tasks/api_calls/rules'; import { createTimeline } from '../../tasks/api_calls/timelines'; -import { cleanKibana, deleteAlertsAndRules } from '../../tasks/common'; +import { cleanKibana, deleteAlertsAndRules, deleteConnectors } from '../../tasks/common'; import { addEmailConnectorAndRuleAction } from '../../tasks/common/rule_actions'; import { continueWithNextSection, @@ -356,6 +356,7 @@ describe('Custom query rules', () => { before(() => { deleteAlertsAndRules(); + deleteConnectors(); createCustomRuleEnabled(getExistingRule(), 'rule1'); }); beforeEach(() => { From aea6cebb1b5cbea4dd39598818570cdd870ac3cc Mon Sep 17 00:00:00 2001 From: Catherine Liu Date: Wed, 21 Dec 2022 11:39:06 -0800 Subject: [PATCH 30/36] [Canvas] Adds a functional test for expression editor autocomplete (#146943) ## Summary Fixes https://github.com/elastic/kibana/issues/147887 I added a functional test to check that autocomplete suggestions appear as you type in the expression editor in Canvas. [Flaky test runner x 100](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1658) ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --- .../test/functional/apps/canvas/expression.ts | 41 +++++++++++++++++-- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/x-pack/test/functional/apps/canvas/expression.ts b/x-pack/test/functional/apps/canvas/expression.ts index 875a9deb2ebe4..f41bea9774308 100644 --- a/x-pack/test/functional/apps/canvas/expression.ts +++ b/x-pack/test/functional/apps/canvas/expression.ts @@ -10,12 +10,14 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function canvasExpressionTest({ getService, getPageObjects }: FtrProviderContext) { - const testSubjects = getService('testSubjects'); - const retry = getService('retry'); + const archive = 'x-pack/test/functional/fixtures/kbn_archiver/canvas/default'; + const browser = getService('browser'); + const find = getService('find'); + const kibanaServer = getService('kibanaServer'); const monacoEditor = getService('monacoEditor'); const PageObjects = getPageObjects(['canvas', 'common']); - const kibanaServer = getService('kibanaServer'); - const archive = 'x-pack/test/functional/fixtures/kbn_archiver/canvas/default'; + const retry = getService('retry'); + const testSubjects = getService('testSubjects'); describe('expression editor', function () { // there is an issue with FF not properly clicking on workpad elements @@ -66,8 +68,39 @@ export default function canvasExpressionTest({ getService, getPageObjects }: Ftr const editorText = await monacoEditor.getCodeEditorValue(1); expect(editorText).to.contain('Orange: Timelion, Server function and this is a test'); }); + // reset the markdown await monacoEditor.setCodeEditorValue(oldMd, 0); }); + + it('does not show autocomplete before typing', async () => { + await retry.try(async () => { + const elements = await find.allByCssSelector('.monaco-list-rows > .monaco-list-row'); + expect(elements.length).to.be(0); + }); + }); + + it('shows autocomplete when typing', async () => { + const originalExpression = await monacoEditor.getCodeEditorValue(1); + await monacoEditor.setCodeEditorValue(' ', 1); + + // checks that no suggestions are rendered + await retry.try(async () => { + const elements = await find.allByCssSelector('.monaco-list-rows > .monaco-list-row'); + expect(elements.length).to.be(0); + }); + + await testSubjects.click('canvasExpressionInput'); + await browser.pressKeys(browser.keys.SPACE); + + // checks that suggestions are rendered after typing + await retry.try(async () => { + const elements = await find.allByCssSelector('.monaco-list-rows > .monaco-list-row'); + expect(elements.length).to.be.above(0); + }); + + // reset expression + await monacoEditor.setCodeEditorValue(originalExpression, 1); + }); }); } From af2a7d63f4769bb0e002db0407ae41dd16ab15b6 Mon Sep 17 00:00:00 2001 From: hardikpnsp Date: Thu, 22 Dec 2022 02:46:11 +0530 Subject: [PATCH 31/36] [Documentation] Fix links to repository files on Best Practices page (#96152) --- docs/developer/best-practices/index.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer/best-practices/index.asciidoc b/docs/developer/best-practices/index.asciidoc index c610c787d2b8d..afdd500fddc3f 100644 --- a/docs/developer/best-practices/index.asciidoc +++ b/docs/developer/best-practices/index.asciidoc @@ -71,7 +71,7 @@ They take care of the nitty gritty so you can focus on creative solutions to your particular problem sphere. Some examples of common services you should consider: -* {kib-repo}tree/{branch}/src/plugins/data/README.md[Data +* {kib-repo}tree/{branch}/src/plugins/data/README.mdx[Data services] ** {kib-repo}tree/{branch}/src/plugins/data/README.mdx#search[Search strategies] From 36978389a0e05daf026f803c8978f75d753a785c Mon Sep 17 00:00:00 2001 From: Klim Markelov Date: Wed, 21 Dec 2022 22:19:38 +0100 Subject: [PATCH 32/36] [Behavioral Analytics] Change Analytics DNS path (#147934) ### Description Recently it was discovered that our initial path to analytics brings some inconsistency into Enterprise Search routes, so it was decided to replace the `analytics/api` path with `api/analytics`. This PR is dedicated to changing Analytics DNS path from `analytics/api` to `api/analytics` --- .../analytics_collection_integrate.test.tsx | 2 +- .../analytics_collection_integrate.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate.test.tsx b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate.test.tsx index 8ba63eb5e3cc7..65a4ab2cd4c35 100644 --- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate.test.tsx @@ -44,7 +44,7 @@ describe('AnalyticsCollectionIntegrate', () => { ); expect(wrapper.find(EuiCodeBlock).at(0).text()).toContain( - 'data-dsn="/analytics/api/collections/1"' + 'data-dsn="/api/analytics/collections/1"' ); expect(wrapper.find(EuiCodeBlock).at(0).text()).toContain('src="/analytics.js"'); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate.tsx b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate.tsx index cd9789d0c9424..ed4aa6801f8e0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate.tsx @@ -28,7 +28,7 @@ export type TabKey = 'javascriptEmbed' | 'searchuiEmbed' | 'javascriptClientEmbe export const AnalyticsCollectionIntegrate: React.FC = ({ collection, }) => { - const analyticsDNSUrl = getEnterpriseSearchUrl(`/analytics/api/collections/${collection.id}`); + const analyticsDNSUrl = getEnterpriseSearchUrl(`/api/analytics/collections/${collection.id}`); const webClientSrc = getEnterpriseSearchUrl('/analytics.js'); const [selectedTab, setSelectedTab] = React.useState('javascriptEmbed'); From d7be514b94dd04272be583802d0bcfa9d2dd256f Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Wed, 21 Dec 2022 22:37:17 +0100 Subject: [PATCH 33/36] [ML] Explain Log Rate Spikes: Additional unit tests. (#147451) This breaks out inline code in `x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts` to functions in separate files and adds jest unit tests for each function. The mocks used for jest unit tests are used as expected data in the API integration tests. This allows to make sure that the static mocks are still up to date should we have to update API integration tests based on upstream tests. --- .../artificial_logs/change_point_groups.ts | 20 ++ .../artificial_logs/change_points.ts | 53 ++++++ .../__mocks__/artificial_logs/fields.ts | 8 + .../filtered_frequent_items.ts | 27 +++ .../final_change_point_groups.ts | 27 +++ .../artificial_logs/frequent_items.ts | 59 ++++++ .../farequote/change_point_groups.ts | 41 +++++ x-pack/plugins/aiops/common/types.ts | 33 ++++ .../application/utils/query_utils.test.ts | 2 +- .../public/application/utils/query_utils.ts | 2 +- .../explain_log_rate_spikes_analysis.tsx | 42 +---- .../explain_log_rate_spikes_page.tsx | 2 +- .../get_group_table_items.test.ts | 53 ++++++ .../get_group_table_items.ts | 40 ++++ .../components/spike_analysis_table/index.ts | 1 + .../spike_analysis_table_groups.tsx | 10 +- .../spike_analysis_table_row_provider.tsx | 2 +- .../components/spike_analysis_table/types.ts | 17 ++ .../aiops/public/get_document_stats.ts | 2 +- x-pack/plugins/aiops/public/hooks/use_data.ts | 2 +- .../server/routes/explain_log_rate_spikes.ts | 173 +----------------- .../routes/queries/duplicate_identifier.ts | 18 ++ .../routes/queries/fetch_frequent_items.ts | 17 +- .../queries/get_change_point_groups.test.ts | 21 +++ .../routes/queries/get_change_point_groups.ts | 74 ++++++++ .../get_field_value_pair_counts.test.ts | 50 +++++ .../queries/get_field_value_pair_counts.ts | 25 +++ .../get_filtered_frequent_items.test.ts | 20 ++ .../queries/get_filtered_frequent_items.ts | 47 +++++ .../routes/queries/get_group_filter.test.ts | 25 +-- ...get_groups_with_readded_duplicates.test.ts | 55 ++++++ .../get_groups_with_readded_duplicates.ts | 47 +++++ .../queries/get_marked_duplicates.test.ts | 91 +++++++++ .../routes/queries/get_marked_duplicates.ts | 30 +++ .../queries/get_missing_change_points.test.ts | 52 ++++++ .../queries/get_missing_change_points.ts | 19 ++ .../get_simple_hierarchical_tree.test.ts | 133 +++++--------- .../queries/get_simple_hierarchical_tree.ts | 131 +------------ ...et_simple_hierarchical_tree_leaves.test.ts | 35 ++++ .../get_simple_hierarchical_tree_leaves.ts | 42 +++++ .../routes/queries/get_value_counts.test.ts | 31 ++++ .../server/routes/queries/get_value_counts.ts | 18 ++ .../queries/get_values_descending.test.ts | 23 +++ .../routes/queries/get_values_descending.ts | 19 ++ .../transform_change_point_to_group.test.ts | 48 +++++ .../transform_change_point_to_group.ts | 55 ++++++ .../api_integration/apis/aiops/test_data.ts | 72 +------- 47 files changed, 1287 insertions(+), 527 deletions(-) create mode 100644 x-pack/plugins/aiops/common/__mocks__/artificial_logs/change_point_groups.ts create mode 100644 x-pack/plugins/aiops/common/__mocks__/artificial_logs/change_points.ts create mode 100644 x-pack/plugins/aiops/common/__mocks__/artificial_logs/fields.ts create mode 100644 x-pack/plugins/aiops/common/__mocks__/artificial_logs/filtered_frequent_items.ts create mode 100644 x-pack/plugins/aiops/common/__mocks__/artificial_logs/final_change_point_groups.ts create mode 100644 x-pack/plugins/aiops/common/__mocks__/artificial_logs/frequent_items.ts create mode 100644 x-pack/plugins/aiops/common/__mocks__/farequote/change_point_groups.ts create mode 100644 x-pack/plugins/aiops/common/types.ts create mode 100644 x-pack/plugins/aiops/public/components/spike_analysis_table/get_group_table_items.test.ts create mode 100644 x-pack/plugins/aiops/public/components/spike_analysis_table/get_group_table_items.ts create mode 100644 x-pack/plugins/aiops/public/components/spike_analysis_table/types.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/duplicate_identifier.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_change_point_groups.test.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_change_point_groups.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_field_value_pair_counts.test.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_field_value_pair_counts.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_filtered_frequent_items.test.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_filtered_frequent_items.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_groups_with_readded_duplicates.test.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_groups_with_readded_duplicates.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_marked_duplicates.test.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_marked_duplicates.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_missing_change_points.test.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_missing_change_points.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree_leaves.test.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree_leaves.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_value_counts.test.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_value_counts.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_values_descending.test.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/get_values_descending.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/transform_change_point_to_group.test.ts create mode 100644 x-pack/plugins/aiops/server/routes/queries/transform_change_point_to_group.ts diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/change_point_groups.ts b/x-pack/plugins/aiops/common/__mocks__/artificial_logs/change_point_groups.ts new file mode 100644 index 0000000000000..9b580ac36ce26 --- /dev/null +++ b/x-pack/plugins/aiops/common/__mocks__/artificial_logs/change_point_groups.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 type { ChangePointGroup } from '@kbn/ml-agg-utils'; + +export const changePointGroups: ChangePointGroup[] = [ + { + id: '2038579476', + group: [ + { fieldName: 'response_code', fieldValue: '500' }, + { fieldName: 'url', fieldValue: 'home.php' }, + ], + docCount: 792, + pValue: 0.010770456205312423, + }, +]; diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/change_points.ts b/x-pack/plugins/aiops/common/__mocks__/artificial_logs/change_points.ts new file mode 100644 index 0000000000000..5b4597a2ecd8a --- /dev/null +++ b/x-pack/plugins/aiops/common/__mocks__/artificial_logs/change_points.ts @@ -0,0 +1,53 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const changePoints = [ + { + fieldName: 'response_code', + fieldValue: '500', + doc_count: 1821, + bg_count: 553, + total_doc_count: 4671, + total_bg_count: 1975, + score: 26.546201745993947, + pValue: 2.9589053032077285e-12, + normalizedScore: 0.7814127409489161, + }, + { + fieldName: 'url', + fieldValue: 'home.php', + doc_count: 1742, + bg_count: 632, + total_doc_count: 4671, + total_bg_count: 1975, + score: 4.53094842981472, + pValue: 0.010770456205312423, + normalizedScore: 0.10333028878375965, + }, + { + fieldName: 'url', + fieldValue: 'login.php', + doc_count: 1742, + bg_count: 632, + total_doc_count: 4671, + total_bg_count: 1975, + score: 4.53094842981472, + pValue: 0.010770456205312423, + normalizedScore: 0.10333028878375965, + }, + { + fieldName: 'user', + fieldValue: 'Peter', + doc_count: 1981, + bg_count: 553, + total_doc_count: 4671, + total_bg_count: 1975, + score: 47.34435085428873, + pValue: 2.7454255728359757e-21, + normalizedScore: 0.8327337555873047, + }, +]; diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/fields.ts b/x-pack/plugins/aiops/common/__mocks__/artificial_logs/fields.ts new file mode 100644 index 0000000000000..bb42e8a6048e7 --- /dev/null +++ b/x-pack/plugins/aiops/common/__mocks__/artificial_logs/fields.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 const fields = ['response_code', 'url', 'user']; diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/filtered_frequent_items.ts b/x-pack/plugins/aiops/common/__mocks__/artificial_logs/filtered_frequent_items.ts new file mode 100644 index 0000000000000..268516f95542d --- /dev/null +++ b/x-pack/plugins/aiops/common/__mocks__/artificial_logs/filtered_frequent_items.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ItemsetResult } from '../../types'; + +export const filteredFrequentItems: ItemsetResult[] = [ + { + set: { response_code: '500', url: 'home.php' }, + size: 2, + maxPValue: 0.010770456205312423, + doc_count: 792, + support: 0.5262458471760797, + total_doc_count: 1505, + }, + { + set: { user: 'Peter', url: 'home.php' }, + size: 2, + maxPValue: 0.010770456205312423, + doc_count: 634, + support: 0.4212624584717608, + total_doc_count: 1505, + }, +]; diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/final_change_point_groups.ts b/x-pack/plugins/aiops/common/__mocks__/artificial_logs/final_change_point_groups.ts new file mode 100644 index 0000000000000..dce10c1280985 --- /dev/null +++ b/x-pack/plugins/aiops/common/__mocks__/artificial_logs/final_change_point_groups.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ChangePointGroup } from '@kbn/ml-agg-utils'; + +export const finalChangePointGroups: ChangePointGroup[] = [ + { + id: '2038579476', + group: [ + { fieldName: 'response_code', fieldValue: '500', duplicate: false }, + { fieldName: 'url', fieldValue: 'home.php', duplicate: false }, + { fieldName: 'url', fieldValue: 'login.php', duplicate: false }, + ], + docCount: 792, + pValue: 0.010770456205312423, + }, + { + id: '817080373', + group: [{ fieldName: 'user', fieldValue: 'Peter', duplicate: false }], + docCount: 1981, + pValue: 2.7454255728359757e-21, + }, +]; diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/frequent_items.ts b/x-pack/plugins/aiops/common/__mocks__/artificial_logs/frequent_items.ts new file mode 100644 index 0000000000000..fe61a60a1afbe --- /dev/null +++ b/x-pack/plugins/aiops/common/__mocks__/artificial_logs/frequent_items.ts @@ -0,0 +1,59 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ItemsetResult } from '../../types'; + +export const frequentItems: ItemsetResult[] = [ + { + set: { response_code: '500', url: 'home.php' }, + size: 2, + maxPValue: 0.010770456205312423, + doc_count: 792, + support: 0.5262458471760797, + total_doc_count: 1505, + }, + { + set: { user: 'Peter', url: 'home.php' }, + size: 2, + maxPValue: 0.010770456205312423, + doc_count: 634, + support: 0.4212624584717608, + total_doc_count: 1505, + }, + { + set: { response_code: '500', user: 'Mary', url: 'home.php' }, + size: 3, + maxPValue: 0.010770456205312423, + doc_count: 396, + support: 0.26312292358803985, + total_doc_count: 1505, + }, + { + set: { response_code: '500', user: 'Paul', url: 'home.php' }, + size: 3, + maxPValue: 0.010770456205312423, + doc_count: 396, + support: 0.26312292358803985, + total_doc_count: 1505, + }, + { + set: { response_code: '404', user: 'Peter', url: 'home.php' }, + size: 3, + maxPValue: 0.010770456205312423, + doc_count: 317, + support: 0.2106312292358804, + total_doc_count: 1505, + }, + { + set: { response_code: '200', user: 'Peter', url: 'home.php' }, + size: 3, + maxPValue: 0.010770456205312423, + doc_count: 317, + support: 0.2106312292358804, + total_doc_count: 1505, + }, +]; diff --git a/x-pack/plugins/aiops/common/__mocks__/farequote/change_point_groups.ts b/x-pack/plugins/aiops/common/__mocks__/farequote/change_point_groups.ts new file mode 100644 index 0000000000000..b30303e384f84 --- /dev/null +++ b/x-pack/plugins/aiops/common/__mocks__/farequote/change_point_groups.ts @@ -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 type { ChangePointGroup } from '@kbn/ml-agg-utils'; + +export const changePointGroups: ChangePointGroup[] = [ + { + id: 'group-1', + group: [ + { + fieldName: 'custom_field.keyword', + fieldValue: 'deviation', + }, + { + fieldName: 'airline', + fieldValue: 'UAL', + }, + ], + docCount: 101, + pValue: 0.01, + }, + { + id: 'group-2', + group: [ + { + fieldName: 'custom_field.keyword', + fieldValue: 'deviation', + }, + { + fieldName: 'airline', + fieldValue: 'AAL', + }, + ], + docCount: 49, + pValue: 0.001, + }, +]; diff --git a/x-pack/plugins/aiops/common/types.ts b/x-pack/plugins/aiops/common/types.ts new file mode 100644 index 0000000000000..0acb3d07883ad --- /dev/null +++ b/x-pack/plugins/aiops/common/types.ts @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ChangePoint, FieldValuePair } from '@kbn/ml-agg-utils'; + +export interface ChangePointDuplicateGroup { + keys: Pick; + group: ChangePoint[]; +} + +export type FieldValuePairCounts = Record>; + +export interface ItemsetResult { + set: Record; + size: number; + maxPValue: number; + doc_count: number; + support: number; + total_doc_count: number; +} + +export interface SimpleHierarchicalTreeNode { + name: string; + set: FieldValuePair[]; + docCount: number; + pValue: number | null; + children: SimpleHierarchicalTreeNode[]; + addNode: (node: SimpleHierarchicalTreeNode) => void; +} diff --git a/x-pack/plugins/aiops/public/application/utils/query_utils.test.ts b/x-pack/plugins/aiops/public/application/utils/query_utils.test.ts index c886b16fa0ec2..7a2650f02d3a9 100644 --- a/x-pack/plugins/aiops/public/application/utils/query_utils.test.ts +++ b/x-pack/plugins/aiops/public/application/utils/query_utils.test.ts @@ -7,7 +7,7 @@ import type { ChangePoint } from '@kbn/ml-agg-utils'; -import type { GroupTableItem } from '../../components/spike_analysis_table/spike_analysis_table_groups'; +import type { GroupTableItem } from '../../components/spike_analysis_table/types'; import { buildBaseFilterCriteria } from './query_utils'; diff --git a/x-pack/plugins/aiops/public/application/utils/query_utils.ts b/x-pack/plugins/aiops/public/application/utils/query_utils.ts index 0c0363d852bc9..94f5bc4d9f70b 100644 --- a/x-pack/plugins/aiops/public/application/utils/query_utils.ts +++ b/x-pack/plugins/aiops/public/application/utils/query_utils.ts @@ -16,7 +16,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { Query } from '@kbn/es-query'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import type { ChangePoint, FieldValuePair } from '@kbn/ml-agg-utils'; -import type { GroupTableItem } from '../../components/spike_analysis_table/spike_analysis_table_groups'; +import type { GroupTableItem } from '../../components/spike_analysis_table/types'; /* * Contains utility functions for building and processing queries. diff --git a/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx b/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx index e84f50b02711c..b458e1da73516 100644 --- a/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx +++ b/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx @@ -25,14 +25,17 @@ import type { WindowParameters } from '@kbn/aiops-utils'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import type { Query } from '@kbn/es-query'; -import type { FieldValuePair } from '@kbn/ml-agg-utils'; import { useAiopsAppContext } from '../../hooks/use_aiops_app_context'; import { initialState, streamReducer } from '../../../common/api/stream_reducer'; import type { ApiExplainLogRateSpikes } from '../../../common/api'; -import { SpikeAnalysisGroupsTable } from '../spike_analysis_table'; -import { SpikeAnalysisTable } from '../spike_analysis_table'; +import { + getGroupTableItems, + SpikeAnalysisTable, + SpikeAnalysisGroupsTable, +} from '../spike_analysis_table'; +import {} from '../spike_analysis_table'; import { useSpikeAnalysisTableRowContext } from '../spike_analysis_table/spike_analysis_table_row_provider'; const groupResultsMessage = i18n.translate( @@ -159,35 +162,10 @@ export const ExplainLogRateSpikesAnalysis: FC // eslint-disable-next-line react-hooks/exhaustive-deps }, []); - const groupTableItems = useMemo(() => { - const tableItems = data.changePointsGroups.map(({ id, group, docCount, histogram, pValue }) => { - const sortedGroup = group.sort((a, b) => - a.fieldName > b.fieldName ? 1 : b.fieldName > a.fieldName ? -1 : 0 - ); - const dedupedGroup: FieldValuePair[] = []; - const repeatedValues: FieldValuePair[] = []; - - sortedGroup.forEach((pair) => { - const { fieldName, fieldValue } = pair; - if (pair.duplicate === false) { - dedupedGroup.push({ fieldName, fieldValue }); - } else { - repeatedValues.push({ fieldName, fieldValue }); - } - }); - - return { - id, - docCount, - pValue, - group: dedupedGroup, - repeatedValues, - histogram, - }; - }); - - return tableItems; - }, [data.changePointsGroups]); + const groupTableItems = useMemo( + () => getGroupTableItems(data.changePointsGroups), + [data.changePointsGroups] + ); const shouldRerunAnalysis = useMemo( () => diff --git a/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_page.tsx b/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_page.tsx index 6595a9f68db94..a6327331a5105 100644 --- a/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_page.tsx +++ b/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_page.tsx @@ -38,7 +38,7 @@ import { SearchPanel } from '../search_panel'; import { restorableDefaults } from './explain_log_rate_spikes_app_state'; import { ExplainLogRateSpikesAnalysis } from './explain_log_rate_spikes_analysis'; -import type { GroupTableItem } from '../spike_analysis_table/spike_analysis_table_groups'; +import type { GroupTableItem } from '../spike_analysis_table/types'; import { useSpikeAnalysisTableRowContext } from '../spike_analysis_table/spike_analysis_table_row_provider'; // TODO port to `@emotion/react` once `useEuiBreakpoint` is available https://github.com/elastic/eui/pull/6057 diff --git a/x-pack/plugins/aiops/public/components/spike_analysis_table/get_group_table_items.test.ts b/x-pack/plugins/aiops/public/components/spike_analysis_table/get_group_table_items.test.ts new file mode 100644 index 0000000000000..8807479da1242 --- /dev/null +++ b/x-pack/plugins/aiops/public/components/spike_analysis_table/get_group_table_items.test.ts @@ -0,0 +1,53 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { finalChangePointGroups } from '../../../common/__mocks__/artificial_logs/final_change_point_groups'; + +import { getGroupTableItems } from './get_group_table_items'; + +describe('getGroupTableItems', () => { + it('transforms change point groups into table items', () => { + const groupTableItems = getGroupTableItems(finalChangePointGroups); + + expect(groupTableItems).toEqual([ + { + docCount: 792, + group: [ + { + fieldName: 'response_code', + fieldValue: '500', + }, + { + fieldName: 'url', + fieldValue: 'home.php', + }, + { + fieldName: 'url', + fieldValue: 'login.php', + }, + ], + histogram: undefined, + id: '2038579476', + pValue: 0.010770456205312423, + repeatedValues: [], + }, + { + docCount: 1981, + group: [ + { + fieldName: 'user', + fieldValue: 'Peter', + }, + ], + histogram: undefined, + id: '817080373', + pValue: 2.7454255728359757e-21, + repeatedValues: [], + }, + ]); + }); +}); diff --git a/x-pack/plugins/aiops/public/components/spike_analysis_table/get_group_table_items.ts b/x-pack/plugins/aiops/public/components/spike_analysis_table/get_group_table_items.ts new file mode 100644 index 0000000000000..9135a5449e504 --- /dev/null +++ b/x-pack/plugins/aiops/public/components/spike_analysis_table/get_group_table_items.ts @@ -0,0 +1,40 @@ +/* + * Copyright 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 { ChangePointGroup, FieldValuePair } from '@kbn/ml-agg-utils'; + +import type { GroupTableItem } from './types'; + +export function getGroupTableItems(changePointsGroups: ChangePointGroup[]): GroupTableItem[] { + const tableItems = changePointsGroups.map(({ id, group, docCount, histogram, pValue }) => { + const sortedGroup = group.sort((a, b) => + a.fieldName > b.fieldName ? 1 : b.fieldName > a.fieldName ? -1 : 0 + ); + const dedupedGroup: FieldValuePair[] = []; + const repeatedValues: FieldValuePair[] = []; + + sortedGroup.forEach((pair) => { + const { fieldName, fieldValue } = pair; + if (pair.duplicate === false) { + dedupedGroup.push({ fieldName, fieldValue }); + } else { + repeatedValues.push({ fieldName, fieldValue }); + } + }); + + return { + id, + docCount, + pValue, + group: dedupedGroup, + repeatedValues, + histogram, + }; + }); + + return tableItems; +} diff --git a/x-pack/plugins/aiops/public/components/spike_analysis_table/index.ts b/x-pack/plugins/aiops/public/components/spike_analysis_table/index.ts index 120b15b03364f..39452f67d1d6c 100644 --- a/x-pack/plugins/aiops/public/components/spike_analysis_table/index.ts +++ b/x-pack/plugins/aiops/public/components/spike_analysis_table/index.ts @@ -5,5 +5,6 @@ * 2.0. */ +export { getGroupTableItems } from './get_group_table_items'; export { SpikeAnalysisTable } from './spike_analysis_table'; export { SpikeAnalysisGroupsTable } from './spike_analysis_table_groups'; diff --git a/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table_groups.tsx b/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table_groups.tsx index 2551859853771..642f09c66765c 100644 --- a/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table_groups.tsx +++ b/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table_groups.tsx @@ -37,6 +37,7 @@ import { MiniHistogram } from '../mini_histogram'; import { getFailedTransactionsCorrelationImpactLabel } from './get_failed_transactions_correlation_impact_label'; import { SpikeAnalysisTable } from './spike_analysis_table'; import { useSpikeAnalysisTableRowContext } from './spike_analysis_table_row_provider'; +import type { GroupTableItem } from './types'; const NARROW_COLUMN_WIDTH = '120px'; const EXPAND_COLUMN_WIDTH = '40px'; @@ -54,15 +55,6 @@ const viewInDiscoverMessage = i18n.translate( } ); -export interface GroupTableItem { - id: string; - docCount: number; - pValue: number | null; - group: FieldValuePair[]; - repeatedValues: FieldValuePair[]; - histogram: ChangePoint['histogram']; -} - interface SpikeAnalysisTableProps { changePoints: ChangePoint[]; groupTableItems: GroupTableItem[]; diff --git a/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table_row_provider.tsx b/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table_row_provider.tsx index 88b6e508d2f4c..11f61777430ee 100644 --- a/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table_row_provider.tsx +++ b/x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table_row_provider.tsx @@ -17,7 +17,7 @@ import React, { import type { ChangePoint } from '@kbn/ml-agg-utils'; -import type { GroupTableItem } from './spike_analysis_table_groups'; +import type { GroupTableItem } from './types'; type ChangePointOrNull = ChangePoint | null; type GroupOrNull = GroupTableItem | null; diff --git a/x-pack/plugins/aiops/public/components/spike_analysis_table/types.ts b/x-pack/plugins/aiops/public/components/spike_analysis_table/types.ts new file mode 100644 index 0000000000000..842816f5095a6 --- /dev/null +++ b/x-pack/plugins/aiops/public/components/spike_analysis_table/types.ts @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ChangePoint, FieldValuePair } from '@kbn/ml-agg-utils'; + +export interface GroupTableItem { + id: string; + docCount: number; + pValue: number | null; + group: FieldValuePair[]; + repeatedValues: FieldValuePair[]; + histogram: ChangePoint['histogram']; +} diff --git a/x-pack/plugins/aiops/public/get_document_stats.ts b/x-pack/plugins/aiops/public/get_document_stats.ts index b5960a50a4ba0..f95e0eb2cc610 100644 --- a/x-pack/plugins/aiops/public/get_document_stats.ts +++ b/x-pack/plugins/aiops/public/get_document_stats.ts @@ -14,7 +14,7 @@ import type { ChangePoint } from '@kbn/ml-agg-utils'; import type { Query } from '@kbn/es-query'; import { buildBaseFilterCriteria } from './application/utils/query_utils'; -import { GroupTableItem } from './components/spike_analysis_table/spike_analysis_table_groups'; +import { GroupTableItem } from './components/spike_analysis_table/types'; export interface DocumentCountStats { interval?: number; diff --git a/x-pack/plugins/aiops/public/hooks/use_data.ts b/x-pack/plugins/aiops/public/hooks/use_data.ts index 75554d5a9b96e..73b5f79be3b4f 100644 --- a/x-pack/plugins/aiops/public/hooks/use_data.ts +++ b/x-pack/plugins/aiops/public/hooks/use_data.ts @@ -27,7 +27,7 @@ import { import { useTimefilter } from './use_time_filter'; import { useDocumentCountStats } from './use_document_count_stats'; import type { Dictionary } from './use_url_state'; -import type { GroupTableItem } from '../components/spike_analysis_table/spike_analysis_table_groups'; +import type { GroupTableItem } from '../components/spike_analysis_table/types'; const DEFAULT_BAR_TARGET = 75; diff --git a/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts b/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts index 03021415410ed..dfbc313632efc 100644 --- a/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts +++ b/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts @@ -6,7 +6,6 @@ */ import { queue } from 'async'; -import { uniqWith, isEqual } from 'lodash'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; @@ -23,7 +22,6 @@ import type { NumericHistogramField, } from '@kbn/ml-agg-utils'; import { fetchHistogramsForFields } from '@kbn/ml-agg-utils'; -import { stringHash } from '@kbn/ml-string-hash'; import { addChangePointsAction, @@ -43,22 +41,13 @@ import { API_ENDPOINT } from '../../common/api'; import { isRequestAbortedError } from '../lib/is_request_aborted_error'; import type { AiopsLicense } from '../types'; +import { duplicateIdentifier } from './queries/duplicate_identifier'; import { fetchChangePointPValues } from './queries/fetch_change_point_p_values'; import { fetchIndexInfo } from './queries/fetch_index_info'; -import { - dropDuplicates, - fetchFrequentItems, - groupDuplicates, -} from './queries/fetch_frequent_items'; -import type { ItemsetResult } from './queries/fetch_frequent_items'; +import { dropDuplicates, fetchFrequentItems } from './queries/fetch_frequent_items'; import { getHistogramQuery } from './queries/get_histogram_query'; -import { - getFieldValuePairCounts, - getSimpleHierarchicalTree, - getSimpleHierarchicalTreeLeaves, - markDuplicates, -} from './queries/get_simple_hierarchical_tree'; import { getGroupFilter } from './queries/get_group_filter'; +import { getChangePointGroups } from './queries/get_change_point_groups'; // 10s ping frequency to keep the stream alive. const PING_FREQUENCY = 10000; @@ -434,25 +423,9 @@ export const defineExplainLogRateSpikesRoute = ( }) ); - // To optimize the `frequent_items` query, we identify duplicate change points by count attributes. - // Note this is a compromise and not 100% accurate because there could be change points that - // have the exact same counts but still don't co-occur. - const duplicateIdentifier: Array = [ - 'doc_count', - 'bg_count', - 'total_doc_count', - 'total_bg_count', - ]; - - // These are the deduplicated change points we pass to the `frequent_items` aggregation. + // Deduplicated change points we pass to the `frequent_items` aggregation. const deduplicatedChangePoints = dropDuplicates(changePoints, duplicateIdentifier); - // We use the grouped change points to later repopulate - // the `frequent_items` result with the missing duplicates. - const groupedChangePoints = groupDuplicates(changePoints, duplicateIdentifier).filter( - (g) => g.group.length > 1 - ); - try { const { fields, df } = await fetchFrequentItems( client, @@ -475,143 +448,9 @@ export const defineExplainLogRateSpikesRoute = ( } if (fields.length > 0 && df.length > 0) { - // The way the `frequent_items` aggregations works could return item sets that include - // field/value pairs that are not part of the original list of significant change points. - // This cleans up groups and removes those unrelated field/value pairs. - const filteredDf = df - .map((fi, fiIndex) => { - const updatedSet = Object.entries(fi.set).reduce( - (set, [field, value]) => { - if ( - changePoints.some( - (cp) => cp.fieldName === field && cp.fieldValue === value - ) - ) { - set[field] = value; - } - return set; - }, - {} - ); - - // only assign the updated reduced set if it doesn't already match - // an existing set. if there's a match just add an empty set - // so it will be filtered in the last step. - fi.set = df.some((d, dIndex) => fiIndex !== dIndex && isEqual(fi.set, d.set)) - ? {} - : updatedSet; - - fi.size = Object.keys(fi.set).length; - - return fi; - }) - .filter((fi) => fi.size > 1); - - // `frequent_items` returns lot of different small groups of field/value pairs that co-occur. - // The following steps analyse these small groups, identify overlap between these groups, - // and then summarize them in larger groups where possible. - - // Get a tree structure based on `frequent_items`. - const { root } = getSimpleHierarchicalTree(filteredDf, true, false, fields); - - // Each leave of the tree will be a summarized group of co-occuring field/value pairs. - const treeLeaves = getSimpleHierarchicalTreeLeaves(root, []); - - // To be able to display a more cleaned up results table in the UI, we identify field/value pairs - // that occur in multiple groups. This will allow us to highlight field/value pairs that are - // unique to a group in a better way. This step will also re-add duplicates we identified in the - // beginning and didn't pass on to the `frequent_items` agg. - const fieldValuePairCounts = getFieldValuePairCounts(treeLeaves); - const changePointGroups = markDuplicates(treeLeaves, fieldValuePairCounts).map( - (g) => { - const group = [...g.group]; - - for (const groupItem of g.group) { - const { duplicate } = groupItem; - const duplicates = groupedChangePoints.find((d) => - d.group.some( - (dg) => - dg.fieldName === groupItem.fieldName && - dg.fieldValue === groupItem.fieldValue - ) - ); - - if (duplicates !== undefined) { - group.push( - ...duplicates.group.map((d) => { - return { - fieldName: d.fieldName, - fieldValue: d.fieldValue, - duplicate, - }; - }) - ); - } - } - - return { - ...g, - group: uniqWith(group, (a, b) => isEqual(a, b)), - }; - } - ); - - // Some field/value pairs might not be part of the `frequent_items` result set, for example - // because they don't co-occur with other field/value pairs or because of the limits we set on the query. - // In this next part we identify those missing pairs and add them as individual groups. - const missingChangePoints = deduplicatedChangePoints.filter((cp) => { - return !changePointGroups.some((cpg) => { - return cpg.group.some( - (d) => d.fieldName === cp.fieldName && d.fieldValue === cp.fieldValue - ); - }); - }); - - changePointGroups.push( - ...missingChangePoints.map( - ({ fieldName, fieldValue, doc_count: docCount, pValue }) => { - const duplicates = groupedChangePoints.find((d) => - d.group.some( - (dg) => dg.fieldName === fieldName && dg.fieldValue === fieldValue - ) - ); - if (duplicates !== undefined) { - return { - id: `${stringHash( - JSON.stringify( - duplicates.group.map((d) => ({ - fieldName: d.fieldName, - fieldValue: d.fieldValue, - })) - ) - )}`, - group: duplicates.group.map((d) => ({ - fieldName: d.fieldName, - fieldValue: d.fieldValue, - duplicate: false, - })), - docCount, - pValue, - }; - } else { - return { - id: `${stringHash(JSON.stringify({ fieldName, fieldValue }))}`, - group: [ - { - fieldName, - fieldValue, - duplicate: false, - }, - ], - docCount, - pValue, - }; - } - } - ) - ); + const changePointGroups = getChangePointGroups(df, changePoints, fields); - // Finally, we'll find out if there's at least one group with at least two items, + // We'll find out if there's at least one group with at least two items, // only then will we return the groups to the clients and make the grouping option available. const maxItems = Math.max(...changePointGroups.map((g) => g.group.length)); diff --git a/x-pack/plugins/aiops/server/routes/queries/duplicate_identifier.ts b/x-pack/plugins/aiops/server/routes/queries/duplicate_identifier.ts new file mode 100644 index 0000000000000..d996c060f7fe9 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/duplicate_identifier.ts @@ -0,0 +1,18 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ChangePoint } from '@kbn/ml-agg-utils'; + +// To optimize the `frequent_items` query, we identify duplicate change points by count attributes. +// Note this is a compromise and not 100% accurate because there could be change points that +// have the exact same counts but still don't co-occur. +export const duplicateIdentifier: Array = [ + 'doc_count', + 'bg_count', + 'total_doc_count', + 'total_bg_count', +]; diff --git a/x-pack/plugins/aiops/server/routes/queries/fetch_frequent_items.ts b/x-pack/plugins/aiops/server/routes/queries/fetch_frequent_items.ts index ff1fba16f28f2..76aeeb1eabcdb 100644 --- a/x-pack/plugins/aiops/server/routes/queries/fetch_frequent_items.ts +++ b/x-pack/plugins/aiops/server/routes/queries/fetch_frequent_items.ts @@ -11,9 +11,11 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { Logger } from '@kbn/logging'; -import { type ChangePoint, type FieldValuePair, RANDOM_SAMPLER_SEED } from '@kbn/ml-agg-utils'; +import { type ChangePoint, RANDOM_SAMPLER_SEED } from '@kbn/ml-agg-utils'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import type { ChangePointDuplicateGroup, ItemsetResult } from '../../../common/types'; + const FREQUENT_ITEMS_FIELDS_LIMIT = 15; interface FrequentItemsAggregation extends estypes.AggregationsSamplerAggregation { @@ -34,10 +36,6 @@ export function dropDuplicates(cps: ChangePoint[], uniqueFields: Array isEqual(pick(a, uniqueFields), pick(b, uniqueFields))); } -interface ChangePointDuplicateGroup { - keys: Pick; - group: ChangePoint[]; -} export function groupDuplicates(cps: ChangePoint[], uniqueFields: Array) { const groups: ChangePointDuplicateGroup[] = []; @@ -226,12 +224,3 @@ export async function fetchFrequentItems( totalDocCount: totalDocCountFi, }; } - -export interface ItemsetResult { - set: Record; - size: number; - maxPValue: number; - doc_count: number; - support: number; - total_doc_count: number; -} diff --git a/x-pack/plugins/aiops/server/routes/queries/get_change_point_groups.test.ts b/x-pack/plugins/aiops/server/routes/queries/get_change_point_groups.test.ts new file mode 100644 index 0000000000000..2496e9e927f0e --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_change_point_groups.test.ts @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { fields } from '../../../common/__mocks__/artificial_logs/fields'; +import { frequentItems } from '../../../common/__mocks__/artificial_logs/frequent_items'; +import { changePoints } from '../../../common/__mocks__/artificial_logs/change_points'; +import { finalChangePointGroups } from '../../../common/__mocks__/artificial_logs/final_change_point_groups'; + +import { getChangePointGroups } from './get_change_point_groups'; + +describe('getChangePointGroups', () => { + it('gets change point groups', () => { + const changePointGroups = getChangePointGroups(frequentItems, changePoints, fields); + + expect(changePointGroups).toEqual(finalChangePointGroups); + }); +}); diff --git a/x-pack/plugins/aiops/server/routes/queries/get_change_point_groups.ts b/x-pack/plugins/aiops/server/routes/queries/get_change_point_groups.ts new file mode 100644 index 0000000000000..fa0722b15c9a4 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_change_point_groups.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. + */ + +import type { ChangePoint, ChangePointGroup } from '@kbn/ml-agg-utils'; + +import { duplicateIdentifier } from './duplicate_identifier'; +import { dropDuplicates, groupDuplicates } from './fetch_frequent_items'; +import { getFieldValuePairCounts } from './get_field_value_pair_counts'; +import { getMarkedDuplicates } from './get_marked_duplicates'; +import { getSimpleHierarchicalTree } from './get_simple_hierarchical_tree'; +import { getSimpleHierarchicalTreeLeaves } from './get_simple_hierarchical_tree_leaves'; +import { getFilteredFrequentItems } from './get_filtered_frequent_items'; +import { getGroupsWithReaddedDuplicates } from './get_groups_with_readded_duplicates'; +import { getMissingChangePoints } from './get_missing_change_points'; +import { transformChangePointToGroup } from './transform_change_point_to_group'; +import type { ItemsetResult } from '../../../common/types'; + +export function getChangePointGroups( + itemsets: ItemsetResult[], + changePoints: ChangePoint[], + fields: string[] +): ChangePointGroup[] { + // These are the deduplicated change points we pass to the `frequent_items` aggregation. + const deduplicatedChangePoints = dropDuplicates(changePoints, duplicateIdentifier); + + // We use the grouped change points to later repopulate + // the `frequent_items` result with the missing duplicates. + const groupedChangePoints = groupDuplicates(changePoints, duplicateIdentifier).filter( + (g) => g.group.length > 1 + ); + + const filteredDf = getFilteredFrequentItems(itemsets, changePoints); + + // `frequent_items` returns lot of different small groups of field/value pairs that co-occur. + // The following steps analyse these small groups, identify overlap between these groups, + // and then summarize them in larger groups where possible. + + // Get a tree structure based on `frequent_items`. + const { root } = getSimpleHierarchicalTree(filteredDf, true, false, fields); + + // Each leave of the tree will be a summarized group of co-occuring field/value pairs. + const treeLeaves = getSimpleHierarchicalTreeLeaves(root, []); + + // To be able to display a more cleaned up results table in the UI, we identify field/value pairs + // that occur in multiple groups. This will allow us to highlight field/value pairs that are + // unique to a group in a better way. This step will also re-add duplicates we identified in the + // beginning and didn't pass on to the `frequent_items` agg. + const fieldValuePairCounts = getFieldValuePairCounts(treeLeaves); + const changePointGroupsWithMarkedDuplicates = getMarkedDuplicates( + treeLeaves, + fieldValuePairCounts + ); + const changePointGroups = getGroupsWithReaddedDuplicates( + changePointGroupsWithMarkedDuplicates, + groupedChangePoints + ); + + // Some field/value pairs might not be part of the `frequent_items` result set, for example + // because they don't co-occur with other field/value pairs or because of the limits we set on the query. + // In this next part we identify those missing pairs and add them as individual groups. + const missingChangePoints = getMissingChangePoints(deduplicatedChangePoints, changePointGroups); + + changePointGroups.push( + ...missingChangePoints.map((changePoint) => + transformChangePointToGroup(changePoint, groupedChangePoints) + ) + ); + + return changePointGroups; +} diff --git a/x-pack/plugins/aiops/server/routes/queries/get_field_value_pair_counts.test.ts b/x-pack/plugins/aiops/server/routes/queries/get_field_value_pair_counts.test.ts new file mode 100644 index 0000000000000..d5b56751fa173 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_field_value_pair_counts.test.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 { changePointGroups } from '../../../common/__mocks__/farequote/change_point_groups'; +import { fields } from '../../../common/__mocks__/artificial_logs/fields'; +import { filteredFrequentItems } from '../../../common/__mocks__/artificial_logs/filtered_frequent_items'; + +import { getFieldValuePairCounts } from './get_field_value_pair_counts'; +import { getSimpleHierarchicalTree } from './get_simple_hierarchical_tree'; +import { getSimpleHierarchicalTreeLeaves } from './get_simple_hierarchical_tree_leaves'; + +describe('getFieldValuePairCounts', () => { + it('returns a nested record with field/value pair counts for farequote', () => { + const fieldValuePairCounts = getFieldValuePairCounts(changePointGroups); + + expect(fieldValuePairCounts).toEqual({ + airline: { + AAL: 1, + UAL: 1, + }, + 'custom_field.keyword': { + deviation: 2, + }, + }); + }); + + it('returns a nested record with field/value pair counts for artificial logs', () => { + const simpleHierarchicalTree = getSimpleHierarchicalTree( + filteredFrequentItems, + true, + false, + fields + ); + const leaves = getSimpleHierarchicalTreeLeaves(simpleHierarchicalTree.root, []); + const fieldValuePairCounts = getFieldValuePairCounts(leaves); + + expect(fieldValuePairCounts).toEqual({ + response_code: { + '500': 1, + }, + url: { + 'home.php': 1, + }, + }); + }); +}); diff --git a/x-pack/plugins/aiops/server/routes/queries/get_field_value_pair_counts.ts b/x-pack/plugins/aiops/server/routes/queries/get_field_value_pair_counts.ts new file mode 100644 index 0000000000000..1c5f5ca33d718 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_field_value_pair_counts.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 type { ChangePointGroup } from '@kbn/ml-agg-utils'; + +import type { FieldValuePairCounts } from '../../../common/types'; + +/** + * Get a nested record of field/value pairs with counts + */ +export function getFieldValuePairCounts(cpgs: ChangePointGroup[]): FieldValuePairCounts { + return cpgs.reduce((p, { group }) => { + group.forEach(({ fieldName, fieldValue }) => { + if (p[fieldName] === undefined) { + p[fieldName] = {}; + } + p[fieldName][fieldValue] = p[fieldName][fieldValue] ? p[fieldName][fieldValue] + 1 : 1; + }); + return p; + }, {}); +} diff --git a/x-pack/plugins/aiops/server/routes/queries/get_filtered_frequent_items.test.ts b/x-pack/plugins/aiops/server/routes/queries/get_filtered_frequent_items.test.ts new file mode 100644 index 0000000000000..8399c0366dea1 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_filtered_frequent_items.test.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 { changePoints } from '../../../common/__mocks__/artificial_logs/change_points'; +import { frequentItems } from '../../../common/__mocks__/artificial_logs/frequent_items'; +import { filteredFrequentItems } from '../../../common/__mocks__/artificial_logs/filtered_frequent_items'; + +import { getFilteredFrequentItems } from './get_filtered_frequent_items'; + +describe('getFilteredFrequentItems', () => { + it('filter frequent item set based on provided change points', () => { + expect(getFilteredFrequentItems(frequentItems, changePoints)).toStrictEqual( + filteredFrequentItems + ); + }); +}); diff --git a/x-pack/plugins/aiops/server/routes/queries/get_filtered_frequent_items.ts b/x-pack/plugins/aiops/server/routes/queries/get_filtered_frequent_items.ts new file mode 100644 index 0000000000000..e071621f6d9f7 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_filtered_frequent_items.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 { isEqual } from 'lodash'; + +import type { ChangePoint } from '@kbn/ml-agg-utils'; + +import type { ItemsetResult } from '../../../common/types'; + +// The way the `frequent_items` aggregation works could return item sets that include +// field/value pairs that are not part of the original list of significant change points. +// This cleans up groups and removes those unrelated field/value pairs. +export function getFilteredFrequentItems( + itemsets: ItemsetResult[], + changePoints: ChangePoint[] +): ItemsetResult[] { + return itemsets.reduce((p, itemset, itemsetIndex) => { + // Remove field/value pairs not part of the provided change points + itemset.set = Object.entries(itemset.set).reduce( + (set, [field, value]) => { + if (changePoints.some((cp) => cp.fieldName === field && cp.fieldValue === value)) { + set[field] = value; + } + return set; + }, + {} + ); + + // Only assign the updated reduced set if it doesn't already match + // an existing set. if there's a match just add an empty set + // so it will be filtered in the last step. + if (itemsets.some((d, dIndex) => itemsetIndex !== dIndex && isEqual(itemset.set, d.set))) { + return p; + } + + // Update the size attribute to match the possibly updated set + itemset.size = Object.keys(itemset.set).length; + + p.push(itemset); + + return p; + }, []); +} diff --git a/x-pack/plugins/aiops/server/routes/queries/get_group_filter.test.ts b/x-pack/plugins/aiops/server/routes/queries/get_group_filter.test.ts index 432450ede9b45..b2c15d70e83f9 100644 --- a/x-pack/plugins/aiops/server/routes/queries/get_group_filter.test.ts +++ b/x-pack/plugins/aiops/server/routes/queries/get_group_filter.test.ts @@ -5,30 +5,13 @@ * 2.0. */ -import { getGroupFilter } from './get_group_filter'; +import { finalChangePointGroups } from '../../../common/__mocks__/artificial_logs/final_change_point_groups'; -const changePointGroups = [ - { - id: '2038579476', - group: [ - { fieldName: 'response_code', fieldValue: '500', duplicate: false }, - { fieldName: 'url', fieldValue: 'home.php', duplicate: false }, - { fieldName: 'url', fieldValue: 'login.php', duplicate: false }, - ], - docCount: 792, - pValue: 0.010770456205312423, - }, - { - id: '817080373', - group: [{ fieldName: 'user', fieldValue: 'Peter', duplicate: false }], - docCount: 1981, - pValue: 2.7454255728359757e-21, - }, -]; +import { getGroupFilter } from './get_group_filter'; describe('getGroupFilter', () => { it('gets a query filter for the change points of a group with multiple values per field', () => { - expect(getGroupFilter(changePointGroups[0])).toStrictEqual([ + expect(getGroupFilter(finalChangePointGroups[0])).toStrictEqual([ { term: { response_code: '500', @@ -43,7 +26,7 @@ describe('getGroupFilter', () => { }); it('gets a query filter for the change points of a group with just a single field/value', () => { - expect(getGroupFilter(changePointGroups[1])).toStrictEqual([ + expect(getGroupFilter(finalChangePointGroups[1])).toStrictEqual([ { term: { user: 'Peter', diff --git a/x-pack/plugins/aiops/server/routes/queries/get_groups_with_readded_duplicates.test.ts b/x-pack/plugins/aiops/server/routes/queries/get_groups_with_readded_duplicates.test.ts new file mode 100644 index 0000000000000..50b5719e49fa4 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_groups_with_readded_duplicates.test.ts @@ -0,0 +1,55 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { changePointGroups } from '../../../common/__mocks__/artificial_logs/change_point_groups'; +import { changePoints } from '../../../common/__mocks__/artificial_logs/change_points'; + +import { duplicateIdentifier } from './duplicate_identifier'; +import { getGroupsWithReaddedDuplicates } from './get_groups_with_readded_duplicates'; +import { groupDuplicates } from './fetch_frequent_items'; +import { getFieldValuePairCounts } from './get_field_value_pair_counts'; +import { getMarkedDuplicates } from './get_marked_duplicates'; + +describe('getGroupsWithReaddedDuplicates', () => { + it('gets groups with readded duplicates', () => { + const groupedChangePoints = groupDuplicates(changePoints, duplicateIdentifier).filter( + (g) => g.group.length > 1 + ); + + const fieldValuePairCounts = getFieldValuePairCounts(changePointGroups); + const markedDuplicates = getMarkedDuplicates(changePointGroups, fieldValuePairCounts); + const groupsWithReaddedDuplicates = getGroupsWithReaddedDuplicates( + markedDuplicates, + groupedChangePoints + ); + + expect(groupsWithReaddedDuplicates).toEqual([ + { + docCount: 792, + group: [ + { + duplicate: false, + fieldName: 'response_code', + fieldValue: '500', + }, + { + duplicate: false, + fieldName: 'url', + fieldValue: 'home.php', + }, + { + duplicate: false, + fieldName: 'url', + fieldValue: 'login.php', + }, + ], + id: '2038579476', + pValue: 0.010770456205312423, + }, + ]); + }); +}); diff --git a/x-pack/plugins/aiops/server/routes/queries/get_groups_with_readded_duplicates.ts b/x-pack/plugins/aiops/server/routes/queries/get_groups_with_readded_duplicates.ts new file mode 100644 index 0000000000000..91622c2b15419 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_groups_with_readded_duplicates.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 { uniqWith, isEqual } from 'lodash'; + +import type { ChangePointGroup } from '@kbn/ml-agg-utils'; + +import type { ChangePointDuplicateGroup } from '../../../common/types'; + +export function getGroupsWithReaddedDuplicates( + groups: ChangePointGroup[], + groupedChangePoints: ChangePointDuplicateGroup[] +): ChangePointGroup[] { + return groups.map((g) => { + const group = [...g.group]; + + for (const groupItem of g.group) { + const { duplicate } = groupItem; + const duplicates = groupedChangePoints.find((d) => + d.group.some( + (dg) => dg.fieldName === groupItem.fieldName && dg.fieldValue === groupItem.fieldValue + ) + ); + + if (duplicates !== undefined) { + group.push( + ...duplicates.group.map((d) => { + return { + fieldName: d.fieldName, + fieldValue: d.fieldValue, + duplicate, + }; + }) + ); + } + } + + return { + ...g, + group: uniqWith(group, (a, b) => isEqual(a, b)), + }; + }); +} diff --git a/x-pack/plugins/aiops/server/routes/queries/get_marked_duplicates.test.ts b/x-pack/plugins/aiops/server/routes/queries/get_marked_duplicates.test.ts new file mode 100644 index 0000000000000..e44a26d70494c --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_marked_duplicates.test.ts @@ -0,0 +1,91 @@ +/* + * Copyright 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 { changePointGroups } from '../../../common/__mocks__/farequote/change_point_groups'; +import { fields } from '../../../common/__mocks__/artificial_logs/fields'; +import { filteredFrequentItems } from '../../../common/__mocks__/artificial_logs/filtered_frequent_items'; + +import { getFieldValuePairCounts } from './get_field_value_pair_counts'; +import { getMarkedDuplicates } from './get_marked_duplicates'; +import { getSimpleHierarchicalTree } from './get_simple_hierarchical_tree'; +import { getSimpleHierarchicalTreeLeaves } from './get_simple_hierarchical_tree_leaves'; + +describe('markDuplicates', () => { + it('marks duplicates based on change point groups for farequote', () => { + const fieldValuePairCounts = getFieldValuePairCounts(changePointGroups); + const markedDuplicates = getMarkedDuplicates(changePointGroups, fieldValuePairCounts); + + expect(markedDuplicates).toEqual([ + { + id: 'group-1', + group: [ + { + fieldName: 'custom_field.keyword', + fieldValue: 'deviation', + duplicate: true, + }, + { + fieldName: 'airline', + fieldValue: 'UAL', + duplicate: false, + }, + ], + docCount: 101, + pValue: 0.01, + }, + { + id: 'group-2', + group: [ + { + fieldName: 'custom_field.keyword', + fieldValue: 'deviation', + duplicate: true, + }, + { + fieldName: 'airline', + fieldValue: 'AAL', + duplicate: false, + }, + ], + docCount: 49, + pValue: 0.001, + }, + ]); + }); + + it('marks duplicates based on change point groups for artificial logs', () => { + const simpleHierarchicalTree = getSimpleHierarchicalTree( + filteredFrequentItems, + true, + false, + fields + ); + const leaves = getSimpleHierarchicalTreeLeaves(simpleHierarchicalTree.root, []); + const fieldValuePairCounts = getFieldValuePairCounts(leaves); + const markedDuplicates = getMarkedDuplicates(leaves, fieldValuePairCounts); + + expect(markedDuplicates).toEqual([ + { + docCount: 792, + group: [ + { + duplicate: false, + fieldName: 'response_code', + fieldValue: '500', + }, + { + duplicate: false, + fieldName: 'url', + fieldValue: 'home.php', + }, + ], + id: '2038579476', + pValue: 0.010770456205312423, + }, + ]); + }); +}); diff --git a/x-pack/plugins/aiops/server/routes/queries/get_marked_duplicates.ts b/x-pack/plugins/aiops/server/routes/queries/get_marked_duplicates.ts new file mode 100644 index 0000000000000..a4ed85e8e94b6 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_marked_duplicates.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 { ChangePointGroup } from '@kbn/ml-agg-utils'; + +import type { FieldValuePairCounts } from '../../../common/types'; + +/** + * Analyse duplicate field/value pairs in change point groups. + */ +export function getMarkedDuplicates( + cpgs: ChangePointGroup[], + fieldValuePairCounts: FieldValuePairCounts +): ChangePointGroup[] { + return cpgs.map((cpg) => { + return { + ...cpg, + group: cpg.group.map((g) => { + return { + ...g, + duplicate: fieldValuePairCounts[g.fieldName][g.fieldValue] > 1, + }; + }), + }; + }); +} diff --git a/x-pack/plugins/aiops/server/routes/queries/get_missing_change_points.test.ts b/x-pack/plugins/aiops/server/routes/queries/get_missing_change_points.test.ts new file mode 100644 index 0000000000000..477321b74e007 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_missing_change_points.test.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 { changePointGroups } from '../../../common/__mocks__/artificial_logs/change_point_groups'; +import { changePoints } from '../../../common/__mocks__/artificial_logs/change_points'; + +import { duplicateIdentifier } from './duplicate_identifier'; +import { getGroupsWithReaddedDuplicates } from './get_groups_with_readded_duplicates'; +import { dropDuplicates, groupDuplicates } from './fetch_frequent_items'; +import { getFieldValuePairCounts } from './get_field_value_pair_counts'; +import { getMarkedDuplicates } from './get_marked_duplicates'; +import { getMissingChangePoints } from './get_missing_change_points'; + +describe('getMissingChangePoints', () => { + it('get missing change points', () => { + const deduplicatedChangePoints = dropDuplicates(changePoints, duplicateIdentifier); + + const groupedChangePoints = groupDuplicates(changePoints, duplicateIdentifier).filter( + (g) => g.group.length > 1 + ); + + const fieldValuePairCounts = getFieldValuePairCounts(changePointGroups); + const markedDuplicates = getMarkedDuplicates(changePointGroups, fieldValuePairCounts); + const groupsWithReaddedDuplicates = getGroupsWithReaddedDuplicates( + markedDuplicates, + groupedChangePoints + ); + + const missingChangePoints = getMissingChangePoints( + deduplicatedChangePoints, + groupsWithReaddedDuplicates + ); + + expect(missingChangePoints).toEqual([ + { + bg_count: 553, + doc_count: 1981, + fieldName: 'user', + fieldValue: 'Peter', + normalizedScore: 0.8327337555873047, + pValue: 2.7454255728359757e-21, + score: 47.34435085428873, + total_bg_count: 1975, + total_doc_count: 4671, + }, + ]); + }); +}); diff --git a/x-pack/plugins/aiops/server/routes/queries/get_missing_change_points.ts b/x-pack/plugins/aiops/server/routes/queries/get_missing_change_points.ts new file mode 100644 index 0000000000000..57422ad16213f --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_missing_change_points.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 type { ChangePoint, ChangePointGroup } from '@kbn/ml-agg-utils'; + +export function getMissingChangePoints( + deduplicatedChangePoints: ChangePoint[], + changePointGroups: ChangePointGroup[] +) { + return deduplicatedChangePoints.filter((cp) => { + return !changePointGroups.some((cpg) => { + return cpg.group.some((d) => d.fieldName === cp.fieldName && d.fieldValue === cp.fieldValue); + }); + }); +} diff --git a/x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree.test.ts b/x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree.test.ts index 5f2125a583db7..36cc113ad7be0 100644 --- a/x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree.test.ts +++ b/x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree.test.ts @@ -5,101 +5,50 @@ * 2.0. */ -import type { ChangePointGroup } from '@kbn/ml-agg-utils'; +import { fields } from '../../../common/__mocks__/artificial_logs/fields'; +import { filteredFrequentItems } from '../../../common/__mocks__/artificial_logs/filtered_frequent_items'; -import { getFieldValuePairCounts, markDuplicates } from './get_simple_hierarchical_tree'; +import { getSimpleHierarchicalTree } from './get_simple_hierarchical_tree'; -const changePointGroups: ChangePointGroup[] = [ - { - id: 'group-1', - group: [ - { - fieldName: 'custom_field.keyword', - fieldValue: 'deviation', +describe('getSimpleHierarchicalTree', () => { + it('returns the hierarchical tree', () => { + // stringify and again parse the tree to remove attached methods + // and make it comparable against a static representation. + expect( + JSON.parse( + JSON.stringify(getSimpleHierarchicalTree(filteredFrequentItems, true, false, fields)) + ) + ).toEqual({ + root: { + name: '', + set: [], + docCount: 0, + pValue: 0, + children: [ + { + name: "792/1505 500 home.php '*'", + set: [ + { fieldName: 'response_code', fieldValue: '500' }, + { fieldName: 'url', fieldValue: 'home.php' }, + ], + docCount: 792, + pValue: 0.010770456205312423, + children: [ + { + name: "792/1505 500 home.php '*'", + set: [ + { fieldName: 'response_code', fieldValue: '500' }, + { fieldName: 'url', fieldValue: 'home.php' }, + ], + docCount: 792, + pValue: 0.010770456205312423, + children: [], + }, + ], + }, + ], }, - { - fieldName: 'airline', - fieldValue: 'UAL', - }, - ], - docCount: 101, - pValue: 0.01, - }, - { - id: 'group-2', - group: [ - { - fieldName: 'custom_field.keyword', - fieldValue: 'deviation', - }, - { - fieldName: 'airline', - fieldValue: 'AAL', - }, - ], - docCount: 49, - pValue: 0.001, - }, -]; - -describe('get_simple_hierarchical_tree', () => { - describe('getFieldValuePairCounts', () => { - it('returns a nested record with field/value pair counts', () => { - const fieldValuePairCounts = getFieldValuePairCounts(changePointGroups); - - expect(fieldValuePairCounts).toEqual({ - airline: { - AAL: 1, - UAL: 1, - }, - 'custom_field.keyword': { - deviation: 2, - }, - }); - }); - }); - - describe('markDuplicates', () => { - it('marks duplicates based on change point groups', () => { - const fieldValuePairCounts = getFieldValuePairCounts(changePointGroups); - const markedDuplicates = markDuplicates(changePointGroups, fieldValuePairCounts); - - expect(markedDuplicates).toEqual([ - { - id: 'group-1', - group: [ - { - fieldName: 'custom_field.keyword', - fieldValue: 'deviation', - duplicate: true, - }, - { - fieldName: 'airline', - fieldValue: 'UAL', - duplicate: false, - }, - ], - docCount: 101, - pValue: 0.01, - }, - { - id: 'group-2', - group: [ - { - fieldName: 'custom_field.keyword', - fieldValue: 'deviation', - duplicate: true, - }, - { - fieldName: 'airline', - fieldValue: 'AAL', - duplicate: false, - }, - ], - docCount: 49, - pValue: 0.001, - }, - ]); + fields: ['response_code', 'url', 'user'], }); }); }); diff --git a/x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree.ts b/x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree.ts index 9f39d1eb11f68..41c014e27af44 100644 --- a/x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree.ts +++ b/x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree.ts @@ -5,47 +5,15 @@ * 2.0. */ -// import { omit, uniq } from 'lodash'; +import type { ItemsetResult, SimpleHierarchicalTreeNode } from '../../../common/types'; -import type { ChangePointGroup, FieldValuePair } from '@kbn/ml-agg-utils'; -import { stringHash } from '@kbn/ml-string-hash'; +import { getValueCounts } from './get_value_counts'; +import { getValuesDescending } from './get_values_descending'; -import type { ItemsetResult } from './fetch_frequent_items'; +function NewNodeFactory(name: string): SimpleHierarchicalTreeNode { + const children: SimpleHierarchicalTreeNode[] = []; -function getValueCounts(df: ItemsetResult[], field: string) { - return df.reduce>((p, c) => { - if (c.set[field] === undefined) { - return p; - } - p[c.set[field]] = p[c.set[field]] ? p[c.set[field]] + 1 : 1; - return p; - }, {}); -} - -function getValuesDescending(df: ItemsetResult[], field: string): string[] { - const valueCounts = getValueCounts(df, field); - const keys = Object.keys(valueCounts); - - return keys.sort((a, b) => { - return valueCounts[b] - valueCounts[a]; - }); -} - -interface NewNode { - name: string; - set: FieldValuePair[]; - docCount: number; - pValue: number | null; - children: NewNode[]; - icon: string; - iconStyle: string; - addNode: (node: NewNode) => void; -} - -function NewNodeFactory(name: string): NewNode { - const children: NewNode[] = []; - - const addNode = (node: NewNode) => { + const addNode = (node: SimpleHierarchicalTreeNode) => { children.push(node); }; @@ -55,19 +23,15 @@ function NewNodeFactory(name: string): NewNode { docCount: 0, pValue: 0, children, - icon: 'default', - iconStyle: 'default', addNode, }; } /** - * Simple (poorly implemented) function that constructs a tree from an itemset DataFrame sorted by support (count) + * Simple function that constructs a tree from an itemset DataFrame sorted by support (count) * The resulting tree components are non-overlapping subsets of the data. * In summary, we start with the most inclusive itemset (highest count), and perform a depth first search in field order. * - * TODO - the code style here is hacky and should be re-written - * * @param displayParent * @param parentDocCount * @param parentLabel @@ -80,7 +44,7 @@ function NewNodeFactory(name: string): NewNode { */ function dfDepthFirstSearch( fields: string[], - displayParent: NewNode, + displayParent: SimpleHierarchicalTreeNode, parentDocCount: number, parentLabel: string, field: string, @@ -108,7 +72,7 @@ function dfDepthFirstSearch( let label = `${parentLabel} ${value}`; - let displayNode: NewNode; + let displayNode: SimpleHierarchicalTreeNode; if (parentDocCount === docCount && collapseRedundant) { // collapse identical paths displayParent.name += ` ${value}`; @@ -118,7 +82,6 @@ function dfDepthFirstSearch( displayNode = displayParent; } else { displayNode = NewNodeFactory(`${docCount}/${totalDocCount}${label}`); - displayNode.iconStyle = 'warning'; displayNode.set = [...displayParent.set]; displayNode.set.push({ fieldName: field, fieldValue: value }); displayNode.docCount = docCount; @@ -130,8 +93,6 @@ function dfDepthFirstSearch( while (true) { const nextFieldIndex = fields.indexOf(field) + 1; if (nextFieldIndex >= fields.length) { - displayNode.icon = 'file'; - displayNode.iconStyle = 'info'; return docCount; } nextField = fields[nextFieldIndex]; @@ -147,7 +108,6 @@ function dfDepthFirstSearch( displayNode.name += ` '*'`; label += ` '*'`; const nextDisplayNode = NewNodeFactory(`${docCount}/${totalDocCount}${label}`); - nextDisplayNode.iconStyle = 'warning'; nextDisplayNode.set = displayNode.set; nextDisplayNode.docCount = docCount; nextDisplayNode.pValue = pValue; @@ -194,12 +154,6 @@ export function getSimpleHierarchicalTree( displayOther: boolean, fields: string[] = [] ) { - // const candidates = uniq( - // df.flatMap((d) => - // Object.keys(omit(d, ['size', 'maxPValue', 'doc_count', 'support', 'total_doc_count'])) - // ) - // ); - const field = fields[0]; const totalDocCount = Math.max(...df.map((d) => d.total_doc_count)); @@ -222,70 +176,3 @@ export function getSimpleHierarchicalTree( return { root: newRoot, fields }; } - -/** - * Get leaves from hierarchical tree. - */ -export function getSimpleHierarchicalTreeLeaves( - tree: NewNode, - leaves: ChangePointGroup[], - level = 1 -) { - if (tree.children.length === 0) { - leaves.push({ - id: `${stringHash(JSON.stringify(tree.set))}`, - group: tree.set, - docCount: tree.docCount, - pValue: tree.pValue, - }); - } else { - for (const child of tree.children) { - const newLeaves = getSimpleHierarchicalTreeLeaves(child, [], level + 1); - if (newLeaves.length > 0) { - leaves.push(...newLeaves); - } - } - } - - if (leaves.length === 1 && leaves[0].group.length === 0 && leaves[0].docCount === 0) { - return []; - } - - return leaves; -} - -type FieldValuePairCounts = Record>; -/** - * Get a nested record of field/value pairs with counts - */ -export function getFieldValuePairCounts(cpgs: ChangePointGroup[]): FieldValuePairCounts { - return cpgs.reduce((p, { group }) => { - group.forEach(({ fieldName, fieldValue }) => { - if (p[fieldName] === undefined) { - p[fieldName] = {}; - } - p[fieldName][fieldValue] = p[fieldName][fieldValue] ? p[fieldName][fieldValue] + 1 : 1; - }); - return p; - }, {}); -} - -/** - * Analyse duplicate field/value pairs in change point groups. - */ -export function markDuplicates( - cpgs: ChangePointGroup[], - fieldValuePairCounts: FieldValuePairCounts -): ChangePointGroup[] { - return cpgs.map((cpg) => { - return { - ...cpg, - group: cpg.group.map((g) => { - return { - ...g, - duplicate: fieldValuePairCounts[g.fieldName][g.fieldValue] > 1, - }; - }), - }; - }); -} diff --git a/x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree_leaves.test.ts b/x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree_leaves.test.ts new file mode 100644 index 0000000000000..9567d38f3d402 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree_leaves.test.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 { fields } from '../../../common/__mocks__/artificial_logs/fields'; +import { filteredFrequentItems } from '../../../common/__mocks__/artificial_logs/filtered_frequent_items'; + +import { getSimpleHierarchicalTree } from './get_simple_hierarchical_tree'; +import { getSimpleHierarchicalTreeLeaves } from './get_simple_hierarchical_tree_leaves'; + +describe('getSimpleHierarchicalTreeLeaves', () => { + it('returns the hierarchical tree leaves', () => { + const simpleHierarchicalTree = getSimpleHierarchicalTree( + filteredFrequentItems, + true, + false, + fields + ); + const leaves = getSimpleHierarchicalTreeLeaves(simpleHierarchicalTree.root, []); + expect(leaves).toEqual([ + { + id: '2038579476', + group: [ + { fieldName: 'response_code', fieldValue: '500' }, + { fieldName: 'url', fieldValue: 'home.php' }, + ], + docCount: 792, + pValue: 0.010770456205312423, + }, + ]); + }); +}); diff --git a/x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree_leaves.ts b/x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree_leaves.ts new file mode 100644 index 0000000000000..699c6e447c4de --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_simple_hierarchical_tree_leaves.ts @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ChangePointGroup } from '@kbn/ml-agg-utils'; +import { stringHash } from '@kbn/ml-string-hash'; + +import type { SimpleHierarchicalTreeNode } from '../../../common/types'; + +/** + * Get leaves from hierarchical tree. + */ +export function getSimpleHierarchicalTreeLeaves( + tree: SimpleHierarchicalTreeNode, + leaves: ChangePointGroup[], + level = 1 +) { + if (tree.children.length === 0) { + leaves.push({ + id: `${stringHash(JSON.stringify(tree.set))}`, + group: tree.set, + docCount: tree.docCount, + pValue: tree.pValue, + }); + } else { + for (const child of tree.children) { + const newLeaves = getSimpleHierarchicalTreeLeaves(child, [], level + 1); + if (newLeaves.length > 0) { + leaves.push(...newLeaves); + } + } + } + + if (leaves.length === 1 && leaves[0].group.length === 0 && leaves[0].docCount === 0) { + return []; + } + + return leaves; +} diff --git a/x-pack/plugins/aiops/server/routes/queries/get_value_counts.test.ts b/x-pack/plugins/aiops/server/routes/queries/get_value_counts.test.ts new file mode 100644 index 0000000000000..744179c485caa --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_value_counts.test.ts @@ -0,0 +1,31 @@ +/* + * Copyright 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 { frequentItems } from '../../../common/__mocks__/artificial_logs/frequent_items'; +import { getValueCounts } from './get_value_counts'; + +describe('getValueCounts', () => { + it('get value counts for field response_code', () => { + expect(getValueCounts(frequentItems, 'response_code')).toEqual({ + '200': 1, + '404': 1, + '500': 3, + }); + }); + + it('get value counts for field url', () => { + expect(getValueCounts(frequentItems, 'url')).toEqual({ 'home.php': 6 }); + }); + + it('get value counts for field user', () => { + expect(getValueCounts(frequentItems, 'user')).toEqual({ + Mary: 1, + Paul: 1, + Peter: 3, + }); + }); +}); diff --git a/x-pack/plugins/aiops/server/routes/queries/get_value_counts.ts b/x-pack/plugins/aiops/server/routes/queries/get_value_counts.ts new file mode 100644 index 0000000000000..b287d49494d78 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_value_counts.ts @@ -0,0 +1,18 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ItemsetResult } from '../../../common/types'; + +export function getValueCounts(df: ItemsetResult[], field: string) { + return df.reduce>((p, c) => { + if (c.set[field] === undefined) { + return p; + } + p[c.set[field]] = p[c.set[field]] ? p[c.set[field]] + 1 : 1; + return p; + }, {}); +} diff --git a/x-pack/plugins/aiops/server/routes/queries/get_values_descending.test.ts b/x-pack/plugins/aiops/server/routes/queries/get_values_descending.test.ts new file mode 100644 index 0000000000000..cd4935b4fcc8f --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_values_descending.test.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 { frequentItems } from '../../../common/__mocks__/artificial_logs/frequent_items'; +import { getValuesDescending } from './get_values_descending'; + +describe('getValuesDescending', () => { + it('get descending values for field response_code', () => { + expect(getValuesDescending(frequentItems, 'response_code')).toEqual(['500', '200', '404']); + }); + + it('get descending values for field url', () => { + expect(getValuesDescending(frequentItems, 'url')).toEqual(['home.php']); + }); + + it('get descending values for field user', () => { + expect(getValuesDescending(frequentItems, 'user')).toEqual(['Peter', 'Mary', 'Paul']); + }); +}); diff --git a/x-pack/plugins/aiops/server/routes/queries/get_values_descending.ts b/x-pack/plugins/aiops/server/routes/queries/get_values_descending.ts new file mode 100644 index 0000000000000..8429ca4fcae75 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/get_values_descending.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 type { ItemsetResult } from '../../../common/types'; + +import { getValueCounts } from './get_value_counts'; + +export function getValuesDescending(df: ItemsetResult[], field: string): string[] { + const valueCounts = getValueCounts(df, field); + const keys = Object.keys(valueCounts); + + return keys.sort((a, b) => { + return valueCounts[b] - valueCounts[a]; + }); +} diff --git a/x-pack/plugins/aiops/server/routes/queries/transform_change_point_to_group.test.ts b/x-pack/plugins/aiops/server/routes/queries/transform_change_point_to_group.test.ts new file mode 100644 index 0000000000000..448f3003fc924 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/transform_change_point_to_group.test.ts @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { changePointGroups } from '../../../common/__mocks__/artificial_logs/change_point_groups'; +import { changePoints } from '../../../common/__mocks__/artificial_logs/change_points'; + +import { duplicateIdentifier } from './duplicate_identifier'; +import { getGroupsWithReaddedDuplicates } from './get_groups_with_readded_duplicates'; +import { dropDuplicates, groupDuplicates } from './fetch_frequent_items'; +import { getFieldValuePairCounts } from './get_field_value_pair_counts'; +import { getMarkedDuplicates } from './get_marked_duplicates'; +import { getMissingChangePoints } from './get_missing_change_points'; +import { transformChangePointToGroup } from './transform_change_point_to_group'; + +describe('getMissingChangePoints', () => { + it('get missing change points', () => { + const deduplicatedChangePoints = dropDuplicates(changePoints, duplicateIdentifier); + + const groupedChangePoints = groupDuplicates(changePoints, duplicateIdentifier).filter( + (g) => g.group.length > 1 + ); + + const fieldValuePairCounts = getFieldValuePairCounts(changePointGroups); + const markedDuplicates = getMarkedDuplicates(changePointGroups, fieldValuePairCounts); + const groupsWithReaddedDuplicates = getGroupsWithReaddedDuplicates( + markedDuplicates, + groupedChangePoints + ); + + const missingChangePoints = getMissingChangePoints( + deduplicatedChangePoints, + groupsWithReaddedDuplicates + ); + + const transformed = transformChangePointToGroup(missingChangePoints[0], groupedChangePoints); + + expect(transformed).toEqual({ + docCount: 1981, + group: [{ duplicate: false, fieldName: 'user', fieldValue: 'Peter' }], + id: '817080373', + pValue: 2.7454255728359757e-21, + }); + }); +}); diff --git a/x-pack/plugins/aiops/server/routes/queries/transform_change_point_to_group.ts b/x-pack/plugins/aiops/server/routes/queries/transform_change_point_to_group.ts new file mode 100644 index 0000000000000..8e6c77971dcee --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/queries/transform_change_point_to_group.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 { stringHash } from '@kbn/ml-string-hash'; +import type { ChangePoint } from '@kbn/ml-agg-utils'; + +import type { ChangePointDuplicateGroup } from '../../../common/types'; + +export function transformChangePointToGroup( + changePoint: ChangePoint, + groupedChangePoints: ChangePointDuplicateGroup[] +) { + const { fieldName, fieldValue, doc_count: docCount, pValue } = changePoint; + + const duplicates = groupedChangePoints.find((d) => + d.group.some((dg) => dg.fieldName === fieldName && dg.fieldValue === fieldValue) + ); + + if (duplicates !== undefined) { + return { + id: `${stringHash( + JSON.stringify( + duplicates.group.map((d) => ({ + fieldName: d.fieldName, + fieldValue: d.fieldValue, + })) + ) + )}`, + group: duplicates.group.map((d) => ({ + fieldName: d.fieldName, + fieldValue: d.fieldValue, + duplicate: false, + })), + docCount, + pValue, + }; + } else { + return { + id: `${stringHash(JSON.stringify({ fieldName, fieldValue }))}`, + group: [ + { + fieldName, + fieldValue, + duplicate: false, + }, + ], + docCount, + pValue, + }; + } +} diff --git a/x-pack/test/api_integration/apis/aiops/test_data.ts b/x-pack/test/api_integration/apis/aiops/test_data.ts index 8503adc74a250..3be75f1e875a8 100644 --- a/x-pack/test/api_integration/apis/aiops/test_data.ts +++ b/x-pack/test/api_integration/apis/aiops/test_data.ts @@ -5,6 +5,12 @@ * 2.0. */ +// We're using the mocks for jest unit tests as expected data in the integration tests here. +// This makes sure should the assertions for the integration tests need to be updated, +// that also the jest unit tests use mocks that are not outdated. +import { changePoints as artificialLogChangePoints } from '@kbn/aiops-plugin/common/__mocks__/artificial_logs/change_points'; +import { finalChangePointGroups as artificialLogsChangePointGroups } from '@kbn/aiops-plugin/common/__mocks__/artificial_logs/final_change_point_groups'; + import type { TestData } from './types'; export const explainLogRateSpikesTestData: TestData[] = [ @@ -86,70 +92,8 @@ export const explainLogRateSpikesTestData: TestData[] = [ groupHistogramFilter: 'add_change_point_group_histogram', histogramFilter: 'add_change_points_histogram', errorFilter: 'add_error', - changePoints: [ - { - fieldName: 'response_code', - fieldValue: '500', - doc_count: 1821, - bg_count: 553, - total_doc_count: 4671, - total_bg_count: 1975, - score: 26.546201745993947, - pValue: 2.9589053032077285e-12, - normalizedScore: 0.7814127409489161, - }, - { - fieldName: 'url', - fieldValue: 'home.php', - doc_count: 1742, - bg_count: 632, - total_doc_count: 4671, - total_bg_count: 1975, - score: 4.53094842981472, - pValue: 0.010770456205312423, - normalizedScore: 0.10333028878375965, - }, - { - fieldName: 'url', - fieldValue: 'login.php', - doc_count: 1742, - bg_count: 632, - total_doc_count: 4671, - total_bg_count: 1975, - score: 4.53094842981472, - pValue: 0.010770456205312423, - normalizedScore: 0.10333028878375965, - }, - { - fieldName: 'user', - fieldValue: 'Peter', - doc_count: 1981, - bg_count: 553, - total_doc_count: 4671, - total_bg_count: 1975, - score: 47.34435085428873, - pValue: 2.7454255728359757e-21, - normalizedScore: 0.8327337555873047, - }, - ], - groups: [ - { - id: '2038579476', - group: [ - { fieldName: 'response_code', fieldValue: '500', duplicate: false }, - { fieldName: 'url', fieldValue: 'home.php', duplicate: false }, - { fieldName: 'url', fieldValue: 'login.php', duplicate: false }, - ], - docCount: 792, - pValue: 0.010770456205312423, - }, - { - id: '817080373', - group: [{ fieldName: 'user', fieldValue: 'Peter', duplicate: false }], - docCount: 1981, - pValue: 2.7454255728359757e-21, - }, - ], + changePoints: artificialLogChangePoints, + groups: artificialLogsChangePointGroups, histogramLength: 20, }, }, From efb7cdd49ede9126a8c19103dc58538f23da30ed Mon Sep 17 00:00:00 2001 From: Ying Mao Date: Wed, 21 Dec 2022 16:48:28 -0500 Subject: [PATCH 34/36] [Response Ops] [Alerting] Unflattening summarized alerts (#147890) Towards https://github.com/elastic/kibana/issues/147379 ## Summary When investigating how to [onboard detection alerts onto framework alert summaries](https://github.com/elastic/kibana/issues/147379), there were some discrepancies in the format of the alert documents returned. This PR fixes the formatting so it matches and there will be no difference in `context.alerts` when we migrate detection alerts to the framework. ### 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 --- .../create_get_summarized_alerts_fn.test.ts | 906 +++++++++++++++--- .../utils/create_get_summarized_alerts_fn.ts | 29 +- .../tests/trial/get_summarized_alerts.ts | 5 +- 3 files changed, 820 insertions(+), 120 deletions(-) diff --git a/x-pack/plugins/rule_registry/server/utils/create_get_summarized_alerts_fn.test.ts b/x-pack/plugins/rule_registry/server/utils/create_get_summarized_alerts_fn.test.ts index 0ceb1e6ed8a84..387bd0174dbc4 100644 --- a/x-pack/plugins/rule_registry/server/utils/create_get_summarized_alerts_fn.test.ts +++ b/x-pack/plugins/rule_registry/server/utils/create_get_summarized_alerts_fn.test.ts @@ -76,6 +76,8 @@ describe('createGetSummarizedAlertsFn', () => { }, hits: [ { + _id: '1', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -86,6 +88,8 @@ describe('createGetSummarizedAlertsFn', () => { }, }, { + _id: '2', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -105,6 +109,8 @@ describe('createGetSummarizedAlertsFn', () => { }, hits: [ { + _id: '3', + _index: '.alerts-default-000001', _source: { '@timestamp': '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -115,6 +121,8 @@ describe('createGetSummarizedAlertsFn', () => { }, }, { + _id: '4', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -125,6 +133,8 @@ describe('createGetSummarizedAlertsFn', () => { }, }, { + _id: '5', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -144,6 +154,8 @@ describe('createGetSummarizedAlertsFn', () => { }, hits: [ { + _id: '6', + _index: '.alerts-default-000001', _source: { '@timestamp': '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -283,56 +295,140 @@ describe('createGetSummarizedAlertsFn', () => { expect(summarizedAlerts.recovered.count).toEqual(1); expect(summarizedAlerts.new.data).toEqual([ { + _id: '1', + _index: '.alerts-default-000001', '@timestamp': '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [EVENT_ACTION]: 'open', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_3', - [ALERT_UUID]: 'uuid1', + event: { + action: 'open', + }, + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_3', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid1', + }, + }, }, { + _id: '2', + _index: '.alerts-default-000001', '@timestamp': '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [EVENT_ACTION]: 'open', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_4', - [ALERT_UUID]: 'uuid2', + event: { + action: 'open', + }, + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_4', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid2', + }, + }, }, ]); expect(summarizedAlerts.ongoing.data).toEqual([ { + _id: '3', + _index: '.alerts-default-000001', '@timestamp': '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [EVENT_ACTION]: 'active', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_1', - [ALERT_UUID]: 'uuid3', + event: { + action: 'active', + }, + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_1', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid3', + }, + }, }, { + _id: '4', + _index: '.alerts-default-000001', '@timestamp': '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [EVENT_ACTION]: 'active', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_2', - [ALERT_UUID]: 'uuid4', + event: { + action: 'active', + }, + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_2', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid4', + }, + }, }, { + _id: '5', + _index: '.alerts-default-000001', '@timestamp': '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [EVENT_ACTION]: 'active', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_5', - [ALERT_UUID]: 'uuid5', + event: { + action: 'active', + }, + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_5', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid5', + }, + }, }, ]); expect(summarizedAlerts.recovered.data).toEqual([ { + _id: '6', + _index: '.alerts-default-000001', '@timestamp': '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [EVENT_ACTION]: 'close', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_9', - [ALERT_UUID]: 'uuid6', + event: { + action: 'close', + }, + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_9', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid6', + }, + }, }, ]); }); @@ -345,6 +441,8 @@ describe('createGetSummarizedAlertsFn', () => { }, hits: [ { + _id: '1', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -356,6 +454,8 @@ describe('createGetSummarizedAlertsFn', () => { }, }, { + _id: '2', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -367,6 +467,8 @@ describe('createGetSummarizedAlertsFn', () => { }, }, { + _id: '3', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:10:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -387,6 +489,8 @@ describe('createGetSummarizedAlertsFn', () => { }, hits: [ { + _id: '4', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:20:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -398,6 +502,8 @@ describe('createGetSummarizedAlertsFn', () => { }, }, { + _id: '5', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -418,6 +524,8 @@ describe('createGetSummarizedAlertsFn', () => { }, hits: [ { + _id: '6', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:20:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -585,63 +693,135 @@ describe('createGetSummarizedAlertsFn', () => { expect(summarizedAlerts.recovered.count).toEqual(1); expect(summarizedAlerts.new.data).toEqual([ { + _id: '1', + _index: '.alerts-default-000001', [TIMESTAMP]: '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_3', - [ALERT_UUID]: 'uuid1', - [ALERT_START]: '2020-01-01T12:00:00.000Z', alert_type: 'new', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_3', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + start: '2020-01-01T12:00:00.000Z', + uuid: 'uuid1', + }, + }, }, { + _id: '2', + _index: '.alerts-default-000001', [TIMESTAMP]: '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_4', - [ALERT_UUID]: 'uuid2', - [ALERT_START]: '2020-01-01T12:00:00.000Z', alert_type: 'new', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_4', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + start: '2020-01-01T12:00:00.000Z', + uuid: 'uuid2', + }, + }, }, { + _id: '3', + _index: '.alerts-default-000001', [TIMESTAMP]: '2020-01-01T12:10:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_1', - [ALERT_UUID]: 'uuid3', - [ALERT_START]: '2020-01-01T12:10:00.000Z', alert_type: 'new', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_1', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + start: '2020-01-01T12:10:00.000Z', + uuid: 'uuid3', + }, + }, }, ]); expect(summarizedAlerts.ongoing.data).toEqual([ { + _id: '4', + _index: '.alerts-default-000001', [TIMESTAMP]: '2020-01-01T12:20:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_2', - [ALERT_UUID]: 'uuid4', - [ALERT_START]: '2020-01-01T12:00:00.000Z', alert_type: 'ongoing', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_2', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + start: '2020-01-01T12:00:00.000Z', + uuid: 'uuid4', + }, + }, }, { + _id: '5', + _index: '.alerts-default-000001', [TIMESTAMP]: '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_5', - [ALERT_UUID]: 'uuid5', - [ALERT_START]: '2020-01-01T11:00:00.000Z', alert_type: 'ongoing', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_5', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + start: '2020-01-01T11:00:00.000Z', + uuid: 'uuid5', + }, + }, }, ]); expect(summarizedAlerts.recovered.data).toEqual([ { + _id: '6', + _index: '.alerts-default-000001', [TIMESTAMP]: '2020-01-01T12:20:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_9', - [ALERT_UUID]: 'uuid6', - [ALERT_START]: '2020-01-01T11:00:00.000Z', - [ALERT_END]: '2020-01-01T12:20:00.000Z', alert_type: 'recovered', + kibana: { + alert: { + end: '2020-01-01T12:20:00.000Z', + instance: { + id: 'TEST_ALERT_9', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + start: '2020-01-01T11:00:00.000Z', + uuid: 'uuid6', + }, + }, }, ]); }); @@ -654,6 +834,8 @@ describe('createGetSummarizedAlertsFn', () => { }, hits: [ { + _id: '1', + _index: '.alerts-default-000001', _source: { '@timestamp': '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -663,6 +845,8 @@ describe('createGetSummarizedAlertsFn', () => { }, }, { + _id: '2', + _index: '.alerts-default-000001', _source: { '@timestamp': '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -672,6 +856,8 @@ describe('createGetSummarizedAlertsFn', () => { }, }, { + _id: '3', + _index: '.alerts-default-000001', _source: { '@timestamp': '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -681,6 +867,8 @@ describe('createGetSummarizedAlertsFn', () => { }, }, { + _id: '4', + _index: '.alerts-default-000001', _source: { '@timestamp': '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -690,16 +878,19 @@ describe('createGetSummarizedAlertsFn', () => { }, }, { + _id: '5', + _index: '.alerts-default-000001', _source: { '@timestamp': '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', [ALERT_RULE_UUID]: 'rule-id', - [EVENT_ACTION]: 'active', [ALERT_INSTANCE_ID]: 'TEST_ALERT_5', [ALERT_UUID]: 'uuid5', }, }, { + _id: '6', + _index: '.alerts-default-000001', _source: { '@timestamp': '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', @@ -761,47 +952,118 @@ describe('createGetSummarizedAlertsFn', () => { expect(summarizedAlerts.recovered.count).toEqual(0); expect(summarizedAlerts.new.data).toEqual([ { - '@timestamp': '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_3', - [ALERT_UUID]: 'uuid1', + _id: '1', + _index: '.alerts-default-000001', + [TIMESTAMP]: '2020-01-01T12:00:00.000Z', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_3', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid1', + }, + }, }, { - '@timestamp': '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_4', - [ALERT_UUID]: 'uuid2', + _id: '2', + _index: '.alerts-default-000001', + [TIMESTAMP]: '2020-01-01T12:00:00.000Z', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_4', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid2', + }, + }, }, { - '@timestamp': '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_1', - [ALERT_UUID]: 'uuid3', + _id: '3', + _index: '.alerts-default-000001', + [TIMESTAMP]: '2020-01-01T12:00:00.000Z', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_1', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid3', + }, + }, }, { - '@timestamp': '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_2', - [ALERT_UUID]: 'uuid4', + _id: '4', + _index: '.alerts-default-000001', + [TIMESTAMP]: '2020-01-01T12:00:00.000Z', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_2', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid4', + }, + }, }, { - '@timestamp': '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [EVENT_ACTION]: 'active', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_5', - [ALERT_UUID]: 'uuid5', + _id: '5', + _index: '.alerts-default-000001', + [TIMESTAMP]: '2020-01-01T12:00:00.000Z', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_5', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid5', + }, + }, }, { - '@timestamp': '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_9', - [ALERT_UUID]: 'uuid6', + _id: '6', + _index: '.alerts-default-000001', + [TIMESTAMP]: '2020-01-01T12:00:00.000Z', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_9', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid6', + }, + }, }, ]); expect(summarizedAlerts.ongoing.data).toEqual([]); @@ -816,57 +1078,395 @@ describe('createGetSummarizedAlertsFn', () => { }, hits: [ { + _id: '1', + _index: '.alerts-default-000001', + _source: { + [TIMESTAMP]: '2020-01-01T12:00:00.000Z', + [ALERT_RULE_EXECUTION_UUID]: 'abc', + [ALERT_RULE_UUID]: 'rule-id', + [ALERT_INSTANCE_ID]: 'TEST_ALERT_3', + [ALERT_UUID]: 'uuid1', + }, + }, + { + _id: '2', + _index: '.alerts-default-000001', + _source: { + [TIMESTAMP]: '2020-01-01T12:00:00.000Z', + [ALERT_RULE_EXECUTION_UUID]: 'abc', + [ALERT_RULE_UUID]: 'rule-id', + [ALERT_INSTANCE_ID]: 'TEST_ALERT_4', + [ALERT_UUID]: 'uuid2', + }, + }, + { + _id: '3', + _index: '.alerts-default-000001', + _source: { + [TIMESTAMP]: '2020-01-01T12:10:00.000Z', + [ALERT_RULE_EXECUTION_UUID]: 'abc', + [ALERT_RULE_UUID]: 'rule-id', + [ALERT_INSTANCE_ID]: 'TEST_ALERT_1', + [ALERT_UUID]: 'uuid3', + }, + }, + { + _id: '4', + _index: '.alerts-default-000001', + _source: { + [TIMESTAMP]: '2020-01-01T12:20:00.000Z', + [ALERT_RULE_EXECUTION_UUID]: 'abc', + [ALERT_RULE_UUID]: 'rule-id', + [ALERT_INSTANCE_ID]: 'TEST_ALERT_2', + [ALERT_UUID]: 'uuid4', + }, + }, + { + _id: '5', + _index: '.alerts-default-000001', + _source: { + [TIMESTAMP]: '2020-01-01T12:00:00.000Z', + [ALERT_RULE_EXECUTION_UUID]: 'abc', + [ALERT_RULE_UUID]: 'rule-id', + [ALERT_INSTANCE_ID]: 'TEST_ALERT_5', + [ALERT_UUID]: 'uuid5', + }, + }, + { + _id: '6', + _index: '.alerts-default-000001', + _source: { + [TIMESTAMP]: '2020-01-01T12:20:00.000Z', + [ALERT_RULE_EXECUTION_UUID]: 'abc', + [ALERT_RULE_UUID]: 'rule-id', + [ALERT_INSTANCE_ID]: 'TEST_ALERT_9', + [ALERT_UUID]: 'uuid6', + }, + }, + ], + }, + } as any); + const getSummarizedAlertsFn = createGetSummarizedAlertsFn({ + ruleDataClient: ruleDataClientMock, + useNamespace: true, + isLifecycleAlert: false, + })(); + + const summarizedAlerts = await getSummarizedAlertsFn({ + start: new Date('2020-01-01T11:00:00.000Z'), + end: new Date('2020-01-01T12:25:00.000Z'), + ruleId: 'rule-id', + spaceId: 'space-id', + excludedAlertInstanceIds: ['TEST_ALERT_10'], + }); + expect(ruleDataClientMock.getReader).toHaveBeenCalledWith({ namespace: 'space-id' }); + expect(ruleDataClientMock.getReader().search).toHaveBeenCalledTimes(1); + expect(ruleDataClientMock.getReader().search).toHaveBeenCalledWith({ + body: { + size: 100, + track_total_hits: true, + query: { + bool: { + filter: [ + { + range: { + [TIMESTAMP]: { + gte: '2020-01-01T11:00:00.000Z', + lt: '2020-01-01T12:25:00.000Z', + }, + }, + }, + { + term: { + [ALERT_RULE_UUID]: 'rule-id', + }, + }, + { + bool: { + must_not: { + terms: { + [ALERT_INSTANCE_ID]: ['TEST_ALERT_10'], + }, + }, + }, + }, + ], + }, + }, + }, + }); + expect(summarizedAlerts.new.count).toEqual(6); + expect(summarizedAlerts.ongoing.count).toEqual(0); + expect(summarizedAlerts.recovered.count).toEqual(0); + expect(summarizedAlerts.new.data).toEqual([ + { + _id: '1', + _index: '.alerts-default-000001', + [TIMESTAMP]: '2020-01-01T12:00:00.000Z', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_3', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid1', + }, + }, + }, + { + _id: '2', + _index: '.alerts-default-000001', + [TIMESTAMP]: '2020-01-01T12:00:00.000Z', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_4', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid2', + }, + }, + }, + { + _id: '3', + _index: '.alerts-default-000001', + [TIMESTAMP]: '2020-01-01T12:10:00.000Z', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_1', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid3', + }, + }, + }, + { + _id: '4', + _index: '.alerts-default-000001', + [TIMESTAMP]: '2020-01-01T12:20:00.000Z', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_2', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid4', + }, + }, + }, + { + _id: '5', + _index: '.alerts-default-000001', + [TIMESTAMP]: '2020-01-01T12:00:00.000Z', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_5', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid5', + }, + }, + }, + { + _id: '6', + _index: '.alerts-default-000001', + [TIMESTAMP]: '2020-01-01T12:20:00.000Z', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_9', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid6', + }, + }, + }, + ]); + expect(summarizedAlerts.ongoing.data).toEqual([]); + expect(summarizedAlerts.recovered.data).toEqual([]); + }); + + it('creates function that correctly formats alerts', async () => { + ruleDataClientMock.getReader().search.mockResolvedValueOnce({ + hits: { + total: { + value: 6, + }, + hits: [ + { + _id: '1', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', [ALERT_RULE_UUID]: 'rule-id', [ALERT_INSTANCE_ID]: 'TEST_ALERT_3', [ALERT_UUID]: 'uuid1', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_3', + }, + rule: { + execution: { + uuid: 'abc', + }, + }, + uuid: 'uuid1', + }, + }, }, }, { + _id: '2', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', [ALERT_RULE_UUID]: 'rule-id', [ALERT_INSTANCE_ID]: 'TEST_ALERT_4', [ALERT_UUID]: 'uuid2', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_4', + }, + rule: { + execution: { + uuid: 'abc', + }, + }, + uuid: 'uuid2', + }, + }, }, }, { + _id: '3', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:10:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', [ALERT_RULE_UUID]: 'rule-id', [ALERT_INSTANCE_ID]: 'TEST_ALERT_1', [ALERT_UUID]: 'uuid3', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_1', + }, + rule: { + execution: { + uuid: 'abc', + }, + }, + uuid: 'uuid3', + }, + }, }, }, { + _id: '4', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:20:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', [ALERT_RULE_UUID]: 'rule-id', [ALERT_INSTANCE_ID]: 'TEST_ALERT_2', [ALERT_UUID]: 'uuid4', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_2', + }, + rule: { + execution: { + uuid: 'abc', + }, + }, + uuid: 'uuid4', + }, + }, }, }, { + _id: '5', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:00:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', [ALERT_RULE_UUID]: 'rule-id', [ALERT_INSTANCE_ID]: 'TEST_ALERT_5', [ALERT_UUID]: 'uuid5', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_5', + }, + rule: { + execution: { + uuid: 'abc', + }, + }, + uuid: 'uuid5', + }, + }, }, }, { + _id: '6', + _index: '.alerts-default-000001', _source: { [TIMESTAMP]: '2020-01-01T12:20:00.000Z', [ALERT_RULE_EXECUTION_UUID]: 'abc', [ALERT_RULE_UUID]: 'rule-id', [ALERT_INSTANCE_ID]: 'TEST_ALERT_9', [ALERT_UUID]: 'uuid6', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_9', + }, + rule: { + execution: { + uuid: 'abc', + }, + }, + uuid: 'uuid6', + }, + }, }, }, ], @@ -926,46 +1526,118 @@ describe('createGetSummarizedAlertsFn', () => { expect(summarizedAlerts.recovered.count).toEqual(0); expect(summarizedAlerts.new.data).toEqual([ { + _id: '1', + _index: '.alerts-default-000001', [TIMESTAMP]: '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_3', - [ALERT_UUID]: 'uuid1', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_3', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid1', + }, + }, }, { + _id: '2', + _index: '.alerts-default-000001', [TIMESTAMP]: '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_4', - [ALERT_UUID]: 'uuid2', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_4', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid2', + }, + }, }, { + _id: '3', + _index: '.alerts-default-000001', [TIMESTAMP]: '2020-01-01T12:10:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_1', - [ALERT_UUID]: 'uuid3', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_1', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid3', + }, + }, }, { + _id: '4', + _index: '.alerts-default-000001', [TIMESTAMP]: '2020-01-01T12:20:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_2', - [ALERT_UUID]: 'uuid4', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_2', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid4', + }, + }, }, { + _id: '5', + _index: '.alerts-default-000001', [TIMESTAMP]: '2020-01-01T12:00:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_5', - [ALERT_UUID]: 'uuid5', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_5', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid5', + }, + }, }, { + _id: '6', + _index: '.alerts-default-000001', [TIMESTAMP]: '2020-01-01T12:20:00.000Z', - [ALERT_RULE_EXECUTION_UUID]: 'abc', - [ALERT_RULE_UUID]: 'rule-id', - [ALERT_INSTANCE_ID]: 'TEST_ALERT_9', - [ALERT_UUID]: 'uuid6', + kibana: { + alert: { + instance: { + id: 'TEST_ALERT_9', + }, + rule: { + execution: { + uuid: 'abc', + }, + uuid: 'rule-id', + }, + uuid: 'uuid6', + }, + }, }, ]); expect(summarizedAlerts.ongoing.data).toEqual([]); diff --git a/x-pack/plugins/rule_registry/server/utils/create_get_summarized_alerts_fn.ts b/x-pack/plugins/rule_registry/server/utils/create_get_summarized_alerts_fn.ts index 82d044ad65a68..4754d47f236e3 100644 --- a/x-pack/plugins/rule_registry/server/utils/create_get_summarized_alerts_fn.ts +++ b/x-pack/plugins/rule_registry/server/utils/create_get_summarized_alerts_fn.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { merge } from 'lodash'; import type { PublicContract } from '@kbn/utility-types'; import { ESSearchRequest, ESSearchResponse } from '@kbn/es-types'; import type { GetSummarizedAlertsFnOpts } from '@kbn/alerting-plugin/server'; @@ -179,12 +180,38 @@ const getLifecycleAlertsByExecutionUuid = async ({ }; }; +const expandDottedField = (dottedFieldName: string, val: unknown): object => { + const parts = dottedFieldName.split('.'); + if (parts.length === 1) { + return { [parts[0]]: val }; + } else { + return { [parts[0]]: expandDottedField(parts.slice(1).join('.'), val) }; + } +}; + +const expandFlattenedAlert = (alert: object) => { + return Object.entries(alert).reduce( + (acc, [key, val]) => merge(acc, expandDottedField(key, val)), + {} + ); +}; + const getHitsWithCount = ( response: ESSearchResponse ) => { return { count: (response.hits.total as SearchTotalHits).value, - data: response.hits.hits.map((r) => r._source), + data: response.hits.hits.map((hit) => { + const { _id, _index, _source } = hit; + + const rawAlert = { + _id, + _index, + ..._source, + }; + + return expandFlattenedAlert(rawAlert as object); + }), }; }; diff --git a/x-pack/test/rule_registry/spaces_only/tests/trial/get_summarized_alerts.ts b/x-pack/test/rule_registry/spaces_only/tests/trial/get_summarized_alerts.ts index 8f50fd4589769..ccf57b8f6a0c1 100644 --- a/x-pack/test/rule_registry/spaces_only/tests/trial/get_summarized_alerts.ts +++ b/x-pack/test/rule_registry/spaces_only/tests/trial/get_summarized_alerts.ts @@ -28,6 +28,7 @@ import { RuleDataService, } from '@kbn/rule-registry-plugin/server'; import { RuleExecutorOptions } from '@kbn/alerting-plugin/server'; +import { get } from 'lodash'; import type { FtrProviderContext } from '../../../common/ftr_provider_context'; import { MockRuleParams, @@ -357,7 +358,7 @@ export default function createGetSummarizedAlertsTest({ getService }: FtrProvide expect(summarizedAlertsExcludingId1.new.count).to.eql(1); expect(summarizedAlertsExcludingId1.ongoing.count).to.eql(0); expect(summarizedAlertsExcludingId1.recovered.count).to.eql(0); - expect(summarizedAlertsExcludingId1.new.data[0][ALERT_INSTANCE_ID]).to.eql(id2); + expect(get(summarizedAlertsExcludingId1.new.data[0], ALERT_INSTANCE_ID)).to.eql(id2); const summarizedAlertsExcludingId2 = await getSummarizedAlerts({ ruleId, @@ -368,7 +369,7 @@ export default function createGetSummarizedAlertsTest({ getService }: FtrProvide expect(summarizedAlertsExcludingId2.new.count).to.eql(1); expect(summarizedAlertsExcludingId2.ongoing.count).to.eql(0); expect(summarizedAlertsExcludingId2.recovered.count).to.eql(0); - expect(summarizedAlertsExcludingId2.new.data[0][ALERT_INSTANCE_ID]).to.eql(id1); + expect(get(summarizedAlertsExcludingId2.new.data[0], ALERT_INSTANCE_ID)).to.eql(id1); }); }); } From a9166da678e34777e0cea03f9d667441a1a16d66 Mon Sep 17 00:00:00 2001 From: Mark Hopkin Date: Wed, 21 Dec 2022 22:09:05 +0000 Subject: [PATCH 35/36] [Fleet] Add per-policy inactivity timeout + use runtime fields for agent status (#147552) ## Summary Part of #143455 Previously agents would be unenrolled after a given time by the fleet server. Instead, they'll be considered `Inactive`. Agents in an `Inactive` state are hidden from the UI by default, but their API keys remain active. This allows these agents to check in again at any time without requesting new API keys.`inactivity_timeout` defaults to 10 minutes or can be configured on a per policy basis. Agents that are manually unenrolled will go into the new `Unenrolled` status. ![image](https://user-images.githubusercontent.com/6766512/200406081-78a945bc-861a-4a5e-949c-33af59222558.png) These changes mean that we now need to get agent policies before knowing the agents status, we have used a runtime field to calculate the status at search time, this allows us to easily filter and aggregate on the status. ### Performance For 120 agents (20 of each main status): - filter call with filters: 90ms - agent status summary call: 83ms For 12k agents (2k of each main status): - filter call with filters: 455ms - agent status summary call: 500ms For 120k agents (20k of each main status): - filter call with filters: 2.2s - agent status summary call: 2.1s ### Manual Testing the create agent script can be used to test this at scale e.g create 10k agents of each of the given statuses: ```bash cd x-pack/plugins/fleet node scripts/create_agents --count 10000 --kibana http://localhost:5601/myprefix--status offline,online,inactive,error,updating,unenrolled --inactivityTimeout 360 --delete ``` ### 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] [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 - [ ] 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/fleet/common/openapi/bundled.json | 3 + .../plugins/fleet/common/openapi/bundled.yaml | 2 + .../common/openapi/paths/agent_status.yaml | 2 + .../fleet/common/services/agent_status.ts | 100 +---- .../fleet/common/types/models/agent.ts | 9 +- .../fleet/common/types/rest_spec/agent.ts | 2 + .../fleet/cypress/e2e/agent_list.cy.ts | 14 +- .../components/search_and_filter_bar.tsx | 6 + .../components/status_badges.tsx | 4 +- .../sections/agents/agent_list_page/index.tsx | 14 +- .../agents/components/agent_health.tsx | 10 + .../sections/agents/services/agent_status.tsx | 8 + .../scripts/create_agents/create_agents.ts | 20 +- .../server/collectors/agent_collectors.ts | 12 +- .../collectors/fleet_server_collector.ts | 1 + .../collectors/get_all_fleet_server_agents.ts | 2 +- .../fleet/server/collectors/register.ts | 12 + x-pack/plugins/fleet/server/index.ts | 1 + .../fleet_usage_telemetry.test.ts | 4 +- x-pack/plugins/fleet/server/plugin.ts | 19 +- .../server/routes/agent/actions_handlers.ts | 6 +- .../fleet/server/routes/agent/handlers.ts | 23 +- .../server/routes/agent/upgrade_handler.ts | 2 +- .../server/routes/agent_policy/handlers.ts | 14 +- .../server/services/agent_policy.test.ts | 55 +++ .../fleet/server/services/agent_policy.ts | 23 +- .../server/services/agents/action.mock.ts | 42 ++- .../server/services/agents/action_runner.ts | 2 +- .../fleet/server/services/agents/actions.ts | 8 +- .../services/agents/agent_service.test.ts | 29 +- .../server/services/agents/agent_service.ts | 29 +- .../agents/build_status_runtime_field.test.ts | 301 +++++++++++++++ .../agents/build_status_runtime_field.ts | 113 ++++++ .../fleet/server/services/agents/crud.test.ts | 28 +- .../fleet/server/services/agents/crud.ts | 229 +++++++----- .../fleet/server/services/agents/helpers.ts | 23 +- .../server/services/agents/reassign.test.ts | 7 + .../fleet/server/services/agents/reassign.ts | 21 +- .../services/agents/request_diagnostics.ts | 6 +- .../server/services/agents/status.test.ts | 105 ------ .../fleet/server/services/agents/status.ts | 190 +++++----- .../server/services/agents/unenroll.test.ts | 95 ++--- .../fleet/server/services/agents/unenroll.ts | 11 +- .../fleet/server/services/agents/update.ts | 2 +- .../services/agents/update_agent_tags.test.ts | 93 ++++- .../services/agents/update_agent_tags.ts | 20 +- .../fleet/server/services/agents/upgrade.ts | 22 +- .../preconfiguration/reset_agent_policies.ts | 4 +- .../data_generators/fleet_agent_generator.ts | 9 +- .../public/management/pages/policy/types.ts | 5 +- .../endpoint/routes/metadata/handlers.ts | 2 + .../endpoint/routes/metadata/metadata.test.ts | 189 +--------- .../metadata/query_builders.fixtures.ts | 348 ++---------------- .../routes/metadata/query_builders.test.ts | 19 + .../routes/metadata/query_builders.ts | 9 + .../metadata/support/agent_status.test.ts | 23 +- .../routes/metadata/support/agent_status.ts | 18 +- .../routes/metadata/support/test_support.ts | 6 +- .../endpoint_metadata_service.test.ts | 20 +- .../metadata/endpoint_metadata_service.ts | 28 +- .../schema/xpack_plugins.json | 12 + .../apis/agents/status.ts | 90 ++++- .../apis/fleet_telemetry.ts | 2 + 63 files changed, 1433 insertions(+), 1095 deletions(-) create mode 100644 x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.test.ts create mode 100644 x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts delete mode 100644 x-pack/plugins/fleet/server/services/agents/status.test.ts diff --git a/x-pack/plugins/fleet/common/openapi/bundled.json b/x-pack/plugins/fleet/common/openapi/bundled.json index fb6b59b0d5e4a..f41d4fdabeb5e 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.json +++ b/x-pack/plugins/fleet/common/openapi/bundled.json @@ -1178,6 +1178,9 @@ "inactive": { "type": "integer" }, + "unenrolled": { + "type": "integer" + }, "offline": { "type": "integer" }, diff --git a/x-pack/plugins/fleet/common/openapi/bundled.yaml b/x-pack/plugins/fleet/common/openapi/bundled.yaml index 37279a0528395..e5e6ae3db03aa 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.yaml +++ b/x-pack/plugins/fleet/common/openapi/bundled.yaml @@ -735,6 +735,8 @@ paths: type: integer inactive: type: integer + unenrolled: + type: integer offline: type: integer online: diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_status.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_status.yaml index 2f8d3c81757dc..872aca9eb2758 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_status.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_status.yaml @@ -15,6 +15,8 @@ get: type: integer inactive: type: integer + unenrolled: + type: integer offline: type: integer online: diff --git a/x-pack/plugins/fleet/common/services/agent_status.ts b/x-pack/plugins/fleet/common/services/agent_status.ts index f0d40fa64aaeb..2ea2bef9d69df 100644 --- a/x-pack/plugins/fleet/common/services/agent_status.ts +++ b/x-pack/plugins/fleet/common/services/agent_status.ts @@ -5,55 +5,8 @@ * 2.0. */ -import { AGENT_POLLING_THRESHOLD_MS } from '../constants'; import type { Agent, AgentStatus, FleetServerAgent } from '../types'; -const offlineTimeoutIntervalCount = 10; // 30s*10 = 5m timeout - -export function getAgentStatus(agent: Agent | FleetServerAgent): AgentStatus { - const { last_checkin: lastCheckIn } = agent; - - if (!agent.active) { - return 'inactive'; - } - - if (!agent.last_checkin) { - return 'enrolling'; - } - - const msLastCheckIn = new Date(lastCheckIn || 0).getTime(); - const msSinceLastCheckIn = new Date().getTime() - msLastCheckIn; - const intervalsSinceLastCheckIn = Math.floor(msSinceLastCheckIn / AGENT_POLLING_THRESHOLD_MS); - - if (intervalsSinceLastCheckIn >= offlineTimeoutIntervalCount) { - return 'offline'; - } - - if (agent.unenrollment_started_at && !agent.unenrolled_at) { - return 'unenrolling'; - } - - if (agent.last_checkin_status?.toLowerCase() === 'error') { - return 'error'; - } - if (agent.last_checkin_status?.toLowerCase() === 'degraded') { - return 'degraded'; - } - - const policyRevision = - 'policy_revision' in agent - ? agent.policy_revision - : 'policy_revision_idx' in agent - ? agent.policy_revision_idx - : undefined; - - if (!policyRevision || (agent.upgrade_started_at && !agent.upgraded_at)) { - return 'updating'; - } - - return 'online'; -} - export function getPreviousAgentStatusForOfflineAgents( agent: Agent | FleetServerAgent ): AgentStatus | undefined { @@ -80,55 +33,26 @@ export function getPreviousAgentStatusForOfflineAgents( } } -export function buildKueryForEnrollingAgents(path: string = ''): string { - return `not (${path}last_checkin:*)`; -} - -export function buildKueryForUnenrollingAgents(path: string = ''): string { - return `${path}unenrollment_started_at:*`; -} - -export function buildKueryForOnlineAgents(path: string = ''): string { - return `${path}last_checkin:* ${addExclusiveKueryFilter( - [buildKueryForOfflineAgents, buildKueryForUpdatingAgents, buildKueryForErrorAgents], - path - )}`; -} - -export function buildKueryForErrorAgents(path: string = ''): string { - return `(${path}last_checkin_status:error or ${path}last_checkin_status:degraded or ${path}last_checkin_status:DEGRADED or ${path}last_checkin_status:ERROR) ${addExclusiveKueryFilter( - [buildKueryForOfflineAgents, buildKueryForUnenrollingAgents], - path - )}`; +export function buildKueryForUnenrolledAgents(): string { + return 'status:unenrolled'; } -export function buildKueryForOfflineAgents(path: string = ''): string { - return `${path}last_checkin < now-${ - (offlineTimeoutIntervalCount * AGENT_POLLING_THRESHOLD_MS) / 1000 - }s`; +export function buildKueryForOnlineAgents(): string { + return 'status:online'; } -export function buildKueryForUpgradingAgents(path: string = ''): string { - return `(${path}upgrade_started_at:*) and not (${path}upgraded_at:*)`; +export function buildKueryForErrorAgents(): string { + return '(status:error or status:degraded)'; } -export function buildKueryForUpdatingAgents(path: string = ''): string { - return `((${buildKueryForUpgradingAgents(path)}) or (${buildKueryForEnrollingAgents( - path - )}) or (${buildKueryForUnenrollingAgents( - path - )}) or (not ${path}policy_revision_idx:*)) ${addExclusiveKueryFilter( - [buildKueryForOfflineAgents, buildKueryForErrorAgents], - path - )}`; +export function buildKueryForOfflineAgents(): string { + return 'status:offline'; } -export function buildKueryForInactiveAgents(path: string = '') { - return `${path}active:false`; +export function buildKueryForUpdatingAgents(): string { + return '(status:updating or status:unenrolling or status:enrolling)'; } -function addExclusiveKueryFilter(kueryBuilders: Array<(path?: string) => string>, path?: string) { - return ` AND not (${kueryBuilders - .map((kueryBuilder) => `(${kueryBuilder(path)})`) - .join(' or ')})`; +export function buildKueryForInactiveAgents() { + return 'status:inactive'; } diff --git a/x-pack/plugins/fleet/common/types/models/agent.ts b/x-pack/plugins/fleet/common/types/models/agent.ts index ef046811d178e..7c80d14bd351c 100644 --- a/x-pack/plugins/fleet/common/types/models/agent.ts +++ b/x-pack/plugins/fleet/common/types/models/agent.ts @@ -24,10 +24,17 @@ export type AgentStatus = | 'inactive' | 'enrolling' | 'unenrolling' + | 'unenrolled' | 'updating' | 'degraded'; -export type SimplifiedAgentStatus = 'healthy' | 'unhealthy' | 'updating' | 'offline' | 'inactive'; +export type SimplifiedAgentStatus = + | 'healthy' + | 'unhealthy' + | 'updating' + | 'offline' + | 'inactive' + | 'unenrolled'; export type AgentActionType = | 'UNENROLL' diff --git a/x-pack/plugins/fleet/common/types/rest_spec/agent.ts b/x-pack/plugins/fleet/common/types/rest_spec/agent.ts index 8af5ee9abe1e3..e5cccb0ecb463 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/agent.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/agent.ts @@ -186,6 +186,8 @@ export interface GetAgentStatusResponse { offline: number; other: number; updating: number; + inactive: number; + unenrolled: number; }; } diff --git a/x-pack/plugins/fleet/cypress/e2e/agent_list.cy.ts b/x-pack/plugins/fleet/cypress/e2e/agent_list.cy.ts index bc3cf5c2f6ed3..5c0e6c637eac0 100644 --- a/x-pack/plugins/fleet/cypress/e2e/agent_list.cy.ts +++ b/x-pack/plugins/fleet/cypress/e2e/agent_list.cy.ts @@ -166,9 +166,17 @@ describe('View agents list', () => { }); describe('Agent status filter', () => { + const clearFilters = () => { + cy.getBySel(FLEET_AGENT_LIST_PAGE.STATUS_FILTER).click(); + cy.get('button').contains('Healthy').click(); + cy.get('button').contains('Unhealthy').click(); + cy.get('button').contains('Updating').click(); + cy.get('button').contains('Offline').click(); + cy.getBySel(FLEET_AGENT_LIST_PAGE.STATUS_FILTER).click(); + }; it('should filter on healthy (16 result)', () => { cy.visit('/app/fleet/agents'); - + clearFilters(); cy.getBySel(FLEET_AGENT_LIST_PAGE.STATUS_FILTER).click(); cy.get('button').contains('Healthy').click(); @@ -179,7 +187,7 @@ describe('View agents list', () => { it('should filter on unhealthy (1 result)', () => { cy.visit('/app/fleet/agents'); - + clearFilters(); cy.getBySel(FLEET_AGENT_LIST_PAGE.STATUS_FILTER).click(); cy.get('button').contains('Unhealthy').click(); @@ -190,6 +198,7 @@ describe('View agents list', () => { it('should filter on inactive (0 result)', () => { cy.visit('/app/fleet/agents'); + clearFilters(); cy.getBySel(FLEET_AGENT_LIST_PAGE.STATUS_FILTER).click(); @@ -200,6 +209,7 @@ describe('View agents list', () => { it('should filter on healthy and unhealthy', () => { cy.visit('/app/fleet/agents'); + clearFilters(); cy.getBySel(FLEET_AGENT_LIST_PAGE.STATUS_FILTER).click(); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/search_and_filter_bar.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/search_and_filter_bar.tsx index b7479738e9029..105fbe9773536 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/search_and_filter_bar.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/search_and_filter_bar.tsx @@ -63,6 +63,12 @@ const statusFilters = [ defaultMessage: 'Inactive', }), }, + { + status: 'unenrolled', + label: i18n.translate('xpack.fleet.agentList.statusUnenrolledFilterText', { + defaultMessage: 'Unenrolled', + }), + }, ]; const ClearAllTagsFilterItem = styled(EuiFilterSelectItem)` diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/status_badges.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/status_badges.tsx index 35f13dc90e6e6..af0bad093852e 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/status_badges.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/status_badges.tsx @@ -20,7 +20,9 @@ export const AgentStatusBadges: React.FC<{ agentStatus: { [k in SimplifiedAgentStatus]: number }; }> = memo(({ agentStatus, showInactive }) => { const agentStatuses = useMemo(() => { - return AGENT_STATUSES.filter((status) => (showInactive ? true : status !== 'inactive')); + return AGENT_STATUSES.filter((status) => + showInactive ? true : status !== 'inactive' && status !== 'unenrolled' + ); }, [showInactive]); return ( diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx index 1078e72053818..ff345e96e2945 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx @@ -87,7 +87,12 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { const [selectedAgentPolicies, setSelectedAgentPolicies] = useState([]); // Status for filtering - const [selectedStatus, setSelectedStatus] = useState([]); + const [selectedStatus, setSelectedStatus] = useState([ + 'healthy', + 'unhealthy', + 'updating', + 'offline', + ]); const [selectedTags, setSelectedTags] = useState([]); @@ -183,6 +188,8 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { return AgentStatusKueryHelper.buildKueryForUpdatingAgents(); case 'inactive': return AgentStatusKueryHelper.buildKueryForInactiveAgents(); + case 'unenrolled': + return AgentStatusKueryHelper.buildKueryForUnenrolledAgents(); } return undefined; @@ -201,7 +208,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { }, [search, selectedAgentPolicies, selectedTags, selectedStatus]); const showInactive = useMemo(() => { - return selectedStatus.includes('inactive'); + return selectedStatus.some((status) => status === 'inactive' || status === 'unenrolled'); }, [selectedStatus]); const [agents, setAgents] = useState([]); @@ -309,7 +316,8 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { unhealthy: agentsStatusResponse.data.results.error, offline: agentsStatusResponse.data.results.offline, updating: agentsStatusResponse.data.results.updating, - inactive: agentsResponse.data.totalInactive, + inactive: agentsStatusResponse.data.results.inactive, + unenrolled: agentsStatusResponse.data.results.unenrolled, }); const newAllTags = agentTagsResponse.data.items; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_health.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_health.tsx index cf0ae35ed687f..e8acd25e05f3f 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_health.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_health.tsx @@ -36,6 +36,14 @@ const Status = { ), + Unenrolled: ( + + + + ), Unhealthy: ( `(policy_id:"${policyId}")`) diff --git a/x-pack/plugins/fleet/server/collectors/get_all_fleet_server_agents.ts b/x-pack/plugins/fleet/server/collectors/get_all_fleet_server_agents.ts index 9607cb5e73044..4046771e6d9ca 100644 --- a/x-pack/plugins/fleet/server/collectors/get_all_fleet_server_agents.ts +++ b/x-pack/plugins/fleet/server/collectors/get_all_fleet_server_agents.ts @@ -34,7 +34,7 @@ export const getAllFleetServerAgents = async ( let agentsResponse; try { - agentsResponse = await getAgentsByKuery(esClient, { + agentsResponse = await getAgentsByKuery(esClient, soClient, { showInactive: false, perPage: SO_SEARCH_LIMIT, kuery: `${AGENTS_PREFIX}.policy_id:${agentPoliciesIds.map((id) => `"${id}"`).join(' or ')}`, diff --git a/x-pack/plugins/fleet/server/collectors/register.ts b/x-pack/plugins/fleet/server/collectors/register.ts index af9f0f1feb3fe..820a51f7f29fc 100644 --- a/x-pack/plugins/fleet/server/collectors/register.ts +++ b/x-pack/plugins/fleet/server/collectors/register.ts @@ -137,6 +137,18 @@ export function registerFleetUsageCollector( description: 'The total number of enrolled agents currently offline', }, }, + inactive: { + type: 'long', + _meta: { + description: 'The total number of of enrolled agents currently inactive', + }, + }, + unenrolled: { + type: 'long', + _meta: { + description: 'The total number of agents currently unenrolled', + }, + }, total_all_statuses: { type: 'long', _meta: { diff --git a/x-pack/plugins/fleet/server/index.ts b/x-pack/plugins/fleet/server/index.ts index 145eb8764d984..1e780d3926465 100644 --- a/x-pack/plugins/fleet/server/index.ts +++ b/x-pack/plugins/fleet/server/index.ts @@ -9,6 +9,7 @@ import type { PluginInitializerContext } from '@kbn/core/server'; import { FleetPlugin } from './plugin'; +export { buildAgentStatusRuntimeField } from './services/agents/build_status_runtime_field'; export type { AgentService, AgentClient, diff --git a/x-pack/plugins/fleet/server/integration_tests/fleet_usage_telemetry.test.ts b/x-pack/plugins/fleet/server/integration_tests/fleet_usage_telemetry.test.ts index de518f27562a7..e6a55e0585af9 100644 --- a/x-pack/plugins/fleet/server/integration_tests/fleet_usage_telemetry.test.ts +++ b/x-pack/plugins/fleet/server/integration_tests/fleet_usage_telemetry.test.ts @@ -147,7 +147,7 @@ describe('fleet usage telemetry', () => { }, { create: { - _id: 'inactive', + _id: 'unenrolled', }, }, { @@ -251,6 +251,8 @@ describe('fleet usage telemetry', () => { total_enrolled: 2, healthy: 0, unhealthy: 0, + inactive: 0, + unenrolled: 1, offline: 2, total_all_statuses: 3, updating: 0, diff --git a/x-pack/plugins/fleet/server/plugin.ts b/x-pack/plugins/fleet/server/plugin.ts index 7bcf9502d59b5..714ea06d0eefe 100644 --- a/x-pack/plugins/fleet/server/plugin.ts +++ b/x-pack/plugins/fleet/server/plugin.ts @@ -346,7 +346,7 @@ export class FleetPlugin const coreContext = await context.core; const authz = await getAuthzFromRequest(request); const esClient = coreContext.elasticsearch.client; - + const soClient = coreContext.savedObjects.getClient(); const routeRequiredAuthz = getRouteRequiredAuthz(request.route.method, request.route.path); const routeAuthz = routeRequiredAuthz ? calculateRouteAuthz(authz, routeRequiredAuthz) @@ -359,7 +359,7 @@ export class FleetPlugin return { get agentClient() { - const agentService = plugin.setupAgentService(esClient.asInternalUser); + const agentService = plugin.setupAgentService(esClient.asInternalUser, soClient); return { asCurrentUser: agentService.asScoped(request), @@ -502,6 +502,7 @@ export class FleetPlugin } })(); + const internalSoClient = new SavedObjectsClient(core.savedObjects.createInternalRepository()); return { authz: { fromRequest: getAuthzFromRequest, @@ -510,9 +511,12 @@ export class FleetPlugin esIndexPatternService: new ESIndexPatternSavedObjectService(), packageService: this.setupPackageService( core.elasticsearch.client.asInternalUser, - new SavedObjectsClient(core.savedObjects.createInternalRepository()) + internalSoClient + ), + agentService: this.setupAgentService( + core.elasticsearch.client.asInternalUser, + internalSoClient ), - agentService: this.setupAgentService(core.elasticsearch.client.asInternalUser), agentPolicyService: { get: agentPolicyService.get, list: agentPolicyService.list, @@ -536,12 +540,15 @@ export class FleetPlugin this.fleetStatus$.complete(); } - private setupAgentService(internalEsClient: ElasticsearchClient): AgentService { + private setupAgentService( + internalEsClient: ElasticsearchClient, + internalSoClient: SavedObjectsClientContract + ): AgentService { if (this.agentService) { return this.agentService; } - this.agentService = new AgentServiceImpl(internalEsClient); + this.agentService = new AgentServiceImpl(internalEsClient, internalSoClient); return this.agentService; } diff --git a/x-pack/plugins/fleet/server/routes/agent/actions_handlers.ts b/x-pack/plugins/fleet/server/routes/agent/actions_handlers.ts index 9495b8a214dea..4969500eb05df 100644 --- a/x-pack/plugins/fleet/server/routes/agent/actions_handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent/actions_handlers.ts @@ -27,9 +27,11 @@ export const postNewAgentActionHandlerBuilder = function ( > { return async (context, request, response) => { try { - const esClient = (await context.core).elasticsearch.client.asInternalUser; + const core = await context.core; + const esClient = core.elasticsearch.client.asInternalUser; + const soClient = core.savedObjects.client; - const agent = await actionsService.getAgent(esClient, request.params.agentId); + const agent = await actionsService.getAgent(esClient, soClient, request.params.agentId); const newAgentAction = request.body.action; diff --git a/x-pack/plugins/fleet/server/routes/agent/handlers.ts b/x-pack/plugins/fleet/server/routes/agent/handlers.ts index 85bcce7df69ba..2244f312fc050 100644 --- a/x-pack/plugins/fleet/server/routes/agent/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent/handlers.ts @@ -52,10 +52,11 @@ export const getAgentHandler: RequestHandler< > = async (context, request, response) => { const coreContext = await context.core; const esClient = coreContext.elasticsearch.client.asInternalUser; + const soClient = coreContext.savedObjects.client; try { const body: GetOneAgentResponse = { - item: await AgentService.getAgentById(esClient, request.params.agentId), + item: await AgentService.getAgentById(esClient, soClient, request.params.agentId), }; return response.ok({ body }); @@ -103,6 +104,7 @@ export const updateAgentHandler: RequestHandler< > = async (context, request, response) => { const coreContext = await context.core; const esClient = coreContext.elasticsearch.client.asInternalUser; + const soClient = coreContext.savedObjects.client; const partialAgent: any = {}; if (request.body.user_provided_metadata) { @@ -115,7 +117,7 @@ export const updateAgentHandler: RequestHandler< try { await AgentService.updateAgent(esClient, request.params.agentId, partialAgent); const body = { - item: await AgentService.getAgentById(esClient, request.params.agentId), + item: await AgentService.getAgentById(esClient, soClient, request.params.agentId), }; return response.ok({ body }); @@ -163,9 +165,16 @@ export const getAgentsHandler: RequestHandler< > = async (context, request, response) => { const coreContext = await context.core; const esClient = coreContext.elasticsearch.client.asInternalUser; + const soClient = coreContext.savedObjects.client; try { - const { agents, total, page, perPage } = await AgentService.getAgentsByKuery(esClient, { + const { + agents, + total, + page, + perPage, + totalInactive = 0, + } = await AgentService.getAgentsByKuery(esClient, soClient, { page: request.query.page, perPage: request.query.perPage, showInactive: request.query.showInactive, @@ -173,12 +182,8 @@ export const getAgentsHandler: RequestHandler< kuery: request.query.kuery, sortField: request.query.sortField, sortOrder: request.query.sortOrder, + getTotalInactive: true, }); - const totalInactive = request.query.showInactive - ? await AgentService.countInactiveAgents(esClient, { - kuery: request.query.kuery, - }) - : 0; const body: GetAgentsResponse = { list: agents, // deprecated @@ -271,9 +276,11 @@ export const getAgentStatusForAgentPolicyHandler: RequestHandler< > = async (context, request, response) => { const coreContext = await context.core; const esClient = coreContext.elasticsearch.client.asInternalUser; + const soClient = coreContext.savedObjects.client; try { const results = await AgentService.getAgentStatusForAgentPolicy( esClient, + soClient, request.query.policyId, request.query.kuery ); diff --git a/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.ts b/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.ts index 8d37ad53f88e1..f13044d975396 100644 --- a/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.ts +++ b/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.ts @@ -46,7 +46,7 @@ export const postAgentUpgradeHandler: RequestHandler< }); } try { - const agent = await getAgentById(esClient, request.params.agentId); + const agent = await getAgentById(esClient, soClient, request.params.agentId); const fleetServerAgents = await getAllFleetServerAgents(soClient, esClient); const agentIsFleetServer = fleetServerAgents.some( diff --git a/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts b/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts index 9d0fe813a03ab..9da77a9bed210 100644 --- a/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts @@ -6,7 +6,12 @@ */ import type { TypeOf } from '@kbn/config-schema'; -import type { RequestHandler, ResponseHeaders, ElasticsearchClient } from '@kbn/core/server'; +import type { + RequestHandler, + ResponseHeaders, + ElasticsearchClient, + SavedObjectsClientContract, +} from '@kbn/core/server'; import pMap from 'p-map'; import { safeDump } from 'js-yaml'; @@ -46,12 +51,13 @@ import { createAgentPolicyWithPackages } from '../../services/agent_policy_creat async function populateAssignedAgentsCount( esClient: ElasticsearchClient, + soClient: SavedObjectsClientContract, agentPolicies: AgentPolicy[] ) { await pMap( agentPolicies, (agentPolicy: GetAgentPoliciesResponseItem) => - getAgentsByKuery(esClient, { + getAgentsByKuery(esClient, soClient, { showInactive: false, perPage: 0, page: 1, @@ -83,7 +89,7 @@ export const getAgentPoliciesHandler: FleetRequestHandler< perPage, }; - await populateAssignedAgentsCount(esClient, items); + await populateAssignedAgentsCount(esClient, soClient, items); return response.ok({ body }); } catch (error) { @@ -110,7 +116,7 @@ export const bulkGetAgentPoliciesHandler: FleetRequestHandler< items, }; - await populateAssignedAgentsCount(esClient, items); + await populateAssignedAgentsCount(esClient, soClient, items); return response.ok({ body }); } catch (error) { diff --git a/x-pack/plugins/fleet/server/services/agent_policy.test.ts b/x-pack/plugins/fleet/server/services/agent_policy.test.ts index 3571612cae4d4..a2a0b691a6a53 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.test.ts @@ -569,4 +569,59 @@ describe('agent policy', () => { }); }); }); + + describe('getInactivityTimeouts', () => { + const createPolicySO = (id: string, inactivityTimeout: number) => ({ + id, + type: AGENT_POLICY_SAVED_OBJECT_TYPE, + attributes: { inactivity_timeout: inactivityTimeout }, + references: [], + score: 1, + }); + + const createMockSoClientThatReturns = (policies: Array>) => { + const mockSoClient = savedObjectsClientMock.create(); + mockSoClient.find.mockResolvedValue({ + saved_objects: policies, + page: 1, + per_page: 10, + total: policies.length, + }); + return mockSoClient; + }; + + it('should return empty array if no policies with inactivity timeouts', async () => { + const mockSoClient = createMockSoClientThatReturns([]); + expect(await agentPolicyService.getInactivityTimeouts(mockSoClient)).toEqual([]); + }); + it('should return single inactivity timeout', async () => { + const mockSoClient = createMockSoClientThatReturns([createPolicySO('policy1', 1000)]); + + expect(await agentPolicyService.getInactivityTimeouts(mockSoClient)).toEqual([ + { inactivityTimeout: 1000, policyIds: ['policy1'] }, + ]); + }); + it('should return group policies with same inactivity timeout', async () => { + const mockSoClient = createMockSoClientThatReturns([ + createPolicySO('policy1', 1000), + createPolicySO('policy2', 1000), + ]); + + expect(await agentPolicyService.getInactivityTimeouts(mockSoClient)).toEqual([ + { inactivityTimeout: 1000, policyIds: ['policy1', 'policy2'] }, + ]); + }); + it('should return handle single and grouped policies', async () => { + const mockSoClient = createMockSoClientThatReturns([ + createPolicySO('policy1', 1000), + createPolicySO('policy2', 1000), + createPolicySO('policy3', 2000), + ]); + + expect(await agentPolicyService.getInactivityTimeouts(mockSoClient)).toEqual([ + { inactivityTimeout: 1000, policyIds: ['policy1', 'policy2'] }, + { inactivityTimeout: 2000, policyIds: ['policy3'] }, + ]); + }); + }); }); diff --git a/x-pack/plugins/fleet/server/services/agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policy.ts index 48b0209e4359d..c66f16f61b5c5 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { omit, isEqual, keyBy } from 'lodash'; +import { omit, isEqual, keyBy, groupBy } from 'lodash'; import uuidv5 from 'uuid/v5'; import { safeDump } from 'js-yaml'; import pMap from 'p-map'; @@ -658,7 +658,7 @@ class AgentPolicyService { throw new HostedAgentPolicyRestrictionRelatedError(`Cannot delete hosted agent policy ${id}`); } - const { total } = await getAgentsByKuery(esClient, { + const { total } = await getAgentsByKuery(esClient, soClient, { showInactive: false, perPage: 0, page: 1, @@ -1031,6 +1031,25 @@ class AgentPolicyService { return res; } + + public async getInactivityTimeouts( + soClient: SavedObjectsClientContract + ): Promise> { + const findRes = await soClient.find({ + type: SAVED_OBJECT_TYPE, + page: 1, + perPage: SO_SEARCH_LIMIT, + filter: `${SAVED_OBJECT_TYPE}.attributes.inactivity_timeout: *`, + fields: [`inactivity_timeout`], + }); + + const groupedResults = groupBy(findRes.saved_objects, (so) => so.attributes.inactivity_timeout); + + return Object.entries(groupedResults).map(([inactivityTimeout, policies]) => ({ + inactivityTimeout: parseInt(inactivityTimeout, 10), + policyIds: policies.map((policy) => policy.id), + })); + } } export const agentPolicyService = new AgentPolicyService(); diff --git a/x-pack/plugins/fleet/server/services/agents/action.mock.ts b/x-pack/plugins/fleet/server/services/agents/action.mock.ts index 8d0bcb8b4ee4e..7f381ba009066 100644 --- a/x-pack/plugins/fleet/server/services/agents/action.mock.ts +++ b/x-pack/plugins/fleet/server/services/agents/action.mock.ts @@ -14,31 +14,47 @@ import type { AgentPolicy } from '../../types'; export function createClientMock() { const agentInHostedDoc = { _id: 'agent-in-hosted-policy', + _index: 'index', _source: { policy_id: 'hosted-agent-policy', local_metadata: { elastic: { agent: { version: '8.4.0', upgradeable: true } } }, }, + fields: { + status: ['online'], + }, }; const agentInHostedDoc2 = { _id: 'agent-in-hosted-policy2', + _index: 'index', _source: { policy_id: 'hosted-agent-policy', local_metadata: { elastic: { agent: { version: '8.4.0', upgradeable: true } } }, }, + fields: { + status: ['online'], + }, }; const agentInRegularDoc = { _id: 'agent-in-regular-policy', + _index: 'index', _source: { policy_id: 'regular-agent-policy', local_metadata: { elastic: { agent: { version: '8.4.0', upgradeable: true } } }, }, + fields: { + status: ['online'], + }, }; const agentInRegularDoc2 = { _id: 'agent-in-regular-policy2', + _index: 'index', _source: { policy_id: 'regular-agent-policy', local_metadata: { elastic: { agent: { version: '8.4.0', upgradeable: true } } }, }, + fields: { + status: ['online'], + }, }; const regularAgentPolicySO = { id: 'regular-agent-policy', @@ -74,6 +90,13 @@ export function createClientMock() { }; }); + soClientMock.find.mockResolvedValue({ + saved_objects: [], + total: 0, + per_page: 10, + page: 1, + }); + const esClientMock = elasticsearchServiceMock.createClusterClient().asInternalUser; // @ts-expect-error esClientMock.get.mockResponseImplementation(({ id }) => { @@ -124,7 +147,24 @@ export function createClientMock() { }; }); - esClientMock.search.mockResolvedValue({ hits: { hits: [] } } as any); + esClientMock.search.mockImplementation(() => + Promise.resolve({ + took: 1, + timed_out: false, + _shards: { + failed: 0, + successful: 1, + total: 1, + }, + hits: { + hits: [agentInHostedDoc, agentInRegularDoc, agentInRegularDoc2], + total: { + value: 3, + relation: 'eq', + }, + }, + }) + ); return { soClient: soClientMock, diff --git a/x-pack/plugins/fleet/server/services/agents/action_runner.ts b/x-pack/plugins/fleet/server/services/agents/action_runner.ts index 83b61a340bfed..b0649752f6169 100644 --- a/x-pack/plugins/fleet/server/services/agents/action_runner.ts +++ b/x-pack/plugins/fleet/server/services/agents/action_runner.ts @@ -191,7 +191,7 @@ export abstract class ActionRunner { const perPage = this.actionParams.batchSize ?? SO_SEARCH_LIMIT; const getAgents = () => - getAgentsByKuery(this.esClient, { + getAgentsByKuery(this.esClient, this.soClient, { kuery: this.actionParams.kuery, showInactive: this.actionParams.showInactive ?? false, page: 1, diff --git a/x-pack/plugins/fleet/server/services/agents/actions.ts b/x-pack/plugins/fleet/server/services/agents/actions.ts index 8f9302bd31acd..b33aa326c7d3c 100644 --- a/x-pack/plugins/fleet/server/services/agents/actions.ts +++ b/x-pack/plugins/fleet/server/services/agents/actions.ts @@ -6,7 +6,7 @@ */ import uuid from 'uuid'; -import type { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; import { appContextService } from '../app_context'; import type { @@ -287,7 +287,11 @@ export async function cancelAgentAction(esClient: ElasticsearchClient, actionId: } export interface ActionsService { - getAgent: (esClient: ElasticsearchClient, agentId: string) => Promise; + getAgent: ( + esClient: ElasticsearchClient, + soClient: SavedObjectsClientContract, + agentId: string + ) => Promise; cancelAgentAction: (esClient: ElasticsearchClient, actionId: string) => Promise; diff --git a/x-pack/plugins/fleet/server/services/agents/agent_service.test.ts b/x-pack/plugins/fleet/server/services/agents/agent_service.test.ts index fe43fa50b4317..d38d2672be899 100644 --- a/x-pack/plugins/fleet/server/services/agents/agent_service.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/agent_service.test.ts @@ -9,8 +9,12 @@ jest.mock('../security'); jest.mock('./crud'); jest.mock('./status'); -import type { ElasticsearchClient } from '@kbn/core/server'; -import { elasticsearchServiceMock, httpServerMock } from '@kbn/core/server/mocks'; +import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; +import { + elasticsearchServiceMock, + httpServerMock, + savedObjectsClientMock, +} from '@kbn/core/server/mocks'; import { FleetUnauthorizedError } from '../../errors'; @@ -36,7 +40,8 @@ describe('AgentService', () => { describe('asScoped', () => { describe('without required privilege', () => { const agentClient = new AgentServiceImpl( - elasticsearchServiceMock.createElasticsearchClient() + elasticsearchServiceMock.createElasticsearchClient(), + savedObjectsClientMock.create() ).asScoped(httpServerMock.createKibanaRequest()); beforeEach(() => @@ -99,7 +104,8 @@ describe('AgentService', () => { describe('with required privilege', () => { const mockEsClient = elasticsearchServiceMock.createElasticsearchClient(); - const agentClient = new AgentServiceImpl(mockEsClient).asScoped( + const mockSoClient = savedObjectsClientMock.create(); + const agentClient = new AgentServiceImpl(mockEsClient, mockSoClient).asScoped( httpServerMock.createKibanaRequest() ); @@ -128,20 +134,22 @@ describe('AgentService', () => { ) ); - expectApisToCallServicesSuccessfully(mockEsClient, agentClient); + expectApisToCallServicesSuccessfully(mockEsClient, mockSoClient, agentClient); }); }); describe('asInternalUser', () => { const mockEsClient = elasticsearchServiceMock.createElasticsearchClient(); - const agentClient = new AgentServiceImpl(mockEsClient).asInternalUser; + const mockSoClient = savedObjectsClientMock.create(); + const agentClient = new AgentServiceImpl(mockEsClient, mockSoClient).asInternalUser; - expectApisToCallServicesSuccessfully(mockEsClient, agentClient); + expectApisToCallServicesSuccessfully(mockEsClient, mockSoClient, agentClient); }); }); function expectApisToCallServicesSuccessfully( mockEsClient: ElasticsearchClient, + mockSoClient: jest.Mocked, agentClient: AgentClient ) { test('client.listAgents calls getAgentsByKuery and returns results', async () => { @@ -149,7 +157,7 @@ function expectApisToCallServicesSuccessfully( await expect(agentClient.listAgents({ showInactive: true })).resolves.toEqual( 'getAgentsByKuery success' ); - expect(mockGetAgentsByKuery).toHaveBeenCalledWith(mockEsClient, { + expect(mockGetAgentsByKuery).toHaveBeenCalledWith(mockEsClient, mockSoClient, { showInactive: true, }); }); @@ -157,7 +165,7 @@ function expectApisToCallServicesSuccessfully( test('client.getAgent calls getAgentById and returns results', async () => { mockGetAgentById.mockResolvedValue('getAgentById success'); await expect(agentClient.getAgent('foo-id')).resolves.toEqual('getAgentById success'); - expect(mockGetAgentById).toHaveBeenCalledWith(mockEsClient, 'foo-id'); + expect(mockGetAgentById).toHaveBeenCalledWith(mockEsClient, mockSoClient, 'foo-id'); }); test('client.getAgentStatusById calls getAgentStatusById and returns results', async () => { @@ -165,7 +173,7 @@ function expectApisToCallServicesSuccessfully( await expect(agentClient.getAgentStatusById('foo-id')).resolves.toEqual( 'getAgentStatusById success' ); - expect(mockGetAgentStatusById).toHaveBeenCalledWith(mockEsClient, 'foo-id'); + expect(mockGetAgentStatusById).toHaveBeenCalledWith(mockEsClient, mockSoClient, 'foo-id'); }); test('client.getAgentStatusForAgentPolicy calls getAgentStatusForAgentPolicy and returns results', async () => { @@ -175,6 +183,7 @@ function expectApisToCallServicesSuccessfully( ); expect(mockGetAgentStatusForAgentPolicy).toHaveBeenCalledWith( mockEsClient, + mockSoClient, 'foo-id', 'foo-filter' ); diff --git a/x-pack/plugins/fleet/server/services/agents/agent_service.ts b/x-pack/plugins/fleet/server/services/agents/agent_service.ts index 8f732809adf5f..1050f7af5936e 100644 --- a/x-pack/plugins/fleet/server/services/agents/agent_service.ts +++ b/x-pack/plugins/fleet/server/services/agents/agent_service.ts @@ -7,7 +7,11 @@ /* eslint-disable max-classes-per-file */ -import type { ElasticsearchClient, KibanaRequest } from '@kbn/core/server'; +import type { + ElasticsearchClient, + KibanaRequest, + SavedObjectsClientContract, +} from '@kbn/core/server'; import type { AgentStatus, ListWithKuery } from '../../types'; import type { Agent, GetAgentStatusResponse } from '../../../common/types'; @@ -82,6 +86,7 @@ export interface AgentClient { class AgentClientImpl implements AgentClient { constructor( private readonly internalEsClient: ElasticsearchClient, + private readonly soClient: SavedObjectsClientContract, private readonly preflightCheck?: () => void | Promise ) {} @@ -91,22 +96,27 @@ class AgentClientImpl implements AgentClient { } ) { await this.#runPreflight(); - return getAgentsByKuery(this.internalEsClient, options); + return getAgentsByKuery(this.internalEsClient, this.soClient, options); } public async getAgent(agentId: string) { await this.#runPreflight(); - return getAgentById(this.internalEsClient, agentId); + return getAgentById(this.internalEsClient, this.soClient, agentId); } public async getAgentStatusById(agentId: string) { await this.#runPreflight(); - return getAgentStatusById(this.internalEsClient, agentId); + return getAgentStatusById(this.internalEsClient, this.soClient, agentId); } public async getAgentStatusForAgentPolicy(agentPolicyId?: string, filterKuery?: string) { await this.#runPreflight(); - return getAgentStatusForAgentPolicy(this.internalEsClient, agentPolicyId, filterKuery); + return getAgentStatusForAgentPolicy( + this.internalEsClient, + this.soClient, + agentPolicyId, + filterKuery + ); } #runPreflight = async () => { @@ -120,7 +130,10 @@ class AgentClientImpl implements AgentClient { * @internal */ export class AgentServiceImpl implements AgentService { - constructor(private readonly internalEsClient: ElasticsearchClient) {} + constructor( + private readonly internalEsClient: ElasticsearchClient, + private readonly soClient: SavedObjectsClientContract + ) {} public asScoped(req: KibanaRequest) { const preflightCheck = async () => { @@ -132,10 +145,10 @@ export class AgentServiceImpl implements AgentService { } }; - return new AgentClientImpl(this.internalEsClient, preflightCheck); + return new AgentClientImpl(this.internalEsClient, this.soClient, preflightCheck); } public get asInternalUser() { - return new AgentClientImpl(this.internalEsClient); + return new AgentClientImpl(this.internalEsClient, this.soClient); } } diff --git a/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.test.ts b/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.test.ts new file mode 100644 index 0000000000000..ab1f9617a8917 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.test.ts @@ -0,0 +1,301 @@ +/* + * Copyright 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 { InactivityTimeouts } from './build_status_runtime_field'; +import { _buildStatusRuntimeField } from './build_status_runtime_field'; + +describe('buildStatusRuntimeField', () => { + const now = 1234567890123; + beforeAll(() => { + global.Date.now = jest.fn(() => now); + }); + it('should build the correct runtime field if there are no inactivity timeouts', () => { + const inactivityTimeouts: InactivityTimeouts = []; + const runtimeField = _buildStatusRuntimeField(inactivityTimeouts); + expect(runtimeField).toMatchInlineSnapshot(` + Object { + "status": Object { + "script": Object { + "lang": "painless", + "source": " + long lastCheckinMillis = doc['last_checkin'].size() > 0 + ? doc['last_checkin'].value.toInstant().toEpochMilli() + : -1; + if (doc['active'].size() > 0 && doc['active'].value == false) { + emit('unenrolled'); + } else if (lastCheckinMillis > 0 && doc['policy_id'].size() > 0 && false) { + emit('inactive'); + } else if ( + lastCheckinMillis > 0 + && lastCheckinMillis + < (1234567590123L) + ) { + emit('offline'); + } else if ( + doc['policy_revision_idx'].size() == 0 || ( + doc['upgrade_started_at'].size() > 0 && + doc['upgraded_at'].size() == 0 + ) + ) { + emit('updating'); + } else if (doc['last_checkin'].size() == 0) { + emit('enrolling'); + } else if (doc['unenrollment_started_at'].size() > 0) { + emit('unenrolling'); + } else if ( + doc['last_checkin_status'].size() > 0 && + doc['last_checkin_status'].value.toLowerCase() == 'error' + ) { + emit('error'); + } else if ( + doc['last_checkin_status'].size() > 0 && + doc['last_checkin_status'].value.toLowerCase() == 'degraded' + ) { + emit('degraded'); + } else { + emit('online'); + }", + }, + "type": "keyword", + }, + } + `); + }); + it('should build the correct runtime field if there are no inactivity timeouts (prefix)', () => { + const inactivityTimeouts: InactivityTimeouts = []; + const runtimeField = _buildStatusRuntimeField(inactivityTimeouts, 'my.prefix.'); + expect(runtimeField).toMatchInlineSnapshot(` + Object { + "status": Object { + "script": Object { + "lang": "painless", + "source": " + long lastCheckinMillis = doc['my.prefix.last_checkin'].size() > 0 + ? doc['my.prefix.last_checkin'].value.toInstant().toEpochMilli() + : -1; + if (doc['my.prefix.active'].size() > 0 && doc['my.prefix.active'].value == false) { + emit('unenrolled'); + } else if (lastCheckinMillis > 0 && doc['my.prefix.policy_id'].size() > 0 && false) { + emit('inactive'); + } else if ( + lastCheckinMillis > 0 + && lastCheckinMillis + < (1234567590123L) + ) { + emit('offline'); + } else if ( + doc['my.prefix.policy_revision_idx'].size() == 0 || ( + doc['my.prefix.upgrade_started_at'].size() > 0 && + doc['my.prefix.upgraded_at'].size() == 0 + ) + ) { + emit('updating'); + } else if (doc['my.prefix.last_checkin'].size() == 0) { + emit('enrolling'); + } else if (doc['my.prefix.unenrollment_started_at'].size() > 0) { + emit('unenrolling'); + } else if ( + doc['my.prefix.last_checkin_status'].size() > 0 && + doc['my.prefix.last_checkin_status'].value.toLowerCase() == 'error' + ) { + emit('error'); + } else if ( + doc['my.prefix.last_checkin_status'].size() > 0 && + doc['my.prefix.last_checkin_status'].value.toLowerCase() == 'degraded' + ) { + emit('degraded'); + } else { + emit('online'); + }", + }, + "type": "keyword", + }, + } + `); + }); + it('should build the correct runtime field if there is one inactivity timeout', () => { + const inactivityTimeouts: InactivityTimeouts = [ + { + inactivityTimeout: 300, + policyIds: ['policy-1'], + }, + ]; + const runtimeField = _buildStatusRuntimeField(inactivityTimeouts); + expect(runtimeField).toMatchInlineSnapshot(` + Object { + "status": Object { + "script": Object { + "lang": "painless", + "source": " + long lastCheckinMillis = doc['last_checkin'].size() > 0 + ? doc['last_checkin'].value.toInstant().toEpochMilli() + : -1; + if (doc['active'].size() > 0 && doc['active'].value == false) { + emit('unenrolled'); + } else if (lastCheckinMillis > 0 && doc['policy_id'].size() > 0 && (doc['policy_id'].value == 'policy-1') && lastCheckinMillis < 1234567590123L) { + emit('inactive'); + } else if ( + lastCheckinMillis > 0 + && lastCheckinMillis + < (1234567590123L) + ) { + emit('offline'); + } else if ( + doc['policy_revision_idx'].size() == 0 || ( + doc['upgrade_started_at'].size() > 0 && + doc['upgraded_at'].size() == 0 + ) + ) { + emit('updating'); + } else if (doc['last_checkin'].size() == 0) { + emit('enrolling'); + } else if (doc['unenrollment_started_at'].size() > 0) { + emit('unenrolling'); + } else if ( + doc['last_checkin_status'].size() > 0 && + doc['last_checkin_status'].value.toLowerCase() == 'error' + ) { + emit('error'); + } else if ( + doc['last_checkin_status'].size() > 0 && + doc['last_checkin_status'].value.toLowerCase() == 'degraded' + ) { + emit('degraded'); + } else { + emit('online'); + }", + }, + "type": "keyword", + }, + } + `); + }); + it('should build the correct runtime field if there are multiple inactivity timeouts with same timeout', () => { + const inactivityTimeouts: InactivityTimeouts = [ + { + inactivityTimeout: 300, + policyIds: ['policy-1', 'policy-2'], + }, + ]; + const runtimeField = _buildStatusRuntimeField(inactivityTimeouts); + expect(runtimeField).toMatchInlineSnapshot(` + Object { + "status": Object { + "script": Object { + "lang": "painless", + "source": " + long lastCheckinMillis = doc['last_checkin'].size() > 0 + ? doc['last_checkin'].value.toInstant().toEpochMilli() + : -1; + if (doc['active'].size() > 0 && doc['active'].value == false) { + emit('unenrolled'); + } else if (lastCheckinMillis > 0 && doc['policy_id'].size() > 0 && (doc['policy_id'].value == 'policy-1' || doc['policy_id'].value == 'policy-2') && lastCheckinMillis < 1234567590123L) { + emit('inactive'); + } else if ( + lastCheckinMillis > 0 + && lastCheckinMillis + < (1234567590123L) + ) { + emit('offline'); + } else if ( + doc['policy_revision_idx'].size() == 0 || ( + doc['upgrade_started_at'].size() > 0 && + doc['upgraded_at'].size() == 0 + ) + ) { + emit('updating'); + } else if (doc['last_checkin'].size() == 0) { + emit('enrolling'); + } else if (doc['unenrollment_started_at'].size() > 0) { + emit('unenrolling'); + } else if ( + doc['last_checkin_status'].size() > 0 && + doc['last_checkin_status'].value.toLowerCase() == 'error' + ) { + emit('error'); + } else if ( + doc['last_checkin_status'].size() > 0 && + doc['last_checkin_status'].value.toLowerCase() == 'degraded' + ) { + emit('degraded'); + } else { + emit('online'); + }", + }, + "type": "keyword", + }, + } + `); + }); + it('should build the correct runtime field if there are multiple inactivity timeouts with different timeout', () => { + const inactivityTimeouts: InactivityTimeouts = [ + { + inactivityTimeout: 300, + policyIds: ['policy-1', 'policy-2'], + }, + { + inactivityTimeout: 400, + policyIds: ['policy-3'], + }, + ]; + const runtimeField = _buildStatusRuntimeField(inactivityTimeouts); + expect(runtimeField).toMatchInlineSnapshot(` + Object { + "status": Object { + "script": Object { + "lang": "painless", + "source": " + long lastCheckinMillis = doc['last_checkin'].size() > 0 + ? doc['last_checkin'].value.toInstant().toEpochMilli() + : -1; + if (doc['active'].size() > 0 && doc['active'].value == false) { + emit('unenrolled'); + } else if (lastCheckinMillis > 0 && doc['policy_id'].size() > 0 && (doc['policy_id'].value == 'policy-1' || doc['policy_id'].value == 'policy-2') && lastCheckinMillis < 1234567590123L || (doc['policy_id'].value == 'policy-3') && lastCheckinMillis < 1234567490123L) { + emit('inactive'); + } else if ( + lastCheckinMillis > 0 + && lastCheckinMillis + < (1234567590123L) + ) { + emit('offline'); + } else if ( + doc['policy_revision_idx'].size() == 0 || ( + doc['upgrade_started_at'].size() > 0 && + doc['upgraded_at'].size() == 0 + ) + ) { + emit('updating'); + } else if (doc['last_checkin'].size() == 0) { + emit('enrolling'); + } else if (doc['unenrollment_started_at'].size() > 0) { + emit('unenrolling'); + } else if ( + doc['last_checkin_status'].size() > 0 && + doc['last_checkin_status'].value.toLowerCase() == 'error' + ) { + emit('error'); + } else if ( + doc['last_checkin_status'].size() > 0 && + doc['last_checkin_status'].value.toLowerCase() == 'degraded' + ) { + emit('degraded'); + } else { + emit('online'); + }", + }, + "type": "keyword", + }, + } + `); + }); + it('should build the same runtime field if path ends with. or not', () => { + const inactivityTimeouts: InactivityTimeouts = []; + const runtimeFieldWithDot = _buildStatusRuntimeField(inactivityTimeouts, 'my.prefix.'); + const runtimeFieldNoDot = _buildStatusRuntimeField(inactivityTimeouts, 'my.prefix'); + expect(runtimeFieldWithDot).toEqual(runtimeFieldNoDot); + }); +}); diff --git a/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts b/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts new file mode 100644 index 0000000000000..3250c632d0200 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts @@ -0,0 +1,113 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type * as estypes from '@elastic/elasticsearch/lib/api/types'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; + +import { AGENT_POLLING_THRESHOLD_MS } from '../../constants'; +import { agentPolicyService } from '../agent_policy'; +const MISSED_INTERVALS_BEFORE_OFFLINE = 10; +const MS_BEFORE_OFFLINE = MISSED_INTERVALS_BEFORE_OFFLINE * AGENT_POLLING_THRESHOLD_MS; + +export type InactivityTimeouts = Awaited< + ReturnType +>; + +const _buildInactiveClause = ( + now: number, + inactivityTimeouts: InactivityTimeouts, + field: (path: string) => string +) => { + const policyClauses = inactivityTimeouts + .map(({ inactivityTimeout, policyIds }) => { + const inactivityTimeoutMs = inactivityTimeout * 1000; + const policyOrs = policyIds + .map((policyId) => `${field('policy_id')}.value == '${policyId}'`) + .join(' || '); + + return `(${policyOrs}) && lastCheckinMillis < ${now - inactivityTimeoutMs}L`; + }) + .join(' || '); + + const agentIsInactive = policyClauses.length ? `${policyClauses}` : 'false'; // if no policies have inactivity timeouts, then no agents are inactive + + return `lastCheckinMillis > 0 && ${field('policy_id')}.size() > 0 && ${agentIsInactive}`; +}; + +function _buildSource(inactivityTimeouts: InactivityTimeouts, pathPrefix?: string) { + const normalizedPrefix = pathPrefix ? `${pathPrefix}${pathPrefix.endsWith('.') ? '' : '.'}` : ''; + const field = (path: string) => `doc['${normalizedPrefix + path}']`; + const now = Date.now(); + return ` + long lastCheckinMillis = ${field('last_checkin')}.size() > 0 + ? ${field('last_checkin')}.value.toInstant().toEpochMilli() + : -1; + if (${field('active')}.size() > 0 && ${field('active')}.value == false) { + emit('unenrolled'); + } else if (${_buildInactiveClause(now, inactivityTimeouts, field)}) { + emit('inactive'); + } else if ( + lastCheckinMillis > 0 + && lastCheckinMillis + < (${now - MS_BEFORE_OFFLINE}L) + ) { + emit('offline'); + } else if ( + ${field('policy_revision_idx')}.size() == 0 || ( + ${field('upgrade_started_at')}.size() > 0 && + ${field('upgraded_at')}.size() == 0 + ) + ) { + emit('updating'); + } else if (${field('last_checkin')}.size() == 0) { + emit('enrolling'); + } else if (${field('unenrollment_started_at')}.size() > 0) { + emit('unenrolling'); + } else if ( + ${field('last_checkin_status')}.size() > 0 && + ${field('last_checkin_status')}.value.toLowerCase() == 'error' + ) { + emit('error'); + } else if ( + ${field('last_checkin_status')}.size() > 0 && + ${field('last_checkin_status')}.value.toLowerCase() == 'degraded' + ) { + emit('degraded'); + } else { + emit('online'); + }`; +} + +// exported for testing +export function _buildStatusRuntimeField( + inactivityTimeouts: InactivityTimeouts, + pathPrefix?: string +): NonNullable { + const source = _buildSource(inactivityTimeouts, pathPrefix); + return { + status: { + type: 'keyword', + script: { + lang: 'painless', + source, + }, + }, + }; +} + +// Build the runtime field to return the agent status +// pathPrefix is used to prefix the field path in the source +// pathPrefix is used by the endpoint team currently to run +// agent queries against the endpoint metadata index +export async function buildAgentStatusRuntimeField( + soClient: SavedObjectsClientContract, + pathPrefix?: string +) { + const inactivityTimeouts = await agentPolicyService.getInactivityTimeouts(soClient); + + return _buildStatusRuntimeField(inactivityTimeouts, pathPrefix); +} diff --git a/x-pack/plugins/fleet/server/services/agents/crud.test.ts b/x-pack/plugins/fleet/server/services/agents/crud.test.ts index bee3d9fef09fc..2a0b341201202 100644 --- a/x-pack/plugins/fleet/server/services/agents/crud.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/crud.test.ts @@ -6,6 +6,7 @@ */ import { errors } from '@elastic/elasticsearch'; import type { ElasticsearchClient } from '@kbn/core/server'; +import { savedObjectsClientMock } from '@kbn/core/server/mocks'; import type { Agent } from '../../types'; @@ -16,11 +17,13 @@ jest.mock('../../../common/services/is_agent_upgradeable', () => ({ })); describe('Agents CRUD test', () => { + const soClientMock = savedObjectsClientMock.create(); let esClientMock: ElasticsearchClient; let searchMock: jest.Mock; beforeEach(() => { searchMock = jest.fn(); + soClientMock.find = jest.fn().mockResolvedValue({ saved_objects: [] }); esClientMock = { search: searchMock, openPointInTime: jest.fn().mockResolvedValue({ id: '1' }), @@ -35,6 +38,9 @@ describe('Agents CRUD test', () => { hits: ids.map((id: string) => ({ _id: id, _source: {}, + fields: { + status: ['inactive'], + }, })), }, }; @@ -54,7 +60,7 @@ describe('Agents CRUD test', () => { expect(searchMock).toHaveBeenCalledWith({ aggs: { tags: { terms: { field: 'tags', size: 10000 } } }, body: { - query: { bool: { minimum_should_match: 1, should: [{ match: { active: true } }] } }, + query: expect.any(Object), }, index: '.fleet-agents', size: 0, @@ -122,7 +128,7 @@ describe('Agents CRUD test', () => { .mockImplementationOnce(() => Promise.resolve(getEsResponse(['1', '2', '3', '4', '5', 'up', '7'], 7)) ); - const result = await getAgentsByKuery(esClientMock, { + const result = await getAgentsByKuery(esClientMock, soClientMock, { showUpgradeable: true, showInactive: false, page: 1, @@ -151,7 +157,7 @@ describe('Agents CRUD test', () => { .mockImplementationOnce(() => Promise.resolve(getEsResponse(['1', '2', '3', 'up', '5', 'up2', '7'], 7)) ); - const result = await getAgentsByKuery(esClientMock, { + const result = await getAgentsByKuery(esClientMock, soClientMock, { showUpgradeable: true, showInactive: false, page: 1, @@ -187,7 +193,7 @@ describe('Agents CRUD test', () => { .mockImplementationOnce(() => Promise.resolve(getEsResponse(['up1', 'up2', 'up3', 'up4', 'up5', 'up6', '7'], 7)) ); - const result = await getAgentsByKuery(esClientMock, { + const result = await getAgentsByKuery(esClientMock, soClientMock, { showUpgradeable: true, showInactive: false, page: 2, @@ -214,7 +220,7 @@ describe('Agents CRUD test', () => { searchMock.mockImplementationOnce(() => Promise.resolve(getEsResponse(['1', '2', '3', 'up', '5'], 10001)) ); - const result = await getAgentsByKuery(esClientMock, { + const result = await getAgentsByKuery(esClientMock, soClientMock, { showUpgradeable: true, showInactive: false, page: 1, @@ -239,7 +245,7 @@ describe('Agents CRUD test', () => { it('should return second page', async () => { searchMock.mockImplementationOnce(() => Promise.resolve(getEsResponse(['6', '7'], 7))); - const result = await getAgentsByKuery(esClientMock, { + const result = await getAgentsByKuery(esClientMock, soClientMock, { showUpgradeable: false, showInactive: false, page: 2, @@ -271,11 +277,11 @@ describe('Agents CRUD test', () => { it('should pass secondary sort for default sort', async () => { searchMock.mockImplementationOnce(() => Promise.resolve(getEsResponse(['1', '2'], 2))); - await getAgentsByKuery(esClientMock, { + await getAgentsByKuery(esClientMock, soClientMock, { showInactive: false, }); - expect(searchMock.mock.calls[searchMock.mock.calls.length - 1][0].body.sort).toEqual([ + expect(searchMock.mock.calls.at(-1)[0].sort).toEqual([ { enrolled_at: { order: 'desc' } }, { 'local_metadata.host.hostname.keyword': { order: 'asc' } }, ]); @@ -283,13 +289,11 @@ describe('Agents CRUD test', () => { it('should not pass secondary sort for non-default sort', async () => { searchMock.mockImplementationOnce(() => Promise.resolve(getEsResponse(['1', '2'], 2))); - await getAgentsByKuery(esClientMock, { + await getAgentsByKuery(esClientMock, soClientMock, { showInactive: false, sortField: 'policy_id', }); - expect(searchMock.mock.calls[searchMock.mock.calls.length - 1][0].body.sort).toEqual([ - { policy_id: { order: 'desc' } }, - ]); + expect(searchMock.mock.calls.at(-1)[0].sort).toEqual([{ policy_id: { order: 'desc' } }]); }); }); }); diff --git a/x-pack/plugins/fleet/server/services/agents/crud.ts b/x-pack/plugins/fleet/server/services/agents/crud.ts index c3ad82518625f..3e5c45c10b0f6 100644 --- a/x-pack/plugins/fleet/server/services/agents/crud.ts +++ b/x-pack/plugins/fleet/server/services/agents/crud.ts @@ -16,14 +16,15 @@ import { appContextService, agentPolicyService } from '..'; import type { FleetServerAgent } from '../../../common/types'; import { SO_SEARCH_LIMIT } from '../../../common/constants'; import { isAgentUpgradeable } from '../../../common/services'; -import { AGENTS_PREFIX, AGENTS_INDEX } from '../../constants'; -import { escapeSearchQueryPhrase, normalizeKuery } from '../saved_object'; +import { AGENTS_INDEX } from '../../constants'; import { FleetError, isESClientError, AgentNotFoundError } from '../../errors'; import { searchHitToAgent, agentSOAttributesToFleetServerAgentDoc } from './helpers'; -const ACTIVE_AGENT_CONDITION = 'active:true'; -const INACTIVE_AGENT_CONDITION = `NOT (${ACTIVE_AGENT_CONDITION})`; +import { buildAgentStatusRuntimeField } from './build_status_runtime_field'; + +const INACTIVE_AGENT_CONDITION = `status:inactive OR status:unenrolled`; +const ACTIVE_AGENT_CONDITION = `NOT (${INACTIVE_AGENT_CONDITION})`; function _joinFilters(filters: Array): KueryNode | undefined { try { @@ -71,13 +72,19 @@ export type GetAgentsOptions = perPage?: number; }; -export async function getAgents(esClient: ElasticsearchClient, options: GetAgentsOptions) { +export async function getAgents( + esClient: ElasticsearchClient, + soClient: SavedObjectsClientContract, + options: GetAgentsOptions +) { let agents: Agent[] = []; if ('agentIds' in options) { - agents = await getAgentsById(esClient, options.agentIds); + agents = (await getAgentsById(esClient, soClient, options.agentIds)).filter( + (maybeAgent) => !('notFound' in maybeAgent) + ) as Agent[]; } else if ('kuery' in options) { agents = ( - await getAllAgentsByKuery(esClient, { + await getAllAgentsByKuery(esClient, soClient, { kuery: options.kuery, showInactive: options.showInactive ?? false, }) @@ -180,8 +187,10 @@ export function getElasticsearchQuery( export async function getAgentsByKuery( esClient: ElasticsearchClient, + soClient: SavedObjectsClientContract, options: ListWithKuery & { showInactive: boolean; + getTotalInactive?: boolean; sortField?: string; sortOrder?: 'asc' | 'desc'; pitId?: string; @@ -192,6 +201,7 @@ export async function getAgentsByKuery( total: number; page: number; perPage: number; + totalInactive?: number; }> { const { page = 1, @@ -203,6 +213,7 @@ export async function getAgentsByKuery( showUpgradeable, searchAfter, pitId, + getTotalInactive = false, } = options; const filters = []; @@ -215,22 +226,24 @@ export async function getAgentsByKuery( } const kueryNode = _joinFilters(filters); - const body = kueryNode ? { query: toElasticsearchQuery(kueryNode) } : {}; + + const runtimeFields = await buildAgentStatusRuntimeField(soClient); + const isDefaultSort = sortField === 'enrolled_at' && sortOrder === 'desc'; // if using default sorting (enrolled_at), adding a secondary sort on hostname, so that the results are not changing randomly in case many agents were enrolled at the same time const secondarySort: estypes.Sort = isDefaultSort ? [{ 'local_metadata.host.hostname.keyword': { order: 'asc' } }] : []; const queryAgents = async (from: number, size: number) => - esClient.search({ + esClient.search({ from, size, track_total_hits: true, rest_total_hits_as_int: true, - body: { - ...body, - sort: [{ [sortField]: { order: sortOrder } }, ...secondarySort], - }, + runtime_mappings: runtimeFields, + fields: Object.keys(runtimeFields), + sort: [{ [sortField]: { order: sortOrder } }, ...secondarySort], + post_filter: kueryNode ? toElasticsearchQuery(kueryNode) : undefined, ...(pitId ? { pit: { @@ -243,11 +256,28 @@ export async function getAgentsByKuery( ignore_unavailable: true, }), ...(pitId && searchAfter ? { search_after: searchAfter, from: 0 } : {}), + ...(getTotalInactive && { + aggregations: { + totalInactive: { + filter: { bool: { must: { terms: { status: ['inactive', 'unenrolled'] } } } }, + }, + }, + }), }); - const res = await queryAgents((page - 1) * perPage, perPage); + let res; + try { + res = await queryAgents((page - 1) * perPage, perPage); + } catch (err) { + appContextService.getLogger().error(`Error getting agents by kuery: ${JSON.stringify(err)}`); + throw err; + } let agents = res.hits.hits.map(searchHitToAgent); let total = res.hits.total as number; + let totalInactive = 0; + if (getTotalInactive && res.aggregations) { + totalInactive = res.aggregations?.totalInactive?.doc_count ?? 0; + } // filtering for a range on the version string will not work, // nor does filtering on a flattened field (local_metadata), so filter here if (showUpgradeable) { @@ -274,11 +304,13 @@ export async function getAgentsByKuery( total, page, perPage, + ...(getTotalInactive && { totalInactive }), }; } export async function getAllAgentsByKuery( esClient: ElasticsearchClient, + soClient: SavedObjectsClientContract, options: Omit & { showInactive: boolean; } @@ -286,7 +318,11 @@ export async function getAllAgentsByKuery( agents: Agent[]; total: number; }> { - const res = await getAgentsByKuery(esClient, { ...options, page: 1, perPage: SO_SEARCH_LIMIT }); + const res = await getAgentsByKuery(esClient, soClient, { + ...options, + page: 1, + perPage: SO_SEARCH_LIMIT, + }); return { agents: res.agents, @@ -294,104 +330,108 @@ export async function getAllAgentsByKuery( }; } -export async function countInactiveAgents( +export async function getAgentById( esClient: ElasticsearchClient, - options: Pick -): Promise { - const { kuery } = options; - const filters = [INACTIVE_AGENT_CONDITION]; + soClient: SavedObjectsClientContract, + agentId: string +) { + const [agentHit] = await getAgentsById(esClient, soClient, [agentId]); - if (kuery && kuery !== '') { - filters.push(normalizeKuery(AGENTS_PREFIX, kuery)); + if ('notFound' in agentHit) { + throw new AgentNotFoundError(`Agent ${agentId} not found`); } - const kueryNode = _joinFilters(filters); - const body = kueryNode ? { query: toElasticsearchQuery(kueryNode) } : {}; - - const res = await esClient.search({ - index: AGENTS_INDEX, - size: 0, - track_total_hits: true, - rest_total_hits_as_int: true, - filter_path: 'hits.total', - ignore_unavailable: true, - body, - }); - - return (res.hits.total as number) || 0; + return agentHit; } -export async function getAgentById(esClient: ElasticsearchClient, agentId: string) { - const agentNotFoundError = new AgentNotFoundError(`Agent ${agentId} not found`); +async function _filterAgents( + esClient: ElasticsearchClient, + soClient: SavedObjectsClientContract, + query: estypes.QueryDslQueryContainer, + options: { + page?: number; + perPage?: number; + sortField?: string; + sortOrder?: 'asc' | 'desc'; + } = {} +): Promise<{ + agents: Agent[]; + total: number; + page: number; + perPage: number; +}> { + const { page = 1, perPage = 20, sortField = 'enrolled_at', sortOrder = 'desc' } = options; + const runtimeFields = await buildAgentStatusRuntimeField(soClient); + + let res; try { - const agentHit = await esClient.get({ + res = await esClient.search({ + from: (page - 1) * perPage, + size: perPage, + track_total_hits: true, + rest_total_hits_as_int: true, + runtime_mappings: runtimeFields, + fields: Object.keys(runtimeFields), + sort: [{ [sortField]: { order: sortOrder } }], + query: { bool: { filter: query } }, index: AGENTS_INDEX, - id: agentId, + ignore_unavailable: true, }); - - if (agentHit.found === false) { - throw agentNotFoundError; - } - - return searchHitToAgent(agentHit); } catch (err) { - if (isESClientError(err) && err.meta.statusCode === 404) { - throw agentNotFoundError; - } + appContextService.getLogger().error(`Error querying agents: ${JSON.stringify(err)}`); throw err; } -} -export function isAgentDocument( - maybeDocument: any -): maybeDocument is estypes.MgetResponseItem { - return '_id' in maybeDocument && '_source' in maybeDocument; -} - -export type ESAgentDocumentResult = estypes.MgetResponseItem; - -export async function getAgentDocuments( - esClient: ElasticsearchClient, - agentIds: string[] -): Promise { - const res = await esClient.mget({ - index: AGENTS_INDEX, - body: { docs: agentIds.map((_id) => ({ _id })) }, - }); + const agents = res.hits.hits.map(searchHitToAgent); + const total = res.hits.total as number; - return res.docs || []; + return { + agents, + total, + page, + perPage, + }; } export async function getAgentsById( esClient: ElasticsearchClient, + soClient: SavedObjectsClientContract, agentIds: string[] -): Promise { - const allDocs = await getAgentDocuments(esClient, agentIds); - const agents = allDocs.reduce((results, doc) => { - if (isAgentDocument(doc)) { - results.push(searchHitToAgent(doc)); - } +): Promise> { + if (!agentIds.length) { + return []; + } - return results; - }, []); + const idsQuery = { + terms: { + _id: agentIds, + }, + }; + const { agents } = await _filterAgents(esClient, soClient, idsQuery, { + perPage: agentIds.length, + }); - return agents; + // return agents in the same order as agentIds + return agentIds.map( + (agentId) => agents.find((agent) => agent.id === agentId) || { id: agentId, notFound: true } + ); } export async function getAgentByAccessAPIKeyId( esClient: ElasticsearchClient, + soClient: SavedObjectsClientContract, accessAPIKeyId: string ): Promise { - const res = await esClient.search({ - index: AGENTS_INDEX, - ignore_unavailable: true, - q: `access_api_key_id:${escapeSearchQueryPhrase(accessAPIKeyId)}`, - }); + const query = { + term: { + access_api_key_id: accessAPIKeyId, + }, + }; + const { agents } = await _filterAgents(esClient, soClient, query); - const searchHit = res.hits.hits[0]; - const agent = searchHit && searchHitToAgent(searchHit); + const agent = agents.length ? agents[0] : null; - if (!searchHit || !agent) { + if (!agent) { throw new AgentNotFoundError('Agent not found'); } if (agent.access_api_key_id !== accessAPIKeyId) { @@ -472,12 +512,31 @@ export async function deleteAgent(esClient: ElasticsearchClient, agentId: string } } +async function _getAgentDocById(esClient: ElasticsearchClient, agentId: string) { + try { + const res = await esClient.get({ + id: agentId, + index: AGENTS_INDEX, + }); + + if (!res._source) { + throw new AgentNotFoundError(`Agent ${agentId} not found`); + } + return res._source; + } catch (err) { + if (isESClientError(err) && err.meta.statusCode === 404) { + throw new AgentNotFoundError(`Agent ${agentId} not found`); + } + throw err; + } +} + export async function getAgentPolicyForAgent( soClient: SavedObjectsClientContract, esClient: ElasticsearchClient, agentId: string ) { - const agent = await getAgentById(esClient, agentId); + const agent = await _getAgentDocById(esClient, agentId); if (!agent.policy_id) { return; } diff --git a/x-pack/plugins/fleet/server/services/agents/helpers.ts b/x-pack/plugins/fleet/server/services/agents/helpers.ts index 7fa004b467dfc..c2397144253e4 100644 --- a/x-pack/plugins/fleet/server/services/agents/helpers.ts +++ b/x-pack/plugins/fleet/server/services/agents/helpers.ts @@ -9,15 +9,21 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { SortResults } from '@elastic/elasticsearch/lib/api/types'; import type { SearchHit } from '@kbn/es-types'; -import type { Agent, AgentSOAttributes, FleetServerAgent } from '../../types'; -import { getAgentStatus } from '../../../common/services/agent_status'; +import { appContextService } from '..'; + +import type { Agent, AgentSOAttributes, AgentStatus, FleetServerAgent } from '../../types'; type FleetServerAgentESResponse = | estypes.GetGetResult | estypes.SearchResponse['hits']['hits'][0] | SearchHit; -export function searchHitToAgent(hit: FleetServerAgentESResponse & { sort?: SortResults }): Agent { +export function searchHitToAgent( + hit: FleetServerAgentESResponse & { + sort?: SortResults; + fields?: { status?: AgentStatus[] }; + } +): Agent { // @ts-expect-error @elastic/elasticsearch MultiGetHit._source is optional const agent: Agent = { id: hit._id, @@ -29,7 +35,16 @@ export function searchHitToAgent(hit: FleetServerAgentESResponse & { sort?: Sort sort: hit.sort, }; - agent.status = getAgentStatus(agent); + if (!hit.fields?.status?.length) { + appContextService + .getLogger() + .error( + 'Agent status runtime field is missing, unable to get agent status for agent ' + agent.id + ); + } else { + agent.status = hit.fields.status[0]; + } + return agent; } diff --git a/x-pack/plugins/fleet/server/services/agents/reassign.test.ts b/x-pack/plugins/fleet/server/services/agents/reassign.test.ts index 3fb9d2ee1f33b..8ef9ef77b7d92 100644 --- a/x-pack/plugins/fleet/server/services/agents/reassign.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/reassign.test.ts @@ -73,6 +73,13 @@ describe('reassignAgents (plural)', () => { agentInHostedDoc2, regularAgentPolicySO2, } = createClientMock(); + + esClient.search.mockResponse({ + hits: { + hits: [agentInRegularDoc, agentInHostedDoc, agentInHostedDoc2], + }, + } as any); + const idsToReassign = [agentInRegularDoc._id, agentInHostedDoc._id, agentInHostedDoc2._id]; await reassignAgents(soClient, esClient, { agentIds: idsToReassign }, regularAgentPolicySO2.id); diff --git a/x-pack/plugins/fleet/server/services/agents/reassign.ts b/x-pack/plugins/fleet/server/services/agents/reassign.ts index 6a81606697228..86d368d399310 100644 --- a/x-pack/plugins/fleet/server/services/agents/reassign.ts +++ b/x-pack/plugins/fleet/server/services/agents/reassign.ts @@ -4,7 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { SavedObjectsClientContract, ElasticsearchClient } from '@kbn/core/server'; import Boom from '@hapi/boom'; @@ -15,7 +14,7 @@ import { AgentReassignmentError, HostedAgentPolicyRestrictionRelatedError } from import { SO_SEARCH_LIMIT } from '../../constants'; import { - getAgentDocuments, + getAgentsById, getAgentPolicyForAgent, updateAgent, getAgentsByKuery, @@ -23,7 +22,6 @@ import { } from './crud'; import type { GetAgentsOptions } from '.'; import { createAgentAction } from './actions'; -import { searchHitToAgent } from './helpers'; import { ReassignActionRunner, reassignBatch } from './reassign_action_runner'; @@ -78,9 +76,6 @@ export async function reassignAgentIsAllowed( return true; } -function isMgetDoc(doc?: estypes.MgetResponseItem): doc is estypes.GetGetResult { - return Boolean(doc && 'found' in doc); -} export async function reassignAgents( soClient: SavedObjectsClientContract, esClient: ElasticsearchClient, @@ -105,19 +100,19 @@ export async function reassignAgents( if ('agents' in options) { givenAgents = options.agents; } else if ('agentIds' in options) { - const givenAgentsResults = await getAgentDocuments(esClient, options.agentIds); - for (const agentResult of givenAgentsResults) { - if (isMgetDoc(agentResult) && agentResult.found === false) { - outgoingErrors[agentResult._id] = new AgentReassignmentError( - `Cannot find agent ${agentResult._id}` + const maybeAgents = await getAgentsById(esClient, soClient, options.agentIds); + for (const maybeAgent of maybeAgents) { + if ('notFound' in maybeAgent) { + outgoingErrors[maybeAgent.id] = new AgentReassignmentError( + `Cannot find agent ${maybeAgent.id}` ); } else { - givenAgents.push(searchHitToAgent(agentResult)); + givenAgents.push(maybeAgent); } } } else if ('kuery' in options) { const batchSize = options.batchSize ?? SO_SEARCH_LIMIT; - const res = await getAgentsByKuery(esClient, { + const res = await getAgentsByKuery(esClient, soClient, { kuery: options.kuery, showInactive: options.showInactive ?? false, page: 1, diff --git a/x-pack/plugins/fleet/server/services/agents/request_diagnostics.ts b/x-pack/plugins/fleet/server/services/agents/request_diagnostics.ts index efb9812180580..19f834266b904 100644 --- a/x-pack/plugins/fleet/server/services/agents/request_diagnostics.ts +++ b/x-pack/plugins/fleet/server/services/agents/request_diagnostics.ts @@ -38,19 +38,19 @@ export async function bulkRequestDiagnostics( } ): Promise<{ actionId: string }> { if ('agentIds' in options) { - const givenAgents = await getAgents(esClient, options); + const givenAgents = await getAgents(esClient, soClient, options); return await requestDiagnosticsBatch(esClient, givenAgents, {}); } const batchSize = options.batchSize ?? SO_SEARCH_LIMIT; - const res = await getAgentsByKuery(esClient, { + const res = await getAgentsByKuery(esClient, soClient, { kuery: options.kuery, showInactive: false, page: 1, perPage: batchSize, }); if (res.total <= batchSize) { - const givenAgents = await getAgents(esClient, options); + const givenAgents = await getAgents(esClient, soClient, options); return await requestDiagnosticsBatch(esClient, givenAgents, {}); } else { return await new RequestDiagnosticsActionRunner( diff --git a/x-pack/plugins/fleet/server/services/agents/status.test.ts b/x-pack/plugins/fleet/server/services/agents/status.test.ts deleted file mode 100644 index 7c598bf783c14..0000000000000 --- a/x-pack/plugins/fleet/server/services/agents/status.test.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; - -import { AGENT_POLLING_THRESHOLD_MS } from '../../../common/constants'; - -import { getAgentStatusById } from './status'; - -describe('Agent status service', () => { - it('should return inactive when agent is not active', async () => { - const mockElasticsearchClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - mockElasticsearchClient.get.mockResponse( - // @ts-expect-error not full interface - { - _id: 'id', - _source: { - active: false, - local_metadata: {}, - user_provided_metadata: {}, - }, - } - ); - const status = await getAgentStatusById(mockElasticsearchClient, 'id'); - expect(status).toEqual('inactive'); - }); - - it('should return online when agent is active', async () => { - const mockElasticsearchClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - mockElasticsearchClient.get.mockResponse( - // @ts-expect-error not full interface - { - _id: 'id', - _source: { - active: true, - policy_revision_idx: 1, - last_checkin: new Date().toISOString(), - local_metadata: {}, - user_provided_metadata: {}, - }, - } - ); - const status = await getAgentStatusById(mockElasticsearchClient, 'id'); - expect(status).toEqual('online'); - }); - - it('should return enrolling when agent is active but never checkin', async () => { - const mockElasticsearchClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - mockElasticsearchClient.get.mockResponse( - // @ts-expect-error not full interface - { - _id: 'id', - _source: { - active: true, - local_metadata: {}, - user_provided_metadata: {}, - }, - } - ); - const status = await getAgentStatusById(mockElasticsearchClient, 'id'); - expect(status).toEqual('enrolling'); - }); - - it('should return unenrolling when agent is unenrolling', async () => { - const mockElasticsearchClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - mockElasticsearchClient.get.mockResponse( - // @ts-expect-error not full interface - { - _id: 'id', - _source: { - active: true, - last_checkin: new Date().toISOString(), - unenrollment_started_at: new Date().toISOString(), - local_metadata: {}, - user_provided_metadata: {}, - }, - } - ); - const status = await getAgentStatusById(mockElasticsearchClient, 'id'); - expect(status).toEqual('unenrolling'); - }); - - it('should return offline when agent has not checked in for 10 intervals', async () => { - const mockElasticsearchClient = elasticsearchServiceMock.createClusterClient().asInternalUser; - mockElasticsearchClient.get.mockResponse( - // @ts-expect-error not full interface - { - _id: 'id', - _source: { - active: true, - last_checkin: new Date(Date.now() - 10 * AGENT_POLLING_THRESHOLD_MS - 1000).toISOString(), - policy_revision_idx: 2, - local_metadata: {}, - user_provided_metadata: {}, - }, - } - ); - const status = await getAgentStatusById(mockElasticsearchClient, 'id'); - expect(status).toEqual('offline'); - }); -}); diff --git a/x-pack/plugins/fleet/server/services/agents/status.ts b/x-pack/plugins/fleet/server/services/agents/status.ts index 444108ec24ad5..e4cb8815e4711 100644 --- a/x-pack/plugins/fleet/server/services/agents/status.ts +++ b/x-pack/plugins/fleet/server/services/agents/status.ts @@ -5,120 +5,142 @@ * 2.0. */ -import type { ElasticsearchClient } from '@kbn/core/server'; -import pMap from 'p-map'; +import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; -import type { KueryNode } from '@kbn/es-query'; +import { toElasticsearchQuery } from '@kbn/es-query'; import { fromKueryExpression } from '@kbn/es-query'; -import { AGENTS_PREFIX } from '../../constants'; +import type { + AggregationsTermsAggregateBase, + AggregationsTermsBucketBase, + QueryDslQueryContainer, +} from '@elastic/elasticsearch/lib/api/types'; + +import { AGENTS_INDEX } from '../../constants'; import type { AgentStatus } from '../../types'; -import { AgentStatusKueryHelper } from '../../../common/services'; import { FleetUnauthorizedError } from '../../errors'; import { appContextService } from '../app_context'; -import { - closePointInTime, - getAgentById, - getAgentsByKuery, - openPointInTime, - removeSOAttributes, -} from './crud'; +import { getAgentById, removeSOAttributes } from './crud'; +import { buildAgentStatusRuntimeField } from './build_status_runtime_field'; + +interface AggregationsStatusTermsBucketKeys extends AggregationsTermsBucketBase { + key: AgentStatus; +} const DATA_STREAM_INDEX_PATTERN = 'logs-*-*,metrics-*-*,traces-*-*,synthetics-*-*'; const MAX_AGENT_DATA_PREVIEW_SIZE = 20; export async function getAgentStatusById( esClient: ElasticsearchClient, + soClient: SavedObjectsClientContract, agentId: string ): Promise { - return (await getAgentById(esClient, agentId)).status!; -} - -export const getAgentStatus = AgentStatusKueryHelper.getAgentStatus; - -function joinKuerys(...kuerys: Array) { - return kuerys - .filter((kuery) => kuery !== undefined) - .reduce((acc: KueryNode | undefined, kuery: string | undefined): KueryNode | undefined => { - if (kuery === undefined) { - return acc; - } - const normalizedKuery: KueryNode = fromKueryExpression(removeSOAttributes(kuery || '')); - - if (!acc) { - return normalizedKuery; - } - - return { - type: 'function', - function: 'and', - arguments: [acc, normalizedKuery], - }; - }, undefined as KueryNode | undefined); + return (await getAgentById(esClient, soClient, agentId)).status!; } export async function getAgentStatusForAgentPolicy( esClient: ElasticsearchClient, + soClient: SavedObjectsClientContract, agentPolicyId?: string, filterKuery?: string ) { - let pitId: string | undefined; + const logger = appContextService.getLogger(); + const runtimeFields = await buildAgentStatusRuntimeField(soClient); + + const clauses: QueryDslQueryContainer[] = []; + + if (filterKuery) { + const kueryAsElasticsearchQuery = toElasticsearchQuery( + fromKueryExpression(removeSOAttributes(filterKuery)) + ); + clauses.push(kueryAsElasticsearchQuery); + } + + if (agentPolicyId) { + clauses.push({ + term: { + policy_id: agentPolicyId, + }, + }); + } + + const query = + clauses.length > 0 + ? { + bool: { + must: clauses, + }, + } + : undefined; + + const statuses: Record = { + online: 0, + error: 0, + inactive: 0, + offline: 0, + updating: 0, + unenrolled: 0, + degraded: 0, + enrolling: 0, + unenrolling: 0, + }; + + let response; + try { - pitId = await openPointInTime(esClient); + response = await esClient.search< + null, + { status: AggregationsTermsAggregateBase } + >({ + index: AGENTS_INDEX, + size: 0, + query, + fields: Object.keys(runtimeFields), + runtime_mappings: runtimeFields, + aggregations: { + status: { + terms: { + field: 'status', + size: Object.keys(statuses).length, + }, + }, + }, + }); } catch (error) { - if (error.statusCode === 404) { - appContextService - .getLogger() - .debug('Index .fleet-agents does not exist yet, skipping point in time.'); - } else { - throw error; - } + logger.error(`Error getting agent statuses: ${error}`); + throw error; } - const [all, allActive, online, error, offline, updating] = await pMap( - [ - undefined, // All agents, including inactive - undefined, // All active agents - AgentStatusKueryHelper.buildKueryForOnlineAgents(), - AgentStatusKueryHelper.buildKueryForErrorAgents(), - AgentStatusKueryHelper.buildKueryForOfflineAgents(), - AgentStatusKueryHelper.buildKueryForUpdatingAgents(), - ], - (kuery, index) => - getAgentsByKuery(esClient, { - showInactive: index === 0, - perPage: 0, - page: 1, - pitId, - kuery: joinKuerys( - ...[ - kuery, - filterKuery, - agentPolicyId ? `${AGENTS_PREFIX}.policy_id:"${agentPolicyId}"` : undefined, - ] - ), - }), - { - concurrency: 1, - } - ); - if (pitId) { - await closePointInTime(esClient, pitId); - } + const buckets = (response?.aggregations?.status?.buckets || + []) as AggregationsStatusTermsBucketKeys[]; + + buckets.forEach((bucket) => { + if (statuses[bucket.key] !== undefined) { + statuses[bucket.key] = bucket.doc_count; + } + }); + + const combinedStatuses = { + online: statuses.online, + error: statuses.error + statuses.degraded, + inactive: statuses.inactive, + offline: statuses.offline, + updating: statuses.updating + statuses.enrolling + statuses.unenrolling, + unenrolled: statuses.unenrolled, + }; - const result = { - total: allActive.total, - inactive: all.total - allActive.total, - online: online.total, - error: error.total, - offline: offline.total, - updating: updating.total, - other: all.total - online.total - error.total - offline.total, + return { + ...combinedStatuses, + /* @deprecated no agents will have other status */ + other: 0, /* @deprecated Agent events do not exists anymore */ events: 0, + total: + Object.values(statuses).reduce((acc, val) => acc + val, 0) - + combinedStatuses.unenrolled - + combinedStatuses.inactive, }; - return result; } export async function getIncomingDataByAgentsId( esClient: ElasticsearchClient, diff --git a/x-pack/plugins/fleet/server/services/agents/unenroll.test.ts b/x-pack/plugins/fleet/server/services/agents/unenroll.test.ts index b1e69fa861488..ddf7f0a2ab8f0 100644 --- a/x-pack/plugins/fleet/server/services/agents/unenroll.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/unenroll.test.ts @@ -6,7 +6,7 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { AGENT_ACTIONS_INDEX } from '../../../common'; +import { AGENT_ACTIONS_INDEX, AGENT_ACTIONS_RESULTS_INDEX } from '../../../common'; import { HostedAgentPolicyRestrictionRelatedError } from '../../errors'; import { invalidateAPIKeys } from '../api_keys'; @@ -144,24 +144,33 @@ describe('unenrollAgents (plural)', () => { it('force unenroll updates in progress unenroll actions', async () => { const { soClient, esClient, agentInRegularDoc, agentInRegularDoc2 } = createClientMock(); esClient.search.mockReset(); - esClient.search.mockImplementation((request) => - Promise.resolve( - request?.index === AGENT_ACTIONS_INDEX - ? ({ - hits: { - hits: [ - { - _source: { - agents: ['agent-in-regular-policy'], - action_id: 'other-action', - }, - }, - ], + + esClient.search.mockImplementation(async (request) => { + if (request?.index === AGENT_ACTIONS_INDEX) { + return { + hits: { + hits: [ + { + _source: { + agents: ['agent-in-regular-policy'], + action_id: 'other-action', + }, }, - } as any) - : { hits: { hits: [] } } - ) - ); + ], + }, + } as any; + } + + if (request?.index === AGENT_ACTIONS_RESULTS_INDEX) { + return { + hits: { + hits: [], + }, + }; + } + + return { hits: { hits: [agentInRegularDoc, agentInRegularDoc2] } }; + }); const idsToUnenroll = [agentInRegularDoc._id, agentInRegularDoc2._id]; await unenrollAgents(soClient, esClient, { @@ -178,30 +187,34 @@ describe('unenrollAgents (plural)', () => { it('force unenroll should not update completed unenroll actions', async () => { const { soClient, esClient, agentInRegularDoc, agentInRegularDoc2 } = createClientMock(); esClient.search.mockReset(); - esClient.search.mockImplementation((request) => - Promise.resolve( - request?.index === AGENT_ACTIONS_INDEX - ? ({ - hits: { - hits: [ - { - _source: { - agents: ['agent-in-regular-policy'], - action_id: 'other-action1', - }, - }, - ], + esClient.search.mockImplementation(async (request) => { + if (request?.index === AGENT_ACTIONS_INDEX) { + return { + hits: { + hits: [ + { + _source: { + agents: ['agent-in-regular-policy'], + action_id: 'other-action1', + }, }, - } as any) - : { - hits: { - hits: [ - { _source: { action_id: 'other-action1', agent_id: 'agent-in-regular-policy' } }, - ], - }, - } - ) - ); + ], + }, + } as any; + } + + if (request?.index === AGENT_ACTIONS_RESULTS_INDEX) { + return { + hits: { + hits: [ + { _source: { action_id: 'other-action1', agent_id: 'agent-in-regular-policy' } }, + ], + }, + }; + } + + return { hits: { hits: [agentInRegularDoc, agentInRegularDoc2] } }; + }); const idsToUnenroll = [agentInRegularDoc._id, agentInRegularDoc2._id]; await unenrollAgents(soClient, esClient, { diff --git a/x-pack/plugins/fleet/server/services/agents/unenroll.ts b/x-pack/plugins/fleet/server/services/agents/unenroll.ts index 078b9ce3aef37..a82c0f41589b3 100644 --- a/x-pack/plugins/fleet/server/services/agents/unenroll.ts +++ b/x-pack/plugins/fleet/server/services/agents/unenroll.ts @@ -53,7 +53,7 @@ export async function unenrollAgent( await unenrollAgentIsAllowed(soClient, esClient, agentId); } if (options?.revoke) { - return forceUnenrollAgent(esClient, agentId); + return forceUnenrollAgent(esClient, soClient, agentId); } const now = new Date().toISOString(); await createAgentAction(esClient, { @@ -76,19 +76,19 @@ export async function unenrollAgents( } ): Promise<{ actionId: string }> { if ('agentIds' in options) { - const givenAgents = await getAgents(esClient, options); + const givenAgents = await getAgents(esClient, soClient, options); return await unenrollBatch(soClient, esClient, givenAgents, options); } const batchSize = options.batchSize ?? SO_SEARCH_LIMIT; - const res = await getAgentsByKuery(esClient, { + const res = await getAgentsByKuery(esClient, soClient, { kuery: options.kuery, showInactive: options.showInactive ?? false, page: 1, perPage: batchSize, }); if (res.total <= batchSize) { - const givenAgents = await getAgents(esClient, options); + const givenAgents = await getAgents(esClient, soClient, options); return await unenrollBatch(soClient, esClient, givenAgents, options); } else { return await new UnenrollActionRunner( @@ -106,11 +106,12 @@ export async function unenrollAgents( export async function forceUnenrollAgent( esClient: ElasticsearchClient, + soClient: SavedObjectsClientContract, agentIdOrAgent: string | Agent ) { const agent = typeof agentIdOrAgent === 'string' - ? await getAgentById(esClient, agentIdOrAgent) + ? await getAgentById(esClient, soClient, agentIdOrAgent) : agentIdOrAgent; await invalidateAPIKeysForAgents([agent]); diff --git a/x-pack/plugins/fleet/server/services/agents/update.ts b/x-pack/plugins/fleet/server/services/agents/update.ts index 913796f6e7489..9bcb99e580093 100644 --- a/x-pack/plugins/fleet/server/services/agents/update.ts +++ b/x-pack/plugins/fleet/server/services/agents/update.ts @@ -20,7 +20,7 @@ export async function unenrollForAgentPolicyId( let hasMore = true; let page = 1; while (hasMore) { - const { agents } = await getAgentsByKuery(esClient, { + const { agents } = await getAgentsByKuery(esClient, soClient, { kuery: `${AGENTS_PREFIX}.policy_id:"${policyId}"`, page: page++, perPage: 1000, diff --git a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts index c357ed0e11edf..f06417333a91a 100644 --- a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts @@ -28,6 +28,7 @@ jest.mock('../app_context', () => { jest.mock('../agent_policy', () => { return { agentPolicyService: { + getInactivityTimeouts: jest.fn().mockResolvedValue([]), getByIDs: jest.fn().mockResolvedValue([{ id: 'hosted-agent-policy', is_managed: true }]), list: jest.fn().mockResolvedValue({ items: [] }), }, @@ -49,16 +50,21 @@ describe('update_agent_tags', () => { beforeEach(() => { esClient = elasticsearchServiceMock.createInternalClient(); soClient = savedObjectsClientMock.create(); - esClient.mget.mockResolvedValue({ - docs: [ - { - _id: 'agent1', - _source: { - tags: ['one', 'two', 'three'], + esClient.search.mockResolvedValue({ + hits: { + hits: [ + { + _id: 'agent1', + _source: { + tags: ['one', 'two', 'three'], + }, + fields: { + status: 'online', + }, }, - } as any, - ], - }); + ], + }, + } as any); esClient.bulk.mockReset(); esClient.bulk.mockResolvedValue({ items: [], @@ -257,18 +263,65 @@ describe('update_agent_tags', () => { ); const updateByQuery = esClient.updateByQuery.mock.calls[0][0] as any; - expect(updateByQuery.query).toEqual({ - bool: { - filter: [ - { bool: { minimum_should_match: 1, should: [{ match: { active: true } }] } }, - { - bool: { - must_not: { bool: { minimum_should_match: 1, should: [{ match: { tags: 'new' } }] } }, + expect(updateByQuery.query).toMatchInlineSnapshot(` + Object { + "bool": Object { + "filter": Array [ + Object { + "bool": Object { + "must_not": Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "status": "inactive", + }, + }, + ], + }, + }, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "status": "unenrolled", + }, + }, + ], + }, + }, + ], + }, + }, + }, }, - }, - ], - }, - }); + Object { + "bool": Object { + "must_not": Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "tags": "new", + }, + }, + ], + }, + }, + }, + }, + ], + }, + } + `); }); it('should add tags filter if only one tag to remove', async () => { diff --git a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.ts b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.ts index dad2053f7ed59..a53a5f4536420 100644 --- a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.ts +++ b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.ts @@ -5,21 +5,15 @@ * 2.0. */ -import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; import type { Agent } from '../../types'; import { AgentReassignmentError } from '../../errors'; -import { getAgentDocuments } from './crud'; +import { getAgentsById } from './crud'; import type { GetAgentsOptions } from '.'; -import { searchHitToAgent } from './helpers'; import { UpdateAgentTagsActionRunner, updateTagsBatch } from './update_agent_tags_action_runner'; -function isMgetDoc(doc?: estypes.MgetResponseItem): doc is estypes.GetGetResult { - return Boolean(doc && 'found' in doc); -} - export async function updateAgentTags( soClient: SavedObjectsClientContract, esClient: ElasticsearchClient, @@ -31,14 +25,14 @@ export async function updateAgentTags( const givenAgents: Agent[] = []; if ('agentIds' in options) { - const givenAgentsResults = await getAgentDocuments(esClient, options.agentIds); - for (const agentResult of givenAgentsResults) { - if (isMgetDoc(agentResult) && agentResult.found === false) { - outgoingErrors[agentResult._id] = new AgentReassignmentError( - `Cannot find agent ${agentResult._id}` + const maybeAgents = await getAgentsById(esClient, soClient, options.agentIds); + for (const maybeAgent of maybeAgents) { + if ('notFound' in maybeAgent) { + outgoingErrors[maybeAgent.id] = new AgentReassignmentError( + `Cannot find agent ${maybeAgent.id}` ); } else { - givenAgents.push(searchHitToAgent(agentResult)); + givenAgents.push(maybeAgent); } } } else if ('kuery' in options) { diff --git a/x-pack/plugins/fleet/server/services/agents/upgrade.ts b/x-pack/plugins/fleet/server/services/agents/upgrade.ts index 8bfc8b11bf4a9..20d9c02f56cbf 100644 --- a/x-pack/plugins/fleet/server/services/agents/upgrade.ts +++ b/x-pack/plugins/fleet/server/services/agents/upgrade.ts @@ -4,7 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; import type { Agent } from '../../types'; @@ -15,14 +14,9 @@ import { createAgentAction } from './actions'; import type { GetAgentsOptions } from './crud'; import { openPointInTime } from './crud'; import { getAgentsByKuery } from './crud'; -import { getAgentDocuments, updateAgent, getAgentPolicyForAgent } from './crud'; -import { searchHitToAgent } from './helpers'; +import { getAgentsById, updateAgent, getAgentPolicyForAgent } from './crud'; import { UpgradeActionRunner, upgradeBatch } from './upgrade_action_runner'; -function isMgetDoc(doc?: estypes.MgetResponseItem): doc is estypes.GetGetResult { - return Boolean(doc && 'found' in doc); -} - export async function sendUpgradeAgentAction({ soClient, esClient, @@ -80,19 +74,19 @@ export async function sendUpgradeAgentsActions( if ('agents' in options) { givenAgents = options.agents; } else if ('agentIds' in options) { - const givenAgentsResults = await getAgentDocuments(esClient, options.agentIds); - for (const agentResult of givenAgentsResults) { - if (!isMgetDoc(agentResult) || agentResult.found === false) { - outgoingErrors[agentResult._id] = new AgentReassignmentError( - `Cannot find agent ${agentResult._id}` + const maybeAgents = await getAgentsById(esClient, soClient, options.agentIds); + for (const maybeAgent of maybeAgents) { + if ('notFound' in maybeAgent) { + outgoingErrors[maybeAgent.id] = new AgentReassignmentError( + `Cannot find agent ${maybeAgent.id}` ); } else { - givenAgents.push(searchHitToAgent(agentResult)); + givenAgents.push(maybeAgent); } } } else if ('kuery' in options) { const batchSize = options.batchSize ?? SO_SEARCH_LIMIT; - const res = await getAgentsByKuery(esClient, { + const res = await getAgentsByKuery(esClient, soClient, { kuery: options.kuery, showInactive: options.showInactive ?? false, page: 1, diff --git a/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts b/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts index 9375c3d82b7cb..f32ec17e22eaf 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts @@ -154,7 +154,7 @@ async function _deleteExistingData( } // unenroll all the agents enroled in this policies - const { agents } = await getAgentsByKuery(esClient, { + const { agents } = await getAgentsByKuery(esClient, soClient, { showInactive: false, perPage: SO_SEARCH_LIMIT, kuery: existingPolicies.map((policy) => `policy_id:"${policy.id}"`).join(' or '), @@ -163,7 +163,7 @@ async function _deleteExistingData( // Delete if (agents.length > 0) { logger.info(`Force unenrolling ${agents.length} agents`); - await pMap(agents, (agent) => forceUnenrollAgent(esClient, agent.id), { + await pMap(agents, (agent) => forceUnenrollAgent(esClient, soClient, agent.id), { concurrency: 20, }); } diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts index e16a6e2ac248a..39e7efc47c455 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts @@ -196,8 +196,8 @@ export class FleetAgentGenerator extends BaseDataGenerator { ) { const esHit = this.generateEsHit(overrides); - // Basically: reverse engineer the Fleet `getAgentStatus()` utility: - // https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/common/services/agent_status.ts#L13-L44 + // Basically: reverse engineer the Fleet agent status runtime field: + // https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const fleetServerAgent = esHit._source!; @@ -218,10 +218,9 @@ export class FleetAgentGenerator extends BaseDataGenerator { fleetServerAgent.last_checkin_status = 'error'; break; + // not able to generate agents with inactive status without a valid agent policy + // with inactivity_timeout set case 'inactive': - fleetServerAgent.active = false; - break; - case 'offline': // current fleet timeout interface for offline is 5 minutes // https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/common/services/agent_status.ts#L11 diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/types.ts b/x-pack/plugins/security_solution/public/management/pages/policy/types.ts index faa5677a5ad8c..8ccf5f122baf9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/types.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/types.ts @@ -58,7 +58,10 @@ export interface PolicyDetailsState { /** artifacts namespace inside policy details page */ artifacts: PolicyArtifactsState; /** A summary of stats for the agents associated with a given Fleet Agent Policy */ - agentStatusSummary?: Omit; + agentStatusSummary?: Omit< + GetAgentStatusResponse['results'], + 'updating' | 'inactive' | 'unenrolled' + >; /** Status of an update to the policy */ updateStatus?: { success: boolean; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts index b9a187b592dbc..868025df46d4e 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts @@ -65,6 +65,7 @@ export function getMetadataListRequestHandler( const endpointMetadataService = endpointAppContext.service.getEndpointMetadataService(); const fleetServices = endpointAppContext.service.getInternalFleetServices(); const esClient = (await context.core).elasticsearch.client.asInternalUser; + const soClient = (await context.core).savedObjects.client; let doesUnitedIndexExist = false; let didUnitedIndexError = false; @@ -107,6 +108,7 @@ export function getMetadataListRequestHandler( try { const { data, total } = await endpointMetadataService.getHostMetadataList( esClient, + soClient, fleetServices, request.query ); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts index 1cc6e4d18ce3f..38cffe7a99f5a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts @@ -219,7 +219,12 @@ describe('test endpoint routes', () => { kuery: 'not host.ip:10.140.73.246', }, }); - + mockSavedObjectClient.find.mockResolvedValueOnce({ + total: 0, + saved_objects: [], + page: 1, + per_page: 10, + }); mockAgentClient.getAgentStatusById.mockResolvedValue('error'); mockAgentClient.listAgents.mockResolvedValue(noUnenrolledAgent); mockAgentPolicyService.getByIds = jest.fn().mockResolvedValueOnce([]); @@ -267,187 +272,27 @@ describe('test endpoint routes', () => { }, { bool: { - filter: [ + should: [ { bool: { - should: [ - { - bool: { - filter: [ - { - bool: { - should: [ - { exists: { field: 'united.agent.upgrade_started_at' } }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - must_not: { - bool: { - should: [{ exists: { field: 'united.agent.upgraded_at' } }], - minimum_should_match: 1, - }, - }, - }, - }, - ], - }, - }, - { - bool: { - must_not: { - bool: { - should: [{ exists: { field: 'united.agent.last_checkin' } }], - minimum_should_match: 1, - }, - }, - }, - }, - { - bool: { - should: [ - { exists: { field: 'united.agent.unenrollment_started_at' } }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - must_not: { - bool: { - should: [ - { exists: { field: 'united.agent.policy_revision_idx' } }, - ], - minimum_should_match: 1, - }, - }, - }, - }, - ], + should: [{ match: { status: 'updating' } }], minimum_should_match: 1, }, }, { bool: { - must_not: { - bool: { - should: [ - { - bool: { - should: [ - { range: { 'united.agent.last_checkin': { lt: 'now-300s' } } }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - filter: [ - { - bool: { - should: [ - { - bool: { - should: [ - { - match: { - 'united.agent.last_checkin_status': 'error', - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [ - { - match: { - 'united.agent.last_checkin_status': 'degraded', - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [ - { - match: { - 'united.agent.last_checkin_status': 'DEGRADED', - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [ - { - match: { - 'united.agent.last_checkin_status': 'ERROR', - }, - }, - ], - minimum_should_match: 1, - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - must_not: { - bool: { - should: [ - { - bool: { - should: [ - { - range: { - 'united.agent.last_checkin': { - lt: 'now-300s', - }, - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [ - { - exists: { - field: - 'united.agent.unenrollment_started_at', - }, - }, - ], - minimum_should_match: 1, - }, - }, - ], - minimum_should_match: 1, - }, - }, - }, - }, - ], - }, - }, - ], - minimum_should_match: 1, - }, - }, + should: [{ match: { status: 'unenrolling' } }], + minimum_should_match: 1, + }, + }, + { + bool: { + should: [{ match: { status: 'enrolling' } }], + minimum_should_match: 1, }, }, ], + minimum_should_match: 1, }, }, { diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.fixtures.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.fixtures.ts index 77850dc7825da..494db48bacf54 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.fixtures.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.fixtures.ts @@ -18,334 +18,52 @@ export const expectedCompleteUnitedIndexQuery = { }, }, filter: [ - { terms: { 'united.agent.policy_id': ['test-endpoint-policy-id'] } }, - { exists: { field: 'united.endpoint.agent.id' } }, - { exists: { field: 'united.agent.agent.id' } }, - { term: { 'united.agent.active': { value: true } } }, + { + terms: { + 'united.agent.policy_id': ['test-endpoint-policy-id'], + }, + }, + { + exists: { + field: 'united.endpoint.agent.id', + }, + }, + { + exists: { + field: 'united.agent.agent.id', + }, + }, + { + term: { + 'united.agent.active': { + value: true, + }, + }, + }, ], }, }, { bool: { - filter: [ - { - bool: { - should: [{ exists: { field: 'united.agent.last_checkin' } }], - minimum_should_match: 1, - }, - }, + should: [ { - bool: { - must_not: { - bool: { - should: [ - { - bool: { - should: [{ range: { 'united.agent.last_checkin': { lt: 'now-300s' } } }], - minimum_should_match: 1, - }, - }, - { - bool: { - filter: [ - { - bool: { - should: [ - { - bool: { - filter: [ - { - bool: { - should: [ - { - exists: { - field: 'united.agent.upgrade_started_at', - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - must_not: { - bool: { - should: [ - { exists: { field: 'united.agent.upgraded_at' } }, - ], - minimum_should_match: 1, - }, - }, - }, - }, - ], - }, - }, - { - bool: { - must_not: { - bool: { - should: [ - { exists: { field: 'united.agent.last_checkin' } }, - ], - minimum_should_match: 1, - }, - }, - }, - }, - { - bool: { - should: [ - { - exists: { field: 'united.agent.unenrollment_started_at' }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - must_not: { - bool: { - should: [ - { - exists: { field: 'united.agent.policy_revision_idx' }, - }, - ], - minimum_should_match: 1, - }, - }, - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - must_not: { - bool: { - should: [ - { - bool: { - should: [ - { - range: { - 'united.agent.last_checkin': { lt: 'now-300s' }, - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - filter: [ - { - bool: { - should: [ - { - bool: { - should: [ - { - match: { - 'united.agent.last_checkin_status': - 'error', - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [ - { - match: { - 'united.agent.last_checkin_status': - 'degraded', - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [ - { - match: { - 'united.agent.last_checkin_status': - 'DEGRADED', - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [ - { - match: { - 'united.agent.last_checkin_status': - 'ERROR', - }, - }, - ], - minimum_should_match: 1, - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - must_not: { - bool: { - should: [ - { - bool: { - should: [ - { - range: { - 'united.agent.last_checkin': { - lt: 'now-300s', - }, - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [ - { - exists: { - field: - 'united.agent.unenrollment_started_at', - }, - }, - ], - minimum_should_match: 1, - }, - }, - ], - minimum_should_match: 1, - }, - }, - }, - }, - ], - }, - }, - ], - minimum_should_match: 1, - }, - }, - }, - }, - ], - }, - }, - { - bool: { - filter: [ - { - bool: { - should: [ - { - bool: { - should: [ - { match: { 'united.agent.last_checkin_status': 'error' } }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [ - { - match: { 'united.agent.last_checkin_status': 'degraded' }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [ - { - match: { 'united.agent.last_checkin_status': 'DEGRADED' }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [ - { match: { 'united.agent.last_checkin_status': 'ERROR' } }, - ], - minimum_should_match: 1, - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - must_not: { - bool: { - should: [ - { - bool: { - should: [ - { - range: { - 'united.agent.last_checkin': { lt: 'now-300s' }, - }, - }, - ], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [ - { - exists: { - field: 'united.agent.unenrollment_started_at', - }, - }, - ], - minimum_should_match: 1, - }, - }, - ], - minimum_should_match: 1, - }, - }, - }, - }, - ], - }, - }, - ], - minimum_should_match: 1, - }, - }, + match: { + status: 'online', }, }, ], + minimum_should_match: 1, }, }, { bool: { - should: [{ exists: { field: 'united.endpoint.host.os.name' } }], + should: [ + { + exists: { + field: 'united.endpoint.host.os.name', + }, + }, + ], minimum_should_match: 1, }, }, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.test.ts index 0a8f2616c516f..89651d221285f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.test.ts @@ -13,6 +13,7 @@ import { import { metadataCurrentIndexPattern } from '../../../../common/endpoint/constants'; import { get } from 'lodash'; import { expectedCompleteUnitedIndexQuery } from './query_builders.fixtures'; +import { savedObjectsClientMock } from '@kbn/core/server/mocks'; describe('query builder', () => { describe('MetadataListESQuery', () => { @@ -194,7 +195,16 @@ describe('query builder', () => { describe('buildUnitedIndexQuery', () => { it('correctly builds empty query', async () => { + const soClient = savedObjectsClientMock.create(); + soClient.find.mockResolvedValue({ + saved_objects: [], + total: 0, + per_page: 0, + page: 0, + }); + const query = await buildUnitedIndexQuery( + soClient, { page: 1, pageSize: 10, hostStatuses: [], kuery: '' }, [] ); @@ -238,7 +248,16 @@ describe('query builder', () => { }); it('correctly builds query', async () => { + const soClient = savedObjectsClientMock.create(); + soClient.find.mockResolvedValue({ + saved_objects: [], + total: 0, + per_page: 0, + page: 0, + }); + const query = await buildUnitedIndexQuery( + soClient, { page: 1, pageSize: 10, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts index 8cbfdc789d691..ede30e7491fb7 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts @@ -7,6 +7,8 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { fromKueryExpression, toElasticsearchQuery } from '@kbn/es-query'; +import { buildAgentStatusRuntimeField } from '@kbn/fleet-plugin/server'; +import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import { ENDPOINT_DEFAULT_PAGE, ENDPOINT_DEFAULT_PAGE_SIZE, @@ -205,6 +207,8 @@ interface BuildUnitedIndexQueryResponse { query: Record; track_total_hits: boolean; sort: estypes.SortCombinations[]; + runtime_mappings: Record; + fields?: string[]; }; from: number; size: number; @@ -212,6 +216,7 @@ interface BuildUnitedIndexQueryResponse { } export async function buildUnitedIndexQuery( + soClient: SavedObjectsClientContract, queryOptions: GetMetadataListRequestQuery, endpointPolicyIds: string[] = [] ): Promise { @@ -273,11 +278,15 @@ export async function buildUnitedIndexQuery( }; } + const runtimeMappings = await buildAgentStatusRuntimeField(soClient, 'united.agent.'); + const fields = Object.keys(runtimeMappings); return { body: { query, track_total_hits: true, sort: MetadataSortMethod, + fields, + runtime_mappings: runtimeMappings, }, from: page * pageSize, size: pageSize, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.test.ts index 45e93a413b3f0..2a78a2a1e322e 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.test.ts @@ -92,45 +92,46 @@ describe('test filtering endpoint hosts by agent status', () => { it('correctly builds kuery for healthy status', () => { const status = ['healthy']; const kuery = buildStatusesKuery(status); - expect(kuery).toMatchInlineSnapshot( - `"(united.agent.last_checkin:* AND not ((united.agent.last_checkin < now-300s) or ((((united.agent.upgrade_started_at:*) and not (united.agent.upgraded_at:*)) or (not (united.agent.last_checkin:*)) or (united.agent.unenrollment_started_at:*) or (not united.agent.policy_revision_idx:*)) AND not ((united.agent.last_checkin < now-300s) or ((united.agent.last_checkin_status:error or united.agent.last_checkin_status:degraded or united.agent.last_checkin_status:DEGRADED or united.agent.last_checkin_status:ERROR) AND not ((united.agent.last_checkin < now-300s) or (united.agent.unenrollment_started_at:*))))) or ((united.agent.last_checkin_status:error or united.agent.last_checkin_status:degraded or united.agent.last_checkin_status:DEGRADED or united.agent.last_checkin_status:ERROR) AND not ((united.agent.last_checkin < now-300s) or (united.agent.unenrollment_started_at:*)))))"` - ); + expect(kuery).toMatchInlineSnapshot(`"(status:online)"`); }); it('correctly builds kuery for offline status', () => { const status = ['offline']; const kuery = buildStatusesKuery(status); - expect(kuery).toMatchInlineSnapshot(`"(united.agent.last_checkin < now-300s)"`); + expect(kuery).toMatchInlineSnapshot(`"(status:offline)"`); }); it('correctly builds kuery for unhealthy status', () => { const status = ['unhealthy']; const kuery = buildStatusesKuery(status); - expect(kuery).toMatchInlineSnapshot( - `"((united.agent.last_checkin_status:error or united.agent.last_checkin_status:degraded or united.agent.last_checkin_status:DEGRADED or united.agent.last_checkin_status:ERROR) AND not ((united.agent.last_checkin < now-300s) or (united.agent.unenrollment_started_at:*)))"` - ); + expect(kuery).toMatchInlineSnapshot(`"((status:error or status:degraded))"`); }); it('correctly builds kuery for updating status', () => { const status = ['updating']; const kuery = buildStatusesKuery(status); expect(kuery).toMatchInlineSnapshot( - `"((((united.agent.upgrade_started_at:*) and not (united.agent.upgraded_at:*)) or (not (united.agent.last_checkin:*)) or (united.agent.unenrollment_started_at:*) or (not united.agent.policy_revision_idx:*)) AND not ((united.agent.last_checkin < now-300s) or ((united.agent.last_checkin_status:error or united.agent.last_checkin_status:degraded or united.agent.last_checkin_status:DEGRADED or united.agent.last_checkin_status:ERROR) AND not ((united.agent.last_checkin < now-300s) or (united.agent.unenrollment_started_at:*)))))"` + `"((status:updating or status:unenrolling or status:enrolling))"` ); }); it('correctly builds kuery for inactive status', () => { const status = ['inactive']; const kuery = buildStatusesKuery(status); - const expected = '(united.agent.active:false)'; - expect(kuery).toEqual(expected); + expect(kuery).toMatchInlineSnapshot(`"(status:inactive)"`); + }); + + it('correctly builds kuery for unenrolled status', () => { + const status = ['unenrolled']; + const kuery = buildStatusesKuery(status); + expect(kuery).toMatchInlineSnapshot(`"(status:unenrolled)"`); }); it('correctly builds kuery for multiple statuses', () => { const statuses = ['offline', 'unhealthy']; const kuery = buildStatusesKuery(statuses); expect(kuery).toMatchInlineSnapshot( - `"(united.agent.last_checkin < now-300s OR (united.agent.last_checkin_status:error or united.agent.last_checkin_status:degraded or united.agent.last_checkin_status:DEGRADED or united.agent.last_checkin_status:ERROR) AND not ((united.agent.last_checkin < now-300s) or (united.agent.unenrollment_started_at:*)))"` + `"(status:offline OR (status:error or status:degraded))"` ); }); }); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.ts index 6bb788365ea22..803975dad7f66 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.ts @@ -10,20 +10,19 @@ import { AgentStatusKueryHelper } from '@kbn/fleet-plugin/common/services'; import type { Agent } from '@kbn/fleet-plugin/common/types/models'; import { HostStatus } from '../../../../../common/endpoint/types'; -const getStatusQueryMap = (path: string = '') => - new Map([ - [HostStatus.HEALTHY.toString(), AgentStatusKueryHelper.buildKueryForOnlineAgents(path)], - [HostStatus.OFFLINE.toString(), AgentStatusKueryHelper.buildKueryForOfflineAgents(path)], - [HostStatus.UNHEALTHY.toString(), AgentStatusKueryHelper.buildKueryForErrorAgents(path)], - [HostStatus.UPDATING.toString(), AgentStatusKueryHelper.buildKueryForUpdatingAgents(path)], - [HostStatus.INACTIVE.toString(), AgentStatusKueryHelper.buildKueryForInactiveAgents(path)], - ]); +const STATUS_QUERY_MAP = new Map([ + [HostStatus.HEALTHY.toString(), AgentStatusKueryHelper.buildKueryForOnlineAgents()], + [HostStatus.OFFLINE.toString(), AgentStatusKueryHelper.buildKueryForOfflineAgents()], + [HostStatus.UNHEALTHY.toString(), AgentStatusKueryHelper.buildKueryForErrorAgents()], + [HostStatus.UPDATING.toString(), AgentStatusKueryHelper.buildKueryForUpdatingAgents()], + [HostStatus.INACTIVE.toString(), AgentStatusKueryHelper.buildKueryForInactiveAgents()], + [HostStatus.UNENROLLED.toString(), AgentStatusKueryHelper.buildKueryForUnenrolledAgents()], +]); export function buildStatusesKuery(statusesToFilter: string[]): string | undefined { if (!statusesToFilter.length) { return; } - const STATUS_QUERY_MAP = getStatusQueryMap('united.agent.'); const statusQueries = statusesToFilter.map((status) => STATUS_QUERY_MAP.get(status)); if (!statusQueries.length) { return; @@ -40,7 +39,6 @@ export async function findAgentIdsByStatus( if (!statuses.length) { return []; } - const STATUS_QUERY_MAP = getStatusQueryMap(); const helpers = statuses.map((s) => STATUS_QUERY_MAP.get(s)); const searchOptions = (pageNum: number) => { return { diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/test_support.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/test_support.ts index 208c05100ca96..bf0c72967986a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/test_support.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/test_support.ts @@ -47,7 +47,8 @@ export function legacyMetadataSearchResponseMock( export function unitedMetadataSearchResponseMock( hostMetadata: HostMetadata = {} as HostMetadata, - agent: Agent = {} as Agent + agent: Agent = {} as Agent, + agentStatus: Agent['status'] = 'online' ): estypes.SearchResponse { return { took: 15, @@ -83,6 +84,9 @@ export function unitedMetadataSearchResponseMock( }, }, }, + fields: { + status: [agentStatus], + }, sort: [1588337587997], }, ] diff --git a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts index 2e7d606e10f5d..892fbb5d984a3 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts @@ -7,7 +7,7 @@ import type { EndpointMetadataServiceTestContextMock } from './mocks'; import { createEndpointMetadataServiceTestContextMock } from './mocks'; -import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; +import { elasticsearchServiceMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; import type { ElasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { legacyMetadataSearchResponseMock, @@ -22,11 +22,13 @@ import type { HostMetadata } from '../../../../common/endpoint/types'; import type { Agent, PackagePolicy } from '@kbn/fleet-plugin/common'; import type { AgentPolicyServiceInterface } from '@kbn/fleet-plugin/server/services'; import { EndpointError } from '../../../../common/endpoint/errors'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; describe('EndpointMetadataService', () => { let testMockedContext: EndpointMetadataServiceTestContextMock; let metadataService: EndpointMetadataServiceTestContextMock['endpointMetadataService']; let esClient: ElasticsearchClientMock; + let soClient: SavedObjectsClientContract; let endpointDocGenerator: EndpointDocGenerator; beforeEach(() => { @@ -34,6 +36,8 @@ describe('EndpointMetadataService', () => { testMockedContext = createEndpointMetadataServiceTestContextMock(); metadataService = testMockedContext.endpointMetadataService; esClient = elasticsearchServiceMock.createScopedClusterClient().asInternalUser; + soClient = savedObjectsClientMock.create(); + soClient.find = jest.fn().mockResolvedValue({ saved_objects: [] }); }); describe('#findHostMetadataForFleetAgents()', () => { @@ -106,6 +110,7 @@ describe('EndpointMetadataService', () => { esClient.search.mockRejectedValue({}); const metadataListResponse = metadataService.getHostMetadataList( esClient, + soClient, testMockedContext.fleetServices, { page: 0, @@ -163,10 +168,19 @@ describe('EndpointMetadataService', () => { const queryOptions = { page: 1, pageSize: 10, kuery: '', hostStatuses: [] }; const metadataListResponse = await metadataService.getHostMetadataList( esClient, + soClient, testMockedContext.fleetServices, queryOptions ); - const unitedIndexQuery = await buildUnitedIndexQuery(queryOptions, packagePolicyIds); + const unitedIndexQuery = await buildUnitedIndexQuery( + soClient, + queryOptions, + packagePolicyIds + ); + + expect(unitedIndexQuery.body.runtime_mappings.status).toBeDefined(); + // @ts-expect-error runtime_mappings is not typed + unitedIndexQuery.body.runtime_mappings.status.script.source = expect.any(String); expect(esClient.search).toBeCalledWith(unitedIndexQuery); expect(agentPolicyServiceMock.getByIds).toBeCalledWith(expect.anything(), agentPolicyIds); @@ -174,7 +188,7 @@ describe('EndpointMetadataService', () => { data: [ { metadata: endpointMetadataDoc, - host_status: 'inactive', + host_status: 'healthy', policy_info: { agent: { applied: { diff --git a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts index c5e31a8e1d6f0..17183579e1f74 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts @@ -13,10 +13,9 @@ import type { } from '@kbn/core/server'; import type { SearchTotalHits, SearchResponse } from '@elastic/elasticsearch/lib/api/types'; -import type { Agent, AgentPolicy, PackagePolicy } from '@kbn/fleet-plugin/common'; +import type { Agent, AgentPolicy, AgentStatus, PackagePolicy } from '@kbn/fleet-plugin/common'; import type { AgentPolicyServiceInterface, PackagePolicyClient } from '@kbn/fleet-plugin/server'; import { AgentNotFoundError } from '@kbn/fleet-plugin/server'; -import { getAgentStatus } from '@kbn/fleet-plugin/common/services/agent_status'; import type { HostInfo, HostMetadata, @@ -203,7 +202,7 @@ export class EndpointMetadataService { * If undefined, it will be retrieved from Fleet using the ID in the endpointMetadata. * If passing in an `Agent` record that was retrieved from the Endpoint Unified transform index, * ensure that its `.status` property is properly set to the calculated value done by - * fleet `getAgentStatus()` method. + * fleet. */ _fleetAgent?: MaybeImmutable, /** If undefined, it will be retrieved from Fleet using data from the endpointMetadata */ @@ -272,7 +271,6 @@ export class EndpointMetadataService { this.logger?.error(error); } } - return { metadata: endpointMetadata, host_status: fleetAgent @@ -396,12 +394,13 @@ export class EndpointMetadataService { */ async getHostMetadataList( esClient: ElasticsearchClient, + soClient: SavedObjectsClientContract, fleetServices: EndpointFleetServicesInterface, queryOptions: GetMetadataListRequestQuery ): Promise> { const endpointPolicies = await this.getAllEndpointPackagePolicies(); const endpointPolicyIds = endpointPolicies.map((policy) => policy.policy_id); - const unitedIndexQuery = await buildUnitedIndexQuery(queryOptions, endpointPolicyIds); + const unitedIndexQuery = await buildUnitedIndexQuery(soClient, queryOptions, endpointPolicyIds); let unitedMetadataQueryResponse: SearchResponse; @@ -443,22 +442,17 @@ export class EndpointMetadataService { for (const doc of docs) { const { endpoint: metadata, agent: _agent } = doc?._source?.united ?? {}; - if (metadata && _agent) { - // `_agent: Agent` here is the record stored in the unified index, whose `status` **IS NOT** the - // calculated status returned by the normal fleet API/Service. So lets calculated it before - // passing this on to other methods that expect an `Agent` type + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const agentPolicy = agentPoliciesMap[_agent.policy_id!]; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const endpointPolicy = endpointPoliciesMap[_agent.policy_id!]; + // add the agent status from the fleet runtime field to + // the agent object const agent: typeof _agent = { ..._agent, - // Casting below necessary to remove `Immutable<>` from the type - status: getAgentStatus(_agent as Agent), + status: doc?.fields?.status?.[0] as AgentStatus, }; - - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const agentPolicy = agentPoliciesMap[agent.policy_id!]; - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const endpointPolicy = endpointPoliciesMap[agent.policy_id!]; - hosts.push( await this.enrichHostMetadata(fleetServices, metadata, agent, agentPolicy, endpointPolicy) ); diff --git a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json index 06cd0479b1169..432ed31806400 100644 --- a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json +++ b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @@ -5204,6 +5204,18 @@ "description": "The total number of enrolled agents currently offline" } }, + "inactive": { + "type": "long", + "_meta": { + "description": "The total number of of enrolled agents currently inactive" + } + }, + "unenrolled": { + "type": "long", + "_meta": { + "description": "The total number of agents currently unenrolled" + } + }, "total_all_statuses": { "type": "long", "_meta": { diff --git a/x-pack/test/fleet_api_integration/apis/agents/status.ts b/x-pack/test/fleet_api_integration/apis/agents/status.ts index 63445845f6612..c11e3ff837e8d 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/status.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/status.ts @@ -18,6 +18,29 @@ export default function ({ getService }: FtrProviderContext) { describe('fleet_agents_status', () => { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/fleet/agents'); + await es.create({ + id: 'ingest-agent-policies:policy-inactivity-timeout', + index: '.kibana', + refresh: 'wait_for', + document: { + type: 'ingest-agent-policies', + 'ingest-agent-policies': { + name: 'Test policy', + namespace: 'default', + description: 'Policy with inactivity timeout', + status: 'active', + is_default: true, + monitoring_enabled: ['logs', 'metrics'], + revision: 2, + updated_at: '2020-05-07T19:34:42.533Z', + updated_by: 'system', + inactivity_timeout: 60, + }, + migrationVersion: { + 'ingest-agent-policies': '7.10.0', + }, + }, + }); // 2 agents online await es.update({ id: 'agent1', @@ -53,24 +76,35 @@ export default function ({ getService }: FtrProviderContext) { }, }, }); - // 1 agent upgrading + // 1 agents inactive await es.update({ id: 'agent4', refresh: 'wait_for', index: AGENTS_INDEX, body: { doc: { + policy_id: 'policy-inactivity-timeout', policy_revision_idx: 1, - last_checkin: new Date().toISOString(), - upgrade_started_at: new Date().toISOString(), + last_checkin: new Date(Date.now() - 1000 * 60).toISOString(), // policy timeout 1 min }, }, }); - // 1 agent reassigned to a new policy + // 1 agent upgrading await es.create({ id: 'agent5', refresh: 'wait_for', index: AGENTS_INDEX, + document: { + policy_revision_idx: 1, + last_checkin: new Date().toISOString(), + upgrade_started_at: new Date().toISOString(), + }, + }); + // 1 agent reassigned to a new policy + await es.create({ + id: 'agent6', + refresh: 'wait_for', + index: AGENTS_INDEX, document: { active: true, access_api_key_id: 'api-key-4', @@ -84,9 +118,9 @@ export default function ({ getService }: FtrProviderContext) { }, }); - // 1 agent inactive + // 1 agent unenrolled await es.create({ - id: 'agent6', + id: 'agent7', refresh: 'wait_for', index: AGENTS_INDEX, document: { @@ -98,9 +132,46 @@ export default function ({ getService }: FtrProviderContext) { local_metadata: { host: { hostname: 'host6' } }, user_provided_metadata: {}, enrolled_at: '2022-06-21T12:17:25Z', + unenrolled_at: '2022-06-21T12:29:29Z', last_checkin: '2022-06-27T12:29:29Z', }, }); + // 1 agent error + await es.create({ + id: 'agent8', + refresh: 'wait_for', + index: AGENTS_INDEX, + document: { + active: true, + access_api_key_id: 'api-key-4', + policy_id: 'policy1', + type: 'PERMANENT', + policy_revision_idx: 1, + local_metadata: { host: { hostname: 'host6' } }, + user_provided_metadata: {}, + enrolled_at: '2022-06-21T12:17:25Z', + last_checkin: new Date().toISOString(), + last_checkin_status: 'ERROR', + }, + }); + // 1 agent degraded (error category) + await es.create({ + id: 'agent9', + refresh: 'wait_for', + index: AGENTS_INDEX, + document: { + active: true, + access_api_key_id: 'api-key-4', + policy_id: 'policy1', + type: 'PERMANENT', + policy_revision_idx: 1, + local_metadata: { host: { hostname: 'host6' } }, + user_provided_metadata: {}, + enrolled_at: '2022-06-21T12:17:25Z', + last_checkin: new Date().toISOString(), + last_checkin_status: 'DEGRADED', + }, + }); }); after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/fleet/agents'); @@ -111,13 +182,14 @@ export default function ({ getService }: FtrProviderContext) { expect(apiResponse).to.eql({ results: { events: 0, - total: 5, + other: 0, + total: 7, online: 2, - error: 0, + error: 2, offline: 1, updating: 2, - other: 3, inactive: 1, + unenrolled: 1, }, }); }); diff --git a/x-pack/test/fleet_api_integration/apis/fleet_telemetry.ts b/x-pack/test/fleet_api_integration/apis/fleet_telemetry.ts index 3d72d01cc3224..21d1bc646c5c8 100644 --- a/x-pack/test/fleet_api_integration/apis/fleet_telemetry.ts +++ b/x-pack/test/fleet_api_integration/apis/fleet_telemetry.ts @@ -136,6 +136,8 @@ export default function (providerContext: FtrProviderContext) { healthy: 3, unhealthy: 3, offline: 1, + unenrolled: 0, + inactive: 0, updating: 1, total_all_statuses: 8, }); From 49d4ceea378c6995c31b11f42e515041ff2ea2fd Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 22 Dec 2022 00:49:15 -0500 Subject: [PATCH 36/36] [api-docs] 2022-12-22 Daily api_docs build (#147969) Generated by https://buildkite.com/elastic/kibana-api-docs-daily/builds/194 --- api_docs/actions.mdx | 2 +- api_docs/advanced_settings.mdx | 2 +- api_docs/aiops.mdx | 2 +- api_docs/alerting.devdocs.json | 19 +- api_docs/alerting.mdx | 4 +- api_docs/apm.mdx | 2 +- api_docs/banners.mdx | 2 +- api_docs/bfetch.mdx | 2 +- api_docs/canvas.mdx | 2 +- api_docs/cases.mdx | 2 +- api_docs/charts.mdx | 2 +- api_docs/cloud.mdx | 2 +- api_docs/cloud_chat.mdx | 2 +- api_docs/cloud_data_migration.mdx | 2 +- api_docs/cloud_defend.mdx | 2 +- api_docs/cloud_experiments.mdx | 2 +- api_docs/cloud_security_posture.mdx | 2 +- api_docs/console.mdx | 2 +- api_docs/controls.mdx | 2 +- api_docs/core.devdocs.json | 278 +++++++++--- api_docs/core.mdx | 4 +- api_docs/custom_integrations.mdx | 2 +- api_docs/dashboard.mdx | 2 +- api_docs/dashboard_enhanced.mdx | 2 +- api_docs/data.devdocs.json | 264 +---------- api_docs/data.mdx | 2 +- api_docs/data_query.devdocs.json | 4 +- 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 | 426 ++---------------- api_docs/data_views.mdx | 2 +- api_docs/data_visualizer.mdx | 2 +- api_docs/deprecations_by_api.mdx | 6 +- api_docs/deprecations_by_plugin.mdx | 73 ++- api_docs/deprecations_by_team.mdx | 4 +- api_docs/dev_tools.mdx | 2 +- api_docs/discover.mdx | 2 +- api_docs/discover_enhanced.mdx | 2 +- api_docs/embeddable.mdx | 2 +- api_docs/embeddable_enhanced.mdx | 2 +- api_docs/encrypted_saved_objects.mdx | 2 +- api_docs/enterprise_search.mdx | 2 +- api_docs/es_ui_shared.mdx | 2 +- api_docs/event_annotation.mdx | 2 +- api_docs/event_log.mdx | 2 +- api_docs/expression_error.mdx | 2 +- api_docs/expression_gauge.mdx | 2 +- api_docs/expression_heatmap.mdx | 2 +- api_docs/expression_image.mdx | 2 +- api_docs/expression_legacy_metric_vis.mdx | 2 +- api_docs/expression_metric.mdx | 2 +- api_docs/expression_metric_vis.mdx | 2 +- api_docs/expression_partition_vis.mdx | 2 +- api_docs/expression_repeat_image.mdx | 2 +- api_docs/expression_reveal_image.mdx | 2 +- api_docs/expression_shape.devdocs.json | 140 +++--- api_docs/expression_shape.mdx | 2 +- api_docs/expression_tagcloud.mdx | 2 +- api_docs/expression_x_y.mdx | 2 +- api_docs/expressions.mdx | 2 +- api_docs/features.mdx | 2 +- api_docs/field_formats.mdx | 2 +- api_docs/file_upload.mdx | 2 +- api_docs/files.mdx | 2 +- api_docs/files_management.mdx | 2 +- api_docs/fleet.devdocs.json | 91 +++- api_docs/fleet.mdx | 4 +- api_docs/global_search.mdx | 2 +- api_docs/guided_onboarding.mdx | 2 +- api_docs/home.mdx | 2 +- api_docs/index_lifecycle_management.mdx | 2 +- api_docs/index_management.mdx | 2 +- api_docs/infra.mdx | 2 +- api_docs/inspector.mdx | 2 +- api_docs/interactive_setup.mdx | 2 +- api_docs/kbn_ace.mdx | 2 +- api_docs/kbn_aiops_components.mdx | 2 +- api_docs/kbn_aiops_utils.mdx | 2 +- api_docs/kbn_alerts.mdx | 2 +- api_docs/kbn_analytics.mdx | 2 +- api_docs/kbn_analytics_client.mdx | 2 +- ..._analytics_shippers_elastic_v3_browser.mdx | 2 +- ...n_analytics_shippers_elastic_v3_common.mdx | 2 +- ...n_analytics_shippers_elastic_v3_server.mdx | 2 +- api_docs/kbn_analytics_shippers_fullstory.mdx | 2 +- api_docs/kbn_analytics_shippers_gainsight.mdx | 2 +- api_docs/kbn_apm_config_loader.mdx | 2 +- api_docs/kbn_apm_synthtrace.mdx | 2 +- api_docs/kbn_apm_utils.mdx | 2 +- api_docs/kbn_axe_config.mdx | 2 +- api_docs/kbn_cases_components.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_coloring.mdx | 2 +- api_docs/kbn_config.mdx | 2 +- api_docs/kbn_config_mocks.mdx | 2 +- api_docs/kbn_config_schema.mdx | 2 +- .../kbn_content_management_content_editor.mdx | 2 +- .../kbn_content_management_table_list.mdx | 2 +- api_docs/kbn_core_analytics_browser.mdx | 2 +- .../kbn_core_analytics_browser_internal.mdx | 2 +- api_docs/kbn_core_analytics_browser_mocks.mdx | 2 +- api_docs/kbn_core_analytics_server.mdx | 2 +- .../kbn_core_analytics_server_internal.mdx | 2 +- api_docs/kbn_core_analytics_server_mocks.mdx | 2 +- api_docs/kbn_core_application_browser.mdx | 2 +- .../kbn_core_application_browser_internal.mdx | 2 +- .../kbn_core_application_browser_mocks.mdx | 2 +- api_docs/kbn_core_application_common.mdx | 2 +- api_docs/kbn_core_apps_browser_internal.mdx | 2 +- api_docs/kbn_core_apps_browser_mocks.mdx | 2 +- api_docs/kbn_core_apps_server_internal.mdx | 2 +- api_docs/kbn_core_base_browser_mocks.mdx | 2 +- api_docs/kbn_core_base_common.mdx | 2 +- api_docs/kbn_core_base_server_internal.mdx | 2 +- api_docs/kbn_core_base_server_mocks.mdx | 2 +- .../kbn_core_capabilities_browser_mocks.mdx | 2 +- api_docs/kbn_core_capabilities_common.mdx | 2 +- api_docs/kbn_core_capabilities_server.mdx | 2 +- .../kbn_core_capabilities_server_mocks.mdx | 2 +- api_docs/kbn_core_chrome_browser.mdx | 2 +- api_docs/kbn_core_chrome_browser_mocks.mdx | 2 +- api_docs/kbn_core_config_server_internal.mdx | 2 +- api_docs/kbn_core_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 +- ...kbn_core_http_server_internal.devdocs.json | 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 +- ...ore_injected_metadata_browser.devdocs.json | 180 -------- .../kbn_core_injected_metadata_browser.mdx | 30 -- ...n_core_injected_metadata_browser_mocks.mdx | 2 +- ...kbn_core_integrations_browser_internal.mdx | 2 +- .../kbn_core_integrations_browser_mocks.mdx | 2 +- .../kbn_core_lifecycle_browser.devdocs.json | 44 -- api_docs/kbn_core_lifecycle_browser.mdx | 4 +- ..._core_lifecycle_browser_mocks.devdocs.json | 6 +- api_docs/kbn_core_lifecycle_browser_mocks.mdx | 2 +- api_docs/kbn_core_lifecycle_server.mdx | 2 +- api_docs/kbn_core_lifecycle_server_mocks.mdx | 2 +- api_docs/kbn_core_logging_browser_mocks.mdx | 2 +- api_docs/kbn_core_logging_common_internal.mdx | 2 +- api_docs/kbn_core_logging_server.mdx | 2 +- api_docs/kbn_core_logging_server_internal.mdx | 2 +- api_docs/kbn_core_logging_server_mocks.mdx | 2 +- ...ore_metrics_collectors_server_internal.mdx | 2 +- ...n_core_metrics_collectors_server_mocks.mdx | 2 +- api_docs/kbn_core_metrics_server.mdx | 2 +- api_docs/kbn_core_metrics_server_internal.mdx | 2 +- api_docs/kbn_core_metrics_server_mocks.mdx | 2 +- api_docs/kbn_core_mount_utils_browser.mdx | 2 +- api_docs/kbn_core_node_server.mdx | 2 +- api_docs/kbn_core_node_server_internal.mdx | 2 +- api_docs/kbn_core_node_server_mocks.mdx | 2 +- api_docs/kbn_core_notifications_browser.mdx | 2 +- ...bn_core_notifications_browser_internal.mdx | 2 +- .../kbn_core_notifications_browser_mocks.mdx | 2 +- api_docs/kbn_core_overlays_browser.mdx | 2 +- .../kbn_core_overlays_browser_internal.mdx | 2 +- api_docs/kbn_core_overlays_browser_mocks.mdx | 2 +- api_docs/kbn_core_plugins_browser.mdx | 2 +- api_docs/kbn_core_plugins_browser_mocks.mdx | 2 +- api_docs/kbn_core_plugins_server.mdx | 2 +- api_docs/kbn_core_plugins_server_mocks.mdx | 2 +- api_docs/kbn_core_preboot_server.mdx | 2 +- api_docs/kbn_core_preboot_server_mocks.mdx | 2 +- api_docs/kbn_core_rendering_browser_mocks.mdx | 2 +- .../kbn_core_rendering_server_internal.mdx | 2 +- api_docs/kbn_core_rendering_server_mocks.mdx | 2 +- api_docs/kbn_core_root_server_internal.mdx | 2 +- .../kbn_core_saved_objects_api_browser.mdx | 2 +- .../kbn_core_saved_objects_api_server.mdx | 2 +- ...core_saved_objects_api_server_internal.mdx | 2 +- ...bn_core_saved_objects_api_server_mocks.mdx | 2 +- ...ore_saved_objects_base_server_internal.mdx | 2 +- ...n_core_saved_objects_base_server_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_browser.mdx | 2 +- ...bn_core_saved_objects_browser_internal.mdx | 2 +- .../kbn_core_saved_objects_browser_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_common.mdx | 2 +- ..._objects_import_export_server_internal.mdx | 2 +- ...ved_objects_import_export_server_mocks.mdx | 2 +- ...cts_migration_server_internal.devdocs.json | 2 +- ...aved_objects_migration_server_internal.mdx | 2 +- ...e_saved_objects_migration_server_mocks.mdx | 2 +- ...kbn_core_saved_objects_server.devdocs.json | 232 +++++++++- 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_status_common.mdx | 2 +- api_docs/kbn_core_status_common_internal.mdx | 2 +- api_docs/kbn_core_status_server.mdx | 2 +- api_docs/kbn_core_status_server_internal.mdx | 2 +- api_docs/kbn_core_status_server_mocks.mdx | 2 +- ...core_test_helpers_deprecations_getters.mdx | 2 +- ...n_core_test_helpers_http_setup_browser.mdx | 2 +- api_docs/kbn_core_test_helpers_kbn_server.mdx | 2 +- ...n_core_test_helpers_so_type_serializer.mdx | 2 +- api_docs/kbn_core_test_helpers_test_utils.mdx | 2 +- api_docs/kbn_core_theme_browser.mdx | 2 +- api_docs/kbn_core_theme_browser_internal.mdx | 2 +- api_docs/kbn_core_theme_browser_mocks.mdx | 2 +- api_docs/kbn_core_ui_settings_browser.mdx | 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 +- .../kbn_core_usage_data_server.devdocs.json | 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_crypto.mdx | 2 +- api_docs/kbn_crypto_browser.mdx | 2 +- api_docs/kbn_datemath.mdx | 2 +- api_docs/kbn_dev_cli_errors.mdx | 2 +- api_docs/kbn_dev_cli_runner.mdx | 2 +- api_docs/kbn_dev_proc_runner.mdx | 2 +- api_docs/kbn_dev_utils.mdx | 2 +- api_docs/kbn_doc_links.mdx | 2 +- api_docs/kbn_docs_utils.mdx | 2 +- api_docs/kbn_ebt_tools.mdx | 2 +- api_docs/kbn_ecs.mdx | 2 +- api_docs/kbn_es.mdx | 2 +- api_docs/kbn_es_archiver.mdx | 2 +- api_docs/kbn_es_errors.mdx | 2 +- api_docs/kbn_es_query.mdx | 2 +- api_docs/kbn_es_types.mdx | 2 +- api_docs/kbn_eslint_plugin_imports.mdx | 2 +- api_docs/kbn_field_types.mdx | 2 +- api_docs/kbn_find_used_node_modules.mdx | 2 +- .../kbn_ftr_common_functional_services.mdx | 2 +- api_docs/kbn_generate.mdx | 2 +- api_docs/kbn_get_repo_files.mdx | 2 +- api_docs/kbn_guided_onboarding.mdx | 2 +- api_docs/kbn_handlebars.mdx | 2 +- api_docs/kbn_hapi_mocks.mdx | 2 +- api_docs/kbn_health_gateway_server.mdx | 2 +- api_docs/kbn_home_sample_data_card.mdx | 2 +- api_docs/kbn_home_sample_data_tab.mdx | 2 +- api_docs/kbn_i18n.mdx | 2 +- api_docs/kbn_i18n_react.mdx | 2 +- api_docs/kbn_import_resolver.mdx | 2 +- api_docs/kbn_interpreter.mdx | 2 +- api_docs/kbn_io_ts_utils.mdx | 2 +- api_docs/kbn_jest_serializers.mdx | 2 +- api_docs/kbn_journeys.mdx | 2 +- api_docs/kbn_kibana_manifest_schema.mdx | 2 +- .../kbn_language_documentation_popover.mdx | 2 +- api_docs/kbn_logging.mdx | 2 +- api_docs/kbn_logging_mocks.mdx | 2 +- api_docs/kbn_managed_vscode_config.mdx | 2 +- api_docs/kbn_mapbox_gl.mdx | 2 +- api_docs/kbn_ml_agg_utils.mdx | 2 +- api_docs/kbn_ml_is_populated_object.mdx | 2 +- api_docs/kbn_ml_string_hash.mdx | 2 +- api_docs/kbn_monaco.mdx | 2 +- api_docs/kbn_optimizer.mdx | 2 +- api_docs/kbn_optimizer_webpack_helpers.mdx | 2 +- api_docs/kbn_osquery_io_ts_types.mdx | 2 +- api_docs/kbn_peggy.mdx | 2 +- ..._performance_testing_dataset_extractor.mdx | 2 +- api_docs/kbn_plugin_generator.mdx | 2 +- api_docs/kbn_plugin_helpers.mdx | 2 +- api_docs/kbn_react_field.mdx | 2 +- api_docs/kbn_repo_source_classifier.mdx | 2 +- api_docs/kbn_rison.mdx | 2 +- api_docs/kbn_rule_data_utils.mdx | 2 +- .../kbn_securitysolution_autocomplete.mdx | 2 +- api_docs/kbn_securitysolution_es_utils.mdx | 2 +- ...ion_exception_list_components.devdocs.json | 8 +- ...ritysolution_exception_list_components.mdx | 2 +- api_docs/kbn_securitysolution_hook_utils.mdx | 2 +- ..._securitysolution_io_ts_alerting_types.mdx | 2 +- .../kbn_securitysolution_io_ts_list_types.mdx | 2 +- api_docs/kbn_securitysolution_io_ts_types.mdx | 2 +- api_docs/kbn_securitysolution_io_ts_utils.mdx | 2 +- api_docs/kbn_securitysolution_list_api.mdx | 2 +- .../kbn_securitysolution_list_constants.mdx | 2 +- api_docs/kbn_securitysolution_list_hooks.mdx | 2 +- api_docs/kbn_securitysolution_list_utils.mdx | 2 +- api_docs/kbn_securitysolution_rules.mdx | 2 +- api_docs/kbn_securitysolution_t_grid.mdx | 2 +- api_docs/kbn_securitysolution_utils.mdx | 2 +- api_docs/kbn_server_http_tools.mdx | 2 +- api_docs/kbn_server_route_repository.mdx | 2 +- api_docs/kbn_shared_svg.mdx | 2 +- api_docs/kbn_shared_ux_avatar_solution.mdx | 2 +- ...ared_ux_avatar_user_profile_components.mdx | 2 +- .../kbn_shared_ux_button_exit_full_screen.mdx | 2 +- ...hared_ux_button_exit_full_screen_mocks.mdx | 2 +- api_docs/kbn_shared_ux_button_toolbar.mdx | 2 +- api_docs/kbn_shared_ux_card_no_data.mdx | 2 +- api_docs/kbn_shared_ux_card_no_data_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_context.mdx | 2 +- api_docs/kbn_shared_ux_file_image.mdx | 2 +- api_docs/kbn_shared_ux_file_image_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_picker.mdx | 2 +- api_docs/kbn_shared_ux_file_upload.mdx | 2 +- api_docs/kbn_shared_ux_file_util.mdx | 2 +- api_docs/kbn_shared_ux_link_redirect_app.mdx | 2 +- .../kbn_shared_ux_link_redirect_app_mocks.mdx | 2 +- api_docs/kbn_shared_ux_markdown.mdx | 2 +- api_docs/kbn_shared_ux_markdown_mocks.mdx | 2 +- .../kbn_shared_ux_page_analytics_no_data.mdx | 2 +- ...shared_ux_page_analytics_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_page_kibana_no_data.mdx | 2 +- ...bn_shared_ux_page_kibana_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_page_kibana_template.mdx | 2 +- ...n_shared_ux_page_kibana_template_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_no_data.mdx | 2 +- .../kbn_shared_ux_page_no_data_config.mdx | 2 +- ...bn_shared_ux_page_no_data_config_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_no_data_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_solution_nav.mdx | 2 +- .../kbn_shared_ux_prompt_no_data_views.mdx | 2 +- ...n_shared_ux_prompt_no_data_views_mocks.mdx | 2 +- api_docs/kbn_shared_ux_prompt_not_found.mdx | 2 +- api_docs/kbn_shared_ux_router.mdx | 2 +- api_docs/kbn_shared_ux_router_mocks.mdx | 2 +- api_docs/kbn_shared_ux_storybook_config.mdx | 2 +- api_docs/kbn_shared_ux_storybook_mock.mdx | 2 +- api_docs/kbn_shared_ux_utility.mdx | 2 +- api_docs/kbn_some_dev_log.mdx | 2 +- api_docs/kbn_sort_package_json.mdx | 2 +- api_docs/kbn_std.mdx | 2 +- api_docs/kbn_stdio_dev_helpers.mdx | 2 +- api_docs/kbn_storybook.mdx | 2 +- api_docs/kbn_telemetry_tools.mdx | 2 +- api_docs/kbn_test.mdx | 2 +- api_docs/kbn_test_jest_helpers.mdx | 2 +- api_docs/kbn_test_subj_selector.mdx | 2 +- api_docs/kbn_tooling_log.mdx | 2 +- api_docs/kbn_type_summarizer.mdx | 2 +- api_docs/kbn_type_summarizer_core.mdx | 2 +- api_docs/kbn_typed_react_router_config.mdx | 2 +- api_docs/kbn_ui_shared_deps_src.mdx | 2 +- api_docs/kbn_ui_theme.mdx | 2 +- api_docs/kbn_user_profile_components.mdx | 2 +- api_docs/kbn_utility_types.mdx | 2 +- api_docs/kbn_utility_types_jest.mdx | 2 +- api_docs/kbn_utils.mdx | 2 +- api_docs/kbn_yarn_lock_validator.mdx | 2 +- api_docs/kibana_overview.mdx | 2 +- api_docs/kibana_react.devdocs.json | 8 - api_docs/kibana_react.mdx | 2 +- api_docs/kibana_utils.mdx | 2 +- api_docs/kubernetes_security.mdx | 2 +- api_docs/lens.mdx | 2 +- api_docs/license_api_guard.mdx | 2 +- api_docs/license_management.mdx | 2 +- api_docs/licensing.mdx | 2 +- api_docs/lists.mdx | 2 +- api_docs/management.mdx | 2 +- api_docs/maps.mdx | 2 +- api_docs/maps_ems.mdx | 2 +- api_docs/ml.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/notifications.mdx | 2 +- api_docs/observability.devdocs.json | 36 +- api_docs/observability.mdx | 2 +- api_docs/osquery.mdx | 2 +- api_docs/plugin_directory.mdx | 17 +- api_docs/presentation_util.mdx | 2 +- api_docs/profiling.mdx | 2 +- api_docs/remote_clusters.mdx | 2 +- api_docs/reporting.mdx | 2 +- api_docs/rollup.mdx | 2 +- api_docs/rule_registry.devdocs.json | 4 +- api_docs/rule_registry.mdx | 2 +- api_docs/runtime_fields.mdx | 2 +- api_docs/saved_objects.mdx | 2 +- api_docs/saved_objects_finder.mdx | 2 +- api_docs/saved_objects_management.mdx | 2 +- api_docs/saved_objects_tagging.mdx | 2 +- api_docs/saved_objects_tagging_oss.mdx | 2 +- api_docs/saved_search.mdx | 2 +- api_docs/screenshot_mode.mdx | 2 +- api_docs/screenshotting.mdx | 2 +- api_docs/security.mdx | 2 +- api_docs/security_solution.devdocs.json | 11 + api_docs/security_solution.mdx | 4 +- api_docs/session_view.mdx | 2 +- api_docs/share.mdx | 2 +- api_docs/snapshot_restore.mdx | 2 +- api_docs/spaces.mdx | 2 +- api_docs/stack_alerts.mdx | 2 +- api_docs/stack_connectors.mdx | 2 +- api_docs/task_manager.mdx | 2 +- api_docs/telemetry.mdx | 2 +- api_docs/telemetry_collection_manager.mdx | 2 +- api_docs/telemetry_collection_xpack.mdx | 2 +- api_docs/telemetry_management_section.mdx | 2 +- api_docs/threat_intelligence.mdx | 2 +- api_docs/timelines.mdx | 2 +- api_docs/transform.mdx | 2 +- api_docs/triggers_actions_ui.devdocs.json | 12 +- api_docs/triggers_actions_ui.mdx | 2 +- api_docs/ui_actions.mdx | 2 +- api_docs/ui_actions_enhanced.mdx | 2 +- api_docs/unified_field_list.mdx | 2 +- api_docs/unified_histogram.mdx | 2 +- api_docs/unified_search.mdx | 2 +- api_docs/unified_search_autocomplete.mdx | 2 +- api_docs/url_forwarding.mdx | 2 +- api_docs/usage_collection.mdx | 2 +- api_docs/ux.mdx | 2 +- api_docs/vis_default_editor.mdx | 2 +- api_docs/vis_type_gauge.mdx | 2 +- api_docs/vis_type_heatmap.mdx | 2 +- api_docs/vis_type_pie.mdx | 2 +- api_docs/vis_type_table.mdx | 2 +- api_docs/vis_type_timelion.mdx | 2 +- api_docs/vis_type_timeseries.mdx | 2 +- api_docs/vis_type_vega.mdx | 2 +- api_docs/vis_type_vislib.mdx | 2 +- api_docs/vis_type_xy.mdx | 2 +- api_docs/visualizations.mdx | 2 +- 471 files changed, 1218 insertions(+), 1583 deletions(-) delete mode 100644 api_docs/kbn_core_injected_metadata_browser.devdocs.json delete mode 100644 api_docs/kbn_core_injected_metadata_browser.mdx diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 24716fbf0a5d0..023cf82880b62 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: 2022-12-21 +date: 2022-12-22 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 303c81c576629..287801ade33b0 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 0d5cfaca17f05..c2e3eb192c2df 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.devdocs.json b/api_docs/alerting.devdocs.json index da217bad63122..0e4bd7ff4a69f 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -2217,7 +2217,22 @@ "label": "ruleMonitoringService", "description": [], "signature": [ - "PublicRuleMonitoringService", + "PublicMetricsSetters", + " | undefined" + ], + "path": "x-pack/plugins/alerting/server/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "alerting", + "id": "def-server.RuleExecutorServices.ruleResultService", + "type": "Object", + "tags": [], + "label": "ruleResultService", + "description": [], + "signature": [ + "PublicLastRunSetters", " | undefined" ], "path": "x-pack/plugins/alerting/server/types.ts", @@ -5703,7 +5718,7 @@ "label": "outcomeMsg", "description": [], "signature": [ - "string | null | undefined" + "string[] | null | undefined" ], "path": "x-pack/plugins/alerting/common/rule.ts", "deprecated": false, diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index a3881fa0a14dc..6d6693e8b7ea7 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Response Ops](https://github.com/orgs/elastic/teams/response-ops) for q | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 426 | 0 | 417 | 36 | +| 427 | 0 | 418 | 37 | ## Client diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index a725fcb756a31..37ec5953662ae 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 168d181372151..7ba67e919df5c 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: 2022-12-21 +date: 2022-12-22 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 fc27ffdbd42f5..8ffbe05651053 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: 2022-12-21 +date: 2022-12-22 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 cdbdbefb6bbe5..4fe5da95779dd 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: 2022-12-21 +date: 2022-12-22 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 87d3a5b441470..02478d25f4ff5 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: 2022-12-21 +date: 2022-12-22 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 fe543eb704fc5..b0f4df3e7996c 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: 2022-12-21 +date: 2022-12-22 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 5d9298ac90fd6..720a31c2aca9d 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_chat.mdx b/api_docs/cloud_chat.mdx index 9a4bcb52dcc5a..7b97f96da4c22 100644 --- a/api_docs/cloud_chat.mdx +++ b/api_docs/cloud_chat.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudChat title: "cloudChat" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudChat plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudChat'] --- import cloudChatObj from './cloud_chat.devdocs.json'; diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index ba8353bad8bbe..85e0f8816b404 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: 2022-12-21 +date: 2022-12-22 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 b1ad2e69e084d..715253aad9610 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: 2022-12-21 +date: 2022-12-22 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 035ec7cb64f1c..d32564b3e87d9 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: 2022-12-21 +date: 2022-12-22 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 ca5192eec3451..69e7e582d4707 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: 2022-12-21 +date: 2022-12-22 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 6d3570b1bbaeb..69640cb258da2 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index b0abb049c6ea7..571c8288c59b3 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/core.devdocs.json b/api_docs/core.devdocs.json index 38c8ac146e4d5..18061d568ccfe 100644 --- a/api_docs/core.devdocs.json +++ b/api_docs/core.devdocs.json @@ -4629,28 +4629,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "core", - "id": "def-public.CoreSetup.injectedMetadata", - "type": "Object", - "tags": [], - "label": "injectedMetadata", - "description": [ - "{@link InjectedMetadataSetup}" - ], - "signature": [ - { - "pluginId": "@kbn/core-injected-metadata-browser", - "scope": "common", - "docId": "kibKbnCoreInjectedMetadataBrowserPluginApi", - "section": "def-common.InjectedMetadataSetup", - "text": "InjectedMetadataSetup" - } - ], - "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "core", "id": "def-public.CoreSetup.theme", @@ -5058,28 +5036,6 @@ "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts", "deprecated": false, "trackAdoption": false - }, - { - "parentPluginId": "core", - "id": "def-public.CoreStart.injectedMetadata", - "type": "Object", - "tags": [], - "label": "injectedMetadata", - "description": [ - "{@link InjectedMetadataStart}" - ], - "signature": [ - { - "pluginId": "@kbn/core-injected-metadata-browser", - "scope": "common", - "docId": "kibKbnCoreInjectedMetadataBrowserPluginApi", - "section": "def-common.InjectedMetadataStart", - "text": "InjectedMetadataStart" - } - ], - "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts", - "deprecated": false, - "trackAdoption": false } ], "initialIsOpen": false @@ -25162,7 +25118,7 @@ "label": "http", "description": [], "signature": [ - "{ basePathConfigured: boolean; maxPayloadInBytes: number; rewriteBasePath: boolean; keepaliveTimeout: number; socketTimeout: number; compression: { enabled: boolean; referrerWhitelistConfigured: boolean; }; xsrf: { disableProtection: boolean; allowlistConfigured: boolean; }; requestId: { allowFromAnyIp: boolean; ipAllowlistConfigured: boolean; }; ssl: { certificateAuthoritiesConfigured: boolean; certificateConfigured: boolean; cipherSuites: string[]; keyConfigured: boolean; keystoreConfigured: boolean; truststoreConfigured: boolean; redirectHttpFromPortConfigured: boolean; supportedProtocols: string[]; clientAuthentication: \"optional\" | \"none\" | \"required\"; }; securityResponseHeaders: { strictTransportSecurity: string; xContentTypeOptions: string; referrerPolicy: string; permissionsPolicyConfigured: boolean; disableEmbedding: boolean; }; }" + "{ basePathConfigured: boolean; maxPayloadInBytes: number; rewriteBasePath: boolean; keepaliveTimeout: number; socketTimeout: number; compression: { enabled: boolean; referrerWhitelistConfigured: boolean; }; xsrf: { disableProtection: boolean; allowlistConfigured: boolean; }; requestId: { allowFromAnyIp: boolean; ipAllowlistConfigured: boolean; }; ssl: { certificateAuthoritiesConfigured: boolean; certificateConfigured: boolean; cipherSuites: string[]; keyConfigured: boolean; keystoreConfigured: boolean; truststoreConfigured: boolean; redirectHttpFromPortConfigured: boolean; supportedProtocols: string[]; clientAuthentication: \"optional\" | \"none\" | \"required\"; }; securityResponseHeaders: { strictTransportSecurity: string; xContentTypeOptions: string; referrerPolicy: string; permissionsPolicyConfigured: boolean; disableEmbedding: boolean; crossOriginOpenerPolicy: string; }; }" ], "path": "packages/core/usage-data/core-usage-data-server/src/core_usage_data.ts", "deprecated": false, @@ -49584,7 +49540,9 @@ "parentPluginId": "core", "id": "def-server.SavedObjectMigrationContext.convertToMultiNamespaceTypeVersion", "type": "string", - "tags": [], + "tags": [ + "deprecated" + ], "label": "convertToMultiNamespaceTypeVersion", "description": [ "\nThe version in which this object type is being converted to a multi-namespace type" @@ -49593,8 +49551,18 @@ "string | undefined" ], "path": "packages/core/saved-objects/core-saved-objects-server/src/migration.ts", - "deprecated": false, - "trackAdoption": false + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "encryptedSavedObjects", + "path": "x-pack/plugins/encrypted_saved_objects/server/create_migration.ts" + }, + { + "plugin": "encryptedSavedObjects", + "path": "x-pack/plugins/encrypted_saved_objects/server/create_migration.ts" + } + ] }, { "parentPluginId": "core", @@ -57546,7 +57514,9 @@ "parentPluginId": "core", "id": "def-server.SavedObjectsType.convertToMultiNamespaceTypeVersion", "type": "string", - "tags": [], + "tags": [ + "deprecated" + ], "label": "convertToMultiNamespaceTypeVersion", "description": [ "\nIf defined, objects of this type will be converted to a 'multiple' or 'multiple-isolated' namespace type when migrating to this\nversion.\n\nRequirements:\n\n 1. This string value must be a valid semver version\n 2. This type must have previously specified {@link SavedObjectsNamespaceType | `namespaceType: 'single'`}\n 3. This type must also specify {@link SavedObjectsNamespaceType | `namespaceType: 'multiple'`} *or*\n {@link SavedObjectsNamespaceType | `namespaceType: 'multiple-isolated'`}\n\nExample of a single-namespace type in 7.12:\n\n```ts\n{\n name: 'foo',\n hidden: false,\n namespaceType: 'single',\n mappings: {...}\n}\n```\n\nExample after converting to a multi-namespace (isolated) type in 8.0:\n\n```ts\n{\n name: 'foo',\n hidden: false,\n namespaceType: 'multiple-isolated',\n mappings: {...},\n convertToMultiNamespaceTypeVersion: '8.0.0'\n}\n```\n\nExample after converting to a multi-namespace (shareable) type in 8.1:\n\n```ts\n{\n name: 'foo',\n hidden: false,\n namespaceType: 'multiple',\n mappings: {...},\n convertToMultiNamespaceTypeVersion: '8.0.0'\n}\n```\n\nNote: migration function(s) can be optionally specified for any of these versions and will not interfere with the conversion process." @@ -57555,8 +57525,214 @@ "string | undefined" ], "path": "packages/core/saved-objects/core-saved-objects-server/src/saved_objects_type.ts", - "deprecated": false, - "trackAdoption": false + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts" + }, + { + "plugin": "actions", + "path": "x-pack/plugins/actions/server/saved_objects/index.ts" + }, + { + "plugin": "actions", + "path": "x-pack/plugins/actions/server/saved_objects/index.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/server/saved_objects/data_views.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/server/saved_objects/query.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/saved_objects/index.ts" + }, + { + "plugin": "savedObjectsTagging", + "path": "x-pack/plugins/saved_objects_tagging/server/saved_objects/tag.ts" + }, + { + "plugin": "canvas", + "path": "x-pack/plugins/canvas/server/saved_objects/workpad.ts" + }, + { + "plugin": "canvas", + "path": "x-pack/plugins/canvas/server/saved_objects/custom_element.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/server/saved_objects.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/saved_object_types/cases.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/saved_object_types/configure.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/saved_object_types/comments.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/saved_object_types/user_actions.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/saved_object_types/connector_mappings.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/server/saved_objects/graph_workspace.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/server/saved_objects/exception_list.ts" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/server/saved_objects/setup_saved_objects.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/timelines.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/notes.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/pinned_events.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/execution_saved_object/saved_objects_type.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_saved_object_mappings.ts" + }, + { + "plugin": "dashboard", + "path": "src/plugins/dashboard/server/dashboard_saved_object/dashboard_saved_object.ts" + }, + { + "plugin": "savedSearch", + "path": "src/plugins/saved_search/server/saved_objects/search.ts" + }, + { + "plugin": "visualizations", + "path": "src/plugins/visualizations/server/saved_objects/visualization.ts" + }, + { + "plugin": "@kbn/core-test-helpers-so-type-serializer", + "path": "packages/core/test-helpers/core-test-helpers-so-type-serializer/src/extract_migration_info.ts" + }, + { + "plugin": "@kbn/core-test-helpers-so-type-serializer", + "path": "packages/core/test-helpers/core-test-helpers-so-type-serializer/src/extract_migration_info.test.ts" + }, + { + "plugin": "@kbn/core-test-helpers-so-type-serializer", + "path": "packages/core/test-helpers/core-test-helpers-so-type-serializer/src/get_migration_hash.test.ts" + }, + { + "plugin": "@kbn/core-test-helpers-so-type-serializer", + "path": "packages/core/test-helpers/core-test-helpers-so-type-serializer/src/get_migration_hash.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + } + ] }, { "parentPluginId": "core", diff --git a/api_docs/core.mdx b/api_docs/core.mdx index fe71294e32a64..882ece5ca4c3f 100644 --- a/api_docs/core.mdx +++ b/api_docs/core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/core title: "core" image: https://source.unsplash.com/400x175/?github description: API docs for the core plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core'] --- import coreObj from './core.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2811 | 17 | 1014 | 0 | +| 2809 | 17 | 1014 | 0 | ## Client diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index d726c40089830..bbfb908d9c142 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: 2022-12-21 +date: 2022-12-22 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 7061a91c1f0b9..0b45db48f274c 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: 2022-12-21 +date: 2022-12-22 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 2a94516fdfe95..07b8cd6f84ad6 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.devdocs.json b/api_docs/data.devdocs.json index 5dd2843e954ae..69a73192ab4e1 100644 --- a/api_docs/data.devdocs.json +++ b/api_docs/data.devdocs.json @@ -13318,14 +13318,6 @@ "plugin": "observability", "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx" }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" - }, { "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts" @@ -13334,26 +13326,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx" @@ -13402,14 +13374,6 @@ "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" @@ -13450,26 +13414,6 @@ "plugin": "ml", "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/components/job_settings_form.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/quick_create_job.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" @@ -13626,82 +13570,10 @@ "plugin": "synthetics", "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx" }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx" - }, { "plugin": "transform", "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx" }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, { "plugin": "transform", "path": "x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts" @@ -13898,6 +13770,10 @@ "plugin": "dataViews", "path": "src/plugins/data_views/common/data_views/data_views.ts" }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" @@ -21046,14 +20922,6 @@ "plugin": "observability", "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx" }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" - }, { "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts" @@ -21062,26 +20930,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx" @@ -21130,14 +20978,6 @@ "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" @@ -21178,26 +21018,6 @@ "plugin": "ml", "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/components/job_settings_form.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/quick_create_job.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" @@ -21354,82 +21174,10 @@ "plugin": "synthetics", "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx" }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx" - }, { "plugin": "transform", "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx" }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, { "plugin": "transform", "path": "x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts" @@ -21626,6 +21374,10 @@ "plugin": "dataViews", "path": "src/plugins/data_views/common/data_views/data_views.ts" }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 7e8567b2ccbea..91dd2083ecb05 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_query.devdocs.json b/api_docs/data_query.devdocs.json index c7e0eeb12f5a1..86b39d4275365 100644 --- a/api_docs/data_query.devdocs.json +++ b/api_docs/data_query.devdocs.json @@ -4558,7 +4558,7 @@ "\nConverts QueryState to expression AST" ], "signature": [ - "({\n filters,\n query,\n inputQuery,\n time,\n dataViewsService,\n}: Args) => Promise<", + "({\n filters,\n query,\n inputQuery,\n time,\n dataView,\n}: Args) => Promise<", { "pluginId": "expressions", "scope": "common", @@ -4577,7 +4577,7 @@ "id": "def-common.textBasedQueryStateToAstWithValidation.$1", "type": "Object", "tags": [], - "label": "{\n filters,\n query,\n inputQuery,\n time,\n dataViewsService,\n}", + "label": "{\n filters,\n query,\n inputQuery,\n time,\n dataView,\n}", "description": [], "signature": [ "Args" diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 28f81d99cfdcd..d6f6d3292a3d5 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: 2022-12-21 +date: 2022-12-22 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 94a508806265d..ef524101bbc61 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: 2022-12-21 +date: 2022-12-22 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 70c316aa1e4c5..466f860370f49 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: 2022-12-21 +date: 2022-12-22 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 366717ed3684d..16e524406fd26 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: 2022-12-21 +date: 2022-12-22 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 371384cc6677e..e261fbad8181c 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: 2022-12-21 +date: 2022-12-22 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 21267b2f47f4d..1a17e65979b19 100644 --- a/api_docs/data_views.devdocs.json +++ b/api_docs/data_views.devdocs.json @@ -261,23 +261,23 @@ }, { "plugin": "data", - "path": "src/plugins/data/public/query/filter_manager/lib/get_display_value.ts" + "path": "src/plugins/data/common/search/search_source/inspect/inspector_stats.ts" }, { "plugin": "data", - "path": "src/plugins/data/common/search/search_source/inspect/inspector_stats.ts" + "path": "src/plugins/data/common/search/tabify/response_writer.ts" }, { "plugin": "data", - "path": "src/plugins/data/common/search/tabify/response_writer.ts" + "path": "src/plugins/data/common/search/aggs/param_types/field.ts" }, { "plugin": "data", - "path": "src/plugins/data/public/search/errors/painless_error.tsx" + "path": "src/plugins/data/public/query/filter_manager/lib/get_display_value.ts" }, { "plugin": "data", - "path": "src/plugins/data/common/search/aggs/param_types/field.ts" + "path": "src/plugins/data/public/search/errors/painless_error.tsx" }, { "plugin": "unifiedSearch", @@ -399,14 +399,6 @@ "plugin": "observability", "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx" }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" - }, { "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts" @@ -415,26 +407,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx" @@ -483,14 +455,6 @@ "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" @@ -531,26 +495,6 @@ "plugin": "ml", "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/components/job_settings_form.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/quick_create_job.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" @@ -707,82 +651,10 @@ "plugin": "synthetics", "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx" }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx" - }, { "plugin": "transform", "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx" }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, { "plugin": "transform", "path": "x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts" @@ -1007,6 +879,10 @@ "plugin": "visTypeTimeseries", "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts" }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" @@ -8574,23 +8450,23 @@ }, { "plugin": "data", - "path": "src/plugins/data/public/query/filter_manager/lib/get_display_value.ts" + "path": "src/plugins/data/common/search/search_source/inspect/inspector_stats.ts" }, { "plugin": "data", - "path": "src/plugins/data/common/search/search_source/inspect/inspector_stats.ts" + "path": "src/plugins/data/common/search/tabify/response_writer.ts" }, { "plugin": "data", - "path": "src/plugins/data/common/search/tabify/response_writer.ts" + "path": "src/plugins/data/common/search/aggs/param_types/field.ts" }, { "plugin": "data", - "path": "src/plugins/data/public/search/errors/painless_error.tsx" + "path": "src/plugins/data/public/query/filter_manager/lib/get_display_value.ts" }, { "plugin": "data", - "path": "src/plugins/data/common/search/aggs/param_types/field.ts" + "path": "src/plugins/data/public/search/errors/painless_error.tsx" }, { "plugin": "unifiedSearch", @@ -8712,14 +8588,6 @@ "plugin": "observability", "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx" }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" - }, { "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts" @@ -8728,26 +8596,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx" @@ -8796,14 +8644,6 @@ "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" @@ -8844,26 +8684,6 @@ "plugin": "ml", "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/components/job_settings_form.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/quick_create_job.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" @@ -9020,82 +8840,10 @@ "plugin": "synthetics", "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx" }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx" - }, { "plugin": "transform", "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx" }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, { "plugin": "transform", "path": "x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts" @@ -9320,6 +9068,10 @@ "plugin": "visTypeTimeseries", "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts" }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" @@ -15982,23 +15734,23 @@ }, { "plugin": "data", - "path": "src/plugins/data/public/query/filter_manager/lib/get_display_value.ts" + "path": "src/plugins/data/common/search/search_source/inspect/inspector_stats.ts" }, { "plugin": "data", - "path": "src/plugins/data/common/search/search_source/inspect/inspector_stats.ts" + "path": "src/plugins/data/common/search/tabify/response_writer.ts" }, { "plugin": "data", - "path": "src/plugins/data/common/search/tabify/response_writer.ts" + "path": "src/plugins/data/common/search/aggs/param_types/field.ts" }, { "plugin": "data", - "path": "src/plugins/data/public/search/errors/painless_error.tsx" + "path": "src/plugins/data/public/query/filter_manager/lib/get_display_value.ts" }, { "plugin": "data", - "path": "src/plugins/data/common/search/aggs/param_types/field.ts" + "path": "src/plugins/data/public/search/errors/painless_error.tsx" }, { "plugin": "unifiedSearch", @@ -16120,14 +15872,6 @@ "plugin": "observability", "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx" }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" - }, { "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts" @@ -16136,26 +15880,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx" @@ -16204,14 +15928,6 @@ "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" @@ -16252,26 +15968,6 @@ "plugin": "ml", "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/components/job_settings_form.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/quick_create_job.ts" - }, { "plugin": "ml", "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" @@ -16428,82 +16124,10 @@ "plugin": "synthetics", "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx" }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx" - }, { "plugin": "transform", "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx" }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" - }, { "plugin": "transform", "path": "x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts" @@ -16728,6 +16352,10 @@ "plugin": "visTypeTimeseries", "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts" }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 073371166face..6eef849203fa9 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: 2022-12-21 +date: 2022-12-22 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 090269ecae592..3c43e81f26540 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index e0782998ba551..532b6c5f81279 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -26,6 +26,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | actions, alerting | - | | | @kbn/core-saved-objects-common, savedObjects, embeddable, visualizations, dashboard, fleet, infra, canvas, graph, actions, alerting, enterpriseSearch, securitySolution, taskManager, savedSearch, ml, @kbn/core-saved-objects-server-internal | - | | | @kbn/core-saved-objects-common, savedObjects, embeddable, visualizations, dashboard, fleet, infra, canvas, graph, actions, alerting, enterpriseSearch, securitySolution, taskManager, savedSearch, ml, @kbn/core-saved-objects-server-internal | - | +| | @kbn/core-saved-objects-migration-server-internal, actions, dataViews, data, alerting, savedObjectsTagging, canvas, lens, cases, graph, lists, maps, securitySolution, dashboard, savedSearch, visualizations, @kbn/core-test-helpers-so-type-serializer | - | | | core, savedObjects, embeddable, visualizations, dashboard, fleet, infra, canvas, graph, actions, alerting, enterpriseSearch, securitySolution, taskManager, savedSearch, ml, @kbn/core-saved-objects-server-internal | - | | | discover, maps, monitoring | - | | | @kbn/es-query, securitySolution, timelines, lists, threatIntelligence, dataViews, unifiedSearch, triggersActionsUi, savedObjectsManagement, controls, unifiedFieldList, lens, aiops, ml, infra, visTypeTimeseries, apm, observability, dataVisualizer, fleet, canvas, graph, stackAlerts, synthetics, transform, upgradeAssistant, ux, maps, dataViewManagement, inputControlVis, visDefaultEditor, presentationUtil, visTypeTimelion, visTypeVega, discover, data | - | @@ -84,6 +85,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | dataViewManagement | - | | | dataViewManagement | - | | | enterpriseSearch | - | +| | encryptedSavedObjects | - | | | @kbn/core-elasticsearch-server-internal, @kbn/core-plugins-server-internal, console | - | | | @kbn/core-plugins-server-internal | - | | | spaces, security, alerting | 8.8.0 | @@ -108,8 +110,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | security | 8.8.0 | | | mapsEms | 8.8.0 | | | @kbn/core-plugins-server, @kbn/core-plugins-server-internal, core | 8.8.0 | -| | @kbn/core-lifecycle-browser | 8.8.0 | -| | @kbn/core-lifecycle-browser | 8.8.0 | | | ml, @kbn/core-http-browser-internal | 8.8.0 Note to maintainers: when looking at usages, mind that typical use could be inside a `catch` block, diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 22f149bc468d5..3f8c10030d1be 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -83,15 +83,6 @@ so TS and code-reference navigation might not highlight them. | -## @kbn/core-lifecycle-browser - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [core_start.ts](https://github.com/elastic/kibana/tree/main/packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts#:~:text=InjectedMetadataStart), [core_start.ts](https://github.com/elastic/kibana/tree/main/packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts#:~:text=InjectedMetadataStart) | 8.8.0 | -| | [core_setup.ts](https://github.com/elastic/kibana/tree/main/packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts#:~:text=InjectedMetadataSetup), [core_setup.ts](https://github.com/elastic/kibana/tree/main/packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts#:~:text=InjectedMetadataSetup) | 8.8.0 | - - - ## @kbn/core-metrics-server-internal | Deprecated API | Reference location(s) | Remove By | @@ -132,6 +123,7 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [document_migrator.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts#:~:text=warning), [migration_logger.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/migration_logger.ts#:~:text=warning), [document_migrator.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts#:~:text=warning), [migration_logger.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/migration_logger.ts#:~:text=warning) | 8.8.0 | +| | [document_migrator.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts#:~:text=convertToMultiNamespaceTypeVersion), [document_migrator.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts#:~:text=convertToMultiNamespaceTypeVersion), [document_migrator.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts#:~:text=convertToMultiNamespaceTypeVersion), [document_migrator.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts#:~:text=convertToMultiNamespaceTypeVersion), [document_migrator.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts#:~:text=convertToMultiNamespaceTypeVersion), [document_migrator.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts#:~:text=convertToMultiNamespaceTypeVersion), [document_migrator.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts#:~:text=convertToMultiNamespaceTypeVersion), [document_migrator.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts#:~:text=convertToMultiNamespaceTypeVersion), [document_migrator.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts#:~:text=convertToMultiNamespaceTypeVersion), [document_migrator.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts#:~:text=convertToMultiNamespaceTypeVersion)+ 34 more | - | @@ -153,6 +145,14 @@ so TS and code-reference navigation might not highlight them. | +## @kbn/core-test-helpers-so-type-serializer + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [extract_migration_info.ts](https://github.com/elastic/kibana/tree/main/packages/core/test-helpers/core-test-helpers-so-type-serializer/src/extract_migration_info.ts#:~:text=convertToMultiNamespaceTypeVersion), [extract_migration_info.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/test-helpers/core-test-helpers-so-type-serializer/src/extract_migration_info.test.ts#:~:text=convertToMultiNamespaceTypeVersion), [get_migration_hash.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/test-helpers/core-test-helpers-so-type-serializer/src/get_migration_hash.test.ts#:~:text=convertToMultiNamespaceTypeVersion), [get_migration_hash.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/test-helpers/core-test-helpers-so-type-serializer/src/get_migration_hash.test.ts#:~:text=convertToMultiNamespaceTypeVersion), [extract_migration_info.ts](https://github.com/elastic/kibana/tree/main/packages/core/test-helpers/core-test-helpers-so-type-serializer/src/extract_migration_info.ts#:~:text=convertToMultiNamespaceTypeVersion), [extract_migration_info.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/test-helpers/core-test-helpers-so-type-serializer/src/extract_migration_info.test.ts#:~:text=convertToMultiNamespaceTypeVersion), [get_migration_hash.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/test-helpers/core-test-helpers-so-type-serializer/src/get_migration_hash.test.ts#:~:text=convertToMultiNamespaceTypeVersion), [get_migration_hash.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/test-helpers/core-test-helpers-so-type-serializer/src/get_migration_hash.test.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | + + + ## @kbn/core-usage-data-server-internal | Deprecated API | Reference location(s) | Remove By | @@ -191,6 +191,7 @@ so TS and code-reference navigation might not highlight them. | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/plugin.ts#:~:text=index), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/plugin.ts#:~:text=index) | - | | | [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/types.ts#:~:text=SavedObjectAttributes)+ 3 more | - | | | [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/types.ts#:~:text=SavedObjectAttributes)+ 3 more | - | +| | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/saved_objects/index.ts#:~:text=convertToMultiNamespaceTypeVersion), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/saved_objects/index.ts#:~:text=convertToMultiNamespaceTypeVersion), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/saved_objects/index.ts#:~:text=convertToMultiNamespaceTypeVersion), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/saved_objects/index.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | | | [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [actions_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/actions_client.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/server/types.ts#:~:text=SavedObjectAttributes)+ 3 more | - | @@ -228,6 +229,7 @@ so TS and code-reference navigation might not highlight them. | | | [task.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/usage/task.ts#:~:text=index) | - | | | [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts#:~:text=SavedObjectAttributes)+ 14 more | - | | | [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts#:~:text=SavedObjectAttributes)+ 14 more | - | +| | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/index.ts#:~:text=convertToMultiNamespaceTypeVersion), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/index.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | | | [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts#:~:text=SavedObjectAttributes), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/saved_objects/geo_containment/migrations.ts#:~:text=SavedObjectAttributes)+ 14 more | - | @@ -267,10 +269,19 @@ so TS and code-reference navigation might not highlight them. | | | [home.component.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/public/components/home/home.component.tsx#:~:text=KibanaPageTemplate), [home.component.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/public/components/home/home.component.tsx#:~:text=KibanaPageTemplate), [home.component.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/public/components/home/home.component.tsx#:~:text=KibanaPageTemplate) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/shareable_runtime/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/shareable_runtime/types.ts#:~:text=SavedObjectAttributes), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/routes/custom_elements/find.ts#:~:text=SavedObjectAttributes), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/routes/custom_elements/find.ts#:~:text=SavedObjectAttributes), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/routes/workpad/find.ts#:~:text=SavedObjectAttributes), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/routes/workpad/find.ts#:~:text=SavedObjectAttributes) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/shareable_runtime/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/shareable_runtime/types.ts#:~:text=SavedObjectAttributes), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/routes/custom_elements/find.ts#:~:text=SavedObjectAttributes), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/routes/custom_elements/find.ts#:~:text=SavedObjectAttributes), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/routes/workpad/find.ts#:~:text=SavedObjectAttributes), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/routes/workpad/find.ts#:~:text=SavedObjectAttributes) | - | +| | [workpad.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/saved_objects/workpad.ts#:~:text=convertToMultiNamespaceTypeVersion), [custom_element.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/saved_objects/custom_element.ts#:~:text=convertToMultiNamespaceTypeVersion), [workpad.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/saved_objects/workpad.ts#:~:text=convertToMultiNamespaceTypeVersion), [custom_element.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/saved_objects/custom_element.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/shareable_runtime/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/shareable_runtime/types.ts#:~:text=SavedObjectAttributes), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/routes/custom_elements/find.ts#:~:text=SavedObjectAttributes), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/routes/custom_elements/find.ts#:~:text=SavedObjectAttributes), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/routes/workpad/find.ts#:~:text=SavedObjectAttributes), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/canvas/server/routes/workpad/find.ts#:~:text=SavedObjectAttributes) | - | +## cases + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [cases.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/cases.ts#:~:text=convertToMultiNamespaceTypeVersion), [configure.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/configure.ts#:~:text=convertToMultiNamespaceTypeVersion), [comments.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/comments.ts#:~:text=convertToMultiNamespaceTypeVersion), [user_actions.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/user_actions.ts#:~:text=convertToMultiNamespaceTypeVersion), [connector_mappings.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/connector_mappings.ts#:~:text=convertToMultiNamespaceTypeVersion), [cases.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/cases.ts#:~:text=convertToMultiNamespaceTypeVersion), [configure.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/configure.ts#:~:text=convertToMultiNamespaceTypeVersion), [comments.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/comments.ts#:~:text=convertToMultiNamespaceTypeVersion), [user_actions.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/user_actions.ts#:~:text=convertToMultiNamespaceTypeVersion), [connector_mappings.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/connector_mappings.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | + + + ## cloudChat | Deprecated API | Reference location(s) | Remove By | @@ -336,6 +347,7 @@ so TS and code-reference navigation might not highlight them. | | | [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes)+ 11 more | - | | | [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes)+ 11 more | - | | | [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts#:~:text=warning) | 8.8.0 | +| | [dashboard_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/dashboard_saved_object.ts#:~:text=convertToMultiNamespaceTypeVersion), [dashboard_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/dashboard_saved_object.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_app/types.ts#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/plugin.tsx#:~:text=onAppLeave) | 8.8.0 | | | [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes)+ 11 more | - | @@ -345,12 +357,13 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [get_display_value.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts#:~:text=title), [inspector_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts#:~:text=title), [response_writer.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/tabify/response_writer.ts#:~:text=title), [painless_error.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/errors/painless_error.tsx#:~:text=title), [field.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=title), [agg_config.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/agg_config.test.ts#:~:text=title), [_terms_other_bucket_helper.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.test.ts#:~:text=title)+ 6 more | - | -| | [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [get_display_value.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts#:~:text=title), [inspector_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts#:~:text=title), [response_writer.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/tabify/response_writer.ts#:~:text=title), [painless_error.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/errors/painless_error.tsx#:~:text=title), [field.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=title), [agg_config.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/agg_config.test.ts#:~:text=title), [_terms_other_bucket_helper.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.test.ts#:~:text=title)+ 6 more | - | -| | [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [get_display_value.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts#:~:text=title), [inspector_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts#:~:text=title), [response_writer.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/tabify/response_writer.ts#:~:text=title), [painless_error.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/errors/painless_error.tsx#:~:text=title), [field.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=title), [agg_config.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/agg_config.test.ts#:~:text=title), [_terms_other_bucket_helper.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.test.ts#:~:text=title)+ 6 more | - | +| | [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [inspector_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts#:~:text=title), [response_writer.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/tabify/response_writer.ts#:~:text=title), [field.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=title), [get_display_value.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts#:~:text=title), [painless_error.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/errors/painless_error.tsx#:~:text=title), [agg_config.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/agg_config.test.ts#:~:text=title), [_terms_other_bucket_helper.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.test.ts#:~:text=title)+ 6 more | - | +| | [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [inspector_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts#:~:text=title), [response_writer.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/tabify/response_writer.ts#:~:text=title), [field.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=title), [get_display_value.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts#:~:text=title), [painless_error.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/errors/painless_error.tsx#:~:text=title), [agg_config.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/agg_config.test.ts#:~:text=title), [_terms_other_bucket_helper.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.test.ts#:~:text=title)+ 6 more | - | +| | [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [inspector_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts#:~:text=title), [response_writer.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/tabify/response_writer.ts#:~:text=title), [field.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=title), [get_display_value.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts#:~:text=title), [painless_error.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/errors/painless_error.tsx#:~:text=title), [agg_config.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/agg_config.test.ts#:~:text=title), [_terms_other_bucket_helper.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.test.ts#:~:text=title)+ 6 more | - | | | [get_columns.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/lib/get_columns.tsx#:~:text=RedirectAppLinks), [get_columns.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/lib/get_columns.tsx#:~:text=RedirectAppLinks), [get_columns.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/lib/get_columns.tsx#:~:text=RedirectAppLinks), [connected_search_session_indicator.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/session_indicator/connected_search_session_indicator/connected_search_session_indicator.tsx#:~:text=RedirectAppLinks), [connected_search_session_indicator.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/session_indicator/connected_search_session_indicator/connected_search_session_indicator.tsx#:~:text=RedirectAppLinks), [connected_search_session_indicator.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/session_indicator/connected_search_session_indicator/connected_search_session_indicator.tsx#:~:text=RedirectAppLinks) | - | | | [data_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx#:~:text=executeTriggerActions), [data_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx#:~:text=executeTriggerActions) | - | | | [session_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/server/search/session/session_service.ts#:~:text=authc) | - | +| | [query.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/server/saved_objects/query.ts#:~:text=convertToMultiNamespaceTypeVersion), [query.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/server/saved_objects/query.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | @@ -387,6 +400,7 @@ so TS and code-reference navigation might not highlight them. | | | [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=removeScriptedField) | - | | | [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getNonScriptedFields) | - | | | [data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.ts#:~:text=getScriptedFields), [data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.ts#:~:text=getScriptedFields), [data_views.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_views.ts#:~:text=getScriptedFields), [register_index_pattern_usage_collection.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/server/register_index_pattern_usage_collection.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields) | - | +| | [data_views.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/server/saved_objects/data_views.ts#:~:text=convertToMultiNamespaceTypeVersion), [data_views.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/server/saved_objects/data_views.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | @@ -395,9 +409,9 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [document_stats.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_row/document_stats.tsx#:~:text=fieldFormats), [top_values.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx#:~:text=fieldFormats), [choropleth_map.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/choropleth_map.tsx#:~:text=fieldFormats) | - | -| | [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [actions_panel.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=title), [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title), [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [actions_panel.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=title), [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title) | - | -| | [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [actions_panel.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=title), [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title), [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [actions_panel.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=title), [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title) | - | -| | [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [actions_panel.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=title), [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title) | - | +| | [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title), [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title) | - | +| | [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title), [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title) | - | +| | [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title) | - | | | [results_links.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx#:~:text=indexPatternId), [actions_panel.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=indexPatternId) | - | @@ -408,11 +422,11 @@ so TS and code-reference navigation might not highlight them. | | ---------------|-----------|-----------| | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=create), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=create) | - | | | [discover_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/services/discover_state.ts#:~:text=syncQueryStateWithUrl), [discover_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/services/discover_state.ts#:~:text=syncQueryStateWithUrl) | - | -| | [use_adhoc_data_views.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts#:~:text=title), [use_adhoc_data_views.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts#:~:text=title) | - | +| | [use_adhoc_data_views.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts#:~:text=title), [use_text_based_query_language.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts#:~:text=title), [use_adhoc_data_views.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts#:~:text=title), [use_text_based_query_language.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts#:~:text=title) | - | | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=create), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=create) | - | | | [fetch_hits_in_interval.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/context/utils/fetch_hits_in_interval.ts#:~:text=EsQuerySearchAfter), [fetch_hits_in_interval.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/context/utils/fetch_hits_in_interval.ts#:~:text=EsQuerySearchAfter), [get_es_query_search_after.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/context/utils/get_es_query_search_after.ts#:~:text=EsQuerySearchAfter), [get_es_query_search_after.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/context/utils/get_es_query_search_after.ts#:~:text=EsQuerySearchAfter), [get_es_query_search_after.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/context/utils/get_es_query_search_after.ts#:~:text=EsQuerySearchAfter) | - | -| | [use_adhoc_data_views.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts#:~:text=title), [use_adhoc_data_views.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts#:~:text=title) | - | -| | [use_adhoc_data_views.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts#:~:text=title) | - | +| | [use_adhoc_data_views.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts#:~:text=title), [use_text_based_query_language.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts#:~:text=title), [use_adhoc_data_views.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts#:~:text=title), [use_text_based_query_language.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts#:~:text=title) | - | +| | [use_adhoc_data_views.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts#:~:text=title), [use_text_based_query_language.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts#:~:text=title) | - | | | [on_save_search.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx#:~:text=SavedObjectSaveModal), [on_save_search.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=executeTriggerActions), [search_embeddable_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/embeddable/search_embeddable_factory.ts#:~:text=executeTriggerActions), [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/plugin.tsx#:~:text=executeTriggerActions) | - | | | [ui_settings.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/server/ui_settings.ts#:~:text=metric), [ui_settings.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/server/ui_settings.ts#:~:text=metric), [ui_settings.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/server/ui_settings.ts#:~:text=metric) | - | @@ -446,6 +460,7 @@ so TS and code-reference navigation might not highlight them. | | 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), [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) | - | @@ -512,6 +527,7 @@ so TS and code-reference navigation might not highlight them. | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/server/plugin.ts#:~:text=license%24) | 8.8.0 | | | [saved_workspace_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/saved_workspace_references.ts#:~:text=SavedObjectAttributes), [saved_workspace_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/saved_workspace_references.ts#:~:text=SavedObjectAttributes), [saved_workspace_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/helpers/saved_workspace_utils.ts#:~:text=SavedObjectAttributes), [saved_workspace_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/helpers/saved_workspace_utils.ts#:~:text=SavedObjectAttributes) | - | | | [saved_workspace_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/saved_workspace_references.ts#:~:text=SavedObjectAttributes), [saved_workspace_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/saved_workspace_references.ts#:~:text=SavedObjectAttributes), [saved_workspace_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/helpers/saved_workspace_utils.ts#:~:text=SavedObjectAttributes), [saved_workspace_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/helpers/saved_workspace_utils.ts#:~:text=SavedObjectAttributes) | - | +| | [graph_workspace.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/server/saved_objects/graph_workspace.ts#:~:text=convertToMultiNamespaceTypeVersion), [graph_workspace.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/server/saved_objects/graph_workspace.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | | | [saved_workspace_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/saved_workspace_references.ts#:~:text=SavedObjectAttributes), [saved_workspace_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/saved_workspace_references.ts#:~:text=SavedObjectAttributes), [saved_workspace_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/helpers/saved_workspace_utils.ts#:~:text=SavedObjectAttributes), [saved_workspace_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/helpers/saved_workspace_utils.ts#:~:text=SavedObjectAttributes) | - | @@ -587,6 +603,7 @@ so TS and code-reference navigation might not highlight them. | | | [loader.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.ts#:~:text=title), [lens_top_nav.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx#:~:text=title), [loader.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.ts#:~:text=title), [lens_top_nav.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx#:~:text=title) | - | | | [loader.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.ts#:~:text=title), [lens_top_nav.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx#:~:text=title) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [mounter.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/mounter.tsx#:~:text=onAppLeave) | 8.8.0 | +| | [saved_objects.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/server/saved_objects.ts#:~:text=convertToMultiNamespaceTypeVersion), [saved_objects.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/server/saved_objects.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [mounter.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/mounter.tsx#:~:text=onAppLeave) | 8.8.0 | @@ -606,6 +623,7 @@ so TS and code-reference navigation might not highlight them. | | | [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title)+ 8 more | - | | | [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title)+ 8 more | - | | | [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title) | - | +| | [exception_list.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/server/saved_objects/exception_list.ts#:~:text=convertToMultiNamespaceTypeVersion), [exception_list.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/server/saved_objects/exception_list.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | | | [create_endpoint_trusted_apps_list.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/server/services/exception_lists/create_endpoint_trusted_apps_list.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [create_endpoint_trusted_apps_list.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/server/services/exception_lists/create_endpoint_trusted_apps_list.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [create_endpoint_trusted_apps_list.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/server/services/exception_lists/create_endpoint_trusted_apps_list.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/server/saved_objects/migrations.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/server/saved_objects/migrations.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/server/saved_objects/migrations.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [exception_list_schema.mock.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/common/schemas/response/exception_list_schema.mock.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [exception_list_schema.mock.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/common/schemas/response/exception_list_schema.mock.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [migrations.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/server/saved_objects/migrations.test.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [migrations.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/server/saved_objects/migrations.test.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID)+ 7 more | - | | | [create_endpoint_trusted_apps_list.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/server/services/exception_lists/create_endpoint_trusted_apps_list.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_NAME), [create_endpoint_trusted_apps_list.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/server/services/exception_lists/create_endpoint_trusted_apps_list.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_NAME), [exception_list_schema.mock.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/common/schemas/response/exception_list_schema.mock.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_NAME), [exception_list_schema.mock.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/common/schemas/response/exception_list_schema.mock.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_NAME) | - | | | [create_endpoint_trusted_apps_list.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/server/services/exception_lists/create_endpoint_trusted_apps_list.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION), [create_endpoint_trusted_apps_list.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/server/services/exception_lists/create_endpoint_trusted_apps_list.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION), [exception_list_schema.mock.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/common/schemas/response/exception_list_schema.mock.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION), [exception_list_schema.mock.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/common/schemas/response/exception_list_schema.mock.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION) | - | @@ -644,6 +662,7 @@ so TS and code-reference navigation might not highlight them. | | | [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit) | - | | | [render_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/render_app.tsx#:~:text=onAppLeave), [map_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx#:~:text=onAppLeave), [map_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/routes/map_page/map_page.tsx#:~:text=onAppLeave) | 8.8.0 | | | [saved_object_migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/server/saved_objects/saved_object_migrations.ts#:~:text=warning), [saved_object_migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/server/saved_objects/saved_object_migrations.ts#:~:text=warning) | 8.8.0 | +| | [setup_saved_objects.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/server/saved_objects/setup_saved_objects.ts#:~:text=convertToMultiNamespaceTypeVersion), [setup_saved_objects.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/server/saved_objects/setup_saved_objects.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | | | [render_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/render_app.tsx#:~:text=onAppLeave), [map_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx#:~:text=onAppLeave), [map_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/routes/map_page/map_page.tsx#:~:text=onAppLeave) | 8.8.0 | @@ -661,9 +680,9 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts#:~:text=title), [rollup.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=title), [alerting_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts#:~:text=title), [data_recognizer.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=title), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=title), [configuration_step_details.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx#:~:text=title)+ 76 more | - | -| | [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts#:~:text=title), [rollup.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=title), [alerting_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts#:~:text=title), [data_recognizer.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=title), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=title), [configuration_step_details.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx#:~:text=title)+ 76 more | - | -| | [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts#:~:text=title), [rollup.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=title), [alerting_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts#:~:text=title), [data_recognizer.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=title), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=title), [configuration_step_details.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx#:~:text=title)+ 33 more | - | +| | [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts#:~:text=title), [rollup.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=title), [alerting_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts#:~:text=title), [data_recognizer.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts#:~:text=title), [configuration_step_details.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx#:~:text=title), [data_loader.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title)+ 52 more | - | +| | [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts#:~:text=title), [rollup.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=title), [alerting_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts#:~:text=title), [data_recognizer.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts#:~:text=title), [configuration_step_details.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx#:~:text=title), [data_loader.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title)+ 52 more | - | +| | [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts#:~:text=title), [rollup.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=title), [alerting_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts#:~:text=title), [data_recognizer.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts#:~:text=title), [configuration_step_details.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx#:~:text=title), [data_loader.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title)+ 21 more | - | | | [ml_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx#:~:text=KibanaPageTemplate), [ml_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx#:~:text=KibanaPageTemplate), [ml_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx#:~:text=KibanaPageTemplate) | - | | | [ml_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx#:~:text=RedirectAppLinks), [ml_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx#:~:text=RedirectAppLinks), [ml_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx#:~:text=RedirectAppLinks), [jobs_list_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/management/jobs_list/components/jobs_list_page/jobs_list_page.tsx#:~:text=RedirectAppLinks), [jobs_list_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/management/jobs_list/components/jobs_list_page/jobs_list_page.tsx#:~:text=RedirectAppLinks), [jobs_list_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/management/jobs_list/components/jobs_list_page/jobs_list_page.tsx#:~:text=RedirectAppLinks) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/plugin.ts#:~:text=license%24) | 8.8.0 | @@ -782,6 +801,7 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [request_handler_context.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/server/request_handler_context.ts#:~:text=authz) | - | +| | [tag.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/server/saved_objects/tag.ts#:~:text=convertToMultiNamespaceTypeVersion), [tag.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/server/saved_objects/tag.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | @@ -799,6 +819,7 @@ so TS and code-reference navigation might not highlight them. | | ---------------|-----------|-----------| | | [search_migrations.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_search/server/saved_objects/search_migrations.ts#:~:text=SavedObjectAttributes), [search_migrations.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_search/server/saved_objects/search_migrations.ts#:~:text=SavedObjectAttributes) | - | | | [search_migrations.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_search/server/saved_objects/search_migrations.ts#:~:text=SavedObjectAttributes), [search_migrations.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_search/server/saved_objects/search_migrations.ts#:~:text=SavedObjectAttributes) | - | +| | [search.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_search/server/saved_objects/search.ts#:~:text=convertToMultiNamespaceTypeVersion), [search.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_search/server/saved_objects/search.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | | | [search_migrations.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_search/server/saved_objects/search_migrations.ts#:~:text=SavedObjectAttributes), [search_migrations.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_search/server/saved_objects/search_migrations.ts#:~:text=SavedObjectAttributes) | - | @@ -861,6 +882,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx#:~:text=AppLeaveHandler), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/types.ts#:~:text=AppLeaveHandler), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/types.ts#:~:text=AppLeaveHandler), [routes.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/routes.tsx#:~:text=AppLeaveHandler), [routes.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/routes.tsx#:~:text=AppLeaveHandler), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/app.tsx#:~:text=AppLeaveHandler), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/app.tsx#:~:text=AppLeaveHandler), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/app.tsx#:~:text=AppLeaveHandler), [use_timeline_save_prompt.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/hooks/timeline/use_timeline_save_prompt.ts#:~:text=AppLeaveHandler)+ 1 more | 8.8.0 | | | [legacy_types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_types.ts#:~:text=SavedObjectAttributes), [legacy_types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_types.ts#:~:text=SavedObjectAttributes), [legacy_migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_migrations.ts#:~:text=SavedObjectAttributes), [legacy_migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_migrations.ts#:~:text=SavedObjectAttributes) | - | | | [legacy_types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_types.ts#:~:text=SavedObjectAttributes), [legacy_types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_types.ts#:~:text=SavedObjectAttributes), [legacy_migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_migrations.ts#:~:text=SavedObjectAttributes), [legacy_migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_migrations.ts#:~:text=SavedObjectAttributes) | - | +| | [timelines.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/timelines.ts#:~:text=convertToMultiNamespaceTypeVersion), [notes.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/notes.ts#:~:text=convertToMultiNamespaceTypeVersion), [pinned_events.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/pinned_events.ts#:~:text=convertToMultiNamespaceTypeVersion), [saved_objects_type.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/execution_saved_object/saved_objects_type.ts#:~:text=convertToMultiNamespaceTypeVersion), [legacy_saved_object_mappings.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_saved_object_mappings.ts#:~:text=convertToMultiNamespaceTypeVersion), [timelines.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/timelines.ts#:~:text=convertToMultiNamespaceTypeVersion), [notes.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/notes.ts#:~:text=convertToMultiNamespaceTypeVersion), [pinned_events.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/pinned_events.ts#:~:text=convertToMultiNamespaceTypeVersion), [saved_objects_type.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/execution_saved_object/saved_objects_type.ts#:~:text=convertToMultiNamespaceTypeVersion), [legacy_saved_object_mappings.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_saved_object_mappings.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | | | [policy_hooks.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [policy_hooks.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [api_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/api_client.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [api_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/api_client.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [api_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/api_client.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [lists.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/lists.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [manifest_manager.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [manifest_manager.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID)+ 34 more | - | | | [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_NAME), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_NAME), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_NAME), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_NAME) | - | | | [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION) | - | @@ -961,9 +983,9 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [step_details_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx#:~:text=title), [wizard.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx#:~:text=title), [filter_term_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title)+ 36 more | - | -| | [step_details_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx#:~:text=title), [wizard.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx#:~:text=title), [filter_term_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title)+ 36 more | - | -| | [step_details_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx#:~:text=title), [wizard.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx#:~:text=title), [filter_term_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title)+ 13 more | - | +| | [filter_term_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx#:~:text=title), [common.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts#:~:text=title), [es_index_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/services/es_index_service.ts#:~:text=title), [transforms.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/server/routes/api/transforms.ts#:~:text=title), [common.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts#:~:text=title), [filter_term_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx#:~:text=title), [common.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts#:~:text=title), [es_index_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/services/es_index_service.ts#:~:text=title), [transforms.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/server/routes/api/transforms.ts#:~:text=title), [common.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts#:~:text=title) | - | +| | [filter_term_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx#:~:text=title), [common.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts#:~:text=title), [es_index_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/services/es_index_service.ts#:~:text=title), [transforms.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/server/routes/api/transforms.ts#:~:text=title), [common.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts#:~:text=title), [filter_term_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx#:~:text=title), [common.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts#:~:text=title), [es_index_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/services/es_index_service.ts#:~:text=title), [transforms.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/server/routes/api/transforms.ts#:~:text=title), [common.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts#:~:text=title) | - | +| | [filter_term_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx#:~:text=title), [common.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts#:~:text=title), [es_index_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/services/es_index_service.ts#:~:text=title), [transforms.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/server/routes/api/transforms.ts#:~:text=title), [common.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts#:~:text=title) | - | | | [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/server/services/license.ts#:~:text=license%24) | 8.8.0 | @@ -1090,6 +1112,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/components/visualize_top_nav.tsx#:~:text=onAppLeave), [visualize_editor_common.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/components/visualize_editor_common.tsx#:~:text=onAppLeave), [app.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/app.tsx#:~:text=onAppLeave), [index.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/index.tsx#:~:text=onAppLeave) | 8.8.0 | | | [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_objects_utils/save_with_confirmation.ts#:~:text=SavedObjectAttributes), [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_objects_utils/save_with_confirmation.ts#:~:text=SavedObjectAttributes), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_objects_utils/find_object_by_title.ts#:~:text=SavedObjectAttributes), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_objects_utils/find_object_by_title.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes)+ 11 more | - | | | [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_objects_utils/save_with_confirmation.ts#:~:text=SavedObjectAttributes), [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_objects_utils/save_with_confirmation.ts#:~:text=SavedObjectAttributes), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_objects_utils/find_object_by_title.ts#:~:text=SavedObjectAttributes), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_objects_utils/find_object_by_title.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes)+ 11 more | - | +| | [visualization.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/server/saved_objects/visualization.ts#:~:text=convertToMultiNamespaceTypeVersion), [visualization.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/server/saved_objects/visualization.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | | | [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/components/visualize_top_nav.tsx#:~:text=onAppLeave), [visualize_editor_common.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/components/visualize_editor_common.tsx#:~:text=onAppLeave), [app.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/app.tsx#:~:text=onAppLeave), [index.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/index.tsx#:~:text=onAppLeave) | 8.8.0 | | | [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_objects_utils/save_with_confirmation.ts#:~:text=SavedObjectAttributes), [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_objects_utils/save_with_confirmation.ts#:~:text=SavedObjectAttributes), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_objects_utils/find_object_by_title.ts#:~:text=SavedObjectAttributes), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_objects_utils/find_object_by_title.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes), [saved_visualize_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/utils/saved_visualize_utils.ts#:~:text=SavedObjectAttributes)+ 11 more | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 81cd8f157df2a..3805a1f7c7ade 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -94,8 +94,6 @@ so TS and code-reference navigation might not highlight them. | | @kbn/core-plugins-server-internal | | [plugin.ts](https://github.com/elastic/kibana/tree/main/packages/core/plugins/core-plugins-server-internal/src/plugin.ts#:~:text=AsyncPlugin), [plugin.ts](https://github.com/elastic/kibana/tree/main/packages/core/plugins/core-plugins-server-internal/src/plugin.ts#:~:text=AsyncPlugin), [plugin.ts](https://github.com/elastic/kibana/tree/main/packages/core/plugins/core-plugins-server-internal/src/plugin.ts#:~:text=AsyncPlugin), [plugin.ts](https://github.com/elastic/kibana/tree/main/packages/core/plugins/core-plugins-server-internal/src/plugin.ts#:~:text=AsyncPlugin), [types.ts](https://github.com/elastic/kibana/tree/main/packages/core/plugins/core-plugins-server/src/types.ts#:~:text=AsyncPlugin), [index.ts](https://github.com/elastic/kibana/tree/main/packages/core/plugins/core-plugins-server/src/index.ts#:~:text=AsyncPlugin), [index.ts](https://github.com/elastic/kibana/tree/main/packages/core/plugins/core-plugins-server/index.ts#:~:text=AsyncPlugin), [index.ts](https://github.com/elastic/kibana/tree/main/src/core/server/index.ts#:~:text=AsyncPlugin) | 8.8.0 | | @kbn/core-saved-objects-migration-server-internal | | [document_migrator.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts#:~:text=warning), [migration_logger.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/migration_logger.ts#:~:text=warning), [document_migrator.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts#:~:text=warning), [migration_logger.ts](https://github.com/elastic/kibana/tree/main/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/migration_logger.ts#:~:text=warning) | 8.8.0 | | @kbn/core-apps-browser-internal | | [load_status.ts](https://github.com/elastic/kibana/tree/main/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts#:~:text=process), [load_status.ts](https://github.com/elastic/kibana/tree/main/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts#:~:text=process), [load_status.ts](https://github.com/elastic/kibana/tree/main/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts#:~:text=process), [load_status.ts](https://github.com/elastic/kibana/tree/main/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts#:~:text=process), [load_status.ts](https://github.com/elastic/kibana/tree/main/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts#:~:text=process), [load_status.ts](https://github.com/elastic/kibana/tree/main/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts#:~:text=process), [load_status.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.test.ts#:~:text=process), [load_status.ts](https://github.com/elastic/kibana/tree/main/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts#:~:text=process), [load_status.ts](https://github.com/elastic/kibana/tree/main/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts#:~:text=process), [load_status.ts](https://github.com/elastic/kibana/tree/main/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts#:~:text=process)+ 20 more | 8.8.0 | -| @kbn/core-lifecycle-browser | | [core_start.ts](https://github.com/elastic/kibana/tree/main/packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts#:~:text=InjectedMetadataStart), [core_start.ts](https://github.com/elastic/kibana/tree/main/packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts#:~:text=InjectedMetadataStart) | 8.8.0 | -| @kbn/core-lifecycle-browser | | [core_setup.ts](https://github.com/elastic/kibana/tree/main/packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts#:~:text=InjectedMetadataSetup), [core_setup.ts](https://github.com/elastic/kibana/tree/main/packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts#:~:text=InjectedMetadataSetup) | 8.8.0 | diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index e53626ad87b56..4d83b84507eb2 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: 2022-12-21 +date: 2022-12-22 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 b47d2051f2759..0eb5d81e824ad 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: 2022-12-21 +date: 2022-12-22 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 bfa9aa3aedc5c..cdeefcb512970 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index a7749ab27709b..1738c14d7083c 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: 2022-12-21 +date: 2022-12-22 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 dde783e42d9d7..6f3c8350b0432 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: 2022-12-21 +date: 2022-12-22 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 048d2f990eb64..4d4123029d22a 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: 2022-12-21 +date: 2022-12-22 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 0616b60dbe7b2..0df0845a9fa72 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index ad092c36e7191..d40aad8571696 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index afff3178bed68..53263821796a1 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 802e8981e3a73..0c44980517644 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index ade5148123069..0626e2d1084f8 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: 2022-12-21 +date: 2022-12-22 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 32d6445726ed9..4d7147fe19c2f 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: 2022-12-21 +date: 2022-12-22 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 2d69090433ce4..50efee29777b3 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: 2022-12-21 +date: 2022-12-22 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 b53d8f61c7193..a1ee2837bdbf7 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: 2022-12-21 +date: 2022-12-22 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 144b1971ef120..6542451a51f3c 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: 2022-12-21 +date: 2022-12-22 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 56005fc12344e..240e076d6a3a2 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: 2022-12-21 +date: 2022-12-22 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 2f1ca184ae209..2f02d161a88a8 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: 2022-12-21 +date: 2022-12-22 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 fd6ba2aa4aa52..f3ab2e1299a33 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: 2022-12-21 +date: 2022-12-22 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 a4c793afecb54..9b25022642c91 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: 2022-12-21 +date: 2022-12-22 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 9b44d0ab8a073..e2ecb9726e5d5 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.devdocs.json b/api_docs/expression_shape.devdocs.json index fe1c74fde2073..20f6fb671527e 100644 --- a/api_docs/expression_shape.devdocs.json +++ b/api_docs/expression_shape.devdocs.json @@ -165,13 +165,13 @@ }, { "parentPluginId": "expressionShape", - "id": "def-public.LazyProgressDrawer", + "id": "def-public.ProgressDrawerComponent", "type": "Function", "tags": [], - "label": "LazyProgressDrawer", + "label": "ProgressDrawerComponent", "description": [], "signature": [ - "React.ExoticComponent> & { readonly _result: React.ForwardRefExoticComponent & React.RefAttributes<", - { - "pluginId": "expressionShape", - "scope": "public", - "docId": "kibExpressionShapePluginApi", - "section": "def-public.ShapeRef", - "text": "ShapeRef" - }, - ">>; }" - ], - "path": "src/plugins/expression_shape/public/components/progress/index.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "expressionShape", - "id": "def-public.LazyProgressDrawer.$1", - "type": "Uncategorized", - "tags": [], - "label": "props", - "description": [], - "signature": [ - "P" - ], - "path": "node_modules/@types/react/index.d.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "expressionShape", - "id": "def-public.LazyShapeDrawer", - "type": "Function", - "tags": [], - "label": "LazyShapeDrawer", - "description": [], - "signature": [ - "React.ExoticComponent & React.RefAttributes<", - { - "pluginId": "expressionShape", - "scope": "public", - "docId": "kibExpressionShapePluginApi", - "section": "def-public.ShapeRef", - "text": "ShapeRef" - }, - ">> & { readonly _result: React.ForwardRefExoticComponent & React.RefAttributes<", - { - "pluginId": "expressionShape", - "scope": "public", - "docId": "kibExpressionShapePluginApi", - "section": "def-public.ShapeRef", - "text": "ShapeRef" - }, - ">>; }" + ">>" ], - "path": "src/plugins/expression_shape/public/components/shape/index.ts", + "path": "src/plugins/expression_shape/public/components/progress/progress_drawer.tsx", "deprecated": false, "trackAdoption": false, "returnComment": [], "children": [ { "parentPluginId": "expressionShape", - "id": "def-public.LazyShapeDrawer.$1", + "id": "def-public.ProgressDrawerComponent.$1", "type": "Uncategorized", "tags": [], "label": "props", @@ -355,6 +275,54 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "expressionShape", + "id": "def-public.ShapeDrawerComponent", + "type": "Function", + "tags": [], + "label": "ShapeDrawerComponent", + "description": [], + "signature": [ + "React.ForwardRefExoticComponent & React.RefAttributes<", + { + "pluginId": "expressionShape", + "scope": "public", + "docId": "kibExpressionShapePluginApi", + "section": "def-public.ShapeRef", + "text": "ShapeRef" + }, + ">>" + ], + "path": "src/plugins/expression_shape/public/components/shape/shape_drawer.tsx", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "expressionShape", + "id": "def-public.ShapeDrawerComponent.$1", + "type": "Uncategorized", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "P" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "expressionShape", "id": "def-public.shapeRendererFactory", diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index 0504ca99df52b..3a59742e17db4 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: 2022-12-21 +date: 2022-12-22 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 dfd8ab4c4ccd9..18d0c8a0e5e66 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: 2022-12-21 +date: 2022-12-22 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 b4e14edd9e19f..72f08a98b1c38 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: 2022-12-21 +date: 2022-12-22 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 13f63a48fa7b1..5263506974499 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: 2022-12-21 +date: 2022-12-22 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 1a07fcadb6222..735f41741caf9 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: 2022-12-21 +date: 2022-12-22 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 646bf0a0f038e..6db50785649af 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index e194186cf8f27..ade802b100a3b 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: 2022-12-21 +date: 2022-12-22 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 2a5dbf41d9c33..37b75c70a4133 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: 2022-12-21 +date: 2022-12-22 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 74c770fa79972..3a24f3b3d138f 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index 5a82c71e0252c..20f622e193a7a 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -4105,6 +4105,70 @@ } ], "functions": [ + { + "parentPluginId": "fleet", + "id": "def-server.buildAgentStatusRuntimeField", + "type": "Function", + "tags": [], + "label": "buildAgentStatusRuntimeField", + "description": [], + "signature": [ + "(soClient: ", + { + "pluginId": "@kbn/core-saved-objects-api-server", + "scope": "server", + "docId": "kibKbnCoreSavedObjectsApiServerPluginApi", + "section": "def-server.SavedObjectsClientContract", + "text": "SavedObjectsClientContract" + }, + ", pathPrefix: string | undefined) => Promise<", + "MappingRuntimeFields", + ">" + ], + "path": "x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-server.buildAgentStatusRuntimeField.$1", + "type": "Object", + "tags": [], + "label": "soClient", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-saved-objects-api-server", + "scope": "server", + "docId": "kibKbnCoreSavedObjectsApiServerPluginApi", + "section": "def-server.SavedObjectsClientContract", + "text": "SavedObjectsClientContract" + } + ], + "path": "x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "fleet", + "id": "def-server.buildAgentStatusRuntimeField.$2", + "type": "string", + "tags": [], + "label": "pathPrefix", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-server.getRegistryUrl", @@ -4272,7 +4336,7 @@ "\nReturn the status by the Agent's Policy id" ], "signature": [ - "(agentPolicyId?: string | undefined, filterKuery?: string | undefined) => Promise<{ events: number; total: number; online: number; error: number; offline: number; other: number; updating: number; }>" + "(agentPolicyId?: string | undefined, filterKuery?: string | undefined) => Promise<{ events: number; total: number; online: number; error: number; offline: number; other: number; updating: number; inactive: number; unenrolled: number; }>" ], "path": "x-pack/plugins/fleet/server/services/agents/agent_service.ts", "deprecated": false, @@ -6570,7 +6634,7 @@ "section": "def-common.ListWithKuery", "text": "ListWithKuery" }, - ") => Promise<", + " & { withAgentCount?: boolean | undefined; }) => Promise<", { "pluginId": "fleet", "scope": "common", @@ -6616,7 +6680,7 @@ { "parentPluginId": "fleet", "id": "def-server.PackagePolicyClient.list.$2", - "type": "Object", + "type": "CompoundType", "tags": [], "label": "options", "description": [], @@ -6627,7 +6691,8 @@ "docId": "kibFleetPluginApi", "section": "def-common.ListWithKuery", "text": "ListWithKuery" - } + }, + " & { withAgentCount?: boolean | undefined; }" ], "path": "x-pack/plugins/fleet/server/services/package_policy_service.ts", "deprecated": false, @@ -11068,7 +11133,7 @@ "label": "results", "description": [], "signature": [ - "{ events: number; total: number; online: number; error: number; offline: number; other: number; updating: number; }" + "{ events: number; total: number; online: number; error: number; offline: number; other: number; updating: number; inactive: number; unenrolled: number; }" ], "path": "x-pack/plugins/fleet/common/types/rest_spec/agent.ts", "deprecated": false, @@ -12900,6 +12965,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "fleet", + "id": "def-common.PackagePolicy.agents", + "type": "number", + "tags": [], + "label": "agents", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "fleet", "id": "def-common.PackagePolicy.revision", @@ -14828,7 +14907,7 @@ "label": "AgentStatus", "description": [], "signature": [ - "\"error\" | \"offline\" | \"online\" | \"inactive\" | \"enrolling\" | \"unenrolling\" | \"updating\" | \"degraded\"" + "\"error\" | \"offline\" | \"online\" | \"inactive\" | \"enrolling\" | \"unenrolling\" | \"unenrolled\" | \"updating\" | \"degraded\"" ], "path": "x-pack/plugins/fleet/common/types/models/agent.ts", "deprecated": false, diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 3acda965528c4..9033d42676fe7 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Fleet](https://github.com/orgs/elastic/teams/fleet) for questions regar | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1025 | 3 | 920 | 20 | +| 1029 | 3 | 924 | 20 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index d0f6059db9f72..5cb82aba86a2d 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: 2022-12-21 +date: 2022-12-22 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 80f124b037386..dc7772e01f697 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: 2022-12-21 +date: 2022-12-22 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 0e26568cb2742..4eb630e1ad004 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 2b44433f7edc3..1326d9517e374 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: 2022-12-21 +date: 2022-12-22 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 57f5b17066ac1..8934efb99edd1 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: 2022-12-21 +date: 2022-12-22 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 3660c9715d1ef..79154e98cf39b 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 30d7f6a9adfb9..1d8f6b34059c0 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 82c773c99cf29..888c94facf53a 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index f5777c0b4fb31..0cca186367fbe 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 56b8f951737bb..0f9bcd1b02264 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx index 108890b6f3d69..7d65618073130 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-utils plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] --- import kbnAiopsUtilsObj from './kbn_aiops_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts.mdx b/api_docs/kbn_alerts.mdx index 8fb97f1015f43..54e7303411e5a 100644 --- a/api_docs/kbn_alerts.mdx +++ b/api_docs/kbn_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts title: "@kbn/alerts" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts'] --- import kbnAlertsObj from './kbn_alerts.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 4e20c5952d038..4ecd79e967d64 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index 1f35a58ca2e27..d5e767d77d536 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] --- import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index ca5bd4792e992..7bf5df42ea189 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] --- import kbnAnalyticsShippersElasticV3BrowserObj from './kbn_analytics_shippers_elastic_v3_browser.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index 300316270571d..6db3b473e9c26 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] --- import kbnAnalyticsShippersElasticV3CommonObj from './kbn_analytics_shippers_elastic_v3_common.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index 30eb53bbdec67..77696f41ee827 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] --- import kbnAnalyticsShippersElasticV3ServerObj from './kbn_analytics_shippers_elastic_v3_server.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index 3fead19693ba8..79b9cd3749abe 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_gainsight.mdx b/api_docs/kbn_analytics_shippers_gainsight.mdx index 633a5ca087287..07e26d21e325e 100644 --- a/api_docs/kbn_analytics_shippers_gainsight.mdx +++ b/api_docs/kbn_analytics_shippers_gainsight.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-gainsight title: "@kbn/analytics-shippers-gainsight" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-gainsight plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-gainsight'] --- import kbnAnalyticsShippersGainsightObj from './kbn_analytics_shippers_gainsight.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index 3e47b298d7531..c7a8e0ef5be26 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index a5de515f616c0..3a0912c20d542 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 69c1c53902c86..1366a648dd3d5 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: 2022-12-21 +date: 2022-12-22 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 a664f89e2dfef..6ff3179538d6b 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index 7d4ef4843a3a7..ecace909e7067 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index 4c6862fac57f5..e1d0ef521bef2 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: 2022-12-21 +date: 2022-12-22 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 7d52b72fdba3c..dee1fb896401a 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: 2022-12-21 +date: 2022-12-22 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 e145ce254e1e1..3566150bc24da 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: 2022-12-21 +date: 2022-12-22 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 dfe9a6c3208dc..7d2ae7281c73c 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: 2022-12-21 +date: 2022-12-22 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 95a1d969e26c0..bb386b5d9ba94 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index 1d2d5514ce1f7..fbfd51c700a58 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: 2022-12-21 +date: 2022-12-22 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 bcaf23db7de8a..d34657ff4e847 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: 2022-12-21 +date: 2022-12-22 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 d7ec2cde37d34..f0d0ca3469768 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: 2022-12-21 +date: 2022-12-22 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 02542f6bcd77c..c003fcb1ff125 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: 2022-12-21 +date: 2022-12-22 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 d3752e8caa033..de6f0aa74e698 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor'] --- import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list.mdx b/api_docs/kbn_content_management_table_list.mdx index a78c052d5b752..e27b4491105de 100644 --- a/api_docs/kbn_content_management_table_list.mdx +++ b/api_docs/kbn_content_management_table_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list title: "@kbn/content-management-table-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list'] --- import kbnContentManagementTableListObj from './kbn_content_management_table_list.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index 8705ab671764f..c476eb499fbb5 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: 2022-12-21 +date: 2022-12-22 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 cff2fecedd8ab..6e9c174e293df 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: 2022-12-21 +date: 2022-12-22 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 070bea0818b20..318cc55b6ba77 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: 2022-12-21 +date: 2022-12-22 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 f557f225e6c08..6b750d7420e64 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: 2022-12-21 +date: 2022-12-22 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 248eb37d09d9f..3f515738e82f9 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: 2022-12-21 +date: 2022-12-22 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 035c20302e129..4a6410530cca0 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: 2022-12-21 +date: 2022-12-22 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 d4de536c04afe..cbbd15d7fe1a7 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: 2022-12-21 +date: 2022-12-22 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 77d4deda0541c..860c047009d24 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: 2022-12-21 +date: 2022-12-22 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 685113462840a..5d0f37f75aca2 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: 2022-12-21 +date: 2022-12-22 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 cf341b868e4f5..f0832df176f18 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: 2022-12-21 +date: 2022-12-22 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 04c006800d5da..f6435e1e88694 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: 2022-12-21 +date: 2022-12-22 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 ec0fe0fc9b97a..d01a23360c21d 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: 2022-12-21 +date: 2022-12-22 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 ea791dc6eac91..6682854a06bc4 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: 2022-12-21 +date: 2022-12-22 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 ee090b292164d..7787fb0b84592 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: 2022-12-21 +date: 2022-12-22 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 684bfd295192b..3a51e55dec03a 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: 2022-12-21 +date: 2022-12-22 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 5f74ffda3b92c..72aabbf3ddb08 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: 2022-12-21 +date: 2022-12-22 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 dd5676837974f..5aa0443660b12 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: 2022-12-21 +date: 2022-12-22 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 a7043b6f16a3c..aedd598594d4c 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: 2022-12-21 +date: 2022-12-22 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 ae2b5c9565e9d..783bbceb4be50 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: 2022-12-21 +date: 2022-12-22 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 75edba557da3e..9da5230b09ebd 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: 2022-12-21 +date: 2022-12-22 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 6685fb51caab5..4219ec1c7dde6 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: 2022-12-21 +date: 2022-12-22 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 3643a8f6710ef..671ae1bcbc87a 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: 2022-12-21 +date: 2022-12-22 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 f6414e6e4eb95..fe030ed820924 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: 2022-12-21 +date: 2022-12-22 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 a6ca71b146ceb..49110efb29eaf 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index dedd02e42e364..81ce521034835 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: 2022-12-21 +date: 2022-12-22 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 a6da4fa378e57..aee2d1b9b2f30 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: 2022-12-21 +date: 2022-12-22 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 37b5648d48c46..da674897d1f5e 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: 2022-12-21 +date: 2022-12-22 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 292d96f640818..8eb093f503e17 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: 2022-12-21 +date: 2022-12-22 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 ae63c589f94c4..d4046ed2bcb22 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: 2022-12-21 +date: 2022-12-22 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 388683ba05259..1f82d92789981 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: 2022-12-21 +date: 2022-12-22 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 0f4ec3a65f00a..e27611f06eee6 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: 2022-12-21 +date: 2022-12-22 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 41d0568c087fa..3cbd388c04018 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: 2022-12-21 +date: 2022-12-22 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 072cb8be5fa7c..7509c6e8e05b0 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: 2022-12-21 +date: 2022-12-22 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 224a8808f0356..f87f89520f245 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: 2022-12-21 +date: 2022-12-22 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 eb43f28f62e0b..1a6ac1f8d8220 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: 2022-12-21 +date: 2022-12-22 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 9fafa33846c8d..3cde0c0d027b5 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: 2022-12-21 +date: 2022-12-22 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 a08341d7b182e..14e28dd8165d5 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: 2022-12-21 +date: 2022-12-22 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 984409253f982..4f5e7b06e6ca5 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: 2022-12-21 +date: 2022-12-22 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 57dbbc62e0e6e..c566eb8b23f26 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: 2022-12-21 +date: 2022-12-22 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 4dedea05e0e7e..eccdd68298e8f 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: 2022-12-21 +date: 2022-12-22 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 a730f72eacc50..8e692d0c8c4a9 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: 2022-12-21 +date: 2022-12-22 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 576d1b11085f5..adc3032d9f9ff 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: 2022-12-21 +date: 2022-12-22 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 d57459f52203f..2ec5343d29171 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: 2022-12-21 +date: 2022-12-22 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 5725bcfef70db..4fe42fa6e2109 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: 2022-12-21 +date: 2022-12-22 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 51b2f43b48de7..474a0f27289ad 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: 2022-12-21 +date: 2022-12-22 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 24bbc68e84b8e..2817988b6da39 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: 2022-12-21 +date: 2022-12-22 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 00d26ef7f6dc6..2f057bd2f5127 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: 2022-12-21 +date: 2022-12-22 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 6032134339097..da8172ce7b051 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: 2022-12-21 +date: 2022-12-22 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 9fe25e4611a0a..c0f57fcfc1d9d 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: 2022-12-21 +date: 2022-12-22 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 542e52de3e385..05f1c54a967c3 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: 2022-12-21 +date: 2022-12-22 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 69f17735d0b43..a9bd21f0d3c9d 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: 2022-12-21 +date: 2022-12-22 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 eb3da11c1850b..f82a597cd328f 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: 2022-12-21 +date: 2022-12-22 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 c766da0edf3c2..33a9b81017344 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: 2022-12-21 +date: 2022-12-22 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 05a825a6cd126..3d79c84daa6bd 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: 2022-12-21 +date: 2022-12-22 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 c6b9bcbf5461f..6c03a1c95c7ab 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: 2022-12-21 +date: 2022-12-22 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 7cf276fdf2277..b887fb3e728be 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: 2022-12-21 +date: 2022-12-22 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 30318b1a64d66..3e6bd403fb2f5 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: 2022-12-21 +date: 2022-12-22 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 b0f43750218fe..56eefc61eb411 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: 2022-12-21 +date: 2022-12-22 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 f9a62f4e398b6..9a7a279dd8f39 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: 2022-12-21 +date: 2022-12-22 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 627a4941bf5eb..cd8503cb4304f 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: 2022-12-21 +date: 2022-12-22 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 830e5b6620840..6f4c1ace3ea0c 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: 2022-12-21 +date: 2022-12-22 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 15baae1c18ec5..f979155866d4c 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: 2022-12-21 +date: 2022-12-22 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 3f3b1f1cd5f6d..fd69dd350f450 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: 2022-12-21 +date: 2022-12-22 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.devdocs.json b/api_docs/kbn_core_http_server_internal.devdocs.json index a7be449344f0c..f6391297f4d6b 100644 --- a/api_docs/kbn_core_http_server_internal.devdocs.json +++ b/api_docs/kbn_core_http_server_internal.devdocs.json @@ -843,7 +843,7 @@ "label": "HttpConfigType", "description": [], "signature": [ - "{ readonly basePath?: string | undefined; readonly uuid?: string | undefined; readonly publicBaseUrl?: string | undefined; readonly name: string; readonly host: string; readonly compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; readonly ssl: Readonly<{ key?: string | undefined; certificate?: string | undefined; certificateAuthorities?: string | string[] | undefined; keyPassphrase?: string | undefined; redirectHttpFromPort?: number | undefined; } & { enabled: boolean; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"optional\" | \"none\" | \"required\"; }>; readonly port: number; readonly cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; readonly autoListen: boolean; readonly shutdownTimeout: moment.Duration; readonly securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; disableEmbedding: boolean; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; }>; readonly customResponseHeaders: Record; readonly maxPayload: ", + "{ readonly basePath?: string | undefined; readonly uuid?: string | undefined; readonly publicBaseUrl?: string | undefined; readonly name: string; readonly host: string; readonly compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; readonly ssl: Readonly<{ key?: string | undefined; certificate?: string | undefined; certificateAuthorities?: string | string[] | undefined; keyPassphrase?: string | undefined; redirectHttpFromPort?: number | undefined; } & { enabled: boolean; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"optional\" | \"none\" | \"required\"; }>; readonly port: number; readonly cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; readonly autoListen: boolean; readonly shutdownTimeout: moment.Duration; readonly securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; disableEmbedding: boolean; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; readonly customResponseHeaders: Record; readonly maxPayload: ", { "pluginId": "@kbn/config-schema", "scope": "server", diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 43a1c3ecf88ab..813cfb00cfd0b 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: 2022-12-21 +date: 2022-12-22 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 6e7a52ab5967b..13955b60016f9 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: 2022-12-21 +date: 2022-12-22 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 a21387ed8bdfe..19a2fc06ddbe8 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: 2022-12-21 +date: 2022-12-22 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 fa18e51bb65ac..f4d578eb69cae 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: 2022-12-21 +date: 2022-12-22 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 550a88a8b06b6..54dec28264ed5 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: 2022-12-21 +date: 2022-12-22 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 5cdaae87f312f..8a8193ad4e0ef 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: 2022-12-21 +date: 2022-12-22 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 af77cd7329133..a91804d4df278 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: 2022-12-21 +date: 2022-12-22 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.devdocs.json b/api_docs/kbn_core_injected_metadata_browser.devdocs.json deleted file mode 100644 index 1d4823c2427e7..0000000000000 --- a/api_docs/kbn_core_injected_metadata_browser.devdocs.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "id": "@kbn/core-injected-metadata-browser", - "client": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "server": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { - "classes": [], - "functions": [], - "interfaces": [ - { - "parentPluginId": "@kbn/core-injected-metadata-browser", - "id": "def-common.InjectedMetadataSetup", - "type": "Interface", - "tags": [ - "deprecated" - ], - "label": "InjectedMetadataSetup", - "description": [ - "\nexposed temporarily until https://github.com/elastic/kibana/issues/41990 done\nuse *only* to retrieve config values. There is no way to set injected values\nin the new platform." - ], - "path": "packages/core/injected-metadata/core-injected-metadata-browser/src/contract.ts", - "deprecated": true, - "removeBy": "8.8.0", - "trackAdoption": false, - "references": [ - { - "plugin": "@kbn/core-lifecycle-browser", - "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts" - }, - { - "plugin": "@kbn/core-lifecycle-browser", - "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts" - } - ], - "children": [ - { - "parentPluginId": "@kbn/core-injected-metadata-browser", - "id": "def-common.InjectedMetadataSetup.getInjectedVar", - "type": "Function", - "tags": [], - "label": "getInjectedVar", - "description": [], - "signature": [ - "(name: string, defaultValue?: any) => unknown" - ], - "path": "packages/core/injected-metadata/core-injected-metadata-browser/src/contract.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/core-injected-metadata-browser", - "id": "def-common.InjectedMetadataSetup.getInjectedVar.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [], - "signature": [ - "string" - ], - "path": "packages/core/injected-metadata/core-injected-metadata-browser/src/contract.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/core-injected-metadata-browser", - "id": "def-common.InjectedMetadataSetup.getInjectedVar.$2", - "type": "Any", - "tags": [], - "label": "defaultValue", - "description": [], - "signature": [ - "any" - ], - "path": "packages/core/injected-metadata/core-injected-metadata-browser/src/contract.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/core-injected-metadata-browser", - "id": "def-common.InjectedMetadataStart", - "type": "Interface", - "tags": [ - "deprecated" - ], - "label": "InjectedMetadataStart", - "description": [ - "\nexposed temporarily until https://github.com/elastic/kibana/issues/41990 done\nuse *only* to retrieve config values. There is no way to set injected values\nin the new platform." - ], - "path": "packages/core/injected-metadata/core-injected-metadata-browser/src/contract.ts", - "deprecated": true, - "removeBy": "8.8.0", - "trackAdoption": false, - "references": [ - { - "plugin": "@kbn/core-lifecycle-browser", - "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts" - }, - { - "plugin": "@kbn/core-lifecycle-browser", - "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts" - } - ], - "children": [ - { - "parentPluginId": "@kbn/core-injected-metadata-browser", - "id": "def-common.InjectedMetadataStart.getInjectedVar", - "type": "Function", - "tags": [], - "label": "getInjectedVar", - "description": [], - "signature": [ - "(name: string, defaultValue?: any) => unknown" - ], - "path": "packages/core/injected-metadata/core-injected-metadata-browser/src/contract.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/core-injected-metadata-browser", - "id": "def-common.InjectedMetadataStart.getInjectedVar.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [], - "signature": [ - "string" - ], - "path": "packages/core/injected-metadata/core-injected-metadata-browser/src/contract.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/core-injected-metadata-browser", - "id": "def-common.InjectedMetadataStart.getInjectedVar.$2", - "type": "Any", - "tags": [], - "label": "defaultValue", - "description": [], - "signature": [ - "any" - ], - "path": "packages/core/injected-metadata/core-injected-metadata-browser/src/contract.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - } - ], - "initialIsOpen": false - } - ], - "enums": [], - "misc": [], - "objects": [] - } -} \ No newline at end of file diff --git a/api_docs/kbn_core_injected_metadata_browser.mdx b/api_docs/kbn_core_injected_metadata_browser.mdx deleted file mode 100644 index eeb08f6c06502..0000000000000 --- a/api_docs/kbn_core_injected_metadata_browser.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -#### -#### 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: kibKbnCoreInjectedMetadataBrowserPluginApi -slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser -title: "@kbn/core-injected-metadata-browser" -image: https://source.unsplash.com/400x175/?github -description: API docs for the @kbn/core-injected-metadata-browser plugin -date: 2022-12-21 -tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser'] ---- -import kbnCoreInjectedMetadataBrowserObj from './kbn_core_injected_metadata_browser.devdocs.json'; - - - -Contact Kibana Core for questions regarding this plugin. - -**Code health stats** - -| Public API count | Any count | Items lacking comments | Missing exports | -|-------------------|-----------|------------------------|-----------------| -| 8 | 2 | 6 | 0 | - -## Common - -### Interfaces - - diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 3e4b86865dbe9..85be065a46c91 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: 2022-12-21 +date: 2022-12-22 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 12bdfe29ebdf7..f53afbc7d6bf1 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: 2022-12-21 +date: 2022-12-22 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 37e6d1fada153..d5ea992211783 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: 2022-12-21 +date: 2022-12-22 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.devdocs.json b/api_docs/kbn_core_lifecycle_browser.devdocs.json index 0d4ec8b19a102..a1fa9416bf1a4 100644 --- a/api_docs/kbn_core_lifecycle_browser.devdocs.json +++ b/api_docs/kbn_core_lifecycle_browser.devdocs.json @@ -273,28 +273,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "@kbn/core-lifecycle-browser", - "id": "def-common.CoreSetup.injectedMetadata", - "type": "Object", - "tags": [], - "label": "injectedMetadata", - "description": [ - "{@link InjectedMetadataSetup}" - ], - "signature": [ - { - "pluginId": "@kbn/core-injected-metadata-browser", - "scope": "common", - "docId": "kibKbnCoreInjectedMetadataBrowserPluginApi", - "section": "def-common.InjectedMetadataSetup", - "text": "InjectedMetadataSetup" - } - ], - "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "@kbn/core-lifecycle-browser", "id": "def-common.CoreSetup.theme", @@ -702,28 +680,6 @@ "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts", "deprecated": false, "trackAdoption": false - }, - { - "parentPluginId": "@kbn/core-lifecycle-browser", - "id": "def-common.CoreStart.injectedMetadata", - "type": "Object", - "tags": [], - "label": "injectedMetadata", - "description": [ - "{@link InjectedMetadataStart}" - ], - "signature": [ - { - "pluginId": "@kbn/core-injected-metadata-browser", - "scope": "common", - "docId": "kibKbnCoreInjectedMetadataBrowserPluginApi", - "section": "def-common.InjectedMetadataStart", - "text": "InjectedMetadataStart" - } - ], - "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts", - "deprecated": false, - "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 63647d341b126..c06df7bc13e51 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; @@ -21,7 +21,7 @@ Contact Kibana Core for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 30 | 0 | 0 | 0 | +| 28 | 0 | 0 | 0 | ## Common diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json b/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json index aff8d6a9b0b4f..879e0fa866892 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json +++ b/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json @@ -212,7 +212,7 @@ "section": "def-common.ThemeServiceStart", "text": "ThemeServiceStart" }, - ">; injectedMetadata: { getInjectedVar: jest.MockInstance & ((name: string, defaultValue?: any) => unknown); }; fatalErrors: jest.Mocked<", + ">; fatalErrors: jest.Mocked<", { "pluginId": "@kbn/core-fatal-errors-browser", "scope": "common", @@ -268,7 +268,7 @@ "section": "def-common.IUiSettingsClient", "text": "IUiSettingsClient" }, - ">; }; deprecations: undefined; injectedMetadata: { getInjectedVar: jest.MockInstance & ((name: string, defaultValue?: any) => unknown); }; theme: jest.Mocked<", + ">; }; deprecations: undefined; theme: jest.Mocked<", { "pluginId": "@kbn/core-theme-browser", "scope": "common", @@ -445,7 +445,7 @@ "section": "def-common.ThemeServiceStart", "text": "ThemeServiceStart" }, - ">; injectedMetadata: { getInjectedVar: jest.MockInstance & ((name: string, defaultValue?: any) => unknown); }; fatalErrors: jest.Mocked<", + ">; fatalErrors: jest.Mocked<", { "pluginId": "@kbn/core-fatal-errors-browser", "scope": "common", diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index 00a33a0b646e5..7db0a96f536ff 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: 2022-12-21 +date: 2022-12-22 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 eea0d9a0e97a6..76b451928ef48 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: 2022-12-21 +date: 2022-12-22 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 56fb01663243b..78366ca2d99f6 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: 2022-12-21 +date: 2022-12-22 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 2b3f336c2435f..02df58cac2754 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: 2022-12-21 +date: 2022-12-22 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 8c59c4657f6dc..abedfaa9e70ea 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: 2022-12-21 +date: 2022-12-22 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 78f614250a2eb..2dbb477868a51 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: 2022-12-21 +date: 2022-12-22 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 b7ca874290779..36bf91a0e64e1 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: 2022-12-21 +date: 2022-12-22 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 185b75ac09bfd..8ed2eaf0e4592 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: 2022-12-21 +date: 2022-12-22 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 696101c97f1f5..2d71c6679e2ba 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: 2022-12-21 +date: 2022-12-22 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 0f680e2e89b2f..1afd1dde2341a 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: 2022-12-21 +date: 2022-12-22 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 13aa5df95d4bd..72ef9caca8536 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: 2022-12-21 +date: 2022-12-22 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 98d69b41bf7bf..9c5397d803d4f 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: 2022-12-21 +date: 2022-12-22 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 eb43dc46ded46..bbcb06a3d4b51 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: 2022-12-21 +date: 2022-12-22 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 f46214c1271a4..252f62f650ba3 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: 2022-12-21 +date: 2022-12-22 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 db61fe09dd540..02d6f5f73cc77 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: 2022-12-21 +date: 2022-12-22 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 cf47523ab2301..f19ee431213d2 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: 2022-12-21 +date: 2022-12-22 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 ac7432796f951..64a1857a165ba 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: 2022-12-21 +date: 2022-12-22 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 695bfcb597076..4ccaf6a40ead4 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: 2022-12-21 +date: 2022-12-22 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 4d84b7b0305e6..7218ae08ee141 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: 2022-12-21 +date: 2022-12-22 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 1985feefd701a..7b2d02b1f362b 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: 2022-12-21 +date: 2022-12-22 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 1ca200979c3f9..b8e245e6bdd19 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: 2022-12-21 +date: 2022-12-22 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 2798e84e7ddbf..391f26e5b63dd 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: 2022-12-21 +date: 2022-12-22 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 676449bd3542c..400b38cd8db8b 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: 2022-12-21 +date: 2022-12-22 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 1abf750fe3511..6270916ece27b 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: 2022-12-21 +date: 2022-12-22 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 82e4d6a754b9f..a2d76552566cb 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index 9eed691216644..1275dc3fcd1c6 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: 2022-12-21 +date: 2022-12-22 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 4063affc8b313..0b6f3c989de15 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: 2022-12-21 +date: 2022-12-22 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 b39a76d6d4bc7..a4fe08daadb2b 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: 2022-12-21 +date: 2022-12-22 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 0d1d853017ecf..00398c5882b10 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: 2022-12-21 +date: 2022-12-22 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 8ce0d7d229ec1..024928b9cc8ea 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: 2022-12-21 +date: 2022-12-22 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 0054075a6f50e..c36294f76f96a 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: 2022-12-21 +date: 2022-12-22 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 a7021d19e6a84..02f852a1c94a3 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: 2022-12-21 +date: 2022-12-22 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 1a8632b45a576..dd8e72aac252d 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: 2022-12-21 +date: 2022-12-22 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 58bde44bd6e22..00c5305c7886f 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: 2022-12-21 +date: 2022-12-22 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 dbec0a93ff3fa..6c2f0e1ee3a67 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_internal.mdx b/api_docs/kbn_core_saved_objects_api_server_internal.mdx index 02f5a37dbb6d0..564744443b2bd 100644 --- a/api_docs/kbn_core_saved_objects_api_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-internal title: "@kbn/core-saved-objects-api-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-internal plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-internal'] --- import kbnCoreSavedObjectsApiServerInternalObj from './kbn_core_saved_objects_api_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index 6f4961a054fff..a7c93cfe47496 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: 2022-12-21 +date: 2022-12-22 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 e2cc78aaf723b..d4651452591ef 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: 2022-12-21 +date: 2022-12-22 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 4c1510fe476f4..4b2063e58cb5d 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: 2022-12-21 +date: 2022-12-22 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 66c66bc167251..0cf028cc6ac43 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: 2022-12-21 +date: 2022-12-22 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 e2b7476f3d05d..e29e0b7fdf33a 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: 2022-12-21 +date: 2022-12-22 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 a9629a592dab9..7bf9ee593c7ac 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: 2022-12-21 +date: 2022-12-22 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 d2f5b6f11993c..3108e79008399 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: 2022-12-21 +date: 2022-12-22 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 10798d2dff270..12b5dd8fc5914 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: 2022-12-21 +date: 2022-12-22 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 ce684fa3f8a5e..ef20f7e655932 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: 2022-12-21 +date: 2022-12-22 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.devdocs.json b/api_docs/kbn_core_saved_objects_migration_server_internal.devdocs.json index 8db7b0244e6a6..55eb0208056bf 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.devdocs.json +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.devdocs.json @@ -61,7 +61,7 @@ "id": "def-server.DocumentMigrator.Unnamed.$1", "type": "Object", "tags": [], - "label": "{\n typeRegistry,\n kibanaVersion,\n minimumConvertVersion = DEFAULT_MINIMUM_CONVERT_VERSION,\n log,\n }", + "label": "{ typeRegistry, kibanaVersion, convertVersion, log }", "description": [], "signature": [ "DocumentMigratorOptions" 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 833d21b161052..a8413f95fd449 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: 2022-12-21 +date: 2022-12-22 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 9488b8db600af..71ee4513971b5 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: 2022-12-21 +date: 2022-12-22 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.devdocs.json b/api_docs/kbn_core_saved_objects_server.devdocs.json index 78be56369b3f8..264dffef4be52 100644 --- a/api_docs/kbn_core_saved_objects_server.devdocs.json +++ b/api_docs/kbn_core_saved_objects_server.devdocs.json @@ -2402,7 +2402,9 @@ "parentPluginId": "@kbn/core-saved-objects-server", "id": "def-server.SavedObjectMigrationContext.convertToMultiNamespaceTypeVersion", "type": "string", - "tags": [], + "tags": [ + "deprecated" + ], "label": "convertToMultiNamespaceTypeVersion", "description": [ "\nThe version in which this object type is being converted to a multi-namespace type" @@ -2411,8 +2413,18 @@ "string | undefined" ], "path": "packages/core/saved-objects/core-saved-objects-server/src/migration.ts", - "deprecated": false, - "trackAdoption": false + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "encryptedSavedObjects", + "path": "x-pack/plugins/encrypted_saved_objects/server/create_migration.ts" + }, + { + "plugin": "encryptedSavedObjects", + "path": "x-pack/plugins/encrypted_saved_objects/server/create_migration.ts" + } + ] }, { "parentPluginId": "@kbn/core-saved-objects-server", @@ -5040,7 +5052,9 @@ "parentPluginId": "@kbn/core-saved-objects-server", "id": "def-server.SavedObjectsType.convertToMultiNamespaceTypeVersion", "type": "string", - "tags": [], + "tags": [ + "deprecated" + ], "label": "convertToMultiNamespaceTypeVersion", "description": [ "\nIf defined, objects of this type will be converted to a 'multiple' or 'multiple-isolated' namespace type when migrating to this\nversion.\n\nRequirements:\n\n 1. This string value must be a valid semver version\n 2. This type must have previously specified {@link SavedObjectsNamespaceType | `namespaceType: 'single'`}\n 3. This type must also specify {@link SavedObjectsNamespaceType | `namespaceType: 'multiple'`} *or*\n {@link SavedObjectsNamespaceType | `namespaceType: 'multiple-isolated'`}\n\nExample of a single-namespace type in 7.12:\n\n```ts\n{\n name: 'foo',\n hidden: false,\n namespaceType: 'single',\n mappings: {...}\n}\n```\n\nExample after converting to a multi-namespace (isolated) type in 8.0:\n\n```ts\n{\n name: 'foo',\n hidden: false,\n namespaceType: 'multiple-isolated',\n mappings: {...},\n convertToMultiNamespaceTypeVersion: '8.0.0'\n}\n```\n\nExample after converting to a multi-namespace (shareable) type in 8.1:\n\n```ts\n{\n name: 'foo',\n hidden: false,\n namespaceType: 'multiple',\n mappings: {...},\n convertToMultiNamespaceTypeVersion: '8.0.0'\n}\n```\n\nNote: migration function(s) can be optionally specified for any of these versions and will not interfere with the conversion process." @@ -5049,8 +5063,214 @@ "string | undefined" ], "path": "packages/core/saved-objects/core-saved-objects-server/src/saved_objects_type.ts", - "deprecated": false, - "trackAdoption": false + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.ts" + }, + { + "plugin": "actions", + "path": "x-pack/plugins/actions/server/saved_objects/index.ts" + }, + { + "plugin": "actions", + "path": "x-pack/plugins/actions/server/saved_objects/index.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/server/saved_objects/data_views.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/server/saved_objects/query.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/saved_objects/index.ts" + }, + { + "plugin": "savedObjectsTagging", + "path": "x-pack/plugins/saved_objects_tagging/server/saved_objects/tag.ts" + }, + { + "plugin": "canvas", + "path": "x-pack/plugins/canvas/server/saved_objects/workpad.ts" + }, + { + "plugin": "canvas", + "path": "x-pack/plugins/canvas/server/saved_objects/custom_element.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/server/saved_objects.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/saved_object_types/cases.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/saved_object_types/configure.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/saved_object_types/comments.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/saved_object_types/user_actions.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/saved_object_types/connector_mappings.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/server/saved_objects/graph_workspace.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/server/saved_objects/exception_list.ts" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/server/saved_objects/setup_saved_objects.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/timelines.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/notes.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/pinned_events.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/execution_saved_object/saved_objects_type.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_saved_object_mappings.ts" + }, + { + "plugin": "dashboard", + "path": "src/plugins/dashboard/server/dashboard_saved_object/dashboard_saved_object.ts" + }, + { + "plugin": "savedSearch", + "path": "src/plugins/saved_search/server/saved_objects/search.ts" + }, + { + "plugin": "visualizations", + "path": "src/plugins/visualizations/server/saved_objects/visualization.ts" + }, + { + "plugin": "@kbn/core-test-helpers-so-type-serializer", + "path": "packages/core/test-helpers/core-test-helpers-so-type-serializer/src/extract_migration_info.ts" + }, + { + "plugin": "@kbn/core-test-helpers-so-type-serializer", + "path": "packages/core/test-helpers/core-test-helpers-so-type-serializer/src/extract_migration_info.test.ts" + }, + { + "plugin": "@kbn/core-test-helpers-so-type-serializer", + "path": "packages/core/test-helpers/core-test-helpers-so-type-serializer/src/get_migration_hash.test.ts" + }, + { + "plugin": "@kbn/core-test-helpers-so-type-serializer", + "path": "packages/core/test-helpers/core-test-helpers-so-type-serializer/src/get_migration_hash.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + }, + { + "plugin": "@kbn/core-saved-objects-migration-server-internal", + "path": "packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/document_migrator.test.ts" + } + ] }, { "parentPluginId": "@kbn/core-saved-objects-server", diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index 4ff433bbb0378..ee4c686db0de8 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: 2022-12-21 +date: 2022-12-22 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 ea16fd2014f69..2e27c459a75af 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: 2022-12-21 +date: 2022-12-22 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 f0bb5e8f988c0..0189d3b57a303 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: 2022-12-21 +date: 2022-12-22 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 ca8a1eba0bf10..7ec35322d6d6a 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index 0b765492d16d5..6eeb15201f7f1 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: 2022-12-21 +date: 2022-12-22 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 e299441613f35..4d4ce59f1a212 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: 2022-12-21 +date: 2022-12-22 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 6097c1fd55825..1b81981fda57a 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: 2022-12-21 +date: 2022-12-22 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 950b9ab388f18..34fcb867d4a95 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: 2022-12-21 +date: 2022-12-22 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 fe808f3ab9f76..3dd16895ad0f1 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: 2022-12-21 +date: 2022-12-22 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 a6492b49d3326..2d241abd4cecf 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: 2022-12-21 +date: 2022-12-22 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 62bc9bdcddb9d..5a8b54b59d320 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: 2022-12-21 +date: 2022-12-22 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 065b1b4dd6be8..4dc24ca601071 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index 7b79bc4464180..cd07f05b23fae 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: 2022-12-21 +date: 2022-12-22 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 e17975d50f2d2..19e2a44f4a963 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: 2022-12-21 +date: 2022-12-22 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 4b4c972b12464..6680fc9292279 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_internal.mdx b/api_docs/kbn_core_theme_browser_internal.mdx index b643e73f86f44..ac550086bab53 100644 --- a/api_docs/kbn_core_theme_browser_internal.mdx +++ b/api_docs/kbn_core_theme_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-internal title: "@kbn/core-theme-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-internal plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-internal'] --- import kbnCoreThemeBrowserInternalObj from './kbn_core_theme_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index 2187eaeee14ea..9c14d96676f81 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: 2022-12-21 +date: 2022-12-22 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 86d00b5cd059a..9e6597774d604 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: 2022-12-21 +date: 2022-12-22 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 5804b7fa2e406..0cd7124620e36 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: 2022-12-21 +date: 2022-12-22 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 0e104e2e1b2e2..88f2ad94f1acd 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: 2022-12-21 +date: 2022-12-22 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 9075f07590499..a23e7b644123c 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: 2022-12-21 +date: 2022-12-22 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 19314e2761c0c..cfa8430bf3f8b 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: 2022-12-21 +date: 2022-12-22 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 2deffa4b4f2e8..35c706d3f9035 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: 2022-12-21 +date: 2022-12-22 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 6999422330a36..f266e7318cc7c 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: 2022-12-21 +date: 2022-12-22 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.devdocs.json b/api_docs/kbn_core_usage_data_server.devdocs.json index 99ec8f759c0dd..b4b344cbeeab7 100644 --- a/api_docs/kbn_core_usage_data_server.devdocs.json +++ b/api_docs/kbn_core_usage_data_server.devdocs.json @@ -47,7 +47,7 @@ "label": "http", "description": [], "signature": [ - "{ basePathConfigured: boolean; maxPayloadInBytes: number; rewriteBasePath: boolean; keepaliveTimeout: number; socketTimeout: number; compression: { enabled: boolean; referrerWhitelistConfigured: boolean; }; xsrf: { disableProtection: boolean; allowlistConfigured: boolean; }; requestId: { allowFromAnyIp: boolean; ipAllowlistConfigured: boolean; }; ssl: { certificateAuthoritiesConfigured: boolean; certificateConfigured: boolean; cipherSuites: string[]; keyConfigured: boolean; keystoreConfigured: boolean; truststoreConfigured: boolean; redirectHttpFromPortConfigured: boolean; supportedProtocols: string[]; clientAuthentication: \"optional\" | \"none\" | \"required\"; }; securityResponseHeaders: { strictTransportSecurity: string; xContentTypeOptions: string; referrerPolicy: string; permissionsPolicyConfigured: boolean; disableEmbedding: boolean; }; }" + "{ basePathConfigured: boolean; maxPayloadInBytes: number; rewriteBasePath: boolean; keepaliveTimeout: number; socketTimeout: number; compression: { enabled: boolean; referrerWhitelistConfigured: boolean; }; xsrf: { disableProtection: boolean; allowlistConfigured: boolean; }; requestId: { allowFromAnyIp: boolean; ipAllowlistConfigured: boolean; }; ssl: { certificateAuthoritiesConfigured: boolean; certificateConfigured: boolean; cipherSuites: string[]; keyConfigured: boolean; keystoreConfigured: boolean; truststoreConfigured: boolean; redirectHttpFromPortConfigured: boolean; supportedProtocols: string[]; clientAuthentication: \"optional\" | \"none\" | \"required\"; }; securityResponseHeaders: { strictTransportSecurity: string; xContentTypeOptions: string; referrerPolicy: string; permissionsPolicyConfigured: boolean; disableEmbedding: boolean; crossOriginOpenerPolicy: string; }; }" ], "path": "packages/core/usage-data/core-usage-data-server/src/core_usage_data.ts", "deprecated": false, diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index aaeea4a72c1bd..6ebe9af4e0c1e 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: 2022-12-21 +date: 2022-12-22 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 030682950cdf3..a30aee9f44f7a 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: 2022-12-21 +date: 2022-12-22 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 78843206e7629..7657f1d2f02d6 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index c54117f72a906..e2586dd6a2bd7 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: 2022-12-21 +date: 2022-12-22 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 7e562fb584038..863993de0bf69 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index 4fd7d0c7c7f20..6bb9c1a703679 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index e81f619bf92bf..b049cc816067a 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: 2022-12-21 +date: 2022-12-22 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 0f46bc4f34e00..00c7f8c203429 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: 2022-12-21 +date: 2022-12-22 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 6bff1a184e786..2792c3c86a7d1 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: 2022-12-21 +date: 2022-12-22 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 a1ff5f29a4f46..80eb3f5a78619 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index 85c6ccace9acd..8bf1aa12e642e 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: 2022-12-21 +date: 2022-12-22 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 894d4b153e1fd..c5712fed0fb76 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index 3813345c5f6be..e1d14f01b0ee1 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_ecs.mdx b/api_docs/kbn_ecs.mdx index 98cd4bfb693f7..cff20831c5fcb 100644 --- a/api_docs/kbn_ecs.mdx +++ b/api_docs/kbn_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs title: "@kbn/ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs'] --- import kbnEcsObj from './kbn_ecs.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 2df49d76dad36..37976cd78fc06 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: 2022-12-21 +date: 2022-12-22 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 094e8e3b378cc..3295149f8e32f 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: 2022-12-21 +date: 2022-12-22 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 352e972a0c97f..cee7ea30f57fb 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: 2022-12-21 +date: 2022-12-22 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 17bce99fa6092..ecb3d2e0ba1ae 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: 2022-12-21 +date: 2022-12-22 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 8b2e3a3309a64..3ee60a8a1bce9 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: 2022-12-21 +date: 2022-12-22 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 b4aa874c00c7c..825b8d3da292a 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 60023c073bbfe..f42f84269c5cc 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index 3038ba042b12e..4e544d75032d9 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index 082afb61fac40..d74c611fa39db 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index 7bde74cf43e2f..a07112e8ab07a 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_get_repo_files.mdx b/api_docs/kbn_get_repo_files.mdx index bc083041f6396..dd0d53582e493 100644 --- a/api_docs/kbn_get_repo_files.mdx +++ b/api_docs/kbn_get_repo_files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-get-repo-files title: "@kbn/get-repo-files" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/get-repo-files plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/get-repo-files'] --- import kbnGetRepoFilesObj from './kbn_get_repo_files.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index 811aa96bff9e1..0e92cf6fe6067 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: 2022-12-21 +date: 2022-12-22 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 e459f650f9412..8f30ad17ae33d 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: 2022-12-21 +date: 2022-12-22 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 738de9fffee80..2f4901ac9ea2b 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: 2022-12-21 +date: 2022-12-22 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 332a65a1517ae..3df31d75e97b3 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: 2022-12-21 +date: 2022-12-22 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 22ade2d4b2d74..ca5d003b8c2b5 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: 2022-12-21 +date: 2022-12-22 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 e9092396d155c..0b4e092768488 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: 2022-12-21 +date: 2022-12-22 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 bd9e7151cda54..93a773f0208a4 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: 2022-12-21 +date: 2022-12-22 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 bc1d7af4be289..3559c7be62de6 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: 2022-12-21 +date: 2022-12-22 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 62f6d3244039d..1c5a2801776ad 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index a1fd942db5c73..98dab8889770e 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: 2022-12-21 +date: 2022-12-22 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 d07869d4101f0..c13f9d693efc0 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 69aee09a02a94..88cacab04dde3 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: 2022-12-21 +date: 2022-12-22 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 b350f1a461ea2..dee32275dfb68 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index c52b51503b3f6..8fe50d5856f80 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: 2022-12-21 +date: 2022-12-22 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 f0850dde4cf3a..e87e804d76545 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index 153d40acf48f7..686e4a16791f5 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: 2022-12-21 +date: 2022-12-22 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 8b108d46e0e2c..3708438ce421b 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index d031e7546c9f7..845c4c33af9fd 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index f0e32d7cd65b3..bd54da79b70f6 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 86f9bb5a4fa28..224eb01b8d25b 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index f7e211f2f7c36..ba85f7cbf42d5 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: 2022-12-21 +date: 2022-12-22 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_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index 74bb96b3f1e19..c43ed6bbf175b 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index e9c114f225036..40bd581f5a105 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index f2898aedb3173..6f5baa36f4275 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: 2022-12-21 +date: 2022-12-22 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 90cf6e09f417f..5ce0e269bbf2e 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: 2022-12-21 +date: 2022-12-22 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 f5fb972937b24..a084979befa23 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: 2022-12-21 +date: 2022-12-22 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_peggy.mdx b/api_docs/kbn_peggy.mdx index 0e3c334e14aa1..244a1ec4cbec6 100644 --- a/api_docs/kbn_peggy.mdx +++ b/api_docs/kbn_peggy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-peggy title: "@kbn/peggy" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/peggy plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/peggy'] --- import kbnPeggyObj from './kbn_peggy.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index 1f3d2ecd824d7..209a79196615b 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index cbbe52b5e4d6b..04286ecf14dd3 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: 2022-12-21 +date: 2022-12-22 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 e0088eb001a91..6da4130043694 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index 81fa8df1d81a6..0d37d5471a924 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index 0915269cc180f..f4712220caa65 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index 89e8af151a2a1..1ec0b288ba2bf 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index cac9d80db4132..6f377ce2c67ef 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index f4d4070eb28c7..c81f592fb34b4 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index 9bd614a5c3292..cacd15972c874 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: 2022-12-21 +date: 2022-12-22 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.devdocs.json b/api_docs/kbn_securitysolution_exception_list_components.devdocs.json index 5b3d03d83b8b7..83973455bda55 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.devdocs.json +++ b/api_docs/kbn_securitysolution_exception_list_components.devdocs.json @@ -834,7 +834,7 @@ "label": "formattedDateComponent", "description": [], "signature": [ - "\"symbol\" | \"object\" | React.ComponentType | \"body\" | \"path\" | \"circle\" | \"filter\" | \"data\" | \"line\" | \"area\" | \"time\" | \"label\" | \"legend\" | \"article\" | \"image\" | \"link\" | \"menu\" | \"stop\" | \"base\" | \"text\" | \"title\" | \"s\" | \"small\" | \"source\" | \"output\" | \"svg\" | \"meta\" | \"script\" | \"summary\" | \"desc\" | \"q\" | \"pattern\" | \"mask\" | \"input\" | \"slot\" | \"style\" | \"head\" | \"section\" | \"big\" | \"sub\" | \"sup\" | \"animate\" | \"progress\" | \"view\" | \"var\" | \"map\" | \"html\" | \"a\" | \"img\" | \"audio\" | \"br\" | \"form\" | \"main\" | \"abbr\" | \"address\" | \"aside\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"button\" | \"canvas\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"p\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"select\" | \"span\" | \"strong\" | \"table\" | \"template\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"video\" | \"wbr\" | \"webview\" | \"animateMotion\" | \"animateTransform\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" + "\"symbol\" | \"object\" | React.ComponentType | \"body\" | \"path\" | \"circle\" | \"filter\" | \"data\" | \"line\" | \"area\" | \"time\" | \"label\" | \"legend\" | \"article\" | \"image\" | \"link\" | \"menu\" | \"stop\" | \"base\" | \"text\" | \"title\" | \"s\" | \"small\" | \"source\" | \"output\" | \"svg\" | \"meta\" | \"script\" | \"summary\" | \"desc\" | \"q\" | \"pattern\" | \"mask\" | \"input\" | \"slot\" | \"style\" | \"head\" | \"section\" | \"animate\" | \"progress\" | \"view\" | \"big\" | \"sub\" | \"sup\" | \"var\" | \"map\" | \"html\" | \"a\" | \"img\" | \"audio\" | \"br\" | \"form\" | \"main\" | \"abbr\" | \"address\" | \"aside\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"button\" | \"canvas\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"p\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"select\" | \"span\" | \"strong\" | \"table\" | \"template\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"video\" | \"wbr\" | \"webview\" | \"animateMotion\" | \"animateTransform\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" ], "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/index.tsx", "deprecated": false, @@ -848,7 +848,7 @@ "label": "securityLinkAnchorComponent", "description": [], "signature": [ - "\"symbol\" | \"object\" | React.ComponentType | \"body\" | \"path\" | \"circle\" | \"filter\" | \"data\" | \"line\" | \"area\" | \"time\" | \"label\" | \"legend\" | \"article\" | \"image\" | \"link\" | \"menu\" | \"stop\" | \"base\" | \"text\" | \"title\" | \"s\" | \"small\" | \"source\" | \"output\" | \"svg\" | \"meta\" | \"script\" | \"summary\" | \"desc\" | \"q\" | \"pattern\" | \"mask\" | \"input\" | \"slot\" | \"style\" | \"head\" | \"section\" | \"big\" | \"sub\" | \"sup\" | \"animate\" | \"progress\" | \"view\" | \"var\" | \"map\" | \"html\" | \"a\" | \"img\" | \"audio\" | \"br\" | \"form\" | \"main\" | \"abbr\" | \"address\" | \"aside\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"button\" | \"canvas\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"p\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"select\" | \"span\" | \"strong\" | \"table\" | \"template\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"video\" | \"wbr\" | \"webview\" | \"animateMotion\" | \"animateTransform\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" + "\"symbol\" | \"object\" | React.ComponentType | \"body\" | \"path\" | \"circle\" | \"filter\" | \"data\" | \"line\" | \"area\" | \"time\" | \"label\" | \"legend\" | \"article\" | \"image\" | \"link\" | \"menu\" | \"stop\" | \"base\" | \"text\" | \"title\" | \"s\" | \"small\" | \"source\" | \"output\" | \"svg\" | \"meta\" | \"script\" | \"summary\" | \"desc\" | \"q\" | \"pattern\" | \"mask\" | \"input\" | \"slot\" | \"style\" | \"head\" | \"section\" | \"animate\" | \"progress\" | \"view\" | \"big\" | \"sub\" | \"sup\" | \"var\" | \"map\" | \"html\" | \"a\" | \"img\" | \"audio\" | \"br\" | \"form\" | \"main\" | \"abbr\" | \"address\" | \"aside\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"button\" | \"canvas\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"p\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"select\" | \"span\" | \"strong\" | \"table\" | \"template\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"video\" | \"wbr\" | \"webview\" | \"animateMotion\" | \"animateTransform\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" ], "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/index.tsx", "deprecated": false, @@ -987,7 +987,7 @@ "label": "securityLinkAnchorComponent", "description": [], "signature": [ - "\"symbol\" | \"object\" | React.ComponentType | \"body\" | \"path\" | \"circle\" | \"filter\" | \"data\" | \"line\" | \"area\" | \"time\" | \"label\" | \"legend\" | \"article\" | \"image\" | \"link\" | \"menu\" | \"stop\" | \"base\" | \"text\" | \"title\" | \"s\" | \"small\" | \"source\" | \"output\" | \"svg\" | \"meta\" | \"script\" | \"summary\" | \"desc\" | \"q\" | \"pattern\" | \"mask\" | \"input\" | \"slot\" | \"style\" | \"head\" | \"section\" | \"big\" | \"sub\" | \"sup\" | \"animate\" | \"progress\" | \"view\" | \"var\" | \"map\" | \"html\" | \"a\" | \"img\" | \"audio\" | \"br\" | \"form\" | \"main\" | \"abbr\" | \"address\" | \"aside\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"button\" | \"canvas\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"p\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"select\" | \"span\" | \"strong\" | \"table\" | \"template\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"video\" | \"wbr\" | \"webview\" | \"animateMotion\" | \"animateTransform\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" + "\"symbol\" | \"object\" | React.ComponentType | \"body\" | \"path\" | \"circle\" | \"filter\" | \"data\" | \"line\" | \"area\" | \"time\" | \"label\" | \"legend\" | \"article\" | \"image\" | \"link\" | \"menu\" | \"stop\" | \"base\" | \"text\" | \"title\" | \"s\" | \"small\" | \"source\" | \"output\" | \"svg\" | \"meta\" | \"script\" | \"summary\" | \"desc\" | \"q\" | \"pattern\" | \"mask\" | \"input\" | \"slot\" | \"style\" | \"head\" | \"section\" | \"animate\" | \"progress\" | \"view\" | \"big\" | \"sub\" | \"sup\" | \"var\" | \"map\" | \"html\" | \"a\" | \"img\" | \"audio\" | \"br\" | \"form\" | \"main\" | \"abbr\" | \"address\" | \"aside\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"button\" | \"canvas\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"p\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"select\" | \"span\" | \"strong\" | \"table\" | \"template\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"video\" | \"wbr\" | \"webview\" | \"animateMotion\" | \"animateTransform\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" ], "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx", "deprecated": false, @@ -1001,7 +1001,7 @@ "label": "formattedDateComponent", "description": [], "signature": [ - "\"symbol\" | \"object\" | React.ComponentType | \"body\" | \"path\" | \"circle\" | \"filter\" | \"data\" | \"line\" | \"area\" | \"time\" | \"label\" | \"legend\" | \"article\" | \"image\" | \"link\" | \"menu\" | \"stop\" | \"base\" | \"text\" | \"title\" | \"s\" | \"small\" | \"source\" | \"output\" | \"svg\" | \"meta\" | \"script\" | \"summary\" | \"desc\" | \"q\" | \"pattern\" | \"mask\" | \"input\" | \"slot\" | \"style\" | \"head\" | \"section\" | \"big\" | \"sub\" | \"sup\" | \"animate\" | \"progress\" | \"view\" | \"var\" | \"map\" | \"html\" | \"a\" | \"img\" | \"audio\" | \"br\" | \"form\" | \"main\" | \"abbr\" | \"address\" | \"aside\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"button\" | \"canvas\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"p\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"select\" | \"span\" | \"strong\" | \"table\" | \"template\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"video\" | \"wbr\" | \"webview\" | \"animateMotion\" | \"animateTransform\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" + "\"symbol\" | \"object\" | React.ComponentType | \"body\" | \"path\" | \"circle\" | \"filter\" | \"data\" | \"line\" | \"area\" | \"time\" | \"label\" | \"legend\" | \"article\" | \"image\" | \"link\" | \"menu\" | \"stop\" | \"base\" | \"text\" | \"title\" | \"s\" | \"small\" | \"source\" | \"output\" | \"svg\" | \"meta\" | \"script\" | \"summary\" | \"desc\" | \"q\" | \"pattern\" | \"mask\" | \"input\" | \"slot\" | \"style\" | \"head\" | \"section\" | \"animate\" | \"progress\" | \"view\" | \"big\" | \"sub\" | \"sup\" | \"var\" | \"map\" | \"html\" | \"a\" | \"img\" | \"audio\" | \"br\" | \"form\" | \"main\" | \"abbr\" | \"address\" | \"aside\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"button\" | \"canvas\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"p\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"select\" | \"span\" | \"strong\" | \"table\" | \"template\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"video\" | \"wbr\" | \"webview\" | \"animateMotion\" | \"animateTransform\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" ], "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx", "deprecated": false, diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index 72de501625183..05fb877868aa0 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: 2022-12-21 +date: 2022-12-22 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 cd2b44005a59b..16eca103eaf6c 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: 2022-12-21 +date: 2022-12-22 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 530cfd1c3dbe7..e4e8c46357286 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: 2022-12-21 +date: 2022-12-22 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 3966933db3c40..f2247abfe300e 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: 2022-12-21 +date: 2022-12-22 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 2ea098ed55ff1..fe3a2449c58bb 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: 2022-12-21 +date: 2022-12-22 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 9fa0c26ac9921..d121c5f3da106 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: 2022-12-21 +date: 2022-12-22 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 a2fcca9d90ab5..35997aa24e00e 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: 2022-12-21 +date: 2022-12-22 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 7246812bd7aef..661e228f32051 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: 2022-12-21 +date: 2022-12-22 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 6b2dc336e1656..f16f9817d1974 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: 2022-12-21 +date: 2022-12-22 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 ca38c5ed86c87..881c75e951b1b 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: 2022-12-21 +date: 2022-12-22 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 669ff1fb0e961..cba97e86406ad 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: 2022-12-21 +date: 2022-12-22 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 343cd769dde49..ba0209ca86a74 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: 2022-12-21 +date: 2022-12-22 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 fd46055bfae2d..ee30d66342a52 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: 2022-12-21 +date: 2022-12-22 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 f7092e33fc9b2..3bf57c7abd2a1 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: 2022-12-21 +date: 2022-12-22 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 f7fd370a924cd..7fc5f9b8b0656 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index 844dcaf1a04ec..352c690da1ecc 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: 2022-12-21 +date: 2022-12-22 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 2964c8ff77d49..6f70900870c83 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx index 9fdcbef4e74dd..af11ace25ff17 100644 --- a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx +++ b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-user-profile-components title: "@kbn/shared-ux-avatar-user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-user-profile-components plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-user-profile-components'] --- import kbnSharedUxAvatarUserProfileComponentsObj from './kbn_shared_ux_avatar_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index 3b825cdb821c1..9f0fe7827b43a 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx index aa8df9bb16127..03dbf9e71359f 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen-mocks title: "@kbn/shared-ux-button-exit-full-screen-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen-mocks plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen-mocks'] --- import kbnSharedUxButtonExitFullScreenMocksObj from './kbn_shared_ux_button_exit_full_screen_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 092f53c7ee8be..955e23bc81c13 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: 2022-12-21 +date: 2022-12-22 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 5dc9b2e2443d6..37c3a148430f8 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: 2022-12-21 +date: 2022-12-22 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 454302177af67..2f048dfdf5152 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index 0f1328f3ee286..469fa10b2a19f 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: 2022-12-21 +date: 2022-12-22 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 ca4715b893977..886fd0a1cee12 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: 2022-12-21 +date: 2022-12-22 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 fdbab44e7c26e..afa896d6d519b 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: 2022-12-21 +date: 2022-12-22 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 28ab3dcba5fd5..ebedf4838e60c 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: 2022-12-21 +date: 2022-12-22 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 1834de566e975..9d4982a8900a9 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-picker'] --- import kbnSharedUxFilePickerObj from './kbn_shared_ux_file_picker.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_upload.mdx b/api_docs/kbn_shared_ux_file_upload.mdx index 5eaa193b9ae7a..aa002d94606b8 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: 2022-12-21 +date: 2022-12-22 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 b4d9bbf325619..de322c8db6213 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: 2022-12-21 +date: 2022-12-22 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 09ea1b72018b1..c029fd3c99292 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: 2022-12-21 +date: 2022-12-22 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 1e64aef4f06e7..ae02936511c12 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: 2022-12-21 +date: 2022-12-22 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 2898e4d492c64..d2ebd8a375f4d 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: 2022-12-21 +date: 2022-12-22 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 4c52c73a9bbd9..bc647f1992a1d 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: 2022-12-21 +date: 2022-12-22 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 8705b879dc180..afbf40e0d8d6c 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: 2022-12-21 +date: 2022-12-22 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 f6b391340c10b..b168624e2a3ed 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: 2022-12-21 +date: 2022-12-22 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 09f6ece11cbee..8d5780843be8a 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: 2022-12-21 +date: 2022-12-22 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 66a5402c0f5c7..89dccd3d5c3a4 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: 2022-12-21 +date: 2022-12-22 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 4baae7a8dab5e..123398dcebf77 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: 2022-12-21 +date: 2022-12-22 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 9b7a1c98bdc8e..7c0aa85befefb 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: 2022-12-21 +date: 2022-12-22 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 195d410fb388e..479ef88de3e94 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: 2022-12-21 +date: 2022-12-22 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 944537f893662..9148c0d2070c1 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: 2022-12-21 +date: 2022-12-22 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 da2cf2e80df9f..51504d40fd54c 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: 2022-12-21 +date: 2022-12-22 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 8ea4bc9b71dec..3e67d016415cd 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: 2022-12-21 +date: 2022-12-22 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 0e387bd85aa37..6cd68a4572480 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: 2022-12-21 +date: 2022-12-22 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 9fdff8f400b6f..ca5be56314dfe 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: 2022-12-21 +date: 2022-12-22 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 3f46290b7c607..39c4f8a413ec2 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: 2022-12-21 +date: 2022-12-22 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 3caeac59545fa..91b4de2499253 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: 2022-12-21 +date: 2022-12-22 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 5115462429f94..615a45faddab8 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: 2022-12-21 +date: 2022-12-22 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 47a5074ac5f64..976146f903b66 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: 2022-12-21 +date: 2022-12-22 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 1f2e5d983bf75..a04ea376180ed 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: 2022-12-21 +date: 2022-12-22 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 36858959c162c..12166e740a5dd 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index 89ef707303e1a..a23660325f7ae 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index b3f89ddaa6075..4e2d5d3e27aff 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_sort_package_json.mdx b/api_docs/kbn_sort_package_json.mdx index 5020d63b23160..aea334a08ec61 100644 --- a/api_docs/kbn_sort_package_json.mdx +++ b/api_docs/kbn_sort_package_json.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-package-json title: "@kbn/sort-package-json" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-package-json plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-package-json'] --- import kbnSortPackageJsonObj from './kbn_sort_package_json.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 8cac3586b0549..f8e862aaf31e9 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: 2022-12-21 +date: 2022-12-22 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 875eb65d58e7d..5068af8d2248a 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: 2022-12-21 +date: 2022-12-22 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 a7c6e83128cdc..60ded91d88e8a 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: 2022-12-21 +date: 2022-12-22 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 c12137e3cc5b5..b193c21ba8873 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: 2022-12-21 +date: 2022-12-22 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 30c3be424518d..477279b553bf5 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 1b0fd947ead6e..4b269c81f3c1c 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: 2022-12-21 +date: 2022-12-22 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 ac45731938600..fb4d7ab6ae34f 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index d9c4134580780..78c1ea59ababc 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_type_summarizer.mdx b/api_docs/kbn_type_summarizer.mdx index 13c41b8d3b421..4cda05cca2dc1 100644 --- a/api_docs/kbn_type_summarizer.mdx +++ b/api_docs/kbn_type_summarizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer title: "@kbn/type-summarizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/type-summarizer plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer'] --- import kbnTypeSummarizerObj from './kbn_type_summarizer.devdocs.json'; diff --git a/api_docs/kbn_type_summarizer_core.mdx b/api_docs/kbn_type_summarizer_core.mdx index dbc8a4ed91369..310261611e374 100644 --- a/api_docs/kbn_type_summarizer_core.mdx +++ b/api_docs/kbn_type_summarizer_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer-core title: "@kbn/type-summarizer-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/type-summarizer-core plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer-core'] --- import kbnTypeSummarizerCoreObj from './kbn_type_summarizer_core.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index 8b448559ae19a..7b792dc86ccce 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index afcb49e583586..8bac58382ead8 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: 2022-12-21 +date: 2022-12-22 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 da2817fbaa10e..cc2deffd49e70 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index 84e5d0c7c7124..863ea1e0c8f32 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: 2022-12-21 +date: 2022-12-22 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 411658e42e10c..cd9f481b02244 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: 2022-12-21 +date: 2022-12-22 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 a63b70ff3d25b..2b48b4f007a7e 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: 2022-12-21 +date: 2022-12-22 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 8bb3de05f2053..20be18400257a 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index ace748fe619a1..d88c067abe78a 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index b457157961d10..08d45604b9d13 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.devdocs.json b/api_docs/kibana_react.devdocs.json index 1e2ef711030ac..e3de685660b54 100644 --- a/api_docs/kibana_react.devdocs.json +++ b/api_docs/kibana_react.devdocs.json @@ -3334,14 +3334,6 @@ "section": "def-common.ThemeServiceStart", "text": "ThemeServiceStart" }, - " | undefined; injectedMetadata?: ", - { - "pluginId": "@kbn/core-injected-metadata-browser", - "scope": "common", - "docId": "kibKbnCoreInjectedMetadataBrowserPluginApi", - "section": "def-common.InjectedMetadataStart", - "text": "InjectedMetadataStart" - }, " | undefined; }" ], "path": "src/plugins/kibana_react/public/context/types.ts", diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index d6f557988a2ed..1a37e79028a7a 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: 2022-12-21 +date: 2022-12-22 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 6b3cd29d49c12..f626e1645c7e1 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: 2022-12-21 +date: 2022-12-22 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 e3392e3b3e864..87e41a61dd9f4 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 99a697f53cbd4..4701da937ce8f 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: 2022-12-21 +date: 2022-12-22 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 92e68ab09a468..1691a6a739541 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: 2022-12-21 +date: 2022-12-22 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 88a30c6fd2642..46c82f945b88c 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: 2022-12-21 +date: 2022-12-22 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 e42cf1eab399f..e96c1cd283214 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index b2ee0dc375713..f3a98946e18ae 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 97c976473560a..4e12fbfccb520 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: 2022-12-21 +date: 2022-12-22 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 efd1c6df19973..a3e0dd0ec4b8e 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: 2022-12-21 +date: 2022-12-22 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 a5df51dfeb799..bf26509dcf524 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index ed10b0f8e01e7..27e17b2afaffc 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index f6c9230bef5cd..76fe0878a61f5 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: 2022-12-21 +date: 2022-12-22 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 c3f49094e98a5..65fd46cffddcb 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: 2022-12-21 +date: 2022-12-22 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 25a28683debcf..831789cf3e393 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: 2022-12-21 +date: 2022-12-22 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 0ad897d7159bb..95e46ad43c334 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index 726877c8414fb..bdb3076239c61 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index 1947711daa6bd..803e3e02bdbd8 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -9668,11 +9668,25 @@ "PartialC", "<{ name: ", "StringC", - "; page: ", + "; indicator_types: ", + "Type", + "; page: ", "StringC", "; per_page: ", "StringC", - "; }>; }>, ", + "; sort_by: ", + "UnionC", + "<[", + "LiteralC", + "<\"name\">, ", + "LiteralC", + "<\"indicator_type\">]>; sort_direction: ", + "UnionC", + "<[", + "LiteralC", + "<\"asc\">, ", + "LiteralC", + "<\"desc\">]>; }>; }>, ", { "pluginId": "observability", "scope": "server", @@ -10216,11 +10230,25 @@ "PartialC", "<{ name: ", "StringC", - "; page: ", + "; indicator_types: ", + "Type", + "; page: ", "StringC", "; per_page: ", "StringC", - "; }>; }>, ", + "; sort_by: ", + "UnionC", + "<[", + "LiteralC", + "<\"name\">, ", + "LiteralC", + "<\"indicator_type\">]>; sort_direction: ", + "UnionC", + "<[", + "LiteralC", + "<\"asc\">, ", + "LiteralC", + "<\"desc\">]>; }>; }>, ", { "pluginId": "observability", "scope": "server", diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 24313a1fd6d2a..6c692cc7f4fe7 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index f0f078dc2267c..dd14f8c113478 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 3d5f2c5c9056e..6d3cd9f71a366 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: 2022-12-21 +date: 2022-12-22 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 | |--------------|----------|------------------------| -| 532 | 444 | 42 | +| 531 | 443 | 42 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 33979 | 524 | 23697 | 1161 | +| 33973 | 522 | 23697 | 1162 | ## Plugin Directory @@ -30,7 +30,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 226 | 8 | 221 | 24 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 36 | 1 | 32 | 2 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 12 | 0 | 1 | 2 | -| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 426 | 0 | 417 | 36 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 427 | 0 | 418 | 37 | | | [APM UI](https://github.com/orgs/elastic/teams/apm-ui) | The user interface for Elastic APM | 42 | 0 | 42 | 58 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Considering using bfetch capabilities when fetching large amounts of data. This services supports batching HTTP requests and streaming responses back. | 89 | 1 | 74 | 2 | @@ -48,7 +48,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Cloud Security Posture](https://github.com/orgs/elastic/teams/cloud-posture-security) | The cloud security posture plugin | 17 | 0 | 2 | 2 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 13 | 0 | 13 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 271 | 0 | 262 | 10 | -| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2811 | 17 | 1014 | 0 | +| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2809 | 17 | 1014 | 0 | | crossClusterReplication | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | customBranding | [global-experience](https://github.com/orgs/elastic/teams/kibana-global-experience) | Enables customization of Kibana | 0 | 0 | 0 | 0 | | | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 107 | 0 | 88 | 1 | @@ -89,7 +89,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 62 | 0 | 62 | 2 | | | [@elastic/kibana-app-services](https://github.com/orgs/elastic/teams/team:AppServicesUx) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 252 | 1 | 45 | 5 | | | [@elastic/kibana-global-experience](https://github.com/orgs/elastic/teams/@elastic/kibana-global-experience) | Simple UI for managing files in Kibana | 2 | 1 | 2 | 0 | -| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1025 | 3 | 920 | 20 | +| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1029 | 3 | 924 | 20 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 68 | 0 | 14 | 5 | | globalSearchBar | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | globalSearchProviders | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | @@ -145,7 +145,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Kibana Reporting Services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Kibana Screenshotting Plugin | 27 | 0 | 8 | 4 | | searchprofiler | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Platform 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. | 251 | 0 | 91 | 1 | -| | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 112 | 0 | 75 | 28 | +| | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 113 | 0 | 76 | 28 | | | [Security Team](https://github.com/orgs/elastic/teams/security-team) | - | 7 | 0 | 7 | 1 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds URL Service and sharing capabilities to Kibana | 115 | 0 | 56 | 10 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 22 | 1 | 22 | 1 | @@ -290,11 +290,10 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | Kibana Core | - | 3 | 0 | 1 | 0 | | | Kibana Core | - | 8 | 0 | 8 | 2 | | | Kibana Core | - | 3 | 0 | 3 | 0 | -| | Kibana Core | - | 8 | 2 | 6 | 0 | | | Kibana Core | - | 4 | 0 | 4 | 0 | | | Kibana Core | - | 2 | 0 | 2 | 0 | | | Kibana Core | - | 4 | 0 | 4 | 0 | -| | Kibana Core | - | 30 | 0 | 0 | 0 | +| | Kibana Core | - | 28 | 0 | 0 | 0 | | | Kibana Core | - | 5 | 0 | 5 | 0 | | | Kibana Core | - | 31 | 0 | 0 | 0 | | | Kibana Core | - | 9 | 0 | 9 | 0 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index e85a9b65aa26e..be7fcb8f59940 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: 2022-12-21 +date: 2022-12-22 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 f2e2b6595f1a6..f26a955f03dae 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 81f6e7e898c76..3ea31873b492f 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: 2022-12-21 +date: 2022-12-22 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 55c1c99adcdbd..2daa1708eeccf 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: 2022-12-21 +date: 2022-12-22 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 aca0085b6f492..558f40d1bc82f 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.devdocs.json b/api_docs/rule_registry.devdocs.json index db3d9e7022e33..30b6b233f61c0 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -1456,7 +1456,7 @@ "section": "def-server.GetSummarizedAlertsFnOpts", "text": "GetSummarizedAlertsFnOpts" }, - ") => Promise<{ new: { count: number; data: Partial> & OutputOf>>[]; }; ongoing: { count: number; data: Partial> & OutputOf>>[]; }; recovered: { count: number; data: Partial> & OutputOf>>[]; }; }>" + ") => Promise<{ new: { count: number; data: {}[]; }; ongoing: { count: number; data: {}[]; }; recovered: { count: number; data: {}[]; }; }>" ], "path": "x-pack/plugins/rule_registry/server/utils/create_get_summarized_alerts_fn.ts", "deprecated": false, @@ -1801,7 +1801,7 @@ "section": "def-server.GetSummarizedAlertsFnOpts", "text": "GetSummarizedAlertsFnOpts" }, - ") => Promise<{ new: { count: number; data: Partial> & OutputOf>>[]; }; ongoing: { count: number; data: Partial> & OutputOf>>[]; }; recovered: { count: number; data: Partial> & OutputOf>>[]; }; }>; name: string; validate?: { params?: ", + ") => Promise<{ new: { count: number; data: {}[]; }; ongoing: { count: number; data: {}[]; }; recovered: { count: number; data: {}[]; }; }>; name: string; validate?: { params?: ", "RuleTypeParamsValidator", " | undefined; } | undefined; id: string; cancelAlertsOnRuleTimeout?: boolean | undefined; actionGroups: ", { diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index f52db9df4aa61..3ecff31302572 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: 2022-12-21 +date: 2022-12-22 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 176449be2e199..f5e44eb91738b 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: 2022-12-21 +date: 2022-12-22 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 488ac1180adf5..48b0f25ae82b8 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: 2022-12-21 +date: 2022-12-22 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 ceb3993d70f84..d2e15bd7223ac 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: 2022-12-21 +date: 2022-12-22 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 62cca2a034d6d..db1c40ed6cd35 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: 2022-12-21 +date: 2022-12-22 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 90e4565a14f15..7e8bc6ddf00eb 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: 2022-12-21 +date: 2022-12-22 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 9972b8eaa7999..0167bf617bd3f 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: 2022-12-21 +date: 2022-12-22 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 3e2f046b59b20..e62678d28f77e 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: 2022-12-21 +date: 2022-12-22 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 681abaffe63d5..e1c8b17fd4130 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: 2022-12-21 +date: 2022-12-22 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 62d11a189dd3a..d5ab33c33c4b7 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/security.mdx b/api_docs/security.mdx index f023f4eecc3eb..cb83aa58471c0 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json index a98974523e1bb..9b5c2ba0d6745 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -1241,6 +1241,17 @@ "path": "x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "securitySolution", + "id": "def-public.TimelineModel.selectAll", + "type": "boolean", + "tags": [], + "label": "selectAll", + "description": [], + "path": "x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index f42282c733e53..5b58abaa2024c 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Security solution](https://github.com/orgs/elastic/teams/security-solut | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 112 | 0 | 75 | 28 | +| 113 | 0 | 76 | 28 | ## Client diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 2715042db6a57..762e9d1c5c6fe 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: 2022-12-21 +date: 2022-12-22 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 92efac0bb76a8..6f13957e8a078 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index c40ca5520fff3..e07ad4f8759c4 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: 2022-12-21 +date: 2022-12-22 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 243cf498d266d..12d0ec6d18fa0 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: 2022-12-21 +date: 2022-12-22 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 c15bef11036f2..2a2c0b3012efe 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: 2022-12-21 +date: 2022-12-22 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 8dde60598fa50..1cf0aab2a70b7 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: 2022-12-21 +date: 2022-12-22 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 af3245506b82f..22cdeef08c7d6 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: 2022-12-21 +date: 2022-12-22 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 82b818607087a..40d836f37af3f 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: 2022-12-21 +date: 2022-12-22 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 9d6d77bfd4758..993cd2c1369a8 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: 2022-12-21 +date: 2022-12-22 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 adee140a1f834..52f0280a74468 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: 2022-12-21 +date: 2022-12-22 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 c305951aea05e..e3417ab8e6357 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: 2022-12-21 +date: 2022-12-22 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 ce8020fefc56c..1d067fbcfeff4 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: 2022-12-21 +date: 2022-12-22 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 d9502b70ecf3b..2aa34bbd4b700 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: 2022-12-21 +date: 2022-12-22 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 ee2c611cb9808..eb35a3c58f66a 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.devdocs.json b/api_docs/triggers_actions_ui.devdocs.json index 6d7511a5af97d..3f247ede8db90 100644 --- a/api_docs/triggers_actions_ui.devdocs.json +++ b/api_docs/triggers_actions_ui.devdocs.json @@ -8526,16 +8526,16 @@ }, { "parentPluginId": "triggersActionsUi", - "id": "def-public.TriggersAndActionsUIPublicPluginStart.getRuleAlertsSummary", + "id": "def-public.TriggersAndActionsUIPublicPluginStart.getAlertSummaryWidget", "type": "Function", "tags": [], - "label": "getRuleAlertsSummary", + "label": "getAlertSummaryWidget", "description": [], "signature": [ "(props: ", - "RuleAlertsSummaryProps", + "AlertSummaryWidgetProps", ") => React.ReactElement<", - "RuleAlertsSummaryProps", + "AlertSummaryWidgetProps", ", string | React.JSXElementConstructor>" ], "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts", @@ -8544,13 +8544,13 @@ "children": [ { "parentPluginId": "triggersActionsUi", - "id": "def-public.TriggersAndActionsUIPublicPluginStart.getRuleAlertsSummary.$1", + "id": "def-public.TriggersAndActionsUIPublicPluginStart.getAlertSummaryWidget.$1", "type": "Object", "tags": [], "label": "props", "description": [], "signature": [ - "RuleAlertsSummaryProps" + "AlertSummaryWidgetProps" ], "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts", "deprecated": false, diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index c1c0124d0adc4..0a4d9124a1ed7 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: 2022-12-21 +date: 2022-12-22 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 89341e8e48604..ba4cb36f26407 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: 2022-12-21 +date: 2022-12-22 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 ea61fd1dea647..d84eb4173ccae 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_field_list.mdx b/api_docs/unified_field_list.mdx index fe2f08384f795..8219c6ee2092f 100644 --- a/api_docs/unified_field_list.mdx +++ b/api_docs/unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedFieldList title: "unifiedFieldList" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedFieldList plugin -date: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedFieldList'] --- import unifiedFieldListObj from './unified_field_list.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index d55a86465fe94..31114a87ab3af 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: 2022-12-21 +date: 2022-12-22 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 b0aaa8be01d2f..15fd0eec6cb7c 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: 2022-12-21 +date: 2022-12-22 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 4b8a679b37f6e..ba112cfde4ee2 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index e2aa28ef75fad..2b5bf18bb9fd1 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: 2022-12-21 +date: 2022-12-22 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 3907c09053c8d..f37baaedf3be5 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: 2022-12-21 +date: 2022-12-22 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 a765c4ea8facd..ede43e4c3bdc1 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: 2022-12-21 +date: 2022-12-22 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 80eb8a6ec0ee5..e9d8d0c61e612 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: 2022-12-21 +date: 2022-12-22 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 aa1ded3fa8543..32d36f0753ded 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: 2022-12-21 +date: 2022-12-22 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 8ff9646611543..b9fd5b14a8d22 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: 2022-12-21 +date: 2022-12-22 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 9aa896a440887..4b609a673cacc 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: 2022-12-21 +date: 2022-12-22 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 11e77389b17c2..9e4ca60146504 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: 2022-12-21 +date: 2022-12-22 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 07975c1a30e15..f95a326a47915 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: 2022-12-21 +date: 2022-12-22 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 4bf70bb8b1c27..1f7e3558b638e 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: 2022-12-21 +date: 2022-12-22 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 63ec5347bf33f..9efa9a6608efc 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: 2022-12-21 +date: 2022-12-22 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 4f4f6758f1f10..16b9eb97cb6ba 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: 2022-12-21 +date: 2022-12-22 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 eee5ca75831d2..bffbafde926f0 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: 2022-12-21 +date: 2022-12-22 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 3fe695bb738a7..b37e7e3f06aa7 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: 2022-12-21 +date: 2022-12-22 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json';