From 312586043b9584408128971f654d5dc15ae4a919 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Wed, 4 Jan 2023 15:36:41 -0500 Subject: [PATCH 01/36] [file upload] verify CRS for geojson upload (#148403) Fixes https://github.com/elastic/kibana/issues/146420 and https://github.com/elastic/kibana/issues/138128 PR adds verification logic to ensure Geojson is correct CRS Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../geojson_importer/geojson_importer.test.js | 70 +++++++++++++++++++ .../geo/geojson_importer/geojson_importer.ts | 24 +++++++ 2 files changed, 94 insertions(+) diff --git a/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js index d05212223ef3d3..7b621c4ccbcadb 100644 --- a/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js +++ b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js @@ -278,4 +278,74 @@ describe('previewFile', () => { expect(results.features).toEqual([]); expect(results.invalidFeatures.length).toBe(2); }); + + describe('crs', () => { + test('should read features with supported CRS', async () => { + const file = new File( + [ + JSON.stringify({ + ...FEATURE_COLLECTION, + crs: { + type: 'name', + properties: { + name: 'urn:ogc:def:crs:OGC:1.3:CRS84', + }, + }, + }), + ], + 'testfile.json', + { type: 'text/json' } + ); + + const importer = new GeoJsonImporter(file); + const results = await importer.previewFile(); + + expect(results).toEqual({ + previewCoverage: 100, + hasPoints: true, + hasShapes: false, + features: FEATURE_COLLECTION.features, + invalidFeatures: [], + }); + }); + + test('should reject "link" CRS', async () => { + const file = new File( + [ + JSON.stringify({ + ...FEATURE_COLLECTION, + crs: { + type: 'link', + }, + }), + ], + 'testfile.json', + { type: 'text/json' } + ); + + const importer = new GeoJsonImporter(file); + await expect(importer.previewFile()).rejects.toThrow(); + }); + + test('should reject unsupported CRS', async () => { + const file = new File( + [ + JSON.stringify({ + ...FEATURE_COLLECTION, + crs: { + type: 'name', + properties: { + name: 'urn:ogc:def:crs:EPSG::25833', + }, + }, + }), + ], + 'testfile.json', + { type: 'text/json' } + ); + + const importer = new GeoJsonImporter(file); + await expect(importer.previewFile()).rejects.toThrow(); + }); + }); }); diff --git a/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts index cc2f387e5bff44..e0405d1e998b85 100644 --- a/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts +++ b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts @@ -13,6 +13,8 @@ import { AbstractGeoFileImporter } from '../abstract_geo_file_importer'; export const GEOJSON_FILE_TYPES = ['.json', '.geojson']; +const SUPPORTED_CRS_LIST = ['EPSG:4326', 'urn:ogc:def:crs:OGC:1.3:CRS84']; + interface LoaderBatch { bytesUsed?: number; batchType?: string; @@ -51,6 +53,28 @@ export class GeoJsonImporter extends AbstractGeoFileImporter { const { value: batch, done } = await this._iterator.next(); + // geojson only supports WGS 84 datum, with longitude and latitude units of decimal degrees. + // https://datatracker.ietf.org/doc/html/rfc7946#section-4 + // Deprecated geojson specification supported crs + // https://geojson.org/geojson-spec.html#named-crs + // This importer only supports WGS 84 datum + if (typeof batch?.container?.crs === 'object') { + const crs = batch.container.crs as { type?: string; properties?: { name?: string } }; + if ( + crs?.type === 'link' || + (crs?.type === 'name' && !SUPPORTED_CRS_LIST.includes(crs?.properties?.name ?? '')) + ) { + throw new Error( + i18n.translate('xpack.fileUpload.geojsonImporter.unsupportedCrs', { + defaultMessage: 'Unsupported coordinate reference system, expecting {supportedCrsList}', + values: { + supportedCrsList: SUPPORTED_CRS_LIST.join(', '), + }, + }) + ); + } + } + if (!this._getIsActive() || done) { results.hasNext = false; return results; From 2f973afd1c517820a87b70259a89d0558d1bdf74 Mon Sep 17 00:00:00 2001 From: Kevin Delemme Date: Wed, 4 Jan 2023 15:46:02 -0500 Subject: [PATCH 02/36] feat(slo): use sync delay for burn rate alerting (#148223) --- .../src/models/duration.test.ts | 21 +++++++++++++++++++ .../kbn-slo-schema/src/models/duration.ts | 10 +++++++++ .../lib/rules/slo_burn_rate/executor.ts | 4 ++-- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/packages/kbn-slo-schema/src/models/duration.test.ts b/packages/kbn-slo-schema/src/models/duration.test.ts index 2b61063f0d5b83..f3cd23278b41aa 100644 --- a/packages/kbn-slo-schema/src/models/duration.test.ts +++ b/packages/kbn-slo-schema/src/models/duration.test.ts @@ -78,4 +78,25 @@ describe('Duration', () => { expect(short.isLongerOrEqualThan(new Duration(1, DurationUnit.Year))).toBe(false); }); }); + + describe('add', () => { + it('returns the duration result in minute', () => { + const someDuration = new Duration(1, DurationUnit.Minute); + expect(someDuration.add(new Duration(1, DurationUnit.Minute))).toEqual( + new Duration(2, DurationUnit.Minute) + ); + expect(someDuration.add(new Duration(1, DurationUnit.Hour))).toEqual( + new Duration(61, DurationUnit.Minute) + ); + expect(someDuration.add(new Duration(1, DurationUnit.Day))).toEqual( + new Duration(1441, DurationUnit.Minute) + ); + expect(someDuration.add(new Duration(1, DurationUnit.Week))).toEqual( + new Duration(10081, DurationUnit.Minute) + ); + expect(someDuration.add(new Duration(1, DurationUnit.Month))).toEqual( + new Duration(43201, DurationUnit.Minute) + ); + }); + }); }); diff --git a/packages/kbn-slo-schema/src/models/duration.ts b/packages/kbn-slo-schema/src/models/duration.ts index 3788882b7b9c45..ecffb97f30e573 100644 --- a/packages/kbn-slo-schema/src/models/duration.ts +++ b/packages/kbn-slo-schema/src/models/duration.ts @@ -29,6 +29,16 @@ class Duration { } } + add(other: Duration): Duration { + const currentDurationMoment = moment.duration(this.value, toMomentUnitOfTime(this.unit)); + const otherDurationMoment = moment.duration(other.value, toMomentUnitOfTime(other.unit)); + + return new Duration( + currentDurationMoment.add(otherDurationMoment).asMinutes(), + DurationUnit.Minute + ); + } + isShorterThan(other: Duration): boolean { const otherDurationMoment = moment.duration(other.value, toMomentUnitOfTime(other.unit)); const currentDurationMoment = moment.duration(this.value, toMomentUnitOfTime(this.unit)); diff --git a/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/executor.ts b/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/executor.ts index d22d1f9748504d..38ac4e4eb32d60 100644 --- a/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/executor.ts +++ b/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/executor.ts @@ -58,8 +58,8 @@ export const getRuleExecutor = (): LifecycleRuleExecutor< ); const sliData = await sliClient.fetchSLIDataFrom(slo, [ - { name: LONG_WINDOW, duration: longWindowDuration }, - { name: SHORT_WINDOW, duration: shortWindowDuration }, + { name: LONG_WINDOW, duration: longWindowDuration.add(slo.settings.syncDelay) }, + { name: SHORT_WINDOW, duration: shortWindowDuration.add(slo.settings.syncDelay) }, ]); const longWindowBurnRate = computeBurnRate(slo, sliData[LONG_WINDOW]); From 872cdbbee99b7227d3b709c890e5f846a581ebe0 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Wed, 4 Jan 2023 19:52:15 -0500 Subject: [PATCH 03/36] [maps] fix space in geo field name cause vector tiles to break (#148413) Fixes https://github.com/elastic/kibana/issues/131468 URL encode geo field name when generating _mvt URL. Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../maps/common/mvt_request_body.test.ts | 166 ++++++++++++------ .../plugins/maps/common/mvt_request_body.ts | 10 +- 2 files changed, 115 insertions(+), 61 deletions(-) diff --git a/x-pack/plugins/maps/common/mvt_request_body.test.ts b/x-pack/plugins/maps/common/mvt_request_body.test.ts index 4f06d21ff2507b..fd67cdeed3e8b3 100644 --- a/x-pack/plugins/maps/common/mvt_request_body.test.ts +++ b/x-pack/plugins/maps/common/mvt_request_body.test.ts @@ -5,73 +5,123 @@ * 2.0. */ -import { decodeMvtResponseBody, encodeMvtResponseBody } from './mvt_request_body'; +import { + decodeMvtResponseBody, + encodeMvtResponseBody, + getAggsTileRequest, + getHitsTileRequest, +} from './mvt_request_body'; +import { RENDER_AS } from './constants'; -test('Should encode shape into URI safe string and decode back to original shape', () => { - const searchRequest = { - docvalue_fields: [], - size: 10000, - _source: false, - script_fields: {}, - stored_fields: ['geopoint'], - runtime_mappings: { - 'day of week': { - type: 'keyword', - script: { - source: - "ZonedDateTime input = doc['ISSUE_DATE'].value;\nString output = input.format(DateTimeFormatter.ofPattern('e')) + ' ' + input.format(DateTimeFormatter.ofPattern('E'));\nemit(output);", +describe('decodeMvtResponseBody', () => { + test('Should encode shape into URI safe string and decode back to original shape', () => { + const searchRequest = { + docvalue_fields: [], + size: 10000, + _source: false, + script_fields: {}, + stored_fields: ['geopoint'], + runtime_mappings: { + 'day of week': { + type: 'keyword', + script: { + source: + "ZonedDateTime input = doc['ISSUE_DATE'].value;\nString output = input.format(DateTimeFormatter.ofPattern('e')) + ' ' + input.format(DateTimeFormatter.ofPattern('E'));\nemit(output);", + }, }, }, - }, - query: { - bool: { - must: [], - filter: [], - should: [], - must_not: [], + query: { + bool: { + must: [], + filter: [], + should: [], + must_not: [], + }, }, - }, - }; - const encodedSearchRequest = encodeMvtResponseBody(searchRequest); - expect(encodedSearchRequest).toBe( - `(_source%3A!f%2Cdocvalue_fields%3A!()%2Cquery%3A(bool%3A(filter%3A!()%2Cmust%3A!()%2Cmust_not%3A!()%2Cshould%3A!()))%2Cruntime_mappings%3A('day%20of%20week'%3A(script%3A(source%3A'ZonedDateTime%20input%20%3D%20doc%5B!'ISSUE_DATE!'%5D.value%3B%0AString%20output%20%3D%20input.format(DateTimeFormatter.ofPattern(!'e!'))%20%2B%20!'%20!'%20%2B%20input.format(DateTimeFormatter.ofPattern(!'E!'))%3B%0Aemit(output)%3B')%2Ctype%3Akeyword))%2Cscript_fields%3A()%2Csize%3A10000%2Cstored_fields%3A!(geopoint))` - ); - expect(decodeMvtResponseBody(encodedSearchRequest)).toEqual(searchRequest); -}); + }; + const encodedSearchRequest = encodeMvtResponseBody(searchRequest); + expect(encodedSearchRequest).toBe( + `(_source%3A!f%2Cdocvalue_fields%3A!()%2Cquery%3A(bool%3A(filter%3A!()%2Cmust%3A!()%2Cmust_not%3A!()%2Cshould%3A!()))%2Cruntime_mappings%3A('day%20of%20week'%3A(script%3A(source%3A'ZonedDateTime%20input%20%3D%20doc%5B!'ISSUE_DATE!'%5D.value%3B%0AString%20output%20%3D%20input.format(DateTimeFormatter.ofPattern(!'e!'))%20%2B%20!'%20!'%20%2B%20input.format(DateTimeFormatter.ofPattern(!'E!'))%3B%0Aemit(output)%3B')%2Ctype%3Akeyword))%2Cscript_fields%3A()%2Csize%3A10000%2Cstored_fields%3A!(geopoint))` + ); + expect(decodeMvtResponseBody(encodedSearchRequest)).toEqual(searchRequest); + }); -test(`Should handle '%' character`, () => { - const runtimeFieldScript = `if (doc['price'].size() != 0){ - String tmp=dissect('$%{price}').extract(doc["price"].value)?.price; + test(`Should handle '%' character`, () => { + const runtimeFieldScript = `if (doc['price'].size() != 0){ + String tmp=dissect('$%{price}').extract(doc["price"].value)?.price; - tmp = tmp.replace(',',''); + tmp = tmp.replace(',',''); - def pn = Double.parseDouble( tmp ); + def pn = Double.parseDouble( tmp ); - if (pn != null) emit(pn); -} -else { - emit(0) -}`; - const searchRequest = { - size: 10000, - _source: false, - runtime_mappings: { - price_as_number: { - type: 'keyword', - script: { - source: runtimeFieldScript, + if (pn != null) emit(pn); + } + else { + emit(0) + }`; + const searchRequest = { + size: 10000, + _source: false, + runtime_mappings: { + price_as_number: { + type: 'keyword', + script: { + source: runtimeFieldScript, + }, }, }, - }, - query: { - bool: { - must: [], - filter: [], - should: [], - must_not: [], + query: { + bool: { + must: [], + filter: [], + should: [], + must_not: [], + }, }, - }, - }; - const encodedSearchRequest = encodeMvtResponseBody(searchRequest); - expect(decodeMvtResponseBody(encodedSearchRequest)).toEqual(searchRequest); + }; + const encodedSearchRequest = encodeMvtResponseBody(searchRequest); + expect(decodeMvtResponseBody(encodedSearchRequest)).toEqual(searchRequest); + }); +}); + +describe('getAggsTileRequest', () => { + test(`Should URL encode path parameters`, () => { + const searchRequest = { + aggs: {}, + runtime_mappings: {}, + query: {}, + }; + const { path } = getAggsTileRequest({ + encodedRequestBody: encodeMvtResponseBody(searchRequest), + geometryFieldName: 'my location', + gridPrecision: 8, + hasLabels: true, + index: 'my index', + renderAs: RENDER_AS.POINT, + x: 0, + y: 0, + z: 0, + }); + expect(path).toEqual('/my%20index/_mvt/my%20location/0/0/0'); + }); +}); + +describe('getHitsTileRequest', () => { + test(`Should URL encode path parameters`, () => { + const searchRequest = { + size: 10000, + runtime_mappings: {}, + query: {}, + }; + const { path } = getHitsTileRequest({ + encodedRequestBody: encodeMvtResponseBody(searchRequest), + geometryFieldName: 'my location', + hasLabels: true, + index: 'my index', + x: 0, + y: 0, + z: 0, + }); + expect(path).toEqual('/my%20index/_mvt/my%20location/0/0/0'); + }); }); diff --git a/x-pack/plugins/maps/common/mvt_request_body.ts b/x-pack/plugins/maps/common/mvt_request_body.ts index dbf719d685c467..f876caefe0312f 100644 --- a/x-pack/plugins/maps/common/mvt_request_body.ts +++ b/x-pack/plugins/maps/common/mvt_request_body.ts @@ -43,7 +43,9 @@ export function getAggsTileRequest({ }) { const requestBody = decodeMvtResponseBody(encodedRequestBody) as any; return { - path: `/${encodeURIComponent(index)}/_mvt/${geometryFieldName}/${z}/${x}/${y}`, + path: `/${encodeURIComponent(index)}/_mvt/${encodeURIComponent( + geometryFieldName + )}/${z}/${x}/${y}`, body: { size: 0, // no hits grid_precision: gridPrecision, @@ -53,7 +55,7 @@ export function getAggsTileRequest({ grid_agg: renderAs === RENDER_AS.HEX ? 'geohex' : 'geotile', grid_type: renderAs === RENDER_AS.GRID || renderAs === RENDER_AS.HEX ? 'grid' : 'centroid', aggs: requestBody.aggs, - fields: requestBody.fields, + fields: requestBody.fields ? requestBody.fields : [], runtime_mappings: requestBody.runtime_mappings, with_labels: hasLabels, }, @@ -79,7 +81,9 @@ export function getHitsTileRequest({ }) { const requestBody = decodeMvtResponseBody(encodedRequestBody) as any; return { - path: `/${encodeURIComponent(index)}/_mvt/${geometryFieldName}/${z}/${x}/${y}`, + path: `/${encodeURIComponent(index)}/_mvt/${encodeURIComponent( + geometryFieldName + )}/${z}/${x}/${y}`, body: { grid_precision: 0, // no aggs exact_bounds: true, From 196373356e43b452accf31f284fac898992d97bf Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 5 Jan 2023 00:53:20 -0500 Subject: [PATCH 04/36] [api-docs] 2023-01-05 Daily api_docs build (#148427) Generated by https://buildkite.com/elastic/kibana-api-docs-daily/builds/208 --- api_docs/actions.mdx | 2 +- api_docs/advanced_settings.mdx | 2 +- api_docs/aiops.mdx | 2 +- api_docs/alerting.devdocs.json | 258 ++ 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.mdx | 2 +- api_docs/custom_integrations.mdx | 2 +- api_docs/dashboard.mdx | 2 +- api_docs/dashboard_enhanced.mdx | 2 +- api_docs/data.mdx | 2 +- api_docs/data_query.mdx | 2 +- api_docs/data_search.mdx | 2 +- api_docs/data_view_editor.mdx | 2 +- api_docs/data_view_field_editor.mdx | 4 +- api_docs/data_view_management.mdx | 2 +- api_docs/data_views.mdx | 2 +- api_docs/data_visualizer.mdx | 2 +- api_docs/deprecations_by_api.mdx | 4 +- api_docs/deprecations_by_plugin.mdx | 16 +- api_docs/deprecations_by_team.mdx | 2 +- api_docs/dev_tools.mdx | 2 +- api_docs/discover.devdocs.json | 2156 +++++++------- api_docs/discover.mdx | 10 +- 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.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.mdx | 2 +- 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.devdocs.json | 1386 ++------- api_docs/kbn_apm_synthtrace.mdx | 13 +- .../kbn_apm_synthtrace_client.devdocs.json | 2542 +++++++++++++++++ api_docs/kbn_apm_synthtrace_client.mdx | 42 + 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 +- api_docs/kbn_core_http_server_internal.mdx | 2 +- api_docs/kbn_core_http_server_mocks.mdx | 2 +- api_docs/kbn_core_i18n_browser.mdx | 2 +- api_docs/kbn_core_i18n_browser_mocks.mdx | 2 +- api_docs/kbn_core_i18n_server.mdx | 2 +- api_docs/kbn_core_i18n_server_internal.mdx | 2 +- api_docs/kbn_core_i18n_server_mocks.mdx | 2 +- ...n_core_injected_metadata_browser_mocks.mdx | 2 +- ...kbn_core_integrations_browser_internal.mdx | 2 +- .../kbn_core_integrations_browser_mocks.mdx | 2 +- api_docs/kbn_core_lifecycle_browser.mdx | 2 +- api_docs/kbn_core_lifecycle_browser_mocks.mdx | 2 +- api_docs/kbn_core_lifecycle_server.mdx | 2 +- api_docs/kbn_core_lifecycle_server_mocks.mdx | 2 +- api_docs/kbn_core_logging_browser_mocks.mdx | 2 +- api_docs/kbn_core_logging_common_internal.mdx | 2 +- api_docs/kbn_core_logging_server.mdx | 2 +- api_docs/kbn_core_logging_server_internal.mdx | 2 +- api_docs/kbn_core_logging_server_mocks.mdx | 2 +- ...ore_metrics_collectors_server_internal.mdx | 2 +- ...n_core_metrics_collectors_server_mocks.mdx | 2 +- api_docs/kbn_core_metrics_server.mdx | 2 +- api_docs/kbn_core_metrics_server_internal.mdx | 2 +- api_docs/kbn_core_metrics_server_mocks.mdx | 2 +- api_docs/kbn_core_mount_utils_browser.mdx | 2 +- api_docs/kbn_core_node_server.mdx | 2 +- api_docs/kbn_core_node_server_internal.mdx | 2 +- api_docs/kbn_core_node_server_mocks.mdx | 2 +- api_docs/kbn_core_notifications_browser.mdx | 2 +- ...bn_core_notifications_browser_internal.mdx | 2 +- .../kbn_core_notifications_browser_mocks.mdx | 2 +- api_docs/kbn_core_overlays_browser.mdx | 2 +- .../kbn_core_overlays_browser_internal.mdx | 2 +- api_docs/kbn_core_overlays_browser_mocks.mdx | 2 +- api_docs/kbn_core_plugins_browser.mdx | 2 +- api_docs/kbn_core_plugins_browser_mocks.mdx | 2 +- api_docs/kbn_core_plugins_server.mdx | 2 +- api_docs/kbn_core_plugins_server_mocks.mdx | 2 +- api_docs/kbn_core_preboot_server.mdx | 2 +- api_docs/kbn_core_preboot_server_mocks.mdx | 2 +- api_docs/kbn_core_rendering_browser_mocks.mdx | 2 +- .../kbn_core_rendering_server_internal.mdx | 2 +- api_docs/kbn_core_rendering_server_mocks.mdx | 2 +- api_docs/kbn_core_root_server_internal.mdx | 2 +- .../kbn_core_saved_objects_api_browser.mdx | 2 +- .../kbn_core_saved_objects_api_server.mdx | 2 +- ...core_saved_objects_api_server_internal.mdx | 2 +- ...bn_core_saved_objects_api_server_mocks.mdx | 2 +- ...ore_saved_objects_base_server_internal.mdx | 2 +- ...n_core_saved_objects_base_server_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_browser.mdx | 2 +- ...bn_core_saved_objects_browser_internal.mdx | 2 +- .../kbn_core_saved_objects_browser_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_common.mdx | 2 +- ..._objects_import_export_server_internal.mdx | 2 +- ...ved_objects_import_export_server_mocks.mdx | 2 +- ...aved_objects_migration_server_internal.mdx | 2 +- ...e_saved_objects_migration_server_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_server.mdx | 2 +- ...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 +- api_docs/kbn_core_usage_data_server.mdx | 2 +- .../kbn_core_usage_data_server_internal.mdx | 2 +- api_docs/kbn_core_usage_data_server_mocks.mdx | 2 +- api_docs/kbn_crypto.mdx | 2 +- api_docs/kbn_crypto_browser.mdx | 2 +- api_docs/kbn_cypress_config.mdx | 2 +- api_docs/kbn_datemath.mdx | 2 +- api_docs/kbn_dev_cli_errors.mdx | 2 +- api_docs/kbn_dev_cli_runner.mdx | 2 +- api_docs/kbn_dev_proc_runner.mdx | 2 +- api_docs/kbn_dev_utils.mdx | 2 +- api_docs/kbn_doc_links.mdx | 2 +- api_docs/kbn_docs_utils.mdx | 2 +- api_docs/kbn_ebt_tools.mdx | 2 +- api_docs/kbn_ecs.mdx | 2 +- api_docs/kbn_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_nested_property.mdx | 2 +- api_docs/kbn_ml_string_hash.mdx | 2 +- api_docs/kbn_ml_url_state.mdx | 2 +- api_docs/kbn_monaco.mdx | 2 +- api_docs/kbn_optimizer.mdx | 2 +- api_docs/kbn_optimizer_webpack_helpers.mdx | 2 +- api_docs/kbn_osquery_io_ts_types.mdx | 2 +- ..._performance_testing_dataset_extractor.mdx | 2 +- api_docs/kbn_plugin_generator.mdx | 2 +- api_docs/kbn_plugin_helpers.mdx | 2 +- api_docs/kbn_react_field.mdx | 2 +- api_docs/kbn_repo_path.mdx | 2 +- api_docs/kbn_repo_source_classifier.mdx | 2 +- api_docs/kbn_rison.mdx | 2 +- api_docs/kbn_rule_data_utils.mdx | 2 +- .../kbn_securitysolution_autocomplete.mdx | 2 +- api_docs/kbn_securitysolution_es_utils.mdx | 2 +- ...ritysolution_exception_list_components.mdx | 2 +- api_docs/kbn_securitysolution_hook_utils.mdx | 2 +- ..._securitysolution_io_ts_alerting_types.mdx | 2 +- .../kbn_securitysolution_io_ts_list_types.mdx | 2 +- api_docs/kbn_securitysolution_io_ts_types.mdx | 2 +- api_docs/kbn_securitysolution_io_ts_utils.mdx | 2 +- api_docs/kbn_securitysolution_list_api.mdx | 2 +- .../kbn_securitysolution_list_constants.mdx | 2 +- api_docs/kbn_securitysolution_list_hooks.mdx | 2 +- api_docs/kbn_securitysolution_list_utils.mdx | 2 +- api_docs/kbn_securitysolution_rules.mdx | 2 +- api_docs/kbn_securitysolution_t_grid.mdx | 2 +- api_docs/kbn_securitysolution_utils.mdx | 2 +- api_docs/kbn_server_http_tools.mdx | 2 +- api_docs/kbn_server_route_repository.mdx | 2 +- api_docs/kbn_shared_svg.mdx | 2 +- api_docs/kbn_shared_ux_avatar_solution.mdx | 2 +- ...ared_ux_avatar_user_profile_components.mdx | 2 +- .../kbn_shared_ux_button_exit_full_screen.mdx | 2 +- ...hared_ux_button_exit_full_screen_mocks.mdx | 2 +- api_docs/kbn_shared_ux_button_toolbar.mdx | 2 +- api_docs/kbn_shared_ux_card_no_data.mdx | 2 +- api_docs/kbn_shared_ux_card_no_data_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_context.mdx | 2 +- api_docs/kbn_shared_ux_file_image.mdx | 2 +- api_docs/kbn_shared_ux_file_image_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_picker.mdx | 2 +- api_docs/kbn_shared_ux_file_upload.mdx | 2 +- api_docs/kbn_shared_ux_file_util.mdx | 2 +- api_docs/kbn_shared_ux_link_redirect_app.mdx | 2 +- .../kbn_shared_ux_link_redirect_app_mocks.mdx | 2 +- api_docs/kbn_shared_ux_markdown.mdx | 2 +- api_docs/kbn_shared_ux_markdown_mocks.mdx | 2 +- .../kbn_shared_ux_page_analytics_no_data.mdx | 2 +- ...shared_ux_page_analytics_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_page_kibana_no_data.mdx | 2 +- ...bn_shared_ux_page_kibana_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_page_kibana_template.mdx | 2 +- ...n_shared_ux_page_kibana_template_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_no_data.mdx | 2 +- .../kbn_shared_ux_page_no_data_config.mdx | 2 +- ...bn_shared_ux_page_no_data_config_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_no_data_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_solution_nav.mdx | 2 +- .../kbn_shared_ux_prompt_no_data_views.mdx | 2 +- ...n_shared_ux_prompt_no_data_views_mocks.mdx | 2 +- api_docs/kbn_shared_ux_prompt_not_found.mdx | 2 +- api_docs/kbn_shared_ux_router.mdx | 2 +- api_docs/kbn_shared_ux_router_mocks.mdx | 2 +- api_docs/kbn_shared_ux_storybook_config.mdx | 2 +- api_docs/kbn_shared_ux_storybook_mock.mdx | 2 +- api_docs/kbn_shared_ux_utility.mdx | 2 +- api_docs/kbn_slo_schema.devdocs.json | 53 + api_docs/kbn_slo_schema.mdx | 4 +- 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_ts_project_linter.mdx | 2 +- api_docs/kbn_ts_projects.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.mdx | 2 +- api_docs/kibana_utils.devdocs.json | 368 +-- api_docs/kibana_utils.mdx | 4 +- 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.mdx | 2 +- api_docs/osquery.mdx | 2 +- api_docs/plugin_directory.mdx | 21 +- 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.mdx | 2 +- api_docs/runtime_fields.mdx | 2 +- api_docs/saved_objects.mdx | 2 +- api_docs/saved_objects_finder.mdx | 2 +- api_docs/saved_objects_management.mdx | 2 +- api_docs/saved_objects_tagging.mdx | 2 +- api_docs/saved_objects_tagging_oss.mdx | 2 +- api_docs/saved_search.mdx | 2 +- api_docs/screenshot_mode.mdx | 2 +- api_docs/screenshotting.mdx | 2 +- api_docs/security.mdx | 2 +- api_docs/security_solution.mdx | 2 +- api_docs/session_view.mdx | 2 +- api_docs/share.mdx | 2 +- api_docs/snapshot_restore.mdx | 2 +- api_docs/spaces.mdx | 2 +- api_docs/stack_alerts.mdx | 2 +- api_docs/stack_connectors.mdx | 2 +- api_docs/task_manager.mdx | 2 +- api_docs/telemetry.mdx | 2 +- api_docs/telemetry_collection_manager.mdx | 2 +- api_docs/telemetry_collection_xpack.mdx | 2 +- api_docs/telemetry_management_section.mdx | 2 +- api_docs/threat_intelligence.mdx | 2 +- api_docs/timelines.mdx | 2 +- api_docs/transform.mdx | 2 +- api_docs/triggers_actions_ui.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.devdocs.json | 12 +- api_docs/unified_search.mdx | 4 +- api_docs/unified_search_autocomplete.mdx | 4 +- api_docs/url_forwarding.mdx | 2 +- api_docs/usage_collection.mdx | 2 +- api_docs/ux.mdx | 2 +- api_docs/vis_default_editor.mdx | 2 +- api_docs/vis_type_gauge.mdx | 2 +- api_docs/vis_type_heatmap.mdx | 2 +- api_docs/vis_type_pie.mdx | 2 +- api_docs/vis_type_table.mdx | 2 +- api_docs/vis_type_timelion.mdx | 2 +- api_docs/vis_type_timeseries.mdx | 2 +- api_docs/vis_type_vega.mdx | 2 +- api_docs/vis_type_vislib.mdx | 2 +- api_docs/vis_type_xy.mdx | 2 +- api_docs/visualizations.mdx | 2 +- 462 files changed, 4883 insertions(+), 2908 deletions(-) create mode 100644 api_docs/kbn_apm_synthtrace_client.devdocs.json create mode 100644 api_docs/kbn_apm_synthtrace_client.mdx diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 24b6403aeeab0c..9a314edd7cbfeb 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2023-01-04 +date: 2023-01-05 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 e04f503c998e07..cffccf6775583f 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: 2023-01-04 +date: 2023-01-05 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 95bd61adda0e43..ad1c5efc652ec2 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2023-01-04 +date: 2023-01-05 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 4302ded1c3294a..22ad533ef6beed 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -2224,6 +2224,264 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "alerting", + "id": "def-server.RuleExecutorServices.share", + "type": "Object", + "tags": [], + "label": "share", + "description": [], + "signature": [ + { + "pluginId": "share", + "scope": "server", + "docId": "kibSharePluginApi", + "section": "def-server.SharePluginStart", + "text": "SharePluginStart" + } + ], + "path": "x-pack/plugins/alerting/server/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "alerting", + "id": "def-server.RuleExecutorServices.dataViews", + "type": "Object", + "tags": [], + "label": "dataViews", + "description": [], + "signature": [ + "{ get: (id: string, displayErrors?: boolean, refreshFields?: boolean) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ">; delete: (indexPatternId: string) => Promise<{}>; create: (spec: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" + }, + ", skipFetchFields?: boolean, displayErrors?: boolean) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ">; find: (search: string, size?: number) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + "[]>; getCanSave: () => Promise; getIds: (refresh?: boolean) => Promise; getTitles: (refresh?: boolean) => Promise; getIdsWithTitle: (refresh?: boolean) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewListItem", + "text": "DataViewListItem" + }, + "[]>; clearCache: () => void; clearInstanceCache: (id?: string | undefined) => void; getCache: () => Promise<", + { + "pluginId": "@kbn/core-saved-objects-common", + "scope": "common", + "docId": "kibKbnCoreSavedObjectsCommonPluginApi", + "section": "def-common.SavedObject", + "text": "SavedObject" + }, + "<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSavedObjectAttrs", + "text": "DataViewSavedObjectAttrs" + }, + ">[] | null | undefined>; getDefault: (displayErrors?: boolean) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | null>; getDefaultId: () => Promise; setDefault: (id: string | null, force?: boolean) => Promise; hasUserDataView: () => Promise; getFieldsForWildcard: (options: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.GetFieldsOptions", + "text": "GetFieldsOptions" + }, + ") => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldSpec", + "text": "FieldSpec" + }, + "[]>; getFieldsForIndexPattern: (indexPattern: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" + }, + ", options?: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.GetFieldsOptions", + "text": "GetFieldsOptions" + }, + " | undefined) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldSpec", + "text": "FieldSpec" + }, + "[]>; refreshFields: (dataView: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ", displayErrors?: boolean) => Promise; fieldArrayToMap: (fields: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldSpec", + "text": "FieldSpec" + }, + "[], fieldAttrs?: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldAttrs", + "text": "FieldAttrs" + }, + " | undefined) => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewFieldMap", + "text": "DataViewFieldMap" + }, + "; savedObjectToSpec: (savedObject: ", + { + "pluginId": "@kbn/core-saved-objects-common", + "scope": "common", + "docId": "kibKbnCoreSavedObjectsCommonPluginApi", + "section": "def-common.SavedObject", + "text": "SavedObject" + }, + "<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + }, + ">) => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" + }, + "; createAndSave: (spec: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" + }, + ", override?: boolean, skipFetchFields?: boolean, displayErrors?: boolean) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ">; createSavedObject: (dataView: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ", override?: boolean, displayErrors?: boolean) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ">; updateSavedObject: (indexPattern: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ", saveAttempts?: number, ignoreErrors?: boolean, displayErrors?: boolean) => Promise; getDefaultDataView: (refreshFields?: boolean | undefined) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | null>; }" + ], + "path": "x-pack/plugins/alerting/server/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "alerting", "id": "def-server.RuleExecutorServices.ruleResultService", diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 4f8a813679ede4..7ca707e2891145 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2023-01-04 +date: 2023-01-05 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 | |-------------------|-----------|------------------------|-----------------| -| 427 | 0 | 418 | 37 | +| 429 | 0 | 420 | 37 | ## Client diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 407b05b267afa8..bda332991298ba 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2023-01-04 +date: 2023-01-05 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 a25547c4b0851b..67c42fe932589f 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2023-01-04 +date: 2023-01-05 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 34848b468dcfca..97bfc57d407fdc 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2023-01-04 +date: 2023-01-05 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 e51eda030f5e95..e971e64e64f4a3 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2023-01-04 +date: 2023-01-05 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 0f9b5e192166d6..3145f7db6b8b01 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2023-01-04 +date: 2023-01-05 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 e5fb7aaa4d87ca..12b42b49ba666d 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2023-01-04 +date: 2023-01-05 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 bb37b0014aeb58..8dd9e1dab3427a 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2023-01-04 +date: 2023-01-05 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 37002e6ffd2c80..6b37e1e6f1a89d 100644 --- a/api_docs/cloud_chat.mdx +++ b/api_docs/cloud_chat.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudChat title: "cloudChat" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudChat plugin -date: 2023-01-04 +date: 2023-01-05 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 eea36c4cdb43c3..10d35fce930cb9 100644 --- a/api_docs/cloud_data_migration.mdx +++ b/api_docs/cloud_data_migration.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDataMigration title: "cloudDataMigration" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDataMigration plugin -date: 2023-01-04 +date: 2023-01-05 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 50d3956eb43c1b..7007471ded9aa6 100644 --- a/api_docs/cloud_defend.mdx +++ b/api_docs/cloud_defend.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDefend title: "cloudDefend" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDefend plugin -date: 2023-01-04 +date: 2023-01-05 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 3fd804ef8c053f..893683a22a7063 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2023-01-04 +date: 2023-01-05 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 3e6feac64cd674..a5d6d0a1a121b6 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2023-01-04 +date: 2023-01-05 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 284aaff95027fb..3e3f48c5acef13 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2023-01-04 +date: 2023-01-05 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 6e8f9b189d9056..ca361337d930fd 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/core.mdx b/api_docs/core.mdx index ac9e75a07d9b34..030227fcad6c26 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: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core'] --- import coreObj from './core.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 94f1c5f29d198d..f6b32fd0e50a7b 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2023-01-04 +date: 2023-01-05 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 065c387b07d065..5a525aeace8ef6 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2023-01-04 +date: 2023-01-05 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 58867a97ac5f8e..f14fe272afe883 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.mdx b/api_docs/data.mdx index ce34878bc7a599..33b98e63ee55ae 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 92b46defff429b..b5059301441e68 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2023-01-04 +date: 2023-01-05 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 466be032e56690..6720fdad8edf39 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2023-01-04 +date: 2023-01-05 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 57fdbd91b3770e..d147b7793f1445 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2023-01-04 +date: 2023-01-05 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 b402b16da7e47f..0339f0b7a1c7ef 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; @@ -21,7 +21,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 60 | 0 | 30 | 0 | +| 72 | 0 | 33 | 0 | ## Client diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index 7eae28f943c223..1f636ebaa8fcf2 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 97ce07ad998bcc..adc7abc4cbbdc3 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2023-01-04 +date: 2023-01-05 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 15b7673b685334..48c29d59ccf7db 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2023-01-04 +date: 2023-01-05 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 3efdb1c767c624..0b9056926866ed 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -60,7 +60,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | visTypeTimeseries, graph, dataViewManagement, dataViews | - | | | visTypeTimeseries, graph, dataViewManagement, dataViews | - | | | visTypeTimeseries, graph, dataViewManagement | - | -| | observability, dataVisualizer, fleet, cloudSecurityPosture, discoverEnhanced, osquery, synthetics | - | +| | observability, dataVisualizer, fleet, cloudSecurityPosture, discoverEnhanced, osquery, synthetics | - | | | dataViewManagement, dataViews | - | | | dataViews, dataViewManagement | - | | | dataViewManagement, dataViews | - | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 97cff5b465e0be..7f96964e2627f3 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -310,7 +310,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [overview_tab.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/overview_tab.tsx#:~:text=indexPatternId) | - | +| | [overview_tab.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/overview_tab.tsx#:~:text=indexPatternId) | - | @@ -433,7 +433,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [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) | - | +| | [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) | - | @@ -460,7 +460,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=indexPatternId), [explore_data_chart_action.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.ts#:~:text=indexPatternId) | - | +| | [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=indexPatternId), [explore_data_chart_action.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.ts#:~:text=indexPatternId) | - | @@ -521,7 +521,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [filter_dataset.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx#:~:text=title), [filter_log_level.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx#:~:text=title), [query_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx#:~:text=title), [filter_dataset.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx#:~:text=title), [filter_log_level.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx#:~:text=title), [query_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx#:~:text=title) | - | | | [filter_dataset.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx#:~:text=title), [filter_log_level.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx#:~:text=title), [query_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx#:~:text=title), [filter_dataset.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx#:~:text=title), [filter_log_level.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx#:~:text=title), [query_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx#:~:text=title) | - | | | [filter_dataset.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx#:~:text=title), [filter_log_level.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx#:~:text=title), [query_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx#:~:text=title) | - | -| | [use_get_logs_discover_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/hooks/use_get_logs_discover_link.tsx#:~:text=indexPatternId) | - | +| | [use_get_logs_discover_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/hooks/use_get_logs_discover_link.tsx#:~:text=indexPatternId) | - | | | [tutorial_directory_header_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/components/home_integration/tutorial_directory_header_link.tsx#:~:text=RedirectAppLinks), [tutorial_directory_header_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/components/home_integration/tutorial_directory_header_link.tsx#:~:text=RedirectAppLinks), [tutorial_directory_header_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/components/home_integration/tutorial_directory_header_link.tsx#:~:text=RedirectAppLinks), [custom_assets_accordion.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/components/custom_assets_accordion.tsx#:~:text=RedirectAppLinks), [custom_assets_accordion.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/components/custom_assets_accordion.tsx#:~:text=RedirectAppLinks), [custom_assets_accordion.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/components/custom_assets_accordion.tsx#:~:text=RedirectAppLinks), [agent_logs.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx#:~:text=RedirectAppLinks), [agent_logs.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx#:~:text=RedirectAppLinks), [agent_logs.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx#:~:text=RedirectAppLinks), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/integrations/app.tsx#:~:text=RedirectAppLinks)+ 5 more | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | 8.8.0 | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | 8.8.0 | @@ -742,7 +742,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [observability_data_views.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts#:~:text=title), [report_definition_field.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_field.tsx#:~:text=title), [use_filter_values.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts#:~:text=title), [filter_value_btn.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx#:~:text=title), [sample_attribute.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute.ts#:~:text=title), [sample_attribute_kpi.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts#:~:text=title), [sample_attribute_with_reference_lines.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_with_reference_lines.ts#:~:text=title), [test_formula_metric_attribute.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/test_formula_metric_attribute.ts#:~:text=title), [single_metric_attributes.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts#:~:text=title), [single_metric_attributes.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts#:~:text=title)+ 14 more | - | | | [observability_data_views.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts#:~:text=title), [report_definition_field.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_field.tsx#:~:text=title), [use_filter_values.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts#:~:text=title), [filter_value_btn.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx#:~:text=title), [sample_attribute.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute.ts#:~:text=title), [sample_attribute_kpi.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts#:~:text=title), [sample_attribute_with_reference_lines.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_with_reference_lines.ts#:~:text=title), [test_formula_metric_attribute.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/test_formula_metric_attribute.ts#:~:text=title), [single_metric_attributes.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts#:~:text=title), [single_metric_attributes.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts#:~:text=title)+ 14 more | - | | | [observability_data_views.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts#:~:text=title), [report_definition_field.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_field.tsx#:~:text=title), [use_filter_values.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts#:~:text=title), [filter_value_btn.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx#:~:text=title), [sample_attribute.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute.ts#:~:text=title), [sample_attribute_kpi.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts#:~:text=title), [sample_attribute_with_reference_lines.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_with_reference_lines.ts#:~:text=title), [test_formula_metric_attribute.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/test_formula_metric_attribute.ts#:~:text=title), [single_metric_attributes.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts#:~:text=title), [single_metric_attributes.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts#:~:text=title)+ 2 more | - | -| | [use_discover_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_discover_link.tsx#:~:text=indexPatternId) | - | +| | [use_discover_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_discover_link.tsx#:~:text=indexPatternId) | - | | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/application/index.tsx#:~:text=RedirectAppLinks), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/application/index.tsx#:~:text=RedirectAppLinks), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/application/index.tsx#:~:text=RedirectAppLinks) | - | @@ -751,7 +751,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [pack_queries_status_table.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx#:~:text=indexPatternId), [view_results_in_discover.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/discover/view_results_in_discover.tsx#:~:text=indexPatternId), [use_discover_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/common/hooks/use_discover_link.tsx#:~:text=indexPatternId) | - | +| | [pack_queries_status_table.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx#:~:text=indexPatternId), [view_results_in_discover.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/discover/view_results_in_discover.tsx#:~:text=indexPatternId), [use_discover_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/common/hooks/use_discover_link.tsx#:~:text=indexPatternId) | - | | | [empty_state.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/components/empty_state.tsx#:~:text=KibanaPageTemplate), [empty_state.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/components/empty_state.tsx#:~:text=KibanaPageTemplate) | - | @@ -968,7 +968,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [filter_group.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx#:~:text=title), [filters_expression_select.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx#:~:text=title), [filter_group.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx#:~:text=title), [filters_expression_select.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx#:~:text=title) | - | | | [filter_group.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx#:~:text=title), [filters_expression_select.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx#:~:text=title), [filter_group.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx#:~:text=title), [filters_expression_select.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx#:~:text=title) | - | | | [filter_group.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx#:~:text=title), [filters_expression_select.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx#:~:text=title) | - | -| | [stderr_logs.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx#:~:text=indexPatternId) | - | +| | [stderr_logs.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx#:~:text=indexPatternId) | - | | | [alert_messages.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/lib/alert_types/alert_messages.tsx#:~:text=RedirectAppLinks), [alert_messages.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/lib/alert_types/alert_messages.tsx#:~:text=RedirectAppLinks), [alert_messages.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/lib/alert_types/alert_messages.tsx#:~:text=RedirectAppLinks), [uptime_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/app/uptime_app.tsx#:~:text=RedirectAppLinks), [uptime_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/app/uptime_app.tsx#:~:text=RedirectAppLinks), [uptime_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/app/uptime_app.tsx#:~:text=RedirectAppLinks), [synthetics_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/synthetics_app.tsx#:~:text=RedirectAppLinks), [synthetics_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/synthetics_app.tsx#:~:text=RedirectAppLinks), [synthetics_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/synthetics_app.tsx#:~:text=RedirectAppLinks) | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 700f4f8045c668..bb958369d218c7 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 13d80a858faec5..a4b69c5ee5f714 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.devdocs.json b/api_docs/discover.devdocs.json index 12ff50d40da527..af684dd0a989de 100644 --- a/api_docs/discover.devdocs.json +++ b/api_docs/discover.devdocs.json @@ -242,465 +242,660 @@ "interfaces": [ { "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams", + "id": "def-public.DiscoverGridSettings", "type": "Interface", "tags": [], - "label": "DiscoverAppLocatorParams", + "label": "DiscoverGridSettings", "description": [], - "signature": [ - { - "pluginId": "discover", - "scope": "public", - "docId": "kibDiscoverPluginApi", - "section": "def-public.DiscoverAppLocatorParams", - "text": "DiscoverAppLocatorParams" - }, - " extends ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - } - ], - "path": "src/plugins/discover/public/locator.ts", + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.savedSearchId", - "type": "string", + "id": "def-public.DiscoverGridSettings.columns", + "type": "Object", "tags": [], - "label": "savedSearchId", - "description": [ - "\nOptionally set saved search ID." - ], + "label": "columns", + "description": [], "signature": [ - "string | undefined" + "Record | undefined" ], - "path": "src/plugins/discover/public/locator.ts", + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false - }, + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "discover", + "id": "def-public.DiscoverGridSettingsColumn", + "type": "Interface", + "tags": [], + "label": "DiscoverGridSettingsColumn", + "description": [], + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.dataViewId", - "type": "string", + "id": "def-public.DiscoverGridSettingsColumn.width", + "type": "number", "tags": [], - "label": "dataViewId", - "description": [ - "\nOptionally set index pattern / data view ID." - ], + "label": "width", + "description": [], "signature": [ - "string | undefined" + "number | undefined" ], - "path": "src/plugins/discover/public/locator.ts", + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "discover", + "id": "def-public.ISearchEmbeddable", + "type": "Interface", + "tags": [], + "label": "ISearchEmbeddable", + "description": [], + "signature": [ + { + "pluginId": "discover", + "scope": "public", + "docId": "kibDiscoverPluginApi", + "section": "def-public.ISearchEmbeddable", + "text": "ISearchEmbeddable" + }, + " extends ", + { + "pluginId": "embeddable", + "scope": "public", + "docId": "kibEmbeddablePluginApi", + "section": "def-public.IEmbeddable", + "text": "IEmbeddable" + }, + "<", + { + "pluginId": "discover", + "scope": "public", + "docId": "kibDiscoverPluginApi", + "section": "def-public.SearchInput", + "text": "SearchInput" }, + ", ", + "SearchOutput", + ", any>" + ], + "path": "src/plugins/discover/public/embeddable/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.indexPatternId", - "type": "string", - "tags": [ - "deprecated" - ], - "label": "indexPatternId", - "description": [ - "\nDuplication of dataViewId" - ], + "id": "def-public.ISearchEmbeddable.getSavedSearch", + "type": "Function", + "tags": [], + "label": "getSavedSearch", + "description": [], "signature": [ - "string | undefined" + "() => ", + { + "pluginId": "savedSearch", + "scope": "public", + "docId": "kibSavedSearchPluginApi", + "section": "def-public.SavedSearch", + "text": "SavedSearch" + } ], - "path": "src/plugins/discover/public/locator.ts", - "deprecated": true, + "path": "src/plugins/discover/public/embeddable/types.ts", + "deprecated": false, "trackAdoption": false, - "references": [ + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch", + "type": "Interface", + "tags": [], + "label": "SavedSearch", + "description": [], + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.searchSource", + "type": "Object", + "tags": [], + "label": "searchSource", + "description": [], + "signature": [ + "{ create: () => ", { - "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_discover_link.tsx" + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" }, + "; history: ", + "SearchRequest", + "[]; setOverwriteDataViewType: (overwriteType: string | false | undefined) => void; setField: (field: K, value: ", { - "plugin": "dataVisualizer", - "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" }, + "[K]) => ", { - "plugin": "fleet", - "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/hooks/use_get_logs_discover_link.tsx" + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" }, + "; removeField: (field: K) => ", { - "plugin": "discoverEnhanced", - "path": "x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts" + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" }, + "; setFields: (newFields: ", { - "plugin": "discoverEnhanced", - "path": "x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.ts" + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" }, + ") => ", { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx" + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" }, + "; getId: () => string; getFields: () => ", { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/discover/view_results_in_discover.tsx" + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" }, + "; getField: (field: K, recurse?: boolean) => ", { - "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx" - } - ] - }, - { - "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.dataViewSpec", - "type": "Object", - "tags": [], - "label": "dataViewSpec", - "description": [], - "signature": [ + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" + }, + "[K]; getActiveIndexFilter: () => string[]; getOwnField: (field: K) => ", { - "pluginId": "@kbn/es-query", + "pluginId": "data", "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" }, - " | undefined" - ], - "path": "src/plugins/discover/public/locator.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.refreshInterval", - "type": "CompoundType", - "tags": [], - "label": "refreshInterval", - "description": [ - "\nOptionally set the refresh interval." - ], - "signature": [ - "(", + "[K]; createCopy: () => ", { "pluginId": "data", "scope": "common", - "docId": "kibDataQueryPluginApi", - "section": "def-common.RefreshInterval", - "text": "RefreshInterval" + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" }, - " & ", + "; createChild: (options?: {}) => ", { - "pluginId": "@kbn/utility-types", + "pluginId": "data", "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" }, - ") | undefined" - ], - "path": "src/plugins/discover/public/locator.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.filters", - "type": "Array", - "tags": [], - "label": "filters", - "description": [ - "\nOptionally apply filters." - ], - "signature": [ + "; setParent: (parent?: ", { - "pluginId": "@kbn/es-query", + "pluginId": "data", "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" + "docId": "kibDataSearchPluginApi", + "section": "def-common.ISearchSource", + "text": "ISearchSource" }, - "[] | undefined" - ], - "path": "src/plugins/discover/public/locator.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.query", - "type": "CompoundType", - "tags": [], - "label": "query", - "description": [ - "\nOptionally set a query." - ], - "signature": [ + " | undefined, options?: ", { - "pluginId": "@kbn/es-query", + "pluginId": "data", "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceOptions", + "text": "SearchSourceOptions" }, - " | ", + ") => ", { - "pluginId": "@kbn/es-query", + "pluginId": "data", "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" }, - " | undefined" + "; getParent: () => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + " | undefined; fetch$: (options?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceSearchOptions", + "text": "SearchSourceSearchOptions" + }, + ") => ", + "Observable", + "<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IKibanaSearchResponse", + "text": "IKibanaSearchResponse" + }, + "<", + "SearchResponse", + ">>>; fetch: (options?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceSearchOptions", + "text": "SearchSourceSearchOptions" + }, + ") => Promise<", + "SearchResponse", + ">>; onRequestStart: (handler: (searchSource: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + ", options?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceSearchOptions", + "text": "SearchSourceSearchOptions" + }, + " | undefined) => Promise) => void; getSearchRequestBody: () => any; destroy: () => void; getSerializedFields: (recurse?: boolean, includeFields?: boolean) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SerializedSearchSourceFields", + "text": "SerializedSearchSourceFields" + }, + "; serialize: () => { searchSourceJSON: string; references: ", + { + "pluginId": "@kbn/core-saved-objects-common", + "scope": "common", + "docId": "kibKbnCoreSavedObjectsCommonPluginApi", + "section": "def-common.SavedObjectReference", + "text": "SavedObjectReference" + }, + "[]; }; toExpressionAst: ({ asDatatable }?: ExpressionAstOptions) => ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.ExpressionAstExpression", + "text": "ExpressionAstExpression" + }, + "; parseActiveIndexPatternFromQueryString: (queryString: string) => string[]; }" ], - "path": "src/plugins/discover/public/locator.ts", + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.useHash", - "type": "CompoundType", + "id": "def-public.SavedSearch.id", + "type": "string", "tags": [], - "label": "useHash", - "description": [ - "\nIf not given, will use the uiSettings configuration for `storeInSessionStorage`. useHash determines\nwhether to hash the data in the url to avoid url length issues." - ], + "label": "id", + "description": [], "signature": [ - "boolean | undefined" + "string | undefined" ], - "path": "src/plugins/discover/public/locator.ts", + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.searchSessionId", + "id": "def-public.SavedSearch.title", "type": "string", "tags": [], - "label": "searchSessionId", - "description": [ - "\nBackground search session id" - ], + "label": "title", + "description": [], "signature": [ "string | undefined" ], - "path": "src/plugins/discover/public/locator.ts", + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.columns", + "id": "def-public.SavedSearch.sort", "type": "Array", "tags": [], - "label": "columns", - "description": [ - "\nColumns displayed in the table" - ], + "label": "sort", + "description": [], "signature": [ - "string[] | undefined" + "SortOrder", + "[] | undefined" ], - "path": "src/plugins/discover/public/locator.ts", + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.interval", - "type": "string", + "id": "def-public.SavedSearch.columns", + "type": "Array", "tags": [], - "label": "interval", - "description": [ - "\nUsed interval of the histogram" - ], + "label": "columns", + "description": [], "signature": [ - "string | undefined" + "string[] | undefined" ], - "path": "src/plugins/discover/public/locator.ts", + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.sort", - "type": "Array", - "tags": [], - "label": "sort", - "description": [ - "\nArray of the used sorting [[field,direction],...]" + "id": "def-public.SavedSearch.description", + "type": "string", + "tags": [], + "label": "description", + "description": [], + "signature": [ + "string | undefined" ], + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.tags", + "type": "Array", + "tags": [], + "label": "tags", + "description": [], "signature": [ - "string[][] | undefined" + "string[] | undefined" ], - "path": "src/plugins/discover/public/locator.ts", + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.savedQuery", - "type": "string", + "id": "def-public.SavedSearch.grid", + "type": "Object", "tags": [], - "label": "savedQuery", - "description": [ - "\nid of the used saved query" + "label": "grid", + "description": [], + "signature": [ + "{ columns?: Record | undefined; } | undefined" ], + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.hideChart", + "type": "CompoundType", + "tags": [], + "label": "hideChart", + "description": [], "signature": [ - "string | undefined" + "boolean | undefined" + ], + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.sharingSavedObjectProps", + "type": "Object", + "tags": [], + "label": "sharingSavedObjectProps", + "description": [], + "signature": [ + "{ outcome?: \"conflict\" | \"exactMatch\" | \"aliasMatch\" | undefined; aliasTargetId?: string | undefined; aliasPurpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; errorJSON?: string | undefined; } | undefined" ], - "path": "src/plugins/discover/public/locator.ts", + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.viewMode", + "id": "def-public.SavedSearch.viewMode", "type": "CompoundType", "tags": [], "label": "viewMode", - "description": [ - "\nTable view: Documents vs Field Statistics" - ], + "description": [], "signature": [ { - "pluginId": "discover", + "pluginId": "savedSearch", "scope": "public", - "docId": "kibDiscoverPluginApi", + "docId": "kibSavedSearchPluginApi", "section": "def-public.VIEW_MODE", "text": "VIEW_MODE" }, " | undefined" ], - "path": "src/plugins/discover/public/locator.ts", + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.hideAggregatedPreview", + "id": "def-public.SavedSearch.hideAggregatedPreview", "type": "CompoundType", "tags": [], "label": "hideAggregatedPreview", - "description": [ - "\nHide mini distribution/preview charts when in Field Statistics mode" + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.rowHeight", + "type": "number", + "tags": [], + "label": "rowHeight", + "description": [], + "signature": [ + "number | undefined" ], + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.isTextBasedQuery", + "type": "CompoundType", + "tags": [], + "label": "isTextBasedQuery", + "description": [], "signature": [ "boolean | undefined" ], - "path": "src/plugins/discover/public/locator.ts", + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocatorParams.breakdownField", - "type": "string", + "id": "def-public.SavedSearch.usesAdHocDataView", + "type": "CompoundType", "tags": [], - "label": "breakdownField", - "description": [ - "\nBreakdown field" + "label": "usesAdHocDataView", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.timeRestore", + "type": "CompoundType", + "tags": [], + "label": "timeRestore", + "description": [], + "signature": [ + "boolean | undefined" ], + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.timeRange", + "type": "Object", + "tags": [], + "label": "timeRange", + "description": [], "signature": [ - "string | undefined" + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined" ], - "path": "src/plugins/discover/public/locator.ts", + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "discover", - "id": "def-public.DiscoverGridSettings", - "type": "Interface", - "tags": [], - "label": "DiscoverGridSettings", - "description": [], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "discover", - "id": "def-public.DiscoverGridSettings.columns", + "id": "def-public.SavedSearch.refreshInterval", "type": "Object", "tags": [], - "label": "columns", + "label": "refreshInterval", "description": [], "signature": [ - "Record | undefined" + " | undefined" ], "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "discover", - "id": "def-public.DiscoverGridSettingsColumn", - "type": "Interface", - "tags": [], - "label": "DiscoverGridSettingsColumn", - "description": [], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "discover", - "id": "def-public.DiscoverGridSettingsColumn.width", + "id": "def-public.SavedSearch.rowsPerPage", "type": "number", "tags": [], - "label": "width", + "label": "rowsPerPage", "description": [], "signature": [ "number | undefined" @@ -708,44 +903,47 @@ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.breakdownField", + "type": "string", + "tags": [], + "label": "breakdownField", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false }, { "parentPluginId": "discover", - "id": "def-public.ISearchEmbeddable", + "id": "def-public.SearchInput", "type": "Interface", "tags": [], - "label": "ISearchEmbeddable", + "label": "SearchInput", "description": [], "signature": [ { "pluginId": "discover", "scope": "public", "docId": "kibDiscoverPluginApi", - "section": "def-public.ISearchEmbeddable", - "text": "ISearchEmbeddable" + "section": "def-public.SearchInput", + "text": "SearchInput" }, " extends ", { "pluginId": "embeddable", - "scope": "public", + "scope": "common", "docId": "kibEmbeddablePluginApi", - "section": "def-public.IEmbeddable", - "text": "IEmbeddable" - }, - "<", - { - "pluginId": "discover", - "scope": "public", - "docId": "kibDiscoverPluginApi", - "section": "def-public.SearchInput", - "text": "SearchInput" - }, - ", ", - "SearchOutput", - ", any>" + "section": "def-common.EmbeddableInput", + "text": "EmbeddableInput" + } ], "path": "src/plugins/discover/public/embeddable/types.ts", "deprecated": false, @@ -753,748 +951,835 @@ "children": [ { "parentPluginId": "discover", - "id": "def-public.ISearchEmbeddable.getSavedSearch", - "type": "Function", + "id": "def-public.SearchInput.timeRange", + "type": "Object", "tags": [], - "label": "getSavedSearch", + "label": "timeRange", "description": [], "signature": [ - "() => ", - { - "pluginId": "savedSearch", - "scope": "public", - "docId": "kibSavedSearchPluginApi", - "section": "def-public.SavedSearch", - "text": "SavedSearch" - } + "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }" ], "path": "src/plugins/discover/public/embeddable/types.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "discover", - "id": "def-public.SavedSearch", - "type": "Interface", - "tags": [], - "label": "SavedSearch", - "description": [], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "trackAdoption": false + }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.searchSource", + "id": "def-public.SearchInput.timeslice", "type": "Object", "tags": [], - "label": "searchSource", + "label": "timeslice", + "description": [], + "signature": [ + "[number, number] | undefined" + ], + "path": "src/plugins/discover/public/embeddable/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SearchInput.query", + "type": "Object", + "tags": [], + "label": "query", "description": [], "signature": [ - "{ create: () => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSource", - "text": "SearchSource" - }, - "; history: ", - "SearchRequest", - "[]; setOverwriteDataViewType: (overwriteType: string | false | undefined) => void; setField: (field: K, value: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSourceFields", - "text": "SearchSourceFields" - }, - "[K]) => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSource", - "text": "SearchSource" - }, - "; removeField: (field: K) => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSource", - "text": "SearchSource" - }, - "; setFields: (newFields: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSourceFields", - "text": "SearchSourceFields" - }, - ") => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSource", - "text": "SearchSource" - }, - "; getId: () => string; getFields: () => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSourceFields", - "text": "SearchSourceFields" - }, - "; getField: (field: K, recurse?: boolean) => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSourceFields", - "text": "SearchSourceFields" - }, - "[K]; getActiveIndexFilter: () => string[]; getOwnField: (field: K) => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSourceFields", - "text": "SearchSourceFields" - }, - "[K]; createCopy: () => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSource", - "text": "SearchSource" - }, - "; createChild: (options?: {}) => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSource", - "text": "SearchSource" - }, - "; setParent: (parent?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchSource", - "text": "ISearchSource" - }, - " | undefined, options?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSourceOptions", - "text": "SearchSourceOptions" - }, - ") => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSource", - "text": "SearchSource" - }, - "; getParent: () => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSource", - "text": "SearchSource" - }, - " | undefined; fetch$: (options?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSourceSearchOptions", - "text": "SearchSourceSearchOptions" - }, - ") => ", - "Observable", - "<", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchResponse", - "text": "IKibanaSearchResponse" - }, - "<", - "SearchResponse", - ">>>; fetch: (options?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSourceSearchOptions", - "text": "SearchSourceSearchOptions" - }, - ") => Promise<", - "SearchResponse", - ">>; onRequestStart: (handler: (searchSource: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSource", - "text": "SearchSource" - }, - ", options?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSourceSearchOptions", - "text": "SearchSourceSearchOptions" - }, - " | undefined) => Promise) => void; getSearchRequestBody: () => any; destroy: () => void; getSerializedFields: (recurse?: boolean, includeFields?: boolean) => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SerializedSearchSourceFields", - "text": "SerializedSearchSourceFields" - }, - "; serialize: () => { searchSourceJSON: string; references: ", { - "pluginId": "@kbn/core-saved-objects-common", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnCoreSavedObjectsCommonPluginApi", - "section": "def-common.SavedObjectReference", - "text": "SavedObjectReference" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" }, - "[]; }; toExpressionAst: ({ asDatatable }?: ExpressionAstOptions) => ", + " | undefined" + ], + "path": "src/plugins/discover/public/embeddable/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SearchInput.filters", + "type": "Array", + "tags": [], + "label": "filters", + "description": [], + "signature": [ { - "pluginId": "expressions", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.ExpressionAstExpression", - "text": "ExpressionAstExpression" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - "; parseActiveIndexPatternFromQueryString: (queryString: string) => string[]; }" + "[] | undefined" ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "path": "src/plugins/discover/public/embeddable/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.id", - "type": "string", + "id": "def-public.SearchInput.hidePanelTitles", + "type": "CompoundType", "tags": [], - "label": "id", + "label": "hidePanelTitles", "description": [], "signature": [ - "string | undefined" + "boolean | undefined" ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "path": "src/plugins/discover/public/embeddable/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SearchInput.columns", + "type": "Array", + "tags": [], + "label": "columns", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "src/plugins/discover/public/embeddable/types.ts", "deprecated": false, "trackAdoption": false }, { - "parentPluginId": "discover", - "id": "def-public.SavedSearch.title", - "type": "string", - "tags": [], - "label": "title", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", - "deprecated": false, - "trackAdoption": false + "parentPluginId": "discover", + "id": "def-public.SearchInput.sort", + "type": "Array", + "tags": [], + "label": "sort", + "description": [], + "signature": [ + "SortOrder", + "[] | undefined" + ], + "path": "src/plugins/discover/public/embeddable/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SearchInput.rowHeight", + "type": "number", + "tags": [], + "label": "rowHeight", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "src/plugins/discover/public/embeddable/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SearchInput.rowsPerPage", + "type": "number", + "tags": [], + "label": "rowsPerPage", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "src/plugins/discover/public/embeddable/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [ + { + "parentPluginId": "discover", + "id": "def-public.VIEW_MODE", + "type": "Enum", + "tags": [], + "label": "VIEW_MODE", + "description": [], + "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "misc": [ + { + "parentPluginId": "discover", + "id": "def-public.SEARCH_EMBEDDABLE_TYPE", + "type": "string", + "tags": [], + "label": "SEARCH_EMBEDDABLE_TYPE", + "description": [], + "signature": [ + "\"search\"" + ], + "path": "src/plugins/discover/common/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [], + "setup": { + "parentPluginId": "discover", + "id": "def-public.DiscoverSetup", + "type": "Interface", + "tags": [], + "label": "DiscoverSetup", + "description": [], + "path": "src/plugins/discover/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "discover", + "id": "def-public.DiscoverSetup.docViews", + "type": "Object", + "tags": [], + "label": "docViews", + "description": [], + "signature": [ + "{ addDocView(docViewRaw: ", + "DocViewInput", + " | ", + "DocViewInputFn", + "): void; }" + ], + "path": "src/plugins/discover/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "discover", + "id": "def-public.DiscoverSetup.locator", + "type": "Object", + "tags": [], + "label": "locator", + "description": [ + "\n`share` plugin URL locator for Discover app. Use it to generate links into\nDiscover application, for example, navigate:\n\n```ts\nawait plugins.discover.locator.navigate({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```\n\nGenerate a location:\n\n```ts\nconst location = await plugins.discover.locator.getLocation({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```" + ], + "signature": [ + { + "pluginId": "discover", + "scope": "common", + "docId": "kibDiscoverPluginApi", + "section": "def-common.DiscoverAppLocator", + "text": "DiscoverAppLocator" + }, + " | undefined" + ], + "path": "src/plugins/discover/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "lifecycle": "setup", + "initialIsOpen": true + }, + "start": { + "parentPluginId": "discover", + "id": "def-public.DiscoverStart", + "type": "Interface", + "tags": [], + "label": "DiscoverStart", + "description": [], + "path": "src/plugins/discover/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "discover", + "id": "def-public.DiscoverStart.locator", + "type": "Object", + "tags": [], + "label": "locator", + "description": [ + "\n`share` plugin URL locator for Discover app. Use it to generate links into\nDiscover application, for example, navigate:\n\n```ts\nawait plugins.discover.locator.navigate({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```\n\nGenerate a location:\n\n```ts\nconst location = await plugins.discover.locator.getLocation({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```" + ], + "signature": [ + { + "pluginId": "discover", + "scope": "common", + "docId": "kibDiscoverPluginApi", + "section": "def-common.DiscoverAppLocator", + "text": "DiscoverAppLocator" + }, + " | undefined" + ], + "path": "src/plugins/discover/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "lifecycle": "start", + "initialIsOpen": true + } + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [ + { + "parentPluginId": "discover", + "id": "def-common.DiscoverAppLocatorDefinition", + "type": "Class", + "tags": [], + "label": "DiscoverAppLocatorDefinition", + "description": [], + "signature": [ + { + "pluginId": "discover", + "scope": "common", + "docId": "kibDiscoverPluginApi", + "section": "def-common.DiscoverAppLocatorDefinition", + "text": "DiscoverAppLocatorDefinition" }, + " implements ", { - "parentPluginId": "discover", - "id": "def-public.SavedSearch.sort", - "type": "Array", - "tags": [], - "label": "sort", - "description": [], - "signature": [ - "SortOrder", - "[] | undefined" - ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", - "deprecated": false, - "trackAdoption": false + "pluginId": "share", + "scope": "common", + "docId": "kibSharePluginApi", + "section": "def-common.LocatorDefinition", + "text": "LocatorDefinition" }, + "<", { - "parentPluginId": "discover", - "id": "def-public.SavedSearch.columns", - "type": "Array", - "tags": [], - "label": "columns", - "description": [], - "signature": [ - "string[] | undefined" - ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", - "deprecated": false, - "trackAdoption": false + "pluginId": "discover", + "scope": "common", + "docId": "kibDiscoverPluginApi", + "section": "def-common.DiscoverAppLocatorParams", + "text": "DiscoverAppLocatorParams" }, + ">" + ], + "path": "src/plugins/discover/common/locator.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "discover", - "id": "def-public.SavedSearch.description", + "id": "def-common.DiscoverAppLocatorDefinition.id", "type": "string", "tags": [], - "label": "description", + "label": "id", "description": [], "signature": [ - "string | undefined" + "\"DISCOVER_APP_LOCATOR\"" ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.tags", - "type": "Array", + "id": "def-common.DiscoverAppLocatorDefinition.Unnamed", + "type": "Function", "tags": [], - "label": "tags", + "label": "Constructor", "description": [], "signature": [ - "string[] | undefined" + "any" ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "discover", + "id": "def-common.DiscoverAppLocatorDefinition.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "deps", + "description": [], + "signature": [ + "DiscoverAppLocatorDependencies" + ], + "path": "src/plugins/discover/common/locator.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.grid", - "type": "Object", + "id": "def-common.DiscoverAppLocatorDefinition.getLocation", + "type": "Function", "tags": [], - "label": "grid", + "label": "getLocation", "description": [], "signature": [ - "{ columns?: Record | undefined; } | undefined" + ") => Promise<{ app: string; path: string; state: ", + "MainHistoryLocationState", + "; }>" ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "discover", + "id": "def-common.DiscoverAppLocatorDefinition.getLocation.$1", + "type": "Object", + "tags": [], + "label": "params", + "description": [], + "signature": [ + { + "pluginId": "discover", + "scope": "common", + "docId": "kibDiscoverPluginApi", + "section": "def-common.DiscoverAppLocatorParams", + "text": "DiscoverAppLocatorParams" + } + ], + "path": "src/plugins/discover/common/locator.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [], + "interfaces": [ + { + "parentPluginId": "discover", + "id": "def-common.DiscoverAppLocatorParams", + "type": "Interface", + "tags": [], + "label": "DiscoverAppLocatorParams", + "description": [], + "signature": [ + { + "pluginId": "discover", + "scope": "common", + "docId": "kibDiscoverPluginApi", + "section": "def-common.DiscoverAppLocatorParams", + "text": "DiscoverAppLocatorParams" }, + " extends ", + { + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.SerializableRecord", + "text": "SerializableRecord" + } + ], + "path": "src/plugins/discover/common/locator.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "discover", - "id": "def-public.SavedSearch.hideChart", - "type": "CompoundType", + "id": "def-common.DiscoverAppLocatorParams.savedSearchId", + "type": "string", "tags": [], - "label": "hideChart", - "description": [], + "label": "savedSearchId", + "description": [ + "\nOptionally set saved search ID." + ], "signature": [ - "boolean | undefined" + "string | undefined" ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.sharingSavedObjectProps", - "type": "Object", + "id": "def-common.DiscoverAppLocatorParams.dataViewId", + "type": "string", "tags": [], - "label": "sharingSavedObjectProps", - "description": [], + "label": "dataViewId", + "description": [ + "\nOptionally set index pattern / data view ID." + ], "signature": [ - "{ outcome?: \"conflict\" | \"exactMatch\" | \"aliasMatch\" | undefined; aliasTargetId?: string | undefined; aliasPurpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; errorJSON?: string | undefined; } | undefined" + "string | undefined" ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.viewMode", - "type": "CompoundType", - "tags": [], - "label": "viewMode", - "description": [], + "id": "def-common.DiscoverAppLocatorParams.indexPatternId", + "type": "string", + "tags": [ + "deprecated" + ], + "label": "indexPatternId", + "description": [ + "\nDuplication of dataViewId" + ], "signature": [ + "string | undefined" + ], + "path": "src/plugins/discover/common/locator.ts", + "deprecated": true, + "trackAdoption": false, + "references": [ { - "pluginId": "savedSearch", - "scope": "public", - "docId": "kibSavedSearchPluginApi", - "section": "def-public.VIEW_MODE", - "text": "VIEW_MODE" + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_discover_link.tsx" }, - " | undefined" - ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", - "deprecated": false, - "trackAdoption": false + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/hooks/use_get_logs_discover_link.tsx" + }, + { + "plugin": "cloudSecurityPosture", + "path": "x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/overview_tab.tsx" + }, + { + "plugin": "discoverEnhanced", + "path": "x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts" + }, + { + "plugin": "discoverEnhanced", + "path": "x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.ts" + }, + { + "plugin": "osquery", + "path": "x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx" + }, + { + "plugin": "osquery", + "path": "x-pack/plugins/osquery/public/discover/view_results_in_discover.tsx" + }, + { + "plugin": "osquery", + "path": "x-pack/plugins/osquery/public/common/hooks/use_discover_link.tsx" + }, + { + "plugin": "synthetics", + "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx" + } + ] }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.hideAggregatedPreview", - "type": "CompoundType", + "id": "def-common.DiscoverAppLocatorParams.dataViewSpec", + "type": "Object", "tags": [], - "label": "hideAggregatedPreview", + "label": "dataViewSpec", "description": [], "signature": [ - "boolean | undefined" + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" + }, + " | undefined" ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.rowHeight", - "type": "number", + "id": "def-common.DiscoverAppLocatorParams.timeRange", + "type": "Object", "tags": [], - "label": "rowHeight", - "description": [], - "signature": [ - "number | undefined" + "label": "timeRange", + "description": [ + "\nOptionally set the time range in the time picker." ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "discover", - "id": "def-public.SavedSearch.isTextBasedQuery", - "type": "CompoundType", - "tags": [], - "label": "isTextBasedQuery", - "description": [], "signature": [ - "boolean | undefined" + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined" ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.usesAdHocDataView", + "id": "def-common.DiscoverAppLocatorParams.refreshInterval", "type": "CompoundType", "tags": [], - "label": "usesAdHocDataView", - "description": [], - "signature": [ - "boolean | undefined" + "label": "refreshInterval", + "description": [ + "\nOptionally set the refresh interval." ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "discover", - "id": "def-public.SavedSearch.timeRestore", - "type": "CompoundType", - "tags": [], - "label": "timeRestore", - "description": [], "signature": [ - "boolean | undefined" + "(", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.RefreshInterval", + "text": "RefreshInterval" + }, + " & ", + { + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.SerializableRecord", + "text": "SerializableRecord" + }, + ") | undefined" ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.timeRange", - "type": "Object", + "id": "def-common.DiscoverAppLocatorParams.filters", + "type": "Array", "tags": [], - "label": "timeRange", - "description": [], + "label": "filters", + "description": [ + "\nOptionally apply filters." + ], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibDataQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined" + "[] | undefined" ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.refreshInterval", - "type": "Object", + "id": "def-common.DiscoverAppLocatorParams.query", + "type": "CompoundType", "tags": [], - "label": "refreshInterval", - "description": [], + "label": "query", + "description": [ + "\nOptionally set a query." + ], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibDataQueryPluginApi", - "section": "def-common.RefreshInterval", - "text": "RefreshInterval" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" }, " | undefined" ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.rowsPerPage", - "type": "number", + "id": "def-common.DiscoverAppLocatorParams.useHash", + "type": "CompoundType", "tags": [], - "label": "rowsPerPage", - "description": [], + "label": "useHash", + "description": [ + "\nIf not given, will use the uiSettings configuration for `storeInSessionStorage`. useHash determines\nwhether to hash the data in the url to avoid url length issues." + ], "signature": [ - "number | undefined" + "boolean | undefined" ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.breakdownField", + "id": "def-common.DiscoverAppLocatorParams.searchSessionId", "type": "string", "tags": [], - "label": "breakdownField", - "description": [], + "label": "searchSessionId", + "description": [ + "\nBackground search session id" + ], "signature": [ "string | undefined" ], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "discover", - "id": "def-public.SearchInput", - "type": "Interface", - "tags": [], - "label": "SearchInput", - "description": [], - "signature": [ - { - "pluginId": "discover", - "scope": "public", - "docId": "kibDiscoverPluginApi", - "section": "def-public.SearchInput", - "text": "SearchInput" }, - " extends ", - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddableInput", - "text": "EmbeddableInput" - } - ], - "path": "src/plugins/discover/public/embeddable/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { "parentPluginId": "discover", - "id": "def-public.SearchInput.timeRange", - "type": "Object", + "id": "def-common.DiscoverAppLocatorParams.columns", + "type": "Array", "tags": [], - "label": "timeRange", - "description": [], - "signature": [ - "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }" + "label": "columns", + "description": [ + "\nColumns displayed in the table" ], - "path": "src/plugins/discover/public/embeddable/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "discover", - "id": "def-public.SearchInput.timeslice", - "type": "Object", - "tags": [], - "label": "timeslice", - "description": [], "signature": [ - "[number, number] | undefined" + "string[] | undefined" ], - "path": "src/plugins/discover/public/embeddable/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SearchInput.query", - "type": "Object", + "id": "def-common.DiscoverAppLocatorParams.interval", + "type": "string", "tags": [], - "label": "query", - "description": [], + "label": "interval", + "description": [ + "\nUsed interval of the histogram" + ], "signature": [ - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | undefined" + "string | undefined" ], - "path": "src/plugins/discover/public/embeddable/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SearchInput.filters", + "id": "def-common.DiscoverAppLocatorParams.sort", "type": "Array", "tags": [], - "label": "filters", - "description": [], + "label": "sort", + "description": [ + "\nArray of the used sorting [[field,direction],...]" + ], "signature": [ - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined" + "string[][] | undefined" ], - "path": "src/plugins/discover/public/embeddable/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SearchInput.hidePanelTitles", - "type": "CompoundType", + "id": "def-common.DiscoverAppLocatorParams.savedQuery", + "type": "string", "tags": [], - "label": "hidePanelTitles", - "description": [], + "label": "savedQuery", + "description": [ + "\nid of the used saved query" + ], "signature": [ - "boolean | undefined" + "string | undefined" ], - "path": "src/plugins/discover/public/embeddable/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SearchInput.columns", - "type": "Array", + "id": "def-common.DiscoverAppLocatorParams.viewMode", + "type": "CompoundType", "tags": [], - "label": "columns", - "description": [], + "label": "viewMode", + "description": [ + "\nTable view: Documents vs Field Statistics" + ], "signature": [ - "string[] | undefined" + "VIEW_MODE", + " | undefined" ], - "path": "src/plugins/discover/public/embeddable/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SearchInput.sort", - "type": "Array", + "id": "def-common.DiscoverAppLocatorParams.hideAggregatedPreview", + "type": "CompoundType", "tags": [], - "label": "sort", - "description": [], + "label": "hideAggregatedPreview", + "description": [ + "\nHide mini distribution/preview charts when in Field Statistics mode" + ], "signature": [ - "SortOrder", - "[] | undefined" + "boolean | undefined" ], - "path": "src/plugins/discover/public/embeddable/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SearchInput.rowHeight", - "type": "number", + "id": "def-common.DiscoverAppLocatorParams.breakdownField", + "type": "string", "tags": [], - "label": "rowHeight", - "description": [], + "label": "breakdownField", + "description": [ + "\nBreakdown field" + ], "signature": [ - "number | undefined" + "string | undefined" ], - "path": "src/plugins/discover/public/embeddable/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "discover", - "id": "def-public.SearchInput.rowsPerPage", - "type": "number", + "id": "def-common.DiscoverAppLocatorParams.isAlertResults", + "type": "CompoundType", "tags": [], - "label": "rowsPerPage", - "description": [], + "label": "isAlertResults", + "description": [ + "\nUsed when navigating to particular alert results" + ], "signature": [ - "number | undefined" + "boolean | undefined" ], - "path": "src/plugins/discover/public/embeddable/types.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false } @@ -1502,201 +1787,47 @@ "initialIsOpen": false } ], - "enums": [ - { - "parentPluginId": "discover", - "id": "def-public.VIEW_MODE", - "type": "Enum", - "tags": [], - "label": "VIEW_MODE", - "description": [], - "path": "src/plugins/saved_search/public/services/saved_searches/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - } - ], + "enums": [], "misc": [ { "parentPluginId": "discover", - "id": "def-public.DISCOVER_APP_LOCATOR", + "id": "def-common.APP_ICON", "type": "string", "tags": [], - "label": "DISCOVER_APP_LOCATOR", - "description": [], - "signature": [ - "\"DISCOVER_APP_LOCATOR\"" - ], - "path": "src/plugins/discover/public/locator.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "discover", - "id": "def-public.DiscoverAppLocator", - "type": "Type", - "tags": [], - "label": "DiscoverAppLocator", + "label": "APP_ICON", "description": [], "signature": [ - { - "pluginId": "share", - "scope": "common", - "docId": "kibSharePluginApi", - "section": "def-common.LocatorPublic", - "text": "LocatorPublic" - }, - "<", - { - "pluginId": "discover", - "scope": "public", - "docId": "kibDiscoverPluginApi", - "section": "def-public.DiscoverAppLocatorParams", - "text": "DiscoverAppLocatorParams" - }, - ">" + "\"discoverApp\"" ], - "path": "src/plugins/discover/public/locator.ts", + "path": "src/plugins/discover/common/index.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "discover", - "id": "def-public.SEARCH_EMBEDDABLE_TYPE", + "id": "def-common.CONTEXT_DEFAULT_SIZE_SETTING", "type": "string", "tags": [], - "label": "SEARCH_EMBEDDABLE_TYPE", + "label": "CONTEXT_DEFAULT_SIZE_SETTING", "description": [], "signature": [ - "\"search\"" + "\"context:defaultSize\"" ], "path": "src/plugins/discover/common/index.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false - } - ], - "objects": [], - "setup": { - "parentPluginId": "discover", - "id": "def-public.DiscoverSetup", - "type": "Interface", - "tags": [], - "label": "DiscoverSetup", - "description": [], - "path": "src/plugins/discover/public/plugin.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "discover", - "id": "def-public.DiscoverSetup.docViews", - "type": "Object", - "tags": [], - "label": "docViews", - "description": [], - "signature": [ - "{ addDocView(docViewRaw: ", - "DocViewInput", - " | ", - "DocViewInputFn", - "): void; }" - ], - "path": "src/plugins/discover/public/plugin.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "discover", - "id": "def-public.DiscoverSetup.locator", - "type": "Object", - "tags": [], - "label": "locator", - "description": [ - "\n`share` plugin URL locator for Discover app. Use it to generate links into\nDiscover application, for example, navigate:\n\n```ts\nawait plugins.discover.locator.navigate({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```\n\nGenerate a location:\n\n```ts\nconst location = await plugins.discover.locator.getLocation({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```" - ], - "signature": [ - { - "pluginId": "discover", - "scope": "public", - "docId": "kibDiscoverPluginApi", - "section": "def-public.DiscoverAppLocator", - "text": "DiscoverAppLocator" - }, - " | undefined" - ], - "path": "src/plugins/discover/public/plugin.tsx", - "deprecated": false, - "trackAdoption": false - } - ], - "lifecycle": "setup", - "initialIsOpen": true - }, - "start": { - "parentPluginId": "discover", - "id": "def-public.DiscoverStart", - "type": "Interface", - "tags": [], - "label": "DiscoverStart", - "description": [], - "path": "src/plugins/discover/public/plugin.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "discover", - "id": "def-public.DiscoverStart.locator", - "type": "Object", - "tags": [], - "label": "locator", - "description": [ - "\n`share` plugin URL locator for Discover app. Use it to generate links into\nDiscover application, for example, navigate:\n\n```ts\nawait plugins.discover.locator.navigate({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```\n\nGenerate a location:\n\n```ts\nconst location = await plugins.discover.locator.getLocation({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```" - ], - "signature": [ - { - "pluginId": "discover", - "scope": "public", - "docId": "kibDiscoverPluginApi", - "section": "def-public.DiscoverAppLocator", - "text": "DiscoverAppLocator" - }, - " | undefined" - ], - "path": "src/plugins/discover/public/plugin.tsx", - "deprecated": false, - "trackAdoption": false - } - ], - "lifecycle": "start", - "initialIsOpen": true - } - }, - "server": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [ + }, { "parentPluginId": "discover", - "id": "def-common.APP_ICON", + "id": "def-common.CONTEXT_STEP_SETTING", "type": "string", "tags": [], - "label": "APP_ICON", + "label": "CONTEXT_STEP_SETTING", "description": [], "signature": [ - "\"discoverApp\"" + "\"context:step\"" ], "path": "src/plugins/discover/common/index.ts", "deprecated": false, @@ -1705,13 +1836,13 @@ }, { "parentPluginId": "discover", - "id": "def-common.CONTEXT_DEFAULT_SIZE_SETTING", + "id": "def-common.CONTEXT_TIE_BREAKER_FIELDS_SETTING", "type": "string", "tags": [], - "label": "CONTEXT_DEFAULT_SIZE_SETTING", + "label": "CONTEXT_TIE_BREAKER_FIELDS_SETTING", "description": [], "signature": [ - "\"context:defaultSize\"" + "\"context:tieBreakerFields\"" ], "path": "src/plugins/discover/common/index.ts", "deprecated": false, @@ -1720,13 +1851,13 @@ }, { "parentPluginId": "discover", - "id": "def-common.CONTEXT_STEP_SETTING", + "id": "def-common.DEFAULT_COLUMNS_SETTING", "type": "string", "tags": [], - "label": "CONTEXT_STEP_SETTING", + "label": "DEFAULT_COLUMNS_SETTING", "description": [], "signature": [ - "\"context:step\"" + "\"defaultColumns\"" ], "path": "src/plugins/discover/common/index.ts", "deprecated": false, @@ -1735,30 +1866,45 @@ }, { "parentPluginId": "discover", - "id": "def-common.CONTEXT_TIE_BREAKER_FIELDS_SETTING", + "id": "def-common.DISCOVER_APP_LOCATOR", "type": "string", "tags": [], - "label": "CONTEXT_TIE_BREAKER_FIELDS_SETTING", + "label": "DISCOVER_APP_LOCATOR", "description": [], "signature": [ - "\"context:tieBreakerFields\"" + "\"DISCOVER_APP_LOCATOR\"" ], - "path": "src/plugins/discover/common/index.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "discover", - "id": "def-common.DEFAULT_COLUMNS_SETTING", - "type": "string", + "id": "def-common.DiscoverAppLocator", + "type": "Type", "tags": [], - "label": "DEFAULT_COLUMNS_SETTING", + "label": "DiscoverAppLocator", "description": [], "signature": [ - "\"defaultColumns\"" + { + "pluginId": "share", + "scope": "common", + "docId": "kibSharePluginApi", + "section": "def-common.LocatorPublic", + "text": "LocatorPublic" + }, + "<", + { + "pluginId": "discover", + "scope": "common", + "docId": "kibDiscoverPluginApi", + "section": "def-common.DiscoverAppLocatorParams", + "text": "DiscoverAppLocatorParams" + }, + ">" ], - "path": "src/plugins/discover/common/index.ts", + "path": "src/plugins/discover/common/locator.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index a6249b28e0f462..af3cab452d47d8 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-disco | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 100 | 0 | 82 | 4 | +| 107 | 0 | 88 | 7 | ## Client @@ -45,6 +45,12 @@ Contact [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-disco ## Common +### Classes + + +### Interfaces + + ### Consts, variables and types diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index b161948747b78b..3d2f4b36f6b3c0 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2023-01-04 +date: 2023-01-05 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 d4a1e2121e3163..37018c7217814e 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2023-01-04 +date: 2023-01-05 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 5f9143e3259953..a5706efadac985 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2023-01-04 +date: 2023-01-05 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 590ae392d53fb3..d813f49bfc7871 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2023-01-04 +date: 2023-01-05 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 81e2a3ba99fbc1..e9aa09a0baf16d 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2023-01-04 +date: 2023-01-05 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 49e3de1a4dd6e1..52f8d5f914e44c 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2023-01-04 +date: 2023-01-05 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 d9818cbfcf965b..30cdc88c6e76fd 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2023-01-04 +date: 2023-01-05 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 829df1d6d19c78..ea37966eb4b11b 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2023-01-04 +date: 2023-01-05 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 d702fad53f9957..9904837efa4a7c 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2023-01-04 +date: 2023-01-05 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 485a61341fecce..8f89f441e6592d 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2023-01-04 +date: 2023-01-05 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 bd65d05ed05396..000d43088723b1 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2023-01-04 +date: 2023-01-05 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 45afff1e36195d..637247f3fa7a10 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2023-01-04 +date: 2023-01-05 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 181e5c71a9f37d..d5dbe7f59d0b49 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2023-01-04 +date: 2023-01-05 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 a4d369bc4de6b0..0e5833f1221809 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2023-01-04 +date: 2023-01-05 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 85d53e6aae34ce..b850575fadd195 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2023-01-04 +date: 2023-01-05 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 0e4e382553be50..12cca2eed8bffa 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2023-01-04 +date: 2023-01-05 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 b4fd11bd28e4a4..549695568142d5 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2023-01-04 +date: 2023-01-05 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 84cf748aff8895..88f293948857c5 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index 7ed6b044ab8935..6bc6578c137106 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2023-01-04 +date: 2023-01-05 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 f31bd56f19d65b..bdc6426ecc0dcd 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2023-01-04 +date: 2023-01-05 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 d964b82a4cafe9..2a94188a93a2b9 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2023-01-04 +date: 2023-01-05 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 591b7014571420..634148e6c845dd 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2023-01-04 +date: 2023-01-05 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 6b2fa54e253f81..690338e14ac5a2 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2023-01-04 +date: 2023-01-05 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 61414295133a5e..3dc21df73113ad 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2023-01-04 +date: 2023-01-05 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 923a9cc00587ba..0ec347606f7c13 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2023-01-04 +date: 2023-01-05 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 661176109da1da..cf75ee846c91a2 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2023-01-04 +date: 2023-01-05 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 364005bb13683b..5fb11a1a8c905e 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 250176b5962a1d..a33c3edd318926 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index d10d721f945404..991f6ee63ae255 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2023-01-04 +date: 2023-01-05 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 31cbd3b6c6c964..8579bbab36573a 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2023-01-04 +date: 2023-01-05 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 082fb44cf7445c..b17cce03be3d3f 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2023-01-04 +date: 2023-01-05 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 64a0f1da5ebce1..15e76e279a410c 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2023-01-04 +date: 2023-01-05 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 52ee9eee291ca6..ba8364fc6ec809 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2023-01-04 +date: 2023-01-05 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 753551629d771f..f3c4a679dc6aeb 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2023-01-04 +date: 2023-01-05 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 58e6381a13ce65..5f1078ea52d79d 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2023-01-04 +date: 2023-01-05 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 1cc222f2c16bd6..4b5632761a0a9d 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2023-01-04 +date: 2023-01-05 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 a2e0a7062d739e..003dcaf7aab1d1 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2023-01-04 +date: 2023-01-05 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 ca43a965c930be..f53e31c786df68 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2023-01-04 +date: 2023-01-05 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 cf947135386c01..529c832c24274e 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-utils plugin -date: 2023-01-04 +date: 2023-01-05 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 dbae3199284eba..e1b1c6366d6747 100644 --- a/api_docs/kbn_alerts.mdx +++ b/api_docs/kbn_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts title: "@kbn/alerts" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts plugin -date: 2023-01-04 +date: 2023-01-05 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 69284ba571ff8a..3e40f63db1968a 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2023-01-04 +date: 2023-01-05 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 0c57a56d2dd068..a836eb25f07884 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2023-01-04 +date: 2023-01-05 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 df7c2ef4644ecd..8bc6c616d91e6f 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 4b6ee76340bd28..2dac3ae4b14bf3 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2023-01-04 +date: 2023-01-05 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 875751061dd799..ff448b5a2df372 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2023-01-04 +date: 2023-01-05 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 c1daad155d0972..44637b03c886ad 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2023-01-04 +date: 2023-01-05 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 11f9757f47adbf..2c8d65ecfd961e 100644 --- a/api_docs/kbn_analytics_shippers_gainsight.mdx +++ b/api_docs/kbn_analytics_shippers_gainsight.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-gainsight title: "@kbn/analytics-shippers-gainsight" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-gainsight plugin -date: 2023-01-04 +date: 2023-01-05 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 5bc90dae8c5b4a..69164bce228283 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2023-01-04 +date: 2023-01-05 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.devdocs.json b/api_docs/kbn_apm_synthtrace.devdocs.json index e411c1cdd3e47e..8ac8e3da77113d 100644 --- a/api_docs/kbn_apm_synthtrace.devdocs.json +++ b/api_docs/kbn_apm_synthtrace.devdocs.json @@ -25,7 +25,7 @@ "tags": [], "label": "ApmSynthtraceEsClient", "description": [], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -39,70 +39,44 @@ "signature": [ "any" ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/apm-synthtrace", "id": "def-common.ApmSynthtraceEsClient.Unnamed.$1", - "type": "Object", - "tags": [], - "label": "client", - "description": [], - "signature": [ - "default" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.Unnamed.$2", - "type": "Object", - "tags": [], - "label": "logger", - "description": [], - "signature": [ - "{ perf: (name: string, cb: () => T) => T; debug: (...args: any[]) => void; info: (...args: any[]) => void; error: (...args: any[]) => void; }" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.Unnamed.$3", - "type": "Object", + "type": "CompoundType", "tags": [], "label": "options", "description": [], "signature": [ - "ApmSynthtraceEsClientOptions", - " | undefined" + "{ client: ", + "default", + "; logger: ", + "Logger", + "; } & ", + "ApmSynthtraceEsClientOptions" ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, - "isRequired": false + "isRequired": true } ], "returnComment": [] }, { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.runningVersion", + "id": "def-common.ApmSynthtraceEsClient.clean", "type": "Function", "tags": [], - "label": "runningVersion", + "label": "clean", "description": [], "signature": [ - "() => Promise" + "() => Promise" ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -110,61 +84,87 @@ }, { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.clean", + "id": "def-common.ApmSynthtraceEsClient.updateComponentTemplate", "type": "Function", "tags": [], - "label": "clean", + "label": "updateComponentTemplate", "description": [], "signature": [ - "(dataStreams?: string[] | undefined) => Promise" + "(name: ", + "ComponentTemplateName", + ", modify: (template: ", + "ClusterComponentTemplateSummary", + ") => ", + "IndicesIndexState", + ") => Promise" ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.clean.$1", - "type": "Array", + "id": "def-common.ApmSynthtraceEsClient.updateComponentTemplate.$1", + "type": "Enum", "tags": [], - "label": "dataStreams", + "label": "name", + "description": [], + "signature": [ + "ComponentTemplateName" + ], + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/apm-synthtrace", + "id": "def-common.ApmSynthtraceEsClient.updateComponentTemplate.$2", + "type": "Function", + "tags": [], + "label": "modify", "description": [], "signature": [ - "string[] | undefined" + "(template: ", + "ClusterComponentTemplateSummary", + ") => ", + "IndicesIndexState" ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, - "isRequired": false + "isRequired": true } ], "returnComment": [] }, { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.updateComponentTemplates", + "id": "def-common.ApmSynthtraceEsClient.refresh", "type": "Function", "tags": [], - "label": "updateComponentTemplates", + "label": "refresh", "description": [], "signature": [ - "(numberOfPrimaryShards: number) => Promise" + "(dataStreams?: string[]) => Promise<", + "ShardsOperationResponseBase", + ">" ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.updateComponentTemplates.$1", - "type": "number", + "id": "def-common.ApmSynthtraceEsClient.refresh.$1", + "type": "Array", "tags": [], - "label": "numberOfPrimaryShards", + "label": "dataStreams", "description": [], "signature": [ - "number" + "string[]" ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -174,29 +174,31 @@ }, { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.registerGcpRepository", + "id": "def-common.ApmSynthtraceEsClient.getDefaultPipeline", "type": "Function", "tags": [], - "label": "registerGcpRepository", + "label": "getDefaultPipeline", "description": [], "signature": [ - "(connectionString: string) => Promise" + "(includeSerialization?: boolean) => (base: ", + "Readable", + ") => NodeJS.WritableStream" ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.registerGcpRepository.$1", - "type": "string", + "id": "def-common.ApmSynthtraceEsClient.getDefaultPipeline.$1", + "type": "boolean", "tags": [], - "label": "connectionString", + "label": "includeSerialization", "description": [], "signature": [ - "string" + "boolean" ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -206,213 +208,117 @@ }, { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.refresh", + "id": "def-common.ApmSynthtraceEsClient.pipeline", "type": "Function", "tags": [], - "label": "refresh", + "label": "pipeline", "description": [], "signature": [ - "(dataStreams?: string[] | undefined) => Promise<", - "ShardsOperationResponseBase", - ">" + "(cb: (base: ", + "Readable", + ") => NodeJS.WritableStream) => void" ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.refresh.$1", - "type": "Array", + "id": "def-common.ApmSynthtraceEsClient.pipeline.$1", + "type": "Function", "tags": [], - "label": "dataStreams", + "label": "cb", "description": [], "signature": [ - "string[] | undefined" + "(base: ", + "Readable", + ") => NodeJS.WritableStream" ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, - "isRequired": false + "isRequired": true } ], "returnComment": [] }, { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.index", + "id": "def-common.ApmSynthtraceEsClient.getVersion", "type": "Function", "tags": [], - "label": "index", + "label": "getVersion", "description": [], "signature": [ - "(events: ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.EntityIterable", - "text": "EntityIterable" - }, - " | ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.EntityIterable", - "text": "EntityIterable" - }, - "[], options?: ", - "StreamToBulkOptions", - "<", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmFields", - "text": "ApmFields" - }, - "> | undefined, streamProcessor?: ", - "StreamProcessor", - "<", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmFields", - "text": "ApmFields" - }, - "> | undefined) => Promise" + "() => string" ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.index.$1", - "type": "CompoundType", - "tags": [], - "label": "events", - "description": [], - "signature": [ - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.EntityIterable", - "text": "EntityIterable" - }, - " | ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.EntityIterable", - "text": "EntityIterable" - }, - "[]" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.index.$2", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "signature": [ - "StreamToBulkOptions", - "<", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmFields", - "text": "ApmFields" - }, - "> | undefined" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.index.$3", - "type": "Object", - "tags": [], - "label": "streamProcessor", - "description": [], - "signature": [ - "StreamProcessor", - "<", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmFields", - "text": "ApmFields" - }, - "> | undefined" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], + "children": [], "returnComment": [] }, { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.createDataStream", + "id": "def-common.ApmSynthtraceEsClient.index", "type": "Function", "tags": [], - "label": "createDataStream", + "label": "index", "description": [], "signature": [ - "(aggregator: ", - "StreamAggregator", + "(streamOrGenerator: MaybeArray<", + "Readable", + " | ", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.SynthtraceGenerator", + "text": "SynthtraceGenerator" + }, "<", { - "pluginId": "@kbn/apm-synthtrace", + "pluginId": "@kbn/apm-synthtrace-client", "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", + "docId": "kibKbnApmSynthtraceClientPluginApi", "section": "def-common.ApmFields", "text": "ApmFields" }, - ">) => Promise" + ">>) => Promise" ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmSynthtraceEsClient.createDataStream.$1", - "type": "Object", + "id": "def-common.ApmSynthtraceEsClient.index.$1", + "type": "CompoundType", "tags": [], - "label": "aggregator", + "label": "streamOrGenerator", "description": [], "signature": [ - "StreamAggregator", + "MaybeArray<", + "Readable", + " | ", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.SynthtraceGenerator", + "text": "SynthtraceGenerator" + }, "<", { - "pluginId": "@kbn/apm-synthtrace", + "pluginId": "@kbn/apm-synthtrace-client", "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", + "docId": "kibKbnApmSynthtraceClientPluginApi", "section": "def-common.ApmFields", "text": "ApmFields" }, - ">" + ">>" ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -425,36 +331,18 @@ }, { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityArrayIterable", + "id": "def-common.ApmSynthtraceKibanaClient", "type": "Class", "tags": [], - "label": "EntityArrayIterable", + "label": "ApmSynthtraceKibanaClient", "description": [], - "signature": [ - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.EntityArrayIterable", - "text": "EntityArrayIterable" - }, - " implements ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.EntityIterable", - "text": "EntityIterable" - }, - "" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityArrayIterable.Unnamed", + "id": "def-common.ApmSynthtraceKibanaClient.Unnamed", "type": "Function", "tags": [], "label": "Constructor", @@ -462,87 +350,62 @@ "signature": [ "any" ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityArrayIterable.Unnamed.$1", - "type": "Array", + "id": "def-common.ApmSynthtraceKibanaClient.Unnamed.$1", + "type": "Object", "tags": [], - "label": "fields", + "label": "options", "description": [], - "signature": [ - "TFields[]" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts", "deprecated": false, "trackAdoption": false, - "isRequired": true + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace", + "id": "def-common.ApmSynthtraceKibanaClient.Unnamed.$1.logger", + "type": "Object", + "tags": [], + "label": "logger", + "description": [], + "signature": [ + "Logger" + ], + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace", + "id": "def-common.ApmSynthtraceKibanaClient.Unnamed.$1.target", + "type": "string", + "tags": [], + "label": "target", + "description": [], + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ], "returnComment": [] }, { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityArrayIterable.order", - "type": "Function", - "tags": [], - "label": "order", - "description": [], - "signature": [ - "() => \"asc\" | \"desc\"" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityArrayIterable.estimatedRatePerMinute", - "type": "Function", - "tags": [], - "label": "estimatedRatePerMinute", - "description": [], - "signature": [ - "() => number" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityArrayIterable.Symbol.asyncIterator", - "type": "Function", - "tags": [], - "label": "[Symbol.asyncIterator]", - "description": [], - "signature": [ - "() => AsyncIterator" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityArrayIterable.Symbol.iterator", + "id": "def-common.ApmSynthtraceKibanaClient.fetchLatestApmPackageVersion", "type": "Function", "tags": [], - "label": "[Symbol.iterator]", + "label": "fetchLatestApmPackageVersion", "description": [], "signature": [ - "() => Iterator" + "() => Promise" ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -550,68 +413,35 @@ }, { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityArrayIterable.merge", + "id": "def-common.ApmSynthtraceKibanaClient.installApmPackage", "type": "Function", "tags": [], - "label": "merge", + "label": "installApmPackage", "description": [], "signature": [ - "(...iterables: ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.EntityIterable", - "text": "EntityIterable" - }, - "[]) => ", - "EntityStreams", - "" + "(packageVersion: string) => Promise" ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityArrayIterable.merge.$1", - "type": "Array", + "id": "def-common.ApmSynthtraceKibanaClient.installApmPackage.$1", + "type": "string", "tags": [], - "label": "iterables", + "label": "packageVersion", "description": [], "signature": [ - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.EntityIterable", - "text": "EntityIterable" - }, - "[]" + "string" ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts", "deprecated": false, "trackAdoption": false, "isRequired": true } ], "returnComment": [] - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityArrayIterable.toArray", - "type": "Function", - "tags": [], - "label": "toArray", - "description": [], - "signature": [ - "() => TFields[]" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] } ], "initialIsOpen": false @@ -620,107 +450,33 @@ "functions": [ { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.cleanWriteTargets", + "id": "def-common.createLogger", "type": "Function", "tags": [], - "label": "cleanWriteTargets", + "label": "createLogger", "description": [], "signature": [ - "({\n targets,\n client,\n logger,\n}: { targets: string[]; client: ", - "default", - "; logger: { perf: (name: string, cb: () => T) => T; debug: (...args: any[]) => void; info: (...args: any[]) => void; error: (...args: any[]) => void; }; }) => Promise" + "(logLevel: ", + { + "pluginId": "@kbn/apm-synthtrace", + "scope": "common", + "docId": "kibKbnApmSynthtracePluginApi", + "section": "def-common.LogLevel", + "text": "LogLevel" + }, + ") => ", + "Logger" ], - "path": "packages/kbn-apm-synthtrace/src/lib/utils/clean_write_targets.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/utils/create_logger.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.cleanWriteTargets.$1", - "type": "Object", + "id": "def-common.createLogger.$1", + "type": "Enum", "tags": [], - "label": "{\n targets,\n client,\n logger,\n}", - "description": [], - "path": "packages/kbn-apm-synthtrace/src/lib/utils/clean_write_targets.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.cleanWriteTargets.$1.targets", - "type": "Array", - "tags": [], - "label": "targets", - "description": [], - "signature": [ - "string[]" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/utils/clean_write_targets.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.cleanWriteTargets.$1.client", - "type": "Object", - "tags": [], - "label": "client", - "description": [], - "signature": [ - "default" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/utils/clean_write_targets.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.cleanWriteTargets.$1.logger", - "type": "Object", - "tags": [], - "label": "logger", - "description": [], - "signature": [ - "{ perf: (name: string, cb: () => T) => T; debug: (...args: any[]) => void; info: (...args: any[]) => void; error: (...args: any[]) => void; }" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/utils/clean_write_targets.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.createLogger", - "type": "Function", - "tags": [], - "label": "createLogger", - "description": [], - "signature": [ - "(logLevel: ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.LogLevel", - "text": "LogLevel" - }, - ") => { perf: (name: string, cb: () => T) => T; debug: (...args: any[]) => void; info: (...args: any[]) => void; error: (...args: any[]) => void; }" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/utils/create_logger.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.createLogger.$1", - "type": "Enum", - "tags": [], - "label": "logLevel", + "label": "logLevel", "description": [], "signature": [ { @@ -739,774 +495,24 @@ ], "returnComment": [], "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.dedot", - "type": "Function", - "tags": [], - "label": "dedot", - "description": [], - "signature": [ - "(source: Record, target: Record) => Record" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/utils/dedot.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.dedot.$1", - "type": "Object", - "tags": [], - "label": "source", - "description": [], - "signature": [ - "Record" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/utils/dedot.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.dedot.$2", - "type": "Object", - "tags": [], - "label": "target", - "description": [], - "signature": [ - "Record" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/utils/dedot.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.observer", - "type": "Function", - "tags": [], - "label": "observer", - "description": [], - "signature": [ - "() => ", - "Observer" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/agent_config/observer.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.timerange", - "type": "Function", - "tags": [], - "label": "timerange", - "description": [], - "signature": [ - "(from: number | Date, to: number | Date) => ", - "Timerange" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/timerange.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.timerange.$1", - "type": "CompoundType", - "tags": [], - "label": "from", - "description": [], - "signature": [ - "number | Date" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/timerange.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.timerange.$2", - "type": "CompoundType", - "tags": [], - "label": "to", - "description": [], - "signature": [ - "number | Date" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/timerange.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false } ], - "interfaces": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmException", - "type": "Interface", - "tags": [], - "label": "ApmException", - "description": [], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/apm_fields.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmException.message", - "type": "string", - "tags": [], - "label": "message", - "description": [], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/apm_fields.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, + "interfaces": [], + "enums": [ { "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityIterable", - "type": "Interface", + "id": "def-common.LogLevel", + "type": "Enum", "tags": [], - "label": "EntityIterable", + "label": "LogLevel", "description": [], - "signature": [ - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.EntityIterable", - "text": "EntityIterable" - }, - " extends Iterable,AsyncIterable" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityIterable.order", - "type": "Function", - "tags": [], - "label": "order", - "description": [], - "signature": [ - "() => \"asc\" | \"desc\"" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityIterable.estimatedRatePerMinute", - "type": "Function", - "tags": [], - "label": "estimatedRatePerMinute", - "description": [], - "signature": [ - "() => number" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityIterable.toArray", - "type": "Function", - "tags": [], - "label": "toArray", - "description": [], - "signature": [ - "() => ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmFields", - "text": "ApmFields" - }, - "[]" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityIterable.merge", - "type": "Function", - "tags": [], - "label": "merge", - "description": [], - "signature": [ - "(...iterables: ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.EntityIterable", - "text": "EntityIterable" - }, - "[]) => ", - "EntityStreams", - "" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.EntityIterable.merge.$1", - "type": "Array", - "tags": [], - "label": "iterables", - "description": [], - "signature": [ - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.EntityIterable", - "text": "EntityIterable" - }, - "[]" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.Fields", - "type": "Interface", - "tags": [], - "label": "Fields", - "description": [], - "path": "packages/kbn-apm-synthtrace/src/lib/entity.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.Fields.timestamp", - "type": "number", - "tags": [], - "label": "'@timestamp'", - "description": [], - "signature": [ - "number | undefined" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/entity.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - } - ], - "enums": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.LogLevel", - "type": "Enum", - "tags": [], - "label": "LogLevel", - "description": [], - "path": "packages/kbn-apm-synthtrace/src/lib/utils/create_logger.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - } - ], - "misc": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.ApmFields", - "type": "Type", - "tags": [], - "label": "ApmFields", - "description": [], - "signature": [ - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.Fields", - "text": "Fields" - }, - " & Partial<{ 'timestamp.us'?: number | undefined; 'agent.name': string; 'agent.version': string; 'client.geo.city_name': string; 'client.geo.continent_name': string; 'client.geo.country_iso_code': string; 'client.geo.country_name': string; 'client.geo.region_iso_code': string; 'client.geo.region_name': string; 'client.geo.location': ", - "GeoLocation", - "; 'client.ip': string; 'cloud.provider': string; 'cloud.project.name': string; 'cloud.service.name': string; 'cloud.availability_zone': string; 'cloud.machine.type': string; 'cloud.region': string; 'container.id': string; 'destination.address': string; 'destination.port': number; 'device.id': string; 'device.model.identifier': string; 'device.model.name': string; 'device.manufacturer': string; 'ecs.version': string; 'event.outcome': string; 'event.name': string; 'event.ingested': number; 'error.id': string; 'error.exception': ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmException", - "text": "ApmException" - }, - "[]; 'error.grouping_name': string; 'error.grouping_key': string; 'faas.id': string; 'faas.name': string; 'faas.coldstart': boolean; 'faas.execution': string; 'faas.trigger.type': string; 'faas.trigger.request_id': string; 'host.name': string; 'host.architecture': string; 'host.hostname': string; 'host.os.full': string; 'host.os.name': string; 'host.os.platform': string; 'host.os.type': string; 'host.os.version': string; 'http.request.method': string; 'http.response.status_code': number; 'kubernetes.pod.uid': string; 'kubernetes.pod.name': string; 'metricset.name': string; observer: ", - "Observer", - "; 'network.connection.type': string; 'network.connection.subtype': string; 'network.carrier.name': string; 'network.carrier.mcc': string; 'network.carrier.mnc': string; 'network.carrier.icc': string; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'session.id': string; 'trace.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.id': string; 'transaction.duration.us': number; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'transaction.sampled': true; 'service.name': string; 'service.version': string; 'service.environment': string; 'service.language.name': string; 'service.node.name': string; 'service.runtime.name': string; 'service.runtime.version': string; 'service.framework.name': string; 'service.framework.version': string; 'service.target.name': string; 'service.target.type': string; 'span.action': string; 'span.id': string; 'span.name': string; 'span.type': string; 'span.subtype': string; 'span.duration.us': number; 'span.destination.service.resource': string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; 'span.self_time.count': number; 'span.self_time.sum.us': number; 'span.links': { trace: { id: string; }; span: { id: string; }; }[]; 'url.original': string; }> & Partial<{ 'system.process.memory.size': number; 'system.memory.actual.free': number; 'system.memory.total': number; 'system.cpu.total.norm.pct': number; 'system.process.memory.rss.bytes': number; 'system.process.cpu.total.norm.pct': number; 'jvm.memory.heap.used': number; 'jvm.memory.non_heap.used': number; 'jvm.thread.count': number; 'faas.billed_duration': number; 'faas.timeout': number; 'faas.coldstart_duration': number; 'faas.duration': number; }>" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/apm_fields.ts", + "path": "packages/kbn-apm-synthtrace/src/lib/utils/create_logger.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false } ], - "objects": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm", - "type": "Object", - "tags": [], - "label": "apm", - "description": [], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.service", - "type": "Function", - "tags": [], - "label": "service", - "description": [], - "signature": [ - "{ (name: string, environment: string, agentName: string): ", - "Service", - "; (options: { name: string; environment: string; agentName: string; }): ", - "Service", - "; }" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.mobileApp", - "type": "Function", - "tags": [], - "label": "mobileApp", - "description": [], - "signature": [ - "{ (name: string, environment: string, agentName: MobileAgentName): ", - "MobileApp", - "; (options: { name: string; environment: string; agentName: MobileAgentName; }): ", - "MobileApp", - "; }" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.browser", - "type": "Function", - "tags": [], - "label": "browser", - "description": [], - "signature": [ - "({ serviceName, environment, userAgent, }: { serviceName: string; environment: string; userAgent: Partial<{ 'user_agent.original': string; 'user_agent.os.name': string; 'user_agent.name': string; 'user_agent.device.name': string; 'user_agent.version': number; }>; }) => ", - "Browser" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.browser.$1", - "type": "Object", - "tags": [], - "label": "__0", - "description": [], - "signature": [ - "{ serviceName: string; environment: string; userAgent: Partial<{ 'user_agent.original': string; 'user_agent.os.name': string; 'user_agent.name': string; 'user_agent.device.name': string; 'user_agent.version': number; }>; }" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/browser.ts", - "deprecated": false, - "trackAdoption": false - } - ] - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.getTransactionMetrics", - "type": "Function", - "tags": [], - "label": "getTransactionMetrics", - "description": [], - "signature": [ - "(events: ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmFields", - "text": "ApmFields" - }, - "[]) => { 'metricset.name': string; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; _doc_count: number; '@timestamp'?: number | undefined; 'timestamp.us'?: number | undefined; 'agent.name'?: string | undefined; 'agent.version'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.location'?: ", - "GeoLocation", - " | undefined; 'client.ip'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.region'?: string | undefined; 'container.id'?: string | undefined; 'destination.address'?: string | undefined; 'destination.port'?: number | undefined; 'device.id'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'device.manufacturer'?: string | undefined; 'ecs.version'?: string | undefined; 'event.outcome'?: string | undefined; 'event.name'?: string | undefined; 'event.ingested'?: number | undefined; 'error.id'?: string | undefined; 'error.exception'?: ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmException", - "text": "ApmException" - }, - "[] | undefined; 'error.grouping_name'?: string | undefined; 'error.grouping_key'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.trigger.type'?: string | undefined; 'faas.trigger.request_id'?: string | undefined; 'host.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.hostname'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'http.request.method'?: string | undefined; 'http.response.status_code'?: number | undefined; 'kubernetes.pod.uid'?: string | undefined; 'kubernetes.pod.name'?: string | undefined; observer?: ", - "Observer", - " | undefined; 'network.connection.type'?: string | undefined; 'network.connection.subtype'?: string | undefined; 'network.carrier.name'?: string | undefined; 'network.carrier.mcc'?: string | undefined; 'network.carrier.mnc'?: string | undefined; 'network.carrier.icc'?: string | undefined; 'parent.id'?: string | undefined; 'processor.event'?: string | undefined; 'processor.name'?: string | undefined; 'session.id'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.name'?: string | undefined; 'transaction.type'?: string | undefined; 'transaction.id'?: string | undefined; 'transaction.duration.us'?: number | undefined; 'transaction.sampled'?: true | undefined; 'service.name'?: string | undefined; 'service.version'?: string | undefined; 'service.environment'?: string | undefined; 'service.language.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.runtime.name'?: string | undefined; 'service.runtime.version'?: string | undefined; 'service.framework.name'?: string | undefined; 'service.framework.version'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.type'?: string | undefined; 'span.action'?: string | undefined; 'span.id'?: string | undefined; 'span.name'?: string | undefined; 'span.type'?: string | undefined; 'span.subtype'?: string | undefined; 'span.duration.us'?: number | undefined; 'span.destination.service.resource'?: string | undefined; 'span.destination.service.response_time.sum.us'?: number | undefined; 'span.destination.service.response_time.count'?: number | undefined; 'span.self_time.count'?: number | undefined; 'span.self_time.sum.us'?: number | undefined; 'span.links'?: { trace: { id: string; }; span: { id: string; }; }[] | undefined; 'url.original'?: string | undefined; 'system.process.memory.size'?: number | undefined; 'system.memory.actual.free'?: number | undefined; 'system.memory.total'?: number | undefined; 'system.cpu.total.norm.pct'?: number | undefined; 'system.process.memory.rss.bytes'?: number | undefined; 'system.process.cpu.total.norm.pct'?: number | undefined; 'jvm.memory.heap.used'?: number | undefined; 'jvm.memory.non_heap.used'?: number | undefined; 'jvm.thread.count'?: number | undefined; 'faas.billed_duration'?: number | undefined; 'faas.timeout'?: number | undefined; 'faas.coldstart_duration'?: number | undefined; 'faas.duration'?: number | undefined; }[]" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.getTransactionMetrics.$1", - "type": "Array", - "tags": [], - "label": "events", - "description": [], - "signature": [ - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmFields", - "text": "ApmFields" - }, - "[]" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/processors/get_transaction_metrics.ts", - "deprecated": false, - "trackAdoption": false - } - ] - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.getSpanDestinationMetrics", - "type": "Function", - "tags": [], - "label": "getSpanDestinationMetrics", - "description": [], - "signature": [ - "(events: ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmFields", - "text": "ApmFields" - }, - "[]) => { \"metricset.name\": string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; '@timestamp'?: number | undefined; 'timestamp.us'?: number | undefined; 'agent.name'?: string | undefined; 'agent.version'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.location'?: ", - "GeoLocation", - " | undefined; 'client.ip'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.region'?: string | undefined; 'container.id'?: string | undefined; 'destination.address'?: string | undefined; 'destination.port'?: number | undefined; 'device.id'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'device.manufacturer'?: string | undefined; 'ecs.version'?: string | undefined; 'event.outcome'?: string | undefined; 'event.name'?: string | undefined; 'event.ingested'?: number | undefined; 'error.id'?: string | undefined; 'error.exception'?: ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmException", - "text": "ApmException" - }, - "[] | undefined; 'error.grouping_name'?: string | undefined; 'error.grouping_key'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.trigger.type'?: string | undefined; 'faas.trigger.request_id'?: string | undefined; 'host.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.hostname'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'http.request.method'?: string | undefined; 'http.response.status_code'?: number | undefined; 'kubernetes.pod.uid'?: string | undefined; 'kubernetes.pod.name'?: string | undefined; observer?: ", - "Observer", - " | undefined; 'network.connection.type'?: string | undefined; 'network.connection.subtype'?: string | undefined; 'network.carrier.name'?: string | undefined; 'network.carrier.mcc'?: string | undefined; 'network.carrier.mnc'?: string | undefined; 'network.carrier.icc'?: string | undefined; 'parent.id'?: string | undefined; 'processor.event'?: string | undefined; 'processor.name'?: string | undefined; 'session.id'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.name'?: string | undefined; 'transaction.type'?: string | undefined; 'transaction.id'?: string | undefined; 'transaction.duration.us'?: number | undefined; 'transaction.duration.histogram'?: { values: number[]; counts: number[]; } | undefined; 'transaction.sampled'?: true | undefined; 'service.name'?: string | undefined; 'service.version'?: string | undefined; 'service.environment'?: string | undefined; 'service.language.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.runtime.name'?: string | undefined; 'service.runtime.version'?: string | undefined; 'service.framework.name'?: string | undefined; 'service.framework.version'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.type'?: string | undefined; 'span.action'?: string | undefined; 'span.id'?: string | undefined; 'span.name'?: string | undefined; 'span.type'?: string | undefined; 'span.subtype'?: string | undefined; 'span.duration.us'?: number | undefined; 'span.destination.service.resource'?: string | undefined; 'span.self_time.count'?: number | undefined; 'span.self_time.sum.us'?: number | undefined; 'span.links'?: { trace: { id: string; }; span: { id: string; }; }[] | undefined; 'url.original'?: string | undefined; 'system.process.memory.size'?: number | undefined; 'system.memory.actual.free'?: number | undefined; 'system.memory.total'?: number | undefined; 'system.cpu.total.norm.pct'?: number | undefined; 'system.process.memory.rss.bytes'?: number | undefined; 'system.process.cpu.total.norm.pct'?: number | undefined; 'jvm.memory.heap.used'?: number | undefined; 'jvm.memory.non_heap.used'?: number | undefined; 'jvm.thread.count'?: number | undefined; 'faas.billed_duration'?: number | undefined; 'faas.timeout'?: number | undefined; 'faas.coldstart_duration'?: number | undefined; 'faas.duration'?: number | undefined; }[]" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.getSpanDestinationMetrics.$1", - "type": "Array", - "tags": [], - "label": "events", - "description": [], - "signature": [ - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmFields", - "text": "ApmFields" - }, - "[]" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/processors/get_span_destination_metrics.ts", - "deprecated": false, - "trackAdoption": false - } - ] - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.getChromeUserAgentDefaults", - "type": "Function", - "tags": [], - "label": "getChromeUserAgentDefaults", - "description": [], - "signature": [ - "() => Partial<{ 'user_agent.original': string; 'user_agent.os.name': string; 'user_agent.name': string; 'user_agent.device.name': string; 'user_agent.version': number; }>" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [] - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.getBreakdownMetrics", - "type": "Function", - "tags": [], - "label": "getBreakdownMetrics", - "description": [], - "signature": [ - "(events: ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmFields", - "text": "ApmFields" - }, - "[]) => ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmFields", - "text": "ApmFields" - }, - "[]" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.getBreakdownMetrics.$1", - "type": "Array", - "tags": [], - "label": "events", - "description": [], - "signature": [ - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmFields", - "text": "ApmFields" - }, - "[]" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/processors/get_breakdown_metrics.ts", - "deprecated": false, - "trackAdoption": false - } - ] - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.getApmWriteTargets", - "type": "Function", - "tags": [], - "label": "getApmWriteTargets", - "description": [], - "signature": [ - "({ client, forceLegacyIndices, }: { client: ", - "default", - "; forceLegacyIndices?: boolean | undefined; }) => Promise<", - "ApmElasticsearchOutputWriteTargets", - ">" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.getApmWriteTargets.$1", - "type": "Object", - "tags": [], - "label": "__0", - "description": [], - "signature": [ - "{ client: ", - "default", - "; forceLegacyIndices?: boolean | undefined; }" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/utils/get_apm_write_targets.ts", - "deprecated": false, - "trackAdoption": false - } - ] - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.ApmSynthtraceEsClient", - "type": "Object", - "tags": [], - "label": "ApmSynthtraceEsClient", - "description": [], - "signature": [ - "typeof ", - { - "pluginId": "@kbn/apm-synthtrace", - "scope": "common", - "docId": "kibKbnApmSynthtracePluginApi", - "section": "def-common.ApmSynthtraceEsClient", - "text": "ApmSynthtraceEsClient" - } - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.ApmSynthtraceKibanaClient", - "type": "Object", - "tags": [], - "label": "ApmSynthtraceKibanaClient", - "description": [], - "signature": [ - "typeof ", - "ApmSynthtraceKibanaClient" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.serverlessFunction", - "type": "Function", - "tags": [], - "label": "serverlessFunction", - "description": [], - "signature": [ - "({ functionName, serviceName, environment, agentName, architecture, }: { functionName: string; environment: string; agentName: string; serviceName?: string | undefined; architecture?: string | undefined; }) => ", - "ServerlessFunction" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.apm.serverlessFunction.$1", - "type": "Object", - "tags": [], - "label": "__0", - "description": [], - "signature": [ - "{ functionName: string; environment: string; agentName: string; serviceName?: string | undefined; architecture?: string | undefined; }" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/apm/serverless_function.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.stackMonitoring", - "type": "Object", - "tags": [], - "label": "stackMonitoring", - "description": [], - "path": "packages/kbn-apm-synthtrace/src/lib/stack_monitoring/index.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.stackMonitoring.cluster", - "type": "Function", - "tags": [], - "label": "cluster", - "description": [], - "signature": [ - "(name: string) => ", - "Cluster" - ], - "path": "packages/kbn-apm-synthtrace/src/lib/stack_monitoring/index.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "@kbn/apm-synthtrace", - "id": "def-common.stackMonitoring.cluster.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [], - "path": "packages/kbn-apm-synthtrace/src/lib/stack_monitoring/cluster.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "initialIsOpen": false - } - ] + "misc": [], + "objects": [] } } \ No newline at end of file diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 29ea17352697cd..b6e770c2cb6368 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; @@ -21,25 +21,16 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 77 | 0 | 77 | 15 | +| 27 | 0 | 27 | 3 | ## Common -### Objects - - ### Functions ### Classes -### Interfaces - - ### Enums -### Consts, variables and types - - diff --git a/api_docs/kbn_apm_synthtrace_client.devdocs.json b/api_docs/kbn_apm_synthtrace_client.devdocs.json new file mode 100644 index 00000000000000..3b9c8f26a7be34 --- /dev/null +++ b/api_docs/kbn_apm_synthtrace_client.devdocs.json @@ -0,0 +1,2542 @@ +{ + "id": "@kbn/apm-synthtrace-client", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace", + "type": "Class", + "tags": [], + "label": "DistributedTrace", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.timestamp", + "type": "number", + "tags": [], + "label": "timestamp", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.serviceInstance", + "type": "Object", + "tags": [], + "label": "serviceInstance", + "description": [], + "signature": [ + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.Instance", + "text": "Instance" + } + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.spanEndTimes", + "type": "Array", + "tags": [], + "label": "spanEndTimes", + "description": [], + "signature": [ + "number[]" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.childSpans", + "type": "Array", + "tags": [], + "label": "childSpans", + "description": [], + "signature": [ + "BaseSpan", + "[]" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.transaction", + "type": "Object", + "tags": [], + "label": "transaction", + "description": [], + "signature": [ + "Transaction" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "{\n serviceInstance,\n transactionName,\n timestamp,\n children,\n }", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.Unnamed.$1.serviceInstance", + "type": "Object", + "tags": [], + "label": "serviceInstance", + "description": [], + "signature": [ + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.Instance", + "text": "Instance" + } + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.Unnamed.$1.transactionName", + "type": "string", + "tags": [], + "label": "transactionName", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.Unnamed.$1.timestamp", + "type": "number", + "tags": [], + "label": "timestamp", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.Unnamed.$1.children", + "type": "Function", + "tags": [], + "label": "children", + "description": [], + "signature": [ + "((dt: ", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.DistributedTrace", + "text": "DistributedTrace" + }, + ") => void) | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.Unnamed.$1.children.$1", + "type": "Object", + "tags": [], + "label": "dt", + "description": [], + "signature": [ + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.DistributedTrace", + "text": "DistributedTrace" + } + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.getTransaction", + "type": "Function", + "tags": [], + "label": "getTransaction", + "description": [], + "signature": [ + "() => ", + "Transaction" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.service", + "type": "Function", + "tags": [], + "label": "service", + "description": [], + "signature": [ + "({ serviceInstance, transactionName, latency, repeat, timestamp, duration, children, }: { serviceInstance: ", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.Instance", + "text": "Instance" + }, + "; transactionName: string; repeat?: number | undefined; timestamp?: number | undefined; latency?: number | undefined; duration?: number | undefined; children?: ((dt: ", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.DistributedTrace", + "text": "DistributedTrace" + }, + ") => unknown) | undefined; }) => void" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.service.$1", + "type": "Object", + "tags": [], + "label": "{\n serviceInstance,\n transactionName,\n latency = 0,\n repeat = 1,\n timestamp = this.timestamp,\n duration,\n children,\n }", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.service.$1.serviceInstance", + "type": "Object", + "tags": [], + "label": "serviceInstance", + "description": [], + "signature": [ + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.Instance", + "text": "Instance" + } + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.service.$1.transactionName", + "type": "string", + "tags": [], + "label": "transactionName", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.service.$1.repeat", + "type": "number", + "tags": [], + "label": "repeat", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.service.$1.timestamp", + "type": "number", + "tags": [], + "label": "timestamp", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.service.$1.latency", + "type": "number", + "tags": [], + "label": "latency", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.service.$1.duration", + "type": "number", + "tags": [], + "label": "duration", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.service.$1.children", + "type": "Function", + "tags": [], + "label": "children", + "description": [], + "signature": [ + "((dt: ", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.DistributedTrace", + "text": "DistributedTrace" + }, + ") => unknown) | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.service.$1.children.$1", + "type": "Object", + "tags": [], + "label": "dt", + "description": [], + "signature": [ + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.DistributedTrace", + "text": "DistributedTrace" + } + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.external", + "type": "Function", + "tags": [], + "label": "external", + "description": [], + "signature": [ + "({ name, url, method, statusCode, duration, timestamp, }: { name: string; url: string; method?: ", + "HttpMethod", + " | undefined; statusCode?: number | undefined; duration: number; timestamp?: number | undefined; }) => void" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.external.$1", + "type": "Object", + "tags": [], + "label": "{\n name,\n url,\n method,\n statusCode,\n duration,\n timestamp = this.timestamp,\n }", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.external.$1.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.external.$1.url", + "type": "string", + "tags": [], + "label": "url", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.external.$1.method", + "type": "CompoundType", + "tags": [], + "label": "method", + "description": [], + "signature": [ + "HttpMethod", + " | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.external.$1.statusCode", + "type": "number", + "tags": [], + "label": "statusCode", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.external.$1.duration", + "type": "number", + "tags": [], + "label": "duration", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.external.$1.timestamp", + "type": "number", + "tags": [], + "label": "timestamp", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.db", + "type": "Function", + "tags": [], + "label": "db", + "description": [], + "signature": [ + "({ name, duration, type, statement, timestamp, }: { name: string; duration: number; type: \"elasticsearch\" | \"sqlite\" | \"redis\"; statement?: string | undefined; timestamp?: number | undefined; }) => void" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.db.$1", + "type": "Object", + "tags": [], + "label": "{\n name,\n duration,\n type,\n statement,\n timestamp = this.timestamp,\n }", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.db.$1.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.db.$1.duration", + "type": "number", + "tags": [], + "label": "duration", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.db.$1.type", + "type": "CompoundType", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"elasticsearch\" | \"sqlite\" | \"redis\"" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.db.$1.statement", + "type": "string", + "tags": [], + "label": "statement", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DistributedTrace.db.$1.timestamp", + "type": "number", + "tags": [], + "label": "timestamp", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance", + "type": "Class", + "tags": [], + "label": "Instance", + "description": [], + "signature": [ + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.Instance", + "text": "Instance" + }, + " extends ", + "Entity", + "<", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.ApmFields", + "text": "ApmFields" + }, + ">" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.transaction", + "type": "Function", + "tags": [], + "label": "transaction", + "description": [], + "signature": [ + "(...options: [string] | [string, string] | [{ transactionName: string; transactionType?: string | undefined; }]) => ", + "Transaction" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.transaction.$1", + "type": "CompoundType", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "[string] | [string, string] | [{ transactionName: string; transactionType?: string | undefined; }]" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.span", + "type": "Function", + "tags": [], + "label": "span", + "description": [], + "signature": [ + "(...options: [string, string] | [string, string, string] | [", + "SpanParams", + "]) => ", + "Span" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.span.$1", + "type": "CompoundType", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "[string, string] | [string, string, string] | [", + "SpanParams", + "]" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.error", + "type": "Function", + "tags": [], + "label": "error", + "description": [], + "signature": [ + "({ message, type, groupingName, }: { message: string; type?: string | undefined; groupingName?: string | undefined; }) => ", + "ApmError" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.error.$1", + "type": "Object", + "tags": [], + "label": "{\n message,\n type,\n groupingName,\n }", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.error.$1.message", + "type": "string", + "tags": [], + "label": "message", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.error.$1.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.error.$1.groupingName", + "type": "string", + "tags": [], + "label": "groupingName", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.containerId", + "type": "Function", + "tags": [], + "label": "containerId", + "description": [], + "signature": [ + "(containerId: string) => this" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.containerId.$1", + "type": "string", + "tags": [], + "label": "containerId", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.podId", + "type": "Function", + "tags": [], + "label": "podId", + "description": [], + "signature": [ + "(podId: string) => this" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.podId.$1", + "type": "string", + "tags": [], + "label": "podId", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.appMetrics", + "type": "Function", + "tags": [], + "label": "appMetrics", + "description": [], + "signature": [ + "(metrics: Partial<{ 'system.process.memory.size': number; 'system.memory.actual.free': number; 'system.memory.total': number; 'system.cpu.total.norm.pct': number; 'system.process.memory.rss.bytes': number; 'system.process.cpu.total.norm.pct': number; 'jvm.memory.heap.used': number; 'jvm.memory.non_heap.used': number; 'jvm.thread.count': number; 'faas.billed_duration': number; 'faas.timeout': number; 'faas.coldstart_duration': number; 'faas.duration': number; }>) => ", + "Metricset", + "<", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.ApmFields", + "text": "ApmFields" + }, + ">" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Instance.appMetrics.$1", + "type": "Object", + "tags": [], + "label": "metrics", + "description": [], + "signature": [ + "Partial<{ 'system.process.memory.size': number; 'system.memory.actual.free': number; 'system.memory.total': number; 'system.cpu.total.norm.pct': number; 'system.process.memory.rss.bytes': number; 'system.process.cpu.total.norm.pct': number; 'jvm.memory.heap.used': number; 'jvm.memory.non_heap.used': number; 'jvm.thread.count': number; 'faas.billed_duration': number; 'faas.timeout': number; 'faas.coldstart_duration': number; 'faas.duration': number; }>" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice", + "type": "Class", + "tags": [], + "label": "MobileDevice", + "description": [], + "signature": [ + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.MobileDevice", + "text": "MobileDevice" + }, + " extends ", + "Entity", + "<", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.ApmFields", + "text": "ApmFields" + }, + ">" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.networkConnection", + "type": "Object", + "tags": [], + "label": "networkConnection", + "description": [], + "signature": [ + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.NetworkConnectionInfo", + "text": "NetworkConnectionInfo" + } + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.Unnamed.$1", + "type": "CompoundType", + "tags": [], + "label": "fields", + "description": [], + "signature": [ + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.ApmFields", + "text": "ApmFields" + } + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.deviceInfo", + "type": "Function", + "tags": [], + "label": "deviceInfo", + "description": [], + "signature": [ + "(...options: [string, string] | [string, string, string] | [", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.DeviceInfo", + "text": "DeviceInfo" + }, + "]) => this" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.deviceInfo.$1", + "type": "CompoundType", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "[string, string] | [string, string, string] | [", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.DeviceInfo", + "text": "DeviceInfo" + }, + "]" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.osInfo", + "type": "Function", + "tags": [], + "label": "osInfo", + "description": [], + "signature": [ + "(...options: [string, string] | [string, string, string] | [string, string, string, string] | [", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.OSInfo", + "text": "OSInfo" + }, + "]) => this" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.osInfo.$1", + "type": "CompoundType", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "[string, string] | [string, string, string] | [string, string, string, string] | [", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.OSInfo", + "text": "OSInfo" + }, + "]" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.startNewSession", + "type": "Function", + "tags": [], + "label": "startNewSession", + "description": [], + "signature": [ + "() => this" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.setNetworkConnection", + "type": "Function", + "tags": [], + "label": "setNetworkConnection", + "description": [], + "signature": [ + "(networkInfo: ", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.NetworkConnectionInfo", + "text": "NetworkConnectionInfo" + }, + ") => this" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.setNetworkConnection.$1", + "type": "Object", + "tags": [], + "label": "networkInfo", + "description": [], + "signature": [ + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.NetworkConnectionInfo", + "text": "NetworkConnectionInfo" + } + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.setGeoInfo", + "type": "Function", + "tags": [], + "label": "setGeoInfo", + "description": [], + "signature": [ + "(geoInfo: ", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.GeoInfo", + "text": "GeoInfo" + }, + ") => this" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.setGeoInfo.$1", + "type": "Object", + "tags": [], + "label": "geoInfo", + "description": [], + "signature": [ + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.GeoInfo", + "text": "GeoInfo" + } + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.transaction", + "type": "Function", + "tags": [], + "label": "transaction", + "description": [], + "signature": [ + "(...options: [string] | [string, string] | [string, string, string] | [{ transactionName: string; frameworkName?: string | undefined; frameworkVersion?: string | undefined; }]) => ", + "Transaction" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.transaction.$1", + "type": "CompoundType", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "[string] | [string, string] | [string, string, string] | [{ transactionName: string; frameworkName?: string | undefined; frameworkVersion?: string | undefined; }]" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.span", + "type": "Function", + "tags": [], + "label": "span", + "description": [], + "signature": [ + "(...options: [string, string] | [string, string, string] | [", + "SpanParams", + "]) => ", + "Span" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.span.$1", + "type": "CompoundType", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "[string, string] | [string, string, string] | [", + "SpanParams", + "]" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.httpSpan", + "type": "Function", + "tags": [], + "label": "httpSpan", + "description": [], + "signature": [ + "(...options: [string, string, string] | [{ spanName: string; httpMethod: string; httpUrl: string; }]) => ", + "Span" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.httpSpan.$1", + "type": "CompoundType", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "[string, string, string] | [{ spanName: string; httpMethod: string; httpUrl: string; }]" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Serializable", + "type": "Class", + "tags": [], + "label": "Serializable", + "description": [], + "signature": [ + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.Serializable", + "text": "Serializable" + }, + " extends ", + "Entity", + "" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/serializable.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Serializable.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/serializable.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Serializable.Unnamed.$1", + "type": "Uncategorized", + "tags": [], + "label": "fields", + "description": [], + "signature": [ + "TFields" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/serializable.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Serializable.timestamp", + "type": "Function", + "tags": [], + "label": "timestamp", + "description": [], + "signature": [ + "(time: number) => this" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/serializable.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Serializable.timestamp.$1", + "type": "number", + "tags": [], + "label": "time", + "description": [], + "signature": [ + "number" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/serializable.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Serializable.serialize", + "type": "Function", + "tags": [], + "label": "serialize", + "description": [], + "signature": [ + "() => TFields[]" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/serializable.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Timerange", + "type": "Class", + "tags": [], + "label": "Timerange", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Timerange.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Timerange.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "from", + "description": [], + "signature": [ + "Date" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Timerange.Unnamed.$2", + "type": "Object", + "tags": [], + "label": "to", + "description": [], + "signature": [ + "Date" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Timerange.interval", + "type": "Function", + "tags": [], + "label": "interval", + "description": [], + "signature": [ + "(interval: string) => ", + "Interval", + "<{ '@timestamp'?: number | undefined; }>" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Timerange.interval.$1", + "type": "string", + "tags": [], + "label": "interval", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Timerange.ratePerMinute", + "type": "Function", + "tags": [], + "label": "ratePerMinute", + "description": [], + "signature": [ + "(rate: number) => ", + "Interval", + "<{ '@timestamp'?: number | undefined; }>" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Timerange.ratePerMinute.$1", + "type": "number", + "tags": [], + "label": "rate", + "description": [], + "signature": [ + "number" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.appendHash", + "type": "Function", + "tags": [], + "label": "appendHash", + "description": [], + "signature": [ + "(hash: string, value: string) => string" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/hash.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.appendHash.$1", + "type": "string", + "tags": [], + "label": "hash", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/hash.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.appendHash.$2", + "type": "string", + "tags": [], + "label": "value", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/hash.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.dedot", + "type": "Function", + "tags": [], + "label": "dedot", + "description": [], + "signature": [ + "(source: Record, target: Record) => Record" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/dedot.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.dedot.$1", + "type": "Object", + "tags": [], + "label": "source", + "description": [], + "signature": [ + "Record" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/dedot.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.dedot.$2", + "type": "Object", + "tags": [], + "label": "target", + "description": [], + "signature": [ + "Record" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/dedot.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.generateLongId", + "type": "Function", + "tags": [], + "label": "generateLongId", + "description": [], + "signature": [ + "(seed: string | undefined) => string" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/generate_id.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.generateLongId.$1", + "type": "string", + "tags": [], + "label": "seed", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/generate_id.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.generateShortId", + "type": "Function", + "tags": [], + "label": "generateShortId", + "description": [], + "signature": [ + "(seed: string | undefined) => string" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/generate_id.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.generateShortId.$1", + "type": "string", + "tags": [], + "label": "seed", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/generate_id.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.hashKeysOf", + "type": "Function", + "tags": [], + "label": "hashKeysOf", + "description": [], + "signature": [ + "(source: T, keys: (keyof T)[]) => string" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/hash.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.hashKeysOf.$1", + "type": "Uncategorized", + "tags": [], + "label": "source", + "description": [], + "signature": [ + "T" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/hash.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.hashKeysOf.$2", + "type": "Array", + "tags": [], + "label": "keys", + "description": [], + "signature": [ + "(keyof T)[]" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/hash.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.httpExitSpan", + "type": "Function", + "tags": [], + "label": "httpExitSpan", + "description": [], + "signature": [ + "({\n spanName,\n destinationUrl,\n method = 'GET',\n statusCode = 200,\n}: { spanName: string; destinationUrl: string; method?: ", + "HttpMethod", + " | undefined; statusCode?: number | undefined; }) => ", + "SpanParams" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/span.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.httpExitSpan.$1", + "type": "Object", + "tags": [], + "label": "{\n spanName,\n destinationUrl,\n method = 'GET',\n statusCode = 200,\n}", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/span.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.httpExitSpan.$1.spanName", + "type": "string", + "tags": [], + "label": "spanName", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/span.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.httpExitSpan.$1.destinationUrl", + "type": "string", + "tags": [], + "label": "destinationUrl", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/span.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.httpExitSpan.$1.method", + "type": "CompoundType", + "tags": [], + "label": "method", + "description": [], + "signature": [ + "HttpMethod", + " | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/span.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.httpExitSpan.$1.statusCode", + "type": "number", + "tags": [], + "label": "statusCode", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/span.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.observer", + "type": "Function", + "tags": [], + "label": "observer", + "description": [], + "signature": [ + "() => ", + "Observer" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/agent_config/observer.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.parseInterval", + "type": "Function", + "tags": [], + "label": "parseInterval", + "description": [], + "signature": [ + "(interval: string) => { intervalAmount: number; intervalUnit: moment.unitOfTime.DurationConstructor; }" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/interval.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.parseInterval.$1", + "type": "string", + "tags": [], + "label": "interval", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/interval.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.timerange", + "type": "Function", + "tags": [], + "label": "timerange", + "description": [], + "signature": [ + "(from: number | Date, to: number | Date) => ", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.Timerange", + "text": "Timerange" + } + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.timerange.$1", + "type": "CompoundType", + "tags": [], + "label": "from", + "description": [], + "signature": [ + "number | Date" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.timerange.$2", + "type": "CompoundType", + "tags": [], + "label": "to", + "description": [], + "signature": [ + "number | Date" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DeviceInfo", + "type": "Interface", + "tags": [], + "label": "DeviceInfo", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DeviceInfo.manufacturer", + "type": "string", + "tags": [], + "label": "manufacturer", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DeviceInfo.modelIdentifier", + "type": "string", + "tags": [], + "label": "modelIdentifier", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.DeviceInfo.modelName", + "type": "string", + "tags": [], + "label": "modelName", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.GeoInfo", + "type": "Interface", + "tags": [], + "label": "GeoInfo", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.GeoInfo.clientIp", + "type": "string", + "tags": [], + "label": "clientIp", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.GeoInfo.cityName", + "type": "string", + "tags": [], + "label": "cityName", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.GeoInfo.continentName", + "type": "string", + "tags": [], + "label": "continentName", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.GeoInfo.countryIsoCode", + "type": "string", + "tags": [], + "label": "countryIsoCode", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.GeoInfo.countryName", + "type": "string", + "tags": [], + "label": "countryName", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.GeoInfo.regionName", + "type": "string", + "tags": [], + "label": "regionName", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.GeoInfo.regionIsoCode", + "type": "string", + "tags": [], + "label": "regionIsoCode", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.GeoInfo.location", + "type": "Object", + "tags": [], + "label": "location", + "description": [], + "signature": [ + "GeoLocation", + " | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.NetworkConnectionInfo", + "type": "Interface", + "tags": [], + "label": "NetworkConnectionInfo", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.NetworkConnectionInfo.type", + "type": "CompoundType", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"unknown\" | \"cell\" | \"unavailable\" | \"wifi\" | \"wired\"" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.NetworkConnectionInfo.subType", + "type": "string", + "tags": [], + "label": "subType", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.NetworkConnectionInfo.carrierName", + "type": "string", + "tags": [], + "label": "carrierName", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.NetworkConnectionInfo.carrierMCC", + "type": "string", + "tags": [], + "label": "carrierMCC", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.NetworkConnectionInfo.carrierMNC", + "type": "string", + "tags": [], + "label": "carrierMNC", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.NetworkConnectionInfo.carrierICC", + "type": "string", + "tags": [], + "label": "carrierICC", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.OSInfo", + "type": "Interface", + "tags": [], + "label": "OSInfo", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.OSInfo.osType", + "type": "CompoundType", + "tags": [], + "label": "osType", + "description": [], + "signature": [ + "\"android\" | \"ios\"" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.OSInfo.osVersion", + "type": "string", + "tags": [], + "label": "osVersion", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.OSInfo.osFull", + "type": "string", + "tags": [], + "label": "osFull", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.OSInfo.runtimeVersion", + "type": "string", + "tags": [], + "label": "runtimeVersion", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.AgentConfigFields", + "type": "Type", + "tags": [], + "label": "AgentConfigFields", + "description": [], + "signature": [ + "Pick<", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.ApmFields", + "text": "ApmFields" + }, + ", \"@timestamp\" | \"metricset.name\" | \"ecs.version\" | \"event.ingested\" | \"observer.type\" | \"observer.version\" | \"observer.version_major\" | \"processor.event\" | \"processor.name\"> & Partial<{ 'labels.etag': string; agent_config_applied: number; 'event.agent_id_status': string; }>" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/agent_config/agent_config_fields.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.ApmFields", + "type": "Type", + "tags": [], + "label": "ApmFields", + "description": [], + "signature": [ + "{ '@timestamp'?: number | undefined; } & Partial<{ meta: { 'metricset.id': string; }; }> & Partial<{ 'timestamp.us'?: number | undefined; 'agent.name': string; 'agent.version': string; 'client.geo.city_name': string; 'client.geo.continent_name': string; 'client.geo.country_iso_code': string; 'client.geo.country_name': string; 'client.geo.location': ", + "GeoLocation", + "; 'client.geo.region_iso_code': string; 'client.geo.region_name': string; 'client.ip': string; 'cloud.account.id': string; 'cloud.account.name': string; 'cloud.availability_zone': string; 'cloud.machine.type': string; 'cloud.project.id': string; 'cloud.project.name': string; 'cloud.provider': string; 'cloud.region': string; 'cloud.service.name': string; 'container.id': string; 'destination.address': string; 'destination.port': number; 'device.id': string; 'device.manufacturer': string; 'device.model.identifier': string; 'device.model.name': string; 'ecs.version': string; 'error.exception': ", + "ApmException", + "[]; 'error.grouping_key': string; 'error.grouping_name': string; 'error.id': string; 'event.ingested': number; 'event.name': string; 'event.outcome': string; 'event.outcome_numeric': number | { sum: number; value_count: number; }; 'faas.coldstart': boolean; 'faas.execution': string; 'faas.id': string; 'faas.name': string; 'faas.trigger.type': string; 'faas.version': string; 'host.architecture': string; 'host.hostname': string; 'host.name': string; 'host.os.full': string; 'host.os.name': string; 'host.os.platform': string; 'host.os.type': string; 'host.os.version': string; 'http.request.method': string; 'http.response.status_code': number; 'kubernetes.pod.name': string; 'kubernetes.pod.uid': string; 'metricset.name': string; 'network.carrier.icc': string; 'network.carrier.mcc': string; 'network.carrier.mnc': string; 'network.carrier.name': string; 'network.connection.subtype': string; 'network.connection.type': string; 'observer.type': string; 'observer.version_major': number; 'observer.version': string; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'session.id': string; 'trace.id': string; 'transaction.duration.us': number; 'transaction.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'service.environment': string; 'service.framework.name': string; 'service.framework.version': string; 'service.language.name': string; 'service.language.version': string; 'service.name': string; 'service.node.name': string; 'service.runtime.name': string; 'service.runtime.version': string; 'service.target.name': string; 'service.target.type': string; 'service.version': string; 'span.action': string; 'span.destination.service.resource': string; 'span.destination.service.response_time.count': number; 'span.destination.service.response_time.sum.us': number; 'span.duration.us': number; 'span.id': string; 'span.name': string; 'span.self_time.count': number; 'span.self_time.sum.us': number; 'span.subtype': string; 'span.type': string; 'transaction.result': string; 'transaction.sampled': true; 'span.links': { trace: { id: string; }; span: { id: string; }; }[]; 'url.original': string; }> & Partial<{ 'system.process.memory.size': number; 'system.memory.actual.free': number; 'system.memory.total': number; 'system.cpu.total.norm.pct': number; 'system.process.memory.rss.bytes': number; 'system.process.cpu.total.norm.pct': number; 'jvm.memory.heap.used': number; 'jvm.memory.non_heap.used': number; 'jvm.thread.count': number; 'faas.billed_duration': number; 'faas.timeout': number; 'faas.coldstart_duration': number; 'faas.duration': number; }> & Partial<{ 'metricset.interval': string; 'transaction.duration.summary': string; }>" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/apm_fields.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.ESDocumentWithOperation", + "type": "Type", + "tags": [], + "label": "ESDocumentWithOperation", + "description": [], + "signature": [ + "{ _index?: string | undefined; _action?: ", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.SynthtraceESAction", + "text": "SynthtraceESAction" + }, + " | undefined; } & TFields" + ], + "path": "packages/kbn-apm-synthtrace-client/src/types/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.Fields", + "type": "Type", + "tags": [], + "label": "Fields", + "description": [], + "signature": [ + "{ '@timestamp'?: number | undefined; } & (TMeta extends undefined ? {} : Partial<{ meta: TMeta; }>)" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/entity.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.SynthtraceESAction", + "type": "Type", + "tags": [], + "label": "SynthtraceESAction", + "description": [], + "signature": [ + "{ create: ", + "BulkCreateOperation", + "; } | { index: ", + "BulkIndexOperation", + "; }" + ], + "path": "packages/kbn-apm-synthtrace-client/src/types/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.SynthtraceGenerator", + "type": "Type", + "tags": [], + "label": "SynthtraceGenerator", + "description": [], + "signature": [ + "Generator<", + { + "pluginId": "@kbn/apm-synthtrace-client", + "scope": "common", + "docId": "kibKbnApmSynthtraceClientPluginApi", + "section": "def-common.Serializable", + "text": "Serializable" + }, + ", any, unknown>" + ], + "path": "packages/kbn-apm-synthtrace-client/src/types/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.apm", + "type": "Object", + "tags": [], + "label": "apm", + "description": [], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.apm.service", + "type": "Function", + "tags": [], + "label": "service", + "description": [], + "signature": [ + "{ (name: string, environment: string, agentName: string): ", + "Service", + "; (options: { name: string; environment: string; agentName: string; }): ", + "Service", + "; }" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.apm.mobileApp", + "type": "Function", + "tags": [], + "label": "mobileApp", + "description": [], + "signature": [ + "{ (name: string, environment: string, agentName: MobileAgentName): ", + "MobileApp", + "; (options: { name: string; environment: string; agentName: MobileAgentName; }): ", + "MobileApp", + "; }" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.apm.browser", + "type": "Function", + "tags": [], + "label": "browser", + "description": [], + "signature": [ + "({ serviceName, environment, userAgent, }: { serviceName: string; environment: string; userAgent: Partial<{ 'user_agent.original': string; 'user_agent.os.name': string; 'user_agent.name': string; 'user_agent.device.name': string; 'user_agent.version': number; }>; }) => ", + "Browser" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/index.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.apm.browser.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + "{ serviceName: string; environment: string; userAgent: Partial<{ 'user_agent.original': string; 'user_agent.os.name': string; 'user_agent.name': string; 'user_agent.device.name': string; 'user_agent.version': number; }>; }" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/browser.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.apm.getChromeUserAgentDefaults", + "type": "Function", + "tags": [], + "label": "getChromeUserAgentDefaults", + "description": [], + "signature": [ + "() => Partial<{ 'user_agent.original': string; 'user_agent.os.name': string; 'user_agent.name': string; 'user_agent.device.name': string; 'user_agent.version': number; }>" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/index.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.apm.serverlessFunction", + "type": "Function", + "tags": [], + "label": "serverlessFunction", + "description": [], + "signature": [ + "({ functionName, serviceName, environment, agentName, architecture, }: { functionName: string; environment: string; agentName: string; serviceName?: string | undefined; architecture?: string | undefined; }) => ", + "ServerlessFunction" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/index.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.apm.serverlessFunction.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + "{ functionName: string; environment: string; agentName: string; serviceName?: string | undefined; architecture?: string | undefined; }" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/serverless_function.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx new file mode 100644 index 00000000000000..20c801a6c27cc9 --- /dev/null +++ b/api_docs/kbn_apm_synthtrace_client.mdx @@ -0,0 +1,42 @@ +--- +#### +#### 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: kibKbnApmSynthtraceClientPluginApi +slug: /kibana-dev-docs/api/kbn-apm-synthtrace-client +title: "@kbn/apm-synthtrace-client" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/apm-synthtrace-client plugin +date: 2023-01-05 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] +--- +import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; + +Elastic APM trace data generator + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 152 | 0 | 152 | 16 | + +## Common + +### Objects + + +### Functions + + +### Classes + + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 069edd882052f5..ad75dc64690992 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2023-01-04 +date: 2023-01-05 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 d14507a20a9dda..274e4d8e3edfef 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2023-01-04 +date: 2023-01-05 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 b1b67d3df5a18c..0b70d8698e6e2c 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2023-01-04 +date: 2023-01-05 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 b12dcb04ef575b..dde88d52e34448 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2023-01-04 +date: 2023-01-05 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 d2de7f685f4500..21e9987c0084ed 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2023-01-04 +date: 2023-01-05 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 e214b813197948..84cf5e03b3a849 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2023-01-04 +date: 2023-01-05 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 96a5f435e921d0..572d5cd81b1626 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2023-01-04 +date: 2023-01-05 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 7ff5e107ca1fa4..a1b429f8dc4a5f 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2023-01-04 +date: 2023-01-05 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 775e2431130be5..f7c2cb4bebe9af 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2023-01-04 +date: 2023-01-05 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 c2eaff096f0a43..aaee92815d3b4e 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2023-01-04 +date: 2023-01-05 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 a202335ccf32e0..312ce04e753b25 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 660d70de32009b..dca8dd6db64082 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2023-01-04 +date: 2023-01-05 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 d5e32b8c2cf346..3f61f638a8ab4b 100644 --- a/api_docs/kbn_content_management_content_editor.mdx +++ b/api_docs/kbn_content_management_content_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-editor title: "@kbn/content-management-content-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-content-editor plugin -date: 2023-01-04 +date: 2023-01-05 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 3982d6db2430fc..eb8824fa036df1 100644 --- a/api_docs/kbn_content_management_table_list.mdx +++ b/api_docs/kbn_content_management_table_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list title: "@kbn/content-management-table-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list plugin -date: 2023-01-04 +date: 2023-01-05 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 395bcd721f56dc..4446b18b31f3cb 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 338c495988ebe3..70c724f951d59d 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 fb0c3184969b3d..5ed218c3ff6dc4 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 a9f58451012b63..604aedde065818 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2023-01-04 +date: 2023-01-05 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 401c78d7df4ff5..a5dd693e2de36a 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 00296d5ae39489..5fe4b6db852dc3 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 6260b7eef15d47..42883fd89bdb03 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 4b282e54db22f2..e03613ab08e520 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 714739319696a0..a3cf47493b7924 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 14aba8aa5a1890..06662ca0343930 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2023-01-04 +date: 2023-01-05 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 e39e6562838814..825d30c2e65a95 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 0baaf555d72e09..fb631665936c36 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 a36fb37dfe79b2..193f3a1e73b1f5 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 4bc0becba95d3b..335f3db53c0374 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 0588d75d323d7e..0eb01b985a253c 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2023-01-04 +date: 2023-01-05 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 64ad012bdd92b0..754fcb1d727e81 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 789f958e88c566..c00df002f87cd6 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 1825c03c51710b..857bc6824c5879 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 c07c97dae064dc..9b19a4d2a722e7 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2023-01-04 +date: 2023-01-05 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 6a72bafb61c476..4c613c04fe3d9c 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2023-01-04 +date: 2023-01-05 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 66659b4a37af7b..57599d1d0ee9e2 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 403973d3189ad6..33d194b4d3cae1 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 b4dce1907f80b2..cc9e6fb66db841 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 b645f4845cb82f..23916b1a07f850 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 4eb086bb997880..fe74b1326dc9cb 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 cbb680ab7847b6..8bdf78906c05e6 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 a246c142593224..2c6e915cda6042 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 ea5155784208f2..a9aa31f4783e0f 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2023-01-04 +date: 2023-01-05 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 e86a3704aaa082..d06d4468852cc5 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2023-01-04 +date: 2023-01-05 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 91260eecf6cc7f..b639211874f616 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 e9dd33e35f495c..2e076f2f87f975 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 3b825266da93e8..1b0b2ad1ff0b5f 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 8b61a3e7d4c189..9c4146e94218f7 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 58f976c0783ace..529a2212e4d9fa 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2023-01-04 +date: 2023-01-05 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 47a3d9ef828d06..ecdb6951f3ee18 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 25a9e64fa7ebd2..63c404370aa32e 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 1148a02106e531..575b4e1dc01aa7 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 cf6dc6d16ecb6e..33e9d492f8d3e3 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2023-01-04 +date: 2023-01-05 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 54c6608c359d84..47818b93186b5f 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 55de80c6329a11..bdd6137d712203 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 87d1907e5ce6a3..2069104586d699 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 c4d997139c4f16..f95aef7bf83adb 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 14d8408bcfbeb3..32b448bc444284 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 db1cd5ae412ac6..3b250b1880bd37 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 c09a448295ee37..34293547457e01 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 f22ff43941de29..551e46bc97d758 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2023-01-04 +date: 2023-01-05 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 62d0b3447a3ca8..df6988e3aebbb2 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2023-01-04 +date: 2023-01-05 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 d37b355f64f2c8..aef946de038a60 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 f5b39e6d8886c0..a41e615e7795d1 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 2913423211a582..a3517e668461bd 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 0dd2733135afba..83915fcb73fbf3 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 c27a6752b1d3db..c2ce2d5a6567f3 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 e503cfda242cf7..c2a18e25d15545 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 c33fbd3a2ca071..a674a87c21441f 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 b39bb90694e054..49ebfe006ce4f7 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2023-01-04 +date: 2023-01-05 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 e171bb1ad18da3..4da2d696c45014 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 da5abca7ba5258..842998f8af8c86 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2023-01-04 +date: 2023-01-05 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 59608e1a05b66e..10d6588f3742c7 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2023-01-04 +date: 2023-01-05 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 08ad8524f6385a..e7d07dec9101ae 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 d19f6878aa9350..746f5b1660d13a 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 ff753108b4d658..0ce06809c33dd8 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 2a2a5b9927a354..48b9d34fdbd218 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 5893ae4f871cd1..f1cdcea595c44e 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 82c379523e0327..9b84f2529e626d 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 3470a2efcf369a..61e01463bc5553 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 391802fb278597..3315b941b0714e 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 eaf72f487b34df..840cfe834e0adb 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 f4043eafb67c69..fcbb2ad5f6c54b 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2023-01-04 +date: 2023-01-05 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 aca10cccaaa10d..36c422eadf1489 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 cbccdc84c6d466..159083e080a682 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 7acadaaf0eec4b..e27cf520128c6c 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 ae58be1aa6ae82..8c3e3840d0cb49 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 d07bb18de417fa..7771439e39b451 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 6ab1dc7f527e81..cba31fa00adec3 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index 923aa3bf56abe6..d115fa9cf90a9c 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 196f122dd09a82..065cc387f09a4c 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2023-01-04 +date: 2023-01-05 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 f766ddb0a4ea83..7736c605fe236a 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 02a00e4dc40887..5322838f77b60c 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 4a06ede86cceaf..354da232a384fa 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 2e6b26874d1c5a..a33b050586e10f 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2023-01-04 +date: 2023-01-05 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 fb4e799c364f91..fdfc5ffc31e6d6 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 88e5de39aa9c1e..daf10114c08b56 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 57248a0706a2f6..1d59c67682b38b 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 609dcebb15f68b..387689e4f1d6b3 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 ce4f808deaf537..8cf24a9cf955df 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2023-01-04 +date: 2023-01-05 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 f61875ef8f8d51..a1cf7ea76406c1 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 d2c0aa0a899c14..9990d4983efd56 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 a79ce678266267..67f6b1c5ad260b 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 5f8d836d7f154c..ecb4437222c629 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2023-01-04 +date: 2023-01-05 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 93209b14ea112d..23b6109b057a66 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 a48fafc9b3478e..901c0a136274ef 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 aeca4844800e41..e79ae1a65df21d 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 2d0f3e6c39228e..9086b205a846aa 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 9bccbd44fbb7a0..32e98544b7d99c 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 ad796e0a9e30fe..476cf273e11446 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 80fd4bba10f98f..e8a345913e6a81 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 889772c87fda60..245c61815db452 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 a49443ff504eed..9b6ae88fea65b0 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 2f51ac972ed186..c4934fa01f6fed 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 b7bddffd86a3df..e51c8bf025fcf8 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2023-01-04 +date: 2023-01-05 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 194594f9f2b44c..f24f4a1977277c 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 76e9b8ffc08783..3ec31aef56a17c 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2023-01-04 +date: 2023-01-05 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 65e11c17137719..764275bf0c2112 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 eff8f640e3da81..c8f62869d13c59 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 9348789dff2859..88bd0685580522 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 fafcf1864b10fb..543ae91eda4a78 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 ca5bf3c06036ea..fa8c8ae24569bc 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 69c1465ed65d36..6e16505179db25 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 8b56326ecbb26b..48b765b02f0b7b 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2023-01-04 +date: 2023-01-05 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 e93e15a243d70f..fd0859f009b019 100644 --- a/api_docs/kbn_core_saved_objects_api_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-internal title: "@kbn/core-saved-objects-api-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 74856553149087..82baf13882d1d2 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 1733508009863b..b4496dd8674010 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 02467a63a58ad4..a66c5483d3a8c0 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 005c55a15284ec..ac8aee4e48f9e6 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 b447ad774b642f..26c42deed2f897 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 6630e5e6801b08..f79b68b24200ba 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 9e034416804b14..8a58ad039262da 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2023-01-04 +date: 2023-01-05 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 1246eec3a955df..f8b4f1319a12d0 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 ba32b1206bb5b9..b6341c2b7ac023 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index e44edee58c08fe..6d0acf2302698a 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 2f42ebc19c7673..a96894a90aa994 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index 6fc12887334104..c7bc04b4af7a09 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2023-01-04 +date: 2023-01-05 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 3035b90316d9f5..ff5923746bd437 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 be5d0e5e89169b..4a430a8a0a94fa 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 102fb5a8eee8e2..a55bca92a7862c 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2023-01-04 +date: 2023-01-05 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 cacf71ed5e01c6..52d9416458e3e7 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2023-01-04 +date: 2023-01-05 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 92999ebe4a029a..20c522efca2c42 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 b5e1b634bc38fa..beabbb86b67c95 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2023-01-04 +date: 2023-01-05 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 d2a34fc88ff513..37a43db95cdb16 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 28b2a00f7f47d3..c1fe6cf3ad0b1c 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 aa6f3b6fe580ae..08c7c07fcdf14e 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2023-01-04 +date: 2023-01-05 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 5e6cfb7e595c3e..ec166fe4b8d081 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 f160f6c5c9dadf..9bcaefc1ae4a46 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.mdx +++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server title: "@kbn/core-test-helpers-kbn-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-kbn-server plugin -date: 2023-01-04 +date: 2023-01-05 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 f9cce6ce311f0a..c80cc96685a2bb 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2023-01-04 +date: 2023-01-05 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 28d4e669824c2a..f49089af40787c 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2023-01-04 +date: 2023-01-05 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 f0f93cd7096eff..026ab4187fbdbe 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2023-01-04 +date: 2023-01-05 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 9186945e418544..c161082b2c9771 100644 --- a/api_docs/kbn_core_theme_browser_internal.mdx +++ b/api_docs/kbn_core_theme_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-internal title: "@kbn/core-theme-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 1e58c7d8a3050f..202f8f3fe62b69 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 f55485ef03f549..2a54b16c7dc7a0 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: 2023-01-04 +date: 2023-01-05 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 127dcc2aa79a77..8754e611f68399 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: 2023-01-04 +date: 2023-01-05 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 4526feeb0ba0a7..03e60774f2870d 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: 2023-01-04 +date: 2023-01-05 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 311bda64474589..299d03c2e96145 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: 2023-01-04 +date: 2023-01-05 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 2c5601d67dd215..a551158d3efe96 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: 2023-01-04 +date: 2023-01-05 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 9a3ada7256eb68..9a25ca56527004 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: 2023-01-04 +date: 2023-01-05 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 cc210fca79381e..c5e1f7dd4aff54 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: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index af5dd8a8e0e6e3..4937ae83fa7b3a 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2023-01-04 +date: 2023-01-05 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 5384148197c514..bdf0ea761d323b 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2023-01-04 +date: 2023-01-05 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 9c2dbc6636bad5..b00a60cf35c45f 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 53a38c2ec3c311..871503070c3e6d 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2023-01-04 +date: 2023-01-05 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 cec9498d9efa50..a00e2fac3eb1af 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx index 409245bb857267..82c75242560a17 100644 --- a/api_docs/kbn_cypress_config.mdx +++ b/api_docs/kbn_cypress_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cypress-config title: "@kbn/cypress-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cypress-config plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config'] --- import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index ea4db8d10e0176..5488da1d8d5a7c 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2023-01-04 +date: 2023-01-05 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 fe69f0b21fb743..c28e272361c2b3 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2023-01-04 +date: 2023-01-05 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 17c5076a81202f..0ba2289b56dbc1 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2023-01-04 +date: 2023-01-05 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 58dfcc17f27b26..0807eb814f0f59 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2023-01-04 +date: 2023-01-05 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 f5a8407bf73950..751fb55358fd50 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2023-01-04 +date: 2023-01-05 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 d4b07c58e4a9bc..dad9e23eda253e 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2023-01-04 +date: 2023-01-05 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 a50b64ddba0ef4..18de821b5d501f 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2023-01-04 +date: 2023-01-05 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 2d904ef2886259..f1d6cf40be80ec 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2023-01-04 +date: 2023-01-05 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 1a61fe1155a862..c8229b33a81de1 100644 --- a/api_docs/kbn_ecs.mdx +++ b/api_docs/kbn_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs title: "@kbn/ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs plugin -date: 2023-01-04 +date: 2023-01-05 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 8bcf07fc5ae1cf..d86a8fd05b048d 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2023-01-04 +date: 2023-01-05 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 302588206616a5..7b9f84a1ca86b5 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2023-01-04 +date: 2023-01-05 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 92fd053ffdeac8..84cd95e548eab2 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2023-01-04 +date: 2023-01-05 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 b9a6472f879e72..b7d286c1f242e9 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2023-01-04 +date: 2023-01-05 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 1b6e9b1111b24f..d36e303914b759 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2023-01-04 +date: 2023-01-05 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 524f914bc234bf..a23b83752578d0 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2023-01-04 +date: 2023-01-05 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 790940d7204fba..837d13f190d732 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2023-01-04 +date: 2023-01-05 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 1e9b1e9267b85f..7b8507cc621a2a 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2023-01-04 +date: 2023-01-05 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 a9c35a0d5e8aaf..41c0a311843e1e 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2023-01-04 +date: 2023-01-05 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 bc971bf4adbd4a..e31e7f5733c145 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2023-01-04 +date: 2023-01-05 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 98892a7519efb6..948e2f362b27f6 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: 2023-01-04 +date: 2023-01-05 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 b915e44f0d1761..8d0aa8c6c53fed 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2023-01-04 +date: 2023-01-05 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 594aea59157583..1a44f2f0021116 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2023-01-04 +date: 2023-01-05 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 09f6f5a54d27e8..9745a2cfc9d360 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 6371c9b60c53b1..f59e4053b8fc92 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2023-01-04 +date: 2023-01-05 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 999c978476a543..9a2237ff5ff00b 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2023-01-04 +date: 2023-01-05 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 30e82cb2ed41ef..5b8de781cccded 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2023-01-04 +date: 2023-01-05 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 a8ef1b3622cc6b..03aa76407fe3a0 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2023-01-04 +date: 2023-01-05 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 5a5da7b54f8565..c4cc5b4edc141b 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2023-01-04 +date: 2023-01-05 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 8b209b7d6dc61e..360a6aad83d817 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2023-01-04 +date: 2023-01-05 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 2c23d5196ec76c..e652b959206b08 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2023-01-04 +date: 2023-01-05 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 3218c48df9f420..33421d53f6410c 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2023-01-04 +date: 2023-01-05 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 c46be2a534aff5..8a9a18466af241 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2023-01-04 +date: 2023-01-05 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 de0951f2678355..57026cea062f3d 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2023-01-04 +date: 2023-01-05 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 a1fe16d664859a..9ae2c71b3e5aa5 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2023-01-04 +date: 2023-01-05 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 74efda40f1c343..804a3c1aaf5cdf 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2023-01-04 +date: 2023-01-05 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 09034e374b6ed7..792e203f64fa5e 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2023-01-04 +date: 2023-01-05 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 a6d2b35b5dd498..835f7623119b22 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 72ea4a2d4a4fbb..087ee94f8ad048 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2023-01-04 +date: 2023-01-05 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 a0b37686426b66..1bc914b73ac3da 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2023-01-04 +date: 2023-01-05 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 ef16708460e8c5..111900cdf91c08 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2023-01-04 +date: 2023-01-05 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 7a931a2343f1ae..bacee761bb4f1d 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2023-01-04 +date: 2023-01-05 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_nested_property.mdx b/api_docs/kbn_ml_nested_property.mdx index 5061cb253875e9..6b1c016f1f15d6 100644 --- a/api_docs/kbn_ml_nested_property.mdx +++ b/api_docs/kbn_ml_nested_property.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-nested-property title: "@kbn/ml-nested-property" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-nested-property plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-nested-property'] --- import kbnMlNestedPropertyObj from './kbn_ml_nested_property.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index 33d139d1e8211e..75d2c20208dbe6 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index adda612e26b71d..e6df949447d069 100644 --- a/api_docs/kbn_ml_url_state.mdx +++ b/api_docs/kbn_ml_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-url-state title: "@kbn/ml-url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-url-state plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index 18ef9b30d567b0..e7e916e4061a1d 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2023-01-04 +date: 2023-01-05 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 4449151d9fd328..ae63032d935a42 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2023-01-04 +date: 2023-01-05 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 4f75f1648c0dae..3348f4d65d1f55 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2023-01-04 +date: 2023-01-05 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 5b3e79226885c6..0b34bf3d854650 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index 42d246ad9a4ca8..cf3cb26dec6e2d 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2023-01-04 +date: 2023-01-05 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 943501e2e85b4f..15351567c0614f 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2023-01-04 +date: 2023-01-05 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 16f88f5f88dba4..f7f994f3ed8978 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2023-01-04 +date: 2023-01-05 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 4cc7ce92fa36f7..fc67e2cc7e19b0 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_repo_path.mdx b/api_docs/kbn_repo_path.mdx index fecbed0ef0b608..79aa99c6ca24e6 100644 --- a/api_docs/kbn_repo_path.mdx +++ b/api_docs/kbn_repo_path.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-path title: "@kbn/repo-path" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-path plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-path'] --- import kbnRepoPathObj from './kbn_repo_path.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index 7244557e8470c4..ac382bfc689360 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2023-01-04 +date: 2023-01-05 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 67b306598da614..5dbfc0bddb3211 100644 --- a/api_docs/kbn_rison.mdx +++ b/api_docs/kbn_rison.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison title: "@kbn/rison" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rison plugin -date: 2023-01-04 +date: 2023-01-05 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 86db64e5f6adb7..84bc39527bb7ce 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2023-01-04 +date: 2023-01-05 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 78c457fe10925d..44d47c67c4d028 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2023-01-04 +date: 2023-01-05 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 67b44636f160fa..a618242de8bf7a 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index cc5dd2f38fbca8..6972bc971f7076 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2023-01-04 +date: 2023-01-05 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 7a02f64f1b212b..017642222ae4b5 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2023-01-04 +date: 2023-01-05 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 fe085680d5ff2b..ea035a67243bfc 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2023-01-04 +date: 2023-01-05 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 56599820cca0f9..0b6a62ebec764c 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2023-01-04 +date: 2023-01-05 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 ddd0bb78c84529..b344f611b3f0af 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2023-01-04 +date: 2023-01-05 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 e135cb260ea8d8..424999d392e610 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2023-01-04 +date: 2023-01-05 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 d70c2aaf47ea00..f3864b8cb0eef8 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2023-01-04 +date: 2023-01-05 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 3e3f1cb3937b4a..a17a8dd2433ee3 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2023-01-04 +date: 2023-01-05 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 5c95c689d6d5e1..e799bb951a0148 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2023-01-04 +date: 2023-01-05 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 4bff9014fc9f21..b1658ea9a22755 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2023-01-04 +date: 2023-01-05 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 9131f3b346d702..d1c23e5ba63dfa 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2023-01-04 +date: 2023-01-05 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 55af30ab23a6c1..13e519e25775f4 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2023-01-04 +date: 2023-01-05 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 fdf7f7bbab4aa5..b3630c6a28db32 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2023-01-04 +date: 2023-01-05 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 e0288c33b77ab7..5d50550cbbdd8f 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2023-01-04 +date: 2023-01-05 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 ad1a708d546ca6..9d4fa496b09944 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2023-01-04 +date: 2023-01-05 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 1fa6690d342d7a..996b1e7e4628d2 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2023-01-04 +date: 2023-01-05 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 2834f7d8b49800..8d7231c293dddd 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2023-01-04 +date: 2023-01-05 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 080dd384242a27..d8f0177ce5d264 100644 --- a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx +++ b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-user-profile-components title: "@kbn/shared-ux-avatar-user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-user-profile-components plugin -date: 2023-01-04 +date: 2023-01-05 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 993c114ace882b..5ac3b19d8f7377 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2023-01-04 +date: 2023-01-05 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 24212b49c97a06..f53f4f93c07c88 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen-mocks title: "@kbn/shared-ux-button-exit-full-screen-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 814acac876932a..5ab035a0f0d24b 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2023-01-04 +date: 2023-01-05 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 7f4152a72a83ad..823c9b7dfd7df0 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2023-01-04 +date: 2023-01-05 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 f6d24ff81d069a..6e71f9f1b44115 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 78516c74b4a6cd..bce15f8bee34fc 100644 --- a/api_docs/kbn_shared_ux_file_context.mdx +++ b/api_docs/kbn_shared_ux_file_context.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context title: "@kbn/shared-ux-file-context" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-context plugin -date: 2023-01-04 +date: 2023-01-05 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 a4e30695191072..7aaa203a969e91 100644 --- a/api_docs/kbn_shared_ux_file_image.mdx +++ b/api_docs/kbn_shared_ux_file_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image title: "@kbn/shared-ux-file-image" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image plugin -date: 2023-01-04 +date: 2023-01-05 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 39a510747f3e40..1dbef0f3dec9b3 100644 --- a/api_docs/kbn_shared_ux_file_image_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks title: "@kbn/shared-ux-file-image-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 26c8811eddcd49..e05608c51da615 100644 --- a/api_docs/kbn_shared_ux_file_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks title: "@kbn/shared-ux-file-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 5b486f5ab88931..00a733c1f013be 100644 --- a/api_docs/kbn_shared_ux_file_picker.mdx +++ b/api_docs/kbn_shared_ux_file_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-picker title: "@kbn/shared-ux-file-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-picker plugin -date: 2023-01-04 +date: 2023-01-05 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 3a8c5e6f014934..10182b405828eb 100644 --- a/api_docs/kbn_shared_ux_file_upload.mdx +++ b/api_docs/kbn_shared_ux_file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-upload title: "@kbn/shared-ux-file-upload" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-upload plugin -date: 2023-01-04 +date: 2023-01-05 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 5a18a62168566a..4d89f9f6afa9a5 100644 --- a/api_docs/kbn_shared_ux_file_util.mdx +++ b/api_docs/kbn_shared_ux_file_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util title: "@kbn/shared-ux-file-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-util plugin -date: 2023-01-04 +date: 2023-01-05 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 e94bbb4554227b..8db2583b790e4d 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2023-01-04 +date: 2023-01-05 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 058995b1b27a16..6bd6b1bcd24f12 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 5e323f805efb05..34849a157ee774 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2023-01-04 +date: 2023-01-05 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 c3ed1a40f6093a..cf8823b0e46e23 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 af1b05374b0f32..6fcca6f149e0fe 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2023-01-04 +date: 2023-01-05 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 cf7a2cae82251e..7858aa8f305501 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 179f0c3cd0bc8d..da4489070a9546 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2023-01-04 +date: 2023-01-05 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 3fc339955ec209..8cccc955948067 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 85155fdf266c68..c298217f90f525 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2023-01-04 +date: 2023-01-05 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 20c89fe979d66b..40ba5d3ba383e4 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 4d34decfaacbab..840aa22e56e8d7 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2023-01-04 +date: 2023-01-05 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 5035f9405291de..76080ea92521cd 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2023-01-04 +date: 2023-01-05 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 00d935d807c97e..a26b0f9e3a688e 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 bb04fbc45f6877..9f0208d1275850 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 d5f579d9b321e6..1ad64edc7642d3 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2023-01-04 +date: 2023-01-05 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 4bc26980604271..6e405a9bcf5ab1 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2023-01-04 +date: 2023-01-05 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 5c0139a802fbcd..836de914f23117 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 9c5e6b6bd41943..fabf9042c2cf7d 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.mdx +++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found title: "@kbn/shared-ux-prompt-not-found" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-not-found plugin -date: 2023-01-04 +date: 2023-01-05 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 a3c6bcaaa9b694..c5f0715c11702d 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2023-01-04 +date: 2023-01-05 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 002c61397fb4fb..7e84f66ef4043b 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2023-01-04 +date: 2023-01-05 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 bf463a404c85f0..6096b3f0847443 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2023-01-04 +date: 2023-01-05 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 40413e0b6ec78a..1083fb81f22c70 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2023-01-04 +date: 2023-01-05 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 779b345e74955e..2f58ba8ccffb0f 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_slo_schema.devdocs.json b/api_docs/kbn_slo_schema.devdocs.json index f301cd52ad3464..dc6a3660a4d798 100644 --- a/api_docs/kbn_slo_schema.devdocs.json +++ b/api_docs/kbn_slo_schema.devdocs.json @@ -82,6 +82,59 @@ ], "returnComment": [] }, + { + "parentPluginId": "@kbn/slo-schema", + "id": "def-common.Duration.add", + "type": "Function", + "tags": [], + "label": "add", + "description": [], + "signature": [ + "(other: ", + { + "pluginId": "@kbn/slo-schema", + "scope": "common", + "docId": "kibKbnSloSchemaPluginApi", + "section": "def-common.Duration", + "text": "Duration" + }, + ") => ", + { + "pluginId": "@kbn/slo-schema", + "scope": "common", + "docId": "kibKbnSloSchemaPluginApi", + "section": "def-common.Duration", + "text": "Duration" + } + ], + "path": "packages/kbn-slo-schema/src/models/duration.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/slo-schema", + "id": "def-common.Duration.add.$1", + "type": "Object", + "tags": [], + "label": "other", + "description": [], + "signature": [ + { + "pluginId": "@kbn/slo-schema", + "scope": "common", + "docId": "kibKbnSloSchemaPluginApi", + "section": "def-common.Duration", + "text": "Duration" + } + ], + "path": "packages/kbn-slo-schema/src/models/duration.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "@kbn/slo-schema", "id": "def-common.Duration.isShorterThan", diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index 4665cd41141d1a..ccd0383507f318 100644 --- a/api_docs/kbn_slo_schema.mdx +++ b/api_docs/kbn_slo_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-slo-schema title: "@kbn/slo-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/slo-schema plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 63 | 0 | 63 | 0 | +| 65 | 0 | 65 | 0 | ## Common diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 6d7d4aaa75740f..d251cb53cf2b17 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2023-01-04 +date: 2023-01-05 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 d5031b98be78cc..08fefdd0d1ca3f 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: 2023-01-04 +date: 2023-01-05 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 efe25cb5c111b2..b7b7c40dcd9fb5 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2023-01-04 +date: 2023-01-05 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 60e2b903b4adde..9b5d09a06fc4dc 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2023-01-04 +date: 2023-01-05 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 7e5a59e5673d92..72182a0ebbdc89 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2023-01-04 +date: 2023-01-05 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 2ada823d80c8f4..1ca990575df890 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2023-01-04 +date: 2023-01-05 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 b9112c665fa491..c4d798f5c5de31 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2023-01-04 +date: 2023-01-05 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 cd9715e484fecc..8dffa71ae8d45a 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2023-01-04 +date: 2023-01-05 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 07bb626be10f8c..c392548600e63a 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2023-01-04 +date: 2023-01-05 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 e897460e5ab714..b88de09d27123f 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_ts_project_linter.mdx b/api_docs/kbn_ts_project_linter.mdx index 6ffc78604b9df5..b439a5aa0bfa3e 100644 --- a/api_docs/kbn_ts_project_linter.mdx +++ b/api_docs/kbn_ts_project_linter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-project-linter title: "@kbn/ts-project-linter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ts-project-linter plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-project-linter'] --- import kbnTsProjectLinterObj from './kbn_ts_project_linter.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index ae3b6e29a09b30..3a381ea493b253 100644 --- a/api_docs/kbn_ts_projects.mdx +++ b/api_docs/kbn_ts_projects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-projects title: "@kbn/ts-projects" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ts-projects plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-projects'] --- import kbnTsProjectsObj from './kbn_ts_projects.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index b7f710c69a02ec..50c32474f05fc8 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2023-01-04 +date: 2023-01-05 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 29f9ff3d5632cb..94c8343bce3533 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2023-01-04 +date: 2023-01-05 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 5dfafb2f60919e..e6a35cfacbf864 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2023-01-04 +date: 2023-01-05 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 2b02ca1d5dacbd..b746c104964a27 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2023-01-04 +date: 2023-01-05 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 566b9a40548d7b..dfa00ffb283f3c 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2023-01-04 +date: 2023-01-05 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 62d60744d49ce1..a7d30a4b91117f 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2023-01-04 +date: 2023-01-05 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 badc0905fb8cb7..08e8cab6e78ce6 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2023-01-04 +date: 2023-01-05 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 8b23f28d9a670f..3a29ccbae806c5 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2023-01-04 +date: 2023-01-05 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 61abf9c225c455..e1852062078786 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index d28184f9e5a813..bcbecb8b8b5bee 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.devdocs.json b/api_docs/kibana_utils.devdocs.json index 307b8bc437e19e..6f0caeb2b3c77a 100644 --- a/api_docs/kibana_utils.devdocs.json +++ b/api_docs/kibana_utils.devdocs.json @@ -2730,54 +2730,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "kibanaUtils", - "id": "def-public.createStateHash", - "type": "Function", - "tags": [], - "label": "createStateHash", - "description": [], - "signature": [ - "(json: string, existingJsonProvider: ((hash: string) => string | null) | undefined) => string" - ], - "path": "src/plugins/kibana_utils/public/state_management/state_hash/state_hash.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "kibanaUtils", - "id": "def-public.createStateHash.$1", - "type": "string", - "tags": [], - "label": "json", - "description": [], - "signature": [ - "string" - ], - "path": "src/plugins/kibana_utils/public/state_management/state_hash/state_hash.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "kibanaUtils", - "id": "def-public.createStateHash.$2", - "type": "Function", - "tags": [], - "label": "existingJsonProvider", - "description": [], - "signature": [ - "((hash: string) => string | null) | undefined" - ], - "path": "src/plugins/kibana_utils/public/state_management/state_hash/state_hash.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "kibanaUtils", "id": "def-public.createUrlTracker", @@ -3279,39 +3231,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "kibanaUtils", - "id": "def-public.isStateHash", - "type": "Function", - "tags": [], - "label": "isStateHash", - "description": [], - "signature": [ - "(str: string) => boolean" - ], - "path": "src/plugins/kibana_utils/public/state_management/state_hash/state_hash.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "kibanaUtils", - "id": "def-public.isStateHash.$1", - "type": "string", - "tags": [], - "label": "str", - "description": [], - "signature": [ - "string" - ], - "path": "src/plugins/kibana_utils/public/state_management/state_hash/state_hash.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "kibanaUtils", "id": "def-public.of", @@ -3729,118 +3648,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "kibanaUtils", - "id": "def-public.replaceUrlHashQuery", - "type": "Function", - "tags": [], - "label": "replaceUrlHashQuery", - "description": [], - "signature": [ - "(rawUrl: string, queryReplacer: (query: ", - "ParsedQuery", - ") => ", - "ParsedQuery", - ") => string" - ], - "path": "src/plugins/kibana_utils/public/state_management/url/format.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "kibanaUtils", - "id": "def-public.replaceUrlHashQuery.$1", - "type": "string", - "tags": [], - "label": "rawUrl", - "description": [], - "signature": [ - "string" - ], - "path": "src/plugins/kibana_utils/public/state_management/url/format.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "kibanaUtils", - "id": "def-public.replaceUrlHashQuery.$2", - "type": "Function", - "tags": [], - "label": "queryReplacer", - "description": [], - "signature": [ - "(query: ", - "ParsedQuery", - ") => ", - "ParsedQuery", - "" - ], - "path": "src/plugins/kibana_utils/public/state_management/url/format.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "kibanaUtils", - "id": "def-public.replaceUrlQuery", - "type": "Function", - "tags": [], - "label": "replaceUrlQuery", - "description": [], - "signature": [ - "(rawUrl: string, queryReplacer: (query: ", - "ParsedQuery", - ") => ", - "ParsedQuery", - ") => string" - ], - "path": "src/plugins/kibana_utils/public/state_management/url/format.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "kibanaUtils", - "id": "def-public.replaceUrlQuery.$1", - "type": "string", - "tags": [], - "label": "rawUrl", - "description": [], - "signature": [ - "string" - ], - "path": "src/plugins/kibana_utils/public/state_management/url/format.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "kibanaUtils", - "id": "def-public.replaceUrlQuery.$2", - "type": "Function", - "tags": [], - "label": "queryReplacer", - "description": [], - "signature": [ - "(query: ", - "ParsedQuery", - ") => ", - "ParsedQuery", - "" - ], - "path": "src/plugins/kibana_utils/public/state_management/url/format.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "kibanaUtils", "id": "def-public.retrieveState", @@ -3881,10 +3688,12 @@ "tags": [], "label": "setStateToKbnUrl", "description": [ - "\nSets state to the url by key and returns a new url string.\nDoesn't actually updates history\n\ne.g.:\ngiven a url: http://localhost:5601/oxf/app/kibana#/yourApp?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')\nkey: '_a'\nand state: {tab: 'other'}\n\nwill return url:\nhttp://localhost:5601/oxf/app/kibana#/yourApp?_a=(tab:other)&_b=(f:test,i:'',l:'')\n\nBy default due to Kibana legacy reasons assumed that state is stored in a query inside a hash part of the URL:\nhttp://localhost:5601/oxf/app/kibana#/yourApp?_a={STATE}\n\n{ storeInHashQuery: false } option should be used in you want to store you state in a main query (not in a hash):\nhttp://localhost:5601/oxf/app/kibana?_a={STATE}#/yourApp" + "\nSets state to the url by key and returns a new url string.\nDoesn't actually updates history\n\ne.g.:\ngiven a url: http://localhost:5601/oxf/app/kibana#/yourApp?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')\nkey: '_a'\nand state: {tab: 'other'}\n\nwill return url:\nhttp://localhost:5601/oxf/app/kibana#/yourApp?_a=(tab:other)&_b=(f:test,i:'',l:'')\n\nBy default due to Kibana legacy reasons assumed that state is stored in a query inside a hash part of the URL:\nhttp://localhost:5601/oxf/app/kibana#/yourApp?_a={STATE}\n\n{ storeInHashQuery: false } option should be used in you want to store your state in a main query (not in a hash):\nhttp://localhost:5601/oxf/app/kibana?_a={STATE}#/yourApp" ], "signature": [ - "(key: string, state: State, { useHash = false, storeInHashQuery = true }: { useHash: boolean; storeInHashQuery?: boolean | undefined; }, rawUrl: string) => string" + "(key: string, state: State, { useHash = false, storeInHashQuery = true }: ", + "SetStateToKbnUrlHashOptions", + ", rawUrl: string) => string" ], "path": "src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts", "deprecated": false, @@ -3927,36 +3736,13 @@ "tags": [], "label": "{ useHash = false, storeInHashQuery = true }", "description": [], + "signature": [ + "SetStateToKbnUrlHashOptions" + ], "path": "src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts", "deprecated": false, "trackAdoption": false, - "children": [ - { - "parentPluginId": "kibanaUtils", - "id": "def-public.setStateToKbnUrl.$3.useHash", - "type": "boolean", - "tags": [], - "label": "useHash", - "description": [], - "path": "src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "kibanaUtils", - "id": "def-public.setStateToKbnUrl.$3.storeInHashQuery", - "type": "CompoundType", - "tags": [], - "label": "storeInHashQuery", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts", - "deprecated": false, - "trackAdoption": false - } - ] + "isRequired": true }, { "parentPluginId": "kibanaUtils", @@ -9675,6 +9461,144 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "kibanaUtils", + "id": "def-common.replaceUrlHashQuery", + "type": "Function", + "tags": [], + "label": "replaceUrlHashQuery", + "description": [], + "signature": [ + "(rawUrl: string, queryReplacer: (query: ", + "ParsedQuery", + ") => ", + "ParsedQuery", + ") => string" + ], + "path": "src/plugins/kibana_utils/common/state_management/format.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "kibanaUtils", + "id": "def-common.replaceUrlHashQuery.$1", + "type": "string", + "tags": [], + "label": "rawUrl", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/kibana_utils/common/state_management/format.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "kibanaUtils", + "id": "def-common.replaceUrlHashQuery.$2", + "type": "Function", + "tags": [], + "label": "queryReplacer", + "description": [], + "signature": [ + "(query: ", + "ParsedQuery", + ") => ", + "ParsedQuery", + "" + ], + "path": "src/plugins/kibana_utils/common/state_management/format.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "kibanaUtils", + "id": "def-common.setStateToKbnUrl", + "type": "Function", + "tags": [], + "label": "setStateToKbnUrl", + "description": [ + "\nCommon version of setStateToKbnUrl which doesn't use session storage.\n\nSets state to the url by key and returns a new url string.\n\ne.g.:\ngiven a url: http://localhost:5601/oxf/app/kibana#/yourApp?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')\nkey: '_a'\nand state: {tab: 'other'}\n\nwill return url:\nhttp://localhost:5601/oxf/app/kibana#/yourApp?_a=(tab:other)&_b=(f:test,i:'',l:'')\n\nBy default due to Kibana legacy reasons assumed that state is stored in a query inside a hash part of the URL:\nhttp://localhost:5601/oxf/app/kibana#/yourApp?_a={STATE}\n\n{ storeInHashQuery: true } option should be used in you want to store you state in a main query (not in a hash):\nhttp://localhost:5601/oxf/app/kibana?_a={STATE}#/yourApp" + ], + "signature": [ + "(key: string, state: State, hashOptions: ", + "SetStateToKbnUrlHashOptions", + ", rawUrl: string) => string" + ], + "path": "src/plugins/kibana_utils/common/state_management/set_state_to_kbn_url.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "kibanaUtils", + "id": "def-common.setStateToKbnUrl.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/kibana_utils/common/state_management/set_state_to_kbn_url.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "kibanaUtils", + "id": "def-common.setStateToKbnUrl.$2", + "type": "Uncategorized", + "tags": [], + "label": "state", + "description": [], + "signature": [ + "State" + ], + "path": "src/plugins/kibana_utils/common/state_management/set_state_to_kbn_url.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "kibanaUtils", + "id": "def-common.setStateToKbnUrl.$3", + "type": "Object", + "tags": [], + "label": "hashOptions", + "description": [], + "signature": [ + "SetStateToKbnUrlHashOptions" + ], + "path": "src/plugins/kibana_utils/common/state_management/set_state_to_kbn_url.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "kibanaUtils", + "id": "def-common.setStateToKbnUrl.$4", + "type": "string", + "tags": [], + "label": "rawUrl", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/kibana_utils/common/state_management/set_state_to_kbn_url.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "kibanaUtils", "id": "def-common.useContainerSelector", diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index e73d2abf29a90c..785e8e432a222e 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 624 | 3 | 424 | 8 | +| 619 | 3 | 418 | 9 | ## Client diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index a0465ef158baf8..aeb8e5772ccc6b 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2023-01-04 +date: 2023-01-05 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 62bb45d75dfc06..27052ecd2330fd 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2023-01-04 +date: 2023-01-05 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 c151aa4240fb69..53c1e47a9d71b8 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2023-01-04 +date: 2023-01-05 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 a20948523a0e1e..08c2f9018d9098 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2023-01-04 +date: 2023-01-05 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 2d81dbbab4bb81..d8b2fbaca716d4 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2023-01-04 +date: 2023-01-05 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 da5719363b6878..d73fe879a87dfc 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2023-01-04 +date: 2023-01-05 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 38a53594623155..a26a82cd9eba6c 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2023-01-04 +date: 2023-01-05 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 2e510bc176047b..050824fa799b0d 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2023-01-04 +date: 2023-01-05 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 eaf2097d6941d2..c75b8757894f92 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2023-01-04 +date: 2023-01-05 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 e2aa3598e7767b..27a62e0df36726 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2023-01-04 +date: 2023-01-05 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 1aa25df608cc4c..f41f8bb07b586c 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2023-01-04 +date: 2023-01-05 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 dd2569b69e7826..ad1619e7850534 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2023-01-04 +date: 2023-01-05 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 e9991f9a444486..b9ef397cc3cb64 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2023-01-04 +date: 2023-01-05 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 ca99e5769e6d2f..6c81a74661a3fc 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2023-01-04 +date: 2023-01-05 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 b571a2c8d938f3..d419273cbb40dd 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 95abe4f6ba646f..66d90e0580f10d 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2023-01-04 +date: 2023-01-05 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 2e4807c07f70eb..87042e93fd629c 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2023-01-04 +date: 2023-01-05 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 8f07bfcaffcfb2..e4e0db0e99b24a 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2023-01-04 +date: 2023-01-05 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 | |--------------|----------|------------------------| -| 541 | 447 | 42 | +| 542 | 448 | 42 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 33995 | 521 | 23728 | 1167 | +| 34115 | 521 | 23837 | 1176 | ## Plugin Directory @@ -30,7 +30,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 220 | 8 | 215 | 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) | - | 427 | 0 | 418 | 37 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 429 | 0 | 420 | 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 | @@ -56,12 +56,12 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 52 | 0 | 51 | 0 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3300 | 119 | 2578 | 27 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | This plugin provides the ability to create data views via a modal flyout inside Kibana apps | 16 | 0 | 7 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Reusable data view field editor across Kibana | 60 | 0 | 30 | 0 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Reusable data view field editor across Kibana | 72 | 0 | 33 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data view management app | 2 | 0 | 2 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 1032 | 0 | 231 | 2 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The Data Visualizer tools help you understand your data, by analyzing the metrics and fields in a log file or an existing Elasticsearch index. | 29 | 3 | 25 | 1 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 10 | 0 | 8 | 2 | -| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 100 | 0 | 82 | 4 | +| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 107 | 0 | 88 | 7 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 37 | 0 | 35 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds embeddables service to Kibana | 524 | 8 | 423 | 4 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends embeddable plugin with more functionality | 14 | 0 | 14 | 0 | @@ -108,7 +108,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 6 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 184 | 1 | 151 | 5 | | kibanaUsageCollection | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 0 | 0 | 0 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 624 | 3 | 424 | 8 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 619 | 3 | 418 | 9 | | | [Security Team](https://github.com/orgs/elastic/teams/security-team) | - | 3 | 0 | 3 | 1 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-visualizations) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 695 | 0 | 599 | 50 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 8 | 0 | 8 | 0 | @@ -167,7 +167,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends UI Actions plugin with more functionality | 206 | 0 | 142 | 9 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the field list which can be integrated into apps | 269 | 0 | 244 | 7 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | The `unifiedHistogram` plugin provides UI components to create a layout including a resizable histogram and a main display. | 52 | 0 | 15 | 0 | -| | [Visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains all the key functionality of Kibana's unified search experience.Contains all the key functionality of Kibana's unified search experience. | 134 | 2 | 99 | 19 | +| | [Visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains all the key functionality of Kibana's unified search experience.Contains all the key functionality of Kibana's unified search experience. | 134 | 2 | 99 | 20 | | upgradeAssistant | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | urlDrilldown | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds drilldown implementations to Kibana | 0 | 0 | 0 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 12 | 0 | 12 | 0 | @@ -205,7 +205,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | Kibana Core | - | 21 | 0 | 0 | 0 | | | Kibana Core | - | 18 | 0 | 2 | 0 | | | [Owner missing] | - | 17 | 0 | 17 | 0 | -| | [Owner missing] | Elastic APM trace data generator | 77 | 0 | 77 | 15 | +| | [Owner missing] | Elastic APM trace data generator | 27 | 0 | 27 | 3 | +| | [Owner missing] | Elastic APM trace data generator | 152 | 0 | 152 | 16 | | | [Owner missing] | - | 11 | 0 | 11 | 0 | | | [Owner missing] | - | 10 | 0 | 10 | 0 | | | [Owner missing] | - | 4 | 0 | 3 | 0 | @@ -482,7 +483,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Owner missing] | - | 2 | 0 | 0 | 0 | | | [Owner missing] | - | 15 | 0 | 4 | 0 | | | [Owner missing] | - | 9 | 0 | 3 | 0 | -| | [Owner missing] | SLO io-ts schema definition and common models shared between public and server. | 63 | 0 | 63 | 0 | +| | [Owner missing] | SLO io-ts schema definition and common models shared between public and server. | 65 | 0 | 65 | 0 | | | [Owner missing] | - | 20 | 0 | 12 | 0 | | | [Owner missing] | - | 2 | 0 | 2 | 0 | | | Kibana Core | - | 97 | 1 | 64 | 1 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 125c4bfe5bc1b4..70e037e70dcac8 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2023-01-04 +date: 2023-01-05 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 8c1aea06b01629..cae40a51c6170d 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2023-01-04 +date: 2023-01-05 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 1c9b50b719128f..96981e1a4c447b 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2023-01-04 +date: 2023-01-05 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 c99e9c3834f28e..1e699f74f13356 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2023-01-04 +date: 2023-01-05 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 579ffcf5fca08f..42a27713d9d2c1 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 061d2915ce5b20..f48e26810b8472 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2023-01-04 +date: 2023-01-05 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 0e36073b5710af..81bc391b6f69e7 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2023-01-04 +date: 2023-01-05 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 be290e20679f0c..4b9aa2fac2319c 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2023-01-04 +date: 2023-01-05 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 c9b96614b2a34a..eae53296bc84f6 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2023-01-04 +date: 2023-01-05 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 1bf87c339d0e95..1b0ce119303c05 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2023-01-04 +date: 2023-01-05 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 5e9c2e4e31f486..1cf212e28e014b 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2023-01-04 +date: 2023-01-05 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 586e4aa8490bd7..94983625fdc2de 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2023-01-04 +date: 2023-01-05 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 168f53bd501c38..a6b97790257f1a 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2023-01-04 +date: 2023-01-05 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 cdb67fc0305adb..5c256409cec602 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2023-01-04 +date: 2023-01-05 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 a0a1e0fe746904..eccc30a39e4fd6 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2023-01-04 +date: 2023-01-05 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 53f129c5b862d9..758ded7a6a1126 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index 69e77842b9e331..7dd5ea5cdb7aad 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 209c672e1e1bdf..8e156c78006bba 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2023-01-04 +date: 2023-01-05 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 53180d67261be3..30d4383c02d5c4 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2023-01-04 +date: 2023-01-05 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 e6d67d3147fc5e..3d6d9035a57b13 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2023-01-04 +date: 2023-01-05 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 ee4e29aa130808..1ae911770642bb 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2023-01-04 +date: 2023-01-05 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 9082cc379c1f75..3d9c2134f1e3b6 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2023-01-04 +date: 2023-01-05 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 8267ffe362fbb3..ed8208fb46e081 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2023-01-04 +date: 2023-01-05 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 2ac3a10c58b425..6c5bb5507a84c8 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2023-01-04 +date: 2023-01-05 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 f5c0a1fd70413a..f92fb69b09b2da 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2023-01-04 +date: 2023-01-05 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 4ce7b2bb14b7ce..377f96ecc66839 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2023-01-04 +date: 2023-01-05 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 846a836deb78e8..46247e0e29196b 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2023-01-04 +date: 2023-01-05 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 c950dc5cc5bf83..f4f28414e410c0 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2023-01-04 +date: 2023-01-05 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 ba7d5344526724..461e9aa967832c 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2023-01-04 +date: 2023-01-05 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 e13fffa01b6aae..74588448d5ca7c 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2023-01-04 +date: 2023-01-05 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 bdef21038a511d..b348ec5afd3e53 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 44098cf130fe43..a6e0561dff4899 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2023-01-04 +date: 2023-01-05 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 b6666167770a33..657940d58b65bb 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2023-01-04 +date: 2023-01-05 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 9b0d2ce308a8ac..80d3a2124bc62a 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2023-01-04 +date: 2023-01-05 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 30c61d67c55b44..b7253793086d39 100644 --- a/api_docs/unified_field_list.mdx +++ b/api_docs/unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedFieldList title: "unifiedFieldList" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedFieldList plugin -date: 2023-01-04 +date: 2023-01-05 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 9b07ff8b2785ad..140702a4cfc30a 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.devdocs.json b/api_docs/unified_search.devdocs.json index bd59a466a51690..a18eb699a0f2a9 100644 --- a/api_docs/unified_search.devdocs.json +++ b/api_docs/unified_search.devdocs.json @@ -157,9 +157,11 @@ "\nRenders a single filter pill" ], "signature": [ - "(props: ", + "(props: Omit<", "FilterItemProps", - ") => JSX.Element" + ", keyof ", + "WithCloseFilterEditorConfirmModalProps", + ">) => JSX.Element" ], "path": "src/plugins/unified_search/public/filter_bar/index.tsx", "deprecated": false, @@ -173,7 +175,11 @@ "label": "props", "description": [], "signature": [ - "FilterItemProps" + "Omit<", + "FilterItemProps", + ", keyof ", + "WithCloseFilterEditorConfirmModalProps", + ">" ], "path": "src/plugins/unified_search/public/filter_bar/index.tsx", "deprecated": false, diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 6c31fe0e88adcd..2dac7a3f63b805 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Visualizations](https://github.com/orgs/elastic/teams/kibana-visualizat | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 134 | 2 | 99 | 19 | +| 134 | 2 | 99 | 20 | ## Client diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index 040c02814b6692..164293d5777534 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Visualizations](https://github.com/orgs/elastic/teams/kibana-visualizat | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 134 | 2 | 99 | 19 | +| 134 | 2 | 99 | 20 | ## Client diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 2050243ee5c986..fa07889a776e1f 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2023-01-04 +date: 2023-01-05 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 40eb092071d15c..465867848c75c0 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2023-01-04 +date: 2023-01-05 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 03664ce4d35b62..5d173f9b8aa9d4 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2023-01-04 +date: 2023-01-05 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 c696b9f4a77264..e298514f96805e 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2023-01-04 +date: 2023-01-05 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 96bfd4cd91f0c8..e8669b98e4f02e 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2023-01-04 +date: 2023-01-05 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 abcd85cb9d53e1..f93abd9c4170f5 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2023-01-04 +date: 2023-01-05 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 f52cbf84d3e634..9e1f216b57f74d 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2023-01-04 +date: 2023-01-05 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 85aeea05d5afb0..52e95848f99285 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2023-01-04 +date: 2023-01-05 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 4bc2596d433c96..039afd2f3323f8 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2023-01-04 +date: 2023-01-05 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 d7e4d794ce0c5a..2e48b962a2e961 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2023-01-04 +date: 2023-01-05 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 b8dd706506a665..bc1fafbc9ce171 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2023-01-04 +date: 2023-01-05 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 d6a74dd1c905dc..5678d82df90fc0 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2023-01-04 +date: 2023-01-05 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 844f11a4df15bd..2b8c6bedbb45db 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2023-01-04 +date: 2023-01-05 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 3ee2fd69a9c530..220ddeec219b49 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2023-01-04 +date: 2023-01-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; From b1a03e774c2835c538f2c961718aa39dbb6c798b Mon Sep 17 00:00:00 2001 From: Julia Bardi <90178898+juliaElastic@users.noreply.github.com> Date: Thu, 5 Jan 2023 07:44:56 +0100 Subject: [PATCH 05/36] [Fleet] Speed up first install of Elastic Defend integration by changing artifact creation to bulk es query (#148205) ## Summary Related to https://github.com/elastic/ingest-dev/issues/1468 Added `bulkCreateArtifacts` and refactored endpoint code to create artifacts with the bulk request, instead of one by one. This reduces the 32s endpoint integration policy creation time to 17s for the first time. The bulk create command takes 700ms with `refresh:false.` image image The only thing I couldn't test yet is the conflict error, that would probably be different for a bulk update. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../services/artifacts/artifacts.test.ts | 63 +++++++++++++++++++ .../server/services/artifacts/artifacts.ts | 46 ++++++++++++++ .../server/services/artifacts/client.test.ts | 50 +++++++++++++++ .../fleet/server/services/artifacts/client.ts | 27 ++++++++ .../fleet/server/services/artifacts/mocks.ts | 1 + .../fleet/server/services/artifacts/types.ts | 4 ++ .../artifacts/artifact_client.test.ts | 15 +++++ .../services/artifacts/artifact_client.ts | 17 +++++ .../manifest_manager/manifest_manager.test.ts | 39 ++++++------ .../manifest_manager/manifest_manager.ts | 35 +++++++++-- .../endpoint/services/artifacts/mocks.ts | 6 ++ 11 files changed, 278 insertions(+), 25 deletions(-) diff --git a/x-pack/plugins/fleet/server/services/artifacts/artifacts.test.ts b/x-pack/plugins/fleet/server/services/artifacts/artifacts.test.ts index 2c9d93ee47f32b..30a59f51e32321 100644 --- a/x-pack/plugins/fleet/server/services/artifacts/artifacts.test.ts +++ b/x-pack/plugins/fleet/server/services/artifacts/artifacts.test.ts @@ -23,6 +23,7 @@ import { setEsClientMethodResponseToError, } from './mocks'; import { + bulkCreateArtifacts, createArtifact, deleteArtifact, encodeArtifactContent, @@ -114,6 +115,68 @@ describe('When using the artifacts services', () => { }); }); + describe('and calling `bulkCreateArtifacts()`', () => { + let newArtifact: NewArtifact; + + beforeEach(() => { + const { id, created, ...artifact } = generateArtifactMock(); + newArtifact = artifact; + }); + + it('should create and return artifacts', async () => { + const { artifacts } = await bulkCreateArtifacts(esClientMock, [newArtifact]); + const artifact = artifacts![0]; + + expect(esClientMock.bulk).toHaveBeenCalledWith({ + index: FLEET_SERVER_ARTIFACTS_INDEX, + refresh: false, + body: [ + { + create: { + _id: `${artifact.packageName}:${artifact.identifier}-${artifact.decodedSha256}`, + }, + }, + { + ...newArtifactToElasticsearchProperties(newArtifact), + created: expect.any(String), + }, + ], + }); + + expect(artifact).toEqual({ + ...newArtifact, + id: expect.any(String), + created: expect.any(String), + }); + }); + + it('should ignore 409 errors from elasticsearch', async () => { + esClientMock.bulk.mockResolvedValue({ + errors: true, + items: [{ create: { status: 409 } as any }], + } as any); + const { artifacts, errors: responseErrors } = await bulkCreateArtifacts(esClientMock, [ + newArtifact, + ]); + + expect(responseErrors).toBeUndefined(); + expect(artifacts?.length).toEqual(1); + }); + + it('should return error if one is encountered', async () => { + esClientMock.bulk.mockResolvedValue({ + errors: true, + items: [{ create: { status: 400, error: { reason: 'error' } } as any }], + } as any); + const { artifacts, errors: responseErrors } = await bulkCreateArtifacts(esClientMock, [ + newArtifact, + ]); + + expect(responseErrors).toEqual([new Error('error')]); + expect(artifacts).toBeUndefined(); + }); + }); + describe('and calling `deleteArtifact()`', () => { it('should delete the artifact', async () => { deleteArtifact(esClientMock, '123'); diff --git a/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts b/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts index edaec331919377..ec2979d9d17aae 100644 --- a/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts +++ b/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts @@ -20,6 +20,8 @@ import { ArtifactsElasticsearchError } from '../../errors'; import { isElasticsearchVersionConflictError } from '../../errors/utils'; +import { withPackageSpan } from '../epm/packages/utils'; + import { isElasticsearchItemNotFoundError } from './utils'; import type { Artifact, @@ -82,6 +84,50 @@ export const createArtifact = async ( return esSearchHitToArtifact({ _id: id, _source: newArtifactData }); }; +export const bulkCreateArtifacts = async ( + esClient: ElasticsearchClient, + artifacts: NewArtifact[], + refresh = false +): Promise<{ artifacts?: Artifact[]; errors?: Error[] }> => { + const ids = artifacts.map((artifact) => uniqueIdFromArtifact(artifact)); + const newArtifactsData = artifacts.map((artifact) => + newArtifactToElasticsearchProperties(artifact) + ); + + const body = ids + .map((id, index) => [ + { + create: { + _id: id, + }, + }, + newArtifactsData[index], + ]) + .flatMap((arr) => arr); + + const res = await withPackageSpan('Bulk create fleet artifacts', () => + esClient.bulk({ + index: FLEET_SERVER_ARTIFACTS_INDEX, + body, + refresh, + }) + ); + if (res.errors) { + const nonConflictErrors = res.items + .filter((item) => item.create?.status !== 409) + .map((item) => new Error(item.create?.error?.reason)); + if (nonConflictErrors.length > 0) { + return { errors: nonConflictErrors }; + } + } + + return { + artifacts: ids.map((id, index) => + esSearchHitToArtifact({ _id: id, _source: newArtifactsData[index] }) + ), + }; +}; + export const deleteArtifact = async (esClient: ElasticsearchClient, id: string): Promise => { try { await esClient.delete({ diff --git a/x-pack/plugins/fleet/server/services/artifacts/client.test.ts b/x-pack/plugins/fleet/server/services/artifacts/client.test.ts index f2acdc59e10de9..f5c882eee9fbe8 100644 --- a/x-pack/plugins/fleet/server/services/artifacts/client.test.ts +++ b/x-pack/plugins/fleet/server/services/artifacts/client.test.ts @@ -80,6 +80,56 @@ describe('When using the Fleet Artifacts Client', () => { }); }); + describe('and calling `bulkCreateArtifacts()`', () => { + it('should create a new artifact', async () => { + expect( + await artifactClient.bulkCreateArtifacts([ + { + content: '{ "key": "value" }', + identifier: 'some-identifier', + type: 'type A', + }, + { + content: '{ "key": "value2" }', + identifier: 'some-identifier2', + type: 'type B', + }, + ]) + ).toEqual({ + artifacts: [ + { + ...generateArtifactMock(), + body: 'eJyrVlDKTq1UslJQKkvMKU1VUqgFADNPBYE=', + created: expect.any(String), + decodedSha256: '05d13b11501327cc43f9a29165f1b4cab5c65783d86227536fcf798e6fa45586', + decodedSize: 18, + encodedSha256: '373d059bac3b51b05af96128cdaf013abd0c59d3d50579589937068059690a68', + encodedSize: 26, + id: expect.any(String), + identifier: 'some-identifier', + relative_url: + '/api/fleet/artifacts/some-identifier/05d13b11501327cc43f9a29165f1b4cab5c65783d86227536fcf798e6fa45586', + type: 'type A', + }, + { + ...generateArtifactMock(), + body: 'eJyrVlDKTq1UslJQKkvMKU01UlKoBQA42QWz', + created: expect.any(String), + decodedSha256: '98fdb0001b0ddb7acb15136579aab7074cf2b6df9db009568e04294bd97e7dd3', + decodedSize: 19, + encodedSha256: '220b82f2f2013cd5137966d0f9c81ace9156319e8f420bbad0f05fc0f61eec5d', + encodedSize: 27, + id: expect.any(String), + identifier: 'some-identifier2', + relative_url: + '/api/fleet/artifacts/some-identifier2/98fdb0001b0ddb7acb15136579aab7074cf2b6df9db009568e04294bd97e7dd3', + type: 'type B', + }, + ], + }); + }); + }); + describe('and calling `deleteArtifact()`', () => { it('should delete the artifact', async () => { setEsClientGetMock(); diff --git a/x-pack/plugins/fleet/server/services/artifacts/client.ts b/x-pack/plugins/fleet/server/services/artifacts/client.ts index 081038447c8f97..3cf28e4847d0de 100644 --- a/x-pack/plugins/fleet/server/services/artifacts/client.ts +++ b/x-pack/plugins/fleet/server/services/artifacts/client.ts @@ -27,6 +27,7 @@ import { generateArtifactContentHash, getArtifact, listArtifacts, + bulkCreateArtifacts, } from './artifacts'; /** @@ -76,6 +77,32 @@ export class FleetArtifactsClient implements ArtifactsClientInterface { return createArtifact(this.esClient, newArtifactData); } + async bulkCreateArtifacts( + optionsList: ArtifactsClientCreateOptions[] + ): Promise<{ artifacts?: Artifact[]; errors?: Error[] }> { + const newArtifactsData = []; + + for (const options of optionsList) { + const { content, type = '', identifier = this.packageName } = options; + + const encodedMetaData = await this.encodeContent(content); + const newArtifactData: NewArtifact = { + type, + identifier, + packageName: this.packageName, + encryptionAlgorithm: 'none', + relative_url: relativeDownloadUrlFromArtifact({ + identifier, + decodedSha256: encodedMetaData.decodedSha256, + }), + ...encodedMetaData, + }; + newArtifactsData.push(newArtifactData); + } + + return bulkCreateArtifacts(this.esClient, newArtifactsData); + } + async deleteArtifact(id: string) { // get the artifact first, which will also ensure its validated const artifact = await this.getArtifact(id); diff --git a/x-pack/plugins/fleet/server/services/artifacts/mocks.ts b/x-pack/plugins/fleet/server/services/artifacts/mocks.ts index f20c72ab0f78b1..1ded8743297f9c 100644 --- a/x-pack/plugins/fleet/server/services/artifacts/mocks.ts +++ b/x-pack/plugins/fleet/server/services/artifacts/mocks.ts @@ -24,6 +24,7 @@ export const createArtifactsClientMock = (): jest.Mocked; + bulkCreateArtifacts( + optionsList: ArtifactsClientCreateOptions[] + ): Promise<{ artifacts?: Artifact[]; errors?: Error[] }>; + deleteArtifact(id: string): Promise; listArtifacts(options?: ListArtifactsProps): Promise>; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.test.ts index 472f191e8c7ac8..5df2d67eeb582f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.test.ts @@ -47,6 +47,21 @@ describe('artifact_client', () => { }); }); + test('can bulk create artifacts', async () => { + const artifact = await getInternalArtifactMock('linux', 'v1'); + await artifactClient.bulkCreateArtifacts([artifact]); + expect(fleetArtifactClient.bulkCreateArtifacts).toHaveBeenCalledWith([ + { + identifier: artifact.identifier, + type: 'exceptionlist', + content: + '{"entries":[{"type":"simple","entries":[{"entries":[{"field":"some.nested.field","operator":"included","type":"exact_cased","value":"some value"}],' + + '"field":"some.parentField","type":"nested"},{"field":"some.not.nested.field","operator":"included","type":"exact_cased","value":"some value"}]},' + + '{"type":"simple","entries":[{"field":"some.other.not.nested.field","operator":"included","type":"exact_cased","value":"some other value"}]}]}', + }, + ]); + }); + test('can delete artifact', async () => { await artifactClient.deleteArtifact('endpoint-trustlist-linux-v1-sha26hash'); expect(fleetArtifactClient.listArtifacts).toHaveBeenCalledWith({ diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.ts index 48172a4600cd8b..ed5723ddccf0e5 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.ts @@ -18,6 +18,10 @@ export interface EndpointArtifactClientInterface { createArtifact(artifact: InternalArtifactCompleteSchema): Promise; + bulkCreateArtifacts( + artifacts: InternalArtifactCompleteSchema[] + ): Promise<{ artifacts?: InternalArtifactCompleteSchema[]; errors?: Error[] }>; + deleteArtifact(id: string): Promise; listArtifacts(options?: ListArtifactsProps): Promise>; @@ -73,6 +77,19 @@ export class EndpointArtifactClient implements EndpointArtifactClientInterface { return createdArtifact; } + async bulkCreateArtifacts( + artifacts: InternalArtifactCompleteSchema[] + ): Promise<{ artifacts?: InternalArtifactCompleteSchema[]; errors?: Error[] }> { + const optionsList = artifacts.map((artifact) => ({ + content: Buffer.from(artifact.body, 'base64').toString(), + identifier: artifact.identifier, + type: this.parseArtifactId(artifact.identifier).type, + })); + + const createdArtifacts = await this.fleetArtifacts.bulkCreateArtifacts(optionsList); + return createdArtifacts; + } + async deleteArtifact(id: string) { // Ignoring the `id` not being in the type until we can refactor the types in endpoint. // eslint-disable-next-line @typescript-eslint/no-non-null-assertion diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.test.ts index f4b4559e08708d..86ca4787969f85 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.test.ts @@ -629,13 +629,14 @@ describe('ManifestManager', () => { ) ).resolves.toStrictEqual([]); - expect(artifactClient.createArtifact).toHaveBeenCalledTimes(2); - expect(artifactClient.createArtifact).toHaveBeenNthCalledWith(1, { - ...ARTIFACT_EXCEPTIONS_MACOS, - }); - expect(artifactClient.createArtifact).toHaveBeenNthCalledWith(2, { - ...ARTIFACT_EXCEPTIONS_WINDOWS, - }); + expect(artifactClient.bulkCreateArtifacts).toHaveBeenCalledWith([ + { + ...ARTIFACT_EXCEPTIONS_MACOS, + }, + { + ...ARTIFACT_EXCEPTIONS_WINDOWS, + }, + ]); expect( JSON.parse(context.cache.get(getArtifactId(ARTIFACT_EXCEPTIONS_MACOS))!.toString()) ).toStrictEqual(getArtifactObject(ARTIFACT_EXCEPTIONS_MACOS)); @@ -652,13 +653,9 @@ describe('ManifestManager', () => { const error = new Error(); const { body, ...incompleteArtifact } = ARTIFACT_TRUSTED_APPS_MACOS; - artifactClient.createArtifact.mockImplementation( - async (artifact: InternalArtifactCompleteSchema) => { - if (getArtifactId(artifact) === ARTIFACT_ID_EXCEPTIONS_WINDOWS) { - throw error; - } else { - return artifact; - } + artifactClient.bulkCreateArtifacts.mockImplementation( + async (artifacts: InternalArtifactCompleteSchema[]) => { + return { artifacts: [artifacts[0]], errors: [error] }; } ); @@ -672,17 +669,21 @@ describe('ManifestManager', () => { newManifest ) ).resolves.toStrictEqual([ - error, new EndpointError( `Incomplete artifact: ${ARTIFACT_ID_TRUSTED_APPS_MACOS}`, ARTIFACTS_BY_ID[ARTIFACT_ID_TRUSTED_APPS_MACOS] ), + error, ]); - expect(artifactClient.createArtifact).toHaveBeenCalledTimes(2); - expect(artifactClient.createArtifact).toHaveBeenNthCalledWith(1, { - ...ARTIFACT_EXCEPTIONS_MACOS, - }); + expect(artifactClient.bulkCreateArtifacts).toHaveBeenCalledWith([ + { + ...ARTIFACT_EXCEPTIONS_MACOS, + }, + { + ...ARTIFACT_EXCEPTIONS_WINDOWS, + }, + ]); expect( JSON.parse(context.cache.get(getArtifactId(ARTIFACT_EXCEPTIONS_MACOS))!.toString()) ).toStrictEqual(getArtifactObject(ARTIFACT_EXCEPTIONS_MACOS)); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts index c3960f4e32e3c0..e7da1219838154 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts @@ -374,18 +374,41 @@ export class ManifestManager { newManifest: Manifest ): Promise { const errors: Error[] = []; + + const artifactsToCreate: InternalArtifactCompleteSchema[] = []; + for (const artifact of artifacts) { if (internalArtifactCompleteSchema.is(artifact)) { - const [err, fleetArtifact] = await this.pushArtifact(artifact); - if (err) { - errors.push(err); - } else if (fleetArtifact) { - newManifest.replaceArtifact(fleetArtifact); - } + artifactsToCreate.push(artifact); } else { errors.push(new EndpointError(`Incomplete artifact: ${getArtifactId(artifact)}`, artifact)); } } + + if (artifactsToCreate.length === 0) { + return errors; + } + + const { artifacts: fleetArtifacts, errors: createErrors } = + await this.artifactClient.bulkCreateArtifacts(artifactsToCreate); + + if (createErrors) { + errors.push(...createErrors); + } + + if (fleetArtifacts) { + artifactsToCreate.forEach((artifact) => { + const fleetArtifact = fleetArtifacts.find( + (fleetArt) => fleetArt.identifier === artifact.identifier + ); + if (!fleetArtifact) return; + const artifactId = getArtifactId(artifact); + // Cache the compressed body of the artifact + this.cache.set(artifactId, Buffer.from(artifact.body, 'base64')); + newManifest.replaceArtifact(fleetArtifact); + }); + } + return errors; } diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts index 3e6446595d8001..fbb45c38cac303 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts @@ -45,6 +45,12 @@ export const createEndpointArtifactClientMock = ( const response = await endpointArtifactClient.createArtifact(...args); return response; }), + bulkCreateArtifacts: jest.fn(async (...args) => { + const fleetArtifactClient = new FleetArtifactsClient(esClient, 'endpoint'); + const endpointArtifactClient = new EndpointArtifactClient(fleetArtifactClient); + const response = await endpointArtifactClient.bulkCreateArtifacts(...args); + return response; + }), listArtifacts: jest.fn((...args) => endpointArtifactClientMocked.listArtifacts(...args)), getArtifact: jest.fn((...args) => endpointArtifactClientMocked.getArtifact(...args)), deleteArtifact: jest.fn((...args) => endpointArtifactClientMocked.deleteArtifact(...args)), From 19f5effe299ac63dd18d3b9dabcc4f8a8ca6c065 Mon Sep 17 00:00:00 2001 From: Abdul Wahab Zahid Date: Thu, 5 Jan 2023 08:38:24 +0100 Subject: [PATCH 06/36] [Synthetics] Waterfall Chart enhancements and style udpate (#148256) Co-authored-by: shahzad31 Resolves https://github.com/elastic/kibana/issues/144996 --- .../network_data}/data_formatting.test.ts | 159 ++++++++------- .../network_data}/data_formatting.ts | 129 ++++++++---- .../network_data}/types.ts | 112 ++++++++-- .../waterfall/waterfall_filter.test.tsx | 151 -------------- .../waterfall/waterfall_filter.tsx | 192 ------------------ .../waterfall/components/legend.tsx | 33 --- .../network_requests_total.test.tsx | 76 ------- .../components/network_requests_total.tsx | 69 ------- .../waterfall/components/styles.ts | 181 ----------------- .../waterfall/components/waterfall.test.tsx | 46 ----- .../waterfall/components/waterfall_chart.tsx | 156 -------------- .../network_waterfall/waterfall/index.tsx | 18 -- .../network_waterfall/waterfall/types.ts | 41 ---- .../hooks/use_network_timings.ts | 4 +- .../hooks/use_object_metrics.ts | 6 +- .../step_details_page/step_detail_page.tsx | 39 ++-- .../definitions_popover.tsx | 0 .../{components => step_metrics}/labels.ts | 0 .../step_metrics.tsx | 0 .../color_palette.tsx | 2 +- .../object_count_list.tsx | 6 +- .../object_weight_list.tsx | 6 +- .../last_successful_screenshot.tsx | 8 +- .../screenshot_link.tsx | 4 +- .../step_image.tsx | 2 +- .../step_screenshot_display.test.tsx | 6 +- .../step_screenshot_display.tsx | 8 +- .../breakdown_legend.tsx | 13 +- .../network_timings_donut.tsx | 22 +- .../labels.ts} | 0 .../step_detail_container.tsx | 2 +- .../step_page_nav.tsx | 0 .../step_page_title.tsx | 0 .../use_monitor_breadcrumb.tsx | 8 +- .../use_monitor_breadcrumbs.test.tsx | 6 +- .../use_step_waterfall_metrics.test.tsx | 0 .../use_step_waterfall_metrics.ts | 2 +- .../waterfall/README.md | 0 .../waterfall}/constants.ts | 7 +- .../waterfall/context/waterfall_context.tsx} | 53 +++-- .../waterfall}/middle_truncated_text.test.tsx | 2 +- .../waterfall}/middle_truncated_text.tsx | 14 +- .../waterfall}/sidebar.tsx | 43 ++-- .../step_waterfall_chart/waterfall/styles.ts | 122 +++++++++++ .../waterfall}/translations.ts | 21 +- .../waterfall}/use_bar_charts.test.tsx | 2 +- .../waterfall}/use_bar_charts.ts | 30 +-- .../waterfall}/waterfall_bar_chart.tsx | 15 +- .../waterfall/waterfall_chart.tsx | 144 +++++++++++++ .../waterfall_chart_container.test.tsx | 2 +- .../waterfall/waterfall_chart_container.tsx | 8 +- .../waterfall}/waterfall_chart_fixed_axis.tsx | 21 +- .../waterfall_chart_wrapper.test.tsx | 77 +++---- .../waterfall/waterfall_chart_wrapper.tsx | 57 ++---- .../waterfall_flyout}/use_flyout.test.tsx | 2 +- .../waterfall/waterfall_flyout}/use_flyout.ts | 2 +- .../waterfall_flyout.test.tsx | 4 +- .../waterfall_flyout}/waterfall_flyout.tsx | 12 +- .../waterfall_flyout_table.tsx | 4 +- .../network_requests_total.test.tsx | 40 ++++ .../network_requests_total.tsx | 64 ++++++ .../waterfall_legend.test.tsx | 110 ++++++++++ .../waterfall_header/waterfall_legend.tsx | 169 +++++++++++++++ .../waterfall_search.test.tsx | 58 ++++++ .../waterfall_header/waterfall_search.tsx | 86 ++++++++ .../waterfall_tick_axis.test.tsx | 50 +++++ .../waterfall_header/waterfall_tick_axis.tsx | 98 +++++++++ .../waterfall_marker_icon.test.tsx | 2 +- .../waterfall_marker_icon.tsx | 10 +- .../waterfall_marker_test_helper.tsx | 6 +- .../waterfall_marker_trend.test.tsx | 4 +- .../waterfall_marker_trend.tsx | 4 +- .../waterfall_marker}/waterfall_markers.tsx | 69 +++++-- .../waterfall/waterfall_sidebar_item.test.tsx | 8 +- .../waterfall/waterfall_sidebar_item.tsx | 12 +- .../waterfall_tooltip_content.test.tsx | 4 +- .../waterfall}/waterfall_tooltip_content.tsx | 2 +- 77 files changed, 1532 insertions(+), 1413 deletions(-) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail/waterfall => common/network_data}/data_formatting.test.ts (88%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail/waterfall => common/network_data}/data_formatting.ts (81%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail/waterfall => common/network_data}/types.ts (73%) delete mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_filter.test.tsx delete mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_filter.tsx delete mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/legend.tsx delete mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/network_requests_total.test.tsx delete mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/network_requests_total.tsx delete mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/styles.ts delete mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall.test.tsx delete mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_chart.tsx delete mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/index.tsx delete mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/types.ts rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components => step_metrics}/definitions_popover.tsx (100%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components => step_metrics}/labels.ts (100%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components => step_metrics}/step_metrics.tsx (100%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components => step_objects}/color_palette.tsx (96%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components => step_objects}/object_count_list.tsx (94%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components => step_objects}/object_weight_list.tsx (94%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/screenshot => step_screenshot}/last_successful_screenshot.tsx (81%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/screenshot => step_screenshot}/screenshot_link.tsx (90%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components => step_screenshot}/step_image.tsx (96%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/screenshot => step_screenshot}/step_screenshot_display.test.tsx (92%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/screenshot => step_screenshot}/step_screenshot_display.tsx (96%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/timings_breakdown => step_timing_breakdown}/breakdown_legend.tsx (77%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components => step_timing_breakdown}/network_timings_donut.tsx (91%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/translations.ts => step_waterfall_chart/labels.ts} (100%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail => step_waterfall_chart}/step_detail_container.tsx (95%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail => step_waterfall_chart}/step_page_nav.tsx (100%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail => step_waterfall_chart}/step_page_title.tsx (100%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail => step_waterfall_chart}/use_monitor_breadcrumb.tsx (87%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail => step_waterfall_chart}/use_monitor_breadcrumbs.test.tsx (96%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail => step_waterfall_chart}/use_step_waterfall_metrics.test.tsx (100%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail => step_waterfall_chart}/use_step_waterfall_metrics.ts (97%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall => step_waterfall_chart}/waterfall/README.md (100%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall}/constants.ts (79%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/context/waterfall_chart.tsx => step_waterfall_chart/waterfall/context/waterfall_context.tsx} (63%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall}/middle_truncated_text.test.tsx (97%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall}/middle_truncated_text.tsx (91%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall}/sidebar.tsx (55%) create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/styles.ts rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall}/translations.ts (72%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall}/use_bar_charts.test.tsx (98%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall}/use_bar_charts.ts (69%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall}/waterfall_bar_chart.tsx (86%) create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart.tsx rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail => step_waterfall_chart}/waterfall/waterfall_chart_container.test.tsx (98%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail => step_waterfall_chart}/waterfall/waterfall_chart_container.tsx (91%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall}/waterfall_chart_fixed_axis.tsx (75%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail => step_waterfall_chart}/waterfall/waterfall_chart_wrapper.test.tsx (76%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail => step_waterfall_chart}/waterfall/waterfall_chart_wrapper.tsx (68%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall/waterfall_flyout}/use_flyout.test.tsx (97%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall/waterfall_flyout}/use_flyout.ts (96%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail/waterfall => step_waterfall_chart/waterfall/waterfall_flyout}/waterfall_flyout.test.tsx (96%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail/waterfall => step_waterfall_chart/waterfall/waterfall_flyout}/waterfall_flyout.tsx (90%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall/waterfall_flyout}/waterfall_flyout_table.tsx (93%) create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/network_requests_total.test.tsx create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/network_requests_total.tsx create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_legend.test.tsx create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_legend.tsx create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_search.test.tsx create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_search.tsx create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_tick_axis.test.tsx create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_tick_axis.tsx rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall/waterfall_marker}/waterfall_marker_icon.test.tsx (96%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall/waterfall_marker}/waterfall_marker_icon.tsx (86%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall/waterfall_marker}/waterfall_marker_test_helper.tsx (90%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall/waterfall_marker}/waterfall_marker_trend.test.tsx (96%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall/waterfall_marker}/waterfall_marker_trend.tsx (77%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall/waterfall_marker}/waterfall_markers.tsx (71%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail => step_waterfall_chart}/waterfall/waterfall_sidebar_item.test.tsx (86%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/step_detail => step_waterfall_chart}/waterfall/waterfall_sidebar_item.tsx (88%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall}/waterfall_tooltip_content.test.tsx (95%) rename x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/{components/network_waterfall/waterfall/components => step_waterfall_chart/waterfall}/waterfall_tooltip_content.tsx (95%) diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/data_formatting.test.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/common/network_data/data_formatting.test.ts similarity index 88% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/data_formatting.test.ts rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/common/network_data/data_formatting.test.ts index aea92647dfe60e..814785ed6fe6b2 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/data_formatting.test.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/common/network_data/data_formatting.test.ts @@ -12,18 +12,12 @@ import { getSeriesAndDomain, getSidebarItems, } from './data_formatting'; -import { - NetworkItems, - MimeType, - FriendlyFlyoutLabels, - FriendlyTimingLabels, - Timings, - Metadata, -} from './types'; -import { WaterfallDataEntry } from '../../waterfall/types'; -import { mockMoment } from '../../../../../../utils/formatting/test_helpers'; +import { MimeType, FriendlyFlyoutLabels, FriendlyTimingLabels, Timings, Metadata } from './types'; +import { WaterfallDataEntry } from './types'; +import { mockMoment } from '../../../../utils/formatting/test_helpers'; +import { NetworkEvent } from '../../../../../../../common/runtime_types'; -export const networkItems: NetworkItems = [ +export const networkItems: NetworkEvent[] = [ { timestamp: '2021-01-05T19:22:28.928Z', method: 'GET', @@ -83,7 +77,7 @@ export const networkItems: NetworkItems = [ }, ]; -export const networkItemsWithoutFullTimings: NetworkItems = [ +export const networkItemsWithoutFullTimings: NetworkEvent[] = [ networkItems[0], { timestamp: '2021-01-05T19:22:28.928Z', @@ -108,7 +102,7 @@ export const networkItemsWithoutFullTimings: NetworkItems = [ }, ]; -export const networkItemsWithoutAnyTimings: NetworkItems = [ +export const networkItemsWithoutAnyTimings: NetworkEvent[] = [ { timestamp: '2021-01-05T19:22:28.928Z', method: 'GET', @@ -132,7 +126,7 @@ export const networkItemsWithoutAnyTimings: NetworkItems = [ }, ]; -export const networkItemsWithoutTimingsObject: NetworkItems = [ +export const networkItemsWithoutTimingsObject: NetworkEvent[] = [ { timestamp: '2021-01-05T19:22:28.928Z', method: 'GET', @@ -144,7 +138,7 @@ export const networkItemsWithoutTimingsObject: NetworkItems = [ }, ]; -export const networkItemsWithUncommonMimeType: NetworkItems = [ +export const networkItemsWithUncommonMimeType: NetworkEvent[] = [ { timestamp: '2021-01-05T19:22:28.928Z', method: 'GET', @@ -168,6 +162,30 @@ export const networkItemsWithUncommonMimeType: NetworkItems = [ }, ]; +export const networkItemsWithUnknownMimeType: NetworkEvent[] = [ + { + timestamp: '2021-01-05T19:22:28.928Z', + method: 'GET', + url: 'https://unpkg.com/director@1.2.8/build/director.js', + status: 200, + mimeType: 'application/x-unknown', + requestSentTime: 18098833.537, + loadEndTime: 18098977.648000002, + timings: { + blocked: 84.54599999822676, + receive: 3.068000001803739, + queueing: 3.69700000010198, + proxy: -1, + total: 144.1110000014305, + wait: 52.56100000042352, + connect: -1, + send: 0.2390000008745119, + ssl: -1, + dns: -1, + }, + }, +]; + describe('getConnectingTime', () => { it('returns `connect` value if `ssl` is undefined', () => { expect(getConnectingTime(10)).toBe(10); @@ -193,20 +211,21 @@ describe('getConnectingTime', () => { describe('Palettes', () => { it('A colour palette comprising timing and mime type colours is correctly generated', () => { expect(colourPalette).toEqual({ - blocked: '#dcd4c4', - connect: '#da8b45', - dns: '#54b399', - font: '#aa6556', - html: '#f3b3a6', + blocked: '#b0c9e0', + connect: '#c8b8dc', + dns: '#aad9cc', + font: '#d36086', + html: '#6092c0', + image: '#ca8eae', media: '#d6bf57', - other: '#e7664c', - receive: '#54b399', - script: '#9170b8', - send: '#d36086', - ssl: '#edc5a2', - stylesheet: '#ca8eae', - wait: '#b0c9e0', - xhr: '#e7664c', + other: '#b9a888', + receive: '#ebdfab', + script: '#da8b45', + send: '#f3b3a6', + ssl: '#e5c7d7', + stylesheet: '#9170b8', + wait: '#e7664c', + xhr: '#54b399', }); }); }); @@ -222,12 +241,12 @@ describe('getSeriesAndDomain', () => { Array [ Object { "config": Object { - "colour": "#dcd4c4", + "colour": "#b0c9e0", "id": 0, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#dcd4c4", + "colour": "#b0c9e0", "value": "Queued / Blocked: 0.854ms", }, }, @@ -237,12 +256,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#54b399", + "colour": "#aad9cc", "id": 0, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#54b399", + "colour": "#aad9cc", "value": "DNS: 3.560ms", }, }, @@ -252,12 +271,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#da8b45", + "colour": "#c8b8dc", "id": 0, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#da8b45", + "colour": "#c8b8dc", "value": "Connecting: 25.721ms", }, }, @@ -267,12 +286,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#edc5a2", + "colour": "#e5c7d7", "id": 0, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#edc5a2", + "colour": "#e5c7d7", "value": "TLS: 55.387ms", }, }, @@ -282,12 +301,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#d36086", + "colour": "#f3b3a6", "id": 0, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#d36086", + "colour": "#f3b3a6", "value": "Sending request: 0.360ms", }, }, @@ -297,12 +316,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#b0c9e0", + "colour": "#e7664c", "id": 0, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#b0c9e0", + "colour": "#e7664c", "value": "Waiting (TTFB): 34.578ms", }, }, @@ -312,12 +331,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#ca8eae", + "colour": "#9170b8", "id": 0, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#ca8eae", + "colour": "#9170b8", "value": "Content downloading (CSS): 0.552ms", }, }, @@ -327,12 +346,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#dcd4c4", + "colour": "#b0c9e0", "id": 1, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#dcd4c4", + "colour": "#b0c9e0", "value": "Queued / Blocked: 84.546ms", }, }, @@ -342,12 +361,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#d36086", + "colour": "#f3b3a6", "id": 1, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#d36086", + "colour": "#f3b3a6", "value": "Sending request: 0.239ms", }, }, @@ -357,12 +376,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#b0c9e0", + "colour": "#e7664c", "id": 1, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#b0c9e0", + "colour": "#e7664c", "value": "Waiting (TTFB): 52.561ms", }, }, @@ -372,12 +391,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#9170b8", + "colour": "#da8b45", "id": 1, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#9170b8", + "colour": "#da8b45", "value": "Content downloading (JS): 3.068ms", }, }, @@ -395,12 +414,12 @@ describe('getSeriesAndDomain', () => { Array [ Object { "config": Object { - "colour": "#dcd4c4", + "colour": "#b0c9e0", "id": 0, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#dcd4c4", + "colour": "#b0c9e0", "value": "Queued / Blocked: 0.854ms", }, }, @@ -410,12 +429,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#54b399", + "colour": "#aad9cc", "id": 0, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#54b399", + "colour": "#aad9cc", "value": "DNS: 3.560ms", }, }, @@ -425,12 +444,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#da8b45", + "colour": "#c8b8dc", "id": 0, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#da8b45", + "colour": "#c8b8dc", "value": "Connecting: 25.721ms", }, }, @@ -440,12 +459,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#edc5a2", + "colour": "#e5c7d7", "id": 0, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#edc5a2", + "colour": "#e5c7d7", "value": "TLS: 55.387ms", }, }, @@ -455,12 +474,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#d36086", + "colour": "#f3b3a6", "id": 0, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#d36086", + "colour": "#f3b3a6", "value": "Sending request: 0.360ms", }, }, @@ -470,12 +489,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#b0c9e0", + "colour": "#e7664c", "id": 0, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#b0c9e0", + "colour": "#e7664c", "value": "Waiting (TTFB): 34.578ms", }, }, @@ -485,12 +504,12 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#ca8eae", + "colour": "#9170b8", "id": 0, "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#ca8eae", + "colour": "#9170b8", "value": "Content downloading (CSS): 0.552ms", }, }, @@ -500,11 +519,11 @@ describe('getSeriesAndDomain', () => { }, Object { "config": Object { - "colour": "#9170b8", + "colour": "#da8b45", "isHighlighted": true, "showTooltip": true, "tooltipProps": Object { - "colour": "#9170b8", + "colour": "#da8b45", "value": "Content downloading (JS): 2.793ms", }, }, @@ -634,20 +653,20 @@ describe('getSeriesAndDomain', () => { }); it('handles formatting when mime type is not mapped to a specific mime type bucket', () => { - const { series } = getSeriesAndDomain(networkItemsWithUncommonMimeType); + const { series } = getSeriesAndDomain(networkItemsWithUnknownMimeType); /* verify that raw mime type appears in the tooltip config and that * the colour is mapped to mime type other */ - const contentDownloadedingConfigItem = series.find((item: WaterfallDataEntry) => { + const contentDownloadingConfigItem = series.find((item: WaterfallDataEntry) => { const { tooltipProps } = item.config; if (tooltipProps && typeof tooltipProps.value === 'string') { return ( - tooltipProps.value.includes('application/x-javascript') && + tooltipProps.value.includes('application/x-unknown') && tooltipProps.colour === colourPalette[MimeType.Other] ); } return false; }); - expect(contentDownloadedingConfigItem).toBeDefined(); + expect(contentDownloadingConfigItem).toBeDefined(); }); it.each([ diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/data_formatting.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/common/network_data/data_formatting.ts similarity index 81% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/data_formatting.ts rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/common/network_data/data_formatting.ts index 8b7a29af3030e2..c35152a563833b 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/data_formatting.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/common/network_data/data_formatting.ts @@ -8,27 +8,26 @@ import { euiPaletteColorBlind } from '@elastic/eui'; import moment from 'moment'; -import { NetworkEvent } from '../../../../../../../../../common/runtime_types'; +import { NetworkEvent } from '../../../../../../../common/runtime_types'; +import { WaterfallData, WaterfallMetadata } from './types'; import { - NetworkItems, - NetworkItem, FriendlyFlyoutLabels, - FriendlyTimingLabels, FriendlyMimetypeLabels, + FriendlyTimingLabels, + ItemMatcher, + LegendItem, + Metadata, MimeType, MimeTypesMap, - Timings, - Metadata, + SidebarItem, TIMING_ORDER, - SidebarItems, - LegendItems, + Timings, } from './types'; -import { WaterfallData, WaterfallMetadata } from '../../waterfall'; -export const extractItems = (data: NetworkEvent[]): NetworkItems => { +export const extractItems = (data: NetworkEvent[]): NetworkEvent[] => { // NOTE: This happens client side as the "payload" property is mapped // in such a way it can't be queried (or sorted on) via ES. - return data.sort((a: NetworkItem, b: NetworkItem) => { + return data.sort((a: NetworkEvent, b: NetworkEvent) => { return a.requestSentTime - b.requestSentTime; }); }; @@ -59,19 +58,15 @@ const getFriendlyTooltipValue = ({ return `${label}: ${formatValueForDisplay(value)}ms`; }; export const isHighlightedItem = ( - item: NetworkItem, - query?: string, - activeFilters: string[] = [] + item: NetworkEvent, + queryMatcher?: ItemMatcher, + filterMatcher?: ItemMatcher ) => { - if (!query && activeFilters?.length === 0) { + if (!queryMatcher && !filterMatcher) { return true; } - const matchQuery = query ? item.url?.includes(query) : true; - const matchFilters = - activeFilters.length > 0 ? activeFilters.includes(MimeTypesMap[item.mimeType!]) : true; - - return !!(matchQuery && matchFilters); + return (queryMatcher?.(item) ?? true) && (filterMatcher?.(item) ?? true); }; const getFriendlyMetadataValue = ({ value, postFix }: { value?: number; postFix?: string }) => { @@ -97,13 +92,45 @@ export const getConnectingTime = (connect?: number, ssl?: number) => { } }; +export const getQueryMatcher = (query?: string): ItemMatcher => { + if (!query) { + return (item: NetworkEvent) => true; + } + + const regExp = new RegExp(query, 'i'); + + return (item: NetworkEvent) => { + return (item.url?.search(regExp) ?? -1) > -1; + }; +}; + +export const getFilterMatcher = (filters: string[] | undefined): ItemMatcher => { + if (!filters?.length) { + return (item: NetworkEvent) => true; + } + + const filtersByMimeType = filters.reduce((acc, cur) => { + acc.set(cur as MimeType, true); + + return acc; + }, new Map()); + + return (item: NetworkEvent) => { + const resolvedMimeType = item.mimeType + ? MimeTypesMap[item.mimeType] ?? MimeType.Other + : MimeType.Other; + + return filtersByMimeType.has(resolvedMimeType); + }; +}; + export const getSeriesAndDomain = ( - items: NetworkItems, + items: NetworkEvent[], onlyHighlighted = false, query?: string, activeFilters?: string[] ) => { - const getValueForOffset = (item: NetworkItem) => { + const getValueForOffset = (item: NetworkEvent) => { return item.requestSentTime; }; // The earliest point in time a request is sent or started. This will become our notion of "0". @@ -124,12 +151,14 @@ export const getSeriesAndDomain = ( const metadata: WaterfallMetadata = []; let totalHighlightedRequests = 0; + const queryMatcher = getQueryMatcher(query); + const filterMatcher = getFilterMatcher(activeFilters); items.forEach((item, index) => { const mimeTypeColour = getColourForMimeType(item.mimeType); const offsetValue = getValueForOffset(item); let currentOffset = offsetValue - zeroOffset; metadata.push(formatMetadata({ item, index, requestStart: currentOffset })); - const isHighlighted = isHighlightedItem(item, query, activeFilters); + const isHighlighted = isHighlightedItem(item, queryMatcher, filterMatcher); if (isHighlighted) { totalHighlightedRequests++; } @@ -234,7 +263,7 @@ const formatMetadata = ({ index, requestStart, }: { - item: NetworkItem; + item: NetworkEvent; index: number; requestStart: number; }) => { @@ -331,13 +360,15 @@ const formatMetadata = ({ }; export const getSidebarItems = ( - items: NetworkItems, + items: NetworkEvent[], onlyHighlighted: boolean, query: string, activeFilters: string[] -): SidebarItems => { +): SidebarItem[] => { + const queryMatcher = getQueryMatcher(query); + const filterMatcher = getFilterMatcher(activeFilters); const sideBarItems = items.map((item, index) => { - const isHighlighted = isHighlightedItem(item, query, activeFilters); + const isHighlighted = isHighlightedItem(item, queryMatcher, filterMatcher); const offsetIndex = index + 1; const { url, status, method } = item; return { url, status, method, isHighlighted, offsetIndex, index }; @@ -348,8 +379,8 @@ export const getSidebarItems = ( return sideBarItems; }; -export const getLegendItems = (): LegendItems => { - let timingItems: LegendItems = []; +export const getLegendItems = (): LegendItem[] => { + let timingItems: LegendItem[] = []; Object.values(Timings).forEach((timing) => { // The "receive" timing is mapped to a mime type colour, so we don't need to show this in the legend if (timing === Timings.Receive) { @@ -357,15 +388,15 @@ export const getLegendItems = (): LegendItems => { } timingItems = [ ...timingItems, - { name: FriendlyTimingLabels[timing], colour: TIMING_PALETTE[timing] }, + { name: FriendlyTimingLabels[timing], color: TIMING_PALETTE[timing] }, ]; }); - let mimeTypeItems: LegendItems = []; + let mimeTypeItems: LegendItem[] = []; Object.values(MimeType).forEach((mimeType) => { mimeTypeItems = [ ...mimeTypeItems, - { name: FriendlyMimetypeLabels[mimeType], colour: MIME_TYPE_PALETTE[mimeType] }, + { name: FriendlyMimetypeLabels[mimeType], color: MIME_TYPE_PALETTE[mimeType] }, ]; }); @@ -383,25 +414,25 @@ const buildTimingPalette = (): TimingColourPalette => { const palette = Object.values(Timings).reduce>((acc, value) => { switch (value) { case Timings.Blocked: - acc[value] = SAFE_PALETTE[16]; + acc[value] = SAFE_PALETTE[11]; break; case Timings.Dns: - acc[value] = SAFE_PALETTE[0]; + acc[value] = SAFE_PALETTE[10]; break; case Timings.Connect: - acc[value] = SAFE_PALETTE[7]; + acc[value] = SAFE_PALETTE[13]; break; case Timings.Ssl: - acc[value] = SAFE_PALETTE[17]; + acc[value] = SAFE_PALETTE[14]; break; case Timings.Send: - acc[value] = SAFE_PALETTE[2]; + acc[value] = SAFE_PALETTE[19]; break; case Timings.Wait: - acc[value] = SAFE_PALETTE[11]; + acc[value] = SAFE_PALETTE[9]; break; case Timings.Receive: - acc[value] = SAFE_PALETTE[0]; + acc[value] = SAFE_PALETTE[15]; break; } return acc; @@ -421,23 +452,28 @@ const buildMimeTypePalette = (): MimeTypeColourPalette => { const palette = Object.values(MimeType).reduce>((acc, value) => { switch (value) { case MimeType.Html: - acc[value] = SAFE_PALETTE[19]; + acc[value] = SAFE_PALETTE[1]; break; case MimeType.Script: - acc[value] = SAFE_PALETTE[3]; + acc[value] = SAFE_PALETTE[7]; break; case MimeType.Stylesheet: + acc[value] = SAFE_PALETTE[3]; + break; + case MimeType.Image: acc[value] = SAFE_PALETTE[4]; break; case MimeType.Media: acc[value] = SAFE_PALETTE[5]; break; case MimeType.Font: - acc[value] = SAFE_PALETTE[8]; + acc[value] = SAFE_PALETTE[2]; break; case MimeType.XHR: + acc[value] = SAFE_PALETTE[0]; + break; case MimeType.Other: - acc[value] = SAFE_PALETTE[9]; + acc[value] = SAFE_PALETTE[6]; break; } return acc; @@ -454,3 +490,10 @@ export const colourPalette: ColourPalette = { ...TIMING_PALETTE, ...MIME_TYPE_PA export const formatTooltipHeading = (index: number, fullText: string): string => isNaN(index) ? fullText : `${index}. ${fullText}`; + +export const formatMillisecond = (ms: number) => { + if (ms < 1000) { + return `${ms.toFixed(0)} ms`; + } + return `${(ms / 1000).toFixed(1)} s`; +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/types.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/common/network_data/types.ts similarity index 73% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/types.ts rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/common/network_data/types.ts index ad4c635f31d3b5..78076be872dbb2 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/types.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/common/network_data/types.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { NetworkEvent } from '../../../../../../../../../common/runtime_types'; +import { NetworkEvent } from '../../../../../../../common/runtime_types'; export enum Timings { Blocked = 'blocked', @@ -152,6 +152,7 @@ export enum MimeType { Script = 'script', Stylesheet = 'stylesheet', Media = 'media', + Image = 'image', Font = 'font', XHR = 'xhr', Other = 'other', @@ -176,6 +177,12 @@ export const FriendlyMimetypeLabels = { defaultMessage: 'CSS', } ), + [MimeType.Image]: i18n.translate( + 'xpack.synthetics.synthetics.waterfallChart.labels.mimeTypes.image', + { + defaultMessage: 'Image', + } + ), [MimeType.Media]: i18n.translate( 'xpack.synthetics.synthetics.waterfallChart.labels.mimeTypes.media', { @@ -207,18 +214,21 @@ export const FriendlyMimetypeLabels = { export const MimeTypesMap: Record = { 'text/html': MimeType.Html, 'application/javascript': MimeType.Script, + 'application/x-javascript': MimeType.Script, 'text/javascript': MimeType.Script, 'text/css': MimeType.Stylesheet, + // Images - 'image/apng': MimeType.Media, - 'image/bmp': MimeType.Media, - 'image/gif': MimeType.Media, - 'image/x-icon': MimeType.Media, - 'image/jpeg': MimeType.Media, - 'image/png': MimeType.Media, - 'image/svg+xml': MimeType.Media, - 'image/tiff': MimeType.Media, - 'image/webp': MimeType.Media, + 'image/apng': MimeType.Image, + 'image/bmp': MimeType.Image, + 'image/gif': MimeType.Image, + 'image/x-icon': MimeType.Image, + 'image/jpeg': MimeType.Image, + 'image/png': MimeType.Image, + 'image/svg+xml': MimeType.Image, + 'image/tiff': MimeType.Image, + 'image/webp': MimeType.Image, + // Common audio / video formats 'audio/wave': MimeType.Media, 'audio/wav': MimeType.Media, @@ -230,6 +240,7 @@ export const MimeTypesMap: Record = { 'audio/ogg': MimeType.Media, 'video/ogg': MimeType.Media, 'application/ogg': MimeType.Media, + // Fonts 'font/otf': MimeType.Font, 'font/ttf': MimeType.Font, @@ -245,18 +256,85 @@ export const MimeTypesMap: Record = { 'application/json': MimeType.XHR, }; -export type NetworkItem = NetworkEvent; -export type NetworkItems = NetworkItem[]; - -export type SidebarItem = Pick & { +export type SidebarItem = Pick & { isHighlighted: boolean; index: number; offsetIndex: number; }; -export type SidebarItems = SidebarItem[]; export interface LegendItem { name: string; - colour: string; + color: string; +} + +export type ItemMatcher = (item: NetworkEvent) => boolean; + +export const MIME_FILTERS = [ + { + label: FriendlyMimetypeLabels[MimeType.Html], + mimeType: MimeType.Html, + }, + { + label: FriendlyMimetypeLabels[MimeType.Stylesheet], + mimeType: MimeType.Stylesheet, + }, + { + label: FriendlyMimetypeLabels[MimeType.Font], + mimeType: MimeType.Font, + }, + { + label: FriendlyMimetypeLabels[MimeType.Script], + mimeType: MimeType.Script, + }, + { + label: FriendlyMimetypeLabels[MimeType.Image], + mimeType: MimeType.Image, + }, + { + label: FriendlyMimetypeLabels[MimeType.Media], + mimeType: MimeType.Media, + }, + { + label: FriendlyMimetypeLabels[MimeType.XHR], + mimeType: MimeType.XHR, + }, + { + label: FriendlyMimetypeLabels[MimeType.Other], + mimeType: MimeType.Other, + }, +]; + +interface PlotProperties { + x: number; + y: number; + y0: number; } -export type LegendItems = LegendItem[]; + +export interface WaterfallDataSeriesConfigProperties { + tooltipProps?: Record; + showTooltip: boolean; +} + +export interface WaterfallMetadataItem { + name: string; + value?: string; +} + +export interface WaterfallMetadataEntry { + x: number; + url: string; + requestHeaders?: WaterfallMetadataItem[]; + responseHeaders?: WaterfallMetadataItem[]; + certificates?: WaterfallMetadataItem[]; + details: WaterfallMetadataItem[]; +} + +export type WaterfallDataEntry = PlotProperties & { + config: WaterfallDataSeriesConfigProperties & Record; +}; + +export type WaterfallMetadata = WaterfallMetadataEntry[]; + +export type WaterfallData = WaterfallDataEntry[]; + +export type RenderItem = (item: I, index: number) => JSX.Element; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_filter.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_filter.test.tsx deleted file mode 100644 index a564d751b36471..00000000000000 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_filter.test.tsx +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useState } from 'react'; -import { act, fireEvent } from '@testing-library/react'; -import 'jest-canvas-mock'; -import { MIME_FILTERS, WaterfallFilter } from './waterfall_filter'; -import { - FILTER_REQUESTS_LABEL, - FILTER_COLLAPSE_REQUESTS_LABEL, - FILTER_POPOVER_OPEN_LABEL, -} from '../../waterfall/components/translations'; -import { render } from '../../../../../../utils/testing'; - -describe('waterfall filter', () => { - jest.useFakeTimers(); - - it('renders correctly', () => { - const { getByLabelText, getByTitle } = render( - - ); - - fireEvent.click(getByLabelText(FILTER_POPOVER_OPEN_LABEL)); - - MIME_FILTERS.forEach((filter) => { - expect(getByTitle(filter.label)); - }); - }); - - it('filter icon changes color on active/inactive filters', () => { - const Component = () => { - const [activeFilters, setActiveFilters] = useState([]); - - return ( - - ); - }; - const { getByLabelText, getByTitle } = render(); - - fireEvent.click(getByLabelText(FILTER_POPOVER_OPEN_LABEL)); - - fireEvent.click(getByTitle('XHR')); - - expect(getByLabelText(FILTER_POPOVER_OPEN_LABEL).className).toMatchInlineSnapshot( - `"euiButtonIcon euiButtonIcon--xSmall css-1q7ycil-euiButtonIcon-empty-primary-hoverStyles"` - ); - - // toggle it back to inactive - fireEvent.click(getByTitle('XHR')); - - expect(getByLabelText(FILTER_POPOVER_OPEN_LABEL).className).toMatchInlineSnapshot( - `"euiButtonIcon euiButtonIcon--xSmall css-o2mzw-euiButtonIcon-empty-text-hoverStyles"` - ); - }); - - it('search input is working properly', () => { - const setQuery = jest.fn(); - - const Component = () => { - return ( - - ); - }; - const { getByLabelText } = render(); - - const testText = 'js'; - - fireEvent.change(getByLabelText(FILTER_REQUESTS_LABEL), { target: { value: testText } }); - - // inout has debounce effect so hence the timer - act(() => { - jest.advanceTimersByTime(300); - }); - - expect(setQuery).toHaveBeenCalledWith(testText); - }); - - it('resets checkbox when filters are removed', () => { - const Component = () => { - const [onlyHighlighted, setOnlyHighlighted] = useState(false); - const [query, setQuery] = useState(''); - const [activeFilters, setActiveFilters] = useState([]); - return ( - - ); - }; - const { getByLabelText, getByTitle } = render(); - const input = getByLabelText(FILTER_REQUESTS_LABEL); - // apply filters - const testText = 'js'; - fireEvent.change(input, { target: { value: testText } }); - fireEvent.click(getByLabelText(FILTER_POPOVER_OPEN_LABEL)); - const filterGroupButton = getByTitle('XHR'); - fireEvent.click(filterGroupButton); - - // input has debounce effect so hence the timer - act(() => { - jest.advanceTimersByTime(300); - }); - - const collapseCheckbox = getByLabelText(FILTER_COLLAPSE_REQUESTS_LABEL) as HTMLInputElement; - expect(collapseCheckbox).not.toBeDisabled(); - fireEvent.click(collapseCheckbox); - expect(collapseCheckbox).toBeChecked(); - - // remove filters - fireEvent.change(input, { target: { value: '' } }); - fireEvent.click(filterGroupButton); - - // input has debounce effect so hence the timer - act(() => { - jest.advanceTimersByTime(300); - }); - - // expect the checkbox to reset to disabled and unchecked - expect(collapseCheckbox).not.toBeChecked(); - expect(collapseCheckbox).toBeDisabled(); - }); -}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_filter.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_filter.tsx deleted file mode 100644 index 5531dafd4542b4..00000000000000 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_filter.tsx +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { Dispatch, SetStateAction, useEffect, useState } from 'react'; -import { - EuiButtonIcon, - EuiCheckbox, - EuiFieldSearch, - EuiFilterButton, - EuiFilterGroup, - EuiFlexGroup, - EuiFlexItem, - EuiPopover, - EuiSpacer, -} from '@elastic/eui'; -import useDebounce from 'react-use/lib/useDebounce'; -import { METRIC_TYPE, useUiTracker } from '@kbn/observability-plugin/public'; -import { - FILTER_REQUESTS_LABEL, - FILTER_SCREENREADER_LABEL, - FILTER_REMOVE_SCREENREADER_LABEL, - FILTER_POPOVER_OPEN_LABEL, - FILTER_COLLAPSE_REQUESTS_LABEL, -} from '../../waterfall/components/translations'; -import { MimeType, FriendlyMimetypeLabels } from './types'; - -interface Props { - query: string; - activeFilters: string[]; - setActiveFilters: Dispatch>; - setQuery: (val: string) => void; - onlyHighlighted: boolean; - setOnlyHighlighted: (val: boolean) => void; -} - -export const MIME_FILTERS = [ - { - label: FriendlyMimetypeLabels[MimeType.XHR], - mimeType: MimeType.XHR, - }, - { - label: FriendlyMimetypeLabels[MimeType.Html], - mimeType: MimeType.Html, - }, - { - label: FriendlyMimetypeLabels[MimeType.Script], - mimeType: MimeType.Script, - }, - { - label: FriendlyMimetypeLabels[MimeType.Stylesheet], - mimeType: MimeType.Stylesheet, - }, - { - label: FriendlyMimetypeLabels[MimeType.Font], - mimeType: MimeType.Font, - }, - { - label: FriendlyMimetypeLabels[MimeType.Media], - mimeType: MimeType.Media, - }, - { - label: FriendlyMimetypeLabels[MimeType.Other], - mimeType: MimeType.Other, - }, -]; - -export const WaterfallFilter = ({ - query, - setQuery, - activeFilters, - setActiveFilters, - onlyHighlighted, - setOnlyHighlighted, -}: Props) => { - const [value, setValue] = useState(query); - const [isPopoverOpen, setIsPopoverOpen] = useState(false); - - const trackMetric = useUiTracker({ app: 'uptime' }); - - const toggleFilters = (val: string) => { - setActiveFilters((prevState) => - prevState.includes(val) ? prevState.filter((filter) => filter !== val) : [...prevState, val] - ); - }; - useDebounce( - () => { - setQuery(value); - }, - 250, - [value] - ); - - /* reset checkbox when there is no query or active filters - * this prevents the checkbox from being checked in a disabled state */ - useEffect(() => { - if (!(query || activeFilters.length > 0)) { - setOnlyHighlighted(false); - } - }, [activeFilters.length, setOnlyHighlighted, query]); - - // indicates use of the query input box - useEffect(() => { - if (query) { - trackMetric({ metric: 'waterfall_filter_input_changed', metricType: METRIC_TYPE.CLICK }); - } - }, [query, trackMetric]); - - // indicates the collapse to show only highlighted checkbox has been clicked - useEffect(() => { - if (onlyHighlighted) { - trackMetric({ - metric: 'waterfall_filter_collapse_checked', - metricType: METRIC_TYPE.CLICK, - }); - } - }, [onlyHighlighted, trackMetric]); - - // indicates filters have been applied or changed - useEffect(() => { - if (activeFilters.length > 0) { - trackMetric({ - metric: `waterfall_filters_applied_changed`, - metricType: METRIC_TYPE.CLICK, - }); - } - }, [activeFilters, trackMetric]); - - return ( - - - { - setValue(evt.target.value); - }} - value={value} - /> - - - setIsPopoverOpen((prevState) => !prevState)} - color={activeFilters.length > 0 ? 'primary' : 'text'} - isSelected={activeFilters.length > 0} - /> - } - isOpen={isPopoverOpen} - closePopover={() => setIsPopoverOpen(false)} - anchorPosition="rightCenter" - > - - {MIME_FILTERS.map(({ label, mimeType }) => ( - toggleFilters(mimeType)} - key={label} - withNext={true} - aria-label={`${ - activeFilters.includes(mimeType) - ? FILTER_REMOVE_SCREENREADER_LABEL - : FILTER_SCREENREADER_LABEL - } ${label}`} - > - {label} - - ))} - - - 0)} - id="onlyHighlighted" - label={FILTER_COLLAPSE_REQUESTS_LABEL} - checked={onlyHighlighted} - onChange={(e) => { - setOnlyHighlighted(e.target.checked); - }} - /> - - - - ); -}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/legend.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/legend.tsx deleted file mode 100644 index 3fdfe2c65f0ad2..00000000000000 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/legend.tsx +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; -import { IWaterfallContext } from '../context/waterfall_chart'; -import { WaterfallChartProps } from './waterfall_chart'; - -interface LegendProps { - items: Required['legendItems']; - render: Required['renderLegendItem']; -} - -const StyledFlexItem = euiStyled(EuiFlexItem)` - margin-right: ${(props) => props.theme.eui.euiSizeM}; - max-width: 7%; - min-width: 160px; -`; - -export const Legend: React.FC = ({ items, render }) => { - return ( - - {items.map((item, index) => ( - {render(item, index)} - ))} - - ); -}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/network_requests_total.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/network_requests_total.test.tsx deleted file mode 100644 index e332be22d3da11..00000000000000 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/network_requests_total.test.tsx +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { NetworkRequestsTotal } from './network_requests_total'; -import { render } from '../../../../../../utils/testing'; - -describe('NetworkRequestsTotal', () => { - it('message in case total is greater than fetched', () => { - const { getByText } = render( - - ); - - expect(getByText('First 1000/1100 network requests')).toBeInTheDocument(); - expect(getByText('Info')).toBeInTheDocument(); - }); - - it('message in case total is equal to fetched requests', () => { - const { getByText } = render( - - ); - - expect(getByText('500 network requests')).toBeInTheDocument(); - }); - - it('does not show highlighted item message when showHighlightedNetworkEvents is false', () => { - const { queryByText } = render( - - ); - - expect(queryByText(/match the filter/)).not.toBeInTheDocument(); - }); - - it('does not show highlighted item message when highlightedNetworkEvents is less than 0', () => { - const { queryByText } = render( - - ); - - expect(queryByText(/match the filter/)).not.toBeInTheDocument(); - }); - - it('show highlighted item message when highlightedNetworkEvents is greater than 0 and showHighlightedNetworkEvents is true', () => { - const { getByText } = render( - - ); - - expect(getByText(/\(20 match the filter\)/)).toBeInTheDocument(); - }); -}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/network_requests_total.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/network_requests_total.tsx deleted file mode 100644 index 4fac0b3cd00d2a..00000000000000 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/network_requests_total.tsx +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { i18n } from '@kbn/i18n'; -import { EuiIconTip } from '@elastic/eui'; -import { NetworkRequestsTotalStyle } from './styles'; - -interface Props { - totalNetworkRequests: number; - fetchedNetworkRequests: number; - highlightedNetworkRequests: number; - showHighlightedNetworkRequests?: boolean; -} - -export const NetworkRequestsTotal = ({ - totalNetworkRequests, - fetchedNetworkRequests, - highlightedNetworkRequests, - showHighlightedNetworkRequests, -}: Props) => { - return ( - - - fetchedNetworkRequests ? ( - - ) : ( - totalNetworkRequests - ), - }} - />{' '} - {showHighlightedNetworkRequests && highlightedNetworkRequests >= 0 && ( - - )} - - {totalNetworkRequests > fetchedNetworkRequests && ( - - )} - - ); -}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/styles.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/styles.ts deleted file mode 100644 index a48ce1f7c09b5d..00000000000000 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/styles.ts +++ /dev/null @@ -1,181 +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 { FunctionComponent } from 'react'; -import { StyledComponent } from 'styled-components'; -import { EuiPanel, EuiFlexGroup, EuiFlexItem, EuiText, EuiPanelProps } from '@elastic/eui'; -import { rgba } from 'polished'; -import { euiStyled, EuiTheme } from '@kbn/kibana-react-plugin/common'; -import { FIXED_AXIS_HEIGHT } from './constants'; - -interface WaterfallChartOuterContainerProps { - height?: string; -} - -const StyledScrollDiv = euiStyled.div` - &::-webkit-scrollbar { - height: ${({ theme }) => theme.eui.euiScrollBar}; - width: ${({ theme }) => theme.eui.euiScrollBar}; - } - &::-webkit-scrollbar-thumb { - background-clip: content-box; - background-color: ${({ theme }) => rgba(theme.eui.euiColorDarkShade, 0.5)}; - border: ${({ theme }) => theme.eui.euiScrollBarCorner} solid transparent; - } - &::-webkit-scrollbar-corner, - &::-webkit-scrollbar-track { - background-color: transparent; - } -`; - -export const WaterfallChartOuterContainer = euiStyled( - StyledScrollDiv -)` - height: ${(props) => (props.height ? `${props.height}` : 'auto')}; - overflow-y: ${(props) => (props.height ? 'scroll' : 'visible')}; - overflow-x: hidden; -`; - -export const WaterfallChartFixedTopContainer = euiStyled(StyledScrollDiv)` - position: sticky; - top: 0; - z-index: ${(props) => props.theme.eui.euiZLevel4}; - overflow-y: scroll; - overflow-x: hidden; -`; - -export const WaterfallChartAxisOnlyContainer = euiStyled(EuiFlexItem)` - margin-left: -16px; -`; - -export const WaterfallChartTopContainer = euiStyled(EuiFlexGroup)` -`; - -export const WaterfallChartFixedTopContainerSidebarCover: StyledComponent< - FunctionComponent, - EuiTheme -> = euiStyled(EuiPanel)` - height: 100%; - border-radius: 0 !important; - border: none; -`; // NOTE: border-radius !important is here as the "border" prop isn't working - -export const WaterfallChartFilterContainer = euiStyled.div` - && { - padding: 16px; - z-index: ${(props) => props.theme.eui.euiZLevel5}; - border-bottom: 0.3px solid ${(props) => props.theme.eui.euiColorLightShade}; - } -`; // NOTE: border-radius !important is here as the "border" prop isn't working - -export const WaterfallChartFixedAxisContainer = euiStyled.div` - z-index: ${(props) => props.theme.eui.euiZLevel4}; - height: 100%; - &&& { - .echAnnotation__icon { - top: 8px; - } - } -`; - -interface WaterfallChartSidebarContainer { - height: number; -} - -export const WaterfallChartSidebarWrapper = euiStyled(EuiFlexItem)` - z-index: ${(props) => props.theme.eui.euiZLevel5}; - min-width: 0; -`; // NOTE: min-width: 0 ensures flexbox and no-wrap children can co-exist - -export const WaterfallChartSidebarContainer = euiStyled.div` - height: ${(props) => `${props.height}px`}; - overflow-y: hidden; - overflow-x: hidden; -`; - -export const WaterfallChartSidebarContainerInnerPanel: StyledComponent< - FunctionComponent, - EuiTheme -> = euiStyled(EuiPanel)` - border: 0; - height: 100%; -`; - -export const WaterfallChartSidebarContainerFlexGroup = euiStyled(EuiFlexGroup)` - height: 100%; -`; - -// Ensures flex items honour no-wrap of children, rather than trying to extend to the full width of children. -export const WaterfallChartSidebarFlexItem = euiStyled(EuiFlexItem)` - min-width: 0; - padding-right: ${(props) => props.theme.eui.euiSizeS}; - justify-content: space-around; -`; - -export const SideBarItemHighlighter = euiStyled(EuiFlexItem)<{ isHighlighted: boolean }>` - opacity: ${(props) => (props.isHighlighted ? 1 : 0.4)}; - height: 100%; - .euiButtonEmpty { - height: ${FIXED_AXIS_HEIGHT}px; - font-size:${({ theme }) => theme.eui.euiFontSizeM}; - } -`; - -interface WaterfallChartChartContainer { - height: number; - chartIndex: number; -} - -export const WaterfallChartChartContainer = euiStyled.div` - width: 100%; - height: ${(props) => `${props.height + FIXED_AXIS_HEIGHT + 4}px`}; - margin-top: -${FIXED_AXIS_HEIGHT + 4}px; - z-index: ${(props) => Math.round(props.theme.eui.euiZLevel3 / (props.chartIndex + 1))}; - background-color: ${(props) => props.theme.eui.euiColorEmptyShade}; - - &&& { - .echCanvasRenderer { - height: calc(100% + 0px) !important; - } - } -`; - -export const WaterfallChartLegendContainer = euiStyled.div` - position: sticky; - bottom: 0; - z-index: ${(props) => props.theme.eui.euiZLevel5}; - background-color: ${(props) => props.theme.eui.euiColorLightestShade}; - padding: ${(props) => props.theme.eui.euiSizeXS}; - font-size: ${(props) => props.theme.eui.euiFontSizeXS}; - box-shadow: 0px -1px 4px 0px ${(props) => props.theme.eui.euiColorLightShade}; -`; // NOTE: EuiShadowColor is a little too dark to work with the background-color - -export const WaterfallTooltipResponsiveMaxWidth = euiStyled.div` - margin-top: 16px; - max-width: 90vw; -`; - -export const WaterfallChartTooltip = euiStyled(WaterfallTooltipResponsiveMaxWidth)` - background-color: ${(props) => props.theme.eui.euiColorDarkestShade}; - border-radius: ${(props) => props.theme.eui.euiBorderRadius}; - color: ${(props) => props.theme.eui.euiColorLightestShade}; - padding: ${(props) => props.theme.eui.euiSizeS}; - .euiToolTip__arrow { - background-color: ${(props) => props.theme.eui.euiColorDarkestShade}; - } -`; - -export const NetworkRequestsTotalStyle = euiStyled(EuiText)` - line-height: 28px; - padding: 0 ${(props) => props.theme.eui.euiSizeM}; - border-bottom: 0.3px solid ${(props) => props.theme.eui.euiColorLightShade}; - z-index: ${(props) => props.theme.eui.euiZLevel5}; -`; - -export const RelativeContainer = euiStyled.div` - position: relative; -`; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall.test.tsx deleted file mode 100644 index c1937764214e49..00000000000000 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall.test.tsx +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { WaterfallChart } from './waterfall_chart'; -import { renderLegendItem } from '../../step_detail/waterfall/waterfall_chart_wrapper'; - -import 'jest-canvas-mock'; -import { waitFor } from '@testing-library/dom'; -import { render } from '../../../../../../utils/testing'; - -describe('waterfall', () => { - it('sets the correct height in case of full height', () => { - const Component = () => { - return ( -
- `${Number(d).toFixed(0)} ms`} - domain={{ - max: 3371, - min: 0, - }} - barStyleAccessor={(datum) => { - return datum.datum.config.colour; - }} - renderSidebarItem={undefined} - renderLegendItem={renderLegendItem} - fullHeight={true} - /> -
- ); - }; - - const { getByTestId } = render(); - - const chartWrapper = getByTestId('waterfallOuterContainer'); - - waitFor(() => { - expect(chartWrapper).toHaveStyleRule('height', 'calc(100vh - 62px)'); - }); - }); -}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_chart.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_chart.tsx deleted file mode 100644 index 8e69e57616bff8..00000000000000 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_chart.tsx +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useEffect, useRef, useState } from 'react'; -import { EuiFlexGroup } from '@elastic/eui'; -import { TickFormatter, DomainRange, BarStyleAccessor } from '@elastic/charts'; -import useWindowSize from 'react-use/lib/useWindowSize'; -import { useWaterfallContext } from '../context/waterfall_chart'; -import { - WaterfallChartOuterContainer, - WaterfallChartFixedTopContainer, - WaterfallChartFixedTopContainerSidebarCover, - WaterfallChartSidebarWrapper, - WaterfallChartTopContainer, - RelativeContainer, - WaterfallChartFilterContainer, - WaterfallChartAxisOnlyContainer, - WaterfallChartLegendContainer, -} from './styles'; -import { CHART_LEGEND_PADDING, MAIN_GROW_SIZE, SIDEBAR_GROW_SIZE } from './constants'; -import { Sidebar } from './sidebar'; -import { Legend } from './legend'; -import { useBarCharts } from './use_bar_charts'; -import { WaterfallBarChart } from './waterfall_bar_chart'; -import { WaterfallChartFixedAxis } from './waterfall_chart_fixed_axis'; -import { NetworkRequestsTotal } from './network_requests_total'; - -export type RenderItem = ( - item: I, - index: number, - onClick?: (event: any) => void -) => JSX.Element; -export type RenderElement = () => JSX.Element; - -export interface WaterfallChartProps { - tickFormat: TickFormatter; - domain: DomainRange; - barStyleAccessor: BarStyleAccessor; - renderSidebarItem?: RenderItem; - renderLegendItem?: RenderItem; - renderFilter?: RenderElement; - renderFlyout?: RenderElement; - maxHeight?: string; - fullHeight?: boolean; -} - -export const WaterfallChart = ({ - tickFormat, - domain, - barStyleAccessor, - renderSidebarItem, - renderLegendItem, - renderFilter, - renderFlyout, - maxHeight = '800px', - fullHeight = false, -}: WaterfallChartProps) => { - const { - data, - showOnlyHighlightedNetworkRequests, - sidebarItems, - legendItems, - totalNetworkRequests, - highlightedNetworkRequests, - fetchedNetworkRequests, - } = useWaterfallContext(); - - const { width } = useWindowSize(); - - const chartWrapperDivRef = useRef(null); - const legendDivRef = useRef(null); - - const [height, setHeight] = useState(maxHeight); - - const shouldRenderSidebar = !!(sidebarItems && renderSidebarItem); - const shouldRenderLegend = !!(legendItems && legendItems.length > 0 && renderLegendItem); - - useEffect(() => { - if (fullHeight && chartWrapperDivRef.current && legendDivRef.current) { - const chartOffset = chartWrapperDivRef.current.getBoundingClientRect().top; - const legendOffset = legendDivRef.current.getBoundingClientRect().height; - setHeight(`calc(190vh - ${chartOffset + CHART_LEGEND_PADDING + legendOffset}px)`); - } - }, [chartWrapperDivRef, fullHeight, legendDivRef, width]); - - const chartsToDisplay = useBarCharts({ data }); - - return ( - - - - {shouldRenderSidebar && ( - - - - {renderFilter && ( - {renderFilter()} - )} - - )} - - - - - - - - - {shouldRenderSidebar && } - - - {chartsToDisplay.map((chartData, ind) => ( - - ))} - - - - {shouldRenderLegend && ( - - - - )} - {renderFlyout && renderFlyout()} - - ); -}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/index.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/index.tsx deleted file mode 100644 index b83cb630aaa791..00000000000000 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/index.tsx +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -export type { RenderItem, WaterfallChartProps } from './components/waterfall_chart'; -export { WaterfallChart } from './components/waterfall_chart'; -export { WaterfallProvider, useWaterfallContext } from './context/waterfall_chart'; -export { MiddleTruncatedText } from './components/middle_truncated_text'; -export { useFlyout } from './components/use_flyout'; -export type { - WaterfallData, - WaterfallDataEntry, - WaterfallMetadata, - WaterfallMetadataEntry, -} from './types'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/types.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/types.ts deleted file mode 100644 index f1775a6fd18921..00000000000000 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/types.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -interface PlotProperties { - x: number; - y: number; - y0: number; -} - -export interface WaterfallDataSeriesConfigProperties { - tooltipProps?: Record; - showTooltip: boolean; -} - -export interface WaterfallMetadataItem { - name: string; - value?: string; -} - -export interface WaterfallMetadataEntry { - x: number; - url: string; - requestHeaders?: WaterfallMetadataItem[]; - responseHeaders?: WaterfallMetadataItem[]; - certificates?: WaterfallMetadataItem[]; - details: WaterfallMetadataItem[]; -} - -export type WaterfallDataEntry = PlotProperties & { - config: WaterfallDataSeriesConfigProperties & Record; -}; - -export type WaterfallMetadata = WaterfallMetadataEntry[]; - -export type WaterfallData = WaterfallDataEntry[]; - -export type RenderItem = (item: I, index: number) => JSX.Element; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_network_timings.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_network_timings.ts index 911e5a54f05f77..ed43a38113af98 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_network_timings.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_network_timings.ts @@ -5,6 +5,8 @@ * 2.0. */ +import { useParams } from 'react-router-dom'; +import { i18n } from '@kbn/i18n'; import { useEsSearch } from '@kbn/observability-plugin/public'; import { NETWORK_TIMINGS_FIELDS, @@ -18,8 +20,6 @@ import { SYNTHETICS_TOTAL_TIMINGS, SYNTHETICS_WAIT_TIMINGS, } from '@kbn/observability-plugin/common'; -import { useParams } from 'react-router-dom'; -import { i18n } from '@kbn/i18n'; export const useStepFilters = (prevCheckGroupId?: string) => { const { checkGroupId, stepIndex } = useParams<{ checkGroupId: string; stepIndex: string }>(); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_object_metrics.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_object_metrics.ts index 4de7a6692f0a67..fd19ec7675ec63 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_object_metrics.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_object_metrics.ts @@ -7,11 +7,7 @@ import { useSelector } from 'react-redux'; import { useParams } from 'react-router-dom'; -import { MIME_FILTERS } from '../components/network_waterfall/step_detail/waterfall/waterfall_filter'; -import { - MimeType, - MimeTypesMap, -} from '../components/network_waterfall/step_detail/waterfall/types'; +import { MIME_FILTERS, MimeType, MimeTypesMap } from '../common/network_data/types'; import { networkEventsSelector } from '../../../state/network_events/selectors'; export const useObjectMetrics = () => { diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_detail_page.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_detail_page.tsx index 780f150d8bf4cd..e76718c61e6175 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_detail_page.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_detail_page.tsx @@ -8,22 +8,15 @@ import React from 'react'; import { useParams } from 'react-router-dom'; import { useTrackPageview } from '@kbn/observability-plugin/public'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiHorizontalRule, - EuiPanel, - EuiLoadingSpinner, - EuiSpacer, -} from '@elastic/eui'; -import { BreakdownLegend } from './components/timings_breakdown/breakdown_legend'; -import { WaterfallChartContainer } from './components/network_waterfall/step_detail/waterfall/waterfall_chart_container'; -import { ObjectWeightList } from './components/object_weight_list'; -import { NetworkTimingsDonut } from './components/network_timings_donut'; -import { StepMetrics } from './components/step_metrics'; +import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiLoadingSpinner, EuiSpacer } from '@elastic/eui'; +import { BreakdownLegend } from './step_timing_breakdown/breakdown_legend'; +import { WaterfallChartContainer } from './step_waterfall_chart/waterfall/waterfall_chart_container'; +import { ObjectWeightList } from './step_objects/object_weight_list'; +import { NetworkTimingsDonut } from './step_timing_breakdown/network_timings_donut'; +import { StepMetrics } from './step_metrics/step_metrics'; import { NetworkTimingsBreakdown } from './network_timings_breakdown'; -import { ObjectCountList } from './components/object_count_list'; -import { StepImage } from './components/step_image'; +import { ObjectCountList } from './step_objects/object_count_list'; +import { StepImage } from './step_screenshot/step_image'; import { useJourneySteps } from '../monitor_details/hooks/use_journey_steps'; import { MonitorDetailsLinkPortal } from '../monitor_add_edit/monitor_details_portal'; @@ -108,15 +101,15 @@ export const StepDetailPage = () => { - + + + {data && ( -
- -
+ )} ); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/definitions_popover.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_metrics/definitions_popover.tsx similarity index 100% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/definitions_popover.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_metrics/definitions_popover.tsx diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/labels.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_metrics/labels.ts similarity index 100% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/labels.ts rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_metrics/labels.ts diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/step_metrics.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_metrics/step_metrics.tsx similarity index 100% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/step_metrics.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_metrics/step_metrics.tsx diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/color_palette.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_objects/color_palette.tsx similarity index 96% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/color_palette.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_objects/color_palette.tsx index be6bc97a1fcaec..23a53c2518ba69 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/color_palette.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_objects/color_palette.tsx @@ -9,7 +9,7 @@ import React, { useState, useEffect } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiText, EuiLoadingContent } from '@elastic/eui'; import { useTheme } from '@kbn/observability-plugin/public'; import styled from 'styled-components'; -import { colourPalette } from './network_waterfall/step_detail/waterfall/data_formatting'; +import { colourPalette } from '../common/network_data/data_formatting'; export const ColorPalette = ({ label, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/object_count_list.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_objects/object_count_list.tsx similarity index 94% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/object_count_list.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_objects/object_count_list.tsx index dbd21773a0e779..bbfec1d56fc2f3 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/object_count_list.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_objects/object_count_list.tsx @@ -5,8 +5,8 @@ * 2.0. */ +import React, { Fragment } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui'; -import React from 'react'; import { i18n } from '@kbn/i18n'; import { ColorPalette } from './color_palette'; import { useObjectMetrics } from '../hooks/use_object_metrics'; @@ -31,7 +31,7 @@ export const ObjectCountList = () => {
{objectMetrics.items.map(({ label, mimeType, percent, count }) => ( - <> + { loading={objectMetrics.loading} /> - + ))}
diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/object_weight_list.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_objects/object_weight_list.tsx similarity index 94% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/object_weight_list.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_objects/object_weight_list.tsx index 6fd10b65451969..c787fcc0711ba7 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/object_weight_list.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_objects/object_weight_list.tsx @@ -5,8 +5,8 @@ * 2.0. */ +import React, { Fragment } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui'; -import React from 'react'; import { i18n } from '@kbn/i18n'; import { ColorPalette } from './color_palette'; import { useObjectMetrics } from '../hooks/use_object_metrics'; @@ -32,7 +32,7 @@ export const ObjectWeightList = () => {
{objectMetrics.items.map(({ label, mimeType, weightPercent, weight }) => ( - <> + { loading={objectMetrics.loading} /> {' '} - + ))}
diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/screenshot/last_successful_screenshot.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/last_successful_screenshot.tsx similarity index 81% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/screenshot/last_successful_screenshot.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/last_successful_screenshot.tsx index 3874d29197d3cd..0541e0a091e71c 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/screenshot/last_successful_screenshot.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/last_successful_screenshot.tsx @@ -9,10 +9,10 @@ import { useFetcher } from '@kbn/observability-plugin/public'; import { EuiSpacer } from '@elastic/eui'; import React from 'react'; import { useParams } from 'react-router-dom'; -import { fetchLastSuccessfulCheck } from '../../../../state'; -import { JourneyStep } from '../../../../../../../common/runtime_types'; -import { EmptyImage } from '../../../common/screenshot/empty_image'; -import { JourneyStepScreenshotContainer } from '../../../common/screenshot/journey_step_screenshot_container'; +import { fetchLastSuccessfulCheck } from '../../../state'; +import { JourneyStep } from '../../../../../../common/runtime_types'; +import { EmptyImage } from '../../common/screenshot/empty_image'; +import { JourneyStepScreenshotContainer } from '../../common/screenshot/journey_step_screenshot_container'; export const LastSuccessfulScreenshot = ({ step }: { step: JourneyStep }) => { const { stepIndex } = useParams<{ checkGroupId: string; stepIndex: string }>(); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/screenshot/screenshot_link.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/screenshot_link.tsx similarity index 90% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/screenshot/screenshot_link.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/screenshot_link.tsx index 803c1fcc531216..1ad619735e03d6 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/screenshot/screenshot_link.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/screenshot_link.tsx @@ -8,8 +8,8 @@ import React from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { euiStyled } from '@kbn/kibana-react-plugin/common'; -import { ReactRouterEuiLink } from '../../../common/react_router_helpers'; -import { Ping } from '../../../../../../../common/runtime_types'; +import { ReactRouterEuiLink } from '../../common/react_router_helpers'; +import { Ping } from '../../../../../../common/runtime_types'; const LabelLink = euiStyled.div` margin-bottom: ${(props) => props.theme.eui.euiSizeXS}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/step_image.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/step_image.tsx similarity index 96% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/step_image.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/step_image.tsx index a08ba79444ccb0..8bc05a25dec454 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/step_image.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/step_image.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { EuiButtonGroup, EuiSpacer, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { LastSuccessfulScreenshot } from './screenshot/last_successful_screenshot'; +import { LastSuccessfulScreenshot } from './last_successful_screenshot'; import { JourneyStep } from '../../../../../../common/runtime_types'; import { JourneyStepScreenshotContainer } from '../../common/screenshot/journey_step_screenshot_container'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/screenshot/step_screenshot_display.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/step_screenshot_display.test.tsx similarity index 92% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/screenshot/step_screenshot_display.test.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/step_screenshot_display.test.tsx index 7a275527de3c63..5848f78d95ea7f 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/screenshot/step_screenshot_display.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/step_screenshot_display.test.tsx @@ -8,9 +8,9 @@ import React from 'react'; import { StepScreenshotDisplay } from './step_screenshot_display'; import * as observabilityPublic from '@kbn/observability-plugin/public'; -import { mockRef } from '../../../../utils/testing/__mocks__/screenshot_ref.mock'; -import { render } from '../../../../utils/testing'; -import '../../../../utils/testing/__mocks__/use_composite_image.mock'; +import { mockRef } from '../../../utils/testing/__mocks__/screenshot_ref.mock'; +import { render } from '../../../utils/testing'; +import '../../../utils/testing/__mocks__/use_composite_image.mock'; jest.mock('@kbn/observability-plugin/public'); jest.mock('react-use/lib/useIntersection', () => () => ({ diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/screenshot/step_screenshot_display.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/step_screenshot_display.tsx similarity index 96% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/screenshot/step_screenshot_display.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/step_screenshot_display.tsx index 1dbfe9595cc449..75c144190bce7e 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/screenshot/step_screenshot_display.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/step_screenshot_display.tsx @@ -19,17 +19,17 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React, { useEffect, useMemo, useRef, useState, FC } from 'react'; import useIntersection from 'react-use/lib/useIntersection'; import { useFetcher } from '@kbn/observability-plugin/public'; -import { getJourneyScreenshot } from '../../../../state'; -import { useCompositeImage } from '../../../../hooks'; +import { getJourneyScreenshot } from '../../../state'; +import { useCompositeImage } from '../../../hooks'; import { useSyntheticsRefreshContext, useSyntheticsSettingsContext, useSyntheticsThemeContext, -} from '../../../../contexts'; +} from '../../../contexts'; import { isScreenshotRef as isAScreenshotRef, ScreenshotRefImageData, -} from '../../../../../../../common/runtime_types'; +} from '../../../../../../common/runtime_types'; interface StepScreenshotDisplayProps { isFullScreenshot: boolean; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/timings_breakdown/breakdown_legend.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_timing_breakdown/breakdown_legend.tsx similarity index 77% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/timings_breakdown/breakdown_legend.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_timing_breakdown/breakdown_legend.tsx index 323bd98a4f7585..46c81f98198bc0 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/timings_breakdown/breakdown_legend.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_timing_breakdown/breakdown_legend.tsx @@ -5,11 +5,12 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexItem, EuiHealth, EuiSpacer, EuiText } from '@elastic/eui'; import React from 'react'; +import { EuiFlexGroup, EuiFlexItem, EuiHealth, EuiSpacer, EuiText } from '@elastic/eui'; import { useTheme } from '@kbn/observability-plugin/public'; -import { formatMillisecond } from '../network_timings_donut'; -import { useNetworkTimings } from '../../hooks/use_network_timings'; + +import { formatMillisecond } from '../common/network_data/data_formatting'; +import { useNetworkTimings } from '../hooks/use_network_timings'; export const BreakdownLegend = () => { const networkTimings = useNetworkTimings(); @@ -21,7 +22,7 @@ export const BreakdownLegend = () => { {networkTimings.timingsWithLabels.map(({ label, value }, index) => ( - + )[`euiColorVis${index + 1}`]} @@ -30,7 +31,9 @@ export const BreakdownLegend = () => { - {formatMillisecond(value)} + + {formatMillisecond(value)} + ))} diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_timings_donut.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_timing_breakdown/network_timings_donut.tsx similarity index 91% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_timings_donut.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_timing_breakdown/network_timings_donut.tsx index 62e5219c68105a..439cc300afe4f6 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_timings_donut.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_timing_breakdown/network_timings_donut.tsx @@ -5,20 +5,21 @@ * 2.0. */ +import React from 'react'; +import { i18n } from '@kbn/i18n'; import { Chart, - Partition, - Settings, - PartitionLayout, Datum, LIGHT_THEME, PartialTheme, + Partition, + PartitionLayout, + Settings, } from '@elastic/charts'; -import React from 'react'; +import { EuiLoadingSpinner, EuiSpacer, EuiTitle } from '@elastic/eui'; import { useTheme } from '@kbn/observability-plugin/public'; +import { formatMillisecond } from '../common/network_data/data_formatting'; -import { EuiLoadingSpinner, EuiSpacer, EuiTitle } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; import { useNetworkTimings } from '../hooks/use_network_timings'; const themeOverrides: PartialTheme = { @@ -78,12 +79,5 @@ export const NetworkTimingsDonut = () => { }; const TIMINGS_BREAKDOWN = i18n.translate('xpack.synthetics.stepDetailsRoute.timingsBreakdown', { - defaultMessage: 'Timings breakdown', + defaultMessage: 'Timing breakdown', }); - -export const formatMillisecond = (ms: number) => { - if (ms < 1000) { - return `${ms.toFixed(0)} ms`; - } - return `${(ms / 1000).toFixed(1)} s`; -}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/translations.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/labels.ts similarity index 100% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/translations.ts rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/labels.ts diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/step_detail_container.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/step_detail_container.tsx similarity index 95% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/step_detail_container.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/step_detail_container.tsx index 3035bebf95879c..c1a60433b09229 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/step_detail_container.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/step_detail_container.tsx @@ -8,7 +8,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiText, EuiLoadingSpinner } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { useStepDetailPage } from '../../../hooks/use_step_detail_page'; +import { useStepDetailPage } from '../hooks/use_step_detail_page'; import { useMonitorBreadcrumb } from './use_monitor_breadcrumb'; import { WaterfallChartContainer } from './waterfall/waterfall_chart_container'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/step_page_nav.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/step_page_nav.tsx similarity index 100% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/step_page_nav.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/step_page_nav.tsx diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/step_page_title.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/step_page_title.tsx similarity index 100% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/step_page_title.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/step_page_title.tsx diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/use_monitor_breadcrumb.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/use_monitor_breadcrumb.tsx similarity index 87% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/use_monitor_breadcrumb.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/use_monitor_breadcrumb.tsx index e30039280b3070..499647d16b0a08 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/use_monitor_breadcrumb.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/use_monitor_breadcrumb.tsx @@ -8,10 +8,10 @@ import moment from 'moment'; import { i18n } from '@kbn/i18n'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { getShortTimeStamp } from '../../../../../utils/monitor_test_result/timestamp'; -import { PLUGIN } from '../../../../../../../../common/constants/plugin'; -import { useBreadcrumbs } from '../../../../../hooks'; -import { SyntheticsJourneyApiResponse } from '../../../../../../../../common/runtime_types'; +import { getShortTimeStamp } from '../../../utils/monitor_test_result/timestamp'; +import { PLUGIN } from '../../../../../../common/constants/plugin'; +import { useBreadcrumbs } from '../../../hooks'; +import { SyntheticsJourneyApiResponse } from '../../../../../../common/runtime_types'; interface ActiveStep { monitor: { diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/use_monitor_breadcrumbs.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/use_monitor_breadcrumbs.test.tsx similarity index 96% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/use_monitor_breadcrumbs.test.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/use_monitor_breadcrumbs.test.tsx index 416b5c3ca10c6e..4473ba72f510f8 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/use_monitor_breadcrumbs.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/use_monitor_breadcrumbs.test.tsx @@ -11,9 +11,9 @@ import { Route } from 'react-router-dom'; import { of } from 'rxjs'; import { chromeServiceMock, uiSettingsServiceMock } from '@kbn/core/public/mocks'; import { useMonitorBreadcrumb } from './use_monitor_breadcrumb'; -import { Ping, SyntheticsJourneyApiResponse } from '../../../../../../../../common/runtime_types'; -import { render } from '../../../../../utils/testing'; -import { OVERVIEW_ROUTE } from '../../../../../../../../common/constants'; +import { Ping, SyntheticsJourneyApiResponse } from '../../../../../../common/runtime_types'; +import { render } from '../../../utils/testing'; +import { OVERVIEW_ROUTE } from '../../../../../../common/constants'; describe('useMonitorBreadcrumbs', () => { it('sets the given breadcrumbs for steps list view', () => { diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/use_step_waterfall_metrics.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/use_step_waterfall_metrics.test.tsx similarity index 100% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/use_step_waterfall_metrics.test.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/use_step_waterfall_metrics.test.tsx diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/use_step_waterfall_metrics.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/use_step_waterfall_metrics.ts similarity index 97% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/use_step_waterfall_metrics.ts rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/use_step_waterfall_metrics.ts index 290bf7efbb0204..54d382c2240ca5 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/use_step_waterfall_metrics.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/use_step_waterfall_metrics.ts @@ -6,7 +6,7 @@ */ import { createEsParams, useEsSearch } from '@kbn/observability-plugin/public'; -import { MarkerItems } from '../waterfall/context/waterfall_chart'; +import { MarkerItems } from './waterfall/context/waterfall_context'; export interface Props { checkGroup: string; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/README.md b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/README.md similarity index 100% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/README.md rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/README.md diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/constants.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/constants.ts similarity index 79% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/constants.ts rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/constants.ts index d36cb025f3c2bb..67dd1d5e29e5c1 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/constants.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/constants.ts @@ -10,12 +10,17 @@ export const BAR_HEIGHT = 24; // Flex grow value export const MAIN_GROW_SIZE = 8; // Flex grow value -export const SIDEBAR_GROW_SIZE = 2; +export const SIDEBAR_GROW_SIZE = 3; // Axis height // NOTE: This isn't a perfect solution - changes in font size etc within charts could change the ideal height here. export const FIXED_AXIS_HEIGHT = 24; +// Font size of the request titles/links in the left sidebar +export const RESOURCE_TITLE_FONT_SIZE = 14; + // number of items to display in canvas, since canvas can only have limited size export const CANVAS_MAX_ITEMS = 150; export const CHART_LEGEND_PADDING = 33; + +export const CHART_HEADER_HEIGHT = 146; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/context/waterfall_chart.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/context/waterfall_context.tsx similarity index 63% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/context/waterfall_chart.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/context/waterfall_context.tsx index 115dd15b416fc5..daf38c465292b0 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/context/waterfall_chart.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/context/waterfall_context.tsx @@ -5,11 +5,15 @@ * 2.0. */ -import React, { createContext, useContext, Context } from 'react'; -import { JourneyStep } from '../../../../../../../../../common/runtime_types'; -import { WaterfallData, WaterfallDataEntry, WaterfallMetadata } from '../types'; -import { OnSidebarClick, OnElementClick, OnProjectionClick } from '../components/use_flyout'; -import { SidebarItems } from '../../step_detail/waterfall/types'; +import React, { createContext, useContext, Context, Dispatch, SetStateAction } from 'react'; +import { JourneyStep } from '../../../../../../../../common/runtime_types'; +import { + WaterfallData, + WaterfallDataEntry, + WaterfallMetadata, +} from '../../../common/network_data/types'; +import { OnSidebarClick, OnElementClick, OnProjectionClick } from '../waterfall_flyout/use_flyout'; +import { SidebarItem } from '../../../common/network_data/types'; export type MarkerItems = Array<{ id: @@ -31,8 +35,7 @@ export interface IWaterfallContext { onProjectionClick?: OnProjectionClick; onSidebarClick?: OnSidebarClick; showOnlyHighlightedNetworkRequests: boolean; - sidebarItems?: SidebarItems; - legendItems?: unknown[]; + sidebarItems?: SidebarItem[]; metadata: WaterfallMetadata; renderTooltipItem: ( item: WaterfallDataEntry['config']['tooltipProps'], @@ -40,28 +43,16 @@ export interface IWaterfallContext { ) => JSX.Element; markerItems?: MarkerItems; activeStep?: JourneyStep; + activeFilters: string[]; + setActiveFilters: Dispatch>; + setOnlyHighlighted: (val: boolean) => void; + query: string; + setQuery: (val: string) => void; } export const WaterfallContext = createContext>({}); -interface ProviderProps { - totalNetworkRequests: number; - highlightedNetworkRequests: number; - fetchedNetworkRequests: number; - data: IWaterfallContext['data']; - onElementClick?: IWaterfallContext['onElementClick']; - onProjectionClick?: IWaterfallContext['onProjectionClick']; - onSidebarClick?: IWaterfallContext['onSidebarClick']; - showOnlyHighlightedNetworkRequests: IWaterfallContext['showOnlyHighlightedNetworkRequests']; - sidebarItems?: IWaterfallContext['sidebarItems']; - legendItems?: IWaterfallContext['legendItems']; - metadata: IWaterfallContext['metadata']; - renderTooltipItem: IWaterfallContext['renderTooltipItem']; - markerItems?: MarkerItems; - activeStep?: JourneyStep; -} - -export const WaterfallProvider: React.FC = ({ +export const WaterfallProvider: React.FC = ({ children, data, markerItems, @@ -70,13 +61,17 @@ export const WaterfallProvider: React.FC = ({ onSidebarClick, showOnlyHighlightedNetworkRequests, sidebarItems, - legendItems, metadata, renderTooltipItem, totalNetworkRequests, highlightedNetworkRequests, fetchedNetworkRequests, activeStep, + activeFilters, + setActiveFilters, + setOnlyHighlighted, + query, + setQuery, }) => { return ( = ({ markerItems, showOnlyHighlightedNetworkRequests, sidebarItems, - legendItems, metadata, onElementClick, onProjectionClick, @@ -95,6 +89,11 @@ export const WaterfallProvider: React.FC = ({ totalNetworkRequests, highlightedNetworkRequests, fetchedNetworkRequests, + activeFilters, + setActiveFilters, + setOnlyHighlighted, + query, + setQuery, }} > {children} diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/middle_truncated_text.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/middle_truncated_text.test.tsx similarity index 97% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/middle_truncated_text.test.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/middle_truncated_text.test.tsx index 707a561043b4f4..e6b29cfb9faa7b 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/middle_truncated_text.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/middle_truncated_text.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { within, fireEvent, waitFor } from '@testing-library/react'; import { getChunks, MiddleTruncatedText } from './middle_truncated_text'; -import { render } from '../../../../../../utils/testing'; +import { render } from '../../../../utils/testing'; const longString = 'this-is-a-really-really-really-really-really-really-really-really-long-string.madeup.extension'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/middle_truncated_text.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/middle_truncated_text.tsx similarity index 91% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/middle_truncated_text.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/middle_truncated_text.tsx index 7da52b2ce9bc24..9c96c78e746493 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/middle_truncated_text.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/middle_truncated_text.tsx @@ -19,8 +19,8 @@ import { i18n } from '@kbn/i18n'; import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { WaterfallTooltipContent } from './waterfall_tooltip_content'; import { WaterfallChartTooltip } from './styles'; -import { FIXED_AXIS_HEIGHT } from './constants'; -import { formatTooltipHeading } from '../../step_detail/waterfall/data_formatting'; +import { FIXED_AXIS_HEIGHT, RESOURCE_TITLE_FONT_SIZE } from './constants'; +import { formatTooltipHeading } from '../../common/network_data/data_formatting'; interface Props { index: number; @@ -49,10 +49,12 @@ const InnerContainer = euiStyled.span` const IndexNumber = euiStyled(EuiText)` font-family: ${(props) => props.theme.eui.euiCodeFontFamily}; - margin-right: ${(props) => props.theme.eui.euiSizeXS}; + margin-right: ${(props) => props.theme.eui.euiSizeS}; line-height: ${FIXED_AXIS_HEIGHT}px; text-align: right; background-color: ${(props) => props.theme.eui.euiColorLightestShade}; + text-align: center; + color: ${(props) => props.theme.eui.euiColorDarkShade}; `; const FirstChunk = euiStyled.span` @@ -60,12 +62,14 @@ const FirstChunk = euiStyled.span` white-space: nowrap; overflow: hidden; line-height: ${FIXED_AXIS_HEIGHT}px; + font-size: ${RESOURCE_TITLE_FONT_SIZE}px; text-align: left; `; // safari doesn't auto align text left in some cases const LastChunk = euiStyled.span` flex-shrink: 0; line-height: ${FIXED_AXIS_HEIGHT}px; + font-size: ${RESOURCE_TITLE_FONT_SIZE}px; text-align: left; `; // safari doesn't auto align text left in some cases @@ -135,11 +139,11 @@ export const MiddleTruncatedText = ({ > - {index + '.'} + {index} {secureHttps && ( = ({ items, render }) => { + const { euiTheme } = useEuiTheme(); const { onSidebarClick } = useWaterfallContext(); const handleSidebarClick = useMemo(() => onSidebarClick, [onSidebarClick]); return ( - - - + {items.map((item, index) => { return ( - + {render(item, index, handleSidebarClick)} - + ); })} - - - + + + ); }; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/styles.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/styles.ts new file mode 100644 index 00000000000000..646ff0b960cd0f --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/styles.ts @@ -0,0 +1,122 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiFlexItem } from '@elastic/eui'; +import { rgba } from 'polished'; +import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import { FIXED_AXIS_HEIGHT, CHART_HEADER_HEIGHT } from './constants'; + +interface WaterfallChartOuterContainerProps { + height?: string; +} + +const StyledScrollDiv = euiStyled.div` + &::-webkit-scrollbar { + height: ${({ theme }) => theme.eui.euiScrollBar}; + width: ${({ theme }) => theme.eui.euiScrollBar}; + } + &::-webkit-scrollbar-thumb { + background-clip: content-box; + background-color: ${({ theme }) => rgba(theme.eui.euiColorDarkShade, 0.5)}; + border: ${({ theme }) => theme.eui.euiScrollBarCorner} solid transparent; + } + &::-webkit-scrollbar-corner, + &::-webkit-scrollbar-track { + background-color: transparent; + } +`; + +export const WaterfallChartOuterContainer = euiStyled( + StyledScrollDiv +)` + height: auto; + overflow: hidden; + z-index: 50; +`; + +export const WaterfallChartStickyHeaderContainer = euiStyled(StyledScrollDiv)` + position: sticky; + top: 96px; + z-index: ${(props) => props.theme.eui.euiZLevel5}; + overflow: visible; + min-height: ${CHART_HEADER_HEIGHT}px; + border-color: ${(props) => props.theme.eui.euiColorLightShade}; + border-top: ${(props) => props.theme.eui.euiBorderThin}; + border-bottom: ${(props) => props.theme.eui.euiBorderThin}; + padding: ${(props) => props.theme.eui.euiSizeL}; + padding-bottom: ${(props) => props.theme.eui.euiSizeXL}; + padding-left: ${(props) => props.theme.eui.euiSizeM}; +`; + +export const WaterfallChartTimeTicksContainer = euiStyled(StyledScrollDiv)` + z-index: ${(props) => props.theme.eui.euiZLevel6}; + overflow: hidden; + position: absolute; + left: 0; + bottom: -10px; + width: 100%; + height: auto; + border: none; + background: transparent; +`; + +export const WaterfallChartFixedAxisContainer = euiStyled.div` + z-index: ${(props) => props.theme.eui.euiZLevel4}; + height: 100%; + &&& { + .echAnnotation__icon { + top: 8px; + } + } +`; + +export const WaterfallChartSidebarWrapper = euiStyled(EuiFlexItem)` + z-index: ${(props) => props.theme.eui.euiZLevel4}; + min-width: 0; +`; // NOTE: min-width: 0 ensures flexbox and no-wrap children can co-exist + +export const SideBarItemHighlighter = euiStyled(EuiFlexItem)` + height: 100%; + .euiButtonEmpty { + height: ${FIXED_AXIS_HEIGHT}px; + font-size:${({ theme }) => theme.eui.euiFontSizeM}; + } +`; + +interface WaterfallChartChartContainer { + height: number; + chartIndex: number; +} + +export const WaterfallChartChartContainer = euiStyled.div` + width: 100%; + height: ${(props) => `${props.height + FIXED_AXIS_HEIGHT + 4}px`}; + margin-top: -${FIXED_AXIS_HEIGHT + 4}px; + z-index: ${(props) => Math.round(props.theme.eui.euiZLevel3 / (props.chartIndex + 1))}; + background-color: ${(props) => props.theme.eui.euiColorEmptyShade}; + + &&& { + .echCanvasRenderer { + height: calc(100% + 0px) !important; + } + } +`; + +export const WaterfallTooltipResponsiveMaxWidth = euiStyled.div` + margin-top: 16px; + max-width: 90vw; +`; + +export const WaterfallChartTooltip = euiStyled(WaterfallTooltipResponsiveMaxWidth)` + background-color: ${(props) => props.theme.eui.euiColorDarkestShade}; + border-radius: ${(props) => props.theme.eui.euiBorderRadius}; + color: ${(props) => props.theme.eui.euiColorLightestShade}; + padding: ${(props) => props.theme.eui.euiSizeS}; + .euiToolTip__arrow { + background-color: ${(props) => props.theme.eui.euiColorDarkestShade}; + } +`; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/translations.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/translations.ts similarity index 72% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/translations.ts rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/translations.ts index 6bb0c03f7b99e5..a1deffad52e43a 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/translations.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/translations.ts @@ -14,6 +14,13 @@ export const FILTER_REQUESTS_LABEL = i18n.translate( } ); +export const SEARCH_REQUESTS_LABEL = i18n.translate( + 'xpack.synthetics.synthetics.waterfall.searchBox.searchLabel', + { + defaultMessage: 'Search', + } +); + export const FILTER_SCREENREADER_LABEL = i18n.translate( 'xpack.synthetics.synthetics.waterfall.filterGroup.filterScreenreaderLabel', { @@ -28,20 +35,6 @@ export const FILTER_REMOVE_SCREENREADER_LABEL = i18n.translate( } ); -export const FILTER_POPOVER_OPEN_LABEL = i18n.translate( - 'xpack.synthetics.pingList.synthetics.waterfall.filters.popover', - { - defaultMessage: 'Click to open waterfall filters', - } -); - -export const FILTER_COLLAPSE_REQUESTS_LABEL = i18n.translate( - 'xpack.synthetics.pingList.synthetics.waterfall.filters.collapseRequestsLabel', - { - defaultMessage: 'Collapse to only show matching requests', - } -); - export const SIDEBAR_FILTER_MATCHES_SCREENREADER_LABEL = i18n.translate( 'xpack.synthetics.synthetics.waterfall.sidebar.filterMatchesScreenReaderLabel', { diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/use_bar_charts.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/use_bar_charts.test.tsx similarity index 98% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/use_bar_charts.test.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/use_bar_charts.test.tsx index a963fb1e2939c7..24c1c074bd86af 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/use_bar_charts.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/use_bar_charts.test.tsx @@ -7,7 +7,7 @@ import { useBarCharts } from './use_bar_charts'; import { renderHook } from '@testing-library/react-hooks'; -import { IWaterfallContext } from '../context/waterfall_chart'; +import { IWaterfallContext } from './context/waterfall_context'; import { CANVAS_MAX_ITEMS } from './constants'; const generateTestData = ( diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/use_bar_charts.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/use_bar_charts.ts similarity index 69% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/use_bar_charts.ts rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/use_bar_charts.ts index 2baf8955049113..2045c9c1f08c3d 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/use_bar_charts.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/use_bar_charts.ts @@ -6,7 +6,7 @@ */ import { useEffect, useState } from 'react'; -import { IWaterfallContext } from '../context/waterfall_chart'; +import { IWaterfallContext } from './context/waterfall_context'; import { CANVAS_MAX_ITEMS } from './constants'; export interface UseBarHookProps { @@ -27,19 +27,21 @@ export const useBarCharts = ({ data }: UseBarHookProps) => { * We must keep track of the number of unique resources added to the each array. */ const uniqueResources = new Set(); let lastIndex: number; - data.forEach((item) => { - if (uniqueResources.size === CANVAS_MAX_ITEMS && item.x > lastIndex) { - chartIndex++; - uniqueResources.clear(); - } - uniqueResources.add(item.x); - lastIndex = item.x; - if (!chartsN[chartIndex]) { - chartsN.push([item]); - return; - } - chartsN[chartIndex].push(item); - }); + data + .filter((item) => true) + .forEach((item) => { + if (uniqueResources.size === CANVAS_MAX_ITEMS && item.x > lastIndex) { + chartIndex++; + uniqueResources.clear(); + } + uniqueResources.add(item.x); + lastIndex = item.x; + if (!chartsN[chartIndex]) { + chartsN.push([item]); + return; + } + chartsN[chartIndex].push(item); + }); } setCharts(chartsN); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_bar_chart.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_bar_chart.tsx similarity index 86% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_bar_chart.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_bar_chart.tsx index 3c9baed0dd3d68..124b64793678b2 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_bar_chart.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_bar_chart.tsx @@ -18,13 +18,15 @@ import { TickFormatter, TooltipInfo, } from '@elastic/charts'; -import { useChartTheme } from '../../../../../../../../hooks/use_chart_theme'; +import { useEuiTheme } from '@elastic/eui'; +import { useChartTheme } from '../../../../../../hooks/use_chart_theme'; import { BAR_HEIGHT } from './constants'; import { WaterfallChartChartContainer, WaterfallChartTooltip } from './styles'; -import { useWaterfallContext, WaterfallData } from '..'; +import { WaterfallData } from '../../common/network_data/types'; +import { useWaterfallContext } from './context/waterfall_context'; import { WaterfallTooltipContent } from './waterfall_tooltip_content'; -import { formatTooltipHeading } from '../../step_detail/waterfall/data_formatting'; -import { WaterfallChartMarkers } from './waterfall_markers'; +import { formatTooltipHeading } from '../../common/network_data/data_formatting'; +import { WaterfallChartMarkers } from './waterfall_marker/waterfall_markers'; const getChartHeight = (data: WaterfallData): number => { // We get the last item x(number of bars) and adds 1 to cater for 0 index @@ -71,6 +73,7 @@ export const WaterfallBarChart = ({ index, }: Props) => { const theme = useChartTheme(); + const { euiTheme } = useEuiTheme(); const { onElementClick, onProjectionClick } = useWaterfallContext(); const handleElementClick = useMemo(() => onElementClick, [onElementClick]); const handleProjectionClick = useMemo(() => onProjectionClick, [onProjectionClick]); @@ -108,6 +111,10 @@ export const WaterfallBarChart = ({ axisLine: { visible: false, }, + tickLabel: { + fontSize: 12, + fill: euiTheme.colors.darkestShade, + }, }} /> diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart.tsx new file mode 100644 index 00000000000000..9ea2ff0cd4b5bc --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart.tsx @@ -0,0 +1,144 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useRef } from 'react'; +import { TickFormatter, DomainRange, BarStyleAccessor } from '@elastic/charts'; +import { EuiFlexGroup, EuiFlexItem, useEuiTheme } from '@elastic/eui'; + +import { useWaterfallContext } from './context/waterfall_context'; +import { WaterfallSearch } from './waterfall_header/waterfall_search'; +import { WaterfallLegend } from './waterfall_header/waterfall_legend'; +import { WaterfallTickAxis } from './waterfall_header/waterfall_tick_axis'; + +import { + WaterfallChartOuterContainer, + WaterfallChartStickyHeaderContainer, + WaterfallChartSidebarWrapper, +} from './styles'; +import { MAIN_GROW_SIZE, SIDEBAR_GROW_SIZE } from './constants'; +import { Sidebar } from './sidebar'; +import { useBarCharts } from './use_bar_charts'; +import { WaterfallBarChart } from './waterfall_bar_chart'; + +export type RenderItem = ( + item: I, + index: number, + onClick?: (event: any) => void +) => JSX.Element; +export type RenderElement = () => JSX.Element; + +export interface WaterfallChartProps { + tickFormat: TickFormatter; + domain: DomainRange; + barStyleAccessor: BarStyleAccessor; + renderSidebarItem?: RenderItem; + renderLegendItem?: RenderItem; + renderFlyout?: RenderElement; +} + +export const WaterfallChart = ({ + tickFormat, + domain, + barStyleAccessor, + renderSidebarItem, + renderFlyout, +}: WaterfallChartProps) => { + const { euiTheme } = useEuiTheme(); + const { + data, + query, + setQuery, + sidebarItems, + activeFilters, + setActiveFilters, + showOnlyHighlightedNetworkRequests, + setOnlyHighlighted, + totalNetworkRequests, + highlightedNetworkRequests, + fetchedNetworkRequests, + } = useWaterfallContext(); + + const chartWrapperDivRef = useRef(null); + + const shouldRenderSidebar = !!(sidebarItems && renderSidebarItem); + + const chartsToDisplay = useBarCharts({ data }); + const cancelPagePadding = { + marginLeft: `-${euiTheme.size.l}`, + marginRight: `-${euiTheme.size.l}`, + }; + + return ( +
+ + + {shouldRenderSidebar && ( + + + + )} + + + + + + + + + + + {shouldRenderSidebar ? ( + + ) : null} + + {chartsToDisplay.map((chartData, ind) => ( + + ))} + + + + {renderFlyout && renderFlyout()} +
+ ); +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_chart_container.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_container.test.tsx similarity index 98% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_chart_container.test.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_container.test.tsx index 3802ace38f4531..0533e47c6244e7 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_chart_container.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_container.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { screen } from '@testing-library/react'; import { WaterfallChartContainer } from './waterfall_chart_container'; -import { render } from '../../../../../../utils/testing'; +import { render } from '../../../../utils/testing'; const networkEvents = { events: [ diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_chart_container.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_container.tsx similarity index 91% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_chart_container.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_container.tsx index effe2c2ed42cab..f63c4beddd8557 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_chart_container.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_container.tsx @@ -10,11 +10,11 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useEffect } from 'react'; import { useSelector, useDispatch } from 'react-redux'; -import { networkEventsSelector } from '../../../../../../state/network_events/selectors'; -import { getNetworkEvents } from '../../../../../../state/network_events/actions'; -import { JourneyStep } from '../../../../../../../../../common/runtime_types'; +import { networkEventsSelector } from '../../../../state/network_events/selectors'; +import { getNetworkEvents } from '../../../../state/network_events/actions'; +import { JourneyStep } from '../../../../../../../common/runtime_types'; import { WaterfallChartWrapper } from './waterfall_chart_wrapper'; -import { extractItems } from './data_formatting'; +import { extractItems } from '../../common/network_data/data_formatting'; import { useStepWaterfallMetrics } from '../use_step_waterfall_metrics'; export const NO_DATA_TEXT = i18n.translate( diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_chart_fixed_axis.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_fixed_axis.tsx similarity index 75% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_chart_fixed_axis.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_fixed_axis.tsx index 15b29beb197599..56f95f64bdc784 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_chart_fixed_axis.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_fixed_axis.tsx @@ -18,9 +18,10 @@ import { TickFormatter, TooltipType, } from '@elastic/charts'; -import { useChartTheme } from '../../../../../../../../hooks/use_chart_theme'; +import { useEuiTheme } from '@elastic/eui'; +import { useChartTheme } from '../../../../../../hooks/use_chart_theme'; import { WaterfallChartFixedAxisContainer } from './styles'; -import { WaterfallChartMarkers } from './waterfall_markers'; +import { WaterfallChartMarkers } from './waterfall_marker/waterfall_markers'; interface Props { tickFormat: TickFormatter; @@ -30,6 +31,7 @@ interface Props { export const WaterfallChartFixedAxis = ({ tickFormat, domain, barStyleAccessor }: Props) => { const theme = useChartTheme(); + const { euiTheme } = useEuiTheme(); return ( @@ -38,13 +40,26 @@ export const WaterfallChartFixedAxis = ({ tickFormat, domain, barStyleAccessor } showLegend={false} rotation={90} tooltip={{ type: TooltipType.None }} - theme={theme} + theme={[ + { + background: { + color: 'transparent', + }, + }, + theme, + ]} /> diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_chart_wrapper.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_wrapper.test.tsx similarity index 76% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_chart_wrapper.test.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_wrapper.test.tsx index 94df6a4e2e6989..872e67fcab0c2f 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_chart_wrapper.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_wrapper.test.tsx @@ -8,20 +8,23 @@ import React from 'react'; import { act, fireEvent, waitFor } from '@testing-library/react'; import { WaterfallChartWrapper } from './waterfall_chart_wrapper'; -import { networkItems as mockNetworkItems } from './data_formatting.test'; +import { networkItems as mockNetworkItems } from '../../common/network_data/data_formatting.test'; -import { extractItems, isHighlightedItem } from './data_formatting'; -import { BAR_HEIGHT } from '../../waterfall/components/constants'; -import { MimeType } from './types'; import { - FILTER_POPOVER_OPEN_LABEL, - FILTER_REQUESTS_LABEL, - FILTER_COLLAPSE_REQUESTS_LABEL, -} from '../../waterfall/components/translations'; -import { render } from '../../../../../../utils/testing'; + extractItems, + isHighlightedItem, + getQueryMatcher, + getFilterMatcher, +} from '../../common/network_data/data_formatting'; +import { BAR_HEIGHT } from './constants'; +import { MimeType } from '../../common/network_data/types'; +import { FILTER_REQUESTS_LABEL } from './translations'; +import { render } from '../../../../utils/testing'; const getHighLightedItems = (query: string, filters: string[]) => { - return NETWORK_EVENTS.events.filter((item) => isHighlightedItem(item, query, filters)); + return NETWORK_EVENTS.events.filter((item) => + isHighlightedItem(item, getQueryMatcher(query), getFilterMatcher(filters)) + ); }; describe('WaterfallChartWrapper', () => { @@ -67,13 +70,14 @@ describe('WaterfallChartWrapper', () => { ); const SIDE_BAR_ITEMS_HEIGHT = NETWORK_EVENTS.events.length * BAR_HEIGHT; - expect(getByTestId('wfSidebarContainer')).toHaveAttribute('height', `${SIDE_BAR_ITEMS_HEIGHT}`); - - expect(getByTestId('wfDataOnlyBarChart')).toHaveAttribute('height', `${SIDE_BAR_ITEMS_HEIGHT}`); + expect(getByTestId('wfSidebarContainer').style).toHaveProperty( + 'height', + `${SIDE_BAR_ITEMS_HEIGHT}px` + ); }); it('search by mime type works', () => { - const { getAllByTestId, getByLabelText, getAllByText } = render( + const { getAllByTestId, getByText } = render( ); @@ -81,9 +85,7 @@ describe('WaterfallChartWrapper', () => { expect(sideBarItems).toHaveLength(5); - fireEvent.click(getByLabelText(FILTER_POPOVER_OPEN_LABEL)); - - fireEvent.click(getAllByText('XHR')[1]); + fireEvent.click(getByText('XHR')); // inout has debounce effect so hence the timer act(() => { @@ -99,7 +101,7 @@ describe('WaterfallChartWrapper', () => { }); it('renders sidebar even when filter matches 0 resources', () => { - const { getAllByTestId, getByLabelText, getAllByText, queryAllByTestId } = render( + const { getAllByTestId, getByTestId, getByLabelText, queryAllByTestId, getByText } = render( ); @@ -107,9 +109,7 @@ describe('WaterfallChartWrapper', () => { expect(sideBarItems).toHaveLength(5); - fireEvent.click(getByLabelText(FILTER_POPOVER_OPEN_LABEL)); - - fireEvent.click(getAllByText('CSS')[1]); + fireEvent.click(getByText('CSS')); // inout has debounce effect so hence the timer act(() => { @@ -124,7 +124,7 @@ describe('WaterfallChartWrapper', () => { NETWORK_EVENTS.events.length - highlightedItemsLength ); - fireEvent.click(getByLabelText(FILTER_COLLAPSE_REQUESTS_LABEL)); + fireEvent.click(getByTestId('syntheticsWaterfallHideNonMatching')); // filter bar is still accessible even when no resources match filter expect(getByLabelText(FILTER_REQUESTS_LABEL)).toBeInTheDocument(); @@ -140,7 +140,7 @@ describe('WaterfallChartWrapper', () => { ); expect(getByText(`${mockNetworkItems[0].url}`)).toBeInTheDocument(); - expect(getByText(`1.`)).toBeInTheDocument(); + expect(getByText(`1`)).toBeInTheDocument(); expect(queryByText('Content type')).not.toBeInTheDocument(); expect(queryByText(`${mockNetworkItems[0]?.mimeType}`)).not.toBeInTheDocument(); @@ -167,35 +167,18 @@ describe('WaterfallChartWrapper', () => { }); }); - it('opens flyout on sidebar click and closes on second sidebar click', async () => { - const { getByText, getByTestId, queryByText } = render( - + it('Shows "Hide nonmatching" when search or filter is active', async () => { + const { getByText, getByTestId, queryByTestId } = render( + ); - expect(getByText(`${mockNetworkItems[0].url}`)).toBeInTheDocument(); - expect(getByText(`1.`)).toBeInTheDocument(); - expect(queryByText('Content type')).not.toBeInTheDocument(); - expect(queryByText(`${mockNetworkItems[0]?.mimeType}`)).not.toBeInTheDocument(); - - // open flyout - // selector matches both button and accessible text. Button is the second element in the array; - const sidebarButton = getByTestId(`middleTruncatedTextButton1`); - fireEvent.click(sidebarButton); - - // check for sample flyout items and that the flyout is focused - await waitFor(() => { - const waterfallFlyout = getByTestId('waterfallFlyout'); - expect(waterfallFlyout).toBeInTheDocument(); - expect(getByText('Content type')).toBeInTheDocument(); - expect(getByText(`${mockNetworkItems[0]?.mimeType}`)).toBeInTheDocument(); - }); + expect(queryByTestId('syntheticsWaterfallHideNonMatching')).not.toBeInTheDocument(); - fireEvent.click(sidebarButton); + // Toggle a filter + fireEvent.click(getByText('Image').closest('[aria-checked]')); - /* check that sample flyout items are gone from the DOM */ await waitFor(() => { - expect(queryByText('Content type')).not.toBeInTheDocument(); - expect(queryByText(`${mockNetworkItems[0]?.mimeType}`)).not.toBeInTheDocument(); + expect(getByTestId('syntheticsWaterfallHideNonMatching')).toBeInTheDocument(); }); }); }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_chart_wrapper.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_wrapper.tsx similarity index 68% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_chart_wrapper.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_wrapper.tsx index 724b06167ca3cb..cf8715c83e8755 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_chart_wrapper.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_chart_wrapper.tsx @@ -7,19 +7,19 @@ import React, { useCallback, useMemo, useState } from 'react'; import { EuiHealth } from '@elastic/eui'; -import { useTrackMetric, METRIC_TYPE } from '@kbn/observability-plugin/public'; -import { JourneyStep } from '../../../../../../../../../common/runtime_types'; -import { getSeriesAndDomain, getSidebarItems, getLegendItems } from './data_formatting'; -import { SidebarItem, LegendItem, NetworkItems } from './types'; -import { WaterfallProvider, WaterfallChart, RenderItem, useFlyout } from '../../waterfall'; -import { WaterfallFilter } from './waterfall_filter'; -import { WaterfallFlyout } from './waterfall_flyout'; +import { JourneyStep, NetworkEvent } from '../../../../../../../common/runtime_types'; +import { getSeriesAndDomain, getSidebarItems } from '../../common/network_data/data_formatting'; +import { SidebarItem, LegendItem } from '../../common/network_data/types'; +import { RenderItem, WaterfallDataEntry } from '../../common/network_data/types'; +import { useFlyout } from './waterfall_flyout/use_flyout'; +import { WaterfallFlyout } from './waterfall_flyout/waterfall_flyout'; import { WaterfallSidebarItem } from './waterfall_sidebar_item'; -import { MarkerItems } from '../../waterfall/context/waterfall_chart'; +import { MarkerItems, WaterfallProvider } from './context/waterfall_context'; +import { WaterfallChart } from './waterfall_chart'; export const renderLegendItem: RenderItem = (item) => { return ( - + {item.name} ); @@ -28,7 +28,7 @@ export const renderLegendItem: RenderItem = (item) => { interface Props { total: number; activeStep?: JourneyStep; - data: NetworkItems; + data: NetworkEvent[]; markerItems?: MarkerItems; } @@ -42,7 +42,7 @@ export const WaterfallChartWrapper: React.FC = ({ const [activeFilters, setActiveFilters] = useState([]); const [onlyHighlighted, setOnlyHighlighted] = useState(false); - const [networkData] = useState(data); + const [networkData] = useState(data); const hasFilters = activeFilters.length > 0; @@ -54,10 +54,6 @@ export const WaterfallChartWrapper: React.FC = ({ return getSidebarItems(networkData, onlyHighlighted, query, activeFilters); }, [networkData, query, activeFilters, onlyHighlighted]); - const legendItems = useMemo(() => { - return getLegendItems(); - }, []); - const { flyoutData, onBarClick, @@ -67,19 +63,6 @@ export const WaterfallChartWrapper: React.FC = ({ onFlyoutClose, } = useFlyout(metadata); - const renderFilter = useCallback(() => { - return ( - - ); - }, [activeFilters, setActiveFilters, onlyHighlighted, setOnlyHighlighted, query, setQuery]); - const renderFlyout = useCallback(() => { return ( = ({ ); }, [flyoutData, isFlyoutVisible, onFlyoutClose]); - const highestSideBarIndex = Math.max(...series.map((sr) => sr.x)); + const highestSideBarIndex = Math.max(...series.map((sr: WaterfallDataEntry) => sr.x)); const renderSidebarItem: RenderItem = useCallback( (item) => { @@ -106,14 +89,6 @@ export const WaterfallChartWrapper: React.FC = ({ [hasFilters, onlyHighlighted, onSidebarClick, highestSideBarIndex] ); - useTrackMetric({ app: 'uptime', metric: 'waterfall_chart_view', metricType: METRIC_TYPE.COUNT }); - useTrackMetric({ - app: 'uptime', - metric: 'waterfall_chart_view', - metricType: METRIC_TYPE.COUNT, - delay: 15000, - }); - return ( = ({ onSidebarClick={onSidebarClick} showOnlyHighlightedNetworkRequests={onlyHighlighted} sidebarItems={sidebarItems} - legendItems={legendItems} metadata={metadata} + activeFilters={activeFilters} + setActiveFilters={setActiveFilters} + setOnlyHighlighted={setOnlyHighlighted} + query={query} + setQuery={setQuery} renderTooltipItem={useCallback((tooltipProps) => { return {tooltipProps?.value}; }, [])} @@ -150,8 +129,6 @@ export const WaterfallChartWrapper: React.FC = ({ renderSidebarItem={renderSidebarItem} renderLegendItem={renderLegendItem} renderFlyout={renderFlyout} - renderFilter={renderFilter} - fullHeight={true} /> ); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/use_flyout.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/use_flyout.test.tsx similarity index 97% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/use_flyout.test.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/use_flyout.test.tsx index 5b388874d508e3..584d17e8736299 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/use_flyout.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/use_flyout.test.tsx @@ -7,7 +7,7 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { useFlyout } from './use_flyout'; -import { IWaterfallContext } from '../context/waterfall_chart'; +import { IWaterfallContext } from '../context/waterfall_context'; import { ProjectedValues, XYChartElementEvent } from '@elastic/charts'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/use_flyout.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/use_flyout.ts similarity index 96% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/use_flyout.ts rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/use_flyout.ts index 6e1795c4933ec6..f17b7f811a0504 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/use_flyout.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/use_flyout.ts @@ -14,7 +14,7 @@ import { XYChartElementEvent, } from '@elastic/charts'; -import { WaterfallMetadata, WaterfallMetadataEntry } from '../types'; +import { WaterfallMetadata, WaterfallMetadataEntry } from '../../../common/network_data/types'; interface OnSidebarClickParams { buttonRef?: ButtonRef; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_flyout.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/waterfall_flyout.test.tsx similarity index 96% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_flyout.test.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/waterfall_flyout.test.tsx index 278ac92bd915bc..6e91c479221705 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_flyout.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/waterfall_flyout.test.tsx @@ -13,8 +13,8 @@ import { REQUEST_HEADERS, RESPONSE_HEADERS, } from './waterfall_flyout'; -import { WaterfallMetadataEntry } from '../../waterfall/types'; -import { render } from '../../../../../../utils/testing'; +import { WaterfallMetadataEntry } from '../../../common/network_data/types'; +import { render } from '../../../../../utils/testing'; describe('WaterfallFlyout', () => { const flyoutData: WaterfallMetadataEntry = { diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_flyout.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/waterfall_flyout.tsx similarity index 90% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_flyout.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/waterfall_flyout.tsx index 4c78010e9c4e68..2091d02f499d27 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_flyout.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/waterfall_flyout.tsx @@ -7,7 +7,7 @@ import React, { useEffect, useRef } from 'react'; -import styled from 'styled-components'; +import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { EuiFlyout, @@ -19,10 +19,10 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { METRIC_TYPE, useUiTracker } from '@kbn/observability-plugin/public'; -import { Table } from '../../waterfall/components/waterfall_flyout_table'; -import { MiddleTruncatedText } from '../../waterfall'; -import { WaterfallMetadataEntry } from '../../waterfall/types'; -import { OnFlyoutClose } from '../../waterfall/components/use_flyout'; +import { Table } from './waterfall_flyout_table'; +import { MiddleTruncatedText } from '../middle_truncated_text'; +import { WaterfallMetadataEntry } from '../../../common/network_data/types'; +import { OnFlyoutClose } from './use_flyout'; export const DETAILS = i18n.translate('xpack.synthetics.synthetics.waterfall.flyout.details', { defaultMessage: 'Details', @@ -49,7 +49,7 @@ export const RESPONSE_HEADERS = i18n.translate( } ); -const FlyoutContainer = styled(EuiFlyout)` +const FlyoutContainer = euiStyled(EuiFlyout)` z-index: ${(props) => props.theme.eui.euiZLevel5}; `; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_flyout_table.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/waterfall_flyout_table.tsx similarity index 93% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_flyout_table.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/waterfall_flyout_table.tsx index 8f723eb92fd947..92714aa1481741 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_flyout_table.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_flyout/waterfall_flyout_table.tsx @@ -6,7 +6,7 @@ */ import React, { useMemo } from 'react'; -import styled from 'styled-components'; +import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { EuiText, EuiBasicTable, EuiSpacer } from '@elastic/eui'; @@ -20,7 +20,7 @@ interface Props { title: string; } -const StyledText = styled(EuiText)` +const StyledText = euiStyled(EuiText)` width: 100%; `; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/network_requests_total.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/network_requests_total.test.tsx new file mode 100644 index 00000000000000..ac77db5537ff57 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/network_requests_total.test.tsx @@ -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 React from 'react'; +import { NetworkRequestsTotal } from './network_requests_total'; +import { render } from '../../../../../utils/testing'; + +describe('NetworkRequestsTotal', () => { + it('message in case total is greater than fetched', () => { + const { getByTestId, getByText } = render( + + ); + + expect(getByText('Info')).toBeInTheDocument(); + expect(getByTestId('syntheticsWaterfallChartCountShown')).toHaveTextContent('1,000'); + expect(getByText(/of 1,100/i)).toBeInTheDocument(); + }); + + it('message in case total is equal to fetched requests', () => { + const { getByTestId, queryByText } = render( + + ); + + expect(queryByText('Info')).not.toBeInTheDocument(); + expect(getByTestId('syntheticsWaterfallChartCountShown')).toHaveTextContent('500'); + expect(queryByText(/of 500/i)).toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/network_requests_total.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/network_requests_total.tsx new file mode 100644 index 00000000000000..3c09a4c5dce210 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/network_requests_total.tsx @@ -0,0 +1,64 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { i18n } from '@kbn/i18n'; +import { EuiI18nNumber, EuiIconTip, EuiFlexGroup, EuiText } from '@elastic/eui'; + +interface Props { + totalNetworkRequests: number; + fetchedNetworkRequests: number; + highlightedNetworkRequests: number; +} + +export const NetworkRequestsTotal = ({ + totalNetworkRequests, + fetchedNetworkRequests, + highlightedNetworkRequests, +}: Props) => { + return ( + + + + + + ), + total: , + networkRequestsLabel: ( + + {i18n.translate('xpack.synthetics.waterfall.networkRequests.pluralizedCount', { + defaultMessage: '{total, plural, one {network request} other {network requests}}', + values: { + total: totalNetworkRequests, + }, + })} + + ), + }} + /> + {totalNetworkRequests > fetchedNetworkRequests && ( + + )} + + + ); +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_legend.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_legend.test.tsx new file mode 100644 index 00000000000000..8f64e0dc24eb9d --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_legend.test.tsx @@ -0,0 +1,110 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState } from 'react'; +import { fireEvent } from '@testing-library/react'; +import 'jest-canvas-mock'; +import { MIME_FILTERS, MimeType } from '../../../common/network_data/types'; +import { WaterfallLegend } from './waterfall_legend'; +import { render } from '../../../../../utils/testing'; + +describe('waterfall_legend', () => { + jest.useFakeTimers(); + const activeFilters = [MimeType.XHR]; + const setActiveFilters = jest.fn(); + const defaultProps = { + activeFilters, + setActiveFilters, + }; + + beforeEach(() => { + jest.resetAllMocks(); + }); + + afterAll(() => { + jest.clearAllMocks(); + }); + + it('renders correctly', () => { + const { getByText } = render(); + + MIME_FILTERS.forEach((filter) => { + expect(getByText(filter.label)); + }); + }); + + it('filter icon changes state/appearance on active/inactive filters', () => { + const Component = () => { + const [activeFiltersTest, setActiveFiltersTest] = useState([]); + + return ( + + ); + }; + const { getByText, queryByText } = render(); + + expect(getByText('Select an item to apply filter')); + + const xhrFilterItem = getByText('XHR').closest('[aria-checked]'); + const imageFilterItem = getByText('Image').closest('[aria-checked]'); + fireEvent.click(imageFilterItem); + + expect(imageFilterItem.getAttribute('aria-checked')).toBe('true'); + + // toggle filters + fireEvent.click(xhrFilterItem); + fireEvent.click(imageFilterItem); + + expect(imageFilterItem.getAttribute('aria-checked')).toBe('false'); + + expect(queryByText('Select an item to apply filter')).toBeNull(); + }); + + it('resets all filters on clear filters', () => { + const Component = () => { + const [activeFiltersTest, setActiveFiltersTest] = useState([]); + + return ( + + ); + }; + const { getByText, queryByText, getAllByRole } = render(); + + expect(getByText('Select an item to apply filter')); + + // "Clear filters" should only appear when at least one filter in set + expect(queryByText('Clear filters')).toBeNull(); + + const imageFilterItem = getByText('Image').closest('[aria-checked]'); + fireEvent.click(imageFilterItem); + + // Ensure at least one filter is selected + expect( + getAllByRole('checkbox').some((filter: HTMLDivElement) => filter.getAttribute('aria-checked')) + ).toBeTruthy(); + + expect(getByText('Clear filters')); + + expect(imageFilterItem.getAttribute('aria-checked')).toBe('true'); + + // Clear all filters + fireEvent.click(getByText('Clear filters')); + + // All filters should be checked because no filter means all filters are active + expect( + getAllByRole('checkbox').every((filter: HTMLDivElement) => + filter.getAttribute('aria-checked') + ) + ).toBeTruthy(); + }); +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_legend.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_legend.tsx new file mode 100644 index 00000000000000..2eae65a44ff5fa --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_legend.tsx @@ -0,0 +1,169 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { Dispatch, SetStateAction, useState, useCallback, MouseEventHandler } from 'react'; +import { i18n } from '@kbn/i18n'; +import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import { EuiIcon, EuiText, EuiFlexGroup, EuiButtonEmpty, useEuiTheme } from '@elastic/eui'; + +import { + FriendlyTimingLabels, + MIME_FILTERS, + MimeType, + Timings, +} from '../../../common/network_data/types'; +import { colourPalette } from '../../../common/network_data/data_formatting'; + +interface Props { + activeFilters: string[]; + setActiveFilters: Dispatch>; +} + +export const WaterfallLegend = ({ activeFilters, setActiveFilters }: Props) => { + const { euiTheme } = useEuiTheme(); + + const addOrRemoveFilter = useCallback( + (filter: MimeType) => { + setActiveFilters((filters) => { + const updated = filters.includes(filter) + ? filters.filter((f) => f !== filter) + : [...filters, filter]; + return updated.length === MIME_FILTERS.length ? [] : updated; + }); + }, + [setActiveFilters] + ); + + const clearFilters = useCallback(() => { + setActiveFilters([]); + }, [setActiveFilters]); + + const anyFilterApplied = activeFilters.length > 0; + + return ( + <> + + + +

{LEGEND_LABEL}

+
+ {!anyFilterApplied ? ( + + {APPLY_FILTER_LABEL} + + ) : null} + + {anyFilterApplied ? ( + + {CLEAR_FILTER_LABEL} + + ) : null} +
+ + + {MIME_FILTERS.map((f) => ( + + ))} + + +
+ + + {Object.values(Timings) + .filter((t) => t !== Timings.Receive) + .map((t) => ( + + ))} + + + ); +}; + +const LEGEND_LABEL = i18n.translate('xpack.synthetics.waterfall.chartLegend.heading', { + defaultMessage: 'Legend', +}); + +function LegendItem({ + id, + color, + label, + boxSize = 12, + isClickable = false, + isActive = false, + onClick, +}: { + id: T; + color: string; + label: string; + boxSize?: number; + isActive?: boolean; + isClickable?: boolean; + onClick?: (id: T) => void; +}) { + const [isHovered, setIsHovered] = useState(false); + const onMouseEvent: MouseEventHandler = useCallback((evt) => { + setIsHovered(evt?.type === 'mouseenter'); + }, []); + + const isBoxFilled = !isClickable || isActive || isHovered; + const title = isClickable ? CLICK_FILTER_LABEL : undefined; + const ariaLabel = `${label}${isClickable ? ` - ${title}` : ''}`; + + return ( + { + onClick?.(id); + }} + > + + + {label} + + ); +} + +const EuiFlexGroupLegendItem = euiStyled(EuiFlexGroup)` + flex-grow: 0; + flex-shrink: 0; + &:active { + ${({ role }) => (role === 'checkbox' ? 'text-decoration: underline;' : '')} + } +`; + +const APPLY_FILTER_LABEL = i18n.translate('xpack.synthetics.waterfall.applyFilters.label', { + defaultMessage: 'Select an item to apply filter', +}); + +const CLICK_FILTER_LABEL = i18n.translate('xpack.synthetics.waterfall.applyFilters.message', { + defaultMessage: 'Click to add or remove filter', +}); + +const CLEAR_FILTER_LABEL = i18n.translate('xpack.synthetics.waterfall.clearFilters.label', { + defaultMessage: 'Clear filters', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_search.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_search.test.tsx new file mode 100644 index 00000000000000..15629a6df825c8 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_search.test.tsx @@ -0,0 +1,58 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { act, fireEvent } from '@testing-library/react'; +import 'jest-canvas-mock'; +import { WaterfallSearch } from './waterfall_search'; +import { FILTER_REQUESTS_LABEL } from '../translations'; +import { render } from '../../../../../utils/testing'; + +describe('waterfall filter', () => { + jest.useFakeTimers(); + const query = ''; + const setQuery = jest.fn(); + const defaultProps = { + query, + setQuery, + totalNetworkRequests: 10, + highlightedNetworkRequests: 5, + fetchedNetworkRequests: 10, + }; + + beforeEach(() => { + jest.resetAllMocks(); + }); + + afterAll(() => { + jest.clearAllMocks(); + }); + + it('renders correctly', () => { + const { getByText } = render(); + + expect(getByText('Network Requests')); + }); + + it('search input is working properly', () => { + const Component = () => { + return ; + }; + const { getByLabelText } = render(); + + const testText = 'js'; + + fireEvent.change(getByLabelText(FILTER_REQUESTS_LABEL), { target: { value: testText } }); + + // input has debounce effect so hence the timer + act(() => { + jest.advanceTimersByTime(300); + }); + + expect(setQuery).toHaveBeenCalledWith(testText); + }); +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_search.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_search.tsx new file mode 100644 index 00000000000000..c72b15229aa689 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_search.tsx @@ -0,0 +1,86 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useEffect, useState } from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiFieldSearch, EuiFlexGroup, EuiText, useEuiTheme } from '@elastic/eui'; +import useDebounce from 'react-use/lib/useDebounce'; +import { METRIC_TYPE, useUiTracker } from '@kbn/observability-plugin/public'; +import { FILTER_REQUESTS_LABEL, SEARCH_REQUESTS_LABEL } from '../translations'; +import { NetworkRequestsTotal } from './network_requests_total'; + +interface Props { + query: string; + setQuery: (val: string) => void; + totalNetworkRequests: number; + highlightedNetworkRequests: number; + fetchedNetworkRequests: number; +} + +export const WaterfallSearch = ({ + query, + setQuery, + totalNetworkRequests, + highlightedNetworkRequests, + fetchedNetworkRequests, +}: Props) => { + const trackMetric = useUiTracker({ app: 'uptime' }); + + const [value, setValue] = useState(query); + const { euiTheme } = useEuiTheme(); + + useDebounce( + () => { + setQuery(value); + }, + 300, + [value] + ); + + // indicates use of the query input box + useEffect(() => { + if (query) { + trackMetric({ metric: 'waterfall_filter_input_changed', metricType: METRIC_TYPE.CLICK }); + } + }, [query, trackMetric]); + + return ( + + +

{NETWORK_REQUESTS_LABEL}

+
+ + { + setValue(evt.target.value); + }} + value={value} + /> + + +
+ ); +}; + +const NETWORK_REQUESTS_LABEL = i18n.translate( + 'xpack.synthetics.waterfall.networkRequests.heading', + { + defaultMessage: 'Network Requests', + } +); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_tick_axis.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_tick_axis.test.tsx new file mode 100644 index 00000000000000..e3984ba6052c88 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_tick_axis.test.tsx @@ -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 React from 'react'; +import { fireEvent, waitFor } from '@testing-library/react'; + +import { render } from '../../../../../utils/testing'; +import { WaterfallTickAxis } from './waterfall_tick_axis'; + +describe('WaterfallChartWrapper', () => { + const setOnlyHighlightedMock = jest.fn(); + const defaultProps = { + showOnlyHighlightedNetworkRequests: false, + setOnlyHighlighted: setOnlyHighlightedMock, + highlightedNetworkRequests: 10, + fetchedNetworkRequests: 20, + shouldRenderSidebar: true, + barStyleAccessor: ({ datum }: { datum: { config: { colour: string } } }) => ({ + rect: { + fill: datum.config?.colour, + opacity: 0.1, + }, + }), + domain: { min: 0, max: 1 }, + tickFormat: (d: number) => `${Number(d).toFixed(0)} ms`, + }; + + it('renders correctly', () => { + const { getByTestId } = render(); + + expect(getByTestId('syntheticsWaterfallHideNonMatching')).toBeInTheDocument(); + }); + + it('updates "Hide nonmatching" status', () => { + const { getByTestId } = render(); + + fireEvent.click(getByTestId('syntheticsWaterfallHideNonMatching')); + expect(setOnlyHighlightedMock).toHaveBeenCalledWith(true); + + fireEvent.click(getByTestId('syntheticsWaterfallHideNonMatching')); + + waitFor(() => { + expect(setOnlyHighlightedMock).toHaveBeenCalledWith(false); + }); + }); +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_tick_axis.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_tick_axis.tsx new file mode 100644 index 00000000000000..4c57eb3f4f9bb6 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_header/waterfall_tick_axis.tsx @@ -0,0 +1,98 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { BarStyleAccessor, DomainRange, TickFormatter } from '@elastic/charts'; +import { EuiFlexGroup, EuiFlexItem, EuiSwitch, EuiText, useEuiTheme } from '@elastic/eui'; + +import { MAIN_GROW_SIZE, SIDEBAR_GROW_SIZE } from '../constants'; +import { WaterfallChartSidebarWrapper, WaterfallChartTimeTicksContainer } from '../styles'; +import { WaterfallChartFixedAxis } from '../waterfall_chart_fixed_axis'; + +interface Props { + showOnlyHighlightedNetworkRequests: boolean; + setOnlyHighlighted: (val: boolean) => void; + highlightedNetworkRequests: number; + fetchedNetworkRequests: number; + shouldRenderSidebar: boolean; + barStyleAccessor: BarStyleAccessor; + domain: DomainRange; + tickFormat: TickFormatter; +} + +export const WaterfallTickAxis = ({ + showOnlyHighlightedNetworkRequests, + setOnlyHighlighted, + highlightedNetworkRequests, + fetchedNetworkRequests, + shouldRenderSidebar, + barStyleAccessor, + domain, + tickFormat, +}: Props) => { + const { euiTheme } = useEuiTheme(); + + return ( + + + + + {shouldRenderSidebar && ( + + {highlightedNetworkRequests < fetchedNetworkRequests ? ( + + + + } + checked={showOnlyHighlightedNetworkRequests} + onChange={(e) => { + setOnlyHighlighted(e.target.checked); + }} + /> + ) : null} + + )} + + + + + + + + ); +}; + +const FILTER_COLLAPSE_REQUESTS_LABEL = i18n.translate( + 'xpack.synthetics.pingList.synthetics.waterfall.filters.collapseRequestsLabel', + { + defaultMessage: 'Collapse to only show matching requests', + } +); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_icon.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_icon.test.tsx similarity index 96% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_icon.test.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_icon.test.tsx index 222f152c01b1b9..3ebbb2b1c6b57a 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_icon.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_icon.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { fireEvent, waitFor } from '@testing-library/dom'; import { WaterfallMarkerIcon } from './waterfall_marker_icon'; import { TestWrapper } from './waterfall_marker_test_helper'; -import { render } from '../../../../../../utils/testing'; +import { render } from '../../../../../utils/testing'; describe('', () => { it('renders a dot icon when `field` is an empty string', () => { diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_icon.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_icon.tsx similarity index 86% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_icon.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_icon.tsx index 675224bfa8f79a..99a677e50d79a6 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_icon.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_icon.tsx @@ -7,11 +7,12 @@ import React, { useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { EuiButtonIcon, EuiIcon, EuiPopover } from '@elastic/eui'; +import { EuiButtonIcon, EuiIcon, EuiPopover, useEuiTheme } from '@elastic/eui'; import { WaterfallMarkerTrend } from './waterfall_marker_trend'; export function WaterfallMarkerIcon({ field, label }: { field: string; label: string }) { const [isOpen, setIsOpen] = useState(false); + const { euiTheme } = useEuiTheme(); if (!field) { return ( @@ -20,7 +21,7 @@ export function WaterfallMarkerIcon({ field, label }: { field: string; label: st defaultMessage: 'An icon indicating that this marker has no field associated with it', })} type="dot" - size="l" + size="m" /> ); } @@ -32,8 +33,10 @@ export function WaterfallMarkerIcon({ field, label }: { field: string; label: st anchorPosition="downLeft" panelStyle={{ paddingBottom: 0, paddingLeft: 4 }} zIndex={100} + css={{ top: 4 }} button={ setIsOpen((prevState) => !prevState)} /> } diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_test_helper.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_test_helper.tsx similarity index 90% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_test_helper.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_test_helper.tsx index ce033b6f2ef2b9..65df8f8e5a69f1 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_test_helper.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_test_helper.tsx @@ -6,9 +6,9 @@ */ import React from 'react'; -import { SyntheticsStartupPluginsContext } from '../../../../../../contexts'; -import { JourneyStep } from '../../../../../../../../../common/runtime_types'; -import { WaterfallContext } from '../context/waterfall_chart'; +import { SyntheticsStartupPluginsContext } from '../../../../../contexts'; +import { JourneyStep } from '../../../../../../../../common/runtime_types'; +import { WaterfallContext } from '../context/waterfall_context'; const EmbeddableMock = ({ title, diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_trend.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_trend.test.tsx similarity index 96% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_trend.test.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_trend.test.tsx index f75b25b056e0d7..b44dd47c8023b2 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_trend.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_trend.test.tsx @@ -9,8 +9,8 @@ import React from 'react'; import { WaterfallMarkerTrend } from './waterfall_marker_trend'; import moment from 'moment'; import { TestWrapper } from './waterfall_marker_test_helper'; -import { render } from '../../../../../../utils/testing'; -import { JourneyStep } from '../../../../../../../../../common/runtime_types'; +import { render } from '../../../../../utils/testing'; +import { JourneyStep } from '../../../../../../../../common/runtime_types'; describe('', () => { const mockDiff = jest.fn(); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_trend.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_trend.tsx similarity index 77% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_trend.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_trend.tsx index 5ab0196701083a..5d05a8ce31fcc9 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_marker_trend.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_trend.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import { StepFieldTrend } from '../../../../../common/step_field_trend/step_field_trend'; -import { useWaterfallContext } from '../context/waterfall_chart'; +import { StepFieldTrend } from '../../../../common/step_field_trend/step_field_trend'; +import { useWaterfallContext } from '../context/waterfall_context'; export function WaterfallMarkerTrend({ title, field }: { title: string; field: string }) { const { activeStep } = useWaterfallContext(); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_markers.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_markers.tsx similarity index 71% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_markers.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_markers.tsx index 1a8e5dd1d51b47..e2337746cbcd07 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_markers.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_markers.tsx @@ -10,8 +10,8 @@ import { AnnotationDomainType, LineAnnotation } from '@elastic/charts'; import { i18n } from '@kbn/i18n'; import { useTheme } from '@kbn/observability-plugin/public'; import { euiStyled } from '@kbn/kibana-react-plugin/common'; -import { useWaterfallContext } from '..'; -import { MarkerItems } from '../context/waterfall_chart'; + +import { MarkerItems, useWaterfallContext } from '../context/waterfall_context'; import { WaterfallMarkerIcon } from './waterfall_marker_icon'; export const FIELD_SYNTHETICS_LCP = 'browser.experience.lcp.us'; @@ -21,9 +21,8 @@ export const FIELD_SYNTHETICS_DCL = 'browser.experience.dcl.us'; export const LAYOUT_SHIFT = 'layoutShift'; export function WaterfallChartMarkers() { - const { markerItems } = useWaterfallContext(); - const theme = useTheme(); + const { markerItems } = useWaterfallContext(); const markerItemsByOffset = useMemo( () => @@ -35,16 +34,36 @@ export function WaterfallChartMarkers() { ); const annotations = useMemo(() => { - return Array.from(markerItemsByOffset.entries()).map(([offset, items]) => { - let uniqueIds = (items ?? []) + let lastOffset: number; + const recognizedMarkerItemsByOffset = Array.from(markerItemsByOffset.entries()).reduce( + (acc, [offset, items]) => { + // Remove unrecognized marks e.g. custom marks + const vitalMarkers = items.filter(({ id }) => getMarkersInfo(id, theme) !== undefined); + + const hasMultipleMarksAtOffset = vitalMarkers.some(({ id }) => id !== LAYOUT_SHIFT); + const isLastOffsetTooClose = lastOffset && Math.abs(offset - lastOffset) < 100; // 100ms + + // If offsets coincide or are too close, remove less important marks e.g. Layout Shift + const filteredItems = + hasMultipleMarksAtOffset || isLastOffsetTooClose + ? vitalMarkers.filter(({ id }) => id !== LAYOUT_SHIFT) + : vitalMarkers; + + if (filteredItems.length) { + acc.set(offset, filteredItems); + } + + lastOffset = offset; + return acc; + }, + new Map() + ); + + return Array.from(recognizedMarkerItemsByOffset.entries()).map(([offset, items]) => { + const uniqueIds = (items ?? []) .map(({ id }) => id) .filter((id, index, arr) => arr.indexOf(id) === index); - // Omit coinciding layoutShift's with other vital marks - if (uniqueIds.length > 1) { - uniqueIds = uniqueIds.filter((id) => id !== LAYOUT_SHIFT); - } - const label = uniqueIds.map((id) => getMarkersInfo(id, theme)?.label ?? id).join(' / '); const id = uniqueIds[0]; const markersInfo = getMarkersInfo(id, theme); @@ -56,6 +75,7 @@ export function WaterfallChartMarkers() { field: markersInfo?.field ?? '', color: markersInfo?.color ?? theme.eui.euiColorMediumShade, strokeWidth: markersInfo?.strokeWidth ?? 1, + dash: markersInfo?.dash, }; }); }, [markerItemsByOffset, theme]); @@ -66,7 +86,7 @@ export function WaterfallChartMarkers() { return ( - {annotations.map(({ id, offset, label, field, color, strokeWidth }) => { + {annotations.map(({ id, offset, label, field, color, strokeWidth, dash }) => { const key = `${id}-${offset}`; return ( @@ -90,8 +110,10 @@ export function WaterfallChartMarkers() { strokeWidth, stroke: color, opacity: 1, + dash, }, }} + zIndex={theme.eui.euiZLevel0} /> ); })} @@ -104,37 +126,42 @@ function getMarkersInfo(id: string, theme: ReturnType) { case 'domContentLoaded': return { label: DOCUMENT_CONTENT_LOADED_LABEL, - color: theme.eui.euiColorVis0, + color: theme.eui.euiColorMediumShade, field: FIELD_SYNTHETICS_DCL, - strokeWidth: 2, + strokeWidth: 1, + dash: undefined, }; case 'firstContentfulPaint': return { label: FCP_LABEL, - color: theme.eui.euiColorVis1, + color: theme.eui.euiColorMediumShade, field: FIELD_SYNTHETICS_FCP, - strokeWidth: 2, + strokeWidth: 1, + dash: undefined, }; case 'largestContentfulPaint': return { label: LCP_LABEL, - color: theme.eui.euiColorVis2, + color: theme.eui.euiColorMediumShade, field: FIELD_SYNTHETICS_LCP, - strokeWidth: 2, + strokeWidth: 1, + dash: undefined, }; case 'layoutShift': return { label: LAYOUT_SHIFT_LABEL, - color: theme.eui.euiColorVis6, + color: theme.eui.euiColorMediumShade, field: '', strokeWidth: 1, + dash: [5, 5], }; case 'loadEvent': return { label: LOAD_EVENT_LABEL, - color: theme.eui.euiColorVis9, + color: theme.eui.euiColorMediumShade, field: FIELD_SYNTHETICS_DOCUMENT_ONLOAD, - strokeWidth: 2, + strokeWidth: 1, + dash: undefined, }; } diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_sidebar_item.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_sidebar_item.test.tsx similarity index 86% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_sidebar_item.test.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_sidebar_item.test.tsx index c9fbcd22442521..786978e3647a73 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_sidebar_item.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_sidebar_item.test.tsx @@ -9,11 +9,11 @@ import React from 'react'; import 'jest-canvas-mock'; import { fireEvent } from '@testing-library/react'; -import { SidebarItem } from './types'; +import { SidebarItem } from '../../common/network_data/types'; import { WaterfallSidebarItem } from './waterfall_sidebar_item'; -import { SIDEBAR_FILTER_MATCHES_SCREENREADER_LABEL } from '../../waterfall/components/translations'; -import { getChunks } from '../../waterfall/components/middle_truncated_text'; -import { render } from '../../../../../../utils/testing'; +import { SIDEBAR_FILTER_MATCHES_SCREENREADER_LABEL } from './translations'; +import { getChunks } from './middle_truncated_text'; +import { render } from '../../../../utils/testing'; describe('waterfall filter', () => { const url = 'http://www.elastic.co/observability/uptime'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_sidebar_item.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_sidebar_item.tsx similarity index 88% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_sidebar_item.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_sidebar_item.tsx index 193fe331216365..cff7853b2bcd6a 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/step_detail/waterfall/waterfall_sidebar_item.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_sidebar_item.tsx @@ -7,11 +7,11 @@ import React, { RefObject, useMemo, useCallback, useState } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiBadge } from '@elastic/eui'; -import { SidebarItem } from './types'; -import { MiddleTruncatedText } from '../../waterfall'; -import { SideBarItemHighlighter } from '../../waterfall/components/styles'; -import { SIDEBAR_FILTER_MATCHES_SCREENREADER_LABEL } from '../../waterfall/components/translations'; -import { OnSidebarClick } from '../../waterfall/components/use_flyout'; +import { SidebarItem } from '../../common/network_data/types'; +import { MiddleTruncatedText } from './middle_truncated_text'; +import { SideBarItemHighlighter } from './styles'; +import { SIDEBAR_FILTER_MATCHES_SCREENREADER_LABEL } from './translations'; +import { OnSidebarClick } from './waterfall_flyout/use_flyout'; interface SidebarItemProps { item: SidebarItem; @@ -54,7 +54,7 @@ export const WaterfallSidebarItem = ({ return ( {!status || !isErrorStatusCode(status) ? ( diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_tooltip_content.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_tooltip_content.test.tsx similarity index 95% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_tooltip_content.test.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_tooltip_content.test.tsx index 0df81cca48df3f..9cd85c0b32281f 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_tooltip_content.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_tooltip_content.test.tsx @@ -7,9 +7,9 @@ import React from 'react'; import { WaterfallTooltipContent } from './waterfall_tooltip_content'; -import { render } from '../../../../../../utils/testing'; +import { render } from '../../../../utils/testing'; -jest.mock('../context/waterfall_chart', () => ({ +jest.mock('./context/waterfall_context', () => ({ useWaterfallContext: jest.fn().mockReturnValue({ data: [ { diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_tooltip_content.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_tooltip_content.tsx similarity index 95% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_tooltip_content.tsx rename to x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_tooltip_content.tsx index b9f385c29b9f8c..23ad238a718640 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/components/network_waterfall/waterfall/components/waterfall_tooltip_content.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_tooltip_content.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule, EuiText } from '@elastic/eui'; import { euiStyled } from '@kbn/kibana-react-plugin/common'; -import { useWaterfallContext } from '../context/waterfall_chart'; +import { useWaterfallContext } from './context/waterfall_context'; interface Props { text: string; From e955ddd33cde7b91a524764d2d8eefbd981c30f2 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Thu, 5 Jan 2023 08:57:55 +0100 Subject: [PATCH 07/36] [Discover] Fix flaky "Visualize text-based queries" test (#148400) Closes https://github.com/elastic/kibana/issues/148225 100x https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1701 --- .../functional/apps/discover/visualize_field.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/x-pack/test/functional/apps/discover/visualize_field.ts b/x-pack/test/functional/apps/discover/visualize_field.ts index 0abd41d94976c8..e90d777d2dd9e4 100644 --- a/x-pack/test/functional/apps/discover/visualize_field.ts +++ b/x-pack/test/functional/apps/discover/visualize_field.ts @@ -141,10 +141,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await testSubjects.click('textBased-visualize'); - await retry.try(async () => { + await PageObjects.header.waitUntilLoadingHasFinished(); + + await retry.waitFor('lens visualization', async () => { const dimensions = await testSubjects.findAll('lns-dimensionTrigger-textBased'); - expect(dimensions).to.have.length(2); - expect(await dimensions[1].getVisibleText()).to.be('average'); + return dimensions.length === 2 && (await dimensions[1].getVisibleText()) === 'average'; }); }); @@ -159,10 +160,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await testSubjects.click('textBased-visualize'); - await retry.try(async () => { + await PageObjects.header.waitUntilLoadingHasFinished(); + + await retry.waitFor('lens visualization', async () => { const dimensions = await testSubjects.findAll('lns-dimensionTrigger-textBased'); - expect(dimensions).to.have.length(2); - expect(await dimensions[1].getVisibleText()).to.be('average'); + return dimensions.length === 2 && (await dimensions[1].getVisibleText()) === 'average'; }); }); }); From 84693f6f312449327e86abfc5b1dc20871507da9 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Thu, 5 Jan 2023 08:58:47 +0100 Subject: [PATCH 08/36] [Discover] Support case-insensitive search in Document Viewer (#148312) Closes https://github.com/elastic/kibana/issues/147087 ## Summary This PR: - adds support for case-insensitive search - adds search highlights - fixes the tooltip when a field has a custom label Screenshot 2023-01-03 at 17 09 20 --- .../__snapshots__/field_name.test.tsx.snap | 73 +++++++++++++++++++ .../components/field_name/field_name.test.tsx | 53 +++++++++----- .../components/field_name/field_name.tsx | 6 +- .../components/doc_viewer_table/table.tsx | 15 ++-- 4 files changed, 122 insertions(+), 25 deletions(-) diff --git a/src/plugins/discover/public/components/field_name/__snapshots__/field_name.test.tsx.snap b/src/plugins/discover/public/components/field_name/__snapshots__/field_name.test.tsx.snap index b26160d9d33bc8..21777f772c9a5e 100644 --- a/src/plugins/discover/public/components/field_name/__snapshots__/field_name.test.tsx.snap +++ b/src/plugins/discover/public/components/field_name/__snapshots__/field_name.test.tsx.snap @@ -135,3 +135,76 @@ Array [ , ] `; + +exports[`FieldName renders when mapping is provided 1`] = ` +Array [ +
+ + + Number field + + +
, +
+
+ + + bytes + + +
+
, +] +`; + +exports[`FieldName renders with a search highlight 1`] = ` +Array [ +
+ + + Number field + + +
, +
+
+ + + + te + + st.test.test + + +
+
, +] +`; diff --git a/src/plugins/discover/public/components/field_name/field_name.test.tsx b/src/plugins/discover/public/components/field_name/field_name.test.tsx index d2f961392c43c6..929ec2add2acc2 100644 --- a/src/plugins/discover/public/components/field_name/field_name.test.tsx +++ b/src/plugins/discover/public/components/field_name/field_name.test.tsx @@ -8,26 +8,45 @@ import React from 'react'; import { render } from 'enzyme'; +import { stubLogstashDataView as dataView } from '@kbn/data-plugin/common/stubs'; import { FieldName } from './field_name'; -// Note that it currently provides just 2 basic tests, there should be more, but -// the components involved will soon change -test('FieldName renders a string field by providing fieldType and fieldName', () => { - const component = render(); - expect(component).toMatchSnapshot(); -}); +describe('FieldName', function () { + test('renders a string field by providing fieldType and fieldName', () => { + const component = render(); + expect(component).toMatchSnapshot(); + }); -test('FieldName renders a number field by providing a field record', () => { - const component = render(); - expect(component).toMatchSnapshot(); -}); + test('renders a number field by providing a field record', () => { + const component = render(); + expect(component).toMatchSnapshot(); + }); -test('FieldName renders a geo field', () => { - const component = render(); - expect(component).toMatchSnapshot(); -}); + test('renders a geo field', () => { + const component = render(); + expect(component).toMatchSnapshot(); + }); + + test('renders unknown field', () => { + const component = render(); + expect(component).toMatchSnapshot(); + }); + + test('renders with a search highlight', () => { + const component = render( + + ); + expect(component).toMatchSnapshot(); + }); -test('FieldName renders unknown field', () => { - const component = render(); - expect(component).toMatchSnapshot(); + test('renders when mapping is provided', () => { + const component = render( + + ); + expect(component).toMatchSnapshot(); + }); }); diff --git a/src/plugins/discover/public/components/field_name/field_name.tsx b/src/plugins/discover/public/components/field_name/field_name.tsx index 3de9bd129fa359..ca386d344e42ff 100644 --- a/src/plugins/discover/public/components/field_name/field_name.tsx +++ b/src/plugins/discover/public/components/field_name/field_name.tsx @@ -8,7 +8,7 @@ import React, { Fragment } from 'react'; import './field_name.scss'; -import { EuiBadge, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; +import { EuiBadge, EuiFlexGroup, EuiFlexItem, EuiToolTip, EuiHighlight } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { FieldIcon, FieldIconProps } from '@kbn/react-field'; @@ -22,6 +22,7 @@ interface Props { fieldMapping?: DataViewField; fieldIconProps?: Omit; scripted?: boolean; + highlight?: string; } export function FieldName({ @@ -30,6 +31,7 @@ export function FieldName({ fieldType, fieldIconProps, scripted = false, + highlight = '', }: Props) { const typeName = getFieldTypeName(fieldType); const displayName = @@ -52,7 +54,7 @@ export function FieldName({ delay="long" anchorClassName="eui-textBreakAll" > - {displayName} + {displayName} diff --git a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.tsx b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.tsx index 2a7b90a9feb527..0eab3a68c8218e 100644 --- a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.tsx +++ b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.tsx @@ -241,7 +241,7 @@ export const DocViewerTable = ({ } else { const fieldMapping = mapping(curFieldName); const displayName = fieldMapping?.displayName ?? curFieldName; - if (displayName.includes(searchText)) { + if (displayName.toLowerCase().includes(searchText.toLowerCase())) { // filter only unpinned fields acc.restItems.push(fieldToItem(curFieldName)); } @@ -273,6 +273,7 @@ export const DocViewerTable = ({ const headers = [ !isSingleDocView && ( ), - + , - + @@ -305,10 +306,11 @@ export const DocViewerTable = ({ const renderRows = useCallback( (items: FieldRecord[]) => { + const highlight = searchText?.toLowerCase(); return items.map( ({ action: { flattenedField, onFilter }, - field: { field, fieldMapping, displayName, fieldType, scripted, pinned }, + field: { field, fieldMapping, fieldType, scripted, pinned }, value: { formattedValue, ignored }, }: FieldRecord) => { return ( @@ -344,10 +346,11 @@ export const DocViewerTable = ({ mobileOptions={MOBILE_OPTIONS} > Date: Thu, 5 Jan 2023 09:51:38 +0100 Subject: [PATCH 09/36] [AO] Sync Alert Summary Widget time range with Alert search bar (#148383) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves #147971 ## 📝 Summary Sync Alert Summary Widget time range with Alert search bar. ![image](https://user-images.githubusercontent.com/12370520/210566612-6e557dc6-c46a-4b1a-a83d-c3f13601445c.png) ## 🧪 How to test - Check the Alert Summary Widget on the rule details page, by clicking on the active/recovered, you should be able to see the absolute time for the last 30 days in the alert search bar and the number of alerts in the table should match the number in the widget. --- .../helpers/get_alert_summary_time_range.test.tsx | 4 ++-- .../helpers/get_alert_summary_time_range.tsx | 2 +- .../public/pages/rule_details/helpers/index.ts | 2 +- .../public/pages/rule_details/index.tsx | 14 ++++++++++---- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.test.tsx b/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.test.tsx index c8214d8d310bf3..9c437f5f5da64e 100644 --- a/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.test.tsx +++ b/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.test.tsx @@ -6,11 +6,11 @@ */ import moment from 'moment'; -import { getDefaultAlertSummaryTimeRange } from '.'; +import { getAlertSummaryWidgetTimeRange } from '.'; describe('getDefaultAlertSummaryTimeRange', () => { it('should return default time in UTC format', () => { - const defaultTimeRange = getDefaultAlertSummaryTimeRange(); + const defaultTimeRange = getAlertSummaryWidgetTimeRange(); const utcFormat = 'YYYY-MM-DDTHH:mm:ss.SSSZ'; expect(moment(defaultTimeRange.utcFrom, utcFormat, true).isValid()).toBeTruthy(); 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 dea999736fdfdf..973bfc628ea60f 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 @@ -10,7 +10,7 @@ import React from 'react'; import { getAbsoluteTimeRange } from '@kbn/data-plugin/common'; import { FormattedMessage } from '@kbn/i18n-react'; -export const getDefaultAlertSummaryTimeRange = (): AlertSummaryTimeRange => { +export const getAlertSummaryWidgetTimeRange = (): AlertSummaryTimeRange => { const { to, from } = getAbsoluteTimeRange({ from: 'now-30d', to: 'now', diff --git a/x-pack/plugins/observability/public/pages/rule_details/helpers/index.ts b/x-pack/plugins/observability/public/pages/rule_details/helpers/index.ts index 711c088601a99f..e93f2f4cc5ee0f 100644 --- a/x-pack/plugins/observability/public/pages/rule_details/helpers/index.ts +++ b/x-pack/plugins/observability/public/pages/rule_details/helpers/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { getDefaultAlertSummaryTimeRange } from './get_alert_summary_time_range'; +export { getAlertSummaryWidgetTimeRange } from './get_alert_summary_time_range'; diff --git a/x-pack/plugins/observability/public/pages/rule_details/index.tsx b/x-pack/plugins/observability/public/pages/rule_details/index.tsx index 7201e3882667c6..420757b7b50bdf 100644 --- a/x-pack/plugins/observability/public/pages/rule_details/index.tsx +++ b/x-pack/plugins/observability/public/pages/rule_details/index.tsx @@ -42,7 +42,7 @@ import { fromQuery, toQuery } from '../../utils/url'; import { ObservabilityAlertSearchbarWithUrlSync } from '../../components/shared/alert_search_bar'; import { DeleteModalConfirmation } from './components/delete_modal_confirmation'; import { CenterJustifiedSpinner } from './components/center_justified_spinner'; -import { getDefaultAlertSummaryTimeRange } from './helpers'; +import { getAlertSummaryWidgetTimeRange } from './helpers'; import { EXECUTION_TAB, @@ -111,7 +111,9 @@ export function RuleDetailsPage() { const [editFlyoutVisible, setEditFlyoutVisible] = useState(false); const [isRuleEditPopoverOpen, setIsRuleEditPopoverOpen] = useState(false); const [esQuery, setEsQuery] = useState<{ bool: BoolQuery }>(); - const [defaultAlertTimeRange] = useState(getDefaultAlertSummaryTimeRange); + const [alertSummaryWidgetTimeRange, setAlertSummaryWidgetTimeRange] = useState( + getAlertSummaryWidgetTimeRange + ); const ruleQuery = useRef([ { query: `kibana.alert.rule.uuid: ${ruleId}`, language: 'kuery' }, ]); @@ -123,11 +125,15 @@ export function RuleDetailsPage() { const tabsRef = useRef(null); const onAlertSummaryWidgetClick = async (status: AlertStatus = ALERT_STATUS_ALL) => { + const timeRange = getAlertSummaryWidgetTimeRange(); + setAlertSummaryWidgetTimeRange(timeRange); await locators.get(ruleDetailsLocatorID)?.navigate( { + rangeFrom: timeRange.utcFrom, + rangeTo: timeRange.utcTo, ruleId, - tabId: ALERTS_TAB, status, + tabId: ALERTS_TAB, }, { replace: true, @@ -386,7 +392,7 @@ export function RuleDetailsPage() { From 9a0e692eb8ce98646cf3e3ff4f982eb7a2762657 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Thu, 5 Jan 2023 10:30:31 +0100 Subject: [PATCH 10/36] [Discover] Unskip sidebar tests (#148295) Closes https://github.com/elastic/kibana/issues/147687 100x https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1682 --- test/functional/apps/discover/group1/_sidebar.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/apps/discover/group1/_sidebar.ts b/test/functional/apps/discover/group1/_sidebar.ts index 09190a0a397022..66c60d22b4d3fe 100644 --- a/test/functional/apps/discover/group1/_sidebar.ts +++ b/test/functional/apps/discover/group1/_sidebar.ts @@ -26,8 +26,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const filterBar = getService('filterBar'); const fieldEditor = getService('fieldEditor'); - // Failing: See https://github.com/elastic/kibana/issues/147687 - describe.skip('discover sidebar', function describeIndexTests() { + describe('discover sidebar', function describeIndexTests() { before(async function () { await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); }); @@ -541,6 +540,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.existOrFail('discoverNoResultsError'); // still has error // check that the sidebar is rendered event after a refresh + await PageObjects.discover.waitUntilSidebarHasLoaded(); allFields = await PageObjects.discover.getAllFieldNames(); expect(allFields.includes('_invalid-runtimefield')).to.be(true); From dc1ae9e06c6ab18118fb8ce3d11e3890ed27cf8f Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Thu, 5 Jan 2023 11:05:07 +0100 Subject: [PATCH 11/36] [ML] Move local storage utilities to package. (#148049) Moves multiple copies of `useStorage()` and related code to a package as a single source. The different copies with hard coded types have been adapted so `useStorage()` is now based on generics. Also moves duplicates of `isDefined()` to its own package. --- .github/CODEOWNERS | 2 + package.json | 2 + tsconfig.base.json | 4 + x-pack/packages/ml/is_defined/README.md | 3 + .../ml/is_defined}/index.ts | 2 +- .../ml/is_defined/jest.config.js} | 8 +- x-pack/packages/ml/is_defined/kibana.jsonc | 5 + x-pack/packages/ml/is_defined/package.json | 6 + .../ml/is_defined/src}/is_defined.ts | 6 + x-pack/packages/ml/is_defined/tsconfig.json | 19 ++ x-pack/packages/ml/local_storage/README.md | 3 + x-pack/packages/ml/local_storage/index.ts | 8 + .../packages/ml/local_storage/jest.config.js | 12 ++ x-pack/packages/ml/local_storage/kibana.jsonc | 5 + x-pack/packages/ml/local_storage/package.json | 9 + .../ml/local_storage/src/storage_context.tsx | 193 ++++++++++++++++++ .../packages/ml/local_storage/tsconfig.json | 22 ++ x-pack/plugins/aiops/kibana.json | 2 +- .../change_point_detetion_root.tsx | 25 ++- .../explain_log_rate_spikes_app_state.tsx | 12 +- .../full_time_range_selector.tsx | 21 +- .../log_categorization_app_state.tsx | 13 +- .../plugins/aiops/public/hooks/use_storage.ts | 42 ---- x-pack/plugins/aiops/public/types/storage.ts | 28 +++ x-pack/plugins/aiops/tsconfig.json | 1 + x-pack/plugins/data_visualizer/kibana.json | 1 + .../document_count_content.tsx | 2 +- .../results_links/results_links.tsx | 2 +- .../application/common/util/example_utils.ts | 2 +- .../actions_panel/actions_panel.tsx | 2 +- .../full_time_range_selector.tsx | 21 +- .../index_data_visualizer_view.tsx | 20 +- .../components/search_panel/search_panel.tsx | 2 +- .../hooks/use_storage.ts | 48 ----- .../index_data_visualizer.tsx | 15 +- .../requests/get_document_stats.ts | 2 +- .../requests/get_numeric_field_stats.ts | 2 +- .../index_data_visualizer/types/storage.ts | 42 ++++ x-pack/plugins/data_visualizer/tsconfig.json | 2 + .../types/storage.test.tsx} | 61 +++--- x-pack/plugins/ml/common/types/storage.ts | 25 ++- x-pack/plugins/ml/common/util/alerts.ts | 2 +- x-pack/plugins/ml/common/util/job_utils.ts | 2 +- ...aly_detection_jobs_health_rule_trigger.tsx | 2 +- .../alerting/ml_anomaly_alert_trigger.tsx | 2 +- x-pack/plugins/ml/public/application/app.tsx | 7 +- .../full_time_range_selector.test.tsx | 2 +- .../full_time_range_selector.tsx | 25 ++- .../components/job_selector/job_selector.tsx | 2 +- .../ml/ml_notifications_context.test.tsx | 4 +- .../contexts/ml/ml_notifications_context.tsx | 13 +- .../contexts/storage/storage_context.tsx | 140 ------------- .../application/explorer/anomalies_map.tsx | 2 +- .../explorer/anomaly_context_menu.tsx | 2 +- .../application/explorer/anomaly_timeline.tsx | 2 +- ...d_anomaly_charts_to_dashboard_controls.tsx | 2 +- .../public/application/explorer/explorer.tsx | 4 +- .../components/getting_started_callout.tsx | 2 +- .../anomaly_explorer_charts_service.ts | 2 +- .../services/ml_api_service/notifications.ts | 2 +- .../series_controls/series_controls.tsx | 13 +- .../models_management/expanded_row.tsx | 2 +- .../public/application/util/string_utils.ts | 2 +- .../ml/server/lib/alerts/alerting_service.ts | 2 +- .../server/lib/alerts/jobs_health_service.ts | 2 +- .../data_frame_analytics/models_provider.ts | 2 +- .../models/data_recognizer/data_recognizer.ts | 2 +- .../models/results_service/anomaly_charts.ts | 2 +- x-pack/plugins/ml/tsconfig.json | 2 + .../plugins/transform/common/types/common.ts | 4 - .../transform_selector_control.tsx | 2 +- .../public/app/hooks/use_get_transforms.ts | 2 +- .../advanced_runtime_mappings_settings.tsx | 2 +- .../step_define/hooks/use_pivot_config.ts | 3 +- .../transform_list/expanded_row.tsx | 2 +- x-pack/plugins/transform/tsconfig.json | 1 + yarn.lock | 8 + 77 files changed, 597 insertions(+), 377 deletions(-) create mode 100644 x-pack/packages/ml/is_defined/README.md rename x-pack/{plugins/ml/public/application/contexts/storage => packages/ml/is_defined}/index.ts (77%) rename x-pack/{plugins/ml/common/types/guards.ts => packages/ml/is_defined/jest.config.js} (65%) create mode 100644 x-pack/packages/ml/is_defined/kibana.jsonc create mode 100644 x-pack/packages/ml/is_defined/package.json rename x-pack/{plugins/data_visualizer/public/application/common/util => packages/ml/is_defined/src}/is_defined.ts (75%) create mode 100644 x-pack/packages/ml/is_defined/tsconfig.json create mode 100644 x-pack/packages/ml/local_storage/README.md create mode 100644 x-pack/packages/ml/local_storage/index.ts create mode 100644 x-pack/packages/ml/local_storage/jest.config.js create mode 100644 x-pack/packages/ml/local_storage/kibana.jsonc create mode 100644 x-pack/packages/ml/local_storage/package.json create mode 100644 x-pack/packages/ml/local_storage/src/storage_context.tsx create mode 100644 x-pack/packages/ml/local_storage/tsconfig.json delete mode 100644 x-pack/plugins/aiops/public/hooks/use_storage.ts create mode 100644 x-pack/plugins/aiops/public/types/storage.ts delete mode 100644 x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_storage.ts create mode 100644 x-pack/plugins/data_visualizer/public/application/index_data_visualizer/types/storage.ts rename x-pack/plugins/ml/{public/application/contexts/storage/storage_context.test.tsx => common/types/storage.test.tsx} (77%) delete mode 100644 x-pack/plugins/ml/public/application/contexts/storage/storage_context.tsx diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 02c94120cec228..828a9e80f7c015 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1072,7 +1072,9 @@ packages/shared-ux/storybook/mock @elastic/kibana-global-experience x-pack/packages/ml/agg_utils @elastic/ml-ui x-pack/packages/ml/aiops_components @elastic/ml-ui x-pack/packages/ml/aiops_utils @elastic/ml-ui +x-pack/packages/ml/is_defined @elastic/ml-ui x-pack/packages/ml/is_populated_object @elastic/ml-ui +x-pack/packages/ml/local_storage @elastic/ml-ui x-pack/packages/ml/nested_property @elastic/ml-ui x-pack/packages/ml/string_hash @elastic/ml-ui x-pack/packages/ml/url_state @elastic/ml-ui diff --git a/package.json b/package.json index d5e1dbeadb1bf3..8d735d59a50abc 100644 --- a/package.json +++ b/package.json @@ -350,7 +350,9 @@ "@kbn/logging-mocks": "link:packages/kbn-logging-mocks", "@kbn/mapbox-gl": "link:packages/kbn-mapbox-gl", "@kbn/ml-agg-utils": "link:x-pack/packages/ml/agg_utils", + "@kbn/ml-is-defined": "link:x-pack/packages/ml/is_defined", "@kbn/ml-is-populated-object": "link:x-pack/packages/ml/is_populated_object", + "@kbn/ml-local-storage": "link:x-pack/packages/ml/local_storage", "@kbn/ml-nested-property": "link:x-pack/packages/ml/nested_property", "@kbn/ml-string-hash": "link:x-pack/packages/ml/string_hash", "@kbn/ml-url-state": "link:x-pack/packages/ml/url_state", diff --git a/tsconfig.base.json b/tsconfig.base.json index a6e06ff4709051..00ac0a82057403 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -816,8 +816,12 @@ "@kbn/maps-plugin/*": ["x-pack/plugins/maps/*"], "@kbn/ml-agg-utils": ["x-pack/packages/ml/agg_utils"], "@kbn/ml-agg-utils/*": ["x-pack/packages/ml/agg_utils/*"], + "@kbn/ml-is-defined": ["x-pack/packages/ml/is_defined"], + "@kbn/ml-is-defined/*": ["x-pack/packages/ml/is_defined/*"], "@kbn/ml-is-populated-object": ["x-pack/packages/ml/is_populated_object"], "@kbn/ml-is-populated-object/*": ["x-pack/packages/ml/is_populated_object/*"], + "@kbn/ml-local-storage": ["x-pack/packages/ml/local_storage"], + "@kbn/ml-local-storage/*": ["x-pack/packages/ml/local_storage/*"], "@kbn/ml-nested-property": ["x-pack/packages/ml/nested_property"], "@kbn/ml-nested-property/*": ["x-pack/packages/ml/nested_property/*"], "@kbn/ml-plugin": ["x-pack/plugins/ml"], diff --git a/x-pack/packages/ml/is_defined/README.md b/x-pack/packages/ml/is_defined/README.md new file mode 100644 index 00000000000000..c87e487b565a6c --- /dev/null +++ b/x-pack/packages/ml/is_defined/README.md @@ -0,0 +1,3 @@ +# @kbn/ml-is-defined + +Utility function to determine if a value is not `undefined` and not `null`. diff --git a/x-pack/plugins/ml/public/application/contexts/storage/index.ts b/x-pack/packages/ml/is_defined/index.ts similarity index 77% rename from x-pack/plugins/ml/public/application/contexts/storage/index.ts rename to x-pack/packages/ml/is_defined/index.ts index 8b17073d3b0999..8b04a61a8bdaec 100644 --- a/x-pack/plugins/ml/public/application/contexts/storage/index.ts +++ b/x-pack/packages/ml/is_defined/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { MlStorageContextProvider, useStorage } from './storage_context'; +export { isDefined } from './src/is_defined'; diff --git a/x-pack/plugins/ml/common/types/guards.ts b/x-pack/packages/ml/is_defined/jest.config.js similarity index 65% rename from x-pack/plugins/ml/common/types/guards.ts rename to x-pack/packages/ml/is_defined/jest.config.js index ead91eafc2d4e7..a4deb4d18ecf8d 100644 --- a/x-pack/plugins/ml/common/types/guards.ts +++ b/x-pack/packages/ml/is_defined/jest.config.js @@ -5,6 +5,8 @@ * 2.0. */ -export function isDefined(argument: T | undefined | null): argument is T { - return argument !== undefined && argument !== null; -} +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/x-pack/packages/ml/is_defined'], +}; diff --git a/x-pack/packages/ml/is_defined/kibana.jsonc b/x-pack/packages/ml/is_defined/kibana.jsonc new file mode 100644 index 00000000000000..b25718598901ba --- /dev/null +++ b/x-pack/packages/ml/is_defined/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/ml-is-defined", + "owner": "@elastic/ml-ui" +} diff --git a/x-pack/packages/ml/is_defined/package.json b/x-pack/packages/ml/is_defined/package.json new file mode 100644 index 00000000000000..2ed8896c225529 --- /dev/null +++ b/x-pack/packages/ml/is_defined/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/ml-is-defined", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/x-pack/plugins/data_visualizer/public/application/common/util/is_defined.ts b/x-pack/packages/ml/is_defined/src/is_defined.ts similarity index 75% rename from x-pack/plugins/data_visualizer/public/application/common/util/is_defined.ts rename to x-pack/packages/ml/is_defined/src/is_defined.ts index ead91eafc2d4e7..1cf980293277c4 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/util/is_defined.ts +++ b/x-pack/packages/ml/is_defined/src/is_defined.ts @@ -5,6 +5,12 @@ * 2.0. */ +/** + * Checks whether the supplied argument is not `undefined` and not `null`. + * + * @param argument + * @returns boolean + */ export function isDefined(argument: T | undefined | null): argument is T { return argument !== undefined && argument !== null; } diff --git a/x-pack/packages/ml/is_defined/tsconfig.json b/x-pack/packages/ml/is_defined/tsconfig.json new file mode 100644 index 00000000000000..5c989599ec9ad0 --- /dev/null +++ b/x-pack/packages/ml/is_defined/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [] +} diff --git a/x-pack/packages/ml/local_storage/README.md b/x-pack/packages/ml/local_storage/README.md new file mode 100644 index 00000000000000..d1e7c46957397a --- /dev/null +++ b/x-pack/packages/ml/local_storage/README.md @@ -0,0 +1,3 @@ +# @kbn/ml-local-storage + +Utilities to combine url state management with local storage. diff --git a/x-pack/packages/ml/local_storage/index.ts b/x-pack/packages/ml/local_storage/index.ts new file mode 100644 index 00000000000000..f950f8791a3415 --- /dev/null +++ b/x-pack/packages/ml/local_storage/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 { StorageContextProvider, useStorage } from './src/storage_context'; diff --git a/x-pack/packages/ml/local_storage/jest.config.js b/x-pack/packages/ml/local_storage/jest.config.js new file mode 100644 index 00000000000000..7de0a696c57ef6 --- /dev/null +++ b/x-pack/packages/ml/local_storage/jest.config.js @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/x-pack/packages/ml/local_storage'], +}; diff --git a/x-pack/packages/ml/local_storage/kibana.jsonc b/x-pack/packages/ml/local_storage/kibana.jsonc new file mode 100644 index 00000000000000..8afac70248f4f6 --- /dev/null +++ b/x-pack/packages/ml/local_storage/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/ml-local-storage", + "owner": "@elastic/ml-ui" +} diff --git a/x-pack/packages/ml/local_storage/package.json b/x-pack/packages/ml/local_storage/package.json new file mode 100644 index 00000000000000..af2452a92220bc --- /dev/null +++ b/x-pack/packages/ml/local_storage/package.json @@ -0,0 +1,9 @@ +{ + "name": "@kbn/ml-local-storage", + "description": "Utilities to combine url state management with local storage.", + "author": "Machine Learning UI", + "homepage": "https://docs.elastic.dev/kibana-dev-docs/api/kbn-ml-local-storage", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/x-pack/packages/ml/local_storage/src/storage_context.tsx b/x-pack/packages/ml/local_storage/src/storage_context.tsx new file mode 100644 index 00000000000000..e8cb64d81025ee --- /dev/null +++ b/x-pack/packages/ml/local_storage/src/storage_context.tsx @@ -0,0 +1,193 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { + type PropsWithChildren, + useEffect, + useMemo, + useCallback, + useState, + useContext, +} from 'react'; +import { omit } from 'lodash'; + +import type { Storage } from '@kbn/kibana-utils-plugin/public'; +import { isDefined } from '@kbn/ml-is-defined'; + +/** + * StorageDefinition is a dictionary with `string` based keys. + */ +interface StorageDefinition { + [key: string]: unknown; +} + +/** + * TStorage, a partial `StorageDefinition` or `null`. + */ +type TStorage = Partial | null; +/** + * TStorageKey, keys of StorageDefintion. + */ +type TStorageKey = keyof Exclude; +/** + * TStorageMapped, mapping of TStorage with TStorageKey. + */ +type TStorageMapped = T extends string ? unknown : null; + +/** + * StorageAPI definition of store TStorage with accessors. + */ +interface StorageAPI { + value: TStorage; + setValue: >(key: K, value: T) => void; + removeValue: (key: K) => void; +} + +/** + * Type guard to check if a supplied `key` is in `storageKey`. + * + * @param key + * @param storageKeys + * @returns boolean + */ +export function isStorageKey(key: unknown, storageKeys: readonly T[]): key is T { + return storageKeys.includes(key as T); +} + +/** + * React context to hold storage API. + */ +export const MlStorageContext = React.createContext({ + value: null, + setValue() { + throw new Error('MlStorageContext set method is not implemented'); + }, + removeValue() { + throw new Error('MlStorageContext remove method is not implemented'); + }, +}); + +/** + * Props for StorageContextProvider + */ +interface StorageContextProviderProps { + storage: Storage; + storageKeys: readonly K[]; +} + +/** + * Provider to manage context for the `useStorage` hook. + */ +export function StorageContextProvider({ + children, + storage, + storageKeys, +}: PropsWithChildren>) { + const initialValue = useMemo(() => { + return storageKeys.reduce((acc, curr) => { + acc[curr as K] = storage.get(curr as string); + return acc; + }, {} as Exclude); + }, [storage, storageKeys]); + + const [state, setState] = useState(initialValue); + + const setStorageValue = useCallback( + >(key: K, value: TM) => { + storage.set(key as string, value); + + setState((prevState) => ({ + ...prevState, + [key]: value, + })); + }, + [storage] + ); + + const removeStorageValue = useCallback( + (key: K) => { + storage.remove(key as string); + setState((prevState) => omit(prevState, key) as T); + }, + [storage] + ); + + useEffect( + function updateStorageOnExternalChange() { + const eventListener = (event: StorageEvent) => { + if (!isStorageKey(event.key, storageKeys)) return; + + if (isDefined(event.newValue)) { + setState((prev) => { + return { + ...prev, + [event.key as K]: + typeof event.newValue === 'string' ? JSON.parse(event.newValue) : event.newValue, + }; + }); + } else { + setState((prev) => omit(prev, event.key as K) as T); + } + }; + + /** + * This event listener is only invoked when + * the change happens in another browser's tab. + */ + window.addEventListener('storage', eventListener); + + return () => { + window.removeEventListener('storage', eventListener); + }; + }, + [storageKeys] + ); + + const value = useMemo(() => { + return { + value: state, + setValue: setStorageValue, + removeValue: removeStorageValue, + } as StorageAPI; + }, [state, setStorageValue, removeStorageValue]); + + return {children}; +} + +/** + * Hook for consuming a storage value + * @param key + * @param initValue + */ +export function useStorage>( + key: K, + initValue?: T +): [ + typeof initValue extends undefined ? T | undefined : Exclude, + (value: T) => void +] { + const { value, setValue, removeValue } = useContext(MlStorageContext); + + const resultValue = useMemo(() => { + return (value?.[key] ?? initValue) as typeof initValue extends undefined + ? T | undefined + : Exclude; + }, [value, key, initValue]); + + const setVal = useCallback( + (v: T) => { + if (isDefined(v)) { + setValue(key, v); + } else { + removeValue(key); + } + }, + [setValue, removeValue, key] + ); + + return [resultValue, setVal]; +} diff --git a/x-pack/packages/ml/local_storage/tsconfig.json b/x-pack/packages/ml/local_storage/tsconfig.json new file mode 100644 index 00000000000000..1f42768195c2b5 --- /dev/null +++ b/x-pack/packages/ml/local_storage/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "exclude": [ + "target/**/*", + ], + "kbn_references": [ + "@kbn/kibana-utils-plugin", + "@kbn/ml-is-defined", + ] +} diff --git a/x-pack/plugins/aiops/kibana.json b/x-pack/plugins/aiops/kibana.json index dba431234ec0a7..08cbaf4613464f 100755 --- a/x-pack/plugins/aiops/kibana.json +++ b/x-pack/plugins/aiops/kibana.json @@ -16,6 +16,6 @@ "licensing" ], "optionalPlugins": [], - "requiredBundles": ["fieldFormats", "kibanaReact"], + "requiredBundles": ["fieldFormats", "kibanaReact", "kibanaUtils"], "extraPublicDirs": ["common"] } diff --git a/x-pack/plugins/aiops/public/components/change_point_detection/change_point_detetion_root.tsx b/x-pack/plugins/aiops/public/components/change_point_detection/change_point_detetion_root.tsx index 44c68c60175885..f7a039c082dee3 100644 --- a/x-pack/plugins/aiops/public/components/change_point_detection/change_point_detetion_root.tsx +++ b/x-pack/plugins/aiops/public/components/change_point_detection/change_point_detetion_root.tsx @@ -5,16 +5,25 @@ * 2.0. */ +import React, { FC } from 'react'; + import { DataView } from '@kbn/data-views-plugin/common'; import { SavedSearch } from '@kbn/saved-search-plugin/public'; -import React, { FC } from 'react'; +import { StorageContextProvider } from '@kbn/ml-local-storage'; import { UrlStateProvider } from '@kbn/ml-url-state'; -import { PageHeader } from '../page_header'; -import { ChangePointDetectionContextProvider } from './change_point_detection_context'; +import { Storage } from '@kbn/kibana-utils-plugin/public'; + import { DataSourceContext } from '../../hooks/use_data_source'; import { SavedSearchSavedObject } from '../../application/utils/search_utils'; import { AiopsAppContext, AiopsAppDependencies } from '../../hooks/use_aiops_app_context'; +import { AIOPS_STORAGE_KEYS } from '../../types/storage'; + +import { PageHeader } from '../page_header'; + import { ChangePointDetectionPage } from './change_point_detection_page'; +import { ChangePointDetectionContextProvider } from './change_point_detection_context'; + +const localStorage = new Storage(window.localStorage); export interface ChangePointDetectionAppStateProps { dataView: DataView; @@ -31,10 +40,12 @@ export const ChangePointDetectionAppState: FC - - - - + + + + + + diff --git a/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_app_state.tsx b/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_app_state.tsx index 2e745894cac0aa..6b6b477807d41e 100644 --- a/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_app_state.tsx +++ b/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_app_state.tsx @@ -11,11 +11,12 @@ import { EuiCallOut } from '@elastic/eui'; import type { Filter, Query } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; - import type { SavedSearch } from '@kbn/discover-plugin/public'; import type { DataView } from '@kbn/data-views-plugin/public'; - +import { StorageContextProvider } from '@kbn/ml-local-storage'; import { UrlStateProvider } from '@kbn/ml-url-state'; +import { Storage } from '@kbn/kibana-utils-plugin/public'; + import { SEARCH_QUERY_LANGUAGE, SearchQueryLanguage, @@ -23,11 +24,14 @@ import { } from '../../application/utils/search_utils'; import type { AiopsAppDependencies } from '../../hooks/use_aiops_app_context'; import { AiopsAppContext } from '../../hooks/use_aiops_app_context'; +import { AIOPS_STORAGE_KEYS } from '../../types/storage'; import { SpikeAnalysisTableRowStateProvider } from '../spike_analysis_table/spike_analysis_table_row_provider'; import { ExplainLogRateSpikesPage } from './explain_log_rate_spikes_page'; +const localStorage = new Storage(window.localStorage); + export interface ExplainLogRateSpikesAppStateProps { /** The data view to analyze. */ dataView: DataView; @@ -95,7 +99,9 @@ export const ExplainLogRateSpikesAppState: FC - + + + diff --git a/x-pack/plugins/aiops/public/components/full_time_range_selector/full_time_range_selector.tsx b/x-pack/plugins/aiops/public/components/full_time_range_selector/full_time_range_selector.tsx index 592240675197c4..78cf53295cc268 100644 --- a/x-pack/plugins/aiops/public/components/full_time_range_selector/full_time_range_selector.tsx +++ b/x-pack/plugins/aiops/public/components/full_time_range_selector/full_time_range_selector.tsx @@ -25,12 +25,19 @@ import { EuiToolTip, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { useStorage } from '@kbn/ml-local-storage'; import { useAiopsAppContext } from '../../hooks/use_aiops_app_context'; import { type GetTimeFieldRangeResponse, setFullTimeRange, } from './full_time_range_selector_service'; -import { AIOPS_FROZEN_TIER_PREFERENCE, useStorage } from '../../hooks/use_storage'; +import { + AIOPS_FROZEN_TIER_PREFERENCE, + FROZEN_TIER_PREFERENCE, + type AiOpsKey, + type AiOpsStorageMapped, + type FrozenTierPreference, +} from '../../types/storage'; export interface FullTimeRangeSelectorProps { timefilter: TimefilterContract; @@ -40,13 +47,6 @@ export interface FullTimeRangeSelectorProps { callback?: (a: GetTimeFieldRangeResponse) => void; } -const FROZEN_TIER_PREFERENCE = { - EXCLUDE: 'exclude-frozen', - INCLUDE: 'include-frozen', -} as const; - -type FrozenTierPreference = typeof FROZEN_TIER_PREFERENCE[keyof typeof FROZEN_TIER_PREFERENCE]; - export const FullTimeRangeSelector: FC = ({ timefilter, dataView, @@ -90,7 +90,10 @@ export const FullTimeRangeSelector: FC = ({ const [isPopoverOpen, setPopover] = useState(false); - const [frozenDataPreference, setFrozenDataPreference] = useStorage( + const [frozenDataPreference, setFrozenDataPreference] = useStorage< + AiOpsKey, + AiOpsStorageMapped + >( AIOPS_FROZEN_TIER_PREFERENCE, // By default we will exclude frozen data tier FROZEN_TIER_PREFERENCE.EXCLUDE diff --git a/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_app_state.tsx b/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_app_state.tsx index 4c0da804f5eb63..ee571d990c8324 100644 --- a/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_app_state.tsx +++ b/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_app_state.tsx @@ -7,12 +7,19 @@ import React, { FC } from 'react'; import type { SavedSearch } from '@kbn/discover-plugin/public'; import type { DataView } from '@kbn/data-views-plugin/public'; +import { StorageContextProvider } from '@kbn/ml-local-storage'; import { UrlStateProvider } from '@kbn/ml-url-state'; -import { LogCategorizationPage } from './log_categorization_page'; +import { Storage } from '@kbn/kibana-utils-plugin/public'; + import { SavedSearchSavedObject } from '../../application/utils/search_utils'; import type { AiopsAppDependencies } from '../../hooks/use_aiops_app_context'; +import { AIOPS_STORAGE_KEYS } from '../../types/storage'; import { AiopsAppContext } from '../../hooks/use_aiops_app_context'; +import { LogCategorizationPage } from './log_categorization_page'; + +const localStorage = new Storage(window.localStorage); + export interface LogCategorizationAppStateProps { dataView: DataView; savedSearch: SavedSearch | SavedSearchSavedObject | null; @@ -27,7 +34,9 @@ export const LogCategorizationAppState: FC = ({ return ( - + + + ); diff --git a/x-pack/plugins/aiops/public/hooks/use_storage.ts b/x-pack/plugins/aiops/public/hooks/use_storage.ts deleted file mode 100644 index c377a85b3e84c7..00000000000000 --- a/x-pack/plugins/aiops/public/hooks/use_storage.ts +++ /dev/null @@ -1,42 +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 { useCallback, useState } from 'react'; -import { useAiopsAppContext } from './use_aiops_app_context'; - -export const AIOPS_FROZEN_TIER_PREFERENCE = 'aiops.frozenDataTierPreference'; - -export type AiOps = Partial<{ - [AIOPS_FROZEN_TIER_PREFERENCE]: 'exclude_frozen' | 'include_frozen'; -}> | null; - -export type AiOpsKey = keyof Exclude; - -/** - * Hook for accessing and changing a value in the storage. - * @param key - Storage key - * @param initValue - */ -export function useStorage(key: AiOpsKey, initValue?: T): [T, (value: T) => void] { - const { storage } = useAiopsAppContext(); - - const [val, setVal] = useState(storage.get(key) ?? initValue); - - const setStorage = useCallback( - (value: T): void => { - try { - storage.set(key, value); - setVal(value); - } catch (e) { - throw new Error('Unable to update storage with provided value'); - } - }, - [key, storage] - ); - - return [val, setStorage]; -} diff --git a/x-pack/plugins/aiops/public/types/storage.ts b/x-pack/plugins/aiops/public/types/storage.ts new file mode 100644 index 00000000000000..96eb612d9ca7a6 --- /dev/null +++ b/x-pack/plugins/aiops/public/types/storage.ts @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const AIOPS_FROZEN_TIER_PREFERENCE = 'aiops.frozenDataTierPreference'; + +export const FROZEN_TIER_PREFERENCE = { + EXCLUDE: 'exclude-frozen', + INCLUDE: 'include-frozen', +} as const; + +export type FrozenTierPreference = + typeof FROZEN_TIER_PREFERENCE[keyof typeof FROZEN_TIER_PREFERENCE]; + +export type AiOps = Partial<{ + [AIOPS_FROZEN_TIER_PREFERENCE]: FrozenTierPreference; +}> | null; + +export type AiOpsKey = keyof Exclude; + +export type AiOpsStorageMapped = T extends typeof AIOPS_FROZEN_TIER_PREFERENCE + ? FrozenTierPreference | undefined + : null; + +export const AIOPS_STORAGE_KEYS = [AIOPS_FROZEN_TIER_PREFERENCE] as const; diff --git a/x-pack/plugins/aiops/tsconfig.json b/x-pack/plugins/aiops/tsconfig.json index 9f2e110d0af258..9eef408f5a5133 100644 --- a/x-pack/plugins/aiops/tsconfig.json +++ b/x-pack/plugins/aiops/tsconfig.json @@ -43,6 +43,7 @@ "@kbn/core-elasticsearch-server", "@kbn/es-types", "@kbn/ml-url-state", + "@kbn/ml-local-storage", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/data_visualizer/kibana.json b/x-pack/plugins/data_visualizer/kibana.json index afc9fe34be6405..98d27ba9f04813 100644 --- a/x-pack/plugins/data_visualizer/kibana.json +++ b/x-pack/plugins/data_visualizer/kibana.json @@ -26,6 +26,7 @@ ], "requiredBundles": [ "kibanaReact", + "kibanaUtils", "maps", "esUiShared", "fieldFormats", diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_content.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_content.tsx index 09b59cf10abb55..4e3ed74c4470e9 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_content.tsx +++ b/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_content.tsx @@ -22,7 +22,7 @@ import { import { i18n } from '@kbn/i18n'; import { debounce, sortedIndex } from 'lodash'; import { FormattedMessage } from '@kbn/i18n-react'; -import { isDefined } from '../../util/is_defined'; +import { isDefined } from '@kbn/ml-is-defined'; import type { DocumentCountChartPoint } from './document_count_chart'; import { RANDOM_SAMPLER_STEP, diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx index 387c41f2b44f9f..9f84bb6d1debd1 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx +++ b/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx @@ -14,9 +14,9 @@ import { RefreshInterval } from '@kbn/data-plugin/public'; import { FindFileStructureResponse } from '@kbn/file-upload-plugin/common'; import type { FileUploadPluginStart } from '@kbn/file-upload-plugin/public'; import { flatten } from 'lodash'; +import { isDefined } from '@kbn/ml-is-defined'; import { LinkCardProps } from '../link_card/link_card'; import { useDataVisualizerKibana } from '../../../kibana_context'; -import { isDefined } from '../../util/is_defined'; type LinkType = 'file' | 'index'; diff --git a/x-pack/plugins/data_visualizer/public/application/common/util/example_utils.ts b/x-pack/plugins/data_visualizer/public/application/common/util/example_utils.ts index cc4a9a3ca9bfad..e3e97666844c43 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/util/example_utils.ts +++ b/x-pack/plugins/data_visualizer/public/application/common/util/example_utils.ts @@ -6,7 +6,7 @@ */ import { isPopulatedObject } from '@kbn/ml-is-populated-object'; -import { isDefined } from './is_defined'; +import { isDefined } from '@kbn/ml-is-defined'; import { GeoPointExample, LatLongExample } from '../../../../common/types/field_request_config'; export function isGeoPointExample(arg: unknown): arg is GeoPointExample { diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx index fc2efab6610bca..a8f454816e2b6f 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx @@ -14,12 +14,12 @@ import { i18n } from '@kbn/i18n'; import { EuiSpacer, EuiTitle } from '@elastic/eui'; import { DataView } from '@kbn/data-views-plugin/public'; import { useUrlState } from '@kbn/ml-url-state'; +import { isDefined } from '@kbn/ml-is-defined'; import { LinkCardProps } from '../../../common/components/link_card/link_card'; import { useDataVisualizerKibana } from '../../../kibana_context'; import { LinkCard } from '../../../common/components/link_card'; import { GetAdditionalLinks } from '../../../common/components/results_links'; -import { isDefined } from '../../../common/util/is_defined'; interface Props { dataView: DataView; diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.tsx index 1cade1deaa59ac..57c9f4fa18a408 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.tsx +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.tsx @@ -23,9 +23,16 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import { useStorage } from '@kbn/ml-local-storage'; import { setFullTimeRange } from './full_time_range_selector_service'; import { useDataVisualizerKibana } from '../../../kibana_context'; -import { DV_FROZEN_TIER_PREFERENCE, useStorage } from '../../hooks/use_storage'; +import { + DV_FROZEN_TIER_PREFERENCE, + FROZEN_TIER_PREFERENCE, + type DVKey, + type DVStorageMapped, + type FrozenTierPreference, +} from '../../types/storage'; export const ML_FROZEN_TIER_PREFERENCE = 'ml.frozenDataTierPreference'; @@ -37,13 +44,6 @@ interface Props { callback?: (a: any) => void; } -const FROZEN_TIER_PREFERENCE = { - EXCLUDE: 'exclude-frozen', - INCLUDE: 'include-frozen', -} as const; - -type FrozenTierPreference = typeof FROZEN_TIER_PREFERENCE[keyof typeof FROZEN_TIER_PREFERENCE]; - // Component for rendering a button which automatically sets the range of the time filter // to the time range of data in the index(es) mapped to the supplied Kibana data view or query. export const FullTimeRangeSelector: FC = ({ @@ -83,7 +83,10 @@ export const FullTimeRangeSelector: FC = ({ const [isPopoverOpen, setPopover] = useState(false); - const [frozenDataPreference, setFrozenDataPreference] = useStorage( + const [frozenDataPreference, setFrozenDataPreference] = useStorage< + DVKey, + DVStorageMapped + >( DV_FROZEN_TIER_PREFERENCE, // By default we will exclude frozen data tier FROZEN_TIER_PREFERENCE.EXCLUDE diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx index 8e13ce92a5c1ec..9ec8b90d84f021 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx @@ -27,8 +27,13 @@ import { generateFilters } from '@kbn/data-plugin/public'; import { DataView, DataViewField } from '@kbn/data-views-plugin/public'; import { usePageUrlState, useUrlState } from '@kbn/ml-url-state'; +import { useStorage } from '@kbn/ml-local-storage'; import { useCurrentEuiTheme } from '../../../common/hooks/use_current_eui_theme'; -import { DV_RANDOM_SAMPLER_PREFERENCE, useStorage } from '../../hooks/use_storage'; +import { + DV_RANDOM_SAMPLER_PREFERENCE, + type DVKey, + type DVStorageMapped, +} from '../../types/storage'; import { FullTimeRangeSelector } from '../full_time_range_selector'; import { DataVisualizerTable, @@ -58,7 +63,7 @@ import { DataVisualizerDataViewManagement } from '../data_view_management'; import { GetAdditionalLinks } from '../../../common/components/results_links'; import { useDataVisualizerGridData } from '../../hooks/use_data_visualizer_grid_data'; import { DataVisualizerGridInput } from '../../embeddables/grid_embeddable/grid_embeddable'; -import { RANDOM_SAMPLER_OPTION, RandomSamplerOption } from '../../constants/random_sampler'; +import { RANDOM_SAMPLER_OPTION } from '../../constants/random_sampler'; interface DataVisualizerPageState { overallStats: OverallStats; @@ -126,18 +131,17 @@ export interface IndexDataVisualizerViewProps { export const IndexDataVisualizerView: FC = (dataVisualizerProps) => { const euiTheme = useCurrentEuiTheme(); - const [savedRandomSamplerPreference, saveRandomSamplerPreference] = - useStorage( - DV_RANDOM_SAMPLER_PREFERENCE, - RANDOM_SAMPLER_OPTION.ON_AUTOMATIC - ); + const [savedRandomSamplerPreference, saveRandomSamplerPreference] = useStorage< + DVKey, + DVStorageMapped + >(DV_RANDOM_SAMPLER_PREFERENCE, RANDOM_SAMPLER_OPTION.ON_AUTOMATIC); const restorableDefaults = useMemo( () => getDefaultDataVisualizerListState({ rndSamplerPref: savedRandomSamplerPreference, }), - // We just need to load the saved preference when the page is first loaded + // We just need to load the saved preference when the page is first loaded // eslint-disable-next-line react-hooks/exhaustive-deps [] ); diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx index b6981bf996da21..ee4a002071b3f7 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx @@ -12,7 +12,7 @@ import { i18n } from '@kbn/i18n'; import { Query, Filter } from '@kbn/es-query'; import type { TimeRange } from '@kbn/es-query'; import { DataView, DataViewField } from '@kbn/data-views-plugin/public'; -import { isDefined } from '../../../common/util/is_defined'; +import { isDefined } from '@kbn/ml-is-defined'; import { DataVisualizerFieldNamesFilter } from './field_name_filter'; import { DataVisualizerFieldTypeFilter } from './field_type_filter'; import { SupportedFieldType } from '../../../../../common/types'; diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_storage.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_storage.ts deleted file mode 100644 index cd09967a81fa0e..00000000000000 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_storage.ts +++ /dev/null @@ -1,48 +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 { useCallback, useState } from 'react'; -import { useDataVisualizerKibana } from '../../kibana_context'; - -export const DV_FROZEN_TIER_PREFERENCE = 'dataVisualizer.frozenDataTierPreference'; -export const DV_RANDOM_SAMPLER_PREFERENCE = 'dataVisualizer.randomSamplerPreference'; -export const DV_RANDOM_SAMPLER_P_VALUE = 'dataVisualizer.randomSamplerPValue'; - -export type DV = Partial<{ - [DV_FROZEN_TIER_PREFERENCE]: 'exclude_frozen' | 'include_frozen'; - [DV_RANDOM_SAMPLER_PREFERENCE]: 'true' | 'false'; - [DV_RANDOM_SAMPLER_P_VALUE]: number; -}> | null; - -export type DVKey = keyof Exclude; - -/** - * Hook for accessing and changing a value in the storage. - * @param key - Storage key - * @param initValue - */ -export function useStorage(key: DVKey, initValue?: T): [T, (value: T) => void] { - const { - services: { storage }, - } = useDataVisualizerKibana(); - - const [val, setVal] = useState(storage.get(key) ?? initValue); - - const setStorage = useCallback( - (value: T): void => { - try { - storage.set(key, value); - setVal(value); - } catch (e) { - throw new Error('Unable to update storage with provided value'); - } - }, - [key, storage] - ); - - return [val, setStorage]; -} diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx index 671d410523fdd8..156898449ee791 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx @@ -13,7 +13,9 @@ import { EuiResizeObserver } from '@elastic/eui'; import { encode } from '@kbn/rison'; import { SimpleSavedObject } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; +import { Storage } from '@kbn/kibana-utils-plugin/public'; import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { StorageContextProvider } from '@kbn/ml-local-storage'; import { DataView } from '@kbn/data-views-plugin/public'; import { getNestedProperty } from '@kbn/ml-nested-property'; import { @@ -34,6 +36,9 @@ import { GetAdditionalLinks } from '../common/components/results_links'; import { DATA_VISUALIZER_APP_LOCATOR, IndexDataVisualizerLocatorParams } from './locator'; import { DATA_VISUALIZER_INDEX_VIEWER } from './constants/index_data_visualizer_viewer'; import { INDEX_DATA_VISUALIZER_NAME } from '../common/constants'; +import { DV_STORAGE_KEYS } from './types/storage'; + +const localStorage = new Storage(window.localStorage); export interface DataVisualizerStateContextProviderProps { IndexDataVisualizerComponent: FC; @@ -316,10 +321,12 @@ export const IndexDataVisualizer: FC<{ return ( - + + + ); diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_document_stats.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_document_stats.ts index f74a8800d2bd07..e6fc220ea7f3c4 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_document_stats.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_document_stats.ts @@ -10,7 +10,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import { DataPublicPluginStart, ISearchOptions } from '@kbn/data-plugin/public'; import seedrandom from 'seedrandom'; -import { isDefined } from '../../../common/util/is_defined'; +import { isDefined } from '@kbn/ml-is-defined'; import { RANDOM_SAMPLER_PROBABILITIES } from '../../constants/random_sampler'; import { buildBaseFilterCriteria } from '../../../../../common/utils/query_utils'; import type { diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_numeric_field_stats.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_numeric_field_stats.ts index 66a7134919760f..20143f5fc15810 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_numeric_field_stats.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_numeric_field_stats.ts @@ -17,8 +17,8 @@ import type { } from '@kbn/data-plugin/common'; import type { ISearchStart } from '@kbn/data-plugin/public'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import { isDefined } from '@kbn/ml-is-defined'; import { processTopValues } from './utils'; -import { isDefined } from '../../../common/util/is_defined'; import { buildAggregationWithSamplingOption } from './build_random_sampler_agg'; import { MAX_PERCENT, PERCENTILE_SPACING, SAMPLER_TOP_TERMS_THRESHOLD } from './constants'; import type { diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/types/storage.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/types/storage.ts new file mode 100644 index 00000000000000..f2718bc8e803f9 --- /dev/null +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/types/storage.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 { RandomSamplerOption } from '../constants/random_sampler'; + +export const DV_FROZEN_TIER_PREFERENCE = 'dataVisualizer.frozenDataTierPreference'; +export const DV_RANDOM_SAMPLER_PREFERENCE = 'dataVisualizer.randomSamplerPreference'; +export const DV_RANDOM_SAMPLER_P_VALUE = 'dataVisualizer.randomSamplerPValue'; + +export const FROZEN_TIER_PREFERENCE = { + EXCLUDE: 'exclude-frozen', + INCLUDE: 'include-frozen', +} as const; + +export type FrozenTierPreference = + typeof FROZEN_TIER_PREFERENCE[keyof typeof FROZEN_TIER_PREFERENCE]; + +export type DV = Partial<{ + [DV_FROZEN_TIER_PREFERENCE]: FrozenTierPreference; + [DV_RANDOM_SAMPLER_PREFERENCE]: RandomSamplerOption; + [DV_RANDOM_SAMPLER_P_VALUE]: number; +}> | null; + +export type DVKey = keyof Exclude; + +export type DVStorageMapped = T extends typeof DV_FROZEN_TIER_PREFERENCE + ? FrozenTierPreference | undefined + : T extends typeof DV_RANDOM_SAMPLER_PREFERENCE + ? RandomSamplerOption | undefined + : T extends typeof DV_RANDOM_SAMPLER_P_VALUE + ? number | undefined + : null; + +export const DV_STORAGE_KEYS = [ + DV_FROZEN_TIER_PREFERENCE, + DV_RANDOM_SAMPLER_PREFERENCE, + DV_RANDOM_SAMPLER_P_VALUE, +] as const; diff --git a/x-pack/plugins/data_visualizer/tsconfig.json b/x-pack/plugins/data_visualizer/tsconfig.json index b6c5477266e4cd..3098da0f61bc24 100644 --- a/x-pack/plugins/data_visualizer/tsconfig.json +++ b/x-pack/plugins/data_visualizer/tsconfig.json @@ -52,6 +52,8 @@ "@kbn/field-types", "@kbn/ml-nested-property", "@kbn/ml-url-state", + "@kbn/ml-local-storage", + "@kbn/ml-is-defined", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/ml/public/application/contexts/storage/storage_context.test.tsx b/x-pack/plugins/ml/common/types/storage.test.tsx similarity index 77% rename from x-pack/plugins/ml/public/application/contexts/storage/storage_context.test.tsx rename to x-pack/plugins/ml/common/types/storage.test.tsx index 6aeeb396f38c3e..c27c6e74d9edb1 100644 --- a/x-pack/plugins/ml/public/application/contexts/storage/storage_context.test.tsx +++ b/x-pack/plugins/ml/common/types/storage.test.tsx @@ -5,33 +5,38 @@ * 2.0. */ +import React, { FC } from 'react'; import { renderHook, act } from '@testing-library/react-hooks'; -import { MlStorageContextProvider, useStorage } from './storage_context'; -import { MlStorageKey } from '../../../../common/types/storage'; + +import type { Storage } from '@kbn/kibana-utils-plugin/public'; +import { StorageContextProvider, useStorage } from '@kbn/ml-local-storage'; + +import { ML_STORAGE_KEYS } from './storage'; const mockSet = jest.fn(); const mockRemove = jest.fn(); - -jest.mock('../kibana', () => ({ - useMlKibana: () => { - return { - services: { - storage: { - set: mockSet, - get: jest.fn((key: MlStorageKey) => { - switch (key) { - case 'ml.gettingStarted.isDismissed': - return true; - default: - return; - } - }), - remove: mockRemove, - }, - }, - }; - }, -})); +const mockStorage: Storage = { + set: mockSet, + get: jest.fn((key: string) => { + switch (key) { + case 'ml.gettingStarted.isDismissed': + return true; + default: + return; + } + }), + remove: mockRemove, + store: jest.fn() as any, + clear: jest.fn(), +}; + +const Provider: FC = ({ children }) => { + return ( + + {children} + + ); +}; describe('useStorage', () => { afterEach(() => { @@ -40,7 +45,7 @@ describe('useStorage', () => { test('returns the default value', () => { const { result } = renderHook(() => useStorage('ml.jobSelectorFlyout.applyTimeRange', true), { - wrapper: MlStorageContextProvider, + wrapper: Provider, }); expect(result.current[0]).toBe(true); @@ -48,7 +53,7 @@ describe('useStorage', () => { test('returns the value from storage', () => { const { result } = renderHook(() => useStorage('ml.gettingStarted.isDismissed', false), { - wrapper: MlStorageContextProvider, + wrapper: Provider, }); expect(result.current[0]).toBe(true); @@ -58,7 +63,7 @@ describe('useStorage', () => { const { result, waitForNextUpdate } = renderHook( () => useStorage('ml.gettingStarted.isDismissed'), { - wrapper: MlStorageContextProvider, + wrapper: Provider, } ); @@ -79,7 +84,7 @@ describe('useStorage', () => { const { result, waitForNextUpdate } = renderHook( () => useStorage('ml.gettingStarted.isDismissed'), { - wrapper: MlStorageContextProvider, + wrapper: Provider, } ); @@ -100,7 +105,7 @@ describe('useStorage', () => { const { result, waitForNextUpdate } = renderHook( () => useStorage('ml.gettingStarted.isDismissed'), { - wrapper: MlStorageContextProvider, + wrapper: Provider, } ); diff --git a/x-pack/plugins/ml/common/types/storage.ts b/x-pack/plugins/ml/common/types/storage.ts index 34673b7c510596..7e2e1ba7999615 100644 --- a/x-pack/plugins/ml/common/types/storage.ts +++ b/x-pack/plugins/ml/common/types/storage.ts @@ -14,6 +14,14 @@ export const ML_FROZEN_TIER_PREFERENCE = 'ml.frozenDataTierPreference'; export const ML_ANOMALY_EXPLORER_PANELS = 'ml.anomalyExplorerPanels'; export const ML_NOTIFICATIONS_LAST_CHECKED_AT = 'ml.notificationsLastCheckedAt'; +export const FROZEN_TIER_PREFERENCE = { + EXCLUDE: 'exclude-frozen', + INCLUDE: 'include-frozen', +} as const; + +export type FrozenTierPreference = + typeof FROZEN_TIER_PREFERENCE[keyof typeof FROZEN_TIER_PREFERENCE]; + export type PartitionFieldConfig = | { /** @@ -51,14 +59,17 @@ export interface AnomalyExplorerPanelsState { mainPage: { size: number }; } -export type MlStorage = Partial<{ +export interface MlStorageRecord { + [key: string]: unknown; [ML_ENTITY_FIELDS_CONFIG]: PartitionFieldsConfig; [ML_APPLY_TIME_RANGE_CONFIG]: ApplyTimeRangeConfig; [ML_GETTING_STARTED_CALLOUT_DISMISSED]: boolean | undefined; - [ML_FROZEN_TIER_PREFERENCE]: 'exclude-frozen' | 'include-frozen'; + [ML_FROZEN_TIER_PREFERENCE]: FrozenTierPreference; [ML_ANOMALY_EXPLORER_PANELS]: AnomalyExplorerPanelsState | undefined; [ML_NOTIFICATIONS_LAST_CHECKED_AT]: number | undefined; -}> | null; +} + +export type MlStorage = Partial | null; export type MlStorageKey = keyof Exclude; @@ -69,7 +80,7 @@ export type TMlStorageMapped = T extends typeof ML_ENTIT : T extends typeof ML_GETTING_STARTED_CALLOUT_DISMISSED ? boolean | undefined : T extends typeof ML_FROZEN_TIER_PREFERENCE - ? 'exclude-frozen' | 'include-frozen' | undefined + ? FrozenTierPreference | undefined : T extends typeof ML_ANOMALY_EXPLORER_PANELS ? AnomalyExplorerPanelsState | undefined : T extends typeof ML_NOTIFICATIONS_LAST_CHECKED_AT @@ -83,8 +94,4 @@ export const ML_STORAGE_KEYS = [ ML_FROZEN_TIER_PREFERENCE, ML_ANOMALY_EXPLORER_PANELS, ML_NOTIFICATIONS_LAST_CHECKED_AT, -]; - -export function isMlStorageKey(key: unknown): key is MlStorageKey { - return typeof key === 'string' && ML_STORAGE_KEYS.includes(key); -} +] as const; diff --git a/x-pack/plugins/ml/common/util/alerts.ts b/x-pack/plugins/ml/common/util/alerts.ts index 6abc5333a1f735..6c997dfb715664 100644 --- a/x-pack/plugins/ml/common/util/alerts.ts +++ b/x-pack/plugins/ml/common/util/alerts.ts @@ -6,9 +6,9 @@ */ import { pick } from 'lodash'; +import { isDefined } from '@kbn/ml-is-defined'; import { CombinedJobWithStats, Datafeed, Job } from '../types/anomaly_detection_jobs'; import { resolveMaxTimeInterval } from './job_utils'; -import { isDefined } from '../types/guards'; import { parseInterval } from './parse_interval'; import { JobsHealthRuleTestsConfig, JobsHealthTests } from '../types/alerts'; diff --git a/x-pack/plugins/ml/common/util/job_utils.ts b/x-pack/plugins/ml/common/util/job_utils.ts index 4d50af19a8b96e..a0cbb5d5762de4 100644 --- a/x-pack/plugins/ml/common/util/job_utils.ts +++ b/x-pack/plugins/ml/common/util/job_utils.ts @@ -16,6 +16,7 @@ import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import type { SerializableRecord } from '@kbn/utility-types'; import { FilterStateStore } from '@kbn/es-query'; import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { isDefined } from '@kbn/ml-is-defined'; import { ALLOWED_DATA_UNITS, JOB_ID_MAX_LENGTH } from '../constants/validation'; import { parseInterval } from './parse_interval'; import { maxLengthValidator } from './validators'; @@ -35,7 +36,6 @@ import { MLCATEGORY } from '../constants/field_types'; import { getAggregations, getDatafeedAggregations } from './datafeed_utils'; import { findAggField } from './validation_utils'; import { getFirstKeyInObject } from './object_utils'; -import { isDefined } from '../types/guards'; export interface ValidationResults { valid: boolean; diff --git a/x-pack/plugins/ml/public/alerting/jobs_health_rule/anomaly_detection_jobs_health_rule_trigger.tsx b/x-pack/plugins/ml/public/alerting/jobs_health_rule/anomaly_detection_jobs_health_rule_trigger.tsx index 9fff85c82888fa..daab200ff0709d 100644 --- a/x-pack/plugins/ml/public/alerting/jobs_health_rule/anomaly_detection_jobs_health_rule_trigger.tsx +++ b/x-pack/plugins/ml/public/alerting/jobs_health_rule/anomaly_detection_jobs_health_rule_trigger.tsx @@ -12,6 +12,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import useDebounce from 'react-use/lib/useDebounce'; import { RuleTypeParamsExpressionProps } from '@kbn/triggers-actions-ui-plugin/public'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import { isDefined } from '@kbn/ml-is-defined'; import { MlAnomalyDetectionJobsHealthRuleParams } from '../../../common/types/alerts'; import { JobSelectorControl } from '../job_selector'; import { jobsApiProvider } from '../../application/services/ml_api_service/jobs'; @@ -20,7 +21,6 @@ import { useMlKibana } from '../../application/contexts/kibana'; import { TestsSelectionControl } from './tests_selection_control'; import { ALL_JOBS_SELECTION } from '../../../common/constants/alerts'; import { BetaBadge } from '../beta_badge'; -import { isDefined } from '../../../common/types/guards'; export type MlAnomalyAlertTriggerProps = RuleTypeParamsExpressionProps; diff --git a/x-pack/plugins/ml/public/alerting/ml_anomaly_alert_trigger.tsx b/x-pack/plugins/ml/public/alerting/ml_anomaly_alert_trigger.tsx index a5ef1e79434387..980abb23e659d6 100644 --- a/x-pack/plugins/ml/public/alerting/ml_anomaly_alert_trigger.tsx +++ b/x-pack/plugins/ml/public/alerting/ml_anomaly_alert_trigger.tsx @@ -10,6 +10,7 @@ import { EuiSpacer, EuiForm } from '@elastic/eui'; import useMount from 'react-use/lib/useMount'; import { i18n } from '@kbn/i18n'; import { RuleTypeParamsExpressionProps } from '@kbn/triggers-actions-ui-plugin/public'; +import { isDefined } from '@kbn/ml-is-defined'; import { JobSelectorControl } from './job_selector'; import { useMlKibana } from '../application/contexts/kibana'; import { jobsApiProvider } from '../application/services/ml_api_service/jobs'; @@ -29,7 +30,6 @@ import { ConfigValidator } from './config_validator'; import { CombinedJobWithStats } from '../../common/types/anomaly_detection_jobs'; import { AdvancedSettings } from './advanced_settings'; import { getLookbackInterval, getTopNBuckets } from '../../common/util/alerts'; -import { isDefined } from '../../common/types/guards'; import { parseInterval } from '../../common/util/parse_interval'; import { BetaBadge } from './beta_badge'; diff --git a/x-pack/plugins/ml/public/application/app.tsx b/x-pack/plugins/ml/public/application/app.tsx index 98fe9674bb567c..463cb346911447 100644 --- a/x-pack/plugins/ml/public/application/app.tsx +++ b/x-pack/plugins/ml/public/application/app.tsx @@ -15,7 +15,8 @@ import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; -import { MlStorageContextProvider } from './contexts/storage'; +import { StorageContextProvider } from '@kbn/ml-local-storage'; +import { ML_STORAGE_KEYS } from '../../common/types/storage'; import { setDependencyCache, clearCache } from './util/dependency_cache'; import { setLicenseCache } from './license'; import type { MlSetupDependencies, MlStartDependencies } from '../plugin'; @@ -111,9 +112,9 @@ const App: FC = ({ coreStart, deps, appMountParams }) => { mlServices: getMlGlobalServices(coreStart.http, deps.usageCollection), }} > - + - + diff --git a/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.test.tsx b/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.test.tsx index 7566d3664af619..442b1407aaf6d3 100644 --- a/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.test.tsx +++ b/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.test.tsx @@ -20,7 +20,7 @@ jest.mock('./full_time_range_selector_service', () => ({ mockSetFullTimeRange(indexPattern, query), })); -jest.mock('../../contexts/storage', () => { +jest.mock('@kbn/ml-local-storage', () => { return { useStorage: jest.fn(() => 'exclude-frozen'), }; diff --git a/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx b/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx index 9b9154eb336605..3f4c42bc30ca51 100644 --- a/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx +++ b/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx @@ -22,9 +22,15 @@ import { import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; import { i18n } from '@kbn/i18n'; import type { DataView } from '@kbn/data-views-plugin/public'; +import { useStorage } from '@kbn/ml-local-storage'; import { setFullTimeRange } from './full_time_range_selector_service'; -import { useStorage } from '../../contexts/storage'; -import { ML_FROZEN_TIER_PREFERENCE } from '../../../../common/types/storage'; +import { + ML_FROZEN_TIER_PREFERENCE, + FROZEN_TIER_PREFERENCE, + type MlStorageKey, + type TMlStorageMapped, + type FrozenTierPreference, +} from '../../../../common/types/storage'; import { GetTimeFieldRangeResponse } from '../../services/ml_api_service'; interface Props { @@ -34,13 +40,6 @@ interface Props { callback?: (a: GetTimeFieldRangeResponse) => void; } -const FROZEN_TIER_PREFERENCE = { - EXCLUDE: 'exclude-frozen', - INCLUDE: 'include-frozen', -} as const; - -type FrozenTierPreference = typeof FROZEN_TIER_PREFERENCE[keyof typeof FROZEN_TIER_PREFERENCE]; - // Component for rendering a button which automatically sets the range of the time filter // to the time range of data in the index(es) mapped to the supplied Kibana index pattern or query. export const FullTimeRangeSelector: FC = ({ dataView, query, disabled, callback }) => { @@ -53,10 +52,10 @@ export const FullTimeRangeSelector: FC = ({ dataView, query, disabled, ca } const [isPopoverOpen, setPopover] = useState(false); - const [frozenDataPreference, setFrozenDataPreference] = useStorage( - ML_FROZEN_TIER_PREFERENCE, - FROZEN_TIER_PREFERENCE.EXCLUDE - ); + const [frozenDataPreference, setFrozenDataPreference] = useStorage< + MlStorageKey, + TMlStorageMapped + >(ML_FROZEN_TIER_PREFERENCE, FROZEN_TIER_PREFERENCE.EXCLUDE); const onButtonClick = () => { setPopover(!isPopoverOpen); diff --git a/x-pack/plugins/ml/public/application/components/job_selector/job_selector.tsx b/x-pack/plugins/ml/public/application/components/job_selector/job_selector.tsx index 9c49099c459463..fa2808638cbf56 100644 --- a/x-pack/plugins/ml/public/application/components/job_selector/job_selector.tsx +++ b/x-pack/plugins/ml/public/application/components/job_selector/job_selector.tsx @@ -19,6 +19,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { useUrlState } from '@kbn/ml-url-state'; import './_index.scss'; +import { useStorage } from '@kbn/ml-local-storage'; import { Dictionary } from '../../../../common/types/common'; import { IdBadges } from './id_badges'; import { @@ -27,7 +28,6 @@ import { JobSelectorFlyoutProps, } from './job_selector_flyout'; import { MlJobWithTimeRange } from '../../../../common/types/anomaly_detection_jobs'; -import { useStorage } from '../../contexts/storage'; import { ML_APPLY_TIME_RANGE_CONFIG } from '../../../../common/types/storage'; interface GroupObj { diff --git a/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.test.tsx b/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.test.tsx index dd24789462cf7f..ad6c05d07d4e19 100644 --- a/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.test.tsx +++ b/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.test.tsx @@ -8,7 +8,7 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { of, throwError } from 'rxjs'; import { useMlNotifications, MlNotificationsContextProvider } from './ml_notifications_context'; -import { useStorage } from '../storage'; +import { useStorage } from '@kbn/ml-local-storage'; import { useMlKibana } from '../kibana'; const mockCountMessages = jest.fn(() => { @@ -43,7 +43,7 @@ jest.mock('../kibana', () => ({ })); const mockSetStorageValue = jest.fn(); -jest.mock('../storage', () => ({ +jest.mock('@kbn/ml-local-storage', () => ({ useStorage: jest.fn(() => { return [undefined, mockSetStorageValue]; }), diff --git a/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.tsx b/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.tsx index 74b0a1ad54cb88..67e479f1291f5d 100644 --- a/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.tsx +++ b/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.tsx @@ -10,9 +10,13 @@ import { combineLatest, timer } from 'rxjs'; import { switchMap, map, tap, retry } from 'rxjs/operators'; import moment from 'moment'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import { useStorage } from '@kbn/ml-local-storage'; import { useMlKibana } from '../kibana'; -import { useStorage } from '../storage'; -import { ML_NOTIFICATIONS_LAST_CHECKED_AT } from '../../../../common/types/storage'; +import { + ML_NOTIFICATIONS_LAST_CHECKED_AT, + type MlStorageKey, + type TMlStorageMapped, +} from '../../../../common/types/storage'; import { useAsObservable } from '../../hooks'; import type { NotificationsCountResponse } from '../../../../common/types/notifications'; @@ -47,7 +51,10 @@ export const MlNotificationsContextProvider: FC = ({ children }) => { const canGetNotifications = canGetJobs && canGetDataFrameAnalytics && canGetTrainedModels; - const [lastCheckedAt, setLastCheckedAt] = useStorage(ML_NOTIFICATIONS_LAST_CHECKED_AT); + const [lastCheckedAt, setLastCheckedAt] = useStorage< + MlStorageKey, + TMlStorageMapped + >(ML_NOTIFICATIONS_LAST_CHECKED_AT); const lastCheckedAt$ = useAsObservable(lastCheckedAt); /** Holds the value used for the actual request */ diff --git a/x-pack/plugins/ml/public/application/contexts/storage/storage_context.tsx b/x-pack/plugins/ml/public/application/contexts/storage/storage_context.tsx deleted file mode 100644 index 65e2a64ee31811..00000000000000 --- a/x-pack/plugins/ml/public/application/contexts/storage/storage_context.tsx +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { FC, useEffect, useMemo, useCallback, useState, useContext } from 'react'; -import { omit } from 'lodash'; -import { isDefined } from '../../../../common/types/guards'; -import { useMlKibana } from '../kibana'; -import { MlStorage, ML_STORAGE_KEYS, isMlStorageKey } from '../../../../common/types/storage'; -import { MlStorageKey, TMlStorageMapped } from '../../../../common/types/storage'; - -interface StorageAPI { - value: MlStorage; - setValue: >(key: K, value: T) => void; - removeValue: (key: K) => void; -} - -export const MlStorageContext = React.createContext({ - value: null, - setValue() { - throw new Error('MlStorageContext set method is not implemented'); - }, - removeValue() { - throw new Error('MlStorageContext remove method is not implemented'); - }, -}); - -export const MlStorageContextProvider: FC = ({ children }) => { - const { - services: { storage }, - } = useMlKibana(); - - const initialValue = useMemo(() => { - return ML_STORAGE_KEYS.reduce((acc, curr) => { - acc[curr as MlStorageKey] = storage.get(curr); - return acc; - }, {} as Exclude); - }, [storage]); - - const [state, setState] = useState(initialValue); - - const setStorageValue = useCallback( - >(key: K, value: T) => { - storage.set(key, value); - - setState((prevState) => ({ - ...prevState, - [key]: value, - })); - }, - [storage] - ); - - const removeStorageValue = useCallback( - (key: MlStorageKey) => { - storage.remove(key); - setState((prevState) => omit(prevState, key)); - }, - [storage] - ); - - useEffect(function updateStorageOnExternalChange() { - const eventListener = (event: StorageEvent) => { - if (!isMlStorageKey(event.key)) return; - - if (isDefined(event.newValue)) { - setState((prev) => { - return { - ...prev, - [event.key as MlStorageKey]: - typeof event.newValue === 'string' ? JSON.parse(event.newValue) : event.newValue, - }; - }); - } else { - setState((prev) => { - return omit(prev, event.key as MlStorageKey); - }); - } - }; - - /** - * This event listener is only invoked when - * the change happens in another browser's tab. - */ - window.addEventListener('storage', eventListener); - - return () => { - window.removeEventListener('storage', eventListener); - }; - }, []); - - const value: StorageAPI = useMemo(() => { - return { - value: state, - setValue: setStorageValue, - removeValue: removeStorageValue, - }; - }, [state, setStorageValue, removeStorageValue]); - - return {children}; -}; - -/** - * Hook for consuming a storage value - * @param key - * @param initValue - */ -export function useStorage>( - key: K, - initValue?: T -): [ - typeof initValue extends undefined - ? TMlStorageMapped | undefined - : Exclude, undefined>, - (value: TMlStorageMapped) => void -] { - const { value, setValue, removeValue } = useContext(MlStorageContext); - - const resultValue = useMemo(() => { - return (value?.[key] ?? initValue) as typeof initValue extends undefined - ? TMlStorageMapped | undefined - : Exclude, undefined>; - }, [value, key, initValue]); - - const setVal = useCallback( - (v: TMlStorageMapped) => { - if (isDefined(v)) { - setValue(key, v); - } else { - removeValue(key); - } - }, - [setValue, removeValue, key] - ); - - return [resultValue, setVal]; -} diff --git a/x-pack/plugins/ml/public/application/explorer/anomalies_map.tsx b/x-pack/plugins/ml/public/application/explorer/anomalies_map.tsx index b9a1ef555dbc1f..3edfcd9842a18b 100644 --- a/x-pack/plugins/ml/public/application/explorer/anomalies_map.tsx +++ b/x-pack/plugins/ml/public/application/explorer/anomalies_map.tsx @@ -25,8 +25,8 @@ import { VectorLayerDescriptor, } from '@kbn/maps-plugin/common'; import { EMSTermJoinConfig } from '@kbn/maps-plugin/public'; +import { isDefined } from '@kbn/ml-is-defined'; import { useMlKibana } from '../contexts/kibana'; -import { isDefined } from '../../../common/types/guards'; import { MlEmbeddedMapComponent } from '../components/ml_embedded_map'; import { AnomaliesTableRecord } from '../../../common/types/anomalies'; diff --git a/x-pack/plugins/ml/public/application/explorer/anomaly_context_menu.tsx b/x-pack/plugins/ml/public/application/explorer/anomaly_context_menu.tsx index 2bfe0c3b2844e5..55feffe8ff5c40 100644 --- a/x-pack/plugins/ml/public/application/explorer/anomaly_context_menu.tsx +++ b/x-pack/plugins/ml/public/application/explorer/anomaly_context_menu.tsx @@ -19,7 +19,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import useObservable from 'react-use/lib/useObservable'; import type { Query, TimeRange } from '@kbn/es-query'; -import { isDefined } from '../../../common/types/guards'; +import { isDefined } from '@kbn/ml-is-defined'; import { useAnomalyExplorerContext } from './anomaly_explorer_context'; import { escapeKueryForFieldValuePair } from '../util/string_utils'; import { SEARCH_QUERY_LANGUAGE } from '../../../common/constants/search'; diff --git a/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx b/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx index 6b33ba8187d9da..a0ff293a2b2038 100644 --- a/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx +++ b/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx @@ -27,6 +27,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import useDebounce from 'react-use/lib/useDebounce'; import useObservable from 'react-use/lib/useObservable'; import type { Query } from '@kbn/es-query'; +import { isDefined } from '@kbn/ml-is-defined'; import { SEARCH_QUERY_LANGUAGE } from '../../../common/constants/search'; import { useCasesModal } from '../contexts/kibana/use_cases_modal'; import { useTimeRangeUpdates } from '../contexts/kibana/use_timefilter'; @@ -46,7 +47,6 @@ import { AppStateSelectedCells, OverallSwimlaneData, ViewBySwimLaneData } from ' import { NoOverallData } from './components/no_overall_data'; import { SeverityControl } from '../components/severity_control'; import { AnomalyTimelineHelpPopover } from './anomaly_timeline_help_popover'; -import { isDefined } from '../../../common/types/guards'; import { MlTooltipComponent } from '../components/chart_tooltip'; import { SwimlaneAnnotationContainer, Y_AXIS_LABEL_WIDTH } from './swimlane_annotation_container'; import { AnomalyTimelineService } from '../services/anomaly_timeline_service'; diff --git a/x-pack/plugins/ml/public/application/explorer/dashboard_controls/add_anomaly_charts_to_dashboard_controls.tsx b/x-pack/plugins/ml/public/application/explorer/dashboard_controls/add_anomaly_charts_to_dashboard_controls.tsx index 0e928166127fde..cb5d6d2b0201b2 100644 --- a/x-pack/plugins/ml/public/application/explorer/dashboard_controls/add_anomaly_charts_to_dashboard_controls.tsx +++ b/x-pack/plugins/ml/public/application/explorer/dashboard_controls/add_anomaly_charts_to_dashboard_controls.tsx @@ -9,8 +9,8 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { EuiFieldNumber, EuiFormRow, htmlIdGenerator } from '@elastic/eui'; import type { Query } from '@kbn/es-query'; import useObservable from 'react-use/lib/useObservable'; +import { isDefined } from '@kbn/ml-is-defined'; import { getSelectionInfluencers } from '../explorer_utils'; -import { isDefined } from '../../../../common/types/guards'; import { useAnomalyExplorerContext } from '../anomaly_explorer_context'; import { escapeKueryForFieldValuePair } from '../../util/string_utils'; import { SEARCH_QUERY_LANGUAGE } from '../../../../common/constants/search'; diff --git a/x-pack/plugins/ml/public/application/explorer/explorer.tsx b/x-pack/plugins/ml/public/application/explorer/explorer.tsx index 6e224b25f506fd..f764ede7750c90 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer.tsx +++ b/x-pack/plugins/ml/public/application/explorer/explorer.tsx @@ -31,6 +31,8 @@ import { css } from '@emotion/react'; import useObservable from 'react-use/lib/useObservable'; import type { DataView } from '@kbn/data-views-plugin/common'; import type { TimefilterContract } from '@kbn/data-plugin/public'; +import { useStorage } from '@kbn/ml-local-storage'; +import { isDefined } from '@kbn/ml-is-defined'; import { HelpPopover } from '../components/help_popover'; import { AnnotationFlyout } from '../components/annotations/annotation_flyout'; // @ts-ignore @@ -69,7 +71,6 @@ import { AnomaliesTable } from '../components/anomalies_table/anomalies_table'; import { AnomaliesMap } from './anomalies_map'; import { ANOMALY_DETECTION_DEFAULT_TIME_RANGE } from '../../../common/constants/settings'; import { AnomalyContextMenu } from './anomaly_context_menu'; -import { isDefined } from '../../../common/types/guards'; import type { JobSelectorProps } from '../components/job_selector/job_selector'; import type { ExplorerState } from './reducers'; import type { TimeBuckets } from '../util/time_buckets'; @@ -78,7 +79,6 @@ import { useMlKibana, useMlLocator } from '../contexts/kibana'; import { useMlContext } from '../contexts/ml'; import { useAnomalyExplorerContext } from './anomaly_explorer_context'; import { ML_ANOMALY_EXPLORER_PANELS } from '../../../common/types/storage'; -import { useStorage } from '../contexts/storage'; interface ExplorerPageProps { jobSelectorProps: JobSelectorProps; diff --git a/x-pack/plugins/ml/public/application/overview/components/getting_started_callout.tsx b/x-pack/plugins/ml/public/application/overview/components/getting_started_callout.tsx index 7b1f380c906589..d7a0370b4aeac5 100644 --- a/x-pack/plugins/ml/public/application/overview/components/getting_started_callout.tsx +++ b/x-pack/plugins/ml/public/application/overview/components/getting_started_callout.tsx @@ -8,8 +8,8 @@ import React, { FC } from 'react'; import { EuiButton, EuiCallOut, EuiLink, EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; +import { useStorage } from '@kbn/ml-local-storage'; import { useMlKibana } from '../../contexts/kibana'; -import { useStorage } from '../../contexts/storage'; import { ML_GETTING_STARTED_CALLOUT_DISMISSED } from '../../../../common/types/storage'; const feedbackLink = 'https://www.elastic.co/community/'; diff --git a/x-pack/plugins/ml/public/application/services/anomaly_explorer_charts_service.ts b/x-pack/plugins/ml/public/application/services/anomaly_explorer_charts_service.ts index 7aa0bb03611e11..6a0f3c8c692b0b 100644 --- a/x-pack/plugins/ml/public/application/services/anomaly_explorer_charts_service.ts +++ b/x-pack/plugins/ml/public/application/services/anomaly_explorer_charts_service.ts @@ -10,6 +10,7 @@ import { map as mapObservable } from 'rxjs/operators'; import type { TimeRange } from '@kbn/es-query'; import type { TimefilterContract } from '@kbn/data-plugin/public'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import { isDefined } from '@kbn/ml-is-defined'; import type { RecordForInfluencer } from './results_service/results_service'; import type { EntityField } from '../../../common/util/anomaly_utils'; import type { CombinedJob } from '../../../common/types/anomaly_detection_jobs'; @@ -17,7 +18,6 @@ import type { MlApiServices } from './ml_api_service'; import type { MlResultsService } from './results_service'; import { ExplorerChartsData } from '../explorer/explorer_charts/explorer_charts_container_service'; import type { TimeRangeBounds } from '../util/time_buckets'; -import { isDefined } from '../../../common/types/guards'; import type { AppStateSelectedCells } from '../explorer/explorer_utils'; import type { InfluencersFilterQuery } from '../../../common/types/es_client'; import type { SeriesConfigWithMetadata } from '../../../common/types/results'; diff --git a/x-pack/plugins/ml/public/application/services/ml_api_service/notifications.ts b/x-pack/plugins/ml/public/application/services/ml_api_service/notifications.ts index 653ceebc52cdab..fd6f7bd708cd4c 100644 --- a/x-pack/plugins/ml/public/application/services/ml_api_service/notifications.ts +++ b/x-pack/plugins/ml/public/application/services/ml_api_service/notifications.ts @@ -6,7 +6,7 @@ */ import { omitBy } from 'lodash'; -import { isDefined } from '../../../../common/types/guards'; +import { isDefined } from '@kbn/ml-is-defined'; import type { NotificationsQueryParams, NotificationsSearchResponse, diff --git a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx index 23084c8d8886d8..8d79a41b0ab366 100644 --- a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx +++ b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx @@ -10,6 +10,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiSelect, EuiSelectProps } from '@elastic/eui'; import { debounce } from 'lodash'; import { lastValueFrom } from 'rxjs'; +import { useStorage } from '@kbn/ml-local-storage'; import { EntityControl } from '../entity_control'; import { mlJobService } from '../../../services/job_service'; import { Detector, JobId } from '../../../../../common/types/anomaly_detection_jobs'; @@ -23,10 +24,11 @@ import { import { getControlsForDetector } from '../../get_controls_for_detector'; import { ML_ENTITY_FIELDS_CONFIG, - PartitionFieldConfig, - PartitionFieldsConfig, + type PartitionFieldConfig, + type PartitionFieldsConfig, + type MlStorageKey, + type TMlStorageMapped, } from '../../../../../common/types/storage'; -import { useStorage } from '../../../contexts/storage'; import { EntityFieldType } from '../../../../../common/types/anomalies'; import { FieldDefinition } from '../../../services/results_service/result_service_rx'; import { getViewableDetectors } from '../../timeseriesexplorer_utils/get_viewable_detectors'; @@ -113,7 +115,10 @@ export const SeriesControls: FC = ({ return getControlsForDetector(selectedDetectorIndex, selectedEntities, selectedJobId); }, [selectedDetectorIndex, selectedEntities, selectedJobId]); - const [storageFieldsConfig, setStorageFieldsConfig] = useStorage(ML_ENTITY_FIELDS_CONFIG); + const [storageFieldsConfig, setStorageFieldsConfig] = useStorage< + MlStorageKey, + TMlStorageMapped + >(ML_ENTITY_FIELDS_CONFIG); // Merge the default config with the one from the local storage const resultFieldsConfig = useMemo(() => { diff --git a/x-pack/plugins/ml/public/application/trained_models/models_management/expanded_row.tsx b/x-pack/plugins/ml/public/application/trained_models/models_management/expanded_row.tsx index 879bed447c8644..daa813fe4e1e68 100644 --- a/x-pack/plugins/ml/public/application/trained_models/models_management/expanded_row.tsx +++ b/x-pack/plugins/ml/public/application/trained_models/models_management/expanded_row.tsx @@ -24,8 +24,8 @@ import { import { FormattedMessage } from '@kbn/i18n-react'; import { FIELD_FORMAT_IDS } from '@kbn/field-formats-plugin/common'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import { isDefined } from '@kbn/ml-is-defined'; import type { ModelItemFull } from './models_list'; -import { isDefined } from '../../../../common/types/guards'; import { ModelPipelines } from './pipelines'; import { AllocatedModels } from '../nodes_overview/allocated_models'; import type { AllocatedModel } from '../../../../common/types/trained_models'; diff --git a/x-pack/plugins/ml/public/application/util/string_utils.ts b/x-pack/plugins/ml/public/application/util/string_utils.ts index b870cdff345b54..e1fa570efc20c4 100644 --- a/x-pack/plugins/ml/public/application/util/string_utils.ts +++ b/x-pack/plugins/ml/public/application/util/string_utils.ts @@ -12,7 +12,7 @@ import d3 from 'd3'; import he from 'he'; import { escapeKuery } from '@kbn/es-query'; -import { isDefined } from '../../../common/types/guards'; +import { isDefined } from '@kbn/ml-is-defined'; import { CustomUrlAnomalyRecordDoc } from '../../../common/types/custom_urls'; import { Detector } from '../../../common/types/anomaly_detection_jobs'; diff --git a/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts b/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts index 45eef7f63226a1..36182956b73883 100644 --- a/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts +++ b/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts @@ -15,6 +15,7 @@ import { IFieldFormat, SerializedFieldFormat, } from '@kbn/field-formats-plugin/common'; +import { isDefined } from '@kbn/ml-is-defined'; import { MlClient } from '../ml_client'; import { MlAnomalyDetectionAlertParams, @@ -32,7 +33,6 @@ import { } from '../../../common/types/alerts'; import { AnomalyDetectionAlertContext } from './register_anomaly_detection_alert_type'; import { resolveMaxTimeInterval } from '../../../common/util/job_utils'; -import { isDefined } from '../../../common/types/guards'; import { getTopNBuckets, resolveLookbackInterval } from '../../../common/util/alerts'; import type { DatafeedsService } from '../../models/job_service/datafeeds'; import { getEntityFieldName, getEntityFieldValue } from '../../../common/util/anomaly_utils'; diff --git a/x-pack/plugins/ml/server/lib/alerts/jobs_health_service.ts b/x-pack/plugins/ml/server/lib/alerts/jobs_health_service.ts index 4c19846794de15..a1ec1931485acc 100644 --- a/x-pack/plugins/ml/server/lib/alerts/jobs_health_service.ts +++ b/x-pack/plugins/ml/server/lib/alerts/jobs_health_service.ts @@ -9,6 +9,7 @@ import { groupBy, keyBy, memoize, partition } from 'lodash'; import { KibanaRequest, Logger, SavedObjectsClientContract } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; import { MlJob } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { isDefined } from '@kbn/ml-is-defined'; import { MlClient } from '../ml_client'; import { JobSelection } from '../../routes/schemas/alerting_schema'; import { datafeedsProvider, DatafeedsService } from '../../models/job_service/datafeeds'; @@ -30,7 +31,6 @@ import { import { AnnotationService } from '../../models/annotation_service/annotation'; import { annotationServiceProvider } from '../../models/annotation_service'; import { parseInterval } from '../../../common/util/parse_interval'; -import { isDefined } from '../../../common/types/guards'; import { jobAuditMessagesProvider, JobAuditMessagesService, diff --git a/x-pack/plugins/ml/server/models/data_frame_analytics/models_provider.ts b/x-pack/plugins/ml/server/models/data_frame_analytics/models_provider.ts index 1f6bb64fd76f49..ccb60e6379e48e 100644 --- a/x-pack/plugins/ml/server/models/data_frame_analytics/models_provider.ts +++ b/x-pack/plugins/ml/server/models/data_frame_analytics/models_provider.ts @@ -11,6 +11,7 @@ import { MlTrainedModelStats, NodesInfoNodeInfo, } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { isDefined } from '@kbn/ml-is-defined'; import type { NodeDeploymentStatsResponse, PipelineDefinition, @@ -21,7 +22,6 @@ import { TrainedModelDeploymentStatsResponse, TrainedModelModelSizeStats, } from '../../../common/types/trained_models'; -import { isDefined } from '../../../common/types/guards'; export type ModelService = ReturnType; diff --git a/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts b/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts index 136722f4ab5b1f..e9b92c2f01e6c4 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts +++ b/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts @@ -18,6 +18,7 @@ import moment from 'moment'; import { merge } from 'lodash'; import type { DataViewsService } from '@kbn/data-views-plugin/common'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import { isDefined } from '@kbn/ml-is-defined'; import type { AnalysisLimits } from '../../../common/types/anomaly_detection_jobs'; import { getAuthorizationHeader } from '../../lib/request_authorization'; import type { MlClient } from '../../lib/ml_client'; @@ -54,7 +55,6 @@ import { resultsServiceProvider } from '../results_service'; import type { JobExistResult, JobStat } from '../../../common/types/data_recognizer'; import type { Datafeed } from '../../../common/types/anomaly_detection_jobs'; import type { MLSavedObjectService } from '../../saved_objects'; -import { isDefined } from '../../../common/types/guards'; const ML_DIR = 'ml'; const KIBANA_DIR = 'kibana'; diff --git a/x-pack/plugins/ml/server/models/results_service/anomaly_charts.ts b/x-pack/plugins/ml/server/models/results_service/anomaly_charts.ts index dbbf95d4806c25..bcce2455539f7d 100644 --- a/x-pack/plugins/ml/server/models/results_service/anomaly_charts.ts +++ b/x-pack/plugins/ml/server/models/results_service/anomaly_charts.ts @@ -11,6 +11,7 @@ import { each, find, get, keyBy, map, reduce, sortBy } from 'lodash'; import type * as estypes from '@elastic/elasticsearch/lib/api/types'; import { extent, max, min } from 'd3'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import { isDefined } from '@kbn/ml-is-defined'; import type { MlClient } from '../../lib/ml_client'; import { isRuntimeMappings } from '../../../common'; import type { @@ -40,7 +41,6 @@ import { isMultiBucketAnomaly, } from '../../../common/util/anomaly_utils'; import { InfluencersFilterQuery } from '../../../common/types/es_client'; -import { isDefined } from '../../../common/types/guards'; import { AnomalyRecordDoc, CombinedJob, Datafeed, RecordForInfluencer } from '../../shared'; import { ES_AGGREGATION, ML_JOB_AGGREGATION } from '../../../common/constants/aggregation_types'; import { parseInterval } from '../../../common/util/parse_interval'; diff --git a/x-pack/plugins/ml/tsconfig.json b/x-pack/plugins/ml/tsconfig.json index d5d42f865e2c00..2b99e5d22616a6 100644 --- a/x-pack/plugins/ml/tsconfig.json +++ b/x-pack/plugins/ml/tsconfig.json @@ -68,6 +68,8 @@ "@kbn/repo-info", "@kbn/ml-url-state", "@kbn/ml-nested-property", + "@kbn/ml-local-storage", + "@kbn/ml-is-defined", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/transform/common/types/common.ts b/x-pack/plugins/transform/common/types/common.ts index 94cb935f52634d..1cbb370b0a3ab9 100644 --- a/x-pack/plugins/transform/common/types/common.ts +++ b/x-pack/plugins/transform/common/types/common.ts @@ -20,7 +20,3 @@ export function dictionaryToArray(dict: Dictionary): TValue[] { export type DeepPartial = { [P in keyof T]?: DeepPartial; }; - -export function isDefined(argument: T | undefined | null): argument is T { - return argument !== undefined && argument !== null; -} diff --git a/x-pack/plugins/transform/public/alerting/transform_health_rule_type/transform_selector_control.tsx b/x-pack/plugins/transform/public/alerting/transform_health_rule_type/transform_selector_control.tsx index 4300b75cb3fa40..2a44d8fd973f74 100644 --- a/x-pack/plugins/transform/public/alerting/transform_health_rule_type/transform_selector_control.tsx +++ b/x-pack/plugins/transform/public/alerting/transform_health_rule_type/transform_selector_control.tsx @@ -7,8 +7,8 @@ import { EuiComboBox, EuiComboBoxProps, EuiFormRow } from '@elastic/eui'; import React, { FC, useMemo } from 'react'; +import { isDefined } from '@kbn/ml-is-defined'; import { ALL_TRANSFORMS_SELECTION } from '../../../common/constants'; -import { isDefined } from '../../../common/types/common'; export interface TransformSelectorControlProps { label?: string | JSX.Element; diff --git a/x-pack/plugins/transform/public/app/hooks/use_get_transforms.ts b/x-pack/plugins/transform/public/app/hooks/use_get_transforms.ts index c92a7a41da03f1..55e3bc40360cf0 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_get_transforms.ts +++ b/x-pack/plugins/transform/public/app/hooks/use_get_transforms.ts @@ -6,6 +6,7 @@ */ import type { IHttpFetchError } from '@kbn/core-http-browser'; +import { isDefined } from '@kbn/ml-is-defined'; import { isGetTransformNodesResponseSchema, isGetTransformsResponseSchema, @@ -22,7 +23,6 @@ import { import { useApi } from './use_api'; import { TRANSFORM_ERROR_TYPE } from '../common/transform'; -import { isDefined } from '../../../common/types/common'; export type GetTransforms = (forceRefresh?: boolean) => void; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_runtime_mappings_settings/advanced_runtime_mappings_settings.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_runtime_mappings_settings/advanced_runtime_mappings_settings.tsx index a07978e12ec0fa..db617690efc5f6 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_runtime_mappings_settings/advanced_runtime_mappings_settings.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_runtime_mappings_settings/advanced_runtime_mappings_settings.tsx @@ -18,7 +18,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { isDefined } from '../../../../../../common/types/common'; +import { isDefined } from '@kbn/ml-is-defined'; import { StepDefineFormHook } from '../step_define'; import { AdvancedRuntimeMappingsEditor } from '../advanced_runtime_mappings_editor/advanced_runtime_mappings_editor'; import { AdvancedRuntimeMappingsEditorSwitch } from '../advanced_runtime_mappings_editor_switch'; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_pivot_config.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_pivot_config.ts index 962bc45f3d212c..17240497d2057b 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_pivot_config.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_pivot_config.ts @@ -9,8 +9,9 @@ import { useCallback, useMemo, useState } from 'react'; import { i18n } from '@kbn/i18n'; import { KBN_FIELD_TYPES } from '@kbn/field-types'; +import { isDefined } from '@kbn/ml-is-defined'; import { AggName } from '../../../../../../../common/types/aggregations'; -import { dictionaryToArray, isDefined } from '../../../../../../../common/types/common'; +import { dictionaryToArray } from '../../../../../../../common/types/common'; import { useToastNotifications } from '../../../../../app_dependencies'; import { diff --git a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.tsx b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.tsx index d96911cfdaa718..6f1d219ce79281 100644 --- a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.tsx +++ b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.tsx @@ -13,7 +13,7 @@ import { i18n } from '@kbn/i18n'; import { stringHash } from '@kbn/ml-string-hash'; import moment from 'moment-timezone'; -import { isDefined } from '../../../../../../common/types/common'; +import { isDefined } from '@kbn/ml-is-defined'; import { TransformListRow } from '../../../../common'; import { useAppDependencies } from '../../../../app_dependencies'; import { ExpandedRowDetailsPane, SectionConfig, SectionItem } from './expanded_row_details_pane'; diff --git a/x-pack/plugins/transform/tsconfig.json b/x-pack/plugins/transform/tsconfig.json index 2b4b5554ef9d00..8cb77da845d584 100644 --- a/x-pack/plugins/transform/tsconfig.json +++ b/x-pack/plugins/transform/tsconfig.json @@ -45,6 +45,7 @@ "@kbn/ui-theme", "@kbn/field-types", "@kbn/ml-nested-property", + "@kbn/ml-is-defined", ], "exclude": [ "target/**/*", diff --git a/yarn.lock b/yarn.lock index 40ebc66b80d167..423d287bb063e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3773,10 +3773,18 @@ version "0.0.0" uid "" +"@kbn/ml-is-defined@link:x-pack/packages/ml/is_defined": + version "0.0.0" + uid "" + "@kbn/ml-is-populated-object@link:x-pack/packages/ml/is_populated_object": version "0.0.0" uid "" +"@kbn/ml-local-storage@link:x-pack/packages/ml/local_storage": + version "0.0.0" + uid "" + "@kbn/ml-nested-property@link:x-pack/packages/ml/nested_property": version "0.0.0" uid "" From 2a54625321c2a67eb420d41f0f8a50b77846a44a Mon Sep 17 00:00:00 2001 From: Julia Bardi <90178898+juliaElastic@users.noreply.github.com> Date: Thu, 5 Jan 2023 12:11:51 +0100 Subject: [PATCH 12/36] [Fleet] fixed tags query, added missing runtime fields (#148236) ## Summary Partial fix for https://github.com/elastic/kibana/issues/148233 Added missing runtime fields to tags query. This fixes Tags filter on Agent List UI when status filters are present. image Added a quick fix to remove default status filter from bulk update tags. This will not work correctly if there are inactive/unenrolled agents. Update tags with non-default status filters doesn't work either. EDIT: added back status filters on real fields from history, and using them in update tags. The missing piece is to tweak the unenrolled/inactive filters to their latest logic. This should fix update tags on all status filters, though we have the status logic in two places. Ideally the status field should become a real field. image Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../fleet/server/routes/agent/handlers.ts | 3 +- .../fleet/server/services/agents/crud.test.ts | 68 +++++++++++-------- .../fleet/server/services/agents/crud.ts | 4 ++ .../agents/update_agent_tags_action_runner.ts | 7 +- .../services/telemetry/fleet_usages_schema.ts | 24 +++++++ 5 files changed, 76 insertions(+), 30 deletions(-) diff --git a/x-pack/plugins/fleet/server/routes/agent/handlers.ts b/x-pack/plugins/fleet/server/routes/agent/handlers.ts index 2177fcdc252f68..71e21378e6f5f2 100644 --- a/x-pack/plugins/fleet/server/routes/agent/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent/handlers.ts @@ -205,9 +205,10 @@ export const getAgentTagsHandler: RequestHandler< > = async (context, request, response) => { const coreContext = await context.core; const esClient = coreContext.elasticsearch.client.asInternalUser; + const soClient = coreContext.savedObjects.client; try { - const tags = await AgentService.getAgentTags(esClient, { + const tags = await AgentService.getAgentTags(soClient, esClient, { showInactive: request.query.showInactive, kuery: request.query.kuery, }); 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 2a0b341201202c..623ca8d0039bce 100644 --- a/x-pack/plugins/fleet/server/services/agents/crud.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/crud.test.ts @@ -54,17 +54,23 @@ describe('Agents CRUD test', () => { }, }); - const result = await getAgentTags(esClientMock, { showInactive: false }); + const result = await getAgentTags(soClientMock, esClientMock, { showInactive: false }); expect(result).toEqual(['tag1', 'tag2']); - expect(searchMock).toHaveBeenCalledWith({ - aggs: { tags: { terms: { field: 'tags', size: 10000 } } }, - body: { - query: expect.any(Object), - }, - index: '.fleet-agents', - size: 0, - }); + expect(searchMock).toHaveBeenCalledWith( + expect.objectContaining({ + aggs: { tags: { terms: { field: 'tags', size: 10000 } } }, + body: { + query: expect.any(Object), + }, + index: '.fleet-agents', + size: 0, + fields: ['status'], + runtime_mappings: { + status: expect.anything(), + }, + }) + ); }); it('should return empty list if no agent tags', async () => { @@ -74,7 +80,7 @@ describe('Agents CRUD test', () => { }, }); - const result = await getAgentTags(esClientMock, { showInactive: false }); + const result = await getAgentTags(soClientMock, esClientMock, { showInactive: false }); expect(result).toEqual([]); }); @@ -82,7 +88,7 @@ describe('Agents CRUD test', () => { it('should return empty list if no agent index', async () => { searchMock.mockRejectedValueOnce(new errors.ResponseError({ statusCode: 404 } as any)); - const result = await getAgentTags(esClientMock, { showInactive: false }); + const result = await getAgentTags(soClientMock, esClientMock, { showInactive: false }); expect(result).toEqual([]); }); @@ -94,30 +100,36 @@ describe('Agents CRUD test', () => { }, }); - await getAgentTags(esClientMock, { + await getAgentTags(soClientMock, esClientMock, { showInactive: true, kuery: 'fleet-agents.policy_id: 123', }); - expect(searchMock).toHaveBeenCalledWith({ - aggs: { tags: { terms: { field: 'tags', size: 10000 } } }, - body: { - query: { - bool: { - minimum_should_match: 1, - should: [ - { - match: { - policy_id: '123', + expect(searchMock).toHaveBeenCalledWith( + expect.objectContaining({ + aggs: { tags: { terms: { field: 'tags', size: 10000 } } }, + body: { + query: { + bool: { + minimum_should_match: 1, + should: [ + { + match: { + policy_id: '123', + }, }, - }, - ], + ], + }, }, }, - }, - index: '.fleet-agents', - size: 0, - }); + index: '.fleet-agents', + size: 0, + fields: ['status'], + runtime_mappings: { + status: expect.anything(), + }, + }) + ); }); }); diff --git a/x-pack/plugins/fleet/server/services/agents/crud.ts b/x-pack/plugins/fleet/server/services/agents/crud.ts index 3e5c45c10b0f68..412603df68c812 100644 --- a/x-pack/plugins/fleet/server/services/agents/crud.ts +++ b/x-pack/plugins/fleet/server/services/agents/crud.ts @@ -119,6 +119,7 @@ export async function closePointInTime(esClient: ElasticsearchClient, pitId: str } export async function getAgentTags( + soClient: SavedObjectsClientContract, esClient: ElasticsearchClient, options: ListWithKuery & { showInactive: boolean; @@ -137,11 +138,14 @@ export async function getAgentTags( const kueryNode = _joinFilters(filters); const body = kueryNode ? { query: toElasticsearchQuery(kueryNode) } : {}; + const runtimeFields = await buildAgentStatusRuntimeField(soClient); try { const result = await esClient.search<{}, { tags: { buckets: Array<{ key: string }> } }>({ index: AGENTS_INDEX, size: 0, body, + fields: Object.keys(runtimeFields), + runtime_mappings: runtimeFields, aggs: { tags: { terms: { field: 'tags', size: SO_SEARCH_LIMIT }, diff --git a/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts b/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts index b0876a4c27d81e..8abab53e66272d 100644 --- a/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts +++ b/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts @@ -111,7 +111,12 @@ export async function updateTagsBatch( } else if (options.tagsToRemove.length === 1 && options.tagsToAdd.length === 0) { extraFilters.push(`tags:${options.tagsToRemove[0]}`); } - query = getElasticsearchQuery(options.kuery, false, false, hostedIds, extraFilters); + const DEFAULT_STATUS_FILTER = + 'status:online or (status:error or status:degraded) or (status:updating or status:unenrolling or status:enrolling) or status:offline'; + // removing default staus filters, as it is a runtime field and doesn't work with updateByQuery + // this is a quick fix for bulk update tags with default filters + const kuery = options.kuery === DEFAULT_STATUS_FILTER ? '' : options.kuery; + query = getElasticsearchQuery(kuery, false, false, hostedIds, extraFilters); } else { query = { terms: { diff --git a/x-pack/plugins/fleet/server/services/telemetry/fleet_usages_schema.ts b/x-pack/plugins/fleet/server/services/telemetry/fleet_usages_schema.ts index 8e13ca99eb722b..40c3c77f9418cd 100644 --- a/x-pack/plugins/fleet/server/services/telemetry/fleet_usages_schema.ts +++ b/x-pack/plugins/fleet/server/services/telemetry/fleet_usages_schema.ts @@ -60,6 +60,18 @@ export const fleetUsagesSchema: RootSchema = { description: 'The total number of enrolled agents currently offline', }, }, + inactive: { + type: 'long', + _meta: { + description: 'The total number of enrolled agents currently inactive', + }, + }, + unenrolled: { + type: 'long', + _meta: { + description: 'The total number of unenrolled agents', + }, + }, total_all_statuses: { type: 'long', _meta: { @@ -113,6 +125,18 @@ export const fleetUsagesSchema: RootSchema = { description: 'The number of Fleet Server hosts configured in Fleet settings.', }, }, + inactive: { + type: 'long', + _meta: { + description: 'The total number of enrolled agents currently inactive', + }, + }, + unenrolled: { + type: 'long', + _meta: { + description: 'The total number of unenrolled agents', + }, + }, }, }, packages: { From bec8b8c890a545c3a7589d0468dfbd2b08db445e Mon Sep 17 00:00:00 2001 From: Julia Bardi <90178898+juliaElastic@users.noreply.github.com> Date: Thu, 5 Jan 2023 12:54:21 +0100 Subject: [PATCH 13/36] [Fleet] updated based on review comments (#148431) ## Summary Follow up for https://github.com/elastic/kibana/pull/148205 Addressed review comments. --- .../server/services/artifacts/artifacts.ts | 38 ++++++++++------- .../manifest_manager/manifest_manager.ts | 41 ++----------------- 2 files changed, 27 insertions(+), 52 deletions(-) diff --git a/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts b/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts index ec2979d9d17aae..63eace294dd771 100644 --- a/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts +++ b/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts @@ -89,21 +89,26 @@ export const bulkCreateArtifacts = async ( artifacts: NewArtifact[], refresh = false ): Promise<{ artifacts?: Artifact[]; errors?: Error[] }> => { - const ids = artifacts.map((artifact) => uniqueIdFromArtifact(artifact)); - const newArtifactsData = artifacts.map((artifact) => - newArtifactToElasticsearchProperties(artifact) + const { ids, newArtifactsData } = artifacts.reduce<{ + ids: string[]; + newArtifactsData: ArtifactElasticsearchProperties[]; + }>( + (acc, artifact) => { + acc.ids.push(uniqueIdFromArtifact(artifact)); + acc.newArtifactsData.push(newArtifactToElasticsearchProperties(artifact)); + return acc; + }, + { ids: [], newArtifactsData: [] } ); - const body = ids - .map((id, index) => [ - { - create: { - _id: id, - }, + const body = ids.flatMap((id, index) => [ + { + create: { + _id: id, }, - newArtifactsData[index], - ]) - .flatMap((arr) => arr); + }, + newArtifactsData[index], + ]); const res = await withPackageSpan('Bulk create fleet artifacts', () => esClient.bulk({ @@ -113,9 +118,12 @@ export const bulkCreateArtifacts = async ( }) ); if (res.errors) { - const nonConflictErrors = res.items - .filter((item) => item.create?.status !== 409) - .map((item) => new Error(item.create?.error?.reason)); + const nonConflictErrors = res.items.reduce((acc, item) => { + if (item.create?.status !== 409) { + acc.push(new Error(item.create?.error?.reason)); + } + return acc; + }, []); if (nonConflictErrors.length > 0) { return { errors: nonConflictErrors }; } diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts index e7da1219838154..b6c1eeb49e9d5e 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts @@ -8,12 +8,8 @@ import pMap from 'p-map'; import semver from 'semver'; import type LRU from 'lru-cache'; -import { isEqual, isEmpty } from 'lodash'; -import { - type Logger, - type SavedObjectsClientContract, - SavedObjectsErrorHelpers, -} from '@kbn/core/server'; +import { isEqual, isEmpty, keyBy } from 'lodash'; +import { type Logger, type SavedObjectsClientContract } from '@kbn/core/server'; import { ENDPOINT_EVENT_FILTERS_LIST_ID, ENDPOINT_TRUSTED_APPS_LIST_ID, @@ -334,34 +330,6 @@ export class ManifestManager { return { defaultArtifacts, policySpecificArtifacts }; } - /** - * Writes new artifact SO. - * - * @param artifact An InternalArtifactCompleteSchema representing the artifact. - * @returns {Promise<[Error | null, InternalArtifactCompleteSchema | undefined]>} An array with the error if encountered or null and the generated artifact or null. - */ - protected async pushArtifact( - artifact: InternalArtifactCompleteSchema - ): Promise<[Error | null, InternalArtifactCompleteSchema | undefined]> { - const artifactId = getArtifactId(artifact); - let fleetArtifact; - try { - // Write the artifact SO - fleetArtifact = await this.artifactClient.createArtifact(artifact); - - // Cache the compressed body of the artifact - this.cache.set(artifactId, Buffer.from(artifact.body, 'base64')); - } catch (err) { - if (SavedObjectsErrorHelpers.isConflictError(err)) { - this.logger.debug(`Tried to create artifact ${artifactId}, but it already exists.`); - } else { - return [err, undefined]; - } - } - - return [null, fleetArtifact]; - } - /** * Writes new artifact SOs. * @@ -397,10 +365,9 @@ export class ManifestManager { } if (fleetArtifacts) { + const fleetArtfactsByIdentifier = keyBy(fleetArtifacts, 'identifier'); artifactsToCreate.forEach((artifact) => { - const fleetArtifact = fleetArtifacts.find( - (fleetArt) => fleetArt.identifier === artifact.identifier - ); + const fleetArtifact = fleetArtfactsByIdentifier[artifact.identifier]; if (!fleetArtifact) return; const artifactId = getArtifactId(artifact); // Cache the compressed body of the artifact From 19fd0c19fae929b3aed6ea32a6525ae51f4085cd Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Thu, 5 Jan 2023 13:09:42 +0100 Subject: [PATCH 14/36] [UnifiedFieldList] Persist field list sections state in local storage (#148373) Part of https://github.com/elastic/kibana/issues/137779 ## Summary This PR uses localStorage to persist which list sections user prefers to expand/collapse per app (discover and lens state is saved separately). Screenshot 2023-01-04 at 12 26 16 ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) Co-authored-by: Stratoula Kalafateli --- .../components/sidebar/discover_sidebar.tsx | 1 + .../field_list_grouped.test.tsx | 50 +++++++++++++++++++ .../field_list_grouped/field_list_grouped.tsx | 31 ++++++++++-- .../apps/discover/group1/_sidebar.ts | 1 + test/functional/page_objects/discover_page.ts | 4 ++ .../datasources/form_based/datapanel.test.tsx | 1 + .../datasources/form_based/datapanel.tsx | 1 + .../datasources/text_based/datapanel.tsx | 1 + 8 files changed, 87 insertions(+), 3 deletions(-) diff --git a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx index 51cdaadd1cda24..705299c1566d2b 100644 --- a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx +++ b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx @@ -377,6 +377,7 @@ export function DiscoverSidebarComponent({ {...fieldListGroupedProps} renderFieldItem={renderFieldItem} screenReaderDescriptionId={fieldSearchDescriptionId} + localStorageKeyPrefix="discover" /> )} diff --git a/src/plugins/unified_field_list/public/components/field_list_grouped/field_list_grouped.test.tsx b/src/plugins/unified_field_list/public/components/field_list_grouped/field_list_grouped.test.tsx index 778f38168e6c17..9190c6de2859ea 100644 --- a/src/plugins/unified_field_list/public/components/field_list_grouped/field_list_grouped.test.tsx +++ b/src/plugins/unified_field_list/public/components/field_list_grouped/field_list_grouped.test.tsx @@ -431,4 +431,54 @@ describe('UnifiedFieldList + useGroupedFields()', () => { '2 selected fields. 10 popular fields. 25 available fields. 112 unmapped fields. 0 empty fields. 3 meta fields.' ); }); + + it('persists sections state in local storage', async () => { + const wrapper = await mountGroupedList({ + listProps: { + ...defaultProps, + fieldsExistenceStatus: ExistenceFetchStatus.succeeded, + localStorageKeyPrefix: 'test', + }, + hookParams: { + dataViewId: dataView.id!, + allFields: manyFields, + }, + }); + + // only Available is open + expect( + wrapper.find(FieldsAccordion).map((accordion) => accordion.prop('initialIsOpen')) + ).toStrictEqual([true, false, false, false]); + + await act(async () => { + await wrapper + .find('[data-test-subj="fieldListGroupedEmptyFields"]') + .find('button') + .first() + .simulate('click'); + await wrapper.update(); + }); + + // now Empty is open too + expect( + wrapper.find(FieldsAccordion).map((accordion) => accordion.prop('initialIsOpen')) + ).toStrictEqual([true, false, true, false]); + + const wrapper2 = await mountGroupedList({ + listProps: { + ...defaultProps, + fieldsExistenceStatus: ExistenceFetchStatus.succeeded, + localStorageKeyPrefix: 'test', + }, + hookParams: { + dataViewId: dataView.id!, + allFields: manyFields, + }, + }); + + // both Available and Empty are open for the second instance + expect( + wrapper2.find(FieldsAccordion).map((accordion) => accordion.prop('initialIsOpen')) + ).toStrictEqual([true, false, true, false]); + }); }); diff --git a/src/plugins/unified_field_list/public/components/field_list_grouped/field_list_grouped.tsx b/src/plugins/unified_field_list/public/components/field_list_grouped/field_list_grouped.tsx index 9e81cb8c5d476b..1bc84a37ed7e0a 100644 --- a/src/plugins/unified_field_list/public/components/field_list_grouped/field_list_grouped.tsx +++ b/src/plugins/unified_field_list/public/components/field_list_grouped/field_list_grouped.tsx @@ -8,6 +8,7 @@ import { partition, throttle } from 'lodash'; import React, { Fragment, useCallback, useEffect, useMemo, useState } from 'react'; +import useLocalStorage from 'react-use/lib/useLocalStorage'; import { i18n } from '@kbn/i18n'; import { EuiScreenReaderOnly, EuiSpacer } from '@elastic/eui'; import { type DataViewField } from '@kbn/data-views-plugin/common'; @@ -18,10 +19,13 @@ import { ExistenceFetchStatus, FieldsGroup, FieldsGroupNames } from '../../types import './field_list_grouped.scss'; const PAGINATION_SIZE = 50; +export const LOCAL_STORAGE_KEY_SECTIONS = 'unifiedFieldList.initiallyOpenSections'; + +type InitiallyOpenSections = Record; function getDisplayedFieldsLength( fieldGroups: FieldListGroups, - accordionState: Partial> + accordionState: InitiallyOpenSections ) { return Object.entries(fieldGroups) .filter(([key]) => accordionState[key]) @@ -35,6 +39,7 @@ export interface FieldListGroupedProps { renderFieldItem: FieldsAccordionProps['renderFieldItem']; scrollToTopResetCounter: number; screenReaderDescriptionId?: string; + localStorageKeyPrefix?: string; // Your app name: "discover", "lens", etc. If not provided, sections state would not be persisted. 'data-test-subj'?: string; } @@ -45,6 +50,7 @@ function InnerFieldListGrouped({ renderFieldItem, scrollToTopResetCounter, screenReaderDescriptionId, + localStorageKeyPrefix, 'data-test-subj': dataTestSubject = 'fieldListGrouped', }: FieldListGroupedProps) { const hasSyncedExistingFields = @@ -56,9 +62,22 @@ function InnerFieldListGrouped({ ); const [pageSize, setPageSize] = useState(PAGINATION_SIZE); const [scrollContainer, setScrollContainer] = useState(undefined); - const [accordionState, setAccordionState] = useState>>(() => + const [storedInitiallyOpenSections, storeInitiallyOpenSections] = + useLocalStorage( + `${localStorageKeyPrefix ? localStorageKeyPrefix + '.' : ''}${LOCAL_STORAGE_KEY_SECTIONS}`, + {} + ); + const [accordionState, setAccordionState] = useState(() => Object.fromEntries( - fieldGroupsToShow.map(([key, { isInitiallyOpen }]) => [key, isInitiallyOpen]) + fieldGroupsToShow.map(([key, { isInitiallyOpen }]) => { + const storedInitiallyOpen = localStorageKeyPrefix + ? storedInitiallyOpenSections?.[key] + : null; // from localStorage + return [ + key, + typeof storedInitiallyOpen === 'boolean' ? storedInitiallyOpen : isInitiallyOpen, + ]; + }) ) ); @@ -256,6 +275,12 @@ function InnerFieldListGrouped({ Math.min(Math.ceil(pageSize * 1.5), displayedFieldLength) ) ); + if (localStorageKeyPrefix) { + storeInitiallyOpenSections({ + ...storedInitiallyOpenSections, + [key]: open, + }); + } }} showExistenceFetchError={fieldsExistenceStatus === ExistenceFetchStatus.failed} showExistenceFetchTimeout={fieldsExistenceStatus === ExistenceFetchStatus.failed} // TODO: deprecate timeout logic? diff --git a/test/functional/apps/discover/group1/_sidebar.ts b/test/functional/apps/discover/group1/_sidebar.ts index 66c60d22b4d3fe..a62a379c20224a 100644 --- a/test/functional/apps/discover/group1/_sidebar.ts +++ b/test/functional/apps/discover/group1/_sidebar.ts @@ -45,6 +45,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); await kibanaServer.savedObjects.cleanStandardList(); await kibanaServer.uiSettings.replace({}); + await PageObjects.discover.cleanSidebarLocalStorage(); }); describe('field filtering', function () { diff --git a/test/functional/page_objects/discover_page.ts b/test/functional/page_objects/discover_page.ts index b9be3c673448d1..7db95f8063c12a 100644 --- a/test/functional/page_objects/discover_page.ts +++ b/test/functional/page_objects/discover_page.ts @@ -463,6 +463,10 @@ export class DiscoverPageObject extends FtrService { ).getAttribute('innerText'); } + public async cleanSidebarLocalStorage(): Promise { + await this.browser.setLocalStorageItem('discover.unifiedFieldList.initiallyOpenSections', '{}'); + } + public async waitUntilSidebarHasLoaded() { await this.retry.waitFor('sidebar is loaded', async () => { return (await this.getSidebarAriaDescription()).length > 0; diff --git a/x-pack/plugins/lens/public/datasources/form_based/datapanel.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/datapanel.test.tsx index 411b8cd094ab29..f774525518e495 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/datapanel.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/datapanel.test.tsx @@ -374,6 +374,7 @@ describe('FormBased Data Panel', () => { (UseExistingFieldsApi.useExistingFieldsReader as jest.Mock).mockClear(); (UseExistingFieldsApi.useExistingFieldsFetcher as jest.Mock).mockClear(); UseExistingFieldsApi.resetExistingFieldsCache(); + window.localStorage.removeItem('lens.unifiedFieldList.initiallyOpenSections'); }); it('should render a warning if there are no index patterns', async () => { diff --git a/x-pack/plugins/lens/public/datasources/form_based/datapanel.tsx b/x-pack/plugins/lens/public/datasources/form_based/datapanel.tsx index 01feaa41876279..374eb430dae9c4 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/datapanel.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/datapanel.tsx @@ -428,6 +428,7 @@ export const InnerFormBasedDataPanel = function InnerFormBasedDataPanel({ {...fieldListGroupedProps} renderFieldItem={renderFieldItem} data-test-subj="lnsIndexPattern" + localStorageKeyPrefix="lens" /> diff --git a/x-pack/plugins/lens/public/datasources/text_based/datapanel.tsx b/x-pack/plugins/lens/public/datasources/text_based/datapanel.tsx index b278284bad8e9a..aad9bae11faf48 100644 --- a/x-pack/plugins/lens/public/datasources/text_based/datapanel.tsx +++ b/x-pack/plugins/lens/public/datasources/text_based/datapanel.tsx @@ -161,6 +161,7 @@ export function TextBasedDataPanel({ {...fieldListGroupedProps} renderFieldItem={renderFieldItem} data-test-subj="lnsTextBasedLanguages" + localStorageKeyPrefix="lens" /> From 2e15fb52076895c16b6dba2e81de6ed231d09cd6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 5 Jan 2023 13:14:37 +0100 Subject: [PATCH 15/36] Update dependency react-hook-form to ^7.41.2 (main) (#148395) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 8d735d59a50abc..300f60c1d06138 100644 --- a/package.json +++ b/package.json @@ -621,7 +621,7 @@ "react-fast-compare": "^2.0.4", "react-focus-on": "^3.7.0", "react-grid-layout": "^1.3.4", - "react-hook-form": "^7.41.1", + "react-hook-form": "^7.41.2", "react-intl": "^2.8.0", "react-is": "^17.0.2", "react-markdown": "^6.0.3", diff --git a/yarn.lock b/yarn.lock index 423d287bb063e6..51daf4a0a7998a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22848,10 +22848,10 @@ react-grid-layout@^1.3.4: react-draggable "^4.0.0" react-resizable "^3.0.4" -react-hook-form@^7.41.1: - version "7.41.3" - resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.41.3.tgz#1b85e95e70cb743d41cd9230ea2df71359d00151" - integrity sha512-5QNTmqJtDb88WV5n41b6+AmcDMVyaJ3tccPgHAgS215w3jZ3bmJhDO27kNTr8u4YHNYXmS7p1/4/KachBAlUtw== +react-hook-form@^7.41.2: + version "7.41.5" + resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.41.5.tgz#dcd0e7438c15044eadc99df6deb889da5858a03b" + integrity sha512-DAKjSJ7X9f16oQrP3TW2/eD9N6HOgrmIahP4LOdFphEWVfGZ2LulFd6f6AQ/YS/0cx/5oc4j8a1PXxuaurWp/Q== react-input-autosize@^3.0.0: version "3.0.0" From 0a0ea799ef2e0bede53445f192080b35a2585537 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Thu, 5 Jan 2023 08:19:20 -0500 Subject: [PATCH 16/36] [Maps] un-skip X-Pack API Integration Tests.x-pack/test/api_integration/apis/maps/get_grid_tile.js (#148346) Fixes https://github.com/elastic/kibana/issues/148122 https://github.com/elastic/elasticsearch/pull/91956 added Geohex aggregation on geo_shape field and also changed how resolutions are mapped on vector tiles. 85264a33fffffff has resolution 5 and 84264a3ffffffff has resolution 4. The new resolution mappings are in https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/vector-tile/src/main/java/org/elasticsearch/xpack/vectortile/rest/GridAggregation.java#L122. Resolution mapping was changed to avoid hitting bucket limits which are easier to hit with large shapes and hex binning on geo_shape. Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../apis/maps/get_grid_tile.js | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/x-pack/test/api_integration/apis/maps/get_grid_tile.js b/x-pack/test/api_integration/apis/maps/get_grid_tile.js index cd1bc9f6b4c5b5..6f35ca27cb9263 100644 --- a/x-pack/test/api_integration/apis/maps/get_grid_tile.js +++ b/x-pack/test/api_integration/apis/maps/get_grid_tile.js @@ -21,8 +21,7 @@ function findFeature(layer, callbackFn) { export default function ({ getService }) { const supertest = getService('supertest'); - // FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/148122 - describe.skip('getGridTile', () => { + describe('getGridTile', () => { const URL = `/api/maps/mvt/getGridTile/3/2/3.pbf\ ?geometryFieldName=geo.coordinates\ &hasLabels=false\ @@ -145,20 +144,20 @@ export default function ({ getService }) { expect(gridFeature.id).to.be(undefined); expect(gridFeature.properties).to.eql({ _count: 1, - _key: '85264a33fffffff', + _key: '84264a3ffffffff', 'avg_of_bytes.value': 9252, }); // assert feature geometry is hex expect(gridFeature.loadGeometry()).to.eql([ [ - { x: 102, y: 669 }, - { x: 96, y: 676 }, - { x: 86, y: 674 }, - { x: 83, y: 664 }, + { x: 111, y: 698 }, + { x: 89, y: 710 }, + { x: 67, y: 696 }, + { x: 67, y: 669 }, { x: 89, y: 657 }, - { x: 99, y: 659 }, - { x: 102, y: 669 }, + { x: 112, y: 672 }, + { x: 111, y: 698 }, ], ]); }); @@ -183,11 +182,11 @@ export default function ({ getService }) { expect(labelFeature.id).to.be(undefined); expect(labelFeature.properties).to.eql({ _count: 1, - _key: '85264a33fffffff', + _key: '84264a3ffffffff', 'avg_of_bytes.value': 9252, _mvt_label_position: true, }); - expect(labelFeature.loadGeometry()).to.eql([[{ x: 93, y: 667 }]]); + expect(labelFeature.loadGeometry()).to.eql([[{ x: 89, y: 684 }]]); }); it('should return vector tile with meta layer', async () => { From ee3869b0cd441269897ef6b40becd58419fda1b1 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 5 Jan 2023 08:59:34 -0500 Subject: [PATCH 17/36] skip failing test suite (#148111) --- .../security_solution_endpoint/apps/endpoint/endpoint_list.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/endpoint_list.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/endpoint_list.ts index 92ce0a8aaf6d93..2d33467b2dfb56 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/endpoint_list.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/endpoint_list.ts @@ -82,7 +82,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { return tableData; }; - describe('endpoint list', function () { + // Failing: See https://github.com/elastic/kibana/issues/148111 + describe.skip('endpoint list', function () { const sleep = (ms = 100) => new Promise((resolve) => setTimeout(resolve, ms)); let indexedData: IndexedHostsAndAlertsResponse; describe('when initially navigating to page', () => { From ed0e6b2acb618a9f64f71c4997e2de23a27fd632 Mon Sep 17 00:00:00 2001 From: Tomasz Ciecierski Date: Thu, 5 Jan 2023 15:49:40 +0100 Subject: [PATCH 18/36] [Osquery] Substitute Event Data in place of {{parameter}} in Osquery run from Alerts (#146598) --- .../src/live_query/index.ts | 6 +- .../plugins/osquery/common/ecs/file/index.ts | 2 +- .../plugins/osquery/common/ecs/rule/index.ts | 7 +- .../create_live_query_request_body_schema.ts | 4 +- .../common/utils/replace_params_query.test.ts | 85 +++++ .../common/utils/replace_params_query.ts | 33 ++ .../osquery/cypress/e2e/all/alerts.cy.ts | 35 +++ .../osquery/cypress/tasks/response_actions.ts | 1 + .../action_results/action_results_summary.tsx | 48 ++- .../public/actions/use_all_live_queries.ts | 21 +- .../osquery/public/common/contexts.tsx | 8 +- .../form/pack_queries_status_table.tsx | 19 +- .../form/query_pack_selectable.tsx | 24 +- .../osquery/public/live_queries/index.tsx | 19 +- .../form/shards/pack_type_selectable.tsx | 4 + x-pack/plugins/osquery/public/plugin.ts | 2 + .../osquery/public/results/results_table.tsx | 5 +- .../public/routes/saved_queries/edit/tabs.tsx | 21 +- .../lazy_live_query_field.tsx | 9 +- .../shared_components/lazy_osquery_action.tsx | 9 +- .../lazy_osquery_results.tsx | 9 +- .../osquery_action/index.tsx | 3 + .../osquery_response_action_type/index.tsx | 12 +- .../osquery_results/index.tsx | 57 ++-- .../osquery_results/osquery_result.tsx | 2 +- .../osquery_results/osquery_results.test.tsx | 35 +-- .../osquery_results/types.ts | 7 +- x-pack/plugins/osquery/public/types.ts | 2 + .../handlers/action/create_action_handler.ts | 74 ++--- .../server/handlers/action/create_queries.ts | 118 +++++++ x-pack/plugins/osquery/server/plugin.ts | 5 +- .../live_query/create_live_query_route.ts | 3 +- x-pack/plugins/osquery/server/types.ts | 4 +- x-pack/plugins/osquery/tsconfig.json | 1 + .../rule_response_actions/schemas/osquery.ts | 2 - .../event_details/event_details.test.tsx | 27 +- .../components/event_details/osquery_tab.tsx | 75 ++--- .../markdown_editor/plugins/osquery/index.tsx | 291 +----------------- .../markdown_editor/plugins/osquery/parser.ts | 76 +++++ .../plugins/osquery/plugin.tsx | 172 +++++++++++ .../plugins/osquery/renderer.tsx | 78 +++++ .../common/lib/kibana/__mocks__/index.ts | 1 + .../osquery_investigation_guide_panel.tsx | 65 ++++ .../response_actions_form.test.tsx | 26 +- .../response_actions_form.tsx | 4 +- .../response_actions_list.tsx | 94 +++--- .../response_actions_wrapper.tsx | 60 ++++ .../rule_response_actions/utils.test.ts | 89 ++++++ .../rule_response_actions/utils.tsx | 55 ++++ .../components/osquery/osquery_flyout.tsx | 21 +- ...dule_notification_response_actions.test.ts | 103 +++++++ .../schedule_notification_response_actions.ts | 70 ++++- .../plugins/security_solution/tsconfig.json | 1 + 53 files changed, 1405 insertions(+), 599 deletions(-) create mode 100644 x-pack/plugins/osquery/common/utils/replace_params_query.test.ts create mode 100644 x-pack/plugins/osquery/common/utils/replace_params_query.ts create mode 100644 x-pack/plugins/osquery/server/handlers/action/create_queries.ts create mode 100644 x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/parser.ts create mode 100644 x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/plugin.tsx create mode 100644 x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/renderer.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/osquery/osquery_investigation_guide_panel.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_wrapper.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.test.ts create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.test.ts diff --git a/packages/kbn-osquery-io-ts-types/src/live_query/index.ts b/packages/kbn-osquery-io-ts-types/src/live_query/index.ts index 08352be1e78cae..378bb446cafab8 100644 --- a/packages/kbn-osquery-io-ts-types/src/live_query/index.ts +++ b/packages/kbn-osquery-io-ts-types/src/live_query/index.ts @@ -99,6 +99,8 @@ export const arrayQueries = t.array( ecs_mapping: ecsMappingOrUndefined, version: versionOrUndefined, platform: platformOrUndefined, + removed: removedOrUndefined, + snapshot: snapshotOrUndefined, }) ); export type ArrayQueries = t.TypeOf; @@ -111,10 +113,12 @@ export const objectQueries = t.record( version: versionOrUndefined, platform: platformOrUndefined, saved_query_id: savedQueryIdOrUndefined, + removed: removedOrUndefined, + snapshot: snapshotOrUndefined, }) ); export type ObjectQueries = t.TypeOf; export const queries = t.union([arrayQueries, objectQueries]); export type Queries = t.TypeOf; -export const queriesOrUndefined = t.union([queries, t.undefined]); +export const queriesOrUndefined = t.union([arrayQueries, t.undefined]); // in the future we might need to support `objectQueries` so use `queries` instead of `arrayQueries` - now removing this because of strange type issue where query is a number export type QueriesOrUndefined = t.TypeOf; diff --git a/x-pack/plugins/osquery/common/ecs/file/index.ts b/x-pack/plugins/osquery/common/ecs/file/index.ts index 5b8a269b7941e3..6a69ea1b70ae5c 100644 --- a/x-pack/plugins/osquery/common/ecs/file/index.ts +++ b/x-pack/plugins/osquery/common/ecs/file/index.ts @@ -10,7 +10,7 @@ export interface CodeSignature { trusted: string[]; } export interface Ext { - code_signature: CodeSignature[] | CodeSignature; + code_signature?: CodeSignature[] | CodeSignature; } export interface Hash { sha256: string[]; diff --git a/x-pack/plugins/osquery/common/ecs/rule/index.ts b/x-pack/plugins/osquery/common/ecs/rule/index.ts index 51d7722a3ecdec..ae7e5064a8eced 100644 --- a/x-pack/plugins/osquery/common/ecs/rule/index.ts +++ b/x-pack/plugins/osquery/common/ecs/rule/index.ts @@ -9,7 +9,7 @@ export interface RuleEcs { id?: string[]; rule_id?: string[]; name?: string[]; - false_positives: string[]; + false_positives?: string[]; saved_id?: string[]; timeline_id?: string[]; timeline_title?: string[]; @@ -27,10 +27,7 @@ export interface RuleEcs { severity?: string[]; tags?: string[]; threat?: unknown; - threshold?: { - field: string | string[]; - value: number; - }; + threshold?: unknown; type?: string[]; size?: string[]; to?: string[]; diff --git a/x-pack/plugins/osquery/common/schemas/routes/live_query/create_live_query_request_body_schema.ts b/x-pack/plugins/osquery/common/schemas/routes/live_query/create_live_query_request_body_schema.ts index beb46aac98b582..462490fdbae965 100644 --- a/x-pack/plugins/osquery/common/schemas/routes/live_query/create_live_query_request_body_schema.ts +++ b/x-pack/plugins/osquery/common/schemas/routes/live_query/create_live_query_request_body_schema.ts @@ -12,7 +12,7 @@ import { savedQueryIdOrUndefined, packIdOrUndefined, queryOrUndefined, - queriesOrUndefined, + arrayQueries, } from '@kbn/osquery-io-ts-types'; export const createLiveQueryRequestBodySchema = t.partial({ @@ -21,7 +21,7 @@ export const createLiveQueryRequestBodySchema = t.partial({ agent_platforms: t.array(t.string), agent_policy_ids: t.array(t.string), query: queryOrUndefined, - queries: queriesOrUndefined, + queries: arrayQueries, saved_query_id: savedQueryIdOrUndefined, ecs_mapping: ecsMappingOrUndefined, pack_id: packIdOrUndefined, diff --git a/x-pack/plugins/osquery/common/utils/replace_params_query.test.ts b/x-pack/plugins/osquery/common/utils/replace_params_query.test.ts new file mode 100644 index 00000000000000..3a6a5416f2b97a --- /dev/null +++ b/x-pack/plugins/osquery/common/utils/replace_params_query.test.ts @@ -0,0 +1,85 @@ +/* + * Copyright 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 { replaceParamsQuery } from './replace_params_query'; + +describe('replaceParamsQuery', () => { + it('should return unchanged query, and skipped true', () => { + const query = 'SELECT * FROM processes WHERE version = {{params.version}}'; + const { result, skipped } = replaceParamsQuery(query, {}); + expect(result).toBe(query); + expect(skipped).toBe(true); + }); + it('should return proper value instead of params if field is found', () => { + const query = 'SELECT * FROM processes WHERE version = {{kibana.version}}'; + const { result, skipped } = replaceParamsQuery(query, { kibana: { version: '8.7.0' } }); + const expectedQuery = 'SELECT * FROM processes WHERE version = 8.7.0'; + expect(result).toBe(expectedQuery); + expect(skipped).toBe(false); + }); + it('should return proper value instead of params with multiple params', () => { + const query = + 'SELECT * FROM processes WHERE version = {{kibana.version}} and pid = {{kibana.pid}}'; + const { result, skipped } = replaceParamsQuery(query, { + kibana: { version: '8.7.0', pid: '123' }, + }); + const expectedQuery = 'SELECT * FROM processes WHERE version = 8.7.0 and pid = 123'; + expect(result).toBe(expectedQuery); + expect(skipped).toBe(false); + }); + it('should return proper value if param has white spaces inside', () => { + const query = 'SELECT * FROM processes WHERE version = {{ kibana.version }}'; + const { result, skipped } = replaceParamsQuery(query, { kibana: { version: '8.7.0' } }); + const expectedQuery = 'SELECT * FROM processes WHERE version = 8.7.0'; + expect(result).toBe(expectedQuery); + expect(skipped).toBe(false); + }); + + it('should not change query if there are no opening curly braces but still skipped false', () => { + const query = 'SELECT * FROM processes WHERE version = kibana.version }}'; + const { result, skipped } = replaceParamsQuery(query, { kibana: { version: '8.7.0' } }); + const expectedQuery = 'SELECT * FROM processes WHERE version = kibana.version }}'; + expect(result).toBe(expectedQuery); + expect(skipped).toBe(false); + }); + it('should return skipped true if {{params}} field not found', () => { + const query = + 'SELECT * FROM processes WHERE version = {{kibana.version}} {{not.existing}} {{agent.name}}'; + const { result, skipped } = replaceParamsQuery(query, { + kibana: { version: '8.7.0' }, + agent: { name: 'testAgent' }, + }); + const expectedQuery = + 'SELECT * FROM processes WHERE version = 8.7.0 {{not.existing}} testAgent'; + expect(result).toBe(expectedQuery); + expect(skipped).toBe(true); + }); + it('should return replaced values even if params are duplicated, but also return skip true', () => { + const query = + 'SELECT * FROM processes WHERE version = {{ kibana.version}} {{not.existing }} {{kibana.version}} {{kibana.version}} {{agent.name}}'; + const { result, skipped } = replaceParamsQuery(query, { + kibana: { version: '8.7.0' }, + agent: { name: 'testAgent' }, + }); + const expectedQuery = + 'SELECT * FROM processes WHERE version = 8.7.0 {{not.existing }} 8.7.0 8.7.0 testAgent'; + expect(result).toBe(expectedQuery); + expect(skipped).toBe(true); + }); + + it('handle complex windows query with registry as param', () => { + // eslint-disable-next-line no-useless-escape + const query = `select * FROM registry WHERE key LIKE 'HKEY_USERS\{{user.id}}\Software\Microsoft\IdentityCRL\Immersive\production\Token\{0CB4A94A-6E8C-477B-88C8-A3799FC97414}'`; + const { result, skipped } = replaceParamsQuery(query, { + user: { id: 'S-1-5-20' }, + }); + // eslint-disable-next-line no-useless-escape + const expectedQuery = `select * FROM registry WHERE key LIKE 'HKEY_USERS\S-1-5-20\Software\Microsoft\IdentityCRL\Immersive\production\Token\{0CB4A94A-6E8C-477B-88C8-A3799FC97414}'`; + expect(result).toBe(expectedQuery); + expect(skipped).toBe(false); + }); +}); diff --git a/x-pack/plugins/osquery/common/utils/replace_params_query.ts b/x-pack/plugins/osquery/common/utils/replace_params_query.ts new file mode 100644 index 00000000000000..2f7df42e6a3b19 --- /dev/null +++ b/x-pack/plugins/osquery/common/utils/replace_params_query.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 { each, get } from 'lodash'; + +export const replaceParamsQuery = (query: string, data: object) => { + const regex = /\{{([^}]+)\}}/g; // when there are 2 opening and 2 closing curly brackets (including brackets) + const matchedBrackets = query.match(regex); + let resultQuery = query; + + if (matchedBrackets) { + each(matchedBrackets, (bracesText: string) => { + const field = bracesText.replace(/{{|}}/g, '').trim(); + if (resultQuery.includes(bracesText)) { + const foundFieldValue = get(data, field); + if (foundFieldValue) { + resultQuery = resultQuery.replace(bracesText, foundFieldValue); + } + } + }); + } + + const skipped = regex.test(resultQuery); + + return { + result: resultQuery, + skipped, + }; +}; diff --git a/x-pack/plugins/osquery/cypress/e2e/all/alerts.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/alerts.cy.ts index 3c52f70b6d491e..9fb916f1e4b7a9 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/alerts.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/alerts.cy.ts @@ -10,6 +10,7 @@ import { RESPONSE_ACTIONS_ITEM_1, RESPONSE_ACTIONS_ITEM_2, OSQUERY_RESPONSE_ACTION_ADD_BUTTON, + RESPONSE_ACTIONS_ITEM_3, } from '../../tasks/response_actions'; import { ArchiverMethod, runKbnArchiverScript } from '../../tasks/archiver'; import { login } from '../../tasks/login'; @@ -196,6 +197,40 @@ describe('Alert Event Details', () => { }); }); + it('should be able to add investigation guides to response actions', () => { + const investigationGuideNote = + 'It seems that you have suggested queries in investigation guide, would you like to add them as response actions?'; + cy.visit('/app/security/rules'); + cy.contains(RULE_NAME).click(); + cy.contains('Edit rule settings').click(); + cy.getBySel('edit-rule-actions-tab').wait(500).click(); + + cy.getBySel(RESPONSE_ACTIONS_ITEM_0).within(() => { + cy.contains('Example'); + }); + cy.getBySel(RESPONSE_ACTIONS_ITEM_1).within(() => { + cy.contains('select * from uptime'); + }); + cy.getBySel(RESPONSE_ACTIONS_ITEM_2).should('not.exist'); + cy.getBySel(RESPONSE_ACTIONS_ITEM_3).should('not.exist'); + cy.contains(investigationGuideNote); + cy.getBySel('osqueryAddInvestigationGuideQueries').click(); + cy.contains(investigationGuideNote).should('not.exist'); + + cy.getBySel(RESPONSE_ACTIONS_ITEM_0).within(() => { + cy.contains('Example'); + }); + cy.getBySel(RESPONSE_ACTIONS_ITEM_1).within(() => { + cy.contains('select * from uptime'); + }); + cy.getBySel(RESPONSE_ACTIONS_ITEM_2).within(() => { + cy.contains('SELECT * FROM processes;'); + }); + cy.getBySel(RESPONSE_ACTIONS_ITEM_3).within(() => { + cy.contains('select * from users'); + }); + }); + it('should be able to run live query and add to timeline (-depending on the previous test)', () => { const TIMELINE_NAME = 'Untitled timeline'; cy.visit('/app/security/alerts'); diff --git a/x-pack/plugins/osquery/cypress/tasks/response_actions.ts b/x-pack/plugins/osquery/cypress/tasks/response_actions.ts index 2c9d7266483406..4a5567238c8fd9 100644 --- a/x-pack/plugins/osquery/cypress/tasks/response_actions.ts +++ b/x-pack/plugins/osquery/cypress/tasks/response_actions.ts @@ -8,5 +8,6 @@ export const RESPONSE_ACTIONS_ITEM_0 = 'response-actions-list-item-0'; export const RESPONSE_ACTIONS_ITEM_1 = 'response-actions-list-item-1'; export const RESPONSE_ACTIONS_ITEM_2 = 'response-actions-list-item-2'; +export const RESPONSE_ACTIONS_ITEM_3 = 'response-actions-list-item-3'; export const OSQUERY_RESPONSE_ACTION_ADD_BUTTON = 'osquery-response-action-type-selection-option'; diff --git a/x-pack/plugins/osquery/public/action_results/action_results_summary.tsx b/x-pack/plugins/osquery/public/action_results/action_results_summary.tsx index 81feb53fb40128..d8299dd672d351 100644 --- a/x-pack/plugins/osquery/public/action_results/action_results_summary.tsx +++ b/x-pack/plugins/osquery/public/action_results/action_results_summary.tsx @@ -18,6 +18,7 @@ interface ActionResultsSummaryProps { actionId: string; expirationDate?: string; agentIds?: string[]; + error?: string; } const renderErrorMessage = (error: string) => ( @@ -30,6 +31,7 @@ const ActionResultsSummaryComponent: React.FC = ({ actionId, expirationDate, agentIds, + error, }) => { const [pageIndex] = useState(0); const [pageSize] = useState(50); @@ -52,22 +54,42 @@ const ActionResultsSummaryComponent: React.FC = ({ isLive, skip: !hasActionResultsPrivileges, }); - if (expired) { - edges.forEach((edge) => { - if (!edge.fields?.completed_at && edge.fields) { - edge.fields['error.keyword'] = edge.fields.error = [ - i18n.translate('xpack.osquery.liveQueryActionResults.table.expiredErrorText', { - defaultMessage: 'The action request timed out.', - }), - ]; - } - }); - } + + useEffect(() => { + if (error) { + edges.forEach((edge) => { + if (edge.fields) { + edge.fields['error.skipped'] = edge.fields.error = [ + i18n.translate('xpack.osquery.liveQueryActionResults.table.skippedErrorText', { + defaultMessage: + "This query hasn't been called due to parameter used and its value not found in the alert.", + }), + ]; + } + }); + } else if (expired) { + edges.forEach((edge) => { + if (!edge.fields?.completed_at && edge.fields) { + edge.fields['error.keyword'] = edge.fields.error = [ + i18n.translate('xpack.osquery.liveQueryActionResults.table.expiredErrorText', { + defaultMessage: 'The action request timed out.', + }), + ]; + } + }); + } + }, [edges, error, expired]); const renderAgentIdColumn = useCallback((agentId) => , []); const renderRowsColumn = useCallback((rowsCount) => rowsCount ?? '-', []); const renderStatusColumn = useCallback( (_, item) => { + if (item.fields['error.skipped']) { + return i18n.translate('xpack.osquery.liveQueryActionResults.table.skippedStatusText', { + defaultMessage: 'skipped', + }); + } + if (!item.fields.completed_at) { return expired ? i18n.translate('xpack.osquery.liveQueryActionResults.table.expiredStatusText', { @@ -139,11 +161,11 @@ const ActionResultsSummaryComponent: React.FC = ({ useEffect(() => { setIsLive(() => { - if (!agentIds?.length || expired) return false; + if (!agentIds?.length || expired || error) return false; return !!(aggregations.totalResponded !== agentIds?.length); }); - }, [agentIds?.length, aggregations.totalResponded, expired]); + }, [agentIds?.length, aggregations.totalResponded, error, expired]); return edges.length ? ( diff --git a/x-pack/plugins/osquery/public/actions/use_all_live_queries.ts b/x-pack/plugins/osquery/public/actions/use_all_live_queries.ts index 8310217a7f8646..78a6514ce4a3ad 100644 --- a/x-pack/plugins/osquery/public/actions/use_all_live_queries.ts +++ b/x-pack/plugins/osquery/public/actions/use_all_live_queries.ts @@ -10,33 +10,42 @@ import { useQuery } from '@tanstack/react-query'; import { i18n } from '@kbn/i18n'; import { createFilter } from '../common/helpers'; import { useKibana } from '../common/lib/kibana'; -import type { ActionEdges, ActionsStrategyResponse, Direction } from '../../common/search_strategy'; +import type { ActionEdges, ActionsStrategyResponse } from '../../common/search_strategy'; import type { ESTermQuery, ESExistsQuery } from '../../common/typed_json'; import { useErrorToast } from '../common/hooks/use_error_toast'; +import { Direction } from '../../common/search_strategy'; -interface UseAllLiveQueries { +export interface UseAllLiveQueriesConfig { activePage: number; - direction: Direction; + direction?: Direction; limit: number; sortField: string; filterQuery?: ESTermQuery | ESExistsQuery | string; skip?: boolean; + alertId?: string; } +// Make sure we keep this and ACTIONS_QUERY_KEY in osquery_flyout.tsx in sync. +const ACTIONS_QUERY_KEY = 'actions'; + export const useAllLiveQueries = ({ activePage, - direction, + direction = Direction.desc, limit, sortField, filterQuery, skip = false, -}: UseAllLiveQueries) => { + alertId, +}: UseAllLiveQueriesConfig) => { const { http } = useKibana().services; const setErrorToast = useErrorToast(); return useQuery( - ['actions', { activePage, direction, limit, sortField }], + [ + ACTIONS_QUERY_KEY, + { activePage, direction, limit, sortField, ...(alertId ? { alertId } : {}) }, + ], () => http.get<{ data: Omit & { items: ActionEdges } }>( '/api/osquery/live_queries', diff --git a/x-pack/plugins/osquery/public/common/contexts.tsx b/x-pack/plugins/osquery/public/common/contexts.tsx index e035e08710a91b..f0967f9c94d448 100644 --- a/x-pack/plugins/osquery/public/common/contexts.tsx +++ b/x-pack/plugins/osquery/public/common/contexts.tsx @@ -6,10 +6,6 @@ */ import React from 'react'; +import type { Ecs } from '../../common/ecs'; -export interface AlertEcsData { - _id: string; - _index?: string; -} - -export const AlertAttachmentContext = React.createContext(null); +export const AlertAttachmentContext = React.createContext(null); diff --git a/x-pack/plugins/osquery/public/live_queries/form/pack_queries_status_table.tsx b/x-pack/plugins/osquery/public/live_queries/form/pack_queries_status_table.tsx index 78bde0469651d0..6808684fa8cf34 100644 --- a/x-pack/plugins/osquery/public/live_queries/form/pack_queries_status_table.tsx +++ b/x-pack/plugins/osquery/public/live_queries/form/pack_queries_status_table.tsx @@ -86,7 +86,7 @@ const DocsColumnResults: React.FC = ({ count, isLive }) {count ? {count} : '-'} - {isLive ? ( + {!isLive ? ( @@ -130,6 +130,7 @@ type PackQueryStatusItem = Partial<{ status?: string; pending?: number; docs?: number; + error?: string; }>; interface PackQueriesStatusTableProps { @@ -192,15 +193,12 @@ const PackQueriesStatusTableComponent: React.FC = ( [handleQueryFlyoutOpen] ); - const renderDocsColumn = useCallback( - (item: PackQueryStatusItem) => ( - - ), - [] - ); + const renderDocsColumn = useCallback((item: PackQueryStatusItem) => { + const isLive = + !item?.status || !!item.error || (item?.status !== 'running' && item?.pending === 0); + + return ; + }, []); const renderAgentsColumn = useCallback((item) => { if (!item.action_id) return; @@ -239,6 +237,7 @@ const PackQueriesStatusTableComponent: React.FC = ( endDate={expirationDate} agentIds={agentIds} failedAgentsCount={item?.failed ?? 0} + error={item.error} />
diff --git a/x-pack/plugins/osquery/public/live_queries/form/query_pack_selectable.tsx b/x-pack/plugins/osquery/public/live_queries/form/query_pack_selectable.tsx index 97618369dfd81d..f3e8c2d9cc9669 100644 --- a/x-pack/plugins/osquery/public/live_queries/form/query_pack_selectable.tsx +++ b/x-pack/plugins/osquery/public/live_queries/form/query_pack_selectable.tsx @@ -12,22 +12,29 @@ import styled from 'styled-components'; import { useController } from 'react-hook-form'; const StyledEuiCard = styled(EuiCard)` - padding: 16px 92px 16px 16px !important; - + padding: 0; + display: flex; + flex-direction: row; + border: ${(props) => { + if (props.selectable?.isSelected) { + return `1px solid ${props.theme.eui.euiColorSuccess}`; + } + }}; + .euiCard__content { + padding: 16px 92px 16px 16px !important; + } .euiTitle { font-size: 1rem; } - .euiText { margin-top: 0; color: ${(props) => props.theme.eui.euiTextSubduedColor}; } > button[role='switch'] { - left: auto; + min-inline-size: 80px; height: 100% !important; width: 80px; - right: 0; border-radius: 0 5px 5px 0; > span { @@ -43,12 +50,7 @@ const StyledEuiCard = styled(EuiCard)` } } } - - button[aria-checked='false'] > span > svg { - display: none; - } `; - interface QueryPackSelectableProps { canRunSingleQuery: boolean; canRunPacks: boolean; @@ -79,6 +81,7 @@ export const QueryPackSelectable = ({ onClick: () => handleChange('query'), isSelected: queryType === 'query', iconType: 'check', + textProps: {}, // this is needed for the text to get wrapped in span }), [queryType, handleChange] ); @@ -88,6 +91,7 @@ export const QueryPackSelectable = ({ onClick: () => handleChange('pack'), isSelected: queryType === 'pack', iconType: 'check', + textProps: {}, // this is needed for the text to get wrapped in span }), [queryType, handleChange] ); diff --git a/x-pack/plugins/osquery/public/live_queries/index.tsx b/x-pack/plugins/osquery/public/live_queries/index.tsx index c0900c8565d376..9f149c00826695 100644 --- a/x-pack/plugins/osquery/public/live_queries/index.tsx +++ b/x-pack/plugins/osquery/public/live_queries/index.tsx @@ -7,10 +7,12 @@ import { castArray, isEmpty, pickBy } from 'lodash'; import { EuiCode, EuiLoadingContent, EuiEmptyPrompt } from '@elastic/eui'; -import React, { useMemo } from 'react'; +import React, { useContext, useMemo } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import type { ECSMapping } from '@kbn/osquery-io-ts-types'; +import { replaceParamsQuery } from '../../common/utils/replace_params_query'; +import { AlertAttachmentContext } from '../common/contexts'; import { LiveQueryForm } from './form'; import { useActionResultsPrivileges } from '../action_results/use_action_privileges'; import { OSQUERY_INTEGRATION_NAME } from '../../common'; @@ -72,19 +74,30 @@ const LiveQueryComponent: React.FC = ({ return null; }, [agentId, agentIds, agentPolicyIds, agentSelection]); + const ecsData = useContext(AlertAttachmentContext); + + const initialQuery = useMemo(() => { + if (ecsData && query) { + const { result } = replaceParamsQuery(query, ecsData); + + return result; + } + + return query; + }, [ecsData, query]); const defaultValue = useMemo(() => { const initialValue = { ...(initialAgentSelection ? { agentSelection: initialAgentSelection } : {}), alertIds, - query, + query: initialQuery, savedQueryId, ecs_mapping, packId, }; return !isEmpty(pickBy(initialValue, (value) => !isEmpty(value))) ? initialValue : undefined; - }, [alertIds, ecs_mapping, initialAgentSelection, packId, query, savedQueryId]); + }, [alertIds, ecs_mapping, initialAgentSelection, initialQuery, packId, savedQueryId]); if (isLoading) { return ; diff --git a/x-pack/plugins/osquery/public/packs/form/shards/pack_type_selectable.tsx b/x-pack/plugins/osquery/public/packs/form/shards/pack_type_selectable.tsx index 35da6a666ea228..a63fe1fb57c9d9 100644 --- a/x-pack/plugins/osquery/public/packs/form/shards/pack_type_selectable.tsx +++ b/x-pack/plugins/osquery/public/packs/form/shards/pack_type_selectable.tsx @@ -23,6 +23,10 @@ const StyledEuiCard = styled(EuiCard)` font-size: 1rem; } + .euiSpacer { + display: none; + } + .euiText { margin-top: 0; margin-left: 25px; diff --git a/x-pack/plugins/osquery/public/plugin.ts b/x-pack/plugins/osquery/public/plugin.ts index 7e7a91da2e908b..fa36d5adabfb6c 100644 --- a/x-pack/plugins/osquery/public/plugin.ts +++ b/x-pack/plugins/osquery/public/plugin.ts @@ -14,6 +14,7 @@ import type { } from '@kbn/core/public'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; +import { useAllLiveQueries } from './actions/use_all_live_queries'; import { getLazyOsqueryResponseActionTypeForm } from './shared_components/lazy_osquery_action_params_form'; import { useFetchStatus } from './fleet_integration/use_fetch_status'; import { getLazyOsqueryResults } from './shared_components/lazy_osquery_results'; @@ -128,6 +129,7 @@ export class OsqueryPlugin implements Plugin = ({ @@ -70,6 +71,7 @@ const ResultsTableComponent: React.FC = ({ startDate, endDate, liveQueryActionId, + error, }) => { const [isLive, setIsLive] = useState(true); const { data: hasActionResultsPrivileges } = useActionResultsPrivileges(); @@ -367,7 +369,7 @@ const ResultsTableComponent: React.FC = ({ useEffect( () => setIsLive(() => { - if (!agentIds?.length || expired) return false; + if (!agentIds?.length || expired || error) return false; return !!( aggregations.totalResponded !== agentIds?.length || @@ -381,6 +383,7 @@ const ResultsTableComponent: React.FC = ({ aggregations?.totalRowCount, allResultsData?.edges.length, allResultsData?.total, + error, expired, ] ); diff --git a/x-pack/plugins/osquery/public/routes/saved_queries/edit/tabs.tsx b/x-pack/plugins/osquery/public/routes/saved_queries/edit/tabs.tsx index 9fe31e920564c6..3094a076afedfb 100644 --- a/x-pack/plugins/osquery/public/routes/saved_queries/edit/tabs.tsx +++ b/x-pack/plugins/osquery/public/routes/saved_queries/edit/tabs.tsx @@ -27,6 +27,7 @@ interface ResultTabsProps { failedAgentsCount?: number; endDate?: string; liveQueryActionId?: string; + error?: string; } const ResultTabsComponent: React.FC = ({ @@ -37,6 +38,7 @@ const ResultTabsComponent: React.FC = ({ failedAgentsCount, startDate, liveQueryActionId, + error, }) => { const tabs = useMemo( () => [ @@ -52,6 +54,7 @@ const ResultTabsComponent: React.FC = ({ startDate={startDate} endDate={endDate} liveQueryActionId={liveQueryActionId} + error={error} /> ), }, @@ -60,7 +63,12 @@ const ResultTabsComponent: React.FC = ({ name: 'Status', 'data-test-subj': 'osquery-status-tab', content: ( - + ), append: failedAgentsCount ? ( @@ -69,7 +77,16 @@ const ResultTabsComponent: React.FC = ({ ) : null, }, ], - [actionId, agentIds, ecsMapping, startDate, endDate, liveQueryActionId, failedAgentsCount] + [ + actionId, + agentIds, + ecsMapping, + startDate, + endDate, + liveQueryActionId, + error, + failedAgentsCount, + ] ); return ( diff --git a/x-pack/plugins/osquery/public/shared_components/lazy_live_query_field.tsx b/x-pack/plugins/osquery/public/shared_components/lazy_live_query_field.tsx index a8b369b86342fe..00ef03a941e5be 100644 --- a/x-pack/plugins/osquery/public/shared_components/lazy_live_query_field.tsx +++ b/x-pack/plugins/osquery/public/shared_components/lazy_live_query_field.tsx @@ -12,6 +12,8 @@ import type { LiveQueryQueryFieldProps } from '../live_queries/form/live_query_q import type { ServicesWrapperProps } from './services_wrapper'; import ServicesWrapper from './services_wrapper'; +const LiveQueryField = lazy(() => import('../live_queries/form/live_query_query_field')); + export const getLazyLiveQueryField = (services: ServicesWrapperProps['services']) => // eslint-disable-next-line react/display-name @@ -24,10 +26,8 @@ export const getLazyLiveQueryField = query: string; ecs_mapping: Record; }>; - }) => { - const LiveQueryField = lazy(() => import('../live_queries/form/live_query_query_field')); - - return ( + }) => + ( @@ -36,4 +36,3 @@ export const getLazyLiveQueryField = ); - }; diff --git a/x-pack/plugins/osquery/public/shared_components/lazy_osquery_action.tsx b/x-pack/plugins/osquery/public/shared_components/lazy_osquery_action.tsx index 15ffbdee14c4a9..968e43cea54775 100644 --- a/x-pack/plugins/osquery/public/shared_components/lazy_osquery_action.tsx +++ b/x-pack/plugins/osquery/public/shared_components/lazy_osquery_action.tsx @@ -6,18 +6,17 @@ */ import React, { lazy, Suspense, useMemo } from 'react'; +import type { Ecs } from '../../common/ecs'; import ServicesWrapper from './services_wrapper'; import type { ServicesWrapperProps } from './services_wrapper'; import type { OsqueryActionProps } from './osquery_action'; -import type { AlertEcsData } from '../common/contexts'; import { AlertAttachmentContext } from '../common/contexts'; +const OsqueryAction = lazy(() => import('./osquery_action')); export const getLazyOsqueryAction = (services: ServicesWrapperProps['services']) => // eslint-disable-next-line react/display-name - (props: OsqueryActionProps & { ecsData?: AlertEcsData }) => { - const OsqueryAction = lazy(() => import('./osquery_action')); - + (props: OsqueryActionProps & { ecsData?: Ecs }) => { const { ecsData, ...restProps } = props; const renderAction = useMemo(() => { if (ecsData && ecsData?._id) { @@ -29,7 +28,7 @@ export const getLazyOsqueryAction = } return ; - }, [OsqueryAction, ecsData, restProps]); + }, [ecsData, restProps]); return ( diff --git a/x-pack/plugins/osquery/public/shared_components/lazy_osquery_results.tsx b/x-pack/plugins/osquery/public/shared_components/lazy_osquery_results.tsx index a50de706ab067e..22b6af098a468c 100644 --- a/x-pack/plugins/osquery/public/shared_components/lazy_osquery_results.tsx +++ b/x-pack/plugins/osquery/public/shared_components/lazy_osquery_results.tsx @@ -14,14 +14,13 @@ interface BigServices extends StartServices { storage: unknown; } +const OsqueryResults = lazy(() => import('./osquery_results')); + export const getLazyOsqueryResults = // eslint-disable-next-line react/display-name - (services: BigServices) => (props: OsqueryActionResultsProps) => { - const OsqueryResults = lazy(() => import('./osquery_results')); - - return ( + (services: BigServices) => (props: OsqueryActionResultsProps) => + ( ); - }; diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx b/x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx index 402dacf7a6542c..13d4e8745e233d 100644 --- a/x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx +++ b/x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx @@ -21,6 +21,7 @@ export interface OsqueryActionProps { defaultValues?: {}; formType: 'steps' | 'simple'; hideAgentsField?: boolean; + onSuccess?: () => void; } const OsqueryActionComponent: React.FC = ({ @@ -28,6 +29,7 @@ const OsqueryActionComponent: React.FC = ({ formType = 'simple', defaultValues, hideAgentsField, + onSuccess, }) => { const permissions = useKibana().services.application.capabilities.osquery; @@ -91,6 +93,7 @@ const OsqueryActionComponent: React.FC = ({ formType={formType} agentId={agentId} hideAgentsField={hideAgentsField} + onSuccess={onSuccess} {...defaultValues} /> ); diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_response_action_type/index.tsx b/x-pack/plugins/osquery/public/shared_components/osquery_response_action_type/index.tsx index 1d2f79f273c585..5902eafddaa84b 100644 --- a/x-pack/plugins/osquery/public/shared_components/osquery_response_action_type/index.tsx +++ b/x-pack/plugins/osquery/public/shared_components/osquery_response_action_type/index.tsx @@ -7,7 +7,6 @@ import React, { useEffect, useMemo } from 'react'; import { EuiSpacer } from '@elastic/eui'; -import uuid from 'uuid'; import type { FieldErrors } from 'react-hook-form'; import { useFieldArray } from 'react-hook-form'; import { useForm as useHookForm, FormProvider } from 'react-hook-form'; @@ -35,7 +34,6 @@ interface OsqueryResponseActionsValues { interface OsqueryResponseActionsParamsFormFields { savedQueryId: string | null; - id: string; ecs_mapping: ECSMapping; query: string; packId?: string[]; @@ -58,7 +56,6 @@ const OsqueryResponseActionParamsFormComponent = ({ onError, onChange, }: OsqueryResponseActionsParamsFormProps) => { - const uniqueId = useMemo(() => uuid.v4(), []); const hooksForm = useHookForm({ mode: 'all', defaultValues: defaultValues @@ -70,14 +67,13 @@ const OsqueryResponseActionParamsFormComponent = ({ } : { ecs_mapping: {}, - id: uniqueId, queryType: 'query', }, }); const { watch, register, formState, control } = hooksForm; - const [packId, queryType, queries, id] = watch(['packId', 'queryType', 'queries', 'id']); + const [packId, queryType, queries] = watch(['packId', 'queryType', 'queries']); const { data: packData } = usePack({ packId: packId?.[0], skip: !packId?.[0], @@ -105,7 +101,6 @@ const OsqueryResponseActionParamsFormComponent = ({ useEffect(() => { register('savedQueryId'); - register('id'); }, [register]); useEffect(() => { @@ -114,12 +109,10 @@ const OsqueryResponseActionParamsFormComponent = ({ // @ts-expect-error update types formData.queryType === 'pack' ? { - id: formData.id, packId: formData?.packId?.length ? formData?.packId[0] : undefined, queries: formData.queries, } : { - id: formData.id, savedQueryId: formData.savedQueryId, query: formData.query, ecsMapping: formData.ecs_mapping, @@ -150,10 +143,9 @@ const OsqueryResponseActionParamsFormComponent = ({ const queryDetails = useMemo( () => ({ queries, - action_id: id, agents: [], }), - [id, queries] + [queries] ); return ( diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/index.tsx b/x-pack/plugins/osquery/public/shared_components/osquery_results/index.tsx index 36c09a2bce188d..e7f3bd47a181ac 100644 --- a/x-pack/plugins/osquery/public/shared_components/osquery_results/index.tsx +++ b/x-pack/plugins/osquery/public/shared_components/osquery_results/index.tsx @@ -10,9 +10,7 @@ import React from 'react'; import { QueryClientProvider } from '@tanstack/react-query'; import type { CoreStart } from '@kbn/core/public'; -import { useAllLiveQueries } from '../../actions/use_all_live_queries'; import { KibanaContextProvider } from '../../common/lib/kibana'; -import { Direction } from '../../../common/search_strategy'; import { queryClient } from '../../query_client'; import { KibanaThemeProvider } from '../../shared_imports'; @@ -23,41 +21,30 @@ import { OsqueryResult } from './osquery_result'; const OsqueryActionResultsComponent: React.FC = ({ agentIds, ruleName, - alertId, + actionItems, ecsData, -}) => { - const { data: actionsData } = useAllLiveQueries({ - filterQuery: { term: { alert_ids: alertId } }, - activePage: 0, - limit: 100, - direction: Direction.desc, - sortField: '@timestamp', - }); - - return ( -
- {actionsData?.data.items.map((item, index) => { - const actionId = item.fields?.action_id?.[0]; - const queryId = item.fields?.['queries.action_id']?.[0]; - // const query = item.fields?.['queries.query']?.[0]; - const startDate = item.fields?.['@timestamp'][0]; +}) => ( +
+ {actionItems?.map((item) => { + const actionId = item.fields?.action_id?.[0]; + const queryId = item.fields?.['queries.action_id']?.[0]; + const startDate = item.fields?.['@timestamp'][0]; - return ( - - ); - })} - -
- ); -}; + return ( + + ); + })} + +
+); export const OsqueryActionResults = React.memo(OsqueryActionResultsComponent); diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result.tsx b/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result.tsx index c48e75c44ba82b..a726f7c9b9070d 100644 --- a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result.tsx +++ b/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result.tsx @@ -15,7 +15,7 @@ import { ATTACHED_QUERY } from '../../agents/translations'; import { PackQueriesStatusTable } from '../../live_queries/form/pack_queries_status_table'; import { AlertAttachmentContext } from '../../common/contexts'; -interface OsqueryResultProps extends Omit { +interface OsqueryResultProps extends OsqueryActionResultsProps { actionId: string; queryId: string; startDate: string; diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.test.tsx b/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.test.tsx index fcfa6b1a720a33..5a8ac2a3b9846c 100644 --- a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.test.tsx +++ b/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.test.tsx @@ -13,11 +13,11 @@ import { QueryClientProvider } from '@tanstack/react-query'; import { OsqueryActionResults } from '.'; import { queryClient } from '../../query_client'; import { useKibana } from '../../common/lib/kibana'; -import * as useAllLiveQueries from '../../actions/use_all_live_queries'; import * as useLiveQueryDetails from '../../actions/use_live_query_details'; import { PERMISSION_DENIED } from '../osquery_action/translations'; import * as privileges from '../../action_results/use_action_privileges'; import { defaultLiveQueryDetails, DETAILS_QUERY, getMockedKibanaConfig } from './test_utils'; +import type { OsqueryActionResultsProps } from './types'; jest.mock('../../common/lib/kibana'); @@ -31,11 +31,21 @@ const enablePrivileges = () => { })); }; -const defaultProps = { +const defaultProps: OsqueryActionResultsProps = { agentIds: ['agent1'], ruleName: ['Test-rule'], - ruleActions: [{ action_type_id: 'action1' }, { action_type_id: 'action2' }], - alertId: 'test-alert-id', + actionItems: [ + { + _id: 'test', + _index: 'test', + fields: { + action_id: ['testActionId'], + 'queries.action_id': ['queriesActionId'], + 'queries.query': [DETAILS_QUERY], + '@timestamp': ['2022-09-08T18:16:30.256Z'], + }, + }, + ], ecsData: { _id: 'test', }, @@ -66,23 +76,6 @@ const renderWithContext = (Element: React.ReactElement) => describe('Osquery Results', () => { beforeAll(() => { mockKibana(); - // @ts-expect-error update types - jest.spyOn(useAllLiveQueries, 'useAllLiveQueries').mockImplementation(() => ({ - data: { - data: { - items: [ - { - fields: { - action_id: ['sfdsfds'], - 'queries.action_id': ['dsadas'], - 'queries.query': [DETAILS_QUERY], - '@timestamp': ['2022-09-08T18:16:30.256Z'], - }, - }, - ], - }, - }, - })); jest .spyOn(useLiveQueryDetails, 'useLiveQueryDetails') diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/types.ts b/x-pack/plugins/osquery/public/shared_components/osquery_results/types.ts index cb4b11651ee45c..6cc918f9367514 100644 --- a/x-pack/plugins/osquery/public/shared_components/osquery_results/types.ts +++ b/x-pack/plugins/osquery/public/shared_components/osquery_results/types.ts @@ -5,11 +5,12 @@ * 2.0. */ -import type { AlertEcsData } from '../../common/contexts'; +import type { Ecs } from '../../../common/ecs'; +import type { ActionEdges } from '../../../common/search_strategy'; export interface OsqueryActionResultsProps { agentIds?: string[]; ruleName?: string[]; - alertId: string; - ecsData: AlertEcsData; + ecsData: Ecs; + actionItems?: ActionEdges; } diff --git a/x-pack/plugins/osquery/public/types.ts b/x-pack/plugins/osquery/public/types.ts index d591776a41ecde..f6d05a3d459963 100644 --- a/x-pack/plugins/osquery/public/types.ts +++ b/x-pack/plugins/osquery/public/types.ts @@ -25,6 +25,7 @@ import type { getLazyOsqueryAction, getLazyOsqueryResponseActionTypeForm, } from './shared_components'; +import type { useAllLiveQueries, UseAllLiveQueriesConfig } from './actions/use_all_live_queries'; // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface OsqueryPluginSetup {} @@ -36,6 +37,7 @@ export interface OsqueryPluginStart { isOsqueryAvailable: (props: { agentId: string }) => boolean; fetchInstallationStatus: () => { loading: boolean; disabled: boolean; permissionDenied: boolean }; OsqueryResponseActionTypeForm: ReturnType; + fetchAllLiveQueries: (config: UseAllLiveQueriesConfig) => ReturnType; } export interface AppPluginStartDependencies { diff --git a/x-pack/plugins/osquery/server/handlers/action/create_action_handler.ts b/x-pack/plugins/osquery/server/handlers/action/create_action_handler.ts index cd7a46cfa72c8c..a38f8eb08b57b4 100644 --- a/x-pack/plugins/osquery/server/handlers/action/create_action_handler.ts +++ b/x-pack/plugins/osquery/server/handlers/action/create_action_handler.ts @@ -7,16 +7,16 @@ import uuid from 'uuid'; import moment from 'moment'; -import { flatten, isEmpty, map, omit, pick, pickBy, some } from 'lodash'; +import { filter, flatten, isEmpty, map, omit, pick, pickBy, some } from 'lodash'; import { AGENT_ACTIONS_INDEX } from '@kbn/fleet-plugin/common'; -import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { Ecs, SavedObjectsClientContract } from '@kbn/core/server'; +import { createDynamicQueries, createQueries } from './create_queries'; import { getInternalSavedObjectsClient } from '../../routes/utils'; import { parseAgentSelection } from '../../lib/parse_agent_groups'; import { packSavedObjectType } from '../../../common/types'; import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import type { CreateLiveQueryRequestBodySchema } from '../../../common/schemas/routes/live_query'; import { convertSOQueriesToPack } from '../../routes/pack/utils'; -import { isSavedQueryPrebuilt } from '../../routes/saved_query/utils'; import { ACTIONS_INDEX } from '../../../common/constants'; import { TELEMETRY_EBT_LIVE_QUERY_EVENT } from '../../lib/telemetry/constants'; import type { PackSavedObjectAttributes } from '../../common/types'; @@ -25,17 +25,23 @@ interface Metadata { currentUser: string | undefined; } +interface CreateActionHandlerOptions { + soClient?: SavedObjectsClientContract; + metadata?: Metadata; + ecsData?: Ecs; +} + export const createActionHandler = async ( osqueryContext: OsqueryAppContext, params: CreateLiveQueryRequestBodySchema, - soClient?: SavedObjectsClientContract, - metadata?: Metadata + options: CreateActionHandlerOptions ) => { const [coreStartServices] = await osqueryContext.getStartServices(); const esClientInternal = coreStartServices.elasticsearch.client.asInternalUser; const internalSavedObjectsClient = await getInternalSavedObjectsClient( osqueryContext.getStartServices ); + const { soClient, metadata, ecsData } = options; const savedObjectsClient = soClient ?? coreStartServices.savedObjects.createInternalRepository(); // eslint-disable-next-line @typescript-eslint/naming-convention @@ -46,6 +52,7 @@ export const createActionHandler = async ( platformsSelected: agent_platforms, policiesSelected: agent_policy_ids, }); + if (!selectedAgents.length) { throw new Error('No agents found for selection'); } @@ -95,49 +102,24 @@ export const createActionHandler = async ( (value) => !isEmpty(value) ) ) - : params.queries?.length - ? map(params.queries, (query) => - pickBy( - { - // @ts-expect-error where does type 'number' comes from? - ...query, - action_id: uuid.v4(), - agents: selectedAgents, - }, - (value) => !isEmpty(value) - ) - ) - : [ - pickBy( - { - action_id: uuid.v4(), - id: uuid.v4(), - query: params.query, - saved_query_id: params.saved_query_id, - saved_query_prebuilt: params.saved_query_id - ? await isSavedQueryPrebuilt( - osqueryContext.service.getPackageService()?.asInternalUser, - params.saved_query_id - ) - : undefined, - ecs_mapping: params.ecs_mapping, - agents: selectedAgents, - }, - (value) => !isEmpty(value) - ), - ], + : ecsData + ? await createDynamicQueries(params, ecsData, osqueryContext) + : await createQueries(params, selectedAgents, osqueryContext), }; - const fleetActions = map(osqueryAction.queries, (query) => ({ - action_id: query.action_id, - '@timestamp': moment().toISOString(), - expiration: moment().add(5, 'minutes').toISOString(), - type: 'INPUT_ACTION', - input_type: 'osquery', - agents: query.agents, - user_id: metadata?.currentUser, - data: pick(query, ['id', 'query', 'ecs_mapping', 'version', 'platform']), - })); + const fleetActions = map( + filter(osqueryAction.queries, (query) => !query.error), + (query) => ({ + action_id: query.action_id, + '@timestamp': moment().toISOString(), + expiration: moment().add(5, 'minutes').toISOString(), + type: 'INPUT_ACTION', + input_type: 'osquery', + agents: query.agents, + user_id: metadata?.currentUser, + data: pick(query, ['id', 'query', 'ecs_mapping', 'version', 'platform']), + }) + ); await esClientInternal.bulk({ refresh: 'wait_for', diff --git a/x-pack/plugins/osquery/server/handlers/action/create_queries.ts b/x-pack/plugins/osquery/server/handlers/action/create_queries.ts new file mode 100644 index 00000000000000..f9f918a7ea6235 --- /dev/null +++ b/x-pack/plugins/osquery/server/handlers/action/create_queries.ts @@ -0,0 +1,118 @@ +/* + * Copyright 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 { isEmpty, map, pickBy } from 'lodash'; +import uuid from 'uuid'; +import type { Ecs } from '@kbn/core/server'; +import { i18n } from '@kbn/i18n'; + +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { CreateLiveQueryRequestBodySchema } from '../../../common/schemas/routes/live_query'; +import { replaceParamsQuery } from '../../../common/utils/replace_params_query'; +import { isSavedQueryPrebuilt } from '../../routes/saved_query/utils'; + +export const createQueries = async ( + params: CreateLiveQueryRequestBodySchema, + agents: string[], + osqueryContext: OsqueryAppContext +) => + params.queries?.length + ? map(params.queries, (query) => + pickBy( + { + ...query, + action_id: uuid.v4(), + agents, + }, + (value) => !isEmpty(value) || value === true + ) + ) + : [ + pickBy( + { + action_id: uuid.v4(), + id: uuid.v4(), + query: params.query, + saved_query_id: params.saved_query_id, + saved_query_prebuilt: params.saved_query_id + ? await isSavedQueryPrebuilt( + osqueryContext.service.getPackageService()?.asInternalUser, + params.saved_query_id + ) + : undefined, + ecs_mapping: params.ecs_mapping, + agents, + }, + (value) => !isEmpty(value) + ), + ]; + +export const createDynamicQueries = async ( + params: CreateLiveQueryRequestBodySchema, + alert: Ecs, + osqueryContext: OsqueryAppContext +) => + params.queries?.length + ? map(params.queries, ({ query, ...restQuery }) => { + const replacedQuery = replacedQueries(query, alert); + + return pickBy( + { + ...replacedQuery, + ...restQuery, + action_id: uuid.v4(), + alert_ids: params.alert_ids, + agents: params.agent_ids, + }, + (value) => !isEmpty(value) || value === true + ); + }) + : [ + pickBy( + { + action_id: uuid.v4(), + id: uuid.v4(), + ...replacedQueries(params.query, alert), + // just for single queries - we need to overwrite the error property + error: undefined, + saved_query_id: params.saved_query_id, + saved_query_prebuilt: params.saved_query_id + ? await isSavedQueryPrebuilt( + osqueryContext.service.getPackageService()?.asInternalUser, + params.saved_query_id + ) + : undefined, + ecs_mapping: params.ecs_mapping, + alert_ids: params.alert_ids, + agents: params.agent_ids, + }, + (value) => !isEmpty(value) + ), + ]; + +const replacedQueries = ( + query: string | undefined, + ecsData?: Ecs +): { query: string | undefined; error?: string } => { + if (ecsData && query) { + const { result, skipped } = replaceParamsQuery(query, ecsData); + + return { + query: result, + ...(skipped + ? { + error: i18n.translate('xpack.osquery.liveQueryActions.error.notFoundParameters', { + defaultMessage: + "This query hasn't been called due to parameter used and its value not found in the alert.", + }), + } + : {}), + }; + } + + return { query }; +}; diff --git a/x-pack/plugins/osquery/server/plugin.ts b/x-pack/plugins/osquery/server/plugin.ts index fd23d67741dbca..365299750a9ce3 100644 --- a/x-pack/plugins/osquery/server/plugin.ts +++ b/x-pack/plugins/osquery/server/plugin.ts @@ -11,6 +11,7 @@ import type { CoreStart, Plugin, Logger, + Ecs, } from '@kbn/core/server'; import { SavedObjectsClient } from '@kbn/core/server'; import type { DataRequestHandlerContext } from '@kbn/data-plugin/server'; @@ -92,8 +93,8 @@ export class OsqueryPlugin implements Plugin - createActionHandler(osqueryContext, params), + osqueryCreateAction: (params: CreateLiveQueryRequestBodySchema, ecsData?: Ecs) => + createActionHandler(osqueryContext, params, { ecsData }), }; } diff --git a/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts b/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts index fd4754577d1cd4..668b5b3f924df1 100644 --- a/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts +++ b/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts @@ -86,8 +86,7 @@ export const createLiveQueryRoute = (router: IRouter, osqueryContext: OsqueryApp const { response: osqueryAction } = await createActionHandler( osqueryContext, request.body, - soClient, - { currentUser } + { soClient, metadata: { currentUser } } ); return response.ok({ diff --git a/x-pack/plugins/osquery/server/types.ts b/x-pack/plugins/osquery/server/types.ts index ef0bdacf0dfd27..5a5725bbc019b3 100644 --- a/x-pack/plugins/osquery/server/types.ts +++ b/x-pack/plugins/osquery/server/types.ts @@ -11,6 +11,8 @@ import type { PluginSetup as DataPluginSetup, PluginStart as DataPluginStart, } from '@kbn/data-plugin/server'; +import type { Ecs } from '@kbn/ecs'; + import type { FleetStartContract } from '@kbn/fleet-plugin/server'; import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; import type { PluginSetupContract } from '@kbn/features-plugin/server'; @@ -24,7 +26,7 @@ import type { RuleRegistryPluginStartContract } from '@kbn/rule-registry-plugin/ import type { CreateLiveQueryRequestBodySchema } from '../common/schemas/routes/live_query'; export interface OsqueryPluginSetup { - osqueryCreateAction: (payload: CreateLiveQueryRequestBodySchema) => void; + osqueryCreateAction: (payload: CreateLiveQueryRequestBodySchema, ecsData?: Ecs) => void; } // eslint-disable-next-line @typescript-eslint/no-empty-interface diff --git a/x-pack/plugins/osquery/tsconfig.json b/x-pack/plugins/osquery/tsconfig.json index e29bd4d10cd73b..7896d572e5bd52 100644 --- a/x-pack/plugins/osquery/tsconfig.json +++ b/x-pack/plugins/osquery/tsconfig.json @@ -65,5 +65,6 @@ "@kbn/securitysolution-es-utils", "@kbn/core-elasticsearch-client-server-mocks", "@kbn/std", + "@kbn/ecs", ] } diff --git a/x-pack/plugins/security_solution/common/detection_engine/rule_response_actions/schemas/osquery.ts b/x-pack/plugins/security_solution/common/detection_engine/rule_response_actions/schemas/osquery.ts index 878f76129463fb..0fd840a0c8e719 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/rule_response_actions/schemas/osquery.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/rule_response_actions/schemas/osquery.ts @@ -9,7 +9,6 @@ import * as t from 'io-ts'; import { ecsMapping, arrayQueries } from '@kbn/osquery-io-ts-types'; export const OsqueryParams = t.type({ - id: t.string, query: t.union([t.string, t.undefined]), ecs_mapping: t.union([ecsMapping, t.undefined]), queries: t.union([arrayQueries, t.undefined]), @@ -18,7 +17,6 @@ export const OsqueryParams = t.type({ }); export const OsqueryParamsCamelCase = t.type({ - id: t.string, query: t.union([t.string, t.undefined]), ecsMapping: t.union([ecsMapping, t.undefined]), queries: t.union([arrayQueries, t.undefined]), diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx index 2b8c0d534228de..40ad265849c0aa 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx @@ -26,7 +26,7 @@ import { mockAlertDetailsData } from './__mocks__'; import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; import { TimelineTabs } from '../../../../common/types/timeline'; import { useInvestigationTimeEnrichment } from '../../containers/cti/event_enrichment'; -import { useGetUserCasesPermissions } from '../../lib/kibana'; +import { useGetUserCasesPermissions, useKibana } from '../../lib/kibana'; import { defaultRowRenderers } from '../../../timelines/components/timeline/body/renderers'; jest.mock('../../../timelines/components/timeline/body/renderers', () => { @@ -43,6 +43,7 @@ jest.mock('../../../timelines/components/timeline/body/renderers', () => { jest.mock('../../lib/kibana'); const originalKibanaLib = jest.requireActual('../../lib/kibana'); +const useKibanaMock = useKibana as jest.Mocked; // Restore the useGetUserCasesPermissions so the calling functions can receive a valid permissions object // The returned permissions object will indicate that the user does not have permissions by default @@ -202,6 +203,30 @@ describe('EventDetails', () => { }); it('render osquery tab', async () => { + const { + services: { osquery }, + } = useKibanaMock(); + if (osquery) { + jest.spyOn(osquery, 'fetchAllLiveQueries').mockReturnValue({ + data: { + // @ts-expect-error - we don't need all the response details to test the functionality + data: { + items: [ + { + _id: 'testId', + _index: 'testIndex', + fields: { + action_id: ['testActionId'], + 'queries.action_id': ['testQueryActionId'], + 'queries.query': ['select * from users'], + '@timestamp': ['2022-09-08T18:16:30.256Z'], + }, + }, + ], + }, + }, + }); + } const newProps = { ...defaultProps, rawEventData: { diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx index a20f0b2701a298..b8c26c4884b47f 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx @@ -5,24 +5,18 @@ * 2.0. */ -import { - EuiCode, - EuiEmptyPrompt, - EuiFlexGroup, - EuiFlexItem, - EuiNotificationBadge, -} from '@elastic/eui'; +import { EuiCode, EuiEmptyPrompt, EuiNotificationBadge, EuiSpacer } from '@elastic/eui'; import React, { useMemo } from 'react'; import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n-react'; import type { Ecs } from '../../../../common/ecs'; import { PERMISSION_DENIED } from '../../../detection_engine/rule_response_actions/osquery/translations'; import { expandDottedObject } from '../../../../common/utils/expand_dotted'; -import { RESPONSE_ACTION_TYPES } from '../../../../common/detection_engine/rule_response_actions/schemas'; import { useIsExperimentalFeatureEnabled } from '../../hooks/use_experimental_features'; import { useKibana } from '../../lib/kibana'; import { EventsViewType } from './event_details'; import * as i18n from './translations'; +import type { RESPONSE_ACTION_TYPES } from '../../../../common/detection_engine/rule_response_actions/schemas/response_actions'; const TabContentWrapper = styled.div` height: 100%; @@ -30,7 +24,7 @@ const TabContentWrapper = styled.div` `; type RuleParameters = Array<{ response_actions: Array<{ - action_type_id: string; + action_type_id: RESPONSE_ACTION_TYPES.OSQUERY; params: Record; }>; }>; @@ -98,45 +92,41 @@ export const useOsqueryTab = ({ return; } - const { OsqueryResults } = osquery; const expandedEventFieldsObject = expandDottedObject( rawEventData.fields ) as ExpandedEventFieldsObject; - const parameters = expandedEventFieldsObject.kibana?.alert?.rule?.parameters; - const responseActions = parameters?.[0].response_actions; + const responseActions = + expandedEventFieldsObject?.kibana?.alert?.rule?.parameters?.[0].response_actions; - const osqueryActionsLength = responseActions?.filter( - (action: { action_type_id: string }) => action.action_type_id === RESPONSE_ACTION_TYPES.OSQUERY - )?.length; - - if (!osqueryActionsLength) { + if (!responseActions?.length) { return; } - const ruleName = expandedEventFieldsObject.kibana?.alert?.rule?.name; - const agentIds = expandedEventFieldsObject.agent?.id; + + const { OsqueryResults, fetchAllLiveQueries } = osquery; const alertId = rawEventData._id; + const { data: actionsData } = fetchAllLiveQueries({ + filterQuery: { term: { alert_ids: alertId } }, + activePage: 0, + limit: 100, + sortField: '@timestamp', + alertId, + }); + const actionItems = actionsData?.data.items || []; + + const ruleName = expandedEventFieldsObject.kibana?.alert?.rule?.name; + const agentIds = expandedEventFieldsObject.agent?.id; + return { id: EventsViewType.osqueryView, 'data-test-subj': 'osqueryViewTab', - name: ( - - - {i18n.OSQUERY_VIEW} - - - - {osqueryActionsLength} - - - + name: i18n.OSQUERY_VIEW, + append: ( + + {actionItems.length} + ), content: ( <> @@ -144,12 +134,15 @@ export const useOsqueryTab = ({ {!application?.capabilities?.osquery?.read ? ( emptyPrompt ) : ( - + <> + + + )} diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/index.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/index.tsx index d65405cd1c48f9..595d9466bfcc7e 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/index.tsx @@ -5,291 +5,8 @@ * 2.0. */ -import { pickBy, isEmpty } from 'lodash'; -import type { Plugin } from 'unified'; -import React, { useContext, useMemo, useState, useCallback } from 'react'; -import type { RemarkTokenizer } from '@elastic/eui'; -import { - EuiSpacer, - EuiCodeBlock, - EuiModalHeader, - EuiModalHeaderTitle, - EuiModalBody, - EuiModalFooter, - EuiButton, - EuiButtonEmpty, -} from '@elastic/eui'; -import { useForm, FormProvider } from 'react-hook-form'; -import styled from 'styled-components'; -import type { EuiMarkdownEditorUiPluginEditorProps } from '@elastic/eui/src/components/markdown_editor/markdown_types'; -import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { useKibana } from '../../../../lib/kibana'; -import { LabelField } from './label_field'; -import OsqueryLogo from './osquery_icon/osquery.svg'; -import { OsqueryFlyout } from '../../../../../detections/components/osquery/osquery_flyout'; -import { BasicAlertDataContext } from '../../../event_details/investigation_guide_view'; -import { OsqueryNotAvailablePrompt } from './not_available_prompt'; +import { plugin } from './plugin'; +import { OsqueryParser } from './parser'; +import { OsqueryRenderer } from './renderer'; -const StyledEuiButton = styled(EuiButton)` - > span > img { - margin-block-end: 0; - } -`; - -const OsqueryEditorComponent = ({ - node, - onSave, - onCancel, -}: EuiMarkdownEditorUiPluginEditorProps<{ - configuration: { - label?: string; - query: string; - ecs_mapping: { [key: string]: {} }; - }; -}>) => { - const isEditMode = node != null; - const { - osquery, - application: { - capabilities: { osquery: osqueryPermissions }, - }, - } = useKibana().services; - const formMethods = useForm<{ - label: string; - query: string; - ecs_mapping: Record; - }>({ - defaultValues: { - label: node?.configuration?.label, - query: node?.configuration?.query, - ecs_mapping: node?.configuration?.ecs_mapping, - }, - }); - - const onSubmit = useCallback( - (data) => { - onSave( - `!{osquery${JSON.stringify( - pickBy( - { - query: data.query, - label: data.label, - ecs_mapping: data.ecs_mapping, - }, - (value) => !isEmpty(value) - ) - )}}`, - { - block: true, - } - ); - }, - [onSave] - ); - - const noOsqueryPermissions = useMemo( - () => - (!osqueryPermissions.runSavedQueries || !osqueryPermissions.readSavedQueries) && - !osqueryPermissions.writeLiveQueries, - [ - osqueryPermissions.readSavedQueries, - osqueryPermissions.runSavedQueries, - osqueryPermissions.writeLiveQueries, - ] - ); - - const OsqueryActionForm = useMemo(() => { - if (osquery?.LiveQueryField) { - const { LiveQueryField } = osquery; - - return ( - - - - - - ); - } - return null; - }, [formMethods, osquery]); - - if (noOsqueryPermissions) { - return ; - } - - return ( - <> - - - {isEditMode ? ( - - ) : ( - - )} - - - - - <>{OsqueryActionForm} - - - - - {i18n.translate('xpack.securitySolution.markdown.osquery.modalCancelButtonLabel', { - defaultMessage: 'Cancel', - })} - - - {isEditMode ? ( - - ) : ( - - )} - - - - ); -}; - -const OsqueryEditor = React.memo(OsqueryEditorComponent); - -export const plugin = { - name: 'osquery', - button: { - label: 'Osquery', - iconType: 'logoOsquery', - }, - helpText: ( -
- - {'!{osquery{options}}'} - - -
- ), - editor: OsqueryEditor, -}; - -export const parser: Plugin = function () { - const Parser = this.Parser; - const tokenizers = Parser.prototype.blockTokenizers; - const methods = Parser.prototype.blockMethods; - - const tokenizeOsquery: RemarkTokenizer = function (eat, value, silent) { - if (value.startsWith('!{osquery') === false) return false; - - const nextChar = value[9]; - - if (nextChar !== '{' && nextChar !== '}') return false; // this isn't actually a osquery - - if (silent) { - return true; - } - - // is there a configuration? - const hasConfiguration = nextChar === '{'; - - let match = '!{osquery'; - let configuration = {}; - - if (hasConfiguration) { - let configurationString = ''; - - let openObjects = 0; - - for (let i = 9; i < value.length; i++) { - const char = value[i]; - if (char === '{') { - openObjects++; - configurationString += char; - } else if (char === '}') { - openObjects--; - if (openObjects === -1) { - break; - } - configurationString += char; - } else { - configurationString += char; - } - } - - match += configurationString; - try { - configuration = JSON.parse(configurationString); - } catch (e) { - const now = eat.now(); - this.file.fail(`Unable to parse osquery JSON configuration: ${e}`, { - line: now.line, - column: now.column + 9, - }); - } - } - - match += '}'; - - return eat(match)({ - type: 'osquery', - configuration, - }); - }; - - tokenizers.osquery = tokenizeOsquery; - methods.splice(methods.indexOf('text'), 0, 'osquery'); -}; - -// receives the configuration from the parser and renders -const RunOsqueryButtonRenderer = ({ - configuration, -}: { - configuration: { - label?: string; - query: string; - ecs_mapping: { [key: string]: {} }; - test: []; - }; -}) => { - const [showFlyout, setShowFlyout] = useState(false); - const { agentId, alertId } = useContext(BasicAlertDataContext); - - const handleOpen = useCallback(() => setShowFlyout(true), [setShowFlyout]); - - const handleClose = useCallback(() => setShowFlyout(false), [setShowFlyout]); - - return ( - <> - - {configuration.label ?? - i18n.translate('xpack.securitySolution.markdown.osquery.runOsqueryButtonLabel', { - defaultMessage: 'Run Osquery', - })} - - {showFlyout && ( - - )} - - ); -}; - -export { RunOsqueryButtonRenderer as renderer }; +export { plugin, OsqueryParser as parser, OsqueryRenderer as renderer }; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/parser.ts b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/parser.ts new file mode 100644 index 00000000000000..2664c9b5c7c4c2 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/parser.ts @@ -0,0 +1,76 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { Plugin } from 'unified'; +import type { RemarkTokenizer } from '@elastic/eui'; + +export const OsqueryParser: Plugin = function () { + const Parser = this.Parser; + const tokenizers = Parser.prototype.blockTokenizers; + const methods = Parser.prototype.blockMethods; + + const tokenizeOsquery: RemarkTokenizer = function (eat, value, silent) { + if (value.startsWith('!{osquery') === false) return false; + + const nextChar = value[9]; + + if (nextChar !== '{' && nextChar !== '}') return false; // this isn't actually a osquery + + if (silent) { + return true; + } + + // is there a configuration? + const hasConfiguration = nextChar === '{'; + + let match = '!{osquery'; + let configuration = {}; + + if (hasConfiguration) { + let configurationString = ''; + + let openObjects = 0; + + for (let i = 9; i < value.length; i++) { + const char = value[i]; + if (char === '{') { + openObjects++; + configurationString += char; + } else if (char === '}') { + openObjects--; + if (openObjects === -1) { + break; + } + configurationString += char; + } else { + configurationString += char; + } + } + + match += configurationString; + try { + configuration = JSON.parse(configurationString); + } catch (e) { + const now = eat.now(); + this.file.fail(`Unable to parse osquery JSON configuration: ${e}`, { + line: now.line, + column: now.column + 9, + }); + } + } + + match += '}'; + + return eat(match)({ + type: 'osquery', + configuration, + }); + }; + + tokenizers.osquery = tokenizeOsquery; + methods.splice(methods.indexOf('text'), 0, 'osquery'); +}; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/plugin.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/plugin.tsx new file mode 100644 index 00000000000000..de433c36028317 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/plugin.tsx @@ -0,0 +1,172 @@ +/* + * Copyright 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 { + EuiButton, + EuiButtonEmpty, + EuiCodeBlock, + EuiModalBody, + EuiModalFooter, + EuiModalHeader, + EuiModalHeaderTitle, + EuiSpacer, +} from '@elastic/eui'; +import type { EuiMarkdownEditorUiPluginEditorProps } from '@elastic/eui/src/components/markdown_editor/markdown_types'; +import { FormProvider, useForm } from 'react-hook-form'; +import React, { useCallback, useMemo } from 'react'; +import { isEmpty, pickBy } from 'lodash'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { i18n } from '@kbn/i18n'; +import { LabelField } from './label_field'; +import { OsqueryNotAvailablePrompt } from './not_available_prompt'; +import { useKibana } from '../../../../lib/kibana'; + +const OsqueryEditorComponent = ({ + node, + onSave, + onCancel, +}: EuiMarkdownEditorUiPluginEditorProps<{ + configuration: { + label?: string; + query: string; + ecs_mapping: { [key: string]: {} }; + }; +}>) => { + const isEditMode = node != null; + const { + osquery, + application: { + capabilities: { osquery: osqueryPermissions }, + }, + } = useKibana().services; + const formMethods = useForm<{ + label: string; + query: string; + ecs_mapping: Record; + }>({ + defaultValues: { + label: node?.configuration?.label, + query: node?.configuration?.query, + ecs_mapping: node?.configuration?.ecs_mapping, + }, + }); + + const onSubmit = useCallback( + (data) => { + onSave( + `!{osquery${JSON.stringify( + pickBy( + { + query: data.query, + label: data.label, + ecs_mapping: data.ecs_mapping, + }, + (value) => !isEmpty(value) + ) + )}}`, + { + block: true, + } + ); + }, + [onSave] + ); + + const noOsqueryPermissions = useMemo( + () => + (!osqueryPermissions.runSavedQueries || !osqueryPermissions.readSavedQueries) && + !osqueryPermissions.writeLiveQueries, + [ + osqueryPermissions.readSavedQueries, + osqueryPermissions.runSavedQueries, + osqueryPermissions.writeLiveQueries, + ] + ); + + const OsqueryActionForm = useMemo(() => { + if (osquery?.LiveQueryField) { + const { LiveQueryField } = osquery; + + return ( + + + + + + ); + } + return null; + }, [formMethods, osquery]); + + if (noOsqueryPermissions) { + return ; + } + + return ( + <> + + + {isEditMode ? ( + + ) : ( + + )} + + + + + <>{OsqueryActionForm} + + + + + {i18n.translate('xpack.securitySolution.markdown.osquery.modalCancelButtonLabel', { + defaultMessage: 'Cancel', + })} + + + {isEditMode ? ( + + ) : ( + + )} + + + + ); +}; + +const OsqueryEditor = React.memo(OsqueryEditorComponent); + +export const plugin = { + name: 'osquery', + button: { + label: 'Osquery', + iconType: 'logoOsquery', + }, + helpText: ( +
+ + {'!{osquery{options}}'} + + +
+ ), + editor: OsqueryEditor, +}; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/renderer.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/renderer.tsx new file mode 100644 index 00000000000000..f33dec63a6b18b --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/renderer.tsx @@ -0,0 +1,78 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +// receives the configuration from the parser and renders +import React, { useCallback, useContext, useMemo, useState } from 'react'; +import { reduce } from 'lodash'; +import { i18n } from '@kbn/i18n'; +import styled from 'styled-components'; +import { EuiButton } from '@elastic/eui'; +import { BasicAlertDataContext } from '../../../event_details/investigation_guide_view'; +import { expandDottedObject } from '../../../../../../common/utils/expand_dotted'; +import type { Ecs } from '../../../../../../common/ecs'; +import OsqueryLogo from './osquery_icon/osquery.svg'; +import { OsqueryFlyout } from '../../../../../detections/components/osquery/osquery_flyout'; + +const StyledEuiButton = styled(EuiButton)` + > span > img { + margin-block-end: 0; + } +`; + +export const OsqueryRenderer = ({ + configuration, +}: { + configuration: { + label?: string; + query: string; + ecs_mapping: { [key: string]: {} }; + test: []; + }; +}) => { + const [showFlyout, setShowFlyout] = useState(false); + const { agentId, alertId, data } = useContext(BasicAlertDataContext); + + const handleOpen = useCallback(() => setShowFlyout(true), [setShowFlyout]); + + const handleClose = useCallback(() => setShowFlyout(false), [setShowFlyout]); + + const ecsData = useMemo(() => { + const fieldsMap: Record = reduce( + data, + (acc, eventDetailItem) => ({ + ...acc, + [eventDetailItem.field]: eventDetailItem?.values?.[0], + }), + {} + ); + return expandDottedObject(fieldsMap) as Ecs; + }, [data]); + + return ( + <> + + {configuration.label ?? + i18n.translate('xpack.securitySolution.markdown.osquery.runOsqueryButtonLabel', { + defaultMessage: 'Run Osquery', + })} + + {showFlyout && ( + + )} + + ); +}; diff --git a/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts index f7d94a994b9199..6b736e3fbb5033 100644 --- a/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts @@ -70,6 +70,7 @@ export const useKibana = jest.fn().mockReturnValue({ }, osquery: { OsqueryResults: jest.fn().mockReturnValue(null), + fetchAllLiveQueries: jest.fn().mockReturnValue({ data: { data: { items: [] } } }), }, timelines: createTGridMocks(), savedObjectsTagging: { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/osquery/osquery_investigation_guide_panel.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/osquery/osquery_investigation_guide_panel.tsx new file mode 100644 index 00000000000000..697605dbc5e5a2 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/osquery/osquery_investigation_guide_panel.tsx @@ -0,0 +1,65 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiPanel, EuiText } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import React, { useCallback, useState } from 'react'; + +interface OsqueryInvestigationGuidePanelProps { + onClick: () => void; +} + +const panelCss = { + marginBottom: '16px', +}; +const flexGroupCss = { padding: `0 24px` }; + +export const OsqueryInvestigationGuidePanel = React.memo( + ({ onClick }) => { + const [hideInvestigationGuideSuggestion, setHideInvestigationGuideSuggestion] = useState(false); + + const handleClick = useCallback(() => { + onClick(); + setHideInvestigationGuideSuggestion(true); + }, [onClick]); + + if (hideInvestigationGuideSuggestion) { + return null; + } + return ( + + + + + + + + + + + + + + + + + ); + } +); + +OsqueryInvestigationGuidePanel.displayName = 'OsqueryInvestigationGuidePanel'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.test.tsx index 0b4c33892d5693..05c886564e8787 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.test.tsx @@ -15,6 +15,29 @@ import type { ArrayItem } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_ import { Form, useForm } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; import { getMockTheme } from '../../common/lib/kibana/kibana_react.mock'; +jest.mock('react-router-dom', () => ({ + ...jest.requireActual('react-router-dom'), // use actual for all non-hook parts + useParams: () => ({ + detailName: 'testId', + }), +})); +jest.mock('../../common/lib/kibana', () => { + const original = jest.requireActual('../../common/lib/kibana'); + return { + ...original, + useToasts: jest.fn().mockReturnValue({ + addError: jest.fn(), + addSuccess: jest.fn(), + addWarning: jest.fn(), + remove: jest.fn(), + }), + }; +}); + +import * as rules from '../rule_management/logic/use_rule'; +// @ts-expect-error we don't really care about thr useRule return value +jest.spyOn(rules, 'useRule').mockReturnValue({}); + const renderWithContext = (Element: React.ReactElement) => { const mockTheme = getMockTheme({ eui: { euiColorLightestShade: '#F5F7FA' } }); @@ -38,7 +61,8 @@ describe('ResponseActionsForm', () => { const { getByTestId, queryByTestId } = renderWithContext(); expect(getByTestId('response-actions-form')); expect(getByTestId('response-actions-header')); - expect(getByTestId('response-actions-list')); + expect(getByTestId('response-actions-wrapper')); + expect(queryByTestId('response-actions-list')); expect(queryByTestId('response-actions-list-item-0')).toEqual(null); }); it('renders list of elements', async () => { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.tsx index aa3c36d9079b6c..38dc69f25af51e 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.tsx @@ -10,9 +10,9 @@ import { EuiCallOut, EuiSpacer } from '@elastic/eui'; import { map, reduce, upperFirst } from 'lodash'; import ReactMarkdown from 'react-markdown'; import { css } from '@emotion/react'; +import { ResponseActionsWrapper } from './response_actions_wrapper'; import { FORM_ERRORS_TITLE } from '../../detections/components/rules/rule_actions_field/translations'; import { ResponseActionsHeader } from './response_actions_header'; -import { ResponseActionsList } from './response_actions_list'; import type { ArrayItem, FormHook } from '../../shared_imports'; import { useSupportedResponseActionTypes } from './use_supported_response_action_types'; @@ -44,7 +44,7 @@ export const ResponseActionsForm = ({ } return ( - void; - addItem: () => void; - supportedResponseActionTypes: ResponseActionType[]; } const GhostFormField = () => <>; -export const ResponseActionsList = React.memo( - ({ items, removeItem, supportedResponseActionTypes, addItem }: ResponseActionsListProps) => { - const actionTypeIdRef = useRef(null); - const updateActionTypeId = useCallback((id) => { - actionTypeIdRef.current = id; - }, []); - - const context = useFormContext(); - const renderButton = useMemo(() => { - return ( - - ); - }, [addItem, updateActionTypeId, supportedResponseActionTypes]); - - useEffect(() => { - if (actionTypeIdRef.current) { - const index = items.length - 1; - const path = `responseActions[${index}].actionTypeId`; - context.setFieldValue(path, actionTypeIdRef.current); - actionTypeIdRef.current = null; - } - }, [context, items.length]); - - return ( -
- {items.map((actionItem, index) => { - return ( -
- - - - -
- ); - })} - - {renderButton} -
- ); - } -); +export const ResponseActionsList = React.memo(({ items, removeItem }) => { + const { detailName: ruleId } = useParams<{ detailName: string }>(); + const { data: rule } = useRule(ruleId); + + const osqueryNoteQueries = useMemo( + () => (rule?.note ? getOsqueryQueriesFromNote(rule.note) : []), + [rule?.note] + ); + + const context = useFormContext(); + const [formData] = useFormData(); + + const handleInvestigationGuideClick = useCallback(() => { + const values = getResponseActionsFromNote(osqueryNoteQueries, formData.responseActions); + context.updateFieldValues(values); + }, [context, formData?.responseActions, osqueryNoteQueries]); + + return ( +
+ {items.map((actionItem, index) => { + return ( +
+ + + + +
+ ); + })} + + {osqueryNoteQueries.length ? ( + + ) : null} +
+ ); +}); ResponseActionsList.displayName = 'ResponseActionsList'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_wrapper.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_wrapper.tsx new file mode 100644 index 00000000000000..39f036a1b33222 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_wrapper.tsx @@ -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 React, { useCallback, useEffect, useRef, useMemo } from 'react'; + +import { ResponseActionsList } from './response_actions_list'; +import type { ResponseActionType } from './get_supported_response_actions'; +import { ResponseActionAddButton } from './response_action_add_button'; +import type { ArrayItem } from '../../shared_imports'; +import { useFormContext } from '../../shared_imports'; + +interface ResponseActionsWrapperProps { + items: ArrayItem[]; + removeItem: (id: number) => void; + addItem: () => void; + supportedResponseActionTypes: ResponseActionType[]; +} + +export const ResponseActionsWrapper = React.memo( + ({ items, removeItem, supportedResponseActionTypes, addItem }) => { + const actionTypeIdRef = useRef(null); + const updateActionTypeId = useCallback((id) => { + actionTypeIdRef.current = id; + }, []); + + const context = useFormContext(); + + const renderButton = useMemo(() => { + return ( + + ); + }, [addItem, updateActionTypeId, supportedResponseActionTypes]); + + useEffect(() => { + if (actionTypeIdRef.current) { + const index = items.length - 1; + const path = `responseActions[${index}].actionTypeId`; + context.setFieldValue(path, actionTypeIdRef.current); + actionTypeIdRef.current = null; + } + }, [context, items.length]); + + return ( +
+ + {renderButton} +
+ ); + } +); + +ResponseActionsWrapper.displayName = 'ResponseActionsWrapper'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.test.ts new file mode 100644 index 00000000000000..0842cce48bdefa --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.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 { getOsqueryQueriesFromNote } from './utils'; + +describe('getOsqueryQueriesFromNote', () => { + it('should transform investigation guide note into osquery queries', () => { + const note = + '!{osquery{"query":"SELECT * FROM processes where pid = {{ process.pid }};","label":"Get processes","ecs_mapping":{"process.pid":{"field":"pid"},"process.name":{"field":"name"},"process.executable":{"field":"path"},"process.args":{"field":"cmdline"},"process.working_directory":{"field":"cwd"},"user.id":{"field":"uid"},"group.id":{"field":"gid"},"process.parent.pid":{"field":"parent"},"process.pgid":{"field":"pgroup"}}}}\n\n!{osquery{"query":"select * from users;","label":"Get users"}}'; + const queries = getOsqueryQueriesFromNote(note); + const expectedQueries = [ + { + type: 'osquery', + configuration: { + query: 'SELECT * FROM processes where pid = {{ process.pid }};', + label: 'Get processes', + ecs_mapping: { + 'process.pid': { + field: 'pid', + }, + 'process.name': { + field: 'name', + }, + 'process.executable': { + field: 'path', + }, + 'process.args': { + field: 'cmdline', + }, + 'process.working_directory': { + field: 'cwd', + }, + 'user.id': { + field: 'uid', + }, + 'group.id': { + field: 'gid', + }, + 'process.parent.pid': { + field: 'parent', + }, + 'process.pgid': { + field: 'pgroup', + }, + }, + }, + position: { + start: { + line: 1, + column: 1, + offset: 0, + }, + end: { + line: 1, + column: 423, + offset: 422, + }, + indent: [], + }, + }, + { + type: 'osquery', + configuration: { + query: 'select * from users;', + label: 'Get users', + }, + position: { + start: { + line: 3, + column: 1, + offset: 424, + }, + end: { + line: 3, + column: 63, + offset: 486, + }, + indent: [], + }, + }, + ]; + + expect(queries).toEqual(expectedQueries); + }); +}); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx new file mode 100644 index 00000000000000..21beb2bf43a427 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx @@ -0,0 +1,55 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import unified from 'unified'; +import markdown from 'remark-parse'; +import { filter, reduce } from 'lodash'; + +import type { ECSMapping } from '@kbn/osquery-io-ts-types'; +import type { RuleResponseAction } from '../../../common/detection_engine/rule_response_actions/schemas'; +import { RESPONSE_ACTION_TYPES } from '../../../common/detection_engine/rule_response_actions/schemas'; +import { OsqueryParser } from '../../common/components/markdown_editor/plugins/osquery/parser'; + +interface OsqueryNoteQuery { + configuration: { + label: string; + query: string; + ecs_mapping: ECSMapping; + }; +} + +export const getOsqueryQueriesFromNote = (note: string): OsqueryNoteQuery[] => { + const parsedAlertInvestigationGuide = unified() + .use([[markdown, {}], OsqueryParser]) + .parse(note); + return filter(parsedAlertInvestigationGuide?.children as object, ['type', 'osquery']); +}; + +export const getResponseActionsFromNote = ( + osqueryQueries: OsqueryNoteQuery[], + defaultResponseActions: RuleResponseAction[] = [] +) => { + return reduce( + osqueryQueries, + (acc: { responseActions: RuleResponseAction[] }, { configuration }: OsqueryNoteQuery) => { + const responseActionPath = 'responseActions'; + acc[responseActionPath].push({ + actionTypeId: RESPONSE_ACTION_TYPES.OSQUERY, + params: { + savedQueryId: undefined, + packId: undefined, + queries: undefined, + query: configuration.query, + ecsMapping: configuration.ecs_mapping, + }, + }); + + return acc; + }, + { responseActions: defaultResponseActions } + ); +}; diff --git a/x-pack/plugins/security_solution/public/detections/components/osquery/osquery_flyout.tsx b/x-pack/plugins/security_solution/public/detections/components/osquery/osquery_flyout.tsx index 00dbe210e7026a..dc26a0b98499a7 100644 --- a/x-pack/plugins/security_solution/public/detections/components/osquery/osquery_flyout.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/osquery/osquery_flyout.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import React from 'react'; +import React, { useCallback } from 'react'; import styled from 'styled-components'; import { EuiFlyout, EuiFlyoutFooter, EuiFlyoutBody, EuiFlyoutHeader, EuiTitle } from '@elastic/eui'; +import { useQueryClient } from '@tanstack/react-query'; import type { Ecs } from '../../../../common/ecs'; import { useKibana } from '../../../common/lib/kibana'; import { OsqueryEventDetailsFooter } from './osquery_flyout_footer'; @@ -19,11 +20,19 @@ const OsqueryActionWrapper = styled.div` export interface OsqueryFlyoutProps { agentId?: string; - defaultValues?: {}; + defaultValues?: { + alertIds?: string[]; + query?: string; + ecs_mapping?: { [key: string]: {} }; + queryField?: boolean; + }; onClose: () => void; ecsData?: Ecs; } +// Make sure we keep this and ACTIONS_QUERY_KEY in use_all_live_queries.ts in sync. +const ACTIONS_QUERY_KEY = 'actions'; + const OsqueryFlyoutComponent: React.FC = ({ agentId, defaultValues, @@ -33,6 +42,13 @@ const OsqueryFlyoutComponent: React.FC = ({ const { services: { osquery }, } = useKibana(); + const queryClient = useQueryClient(); + + const invalidateQueries = useCallback(() => { + queryClient.invalidateQueries({ + queryKey: [ACTIONS_QUERY_KEY, { alertId: defaultValues?.alertIds?.[0] }], + }); + }, [defaultValues?.alertIds, queryClient]); if (osquery?.OsqueryAction) { return ( @@ -54,6 +70,7 @@ const OsqueryFlyoutComponent: React.FC = ({ formType="steps" defaultValues={defaultValues} ecsData={ecsData} + onSuccess={invalidateQueries} /> diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.test.ts new file mode 100644 index 00000000000000..b848c26b9e1e64 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.test.ts @@ -0,0 +1,103 @@ +/* + * Copyright 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 { scheduleNotificationResponseActions } from './schedule_notification_response_actions'; +import { RESPONSE_ACTION_TYPES } from '../../../../common/detection_engine/rule_response_actions/schemas'; + +describe('ScheduleNotificationResponseActions', () => { + const signalOne = { agent: { id: 'agent-id-1' }, _id: 'alert-id-1', user: { id: 'S-1-5-20' } }; + const signalTwo = { agent: { id: 'agent-id-2' }, _id: 'alert-id-2' }; + const signals = [signalOne, signalTwo]; + const defaultQueryParams = { + ecsMapping: { testField: { field: 'testField', value: 'testValue' } }, + savedQueryId: 'testSavedQueryId', + query: undefined, + queries: [], + packId: undefined, + }; + const defaultPackParams = { + packId: 'testPackId', + queries: [], + query: undefined, + ecsMapping: { testField: { field: 'testField', value: 'testValue' } }, + savedQueryId: undefined, + }; + const defaultQueries = { + ecs_mapping: undefined, + platform: 'windows', + version: '1.0.0', + snapshot: true, + removed: false, + }; + + const defaultResultParams = { + agent_ids: ['agent-id-1', 'agent-id-2'], + alert_ids: ['alert-id-1', 'alert-id-2'], + }; + const defaultQueryResultParams = { + ...defaultResultParams, + ecs_mapping: { testField: { field: 'testField', value: 'testValue' } }, + ecsMapping: undefined, + saved_query_id: 'testSavedQueryId', + savedQueryId: undefined, + queries: [], + }; + const defaultPackResultParams = { + ...defaultResultParams, + query: undefined, + saved_query_id: undefined, + ecs_mapping: { testField: { field: 'testField', value: 'testValue' } }, + }; + + const simpleQuery = 'select * from uptime'; + it('should handle osquery response actions with query', async () => { + const osqueryActionMock = jest.fn(); + + const responseActions = [ + { + actionTypeId: RESPONSE_ACTION_TYPES.OSQUERY, + params: { + ...defaultQueryParams, + query: simpleQuery, + }, + }, + ]; + scheduleNotificationResponseActions({ signals, responseActions }, osqueryActionMock); + + expect(osqueryActionMock).toHaveBeenCalledWith({ + ...defaultQueryResultParams, + query: simpleQuery, + }); + // + }); + it('should handle osquery response actions with packs', async () => { + const osqueryActionMock = jest.fn(); + + const responseActions = [ + { + actionTypeId: RESPONSE_ACTION_TYPES.OSQUERY, + params: { + ...defaultPackParams, + queries: [ + { + ...defaultQueries, + id: 'query-1', + query: simpleQuery, + }, + ], + packId: 'testPackId', + }, + }, + ]; + scheduleNotificationResponseActions({ signals, responseActions }, osqueryActionMock); + + expect(osqueryActionMock).toHaveBeenCalledWith({ + ...defaultPackResultParams, + queries: [{ ...defaultQueries, id: 'query-1', query: simpleQuery }], + }); + }); +}); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.ts index 3e344fe0c5cfa3..238f06a3d4b598 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { map, uniq } from 'lodash'; +import type { Ecs } from '@kbn/ecs'; +import { uniq, reduce, some, each } from 'lodash'; import type { RuleResponseAction } from '../../../../common/detection_engine/rule_response_actions/schemas'; import { RESPONSE_ACTION_TYPES } from '../../../../common/detection_engine/rule_response_actions/schemas'; import type { SetupPlugins } from '../../../plugin_contract'; @@ -15,31 +16,68 @@ interface ScheduleNotificationActions { responseActions: RuleResponseAction[]; } -interface IAlert { - agent: { - id: string; - }; +interface AlertsWithAgentType { + alerts: Ecs[]; + agents: string[]; + alertIds: string[]; } +const CONTAINS_DYNAMIC_PARAMETER_REGEX = /\{{([^}]+)\}}/g; // when there are 2 opening and 2 closing curly brackets (including brackets) export const scheduleNotificationResponseActions = ( { signals, responseActions }: ScheduleNotificationActions, osqueryCreateAction?: SetupPlugins['osquery']['osqueryCreateAction'] ) => { - const filteredAlerts = (signals as IAlert[]).filter((alert) => alert.agent?.id); - const agentIds = uniq(filteredAlerts.map((alert: IAlert) => alert.agent?.id)); - const alertIds = map(filteredAlerts, '_id'); + const filteredAlerts = (signals as Ecs[]).filter((alert) => alert.agent?.id); - responseActions.forEach((responseAction) => { + const { alerts, agents, alertIds }: AlertsWithAgentType = reduce( + filteredAlerts, + (acc, alert) => { + const agentId = alert.agent?.id; + if (agentId !== undefined) { + return { + alerts: [...acc.alerts, alert], + agents: [...acc.agents, agentId], + alertIds: [...acc.alertIds, (alert as unknown as { _id: string })._id], + }; + } + return acc; + }, + { alerts: [], agents: [], alertIds: [] } as AlertsWithAgentType + ); + const agentIds = uniq(agents); + + each(responseActions, (responseAction) => { if (responseAction.actionTypeId === RESPONSE_ACTION_TYPES.OSQUERY && osqueryCreateAction) { + const temporaryQueries = responseAction.params.queries?.length + ? responseAction.params.queries + : [{ query: responseAction.params.query }]; + const containsDynamicQueries = some(temporaryQueries, (query) => { + return query.query ? CONTAINS_DYNAMIC_PARAMETER_REGEX.test(query.query) : false; + }); const { savedQueryId, packId, queries, ecsMapping, ...rest } = responseAction.params; - return osqueryCreateAction({ - ...rest, - queries, - ecs_mapping: ecsMapping, - saved_query_id: savedQueryId, - agent_ids: agentIds, - alert_ids: alertIds, + if (!containsDynamicQueries) { + return osqueryCreateAction({ + ...rest, + queries, + ecs_mapping: ecsMapping, + saved_query_id: savedQueryId, + agent_ids: agentIds, + alert_ids: alertIds, + }); + } + each(alerts, (alert) => { + return osqueryCreateAction( + { + ...rest, + queries, + ecs_mapping: ecsMapping, + saved_query_id: savedQueryId, + agent_ids: alert.agent?.id ? [alert.agent.id] : [], + alert_ids: [(alert as unknown as { _id: string })._id], + }, + alert + ); }); } }); diff --git a/x-pack/plugins/security_solution/tsconfig.json b/x-pack/plugins/security_solution/tsconfig.json index cc876b06cc7735..ced495e35fbe7d 100644 --- a/x-pack/plugins/security_solution/tsconfig.json +++ b/x-pack/plugins/security_solution/tsconfig.json @@ -125,6 +125,7 @@ "@kbn/core-status-common-internal", "@kbn/repo-info", "@kbn/storybook", + "@kbn/ecs", "@kbn/cypress-config", "@kbn/controls-plugin", "@kbn/shared-ux-utility", From 69d77910b316b65d1e4b762f7fa3f5fd539b46be Mon Sep 17 00:00:00 2001 From: Mark Hopkin Date: Thu, 5 Jan 2023 14:52:05 +0000 Subject: [PATCH 19/36] [Fleet] Use `enrollled_at` timestamp for inactive status calulcation if `last_checkin` not present (#148440) An agent that never checks in but has enrolled will now have the inactivity timeout applied. Integration tests updated. --- .../agents/build_status_runtime_field.test.ts | 30 ++++++++++-- .../agents/build_status_runtime_field.ts | 6 ++- .../apis/agents/status.ts | 48 +++++++++++++++---- 3 files changed, 70 insertions(+), 14 deletions(-) diff --git a/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.test.ts b/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.test.ts index ab1f9617a89179..249b74db13256b 100644 --- a/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.test.ts @@ -24,7 +24,11 @@ describe('buildStatusRuntimeField', () => { "source": " long lastCheckinMillis = doc['last_checkin'].size() > 0 ? doc['last_checkin'].value.toInstant().toEpochMilli() - : -1; + : ( + doc['enrolled_at'].size() > 0 + ? doc['enrolled_at'].value.toInstant().toEpochMilli() + : -1 + ); if (doc['active'].size() > 0 && doc['active'].value == false) { emit('unenrolled'); } else if (lastCheckinMillis > 0 && doc['policy_id'].size() > 0 && false) { @@ -76,7 +80,11 @@ describe('buildStatusRuntimeField', () => { "source": " long lastCheckinMillis = doc['my.prefix.last_checkin'].size() > 0 ? doc['my.prefix.last_checkin'].value.toInstant().toEpochMilli() - : -1; + : ( + doc['my.prefix.enrolled_at'].size() > 0 + ? doc['my.prefix.enrolled_at'].value.toInstant().toEpochMilli() + : -1 + ); if (doc['my.prefix.active'].size() > 0 && doc['my.prefix.active'].value == false) { emit('unenrolled'); } else if (lastCheckinMillis > 0 && doc['my.prefix.policy_id'].size() > 0 && false) { @@ -133,7 +141,11 @@ describe('buildStatusRuntimeField', () => { "source": " long lastCheckinMillis = doc['last_checkin'].size() > 0 ? doc['last_checkin'].value.toInstant().toEpochMilli() - : -1; + : ( + doc['enrolled_at'].size() > 0 + ? doc['enrolled_at'].value.toInstant().toEpochMilli() + : -1 + ); if (doc['active'].size() > 0 && doc['active'].value == false) { emit('unenrolled'); } else if (lastCheckinMillis > 0 && doc['policy_id'].size() > 0 && (doc['policy_id'].value == 'policy-1') && lastCheckinMillis < 1234567590123L) { @@ -190,7 +202,11 @@ describe('buildStatusRuntimeField', () => { "source": " long lastCheckinMillis = doc['last_checkin'].size() > 0 ? doc['last_checkin'].value.toInstant().toEpochMilli() - : -1; + : ( + doc['enrolled_at'].size() > 0 + ? doc['enrolled_at'].value.toInstant().toEpochMilli() + : -1 + ); if (doc['active'].size() > 0 && doc['active'].value == false) { emit('unenrolled'); } else if (lastCheckinMillis > 0 && doc['policy_id'].size() > 0 && (doc['policy_id'].value == 'policy-1' || doc['policy_id'].value == 'policy-2') && lastCheckinMillis < 1234567590123L) { @@ -251,7 +267,11 @@ describe('buildStatusRuntimeField', () => { "source": " long lastCheckinMillis = doc['last_checkin'].size() > 0 ? doc['last_checkin'].value.toInstant().toEpochMilli() - : -1; + : ( + doc['enrolled_at'].size() > 0 + ? doc['enrolled_at'].value.toInstant().toEpochMilli() + : -1 + ); if (doc['active'].size() > 0 && doc['active'].value == false) { emit('unenrolled'); } else if (lastCheckinMillis > 0 && doc['policy_id'].size() > 0 && (doc['policy_id'].value == 'policy-1' || doc['policy_id'].value == 'policy-2') && lastCheckinMillis < 1234567590123L || (doc['policy_id'].value == 'policy-3') && lastCheckinMillis < 1234567490123L) { diff --git a/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts b/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts index 3250c632d02005..cebf3a440e5115 100644 --- a/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts +++ b/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts @@ -45,7 +45,11 @@ function _buildSource(inactivityTimeouts: InactivityTimeouts, pathPrefix?: strin return ` long lastCheckinMillis = ${field('last_checkin')}.size() > 0 ? ${field('last_checkin')}.value.toInstant().toEpochMilli() - : -1; + : ( + ${field('enrolled_at')}.size() > 0 + ? ${field('enrolled_at')}.value.toInstant().toEpochMilli() + : -1 + ); if (${field('active')}.size() > 0 && ${field('active')}.value == false) { emit('unenrolled'); } else if (${_buildInactiveClause(now, inactivityTimeouts, field)}) { 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 bac78ed854bba1..b1108712755048 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/status.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/status.ts @@ -91,11 +91,27 @@ export default function ({ getService }: FtrProviderContext) { }, }, }); - // 1 agent upgrading + // 1 agents inactive through enrolled_at as no last_checkin await es.create({ id: 'agent5', refresh: 'wait_for', index: AGENTS_INDEX, + document: { + active: true, + access_api_key_id: 'api-key-4', + policy_id: 'policy-inactivity-timeout', + type: 'PERMANENT', + local_metadata: { host: { hostname: 'host6' } }, + user_provided_metadata: {}, + enrolled_at: new Date(Date.now() - 1000 * 60).toISOString(), // policy timeout 1 min + }, + }); + + // 1 agent upgrading + await es.create({ + id: 'agent6', + refresh: 'wait_for', + index: AGENTS_INDEX, document: { policy_revision_idx: 1, last_checkin: new Date().toISOString(), @@ -104,7 +120,7 @@ export default function ({ getService }: FtrProviderContext) { }); // 1 agent reassigned to a new policy await es.create({ - id: 'agent6', + id: 'agent7', refresh: 'wait_for', index: AGENTS_INDEX, document: { @@ -122,7 +138,7 @@ export default function ({ getService }: FtrProviderContext) { // 1 agent unenrolled await es.create({ - id: 'agent7', + id: 'agent8', refresh: 'wait_for', index: AGENTS_INDEX, document: { @@ -140,7 +156,7 @@ export default function ({ getService }: FtrProviderContext) { }); // 1 agent error await es.create({ - id: 'agent8', + id: 'agent9', refresh: 'wait_for', index: AGENTS_INDEX, document: { @@ -158,7 +174,7 @@ export default function ({ getService }: FtrProviderContext) { }); // 1 agent degraded (error category) await es.create({ - id: 'agent9', + id: 'agent10', refresh: 'wait_for', index: AGENTS_INDEX, document: { @@ -174,6 +190,22 @@ export default function ({ getService }: FtrProviderContext) { last_checkin_status: 'DEGRADED', }, }); + // 1 agent enrolling, no last_checkin yet + await es.create({ + id: 'agent11', + refresh: 'wait_for', + index: AGENTS_INDEX, + document: { + active: true, + access_api_key_id: 'api-key-4', + policy_id: 'policy-inactivity-timeout', + type: 'PERMANENT', + policy_revision_idx: 1, + local_metadata: { host: { hostname: 'host6' } }, + user_provided_metadata: {}, + enrolled_at: new Date().toISOString(), + }, + }); }); after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/fleet/agents'); @@ -185,12 +217,12 @@ export default function ({ getService }: FtrProviderContext) { results: { events: 0, other: 0, - total: 7, + total: 8, online: 2, error: 2, offline: 1, - updating: 2, - inactive: 1, + updating: 3, + inactive: 2, unenrolled: 1, }, }); From 1b3769c86b683a3e1762f23b6f503479957044c6 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Thu, 5 Jan 2023 15:52:29 +0100 Subject: [PATCH 20/36] [Discover] Fix field stats for epoch time format (#148288) Closes https://github.com/elastic/kibana/issues/148140 ## Summary This PR fixes time format so it can work also for epoch. Before: Screenshot 2023-01-03 at 12 33 17 After: Screenshot 2023-01-03 at 12 32 49 Sample data for testing: ``` PUT test PUT test/_mapping { "properties": { "timestamp": { "type": "date", "format": "epoch_second" }, "message": { "type": "keyword" }, "bytes": { "type": "long" } } } POST test/_doc/1 { "timestamp": 1669912088.9230318, "message": "Message 1", "bytes": 250 } POST test/_doc/2 { "timestamp": 1669912088.9230319, "message": "Message 2", "bytes": 20 } ``` --- .../field_stats_utils.test.ts.snap | 184 ++++++++++++++++++ .../common/utils/field_stats_utils.test.ts | 153 +++++++++++++++ .../common/utils/field_stats_utils.ts | 1 + 3 files changed, 338 insertions(+) create mode 100644 src/plugins/unified_field_list/common/utils/__snapshots__/field_stats_utils.test.ts.snap create mode 100644 src/plugins/unified_field_list/common/utils/field_stats_utils.test.ts diff --git a/src/plugins/unified_field_list/common/utils/__snapshots__/field_stats_utils.test.ts.snap b/src/plugins/unified_field_list/common/utils/__snapshots__/field_stats_utils.test.ts.snap new file mode 100644 index 00000000000000..4cd6bdc44ae7fe --- /dev/null +++ b/src/plugins/unified_field_list/common/utils/__snapshots__/field_stats_utils.test.ts.snap @@ -0,0 +1,184 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`fieldStatsUtils buildSearchParams() should work correctly for aggregations and a data view time field 1`] = ` +Object { + "body": Object { + "_source": undefined, + "aggs": Object { + "sample": Object { + "aggs": Object { + "sample_count": Object { + "value_count": Object { + "field": "extension.keyword", + }, + }, + "top_values": Object { + "terms": Object { + "field": "extension.keyword", + "shard_size": 25, + "size": 10, + }, + }, + }, + "sampler": Object { + "shard_size": 5000, + }, + }, + }, + "fields": undefined, + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "range": Object { + "timestamp": Object { + "format": "strict_date_optional_time", + "gte": "2022-12-05T23:00:00.000Z", + "lte": "2023-01-05T09:33:05.359Z", + }, + }, + }, + Object { + "bool": Object { + "filter": Array [ + Object { + "match_phrase": Object { + "geo.src": "US", + }, + }, + ], + "must": Array [], + "must_not": Array [], + "should": Array [], + }, + }, + ], + }, + }, + "runtime_mappings": Object { + "hour_of_day": Object { + "script": Object { + "source": "emit(doc['timestamp'].value.getHour());", + }, + "type": "long", + }, + }, + }, + "index": "kibana_sample_data_logs", + "size": 0, + "track_total_hits": true, +} +`; + +exports[`fieldStatsUtils buildSearchParams() should work correctly for aggregations without a data view time field 1`] = ` +Object { + "body": Object { + "_source": undefined, + "aggs": Object { + "sample": Object { + "aggs": Object { + "sample_count": Object { + "value_count": Object { + "field": "extension.keyword", + }, + }, + "top_values": Object { + "terms": Object { + "field": "extension.keyword", + "shard_size": 25, + "size": 10, + }, + }, + }, + "sampler": Object { + "shard_size": 5000, + }, + }, + }, + "fields": undefined, + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "bool": Object { + "filter": Array [ + Object { + "match_phrase": Object { + "geo.src": "US", + }, + }, + ], + "must": Array [], + "must_not": Array [], + "should": Array [], + }, + }, + ], + }, + }, + "runtime_mappings": Object {}, + }, + "index": "kibana_sample*", + "size": 0, + "track_total_hits": true, +} +`; + +exports[`fieldStatsUtils buildSearchParams() should work correctly for fetching field examples 1`] = ` +Object { + "body": Object { + "_source": false, + "aggs": undefined, + "fields": Array [ + Object { + "field": "_id", + }, + ], + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "range": Object { + "timestamp": Object { + "format": "strict_date_optional_time", + "gte": "2022-12-05T23:00:00.000Z", + "lte": "2023-01-05T09:35:24.109Z", + }, + }, + }, + Object { + "bool": Object { + "filter": Array [ + Object { + "match_phrase": Object { + "geo.src": "US", + }, + }, + ], + "must": Array [], + "must_not": Array [], + "should": Array [], + }, + }, + Object { + "exists": Object { + "field": "_id", + }, + }, + ], + }, + }, + "runtime_mappings": Object { + "hour_of_day": Object { + "script": Object { + "source": "emit(doc['timestamp'].value.getHour());", + }, + "type": "long", + }, + }, + }, + "index": "kibana_sample_data_logs", + "size": 100, + "track_total_hits": true, +} +`; diff --git a/src/plugins/unified_field_list/common/utils/field_stats_utils.test.ts b/src/plugins/unified_field_list/common/utils/field_stats_utils.test.ts new file mode 100644 index 00000000000000..1135f028f1702b --- /dev/null +++ b/src/plugins/unified_field_list/common/utils/field_stats_utils.test.ts @@ -0,0 +1,153 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { buildSearchParams } from './field_stats_utils'; + +describe('fieldStatsUtils', function () { + describe('buildSearchParams()', () => { + it('should work correctly for aggregations and a data view time field', () => { + expect( + buildSearchParams({ + dataViewPattern: 'kibana_sample_data_logs', + timeFieldName: 'timestamp', + fromDate: '2022-12-05T23:00:00.000Z', + toDate: '2023-01-05T09:33:05.359Z', + dslQuery: { + bool: { + must: [], + filter: [ + { + match_phrase: { + 'geo.src': 'US', + }, + }, + ], + should: [], + must_not: [], + }, + }, + runtimeMappings: { + hour_of_day: { + type: 'long', + script: { + source: "emit(doc['timestamp'].value.getHour());", + }, + }, + }, + aggs: { + sample: { + sampler: { + shard_size: 5000, + }, + aggs: { + sample_count: { + value_count: { + field: 'extension.keyword', + }, + }, + top_values: { + terms: { + field: 'extension.keyword', + size: 10, + shard_size: 25, + }, + }, + }, + }, + }, + }) + ).toMatchSnapshot(); + }); + + it('should work correctly for aggregations without a data view time field', () => { + expect( + buildSearchParams({ + dataViewPattern: 'kibana_sample*', + timeFieldName: '', + fromDate: '2022-12-05T23:00:00.000Z', + toDate: '2023-01-05T09:33:53.717Z', + dslQuery: { + bool: { + must: [], + filter: [ + { + match_phrase: { + 'geo.src': 'US', + }, + }, + ], + should: [], + must_not: [], + }, + }, + runtimeMappings: {}, + aggs: { + sample: { + sampler: { + shard_size: 5000, + }, + aggs: { + sample_count: { + value_count: { + field: 'extension.keyword', + }, + }, + top_values: { + terms: { + field: 'extension.keyword', + size: 10, + shard_size: 25, + }, + }, + }, + }, + }, + }) + ).toMatchSnapshot(); + }); + + it('should work correctly for fetching field examples', () => { + expect( + buildSearchParams({ + dataViewPattern: 'kibana_sample_data_logs', + timeFieldName: 'timestamp', + fromDate: '2022-12-05T23:00:00.000Z', + toDate: '2023-01-05T09:35:24.109Z', + dslQuery: { + bool: { + must: [], + filter: [ + { + match_phrase: { + 'geo.src': 'US', + }, + }, + ], + should: [], + must_not: [], + }, + }, + runtimeMappings: { + hour_of_day: { + type: 'long', + script: { + source: "emit(doc['timestamp'].value.getHour());", + }, + }, + }, + fields: [ + { + field: '_id', + }, + ], + size: 100, + }) + ).toMatchSnapshot(); + }); + }); +}); diff --git a/src/plugins/unified_field_list/common/utils/field_stats_utils.ts b/src/plugins/unified_field_list/common/utils/field_stats_utils.ts index 89bf8a44139cfd..9fac4c04946c97 100644 --- a/src/plugins/unified_field_list/common/utils/field_stats_utils.ts +++ b/src/plugins/unified_field_list/common/utils/field_stats_utils.ts @@ -55,6 +55,7 @@ export function buildSearchParams({ [timeFieldName]: { gte: fromDate, lte: toDate, + format: 'strict_date_optional_time', }, }, }, From 8be155d295dd96fce295c69d974c154868f286aa Mon Sep 17 00:00:00 2001 From: Saarika Bhasi <55930906+saarikabhasi@users.noreply.github.com> Date: Thu, 5 Jan 2023 10:18:07 -0500 Subject: [PATCH 21/36] [Enterprise Search] Engines list UI page - part 1 (#147399) ## Summary Engine list UI page - part 1 This PR includes, 1. Initial layout for Engine list UI page 2. Search bar to search via engine names or indices 3. Initial support for pagination 4. Test cases 5. Fetch engines list from mocked values Screen Shot 2022-12-12 at 5 35 04 PM TODO(s) (as per most recent UI [design](https://github.com/elastic/enterprise-search-team/issues/3446#issuecomment-1341890967) ) Will create separate PR to handle below scenarios. - Incorporate Flyout panel to list all the indices - Change to actual Backend API call to fetch engine list - Add Fully functional Paginations - Add index health, Documents count, Last updated date when backend API is ready - Update test cases ### 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) ### 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) --- .../api/engines/fetch_engines_api_logic.ts | 59 +++++++ .../components/tables/engines_table.tsx | 113 +++++++++++++ .../engines/engine_list_logic.test.ts | 153 ++++++++++++++++++ .../components/engines/engines_list.test.tsx | 44 +++++ .../components/engines/engines_list.tsx | 113 ++++++++++++- .../components/engines/engines_list_logic.ts | 82 ++++++++++ .../components/engines/types.ts | 33 ++++ .../enterprise_search_content/routes.ts | 1 + 8 files changed, 595 insertions(+), 3 deletions(-) create mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/engines/fetch_engines_api_logic.ts create mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/components/tables/engines_table.tsx create mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engine_list_logic.test.ts create mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.test.tsx create mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list_logic.ts create mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/types.ts diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/engines/fetch_engines_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/engines/fetch_engines_api_logic.ts new file mode 100644 index 00000000000000..5c2e57be2a39d5 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/engines/fetch_engines_api_logic.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 { createApiLogic } from '../../../shared/api_logic/create_api_logic'; + +import { EngineListDetails, Meta } from '../../components/engines/types'; + +export interface EnginesListAPIResponse { + results: EngineListDetails[]; + meta: Meta; + searchQuery?: string; +} +export interface EnginesListAPIArguments { + meta: Meta; + searchQuery?: string; +} + +const metaValue: Meta = { + from: 1, + size: 3, + total: 5, +}; +// These are mocked values. To be changed as per the latest requirement when Backend API is ready +export const mockedEngines: EnginesListAPIResponse[] = [ + { + meta: metaValue, + results: [ + { + name: 'engine-name-1', + indices: ['index-18', 'index-23'], + last_updated: '21 March 2021', + document_count: 18, + }, + { + name: 'engine-name-2', + indices: ['index-180', 'index-230', 'index-8', 'index-2'], + last_updated: '10 Jul 2018', + document_count: 10, + }, + + { + name: 'engine-name-3', + indices: ['index-2', 'index-3'], + last_updated: '21 December 2022', + document_count: 8, + }, + ], + }, +]; +export const fetchEngines = async () => { + // TODO replace with http call when backend is ready + return mockedEngines[0]; +}; + +export const FetchEnginesAPILogic = createApiLogic(['content', 'engines_api_logic'], fetchEngines); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/components/tables/engines_table.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/components/tables/engines_table.tsx new file mode 100644 index 00000000000000..a66ff164e7b8f5 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/components/tables/engines_table.tsx @@ -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 React from 'react'; + +import { CriteriaWithPagination, EuiBasicTable, EuiBasicTableColumn } from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; +import { FormattedNumber } from '@kbn/i18n-react'; + +import { DELETE_BUTTON_LABEL, MANAGE_BUTTON_LABEL } from '../../../../../shared/constants'; + +import { convertMetaToPagination, EngineListDetails, Meta } from '../../types'; + +// add health status +interface EnginesListTableProps { + enginesList: EngineListDetails[]; + loading: boolean; + meta: Meta; + isLoading?: boolean; + onChange: (criteria: CriteriaWithPagination) => void; +} +export const EnginesListTable: React.FC = ({ + enginesList, + meta, + isLoading, + onChange, +}) => { + const columns: Array> = [ + { + field: 'name', + name: i18n.translate('xpack.enterpriseSearch.content.enginesList.table.column.name', { + defaultMessage: 'Engine Name', + }), + width: '30%', + truncateText: true, + mobileOptions: { + header: true, + enlarge: true, + width: '100%', + }, + }, + { + field: 'document_count', + name: i18n.translate('xpack.enterpriseSearch.content.enginesList.table.column.documents', { + defaultMessage: 'Documents', + }), + dataType: 'number', + render: (number: number) => , + }, + { + field: 'last_updated', + name: i18n.translate('xpack.enterpriseSearch.content.enginesList.table.column.lastUpdated', { + defaultMessage: 'Last updated', + }), + dataType: 'string', + }, + { + field: 'indices.length', + datatype: 'number', + name: i18n.translate('xpack.enterpriseSearch.content.enginesList.table.column.indices', { + defaultMessage: 'Indices', + }), + }, + + { + name: i18n.translate('xpack.enterpriseSearch.content.enginesList.table.column.actions', { + defaultMessage: 'Actions', + }), + actions: [ + { + name: MANAGE_BUTTON_LABEL, + description: i18n.translate( + 'xpack.enterpriseSearch.content.enginesList.table.column.action.manage.buttonDescription', + { + defaultMessage: 'Manage this engine', + } + ), + type: 'icon', + icon: 'eye', + onClick: () => {}, + }, + { + name: DELETE_BUTTON_LABEL, + description: i18n.translate( + 'xpack.enterpriseSearch.content.enginesList.table.column.action.delete.buttonDescription', + { + defaultMessage: 'Delete this engine', + } + ), + type: 'icon', + icon: 'trash', + color: 'danger', + onClick: () => {}, + }, + ], + }, + ]; + + return ( + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engine_list_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engine_list_logic.test.ts new file mode 100644 index 00000000000000..efd4ae2a622dea --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engine_list_logic.test.ts @@ -0,0 +1,153 @@ +/* + * Copyright 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 { LogicMounter, mockFlashMessageHelpers } from '../../../__mocks__/kea_logic'; + +import { nextTick } from '@kbn/test-jest-helpers'; + +import { HttpError, Status } from '../../../../../common/types/api'; + +import { FetchEnginesAPILogic } from '../../api/engines/fetch_engines_api_logic'; + +import { EnginesListLogic } from './engines_list_logic'; +import { DEFAULT_META, EngineListDetails } from './types'; + +const DEFAULT_VALUES = { + data: undefined, + results: [], + meta: DEFAULT_META, + parameters: { meta: DEFAULT_META }, + status: Status.IDLE, +}; + +// sample engines list + +const results: EngineListDetails[] = [ + { + name: 'engine-name-1', + indices: ['index-18', 'index-23'], + last_updated: '21 March 2021', + document_count: 18, + }, + { + name: 'engine-name-2', + indices: ['index-180', 'index-230', 'index-8', 'index-2'], + last_updated: '10 Jul 2018', + document_count: 10, + }, + + { + name: 'engine-name-3', + indices: ['index-2', 'index-3'], + last_updated: '21 December 2022', + document_count: 8, + }, +]; + +describe('EnginesListLogic', () => { + const { mount: apiLogicMount } = new LogicMounter(FetchEnginesAPILogic); + const { mount } = new LogicMounter(EnginesListLogic); + + beforeEach(() => { + jest.clearAllMocks(); + jest.useRealTimers(); + apiLogicMount(); + mount(); + }); + it('has expected default values', () => { + expect(EnginesListLogic.values).toEqual(DEFAULT_VALUES); + }); + describe('actions', () => { + describe('onPaginate', () => { + it('updates meta with newPageIndex', () => { + expect(EnginesListLogic.values).toEqual(DEFAULT_VALUES); + // This test does not work for now, test below code when Kibana GET API for pagination is ready + // EnginesListLogic.actions.onPaginate(2); + // expect(EnginesListLogic.values).toEqual({ + // ...DEFAULT_VALUES, + // meta: { + // ...DEFAULT_META, + // from: 2, + // }, + // }); + }); + }); + }); + describe('reducers', () => { + describe('meta', () => { + it('updates when apiSuccess', () => { + const newPageMeta = { + from: 2, + size: 3, + total: 6, + }; + expect(EnginesListLogic.values).toEqual(DEFAULT_VALUES); + EnginesListLogic.actions.apiSuccess({ + meta: newPageMeta, + results, + searchQuery: 'k', + }); + expect(EnginesListLogic.values).toEqual({ + ...DEFAULT_VALUES, + data: { + results, + meta: newPageMeta, + searchQuery: 'k', + }, + meta: newPageMeta, + parameters: { + meta: newPageMeta, + searchQuery: 'k', + }, + results, + status: Status.SUCCESS, + }); + }); + }); + }); + describe('listeners', () => { + it('call flashAPIErrors on apiError', () => { + EnginesListLogic.actions.apiError({} as HttpError); + expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1); + expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledWith({}); + }); + + it('call makeRequest on fetchEngines', async () => { + jest.useFakeTimers({ legacyFakeTimers: true }); + EnginesListLogic.actions.makeRequest = jest.fn(); + EnginesListLogic.actions.fetchEngines({ meta: DEFAULT_META }); + await nextTick(); + expect(EnginesListLogic.actions.makeRequest).toHaveBeenCalledWith({ + meta: DEFAULT_META, + }); + }); + }); + describe('selectors', () => { + describe('enginesList', () => { + it('updates when apiSuccess', () => { + expect(EnginesListLogic.values).toEqual(DEFAULT_VALUES); + EnginesListLogic.actions.apiSuccess({ + results, + meta: DEFAULT_META, + }); + expect(EnginesListLogic.values).toEqual({ + ...DEFAULT_VALUES, + data: { + results, + meta: DEFAULT_META, + }, + meta: DEFAULT_META, + parameters: { + meta: DEFAULT_META, + }, + results, + status: Status.SUCCESS, + }); + }); + }); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.test.tsx new file mode 100644 index 00000000000000..20ee8ac80bd490 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.test.tsx @@ -0,0 +1,44 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { setMockActions, setMockValues } from '../../../__mocks__/kea_logic'; + +import React from 'react'; + +import { shallow } from 'enzyme'; + +import { mockedEngines } from '../../api/engines/fetch_engines_api_logic'; + +import { EnginesListTable } from './components/tables/engines_table'; +import { EnginesList } from './engines_list'; +import { DEFAULT_META } from './types'; + +const mockValues = { + enginesList: mockedEngines, + meta: DEFAULT_META, +}; +const mockActions = { + fetchEngines: jest.fn(), + onPaginate: jest.fn(), +}; + +describe('EnginesList', () => { + beforeEach(() => { + jest.clearAllMocks(); + global.localStorage.clear(); + }); + describe('Empty state', () => {}); + + it('renders with Engines data ', async () => { + setMockValues(mockValues); + setMockActions(mockActions); + + const wrapper = shallow(); + + expect(wrapper.find(EnginesListTable)).toHaveLength(1); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.tsx index 7292dad6db7450..702d623c44dc17 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.tsx @@ -5,13 +5,35 @@ * 2.0. */ -import React from 'react'; +import React, { useEffect, useState } from 'react'; + +import { useActions, useValues } from 'kea'; + +import { EuiButton, EuiFieldSearch, EuiLink, EuiSpacer, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { FormattedMessage, FormattedNumber } from '@kbn/i18n-react'; + +import { DataPanel } from '../../../shared/data_panel/data_panel'; +import { handlePageChange } from '../../../shared/table_pagination'; import { EnterpriseSearchContentPageTemplate } from '../layout/page_template'; -export const EnginesList = () => { +import { EnginesListTable } from './components/tables/engines_table'; +import { EnginesListLogic } from './engines_list_logic'; + +export const EnginesList: React.FC = () => { + const { fetchEngines, onPaginate } = useActions(EnginesListLogic); + const { meta, results } = useValues(EnginesListLogic); + const [searchQuery, setSearchValue] = useState(''); + + useEffect(() => { + fetchEngines({ + meta, + searchQuery, + }); + }, [meta, searchQuery]); + return ( { }), ]} pageHeader={{ - pageTitle: i18n.translate('xpack.enterpriseSearch.content.engines.headerTitle', { + pageTitle: i18n.translate('xpack.enterpriseSearch.content.engines.title', { defaultMessage: 'Engines', }), + rightSideItems: [ + + {i18n.translate('xpack.enterpriseSearch.content.engines.createEngineButtonLabel', { + defaultMessage: 'Create engine', + })} + , + ], }} pageViewTelemetry="Engines" isLoading={false} > + + {i18n.translate('xpack.enterpriseSearch.content.engines.description', { + defaultMessage: + 'Engines allow you to query indexed data with a complete set of relevance, analytics and personalization tools. To learn more about how engines work in Enterprise search ', + })} + + + {i18n.translate('xpack.enterpriseSearch.content.engines.documentation', { + defaultMessage: 'explore our Engines documentation', + })} + + + +
+ { + setSearchValue(event.currentTarget.value); + }} + /> +
+ + + {i18n.translate('xpack.enterpriseSearch.content.engines.searchPlaceholder.description', { + defaultMessage: 'Locate an engine via name or indices', + })} + + + + + + +
+ ), + size: ( + + + + ), + total: , + }} + /> + + + {i18n.translate('xpack.enterpriseSearch.content.engines.title', { + defaultMessage: 'Engines', + })} + + } + > + + + +
); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list_logic.ts new file mode 100644 index 00000000000000..5f5bc657ef83ba --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list_logic.ts @@ -0,0 +1,82 @@ +/* + * Copyright 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 { kea, MakeLogicType } from 'kea'; + +import { Actions } from '../../../shared/api_logic/create_api_logic'; + +import { flashAPIErrors } from '../../../shared/flash_messages'; + +import { + EnginesListAPIArguments, + EnginesListAPIResponse, + FetchEnginesAPILogic, +} from '../../api/engines/fetch_engines_api_logic'; + +import { DEFAULT_META, EngineListDetails, Meta, updateMetaPageIndex } from './types'; + +type EnginesListActions = Pick< + Actions, + 'apiError' | 'apiSuccess' | 'makeRequest' +> & { + fetchEngines({ meta, searchQuery }: { meta: Meta; searchQuery?: string }): { + meta: Meta; + searchQuery?: string; + }; + onPaginate(pageNumber: number): { pageNumber: number }; +}; +interface EngineListValues { + data: typeof FetchEnginesAPILogic.values.data; + meta: Meta; + results: EngineListDetails[]; // stores engine list value from data + parameters: { meta: Meta; searchQuery?: string }; // Added this variable to store to the search Query value as well + status: typeof FetchEnginesAPILogic.values.status; +} + +export const EnginesListLogic = kea>({ + connect: { + actions: [FetchEnginesAPILogic, ['makeRequest', 'apiSuccess', 'apiError']], + values: [FetchEnginesAPILogic, ['data', 'status']], + }, + path: ['enterprise_search', 'content', 'engine_list_logic'], + actions: { + fetchEngines: ({ meta, searchQuery }) => ({ + meta, + searchQuery, + }), + + onPaginate: (pageNumber) => ({ pageNumber }), + }, + reducers: ({}) => ({ + parameters: [ + { meta: DEFAULT_META }, + { + apiSuccess: (_, { meta, searchQuery }) => ({ + meta, + searchQuery, + }), + onPaginate: (state, { pageNumber }) => ({ + ...state, + meta: updateMetaPageIndex(state.meta, pageNumber), + }), + }, + ], + }), + + selectors: ({ selectors }) => ({ + results: [() => [selectors.data], (data) => data?.results ?? []], + meta: [() => [selectors.parameters], (parameters) => parameters.meta], + }), + listeners: ({ actions }) => ({ + apiError: (e) => { + flashAPIErrors(e); + }, + fetchEngines: async (input) => { + actions.makeRequest(input); + }, + }), +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/types.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/types.ts new file mode 100644 index 00000000000000..d21e3c92c83290 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/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. + */ + +export interface Meta { + from: number; + size: number; + total: number; +} + +export interface EngineListDetails { + name: string; + indices: string[]; + last_updated: string; + document_count: number; +} +export const DEFAULT_META = { + from: 1, + size: 3, + total: 0, +}; + +export const convertMetaToPagination = (meta: Meta) => ({ + pageIndex: meta.from - 1, + pageSize: meta.size, + totalItemCount: meta.total, +}); +export const updateMetaPageIndex = (oldState: Meta, newPageIndex: number) => { + return { ...oldState, from: newPageIndex }; +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/routes.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/routes.ts index 82a2af053773a5..edd3aa3d42edbb 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/routes.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/routes.ts @@ -23,5 +23,6 @@ export const SEARCH_INDEX_CRAWLER_DOMAIN_DETAIL_PATH = `${SEARCH_INDEX_PATH}/cra export const SEARCH_INDEX_SELECT_CONNECTOR_PATH = `${SEARCH_INDEX_PATH}/select_connector`; export const ENGINES_PATH = `${ROOT_PATH}engines`; +export const ENGINE_CREATION_PATH = `${ENGINES_PATH}/new`; export const ML_MANAGE_TRAINED_MODELS_PATH = '/app/ml/trained_models'; From b9936902aadd8caad7f721e6d9e22828421e6878 Mon Sep 17 00:00:00 2001 From: Nicolas Ruflin Date: Thu, 5 Jan 2023 16:20:32 +0100 Subject: [PATCH 22/36] [Fleet] Discuss: Cleanup model for each fleet index (#120674) This PR seeks to define existing cleanup behavior and desired cleanup behavior for each system index managed by Fleet. Co-authored-by: Kyle Pollich --- x-pack/plugins/fleet/dev_docs/data_model.md | 23 ++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/fleet/dev_docs/data_model.md b/x-pack/plugins/fleet/dev_docs/data_model.md index a36cda76fffb6d..1e74afe3115b97 100644 --- a/x-pack/plugins/fleet/dev_docs/data_model.md +++ b/x-pack/plugins/fleet/dev_docs/data_model.md @@ -29,6 +29,8 @@ In prior alpha versions of Fleet, this data was also stored in Saved Objects bec communicating directly with Kibana for policy updates. Once Fleet Server was introduced, that data was migrated to these Elasticsearch indices to be readable by Fleet Server. +_Note: All of these system indices are plain indices, and not data streams._ + ### `.fleet-agents` index Each document in this index tracks an individual Elastic Agent's enrollment in the Fleet, which policy it is current @@ -38,6 +40,8 @@ All of the code that interacts with this index is currently located in [`x-pack/plugins/fleet/server/services/agents/crud.ts`](../server/services/agents/crud.ts) and the schema of these documents is maintained by the `FleetServerAgent` TypeScript interface. +- Cleanup model: N/A + ### `.fleet-actions` index Each document in this index represents an action that was initiated by a user and needs to be processed by Fleet Server @@ -47,18 +51,35 @@ list. The total schema for actions is represented by the `FleetServerAgentAction` type. +- Cleanup model: Fleet Server considers actions expired after 30 days, and will remove them via an hourly process +- [Source](https://github.com/elastic/fleet-server/blob/9af3b2176b42a0de34c5583b5430558c03792dd0/internal/pkg/gc/schedules.go#L29-L33) + ### `.fleet-actions-results` +- Cleanup model: N/A + ### `.fleet-servers` +- Cleanup model: N/A + ### `.fleet-artifacts` -### `.fleet-entrollment-api-keys` +- Cleanup model: N/A + +### `.fleet-enrollment-api-keys` + +- Cleanup model: Deleteable via Fleet UI/API, deleted when an agent policy is deleted +- [Source](https://github.com/elastic/kibana/blob/7a35748cb43f2c73623ffda6fa02b91c3cb4c689/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts#L102) ### `.fleet-policies` +- Cleanup model: Deleted when a corresponding agent policy is deleted in the Fleet UI or API +- [Source](https://github.com/elastic/kibana/blob/976b1b2331371f4a1325f6947d38d1f4de7a7254/x-pack/plugins/fleet/server/services/agent_policy.ts#L699-L701) + ### `.fleet-policies-leader` +- Cleanup model: N/A + ## Saved Object types The Fleet plugin leverages several Saved Object types to track metadata on install packages, agent policies, and more. From 2adf37b2033a0a5f6fdf4d96b30a8f3f01fe2524 Mon Sep 17 00:00:00 2001 From: Spencer Date: Thu, 5 Jan 2023 09:21:54 -0600 Subject: [PATCH 23/36] [fleet/pkgsDaily] disable CI log capture so we can see logging on success (#148459) --- .buildkite/pipelines/fleet/packages_daily.yml | 14 +++----------- .../scripts/steps/fleet/install_all_packages.sh | 3 ++- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.buildkite/pipelines/fleet/packages_daily.yml b/.buildkite/pipelines/fleet/packages_daily.yml index e64358661d7b9a..e337617000a477 100644 --- a/.buildkite/pipelines/fleet/packages_daily.yml +++ b/.buildkite/pipelines/fleet/packages_daily.yml @@ -7,21 +7,13 @@ steps: - wait - - command: .buildkite/scripts/steps/build_kibana.sh - label: Build Kibana Distribution and Plugins - agents: - queue: c2-16 - key: build - if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''" - timeout_in_minutes: 60 - - - wait - - command: .buildkite/scripts/steps/fleet/install_all_packages.sh label: Install All Packages agents: queue: n2-2 - key: linting + env: + # ensure that the FTR logs all output for these tests + DISABLE_CI_LOG_OUTPUT_CAPTURE: 'true' timeout_in_minutes: 90 - wait: ~ diff --git a/.buildkite/scripts/steps/fleet/install_all_packages.sh b/.buildkite/scripts/steps/fleet/install_all_packages.sh index b02c930160f126..eb001b4399b866 100755 --- a/.buildkite/scripts/steps/fleet/install_all_packages.sh +++ b/.buildkite/scripts/steps/fleet/install_all_packages.sh @@ -7,5 +7,6 @@ source .buildkite/scripts/steps/functional/common.sh echo '--- Installing all packages' node scripts/functional_tests \ - --debug --bail \ + --debug \ + --bail \ --config x-pack/test/fleet_packages/config.ts From c5291d1b07901567ee94cf50b728c096ad9c1296 Mon Sep 17 00:00:00 2001 From: Thomas Neirynck Date: Thu, 5 Jan 2023 10:26:44 -0500 Subject: [PATCH 24/36] [Journeys] Add dashboard delete to dashboards listing (#148267) ## Summary Adds a few more user flows to dashboard listing journeys. Partially address https://github.com/elastic/kibana/issues/145627 ### Checklist Delete any items that are not applicable to this PR. - ~~[ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)~~ - ~~[ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~~ - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - ~~[ ] 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)~~ ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --- .../listing/dashboard_listing.tsx | 33 ++++++++++++++----- .../dashboard/public/dashboard_constants.ts | 1 + .../journeys/dashboard_listing_page.ts | 21 +++++++++--- 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/src/plugins/dashboard/public/dashboard_app/listing/dashboard_listing.tsx b/src/plugins/dashboard/public/dashboard_app/listing/dashboard_listing.tsx index fb0281db9c8baf..d857e640c04da1 100644 --- a/src/plugins/dashboard/public/dashboard_app/listing/dashboard_listing.tsx +++ b/src/plugins/dashboard/public/dashboard_app/listing/dashboard_listing.tsx @@ -25,7 +25,7 @@ import type { SavedObjectsFindOptionsReference, SimpleSavedObject } from '@kbn/c import { TableListView, type UserContentCommonSchema } from '@kbn/content-management-table-list'; import { reportPerformanceMetricEvent } from '@kbn/ebt-tools'; -import { SAVED_OBJECT_LOADED_TIME } from '../../dashboard_constants'; +import { SAVED_OBJECT_DELETE_TIME, SAVED_OBJECT_LOADED_TIME } from '../../dashboard_constants'; import { getDashboardBreadcrumb, @@ -292,7 +292,7 @@ export const DashboardListing = ({ eventName: SAVED_OBJECT_LOADED_TIME, duration: searchDuration, meta: { - saved_object_type: 'dashboard', + saved_object_type: DASHBOARD_SAVED_OBJECT_TYPE, }, }); return { @@ -306,16 +306,31 @@ export const DashboardListing = ({ const deleteItems = useCallback( async (dashboardsToDelete: Array<{ id: string }>) => { - await Promise.all( - dashboardsToDelete.map(({ id }) => { - dashboardSessionStorage.clearState(id); - return savedObjectsClient.delete(DASHBOARD_SAVED_OBJECT_TYPE, id); - }) - ).catch((error) => { + try { + const deleteStartTime = window.performance.now(); + + await Promise.all( + dashboardsToDelete.map(({ id }) => { + dashboardSessionStorage.clearState(id); + return savedObjectsClient.delete(DASHBOARD_SAVED_OBJECT_TYPE, id); + }) + ); + + const deleteDuration = window.performance.now() - deleteStartTime; + reportPerformanceMetricEvent(pluginServices.getServices().analytics, { + eventName: SAVED_OBJECT_DELETE_TIME, + duration: deleteDuration, + meta: { + saved_object_type: DASHBOARD_SAVED_OBJECT_TYPE, + total: dashboardsToDelete.length, + }, + }); + } catch (error) { toasts.addError(error, { title: dashboardListingErrorStrings.getErrorDeletingDashboardToast(), }); - }); + } + setUnsavedDashboardIds(dashboardSessionStorage.getDashboardIdsWithUnsavedChanges()); }, [savedObjectsClient, dashboardSessionStorage, toasts] diff --git a/src/plugins/dashboard/public/dashboard_constants.ts b/src/plugins/dashboard/public/dashboard_constants.ts index 0bad3dda9786a9..9f8c45ad82d694 100644 --- a/src/plugins/dashboard/public/dashboard_constants.ts +++ b/src/plugins/dashboard/public/dashboard_constants.ts @@ -43,6 +43,7 @@ export function createDashboardListingFilterUrl(filter: string | undefined) { // ------------------------------------------------------------------ export const DASHBOARD_LOADED_EVENT = 'dashboard_loaded'; export const SAVED_OBJECT_LOADED_TIME = 'saved_object_loaded_time'; +export const SAVED_OBJECT_DELETE_TIME = 'saved_object_delete_time'; export const DASHBOARD_UI_METRIC_ID = 'dashboard'; // ------------------------------------------------------------------ diff --git a/x-pack/performance/journeys/dashboard_listing_page.ts b/x-pack/performance/journeys/dashboard_listing_page.ts index 6aa51e239e86be..0c528ac7c45596 100644 --- a/x-pack/performance/journeys/dashboard_listing_page.ts +++ b/x-pack/performance/journeys/dashboard_listing_page.ts @@ -13,7 +13,20 @@ export const journey = new Journey({ 'x-pack/performance/kbn_archives/flights_no_map_dashboard', 'x-pack/performance/kbn_archives/logs_no_map_dashboard', ], -}).step('Go to Dashboards Page', async ({ page, kbnUrl }) => { - await page.goto(kbnUrl.get(`/app/dashboards`)); - await page.waitForSelector(`[data-test-subj="table-is-ready"]`); -}); +}) + .step('Go to Dashboards Page', async ({ page, kbnUrl }) => { + await page.goto(kbnUrl.get(`/app/dashboards`)); + await page.waitForSelector(`[data-test-subj="table-is-ready"]`); + }) + .step('Search dashboards page', async ({ page, inputDelays }) => { + await page.type('[data-test-subj="tableListSearchBox"]', 'Web', { + delay: inputDelays.TYPING, + }); + await page.waitForSelector(`[data-test-subj="table-is-ready"]`); + }) + .step('Delete dashboard', async ({ page, log }) => { + await page.click('[data-test-subj="checkboxSelectRow-edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b"]'); + await page.click('[data-test-subj="deleteSelectedItems"]'); + await page.click('[data-test-subj="confirmModalConfirmButton"]'); + await page.waitForSelector(`[data-test-subj="table-is-ready"]`); + }); From 2f9e002563666ccec4b4e5dba12395b7aa11e7e6 Mon Sep 17 00:00:00 2001 From: Melissa Alvarez Date: Thu, 5 Jan 2023 08:57:17 -0700 Subject: [PATCH 25/36] [ML] Anomaly Detection geo wizard: hide bucket span estimator since not supported (#148416) ## Summary This PR hides the estimate bucket span button in the geo wizard as bucket estimation is not currently supported. Fixes https://github.com/elastic/kibana/issues/147299 --- .../pick_fields_step/components/geo_view/settings.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/settings.tsx b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/settings.tsx index d5ad0488cec2f8..0693a85d20cecd 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/settings.tsx +++ b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/settings.tsx @@ -29,7 +29,7 @@ export const GeoSettings: FC = ({ setIsValid }) => { - + From 50fcf242992c36a5113d9fd213f0e2e32c91c1b2 Mon Sep 17 00:00:00 2001 From: Julia Date: Thu, 5 Jan 2023 18:14:38 +0200 Subject: [PATCH 26/36] [RAM] [On-week] APM for bulk ops (#146754) ## Summary My onWeek project included an investigation how we can use our APM. I've found out that it can be useful instrument for profiling our endpoint calls and catching errors. Profiling would looks like that: ![Screenshot 2022-11-30 at 15 03 02](https://user-images.githubusercontent.com/26089545/205303371-6b3afb6b-1d17-4fdf-9b0c-c6c1f8c658f1.png) So we can profile endpoint calls during development and on prod in the cloud. Each part of the code we want to see in APM, we need to wrap with withSpan. Mostly it's for async function calls, but can be used for synchronous code as well. It make sense if synchronous code lasts for some time (more than several ms), because of overhead of withSpan wrapper. Here I've done adjustment for APM of for our bulk actions (Except edit, because we have big PR with refactoring for this one) , create and clone endpoints. Later we can extend number of endpoints involved. Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../bulk_mark_api_keys_for_invalidation.ts | 49 ++-- .../server/rules_client/common/index.ts | 1 + .../retry_if_bulk_operation_conflicts.ts | 17 +- .../common/try_to_remove_tasks.ts | 58 ++++ .../lib/check_authorization_and_get_total.ts | 85 +++--- .../lib/create_rule_saved_object.ts | 33 ++- .../lib/get_authorization_filter.ts | 11 +- .../rules_client/lib/recover_rule_alerts.ts | 89 +++--- .../server/rules_client/lib/schedule_task.ts | 5 +- .../rules_client/methods/bulk_delete.ts | 148 +++++----- .../rules_client/methods/bulk_disable.ts | 257 ++++++++-------- .../rules_client/methods/bulk_enable.ts | 274 ++++++++++-------- .../server/rules_client/methods/clone.ts | 46 +-- .../server/rules_client/methods/create.ts | 43 ++- .../server/rules_client/methods/disable.ts | 2 +- .../rules_client/tests/bulk_enable.test.ts | 1 + x-pack/plugins/alerting/tsconfig.json | 1 + 17 files changed, 636 insertions(+), 484 deletions(-) create mode 100644 x-pack/plugins/alerting/server/rules_client/common/try_to_remove_tasks.ts diff --git a/x-pack/plugins/alerting/server/invalidate_pending_api_keys/bulk_mark_api_keys_for_invalidation.ts b/x-pack/plugins/alerting/server/invalidate_pending_api_keys/bulk_mark_api_keys_for_invalidation.ts index 8999d12772f035..290740a4ddd8bf 100644 --- a/x-pack/plugins/alerting/server/invalidate_pending_api_keys/bulk_mark_api_keys_for_invalidation.ts +++ b/x-pack/plugins/alerting/server/invalidate_pending_api_keys/bulk_mark_api_keys_for_invalidation.ts @@ -6,34 +6,37 @@ */ import { Logger, SavedObjectsClientContract } from '@kbn/core/server'; +import { withSpan } from '@kbn/apm-utils'; export const bulkMarkApiKeysForInvalidation = async ( { apiKeys }: { apiKeys: string[] }, logger: Logger, savedObjectsClient: SavedObjectsClientContract ): Promise => { - if (apiKeys.length === 0) { - return; - } + withSpan({ name: 'bulkMarkApiKeysForInvalidation', type: 'rules' }, async () => { + if (apiKeys.length === 0) { + return; + } - try { - const apiKeyIds = apiKeys.map( - (apiKey) => Buffer.from(apiKey, 'base64').toString().split(':')[0] - ); - await savedObjectsClient.bulkCreate( - apiKeyIds.map((apiKeyId) => ({ - attributes: { - apiKeyId, - createdAt: new Date().toISOString(), - }, - type: 'api_key_pending_invalidation', - })) - ); - } catch (e) { - logger.error( - `Failed to bulk mark list of API keys [${apiKeys - .map((key) => `"${key}"`) - .join(', ')}] for invalidation: ${e.message}` - ); - } + try { + const apiKeyIds = apiKeys.map( + (apiKey) => Buffer.from(apiKey, 'base64').toString().split(':')[0] + ); + await savedObjectsClient.bulkCreate( + apiKeyIds.map((apiKeyId) => ({ + attributes: { + apiKeyId, + createdAt: new Date().toISOString(), + }, + type: 'api_key_pending_invalidation', + })) + ); + } catch (e) { + logger.error( + `Failed to bulk mark list of API keys [${apiKeys + .map((key) => `"${key}"`) + .join(', ')}] for invalidation: ${e.message}` + ); + } + }); }; diff --git a/x-pack/plugins/alerting/server/rules_client/common/index.ts b/x-pack/plugins/alerting/server/rules_client/common/index.ts index cbff1677c631c2..6019eb0f4307e4 100644 --- a/x-pack/plugins/alerting/server/rules_client/common/index.ts +++ b/x-pack/plugins/alerting/server/rules_client/common/index.ts @@ -20,3 +20,4 @@ export { parseDate } from './parse_date'; export { includeFieldsRequiredForAuthentication } from './include_fields_required_for_authentication'; export { getAndValidateCommonBulkOptions } from './get_and_validate_common_bulk_options'; export * from './snooze_utils'; +export { tryToRemoveTasks } from './try_to_remove_tasks'; diff --git a/x-pack/plugins/alerting/server/rules_client/common/retry_if_bulk_operation_conflicts.ts b/x-pack/plugins/alerting/server/rules_client/common/retry_if_bulk_operation_conflicts.ts index 4210de12076238..428f43a0dcfa64 100644 --- a/x-pack/plugins/alerting/server/rules_client/common/retry_if_bulk_operation_conflicts.ts +++ b/x-pack/plugins/alerting/server/rules_client/common/retry_if_bulk_operation_conflicts.ts @@ -9,6 +9,7 @@ import pMap from 'p-map'; import { chunk } from 'lodash'; import { KueryNode } from '@kbn/es-query'; import { Logger, SavedObjectsBulkUpdateObject } from '@kbn/core/server'; +import { withSpan } from '@kbn/apm-utils'; import { convertRuleIdsToKueryNode } from '../../lib'; import { BulkOperationError } from '../types'; import { waitBeforeNextRetry, RETRY_IF_CONFLICTS_ATTEMPTS } from './wait_before_next_retry'; @@ -35,13 +36,15 @@ export const retryIfBulkOperationConflicts = async ({ filter: KueryNode | null; retries?: number; }): Promise => { - return handler({ - action, - logger, - bulkOperation, - filter, - retries, - }); + return withSpan({ name: 'retryIfBulkOperationConflicts', type: 'rules' }, () => + handler({ + action, + logger, + bulkOperation, + filter, + retries, + }) + ); }; const handler = async ({ diff --git a/x-pack/plugins/alerting/server/rules_client/common/try_to_remove_tasks.ts b/x-pack/plugins/alerting/server/rules_client/common/try_to_remove_tasks.ts new file mode 100644 index 00000000000000..89ad52d2323327 --- /dev/null +++ b/x-pack/plugins/alerting/server/rules_client/common/try_to_remove_tasks.ts @@ -0,0 +1,58 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Logger } from '@kbn/core/server'; +import { withSpan } from '@kbn/apm-utils'; +import { TaskManagerStartContract } from '@kbn/task-manager-plugin/server'; + +export const tryToRemoveTasks = async ({ + taskIdsToDelete, + logger, + taskManager, +}: { + taskIdsToDelete: string[]; + logger: Logger; + taskManager: TaskManagerStartContract; +}) => { + const taskIdsFailedToBeDeleted: string[] = []; + const taskIdsSuccessfullyDeleted: string[] = []; + return await withSpan({ name: 'taskManager.bulkRemoveIfExist', type: 'rules' }, async () => { + if (taskIdsToDelete.length > 0) { + try { + const resultFromDeletingTasks = await taskManager.bulkRemoveIfExist(taskIdsToDelete); + resultFromDeletingTasks?.statuses.forEach((status) => { + if (status.success) { + taskIdsSuccessfullyDeleted.push(status.id); + } else { + taskIdsFailedToBeDeleted.push(status.id); + } + }); + if (taskIdsSuccessfullyDeleted.length) { + logger.debug( + `Successfully deleted schedules for underlying tasks: ${taskIdsSuccessfullyDeleted.join( + ', ' + )}` + ); + } + if (taskIdsFailedToBeDeleted.length) { + logger.error( + `Failure to delete schedules for underlying tasks: ${taskIdsFailedToBeDeleted.join( + ', ' + )}` + ); + } + } catch (error) { + logger.error( + `Failure to delete schedules for underlying tasks: ${taskIdsToDelete.join( + ', ' + )}. TaskManager bulkRemoveIfExist failed with Error: ${error.message}` + ); + } + } + return taskIdsFailedToBeDeleted; + }); +}; diff --git a/x-pack/plugins/alerting/server/rules_client/lib/check_authorization_and_get_total.ts b/x-pack/plugins/alerting/server/rules_client/lib/check_authorization_and_get_total.ts index ecaa7fd172fa79..4327176841ad46 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/check_authorization_and_get_total.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/check_authorization_and_get_total.ts @@ -8,6 +8,7 @@ import pMap from 'p-map'; import Boom from '@hapi/boom'; import { KueryNode } from '@kbn/es-query'; +import { withSpan } from '@kbn/apm-utils'; import { RawRule } from '../../types'; import { WriteOperations, ReadOperations, AlertingAuthorizationEntity } from '../../authorization'; import { BulkAction, RuleBulkOperationAggregation } from '../types'; @@ -45,25 +46,27 @@ export const checkAuthorizationAndGetTotal = async ( RuleAuditAction: RuleAuditAction.DISABLE, }, }; - const { aggregations, total } = await context.unsecuredSavedObjectsClient.find< - RawRule, - RuleBulkOperationAggregation - >({ - filter, - page: 1, - perPage: 0, - type: 'alert', - aggs: { - alertTypeId: { - multi_terms: { - terms: [ - { field: 'alert.attributes.alertTypeId' }, - { field: 'alert.attributes.consumer' }, - ], + + const { aggregations, total } = await withSpan( + { name: 'unsecuredSavedObjectsClient.find', type: 'rules' }, + () => + context.unsecuredSavedObjectsClient.find({ + filter, + page: 1, + perPage: 0, + type: 'alert', + aggs: { + alertTypeId: { + multi_terms: { + terms: [ + { field: 'alert.attributes.alertTypeId' }, + { field: 'alert.attributes.consumer' }, + ], + }, + }, }, - }, - }, - }); + }) + ); if (total > MAX_RULES_NUMBER_FOR_BULK_OPERATION) { throw Boom.badRequest( @@ -77,28 +80,30 @@ export const checkAuthorizationAndGetTotal = async ( throw Boom.badRequest(`No rules found for bulk ${action.toLocaleLowerCase()}`); } - await pMap( - buckets, - async ({ key: [ruleType, consumer] }) => { - context.ruleTypeRegistry.ensureRuleTypeEnabled(ruleType); - try { - await context.authorization.ensureAuthorized({ - ruleTypeId: ruleType, - consumer, - operation: actionToConstantsMapping[action].WriteOperation, - entity: AlertingAuthorizationEntity.Rule, - }); - } catch (error) { - context.auditLogger?.log( - ruleAuditEvent({ - action: actionToConstantsMapping[action].RuleAuditAction, - error, - }) - ); - throw error; - } - }, - { concurrency: RULE_TYPE_CHECKS_CONCURRENCY } + await withSpan({ name: 'authorization.ensureAuthorized', type: 'rules' }, () => + pMap( + buckets, + async ({ key: [ruleType, consumer, actions] }) => { + context.ruleTypeRegistry.ensureRuleTypeEnabled(ruleType); + try { + await context.authorization.ensureAuthorized({ + ruleTypeId: ruleType, + consumer, + operation: actionToConstantsMapping[action].WriteOperation, + entity: AlertingAuthorizationEntity.Rule, + }); + } catch (error) { + context.auditLogger?.log( + ruleAuditEvent({ + action: actionToConstantsMapping[action].RuleAuditAction, + error, + }) + ); + throw error; + } + }, + { concurrency: RULE_TYPE_CHECKS_CONCURRENCY } + ) ); return { total }; }; diff --git a/x-pack/plugins/alerting/server/rules_client/lib/create_rule_saved_object.ts b/x-pack/plugins/alerting/server/rules_client/lib/create_rule_saved_object.ts index 45ade4086af4a2..87bc26b31e7fa1 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/create_rule_saved_object.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/create_rule_saved_object.ts @@ -6,6 +6,7 @@ */ import { SavedObjectReference, SavedObject } from '@kbn/core/server'; +import { withSpan } from '@kbn/apm-utils'; import { RawRule, RuleTypeParams } from '../../types'; import { bulkMarkApiKeysForInvalidation } from '../../invalidate_pending_api_keys/bulk_mark_api_keys_for_invalidation'; import { ruleAuditEvent, RuleAuditAction } from '../common/audit_events'; @@ -41,14 +42,14 @@ export async function createRuleSavedObject; try { - createdAlert = await context.unsecuredSavedObjectsClient.create( - 'alert', - updateMeta(context, rawRule), - { - ...options, - references, - id: ruleId, - } + createdAlert = await withSpan( + { name: 'unsecuredSavedObjectsClient.create', type: 'rules' }, + () => + context.unsecuredSavedObjectsClient.create('alert', updateMeta(context, rawRule), { + ...options, + references, + id: ruleId, + }) ); } catch (e) { // Avoid unused API key @@ -61,15 +62,16 @@ export async function createRuleSavedObject('alert', createdAlert.id, { - scheduledTaskId: scheduledTask.id, - }); - createdAlert.attributes.scheduledTaskId = scheduledTask.id; + + await withSpan({ name: 'unsecuredSavedObjectsClient.update', type: 'rules' }, () => + context.unsecuredSavedObjectsClient.update('alert', createdAlert.id, { + scheduledTaskId, + }) + ); + createdAlert.attributes.scheduledTaskId = scheduledTaskId; } // Log warning if schedule interval is less than the minimum but we're not enforcing it diff --git a/x-pack/plugins/alerting/server/rules_client/lib/get_authorization_filter.ts b/x-pack/plugins/alerting/server/rules_client/lib/get_authorization_filter.ts index 28e42c6b12e425..b9cc41a0fd7c42 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/get_authorization_filter.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/get_authorization_filter.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { withSpan } from '@kbn/apm-utils'; import { AlertingAuthorizationEntity } from '../../authorization'; import { ruleAuditEvent, RuleAuditAction } from '../common/audit_events'; import { RulesClientContext } from '../types'; @@ -16,9 +17,13 @@ export const getAuthorizationFilter = async ( { action }: { action: BulkAction } ) => { try { - const authorizationTuple = await context.authorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Rule, - alertingAuthorizationFilterOpts + const authorizationTuple = await withSpan( + { name: 'authorization.getFindAuthorizationFilter', type: 'rules' }, + () => + context.authorization.getFindAuthorizationFilter( + AlertingAuthorizationEntity.Rule, + alertingAuthorizationFilterOpts + ) ); return authorizationTuple.filter; } catch (error) { diff --git a/x-pack/plugins/alerting/server/rules_client/lib/recover_rule_alerts.ts b/x-pack/plugins/alerting/server/rules_client/lib/recover_rule_alerts.ts index aaa84a8b6950bf..e7027905ff956e 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/recover_rule_alerts.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/recover_rule_alerts.ts @@ -7,6 +7,7 @@ import { mapValues } from 'lodash'; import { SAVED_OBJECT_REL_PRIMARY } from '@kbn/event-log-plugin/server'; +import { withSpan } from '@kbn/apm-utils'; import { RawRule, SanitizedRule, RawAlertInstance as RawAlert } from '../../types'; import { taskInstanceToAlertTaskInstance } from '../../task_runner/alert_task_instance'; import { Alert } from '../../alert'; @@ -19,51 +20,53 @@ export const recoverRuleAlerts = async ( id: string, attributes: RawRule ) => { - if (!context.eventLogger || !attributes.scheduledTaskId) return; - try { - const { state } = taskInstanceToAlertTaskInstance( - await context.taskManager.get(attributes.scheduledTaskId), - attributes as unknown as SanitizedRule - ); + return withSpan({ name: 'recoverRuleAlerts', type: 'rules' }, async () => { + if (!context.eventLogger || !attributes.scheduledTaskId) return; + try { + const { state } = taskInstanceToAlertTaskInstance( + await context.taskManager.get(attributes.scheduledTaskId), + attributes as unknown as SanitizedRule + ); - const recoveredAlerts = mapValues, Alert>( - state.alertInstances ?? {}, - (rawAlertInstance, alertId) => new Alert(alertId, rawAlertInstance) - ); - const recoveredAlertIds = Object.keys(recoveredAlerts); + const recoveredAlerts = mapValues, Alert>( + state.alertInstances ?? {}, + (rawAlertInstance, alertId) => new Alert(alertId, rawAlertInstance) + ); + const recoveredAlertIds = Object.keys(recoveredAlerts); - for (const alertId of recoveredAlertIds) { - const { group: actionGroup } = recoveredAlerts[alertId].getLastScheduledActions() ?? {}; - const instanceState = recoveredAlerts[alertId].getState(); - const message = `instance '${alertId}' has recovered due to the rule was disabled`; + for (const alertId of recoveredAlertIds) { + const { group: actionGroup } = recoveredAlerts[alertId].getLastScheduledActions() ?? {}; + const instanceState = recoveredAlerts[alertId].getState(); + const message = `instance '${alertId}' has recovered due to the rule was disabled`; - const event = createAlertEventLogRecordObject({ - ruleId: id, - ruleName: attributes.name, - ruleType: context.ruleTypeRegistry.get(attributes.alertTypeId), - consumer: attributes.consumer, - instanceId: alertId, - action: EVENT_LOG_ACTIONS.recoveredInstance, - message, - state: instanceState, - group: actionGroup, - namespace: context.namespace, - spaceId: context.spaceId, - savedObjects: [ - { - id, - type: 'alert', - typeId: attributes.alertTypeId, - relation: SAVED_OBJECT_REL_PRIMARY, - }, - ], - }); - context.eventLogger.logEvent(event); + const event = createAlertEventLogRecordObject({ + ruleId: id, + ruleName: attributes.name, + ruleType: context.ruleTypeRegistry.get(attributes.alertTypeId), + consumer: attributes.consumer, + instanceId: alertId, + action: EVENT_LOG_ACTIONS.recoveredInstance, + message, + state: instanceState, + group: actionGroup, + namespace: context.namespace, + spaceId: context.spaceId, + savedObjects: [ + { + id, + type: 'alert', + typeId: attributes.alertTypeId, + relation: SAVED_OBJECT_REL_PRIMARY, + }, + ], + }); + context.eventLogger.logEvent(event); + } + } catch (error) { + // this should not block the rest of the disable process + context.logger.warn( + `rulesClient.disable('${id}') - Could not write recovery events - ${error.message}` + ); } - } catch (error) { - // this should not block the rest of the disable process - context.logger.warn( - `rulesClient.disable('${id}') - Could not write recovery events - ${error.message}` - ); - } + }); }; diff --git a/x-pack/plugins/alerting/server/rules_client/lib/schedule_task.ts b/x-pack/plugins/alerting/server/rules_client/lib/schedule_task.ts index eecdcf0314d026..c868a2d9440756 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/schedule_task.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/schedule_task.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { withSpan } from '@kbn/apm-utils'; import { RulesClientContext } from '../types'; import { ScheduleTaskOptions } from '../types'; @@ -28,7 +29,9 @@ export async function scheduleTask(context: RulesClientContext, opts: ScheduleTa enabled: true, }; try { - return await context.taskManager.schedule(taskInstance); + return await withSpan({ name: 'taskManager.schedule', type: 'rules' }, () => + context.taskManager.schedule(taskInstance) + ); } catch (err) { if (err.statusCode === 409 && !throwOnConflict) { return taskInstance; diff --git a/x-pack/plugins/alerting/server/rules_client/methods/bulk_delete.ts b/x-pack/plugins/alerting/server/rules_client/methods/bulk_delete.ts index abce18abe68022..87a4e09eda5ea4 100644 --- a/x-pack/plugins/alerting/server/rules_client/methods/bulk_delete.ts +++ b/x-pack/plugins/alerting/server/rules_client/methods/bulk_delete.ts @@ -7,10 +7,12 @@ import { KueryNode, nodeBuilder } from '@kbn/es-query'; import { SavedObjectsBulkUpdateObject } from '@kbn/core/server'; +import { withSpan } from '@kbn/apm-utils'; import { RawRule } from '../../types'; import { convertRuleIdsToKueryNode } from '../../lib'; import { bulkMarkApiKeysForInvalidation } from '../../invalidate_pending_api_keys/bulk_mark_api_keys_for_invalidation'; import { ruleAuditEvent, RuleAuditAction } from '../common/audit_events'; +import { tryToRemoveTasks } from '../common'; import { getAuthorizationFilter, checkAuthorizationAndGetTotal, getAlertFromRaw } from '../lib'; import { retryIfBulkOperationConflicts, @@ -35,54 +37,32 @@ export const bulkDeleteRules = async (context: RulesClientContext, options: Bulk action: 'DELETE', }); - const { rules, errors, accListSpecificForBulkOperation } = await retryIfBulkOperationConflicts({ - action: 'DELETE', - logger: context.logger, - bulkOperation: (filterKueryNode: KueryNode | null) => - bulkDeleteWithOCC(context, { filter: filterKueryNode }), - filter: kueryNodeFilterWithAuth, - }); + const { rules, errors, accListSpecificForBulkOperation } = await withSpan( + { name: 'retryIfBulkOperationConflicts', type: 'rules' }, + () => + retryIfBulkOperationConflicts({ + action: 'DELETE', + logger: context.logger, + bulkOperation: (filterKueryNode: KueryNode | null) => + bulkDeleteWithOCC(context, { filter: filterKueryNode }), + filter: kueryNodeFilterWithAuth, + }) + ); const [apiKeysToInvalidate, taskIdsToDelete] = accListSpecificForBulkOperation; - const taskIdsFailedToBeDeleted: string[] = []; - const taskIdsSuccessfullyDeleted: string[] = []; - if (taskIdsToDelete.length > 0) { - try { - const resultFromDeletingTasks = await context.taskManager.bulkRemoveIfExist(taskIdsToDelete); - resultFromDeletingTasks?.statuses.forEach((status) => { - if (status.success) { - taskIdsSuccessfullyDeleted.push(status.id); - } else { - taskIdsFailedToBeDeleted.push(status.id); - } - }); - if (taskIdsSuccessfullyDeleted.length) { - context.logger.debug( - `Successfully deleted schedules for underlying tasks: ${taskIdsSuccessfullyDeleted.join( - ', ' - )}` - ); - } - if (taskIdsFailedToBeDeleted.length) { - context.logger.error( - `Failure to delete schedules for underlying tasks: ${taskIdsFailedToBeDeleted.join(', ')}` - ); - } - } catch (error) { - context.logger.error( - `Failure to delete schedules for underlying tasks: ${taskIdsToDelete.join( - ', ' - )}. TaskManager bulkRemoveIfExist failed with Error: ${error.message}` - ); - } - } - - await bulkMarkApiKeysForInvalidation( - { apiKeys: apiKeysToInvalidate }, - context.logger, - context.unsecuredSavedObjectsClient - ); + const [result] = await Promise.allSettled([ + tryToRemoveTasks({ + taskIdsToDelete, + logger: context.logger, + taskManager: context.taskManager, + }), + bulkMarkApiKeysForInvalidation( + { apiKeys: apiKeysToInvalidate }, + context.logger, + context.unsecuredSavedObjectsClient + ), + ]); const deletedRules = rules.map(({ id, attributes, references }) => { return getAlertFromRaw( @@ -95,58 +75,74 @@ export const bulkDeleteRules = async (context: RulesClientContext, options: Bulk ); }); - return { errors, rules: deletedRules, total, taskIdsFailedToBeDeleted }; + if (result.status === 'fulfilled') { + return { errors, total, rules: deletedRules, taskIdsFailedToBeDeleted: result.value }; + } else { + return { errors, total, rules: deletedRules, taskIdsFailedToBeDeleted: [] }; + } }; const bulkDeleteWithOCC = async ( context: RulesClientContext, { filter }: { filter: KueryNode | null } ) => { - const rulesFinder = - await context.encryptedSavedObjectsClient.createPointInTimeFinderDecryptedAsInternalUser( - { + const rulesFinder = await withSpan( + { + name: 'encryptedSavedObjectsClient.createPointInTimeFinderDecryptedAsInternalUser', + type: 'rules', + }, + () => + context.encryptedSavedObjectsClient.createPointInTimeFinderDecryptedAsInternalUser({ filter, type: 'alert', perPage: 100, ...(context.namespace ? { namespaces: [context.namespace] } : undefined), - } - ); + }) + ); const rulesToDelete: Array> = []; - const apiKeysToInvalidate: string[] = []; - const taskIdsToDelete: string[] = []; - const errors: BulkOperationError[] = []; const apiKeyToRuleIdMapping: Record = {}; const taskIdToRuleIdMapping: Record = {}; const ruleNameToRuleIdMapping: Record = {}; - for await (const response of rulesFinder.find()) { - for (const rule of response.saved_objects) { - if (rule.attributes.apiKey) { - apiKeyToRuleIdMapping[rule.id] = rule.attributes.apiKey; - } - if (rule.attributes.name) { - ruleNameToRuleIdMapping[rule.id] = rule.attributes.name; - } - if (rule.attributes.scheduledTaskId) { - taskIdToRuleIdMapping[rule.id] = rule.attributes.scheduledTaskId; + await withSpan( + { name: 'Get rules, collect them and their attributes', type: 'rules' }, + async () => { + for await (const response of rulesFinder.find()) { + for (const rule of response.saved_objects) { + if (rule.attributes.apiKey) { + apiKeyToRuleIdMapping[rule.id] = rule.attributes.apiKey; + } + if (rule.attributes.name) { + ruleNameToRuleIdMapping[rule.id] = rule.attributes.name; + } + if (rule.attributes.scheduledTaskId) { + taskIdToRuleIdMapping[rule.id] = rule.attributes.scheduledTaskId; + } + rulesToDelete.push(rule); + + context.auditLogger?.log( + ruleAuditEvent({ + action: RuleAuditAction.DELETE, + outcome: 'unknown', + savedObject: { type: 'alert', id: rule.id }, + }) + ); + } } - rulesToDelete.push(rule); - - context.auditLogger?.log( - ruleAuditEvent({ - action: RuleAuditAction.DELETE, - outcome: 'unknown', - savedObject: { type: 'alert', id: rule.id }, - }) - ); + await rulesFinder.close(); } - } - await rulesFinder.close(); + ); - const result = await context.unsecuredSavedObjectsClient.bulkDelete(rulesToDelete); + const result = await withSpan( + { name: 'unsecuredSavedObjectsClient.bulkDelete', type: 'rules' }, + () => context.unsecuredSavedObjectsClient.bulkDelete(rulesToDelete) + ); const deletedRuleIds: string[] = []; + const apiKeysToInvalidate: string[] = []; + const taskIdsToDelete: string[] = []; + const errors: BulkOperationError[] = []; result.statuses.forEach((status) => { if (status.error === undefined) { diff --git a/x-pack/plugins/alerting/server/rules_client/methods/bulk_disable.ts b/x-pack/plugins/alerting/server/rules_client/methods/bulk_disable.ts index 316c3c9685a9ba..5a79a38c767fd3 100644 --- a/x-pack/plugins/alerting/server/rules_client/methods/bulk_disable.ts +++ b/x-pack/plugins/alerting/server/rules_client/methods/bulk_disable.ts @@ -7,6 +7,10 @@ import { KueryNode, nodeBuilder } from '@kbn/es-query'; import { SavedObjectsBulkUpdateObject } from '@kbn/core/server'; +import { withSpan } from '@kbn/apm-utils'; +import pMap from 'p-map'; +import { Logger } from '@kbn/core/server'; +import { TaskManagerStartContract } from '@kbn/task-manager-plugin/server'; import { RawRule } from '../../types'; import { convertRuleIdsToKueryNode } from '../../lib'; import { ruleAuditEvent, RuleAuditAction } from '../common/audit_events'; @@ -23,6 +27,7 @@ import { updateMeta, } from '../lib'; import { BulkOptions, BulkOperationError, RulesClientContext } from '../types'; +import { tryToRemoveTasks } from '../common'; export const bulkDisableRules = async (context: RulesClientContext, options: BulkOptions) => { const { ids, filter } = getAndValidateCommonBulkOptions(options); @@ -40,75 +45,28 @@ export const bulkDisableRules = async (context: RulesClientContext, options: Bul action: 'DISABLE', }); - const { errors, rules, accListSpecificForBulkOperation } = await retryIfBulkOperationConflicts({ - action: 'DISABLE', - logger: context.logger, - bulkOperation: (filterKueryNode: KueryNode | null) => - bulkDisableRulesWithOCC(context, { filter: filterKueryNode }), - filter: kueryNodeFilterWithAuth, - }); + const { errors, rules, accListSpecificForBulkOperation } = await withSpan( + { name: 'retryIfBulkOperationConflicts', type: 'rules' }, + () => + retryIfBulkOperationConflicts({ + action: 'DISABLE', + logger: context.logger, + bulkOperation: (filterKueryNode: KueryNode | null) => + bulkDisableRulesWithOCC(context, { filter: filterKueryNode }), + filter: kueryNodeFilterWithAuth, + }) + ); const [taskIdsToDisable, taskIdsToDelete] = accListSpecificForBulkOperation; - if (taskIdsToDisable.length > 0) { - try { - const resultFromDisablingTasks = await context.taskManager.bulkDisable(taskIdsToDisable); - if (resultFromDisablingTasks.tasks.length) { - context.logger.debug( - `Successfully disabled schedules for underlying tasks: ${resultFromDisablingTasks.tasks - .map((task) => task.id) - .join(', ')}` - ); - } - if (resultFromDisablingTasks.errors.length) { - context.logger.error( - `Failure to disable schedules for underlying tasks: ${resultFromDisablingTasks.errors - .map((error) => error.task.id) - .join(', ')}` - ); - } - } catch (error) { - context.logger.error( - `Failure to disable schedules for underlying tasks: ${taskIdsToDisable.join( - ', ' - )}. TaskManager bulkDisable failed with Error: ${error.message}` - ); - } - } - - const taskIdsFailedToBeDeleted: string[] = []; - const taskIdsSuccessfullyDeleted: string[] = []; - - if (taskIdsToDelete.length > 0) { - try { - const resultFromDeletingTasks = await context.taskManager.bulkRemoveIfExist(taskIdsToDelete); - resultFromDeletingTasks?.statuses.forEach((status) => { - if (status.success) { - taskIdsSuccessfullyDeleted.push(status.id); - } else { - taskIdsFailedToBeDeleted.push(status.id); - } - }); - if (taskIdsSuccessfullyDeleted.length) { - context.logger.debug( - `Successfully deleted schedules for underlying tasks: ${taskIdsSuccessfullyDeleted.join( - ', ' - )}` - ); - } - if (taskIdsFailedToBeDeleted.length) { - context.logger.error( - `Failure to delete schedules for underlying tasks: ${taskIdsFailedToBeDeleted.join(', ')}` - ); - } - } catch (error) { - context.logger.error( - `Failure to delete schedules for underlying tasks: ${taskIdsToDelete.join( - ', ' - )}. TaskManager bulkRemoveIfExist failed with Error: ${error.message}` - ); - } - } + await Promise.allSettled([ + tryToDisableTasks({ + taskIdsToDisable, + logger: context.logger, + taskManager: context.taskManager, + }), + tryToRemoveTasks({ taskIdsToDelete, logger: context.logger, taskManager: context.taskManager }), + ]); const updatedRules = rules.map(({ id, attributes, references }) => { return getAlertFromRaw( @@ -130,77 +88,90 @@ const bulkDisableRulesWithOCC = async ( ) => { const additionalFilter = nodeBuilder.is('alert.attributes.enabled', 'true'); - const rulesFinder = - await context.encryptedSavedObjectsClient.createPointInTimeFinderDecryptedAsInternalUser( - { + const rulesFinder = await withSpan( + { + name: 'encryptedSavedObjectsClient.createPointInTimeFinderDecryptedAsInternalUser', + type: 'rules', + }, + () => + context.encryptedSavedObjectsClient.createPointInTimeFinderDecryptedAsInternalUser({ filter: filter ? nodeBuilder.and([filter, additionalFilter]) : additionalFilter, type: 'alert', perPage: 100, ...(context.namespace ? { namespaces: [context.namespace] } : undefined), - } - ); + }) + ); const rulesToDisable: Array> = []; const errors: BulkOperationError[] = []; const ruleNameToRuleIdMapping: Record = {}; const username = await context.getUserName(); - for await (const response of rulesFinder.find()) { - response.saved_objects.forEach((rule) => { - try { - if (rule.attributes.enabled === false) return; - - recoverRuleAlerts(context, rule.id, rule.attributes); - - if (rule.attributes.name) { - ruleNameToRuleIdMapping[rule.id] = rule.attributes.name; - } - - const updatedAttributes = updateMeta(context, { - ...rule.attributes, - enabled: false, - scheduledTaskId: - rule.attributes.scheduledTaskId === rule.id ? rule.attributes.scheduledTaskId : null, - updatedBy: username, - updatedAt: new Date().toISOString(), - }); - - rulesToDisable.push({ - ...rule, - attributes: { - ...updatedAttributes, - }, - }); - - context.auditLogger?.log( - ruleAuditEvent({ - action: RuleAuditAction.DISABLE, - outcome: 'unknown', - savedObject: { type: 'alert', id: rule.id }, - }) - ); - } catch (error) { - errors.push({ - message: error.message, - rule: { - id: rule.id, - name: rule.attributes?.name, - }, + await withSpan( + { name: 'Get rules, collect them and their attributes', type: 'rules' }, + async () => { + for await (const response of rulesFinder.find()) { + await pMap(response.saved_objects, async (rule) => { + try { + await recoverRuleAlerts(context, rule.id, rule.attributes); + + if (rule.attributes.name) { + ruleNameToRuleIdMapping[rule.id] = rule.attributes.name; + } + + const updatedAttributes = updateMeta(context, { + ...rule.attributes, + enabled: false, + scheduledTaskId: + rule.attributes.scheduledTaskId === rule.id + ? rule.attributes.scheduledTaskId + : null, + updatedBy: username, + updatedAt: new Date().toISOString(), + }); + + rulesToDisable.push({ + ...rule, + attributes: { + ...updatedAttributes, + }, + }); + + context.auditLogger?.log( + ruleAuditEvent({ + action: RuleAuditAction.DISABLE, + outcome: 'unknown', + savedObject: { type: 'alert', id: rule.id }, + }) + ); + } catch (error) { + errors.push({ + message: error.message, + rule: { + id: rule.id, + name: rule.attributes?.name, + }, + }); + context.auditLogger?.log( + ruleAuditEvent({ + action: RuleAuditAction.DISABLE, + error, + }) + ); + } }); - context.auditLogger?.log( - ruleAuditEvent({ - action: RuleAuditAction.DISABLE, - error, - }) - ); } - }); - } - await rulesFinder.close(); + await rulesFinder.close(); + } + ); - const result = await context.unsecuredSavedObjectsClient.bulkCreate(rulesToDisable, { - overwrite: true, - }); + const result = await withSpan( + { name: 'unsecuredSavedObjectsClient.bulkCreate', type: 'rules' }, + () => + context.unsecuredSavedObjectsClient.bulkCreate(rulesToDisable, { + overwrite: true, + }) + ); const taskIdsToDisable: string[] = []; const taskIdsToDelete: string[] = []; @@ -234,3 +205,41 @@ const bulkDisableRulesWithOCC = async ( accListSpecificForBulkOperation: [taskIdsToDisable, taskIdsToDelete], }; }; + +const tryToDisableTasks = async ({ + taskIdsToDisable, + logger, + taskManager, +}: { + taskIdsToDisable: string[]; + logger: Logger; + taskManager: TaskManagerStartContract; +}) => { + return await withSpan({ name: 'taskManager.bulkDisable', type: 'rules' }, async () => { + if (taskIdsToDisable.length > 0) { + try { + const resultFromDisablingTasks = await taskManager.bulkDisable(taskIdsToDisable); + if (resultFromDisablingTasks.tasks.length) { + logger.debug( + `Successfully disabled schedules for underlying tasks: ${resultFromDisablingTasks.tasks + .map((task) => task.id) + .join(', ')}` + ); + } + if (resultFromDisablingTasks.errors.length) { + logger.error( + `Failure to disable schedules for underlying tasks: ${resultFromDisablingTasks.errors + .map((error) => error.task.id) + .join(', ')}` + ); + } + } catch (error) { + logger.error( + `Failure to disable schedules for underlying tasks: ${taskIdsToDisable.join( + ', ' + )}. TaskManager bulkDisable failed with Error: ${error.message}` + ); + } + } + }); +}; diff --git a/x-pack/plugins/alerting/server/rules_client/methods/bulk_enable.ts b/x-pack/plugins/alerting/server/rules_client/methods/bulk_enable.ts index 0546906b04313f..16107ca8a3e9a3 100644 --- a/x-pack/plugins/alerting/server/rules_client/methods/bulk_enable.ts +++ b/x-pack/plugins/alerting/server/rules_client/methods/bulk_enable.ts @@ -8,6 +8,9 @@ import pMap from 'p-map'; import { KueryNode, nodeBuilder } from '@kbn/es-query'; import { SavedObjectsBulkUpdateObject } from '@kbn/core/server'; +import { withSpan } from '@kbn/apm-utils'; +import { Logger } from '@kbn/core/server'; +import { TaskManagerStartContract } from '@kbn/task-manager-plugin/server'; import { RawRule, IntervalSchedule } from '../../types'; import { convertRuleIdsToKueryNode } from '../../lib'; import { ruleAuditEvent, RuleAuditAction } from '../common/audit_events'; @@ -33,7 +36,9 @@ const getShouldScheduleTask = async ( if (!scheduledTaskId) return true; try { // make sure scheduledTaskId exist - await context.taskManager.get(scheduledTaskId); + await withSpan({ name: 'getShouldScheduleTask', type: 'rules' }, () => + context.taskManager.get(scheduledTaskId) + ); return false; } catch (err) { return true; @@ -66,36 +71,11 @@ export const bulkEnableRules = async (context: RulesClientContext, options: Bulk const [taskIdsToEnable] = accListSpecificForBulkOperation; - const taskIdsFailedToBeEnabled: string[] = []; - if (taskIdsToEnable.length > 0) { - try { - const resultFromEnablingTasks = await context.taskManager.bulkEnable(taskIdsToEnable); - resultFromEnablingTasks?.errors?.forEach((error) => { - taskIdsFailedToBeEnabled.push(error.task.id); - }); - if (resultFromEnablingTasks.tasks.length) { - context.logger.debug( - `Successfully enabled schedules for underlying tasks: ${resultFromEnablingTasks.tasks - .map((task) => task.id) - .join(', ')}` - ); - } - if (resultFromEnablingTasks.errors.length) { - context.logger.error( - `Failure to enable schedules for underlying tasks: ${resultFromEnablingTasks.errors - .map((error) => error.task.id) - .join(', ')}` - ); - } - } catch (error) { - taskIdsFailedToBeEnabled.push(...taskIdsToEnable); - context.logger.error( - `Failure to enable schedules for underlying tasks: ${taskIdsToEnable.join( - ', ' - )}. TaskManager bulkEnable failed with Error: ${error.message}` - ); - } - } + const taskIdsFailedToBeEnabled = await tryToEnableTasks({ + taskIdsToEnable, + logger: context.logger, + taskManager: context.taskManager, + }); const updatedRules = rules.map(({ id, attributes, references }) => { return getAlertFromRaw( @@ -117,109 +97,123 @@ const bulkEnableRulesWithOCC = async ( ) => { const additionalFilter = nodeBuilder.is('alert.attributes.enabled', 'false'); - const rulesFinder = - await context.encryptedSavedObjectsClient.createPointInTimeFinderDecryptedAsInternalUser( - { - filter: filter ? nodeBuilder.and([filter, additionalFilter]) : additionalFilter, - type: 'alert', - perPage: 100, - ...(context.namespace ? { namespaces: [context.namespace] } : undefined), - } - ); + const rulesFinder = await withSpan( + { + name: 'encryptedSavedObjectsClient.createPointInTimeFinderDecryptedAsInternalUser', + type: 'rules', + }, + async () => + await context.encryptedSavedObjectsClient.createPointInTimeFinderDecryptedAsInternalUser( + { + filter: filter ? nodeBuilder.and([filter, additionalFilter]) : additionalFilter, + type: 'alert', + perPage: 100, + ...(context.namespace ? { namespaces: [context.namespace] } : undefined), + } + ) + ); const rulesToEnable: Array> = []; - const taskIdsToEnable: string[] = []; const errors: BulkOperationError[] = []; const ruleNameToRuleIdMapping: Record = {}; const username = await context.getUserName(); - for await (const response of rulesFinder.find()) { - await pMap(response.saved_objects, async (rule) => { - try { - if (rule.attributes.enabled === true) return; - if (rule.attributes.actions.length) { + await withSpan( + { name: 'Get rules, collect them and their attributes', type: 'rules' }, + async () => { + for await (const response of rulesFinder.find()) { + await pMap(response.saved_objects, async (rule) => { try { - await context.actionsAuthorization.ensureAuthorized('execute'); - } catch (error) { - throw Error(`Rule not authorized for bulk enable - ${error.message}`); - } - } - if (rule.attributes.name) { - ruleNameToRuleIdMapping[rule.id] = rule.attributes.name; - } + if (rule.attributes.actions.length) { + try { + await context.actionsAuthorization.ensureAuthorized('execute'); + } catch (error) { + throw Error(`Rule not authorized for bulk enable - ${error.message}`); + } + } + if (rule.attributes.name) { + ruleNameToRuleIdMapping[rule.id] = rule.attributes.name; + } - const updatedAttributes = updateMeta(context, { - ...rule.attributes, - ...(!rule.attributes.apiKey && - (await createNewAPIKeySet(context, { attributes: rule.attributes, username }))), - enabled: true, - updatedBy: username, - updatedAt: new Date().toISOString(), - executionStatus: { - status: 'pending', - lastDuration: 0, - lastExecutionDate: new Date().toISOString(), - error: null, - warning: null, - }, - }); + const updatedAttributes = updateMeta(context, { + ...rule.attributes, + ...(!rule.attributes.apiKey && + (await createNewAPIKeySet(context, { attributes: rule.attributes, username }))), + enabled: true, + updatedBy: username, + updatedAt: new Date().toISOString(), + executionStatus: { + status: 'pending', + lastDuration: 0, + lastExecutionDate: new Date().toISOString(), + error: null, + warning: null, + }, + }); - const shouldScheduleTask = await getShouldScheduleTask( - context, - rule.attributes.scheduledTaskId - ); + const shouldScheduleTask = await getShouldScheduleTask( + context, + rule.attributes.scheduledTaskId + ); - let scheduledTaskId; - if (shouldScheduleTask) { - const scheduledTask = await scheduleTask(context, { - id: rule.id, - consumer: rule.attributes.consumer, - ruleTypeId: rule.attributes.alertTypeId, - schedule: rule.attributes.schedule as IntervalSchedule, - throwOnConflict: false, - }); - scheduledTaskId = scheduledTask.id; - } + let scheduledTaskId; + if (shouldScheduleTask) { + const scheduledTask = await scheduleTask(context, { + id: rule.id, + consumer: rule.attributes.consumer, + ruleTypeId: rule.attributes.alertTypeId, + schedule: rule.attributes.schedule as IntervalSchedule, + throwOnConflict: false, + }); + scheduledTaskId = scheduledTask.id; + } - rulesToEnable.push({ - ...rule, - attributes: { - ...updatedAttributes, - ...(scheduledTaskId ? { scheduledTaskId } : undefined), - }, - }); + rulesToEnable.push({ + ...rule, + attributes: { + ...updatedAttributes, + ...(scheduledTaskId ? { scheduledTaskId } : undefined), + }, + }); - context.auditLogger?.log( - ruleAuditEvent({ - action: RuleAuditAction.ENABLE, - outcome: 'unknown', - savedObject: { type: 'alert', id: rule.id }, - }) - ); - } catch (error) { - errors.push({ - message: error.message, - rule: { - id: rule.id, - name: rule.attributes?.name, - }, + context.auditLogger?.log( + ruleAuditEvent({ + action: RuleAuditAction.ENABLE, + outcome: 'unknown', + savedObject: { type: 'alert', id: rule.id }, + }) + ); + } catch (error) { + errors.push({ + message: error.message, + rule: { + id: rule.id, + name: rule.attributes?.name, + }, + }); + context.auditLogger?.log( + ruleAuditEvent({ + action: RuleAuditAction.ENABLE, + error, + }) + ); + } }); - context.auditLogger?.log( - ruleAuditEvent({ - action: RuleAuditAction.ENABLE, - error, - }) - ); } - }); - } - await rulesFinder.close(); + await rulesFinder.close(); + } + ); - const result = await context.unsecuredSavedObjectsClient.bulkCreate(rulesToEnable, { - overwrite: true, - }); + const result = await withSpan( + { name: 'unsecuredSavedObjectsClient.bulkCreate', type: 'rules' }, + () => + context.unsecuredSavedObjectsClient.bulkCreate(rulesToEnable, { + overwrite: true, + }) + ); const rules: Array> = []; + const taskIdsToEnable: string[] = []; result.saved_objects.forEach((rule) => { if (rule.error === undefined) { @@ -240,3 +234,49 @@ const bulkEnableRulesWithOCC = async ( }); return { errors, rules, accListSpecificForBulkOperation: [taskIdsToEnable] }; }; + +export const tryToEnableTasks = async ({ + taskIdsToEnable, + logger, + taskManager, +}: { + taskIdsToEnable: string[]; + logger: Logger; + taskManager: TaskManagerStartContract; +}) => { + const taskIdsFailedToBeEnabled: string[] = []; + + if (taskIdsToEnable.length > 0) { + try { + const resultFromEnablingTasks = await withSpan( + { name: 'taskManager.bulkEnable', type: 'rules' }, + async () => taskManager.bulkEnable(taskIdsToEnable) + ); + resultFromEnablingTasks?.errors?.forEach((error) => { + taskIdsFailedToBeEnabled.push(error.task.id); + }); + if (resultFromEnablingTasks.tasks.length) { + logger.debug( + `Successfully enabled schedules for underlying tasks: ${resultFromEnablingTasks.tasks + .map((task) => task.id) + .join(', ')}` + ); + } + if (resultFromEnablingTasks.errors.length) { + logger.error( + `Failure to enable schedules for underlying tasks: ${resultFromEnablingTasks.errors + .map((error) => error.task.id) + .join(', ')}` + ); + } + } catch (error) { + taskIdsFailedToBeEnabled.push(...taskIdsToEnable); + logger.error( + `Failure to enable schedules for underlying tasks: ${taskIdsToEnable.join( + ', ' + )}. TaskManager bulkEnable failed with Error: ${error.message}` + ); + } + } + return taskIdsFailedToBeEnabled; +}; diff --git a/x-pack/plugins/alerting/server/rules_client/methods/clone.ts b/x-pack/plugins/alerting/server/rules_client/methods/clone.ts index b4ebe5891885c2..e1cabc50280e6e 100644 --- a/x-pack/plugins/alerting/server/rules_client/methods/clone.ts +++ b/x-pack/plugins/alerting/server/rules_client/methods/clone.ts @@ -9,6 +9,7 @@ import Semver from 'semver'; import Boom from '@hapi/boom'; import { AlertConsumers } from '@kbn/rule-data-utils'; import { SavedObject, SavedObjectsUtils } from '@kbn/core/server'; +import { withSpan } from '@kbn/apm-utils'; import { RawRule, SanitizedRule, RuleTypeParams } from '../../types'; import { getDefaultMonitoring } from '../../lib'; import { WriteOperations, AlertingAuthorizationEntity } from '../../authorization'; @@ -30,12 +31,12 @@ export async function clone( let ruleSavedObject: SavedObject; try { - ruleSavedObject = await context.encryptedSavedObjectsClient.getDecryptedAsInternalUser( - 'alert', - id, - { - namespace: context.namespace, - } + ruleSavedObject = await withSpan( + { name: 'encryptedSavedObjectsClient.getDecryptedAsInternalUser', type: 'rules' }, + () => + context.encryptedSavedObjectsClient.getDecryptedAsInternalUser('alert', id, { + namespace: context.namespace, + }) ); } catch (e) { // We'll skip invalidating the API key since we failed to load the decrypted saved object @@ -43,7 +44,10 @@ export async function clone( `update(): Failed to load API key to invalidate on alert ${id}: ${e.message}` ); // Still attempt to load the object using SOC - ruleSavedObject = await context.unsecuredSavedObjectsClient.get('alert', id); + ruleSavedObject = await withSpan( + { name: 'unsecuredSavedObjectsClient.get', type: 'rules' }, + () => context.unsecuredSavedObjectsClient.get('alert', id) + ); } /* @@ -65,12 +69,14 @@ export async function clone( : `${ruleSavedObject.attributes.name} [Clone]`; const ruleId = newId ?? SavedObjectsUtils.generateId(); try { - await context.authorization.ensureAuthorized({ - ruleTypeId: ruleSavedObject.attributes.alertTypeId, - consumer: ruleSavedObject.attributes.consumer, - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }); + await withSpan({ name: 'authorization.ensureAuthorized', type: 'rules' }, () => + context.authorization.ensureAuthorized({ + ruleTypeId: ruleSavedObject.attributes.alertTypeId, + consumer: ruleSavedObject.attributes.consumer, + operation: WriteOperations.Create, + entity: AlertingAuthorizationEntity.Rule, + }) + ); } catch (error) { context.auditLogger?.log( ruleAuditEvent({ @@ -122,10 +128,12 @@ export async function clone( }) ); - return await createRuleSavedObject(context, { - intervalInMs: parseDuration(rawRule.schedule.interval), - rawRule, - references: ruleSavedObject.references, - ruleId, - }); + return await withSpan({ name: 'createRuleSavedObject', type: 'rules' }, () => + createRuleSavedObject(context, { + intervalInMs: parseDuration(rawRule.schedule.interval), + rawRule, + references: ruleSavedObject.references, + ruleId, + }) + ); } diff --git a/x-pack/plugins/alerting/server/rules_client/methods/create.ts b/x-pack/plugins/alerting/server/rules_client/methods/create.ts index 31707726b4e243..a0b5e26061a8d1 100644 --- a/x-pack/plugins/alerting/server/rules_client/methods/create.ts +++ b/x-pack/plugins/alerting/server/rules_client/methods/create.ts @@ -7,6 +7,7 @@ import Semver from 'semver'; import Boom from '@hapi/boom'; import { SavedObjectsUtils } from '@kbn/core/server'; +import { withSpan } from '@kbn/apm-utils'; import { parseDuration } from '../../../common/parse_duration'; import { RawRule, SanitizedRule, RuleTypeParams, RuleAction, Rule } from '../../types'; import { WriteOperations, AlertingAuthorizationEntity } from '../../authorization'; @@ -52,12 +53,14 @@ export async function create( const id = options?.id || SavedObjectsUtils.generateId(); try { - await context.authorization.ensureAuthorized({ - ruleTypeId: data.alertTypeId, - consumer: data.consumer, - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }); + await withSpan({ name: 'authorization.ensureAuthorized', type: 'rules' }, () => + context.authorization.ensureAuthorized({ + ruleTypeId: data.alertTypeId, + consumer: data.consumer, + operation: WriteOperations.Create, + entity: AlertingAuthorizationEntity.Rule, + }) + ); } catch (error) { context.auditLogger?.log( ruleAuditEvent({ @@ -80,14 +83,18 @@ export async function create( let createdAPIKey = null; try { createdAPIKey = data.enabled - ? await context.createAPIKey(generateAPIKeyName(ruleType.id, data.name)) + ? await withSpan({ name: 'createAPIKey', type: 'rules' }, () => + context.createAPIKey(generateAPIKeyName(ruleType.id, data.name)) + ) : null; } catch (error) { throw Boom.badRequest(`Error creating rule: could not create API key - ${error.message}`); } await validateActions(context, ruleType, data); - + await withSpan({ name: 'validateActions', type: 'rules' }, () => + validateActions(context, ruleType, data) + ); // Throw error if schedule interval is less than the minimum and we are enforcing it const intervalInMs = parseDuration(data.schedule.interval); if ( @@ -104,7 +111,9 @@ export async function create( references, params: updatedParams, actions, - } = await extractReferences(context, ruleType, data.actions, validatedAlertTypeParams); + } = await withSpan({ name: 'extractReferences', type: 'rules' }, () => + extractReferences(context, ruleType, data.actions, validatedAlertTypeParams) + ); const createTime = Date.now(); const lastRunTimestamp = new Date(); @@ -137,11 +146,13 @@ export async function create( rawRule.mapped_params = mappedParams; } - return await createRuleSavedObject(context, { - intervalInMs, - rawRule, - references, - ruleId: id, - options, - }); + return await withSpan({ name: 'createRuleSavedObject', type: 'rules' }, () => + createRuleSavedObject(context, { + intervalInMs, + rawRule, + references, + ruleId: id, + options, + }) + ); } diff --git a/x-pack/plugins/alerting/server/rules_client/methods/disable.ts b/x-pack/plugins/alerting/server/rules_client/methods/disable.ts index 3eae1d2df7b5d4..bbdb1ade167eb7 100644 --- a/x-pack/plugins/alerting/server/rules_client/methods/disable.ts +++ b/x-pack/plugins/alerting/server/rules_client/methods/disable.ts @@ -39,7 +39,7 @@ async function disableWithOCC(context: RulesClientContext, { id }: { id: string version = alert.version; } - recoverRuleAlerts(context, id, attributes); + await recoverRuleAlerts(context, id, attributes); try { await context.authorization.ensureAuthorized({ diff --git a/x-pack/plugins/alerting/server/rules_client/tests/bulk_enable.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/bulk_enable.test.ts index c4d3e1a253d95b..dcb8b6e512c3f1 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/bulk_enable.test.ts +++ b/x-pack/plugins/alerting/server/rules_client/tests/bulk_enable.test.ts @@ -318,6 +318,7 @@ describe('bulkEnableRules', () => { mockCreatePointInTimeFinderAsInternalUser({ saved_objects: [disabledRuleWithAction1, disabledRuleWithAction2], }); + actionsAuthorization.ensureAuthorized.mockImplementation(() => { throw new Error('UPS'); }); diff --git a/x-pack/plugins/alerting/tsconfig.json b/x-pack/plugins/alerting/tsconfig.json index 0d59ff6ac7865a..a1fb0d3892d2af 100644 --- a/x-pack/plugins/alerting/tsconfig.json +++ b/x-pack/plugins/alerting/tsconfig.json @@ -36,6 +36,7 @@ "@kbn/core-logging-server-mocks", "@kbn/core-saved-objects-common", "@kbn/securitysolution-rules", + "@kbn/apm-utils", "@kbn/data-views-plugin", "@kbn/share-plugin", ], From f5b4977b51e3b3d61a7bbc3cc6d1434382bbf514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Louv-Jansen?= Date: Thu, 5 Jan 2023 17:33:13 +0100 Subject: [PATCH 27/36] [APM] Add API tests for APM package policy (#148302) --- .../tests/fleet/apm_package_policy.spec.ts | 89 +++++++++++++++++++ .../tests/fleet/apm_package_policy_setup.ts | 88 ++++++++++++++++++ 2 files changed, 177 insertions(+) create mode 100644 x-pack/test/apm_api_integration/tests/fleet/apm_package_policy.spec.ts create mode 100644 x-pack/test/apm_api_integration/tests/fleet/apm_package_policy_setup.ts diff --git a/x-pack/test/apm_api_integration/tests/fleet/apm_package_policy.spec.ts b/x-pack/test/apm_api_integration/tests/fleet/apm_package_policy.spec.ts new file mode 100644 index 00000000000000..b1f4d0efac6fdf --- /dev/null +++ b/x-pack/test/apm_api_integration/tests/fleet/apm_package_policy.spec.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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../common/ftr_provider_context'; +import { + createAgentPolicy, + createPackagePolicy, + deleteAgentPolicy, + deletePackagePolicy, + setupFleet, +} from './apm_package_policy_setup'; + +export default function ApiTest(ftrProviderContext: FtrProviderContext) { + const { getService } = ftrProviderContext; + const registry = getService('registry'); + const apmApiClient = getService('apmApiClient'); + + async function createConfiguration(configuration: any) { + return apmApiClient.writeUser({ + endpoint: 'PUT /api/apm/settings/agent-configuration', + params: { body: configuration }, + }); + } + + async function deleteConfiguration(configuration: any) { + return apmApiClient.writeUser({ + endpoint: 'DELETE /api/apm/settings/agent-configuration', + params: { body: { service: configuration.service } }, + }); + } + + registry.when('APM package policy', { config: 'basic', archives: [] }, () => { + let agentPolicyId: string; + + before(async () => { + await setupFleet(ftrProviderContext); + agentPolicyId = await createAgentPolicy(ftrProviderContext); + }); + + after(async () => { + await deleteAgentPolicy(ftrProviderContext, agentPolicyId); + }); + + describe('APM package policy callbacks', () => { + let apmPackagePolicy: any; + + beforeEach(async () => { + apmPackagePolicy = await createPackagePolicy(ftrProviderContext, agentPolicyId); + }); + + afterEach(async () => { + await deletePackagePolicy(ftrProviderContext, apmPackagePolicy.id); + }); + + it('sets default values for agent configs and source mapping in a new package policy', async () => { + const apmPackageConfig = apmPackagePolicy.inputs[0].config['apm-server'].value; + expect(apmPackageConfig.rum.source_mapping).to.eql({ metadata: [] }); + expect(apmPackageConfig.agent_config).to.eql([]); + }); + + describe('Agent config', () => { + const testConfiguration = { + service: {}, + settings: { transaction_sample_rate: '0.55' }, + }; + before(async () => { + await createConfiguration(testConfiguration); + }); + + after(async () => { + await deleteConfiguration(testConfiguration); + }); + + it('sets the expected agent configs on the new package policy object', async () => { + const { + agent_config: [{ service, config }], + } = apmPackagePolicy.inputs[0].config['apm-server'].value; + expect(service).to.eql({}); + expect(config).to.eql({ transaction_sample_rate: '0.55' }); + }); + }); + }); + }); +} diff --git a/x-pack/test/apm_api_integration/tests/fleet/apm_package_policy_setup.ts b/x-pack/test/apm_api_integration/tests/fleet/apm_package_policy_setup.ts new file mode 100644 index 00000000000000..fe3634a738fe6c --- /dev/null +++ b/x-pack/test/apm_api_integration/tests/fleet/apm_package_policy_setup.ts @@ -0,0 +1,88 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { FtrProviderContext } from '../../common/ftr_provider_context'; + +export async function setupFleet(ftrProviderContext: FtrProviderContext) { + const { getService } = ftrProviderContext; + const supertest = getService('supertest'); + // Initialize fleet setup + await supertest.post('/api/fleet/setup').set('kbn-xsrf', 'xxx').send().expect(200); +} + +export async function createAgentPolicy(ftrProviderContext: FtrProviderContext) { + const { getService } = ftrProviderContext; + const supertest = getService('supertest'); + // Ceate agent policy and get id + const agentPolicyResponse = await supertest + .post('/api/fleet/agent_policies?sys_monitoring=true') + .set('kbn-xsrf', 'true') + .send({ + name: 'test_agent_policy', + description: '', + namespace: 'default', + monitoring_enabled: ['logs', 'metrics'], + }) + .expect(200); + return agentPolicyResponse.body.item.id; +} + +export async function createPackagePolicy( + ftrProviderContext: FtrProviderContext, + agentPolicyId: string +) { + const { getService } = ftrProviderContext; + const supertest = getService('supertest'); + + // Get version of available APM package + const apmPackageResponse = await supertest + .get(`/api/fleet/epm/packages/apm`) + .set('kbn-xsrf', 'true') + .expect(200); + const apmPackageVersion = apmPackageResponse.body.item.version; + + // Create package policy for APM attached to given agent policy id + const packagePolicyResponse = await supertest + .post('/api/fleet/package_policies') + .set('kbn-xsrf', 'true') + .send({ + name: 'apm-integration-test-policy', + description: '', + namespace: 'default', + policy_id: agentPolicyId, + enabled: true, + inputs: [{ type: 'apm', policy_template: 'apmserver', enabled: true, streams: [], vars: {} }], + package: { name: 'apm', title: 'Elastic APM', version: apmPackageVersion }, + }) + .expect(200); + return packagePolicyResponse.body.item; +} + +export async function deleteAgentPolicy( + ftrProviderContext: FtrProviderContext, + agentPolicyId: string +) { + const { getService } = ftrProviderContext; + const supertest = getService('supertest'); + await supertest + .post('/api/fleet/agent_policies/delete') + .set('kbn-xsrf', 'true') + .send({ agentPolicyId }) + .expect(200); +} + +export async function deletePackagePolicy( + ftrProviderContext: FtrProviderContext, + packagePolicyId: string +) { + const { getService } = ftrProviderContext; + const supertest = getService('supertest'); + await supertest + .post(`/api/fleet/package_policies/delete`) + .set('kbn-xsrf', 'true') + .send({ packagePolicyIds: [packagePolicyId] }) + .expect(200); +} From 4a93da0ba303c1dec768e0229b71675b1f322ae1 Mon Sep 17 00:00:00 2001 From: Maxim Palenov Date: Thu, 5 Jan 2023 18:02:12 +0100 Subject: [PATCH 28/36] [Security Solution] Global query string functionality improvements (#147218) Addresses: https://github.com/elastic/kibana/issues/140263 This PR was inspired by https://github.com/elastic/kibana/pull/146649 and while working on persistent rules table state https://github.com/elastic/kibana/pull/145111. ## Summary It includes improvements for url search parameters manipulation functionality. In particular `useGetInitialUrlParamValue` and `useReplaceUrlParams` hooks. The main idea is to isolate the encoding layer ([rison](https://github.com/Nanonid/rison)) as an implementation detail so `useGetInitialUrlParamValue` and `useReplaceUrlParams` consumers can just provide types they wish and the hooks serialize/desirealize the data into appropriate format under the hood. On top of that after `@kbn/rison` was added in https://github.com/elastic/kibana/pull/146649 it's possible to use this package directly to encode and decode parameters whenever necessary. The improvements include - store unserialized url parameters state in the redux store - encode and decode data by using functions from `@kbn/rison` directly - let `useReplaceUrlParams` accept an updater object ### 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 --- packages/kbn-rison/kbn_rison.test.ts | 2 +- packages/kbn-rison/kbn_rison.ts | 13 ++- .../utils/format_page_filter_search_param.ts | 4 +- .../detection_page_filters.cy.ts | 5 +- .../security_solution/cypress/tsconfig.json | 3 +- .../events_tab/events_query_tab_body.tsx | 20 ++--- .../plugins/timeline/parser.ts | 13 ++- ...query_timeline_by_id_on_url_change.test.ts | 9 +- .../use_query_timeline_by_id_on_url_change.ts | 29 ++----- .../hooks/use_resolve_conflict.test.tsx | 4 - .../common/hooks/use_resolve_conflict.tsx | 13 ++- .../common/hooks/use_resolve_redirect.test.ts | 4 - .../common/hooks/use_resolve_redirect.ts | 12 +-- .../common/store/global_url_param/actions.ts | 5 +- .../common/store/global_url_param/reducer.ts | 7 +- .../utils/global_query_string/helpers.ts | 48 +++++------ .../utils/global_query_string/index.test.tsx | 19 +++-- .../common/utils/global_query_string/index.ts | 83 +++++++++++-------- .../mock_rules_table_persistent_state.ts | 4 +- .../use_initialize_rules_table_saved_state.ts | 2 +- .../use_sync_rules_table_saved_state.test.tsx | 15 ++-- .../use_sync_rules_table_saved_state.ts | 11 +-- .../rules/use_rule_from_timeline.test.ts | 16 +--- .../rules/use_rule_from_timeline.tsx | 4 +- .../components/open_timeline/index.tsx | 4 +- 25 files changed, 157 insertions(+), 192 deletions(-) diff --git a/packages/kbn-rison/kbn_rison.test.ts b/packages/kbn-rison/kbn_rison.test.ts index 0a3e49cacf485d..a085ef299f92c6 100644 --- a/packages/kbn-rison/kbn_rison.test.ts +++ b/packages/kbn-rison/kbn_rison.test.ts @@ -21,7 +21,7 @@ describe('encoding', () => { }); it('throws if it received undefined', () => { expect(() => Rison.encode(undefined)).toThrowErrorMatchingInlineSnapshot( - `"unable to encode value into rison, expected a primative value array or object"` + `"unable to encode value into rison, expected a primitive value array or object"` ); }); it('encodes a complex object', () => { diff --git a/packages/kbn-rison/kbn_rison.ts b/packages/kbn-rison/kbn_rison.ts index 4b2fe7958704c8..be789a9a545608 100644 --- a/packages/kbn-rison/kbn_rison.ts +++ b/packages/kbn-rison/kbn_rison.ts @@ -29,7 +29,7 @@ export function encode(obj: any) { const rison = encodeUnknown(obj); if (rison === undefined) { throw new Error( - 'unable to encode value into rison, expected a primative value array or object' + 'unable to encode value into rison, expected a primitive value array or object' ); } return rison; @@ -42,6 +42,17 @@ export function decode(rison: string): RisonValue { return Rison.decode(rison); } +/** + * safely parse a rison string into a javascript structure, never throws + */ +export function safeDecode(rison: string): RisonValue { + try { + return decode(rison); + } catch { + return null; + } +} + /** * rison-encode a javascript array without surrounding parens */ diff --git a/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.ts b/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.ts index eb33e8cd629fe5..c8deaf824bc2c2 100644 --- a/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.ts +++ b/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.ts @@ -5,16 +5,14 @@ * 2.0. */ -import rison from '@kbn/rison'; import type { FilterItemObj } from '../../public/common/components/filter_group/types'; export const formatPageFilterSearchParam = (filters: FilterItemObj[]) => { - const modifiedFilters = filters.map((filter) => ({ + return filters.map((filter) => ({ title: filter.title ?? filter.fieldName, selectedOptions: filter.selectedOptions ?? [], fieldName: filter.fieldName, existsSelected: filter.existsSelected ?? false, exclude: filter.exclude ?? false, })); - return rison.encode(modifiedFilters); }; diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/detection_page_filters.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/detection_page_filters.cy.ts index c246f28ac09b36..e105cc92b3a33b 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/detection_page_filters.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/detection_page_filters.cy.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { encode } from '@kbn/rison'; import { getNewRule } from '../../objects/rule'; import { CONTROL_FRAMES, @@ -83,7 +84,7 @@ describe('Detections : Page Filters', () => { cy.url().then((url) => { const currURL = new URL(url); - currURL.searchParams.set('pageFilters', formatPageFilterSearchParam(NEW_FILTERS)); + currURL.searchParams.set('pageFilters', encode(formatPageFilterSearchParam(NEW_FILTERS))); cy.visit(currURL.toString()); waitForAlerts(); assertFilterControlsWithFilterObject(NEW_FILTERS); @@ -104,7 +105,7 @@ describe('Detections : Page Filters', () => { cy.url().then((url) => { const currURL = new URL(url); - currURL.searchParams.set('pageFilters', pageFilterUrlString); + currURL.searchParams.set('pageFilters', encode(pageFilterUrlString)); cy.visit(currURL.toString()); waitForAlerts(); diff --git a/x-pack/plugins/security_solution/cypress/tsconfig.json b/x-pack/plugins/security_solution/cypress/tsconfig.json index 070f577c5c2fb9..fdb6b295104b12 100644 --- a/x-pack/plugins/security_solution/cypress/tsconfig.json +++ b/x-pack/plugins/security_solution/cypress/tsconfig.json @@ -26,6 +26,7 @@ { "path": "../tsconfig.json", "force": true - } + }, + "@kbn/rison" ] } diff --git a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx index 5f36a30779ca34..a72e0aa35f3ad7 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx @@ -210,7 +210,7 @@ const useExternalAlertsInitialUrlState = () => { const getInitialUrlParamValue = useGetInitialUrlParamValue(EXTERNAL_ALERTS_URL_PARAM); - const { decodedParam: showExternalAlertsInitialUrlState } = useMemo( + const showExternalAlertsInitialUrlState = useMemo( () => getInitialUrlParamValue(), [getInitialUrlParamValue] ); @@ -218,12 +218,9 @@ const useExternalAlertsInitialUrlState = () => { useEffect(() => { // Only called on component unmount return () => { - replaceUrlParams([ - { - key: EXTERNAL_ALERTS_URL_PARAM, - value: null, - }, - ]); + replaceUrlParams({ + [EXTERNAL_ALERTS_URL_PARAM]: null, + }); }; }, [replaceUrlParams]); @@ -236,11 +233,8 @@ const useExternalAlertsInitialUrlState = () => { const useSyncExternalAlertsUrlState = (showExternalAlerts: boolean) => { const replaceUrlParams = useReplaceUrlParams(); useEffect(() => { - replaceUrlParams([ - { - key: EXTERNAL_ALERTS_URL_PARAM, - value: showExternalAlerts ? 'true' : null, - }, - ]); + replaceUrlParams({ + [EXTERNAL_ALERTS_URL_PARAM]: showExternalAlerts ? true : null, + }); }, [showExternalAlerts, replaceUrlParams]); }; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/parser.ts b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/parser.ts index 1d48cc4d56dd81..a5499f06bddf2e 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/parser.ts +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/parser.ts @@ -7,8 +7,8 @@ import type { Plugin } from 'unified'; import type { RemarkTokenizer } from '@elastic/eui'; +import { safeDecode } from '@kbn/rison'; import { parse } from 'query-string'; -import { decodeRisonUrlState } from '../../../../utils/global_query_string/helpers'; import { ID, PREFIX } from './constants'; import * as i18n from './translations'; @@ -73,9 +73,14 @@ export const TimelineParser: Plugin = function () { try { const timelineSearch = timelineUrl.split('?'); const parseTimelineUrlSearch = parse(timelineSearch[1]) as { timeline: string }; - const { id: timelineId = '', graphEventId = '' } = decodeRisonUrlState( - parseTimelineUrlSearch.timeline ?? '' - ) ?? { id: null, graphEventId: '' }; + const decodedTimeline = safeDecode(parseTimelineUrlSearch.timeline ?? '') as { + id?: string; + graphEventId?: string; + } | null; + const { id: timelineId = '', graphEventId = '' } = decodedTimeline ?? { + id: null, + graphEventId: '', + }; if (!timelineId) { this.file.info(i18n.NO_TIMELINE_ID_FOUND, { diff --git a/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.test.ts b/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.test.ts index a2a3b51e6f0369..3966ebc6697b2d 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.test.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.test.ts @@ -7,7 +7,6 @@ import { queryTimelineById } from '../../../timelines/components/open_timeline/helpers'; import { useQueryTimelineByIdOnUrlChange } from './use_query_timeline_by_id_on_url_change'; -import * as urlHelpers from '../../utils/global_query_string/helpers'; import { renderHook } from '@testing-library/react-hooks'; import { timelineDefaults } from '../../../timelines/store/timeline/defaults'; @@ -91,15 +90,11 @@ describe('queryTimelineByIdOnUrlChange', () => { describe('when decode rison fails', () => { it('should not call queryTimelineById', () => { - jest.spyOn(urlHelpers, 'decodeRisonUrlState').mockImplementationOnce(() => { - throw new Error('Unable to decode'); - }); - mockUseLocation.mockReturnValue({ search: oldTimelineRisonSearchString }); const { rerender } = renderHook(() => useQueryTimelineByIdOnUrlChange()); - mockUseLocation.mockReturnValue({ search: newTimelineRisonSearchString }); - jest.clearAllMocks(); + mockUseLocation.mockReturnValue({ search: '?foo=bar' }); + rerender(); expect(queryTimelineById).not.toBeCalled(); diff --git a/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.ts b/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.ts index c307d634d77ee2..e56131cd2603c1 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.ts @@ -10,6 +10,7 @@ import { useEffect, useMemo } from 'react'; import { useLocation } from 'react-router-dom'; import usePrevious from 'react-use/lib/usePrevious'; import { useDispatch } from 'react-redux'; +import { safeDecode } from '@kbn/rison'; import type { TimelineUrl } from '../../../timelines/store/timeline/model'; import { timelineActions, timelineSelectors } from '../../../timelines/store/timeline'; import { TimelineId, TimelineTabs } from '../../../../common/types'; @@ -20,7 +21,6 @@ import { queryTimelineById, } from '../../../timelines/components/open_timeline/helpers'; import { - decodeRisonUrlState, getParamFromQueryString, getQueryStringFromLocation, } from '../../utils/global_query_string/helpers'; @@ -51,29 +51,14 @@ export const useQueryTimelineByIdOnUrlChange = () => { urlKey: URL_PARAM_KEY.timeline, search: oldSearch ?? '', }); - const newUrlStateString = getQueryStringKeyValue({ urlKey: URL_PARAM_KEY.timeline, search }); - if (oldUrlStateString != null && newUrlStateString != null) { - let newTimeline = null; - let oldTimeline = null; - - try { - newTimeline = decodeRisonUrlState(newUrlStateString); - } catch (error) { - // do nothing as timeline is defaulted to null - } - - try { - oldTimeline = decodeRisonUrlState(oldUrlStateString); - } catch (error) { - // do nothing as timeline is defaulted to null - } - - return [oldTimeline, newTimeline]; - } - - return [null, null]; + return oldUrlStateString != null && newUrlStateString != null + ? [ + safeDecode(oldUrlStateString) as TimelineUrl | null, + safeDecode(newUrlStateString) as TimelineUrl | null, + ] + : [null, null]; }, [oldSearch, search]); const oldId = previousTimeline?.id; diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.test.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.test.tsx index ef4a26e52e968e..d17b9c16f9d2a2 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.test.tsx +++ b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.test.tsx @@ -9,7 +9,6 @@ import { renderHook } from '@testing-library/react-hooks'; import { useDeepEqualSelector } from './use_selector'; import { useKibana } from '../lib/kibana'; import { useResolveConflict } from './use_resolve_conflict'; -import * as urlHelpers from '../utils/global_query_string/helpers'; jest.mock('react-router-dom', () => { const original = jest.requireActual('react-router-dom'); @@ -127,9 +126,6 @@ describe('useResolveConflict', () => { describe('rison is unable to be decoded', () => { it('should use timeline values from redux to create the otherObjectPath', async () => { - jest.spyOn(urlHelpers, 'decodeRisonUrlState').mockImplementation(() => { - throw new Error('Unable to decode'); - }); (useLocation as jest.Mock).mockReturnValue({ pathname: 'my/cool/path', search: '?foo=bar', diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.tsx index 6bd55a9b70b369..d0082f858ca12c 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.tsx +++ b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.tsx @@ -8,12 +8,12 @@ import React, { useCallback, useMemo } from 'react'; import { useLocation } from 'react-router-dom'; import { EuiSpacer } from '@elastic/eui'; +import { safeDecode, encode } from '@kbn/rison'; import { useDeepEqualSelector } from './use_selector'; import { TimelineId } from '../../../common/types/timeline'; import { timelineSelectors } from '../../timelines/store/timeline'; import type { TimelineUrl } from '../../timelines/store/timeline/model'; import { timelineDefaults } from '../../timelines/store/timeline/defaults'; -import { decodeRisonUrlState, encodeRisonUrlState } from '../utils/global_query_string/helpers'; import { useKibana } from '../lib/kibana'; import { URL_PARAM_KEY } from './use_url_state'; @@ -53,12 +53,9 @@ export const useResolveConflict = () => { activeTab, graphEventId, }; - let timelineSearch: TimelineUrl = currentTimelineState; - try { - timelineSearch = decodeRisonUrlState(timelineRison) ?? currentTimelineState; - } catch (error) { - // do nothing as it's already defaulted on line 77 - } + const timelineSearch = + (safeDecode(timelineRison ?? '') as TimelineUrl | null) ?? currentTimelineState; + // We have resolved to one object, but another object has a legacy URL alias associated with this ID/page. We should display a // callout with a warning for the user, and provide a way for them to navigate to the other object. const currentObjectId = timelineSearch?.id; @@ -68,7 +65,7 @@ export const useResolveConflict = () => { ...timelineSearch, id: newSavedObjectId, }; - const newTimelineRison = encodeRisonUrlState(newTimelineSearch); + const newTimelineRison = encode(newTimelineSearch); searchQuery.set(URL_PARAM_KEY.timeline, newTimelineRison); const newPath = `${pathname}?${searchQuery.toString()}${window.location.hash}`; diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.test.ts b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.test.ts index 7e3b0f88780c42..c54259649448be 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.test.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.test.ts @@ -10,7 +10,6 @@ import { renderHook } from '@testing-library/react-hooks'; import { useDeepEqualSelector } from './use_selector'; import { useKibana } from '../lib/kibana'; import { useResolveRedirect } from './use_resolve_redirect'; -import * as urlHelpers from '../utils/global_query_string/helpers'; jest.mock('react-router-dom', () => { const original = jest.requireActual('react-router-dom'); @@ -101,9 +100,6 @@ describe('useResolveRedirect', () => { describe('rison is unable to be decoded', () => { it('should use timeline values from redux to create the redirect path', async () => { - jest.spyOn(urlHelpers, 'decodeRisonUrlState').mockImplementation(() => { - throw new Error('Unable to decode'); - }); (useLocation as jest.Mock).mockReturnValue({ pathname: 'my/cool/path', search: '?foo=bar', diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.ts b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.ts index 2f5bf211d89061..e771995e250310 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.ts @@ -7,11 +7,11 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { useLocation } from 'react-router-dom'; +import { safeDecode, encode } from '@kbn/rison'; import { useDeepEqualSelector } from './use_selector'; import { TimelineId } from '../../../common/types/timeline'; import { timelineSelectors } from '../../timelines/store/timeline'; import { timelineDefaults } from '../../timelines/store/timeline/defaults'; -import { decodeRisonUrlState, encodeRisonUrlState } from '../utils/global_query_string/helpers'; import { useKibana } from '../lib/kibana'; import type { TimelineUrl } from '../../timelines/store/timeline/model'; import { URL_PARAM_KEY } from './use_url_state'; @@ -42,12 +42,8 @@ export const useResolveRedirect = () => { activeTab, graphEventId, }; - let timelineSearch: TimelineUrl = currentTimelineState; - try { - timelineSearch = decodeRisonUrlState(timelineRison) ?? currentTimelineState; - } catch (error) { - // do nothing as it's already defaulted on line 77 - } + const timelineSearch = + (safeDecode(timelineRison ?? '') as TimelineUrl | null) ?? currentTimelineState; if ( hasRedirected || @@ -64,7 +60,7 @@ export const useResolveRedirect = () => { ...timelineSearch, id: newObjectId, }; - const newTimelineRison = encodeRisonUrlState(newTimelineSearch); + const newTimelineRison = encode(newTimelineSearch); searchQuery.set(URL_PARAM_KEY.timeline, newTimelineRison); const newPath = `${pathname}?${searchQuery.toString()}`; spaces.ui.redirectLegacyUrl({ diff --git a/x-pack/plugins/security_solution/public/common/store/global_url_param/actions.ts b/x-pack/plugins/security_solution/public/common/store/global_url_param/actions.ts index 0b3c90e1581512..bccb3418aa577a 100644 --- a/x-pack/plugins/security_solution/public/common/store/global_url_param/actions.ts +++ b/x-pack/plugins/security_solution/public/common/store/global_url_param/actions.ts @@ -5,16 +5,17 @@ * 2.0. */ +import type { RisonValue } from '@kbn/rison'; import actionCreatorFactory from 'typescript-fsa'; const actionCreator = actionCreatorFactory('x-pack/security_solution/local/global_url_param'); -export const registerUrlParam = actionCreator<{ key: string; initialValue: string | null }>( +export const registerUrlParam = actionCreator<{ key: string; initialValue: RisonValue | null }>( 'REGISTER_URL_PARAM' ); export const deregisterUrlParam = actionCreator<{ key: string }>('DEREGISTER_URL_PARAM'); -export const updateUrlParam = actionCreator<{ key: string; value: string | null }>( +export const updateUrlParam = actionCreator<{ key: string; value: RisonValue | null }>( 'UPDATE_URL_PARAM' ); diff --git a/x-pack/plugins/security_solution/public/common/store/global_url_param/reducer.ts b/x-pack/plugins/security_solution/public/common/store/global_url_param/reducer.ts index 5e7d91515e9b69..47b1ffbfea0769 100644 --- a/x-pack/plugins/security_solution/public/common/store/global_url_param/reducer.ts +++ b/x-pack/plugins/security_solution/public/common/store/global_url_param/reducer.ts @@ -5,10 +5,12 @@ * 2.0. */ +import type { RisonValue } from '@kbn/rison'; +import deepEqual from 'fast-deep-equal'; import { reducerWithInitialState } from 'typescript-fsa-reducers'; import { registerUrlParam, updateUrlParam, deregisterUrlParam } from './actions'; -export type GlobalUrlParam = Record; +export type GlobalUrlParam = Record; export const initialGlobalUrlParam: GlobalUrlParam = {}; @@ -34,8 +36,7 @@ export const globalUrlParamReducer = reducerWithInitialState(initialGlobalUrlPar return nextState; }) .case(updateUrlParam, (state, { key, value }) => { - // Only update the URL after the query param is registered and if the current value is different than the previous value - if (state[key] === undefined || state[key] === value) { + if (state[key] === undefined || deepEqual(state[key], value)) { return state; } diff --git a/x-pack/plugins/security_solution/public/common/utils/global_query_string/helpers.ts b/x-pack/plugins/security_solution/public/common/utils/global_query_string/helpers.ts index 0f3c1ab413fd00..a8120cd0b99cc8 100644 --- a/x-pack/plugins/security_solution/public/common/utils/global_query_string/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/utils/global_query_string/helpers.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { decode, encode } from '@kbn/rison'; +import type { RisonValue } from '@kbn/rison'; +import { safeDecode, encode } from '@kbn/rison'; import type { ParsedQuery } from 'query-string'; import { parse, stringify } from 'query-string'; import { url } from '@kbn/kibana-utils-plugin/public'; @@ -19,20 +20,6 @@ export const isDetectionsPages = (pageName: string) => pageName === SecurityPageName.rulesCreate || pageName === SecurityPageName.exceptions; -export const decodeRisonUrlState = (value: string | undefined): T | null => { - try { - return value ? (decode(value) as unknown as T) : null; - } catch (error) { - if (error instanceof Error && error.message.startsWith('rison decoder error')) { - return null; - } - throw error; - } -}; - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export const encodeRisonUrlState = (state: any) => encode(state); - export const getQueryStringFromLocation = (search: string) => search.substring(1); export const getParamFromQueryString = ( @@ -51,18 +38,19 @@ export const getParamFromQueryString = ( * It doesn't update when the URL changes. * */ -export const useGetInitialUrlParamValue = (urlParamKey: string) => { +export const useGetInitialUrlParamValue = ( + urlParamKey: string +): (() => State | null) => { // window.location.search provides the most updated representation of the url search. // It also guarantees that we don't overwrite URL param managed outside react-router. - const getInitialUrlParamValue = useCallback(() => { - const param = getParamFromQueryString( + const getInitialUrlParamValue = useCallback((): State | null => { + const rawParamValue = getParamFromQueryString( getQueryStringFromLocation(window.location.search), urlParamKey ); + const paramValue = safeDecode(rawParamValue ?? '') as State | null; - const decodedParam = decodeRisonUrlState(param ?? undefined); - - return { param, decodedParam }; + return paramValue; }, [urlParamKey]); return getInitialUrlParamValue; @@ -71,22 +59,30 @@ export const useGetInitialUrlParamValue = (urlParamKey: string) => { export const encodeQueryString = (urlParams: ParsedQuery): string => stringify(url.encodeQuery(urlParams), { sort: false, encode: false }); -export const useReplaceUrlParams = () => { +export const useReplaceUrlParams = (): ((params: Record) => void) => { const history = useHistory(); const replaceUrlParams = useCallback( - (params: Array<{ key: string; value: string | null }>) => { + (params: Record): void => { // window.location.search provides the most updated representation of the url search. // It prevents unnecessary re-renders which useLocation would create because 'replaceUrlParams' does update the location. // window.location.search also guarantees that we don't overwrite URL param managed outside react-router. const search = window.location.search; const urlParams = parse(search, { sort: false }); - params.forEach(({ key, value }) => { + Object.keys(params).forEach((key) => { + const value = params[key]; + if (value == null || value === '') { delete urlParams[key]; - } else { - urlParams[key] = value; + return; + } + + try { + urlParams[key] = encode(value); + } catch { + // eslint-disable-next-line no-console + console.error('Unable to encode url param value'); } }); diff --git a/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.test.tsx b/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.test.tsx index dede5125775c49..24fc87bf7bf617 100644 --- a/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.test.tsx @@ -130,7 +130,7 @@ describe('global query string', () => { expect(mockDispatch).toBeCalledWith( globalUrlParamActions.registerUrlParam({ key: urlParamKey, - initialValue: initialValue.toString(), + initialValue, }) ); }); @@ -140,7 +140,6 @@ describe('global query string', () => { it('dispatch updateUrlParam action', () => { const urlParamKey = 'testKey'; const value = { test: 123 }; - const encodedVaue = '(test:123)'; const globalUrlParam = { [urlParamKey]: 'oldValue', @@ -156,7 +155,7 @@ describe('global query string', () => { expect(mockDispatch).toBeCalledWith( globalUrlParamActions.updateUrlParam({ key: urlParamKey, - value: encodedVaue, + value, }) ); }); @@ -186,10 +185,12 @@ describe('global query string', () => { { ...mockGlobalState, globalUrlParam: { - testNumber: '123', - testObject: '(test:321)', + testNumber: 123, + testObject: { testKey: 321 }, + testEmptyObject: {}, + testEmptyArray: [], testNull: null, - testEmpty: '', + testEmptyString: '', }, }, SUB_PLUGINS_REDUCER, @@ -202,7 +203,7 @@ describe('global query string', () => { const { result } = renderHook(() => useGlobalQueryString(), { wrapper }); - expect(result.current).toEqual('testNumber=123&testObject=(test:321)'); + expect(result.current).toEqual(`testNumber=123&testObject=(testKey:321)`); }); }); @@ -218,7 +219,7 @@ describe('global query string', () => { renderHook(() => useSyncGlobalQueryString(), { wrapper: makeWrapper(globalUrlParam) }); expect(mockHistory.replace).toHaveBeenCalledWith({ - search: `firstKey=111&${urlParamKey}=${value}&lastKey=999`, + search: `firstKey=111&${urlParamKey}='${value}'&lastKey=999`, }); }); @@ -236,7 +237,7 @@ describe('global query string', () => { renderHook(() => useSyncGlobalQueryString(), { wrapper: makeWrapper(globalUrlParam) }); expect(mockHistory.replace).toHaveBeenCalledWith({ - search: `${urlParamKey1}=${value1}&${urlParamKey2}=${value2}`, + search: `${urlParamKey1}='${value1}'&${urlParamKey2}='${value2}'`, }); }); diff --git a/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.ts b/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.ts index 96834d39fd6446..0d6f546a8b1d5b 100644 --- a/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.ts +++ b/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.ts @@ -9,12 +9,8 @@ import { useCallback, useEffect, useMemo } from 'react'; import { difference, isEmpty, pickBy } from 'lodash/fp'; import { useDispatch } from 'react-redux'; import usePrevious from 'react-use/lib/usePrevious'; -import { - encodeQueryString, - encodeRisonUrlState, - useGetInitialUrlParamValue, - useReplaceUrlParams, -} from './helpers'; +import { encode } from '@kbn/rison'; +import { encodeQueryString, useGetInitialUrlParamValue, useReplaceUrlParams } from './helpers'; import { useShallowEqualSelector } from '../../hooks/use_selector'; import { globalUrlParamActions, globalUrlParamSelectors } from '../../store/global_url_param'; import { useRouteSpy } from '../route/use_route_spy'; @@ -29,7 +25,7 @@ import { getLinkInfo } from '../../links'; * @param urlParamKey Must not change. * @param onInitialize Called once when initializing. It must not change. */ -export const useInitializeUrlParam = ( +export const useInitializeUrlParam = ( urlParamKey: string, /** * @param state Decoded URL param value. @@ -38,20 +34,20 @@ export const useInitializeUrlParam = ( ) => { const dispatch = useDispatch(); - const getInitialUrlParamValue = useGetInitialUrlParamValue(urlParamKey); + const getInitialUrlParamValue = useGetInitialUrlParamValue(urlParamKey); useEffect(() => { - const { param: initialValue, decodedParam: decodedInitialValue } = getInitialUrlParamValue(); + const value = getInitialUrlParamValue(); dispatch( globalUrlParamActions.registerUrlParam({ key: urlParamKey, - initialValue: initialValue ?? null, + initialValue: value, }) ); // execute consumer initialization - onInitialize(decodedInitialValue); + onInitialize(value as State); return () => { dispatch(globalUrlParamActions.deregisterUrlParam({ key: urlParamKey })); @@ -65,13 +61,12 @@ export const useInitializeUrlParam = ( * * Make sure to call `useInitializeUrlParam` before calling this function. */ -export const useUpdateUrlParam = (urlParamKey: string) => { +export const useUpdateUrlParam = (urlParamKey: string) => { const dispatch = useDispatch(); const updateUrlParam = useCallback( (value: State | null) => { - const encodedValue = value !== null ? encodeRisonUrlState(value) : null; - dispatch(globalUrlParamActions.updateUrlParam({ key: urlParamKey, value: encodedValue })); + dispatch(globalUrlParamActions.updateUrlParam({ key: urlParamKey, value })); }, [dispatch, urlParamKey] ); @@ -81,11 +76,29 @@ export const useUpdateUrlParam = (urlParamKey: string) => { export const useGlobalQueryString = (): string => { const globalUrlParam = useShallowEqualSelector(globalUrlParamSelectors.selectGlobalUrlParam); + const globalQueryString = useMemo(() => { + const encodedGlobalUrlParam: Record = {}; - const globalQueryString = useMemo( - () => encodeQueryString(pickBy((value) => !isEmpty(value), globalUrlParam)), - [globalUrlParam] - ); + if (!globalUrlParam) { + return ''; + } + + Object.keys(globalUrlParam).forEach((paramName) => { + const value = globalUrlParam[paramName]; + + if (!value || (typeof value === 'object' && isEmpty(value))) { + return; + } + + try { + encodedGlobalUrlParam[paramName] = encode(value); + } catch { + // Just ignore parameters which unable to encode + } + }); + + return encodeQueryString(pickBy((value) => !isEmpty(value), encodedGlobalUrlParam)); + }, [globalUrlParam]); return globalQueryString; }; @@ -100,29 +113,29 @@ export const useSyncGlobalQueryString = () => { const previousGlobalUrlParams = usePrevious(globalUrlParam); const replaceUrlParams = useReplaceUrlParams(); - // Url params that got deleted from GlobalUrlParams - const unregisteredKeys = useMemo( - () => difference(Object.keys(previousGlobalUrlParams ?? {}), Object.keys(globalUrlParam)), - [previousGlobalUrlParams, globalUrlParam] - ); - useEffect(() => { const linkInfo = getLinkInfo(pageName) ?? { skipUrlState: true }; - const params = Object.entries(globalUrlParam).map(([key, value]) => ({ - key, - value: linkInfo.skipUrlState ? null : value, - })); + const paramsToUpdate = { ...globalUrlParam }; + + if (linkInfo.skipUrlState) { + Object.keys(paramsToUpdate).forEach((key) => { + paramsToUpdate[key] = null; + }); + } + + // Url params that got deleted from GlobalUrlParams + const unregisteredKeys = difference( + Object.keys(previousGlobalUrlParams ?? {}), + Object.keys(globalUrlParam) + ); // Delete unregistered Url params unregisteredKeys.forEach((key) => { - params.push({ - key, - value: null, - }); + paramsToUpdate[key] = null; }); - if (params.length > 0) { - replaceUrlParams(params); + if (Object.keys(paramsToUpdate).length > 0) { + replaceUrlParams(paramsToUpdate); } - }, [globalUrlParam, pageName, unregisteredKeys, replaceUrlParams]); + }, [previousGlobalUrlParams, globalUrlParam, pageName, replaceUrlParams]); }; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/__mocks__/mock_rules_table_persistent_state.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/__mocks__/mock_rules_table_persistent_state.ts index 36c452b648853b..2b5d6750e91fd9 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/__mocks__/mock_rules_table_persistent_state.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/__mocks__/mock_rules_table_persistent_state.ts @@ -19,9 +19,7 @@ export function mockRulesTablePersistedState({ urlState: RulesTableUrlSavedState | null; storageState: RulesTableStorageSavedState | null; }): void { - (useGetInitialUrlParamValue as jest.Mock).mockReturnValue( - jest.fn().mockReturnValue({ decodedParam: urlState }) - ); + (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(jest.fn().mockReturnValue(urlState)); (useKibana as jest.Mock).mockReturnValue({ services: { sessionStorage: { get: jest.fn().mockReturnValue(storageState) } }, }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_initialize_rules_table_saved_state.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_initialize_rules_table_saved_state.ts index b33908a3706b2a..82ca541f8b9d5d 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_initialize_rules_table_saved_state.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_initialize_rules_table_saved_state.ts @@ -62,7 +62,7 @@ export function useInitializeRulesTableSavedState(): void { } = useKibana(); useEffect(() => { - const { decodedParam: urlState } = getUrlParam(); + const urlState = getUrlParam(); const storageState = readStorageState(sessionStorage); if (!urlState && !storageState) { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.test.tsx index afb6b462d8ed48..6d3484791a3afa 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.test.tsx @@ -55,12 +55,9 @@ describe('useSyncRulesTableSavedState', () => { renderHook(() => useSyncRulesTableSavedState()); - expect(replaceUrlParams).toHaveBeenCalledWith([ - { - key: URL_PARAM_KEY.rulesTable, - value: expectedUrlState, - }, - ]); + expect(replaceUrlParams).toHaveBeenCalledWith({ + [URL_PARAM_KEY.rulesTable]: expectedUrlState, + }); }; const expectStateToSyncWithStorage = ( @@ -96,7 +93,7 @@ describe('useSyncRulesTableSavedState', () => { renderHook(() => useSyncRulesTableSavedState()); - expect(replaceUrlParams).toHaveBeenCalledWith([{ key: URL_PARAM_KEY.rulesTable, value: null }]); + expect(replaceUrlParams).toHaveBeenCalledWith({ [URL_PARAM_KEY.rulesTable]: null }); expect(setStorage).not.toHaveBeenCalled(); expect(removeStorage).toHaveBeenCalledWith(RULES_TABLE_STATE_STORAGE_KEY); }); @@ -136,9 +133,7 @@ describe('useSyncRulesTableSavedState', () => { renderHook(() => useSyncRulesTableSavedState()); - expect(replaceUrlParams).toHaveBeenCalledWith([ - { key: URL_PARAM_KEY.rulesTable, value: expectedUrlState }, - ]); + expect(replaceUrlParams).toHaveBeenCalledWith({ [URL_PARAM_KEY.rulesTable]: expectedUrlState }); expect(setStorage).toHaveBeenCalledWith(RULES_TABLE_STATE_STORAGE_KEY, expectedStorageState); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.ts index 97ee8e6f981150..b4c1b7fe2fff27 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.ts @@ -6,10 +6,7 @@ */ import { useEffect } from 'react'; -import { - encodeRisonUrlState, - useReplaceUrlParams, -} from '../../../../../common/utils/global_query_string/helpers'; +import { useReplaceUrlParams } from '../../../../../common/utils/global_query_string/helpers'; import { useKibana } from '../../../../../common/lib/kibana'; import { URL_PARAM_KEY } from '../../../../../common/hooks/use_url_state'; import { RULES_TABLE_STATE_STORAGE_KEY } from '../constants'; @@ -76,7 +73,7 @@ export function useSyncRulesTableSavedState(): void { const hasStorageStateToSave = Object.keys(storageStateToSave).length > 0; if (!hasUrlStateToSave) { - replaceUrlParams([{ key: URL_PARAM_KEY.rulesTable, value: null }]); + replaceUrlParams({ [URL_PARAM_KEY.rulesTable]: null }); } if (!hasStorageStateToSave) { @@ -87,9 +84,7 @@ export function useSyncRulesTableSavedState(): void { return; } - replaceUrlParams([ - { key: URL_PARAM_KEY.rulesTable, value: encodeRisonUrlState(urlStateToSave) }, - ]); + replaceUrlParams({ [URL_PARAM_KEY.rulesTable]: urlStateToSave }); sessionStorage.set(RULES_TABLE_STATE_STORAGE_KEY, storageStateToSave); }, [replaceUrlParams, sessionStorage, state]); } diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.test.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.test.ts index 1ed56a518662aa..475563a0518b06 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.test.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.test.ts @@ -100,9 +100,7 @@ describe('useRuleFromTimeline', () => { jest.clearAllMocks(); appToastsMock = useAppToastsMock.create(); (useAppToasts as jest.Mock).mockReturnValue(appToastsMock); - (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => ({ - decodedParam: timelineId, - })); + (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => timelineId); (resolveTimeline as jest.Mock).mockResolvedValue(selectedTimeline); }); @@ -139,9 +137,7 @@ describe('useRuleFromTimeline', () => { }); }); it('if no timeline id in URL, loading: false and query not set', async () => { - (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => ({ - decodedParam: undefined, - })); + (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => undefined); const { result } = renderHook(() => useRuleFromTimeline(setRuleQuery)); expect(result.current.loading).toEqual(false); @@ -227,9 +223,7 @@ describe('useRuleFromTimeline', () => { }); it('Sets rule from timeline query via callback', async () => { - (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => ({ - decodedParam: undefined, - })); + (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => undefined); const { result } = renderHook(() => useRuleFromTimeline(setRuleQuery)); expect(result.current.loading).toEqual(false); await act(async () => { @@ -280,9 +274,7 @@ describe('useRuleFromTimeline', () => { }); it('Handles error when query is malformed', async () => { - (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => ({ - decodedParam: undefined, - })); + (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => undefined); const { result } = renderHook(() => useRuleFromTimeline(setRuleQuery)); expect(result.current.loading).toEqual(false); const tl = { diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx index e77fe4e92b7a36..f9793020b6f20a 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx @@ -181,9 +181,7 @@ export const useRuleFromTimeline = (setRuleQuery: SetRuleQuery): RuleFromTimelin // start handle set rule from timeline id const getInitialUrlParamValue = useGetInitialUrlParamValue(RULE_FROM_TIMELINE_URL_PARAM); - const { decodedParam: timelineIdFromUrl } = useMemo(getInitialUrlParamValue, [ - getInitialUrlParamValue, - ]); + const timelineIdFromUrl = useMemo(getInitialUrlParamValue, [getInitialUrlParamValue]); const getTimelineById = useCallback( (timelineId: string) => { diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx index 970a6482065af6..b21f2f1507a24a 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx @@ -7,9 +7,9 @@ import React, { useEffect, useState, useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; +import { encode } from '@kbn/rison'; import { RULE_FROM_TIMELINE_URL_PARAM } from '../../../detections/containers/detection_engine/rules/use_rule_from_timeline'; -import { encodeRisonUrlState } from '../../../common/utils/global_query_string/helpers'; import { useNavigation } from '../../../common/lib/kibana'; import { SecurityPageName } from '../../../../common/constants'; import { useShallowEqualSelector } from '../../../common/hooks/use_selector'; @@ -283,7 +283,7 @@ export const StatefulOpenTimelineComponent = React.memo( (savedObjectId) => navigateTo({ deepLinkId: SecurityPageName.rulesCreate, - path: `?${RULE_FROM_TIMELINE_URL_PARAM}=${encodeRisonUrlState(savedObjectId)}`, + path: `?${RULE_FROM_TIMELINE_URL_PARAM}=${encode(savedObjectId)}`, }), [navigateTo] ); From de68815bc9c2bd71933438d44447ea3924a886ad Mon Sep 17 00:00:00 2001 From: Shahzad Date: Thu, 5 Jan 2023 18:13:47 +0100 Subject: [PATCH 29/36] [Synthetics] Fixed public location edit remove (#148458) Fixes https://github.com/elastic/kibana/issues/146927 --- .../bulk_cruds/edit_monitor_bulk.ts | 23 ++--- .../routes/monitor_cruds/edit_monitor.ts | 9 +- .../synthetics_monitor_client.test.ts | 83 +++++++++++++++++++ .../synthetics_monitor_client.ts | 47 +++++++++-- 4 files changed, 146 insertions(+), 16 deletions(-) diff --git a/x-pack/plugins/synthetics/server/routes/monitor_cruds/bulk_cruds/edit_monitor_bulk.ts b/x-pack/plugins/synthetics/server/routes/monitor_cruds/bulk_cruds/edit_monitor_bulk.ts index 8cc6c5c8d30a83..b2abc0f7f534b7 100644 --- a/x-pack/plugins/synthetics/server/routes/monitor_cruds/bulk_cruds/edit_monitor_bulk.ts +++ b/x-pack/plugins/synthetics/server/routes/monitor_cruds/bulk_cruds/edit_monitor_bulk.ts @@ -78,16 +78,19 @@ export const syncEditedMonitorBulk = async ({ async function syncUpdatedMonitors() { try { const editSyncPromise = await syntheticsMonitorClient.editMonitors( - monitorsToUpdate.map(({ normalizedMonitor, previousMonitor }) => ({ - monitor: { - ...(normalizedMonitor as MonitorFields), - [ConfigKey.CONFIG_ID]: previousMonitor.id, - [ConfigKey.MONITOR_QUERY_ID]: - normalizedMonitor[ConfigKey.CUSTOM_HEARTBEAT_ID] || previousMonitor.id, - }, - id: previousMonitor.id, - previousMonitor, - })), + monitorsToUpdate.map( + ({ normalizedMonitor, previousMonitor, decryptedPreviousMonitor }) => ({ + monitor: { + ...(normalizedMonitor as MonitorFields), + [ConfigKey.CONFIG_ID]: previousMonitor.id, + [ConfigKey.MONITOR_QUERY_ID]: + normalizedMonitor[ConfigKey.CUSTOM_HEARTBEAT_ID] || previousMonitor.id, + }, + id: previousMonitor.id, + previousMonitor, + decryptedPreviousMonitor, + }) + ), request, savedObjectsClient, privateLocations, diff --git a/x-pack/plugins/synthetics/server/routes/monitor_cruds/edit_monitor.ts b/x-pack/plugins/synthetics/server/routes/monitor_cruds/edit_monitor.ts index 46434d41523b24..fb20ca8c82de57 100644 --- a/x-pack/plugins/synthetics/server/routes/monitor_cruds/edit_monitor.ts +++ b/x-pack/plugins/synthetics/server/routes/monitor_cruds/edit_monitor.ts @@ -162,7 +162,14 @@ export const syncEditedMonitor = async ({ const allPrivateLocations = await getSyntheticsPrivateLocations(savedObjectsClient); const editSyncPromise = syntheticsMonitorClient.editMonitors( - [{ monitor: monitorWithId as MonitorFields, id: previousMonitor.id, previousMonitor }], + [ + { + monitor: monitorWithId as MonitorFields, + id: previousMonitor.id, + previousMonitor, + decryptedPreviousMonitor, + }, + ], request, savedObjectsClient, allPrivateLocations, diff --git a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.test.ts b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.test.ts index e56b2fd9f839ad..1a59bb3be7c3a8 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.test.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.test.ts @@ -97,8 +97,13 @@ describe('SyntheticsMonitorClient', () => { id: '7af7e2f0-d5dc-11ec-87ac-bdfdb894c53d', fields: { config_id: '7af7e2f0-d5dc-11ec-87ac-bdfdb894c53d' }, fields_under_root: true, + secrets: '{}', } as unknown as MonitorFields; + const previousMonitor: any = { + attributes: { ...monitor }, + }; + it('should add a monitor', async () => { locations[1].isServiceManaged = false; @@ -125,11 +130,44 @@ describe('SyntheticsMonitorClient', () => { const client = new SyntheticsMonitorClient(syntheticsService, serverMock); client.privateLocationAPI.editMonitors = jest.fn(); + await client.editMonitors( + [ + { + id, + monitor, + previousMonitor, + decryptedPreviousMonitor: previousMonitor, + }, + ], + mockRequest, + savedObjectsClientMock, + privateLocations, + 'test-space' + ); + + expect(syntheticsService.editConfig).toHaveBeenCalledTimes(1); + expect(client.privateLocationAPI.editMonitors).toHaveBeenCalledTimes(1); + }); + + it('deletes a monitor from location, if location is removed from monitor', async () => { + locations[1].isServiceManaged = false; + + const id = 'test-id-1'; + const client = new SyntheticsMonitorClient(syntheticsService, serverMock); + syntheticsService.editConfig = jest.fn(); + client.privateLocationAPI.editMonitors = jest.fn(); + + monitor.locations = previousMonitor.attributes.locations.filter( + (loc: any) => loc.id !== locations[0].id + ); + await client.editMonitors( [ { monitor, id, + previousMonitor, + decryptedPreviousMonitor: previousMonitor, }, ], mockRequest, @@ -139,6 +177,8 @@ describe('SyntheticsMonitorClient', () => { ); expect(syntheticsService.editConfig).toHaveBeenCalledTimes(1); + expect(syntheticsService.editConfig).toHaveBeenCalledWith(deletePayload); + expect(syntheticsService.deleteConfigs).toHaveBeenCalledTimes(1); expect(client.privateLocationAPI.editMonitors).toHaveBeenCalledTimes(1); }); @@ -147,6 +187,7 @@ describe('SyntheticsMonitorClient', () => { const client = new SyntheticsMonitorClient(syntheticsService, serverMock); client.privateLocationAPI.deleteMonitors = jest.fn(); + syntheticsService.deleteConfigs = jest.fn(); await client.deleteMonitors( [monitor as unknown as SyntheticsMonitorWithId], @@ -159,3 +200,45 @@ describe('SyntheticsMonitorClient', () => { expect(client.privateLocationAPI.deleteMonitors).toHaveBeenCalledTimes(1); }); }); + +const deletePayload = [ + { + enabled: true, + fields: { + config_id: 'test-id-1', + 'monitor.project.id': undefined, + 'monitor.project.name': undefined, + run_once: undefined, + test_run_id: undefined, + }, + fields_under_root: true, + id: '7af7e2f0-d5dc-11ec-87ac-bdfdb894c53d', + locations: [ + { + geo: { lat: 0, lon: 0 }, + id: 'loc-1', + isServiceManaged: false, + label: 'Location 1', + status: 'ga', + url: 'https://example.com/1', + }, + { + geo: { lat: 0, lon: 0 }, + id: 'loc-2', + isServiceManaged: true, + label: 'Location 2', + status: 'ga', + url: 'https://example.com/2', + }, + ], + max_redirects: '0', + name: 'my mon', + params: '', + password: '', + proxy_url: '', + schedule: { number: '3', unit: 'm' }, + secrets: '{}', + type: 'http', + urls: 'http://google.com', + }, +]; diff --git a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.ts b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.ts index 490354cc15bf62..31be90c6d78270 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.ts @@ -24,6 +24,7 @@ import { PrivateLocation, EncryptedSyntheticsMonitor, SyntheticsMonitorWithSecrets, + MonitorServiceLocation, } from '../../../common/runtime_types'; import { syntheticsMonitorType } from '../../legacy_uptime/lib/saved_objects/synthetics_monitor'; @@ -93,7 +94,8 @@ export class SyntheticsMonitorClient { monitors: Array<{ monitor: MonitorFields; id: string; - previousMonitor?: SavedObject; + previousMonitor: SavedObject; + decryptedPreviousMonitor: SavedObject; }>, request: KibanaRequest, savedObjectsClient: SavedObjectsClientContract, @@ -102,6 +104,7 @@ export class SyntheticsMonitorClient { ) { const privateConfigs: HeartbeatConfig[] = []; const publicConfigs: HeartbeatConfig[] = []; + const deletedPublicConfigs: HeartbeatConfig[] = []; const paramsBySpace = await this.syntheticsService.getSyntheticsParams({ spaceId }); @@ -117,6 +120,15 @@ export class SyntheticsMonitorClient { publicConfigs.push(editedConfig); } + const deletedPublicConfig = this.hasDeletedPublicLocations( + publicLocations, + editedMonitor.decryptedPreviousMonitor + ); + + if (deletedPublicConfig) { + deletedPublicConfigs.push(deletedPublicConfig); + } + if (privateLocations.length > 0 || this.hasPrivateLocations(editedMonitor.previousMonitor)) { privateConfigs.push(editedConfig); } @@ -130,6 +142,10 @@ export class SyntheticsMonitorClient { spaceId ); + if (deletedPublicConfigs.length > 0) { + await this.syntheticsService.deleteConfigs(deletedPublicConfigs); + } + if (publicConfigs.length > 0) { return await this.syntheticsService.editConfig(publicConfigs); } @@ -155,15 +171,36 @@ export class SyntheticsMonitorClient { return pubicResponse; } - hasPrivateLocations(previousMonitor?: SavedObject) { - if (!previousMonitor) { - return false; - } + hasPrivateLocations(previousMonitor: SavedObject) { const { locations } = previousMonitor.attributes; return locations.some((loc) => !loc.isServiceManaged); } + hasDeletedPublicLocations( + updatedLocations: MonitorServiceLocation[], + decryptedPreviousMonitor: SavedObject + ) { + const { locations } = decryptedPreviousMonitor.attributes; + + const prevPublicLocations = locations.filter((loc) => loc.isServiceManaged); + + const missingPublicLocations = prevPublicLocations.filter((prevLoc) => { + return !updatedLocations.some((updatedLoc) => updatedLoc.id === prevLoc.id); + }); + if (missingPublicLocations.length > 0) { + const { attributes: normalizedPreviousMonitor } = normalizeSecrets(decryptedPreviousMonitor); + normalizedPreviousMonitor.locations = missingPublicLocations; + + return formatHeartbeatRequest({ + monitor: normalizedPreviousMonitor, + monitorId: normalizedPreviousMonitor.id, + heartbeatId: (normalizedPreviousMonitor as MonitorFields)[ConfigKey.MONITOR_QUERY_ID], + params: {}, + }); + } + } + parseLocations(config: HeartbeatConfig) { const { locations } = config; From 8e6f155e0c64246538f0ea2ffbe720b85148c6c2 Mon Sep 17 00:00:00 2001 From: Spencer Date: Thu, 5 Jan 2023 11:41:28 -0600 Subject: [PATCH 30/36] support disabling kibana build download in functional/common.sh (#148461) We need to disable downloading the Kibana build for steps which don't need it, especially in builds which skip building Kibana completely --- .buildkite/pipelines/fleet/packages_daily.yml | 2 ++ .../scripts/download_build_artifacts.sh | 32 ++++++++++--------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.buildkite/pipelines/fleet/packages_daily.yml b/.buildkite/pipelines/fleet/packages_daily.yml index e337617000a477..cecd88a948ddc4 100644 --- a/.buildkite/pipelines/fleet/packages_daily.yml +++ b/.buildkite/pipelines/fleet/packages_daily.yml @@ -14,6 +14,8 @@ steps: env: # ensure that the FTR logs all output for these tests DISABLE_CI_LOG_OUTPUT_CAPTURE: 'true' + # disable downloading a kibana build, this step does not use it + KIBANA_BUILD_ID: 'false' timeout_in_minutes: 90 - wait: ~ diff --git a/.buildkite/scripts/download_build_artifacts.sh b/.buildkite/scripts/download_build_artifacts.sh index 1e793346da33bd..1b52e82c2d66b7 100755 --- a/.buildkite/scripts/download_build_artifacts.sh +++ b/.buildkite/scripts/download_build_artifacts.sh @@ -4,25 +4,27 @@ set -euo pipefail source "$(dirname "$0")/common/util.sh" -if [[ ! -d "$KIBANA_BUILD_LOCATION/bin" ]]; then - echo '--- Downloading Distribution and Plugin artifacts' +if [[ "${KIBANA_BUILD_ID:-}" != "false" ]]; then + if [[ ! -d "$KIBANA_BUILD_LOCATION/bin" ]]; then + echo '--- Downloading Distribution and Plugin artifacts' - cd "$WORKSPACE" + cd "$WORKSPACE" - download_artifact kibana-default.tar.gz . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}" - download_artifact kibana-default-plugins.tar.gz . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}" + download_artifact kibana-default.tar.gz . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}" + download_artifact kibana-default-plugins.tar.gz . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}" - mkdir -p "$KIBANA_BUILD_LOCATION" - tar -xzf kibana-default.tar.gz -C "$KIBANA_BUILD_LOCATION" --strip=1 + mkdir -p "$KIBANA_BUILD_LOCATION" + tar -xzf kibana-default.tar.gz -C "$KIBANA_BUILD_LOCATION" --strip=1 - if is_pr_with_label "ci:build-example-plugins"; then - # Testing against an example plugin distribution is not supported, - # mostly due to snapshot failures when testing UI element lists - rm -rf "$KIBANA_BUILD_LOCATION/plugins" - mkdir "$KIBANA_BUILD_LOCATION/plugins" - fi + if is_pr_with_label "ci:build-example-plugins"; then + # Testing against an example plugin distribution is not supported, + # mostly due to snapshot failures when testing UI element lists + rm -rf "$KIBANA_BUILD_LOCATION/plugins" + mkdir "$KIBANA_BUILD_LOCATION/plugins" + fi - cd "$KIBANA_DIR" + cd "$KIBANA_DIR" - tar -xzf ../kibana-default-plugins.tar.gz + tar -xzf ../kibana-default-plugins.tar.gz + fi fi From 81bb8ac3c06ddd75bdec1868156bdecca4557028 Mon Sep 17 00:00:00 2001 From: Shahzad Date: Thu, 5 Jan 2023 18:41:50 +0100 Subject: [PATCH 31/36] [Synthetics] Fix breadcrumbs navigation for monitor (#148384) Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Fixes https://github.com/elastic/kibana/issues/148031 --- .../common/links/step_details_link.tsx | 38 +++++++++++++++++++ .../common/links/test_details_link.tsx | 30 +++++++++++++-- .../browser_steps_list.tsx | 26 +++---------- .../monitor_details_portal.tsx | 25 ++++++++---- .../monitor_summary/test_runs_table.tsx | 13 ++++++- .../hooks/use_test_run_details_breadcrumbs.ts | 5 ++- .../translations/translations/fr-FR.json | 1 - .../translations/translations/ja-JP.json | 1 - .../translations/translations/zh-CN.json | 1 - 9 files changed, 102 insertions(+), 38 deletions(-) create mode 100644 x-pack/plugins/synthetics/public/apps/synthetics/components/common/links/step_details_link.tsx diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/links/step_details_link.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/links/step_details_link.tsx new file mode 100644 index 00000000000000..078e9d924fbbe6 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/links/step_details_link.tsx @@ -0,0 +1,38 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiButtonIcon } from '@elastic/eui'; +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { useSelectedLocation } from '../../monitor_details/hooks/use_selected_location'; +import { useSyntheticsSettingsContext } from '../../../contexts'; + +export const StepDetailsLinkIcon = ({ + stepIndex, + checkGroup, +}: { + checkGroup: string; + stepIndex?: number; +}) => { + const { basePath } = useSyntheticsSettingsContext(); + const selectedLocation = useSelectedLocation(); + + return ( + + ); +}; + +const VIEW_DETAILS = i18n.translate('xpack.synthetics.monitor.step.viewStepDetails', { + defaultMessage: 'View step details', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/links/test_details_link.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/links/test_details_link.tsx index be3a5d7b01c997..2516018f7f139e 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/links/test_details_link.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/links/test_details_link.tsx @@ -7,6 +7,7 @@ import React from 'react'; import { EuiLink, EuiText, useEuiTheme } from '@elastic/eui'; +import { useSelectedLocation } from '../../monitor_details/hooks/use_selected_location'; import { Ping } from '../../../../../../common/runtime_types'; import { useSyntheticsSettingsContext } from '../../../contexts'; import { useKibanaDateFormat } from '../../../../../hooks/use_kibana_date_format'; @@ -23,6 +24,7 @@ export const TestDetailsLink = ({ }) => { const { euiTheme } = useEuiTheme(); const { basePath } = useSyntheticsSettingsContext(); + const selectedLocation = useSelectedLocation(); const format = useKibanaDateFormat(); const timestampText = ( @@ -33,9 +35,12 @@ export const TestDetailsLink = ({ return isBrowserMonitor ? ( {timestampText} @@ -43,3 +48,22 @@ export const TestDetailsLink = ({ timestampText ); }; + +export const getTestRunDetailLink = ({ + monitorId, + basePath, + checkGroup, + locationId, +}: { + monitorId: string; + checkGroup: string; + basePath?: string; + locationId?: string; +}) => { + const testRunUrl = `/monitor/${monitorId}/test-run/${checkGroup}?locationId=${locationId}`; + if (basePath) { + return `${basePath}/app/synthetics${testRunUrl}`; + } else { + return testRunUrl; + } +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/browser_steps_list.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/browser_steps_list.tsx index a241988cedc7a4..4c18e968ef2b3c 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/browser_steps_list.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/browser_steps_list.tsx @@ -7,17 +7,11 @@ import { i18n } from '@kbn/i18n'; import React, { CSSProperties } from 'react'; -import { - EuiBasicTable, - EuiBasicTableColumn, - EuiButtonIcon, - EuiText, - useEuiTheme, -} from '@elastic/eui'; +import { EuiBasicTable, EuiBasicTableColumn, EuiText, useEuiTheme } from '@elastic/eui'; import { EuiThemeComputed } from '@elastic/eui/src/services/theme/types'; +import { StepDetailsLinkIcon } from '../links/step_details_link'; import { JourneyStepScreenshotContainer } from '../screenshot/journey_step_screenshot_container'; -import { useSyntheticsSettingsContext } from '../../../contexts/synthetics_settings_context'; import { JourneyStep } from '../../../../../../common/runtime_types'; import { StatusBadge, parseBadgeStatus, getTextColorForMonitorStatus } from './status_badge'; @@ -46,8 +40,6 @@ export const BrowserStepsList = ({ const stepEnds: JourneyStep[] = steps.filter(isStepEnd); const stepLabels = stepEnds.map((stepEnd) => stepEnd?.synthetics?.step?.name ?? ''); - const { basePath } = useSyntheticsSettingsContext(); - const columns: Array> = [ ...(showStepNumber ? [ @@ -125,13 +117,9 @@ export const BrowserStepsList = ({ name: '', mobileOptions: { show: false }, render: (_val: string, item) => ( - ), }, @@ -201,7 +189,3 @@ const STEP_NAME = i18n.translate('xpack.synthetics.monitor.stepName.label', { const STEP_DURATION = i18n.translate('xpack.synthetics.monitor.step.duration.label', { defaultMessage: 'Duration', }); - -const VIEW_DETAILS = i18n.translate('xpack.synthetics.monitor.step.viewDetails', { - defaultMessage: 'View Details', -}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_details_portal.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_details_portal.tsx index 94ff55a5295bd4..13461fb3dcc5af 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_details_portal.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_details_portal.tsx @@ -9,26 +9,35 @@ import React from 'react'; import { useHistory } from 'react-router-dom'; import { EuiLink, EuiIcon } from '@elastic/eui'; import { InPortal } from 'react-reverse-portal'; +import { useSelectedLocation } from '../monitor_details/hooks/use_selected_location'; import { MonitorDetailsLinkPortalNode } from './portals'; -export const MonitorDetailsLinkPortal = ({ - name, - configId, -}: { +interface Props { name: string; configId: string; -}) => { + locationId?: string; +} + +export const MonitorDetailsLinkPortal = ({ name, configId, locationId }: Props) => { return ( - + ); }; -export const MonitorDetailsLink = ({ name, configId }: { name: string; configId: string }) => { +export const MonitorDetailsLink = ({ name, configId, locationId }: Props) => { + const selectedLocation = useSelectedLocation(); + + let locId = locationId; + + if (selectedLocation?.id && !locationId) { + locId = selectedLocation.id; + } + const history = useHistory(); const href = history.createHref({ - pathname: `monitor/${configId}`, + pathname: locId ? `monitor/${configId}?locationId=${locId}` : `monitor/${configId}`, }); return ( diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/test_runs_table.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/test_runs_table.tsx index 91bce9f49afa8a..10afca302befe5 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/test_runs_table.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/test_runs_table.tsx @@ -22,8 +22,9 @@ import { Criteria } from '@elastic/eui/src/components/basic_table/basic_table'; import { EuiTableSortingType } from '@elastic/eui/src/components/basic_table/table_types'; import { useHistory, useParams } from 'react-router-dom'; +import { useSelectedLocation } from '../hooks/use_selected_location'; import { MONITOR_TYPES } from '../../../../../../common/constants'; -import { TestDetailsLink } from '../../common/links/test_details_link'; +import { getTestRunDetailLink, TestDetailsLink } from '../../common/links/test_details_link'; import { ConfigKey, DataStream, Ping } from '../../../../../../common/runtime_types'; import { formatTestDuration } from '../../../utils/monitor_test_result/test_time_formats'; import { useSyntheticsSettingsContext } from '../../../contexts/synthetics_settings_context'; @@ -141,6 +142,8 @@ export const TestRunsTable = ({ paginable = true, from, to }: TestRunsTableProps }, ]; + const selectedLocation = useSelectedLocation(); + const getRowProps = (item: Ping) => { if (item.monitor.type !== MONITOR_TYPES.BROWSER) { return {}; @@ -156,7 +159,13 @@ export const TestRunsTable = ({ paginable = true, from, to }: TestRunsTableProps targetElem.tagName !== 'path' && !targetElem.parentElement?.classList.contains('euiLink') ) { - history.push(`/monitor/${monitorId}/test-run/${item.monitor.check_group}`); + history.push( + getTestRunDetailLink({ + monitorId, + checkGroup: item.monitor.check_group, + locationId: selectedLocation?.id, + }) + ); } }, }; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/test_run_details/hooks/use_test_run_details_breadcrumbs.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/test_run_details/hooks/use_test_run_details_breadcrumbs.ts index 7e16b8c190de8d..f3b80987b2227b 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/test_run_details/hooks/use_test_run_details_breadcrumbs.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/test_run_details/hooks/use_test_run_details_breadcrumbs.ts @@ -6,6 +6,7 @@ */ import { i18n } from '@kbn/i18n'; import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { useSelectedLocation } from '../../monitor_details/hooks/use_selected_location'; import { useSelectedMonitor } from '../../monitor_details/hooks/use_selected_monitor'; import { useBreadcrumbs } from '../../../hooks/use_breadcrumbs'; import { ConfigKey } from '../../../../../../common/runtime_types'; @@ -20,6 +21,8 @@ export const useTestRunDetailsBreadcrumbs = ( const { monitor } = useSelectedMonitor(); + const selectedLocation = useSelectedLocation(); + useBreadcrumbs([ { text: MONITOR_MANAGEMENT_CRUMB, @@ -30,7 +33,7 @@ export const useTestRunDetailsBreadcrumbs = ( href: `${appPath}${MONITOR_ROUTE.replace( ':monitorId', monitor?.[ConfigKey.CONFIG_ID] ?? '' - )}`, + )}?locationId=${selectedLocation?.id ?? ''}`, }, ...(extraCrumbs ?? []), ]); diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 40b8dcd9b6f7db..7bf9ccfab6f4ba 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -33586,7 +33586,6 @@ "xpack.synthetics.monitor.step.screenshot.notAvailable": "La capture d'écran de l'étape n'est pas disponible.", "xpack.synthetics.monitor.step.screenshot.unAvailable": "Image indisponible", "xpack.synthetics.monitor.step.thumbnail.alt": "Version plus grande de la capture d'écran de la miniature de l'étape du parcours.", - "xpack.synthetics.monitor.step.viewDetails": "Afficher les détails", "xpack.synthetics.monitor.stepName.label": "Nom de l'étape", "xpack.synthetics.monitorCharts.durationChart.wrapper.label": "Graphique affichant la durée de ping du moniteur, avec regroupement par emplacement.", "xpack.synthetics.monitorCharts.monitorDuration.titleLabel": "Durée du moniteur", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 09d95547cee96d..e0a39a69f96b15 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -33558,7 +33558,6 @@ "xpack.synthetics.monitor.step.screenshot.notAvailable": "ステップスクリーンショットがありません。", "xpack.synthetics.monitor.step.screenshot.unAvailable": "画像がありません", "xpack.synthetics.monitor.step.thumbnail.alt": "このステップのサムネイルのスクリーンショットの大きいバージョン。", - "xpack.synthetics.monitor.step.viewDetails": "詳細を表示", "xpack.synthetics.monitor.stepName.label": "ステップ名", "xpack.synthetics.monitorCharts.durationChart.wrapper.label": "場所でグループ化された、モニターのping期間を示すグラフ。", "xpack.synthetics.monitorCharts.monitorDuration.titleLabel": "監視期間", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 6f62334d0d4539..8f46c93a782f8f 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -33592,7 +33592,6 @@ "xpack.synthetics.monitor.step.screenshot.notAvailable": "步骤屏幕截图不可用。", "xpack.synthetics.monitor.step.screenshot.unAvailable": "图像不可用", "xpack.synthetics.monitor.step.thumbnail.alt": "此过程步骤的缩略图屏幕截图较大版本。", - "xpack.synthetics.monitor.step.viewDetails": "查看详情", "xpack.synthetics.monitor.stepName.label": "步骤名称", "xpack.synthetics.monitorCharts.durationChart.wrapper.label": "显示监测的 ping 持续时间(按位置分组)的图表。", "xpack.synthetics.monitorCharts.monitorDuration.titleLabel": "监测持续时间", From 2a7ebcfc651fb552f502f0c7a0395799d7023397 Mon Sep 17 00:00:00 2001 From: Jeramy Soucy Date: Thu, 5 Jan 2023 13:29:08 -0500 Subject: [PATCH 32/36] Fixes Spaces loading spinner alignment (#148424) Resolves #147993 Adds vertical alignment to the EuiLoadingSpinner in the Spaces navigation popover button. Previous render: Screen Shot 2023-01-04 at 6 23 27 PM New render: Screen Shot 2023-01-04 at 6 25 04 PM Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../__snapshots__/nav_control_popover.test.tsx.snap | 1 + .../spaces/public/nav_control/nav_control_popover.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap b/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap index 38a36d5b3657b8..ea194bafa3d3c6 100644 --- a/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap +++ b/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap @@ -15,6 +15,7 @@ exports[`NavControlPopover renders without crashing 1`] = ` title="loading spaces navigation" >

{ }); } + private getAlignedLoadingSpinner() { + return ; + } + private getActiveSpaceButton = () => { const { activeSpace } = this.state; if (!activeSpace) { - return this.getButton(, 'loading spaces navigation'); + return this.getButton(this.getAlignedLoadingSpinner(), 'loading spaces navigation'); } return this.getButton( - }> + , (activeSpace as Space).name From 1037f3669edb930c4ca27a1891adc2a36bf265c7 Mon Sep 17 00:00:00 2001 From: Jeramy Soucy Date: Thu, 5 Jan 2023 13:29:39 -0500 Subject: [PATCH 33/36] =?UTF-8?q?Upgrade=20json5=20dependency=20(2.2.1=20?= =?UTF-8?q?=E2=86=92=202.2.3)=20(#148326)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upgrade json5 production dependency (2.2.1 → 2.2.3). Upgrade json5 dev dependency (1.0.1 → 1.0.2) Also upgrades production dependency types/json5 to 2.2.0. Change log (json5): https://github.com/json5/json5/blob/main/CHANGELOG.md#v223-code-diff cc https://github.com/orgs/elastic/teams/kibana-security Co-authored-by: Thomas Watson --- package.json | 4 ++-- yarn.lock | 28 +++++++++++++++------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 300f60c1d06138..2d5d3a2d3217e5 100644 --- a/package.json +++ b/package.json @@ -898,7 +898,7 @@ "@types/jsdom": "^16.2.14", "@types/json-schema": "^7", "@types/json-stable-stringify": "^1.0.32", - "@types/json5": "^0.0.30", + "@types/json5": "^2.2.0", "@types/jsonwebtoken": "^8.5.6", "@types/license-checker": "15.0.0", "@types/listr": "^0.14.0", @@ -1089,7 +1089,7 @@ "jest-styled-components": "7.0.3", "jsdom": "^16.4.0", "json-schema-typed": "^8.0.1", - "json5": "^1.0.1", + "json5": "^2.2.3", "jsondiffpatch": "0.4.1", "license-checker": "^25.0.1", "listr": "^0.14.1", diff --git a/yarn.lock b/yarn.lock index 51daf4a0a7998a..ce59fd2d8cb0a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7112,12 +7112,14 @@ "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" - integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/json5@^0.0.30": - version "0.0.30" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.30.tgz#44cb52f32a809734ca562e685c6473b5754a7818" - integrity sha512-sqm9g7mHlPY/43fcSNrCYfOeX9zkTTK+euO5E6+CVijSMm5tTjkVdwdqRkY3ljjIAf8679vps5jKUoJBCLsMDA== +"@types/json5@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-2.2.0.tgz#afff29abf9182a7d4a7e39105ca051f11c603d13" + integrity sha512-NrVug5woqbvNZ0WX+Gv4R+L4TGddtmFek2u8RtccAgFZWtS9QXF2xCXY22/M4nzkaKF0q9Fc6M/5rxLDhfwc/A== + dependencies: + json5 "*" "@types/jsonwebtoken@^8.5.6": version "8.5.6" @@ -18223,18 +18225,18 @@ json-stringify-safe@5.0.1, json-stringify-safe@^5.0.1, json-stringify-safe@~5.0. resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= +json5@*, json5@^2.1.2, json5@^2.1.3, json5@^2.2.1, json5@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + version "1.0.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== dependencies: minimist "^1.2.0" -json5@^2.1.2, json5@^2.1.3, json5@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" - integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== - jsondiffpatch@0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/jsondiffpatch/-/jsondiffpatch-0.4.1.tgz#9fb085036767f03534ebd46dcd841df6070c5773" From dcb020cc63cff8b37ba6695f57c4b94d004233b9 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Thu, 5 Jan 2023 12:45:34 -0600 Subject: [PATCH 34/36] [kbn/es] Add dev docs for snapshot promotion pipeline (#148350) There was recent discussion on tracking down a possible ES regression, and the best way to find the snapshot build schedule. This updates our dev docs to include links to the snapshot update pipelines. --- packages/kbn-es/README.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/kbn-es/README.mdx b/packages/kbn-es/README.mdx index a5392504490fec..d65171641613ef 100644 --- a/packages/kbn-es/README.mdx +++ b/packages/kbn-es/README.mdx @@ -70,6 +70,16 @@ Type: `String` Location where snapshots are cached +## Snapshot Updates + +Snapshots are built and tested daily. If tests pass, the snapshot is promoted and will automatically be used when started from the CLI. + +CI pipelines supporting this can be found at: + +- https://buildkite.com/elastic/kibana-elasticsearch-snapshot-build +- https://buildkite.com/elastic/kibana-elasticsearch-snapshot-verify +- https://buildkite.com/elastic/kibana-elasticsearch-snapshot-promote + ## Snapshot Pinning Sometimes we need to pin snapshots for a specific version. We'd really like to get this automated, but until that is completed here are the steps to take to build, upload, and switch to pinned snapshots for a branch. From ef466343ff71be511dfaf5f7841bdf246a1cbd4b Mon Sep 17 00:00:00 2001 From: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com> Date: Thu, 5 Jan 2023 14:17:01 -0500 Subject: [PATCH 35/36] [ResponseOps] Opsgenie fix flaky execute button test (#148467) Fixes: https://github.com/elastic/kibana/issues/147509 This PR tries to fix a flaky test where the execute button is enable when it should not. Flaky test run passed: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1707 --- .../apps/triggers_actions_ui/connectors/opsgenie.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/opsgenie.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/opsgenie.ts index e88c776f498c69..27cd136cb40c71 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/opsgenie.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/opsgenie.ts @@ -138,7 +138,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await find.clickByCssSelector('[data-test-subj="testConnectorTab"]'); - expect(await (await testSubjects.find('executeActionButton')).isEnabled()).to.be(false); + expect(await testSubjects.isEnabled('executeActionButton')).to.be(false); }); describe('test page', () => { From f2a224adc3fce1fd8f555350c6040ace3ac89e25 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 5 Jan 2023 13:24:51 -0700 Subject: [PATCH 36/36] Update dependency core-js to ^3.27.1 (main) (#148478) 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 | |---|---|---|---|---|---| | [core-js](https://togithub.com/zloirock/core-js) | [`^3.27.0` -> `^3.27.1`](https://renovatebot.com/diffs/npm/core-js/3.27.1/3.27.1) | [![age](https://badges.renovateapi.com/packages/npm/core-js/3.27.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/core-js/3.27.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/core-js/3.27.1/compatibility-slim/3.27.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/core-js/3.27.1/confidence-slim/3.27.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### 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 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2d5d3a2d3217e5..8d1f1b053962dc 100644 --- a/package.json +++ b/package.json @@ -496,7 +496,7 @@ "compare-versions": "3.5.1", "constate": "^3.3.2", "copy-to-clipboard": "^3.0.8", - "core-js": "^3.27.0", + "core-js": "^3.27.1", "cronstrue": "^1.51.0", "cuid": "^2.1.8", "cytoscape": "^3.10.0", diff --git a/yarn.lock b/yarn.lock index ce59fd2d8cb0a6..25cb67c35bfeeb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11237,7 +11237,7 @@ core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.9: resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== -core-js@^3.0.4, core-js@^3.27.0, core-js@^3.6.5, core-js@^3.8.2, core-js@^3.8.3: +core-js@^3.0.4, core-js@^3.27.1, core-js@^3.6.5, core-js@^3.8.2, core-js@^3.8.3: version "3.27.1" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.27.1.tgz#23cc909b315a6bb4e418bf40a52758af2103ba46" integrity sha512-GutwJLBChfGCpwwhbYoqfv03LAfmiz7e7D/BNxzeMxwQf10GRSzqiOjx7AmtEk+heiD/JWmBuyBPgFtx0Sg1ww==