diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 2bab1ac914cb6..ae2da899d7324 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2022-10-10 +date: 2022-10-12 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 10139c992c0d1..2214c53ef43b5 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2022-10-10 +date: 2022-10-12 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 f9ea9de800a28..374f9730f1866 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 01684374e77bf..65077b33e5e3a 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.devdocs.json b/api_docs/apm.devdocs.json index ddbf9d8c9e22b..017ae6a510700 100644 --- a/api_docs/apm.devdocs.json +++ b/api_docs/apm.devdocs.json @@ -753,7 +753,7 @@ "label": "APIEndpoint", "description": [], "signature": [ - "\"POST /internal/apm/data_view/static\" | \"GET /internal/apm/data_view/title\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name\" | \"POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions\" | \"POST /internal/apm/latency/overall_distribution/transactions\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/dependency\" | \"GET /internal/apm/services/{serviceName}/serviceNodes\" | \"GET /internal/apm/services\" | \"POST /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search\" | \"POST /api/apm/services/{serviceName}/annotation\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/anomaly_charts\" | \"GET /internal/apm/sorted_and_filtered_services\" | \"GET /internal/apm/service-groups\" | \"GET /internal/apm/service-group\" | \"POST /internal/apm/service-group\" | \"DELETE /internal/apm/service-group\" | \"GET /internal/apm/service-group/services\" | \"GET /internal/apm/service_groups/services_count\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/traces/find\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name\" | \"GET /internal/apm/alerts/chart_preview/transaction_error_rate\" | \"GET /internal/apm/alerts/chart_preview/transaction_duration\" | \"GET /internal/apm/alerts/chart_preview/transaction_error_count\" | \"GET /api/apm/settings/agent-configuration\" | \"GET /api/apm/settings/agent-configuration/view\" | \"DELETE /api/apm/settings/agent-configuration\" | \"PUT /api/apm/settings/agent-configuration\" | \"POST /api/apm/settings/agent-configuration/search\" | \"GET /api/apm/settings/agent-configuration/environments\" | \"GET /api/apm/settings/agent-configuration/agent_name\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"POST /internal/apm/settings/anomaly-detection/update_to_v3\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps\" | \"POST /api/apm/sourcemaps\" | \"DELETE /api/apm/sourcemaps/{id}\" | \"GET /internal/apm/fleet/has_apm_policies\" | \"GET /internal/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/fleet/java_agent_versions\" | \"GET /internal/apm/dependencies/top_dependencies\" | \"GET /internal/apm/dependencies/upstream_services\" | \"GET /internal/apm/dependencies/metadata\" | \"GET /internal/apm/dependencies/charts/latency\" | \"GET /internal/apm/dependencies/charts/throughput\" | \"GET /internal/apm/dependencies/charts/error_rate\" | \"GET /internal/apm/dependencies/operations\" | \"GET /internal/apm/dependencies/charts/distribution\" | \"GET /internal/apm/dependencies/operations/spans\" | \"GET /internal/apm/correlations/field_candidates/transactions\" | \"POST /internal/apm/correlations/field_stats/transactions\" | \"GET /internal/apm/correlations/field_value_stats/transactions\" | \"POST /internal/apm/correlations/field_value_pairs/transactions\" | \"POST /internal/apm/correlations/significant_correlations/transactions\" | \"POST /internal/apm/correlations/p_values/transactions\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /internal/apm/event_metadata/{processorEvent}/{id}\" | \"GET /internal/apm/agent_keys\" | \"GET /internal/apm/agent_keys/privileges\" | \"POST /internal/apm/api_key/invalidate\" | \"POST /api/apm/agent_keys\" | \"GET /internal/apm/storage_explorer\" | \"GET /internal/apm/services/{serviceName}/storage_details\" | \"GET /internal/apm/storage_chart\" | \"GET /internal/apm/storage_explorer/privileges\" | \"GET /internal/apm/storage_explorer_summary_stats\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/parents\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/children\" | \"GET /internal/apm/services/{serviceName}/infrastructure_attributes\" | \"GET /internal/apm/debug-telemetry\" | \"GET /internal/apm/time_range_metadata\" | \"GET /internal/apm/settings/labs\"" + "\"POST /internal/apm/data_view/static\" | \"GET /internal/apm/data_view/title\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name\" | \"POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions\" | \"POST /internal/apm/latency/overall_distribution/transactions\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/nodes\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/dependency\" | \"GET /internal/apm/services\" | \"POST /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search\" | \"POST /api/apm/services/{serviceName}/annotation\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/anomaly_charts\" | \"GET /internal/apm/sorted_and_filtered_services\" | \"GET /internal/apm/service-groups\" | \"GET /internal/apm/service-group\" | \"POST /internal/apm/service-group\" | \"DELETE /internal/apm/service-group\" | \"GET /internal/apm/service-group/services\" | \"GET /internal/apm/service_groups/services_count\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/traces/find\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name\" | \"GET /internal/apm/alerts/chart_preview/transaction_error_rate\" | \"GET /internal/apm/alerts/chart_preview/transaction_duration\" | \"GET /internal/apm/alerts/chart_preview/transaction_error_count\" | \"GET /api/apm/settings/agent-configuration\" | \"GET /api/apm/settings/agent-configuration/view\" | \"DELETE /api/apm/settings/agent-configuration\" | \"PUT /api/apm/settings/agent-configuration\" | \"POST /api/apm/settings/agent-configuration/search\" | \"GET /api/apm/settings/agent-configuration/environments\" | \"GET /api/apm/settings/agent-configuration/agent_name\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"POST /internal/apm/settings/anomaly-detection/update_to_v3\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps\" | \"POST /api/apm/sourcemaps\" | \"DELETE /api/apm/sourcemaps/{id}\" | \"GET /internal/apm/fleet/has_apm_policies\" | \"GET /internal/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/fleet/java_agent_versions\" | \"GET /internal/apm/dependencies/top_dependencies\" | \"GET /internal/apm/dependencies/upstream_services\" | \"GET /internal/apm/dependencies/metadata\" | \"GET /internal/apm/dependencies/charts/latency\" | \"GET /internal/apm/dependencies/charts/throughput\" | \"GET /internal/apm/dependencies/charts/error_rate\" | \"GET /internal/apm/dependencies/operations\" | \"GET /internal/apm/dependencies/charts/distribution\" | \"GET /internal/apm/dependencies/operations/spans\" | \"GET /internal/apm/correlations/field_candidates/transactions\" | \"POST /internal/apm/correlations/field_stats/transactions\" | \"GET /internal/apm/correlations/field_value_stats/transactions\" | \"POST /internal/apm/correlations/field_value_pairs/transactions\" | \"POST /internal/apm/correlations/significant_correlations/transactions\" | \"POST /internal/apm/correlations/p_values/transactions\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /internal/apm/event_metadata/{processorEvent}/{id}\" | \"GET /internal/apm/agent_keys\" | \"GET /internal/apm/agent_keys/privileges\" | \"POST /internal/apm/api_key/invalidate\" | \"POST /api/apm/agent_keys\" | \"GET /internal/apm/storage_explorer\" | \"GET /internal/apm/services/{serviceName}/storage_details\" | \"GET /internal/apm/storage_chart\" | \"GET /internal/apm/storage_explorer/privileges\" | \"GET /internal/apm/storage_explorer_summary_stats\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/parents\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/children\" | \"GET /internal/apm/services/{serviceName}/infrastructure_attributes\" | \"GET /internal/apm/debug-telemetry\" | \"GET /internal/apm/time_range_metadata\" | \"GET /internal/apm/settings/labs\"" ], "path": "x-pack/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts", "deprecated": false, @@ -4801,50 +4801,6 @@ "ServiceHealthStatus", "; }>; }, ", "APMRouteCreateOptions", - ">; \"GET /internal/apm/services/{serviceName}/serviceNodes\": ", - "ServerRoute", - "<\"GET /internal/apm/services/{serviceName}/serviceNodes\", ", - "TypeC", - "<{ path: ", - "TypeC", - "<{ serviceName: ", - "StringC", - "; }>; query: ", - "IntersectionC", - "<[", - "TypeC", - "<{ kuery: ", - "StringC", - "; }>, ", - "TypeC", - "<{ start: ", - "Type", - "; end: ", - "Type", - "; }>, ", - "TypeC", - "<{ environment: ", - "UnionC", - "<[", - "LiteralC", - "<\"ENVIRONMENT_NOT_DEFINED\">, ", - "LiteralC", - "<\"ENVIRONMENT_ALL\">, ", - "BrandC", - "<", - "StringC", - ", ", - "NonEmptyStringBrand", - ">]>; }>]>; }>, ", - { - "pluginId": "apm", - "scope": "server", - "docId": "kibApmPluginApi", - "section": "def-server.APMRouteHandlerResources", - "text": "APMRouteHandlerResources" - }, - ", { serviceNodes: { name: string; cpu: number | null; heapMemory: number | null; hostName: string | null | undefined; nonHeapMemory: number | null; threadCount: number | null; }[]; }, ", - "APMRouteCreateOptions", ">; \"GET /internal/apm/service-map/dependency\": ", "ServerRoute", "<\"GET /internal/apm/service-map/dependency\", ", @@ -5029,6 +4985,50 @@ }, ", { serviceCount: number; transactionPerMinute: { value: undefined; timeseries: never[]; } | { value: number; timeseries: { x: number; y: number | null; }[]; }; }, ", "APMRouteCreateOptions", + ">; \"GET /internal/apm/services/{serviceName}/metrics/nodes\": ", + "ServerRoute", + "<\"GET /internal/apm/services/{serviceName}/metrics/nodes\", ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ serviceName: ", + "StringC", + "; }>; query: ", + "IntersectionC", + "<[", + "TypeC", + "<{ kuery: ", + "StringC", + "; }>, ", + "TypeC", + "<{ start: ", + "Type", + "; end: ", + "Type", + "; }>, ", + "TypeC", + "<{ environment: ", + "UnionC", + "<[", + "LiteralC", + "<\"ENVIRONMENT_NOT_DEFINED\">, ", + "LiteralC", + "<\"ENVIRONMENT_ALL\">, ", + "BrandC", + "<", + "StringC", + ", ", + "NonEmptyStringBrand", + ">]>; }>]>; }>, ", + { + "pluginId": "apm", + "scope": "server", + "docId": "kibApmPluginApi", + "section": "def-server.APMRouteHandlerResources", + "text": "APMRouteHandlerResources" + }, + ", { serviceNodes: { name: string; cpu: number | null; heapMemory: number | null; hostName: string | null | undefined; nonHeapMemory: number | null; threadCount: number | null; }[]; }, ", + "APMRouteCreateOptions", ">; \"GET /internal/apm/services/{serviceName}/metrics/charts\": ", "ServerRoute", "<\"GET /internal/apm/services/{serviceName}/metrics/charts\", ", diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index c30a0992fd7f4..770752cd16d5a 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2022-10-10 +date: 2022-10-12 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 66bd7c7e641e1..d7b4fe162a477 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2022-10-10 +date: 2022-10-12 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 e8065146fd3d3..0ecfeb7d2fc63 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2022-10-10 +date: 2022-10-12 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 a98cfd8e0fd77..65a9950091023 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2022-10-10 +date: 2022-10-12 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 99dd1bbe89355..12052afc583f6 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2022-10-10 +date: 2022-10-12 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 0d6e5deb4ebb4..3f9a8df369b63 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2022-10-10 +date: 2022-10-12 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 5ed1afbaec4d1..4e68642cc4422 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2022-10-10 +date: 2022-10-12 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 154ea7db58498..b1ac17664e2bc 100644 --- a/api_docs/cloud_chat.mdx +++ b/api_docs/cloud_chat.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudChat title: "cloudChat" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudChat plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudChat'] --- import cloudChatObj from './cloud_chat.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index 3f36edd65c5e7..ca09c607406e5 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2022-10-10 +date: 2022-10-12 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 299993c715eb8..d609c43291816 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2022-10-10 +date: 2022-10-12 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 61acddd4e8811..2faa65ed94492 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2022-10-10 +date: 2022-10-12 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 fd7bbc2f1dadf..7eedd3732f078 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/core.devdocs.json b/api_docs/core.devdocs.json index 197b485695674..df4c2daee6312 100644 --- a/api_docs/core.devdocs.json +++ b/api_docs/core.devdocs.json @@ -24612,6 +24612,31 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "core", + "id": "def-server.ElasticsearchClientConfig.maxIdleSockets", + "type": "number", + "tags": [], + "label": "maxIdleSockets", + "description": [], + "path": "node_modules/@types/kbn__core-elasticsearch-server/index.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "core", + "id": "def-server.ElasticsearchClientConfig.idleSocketTimeout", + "type": "Object", + "tags": [], + "label": "idleSocketTimeout", + "description": [], + "signature": [ + "moment.Duration" + ], + "path": "node_modules/@types/kbn__core-elasticsearch-server/index.d.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "core", "id": "def-server.ElasticsearchClientConfig.compression", @@ -27363,7 +27388,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -27373,8 +27400,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", @@ -32536,7 +32561,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -32546,8 +32573,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", @@ -33740,7 +33765,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -33750,8 +33777,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", @@ -38294,7 +38319,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -38304,8 +38331,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", @@ -50606,7 +50631,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -50616,8 +50643,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", diff --git a/api_docs/core.mdx b/api_docs/core.mdx index eaf05e52d4d5e..8bcfe3df2ace3 100644 --- a/api_docs/core.mdx +++ b/api_docs/core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/core title: "core" image: https://source.unsplash.com/400x175/?github description: API docs for the core plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core'] --- import coreObj from './core.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2689 | 0 | 23 | 0 | +| 2691 | 0 | 23 | 0 | ## Client diff --git a/api_docs/custom_integrations.devdocs.json b/api_docs/custom_integrations.devdocs.json index 44611a9497dfc..e7512ead801df 100644 --- a/api_docs/custom_integrations.devdocs.json +++ b/api_docs/custom_integrations.devdocs.json @@ -974,6 +974,48 @@ } ], "objects": [ + { + "parentPluginId": "customIntegrations", + "id": "def-common.FEATURED_INTEGRATIONS_BY_CATEGORY", + "type": "Object", + "tags": [], + "label": "FEATURED_INTEGRATIONS_BY_CATEGORY", + "description": [], + "path": "src/plugins/custom_integrations/common/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "customIntegrations", + "id": "def-common.FEATURED_INTEGRATIONS_BY_CATEGORY.security", + "type": "Array", + "tags": [], + "label": "security", + "description": [], + "signature": [ + "string[]" + ], + "path": "src/plugins/custom_integrations/common/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "customIntegrations", + "id": "def-common.FEATURED_INTEGRATIONS_BY_CATEGORY.", + "type": "Array", + "tags": [], + "label": "''", + "description": [], + "signature": [ + "string[]" + ], + "path": "src/plugins/custom_integrations/common/index.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "customIntegrations", "id": "def-common.INTEGRATION_CATEGORY_DISPLAY", diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 2638867b78d5f..dfae4a5fd9c1f 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Fleet](https://github.com/orgs/elastic/teams/fleet) for questions regar | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 104 | 0 | 85 | 1 | +| 107 | 0 | 88 | 1 | ## Client diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index 19197f8324fed..d8647bec8e5a9 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2022-10-10 +date: 2022-10-12 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 d313c049a619f..2dcd315395c9d 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.devdocs.json b/api_docs/data.devdocs.json index 33d5834e2191a..f2b4bf9e4a06d 100644 --- a/api_docs/data.devdocs.json +++ b/api_docs/data.devdocs.json @@ -2588,7 +2588,7 @@ "description": [], "signature": [ "PluginInitializerContext", - "; }>; sessions: Readonly<{} & { enabled: boolean; notTouchedTimeout: moment.Duration; maxUpdateRetries: number; defaultExpiration: moment.Duration; management: Readonly<{} & { refreshInterval: moment.Duration; maxSessions: number; refreshTimeout: moment.Duration; expiresSoonWarning: moment.Duration; }>; }>; }>; }>>" + "; }>; asyncSearch: Readonly<{} & { waitForCompletion: moment.Duration; keepAlive: moment.Duration; batchedReduceSize: number; }>; sessions: Readonly<{} & { enabled: boolean; notTouchedTimeout: moment.Duration; maxUpdateRetries: number; defaultExpiration: moment.Duration; management: Readonly<{} & { refreshInterval: moment.Duration; maxSessions: number; refreshTimeout: moment.Duration; expiresSoonWarning: moment.Duration; }>; }>; }>; }>>" ], "path": "src/plugins/data/public/plugin.ts", "deprecated": false, @@ -11780,7 +11780,7 @@ "section": "def-server.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; }>; sessions: Readonly<{} & { enabled: boolean; notTouchedTimeout: moment.Duration; maxUpdateRetries: number; defaultExpiration: moment.Duration; management: Readonly<{} & { refreshInterval: moment.Duration; maxSessions: number; refreshTimeout: moment.Duration; expiresSoonWarning: moment.Duration; }>; }>; }>; }>>" + "; }>; asyncSearch: Readonly<{} & { waitForCompletion: moment.Duration; keepAlive: moment.Duration; batchedReduceSize: number; }>; sessions: Readonly<{} & { enabled: boolean; notTouchedTimeout: moment.Duration; maxUpdateRetries: number; defaultExpiration: moment.Duration; management: Readonly<{} & { refreshInterval: moment.Duration; maxSessions: number; refreshTimeout: moment.Duration; expiresSoonWarning: moment.Duration; }>; }>; }>; }>>" ], "path": "src/plugins/data/server/plugin.ts", "deprecated": false, @@ -12048,3588 +12048,4490 @@ "parentPluginId": "data", "id": "def-server.DataView.title", "type": "string", - "tags": [], + "tags": [ + "deprecated" + ], "label": "title", "description": [ "\nTitle of data view" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.fieldFormatMap", - "type": "Object", - "tags": [], - "label": "fieldFormatMap", - "description": [ - "\nMap of field formats by field name" - ], - "signature": [ - "{ [x: string]: ", + "deprecated": true, + "trackAdoption": false, + "references": [ { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.SerializedFieldFormat", - "text": "SerializedFieldFormat" + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/container/source/index.tsx" }, - "<{}, ", - "SerializableRecord", - ">; }" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.typeMeta", - "type": "Object", - "tags": [], - "label": "typeMeta", - "description": [ - "\nOnly used by rollup indices, used by rollup specific endpoint to load field list." - ], - "signature": [ { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.TypeMeta", - "text": "TypeMeta" + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/container/source/index.tsx" }, - " | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.fields", - "type": "CompoundType", - "tags": [], - "label": "fields", - "description": [ - "\nField list, in extended array format" - ], - "signature": [ { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.IIndexPatternFieldList", - "text": "IIndexPatternFieldList" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" }, - " & { toSpec: () => ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewFieldMap", - "text": "DataViewFieldMap" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" }, - "; }" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.timeFieldName", - "type": "string", - "tags": [], - "label": "timeFieldName", - "description": [ - "\nTimestamp field name" - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.type", - "type": "string", - "tags": [], - "label": "type", - "description": [ - "\nType is used to identify rollup index patterns." - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.flattenHit", - "type": "Function", - "tags": [ - "deprecated" - ], - "label": "flattenHit", - "description": [], - "signature": [ - "(hit: Record, deep?: boolean | undefined) => Record" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": true, - "trackAdoption": false, - "references": [ { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/data_views/data_view.ts" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts" }, { - "plugin": "maps", - "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" }, { - "plugin": "maps", - "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" - } - ], - "returnComment": [], - "children": [ + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts" + }, { - "parentPluginId": "data", - "id": "def-server.DataView.flattenHit.$1", - "type": "Object", - "tags": [], - "label": "hit", - "description": [], - "signature": [ - "{ [x: string]: unknown[]; }" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataView.flattenHit.$2", - "type": "CompoundType", - "tags": [], - "label": "deep", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - } - ] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.metaFields", - "type": "Array", - "tags": [], - "label": "metaFields", - "description": [ - "\nList of meta fields by name" - ], - "signature": [ - "string[]" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.version", - "type": "string", - "tags": [], - "label": "version", - "description": [ - "\nSavedObject version" - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.sourceFilters", - "type": "Array", - "tags": [], - "label": "sourceFilters", - "description": [ - "\nArray of filters - hides fields in discover" - ], - "signature": [ + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/mock/index_pattern.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.SourceFilter", - "text": "SourceFilter" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/mock/index_pattern.ts" }, - "[] | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.namespaces", - "type": "Array", - "tags": [], - "label": "namespaces", - "description": [ - "\nArray of namespace ids" - ], - "signature": [ - "string[]" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.allowNoIndex", - "type": "boolean", - "tags": [], - "label": "allowNoIndex", - "description": [ - "\nPrevents errors when index pattern exists before indices" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.name", - "type": "string", - "tags": [], - "label": "name", - "description": [ - "\nName of the data view. Human readable name used to differentiate data view." - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.matchedIndices", - "type": "Array", - "tags": [], - "label": "matchedIndices", - "description": [], - "signature": [ - "string[]" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.Unnamed", - "type": "Function", - "tags": [], - "label": "Constructor", - "description": [ - "\nconstructor" - ], - "signature": [ - "any" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataView.Unnamed.$1", - "type": "Object", - "tags": [], - "label": "config", - "description": [ - "- config data and dependencies" - ], - "signature": [ - "DataViewDeps" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getName", - "type": "Function", - "tags": [], - "label": "getName", - "description": [ - "\nGet name of Data View" - ], - "signature": [ - "() => string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getOriginalSavedObjectBody", - "type": "Function", - "tags": [], - "label": "getOriginalSavedObjectBody", - "description": [ - "\nGet last saved saved object fields" - ], - "signature": [ - "() => { fieldAttrs?: string | undefined; title?: string | undefined; timeFieldName?: string | undefined; fields?: string | undefined; sourceFilters?: string | undefined; fieldFormatMap?: string | undefined; typeMeta?: string | undefined; type?: string | undefined; }" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.resetOriginalSavedObjectBody", - "type": "Function", - "tags": [], - "label": "resetOriginalSavedObjectBody", - "description": [ - "\nReset last saved saved object fields. Used after saving." - ], - "signature": [ - "() => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getFieldAttrs", - "type": "Function", - "tags": [], - "label": "getFieldAttrs", - "description": [ - "\nReturns field attributes map" - ], - "signature": [ - "() => { [x: string]: ", + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldAttrSet", - "text": "FieldAttrSet" + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, - "; }" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getComputedFields", - "type": "Function", - "tags": [], - "label": "getComputedFields", - "description": [ - "\nReturns scripted fields" - ], - "signature": [ - "() => { storedFields: string[]; scriptFields: Record; docvalueFields: { field: string; format: string; }[]; runtimeFields: ", - "MappingRuntimeFields", - "; }" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.isPersisted", - "type": "Function", - "tags": [], - "label": "isPersisted", - "description": [], - "signature": [ - "() => boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.toSpec", - "type": "Function", - "tags": [], - "label": "toSpec", - "description": [ - "\nCreates static representation of the data view." - ], - "signature": [ - "(includeFields?: boolean) => ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" - } - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, { - "parentPluginId": "data", - "id": "def-server.DataView.toSpec.$1", - "type": "boolean", - "tags": [], - "label": "includeFields", - "description": [ - "Whether or not to include the `fields` list as part of this spec. If not included, the list\nwill be fetched from Elasticsearch when instantiating a new Data View with this spec." - ], - "signature": [ - "boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getSourceFiltering", - "type": "Function", - "tags": [], - "label": "getSourceFiltering", - "description": [ - "\nGet the source filtering configuration for that index." - ], - "signature": [ - "() => { excludes: string[]; }" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.removeScriptedField", - "type": "Function", - "tags": [ - "deprecated" - ], - "label": "removeScriptedField", - "description": [ - "\nRemoves scripted field from field list." - ], - "signature": [ - "(fieldName: string) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": true, - "trackAdoption": false, - "references": [ - { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx" + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/field_editor/field_editor.tsx" + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/data_views/data_view.test.ts" - } - ], - "children": [ - { - "parentPluginId": "data", - "id": "def-server.DataView.removeScriptedField.$1", - "type": "string", - "tags": [], - "label": "fieldName", - "description": [ - "name of scripted field to remove" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getNonScriptedFields", - "type": "Function", - "tags": [ - "deprecated" - ], - "label": "getNonScriptedFields", - "description": [ - "\n" - ], - "signature": [ - "() => ", + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, - "[]" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": true, - "trackAdoption": false, - "references": [ { - "plugin": "visTypeTimeseries", - "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts" + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts" + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts" + "plugin": "threatIntelligence", + "path": "x-pack/plugins/threat_intelligence/public/common/mocks/mock_security_context.tsx" }, { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts" }, { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts" + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.ts" }, { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx" + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.ts" }, { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.ts" }, { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.ts" }, { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx" }, { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/data_views/data_view.test.ts" + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/autocomplete/providers/value_suggestion_provider.ts" }, { - "plugin": "visTypeTimeseries", - "path": "src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts" - } - ], - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getScriptedFields", - "type": "Function", - "tags": [ - "deprecated" - ], - "label": "getScriptedFields", - "description": [ - "\n" - ], - "signature": [ - "() => ", + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/query_string_input/fetch_index_patterns.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/dataview_picker/change_dataview.tsx" }, - "[]" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": true, - "trackAdoption": false, - "references": [ { "plugin": "dataViews", - "path": "src/plugins/data_views/common/data_views/data_view.ts" + "path": "src/plugins/data_views/server/rest_api_routes/update_data_view.ts" }, { "plugin": "dataViews", - "path": "src/plugins/data_views/common/data_views/data_view.ts" + "path": "src/plugins/data_views/server/rest_api_routes/update_data_view.ts" }, { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/data_views/data_views.ts" + "plugin": "triggersActionsUi", + "path": "x-pack/plugins/triggers_actions_ui/public/common/lib/data_apis.ts" }, { - "plugin": "dataViews", - "path": "src/plugins/data_views/server/register_index_pattern_usage_collection.ts" + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" }, { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx" + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" }, { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/data_views/data_view.test.ts" + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/public/services/field_stats/load_field_stats.ts" }, { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/data_views/data_view.test.ts" + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" }, { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/data_views/data_view.test.ts" + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" }, { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/data_views/data_view.test.ts" + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" }, { - "plugin": "dataViews", - "path": "src/plugins/data_views/common/data_views/data_view.test.ts" - } - ], - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.isTSDBMode", - "type": "Function", - "tags": [], - "label": "isTSDBMode", - "description": [ - "\nreturns true if dataview contains TSDB fields" - ], - "signature": [ - "() => boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.isTimeBased", - "type": "Function", - "tags": [], - "label": "isTimeBased", - "description": [ - "\nDoes the data view have a timestamp field?" - ], - "signature": [ - "() => this is ", + "plugin": "discover", + "path": "src/plugins/discover/public/hooks/use_es_doc_search.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.TimeBasedDataView", - "text": "TimeBasedDataView" - } - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.isTimeNanosBased", - "type": "Function", - "tags": [], - "label": "isTimeNanosBased", - "description": [ - "\nDoes the data view have a timestamp field and is it a date nanos field?" - ], - "signature": [ - "() => this is ", + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/utils/resolve_data_view.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.TimeBasedDataView", - "text": "TimeBasedDataView" - } - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getTimeField", - "type": "Function", - "tags": [], - "label": "getTimeField", - "description": [ - "\nGet timestamp field as DataViewField or return undefined" - ], - "signature": [ - "() => ", + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/utils/resolve_data_view.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx" }, - " | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getFieldByName", - "type": "Function", - "tags": [], - "label": "getFieldByName", - "description": [ - "\nGet field by name." - ], - "signature": [ - "(name: string) => ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx" }, - " | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataView.getFieldByName.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [ - "field name" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getAggregationRestrictions", - "type": "Function", - "tags": [], - "label": "getAggregationRestrictions", - "description": [ - "\nGet aggregation restrictions. Rollup fields can only perform a subset of aggregations." - ], - "signature": [ - "() => Record | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getAsSavedObjectBody", - "type": "Function", - "tags": [], - "label": "getAsSavedObjectBody", - "description": [ - "\nReturns index pattern as saved object body for saving" - ], - "signature": [ - "() => ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewAttributes", - "text": "DataViewAttributes" - } - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getFormatterForField", - "type": "Function", - "tags": [], - "label": "getFormatterForField", - "description": [ - "\nProvide a field, get its formatter" - ], - "signature": [ - "(field: ", + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldSpec", - "text": "FieldSpec" + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/components/log_categorization/log_categorization_page.tsx" }, - " | ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" + "plugin": "presentationUtil", + "path": "src/plugins/presentation_util/public/services/storybook/data_views.ts" }, - ") => ", { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.FieldFormat", - "text": "FieldFormat" - } - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "controls", + "path": "src/plugins/controls/public/services/options_list/options_list_service.ts" + }, { - "parentPluginId": "data", - "id": "def-server.DataView.getFormatterForField.$1", - "type": "CompoundType", - "tags": [], - "label": "field", - "description": [ - "field to get formatter for" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldSpec", - "text": "FieldSpec" - }, - " | ", - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" - } - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.addRuntimeField", - "type": "Function", - "tags": [], - "label": "addRuntimeField", - "description": [ - "\nAdd a runtime field - Appended to existing mapped field or a new field is\ncreated as appropriate." - ], - "signature": [ - "(name: string, runtimeField: ", + "plugin": "controls", + "path": "src/plugins/controls/public/services/options_list/options_list_service.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.RuntimeField", - "text": "RuntimeField" + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.ts" }, - ") => ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" + "plugin": "lens", + "path": "x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx" }, - "[]" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataView.addRuntimeField.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [ - "Field name" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "observability", + "path": "x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataView.addRuntimeField.$2", - "type": "Object", - "tags": [], - "label": "runtimeField", - "description": [ - "Runtime field definition" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.RuntimeField", - "text": "RuntimeField" - } - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.hasRuntimeField", - "type": "Function", - "tags": [], - "label": "hasRuntimeField", - "description": [ - "\nChecks if runtime field exists" - ], - "signature": [ - "(name: string) => boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_field.tsx" + }, { - "parentPluginId": "data", - "id": "def-server.DataView.hasRuntimeField.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [ - "field name" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getRuntimeField", - "type": "Function", - "tags": [], - "label": "getRuntimeField", - "description": [ - "\nReturns runtime field if exists" - ], - "signature": [ - "(name: string) => ", + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.RuntimeField", - "text": "RuntimeField" + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx" }, - " | null" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataView.getRuntimeField.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [ - "Runtime field name" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getAllRuntimeFields", - "type": "Function", - "tags": [], - "label": "getAllRuntimeFields", - "description": [ - "\nGet all runtime field definitions.\nNOTE: this does not strip out runtime fields that match mapped field names" - ], - "signature": [ - "() => Record" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [ - "map of runtime field definitions by field name" - ] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getFieldsByRuntimeFieldName", - "type": "Function", - "tags": [], - "label": "getFieldsByRuntimeFieldName", - "description": [ - "\nReturns data view fields backed by runtime fields." - ], - "signature": [ - "(name: string) => Record | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataView.getFieldsByRuntimeFieldName.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [ - "runtime field name" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [ - "map of DataViewFields (that are runtime fields) by field name" - ] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.replaceAllRuntimeFields", - "type": "Function", - "tags": [], - "label": "replaceAllRuntimeFields", - "description": [ - "\nReplaces all existing runtime fields with new fields." - ], - "signature": [ - "(newFields: Record) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataView.replaceAllRuntimeFields.$1", - "type": "Object", - "tags": [], - "label": "newFields", - "description": [ - "Map of runtime field definitions by field name" - ], - "signature": [ - "Record" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.removeRuntimeField", - "type": "Function", - "tags": [], - "label": "removeRuntimeField", - "description": [ - "\nRemove a runtime field - removed from mapped field or removed unmapped\nfield as appropriate. Doesn't clear associated field attributes." - ], - "signature": [ - "(name: string) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, { - "parentPluginId": "data", - "id": "def-server.DataView.removeRuntimeField.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [ - "- Field name to remove" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getRuntimeMappings", - "type": "Function", - "tags": [], - "label": "getRuntimeMappings", - "description": [ - "\nReturn the \"runtime_mappings\" section of the ES search query." - ], - "signature": [ - "() => ", - "MappingRuntimeFields" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.getFormatterForFieldNoDefault", - "type": "Function", - "tags": [], - "label": "getFormatterForFieldNoDefault", - "description": [ - "\nGet formatter for a given field name. Return undefined if none exists." - ], - "signature": [ - "(fieldname: string) => ", + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.FieldFormat", - "text": "FieldFormat" + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" }, - " | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataView.getFormatterForFieldNoDefault.$1", - "type": "string", - "tags": [], - "label": "fieldname", - "description": [ - "name of field to get formatter for" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.setFieldAttrs", - "type": "Function", - "tags": [], - "label": "setFieldAttrs", - "description": [ - "\nSet field attribute" - ], - "signature": [ - "(fieldName: string, attrName: K, value: ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldAttrSet", - "text": "FieldAttrSet" + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" }, - "[K]) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataView.setFieldAttrs.$1", - "type": "string", - "tags": [], - "label": "fieldName", - "description": [ - "name of field to set attribute on" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "maps", + "path": "x-pack/plugins/maps/public/trigger_actions/visualize_geo_field_action.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataView.setFieldAttrs.$2", - "type": "Uncategorized", - "tags": [], - "label": "attrName", - "description": [ - "name of attribute to set" - ], - "signature": [ - "K" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataView.setFieldAttrs.$3", - "type": "Uncategorized", - "tags": [], - "label": "value", - "description": [ - "value of attribute" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldAttrSet", - "text": "FieldAttrSet" - }, - "[K]" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.setFieldCustomLabel", - "type": "Function", - "tags": [], - "label": "setFieldCustomLabel", - "description": [ - "\nSet field custom label" - ], - "signature": [ - "(fieldName: string, customLabel: string | null | undefined) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" + }, { - "parentPluginId": "data", - "id": "def-server.DataView.setFieldCustomLabel.$1", - "type": "string", - "tags": [], - "label": "fieldName", - "description": [ - "name of field to set custom label on" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataView.setFieldCustomLabel.$2", - "type": "CompoundType", - "tags": [], - "label": "customLabel", - "description": [ - "custom label value. If undefined, custom label is removed" - ], - "signature": [ - "string | null | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.setFieldCount", - "type": "Function", - "tags": [], - "label": "setFieldCount", - "description": [ - "\nSet field count" - ], - "signature": [ - "(fieldName: string, count: number | null | undefined) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx" + }, { - "parentPluginId": "data", - "id": "def-server.DataView.setFieldCount.$1", - "type": "string", - "tags": [], - "label": "fieldName", - "description": [ - "name of field to set count on" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataView.setFieldCount.$2", - "type": "CompoundType", - "tags": [], - "label": "count", - "description": [ - "count value. If undefined, count is removed" - ], - "signature": [ - "number | null | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.setFieldFormat", - "type": "Function", - "tags": [], - "label": "setFieldFormat", - "description": [ - "\nSet field formatter" - ], - "signature": [ - "(fieldName: string, format: ", + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + }, { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.SerializedFieldFormat", - "text": "SerializedFieldFormat" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" }, - "<{}, ", - "SerializableRecord", - ">) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataView.setFieldFormat.$1", - "type": "string", - "tags": [], - "label": "fieldName", - "description": [ - "name of field to set format on" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataView.setFieldFormat.$2", - "type": "Object", - "tags": [], - "label": "format", - "description": [ - "field format in serialized form" - ], - "signature": [ - { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.SerializedFieldFormat", - "text": "SerializedFieldFormat" - }, - "<{}, ", - "SerializableRecord", - ">" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataView.deleteFieldFormat", - "type": "Function", - "tags": [], - "label": "deleteFieldFormat", - "description": [ - "\nRemove field format from the field format map." - ], - "signature": [ - "(fieldName: string) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" + }, { - "parentPluginId": "data", - "id": "def-server.DataView.deleteFieldFormat.$1", - "type": "string", - "tags": [], - "label": "fieldName", - "description": [ - "field name associated with the format for removal" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService", - "type": "Class", - "tags": [], - "label": "DataViewsService", - "description": [ - "\nData views service, providing CRUD operations for data views." - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getCanSave", - "type": "Function", - "tags": [], - "label": "getCanSave", - "description": [ - "\nCan the user save data views?" - ], - "signature": [ - "() => Promise" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.Unnamed", - "type": "Function", - "tags": [], - "label": "Constructor", - "description": [ - "\nDataViewsService constructor" - ], - "signature": [ - "any" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx" + }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.Unnamed.$1", - "type": "Object", - "tags": [], - "label": "deps", - "description": [ - "Service dependencies" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewsServiceDeps", - "text": "DataViewsServiceDeps" - } - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getIds", - "type": "Function", - "tags": [], - "label": "getIds", - "description": [ - "\nGets list of index pattern ids." - ], - "signature": [ - "(refresh?: boolean) => Promise" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" + }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getIds.$1", - "type": "boolean", - "tags": [], - "label": "refresh", - "description": [ - "Force refresh of index pattern list" - ], - "signature": [ - "boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getTitles", - "type": "Function", - "tags": [], - "label": "getTitles", - "description": [ - "\nGets list of index pattern titles." - ], - "signature": [ - "(refresh?: boolean) => Promise" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getTitles.$1", - "type": "boolean", - "tags": [], - "label": "refresh", - "description": [ - "Force refresh of index pattern list" - ], - "signature": [ - "boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.find", - "type": "Function", - "tags": [], - "label": "find", - "description": [ - "\nFind and load index patterns by title." - ], - "signature": [ - "(search: string, size?: number) => Promise<", + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" }, - "[]>" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataViewsService.find.$1", - "type": "string", - "tags": [], - "label": "search", - "description": [ - "Search string" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.find.$2", - "type": "number", - "tags": [], - "label": "size", - "description": [ - "Number of data views to return" - ], - "signature": [ - "number" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [ - "DataView[]" - ] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getIdsWithTitle", - "type": "Function", - "tags": [], - "label": "getIdsWithTitle", - "description": [ - "\nGets list of index pattern ids with titles." - ], - "signature": [ - "(refresh?: boolean) => Promise<", + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewListItem", - "text": "DataViewListItem" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" }, - "[]>" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getIdsWithTitle.$1", - "type": "boolean", - "tags": [], - "label": "refresh", - "description": [ - "Force refresh of index pattern list" - ], - "signature": [ - "boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.clearCache", - "type": "Function", - "tags": [], - "label": "clearCache", - "description": [ - "\nClear index pattern saved objects cache." - ], - "signature": [ - "() => void" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.clearInstanceCache", - "type": "Function", - "tags": [], - "label": "clearInstanceCache", - "description": [ - "\nClear index pattern instance cache" - ], - "signature": [ - "(id?: string | undefined) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.clearInstanceCache.$1", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getCache", - "type": "Function", - "tags": [], - "label": "getCache", - "description": [ - "\nGet cache, contains data view saved objects." - ], - "signature": [ - "() => Promise<", - "SavedObject", - "<", + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSavedObjectAttrs", - "text": "DataViewSavedObjectAttrs" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/page.tsx" }, - ">[] | null | undefined>" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getDefault", - "type": "Function", - "tags": [], - "label": "getDefault", - "description": [ - "\nGet default index pattern" - ], - "signature": [ - "() => Promise<", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" }, - " | null>" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getDefaultId", - "type": "Function", - "tags": [], - "label": "getDefaultId", - "description": [ - "\nGet default index pattern id" - ], - "signature": [ - "() => Promise" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.setDefault", - "type": "Function", - "tags": [], - "label": "setDefault", - "description": [ - "\nOptionally set default index pattern, unless force = true" - ], - "signature": [ - "(id: string | null, force?: boolean) => Promise" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataViewsService.setDefault.$1", - "type": "CompoundType", - "tags": [], - "label": "id", - "description": [ - "data view id" - ], - "signature": [ - "string | null" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.setDefault.$2", - "type": "boolean", - "tags": [], - "label": "force", - "description": [ - "set default data view even if there's an existing default" - ], - "signature": [ - "boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.hasUserDataView", - "type": "Function", - "tags": [], - "label": "hasUserDataView", - "description": [ - "\nChecks if current user has a user created index pattern ignoring fleet's server default index patterns." - ], - "signature": [ - "() => Promise" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getFieldsForWildcard", - "type": "Function", - "tags": [], - "label": "getFieldsForWildcard", - "description": [ - "\nGet field list by providing { pattern }." - ], - "signature": [ - "(options: ", + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.GetFieldsOptions", - "text": "GetFieldsOptions" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" }, - ") => Promise<", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldSpec", - "text": "FieldSpec" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" }, - "[]>" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getFieldsForWildcard.$1", - "type": "Object", - "tags": [], - "label": "options", - "description": [ - "options for getting field list" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.GetFieldsOptions", - "text": "GetFieldsOptions" - } - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [ - "FieldSpec[]" - ] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getFieldsForIndexPattern", - "type": "Function", - "tags": [], - "label": "getFieldsForIndexPattern", - "description": [ - "\nGet field list by providing an index patttern (or spec)." - ], - "signature": [ - "(indexPattern: ", + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" }, - " | ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" }, - ", options?: ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.GetFieldsOptions", - "text": "GetFieldsOptions" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" }, - " | undefined) => Promise<", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldSpec", - "text": "FieldSpec" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" }, - "[]>" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getFieldsForIndexPattern.$1", - "type": "CompoundType", - "tags": [], - "label": "indexPattern", - "description": [], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - }, - " | ", - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" - } - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getFieldsForIndexPattern.$2", - "type": "Object", - "tags": [], - "label": "options", - "description": [ - "options for getting field list" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.GetFieldsOptions", - "text": "GetFieldsOptions" - }, - " | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [ - "FieldSpec[]" - ] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.refreshFields", - "type": "Function", - "tags": [], - "label": "refreshFields", - "description": [ - "\nRefresh field list for a given index pattern." - ], - "signature": [ - "(indexPattern: ", + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/bucket_span_estimator/estimate_bucket_span.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/components/datafeed_step/components/data_view/change_data_view.tsx" }, - ") => Promise" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataViewsService.refreshFields.$1", - "type": "Object", - "tags": [], - "label": "indexPattern", - "description": [], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - } - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.fieldArrayToMap", - "type": "Function", - "tags": [], - "label": "fieldArrayToMap", - "description": [ - "\nConverts field array to map." - ], - "signature": [ - "(fields: ", + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldSpec", - "text": "FieldSpec" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/components/job_settings_form.tsx" }, - "[], fieldAttrs?: ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldAttrs", - "text": "FieldAttrs" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" }, - " | undefined) => ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewFieldMap", - "text": "DataViewFieldMap" - } - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" + }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.fieldArrayToMap.$1", - "type": "Array", - "tags": [], - "label": "fields", - "description": [ - ": FieldSpec[]" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldSpec", - "text": "FieldSpec" - }, - "[]" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/quick_create_job.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.fieldArrayToMap.$2", - "type": "Object", - "tags": [], - "label": "fieldAttrs", - "description": [ - ": FieldAttrs" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldAttrs", - "text": "FieldAttrs" - }, - " | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [ - "Record" - ] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.savedObjectToSpec", - "type": "Function", - "tags": [], - "label": "savedObjectToSpec", - "description": [ - "\nConverts data view saved object to data view spec." - ], - "signature": [ - "(savedObject: ", - "SavedObject", - "<", + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewAttributes", - "text": "DataViewAttributes" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" }, - ">) => ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" - } - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.tsx" + }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.savedObjectToSpec.$1", - "type": "Object", - "tags": [], - "label": "savedObject", - "description": [], - "signature": [ - "SavedObject", - "<", - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewAttributes", - "text": "DataViewAttributes" - }, - ">" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [ - "DataViewSpec" - ] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.get", - "type": "Function", - "tags": [], - "label": "get", - "description": [ - "\nGet an index pattern by id, cache optimized." - ], - "signature": [ - "(id: string) => Promise<", + "plugin": "ml", + "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" }, - ">" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataViewsService.get.$1", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.create", - "type": "Function", - "tags": [], - "label": "create", - "description": [ - "\nCreate a new data view instance." - ], - "signature": [ - "({ id, name, title, ...restOfSpec }: ", + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" }, - ", skipFetchFields?: boolean) => Promise<", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" }, - ">" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataViewsService.create.$1", - "type": "Object", - "tags": [], - "label": "{ id, name, title, ...restOfSpec }", - "description": [], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" - } - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx" }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.create.$2", - "type": "boolean", - "tags": [], - "label": "skipFetchFields", - "description": [ - "if true, will not fetch fields" - ], - "signature": [ - "boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [ - "DataView" - ] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.createAndSave", - "type": "Function", - "tags": [], - "label": "createAndSave", - "description": [ - "\nCreate a new data view and save it right away." - ], - "signature": [ - "(spec: ", + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx" }, - ", override?: boolean, skipFetchFields?: boolean) => Promise<", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx" }, - ">" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataViewsService.createAndSave.$1", - "type": "Object", - "tags": [], - "label": "spec", - "description": [ - "data view spec" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" - } - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.createAndSave.$2", - "type": "boolean", - "tags": [], - "label": "override", - "description": [ - "Overwrite if existing index pattern exists." - ], - "signature": [ - "boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.createAndSave.$3", - "type": "boolean", - "tags": [], - "label": "skipFetchFields", - "description": [ - "Whether to skip field refresh step." - ], - "signature": [ - "boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.createSavedObject", - "type": "Function", - "tags": [], - "label": "createSavedObject", - "description": [ - "\nSave a new data view." - ], - "signature": [ - "(dataView: ", + "plugin": "ml", + "path": "x-pack/plugins/ml/server/lib/alerts/alerting_service.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts" }, - ", override?: boolean) => Promise<", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.ts" }, - ">" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataViewsService.createSavedObject.$1", - "type": "Object", - "tags": [], - "label": "dataView", - "description": [ - "data view instance" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - } - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.createSavedObject.$2", - "type": "boolean", - "tags": [], - "label": "override", - "description": [ - "Overwrite if existing index pattern exists" - ], - "signature": [ - "boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.updateSavedObject", - "type": "Function", - "tags": [], - "label": "updateSavedObject", - "description": [ - "\nSave existing data view. Will attempt to merge differences if there are conflicts." - ], - "signature": [ - "(indexPattern: ", + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/get_fields.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "plugin": "apm", + "path": "x-pack/plugins/apm/server/routes/data_view/create_static_data_view.ts" }, - ", saveAttempts?: number, ignoreErrors?: boolean) => Promise" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.DataViewsService.updateSavedObject.$1", - "type": "Object", - "tags": [], - "label": "indexPattern", - "description": [], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - } - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/datasource.sagas.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.updateSavedObject.$2", - "type": "number", - "tags": [], - "label": "saveAttempts", - "description": [], - "signature": [ - "number" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/persistence.ts" }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.updateSavedObject.$3", - "type": "boolean", - "tags": [], - "label": "ignoreErrors", - "description": [], - "signature": [ - "boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.delete", - "type": "Function", - "tags": [], - "label": "delete", - "description": [ - "\nDeletes an index pattern from .kibana index." - ], - "signature": [ - "(indexPatternId: string) => Promise<{}>" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/persistence.ts" + }, { - "parentPluginId": "data", - "id": "def-server.DataViewsService.delete.$1", - "type": "string", - "tags": [], - "label": "indexPatternId", - "description": [ - ": Id of kibana Index Pattern to delete" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataViewsService.getDefaultDataView", - "type": "Function", - "tags": [], - "label": "getDefaultDataView", - "description": [ - "\nReturns the default data view as an object.\nIf no default is found, or it is missing\nanother data view is selected as default and returned.\nIf no possible data view found to become a default returns null.\n" - ], - "signature": [ - "() => Promise<", + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx" }, - " | null>" - ], - "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [ - "default data view" - ] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher", - "type": "Class", - "tags": [], - "label": "IndexPatternsFetcher", - "description": [], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher.Unnamed", - "type": "Function", - "tags": [], - "label": "Constructor", - "description": [], - "signature": [ - "any" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher.Unnamed.$1", - "type": "Object", - "tags": [], - "label": "elasticsearchClient", - "description": [], - "signature": [ - "ElasticsearchClient" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx" }, { - "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher.Unnamed.$2", - "type": "boolean", - "tags": [], - "label": "allowNoIndices", - "description": [], - "signature": [ - "boolean" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/search_source_expression_form.tsx" + }, + { + "plugin": "synthetics", + "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx" + }, + { + "plugin": "synthetics", + "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx" + }, + { + "plugin": "timelines", + "path": "x-pack/plugins/timelines/server/search_strategy/index_fields/index.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/services/es_index_service.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/server/routes/api/transforms.ts" + }, + { + "plugin": "upgradeAssistant", + "path": "x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.tsx" + }, + { + "plugin": "ux", + "path": "x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/use_data_view.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts" + }, + { + "plugin": "controls", + "path": "src/plugins/controls/public/services/data_views/data_views.story.ts" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/field_editor/components/scripting_help/test_script.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/field_editor/field_editor.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx" + }, + { + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/control/list_control_factory.ts" + }, + { + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/control/range_control_factory.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/server/routes/field_stats.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/server/routes/field_stats.ts" + }, + { + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/controls/field.tsx" + }, + { + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/controls/field.tsx" + }, + { + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/agg_select.tsx" + }, + { + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/test_utils/get_index_pattern_mock.ts" + }, + { + "plugin": "visTypeTimelion", + "path": "src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts" + }, + { + "plugin": "visTypeTimelion", + "path": "src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.ts" + }, + { + "plugin": "visTypeVega", + "path": "src/plugins/vis_types/vega/public/data_model/search_api.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/layout/__stories__/get_layout_props.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_views.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" } - ], - "returnComment": [] + ] }, { "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard", - "type": "Function", - "tags": [ - "property", - "property", - "return" - ], - "label": "getFieldsForWildcard", + "id": "def-server.DataView.fieldFormatMap", + "type": "Object", + "tags": [], + "label": "fieldFormatMap", "description": [ - "\n Get a list of field objects for an index pattern that may contain wildcards\n" + "\nMap of field formats by field name" ], "signature": [ - "(options: { pattern: string | string[]; metaFields?: string[] | undefined; fieldCapsOptions?: { allow_no_indices: boolean; } | undefined; type?: string | undefined; rollupIndex?: string | undefined; filter?: ", - "QueryDslQueryContainer", - " | undefined; }) => Promise<{ fields: ", + "{ [x: string]: ", { - "pluginId": "dataViews", - "scope": "server", - "docId": "kibDataViewsPluginApi", - "section": "def-server.FieldDescriptor", - "text": "FieldDescriptor" + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.SerializedFieldFormat", + "text": "SerializedFieldFormat" }, - "[]; indices: string[]; }>" + "<{}, ", + "SerializableRecord", + ">; }" ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.pattern", - "type": "CompoundType", - "tags": [], - "label": "pattern", - "description": [], - "signature": [ - "string | string[]" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.metaFields", - "type": "Array", - "tags": [], - "label": "metaFields", - "description": [], - "signature": [ - "string[] | undefined" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.fieldCapsOptions", - "type": "Object", - "tags": [], - "label": "fieldCapsOptions", - "description": [], - "signature": [ - "{ allow_no_indices: boolean; } | undefined" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.type", - "type": "string", - "tags": [], - "label": "type", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.rollupIndex", - "type": "string", - "tags": [], - "label": "rollupIndex", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.filter", - "type": "Object", - "tags": [], - "label": "filter", - "description": [], - "signature": [ - "QueryDslQueryContainer", - " | undefined" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [] + "trackAdoption": false }, { "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher.validatePatternListActive", - "type": "Function", - "tags": [ - "return" - ], - "label": "validatePatternListActive", + "id": "def-server.DataView.typeMeta", + "type": "Object", + "tags": [], + "label": "typeMeta", "description": [ - "\n Returns an index pattern list of only those index pattern strings in the given list that return indices\n" + "\nOnly used by rollup indices, used by rollup specific endpoint to load field list." ], "signature": [ - "(patternList: string[]) => Promise" + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.TypeMeta", + "text": "TypeMeta" + }, + " | undefined" ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, - "trackAdoption": false, - "children": [ + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.fields", + "type": "CompoundType", + "tags": [], + "label": "fields", + "description": [ + "\nField list, in extended array format" + ], + "signature": [ { - "parentPluginId": "data", - "id": "def-server.IndexPatternsFetcher.validatePatternListActive.$1", - "type": "Array", - "tags": [], - "label": "patternList", - "description": [ - "string[]" - ], - "signature": [ - "string[]" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.IIndexPatternFieldList", + "text": "IIndexPatternFieldList" + }, + " & { toSpec: () => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewFieldMap", + "text": "DataViewFieldMap" + }, + "; }" ], - "returnComment": [] - } - ], - "initialIsOpen": false - } - ], - "functions": [ - { - "parentPluginId": "data", - "id": "def-server.getCapabilitiesForRollupIndices", - "type": "Function", - "tags": [], - "label": "getCapabilitiesForRollupIndices", - "description": [ - "\nGet rollup job capabilities" - ], - "signature": [ - "(indices: ", - "RollupGetRollupIndexCapsResponse", - ") => ", - { - "pluginId": "dataViews", - "scope": "server", - "docId": "kibDataViewsPluginApi", - "section": "def-server.RollupIndexCapability", - "text": "RollupIndexCapability" - } - ], - "path": "src/plugins/data_views/server/fetcher/lib/map_capabilities.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "data", - "id": "def-server.getCapabilitiesForRollupIndices.$1", - "type": "Object", + "id": "def-server.DataView.timeFieldName", + "type": "string", "tags": [], - "label": "indices", + "label": "timeFieldName", "description": [ - "rollup job index capabilites" + "\nTimestamp field name" ], "signature": [ - "RollupGetRollupIndexCapsResponse" + "string | undefined" ], - "path": "src/plugins/data_views/server/fetcher/lib/map_capabilities.ts", + "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.getEsQueryConfig", - "type": "Function", - "tags": [], - "label": "getEsQueryConfig", - "description": [], - "signature": [ - "(config: KibanaConfig) => ", - "EsQueryConfig" - ], - "path": "src/plugins/data/common/es_query/get_es_query_config.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "trackAdoption": false + }, { "parentPluginId": "data", - "id": "def-server.getEsQueryConfig.$1", - "type": "Object", + "id": "def-server.DataView.type", + "type": "string", "tags": [], - "label": "config", - "description": [], + "label": "type", + "description": [ + "\nType is used to identify rollup index patterns." + ], "signature": [ - "KibanaConfig" + "string | undefined" ], - "path": "src/plugins/data/common/es_query/get_es_query_config.ts", + "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.getRequestAbortedSignal", - "type": "Function", - "tags": [], - "label": "getRequestAbortedSignal", - "description": [ - "\nA simple utility function that returns an `AbortSignal` corresponding to an `AbortController`\nwhich aborts when the given request is aborted." - ], - "signature": [ - "(aborted$: ", - "Observable", - ") => AbortSignal" - ], - "path": "src/plugins/data/server/lib/get_request_aborted_signal.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "trackAdoption": false + }, { "parentPluginId": "data", - "id": "def-server.getRequestAbortedSignal.$1", - "type": "Object", - "tags": [], - "label": "aborted$", - "description": [ - "The observable of abort events (usually `request.events.aborted$`)" + "id": "def-server.DataView.flattenHit", + "type": "Function", + "tags": [ + "deprecated" ], + "label": "flattenHit", + "description": [], "signature": [ - "Observable", - "" + "(hit: Record, deep?: boolean | undefined) => Record" ], - "path": "src/plugins/data/server/lib/get_request_aborted_signal.ts", - "deprecated": false, + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": true, "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.getTime", - "type": "Function", - "tags": [], - "label": "getTime", - "description": [], - "signature": [ - "(indexPattern: ", - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - }, - " | undefined, timeRange: ", - "TimeRange", - ", options: { forceNow?: Date | undefined; fieldName?: string | undefined; } | undefined) => ", - "RangeFilter", - " | ", - "ScriptedRangeFilter", - " | ", - "MatchAllRangeFilter", - " | undefined" - ], - "path": "src/plugins/data/common/query/timefilter/get_time.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-server.getTime.$1", - "type": "Object", - "tags": [], - "label": "indexPattern", - "description": [], - "signature": [ + "references": [ { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.ts" }, - " | undefined" - ], - "path": "src/plugins/data/common/query/timefilter/get_time.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - }, - { - "parentPluginId": "data", - "id": "def-server.getTime.$2", - "type": "Object", - "tags": [], - "label": "timeRange", - "description": [], - "signature": [ - "TimeRange" + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + } ], - "path": "src/plugins/data/common/query/timefilter/get_time.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "data", - "id": "def-server.getTime.$3", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "path": "src/plugins/data/common/query/timefilter/get_time.ts", - "deprecated": false, - "trackAdoption": false, + "returnComment": [], "children": [ { "parentPluginId": "data", - "id": "def-server.getTime.$3.forceNow", + "id": "def-server.DataView.flattenHit.$1", "type": "Object", "tags": [], - "label": "forceNow", + "label": "hit", "description": [], "signature": [ - "Date | undefined" + "{ [x: string]: unknown[]; }" ], - "path": "src/plugins/data/common/query/timefilter/get_time.ts", + "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "data", - "id": "def-server.getTime.$3.fieldName", - "type": "string", + "id": "def-server.DataView.flattenHit.$2", + "type": "CompoundType", "tags": [], - "label": "fieldName", + "label": "deep", "description": [], "signature": [ - "string | undefined" + "boolean | undefined" ], - "path": "src/plugins/data/common/query/timefilter/get_time.ts", + "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, "trackAdoption": false } ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.parseInterval", - "type": "Function", - "tags": [], - "label": "parseInterval", - "description": [], - "signature": [ - "(interval: string) => moment.Duration | null" - ], - "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/parse_interval.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "data", - "id": "def-server.parseInterval.$1", + "id": "def-server.DataView.metaFields", + "type": "Array", + "tags": [], + "label": "metaFields", + "description": [ + "\nList of meta fields by name" + ], + "signature": [ + "string[]" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.version", "type": "string", "tags": [], - "label": "interval", - "description": [], + "label": "version", + "description": [ + "\nSavedObject version" + ], "signature": [ - "string" + "string | undefined" ], - "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/parse_interval.ts", + "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - } - ], - "interfaces": [ - { - "parentPluginId": "data", - "id": "def-server.DataViewsServerPluginStart", - "type": "Interface", - "tags": [], - "label": "DataViewsServerPluginStart", - "description": [ - "\nDataViews server plugin start api" - ], - "path": "src/plugins/data_views/server/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "trackAdoption": false + }, { "parentPluginId": "data", - "id": "def-server.DataViewsServerPluginStart.dataViewsServiceFactory", - "type": "Function", + "id": "def-server.DataView.sourceFilters", + "type": "Array", "tags": [], - "label": "dataViewsServiceFactory", + "label": "sourceFilters", "description": [ - "\nReturns a DataViews service instance" + "\nArray of filters - hides fields in discover" ], "signature": [ - "(savedObjectsClient: ", - "SavedObjectsClientContract", - ", elasticsearchClient: ", - "ElasticsearchClient", - ", request?: ", - "KibanaRequest", - " | undefined, byPassCapabilities?: boolean | undefined) => Promise<", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewsService", - "text": "DataViewsService" + "section": "def-common.SourceFilter", + "text": "SourceFilter" }, - ">" + "[] | undefined" ], - "path": "src/plugins/data_views/server/types.ts", + "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-server.DataViewsServerPluginStart.dataViewsServiceFactory.$1", - "type": "Object", - "tags": [], - "label": "savedObjectsClient", - "description": [], - "signature": [ - "SavedObjectsClientContract" + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.namespaces", + "type": "Array", + "tags": [], + "label": "namespaces", + "description": [ + "\nArray of namespace ids" + ], + "signature": [ + "string[]" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.allowNoIndex", + "type": "boolean", + "tags": [], + "label": "allowNoIndex", + "description": [ + "\nPrevents errors when index pattern exists before indices" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.name", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "\nName of the data view. Human readable name used to differentiate data view." + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.matchedIndices", + "type": "Array", + "tags": [], + "label": "matchedIndices", + "description": [], + "signature": [ + "string[]" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [ + "\nconstructor" + ], + "signature": [ + "any" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "config", + "description": [ + "- config data and dependencies" ], - "path": "src/plugins/data_views/server/types.ts", + "signature": [ + "DataViewDeps" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, - "trackAdoption": false - }, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getName", + "type": "Function", + "tags": [], + "label": "getName", + "description": [ + "\nGet name of Data View" + ], + "signature": [ + "() => string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getIndexPattern", + "type": "Function", + "tags": [], + "label": "getIndexPattern", + "description": [ + "\nGet index pattern" + ], + "signature": [ + "() => string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [ + "index pattern string" + ] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.setIndexPattern", + "type": "Function", + "tags": [], + "label": "setIndexPattern", + "description": [ + "\nSet index pattern" + ], + "signature": [ + "(indexPattern: string) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "data", - "id": "def-server.DataViewsServerPluginStart.dataViewsServiceFactory.$2", - "type": "Object", + "id": "def-server.DataView.setIndexPattern.$1", + "type": "string", "tags": [], - "label": "elasticsearchClient", + "label": "indexPattern", "description": [], "signature": [ - "{ name: string | symbol; get: { (this: That, params: ", - "GetRequest", - " | ", - "GetRequest", - ", options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "GetResponse", - ">; (this: That, params: ", - "GetRequest", - " | ", - "GetRequest", - ", options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "GetResponse", - ", unknown>>; (this: That, params: ", - "GetRequest", - " | ", - "GetRequest", - ", options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "GetResponse", - ">; }; delete: { (this: That, params: ", - "DeleteRequest", - " | ", - "DeleteRequest", - ", options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "WriteResponseBase", - ">; (this: That, params: ", - "DeleteRequest", - " | ", - "DeleteRequest", - ", options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "WriteResponseBase", - ", unknown>>; (this: That, params: ", - "DeleteRequest", - " | ", - "DeleteRequest", - ", options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "WriteResponseBase", - ">; }; cluster: ", - "default", - "; eql: ", - "default", - "; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; create: { (this: That, params: ", - "CreateRequest", - " | ", - "CreateRequest", - ", options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "WriteResponseBase", - ">; (this: That, params: ", - "CreateRequest", - " | ", - "CreateRequest", - ", options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "WriteResponseBase", - ", unknown>>; (this: That, params: ", - "CreateRequest", - " | ", + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getOriginalSavedObjectBody", + "type": "Function", + "tags": [], + "label": "getOriginalSavedObjectBody", + "description": [ + "\nGet last saved saved object fields" + ], + "signature": [ + "() => { fieldAttrs?: string | undefined; title?: string | undefined; timeFieldName?: string | undefined; fields?: string | undefined; sourceFilters?: string | undefined; fieldFormatMap?: string | undefined; typeMeta?: string | undefined; type?: string | undefined; }" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.resetOriginalSavedObjectBody", + "type": "Function", + "tags": [], + "label": "resetOriginalSavedObjectBody", + "description": [ + "\nReset last saved saved object fields. Used after saving." + ], + "signature": [ + "() => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getFieldAttrs", + "type": "Function", + "tags": [], + "label": "getFieldAttrs", + "description": [ + "\nReturns field attributes map" + ], + "signature": [ + "() => { [x: string]: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldAttrSet", + "text": "FieldAttrSet" + }, + "; }" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getComputedFields", + "type": "Function", + "tags": [], + "label": "getComputedFields", + "description": [ + "\nReturns scripted fields" + ], + "signature": [ + "() => { storedFields: string[]; scriptFields: Record; docvalueFields: { field: string; format: string; }[]; runtimeFields: ", + "MappingRuntimeFields", + "; }" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.isPersisted", + "type": "Function", + "tags": [], + "label": "isPersisted", + "description": [], + "signature": [ + "() => boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.toSpec", + "type": "Function", + "tags": [], + "label": "toSpec", + "description": [ + "\nCreates static representation of the data view." + ], + "signature": [ + "(includeFields?: boolean) => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" + } + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.toSpec.$1", + "type": "boolean", + "tags": [], + "label": "includeFields", + "description": [ + "Whether or not to include the `fields` list as part of this spec. If not included, the list\nwill be fetched from Elasticsearch when instantiating a new Data View with this spec." + ], + "signature": [ + "boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getSourceFiltering", + "type": "Function", + "tags": [], + "label": "getSourceFiltering", + "description": [ + "\nGet the source filtering configuration for that index." + ], + "signature": [ + "() => { excludes: string[]; }" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.removeScriptedField", + "type": "Function", + "tags": [ + "deprecated" + ], + "label": "removeScriptedField", + "description": [ + "\nRemoves scripted field from field list." + ], + "signature": [ + "(fieldName: string) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/field_editor/field_editor.tsx" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.test.ts" + } + ], + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.removeScriptedField.$1", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [ + "name of scripted field to remove" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getNonScriptedFields", + "type": "Function", + "tags": [ + "deprecated" + ], + "label": "getNonScriptedFields", + "description": [ + "\n" + ], + "signature": [ + "() => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + "[]" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts" + } + ], + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getScriptedFields", + "type": "Function", + "tags": [ + "deprecated" + ], + "label": "getScriptedFields", + "description": [ + "\n" + ], + "signature": [ + "() => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + "[]" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_views.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/server/register_index_pattern_usage_collection.ts" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.test.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.test.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.test.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.test.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.test.ts" + } + ], + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.isTSDBMode", + "type": "Function", + "tags": [], + "label": "isTSDBMode", + "description": [ + "\nreturns true if dataview contains TSDB fields" + ], + "signature": [ + "() => boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.isTimeBased", + "type": "Function", + "tags": [], + "label": "isTimeBased", + "description": [ + "\nDoes the data view have a timestamp field?" + ], + "signature": [ + "() => this is ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.TimeBasedDataView", + "text": "TimeBasedDataView" + } + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.isTimeNanosBased", + "type": "Function", + "tags": [], + "label": "isTimeNanosBased", + "description": [ + "\nDoes the data view have a timestamp field and is it a date nanos field?" + ], + "signature": [ + "() => this is ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.TimeBasedDataView", + "text": "TimeBasedDataView" + } + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getTimeField", + "type": "Function", + "tags": [], + "label": "getTimeField", + "description": [ + "\nGet timestamp field as DataViewField or return undefined" + ], + "signature": [ + "() => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + " | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getFieldByName", + "type": "Function", + "tags": [], + "label": "getFieldByName", + "description": [ + "\nGet field by name." + ], + "signature": [ + "(name: string) => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + " | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.getFieldByName.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "field name" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getAggregationRestrictions", + "type": "Function", + "tags": [], + "label": "getAggregationRestrictions", + "description": [ + "\nGet aggregation restrictions. Rollup fields can only perform a subset of aggregations." + ], + "signature": [ + "() => Record | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getAsSavedObjectBody", + "type": "Function", + "tags": [], + "label": "getAsSavedObjectBody", + "description": [ + "\nReturns index pattern as saved object body for saving" + ], + "signature": [ + "() => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + } + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getFormatterForField", + "type": "Function", + "tags": [], + "label": "getFormatterForField", + "description": [ + "\nProvide a field, get its formatter" + ], + "signature": [ + "(field: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldSpec", + "text": "FieldSpec" + }, + " | ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + ") => ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormat", + "text": "FieldFormat" + } + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.getFormatterForField.$1", + "type": "CompoundType", + "tags": [], + "label": "field", + "description": [ + "field to get formatter for" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldSpec", + "text": "FieldSpec" + }, + " | ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + } + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.addRuntimeField", + "type": "Function", + "tags": [], + "label": "addRuntimeField", + "description": [ + "\nAdd a runtime field - Appended to existing mapped field or a new field is\ncreated as appropriate." + ], + "signature": [ + "(name: string, runtimeField: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.RuntimeField", + "text": "RuntimeField" + }, + ") => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + "[]" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.addRuntimeField.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "Field name" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.addRuntimeField.$2", + "type": "Object", + "tags": [], + "label": "runtimeField", + "description": [ + "Runtime field definition" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.RuntimeField", + "text": "RuntimeField" + } + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.hasRuntimeField", + "type": "Function", + "tags": [], + "label": "hasRuntimeField", + "description": [ + "\nChecks if runtime field exists" + ], + "signature": [ + "(name: string) => boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.hasRuntimeField.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "field name" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getRuntimeField", + "type": "Function", + "tags": [], + "label": "getRuntimeField", + "description": [ + "\nReturns runtime field if exists" + ], + "signature": [ + "(name: string) => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.RuntimeField", + "text": "RuntimeField" + }, + " | null" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.getRuntimeField.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "Runtime field name" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getAllRuntimeFields", + "type": "Function", + "tags": [], + "label": "getAllRuntimeFields", + "description": [ + "\nGet all runtime field definitions.\nNOTE: this does not strip out runtime fields that match mapped field names" + ], + "signature": [ + "() => Record" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [ + "map of runtime field definitions by field name" + ] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getFieldsByRuntimeFieldName", + "type": "Function", + "tags": [], + "label": "getFieldsByRuntimeFieldName", + "description": [ + "\nReturns data view fields backed by runtime fields." + ], + "signature": [ + "(name: string) => Record | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.getFieldsByRuntimeFieldName.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "runtime field name" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [ + "map of DataViewFields (that are runtime fields) by field name" + ] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.replaceAllRuntimeFields", + "type": "Function", + "tags": [], + "label": "replaceAllRuntimeFields", + "description": [ + "\nReplaces all existing runtime fields with new fields." + ], + "signature": [ + "(newFields: Record) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.replaceAllRuntimeFields.$1", + "type": "Object", + "tags": [], + "label": "newFields", + "description": [ + "Map of runtime field definitions by field name" + ], + "signature": [ + "Record" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.removeRuntimeField", + "type": "Function", + "tags": [], + "label": "removeRuntimeField", + "description": [ + "\nRemove a runtime field - removed from mapped field or removed unmapped\nfield as appropriate. Doesn't clear associated field attributes." + ], + "signature": [ + "(name: string) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.removeRuntimeField.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "- Field name to remove" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getRuntimeMappings", + "type": "Function", + "tags": [], + "label": "getRuntimeMappings", + "description": [ + "\nReturn the \"runtime_mappings\" section of the ES search query." + ], + "signature": [ + "() => ", + "MappingRuntimeFields" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.getFormatterForFieldNoDefault", + "type": "Function", + "tags": [], + "label": "getFormatterForFieldNoDefault", + "description": [ + "\nGet formatter for a given field name. Return undefined if none exists." + ], + "signature": [ + "(fieldname: string) => ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormat", + "text": "FieldFormat" + }, + " | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.getFormatterForFieldNoDefault.$1", + "type": "string", + "tags": [], + "label": "fieldname", + "description": [ + "name of field to get formatter for" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.setFieldAttrs", + "type": "Function", + "tags": [], + "label": "setFieldAttrs", + "description": [ + "\nSet field attribute" + ], + "signature": [ + "(fieldName: string, attrName: K, value: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldAttrSet", + "text": "FieldAttrSet" + }, + "[K]) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.setFieldAttrs.$1", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [ + "name of field to set attribute on" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.setFieldAttrs.$2", + "type": "Uncategorized", + "tags": [], + "label": "attrName", + "description": [ + "name of attribute to set" + ], + "signature": [ + "K" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.setFieldAttrs.$3", + "type": "Uncategorized", + "tags": [], + "label": "value", + "description": [ + "value of attribute" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldAttrSet", + "text": "FieldAttrSet" + }, + "[K]" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.setFieldCustomLabel", + "type": "Function", + "tags": [], + "label": "setFieldCustomLabel", + "description": [ + "\nSet field custom label" + ], + "signature": [ + "(fieldName: string, customLabel: string | null | undefined) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.setFieldCustomLabel.$1", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [ + "name of field to set custom label on" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.setFieldCustomLabel.$2", + "type": "CompoundType", + "tags": [], + "label": "customLabel", + "description": [ + "custom label value. If undefined, custom label is removed" + ], + "signature": [ + "string | null | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.setFieldCount", + "type": "Function", + "tags": [], + "label": "setFieldCount", + "description": [ + "\nSet field count" + ], + "signature": [ + "(fieldName: string, count: number | null | undefined) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.setFieldCount.$1", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [ + "name of field to set count on" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.setFieldCount.$2", + "type": "CompoundType", + "tags": [], + "label": "count", + "description": [ + "count value. If undefined, count is removed" + ], + "signature": [ + "number | null | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.setFieldFormat", + "type": "Function", + "tags": [], + "label": "setFieldFormat", + "description": [ + "\nSet field formatter" + ], + "signature": [ + "(fieldName: string, format: ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.SerializedFieldFormat", + "text": "SerializedFieldFormat" + }, + "<{}, ", + "SerializableRecord", + ">) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.setFieldFormat.$1", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [ + "name of field to set format on" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.setFieldFormat.$2", + "type": "Object", + "tags": [], + "label": "format", + "description": [ + "field format in serialized form" + ], + "signature": [ + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.SerializedFieldFormat", + "text": "SerializedFieldFormat" + }, + "<{}, ", + "SerializableRecord", + ">" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataView.deleteFieldFormat", + "type": "Function", + "tags": [], + "label": "deleteFieldFormat", + "description": [ + "\nRemove field format from the field format map." + ], + "signature": [ + "(fieldName: string) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataView.deleteFieldFormat.$1", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [ + "field name associated with the format for removal" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService", + "type": "Class", + "tags": [], + "label": "DataViewsService", + "description": [ + "\nData views service, providing CRUD operations for data views." + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getCanSave", + "type": "Function", + "tags": [], + "label": "getCanSave", + "description": [ + "\nCan the user save data views?" + ], + "signature": [ + "() => Promise" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [ + "\nDataViewsService constructor" + ], + "signature": [ + "any" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "deps", + "description": [ + "Service dependencies" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewsServiceDeps", + "text": "DataViewsServiceDeps" + } + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getIds", + "type": "Function", + "tags": [], + "label": "getIds", + "description": [ + "\nGets list of index pattern ids." + ], + "signature": [ + "(refresh?: boolean) => Promise" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getIds.$1", + "type": "boolean", + "tags": [], + "label": "refresh", + "description": [ + "Force refresh of index pattern list" + ], + "signature": [ + "boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getTitles", + "type": "Function", + "tags": [], + "label": "getTitles", + "description": [ + "\nGets list of index pattern titles." + ], + "signature": [ + "(refresh?: boolean) => Promise" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getTitles.$1", + "type": "boolean", + "tags": [], + "label": "refresh", + "description": [ + "Force refresh of index pattern list" + ], + "signature": [ + "boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.find", + "type": "Function", + "tags": [], + "label": "find", + "description": [ + "\nFind and load index patterns by title." + ], + "signature": [ + "(search: string, size?: number) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + "[]>" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.find.$1", + "type": "string", + "tags": [], + "label": "search", + "description": [ + "Search string" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.find.$2", + "type": "number", + "tags": [], + "label": "size", + "description": [ + "Number of data views to return" + ], + "signature": [ + "number" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [ + "DataView[]" + ] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getIdsWithTitle", + "type": "Function", + "tags": [], + "label": "getIdsWithTitle", + "description": [ + "\nGets list of index pattern ids with titles." + ], + "signature": [ + "(refresh?: boolean) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewListItem", + "text": "DataViewListItem" + }, + "[]>" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getIdsWithTitle.$1", + "type": "boolean", + "tags": [], + "label": "refresh", + "description": [ + "Force refresh of index pattern list" + ], + "signature": [ + "boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.clearCache", + "type": "Function", + "tags": [], + "label": "clearCache", + "description": [ + "\nClear index pattern saved objects cache." + ], + "signature": [ + "() => void" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.clearInstanceCache", + "type": "Function", + "tags": [], + "label": "clearInstanceCache", + "description": [ + "\nClear index pattern instance cache" + ], + "signature": [ + "(id?: string | undefined) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.clearInstanceCache.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getCache", + "type": "Function", + "tags": [], + "label": "getCache", + "description": [ + "\nGet cache, contains data view saved objects." + ], + "signature": [ + "() => Promise<", + "SavedObject", + "<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSavedObjectAttrs", + "text": "DataViewSavedObjectAttrs" + }, + ">[] | null | undefined>" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getDefault", + "type": "Function", + "tags": [], + "label": "getDefault", + "description": [ + "\nGet default index pattern" + ], + "signature": [ + "() => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | null>" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getDefaultId", + "type": "Function", + "tags": [], + "label": "getDefaultId", + "description": [ + "\nGet default index pattern id" + ], + "signature": [ + "() => Promise" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.setDefault", + "type": "Function", + "tags": [], + "label": "setDefault", + "description": [ + "\nOptionally set default index pattern, unless force = true" + ], + "signature": [ + "(id: string | null, force?: boolean) => Promise" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.setDefault.$1", + "type": "CompoundType", + "tags": [], + "label": "id", + "description": [ + "data view id" + ], + "signature": [ + "string | null" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.setDefault.$2", + "type": "boolean", + "tags": [], + "label": "force", + "description": [ + "set default data view even if there's an existing default" + ], + "signature": [ + "boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.hasUserDataView", + "type": "Function", + "tags": [], + "label": "hasUserDataView", + "description": [ + "\nChecks if current user has a user created index pattern ignoring fleet's server default index patterns." + ], + "signature": [ + "() => Promise" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getFieldsForWildcard", + "type": "Function", + "tags": [], + "label": "getFieldsForWildcard", + "description": [ + "\nGet field list by providing { pattern }." + ], + "signature": [ + "(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" + }, + "[]>" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getFieldsForWildcard.$1", + "type": "Object", + "tags": [], + "label": "options", + "description": [ + "options for getting field list" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.GetFieldsOptions", + "text": "GetFieldsOptions" + } + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [ + "FieldSpec[]" + ] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getFieldsForIndexPattern", + "type": "Function", + "tags": [], + "label": "getFieldsForIndexPattern", + "description": [ + "\nGet field list by providing an index patttern (or spec)." + ], + "signature": [ + "(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" + }, + "[]>" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getFieldsForIndexPattern.$1", + "type": "CompoundType", + "tags": [], + "label": "indexPattern", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" + } + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getFieldsForIndexPattern.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [ + "options for getting field list" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.GetFieldsOptions", + "text": "GetFieldsOptions" + }, + " | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [ + "FieldSpec[]" + ] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.refreshFields", + "type": "Function", + "tags": [], + "label": "refreshFields", + "description": [ + "\nRefresh field list for a given index pattern." + ], + "signature": [ + "(indexPattern: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ") => Promise" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.refreshFields.$1", + "type": "Object", + "tags": [], + "label": "indexPattern", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + } + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.fieldArrayToMap", + "type": "Function", + "tags": [], + "label": "fieldArrayToMap", + "description": [ + "\nConverts field array to map." + ], + "signature": [ + "(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" + } + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.fieldArrayToMap.$1", + "type": "Array", + "tags": [], + "label": "fields", + "description": [ + ": FieldSpec[]" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldSpec", + "text": "FieldSpec" + }, + "[]" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.fieldArrayToMap.$2", + "type": "Object", + "tags": [], + "label": "fieldAttrs", + "description": [ + ": FieldAttrs" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldAttrs", + "text": "FieldAttrs" + }, + " | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [ + "Record" + ] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.savedObjectToSpec", + "type": "Function", + "tags": [], + "label": "savedObjectToSpec", + "description": [ + "\nConverts data view saved object to data view spec." + ], + "signature": [ + "(savedObject: ", + "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" + } + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.savedObjectToSpec.$1", + "type": "Object", + "tags": [], + "label": "savedObject", + "description": [], + "signature": [ + "SavedObject", + "<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + }, + ">" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [ + "DataViewSpec" + ] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.get", + "type": "Function", + "tags": [], + "label": "get", + "description": [ + "\nGet an index pattern by id, cache optimized." + ], + "signature": [ + "(id: string) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ">" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.get.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [ + "\nCreate a new data view instance." + ], + "signature": [ + "({ id, name, title, ...restOfSpec }: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" + }, + ", skipFetchFields?: boolean) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ">" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.create.$1", + "type": "Object", + "tags": [], + "label": "{ id, name, title, ...restOfSpec }", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" + } + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.create.$2", + "type": "boolean", + "tags": [], + "label": "skipFetchFields", + "description": [ + "if true, will not fetch fields" + ], + "signature": [ + "boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [ + "DataView" + ] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.createAndSave", + "type": "Function", + "tags": [], + "label": "createAndSave", + "description": [ + "\nCreate a new data view and save it right away." + ], + "signature": [ + "(spec: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" + }, + ", override?: boolean, skipFetchFields?: boolean) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ">" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.createAndSave.$1", + "type": "Object", + "tags": [], + "label": "spec", + "description": [ + "data view spec" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" + } + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.createAndSave.$2", + "type": "boolean", + "tags": [], + "label": "override", + "description": [ + "Overwrite if existing index pattern exists." + ], + "signature": [ + "boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.createAndSave.$3", + "type": "boolean", + "tags": [], + "label": "skipFetchFields", + "description": [ + "Whether to skip field refresh step." + ], + "signature": [ + "boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.createSavedObject", + "type": "Function", + "tags": [], + "label": "createSavedObject", + "description": [ + "\nSave a new data view." + ], + "signature": [ + "(dataView: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ", override?: boolean) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ">" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.createSavedObject.$1", + "type": "Object", + "tags": [], + "label": "dataView", + "description": [ + "data view instance" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + } + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.createSavedObject.$2", + "type": "boolean", + "tags": [], + "label": "override", + "description": [ + "Overwrite if existing index pattern exists" + ], + "signature": [ + "boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.updateSavedObject", + "type": "Function", + "tags": [], + "label": "updateSavedObject", + "description": [ + "\nSave existing data view. Will attempt to merge differences if there are conflicts." + ], + "signature": [ + "(indexPattern: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ", saveAttempts?: number, ignoreErrors?: boolean) => Promise" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.updateSavedObject.$1", + "type": "Object", + "tags": [], + "label": "indexPattern", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + } + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.updateSavedObject.$2", + "type": "number", + "tags": [], + "label": "saveAttempts", + "description": [], + "signature": [ + "number" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.updateSavedObject.$3", + "type": "boolean", + "tags": [], + "label": "ignoreErrors", + "description": [], + "signature": [ + "boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.delete", + "type": "Function", + "tags": [], + "label": "delete", + "description": [ + "\nDeletes an index pattern from .kibana index." + ], + "signature": [ + "(indexPatternId: string) => Promise<{}>" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.delete.$1", + "type": "string", + "tags": [], + "label": "indexPatternId", + "description": [ + ": Id of kibana Index Pattern to delete" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsService.getDefaultDataView", + "type": "Function", + "tags": [], + "label": "getDefaultDataView", + "description": [ + "\nReturns the default data view as an object.\nIf no default is found, or it is missing\nanother data view is selected as default and returned.\nIf no possible data view found to become a default returns null.\n" + ], + "signature": [ + "() => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | null>" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [ + "default data view" + ] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-server.IndexPatternsFetcher", + "type": "Class", + "tags": [], + "label": "IndexPatternsFetcher", + "description": [], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.IndexPatternsFetcher.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.IndexPatternsFetcher.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "elasticsearchClient", + "description": [], + "signature": [ + "ElasticsearchClient" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.IndexPatternsFetcher.Unnamed.$2", + "type": "boolean", + "tags": [], + "label": "allowNoIndices", + "description": [], + "signature": [ + "boolean" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard", + "type": "Function", + "tags": [ + "property", + "property", + "return" + ], + "label": "getFieldsForWildcard", + "description": [ + "\n Get a list of field objects for an index pattern that may contain wildcards\n" + ], + "signature": [ + "(options: { pattern: string | string[]; metaFields?: string[] | undefined; fieldCapsOptions?: { allow_no_indices: boolean; } | undefined; type?: string | undefined; rollupIndex?: string | undefined; filter?: ", + "QueryDslQueryContainer", + " | undefined; }) => Promise<{ fields: ", + { + "pluginId": "dataViews", + "scope": "server", + "docId": "kibDataViewsPluginApi", + "section": "def-server.FieldDescriptor", + "text": "FieldDescriptor" + }, + "[]; indices: string[]; }>" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.pattern", + "type": "CompoundType", + "tags": [], + "label": "pattern", + "description": [], + "signature": [ + "string | string[]" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.metaFields", + "type": "Array", + "tags": [], + "label": "metaFields", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.fieldCapsOptions", + "type": "Object", + "tags": [], + "label": "fieldCapsOptions", + "description": [], + "signature": [ + "{ allow_no_indices: boolean; } | undefined" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.rollupIndex", + "type": "string", + "tags": [], + "label": "rollupIndex", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.IndexPatternsFetcher.getFieldsForWildcard.$1.filter", + "type": "Object", + "tags": [], + "label": "filter", + "description": [], + "signature": [ + "QueryDslQueryContainer", + " | undefined" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-server.IndexPatternsFetcher.validatePatternListActive", + "type": "Function", + "tags": [ + "return" + ], + "label": "validatePatternListActive", + "description": [ + "\n Returns an index pattern list of only those index pattern strings in the given list that return indices\n" + ], + "signature": [ + "(patternList: string[]) => Promise" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.IndexPatternsFetcher.validatePatternListActive.$1", + "type": "Array", + "tags": [], + "label": "patternList", + "description": [ + "string[]" + ], + "signature": [ + "string[]" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [ + { + "parentPluginId": "data", + "id": "def-server.getCapabilitiesForRollupIndices", + "type": "Function", + "tags": [], + "label": "getCapabilitiesForRollupIndices", + "description": [ + "\nGet rollup job capabilities" + ], + "signature": [ + "(indices: ", + "RollupGetRollupIndexCapsResponse", + ") => ", + { + "pluginId": "dataViews", + "scope": "server", + "docId": "kibDataViewsPluginApi", + "section": "def-server.RollupIndexCapability", + "text": "RollupIndexCapability" + } + ], + "path": "src/plugins/data_views/server/fetcher/lib/map_capabilities.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.getCapabilitiesForRollupIndices.$1", + "type": "Object", + "tags": [], + "label": "indices", + "description": [ + "rollup job index capabilites" + ], + "signature": [ + "RollupGetRollupIndexCapsResponse" + ], + "path": "src/plugins/data_views/server/fetcher/lib/map_capabilities.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-server.getEsQueryConfig", + "type": "Function", + "tags": [], + "label": "getEsQueryConfig", + "description": [], + "signature": [ + "(config: KibanaConfig) => ", + "EsQueryConfig" + ], + "path": "src/plugins/data/common/es_query/get_es_query_config.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.getEsQueryConfig.$1", + "type": "Object", + "tags": [], + "label": "config", + "description": [], + "signature": [ + "KibanaConfig" + ], + "path": "src/plugins/data/common/es_query/get_es_query_config.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-server.getRequestAbortedSignal", + "type": "Function", + "tags": [], + "label": "getRequestAbortedSignal", + "description": [ + "\nA simple utility function that returns an `AbortSignal` corresponding to an `AbortController`\nwhich aborts when the given request is aborted." + ], + "signature": [ + "(aborted$: ", + "Observable", + ") => AbortSignal" + ], + "path": "src/plugins/data/server/lib/get_request_aborted_signal.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.getRequestAbortedSignal.$1", + "type": "Object", + "tags": [], + "label": "aborted$", + "description": [ + "The observable of abort events (usually `request.events.aborted$`)" + ], + "signature": [ + "Observable", + "" + ], + "path": "src/plugins/data/server/lib/get_request_aborted_signal.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-server.getTime", + "type": "Function", + "tags": [], + "label": "getTime", + "description": [], + "signature": [ + "(indexPattern: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined, timeRange: ", + "TimeRange", + ", options: { forceNow?: Date | undefined; fieldName?: string | undefined; } | undefined) => ", + "RangeFilter", + " | ", + "ScriptedRangeFilter", + " | ", + "MatchAllRangeFilter", + " | undefined" + ], + "path": "src/plugins/data/common/query/timefilter/get_time.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.getTime.$1", + "type": "Object", + "tags": [], + "label": "indexPattern", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined" + ], + "path": "src/plugins/data/common/query/timefilter/get_time.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "data", + "id": "def-server.getTime.$2", + "type": "Object", + "tags": [], + "label": "timeRange", + "description": [], + "signature": [ + "TimeRange" + ], + "path": "src/plugins/data/common/query/timefilter/get_time.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-server.getTime.$3", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "path": "src/plugins/data/common/query/timefilter/get_time.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.getTime.$3.forceNow", + "type": "Object", + "tags": [], + "label": "forceNow", + "description": [], + "signature": [ + "Date | undefined" + ], + "path": "src/plugins/data/common/query/timefilter/get_time.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.getTime.$3.fieldName", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data/common/query/timefilter/get_time.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-server.parseInterval", + "type": "Function", + "tags": [], + "label": "parseInterval", + "description": [], + "signature": [ + "(interval: string) => moment.Duration | null" + ], + "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/parse_interval.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.parseInterval.$1", + "type": "string", + "tags": [], + "label": "interval", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/parse_interval.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsServerPluginStart", + "type": "Interface", + "tags": [], + "label": "DataViewsServerPluginStart", + "description": [ + "\nDataViews server plugin start api" + ], + "path": "src/plugins/data_views/server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsServerPluginStart.dataViewsServiceFactory", + "type": "Function", + "tags": [], + "label": "dataViewsServiceFactory", + "description": [ + "\nReturns a DataViews service instance" + ], + "signature": [ + "(savedObjectsClient: ", + "SavedObjectsClientContract", + ", elasticsearchClient: ", + "ElasticsearchClient", + ", request?: ", + "KibanaRequest", + " | undefined, byPassCapabilities?: boolean | undefined) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewsService", + "text": "DataViewsService" + }, + ">" + ], + "path": "src/plugins/data_views/server/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataViewsServerPluginStart.dataViewsServiceFactory.$1", + "type": "Object", + "tags": [], + "label": "savedObjectsClient", + "description": [], + "signature": [ + "SavedObjectsClientContract" + ], + "path": "src/plugins/data_views/server/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsServerPluginStart.dataViewsServiceFactory.$2", + "type": "Object", + "tags": [], + "label": "elasticsearchClient", + "description": [], + "signature": [ + "{ name: string | symbol; get: { (this: That, params: ", + "GetRequest", + " | ", + "GetRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "GetResponse", + ">; (this: That, params: ", + "GetRequest", + " | ", + "GetRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "GetResponse", + ", unknown>>; (this: That, params: ", + "GetRequest", + " | ", + "GetRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "GetResponse", + ">; }; delete: { (this: That, params: ", + "DeleteRequest", + " | ", + "DeleteRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "WriteResponseBase", + ">; (this: That, params: ", + "DeleteRequest", + " | ", + "DeleteRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "WriteResponseBase", + ", unknown>>; (this: That, params: ", + "DeleteRequest", + " | ", + "DeleteRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "WriteResponseBase", + ">; }; cluster: ", + "default", + "; eql: ", + "default", + "; search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", + "CreateRequest", + " | ", + "CreateRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "WriteResponseBase", + ">; (this: That, params: ", + "CreateRequest", + " | ", + "CreateRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "WriteResponseBase", + ", unknown>>; (this: That, params: ", + "CreateRequest", + " | ", "CreateRequest", ", options?: ", "TransportRequestOptions", @@ -15691,7 +16593,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -15701,8 +16605,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", @@ -16717,584 +17619,1581 @@ }, { "parentPluginId": "data", - "id": "def-server.DataViewsServerPluginStart.dataViewsServiceFactory.$3", + "id": "def-server.DataViewsServerPluginStart.dataViewsServiceFactory.$3", + "type": "Object", + "tags": [], + "label": "request", + "description": [], + "signature": [ + "KibanaRequest", + " | undefined" + ], + "path": "src/plugins/data_views/server/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataViewsServerPluginStart.dataViewsServiceFactory.$4", + "type": "CompoundType", + "tags": [], + "label": "byPassCapabilities", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/data_views/server/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-server.FieldDescriptor", + "type": "Interface", + "tags": [], + "label": "FieldDescriptor", + "description": [], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.FieldDescriptor.aggregatable", + "type": "boolean", + "tags": [], + "label": "aggregatable", + "description": [], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.FieldDescriptor.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.FieldDescriptor.readFromDocValues", + "type": "boolean", + "tags": [], + "label": "readFromDocValues", + "description": [], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.FieldDescriptor.searchable", + "type": "boolean", + "tags": [], + "label": "searchable", + "description": [], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.FieldDescriptor.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.FieldDescriptor.esTypes", + "type": "Array", + "tags": [], + "label": "esTypes", + "description": [], + "signature": [ + "string[]" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.FieldDescriptor.subType", + "type": "Object", + "tags": [], + "label": "subType", + "description": [], + "signature": [ + "FieldSubType | undefined" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.FieldDescriptor.metadata_field", + "type": "CompoundType", + "tags": [], + "label": "metadata_field", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.FieldDescriptor.fixedInterval", + "type": "Array", + "tags": [], + "label": "fixedInterval", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.FieldDescriptor.timeZone", + "type": "Array", + "tags": [], + "label": "timeZone", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.FieldDescriptor.timeSeriesMetric", + "type": "CompoundType", + "tags": [], + "label": "timeSeriesMetric", + "description": [], + "signature": [ + "\"gauge\" | \"histogram\" | \"summary\" | \"counter\" | undefined" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.FieldDescriptor.timeSeriesDimension", + "type": "CompoundType", + "tags": [], + "label": "timeSeriesDimension", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-server.IEsSearchRequest", + "type": "Interface", + "tags": [], + "label": "IEsSearchRequest", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IEsSearchRequest", + "text": "IEsSearchRequest" + }, + " extends ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IKibanaSearchRequest", + "text": "IKibanaSearchRequest" + }, + "<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.ISearchRequestParams", + "text": "ISearchRequestParams" + }, + ">" + ], + "path": "src/plugins/data/common/search/strategies/es_search/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.IEsSearchRequest.indexType", + "type": "string", + "tags": [], + "label": "indexType", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data/common/search/strategies/es_search/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-server.ISearchOptions", + "type": "Interface", + "tags": [], + "label": "ISearchOptions", + "description": [], + "path": "src/plugins/data/common/search/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.ISearchOptions.abortSignal", + "type": "Object", + "tags": [], + "label": "abortSignal", + "description": [ + "\nAn `AbortSignal` that allows the caller of `search` to abort a search request." + ], + "signature": [ + "AbortSignal | undefined" + ], + "path": "src/plugins/data/common/search/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.ISearchOptions.strategy", + "type": "string", + "tags": [], + "label": "strategy", + "description": [ + "\nUse this option to force using a specific server side search strategy. Leave empty to use the default strategy." + ], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data/common/search/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.ISearchOptions.legacyHitsTotal", + "type": "CompoundType", + "tags": [], + "label": "legacyHitsTotal", + "description": [ + "\nRequest the legacy format for the total number of hits. If sending `rest_total_hits_as_int` to\nsomething other than `true`, this should be set to `false`." + ], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/data/common/search/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.ISearchOptions.sessionId", + "type": "string", + "tags": [], + "label": "sessionId", + "description": [ + "\nA session ID, grouping multiple search requests into a single session." + ], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data/common/search/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.ISearchOptions.isStored", + "type": "CompoundType", + "tags": [], + "label": "isStored", + "description": [ + "\nWhether the session is already saved (i.e. sent to background)" + ], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/data/common/search/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.ISearchOptions.isSearchStored", + "type": "CompoundType", + "tags": [], + "label": "isSearchStored", + "description": [ + "\nWhether the search was successfully polled after session was saved. Search was added to a session saved object and keepAlive extended." + ], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/data/common/search/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.ISearchOptions.isRestore", + "type": "CompoundType", + "tags": [], + "label": "isRestore", + "description": [ + "\nWhether the session is restored (i.e. search requests should re-use the stored search IDs,\nrather than starting from scratch)" + ], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/data/common/search/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.ISearchOptions.executionContext", + "type": "Object", + "tags": [], + "label": "executionContext", + "description": [ + "\nRepresents a meta-information about a Kibana entity intitating a saerch request." + ], + "signature": [ + "KibanaExecutionContext", + " | undefined" + ], + "path": "src/plugins/data/common/search/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.ISearchOptions.indexPattern", + "type": "Object", + "tags": [], + "label": "indexPattern", + "description": [ + "\nIndex pattern reference is used for better error messages" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined" + ], + "path": "src/plugins/data/common/search/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.ISearchOptions.transport", + "type": "Object", + "tags": [], + "label": "transport", + "description": [ + "\nTransportRequestOptions, other than `signal`, to pass through to the ES client.\nTo pass an abort signal, use {@link ISearchOptions.abortSignal}" + ], + "signature": [ + "Omit<", + "TransportRequestOptions", + ", \"signal\"> | undefined" + ], + "path": "src/plugins/data/common/search/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [ + { + "parentPluginId": "data", + "id": "def-server.ES_FIELD_TYPES", + "type": "Enum", + "tags": [], + "label": "ES_FIELD_TYPES", + "description": [], + "signature": [ + "ES_FIELD_TYPES" + ], + "path": "node_modules/@types/kbn__field-types/index.d.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-server.KBN_FIELD_TYPES", + "type": "Enum", + "tags": [], + "label": "KBN_FIELD_TYPES", + "description": [], + "signature": [ + "KBN_FIELD_TYPES" + ], + "path": "node_modules/@types/kbn__field-types/index.d.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-server.METRIC_TYPES", + "type": "Enum", + "tags": [], + "label": "METRIC_TYPES", + "description": [], + "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "misc": [ + { + "parentPluginId": "data", + "id": "def-server.DEFAULT_QUERY_LANGUAGE", + "type": "string", + "tags": [], + "label": "DEFAULT_QUERY_LANGUAGE", + "description": [], + "signature": [ + "\"kuery\"" + ], + "path": "src/plugins/data/common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-server.ES_SEARCH_STRATEGY", + "type": "string", + "tags": [], + "label": "ES_SEARCH_STRATEGY", + "description": [], + "signature": [ + "\"es\"" + ], + "path": "src/plugins/data/common/search/strategies/es_search/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-server.IEsSearchResponse", + "type": "Type", + "tags": [], + "label": "IEsSearchResponse", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IKibanaSearchResponse", + "text": "IKibanaSearchResponse" + }, + "<", + "SearchResponse", + ">>" + ], + "path": "src/plugins/data/common/search/strategies/es_search/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-server.ParsedInterval", + "type": "Type", + "tags": [], + "label": "ParsedInterval", + "description": [], + "signature": [ + "{ value: number; unit: ", + "Unit", + "; type: \"fixed\" | \"calendar\"; }" + ], + "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/parse_es_interval.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "data", + "id": "def-server.exporters", + "type": "Object", + "tags": [], + "label": "exporters", + "description": [], + "path": "src/plugins/data/server/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.exporters.datatableToCSV", + "type": "Function", + "tags": [], + "label": "datatableToCSV", + "description": [], + "signature": [ + "({ columns, rows }: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.Datatable", + "text": "Datatable" + }, + ", { csvSeparator, quoteValues, formatFactory, raw, escapeFormulaValues }: CSVOptions) => string" + ], + "path": "src/plugins/data/server/index.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "data", + "id": "def-server.exporters.datatableToCSV.$1", "type": "Object", "tags": [], - "label": "request", + "label": "__0", "description": [], "signature": [ - "KibanaRequest", - " | undefined" + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.Datatable", + "text": "Datatable" + } ], - "path": "src/plugins/data_views/server/types.ts", + "path": "src/plugins/data/common/exports/export_csv.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "data", - "id": "def-server.DataViewsServerPluginStart.dataViewsServiceFactory.$4", - "type": "CompoundType", + "id": "def-server.exporters.datatableToCSV.$2", + "type": "Object", "tags": [], - "label": "byPassCapabilities", + "label": "__1", "description": [], "signature": [ - "boolean | undefined" + "CSVOptions" ], - "path": "src/plugins/data_views/server/types.ts", + "path": "src/plugins/data/common/exports/export_csv.tsx", "deprecated": false, "trackAdoption": false } ] + }, + { + "parentPluginId": "data", + "id": "def-server.exporters.CSV_MIME_TYPE", + "type": "string", + "tags": [], + "label": "CSV_MIME_TYPE", + "description": [], + "path": "src/plugins/data/server/index.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false }, { "parentPluginId": "data", - "id": "def-server.FieldDescriptor", - "type": "Interface", + "id": "def-server.search", + "type": "Object", "tags": [], - "label": "FieldDescriptor", + "label": "search", "description": [], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "path": "src/plugins/data/server/index.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "data", - "id": "def-server.FieldDescriptor.aggregatable", - "type": "boolean", - "tags": [], - "label": "aggregatable", - "description": [], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.FieldDescriptor.name", - "type": "string", - "tags": [], - "label": "name", - "description": [], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.FieldDescriptor.readFromDocValues", - "type": "boolean", - "tags": [], - "label": "readFromDocValues", - "description": [], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.FieldDescriptor.searchable", - "type": "boolean", - "tags": [], - "label": "searchable", - "description": [], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.FieldDescriptor.type", - "type": "string", - "tags": [], - "label": "type", - "description": [], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.FieldDescriptor.esTypes", - "type": "Array", - "tags": [], - "label": "esTypes", - "description": [], - "signature": [ - "string[]" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.FieldDescriptor.subType", + "id": "def-server.search.aggs", "type": "Object", "tags": [], - "label": "subType", - "description": [], - "signature": [ - "FieldSubType | undefined" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.FieldDescriptor.metadata_field", - "type": "CompoundType", - "tags": [], - "label": "metadata_field", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.FieldDescriptor.fixedInterval", - "type": "Array", - "tags": [], - "label": "fixedInterval", - "description": [], - "signature": [ - "string[] | undefined" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.FieldDescriptor.timeZone", - "type": "Array", - "tags": [], - "label": "timeZone", - "description": [], - "signature": [ - "string[] | undefined" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.FieldDescriptor.timeSeriesMetric", - "type": "CompoundType", - "tags": [], - "label": "timeSeriesMetric", - "description": [], - "signature": [ - "\"gauge\" | \"histogram\" | \"summary\" | \"counter\" | undefined" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.FieldDescriptor.timeSeriesDimension", - "type": "CompoundType", - "tags": [], - "label": "timeSeriesDimension", + "label": "aggs", "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data_views/server/fetcher/index_patterns_fetcher.ts", + "path": "src/plugins/data/server/index.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.search.aggs.CidrMask", + "type": "Object", + "tags": [], + "label": "CidrMask", + "description": [], + "signature": [ + "typeof ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.CidrMask", + "text": "CidrMask" + } + ], + "path": "src/plugins/data/server/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.search.aggs.dateHistogramInterval", + "type": "Function", + "tags": [], + "label": "dateHistogramInterval", + "description": [], + "signature": [ + "(interval: string, shouldForceFixed?: boolean | undefined) => Interval" + ], + "path": "src/plugins/data/server/index.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "data", + "id": "def-server.search.aggs.dateHistogramInterval.$1", + "type": "string", + "tags": [], + "label": "interval", + "description": [], + "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/date_histogram_interval.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.search.aggs.dateHistogramInterval.$2", + "type": "CompoundType", + "tags": [], + "label": "shouldForceFixed", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/date_histogram_interval.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "data", + "id": "def-server.search.aggs.IpAddress", + "type": "Object", + "tags": [], + "label": "IpAddress", + "description": [], + "signature": [ + "typeof ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IpAddress", + "text": "IpAddress" + } + ], + "path": "src/plugins/data/server/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.search.aggs.parseInterval", + "type": "Function", + "tags": [], + "label": "parseInterval", + "description": [], + "signature": [ + "(interval: string) => moment.Duration | null" + ], + "path": "src/plugins/data/server/index.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "data", + "id": "def-server.search.aggs.parseInterval.$1", + "type": "string", + "tags": [], + "label": "interval", + "description": [], + "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/parse_interval.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "data", + "id": "def-server.search.aggs.calcAutoIntervalLessThan", + "type": "Function", + "tags": [], + "label": "calcAutoIntervalLessThan", + "description": [], + "signature": [ + "(maxBucketCount: number, duration: number) => moment.Duration" + ], + "path": "src/plugins/data/server/index.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "data", + "id": "def-server.search.aggs.calcAutoIntervalLessThan.$1", + "type": "number", + "tags": [], + "label": "maxBucketCount", + "description": [], + "path": "src/plugins/data/common/search/aggs/buckets/lib/time_buckets/calc_auto_interval.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.search.aggs.calcAutoIntervalLessThan.$2", + "type": "number", + "tags": [], + "label": "duration", + "description": [], + "path": "src/plugins/data/common/search/aggs/buckets/lib/time_buckets/calc_auto_interval.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ] } ], "initialIsOpen": false }, { "parentPluginId": "data", - "id": "def-server.IEsSearchRequest", - "type": "Interface", + "id": "def-server.UI_SETTINGS", + "type": "Object", + "tags": [], + "label": "UI_SETTINGS", + "description": [], + "signature": [ + "{ readonly META_FIELDS: \"metaFields\"; readonly DOC_HIGHLIGHT: \"doc_table:highlight\"; readonly QUERY_STRING_OPTIONS: \"query:queryString:options\"; readonly QUERY_ALLOW_LEADING_WILDCARDS: \"query:allowLeadingWildcards\"; readonly SEARCH_QUERY_LANGUAGE: \"search:queryLanguage\"; readonly SORT_OPTIONS: \"sort:options\"; readonly COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: \"courier:ignoreFilterIfFieldNotInIndex\"; readonly COURIER_SET_REQUEST_PREFERENCE: \"courier:setRequestPreference\"; readonly COURIER_CUSTOM_REQUEST_PREFERENCE: \"courier:customRequestPreference\"; readonly COURIER_MAX_CONCURRENT_SHARD_REQUESTS: \"courier:maxConcurrentShardRequests\"; readonly SEARCH_INCLUDE_FROZEN: \"search:includeFrozen\"; readonly SEARCH_TIMEOUT: \"search:timeout\"; readonly HISTOGRAM_BAR_TARGET: \"histogram:barTarget\"; readonly HISTOGRAM_MAX_BARS: \"histogram:maxBars\"; readonly HISTORY_LIMIT: \"history:limit\"; readonly TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: \"timepicker:refreshIntervalDefaults\"; readonly TIMEPICKER_QUICK_RANGES: \"timepicker:quickRanges\"; readonly TIMEPICKER_TIME_DEFAULTS: \"timepicker:timeDefaults\"; readonly FILTERS_PINNED_BY_DEFAULT: \"filters:pinnedByDefault\"; readonly FILTERS_EDITOR_SUGGEST_VALUES: \"filterEditor:suggestValues\"; readonly AUTOCOMPLETE_USE_TIMERANGE: \"autocomplete:useTimeRange\"; readonly AUTOCOMPLETE_VALUE_SUGGESTION_METHOD: \"autocomplete:valueSuggestionMethod\"; readonly DATE_FORMAT: \"dateFormat\"; readonly DATEFORMAT_TZ: \"dateFormat:tz\"; }" + ], + "path": "src/plugins/data/common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "setup": { + "parentPluginId": "data", + "id": "def-server.DataPluginSetup", + "type": "Interface", + "tags": [], + "label": "DataPluginSetup", + "description": [], + "path": "src/plugins/data/server/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataPluginSetup.search", + "type": "Object", + "tags": [], + "label": "search", + "description": [], + "signature": [ + "ISearchSetup" + ], + "path": "src/plugins/data/server/plugin.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataPluginSetup.query", + "type": "Object", + "tags": [], + "label": "query", + "description": [], + "signature": [ + "QuerySetup" + ], + "path": "src/plugins/data/server/plugin.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataPluginSetup.fieldFormats", + "type": "Object", + "tags": [ + "deprecated" + ], + "label": "fieldFormats", + "description": [], + "signature": [ + { + "pluginId": "fieldFormats", + "scope": "server", + "docId": "kibFieldFormatsPluginApi", + "section": "def-server.FieldFormatsSetup", + "text": "FieldFormatsSetup" + } + ], + "path": "src/plugins/data/server/plugin.ts", + "deprecated": true, + "trackAdoption": false, + "references": [] + } + ], + "lifecycle": "setup", + "initialIsOpen": true + }, + "start": { + "parentPluginId": "data", + "id": "def-server.DataPluginStart", + "type": "Interface", + "tags": [], + "label": "DataPluginStart", + "description": [], + "path": "src/plugins/data/server/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-server.DataPluginStart.search", + "type": "Object", + "tags": [], + "label": "search", + "description": [], + "signature": [ + "ISearchStart", + "<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IEsSearchRequest", + "text": "IEsSearchRequest" + }, + ", ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" + }, + ">" + ], + "path": "src/plugins/data/server/plugin.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataPluginStart.fieldFormats", + "type": "Object", + "tags": [ + "deprecated" + ], + "label": "fieldFormats", + "description": [], + "signature": [ + { + "pluginId": "fieldFormats", + "scope": "server", + "docId": "kibFieldFormatsPluginApi", + "section": "def-server.FieldFormatsStart", + "text": "FieldFormatsStart" + } + ], + "path": "src/plugins/data/server/plugin.ts", + "deprecated": true, + "trackAdoption": false, + "references": [] + }, + { + "parentPluginId": "data", + "id": "def-server.DataPluginStart.indexPatterns", + "type": "Object", + "tags": [], + "label": "indexPatterns", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "server", + "docId": "kibDataViewsPluginApi", + "section": "def-server.DataViewsServerPluginStart", + "text": "DataViewsServerPluginStart" + } + ], + "path": "src/plugins/data/server/plugin.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-server.DataPluginStart.datatableUtilities", + "type": "Object", + "tags": [], + "label": "datatableUtilities", + "description": [ + "\nDatatable type utility functions." + ], + "signature": [ + "DatatableUtilitiesService" + ], + "path": "src/plugins/data/server/plugin.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "lifecycle": "start", + "initialIsOpen": true + } + }, + "common": { + "classes": [ + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService", + "type": "Class", "tags": [], - "label": "IEsSearchRequest", + "label": "DatatableUtilitiesService", "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IEsSearchRequest", - "text": "IEsSearchRequest" - }, - " extends ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchRequest", - "text": "IKibanaSearchRequest" - }, - "<", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchRequestParams", - "text": "ISearchRequestParams" - }, - ">" - ], - "path": "src/plugins/data/common/search/strategies/es_search/types.ts", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "data", - "id": "def-server.IEsSearchRequest.indexType", - "type": "string", + "id": "def-common.DatatableUtilitiesService.Unnamed", + "type": "Function", "tags": [], - "label": "indexType", + "label": "Constructor", "description": [], "signature": [ - "string | undefined" + "any" ], - "path": "src/plugins/data/common/search/strategies/es_search/types.ts", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.ISearchOptions", - "type": "Interface", - "tags": [], - "label": "ISearchOptions", - "description": [], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-server.ISearchOptions.abortSignal", - "type": "Object", - "tags": [], - "label": "abortSignal", - "description": [ - "\nAn `AbortSignal` that allows the caller of `search` to abort a search request." - ], - "signature": [ - "AbortSignal | undefined" + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "aggs", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.AggsCommonStart", + "text": "AggsCommonStart" + } + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.Unnamed.$2", + "type": "Object", + "tags": [], + "label": "dataViews", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewsContract", + "text": "DataViewsContract" + } + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.Unnamed.$3", + "type": "Object", + "tags": [], + "label": "fieldFormats", + "description": [], + "signature": [ + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatsStartCommon", + "text": "FieldFormatsStartCommon" + } + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false + "returnComment": [] }, { "parentPluginId": "data", - "id": "def-server.ISearchOptions.strategy", - "type": "string", + "id": "def-common.DatatableUtilitiesService.clearField", + "type": "Function", "tags": [], - "label": "strategy", - "description": [ - "\nUse this option to force using a specific server side search strategy. Leave empty to use the default strategy." - ], + "label": "clearField", + "description": [], "signature": [ - "string | undefined" + "(column: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + }, + ") => void" ], - "path": "src/plugins/data/common/search/types.ts", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.clearField.$1", + "type": "Object", + "tags": [], + "label": "column", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + } + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] }, { "parentPluginId": "data", - "id": "def-server.ISearchOptions.legacyHitsTotal", - "type": "CompoundType", + "id": "def-common.DatatableUtilitiesService.clearFieldFormat", + "type": "Function", "tags": [], - "label": "legacyHitsTotal", - "description": [ - "\nRequest the legacy format for the total number of hits. If sending `rest_total_hits_as_int` to\nsomething other than `true`, this should be set to `false`." - ], + "label": "clearFieldFormat", + "description": [], "signature": [ - "boolean | undefined" + "(column: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + }, + ") => void" + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.clearFieldFormat.$1", + "type": "Object", + "tags": [], + "label": "column", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + } + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false + "returnComment": [] }, { "parentPluginId": "data", - "id": "def-server.ISearchOptions.sessionId", - "type": "string", + "id": "def-common.DatatableUtilitiesService.getAggConfig", + "type": "Function", "tags": [], - "label": "sessionId", - "description": [ - "\nA session ID, grouping multiple search requests into a single session." - ], + "label": "getAggConfig", + "description": [], "signature": [ - "string | undefined" + "(column: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + }, + ") => Promise<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.AggConfig", + "text": "AggConfig" + }, + " | undefined>" ], - "path": "src/plugins/data/common/search/types.ts", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.getAggConfig.$1", + "type": "Object", + "tags": [], + "label": "column", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + } + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] }, { "parentPluginId": "data", - "id": "def-server.ISearchOptions.isStored", - "type": "CompoundType", + "id": "def-common.DatatableUtilitiesService.getDateHistogramMeta", + "type": "Function", "tags": [], - "label": "isStored", + "label": "getDateHistogramMeta", "description": [ - "\nWhether the session is already saved (i.e. sent to background)" + "\nHelper function returning the used interval, used time zone and applied time filters for data table column created by the date_histogramm agg type.\n\"auto\" will get expanded to the actually used interval.\nIf the column is not a column created by a date_histogram aggregation of the esaggs data source,\nthis function will return undefined." ], "signature": [ - "boolean | undefined" + "(column: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + }, + ", defaults?: Partial<{ timeZone: string; }>) => DateHistogramMeta | undefined" ], - "path": "src/plugins/data/common/search/types.ts", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.getDateHistogramMeta.$1", + "type": "Object", + "tags": [], + "label": "column", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + } + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.getDateHistogramMeta.$2", + "type": "Object", + "tags": [], + "label": "defaults", + "description": [], + "signature": [ + "Partial<{ timeZone: string; }>" + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] }, { "parentPluginId": "data", - "id": "def-server.ISearchOptions.isSearchStored", - "type": "CompoundType", + "id": "def-common.DatatableUtilitiesService.getDataView", + "type": "Function", "tags": [], - "label": "isSearchStored", - "description": [ - "\nWhether the search was successfully polled after session was saved. Search was added to a session saved object and keepAlive extended." - ], + "label": "getDataView", + "description": [], "signature": [ - "boolean | undefined" + "(column: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + }, + ") => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined>" ], - "path": "src/plugins/data/common/search/types.ts", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.getDataView.$1", + "type": "Object", + "tags": [], + "label": "column", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + } + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] }, { "parentPluginId": "data", - "id": "def-server.ISearchOptions.isRestore", - "type": "CompoundType", + "id": "def-common.DatatableUtilitiesService.getField", + "type": "Function", "tags": [], - "label": "isRestore", - "description": [ - "\nWhether the session is restored (i.e. search requests should re-use the stored search IDs,\nrather than starting from scratch)" - ], + "label": "getField", + "description": [], "signature": [ - "boolean | undefined" + "(column: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + }, + ") => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + " | undefined>" ], - "path": "src/plugins/data/common/search/types.ts", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.getField.$1", + "type": "Object", + "tags": [], + "label": "column", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + } + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] }, { "parentPluginId": "data", - "id": "def-server.ISearchOptions.executionContext", - "type": "Object", + "id": "def-common.DatatableUtilitiesService.getFieldFormat", + "type": "Function", "tags": [], - "label": "executionContext", - "description": [ - "\nRepresents a meta-information about a Kibana entity intitating a saerch request." - ], + "label": "getFieldFormat", + "description": [], "signature": [ - "KibanaExecutionContext", + "(column: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + }, + ") => ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormat", + "text": "FieldFormat" + }, " | undefined" ], - "path": "src/plugins/data/common/search/types.ts", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.getFieldFormat.$1", + "type": "Object", + "tags": [], + "label": "column", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + } + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] }, { "parentPluginId": "data", - "id": "def-server.ISearchOptions.indexPattern", - "type": "Object", + "id": "def-common.DatatableUtilitiesService.getInterval", + "type": "Function", "tags": [], - "label": "indexPattern", - "description": [ - "\nIndex pattern reference is used for better error messages" - ], + "label": "getInterval", + "description": [], "signature": [ + "(column: ", { - "pluginId": "dataViews", + "pluginId": "expressions", "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" }, - " | undefined" + ") => string | undefined" ], - "path": "src/plugins/data/common/search/types.ts", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.getInterval.$1", + "type": "Object", + "tags": [], + "label": "column", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + } + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] }, { "parentPluginId": "data", - "id": "def-server.ISearchOptions.transport", - "type": "Object", + "id": "def-common.DatatableUtilitiesService.getNumberHistogramInterval", + "type": "Function", "tags": [], - "label": "transport", + "label": "getNumberHistogramInterval", "description": [ - "\nTransportRequestOptions, other than `signal`, to pass through to the ES client.\nTo pass an abort signal, use {@link ISearchOptions.abortSignal}" + "\nHelper function returning the used interval for data table column created by the histogramm agg type.\n\"auto\" will get expanded to the actually used interval.\nIf the column is not a column created by a histogram aggregation of the esaggs data source,\nthis function will return undefined." ], "signature": [ - "Omit<", - "TransportRequestOptions", - ", \"signal\"> | undefined" + "(column: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + }, + ") => number | undefined" ], - "path": "src/plugins/data/common/search/types.ts", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - } - ], - "enums": [ - { - "parentPluginId": "data", - "id": "def-server.ES_FIELD_TYPES", - "type": "Enum", - "tags": [], - "label": "ES_FIELD_TYPES", - "description": [], - "signature": [ - "ES_FIELD_TYPES" - ], - "path": "node_modules/@types/kbn__field-types/index.d.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.KBN_FIELD_TYPES", - "type": "Enum", - "tags": [], - "label": "KBN_FIELD_TYPES", - "description": [], - "signature": [ - "KBN_FIELD_TYPES" - ], - "path": "node_modules/@types/kbn__field-types/index.d.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.METRIC_TYPES", - "type": "Enum", - "tags": [], - "label": "METRIC_TYPES", - "description": [], - "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - } - ], - "misc": [ - { - "parentPluginId": "data", - "id": "def-server.DEFAULT_QUERY_LANGUAGE", - "type": "string", - "tags": [], - "label": "DEFAULT_QUERY_LANGUAGE", - "description": [], - "signature": [ - "\"kuery\"" - ], - "path": "src/plugins/data/common/constants.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.ES_SEARCH_STRATEGY", - "type": "string", - "tags": [], - "label": "ES_SEARCH_STRATEGY", - "description": [], - "signature": [ - "\"es\"" - ], - "path": "src/plugins/data/common/search/strategies/es_search/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.IEsSearchResponse", - "type": "Type", - "tags": [], - "label": "IEsSearchResponse", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchResponse", - "text": "IKibanaSearchResponse" - }, - "<", - "SearchResponse", - ">>" - ], - "path": "src/plugins/data/common/search/strategies/es_search/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.ParsedInterval", - "type": "Type", - "tags": [], - "label": "ParsedInterval", - "description": [], - "signature": [ - "{ value: number; unit: ", - "Unit", - "; type: \"fixed\" | \"calendar\"; }" - ], - "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/parse_es_interval.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - } - ], - "objects": [ - { - "parentPluginId": "data", - "id": "def-server.exporters", - "type": "Object", - "tags": [], - "label": "exporters", - "description": [], - "path": "src/plugins/data/server/index.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.getNumberHistogramInterval.$1", + "type": "Object", + "tags": [], + "label": "column", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + } + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "data", - "id": "def-server.exporters.datatableToCSV", + "id": "def-common.DatatableUtilitiesService.getTotalCount", "type": "Function", "tags": [], - "label": "datatableToCSV", + "label": "getTotalCount", "description": [], "signature": [ - "({ columns, rows }: ", + "(table: ", { "pluginId": "expressions", "scope": "common", @@ -17302,19 +19201,18 @@ "section": "def-common.Datatable", "text": "Datatable" }, - ", { csvSeparator, quoteValues, formatFactory, raw, escapeFormulaValues }: CSVOptions) => string" + ") => number | undefined" ], - "path": "src/plugins/data/server/index.ts", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, "trackAdoption": false, - "returnComment": [], "children": [ { "parentPluginId": "data", - "id": "def-server.exporters.datatableToCSV.$1", + "id": "def-common.DatatableUtilitiesService.getTotalCount.$1", "type": "Object", "tags": [], - "label": "__0", + "label": "table", "description": [], "signature": [ { @@ -17325,1233 +19223,1085 @@ "text": "Datatable" } ], - "path": "src/plugins/data/common/exports/export_csv.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.exporters.datatableToCSV.$2", - "type": "Object", - "tags": [], - "label": "__1", - "description": [], - "signature": [ - "CSVOptions" - ], - "path": "src/plugins/data/common/exports/export_csv.tsx", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "isRequired": true } - ] + ], + "returnComment": [] }, { "parentPluginId": "data", - "id": "def-server.exporters.CSV_MIME_TYPE", - "type": "string", - "tags": [], - "label": "CSV_MIME_TYPE", - "description": [], - "path": "src/plugins/data/server/index.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.search", - "type": "Object", - "tags": [], - "label": "search", - "description": [], - "path": "src/plugins/data/server/index.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-server.search.aggs", - "type": "Object", + "id": "def-common.DatatableUtilitiesService.hasPrecisionError", + "type": "Function", "tags": [], - "label": "aggs", + "label": "hasPrecisionError", "description": [], - "path": "src/plugins/data/server/index.ts", + "signature": [ + "(column: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + }, + ") => ", + "Serializable" + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "data", - "id": "def-server.search.aggs.CidrMask", + "id": "def-common.DatatableUtilitiesService.hasPrecisionError.$1", "type": "Object", "tags": [], - "label": "CidrMask", + "label": "column", "description": [], "signature": [ - "typeof ", { - "pluginId": "data", + "pluginId": "expressions", "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.CidrMask", - "text": "CidrMask" + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" } ], - "path": "src/plugins/data/server/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.search.aggs.dateHistogramInterval", - "type": "Function", - "tags": [], - "label": "dateHistogramInterval", - "description": [], - "signature": [ - "(interval: string, shouldForceFixed?: boolean | undefined) => Interval" - ], - "path": "src/plugins/data/server/index.ts", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-server.search.aggs.dateHistogramInterval.$1", - "type": "string", - "tags": [], - "label": "interval", - "description": [], - "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/date_histogram_interval.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.search.aggs.dateHistogramInterval.$2", - "type": "CompoundType", - "tags": [], - "label": "shouldForceFixed", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/date_histogram_interval.ts", - "deprecated": false, - "trackAdoption": false - } - ] + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.isFilterable", + "type": "Function", + "tags": [], + "label": "isFilterable", + "description": [], + "signature": [ + "(column: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" }, + ") => boolean" + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "data", - "id": "def-server.search.aggs.IpAddress", + "id": "def-common.DatatableUtilitiesService.isFilterable.$1", "type": "Object", "tags": [], - "label": "IpAddress", + "label": "column", "description": [], "signature": [ - "typeof ", { - "pluginId": "data", + "pluginId": "expressions", "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IpAddress", - "text": "IpAddress" + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" } ], - "path": "src/plugins/data/server/index.ts", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.DatatableUtilitiesService.setFieldFormat", + "type": "Function", + "tags": [], + "label": "setFieldFormat", + "description": [], + "signature": [ + "(column: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + }, + ", fieldFormat: ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormat", + "text": "FieldFormat" }, + ") => void" + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "data", - "id": "def-server.search.aggs.parseInterval", - "type": "Function", + "id": "def-common.DatatableUtilitiesService.setFieldFormat.$1", + "type": "Object", "tags": [], - "label": "parseInterval", + "label": "column", "description": [], "signature": [ - "(interval: string) => moment.Duration | null" - ], - "path": "src/plugins/data/server/index.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ { - "parentPluginId": "data", - "id": "def-server.search.aggs.parseInterval.$1", - "type": "string", - "tags": [], - "label": "interval", - "description": [], - "path": "src/plugins/data/common/search/aggs/utils/date_interval_utils/parse_interval.ts", - "deprecated": false, - "trackAdoption": false + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" } - ] + ], + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true }, { "parentPluginId": "data", - "id": "def-server.search.aggs.calcAutoIntervalLessThan", - "type": "Function", + "id": "def-common.DatatableUtilitiesService.setFieldFormat.$2", + "type": "Object", "tags": [], - "label": "calcAutoIntervalLessThan", + "label": "fieldFormat", "description": [], "signature": [ - "(maxBucketCount: number, duration: number) => moment.Duration" + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormat", + "text": "FieldFormat" + } ], - "path": "src/plugins/data/server/index.ts", + "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", "deprecated": false, "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-server.search.aggs.calcAutoIntervalLessThan.$1", - "type": "number", - "tags": [], - "label": "maxBucketCount", - "description": [], - "path": "src/plugins/data/common/search/aggs/buckets/lib/time_buckets/calc_auto_interval.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.search.aggs.calcAutoIntervalLessThan.$2", - "type": "number", - "tags": [], - "label": "duration", - "description": [], - "path": "src/plugins/data/common/search/aggs/buckets/lib/time_buckets/calc_auto_interval.ts", - "deprecated": false, - "trackAdoption": false - } - ] + "isRequired": true } - ] + ], + "returnComment": [] } ], "initialIsOpen": false }, { "parentPluginId": "data", - "id": "def-server.UI_SETTINGS", - "type": "Object", - "tags": [], - "label": "UI_SETTINGS", - "description": [], - "signature": [ - "{ readonly META_FIELDS: \"metaFields\"; readonly DOC_HIGHLIGHT: \"doc_table:highlight\"; readonly QUERY_STRING_OPTIONS: \"query:queryString:options\"; readonly QUERY_ALLOW_LEADING_WILDCARDS: \"query:allowLeadingWildcards\"; readonly SEARCH_QUERY_LANGUAGE: \"search:queryLanguage\"; readonly SORT_OPTIONS: \"sort:options\"; readonly COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: \"courier:ignoreFilterIfFieldNotInIndex\"; readonly COURIER_SET_REQUEST_PREFERENCE: \"courier:setRequestPreference\"; readonly COURIER_CUSTOM_REQUEST_PREFERENCE: \"courier:customRequestPreference\"; readonly COURIER_MAX_CONCURRENT_SHARD_REQUESTS: \"courier:maxConcurrentShardRequests\"; readonly SEARCH_INCLUDE_FROZEN: \"search:includeFrozen\"; readonly SEARCH_TIMEOUT: \"search:timeout\"; readonly HISTOGRAM_BAR_TARGET: \"histogram:barTarget\"; readonly HISTOGRAM_MAX_BARS: \"histogram:maxBars\"; readonly HISTORY_LIMIT: \"history:limit\"; readonly TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: \"timepicker:refreshIntervalDefaults\"; readonly TIMEPICKER_QUICK_RANGES: \"timepicker:quickRanges\"; readonly TIMEPICKER_TIME_DEFAULTS: \"timepicker:timeDefaults\"; readonly FILTERS_PINNED_BY_DEFAULT: \"filters:pinnedByDefault\"; readonly FILTERS_EDITOR_SUGGEST_VALUES: \"filterEditor:suggestValues\"; readonly AUTOCOMPLETE_USE_TIMERANGE: \"autocomplete:useTimeRange\"; readonly AUTOCOMPLETE_VALUE_SUGGESTION_METHOD: \"autocomplete:valueSuggestionMethod\"; readonly DATE_FORMAT: \"dateFormat\"; readonly DATEFORMAT_TZ: \"dateFormat:tz\"; }" - ], - "path": "src/plugins/data/common/constants.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - } - ], - "setup": { - "parentPluginId": "data", - "id": "def-server.DataPluginSetup", - "type": "Interface", - "tags": [], - "label": "DataPluginSetup", - "description": [], - "path": "src/plugins/data/server/plugin.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-server.DataPluginSetup.search", - "type": "Object", - "tags": [], - "label": "search", - "description": [], - "signature": [ - "ISearchSetup" - ], - "path": "src/plugins/data/server/plugin.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataPluginSetup.query", - "type": "Object", - "tags": [], - "label": "query", - "description": [], - "signature": [ - "QuerySetup" - ], - "path": "src/plugins/data/server/plugin.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataPluginSetup.fieldFormats", - "type": "Object", - "tags": [ - "deprecated" - ], - "label": "fieldFormats", - "description": [], - "signature": [ - { - "pluginId": "fieldFormats", - "scope": "server", - "docId": "kibFieldFormatsPluginApi", - "section": "def-server.FieldFormatsSetup", - "text": "FieldFormatsSetup" - } - ], - "path": "src/plugins/data/server/plugin.ts", - "deprecated": true, - "trackAdoption": false, - "references": [] - } - ], - "lifecycle": "setup", - "initialIsOpen": true - }, - "start": { - "parentPluginId": "data", - "id": "def-server.DataPluginStart", - "type": "Interface", - "tags": [], - "label": "DataPluginStart", - "description": [], - "path": "src/plugins/data/server/plugin.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-server.DataPluginStart.search", - "type": "Object", - "tags": [], - "label": "search", - "description": [], - "signature": [ - "ISearchStart", - "<", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IEsSearchRequest", - "text": "IEsSearchRequest" - }, - ", ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IEsSearchResponse", - "text": "IEsSearchResponse" - }, - ">" - ], - "path": "src/plugins/data/server/plugin.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataPluginStart.fieldFormats", - "type": "Object", - "tags": [ - "deprecated" - ], - "label": "fieldFormats", - "description": [], - "signature": [ - { - "pluginId": "fieldFormats", - "scope": "server", - "docId": "kibFieldFormatsPluginApi", - "section": "def-server.FieldFormatsStart", - "text": "FieldFormatsStart" - } - ], - "path": "src/plugins/data/server/plugin.ts", - "deprecated": true, - "trackAdoption": false, - "references": [] - }, - { - "parentPluginId": "data", - "id": "def-server.DataPluginStart.indexPatterns", - "type": "Object", - "tags": [], - "label": "indexPatterns", - "description": [], - "signature": [ - { - "pluginId": "dataViews", - "scope": "server", - "docId": "kibDataViewsPluginApi", - "section": "def-server.DataViewsServerPluginStart", - "text": "DataViewsServerPluginStart" - } - ], - "path": "src/plugins/data/server/plugin.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.DataPluginStart.datatableUtilities", - "type": "Object", - "tags": [], - "label": "datatableUtilities", - "description": [ - "\nDatatable type utility functions." - ], - "signature": [ - "DatatableUtilitiesService" - ], - "path": "src/plugins/data/server/plugin.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "lifecycle": "start", - "initialIsOpen": true - } - }, - "common": { - "classes": [ - { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService", + "id": "def-common.DataView", "type": "Class", "tags": [], - "label": "DatatableUtilitiesService", - "description": [], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "label": "DataView", + "description": [ + "\nData view class. Central kibana abstraction around multiple indices." + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " implements ", + "DataViewBase" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.Unnamed", - "type": "Function", + "id": "def-common.DataView.id", + "type": "string", "tags": [], - "label": "Constructor", - "description": [], + "label": "id", + "description": [ + "\nSaved object id" + ], "signature": [ - "any" + "string | undefined" ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", + "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-common.DataView.title", + "type": "string", + "tags": [ + "deprecated" + ], + "label": "title", + "description": [ + "\nTitle of data view" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": true, "trackAdoption": false, - "children": [ + "references": [ + { + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/container/source/index.tsx" + }, + { + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/container/source/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts" + }, + { + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/mock/index_pattern.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/mock/index_pattern.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "threatIntelligence", + "path": "x-pack/plugins/threat_intelligence/public/common/mocks/mock_security_context.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_view.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx" + }, + { + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/autocomplete/providers/value_suggestion_provider.ts" + }, + { + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/query_string_input/fetch_index_patterns.ts" + }, + { + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/dataview_picker/change_dataview.tsx" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/server/rest_api_routes/update_data_view.ts" + }, + { + "plugin": "dataViews", + "path": "src/plugins/data_views/server/rest_api_routes/update_data_view.ts" + }, + { + "plugin": "triggersActionsUi", + "path": "x-pack/plugins/triggers_actions_ui/public/common/lib/data_apis.ts" + }, + { + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" + }, + { + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/public/services/field_stats/load_field_stats.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/hooks/use_es_doc_search.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/utils/resolve_data_view.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/utils/resolve_data_view.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx" + }, + { + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/hooks/use_data.ts" + }, + { + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/components/full_time_range_selector/full_time_range_selector_service.ts" + }, + { + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx" + }, + { + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/components/log_categorization/log_categorization_page.tsx" + }, + { + "plugin": "presentationUtil", + "path": "src/plugins/presentation_util/public/services/storybook/data_views.ts" + }, + { + "plugin": "controls", + "path": "src/plugins/controls/public/services/options_list/options_list_service.ts" + }, + { + "plugin": "controls", + "path": "src/plugins/controls/public/services/options_list/options_list_service.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx" + }, + { + "plugin": "observability", + "path": "x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts" + }, + { + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_field.tsx" + }, + { + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts" + }, + { + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/log_views/resolved_log_view.ts" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/scaling_form.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/top_hits/top_hits_form.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/trigger_actions/visualize_geo_field_action.ts" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" + }, { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.Unnamed.$1", - "type": "Object", - "tags": [], - "label": "aggs", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.AggsCommonStart", - "text": "AggsCommonStart" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts" }, { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.Unnamed.$2", - "type": "Object", - "tags": [], - "label": "dataViews", - "description": [], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewsContract", - "text": "DataViewsContract" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" }, { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.Unnamed.$3", - "type": "Object", - "tags": [], - "label": "fieldFormats", - "description": [], - "signature": [ - { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.FieldFormatsStartCommon", - "text": "FieldFormatsStartCommon" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.clearField", - "type": "Function", - "tags": [], - "label": "clearField", - "description": [], - "signature": [ - "(column: ", + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" + }, { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/bucket_span_estimator/estimate_bucket_span.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/components/datafeed_step/components/data_view/change_data_view.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/components/job_settings_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/quick_create_job.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/lib/alerts/alerting_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/get_fields.ts" + }, + { + "plugin": "apm", + "path": "x-pack/plugins/apm/server/routes/data_view/create_static_data_view.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/datasource.sagas.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/persistence.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/persistence.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/search_source_expression_form.tsx" + }, + { + "plugin": "synthetics", + "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx" + }, + { + "plugin": "synthetics", + "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx" + }, + { + "plugin": "timelines", + "path": "x-pack/plugins/timelines/server/search_strategy/index_fields/index.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/services/es_index_service.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/server/routes/api/transforms.ts" + }, + { + "plugin": "upgradeAssistant", + "path": "x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.tsx" + }, + { + "plugin": "ux", + "path": "x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/use_data_view.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" }, - ") => void" - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.clearField.$1", - "type": "Object", - "tags": [], - "label": "column", - "description": [], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.clearFieldFormat", - "type": "Function", - "tags": [], - "label": "clearFieldFormat", - "description": [], - "signature": [ - "(column: ", + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" + }, { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" }, - ") => void" - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.clearFieldFormat.$1", - "type": "Object", - "tags": [], - "label": "column", - "description": [], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getAggConfig", - "type": "Function", - "tags": [], - "label": "getAggConfig", - "description": [], - "signature": [ - "(column: ", + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts" + }, { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" }, - ") => Promise<", { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.AggConfig", - "text": "AggConfig" + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts" }, - " | undefined>" - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getAggConfig.$1", - "type": "Object", - "tags": [], - "label": "column", - "description": [], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getDateHistogramMeta", - "type": "Function", - "tags": [], - "label": "getDateHistogramMeta", - "description": [ - "\nHelper function returning the used interval, used time zone and applied time filters for data table column created by the date_histogramm agg type.\n\"auto\" will get expanded to the actually used interval.\nIf the column is not a column created by a date_histogram aggregation of the esaggs data source,\nthis function will return undefined." - ], - "signature": [ - "(column: ", + "plugin": "controls", + "path": "src/plugins/controls/public/services/data_views/data_views.story.ts" + }, { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" }, - ", defaults?: Partial<{ timeZone: string; }>) => DateHistogramMeta | undefined" - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getDateHistogramMeta.$1", - "type": "Object", - "tags": [], - "label": "column", - "description": [], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" }, { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getDateHistogramMeta.$2", - "type": "Object", - "tags": [], - "label": "defaults", - "description": [], - "signature": [ - "Partial<{ timeZone: string; }>" - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getDataView", - "type": "Function", - "tags": [], - "label": "getDataView", - "description": [], - "signature": [ - "(column: ", + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/field_editor/components/scripting_help/test_script.tsx" + }, { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/field_editor/field_editor.tsx" }, - ") => Promise<", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx" }, - " | undefined>" - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getDataView.$1", - "type": "Object", - "tags": [], - "label": "column", - "description": [], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getField", - "type": "Function", - "tags": [], - "label": "getField", - "description": [], - "signature": [ - "(column: ", + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/control/list_control_factory.ts" + }, + { + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/control/range_control_factory.ts" + }, { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/server/routes/field_stats.ts" }, - ") => Promise<", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/server/routes/field_stats.ts" }, - " | undefined>" - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getField.$1", - "type": "Object", - "tags": [], - "label": "column", - "description": [], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getFieldFormat", - "type": "Function", - "tags": [], - "label": "getFieldFormat", - "description": [], - "signature": [ - "(column: ", + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/controls/field.tsx" + }, { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/controls/field.tsx" }, - ") => ", { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.FieldFormat", - "text": "FieldFormat" + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/agg_select.tsx" }, - " | undefined" - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getFieldFormat.$1", - "type": "Object", - "tags": [], - "label": "column", - "description": [], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getInterval", - "type": "Function", - "tags": [], - "label": "getInterval", - "description": [], - "signature": [ - "(column: ", + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/test_utils/get_index_pattern_mock.ts" + }, { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" + "plugin": "visTypeTimelion", + "path": "src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts" }, - ") => string | undefined" - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getInterval.$1", - "type": "Object", - "tags": [], - "label": "column", - "description": [], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getNumberHistogramInterval", - "type": "Function", - "tags": [], - "label": "getNumberHistogramInterval", - "description": [ - "\nHelper function returning the used interval for data table column created by the histogramm agg type.\n\"auto\" will get expanded to the actually used interval.\nIf the column is not a column created by a histogram aggregation of the esaggs data source,\nthis function will return undefined." - ], - "signature": [ - "(column: ", + "plugin": "visTypeTimelion", + "path": "src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts" + }, { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts" }, - ") => number | undefined" - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getNumberHistogramInterval.$1", - "type": "Object", - "tags": [], - "label": "column", - "description": [], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getTotalCount", - "type": "Function", - "tags": [], - "label": "getTotalCount", - "description": [], - "signature": [ - "(table: ", + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts" + }, { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.Datatable", - "text": "Datatable" + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.ts" }, - ") => number | undefined" - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.getTotalCount.$1", - "type": "Object", - "tags": [], - "label": "table", - "description": [], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.Datatable", - "text": "Datatable" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.hasPrecisionError", - "type": "Function", - "tags": [], - "label": "hasPrecisionError", - "description": [], - "signature": [ - "(column: ", + "plugin": "visTypeVega", + "path": "src/plugins/vis_types/vega/public/data_model/search_api.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts" + }, { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts" }, - ") => ", - "Serializable" - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.hasPrecisionError.$1", - "type": "Object", - "tags": [], - "label": "column", - "description": [], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.isFilterable", - "type": "Function", - "tags": [], - "label": "isFilterable", - "description": [], - "signature": [ - "(column: ", + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/layout/__stories__/get_layout_props.ts" + }, { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_views.ts" }, - ") => boolean" - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.isFilterable.$1", - "type": "Object", - "tags": [], - "label": "column", - "description": [], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.setFieldFormat", - "type": "Function", - "tags": [], - "label": "setFieldFormat", - "description": [], - "signature": [ - "(column: ", + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" + }, { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" }, - ", fieldFormat: ", { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.FieldFormat", - "text": "FieldFormat" + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" }, - ") => void" - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.setFieldFormat.$1", - "type": "Object", - "tags": [], - "label": "column", - "description": [], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.DatatableColumn", - "text": "DatatableColumn" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" }, { - "parentPluginId": "data", - "id": "def-common.DatatableUtilitiesService.setFieldFormat.$2", - "type": "Object", - "tags": [], - "label": "fieldFormat", - "description": [], - "signature": [ - { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.FieldFormat", - "text": "FieldFormat" - } - ], - "path": "src/plugins/data/common/datatable_utilities/datatable_utilities_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" } - ], - "returnComment": [] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-common.DataView", - "type": "Class", - "tags": [], - "label": "DataView", - "description": [ - "\nData view class. Central kibana abstraction around multiple indices." - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - }, - " implements ", - "DataViewBase" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-common.DataView.id", - "type": "string", - "tags": [], - "label": "id", - "description": [ - "\nSaved object id" - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.DataView.title", - "type": "string", - "tags": [], - "label": "title", - "description": [ - "\nTitle of data view" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false + ] }, { "parentPluginId": "data", @@ -18891,6 +20641,60 @@ "children": [], "returnComment": [] }, + { + "parentPluginId": "data", + "id": "def-common.DataView.getIndexPattern", + "type": "Function", + "tags": [], + "label": "getIndexPattern", + "description": [ + "\nGet index pattern" + ], + "signature": [ + "() => string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [ + "index pattern string" + ] + }, + { + "parentPluginId": "data", + "id": "def-common.DataView.setIndexPattern", + "type": "Function", + "tags": [], + "label": "setIndexPattern", + "description": [ + "\nSet index pattern" + ], + "signature": [ + "(indexPattern: string) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.DataView.setIndexPattern.$1", + "type": "string", + "tags": [], + "label": "indexPattern", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "data", "id": "def-common.DataView.getOriginalSavedObjectBody", diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 705e1202dd7a7..c6ef9f1f6629b 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.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 | |-------------------|-----------|------------------------|-----------------| -| 3221 | 33 | 2513 | 24 | +| 3227 | 33 | 2515 | 24 | ## Client diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 4f27bd7c26453..76467a2d63da7 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.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 | |-------------------|-----------|------------------------|-----------------| -| 3221 | 33 | 2513 | 24 | +| 3227 | 33 | 2515 | 24 | ## Client diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json index 08d6314c52ffe..5f071ea71ead1 100644 --- a/api_docs/data_search.devdocs.json +++ b/api_docs/data_search.devdocs.json @@ -1485,7 +1485,7 @@ "label": "config", "description": [], "signature": [ - "Readonly<{} & { search: Readonly<{} & { aggs: Readonly<{} & { shardDelay: Readonly<{} & { enabled: boolean; }>; }>; sessions: Readonly<{} & { enabled: boolean; notTouchedTimeout: moment.Duration; maxUpdateRetries: number; defaultExpiration: moment.Duration; management: Readonly<{} & { refreshInterval: moment.Duration; maxSessions: number; refreshTimeout: moment.Duration; expiresSoonWarning: moment.Duration; }>; }>; }>; }>" + "Readonly<{} & { search: Readonly<{} & { aggs: Readonly<{} & { shardDelay: Readonly<{} & { enabled: boolean; }>; }>; asyncSearch: Readonly<{} & { waitForCompletion: moment.Duration; keepAlive: moment.Duration; batchedReduceSize: number; }>; sessions: Readonly<{} & { enabled: boolean; notTouchedTimeout: moment.Duration; maxUpdateRetries: number; defaultExpiration: moment.Duration; management: Readonly<{} & { refreshInterval: moment.Duration; maxSessions: number; refreshTimeout: moment.Duration; expiresSoonWarning: moment.Duration; }>; }>; }>; }>" ], "path": "src/plugins/data/server/search/session/session_service.ts", "deprecated": false, @@ -1685,7 +1685,7 @@ "section": "def-common.SearchSessionSavedObjectAttributes", "text": "SearchSessionSavedObjectAttributes" }, - "> | undefined>" + ">>" ], "path": "src/plugins/data/server/search/session/session_service.ts", "deprecated": false, @@ -2575,7 +2575,7 @@ "section": "def-common.SearchSessionSavedObjectAttributes", "text": "SearchSessionSavedObjectAttributes" }, - "> | undefined>; get: (sessionId: string) => Promise<", + ">>; get: (sessionId: string) => Promise<", "SavedObject", "<", { diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 6652a2e32c05e..4a4ab63601437 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.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 | |-------------------|-----------|------------------------|-----------------| -| 3221 | 33 | 2513 | 24 | +| 3227 | 33 | 2515 | 24 | ## Client diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index 49564408adf27..228118945fe8c 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2022-10-10 +date: 2022-10-12 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 7985b9c42f2ae..d1cba66c0b0a7 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index d298a7341c27b..2ac3a55755e4c 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.devdocs.json b/api_docs/data_views.devdocs.json index cc6bd0a259d02..a44a7383f4a9a 100644 --- a/api_docs/data_views.devdocs.json +++ b/api_docs/data_views.devdocs.json @@ -46,1869 +46,2807 @@ "parentPluginId": "dataViews", "id": "def-public.DataView.title", "type": "string", - "tags": [], + "tags": [ + "deprecated" + ], "label": "title", "description": [ "\nTitle of data view" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.fieldFormatMap", - "type": "Object", - "tags": [], - "label": "fieldFormatMap", - "description": [ - "\nMap of field formats by field name" - ], - "signature": [ - "{ [x: string]: ", + "deprecated": true, + "trackAdoption": false, + "references": [ { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.SerializedFieldFormat", - "text": "SerializedFieldFormat" + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/container/source/index.tsx" }, - "<{}, ", - "SerializableRecord", - ">; }" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.typeMeta", - "type": "Object", - "tags": [], - "label": "typeMeta", - "description": [ - "\nOnly used by rollup indices, used by rollup specific endpoint to load field list." - ], - "signature": [ { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.TypeMeta", - "text": "TypeMeta" + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/container/source/index.tsx" }, - " | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.fields", - "type": "CompoundType", - "tags": [], - "label": "fields", - "description": [ - "\nField list, in extended array format" - ], - "signature": [ { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.IIndexPatternFieldList", - "text": "IIndexPatternFieldList" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" }, - " & { toSpec: () => ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewFieldMap", - "text": "DataViewFieldMap" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" }, - "; }" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.timeFieldName", - "type": "string", - "tags": [], - "label": "timeFieldName", - "description": [ - "\nTimestamp field name" - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.type", - "type": "string", - "tags": [], - "label": "type", - "description": [ - "\nType is used to identify rollup index patterns." - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.flattenHit", - "type": "Function", - "tags": [ - "deprecated" - ], - "label": "flattenHit", - "description": [], - "signature": [ - "(hit: Record, deep?: boolean | undefined) => Record" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": true, - "trackAdoption": false, - "references": [ { - "plugin": "maps", - "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts" }, { - "plugin": "maps", - "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" - } - ], - "returnComment": [], - "children": [ + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" + }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.flattenHit.$1", - "type": "Object", - "tags": [], - "label": "hit", - "description": [], - "signature": [ - "{ [x: string]: unknown[]; }" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts" }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.flattenHit.$2", - "type": "CompoundType", - "tags": [], - "label": "deep", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - } - ] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.metaFields", - "type": "Array", - "tags": [], - "label": "metaFields", - "description": [ - "\nList of meta fields by name" - ], - "signature": [ - "string[]" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.version", - "type": "string", - "tags": [], - "label": "version", - "description": [ - "\nSavedObject version" - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.sourceFilters", - "type": "Array", - "tags": [], - "label": "sourceFilters", - "description": [ - "\nArray of filters - hides fields in discover" - ], - "signature": [ + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.SourceFilter", - "text": "SourceFilter" + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/mock/index_pattern.ts" }, - "[] | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.namespaces", - "type": "Array", - "tags": [], - "label": "namespaces", - "description": [ - "\nArray of namespace ids" - ], - "signature": [ - "string[]" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.allowNoIndex", - "type": "boolean", - "tags": [], - "label": "allowNoIndex", - "description": [ - "\nPrevents errors when index pattern exists before indices" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.name", - "type": "string", - "tags": [], - "label": "name", - "description": [ - "\nName of the data view. Human readable name used to differentiate data view." - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.matchedIndices", - "type": "Array", - "tags": [], - "label": "matchedIndices", - "description": [], - "signature": [ - "string[]" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.Unnamed", - "type": "Function", - "tags": [], - "label": "Constructor", - "description": [ - "\nconstructor" - ], - "signature": [ - "any" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "dataViews", - "id": "def-public.DataView.Unnamed.$1", - "type": "Object", - "tags": [], - "label": "config", - "description": [ - "- config data and dependencies" - ], - "signature": [ - "DataViewDeps" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getName", - "type": "Function", - "tags": [], - "label": "getName", - "description": [ - "\nGet name of Data View" - ], - "signature": [ - "() => string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getOriginalSavedObjectBody", - "type": "Function", - "tags": [], - "label": "getOriginalSavedObjectBody", - "description": [ - "\nGet last saved saved object fields" - ], - "signature": [ - "() => { fieldAttrs?: string | undefined; title?: string | undefined; timeFieldName?: string | undefined; fields?: string | undefined; sourceFilters?: string | undefined; fieldFormatMap?: string | undefined; typeMeta?: string | undefined; type?: string | undefined; }" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.resetOriginalSavedObjectBody", - "type": "Function", - "tags": [], - "label": "resetOriginalSavedObjectBody", - "description": [ - "\nReset last saved saved object fields. Used after saving." - ], - "signature": [ - "() => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getFieldAttrs", - "type": "Function", - "tags": [], - "label": "getFieldAttrs", - "description": [ - "\nReturns field attributes map" - ], - "signature": [ - "() => { [x: string]: ", + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/mock/index_pattern.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldAttrSet", - "text": "FieldAttrSet" + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, - "; }" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getComputedFields", - "type": "Function", - "tags": [], - "label": "getComputedFields", - "description": [ - "\nReturns scripted fields" - ], - "signature": [ - "() => { storedFields: string[]; scriptFields: Record; docvalueFields: { field: string; format: string; }[]; runtimeFields: ", - "MappingRuntimeFields", - "; }" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.isPersisted", - "type": "Function", - "tags": [], - "label": "isPersisted", - "description": [], - "signature": [ - "() => boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.toSpec", - "type": "Function", - "tags": [], - "label": "toSpec", - "description": [ - "\nCreates static representation of the data view." - ], - "signature": [ - "(includeFields?: boolean) => ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" - } - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.toSpec.$1", - "type": "boolean", - "tags": [], - "label": "includeFields", - "description": [ - "Whether or not to include the `fields` list as part of this spec. If not included, the list\nwill be fetched from Elasticsearch when instantiating a new Data View with this spec." - ], - "signature": [ - "boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getSourceFiltering", - "type": "Function", - "tags": [], - "label": "getSourceFiltering", - "description": [ - "\nGet the source filtering configuration for that index." - ], - "signature": [ - "() => { excludes: string[]; }" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.removeScriptedField", - "type": "Function", - "tags": [ - "deprecated" - ], - "label": "removeScriptedField", - "description": [ - "\nRemoves scripted field from field list." - ], - "signature": [ - "(fieldName: string) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": true, - "trackAdoption": false, - "references": [ + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx" + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/field_editor/field_editor.tsx" - } - ], - "children": [ + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.removeScriptedField.$1", - "type": "string", - "tags": [], - "label": "fieldName", - "description": [ - "name of scripted field to remove" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getNonScriptedFields", - "type": "Function", - "tags": [ - "deprecated" - ], - "label": "getNonScriptedFields", - "description": [ - "\n" - ], - "signature": [ - "() => ", + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, - "[]" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": true, - "trackAdoption": false, - "references": [ { - "plugin": "visTypeTimeseries", - "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts" + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts" + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" }, { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts" + "plugin": "threatIntelligence", + "path": "x-pack/plugins/threat_intelligence/public/common/mocks/mock_security_context.tsx" }, { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts" }, { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts" + "plugin": "data", + "path": "src/plugins/data/common/search/expressions/kibana_context.test.ts" }, { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx" + "plugin": "data", + "path": "src/plugins/data/common/search/expressions/kibana_context.test.ts" }, { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + "plugin": "data", + "path": "src/plugins/data/common/search/expressions/kibana_context.test.ts" }, { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + "plugin": "data", + "path": "src/plugins/data/public/query/filter_manager/lib/get_display_value.ts" }, { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + "plugin": "data", + "path": "src/plugins/data/common/search/search_source/inspect/inspector_stats.ts" }, { - "plugin": "visTypeTimeseries", - "path": "src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts" - } - ], - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getScriptedFields", - "type": "Function", - "tags": [ - "deprecated" - ], - "label": "getScriptedFields", - "description": [ - "\n" - ], - "signature": [ - "() => ", + "plugin": "data", + "path": "src/plugins/data/common/search/tabify/response_writer.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" + "plugin": "data", + "path": "src/plugins/data/public/search/errors/painless_error.tsx" }, - "[]" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": true, - "trackAdoption": false, - "references": [ { - "plugin": "dataViewManagement", - "path": "src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx" - } - ], - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.isTSDBMode", - "type": "Function", - "tags": [], - "label": "isTSDBMode", - "description": [ - "\nreturns true if dataview contains TSDB fields" - ], - "signature": [ - "() => boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.isTimeBased", - "type": "Function", - "tags": [], - "label": "isTimeBased", - "description": [ - "\nDoes the data view have a timestamp field?" - ], - "signature": [ - "() => this is ", + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/param_types/field.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.TimeBasedDataView", - "text": "TimeBasedDataView" - } - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.isTimeNanosBased", - "type": "Function", - "tags": [], - "label": "isTimeNanosBased", - "description": [ - "\nDoes the data view have a timestamp field and is it a date nanos field?" - ], - "signature": [ - "() => this is ", + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.TimeBasedDataView", - "text": "TimeBasedDataView" - } - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getTimeField", - "type": "Function", - "tags": [], - "label": "getTimeField", - "description": [ - "\nGet timestamp field as DataViewField or return undefined" - ], - "signature": [ - "() => ", + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/autocomplete/providers/value_suggestion_provider.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/query_string_input/fetch_index_patterns.ts" }, - " | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getFieldByName", - "type": "Function", - "tags": [], - "label": "getFieldByName", - "description": [ - "\nGet field by name." - ], - "signature": [ - "(name: string) => ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/dataview_picker/change_dataview.tsx" }, - " | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getFieldByName.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [ - "field name" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getAggregationRestrictions", - "type": "Function", - "tags": [], - "label": "getAggregationRestrictions", - "description": [ - "\nGet aggregation restrictions. Rollup fields can only perform a subset of aggregations." - ], - "signature": [ - "() => Record | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getAsSavedObjectBody", - "type": "Function", - "tags": [], - "label": "getAsSavedObjectBody", - "description": [ - "\nReturns index pattern as saved object body for saving" - ], - "signature": [ - "() => ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewAttributes", - "text": "DataViewAttributes" - } - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getFormatterForField", - "type": "Function", - "tags": [], - "label": "getFormatterForField", - "description": [ - "\nProvide a field, get its formatter" - ], - "signature": [ - "(field: ", + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldSpec", - "text": "FieldSpec" + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/public/services/field_stats/load_field_stats.ts" }, - " | ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" }, - ") => ", { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.FieldFormat", - "text": "FieldFormat" - } - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" + }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getFormatterForField.$1", - "type": "CompoundType", - "tags": [], - "label": "field", - "description": [ - "field to get formatter for" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldSpec", - "text": "FieldSpec" - }, - " | ", - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" - } - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.addRuntimeField", - "type": "Function", - "tags": [], - "label": "addRuntimeField", - "description": [ - "\nAdd a runtime field - Appended to existing mapped field or a new field is\ncreated as appropriate." - ], - "signature": [ - "(name: string, runtimeField: ", + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.RuntimeField", - "text": "RuntimeField" + "plugin": "discover", + "path": "src/plugins/discover/public/hooks/use_es_doc_search.ts" }, - ") => ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/utils/resolve_data_view.ts" }, - "[]" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "dataViews", - "id": "def-public.DataView.addRuntimeField.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [ - "Field name" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/utils/resolve_data_view.ts" }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.addRuntimeField.$2", - "type": "Object", - "tags": [], - "label": "runtimeField", - "description": [ - "Runtime field definition" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.RuntimeField", - "text": "RuntimeField" - } - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.hasRuntimeField", - "type": "Function", - "tags": [], - "label": "hasRuntimeField", - "description": [ - "\nChecks if runtime field exists" - ], - "signature": [ - "(name: string) => boolean" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx" + }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.hasRuntimeField.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [ - "field name" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getRuntimeField", - "type": "Function", - "tags": [], - "label": "getRuntimeField", - "description": [ - "\nReturns runtime field if exists" - ], - "signature": [ - "(name: string) => ", + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.RuntimeField", - "text": "RuntimeField" + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/hooks/use_data.ts" }, - " | null" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getRuntimeField.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [ - "Runtime field name" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getAllRuntimeFields", - "type": "Function", - "tags": [], - "label": "getAllRuntimeFields", - "description": [ - "\nGet all runtime field definitions.\nNOTE: this does not strip out runtime fields that match mapped field names" - ], - "signature": [ - "() => Record" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [ - "map of runtime field definitions by field name" - ] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getFieldsByRuntimeFieldName", - "type": "Function", - "tags": [], - "label": "getFieldsByRuntimeFieldName", - "description": [ - "\nReturns data view fields backed by runtime fields." - ], - "signature": [ - "(name: string) => Record | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getFieldsByRuntimeFieldName.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [ - "runtime field name" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [ - "map of DataViewFields (that are runtime fields) by field name" - ] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.replaceAllRuntimeFields", - "type": "Function", - "tags": [], - "label": "replaceAllRuntimeFields", - "description": [ - "\nReplaces all existing runtime fields with new fields." - ], - "signature": [ - "(newFields: Record) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "dataViews", - "id": "def-public.DataView.replaceAllRuntimeFields.$1", - "type": "Object", - "tags": [], - "label": "newFields", - "description": [ - "Map of runtime field definitions by field name" - ], - "signature": [ - "Record" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.removeRuntimeField", - "type": "Function", - "tags": [], - "label": "removeRuntimeField", - "description": [ - "\nRemove a runtime field - removed from mapped field or removed unmapped\nfield as appropriate. Doesn't clear associated field attributes." - ], - "signature": [ - "(name: string) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "controls", + "path": "src/plugins/controls/public/services/options_list/options_list_service.ts" + }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.removeRuntimeField.$1", - "type": "string", - "tags": [], - "label": "name", - "description": [ - "- Field name to remove" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getRuntimeMappings", - "type": "Function", - "tags": [], - "label": "getRuntimeMappings", - "description": [ - "\nReturn the \"runtime_mappings\" section of the ES search query." - ], - "signature": [ - "() => ", - "MappingRuntimeFields" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getFormatterForFieldNoDefault", - "type": "Function", - "tags": [], - "label": "getFormatterForFieldNoDefault", - "description": [ - "\nGet formatter for a given field name. Return undefined if none exists." - ], - "signature": [ - "(fieldname: string) => ", + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.ts" + }, { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.FieldFormat", - "text": "FieldFormat" + "plugin": "lens", + "path": "x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx" }, - " | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "dataViews", - "id": "def-public.DataView.getFormatterForFieldNoDefault.$1", - "type": "string", - "tags": [], - "label": "fieldname", - "description": [ - "name of field to get formatter for" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.setFieldAttrs", - "type": "Function", - "tags": [], - "label": "setFieldAttrs", - "description": [ - "\nSet field attribute" - ], - "signature": [ - "(fieldName: string, attrName: K, value: ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldAttrSet", - "text": "FieldAttrSet" + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts" }, - "[K]) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "dataViews", - "id": "def-public.DataView.setFieldAttrs.$1", - "type": "string", - "tags": [], - "label": "fieldName", - "description": [ - "name of field to set attribute on" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx" }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.setFieldAttrs.$2", - "type": "Uncategorized", - "tags": [], - "label": "attrName", - "description": [ - "name of attribute to set" - ], - "signature": [ - "K" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "infra", + "path": "x-pack/plugins/infra/common/log_views/resolved_log_view.ts" }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.setFieldAttrs.$3", - "type": "Uncategorized", - "tags": [], - "label": "value", - "description": [ - "value of attribute" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldAttrSet", - "text": "FieldAttrSet" - }, - "[K]" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.setFieldCustomLabel", - "type": "Function", - "tags": [], - "label": "setFieldCustomLabel", - "description": [ - "\nSet field custom label" - ], - "signature": [ - "(fieldName: string, customLabel: string | null | undefined) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx" + }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.setFieldCustomLabel.$1", - "type": "string", - "tags": [], - "label": "fieldName", - "description": [ - "name of field to set custom label on" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/scaling_form.tsx" }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.setFieldCustomLabel.$2", - "type": "CompoundType", - "tags": [], - "label": "customLabel", - "description": [ - "custom label value. If undefined, custom label is removed" - ], - "signature": [ - "string | null | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.setFieldCount", - "type": "Function", - "tags": [], - "label": "setFieldCount", - "description": [ - "\nSet field count" - ], - "signature": [ - "(fieldName: string, count: number | null | undefined) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/top_hits/top_hits_form.tsx" + }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.setFieldCount.$1", - "type": "string", - "tags": [], - "label": "fieldName", - "description": [ - "name of field to set count on" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.setFieldCount.$2", - "type": "CompoundType", - "tags": [], - "label": "count", - "description": [ - "count value. If undefined, count is removed" - ], - "signature": [ - "number | null | undefined" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.setFieldFormat", - "type": "Function", - "tags": [], - "label": "setFieldFormat", - "description": [ - "\nSet field formatter" - ], - "signature": [ - "(fieldName: string, format: ", + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.SerializedFieldFormat", - "text": "SerializedFieldFormat" + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" }, - "<{}, ", - "SerializableRecord", - ">) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "dataViews", - "id": "def-public.DataView.setFieldFormat.$1", - "type": "string", - "tags": [], - "label": "fieldName", - "description": [ - "name of field to set format on" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.setFieldFormat.$2", - "type": "Object", - "tags": [], - "label": "format", - "description": [ - "field format in serialized form" - ], - "signature": [ - { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.SerializedFieldFormat", - "text": "SerializedFieldFormat" - }, - "<{}, ", - "SerializableRecord", - ">" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataView.deleteFieldFormat", - "type": "Function", - "tags": [], - "label": "deleteFieldFormat", - "description": [ - "\nRemove field format from the field format map." - ], - "signature": [ - "(fieldName: string) => void" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, { - "parentPluginId": "dataViews", - "id": "def-public.DataView.deleteFieldFormat.$1", - "type": "string", - "tags": [], - "label": "fieldName", - "description": [ - "field name associated with the format for removal" - ], - "signature": [ - "string" - ], - "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataViewField", - "type": "Class", - "tags": [], - "label": "DataViewField", - "description": [ - "\nData view field class" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" - }, - " implements ", - "DataViewFieldBase" - ], - "path": "src/plugins/data_views/common/fields/data_view_field.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "dataViews", - "id": "def-public.DataViewField.spec", - "type": "CompoundType", - "tags": [], - "label": "spec", - "description": [], - "signature": [ - "DataViewFieldBase", - " & { count?: number | undefined; conflictDescriptions?: Record | undefined; format?: ", + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, { - "pluginId": "fieldFormats", - "scope": "common", - "docId": "kibFieldFormatsPluginApi", - "section": "def-common.SerializedFieldFormat", - "text": "SerializedFieldFormat" + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" }, - "<{}, ", - "SerializableRecord", - "> | undefined; esTypes?: string[] | undefined; searchable: boolean; aggregatable: boolean; readFromDocValues?: boolean | undefined; indexed?: boolean | undefined; customLabel?: string | undefined; runtimeField?: ", { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.RuntimeFieldSpec", - "text": "RuntimeFieldSpec" + "plugin": "maps", + "path": "x-pack/plugins/maps/public/trigger_actions/visualize_geo_field_action.ts" }, - " | undefined; fixedInterval?: string[] | undefined; timeZone?: string[] | undefined; timeSeriesDimension?: boolean | undefined; timeSeriesMetric?: \"gauge\" | \"histogram\" | \"summary\" | \"counter\" | undefined; shortDotsEnable?: boolean | undefined; isMapped?: boolean | undefined; parentName?: string | undefined; }" - ], - "path": "src/plugins/data_views/common/fields/data_view_field.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataViewField.Unnamed", - "type": "Function", - "tags": [ - "constructor" - ], - "label": "Constructor", - "description": [ - "\nDataView constructor" - ], - "signature": [ - "any" - ], - "path": "src/plugins/data_views/common/fields/data_view_field.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { - "parentPluginId": "dataViews", - "id": "def-public.DataViewField.Unnamed.$1", - "type": "CompoundType", - "tags": [], - "label": "spec", - "description": [ - "Configuration for the field" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.FieldSpec", - "text": "FieldSpec" - } - ], - "path": "src/plugins/data_views/common/fields/data_view_field.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataViewField.count", - "type": "number", - "tags": [], - "label": "count", - "description": [ - "\nCount is used for field popularity in discover." - ], - "path": "src/plugins/data_views/common/fields/data_view_field.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataViewField.count", - "type": "number", - "tags": [], - "label": "count", - "description": [ - "\nSet count, which is used for field popularity in discover." - ], - "path": "src/plugins/data_views/common/fields/data_view_field.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataViewField.runtimeField", - "type": "CompoundType", - "tags": [], - "label": "runtimeField", - "description": [ - "\nReturns runtime field definition or undefined if field is not runtime field." - ], - "signature": [ + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts" + }, { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.RuntimeFieldSpec", - "text": "RuntimeFieldSpec" + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" }, - " | undefined" - ], - "path": "src/plugins/data_views/common/fields/data_view_field.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataViewField.runtimeField", - "type": "CompoundType", - "tags": [], - "label": "runtimeField", - "description": [ - "\nSets runtime field definition or unsets if undefined is provided." - ], - "signature": [ { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.RuntimeFieldSpec", - "text": "RuntimeFieldSpec" + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts" }, - " | undefined" - ], - "path": "src/plugins/data_views/common/fields/data_view_field.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataViewField.script", - "type": "string", - "tags": [], - "label": "script", - "description": [ - "\nScript field code" - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/common/fields/data_view_field.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataViewField.script", - "type": "string", - "tags": [], - "label": "script", - "description": [ - "\nSets scripted field painless code" - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/common/fields/data_view_field.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataViewField.lang", - "type": "string", - "tags": [], - "label": "lang", - "description": [ - "\nScript field language" - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/common/fields/data_view_field.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataViewField.lang", - "type": "string", - "tags": [], - "label": "lang", - "description": [ - "\nSets scripted field langauge." - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/common/fields/data_view_field.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", - "id": "def-public.DataViewField.customLabel", - "type": "string", - "tags": [], - "label": "customLabel", - "description": [ - "\nReturns custom label if set, otherwise undefined." - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data_views/common/fields/data_view_field.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dataViews", + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/bucket_span_estimator/estimate_bucket_span.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/components/datafeed_step/components/data_view/change_data_view.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/components/job_settings_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/quick_create_job.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/lib/alerts/alerting_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/get_fields.ts" + }, + { + "plugin": "apm", + "path": "x-pack/plugins/apm/server/routes/data_view/create_static_data_view.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/datasource.sagas.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/persistence.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/persistence.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/search_source_expression_form.tsx" + }, + { + "plugin": "synthetics", + "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx" + }, + { + "plugin": "synthetics", + "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx" + }, + { + "plugin": "timelines", + "path": "x-pack/plugins/timelines/server/search_strategy/index_fields/index.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/services/es_index_service.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/server/routes/api/transforms.ts" + }, + { + "plugin": "upgradeAssistant", + "path": "x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.tsx" + }, + { + "plugin": "ux", + "path": "x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/use_data_view.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts" + }, + { + "plugin": "controls", + "path": "src/plugins/controls/public/services/data_views/data_views.story.ts" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/field_editor/components/scripting_help/test_script.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/field_editor/field_editor.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx" + }, + { + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/control/list_control_factory.ts" + }, + { + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/control/range_control_factory.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/server/routes/field_stats.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/server/routes/field_stats.ts" + }, + { + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/controls/field.tsx" + }, + { + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/controls/field.tsx" + }, + { + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/agg_select.tsx" + }, + { + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/test_utils/get_index_pattern_mock.ts" + }, + { + "plugin": "visTypeTimelion", + "path": "src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts" + }, + { + "plugin": "visTypeTimelion", + "path": "src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.ts" + }, + { + "plugin": "visTypeVega", + "path": "src/plugins/vis_types/vega/public/data_model/search_api.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/agg_config.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/multi_terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/multi_terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/rare_terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/public/query/filter_manager/lib/get_display_value.test.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/layout/__stories__/get_layout_props.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" + } + ] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.fieldFormatMap", + "type": "Object", + "tags": [], + "label": "fieldFormatMap", + "description": [ + "\nMap of field formats by field name" + ], + "signature": [ + "{ [x: string]: ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.SerializedFieldFormat", + "text": "SerializedFieldFormat" + }, + "<{}, ", + "SerializableRecord", + ">; }" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.typeMeta", + "type": "Object", + "tags": [], + "label": "typeMeta", + "description": [ + "\nOnly used by rollup indices, used by rollup specific endpoint to load field list." + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.TypeMeta", + "text": "TypeMeta" + }, + " | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.fields", + "type": "CompoundType", + "tags": [], + "label": "fields", + "description": [ + "\nField list, in extended array format" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.IIndexPatternFieldList", + "text": "IIndexPatternFieldList" + }, + " & { toSpec: () => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewFieldMap", + "text": "DataViewFieldMap" + }, + "; }" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.timeFieldName", + "type": "string", + "tags": [], + "label": "timeFieldName", + "description": [ + "\nTimestamp field name" + ], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.type", + "type": "string", + "tags": [], + "label": "type", + "description": [ + "\nType is used to identify rollup index patterns." + ], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.flattenHit", + "type": "Function", + "tags": [ + "deprecated" + ], + "label": "flattenHit", + "description": [], + "signature": [ + "(hit: Record, deep?: boolean | undefined) => Record" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + } + ], + "returnComment": [], + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.flattenHit.$1", + "type": "Object", + "tags": [], + "label": "hit", + "description": [], + "signature": [ + "{ [x: string]: unknown[]; }" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.flattenHit.$2", + "type": "CompoundType", + "tags": [], + "label": "deep", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.metaFields", + "type": "Array", + "tags": [], + "label": "metaFields", + "description": [ + "\nList of meta fields by name" + ], + "signature": [ + "string[]" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.version", + "type": "string", + "tags": [], + "label": "version", + "description": [ + "\nSavedObject version" + ], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.sourceFilters", + "type": "Array", + "tags": [], + "label": "sourceFilters", + "description": [ + "\nArray of filters - hides fields in discover" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.SourceFilter", + "text": "SourceFilter" + }, + "[] | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.namespaces", + "type": "Array", + "tags": [], + "label": "namespaces", + "description": [ + "\nArray of namespace ids" + ], + "signature": [ + "string[]" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.allowNoIndex", + "type": "boolean", + "tags": [], + "label": "allowNoIndex", + "description": [ + "\nPrevents errors when index pattern exists before indices" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.name", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "\nName of the data view. Human readable name used to differentiate data view." + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.matchedIndices", + "type": "Array", + "tags": [], + "label": "matchedIndices", + "description": [], + "signature": [ + "string[]" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [ + "\nconstructor" + ], + "signature": [ + "any" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "config", + "description": [ + "- config data and dependencies" + ], + "signature": [ + "DataViewDeps" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getName", + "type": "Function", + "tags": [], + "label": "getName", + "description": [ + "\nGet name of Data View" + ], + "signature": [ + "() => string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getIndexPattern", + "type": "Function", + "tags": [], + "label": "getIndexPattern", + "description": [ + "\nGet index pattern" + ], + "signature": [ + "() => string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [ + "index pattern string" + ] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setIndexPattern", + "type": "Function", + "tags": [], + "label": "setIndexPattern", + "description": [ + "\nSet index pattern" + ], + "signature": [ + "(indexPattern: string) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setIndexPattern.$1", + "type": "string", + "tags": [], + "label": "indexPattern", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getOriginalSavedObjectBody", + "type": "Function", + "tags": [], + "label": "getOriginalSavedObjectBody", + "description": [ + "\nGet last saved saved object fields" + ], + "signature": [ + "() => { fieldAttrs?: string | undefined; title?: string | undefined; timeFieldName?: string | undefined; fields?: string | undefined; sourceFilters?: string | undefined; fieldFormatMap?: string | undefined; typeMeta?: string | undefined; type?: string | undefined; }" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.resetOriginalSavedObjectBody", + "type": "Function", + "tags": [], + "label": "resetOriginalSavedObjectBody", + "description": [ + "\nReset last saved saved object fields. Used after saving." + ], + "signature": [ + "() => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getFieldAttrs", + "type": "Function", + "tags": [], + "label": "getFieldAttrs", + "description": [ + "\nReturns field attributes map" + ], + "signature": [ + "() => { [x: string]: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldAttrSet", + "text": "FieldAttrSet" + }, + "; }" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getComputedFields", + "type": "Function", + "tags": [], + "label": "getComputedFields", + "description": [ + "\nReturns scripted fields" + ], + "signature": [ + "() => { storedFields: string[]; scriptFields: Record; docvalueFields: { field: string; format: string; }[]; runtimeFields: ", + "MappingRuntimeFields", + "; }" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.isPersisted", + "type": "Function", + "tags": [], + "label": "isPersisted", + "description": [], + "signature": [ + "() => boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.toSpec", + "type": "Function", + "tags": [], + "label": "toSpec", + "description": [ + "\nCreates static representation of the data view." + ], + "signature": [ + "(includeFields?: boolean) => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" + } + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.toSpec.$1", + "type": "boolean", + "tags": [], + "label": "includeFields", + "description": [ + "Whether or not to include the `fields` list as part of this spec. If not included, the list\nwill be fetched from Elasticsearch when instantiating a new Data View with this spec." + ], + "signature": [ + "boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getSourceFiltering", + "type": "Function", + "tags": [], + "label": "getSourceFiltering", + "description": [ + "\nGet the source filtering configuration for that index." + ], + "signature": [ + "() => { excludes: string[]; }" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.removeScriptedField", + "type": "Function", + "tags": [ + "deprecated" + ], + "label": "removeScriptedField", + "description": [ + "\nRemoves scripted field from field list." + ], + "signature": [ + "(fieldName: string) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/field_editor/field_editor.tsx" + } + ], + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.removeScriptedField.$1", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [ + "name of scripted field to remove" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getNonScriptedFields", + "type": "Function", + "tags": [ + "deprecated" + ], + "label": "getNonScriptedFields", + "description": [ + "\n" + ], + "signature": [ + "() => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + "[]" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts" + } + ], + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getScriptedFields", + "type": "Function", + "tags": [ + "deprecated" + ], + "label": "getScriptedFields", + "description": [ + "\n" + ], + "signature": [ + "() => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + "[]" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx" + } + ], + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.isTSDBMode", + "type": "Function", + "tags": [], + "label": "isTSDBMode", + "description": [ + "\nreturns true if dataview contains TSDB fields" + ], + "signature": [ + "() => boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.isTimeBased", + "type": "Function", + "tags": [], + "label": "isTimeBased", + "description": [ + "\nDoes the data view have a timestamp field?" + ], + "signature": [ + "() => this is ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.TimeBasedDataView", + "text": "TimeBasedDataView" + } + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.isTimeNanosBased", + "type": "Function", + "tags": [], + "label": "isTimeNanosBased", + "description": [ + "\nDoes the data view have a timestamp field and is it a date nanos field?" + ], + "signature": [ + "() => this is ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.TimeBasedDataView", + "text": "TimeBasedDataView" + } + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getTimeField", + "type": "Function", + "tags": [], + "label": "getTimeField", + "description": [ + "\nGet timestamp field as DataViewField or return undefined" + ], + "signature": [ + "() => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + " | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getFieldByName", + "type": "Function", + "tags": [], + "label": "getFieldByName", + "description": [ + "\nGet field by name." + ], + "signature": [ + "(name: string) => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + " | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getFieldByName.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "field name" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getAggregationRestrictions", + "type": "Function", + "tags": [], + "label": "getAggregationRestrictions", + "description": [ + "\nGet aggregation restrictions. Rollup fields can only perform a subset of aggregations." + ], + "signature": [ + "() => Record | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getAsSavedObjectBody", + "type": "Function", + "tags": [], + "label": "getAsSavedObjectBody", + "description": [ + "\nReturns index pattern as saved object body for saving" + ], + "signature": [ + "() => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewAttributes", + "text": "DataViewAttributes" + } + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getFormatterForField", + "type": "Function", + "tags": [], + "label": "getFormatterForField", + "description": [ + "\nProvide a field, get its formatter" + ], + "signature": [ + "(field: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldSpec", + "text": "FieldSpec" + }, + " | ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + ") => ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormat", + "text": "FieldFormat" + } + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getFormatterForField.$1", + "type": "CompoundType", + "tags": [], + "label": "field", + "description": [ + "field to get formatter for" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldSpec", + "text": "FieldSpec" + }, + " | ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + } + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.addRuntimeField", + "type": "Function", + "tags": [], + "label": "addRuntimeField", + "description": [ + "\nAdd a runtime field - Appended to existing mapped field or a new field is\ncreated as appropriate." + ], + "signature": [ + "(name: string, runtimeField: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.RuntimeField", + "text": "RuntimeField" + }, + ") => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + "[]" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.addRuntimeField.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "Field name" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.addRuntimeField.$2", + "type": "Object", + "tags": [], + "label": "runtimeField", + "description": [ + "Runtime field definition" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.RuntimeField", + "text": "RuntimeField" + } + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.hasRuntimeField", + "type": "Function", + "tags": [], + "label": "hasRuntimeField", + "description": [ + "\nChecks if runtime field exists" + ], + "signature": [ + "(name: string) => boolean" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.hasRuntimeField.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "field name" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getRuntimeField", + "type": "Function", + "tags": [], + "label": "getRuntimeField", + "description": [ + "\nReturns runtime field if exists" + ], + "signature": [ + "(name: string) => ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.RuntimeField", + "text": "RuntimeField" + }, + " | null" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getRuntimeField.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "Runtime field name" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getAllRuntimeFields", + "type": "Function", + "tags": [], + "label": "getAllRuntimeFields", + "description": [ + "\nGet all runtime field definitions.\nNOTE: this does not strip out runtime fields that match mapped field names" + ], + "signature": [ + "() => Record" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [ + "map of runtime field definitions by field name" + ] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getFieldsByRuntimeFieldName", + "type": "Function", + "tags": [], + "label": "getFieldsByRuntimeFieldName", + "description": [ + "\nReturns data view fields backed by runtime fields." + ], + "signature": [ + "(name: string) => Record | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getFieldsByRuntimeFieldName.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "runtime field name" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [ + "map of DataViewFields (that are runtime fields) by field name" + ] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.replaceAllRuntimeFields", + "type": "Function", + "tags": [], + "label": "replaceAllRuntimeFields", + "description": [ + "\nReplaces all existing runtime fields with new fields." + ], + "signature": [ + "(newFields: Record) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.replaceAllRuntimeFields.$1", + "type": "Object", + "tags": [], + "label": "newFields", + "description": [ + "Map of runtime field definitions by field name" + ], + "signature": [ + "Record" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.removeRuntimeField", + "type": "Function", + "tags": [], + "label": "removeRuntimeField", + "description": [ + "\nRemove a runtime field - removed from mapped field or removed unmapped\nfield as appropriate. Doesn't clear associated field attributes." + ], + "signature": [ + "(name: string) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.removeRuntimeField.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "- Field name to remove" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getRuntimeMappings", + "type": "Function", + "tags": [], + "label": "getRuntimeMappings", + "description": [ + "\nReturn the \"runtime_mappings\" section of the ES search query." + ], + "signature": [ + "() => ", + "MappingRuntimeFields" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getFormatterForFieldNoDefault", + "type": "Function", + "tags": [], + "label": "getFormatterForFieldNoDefault", + "description": [ + "\nGet formatter for a given field name. Return undefined if none exists." + ], + "signature": [ + "(fieldname: string) => ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormat", + "text": "FieldFormat" + }, + " | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.getFormatterForFieldNoDefault.$1", + "type": "string", + "tags": [], + "label": "fieldname", + "description": [ + "name of field to get formatter for" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setFieldAttrs", + "type": "Function", + "tags": [], + "label": "setFieldAttrs", + "description": [ + "\nSet field attribute" + ], + "signature": [ + "(fieldName: string, attrName: K, value: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldAttrSet", + "text": "FieldAttrSet" + }, + "[K]) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setFieldAttrs.$1", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [ + "name of field to set attribute on" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setFieldAttrs.$2", + "type": "Uncategorized", + "tags": [], + "label": "attrName", + "description": [ + "name of attribute to set" + ], + "signature": [ + "K" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setFieldAttrs.$3", + "type": "Uncategorized", + "tags": [], + "label": "value", + "description": [ + "value of attribute" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldAttrSet", + "text": "FieldAttrSet" + }, + "[K]" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setFieldCustomLabel", + "type": "Function", + "tags": [], + "label": "setFieldCustomLabel", + "description": [ + "\nSet field custom label" + ], + "signature": [ + "(fieldName: string, customLabel: string | null | undefined) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setFieldCustomLabel.$1", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [ + "name of field to set custom label on" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setFieldCustomLabel.$2", + "type": "CompoundType", + "tags": [], + "label": "customLabel", + "description": [ + "custom label value. If undefined, custom label is removed" + ], + "signature": [ + "string | null | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setFieldCount", + "type": "Function", + "tags": [], + "label": "setFieldCount", + "description": [ + "\nSet field count" + ], + "signature": [ + "(fieldName: string, count: number | null | undefined) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setFieldCount.$1", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [ + "name of field to set count on" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setFieldCount.$2", + "type": "CompoundType", + "tags": [], + "label": "count", + "description": [ + "count value. If undefined, count is removed" + ], + "signature": [ + "number | null | undefined" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setFieldFormat", + "type": "Function", + "tags": [], + "label": "setFieldFormat", + "description": [ + "\nSet field formatter" + ], + "signature": [ + "(fieldName: string, format: ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.SerializedFieldFormat", + "text": "SerializedFieldFormat" + }, + "<{}, ", + "SerializableRecord", + ">) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setFieldFormat.$1", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [ + "name of field to set format on" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.setFieldFormat.$2", + "type": "Object", + "tags": [], + "label": "format", + "description": [ + "field format in serialized form" + ], + "signature": [ + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.SerializedFieldFormat", + "text": "SerializedFieldFormat" + }, + "<{}, ", + "SerializableRecord", + ">" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.deleteFieldFormat", + "type": "Function", + "tags": [], + "label": "deleteFieldFormat", + "description": [ + "\nRemove field format from the field format map." + ], + "signature": [ + "(fieldName: string) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataView.deleteFieldFormat.$1", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [ + "field name associated with the format for removal" + ], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewField", + "type": "Class", + "tags": [], + "label": "DataViewField", + "description": [ + "\nData view field class" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + " implements ", + "DataViewFieldBase" + ], + "path": "src/plugins/data_views/common/fields/data_view_field.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewField.spec", + "type": "CompoundType", + "tags": [], + "label": "spec", + "description": [], + "signature": [ + "DataViewFieldBase", + " & { count?: number | undefined; conflictDescriptions?: Record | undefined; format?: ", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.SerializedFieldFormat", + "text": "SerializedFieldFormat" + }, + "<{}, ", + "SerializableRecord", + "> | undefined; esTypes?: string[] | undefined; searchable: boolean; aggregatable: boolean; readFromDocValues?: boolean | undefined; indexed?: boolean | undefined; customLabel?: string | undefined; runtimeField?: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.RuntimeFieldSpec", + "text": "RuntimeFieldSpec" + }, + " | undefined; fixedInterval?: string[] | undefined; timeZone?: string[] | undefined; timeSeriesDimension?: boolean | undefined; timeSeriesMetric?: \"gauge\" | \"histogram\" | \"summary\" | \"counter\" | undefined; shortDotsEnable?: boolean | undefined; isMapped?: boolean | undefined; parentName?: string | undefined; }" + ], + "path": "src/plugins/data_views/common/fields/data_view_field.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewField.Unnamed", + "type": "Function", + "tags": [ + "constructor" + ], + "label": "Constructor", + "description": [ + "\nDataView constructor" + ], + "signature": [ + "any" + ], + "path": "src/plugins/data_views/common/fields/data_view_field.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewField.Unnamed.$1", + "type": "CompoundType", + "tags": [], + "label": "spec", + "description": [ + "Configuration for the field" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldSpec", + "text": "FieldSpec" + } + ], + "path": "src/plugins/data_views/common/fields/data_view_field.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewField.count", + "type": "number", + "tags": [], + "label": "count", + "description": [ + "\nCount is used for field popularity in discover." + ], + "path": "src/plugins/data_views/common/fields/data_view_field.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewField.count", + "type": "number", + "tags": [], + "label": "count", + "description": [ + "\nSet count, which is used for field popularity in discover." + ], + "path": "src/plugins/data_views/common/fields/data_view_field.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewField.runtimeField", + "type": "CompoundType", + "tags": [], + "label": "runtimeField", + "description": [ + "\nReturns runtime field definition or undefined if field is not runtime field." + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.RuntimeFieldSpec", + "text": "RuntimeFieldSpec" + }, + " | undefined" + ], + "path": "src/plugins/data_views/common/fields/data_view_field.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewField.runtimeField", + "type": "CompoundType", + "tags": [], + "label": "runtimeField", + "description": [ + "\nSets runtime field definition or unsets if undefined is provided." + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.RuntimeFieldSpec", + "text": "RuntimeFieldSpec" + }, + " | undefined" + ], + "path": "src/plugins/data_views/common/fields/data_view_field.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewField.script", + "type": "string", + "tags": [], + "label": "script", + "description": [ + "\nScript field code" + ], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/common/fields/data_view_field.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewField.script", + "type": "string", + "tags": [], + "label": "script", + "description": [ + "\nSets scripted field painless code" + ], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/common/fields/data_view_field.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewField.lang", + "type": "string", + "tags": [], + "label": "lang", + "description": [ + "\nScript field language" + ], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/common/fields/data_view_field.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewField.lang", + "type": "string", + "tags": [], + "label": "lang", + "description": [ + "\nSets scripted field langauge." + ], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/common/fields/data_view_field.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewField.customLabel", + "type": "string", + "tags": [], + "label": "customLabel", + "description": [ + "\nReturns custom label if set, otherwise undefined." + ], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data_views/common/fields/data_view_field.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dataViews", "id": "def-public.DataViewField.customLabel", "type": "string", "tags": [], @@ -6947,14 +7885,898 @@ "parentPluginId": "dataViews", "id": "def-server.DataView.title", "type": "string", - "tags": [], + "tags": [ + "deprecated" + ], "label": "title", "description": [ "\nTitle of data view" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/container/source/index.tsx" + }, + { + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/container/source/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts" + }, + { + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/mock/index_pattern.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/mock/index_pattern.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "threatIntelligence", + "path": "x-pack/plugins/threat_intelligence/public/common/mocks/mock_security_context.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/expressions/kibana_context.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/expressions/kibana_context.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/expressions/kibana_context.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/public/query/filter_manager/lib/get_display_value.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/search_source/inspect/inspector_stats.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/tabify/response_writer.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/public/search/errors/painless_error.tsx" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/param_types/field.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx" + }, + { + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/autocomplete/providers/value_suggestion_provider.ts" + }, + { + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/query_string_input/fetch_index_patterns.ts" + }, + { + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/dataview_picker/change_dataview.tsx" + }, + { + "plugin": "triggersActionsUi", + "path": "x-pack/plugins/triggers_actions_ui/public/common/lib/data_apis.ts" + }, + { + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" + }, + { + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/public/services/field_stats/load_field_stats.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/hooks/use_es_doc_search.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/utils/resolve_data_view.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/utils/resolve_data_view.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx" + }, + { + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/hooks/use_data.ts" + }, + { + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/components/full_time_range_selector/full_time_range_selector_service.ts" + }, + { + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx" + }, + { + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/components/log_categorization/log_categorization_page.tsx" + }, + { + "plugin": "presentationUtil", + "path": "src/plugins/presentation_util/public/services/storybook/data_views.ts" + }, + { + "plugin": "controls", + "path": "src/plugins/controls/public/services/options_list/options_list_service.ts" + }, + { + "plugin": "controls", + "path": "src/plugins/controls/public/services/options_list/options_list_service.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx" + }, + { + "plugin": "observability", + "path": "x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts" + }, + { + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_field.tsx" + }, + { + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts" + }, + { + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/log_views/resolved_log_view.ts" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/scaling_form.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/top_hits/top_hits_form.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/trigger_actions/visualize_geo_field_action.ts" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/bucket_span_estimator/estimate_bucket_span.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/components/datafeed_step/components/data_view/change_data_view.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/components/job_settings_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/quick_create_job.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/lib/alerts/alerting_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/get_fields.ts" + }, + { + "plugin": "apm", + "path": "x-pack/plugins/apm/server/routes/data_view/create_static_data_view.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/datasource.sagas.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/persistence.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/persistence.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/search_source_expression_form.tsx" + }, + { + "plugin": "synthetics", + "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx" + }, + { + "plugin": "synthetics", + "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx" + }, + { + "plugin": "timelines", + "path": "x-pack/plugins/timelines/server/search_strategy/index_fields/index.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/services/es_index_service.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/server/routes/api/transforms.ts" + }, + { + "plugin": "upgradeAssistant", + "path": "x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.tsx" + }, + { + "plugin": "ux", + "path": "x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/use_data_view.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts" + }, + { + "plugin": "controls", + "path": "src/plugins/controls/public/services/data_views/data_views.story.ts" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/field_editor/components/scripting_help/test_script.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/field_editor/field_editor.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx" + }, + { + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/control/list_control_factory.ts" + }, + { + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/control/range_control_factory.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/server/routes/field_stats.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/server/routes/field_stats.ts" + }, + { + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/controls/field.tsx" + }, + { + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/controls/field.tsx" + }, + { + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/agg_select.tsx" + }, + { + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/test_utils/get_index_pattern_mock.ts" + }, + { + "plugin": "visTypeTimelion", + "path": "src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts" + }, + { + "plugin": "visTypeTimelion", + "path": "src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.ts" + }, + { + "plugin": "visTypeVega", + "path": "src/plugins/vis_types/vega/public/data_model/search_api.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/agg_config.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/multi_terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/multi_terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/rare_terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/public/query/filter_manager/lib/get_display_value.test.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/layout/__stories__/get_layout_props.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" + } + ] }, { "parentPluginId": "dataViews", @@ -7290,6 +9112,60 @@ "children": [], "returnComment": [] }, + { + "parentPluginId": "dataViews", + "id": "def-server.DataView.getIndexPattern", + "type": "Function", + "tags": [], + "label": "getIndexPattern", + "description": [ + "\nGet index pattern" + ], + "signature": [ + "() => string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [ + "index pattern string" + ] + }, + { + "parentPluginId": "dataViews", + "id": "def-server.DataView.setIndexPattern", + "type": "Function", + "tags": [], + "label": "setIndexPattern", + "description": [ + "\nSet index pattern" + ], + "signature": [ + "(indexPattern: string) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-server.DataView.setIndexPattern.$1", + "type": "string", + "tags": [], + "label": "indexPattern", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "dataViews", "id": "def-server.DataView.getOriginalSavedObjectBody", @@ -11875,7 +13751,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -11885,8 +13763,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", @@ -12997,14 +14873,898 @@ "parentPluginId": "dataViews", "id": "def-common.DataView.title", "type": "string", - "tags": [], + "tags": [ + "deprecated" + ], "label": "title", "description": [ "\nTitle of data view" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", - "deprecated": false, - "trackAdoption": false + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/container/source/index.tsx" + }, + { + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/container/source/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts" + }, + { + "plugin": "timelines", + "path": "x-pack/plugins/timelines/public/mock/index_pattern.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/mock/index_pattern.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "lists", + "path": "x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts" + }, + { + "plugin": "threatIntelligence", + "path": "x-pack/plugins/threat_intelligence/public/common/mocks/mock_security_context.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/expressions/kibana_context.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/expressions/kibana_context.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/expressions/kibana_context.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/public/query/filter_manager/lib/get_display_value.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/search_source/inspect/inspector_stats.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/tabify/response_writer.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/public/search/errors/painless_error.tsx" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/param_types/field.ts" + }, + { + "plugin": "dataViewEditor", + "path": "src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx" + }, + { + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/autocomplete/providers/value_suggestion_provider.ts" + }, + { + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/query_string_input/fetch_index_patterns.ts" + }, + { + "plugin": "unifiedSearch", + "path": "src/plugins/unified_search/public/dataview_picker/change_dataview.tsx" + }, + { + "plugin": "triggersActionsUi", + "path": "x-pack/plugins/triggers_actions_ui/public/common/lib/data_apis.ts" + }, + { + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" + }, + { + "plugin": "savedObjectsManagement", + "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/public/services/field_stats/load_field_stats.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/common/utils/field_existing_utils.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/hooks/use_es_doc_search.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/utils/resolve_data_view.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/utils/resolve_data_view.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx" + }, + { + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/hooks/use_data.ts" + }, + { + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/components/full_time_range_selector/full_time_range_selector_service.ts" + }, + { + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx" + }, + { + "plugin": "aiops", + "path": "x-pack/plugins/aiops/public/components/log_categorization/log_categorization_page.tsx" + }, + { + "plugin": "presentationUtil", + "path": "src/plugins/presentation_util/public/services/storybook/data_views.ts" + }, + { + "plugin": "controls", + "path": "src/plugins/controls/public/services/options_list/options_list_service.ts" + }, + { + "plugin": "controls", + "path": "src/plugins/controls/public/services/options_list/options_list_service.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx" + }, + { + "plugin": "observability", + "path": "x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts" + }, + { + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_field.tsx" + }, + { + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts" + }, + { + "plugin": "observability", + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/log_views/resolved_log_view.ts" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/scaling_form.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/top_hits/top_hits_form.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/trigger_actions/visualize_geo_field_action.ts" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts" + }, + { + "plugin": "dataVisualizer", + "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/bucket_span_estimator/estimate_bucket_span.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/components/datafeed_step/components/data_view/change_data_view.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/components/job_settings_form.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/quick_create_job.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx" + }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/lib/alerts/alerting_service.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/get_fields.ts" + }, + { + "plugin": "apm", + "path": "x-pack/plugins/apm/server/routes/data_view/create_static_data_view.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/datasource.sagas.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/persistence.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/persistence.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx" + }, + { + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/search_source_expression_form.tsx" + }, + { + "plugin": "synthetics", + "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx" + }, + { + "plugin": "synthetics", + "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx" + }, + { + "plugin": "timelines", + "path": "x-pack/plugins/timelines/server/search_strategy/index_fields/index.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_index_data.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/services/es_index_service.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/server/routes/api/transforms.ts" + }, + { + "plugin": "upgradeAssistant", + "path": "x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.tsx" + }, + { + "plugin": "ux", + "path": "x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/use_data_view.ts" + }, + { + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" + }, + { + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts" + }, + { + "plugin": "controls", + "path": "src/plugins/controls/public/services/data_views/data_views.story.ts" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/field_editor/components/scripting_help/test_script.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/field_editor/field_editor.tsx" + }, + { + "plugin": "dataViewManagement", + "path": "src/plugins/data_view_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx" + }, + { + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/control/list_control_factory.ts" + }, + { + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/control/range_control_factory.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/server/routes/field_stats.ts" + }, + { + "plugin": "unifiedFieldList", + "path": "src/plugins/unified_field_list/server/routes/field_stats.ts" + }, + { + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/controls/field.tsx" + }, + { + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/controls/field.tsx" + }, + { + "plugin": "visDefaultEditor", + "path": "src/plugins/vis_default_editor/public/components/agg_select.tsx" + }, + { + "plugin": "inputControlVis", + "path": "src/plugins/input_control_vis/public/test_utils/get_index_pattern_mock.ts" + }, + { + "plugin": "visTypeTimelion", + "path": "src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts" + }, + { + "plugin": "visTypeTimelion", + "path": "src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.ts" + }, + { + "plugin": "visTypeVega", + "path": "src/plugins/vis_types/vega/public/data_model/search_api.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/agg_config.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/multi_terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/multi_terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/rare_terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/buckets/terms.test.ts" + }, + { + "plugin": "data", + "path": "src/plugins/data/public/query/filter_manager/lib/get_display_value.test.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts" + }, + { + "plugin": "visTypeTimeseries", + "path": "src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/main/components/layout/__stories__/get_layout_props.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/data_views_service/loader.test.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.ts" + } + ] }, { "parentPluginId": "dataViews", @@ -13340,6 +16100,60 @@ "children": [], "returnComment": [] }, + { + "parentPluginId": "dataViews", + "id": "def-common.DataView.getIndexPattern", + "type": "Function", + "tags": [], + "label": "getIndexPattern", + "description": [ + "\nGet index pattern" + ], + "signature": [ + "() => string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [ + "index pattern string" + ] + }, + { + "parentPluginId": "dataViews", + "id": "def-common.DataView.setIndexPattern", + "type": "Function", + "tags": [], + "label": "setIndexPattern", + "description": [ + "\nSet index pattern" + ], + "signature": [ + "(indexPattern: string) => void" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dataViews", + "id": "def-common.DataView.setIndexPattern.$1", + "type": "string", + "tags": [], + "label": "indexPattern", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/data_views/common/data_views/data_view.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "dataViews", "id": "def-common.DataView.getOriginalSavedObjectBody", diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 6c3fe9e7afdc9..ae919fd28d3bd 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.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 | |-------------------|-----------|------------------------|-----------------| -| 983 | 0 | 225 | 2 | +| 992 | 0 | 228 | 2 | ## Client diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index 62f252081b2cf..a5b88bec1527b 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2022-10-10 +date: 2022-10-12 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 37d2e5139c65b..d7625e9a3edce 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -28,6 +28,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | savedObjects, embeddable, fleet, visualizations, dashboard, infra, canvas, graph, actions, alerting, enterpriseSearch, securitySolution, taskManager, savedSearch, ml, @kbn/core-saved-objects-server-internal | - | | | discover, maps, monitoring | - | | | unifiedSearch, discover, maps, infra, graph, securitySolution, stackAlerts, inputControlVis, savedObjects | - | +| | timelines, securitySolution, lists, threatIntelligence, dataViews, dataViewEditor, unifiedSearch, triggersActionsUi, savedObjectsManagement, unifiedFieldList, discover, aiops, presentationUtil, controls, lens, observability, infra, maps, dataVisualizer, ml, fleet, visTypeTimeseries, apm, reporting, graph, stackAlerts, synthetics, transform, upgradeAssistant, ux, dataViewManagement, inputControlVis, visDefaultEditor, visTypeTimelion, visTypeVega, data | - | +| | timelines, securitySolution, lists, threatIntelligence, dataViews, dataViewEditor, unifiedSearch, triggersActionsUi, savedObjectsManagement, unifiedFieldList, discover, aiops, presentationUtil, controls, lens, observability, infra, maps, dataVisualizer, ml, fleet, visTypeTimeseries, apm, reporting, graph, stackAlerts, synthetics, transform, upgradeAssistant, ux, dataViewManagement, inputControlVis, visDefaultEditor, visTypeTimelion, visTypeVega, data | - | +| | timelines, securitySolution, lists, threatIntelligence, data, dataViewEditor, unifiedSearch, triggersActionsUi, savedObjectsManagement, unifiedFieldList, discover, aiops, presentationUtil, controls, lens, observability, infra, maps, dataVisualizer, ml, fleet, visTypeTimeseries, apm, reporting, graph, stackAlerts, synthetics, transform, upgradeAssistant, ux, dataViewManagement, inputControlVis, visDefaultEditor, visTypeTimelion, visTypeVega | - | | | data, discover, embeddable | - | | | advancedSettings, discover | - | | | advancedSettings, discover | - | @@ -37,6 +40,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | dataViews, maps | - | | | dataViews, maps | - | | | maps | - | +| | maps, ml | - | | | unifiedSearch | - | | | unifiedSearch | - | | | visTypeTimeseries, graph, dataViewManagement, dataViews | - | @@ -48,10 +52,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | dataViews, dataViewManagement | - | | | dataViewManagement, dataViews | - | | | dataViews, dataViewManagement | - | -| | dataViewManagement | - | -| | dataViewManagement | - | | | home, data, esUiShared, spaces, savedObjectsManagement, fleet, observability, ml, apm, indexLifecycleManagement, synthetics, upgradeAssistant, ux, kibanaOverview | - | +| | spaces, savedObjectsManagement | - | +| | spaces, savedObjectsManagement | - | | | spaces, ml, canvas, osquery | - | +| | actions, ml, savedObjectsTagging, enterpriseSearch | - | +| | dataViewManagement | - | +| | dataViewManagement | - | | | canvas | - | | | canvas | - | | | canvas | - | @@ -62,9 +69,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | canvas | - | | | canvas | - | | | canvas | - | -| | spaces, savedObjectsManagement | - | -| | spaces, savedObjectsManagement | - | -| | actions, ml, savedObjectsTagging, enterpriseSearch | - | | | enterpriseSearch | - | | | console, @kbn/core-elasticsearch-server-internal | - | | | spaces, security, alerting | 8.8.0 | @@ -77,12 +81,12 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | maps, dashboard, @kbn/core-saved-objects-migration-server-internal | 8.8.0 | | | monitoring, kibanaUsageCollection, @kbn/core-apps-browser-internal, @kbn/core-metrics-server-internal, @kbn/core-status-server-internal, @kbn/core-usage-data-server-internal | 8.8.0 | | | savedObjectsTaggingOss, dashboard | 8.8.0 | +| | security, licenseManagement, ml, apm, crossClusterReplication, logstash, painlessLab, searchprofiler, watcher | 8.8.0 | | | security, fleet | 8.8.0 | | | security, fleet | 8.8.0 | | | security, fleet | 8.8.0 | | | management, fleet, security, kibanaOverview, @kbn/core-application-browser-internal, @kbn/core-application-browser-mocks | 8.8.0 | | | apm | 8.8.0 | -| | security, licenseManagement, ml, apm, crossClusterReplication, logstash, painlessLab, searchprofiler, watcher | 8.8.0 | | | security | 8.8.0 | | | mapsEms | 8.8.0 | | | ml, @kbn/core-http-browser-internal | 8.8.0 diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 4c125f75cfa83..fbbf7d6790e0c 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -125,6 +125,16 @@ so TS and code-reference navigation might not highlight them. | +## aiops + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [use_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/hooks/use_data.ts#:~:text=title), [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [explain_log_rate_spikes_analysis.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx#:~:text=title), [log_categorization_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_page.tsx#:~:text=title), [use_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/hooks/use_data.ts#:~:text=title), [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [explain_log_rate_spikes_analysis.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx#:~:text=title), [log_categorization_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_page.tsx#:~:text=title) | - | +| | [use_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/hooks/use_data.ts#:~:text=title), [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [explain_log_rate_spikes_analysis.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx#:~:text=title), [log_categorization_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_page.tsx#:~:text=title), [use_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/hooks/use_data.ts#:~:text=title), [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [explain_log_rate_spikes_analysis.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx#:~:text=title), [log_categorization_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_page.tsx#:~:text=title) | - | +| | [use_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/hooks/use_data.ts#:~:text=title), [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [explain_log_rate_spikes_analysis.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx#:~:text=title), [log_categorization_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_page.tsx#:~:text=title) | - | + + + ## alerting | Deprecated API | Reference location(s) | Remove By | @@ -145,6 +155,9 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [create_static_data_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/server/routes/data_view/create_static_data_view.ts#:~:text=title), [create_static_data_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/server/routes/data_view/create_static_data_view.ts#:~:text=title) | - | +| | [create_static_data_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/server/routes/data_view/create_static_data_view.ts#:~:text=title), [create_static_data_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/server/routes/data_view/create_static_data_view.ts#:~:text=title) | - | +| | [create_static_data_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/server/routes/data_view/create_static_data_view.ts#:~:text=title) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/public/plugin.ts#:~:text=environment) | 8.8.0 | | | [app_root.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/public/components/routing/app_root.tsx#:~:text=RedirectAppLinks), [app_root.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/public/components/routing/app_root.tsx#:~:text=RedirectAppLinks), [app_root.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/public/components/routing/app_root.tsx#:~:text=RedirectAppLinks) | - | | | [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode)+ 2 more | 8.8.0 | @@ -197,6 +210,16 @@ so TS and code-reference navigation might not highlight them. | +## controls + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [options_list_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/options_list/options_list_service.ts#:~:text=title), [options_list_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/options_list/options_list_service.ts#:~:text=title), [data_views.story.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/data_views/data_views.story.ts#:~:text=title), [options_list_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/options_list/options_list_service.ts#:~:text=title), [options_list_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/options_list/options_list_service.ts#:~:text=title), [data_views.story.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/data_views/data_views.story.ts#:~:text=title) | - | +| | [options_list_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/options_list/options_list_service.ts#:~:text=title), [options_list_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/options_list/options_list_service.ts#:~:text=title), [data_views.story.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/data_views/data_views.story.ts#:~:text=title), [options_list_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/options_list/options_list_service.ts#:~:text=title), [options_list_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/options_list/options_list_service.ts#:~:text=title), [data_views.story.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/data_views/data_views.story.ts#:~:text=title) | - | +| | [options_list_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/options_list/options_list_service.ts#:~:text=title), [options_list_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/options_list/options_list_service.ts#:~:text=title), [data_views.story.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/services/data_views/data_views.story.ts#:~:text=title) | - | + + + ## crossClusterReplication | Deprecated API | Reference location(s) | Remove By | @@ -224,22 +247,38 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [get_display_value.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts#:~:text=title), [inspector_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts#:~:text=title), [response_writer.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/tabify/response_writer.ts#:~:text=title), [painless_error.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/errors/painless_error.tsx#:~:text=title), [field.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=title), [agg_config.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/agg_config.test.ts#:~:text=title), [_terms_other_bucket_helper.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.test.ts#:~:text=title)+ 6 more | - | +| | [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [get_display_value.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts#:~:text=title), [inspector_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts#:~:text=title), [response_writer.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/tabify/response_writer.ts#:~:text=title), [painless_error.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/errors/painless_error.tsx#:~:text=title), [field.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=title), [agg_config.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/agg_config.test.ts#:~:text=title), [_terms_other_bucket_helper.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.test.ts#:~:text=title)+ 6 more | - | +| | [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [kibana_context.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/expressions/kibana_context.test.ts#:~:text=title), [get_display_value.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts#:~:text=title), [inspector_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts#:~:text=title), [response_writer.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/tabify/response_writer.ts#:~:text=title), [painless_error.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/errors/painless_error.tsx#:~:text=title), [field.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=title), [agg_config.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/agg_config.test.ts#:~:text=title), [_terms_other_bucket_helper.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.test.ts#:~:text=title)+ 6 more | - | | | [get_columns.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/lib/get_columns.tsx#:~:text=RedirectAppLinks), [get_columns.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/lib/get_columns.tsx#:~:text=RedirectAppLinks), [get_columns.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/lib/get_columns.tsx#:~:text=RedirectAppLinks), [connected_search_session_indicator.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/session_indicator/connected_search_session_indicator/connected_search_session_indicator.tsx#:~:text=RedirectAppLinks), [connected_search_session_indicator.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/session_indicator/connected_search_session_indicator/connected_search_session_indicator.tsx#:~:text=RedirectAppLinks), [connected_search_session_indicator.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/session_indicator/connected_search_session_indicator/connected_search_session_indicator.tsx#:~:text=RedirectAppLinks) | - | | | [data_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx#:~:text=executeTriggerActions), [data_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx#:~:text=executeTriggerActions) | - | | | [session_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/server/search/session/session_service.ts#:~:text=authc) | - | +## dataViewEditor + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [data_view_editor_flyout_content.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx#:~:text=title), [data_view_editor_flyout_content.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx#:~:text=title) | - | +| | [data_view_editor_flyout_content.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx#:~:text=title), [data_view_editor_flyout_content.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx#:~:text=title) | - | +| | [data_view_editor_flyout_content.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx#:~:text=title) | - | + + + ## dataViewManagement | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=title), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=title), [test_script.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/components/scripting_help/test_script.tsx#:~:text=title), [field_editor.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx#:~:text=title), [create_edit_field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx#:~:text=title), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=title), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=title), [test_script.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/components/scripting_help/test_script.tsx#:~:text=title), [field_editor.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx#:~:text=title), [create_edit_field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx#:~:text=title) | - | | | [scripted_fields_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx#:~:text=removeScriptedField), [field_editor.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx#:~:text=removeScriptedField), [scripted_fields_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx#:~:text=removeScriptedField), [field_editor.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx#:~:text=removeScriptedField) | - | | | [table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields) | - | | | [scripted_fields_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx#:~:text=getScriptedFields), [scripted_fields_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx#:~:text=getScriptedFields) | - | +| | [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=title), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=title), [test_script.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/components/scripting_help/test_script.tsx#:~:text=title), [field_editor.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx#:~:text=title), [create_edit_field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx#:~:text=title), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=title), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=title), [test_script.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/components/scripting_help/test_script.tsx#:~:text=title), [field_editor.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx#:~:text=title), [create_edit_field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx#:~:text=title) | - | | | [scripted_fields_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx#:~:text=removeScriptedField), [field_editor.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx#:~:text=removeScriptedField), [scripted_fields_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx#:~:text=removeScriptedField), [field_editor.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx#:~:text=removeScriptedField) | - | | | [table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields) | - | | | [scripted_fields_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx#:~:text=getScriptedFields), [scripted_fields_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx#:~:text=getScriptedFields) | - | +| | [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=title), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=title), [test_script.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/components/scripting_help/test_script.tsx#:~:text=title), [field_editor.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx#:~:text=title), [create_edit_field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx#:~:text=title) | - | | | [scripted_fields_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx#:~:text=removeScriptedField), [field_editor.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx#:~:text=removeScriptedField) | - | | | [table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields), [edit_index_pattern.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/edit_index_pattern.tsx#:~:text=getNonScriptedFields) | - | | | [scripted_fields_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx#:~:text=getScriptedFields) | - | @@ -250,10 +289,12 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.ts#:~:text=title), [data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.ts#:~:text=title), [data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.ts#:~:text=title), [data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.ts#:~:text=title), [update_data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/server/rest_api_routes/update_data_view.ts#:~:text=title), [update_data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/server/rest_api_routes/update_data_view.ts#:~:text=title), [data_views.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_views.ts#:~:text=title) | - | | | [data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.ts#:~:text=flattenHit) | - | | | [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=removeScriptedField) | - | | | [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getNonScriptedFields) | - | | | [data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.ts#:~:text=getScriptedFields), [data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.ts#:~:text=getScriptedFields), [data_views.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_views.ts#:~:text=getScriptedFields), [register_index_pattern_usage_collection.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/server/register_index_pattern_usage_collection.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields), [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getScriptedFields) | - | +| | [data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.ts#:~:text=title), [data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.ts#:~:text=title), [data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.ts#:~:text=title), [data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.ts#:~:text=title), [update_data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/server/rest_api_routes/update_data_view.ts#:~:text=title), [update_data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/server/rest_api_routes/update_data_view.ts#:~:text=title), [data_views.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_views.ts#:~:text=title) | - | | | [data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.ts#:~:text=flattenHit) | - | | | [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=removeScriptedField) | - | | | [data_view.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=getNonScriptedFields) | - | @@ -266,6 +307,9 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [top_values.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx#:~:text=fieldFormats) | - | +| | [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [actions_panel.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=title), [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title), [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [actions_panel.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=title), [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title) | - | +| | [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [actions_panel.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=title), [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title), [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [actions_panel.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=title), [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title) | - | +| | [full_time_range_selector_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector_service.ts#:~:text=title), [actions_panel.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=title), [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title) | - | | | [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) | - | @@ -277,7 +321,10 @@ so TS and code-reference navigation might not highlight them. | | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=create), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=create) | - | | | [discover_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/services/discover_state.ts#:~:text=syncQueryStateWithUrl), [discover_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/services/discover_state.ts#:~:text=syncQueryStateWithUrl) | - | | | [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/plugin.tsx#:~:text=indexPatterns) | - | +| | [use_es_doc_search.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/hooks/use_es_doc_search.ts#:~:text=title), [resolve_data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/utils/resolve_data_view.ts#:~:text=title), [resolve_data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/utils/resolve_data_view.ts#:~:text=title), [discover_sidebar.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx#:~:text=title), [discover_topnav.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx#:~:text=title), [use_adhoc_data_views.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts#:~:text=title), [get_layout_props.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/components/layout/__stories__/get_layout_props.ts#:~:text=title), [use_es_doc_search.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/hooks/use_es_doc_search.ts#:~:text=title), [resolve_data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/utils/resolve_data_view.ts#:~:text=title), [resolve_data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/utils/resolve_data_view.ts#:~:text=title)+ 4 more | - | | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=create), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=create) | - | +| | [use_es_doc_search.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/hooks/use_es_doc_search.ts#:~:text=title), [resolve_data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/utils/resolve_data_view.ts#:~:text=title), [resolve_data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/utils/resolve_data_view.ts#:~:text=title), [discover_sidebar.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx#:~:text=title), [discover_topnav.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx#:~:text=title), [use_adhoc_data_views.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts#:~:text=title), [get_layout_props.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/components/layout/__stories__/get_layout_props.ts#:~:text=title), [use_es_doc_search.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/hooks/use_es_doc_search.ts#:~:text=title), [resolve_data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/utils/resolve_data_view.ts#:~:text=title), [resolve_data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/utils/resolve_data_view.ts#:~:text=title)+ 4 more | - | +| | [use_es_doc_search.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/hooks/use_es_doc_search.ts#:~:text=title), [resolve_data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/utils/resolve_data_view.ts#:~:text=title), [resolve_data_view.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/utils/resolve_data_view.ts#:~:text=title), [discover_sidebar.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx#:~:text=title), [discover_topnav.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx#:~:text=title), [use_adhoc_data_views.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts#:~:text=title), [get_layout_props.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/components/layout/__stories__/get_layout_props.ts#:~:text=title) | - | | | [on_save_search.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx#:~:text=SavedObjectSaveModal), [on_save_search.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=executeTriggerActions), [search_embeddable_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/embeddable/search_embeddable_factory.ts#:~:text=executeTriggerActions), [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/plugin.tsx#:~:text=executeTriggerActions) | - | | | [ui_settings.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/server/ui_settings.ts#:~:text=metric), [ui_settings.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/server/ui_settings.ts#:~:text=metric), [ui_settings.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/server/ui_settings.ts#:~:text=metric) | - | @@ -343,6 +390,9 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [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), [search_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/components/search_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), [search_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/components/search_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), [search_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/components/search_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), [search_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/components/search_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), [search_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/components/search_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) | - | | | [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 | @@ -359,8 +409,11 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/plugin.ts#:~:text=indexPatterns) | - | +| | [datasource.sagas.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.sagas.ts#:~:text=title), [persistence.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/persistence.ts#:~:text=title), [persistence.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/persistence.ts#:~:text=title), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=title), [datasource.sagas.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.sagas.ts#:~:text=title), [persistence.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/persistence.ts#:~:text=title), [persistence.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/persistence.ts#:~:text=title), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=title) | - | | | [deserialize.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=getNonScriptedFields), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=getNonScriptedFields), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields) | - | +| | [datasource.sagas.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.sagas.ts#:~:text=title), [persistence.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/persistence.ts#:~:text=title), [persistence.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/persistence.ts#:~:text=title), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=title), [datasource.sagas.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.sagas.ts#:~:text=title), [persistence.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/persistence.ts#:~:text=title), [persistence.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/persistence.ts#:~:text=title), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=title) | - | | | [deserialize.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=getNonScriptedFields), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=getNonScriptedFields), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields) | - | +| | [datasource.sagas.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.sagas.ts#:~:text=title), [persistence.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/persistence.ts#:~:text=title), [persistence.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/persistence.ts#:~:text=title), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=title) | - | | | [deserialize.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=getNonScriptedFields), [datasource.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields) | - | | | [save_modal.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/components/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/public/components/save_modal.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/graph/server/plugin.ts#:~:text=license%24) | 8.8.0 | @@ -391,6 +444,9 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [use_kibana_index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_kibana_index_patterns.ts#:~:text=indexPatterns) | - | +| | [resolved_log_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/common/log_views/resolved_log_view.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=title), [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=title), [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=title), [resolved_log_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/common/log_views/resolved_log_view.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title)+ 6 more | - | +| | [resolved_log_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/common/log_views/resolved_log_view.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=title), [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=title), [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=title), [resolved_log_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/common/log_views/resolved_log_view.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title)+ 6 more | - | +| | [resolved_log_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/common/log_views/resolved_log_view.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=title), [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=title), [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=title) | - | | | [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=SavedObjectAttributes), [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=SavedObjectAttributes), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectAttributes), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectAttributes), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectAttributes), [use_get_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_get_saved_object.tsx#:~:text=SavedObjectAttributes), [use_get_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_get_saved_object.tsx#:~:text=SavedObjectAttributes), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectAttributes), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectAttributes), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectAttributes)+ 2 more | - | | | [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=SavedObjectAttributes), [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=SavedObjectAttributes), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectAttributes), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectAttributes), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectAttributes), [use_get_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_get_saved_object.tsx#:~:text=SavedObjectAttributes), [use_get_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_get_saved_object.tsx#:~:text=SavedObjectAttributes), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectAttributes), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectAttributes), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectAttributes)+ 2 more | - | @@ -402,7 +458,10 @@ so TS and code-reference navigation might not highlight them. | | ---------------|-----------|-----------| | | [list_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/list_control_factory.ts#:~:text=fetch), [range_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/range_control_factory.ts#:~:text=fetch) | - | | | [list_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/list_control_factory.ts#:~:text=indexPatterns), [range_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/range_control_factory.ts#:~:text=indexPatterns), [controls_tab.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/components/editor/controls_tab.tsx#:~:text=indexPatterns) | - | +| | [list_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/list_control_factory.ts#:~:text=title), [range_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/range_control_factory.ts#:~:text=title), [get_index_pattern_mock.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/test_utils/get_index_pattern_mock.ts#:~:text=title), [list_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/list_control_factory.ts#:~:text=title), [range_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/range_control_factory.ts#:~:text=title), [get_index_pattern_mock.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/test_utils/get_index_pattern_mock.ts#:~:text=title) | - | | | [list_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/list_control_factory.ts#:~:text=fetch), [range_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/range_control_factory.ts#:~:text=fetch) | - | +| | [list_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/list_control_factory.ts#:~:text=title), [range_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/range_control_factory.ts#:~:text=title), [get_index_pattern_mock.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/test_utils/get_index_pattern_mock.ts#:~:text=title), [list_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/list_control_factory.ts#:~:text=title), [range_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/range_control_factory.ts#:~:text=title), [get_index_pattern_mock.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/test_utils/get_index_pattern_mock.ts#:~:text=title) | - | +| | [list_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/list_control_factory.ts#:~:text=title), [range_control_factory.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/control/range_control_factory.ts#:~:text=title), [get_index_pattern_mock.ts](https://github.com/elastic/kibana/tree/main/src/plugins/input_control_vis/public/test_utils/get_index_pattern_mock.ts#:~:text=title) | - | @@ -427,6 +486,9 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [loader.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.ts#:~:text=title), [lens_top_nav.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title), [loader.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.ts#:~:text=title), [lens_top_nav.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title) | - | +| | [loader.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.ts#:~:text=title), [lens_top_nav.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title), [loader.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.ts#:~:text=title), [lens_top_nav.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title) | - | +| | [loader.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.ts#:~:text=title), [lens_top_nav.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title), [loader.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/data_views_service/loader.test.ts#:~:text=title) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [mounter.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/mounter.tsx#:~:text=onAppLeave) | 8.8.0 | @@ -439,6 +501,16 @@ so TS and code-reference navigation might not highlight them. | +## lists + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title)+ 8 more | - | +| | [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title)+ 8 more | - | +| | [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title), [helpers.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts#:~:text=title) | - | + + + ## logstash | Deprecated API | Reference location(s) | Remove By | @@ -462,9 +534,13 @@ so TS and code-reference navigation might not highlight them. | | ---------------|-----------|-----------| | | [global_sync.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/routes/map_page/url_state/global_sync.ts#:~:text=syncQueryStateWithUrl), [global_sync.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/routes/map_page/url_state/global_sync.ts#:~:text=syncQueryStateWithUrl) | - | | | [kibana_services.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/kibana_services.ts#:~:text=indexPatterns) | - | +| | [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=title), [scaling_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/util/scaling_form.tsx#:~:text=title), [top_hits_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/top_hits/top_hits_form.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title)+ 14 more | - | | | [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit) | - | +| | [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=title), [scaling_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/util/scaling_form.tsx#:~:text=title), [top_hits_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/top_hits/top_hits_form.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title)+ 14 more | - | | | [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit) | - | +| | [es_geo_grid_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx#:~:text=title), [scaling_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/util/scaling_form.tsx#:~:text=title), [top_hits_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/top_hits/top_hits_form.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=title)+ 2 more | - | | | [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit) | - | +| | [visualization.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/lens/choropleth_chart/visualization.tsx#:~:text=layerTypes), [visualization.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/lens/choropleth_chart/visualization.tsx#:~:text=layerTypes), [visualization.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/lens/choropleth_chart/visualization.tsx#:~:text=layerTypes), [visualization.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/lens/choropleth_chart/visualization.tsx#:~:text=layerTypes) | - | | | [render_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/render_app.tsx#:~:text=onAppLeave), [map_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx#:~:text=onAppLeave), [map_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/public/routes/map_page/map_page.tsx#:~:text=onAppLeave) | 8.8.0 | | | [saved_object_migrations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/maps/server/saved_objects/saved_object_migrations.ts#:~:text=warning) | 8.8.0 | @@ -483,8 +559,12 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=title), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=title), [configuration_step_details.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx#:~:text=title), [data_loader.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title)+ 76 more | - | +| | [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=title), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=title), [configuration_step_details.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx#:~:text=title), [data_loader.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title)+ 76 more | - | +| | [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [index_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=title), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=title), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=title), [configuration_step_details.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx#:~:text=title), [data_loader.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts#:~:text=title)+ 33 more | - | | | [ml_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx#:~:text=KibanaPageTemplate), [ml_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx#:~:text=KibanaPageTemplate), [ml_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx#:~:text=KibanaPageTemplate) | - | | | [ml_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx#:~:text=RedirectAppLinks), [ml_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx#:~:text=RedirectAppLinks), [ml_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/components/ml_page/ml_page.tsx#:~:text=RedirectAppLinks), [jobs_list_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/management/jobs_list/components/jobs_list_page/jobs_list_page.tsx#:~:text=RedirectAppLinks), [jobs_list_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/management/jobs_list/components/jobs_list_page/jobs_list_page.tsx#:~:text=RedirectAppLinks), [jobs_list_page.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/management/jobs_list/components/jobs_list_page/jobs_list_page.tsx#:~:text=RedirectAppLinks) | - | +| | [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts#:~:text=layerTypes), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts#:~:text=layerTypes), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts#:~:text=layerTypes), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts#:~:text=layerTypes), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts#:~:text=layerTypes), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts#:~:text=layerTypes), [visualization_extractor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/visualization_extractor.ts#:~:text=layerTypes), [visualization_extractor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/visualization_extractor.ts#:~:text=layerTypes), [visualization_extractor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/visualization_extractor.ts#:~:text=layerTypes), [visualization_extractor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/visualization_extractor.ts#:~:text=layerTypes) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/public/plugin.ts#:~:text=license%24) | 8.8.0 | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/plugin.ts#:~:text=license%24) | 8.8.0 | | | [annotations.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ml/server/routes/annotations.ts#:~:text=authc) | - | @@ -512,6 +592,9 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [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), [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) | - | +| | [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), [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) | - | +| | [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) | - | | | [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) | - | @@ -539,6 +622,9 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [data_views.ts](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_util/public/services/storybook/data_views.ts#:~:text=title), [data_views.ts](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_util/public/services/storybook/data_views.ts#:~:text=title) | - | +| | [data_views.ts](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_util/public/services/storybook/data_views.ts#:~:text=title), [data_views.ts](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_util/public/services/storybook/data_views.ts#:~:text=title) | - | +| | [data_views.ts](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_util/public/services/storybook/data_views.ts#:~:text=title) | - | | | [saved_object_save_modal_dashboard.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx#:~:text=SavedObjectSaveModal), [saved_object_save_modal_dashboard.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | @@ -551,6 +637,16 @@ so TS and code-reference navigation might not highlight them. | +## reporting + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [generate_csv.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.ts#:~:text=title), [generate_csv.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.ts#:~:text=title) | - | +| | [generate_csv.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.ts#:~:text=title), [generate_csv.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.ts#:~:text=title) | - | +| | [generate_csv.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.ts#:~:text=title) | - | + + + ## rollup | Deprecated API | Reference location(s) | Remove By | @@ -573,6 +669,9 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [flyout.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=title), [flyout.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=title), [flyout.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=title), [flyout.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=title) | - | +| | [flyout.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=title), [flyout.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=title), [flyout.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=title), [flyout.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=title) | - | +| | [flyout.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=title), [flyout.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx#:~:text=title) | - | | | [saved_objects_edition_page.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/saved_objects_edition_page.tsx#:~:text=RedirectAppLinks), [saved_objects_edition_page.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/saved_objects_edition_page.tsx#:~:text=RedirectAppLinks), [saved_objects_edition_page.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/saved_objects_edition_page.tsx#:~:text=RedirectAppLinks), [saved_objects_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx#:~:text=RedirectAppLinks), [saved_objects_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx#:~:text=RedirectAppLinks), [saved_objects_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx#:~:text=RedirectAppLinks) | - | | | [resolve_import_errors.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/lib/resolve_import_errors.ts#:~:text=createNewCopy) | - | | | [resolve_import_errors.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_management/public/lib/resolve_import_errors.ts#:~:text=createNewCopy) | - | @@ -628,7 +727,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ This is relied on by the reporting feature, and should be removed once reporting migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/issues/19914 | -| | [app_authorization.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/app_authorization.ts#:~:text=getKibanaFeatures), [privileges.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.ts#:~:text=getKibanaFeatures), [authorization_service.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/authorization_service.tsx#:~:text=getKibanaFeatures), [app_authorization.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/app_authorization.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures)+ 14 more | 8.8.0 | +| | [app_authorization.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/app_authorization.ts#:~:text=getKibanaFeatures), [privileges.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.ts#:~:text=getKibanaFeatures), [authorization_service.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/authorization_service.tsx#:~:text=getKibanaFeatures), [app_authorization.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/app_authorization.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures)+ 15 more | 8.8.0 | | | [authorization_service.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/authorization_service.tsx#:~:text=getElasticsearchFeatures) | 8.8.0 | | | [license_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode), [license_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode), [license_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode) | 8.8.0 | | | [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/public/plugin.tsx#:~:text=license%24) | 8.8.0 | @@ -646,9 +745,12 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [wrap_search_source_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.ts#:~:text=create) | - | | | [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.test.ts#:~:text=fetch) | - | | | [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=indexPatterns), [dependencies_start_mock.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts#:~:text=indexPatterns) | - | +| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [get_es_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts#:~:text=title), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=title), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts#:~:text=title), [get_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts#:~:text=title), [utils.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts#:~:text=title), [validators.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx#:~:text=title)+ 18 more | - | | | [wrap_search_source_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.ts#:~:text=create) | - | | | [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.test.ts#:~:text=fetch) | - | | | [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/hooks/eql/api.ts#:~:text=options) | - | +| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [get_es_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts#:~:text=title), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=title), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts#:~:text=title), [get_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts#:~:text=title), [utils.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts#:~:text=title), [validators.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx#:~:text=title)+ 18 more | - | +| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [get_es_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts#:~:text=title), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=title), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts#:~:text=title), [get_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts#:~:text=title), [utils.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts#:~:text=title), [validators.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx#:~:text=title)+ 4 more | - | | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [list.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts#:~:text=mode), [response_actions.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts#:~:text=mode)+ 3 more | 8.8.0 | | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [list.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts#:~:text=mode), [response_actions.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts#:~:text=mode)+ 3 more | 8.8.0 | | | [query.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/query.ts#:~:text=license%24) | 8.8.0 | @@ -688,7 +790,10 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [fetch_search_source_query.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/server/alert_types/es_query/lib/fetch_search_source_query.ts#:~:text=fetch), [rule_type.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/server/alert_types/es_query/rule_type.test.ts#:~:text=fetch), [rule_type.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/server/alert_types/es_query/rule_type.test.ts#:~:text=fetch) | - | | | [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=indexPatterns), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=indexPatterns), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=indexPatterns), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=indexPatterns), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=indexPatterns) | - | | | [expression.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/threshold/expression.tsx#:~:text=fieldFormats) | - | +| | [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=title), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [search_source_expression_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/search_source_expression_form.tsx#:~:text=title), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=title)+ 8 more | - | | | [fetch_search_source_query.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/server/alert_types/es_query/lib/fetch_search_source_query.ts#:~:text=fetch), [rule_type.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/server/alert_types/es_query/rule_type.test.ts#:~:text=fetch), [rule_type.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/server/alert_types/es_query/rule_type.test.ts#:~:text=fetch) | - | +| | [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=title), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [search_source_expression_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/search_source_expression_form.tsx#:~:text=title), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=title)+ 8 more | - | +| | [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=title), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=title), [search_source_expression_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/search_source_expression_form.tsx#:~:text=title) | - | @@ -696,6 +801,9 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [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) | - | | | [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) | - | @@ -710,19 +818,65 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ +## threatIntelligence + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [mock_security_context.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/threat_intelligence/public/common/mocks/mock_security_context.tsx#:~:text=title), [mock_security_context.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/threat_intelligence/public/common/mocks/mock_security_context.tsx#:~:text=title) | - | +| | [mock_security_context.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/threat_intelligence/public/common/mocks/mock_security_context.tsx#:~:text=title), [mock_security_context.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/threat_intelligence/public/common/mocks/mock_security_context.tsx#:~:text=title) | - | +| | [mock_security_context.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/threat_intelligence/public/common/mocks/mock_security_context.tsx#:~:text=title) | - | + + + +## timelines + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/container/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/container/source/index.tsx#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/mock/index_pattern.ts#:~:text=title), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/server/search_strategy/index_fields/index.ts#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/container/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/container/source/index.tsx#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/mock/index_pattern.ts#:~:text=title), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/server/search_strategy/index_fields/index.ts#:~:text=title) | - | +| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/container/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/container/source/index.tsx#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/mock/index_pattern.ts#:~:text=title), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/server/search_strategy/index_fields/index.ts#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/container/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/container/source/index.tsx#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/mock/index_pattern.ts#:~:text=title), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/server/search_strategy/index_fields/index.ts#:~:text=title) | - | +| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/container/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/container/source/index.tsx#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/mock/index_pattern.ts#:~:text=title), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/server/search_strategy/index_fields/index.ts#:~:text=title) | - | + + + ## transform | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [step_details_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx#:~:text=title), [wizard.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx#:~:text=title), [filter_term_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title)+ 36 more | - | +| | [step_details_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx#:~:text=title), [wizard.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx#:~:text=title), [filter_term_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title)+ 36 more | - | +| | [step_details_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/step_details_form.tsx#:~:text=title), [wizard.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx#:~:text=title), [filter_term_form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title), [use_index_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/public/app/hooks/use_index_data.ts#:~:text=title)+ 13 more | - | | | [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/transform/server/services/license.ts#:~:text=license%24) | 8.8.0 | +## triggersActionsUi + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [data_apis.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/common/lib/data_apis.ts#:~:text=title), [data_apis.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/common/lib/data_apis.ts#:~:text=title) | - | +| | [data_apis.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/common/lib/data_apis.ts#:~:text=title), [data_apis.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/common/lib/data_apis.ts#:~:text=title) | - | +| | [data_apis.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/common/lib/data_apis.ts#:~:text=title) | - | + + + +## unifiedFieldList + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [load_field_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/public/services/field_stats/load_field_stats.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title), [field_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/server/routes/field_stats.ts#:~:text=title), [field_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/server/routes/field_stats.ts#:~:text=title), [load_field_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/public/services/field_stats/load_field_stats.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title)+ 2 more | - | +| | [load_field_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/public/services/field_stats/load_field_stats.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title), [field_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/server/routes/field_stats.ts#:~:text=title), [field_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/server/routes/field_stats.ts#:~:text=title), [load_field_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/public/services/field_stats/load_field_stats.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title)+ 2 more | - | +| | [load_field_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/public/services/field_stats/load_field_stats.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title), [field_existing_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/common/utils/field_existing_utils.ts#:~:text=title), [field_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/server/routes/field_stats.ts#:~:text=title), [field_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/server/routes/field_stats.ts#:~:text=title) | - | + + + ## unifiedSearch | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [query_string_input.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/query_string_input/query_string_input.tsx#:~:text=indexPatterns) | - | +| | [value_suggestion_provider.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/autocomplete/providers/value_suggestion_provider.ts#:~:text=title), [fetch_index_patterns.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/query_string_input/fetch_index_patterns.ts#:~:text=title), [change_dataview.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx#:~:text=title), [value_suggestion_provider.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/autocomplete/providers/value_suggestion_provider.ts#:~:text=title), [fetch_index_patterns.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/query_string_input/fetch_index_patterns.ts#:~:text=title), [change_dataview.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx#:~:text=title) | - | +| | [value_suggestion_provider.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/autocomplete/providers/value_suggestion_provider.ts#:~:text=title), [fetch_index_patterns.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/query_string_input/fetch_index_patterns.ts#:~:text=title), [change_dataview.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx#:~:text=title), [value_suggestion_provider.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/autocomplete/providers/value_suggestion_provider.ts#:~:text=title), [fetch_index_patterns.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/query_string_input/fetch_index_patterns.ts#:~:text=title), [change_dataview.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx#:~:text=title) | - | +| | [value_suggestion_provider.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/autocomplete/providers/value_suggestion_provider.ts#:~:text=title), [fetch_index_patterns.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/query_string_input/fetch_index_patterns.ts#:~:text=title), [change_dataview.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx#:~:text=title) | - | | | [terms_enum.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_enum.ts#:~:text=getFieldByName), [terms_enum.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_enum.ts#:~:text=getFieldByName), [terms_agg.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_agg.ts#:~:text=getFieldByName), [terms_agg.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_agg.ts#:~:text=getFieldByName) | - | | | [terms_enum.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_enum.ts#:~:text=findIndexPatternById), [terms_enum.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_enum.ts#:~:text=findIndexPatternById), [terms_agg.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_agg.ts#:~:text=findIndexPatternById), [terms_agg.ts](https://github.com/elastic/kibana/tree/main/src/plugins/unified_search/server/autocomplete/terms_agg.ts#:~:text=findIndexPatternById) | - | @@ -732,6 +886,9 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [external_links.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.tsx#:~:text=title), [external_links.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.tsx#:~:text=title) | - | +| | [external_links.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.tsx#:~:text=title), [external_links.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.tsx#:~:text=title) | - | +| | [external_links.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecation_logs/fix_deprecation_logs/external_links.tsx#:~:text=title) | - | | | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/public/shared_imports.ts#:~:text=RedirectAppLinks), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/public/application/app.tsx#:~:text=RedirectAppLinks), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/public/application/app.tsx#:~:text=RedirectAppLinks), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/public/application/app.tsx#:~:text=RedirectAppLinks) | - | | | [reindex_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24) | 8.8.0 | @@ -741,10 +898,23 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [use_data_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/use_data_view.ts#:~:text=title), [use_data_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/use_data_view.ts#:~:text=title) | - | +| | [use_data_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/use_data_view.ts#:~:text=title), [use_data_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/use_data_view.ts#:~:text=title) | - | +| | [use_data_view.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/use_data_view.ts#:~:text=title) | - | | | [ux_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ux/public/application/ux_app.tsx#:~:text=RedirectAppLinks), [ux_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ux/public/application/ux_app.tsx#:~:text=RedirectAppLinks), [ux_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ux/public/application/ux_app.tsx#:~:text=RedirectAppLinks) | - | +## visDefaultEditor + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=title), [field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=title), [agg_select.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=title), [field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=title), [field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=title), [agg_select.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=title) | - | +| | [field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=title), [field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=title), [agg_select.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=title), [field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=title), [field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=title), [agg_select.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=title) | - | +| | [field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=title), [field.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=title), [agg_select.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=title) | - | + + + ## visTypeGauge | Deprecated API | Reference location(s) | Remove By | @@ -762,16 +932,39 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ +## visTypeTimelion + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [arg_value_suggestions.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts#:~:text=title), [arg_value_suggestions.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts#:~:text=title), [arg_value_suggestions.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts#:~:text=title), [arg_value_suggestions.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts#:~:text=title) | - | +| | [arg_value_suggestions.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts#:~:text=title), [arg_value_suggestions.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts#:~:text=title), [arg_value_suggestions.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts#:~:text=title), [arg_value_suggestions.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts#:~:text=title) | - | +| | [arg_value_suggestions.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts#:~:text=title), [arg_value_suggestions.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts#:~:text=title) | - | + + + ## visTypeTimeseries | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [index_patterns_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/common/index_patterns_utils.ts#:~:text=title), [index_patterns_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/common/index_patterns_utils.ts#:~:text=title), [get_fields.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/server/lib/get_fields.ts#:~:text=title), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=title), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=title), [convert_series_to_datatable.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.ts#:~:text=title), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=title), [get_datasource_info.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts#:~:text=title), [get_datasource_info.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts#:~:text=title), [get_datasource_info.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts#:~:text=title)+ 14 more | - | | | [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=getNonScriptedFields), [fetch_fields.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=getNonScriptedFields), [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=getNonScriptedFields), [fetch_fields.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=getNonScriptedFields) | - | +| | [index_patterns_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/common/index_patterns_utils.ts#:~:text=title), [index_patterns_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/common/index_patterns_utils.ts#:~:text=title), [get_fields.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/server/lib/get_fields.ts#:~:text=title), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=title), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=title), [convert_series_to_datatable.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.ts#:~:text=title), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=title), [get_datasource_info.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts#:~:text=title), [get_datasource_info.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts#:~:text=title), [get_datasource_info.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts#:~:text=title)+ 14 more | - | | | [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=getNonScriptedFields), [fetch_fields.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=getNonScriptedFields), [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=getNonScriptedFields), [fetch_fields.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=getNonScriptedFields) | - | +| | [index_patterns_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/common/index_patterns_utils.ts#:~:text=title), [index_patterns_utils.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/common/index_patterns_utils.ts#:~:text=title), [get_fields.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/server/lib/get_fields.ts#:~:text=title), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=title), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=title), [convert_series_to_datatable.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.ts#:~:text=title), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=title), [get_datasource_info.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts#:~:text=title), [get_datasource_info.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts#:~:text=title), [get_datasource_info.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/datasource/get_datasource_info.test.ts#:~:text=title)+ 2 more | - | | | [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=getNonScriptedFields), [fetch_fields.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=getNonScriptedFields) | - | +## visTypeVega + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [search_api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vega/public/data_model/search_api.ts#:~:text=title), [search_api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vega/public/data_model/search_api.ts#:~:text=title) | - | +| | [search_api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vega/public/data_model/search_api.ts#:~:text=title), [search_api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vega/public/data_model/search_api.ts#:~:text=title) | - | +| | [search_api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/vis_types/vega/public/data_model/search_api.ts#:~:text=title) | - | + + + ## visualizations | Deprecated API | Reference location(s) | Remove By | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 58604d901ae72..4a49ce29cde05 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -128,7 +128,7 @@ so TS and code-reference navigation might not highlight them. | | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| -| spaces | | [on_post_auth_interceptor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/lib/request_interceptors/on_post_auth_interceptor.ts#:~:text=getKibanaFeatures), [spaces_usage_collector.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.ts#:~:text=getKibanaFeatures), [on_post_auth_interceptor.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/lib/request_interceptors/on_post_auth_interceptor.test.ts#:~:text=getKibanaFeatures), [app_authorization.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/app_authorization.ts#:~:text=getKibanaFeatures), [privileges.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.ts#:~:text=getKibanaFeatures), [authorization_service.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/authorization_service.tsx#:~:text=getKibanaFeatures), [app_authorization.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/app_authorization.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures)+ 17 more | 8.8.0 | +| spaces | | [on_post_auth_interceptor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/lib/request_interceptors/on_post_auth_interceptor.ts#:~:text=getKibanaFeatures), [spaces_usage_collector.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.ts#:~:text=getKibanaFeatures), [on_post_auth_interceptor.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/lib/request_interceptors/on_post_auth_interceptor.test.ts#:~:text=getKibanaFeatures), [app_authorization.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/app_authorization.ts#:~:text=getKibanaFeatures), [privileges.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.ts#:~:text=getKibanaFeatures), [authorization_service.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/authorization_service.tsx#:~:text=getKibanaFeatures), [app_authorization.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/app_authorization.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures)+ 18 more | 8.8.0 | | spaces | | [spaces_usage_collector.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/plugin.ts#:~:text=license%24), [spaces_usage_collector.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.test.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/plugin.ts#:~:text=license%24) | 8.8.0 | | security | | [elasticsearch_role.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts#:~:text=disabled), [role_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/lib/role_utils.ts#:~:text=disabled), [role_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/lib/role_utils.ts#:~:text=disabled), [primary_feature_privilege.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts#:~:text=disabled), [elasticsearch_role.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts#:~:text=disabled), [kibana_features.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts#:~:text=disabled), [put.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts#:~:text=disabled), [put_payload.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts#:~:text=disabled) | 8.8.0 | | security | | [disable_ui_capabilities.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts#:~:text=requiredRoles) | 8.8.0 @@ -175,7 +175,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| -| indexLifecycleManagement | | [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_lifecycle_management/server/services/license.ts#:~:text=license%24), [reindex_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/server/services/license.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/server/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/remote_clusters/server/plugin.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/rollup/server/services/license.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/snapshot_restore/server/services/license.ts#:~:text=license%24) | 8.8.0 | +| upgradeAssistant | | [reindex_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_lifecycle_management/server/services/license.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/server/services/license.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/server/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/remote_clusters/server/plugin.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/rollup/server/services/license.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/snapshot_restore/server/services/license.ts#:~:text=license%24) | 8.8.0 | | licenseManagement | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/license_management/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cross_cluster_replication/public/plugin.ts#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24) | 8.8.0 | @@ -192,5 +192,5 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| -| management | | [application.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/management/public/application.tsx#:~:text=appBasePath) | 8.8.0 | -| visualizations | | [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/components/visualize_top_nav.tsx#:~:text=onAppLeave), [visualize_editor_common.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/components/visualize_editor_common.tsx#:~:text=onAppLeave), [app.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/app.tsx#:~:text=onAppLeave), [index.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/index.tsx#:~:text=onAppLeave), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [mounter.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/mounter.tsx#:~:text=onAppLeave) | 8.8.0 | \ No newline at end of file +| lens | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [mounter.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/lens/public/app_plugin/mounter.tsx#:~:text=onAppLeave), [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/components/visualize_top_nav.tsx#:~:text=onAppLeave), [visualize_editor_common.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/components/visualize_editor_common.tsx#:~:text=onAppLeave), [app.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/app.tsx#:~:text=onAppLeave), [index.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/visualizations/public/visualize_app/index.tsx#:~:text=onAppLeave) | 8.8.0 | +| management | | [application.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/management/public/application.tsx#:~:text=appBasePath) | 8.8.0 | \ No newline at end of file diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 1f599397cba74..f6b674d8a50d6 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index f0b145b742a48..c170f32e0e862 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 33551d38d8eb7..a8391f0a6b7bc 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2022-10-10 +date: 2022-10-12 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 ac8234957b13f..48ce80f3c1110 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2022-10-10 +date: 2022-10-12 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 00b3b6c9f3008..614e4046b91e6 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2022-10-10 +date: 2022-10-12 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 f9dc0ebec4adb..3782060703137 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2022-10-10 +date: 2022-10-12 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 2aef259660758..1d736bb8e3ba2 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2022-10-10 +date: 2022-10-12 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 4283b8368b2ea..2ee334256955b 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2022-10-10 +date: 2022-10-12 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 ff64843fa7edc..041a73eff09b7 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2022-10-10 +date: 2022-10-12 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 01f3f85e83ae3..27b0294d888d4 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2022-10-10 +date: 2022-10-12 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 d6cf5c3d25754..20e24d0f2d48a 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.devdocs.json b/api_docs/expression_gauge.devdocs.json index 1575310553e8e..7869c0eedcb1c 100644 --- a/api_docs/expression_gauge.devdocs.json +++ b/api_docs/expression_gauge.devdocs.json @@ -550,6 +550,17 @@ "path": "src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "expressionGauge", + "id": "def-common.GaugeExpressionProps.canNavigateToLens", + "type": "boolean", + "tags": [], + "label": "canNavigateToLens", + "description": [], + "path": "src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index 1fe3db16572f0..8d1940df40ec6 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 57 | 0 | 57 | 2 | +| 58 | 0 | 58 | 2 | ## Client diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index dd0f849bf2e00..0fa9829f0e5cc 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2022-10-10 +date: 2022-10-12 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 73ebc3735408f..e3053b1eb5a72 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2022-10-10 +date: 2022-10-12 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 3a6e7dee6c2bf..ec94d8df8427d 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2022-10-10 +date: 2022-10-12 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 f2a60f4396a7d..d347ff76f859c 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2022-10-10 +date: 2022-10-12 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 536c4ed7764e9..0a5accf319f42 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2022-10-10 +date: 2022-10-12 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 0321ed48ea421..824cf6bf5f013 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2022-10-10 +date: 2022-10-12 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 43832994473b1..6899e969e9ca6 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2022-10-10 +date: 2022-10-12 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 8735e4a7b91b9..78283dfcdd174 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2022-10-10 +date: 2022-10-12 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 f10823d12ac9d..fbecb179ff34a 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2022-10-10 +date: 2022-10-12 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 ea1cfeadc6141..85ebc5ddefa68 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.devdocs.json b/api_docs/expression_x_y.devdocs.json index 70749833d4563..e0b7d47cfa7ca 100644 --- a/api_docs/expression_x_y.devdocs.json +++ b/api_docs/expression_x_y.devdocs.json @@ -37,7 +37,23 @@ "initialIsOpen": false } ], - "objects": [] + "objects": [ + { + "parentPluginId": "expressionXY", + "id": "def-public.LayerTypes", + "type": "Object", + "tags": [], + "label": "LayerTypes", + "description": [], + "signature": [ + "{ readonly DATA: \"data\"; readonly REFERENCELINE: \"referenceLine\"; readonly ANNOTATIONS: \"annotations\"; }" + ], + "path": "src/plugins/chart_expressions/expression_xy/common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ] }, "server": { "classes": [], @@ -1775,6 +1791,28 @@ "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_renderers.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "expressionXY", + "id": "def-common.XYChartProps.syncTooltips", + "type": "boolean", + "tags": [], + "label": "syncTooltips", + "description": [], + "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_renderers.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "expressionXY", + "id": "def-common.XYChartProps.syncColors", + "type": "boolean", + "tags": [], + "label": "syncColors", + "description": [], + "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_renderers.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -2673,6 +2711,22 @@ "initialIsOpen": false } ], - "objects": [] + "objects": [ + { + "parentPluginId": "expressionXY", + "id": "def-common.LayerTypes", + "type": "Object", + "tags": [], + "label": "LayerTypes", + "description": [], + "signature": [ + "{ readonly DATA: \"data\"; readonly REFERENCELINE: \"referenceLine\"; readonly ANNOTATIONS: \"annotations\"; }" + ], + "path": "src/plugins/chart_expressions/expression_xy/common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ] } } \ No newline at end of file diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index 5c3926722ab59..57bba81d74fce 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; @@ -21,10 +21,13 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 153 | 0 | 143 | 9 | +| 157 | 0 | 147 | 9 | ## Client +### Objects + + ### Consts, variables and types @@ -35,6 +38,9 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) ## Common +### Objects + + ### Interfaces diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 825f043405431..dd6d9c8df90d8 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.devdocs.json b/api_docs/features.devdocs.json index a6e9773502284..cbbe75fe20fa4 100644 --- a/api_docs/features.devdocs.json +++ b/api_docs/features.devdocs.json @@ -2335,6 +2335,10 @@ "plugin": "security", "path": "x-pack/plugins/security/server/authorization/privileges/privileges.test.ts" }, + { + "plugin": "security", + "path": "x-pack/plugins/security/server/authorization/privileges/privileges.test.ts" + }, { "plugin": "spaces", "path": "x-pack/plugins/spaces/server/lib/request_interceptors/on_post_auth_interceptor.test.ts" diff --git a/api_docs/features.mdx b/api_docs/features.mdx index 416f97990d566..0ff16da9abd75 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2022-10-10 +date: 2022-10-12 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 9ead59b5563f6..6b61b918d3c12 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2022-10-10 +date: 2022-10-12 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 bf3db3e921d0c..8993f399ece29 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.devdocs.json b/api_docs/files.devdocs.json index aaf7a55eb4c7f..f9492ae882e46 100644 --- a/api_docs/files.devdocs.json +++ b/api_docs/files.devdocs.json @@ -1648,7 +1648,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -1658,8 +1660,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", diff --git a/api_docs/files.mdx b/api_docs/files.mdx index e71dfb9e8652f..6c5c91ee28195 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index 292965453dec7..21d05ee976bb4 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -5271,10 +5271,10 @@ }, { "parentPluginId": "fleet", - "id": "def-server.PackageClient.getRegistryPackage", + "id": "def-server.PackageClient.getPackage", "type": "Function", "tags": [], - "label": "getRegistryPackage", + "label": "getPackage", "description": [], "signature": [ "(packageName: string, packageVersion: string) => Promise<{ packageInfo: ", @@ -5282,8 +5282,8 @@ "pluginId": "fleet", "scope": "common", "docId": "kibFleetPluginApi", - "section": "def-common.RegistryPackage", - "text": "RegistryPackage" + "section": "def-common.ArchivePackage", + "text": "ArchivePackage" }, "; paths: string[]; }>" ], @@ -5293,7 +5293,7 @@ "children": [ { "parentPluginId": "fleet", - "id": "def-server.PackageClient.getRegistryPackage.$1", + "id": "def-server.PackageClient.getPackage.$1", "type": "string", "tags": [], "label": "packageName", @@ -5308,7 +5308,7 @@ }, { "parentPluginId": "fleet", - "id": "def-server.PackageClient.getRegistryPackage.$2", + "id": "def-server.PackageClient.getPackage.$2", "type": "string", "tags": [], "label": "packageVersion", diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 82149c338ffde..ff078fdae2749 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2022-10-10 +date: 2022-10-12 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 bd9ccebf846d7..51ad5d9a38b15 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2022-10-10 +date: 2022-10-12 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 1021f353f39d5..8fd904db4725b 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2022-10-10 +date: 2022-10-12 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 a1269fecd710d..3c5ade1009a67 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2022-10-10 +date: 2022-10-12 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 d64fb3896ad9d..9b5edbadcd7b5 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2022-10-10 +date: 2022-10-12 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 c0db624b8d38d..f14709faa42e6 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2022-10-10 +date: 2022-10-12 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 4e9dd1b904ede..b359a8c04174f 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2022-10-10 +date: 2022-10-12 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 c81edba15ec6b..e6a2e539318d7 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2022-10-10 +date: 2022-10-12 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 208c8049e38b4..a2a006e295c1d 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2022-10-10 +date: 2022-10-12 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 083f69d0939a1..71f65f9f2657f 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2022-10-10 +date: 2022-10-12 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 61d044d8d2f42..2f3b9723780dc 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2022-10-10 +date: 2022-10-12 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 3cd0f613a9e3d..48acca3b0f4f1 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-utils plugin -date: 2022-10-10 +date: 2022-10-12 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 e177b66a85837..3ad2852fa5489 100644 --- a/api_docs/kbn_alerts.mdx +++ b/api_docs/kbn_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts title: "@kbn/alerts" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts plugin -date: 2022-10-10 +date: 2022-10-12 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 b7fc346931109..a8ba24c8e168f 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2022-10-10 +date: 2022-10-12 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 28a6f6bafc1af..0bc31aa9c0659 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2022-10-10 +date: 2022-10-12 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 070f03039547f..06ebf73c91d40 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 8c7ceac1d78f9..7d5b249604697 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2022-10-10 +date: 2022-10-12 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 7a21c30fd3843..41bf3adf518d1 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2022-10-10 +date: 2022-10-12 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 c1926cbf98c9a..493c4b7b04e0d 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index c9629dc573b1d..888268097459a 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 44d2e38a95375..722720f8be6ce 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index e96342c7ce840..3def492cc5745 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2022-10-10 +date: 2022-10-12 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 3abeee268d46e..0ee252f08421b 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index 45276f22d3586..aab46b4861962 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2022-10-10 +date: 2022-10-12 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 cd266cfa11bcd..4a608f0cdf8df 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2022-10-10 +date: 2022-10-12 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 a975d89c203cc..3a0e03d5134a0 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2022-10-10 +date: 2022-10-12 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 254af0805e3cf..788d6c15913e0 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2022-10-10 +date: 2022-10-12 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 2639fcb9a105a..561f3d24d2974 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2022-10-10 +date: 2022-10-12 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 ae700c05f3647..81071ee765dab 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2022-10-10 +date: 2022-10-12 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 ffebb3323e821..c2d04ec3156d3 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2022-10-10 +date: 2022-10-12 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 177cc1d2c88f5..f79a0d3cd2f77 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 668d543ce208e..c77ba05da9bfb 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list.mdx b/api_docs/kbn_content_management_table_list.mdx index 8ec280432b055..81e60702143eb 100644 --- a/api_docs/kbn_content_management_table_list.mdx +++ b/api_docs/kbn_content_management_table_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list title: "@kbn/content-management-table-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list plugin -date: 2022-10-10 +date: 2022-10-12 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 18c7af5ca7546..89df37d3c87cb 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 6a584f10cc266..90ff5379f0fb7 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 56ae80db62968..e3f058bebb045 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 ae1bff84123b5..b7c9274235650 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2022-10-10 +date: 2022-10-12 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 206cc86999bb5..d524bd0514c7d 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 10f93de93e697..eb300a9a604a9 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 2220baea064f8..8a1b1cd6bcbaf 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 2451c9adfa293..4a08a0bc21de5 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 6dffd3fe3eab0..d9c7ac6d6397d 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 374a205d6d7eb..8f9566f2761f4 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2022-10-10 +date: 2022-10-12 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 d77d53ffa1912..985d6069bbf4b 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 a0adf2433ba90..1da2e6d48246d 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index ff353e7206588..14e34899f6880 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 b1482ac80cfc8..220a3eeaf2387 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2022-10-10 +date: 2022-10-12 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 3052f18231f88..2bc002e40f51b 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 a374fa4b72bfd..a8228ba36778c 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 1452d1eca68de..3aee8c6db1794 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 2fa1a2398f3c7..eee3543a8a13d 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2022-10-10 +date: 2022-10-12 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 58247b909688c..90b5ae77da805 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2022-10-10 +date: 2022-10-12 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 0c2303c8d7b49..9b61dc6ee2574 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 acbec545278f5..bfc883a2755f1 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 6b49aeb6ad2db..136cffaf8ba20 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 758606f2c966f..d583220653950 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 8ef722c82ebb5..593a8fbbe5821 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 75bee5daa99f5..7aef8159549aa 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 ff88c65e59c67..0ca714a3ad7dd 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 a64b529d30a99..2d3cf3950564c 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2022-10-10 +date: 2022-10-12 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 cf83c7e9bf2fa..a3bba21227855 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2022-10-10 +date: 2022-10-12 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 7786d5b668cf5..226c1dc038f60 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 403da6112f339..09fd661f1845a 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 1f6219d03955c..a2dbc29d98609 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 b28f3f07c9703..2b86b13e36fd5 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 2aae17b574f69..8e27069bff709 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2022-10-10 +date: 2022-10-12 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 d646839a1a1cc..3b293b98d3da0 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 bbc274c925599..292f1d4e1ac7d 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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.devdocs.json b/api_docs/kbn_core_elasticsearch_client_server_mocks.devdocs.json index dc17ba9d371c0..4a5e46fda1b9f 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.devdocs.json +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.devdocs.json @@ -412,7 +412,7 @@ "UpdateRequest", ", options?: ", "TransportRequestOptions", - " | undefined]>; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + " | undefined]>; asyncSearch: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", @@ -422,7 +422,7 @@ }, "<", "default", - ">; helpers: ", + ">; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", @@ -432,29 +432,29 @@ }, "<", "default", - ">; child: ", + ">; helpers: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", - "section": "def-server.ClientApiMockInstance", - "text": "ClientApiMockInstance" + "section": "def-server.DeeplyMockedApi", + "text": "DeeplyMockedApi" }, "<", "default", - ", [opts: ", - "ClientOptions", - "]>; Internal: ", + ">; child: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", - "section": "def-server.DeeplyMockedApi", - "text": "DeeplyMockedApi" + "section": "def-server.ClientApiMockInstance", + "text": "ClientApiMockInstance" }, "<", "default", - ">; asyncSearch: ", + ", [opts: ", + "ClientOptions", + "]>; Internal: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", @@ -1523,7 +1523,7 @@ "UpdateRequest", ", options?: ", "TransportRequestOptions", - " | undefined]>; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + " | undefined]>; asyncSearch: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", @@ -1533,7 +1533,7 @@ }, "<", "default", - ">; helpers: ", + ">; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", @@ -1543,29 +1543,29 @@ }, "<", "default", - ">; child: ", + ">; helpers: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", - "section": "def-server.ClientApiMockInstance", - "text": "ClientApiMockInstance" + "section": "def-server.DeeplyMockedApi", + "text": "DeeplyMockedApi" }, "<", "default", - ", [opts: ", - "ClientOptions", - "]>; Internal: ", + ">; child: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", - "section": "def-server.DeeplyMockedApi", - "text": "DeeplyMockedApi" + "section": "def-server.ClientApiMockInstance", + "text": "ClientApiMockInstance" }, "<", "default", - ">; asyncSearch: ", + ", [opts: ", + "ClientOptions", + "]>; Internal: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", @@ -2588,7 +2588,7 @@ "UpdateRequest", ", options?: ", "TransportRequestOptions", - " | undefined]>; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + " | undefined]>; asyncSearch: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", @@ -2598,7 +2598,7 @@ }, "<", "default", - ">; helpers: ", + ">; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", @@ -2608,29 +2608,29 @@ }, "<", "default", - ">; child: ", + ">; helpers: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", - "section": "def-server.ClientApiMockInstance", - "text": "ClientApiMockInstance" + "section": "def-server.DeeplyMockedApi", + "text": "DeeplyMockedApi" }, "<", "default", - ", [opts: ", - "ClientOptions", - "]>; Internal: ", + ">; child: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", - "section": "def-server.DeeplyMockedApi", - "text": "DeeplyMockedApi" + "section": "def-server.ClientApiMockInstance", + "text": "ClientApiMockInstance" }, "<", "default", - ">; asyncSearch: ", + ", [opts: ", + "ClientOptions", + "]>; Internal: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", @@ -3720,7 +3720,7 @@ "UpdateRequest", ", options?: ", "TransportRequestOptions", - " | undefined]>; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + " | undefined]>; asyncSearch: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", @@ -3730,7 +3730,7 @@ }, "<", "default", - ">; helpers: ", + ">; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", @@ -3740,29 +3740,29 @@ }, "<", "default", - ">; child: ", + ">; helpers: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", - "section": "def-server.ClientApiMockInstance", - "text": "ClientApiMockInstance" + "section": "def-server.DeeplyMockedApi", + "text": "DeeplyMockedApi" }, "<", "default", - ", [opts: ", - "ClientOptions", - "]>; Internal: ", + ">; child: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", - "section": "def-server.DeeplyMockedApi", - "text": "DeeplyMockedApi" + "section": "def-server.ClientApiMockInstance", + "text": "ClientApiMockInstance" }, "<", "default", - ">; asyncSearch: ", + ", [opts: ", + "ClientOptions", + "]>; Internal: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "server", diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index f13371eb32d33..097dcb28dbaec 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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.devdocs.json b/api_docs/kbn_core_elasticsearch_server.devdocs.json index a6bbfb7a58cb9..6137810e54074 100644 --- a/api_docs/kbn_core_elasticsearch_server.devdocs.json +++ b/api_docs/kbn_core_elasticsearch_server.devdocs.json @@ -64,6 +64,31 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/core-elasticsearch-server", + "id": "def-server.ElasticsearchClientConfig.maxIdleSockets", + "type": "number", + "tags": [], + "label": "maxIdleSockets", + "description": [], + "path": "packages/core/elasticsearch/core-elasticsearch-server/src/client/client_config.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-elasticsearch-server", + "id": "def-server.ElasticsearchClientConfig.idleSocketTimeout", + "type": "Object", + "tags": [], + "label": "idleSocketTimeout", + "description": [], + "signature": [ + "moment.Duration" + ], + "path": "packages/core/elasticsearch/core-elasticsearch-server/src/client/client_config.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/core-elasticsearch-server", "id": "def-server.ElasticsearchClientConfig.compression", @@ -1053,7 +1078,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -1063,8 +1090,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", @@ -2252,6 +2277,35 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/core-elasticsearch-server", + "id": "def-server.IElasticsearchConfig.maxIdleSockets", + "type": "number", + "tags": [], + "label": "maxIdleSockets", + "description": [ + "\nThe maximum number of idle sockets to keep open between Kibana and Elasticsearch. If more sockets become idle, they will be closed." + ], + "path": "packages/core/elasticsearch/core-elasticsearch-server/src/elasticsearch_config.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-elasticsearch-server", + "id": "def-server.IElasticsearchConfig.idleSocketTimeout", + "type": "Object", + "tags": [], + "label": "idleSocketTimeout", + "description": [ + "\nThe timeout for idle sockets kept open between Kibana and Elasticsearch. If the socket is idle for longer than this timeout, it will be closed." + ], + "signature": [ + "moment.Duration" + ], + "path": "packages/core/elasticsearch/core-elasticsearch-server/src/elasticsearch_config.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/core-elasticsearch-server", "id": "def-server.IElasticsearchConfig.compression", @@ -2669,7 +2723,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -2679,8 +2735,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", @@ -3873,7 +3927,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -3883,8 +3939,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", @@ -5324,7 +5378,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -5334,8 +5390,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index 9a166f9484d64..8d9ad9546e203 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; @@ -21,7 +21,7 @@ Contact Kibana Core for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 99 | 0 | 51 | 0 | +| 103 | 0 | 53 | 0 | ## Server diff --git a/api_docs/kbn_core_elasticsearch_server_internal.devdocs.json b/api_docs/kbn_core_elasticsearch_server_internal.devdocs.json index 248c3b356fa14..92b9cc5394746 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.devdocs.json +++ b/api_docs/kbn_core_elasticsearch_server_internal.devdocs.json @@ -216,7 +216,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -226,8 +228,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", @@ -1799,7 +1799,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -1809,8 +1811,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", @@ -2884,7 +2884,7 @@ "label": "ElasticsearchConfigType", "description": [], "signature": [ - "{ readonly username?: string | undefined; readonly password?: string | undefined; readonly serviceAccountToken?: string | undefined; readonly requestTimeout: moment.Duration; readonly compression: boolean; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; } & { verificationMode: \"none\" | \"full\" | \"certificate\"; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; alwaysPresentCertificate: boolean; }>; readonly healthCheck: Readonly<{} & { delay: moment.Duration; }>; readonly customHeaders: Record; readonly hosts: string | string[]; readonly sniffOnStart: boolean; readonly sniffInterval: false | moment.Duration; readonly sniffOnConnectionFault: boolean; readonly maxSockets: number; readonly requestHeadersWhitelist: string | string[]; readonly shardTimeout: moment.Duration; readonly pingTimeout: moment.Duration; readonly logQueries: boolean; readonly apiVersion: string; readonly ignoreVersionMismatch: boolean; readonly skipStartupConnectionCheck: boolean; }" + "{ readonly username?: string | undefined; readonly password?: string | undefined; readonly serviceAccountToken?: string | undefined; readonly requestTimeout: moment.Duration; readonly compression: boolean; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; } & { verificationMode: \"none\" | \"full\" | \"certificate\"; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; alwaysPresentCertificate: boolean; }>; readonly healthCheck: Readonly<{} & { delay: moment.Duration; }>; readonly customHeaders: Record; readonly hosts: string | string[]; readonly sniffOnStart: boolean; readonly sniffInterval: false | moment.Duration; readonly sniffOnConnectionFault: boolean; readonly maxSockets: number; readonly maxIdleSockets: number; readonly idleSocketTimeout: moment.Duration; readonly requestHeadersWhitelist: string | string[]; readonly shardTimeout: moment.Duration; readonly pingTimeout: moment.Duration; readonly logQueries: boolean; readonly apiVersion: string; readonly ignoreVersionMismatch: boolean; readonly skipStartupConnectionCheck: boolean; }" ], "path": "packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.ts", "deprecated": false, @@ -2914,7 +2914,11 @@ "Type", "; maxSockets: ", "Type", - "; compression: ", + "; maxIdleSockets: ", + "Type", + "; idleSocketTimeout: ", + "Type", + "; compression: ", "Type", "; username: ", "Type", diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index b7f7ae66ec615..f79c98763b5a7 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 7651de084b9a9..aa8856a436178 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 61c1ac3f1ac5f..426ea68b58c3d 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 49ddcada894e4..2cc7c46a29217 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 03a2cd43f9145..7c8dc30eca088 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 411798fcb340e..e8b6270396c39 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 380ab162b9c61..cfa52ab87c9a7 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 fb62ecaef4a4c..a9f34741b49d7 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2022-10-10 +date: 2022-10-12 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 45029383a8e06..61b54aa2da7d9 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2022-10-10 +date: 2022-10-12 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 c8de0fc49cd9e..30c99ca6f2739 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 41b4cdf396fab..4ca5f30595805 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 b0aebe4d000fb..680d8ca33b90b 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 b09cce2f10598..cbe9bd0b10112 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 2d5738cf8ed25..a6fe4faa6b062 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 a5986b8db688b..24113c73dd086 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 ec1bafeee45e2..9ab21ae733216 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 7b60c4634ffa5..ae082dc3a91dd 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2022-10-10 +date: 2022-10-12 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 acbda3533b883..c6742069f56ac 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 533d1af83814c..0d7e0b269a27e 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2022-10-10 +date: 2022-10-12 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 d7c3c5d569dd4..f0dc47bdffd0e 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2022-10-10 +date: 2022-10-12 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 100517bf79a77..143bd7bbc301a 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 a7ccc3b652e73..0452f0c9a33e1 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 19c25e8b0395b..a38e076a73df0 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 414aad8ed5b84..56d14bd41b58f 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 8b9c843e68fcd..471c2401fc72b 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2022-10-10 +date: 2022-10-12 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 abe1586bedf14..0ef23c03ef9b5 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 05a8f02808490..6480fc7b64e8b 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 4db46422eeffe..7a700fb4fe59d 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 77771a9c4e01f..a6569167ec70d 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 102e9d27d27dc..2bfb302802358 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2022-10-10 +date: 2022-10-12 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 ce3c5558f9386..03fa7c9c08a5a 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 346b9f5a1a97e..eebb12b20c072 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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.mdx b/api_docs/kbn_core_injected_metadata_browser.mdx index dc28aa0d05f95..d0fb1f30aa200 100644 --- a/api_docs/kbn_core_injected_metadata_browser.mdx +++ b/api_docs/kbn_core_injected_metadata_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser title: "@kbn/core-injected-metadata-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser'] --- import kbnCoreInjectedMetadataBrowserObj from './kbn_core_injected_metadata_browser.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 f17c613a29524..b127ab99afb24 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 e9103d35d715e..d0455243d428c 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 86bc7cd276cb0..ee4f6ee62c9d5 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 e8d18ffa85999..c17723d5e2b0f 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 2da058044c31d..d00dadaf881cd 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index 0fd6658b66ccf..b52f7dbb99757 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2022-10-10 +date: 2022-10-12 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 5ea9405ce0bdf..97b59c9488d0c 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 b33d09367059e..3805fb0b5b002 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 b6588e68f0ad7..7f502807e1010 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 9f08d7e3befda..bfe09e53fc021 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 e8eb390e07292..340b8a76b3274 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2022-10-10 +date: 2022-10-12 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 16403bb05f5a0..a83faae485d9f 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 3da8129abb0ab..89941a365de80 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 cee2a79f8fac6..98fce50766f08 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 ae1b4654b8e87..c755a1784da13 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2022-10-10 +date: 2022-10-12 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 83c7283e11de1..f41b9721ca559 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 9ae964ddb4e34..0e767cf0603a3 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 8e7ad4d161b99..a538efdf15377 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 474f6ab09bdac..fd5bef1018594 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 e1bd6b5ef59e3..42c5fc496533a 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 d07f78ffb9d56..d8db2d06d108b 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 656ab7187bbaa..b1ae1b812058d 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 dec4f69c482e2..281c7aa787d8d 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 a2418521db9c7..c7a4c4c770b9d 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 676f282449efe..3a4052ecd20a8 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index 9aad3e0b93103..672b0762fdea7 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2022-10-10 +date: 2022-10-12 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 39c0978cc6d07..0f1caa1a2364b 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 41988c7f87ccf..dc53d8bba29a6 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 b666f07c63691..cd1fd77c0b2c8 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 9d385203d5418..0a0504db930c8 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index c373b57c1273b..459df365d2198 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 cff107daa7111..d4a22d4170b44 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2022-10-10 +date: 2022-10-12 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 4890a7483790b..7f7c2b8ce6578 100644 --- a/api_docs/kbn_core_saved_objects_api_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-internal title: "@kbn/core-saved-objects-api-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 e76ae1fd05bb1..100f40e4f4c5c 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 2f47670abdfec..b1c0117223c29 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 7415fc8f24013..ad2e154e097b5 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 e72c29db35935..6296c45f01c63 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 16a8f9bb1f80c..a1d7b5755d07d 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 58f98e15e9203..7fd0b668f7335 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 fcf15987f1274..4accc1297429b 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2022-10-10 +date: 2022-10-12 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 326c1611c791a..6b3bd59bfe80d 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 07756a85c7175..437dd050adab6 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.devdocs.json b/api_docs/kbn_core_saved_objects_migration_server_internal.devdocs.json index 3e01e7bbd7649..ac1eddca54b9b 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.devdocs.json +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.devdocs.json @@ -1927,7 +1927,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -1937,8 +1939,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", 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 10230a6232201..e25c38b7d472c 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 536a73abac4a7..ecaea67163e34 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 0b8e044f0b574..2273991c36c52 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2022-10-10 +date: 2022-10-12 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 74fbe52d0069c..821639778bac4 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 d266a38b89a25..53113f4b6bf1a 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 ebd8bbf47dc93..17f2f87f4c247 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2022-10-10 +date: 2022-10-12 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 223043281e54a..b259f37db1914 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2022-10-10 +date: 2022-10-12 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 639c80dd16184..f3541f735bf9c 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 4abe99291214a..da64b974066c9 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2022-10-10 +date: 2022-10-12 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 88d04e4eeea0b..f64dd463d16d1 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 5a3230d00fcbc..07e0d67f50325 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 d42b15ff5b04b..d3782f5f715e5 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2022-10-10 +date: 2022-10-12 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 60fd56639a01b..18ed9fe3fd7a6 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2022-10-10 +date: 2022-10-12 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_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index 1d26649f21f59..fef3f403a80dd 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2022-10-10 +date: 2022-10-12 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_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 1b42667d99bb0..e44786092dcb1 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 e69c72b770b7a..a35981f014a37 100644 --- a/api_docs/kbn_core_theme_browser_internal.mdx +++ b/api_docs/kbn_core_theme_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-internal title: "@kbn/core-theme-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 f3b5cbe8e0712..73159c8944ef2 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 f7428dc798396..820d4678f8d37 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2022-10-10 +date: 2022-10-12 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 3489c2c081f45..a3c61369d08d4 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 8f8093426e22e..9d4bf7f7994cc 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 c91d9beb9d48f..888e16dc1f894 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2022-10-10 +date: 2022-10-12 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 634a41ec1fe52..038b9dcfea007 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2022-10-10 +date: 2022-10-12 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 04d3804c3387a..3c54a9ca8bc53 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 e1878987d59e7..200a70468b647 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 8bac77409ac02..6d238db4af486 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2022-10-10 +date: 2022-10-12 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 3761c0054f0df..a84072f3481c2 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2022-10-10 +date: 2022-10-12 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 c75090a9b6142..756059a2c4cfc 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 2b4f692045595..aa1268aab898a 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2022-10-10 +date: 2022-10-12 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 7c8b276e834cc..414200b1db024 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index e0fd07d2de51a..39506d1bd2592 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2022-10-10 +date: 2022-10-12 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 18d746039c14b..72304c83618a6 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2022-10-10 +date: 2022-10-12 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 bcbe3e6f0708a..fa7b7750499d3 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2022-10-10 +date: 2022-10-12 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 582d465be5a63..41ee670794c44 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2022-10-10 +date: 2022-10-12 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 743a82b68b2e2..5eafd1369e9df 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.devdocs.json b/api_docs/kbn_doc_links.devdocs.json index fd01dbf8e5503..9ad5f15386219 100644 --- a/api_docs/kbn_doc_links.devdocs.json +++ b/api_docs/kbn_doc_links.devdocs.json @@ -300,7 +300,7 @@ "label": "enterpriseSearch", "description": [], "signature": [ - "{ readonly apiKeys: string; readonly bulkApi: string; readonly configuration: string; readonly connectors: string; readonly connectorsMongoDB: string; readonly connectorsMySQL: string; readonly connectorsWorkplaceSearch: string; readonly contentExtraction: string; readonly crawlerGettingStarted: string; readonly crawlerManaging: string; readonly crawlerOverview: string; readonly deployTrainedModels: string; readonly documentLevelSecurity: string; readonly ingestPipelines: string; readonly languageAnalyzers: string; readonly languageClients: string; readonly licenseManagement: string; readonly mailService: string; readonly start: string; readonly troubleshootSetup: string; readonly usersAccess: string; }" + "{ readonly apiKeys: string; readonly bulkApi: string; readonly configuration: string; readonly connectors: string; readonly connectorsMongoDB: string; readonly connectorsMySQL: string; readonly connectorsWorkplaceSearch: string; readonly crawlerGettingStarted: string; readonly crawlerManaging: string; readonly crawlerOverview: string; readonly deployTrainedModels: string; readonly documentLevelSecurity: string; readonly ingestPipelines: string; readonly languageAnalyzers: string; readonly languageClients: string; readonly licenseManagement: string; readonly mailService: string; readonly start: string; readonly troubleshootSetup: string; readonly usersAccess: string; }" ], "path": "packages/kbn-doc-links/src/types.ts", "deprecated": false, diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index 5989572689e52..869701b41be7d 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2022-10-10 +date: 2022-10-12 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 c95fc1e111f64..0ce262eb5938a 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2022-10-10 +date: 2022-10-12 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 177ceb72f72dc..788f95c32169d 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 5dca8c1133830..9ed5609741587 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2022-10-10 +date: 2022-10-12 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 53ef00e7813c8..1609bb0282e05 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.devdocs.json b/api_docs/kbn_es_query.devdocs.json index 3bd7db808950c..fafb95160c5b2 100644 --- a/api_docs/kbn_es_query.devdocs.json +++ b/api_docs/kbn_es_query.devdocs.json @@ -104,6 +104,47 @@ } ], "functions": [ + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.buildCombinedFilter", + "type": "Function", + "tags": [], + "label": "buildCombinedFilter", + "description": [ + "\nBuilds an COMBINED filter. An COMBINED filter is a filter with multiple sub-filters. Each sub-filter (FilterItem) represents a\ncondition." + ], + "signature": [ + "(filters: ", + "FilterItem", + "[]) => ", + "CombinedFilter" + ], + "path": "packages/kbn-es-query/src/filters/build_filters/combined_filter.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.buildCombinedFilter.$1", + "type": "Array", + "tags": [], + "label": "filters", + "description": [ + "An array of CombinedFilterItem" + ], + "signature": [ + "FilterItem", + "[]" + ], + "path": "packages/kbn-es-query/src/filters/build_filters/combined_filter.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/es-query", "id": "def-common.buildCustomFilter", @@ -765,47 +806,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/es-query", - "id": "def-common.buildOrFilter", - "type": "Function", - "tags": [], - "label": "buildOrFilter", - "description": [ - "\nBuilds an OR filter. An OR filter is a filter with multiple sub-filters. Each sub-filter (FilterItem) represents a\ncondition." - ], - "signature": [ - "(filters: ", - "FilterItem", - "[]) => ", - "OrFilter" - ], - "path": "packages/kbn-es-query/src/filters/build_filters/or_filter.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/es-query", - "id": "def-common.buildOrFilter.$1", - "type": "Array", - "tags": [], - "label": "filters", - "description": [ - "An array of OrFilterItem" - ], - "signature": [ - "FilterItem", - "[]" - ], - "path": "packages/kbn-es-query/src/filters/build_filters/or_filter.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/es-query", "id": "def-common.buildPhraseFilter", @@ -2249,6 +2249,53 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.isCombinedFilter", + "type": "Function", + "tags": [], + "label": "isCombinedFilter", + "description": [], + "signature": [ + "(filter: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + ") => boolean" + ], + "path": "packages/kbn-es-query/src/filters/build_filters/combined_filter.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.isCombinedFilter.$1", + "type": "Object", + "tags": [], + "label": "filter", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + } + ], + "path": "packages/kbn-es-query/src/filters/build_filters/combined_filter.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/es-query", "id": "def-common.isDataViewFieldSubtypeMulti", @@ -2740,53 +2787,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/es-query", - "id": "def-common.isOrFilter", - "type": "Function", - "tags": [], - "label": "isOrFilter", - "description": [], - "signature": [ - "(filter: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - ") => boolean" - ], - "path": "packages/kbn-es-query/src/filters/build_filters/or_filter.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/es-query", - "id": "def-common.isOrFilter.$1", - "type": "Object", - "tags": [], - "label": "filter", - "description": [], - "signature": [ - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - } - ], - "path": "packages/kbn-es-query/src/filters/build_filters/or_filter.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/es-query", "id": "def-common.isPhraseFilter", diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 903a72f04b9bb..e9f5b214dbc03 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2022-10-10 +date: 2022-10-12 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 de03102edaaec..10504db73304c 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2022-10-10 +date: 2022-10-12 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 c328060468254..aaac75eb629ea 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2022-10-10 +date: 2022-10-12 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 3b1d69004f2d9..2ef196f60fc98 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2022-10-10 +date: 2022-10-12 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 99c56f93be934..85f0617b5d8d1 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2022-10-10 +date: 2022-10-12 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 1374a4aec1d96..f7b2e8f302eed 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2022-10-10 +date: 2022-10-12 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 51789356f12dd..e96d3c9c691ff 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2022-10-10 +date: 2022-10-12 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 aef3268c9bfba..3d34c83cc3d60 100644 --- a/api_docs/kbn_get_repo_files.mdx +++ b/api_docs/kbn_get_repo_files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-get-repo-files title: "@kbn/get-repo-files" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/get-repo-files plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/get-repo-files'] --- import kbnGetRepoFilesObj from './kbn_get_repo_files.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index 66aba654ff775..2f53dfbfb0936 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2022-10-10 +date: 2022-10-12 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 4b7223d26561f..b2ff2a955c119 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index 240a64c2264ac..d1c2e452111c2 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2022-10-10 +date: 2022-10-12 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 cccab042144a3..ee04e830df83d 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2022-10-10 +date: 2022-10-12 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 c9db829a85be3..ce284259fa619 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index fd6582ff8a7c5..4af707cf15cb3 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2022-10-10 +date: 2022-10-12 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 c6b3c5a349b3b..362abf9b35f94 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2022-10-10 +date: 2022-10-12 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 929f3442b07fd..d77cc4eeda806 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2022-10-10 +date: 2022-10-12 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 ea265ce6a91d3..f836b5b30bca2 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2022-10-10 +date: 2022-10-12 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 620cc2a26b48c..9c8bfcf0c3ce0 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2022-10-10 +date: 2022-10-12 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 a407fb3d00675..ba95a5161c608 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index f8f1c0cbbf18e..9df9fe070f758 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2022-10-10 +date: 2022-10-12 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 d9ca0522727a6..8f0283e2a7573 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 598854d6f14f6..e43c2a0acbb9f 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2022-10-10 +date: 2022-10-12 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 7dd21a446f77f..bbb7fd7192475 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2022-10-10 +date: 2022-10-12 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 02b13bbb589b9..afffbd44f53cb 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2022-10-10 +date: 2022-10-12 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 f7394b06d8d9e..d9ab2344850ab 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index 0687bfe1ceb56..8ecd8476db900 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index 7eeb0479f984e..4f56a8b8a2ce4 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2022-10-10 +date: 2022-10-12 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 8d45d987a956e..11e6520d508b7 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2022-10-10 +date: 2022-10-12 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 10368217e8d44..b1f1ec75cea71 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2022-10-10 +date: 2022-10-12 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 dc1bc2010d831..da1694c88d36a 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2022-10-10 +date: 2022-10-12 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 3fa082077bf04..489526688c208 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2022-10-10 +date: 2022-10-12 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 fd1c4a622607c..109264320433d 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2022-10-10 +date: 2022-10-12 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 91f1073961202..b64ec2de9343e 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2022-10-10 +date: 2022-10-12 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 a2dc7b6bb5fb0..9371aa1f4390a 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index b4a5ffe67fbb5..1c02d1487dc6e 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.devdocs.json b/api_docs/kbn_rule_data_utils.devdocs.json index 513060301f142..adb2f74e16015 100644 --- a/api_docs/kbn_rule_data_utils.devdocs.json +++ b/api_docs/kbn_rule_data_utils.devdocs.json @@ -927,7 +927,7 @@ "label": "AlertConsumers", "description": [], "signature": [ - "\"infrastructure\" | \"observability\" | \"logs\" | \"apm\" | \"uptime\" | \"siem\"" + "\"infrastructure\" | \"apm\" | \"observability\" | \"logs\" | \"uptime\" | \"siem\"" ], "path": "packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts", "deprecated": false, @@ -1122,7 +1122,7 @@ "label": "ValidFeatureId", "description": [], "signature": [ - "\"infrastructure\" | \"observability\" | \"logs\" | \"apm\" | \"uptime\" | \"siem\"" + "\"infrastructure\" | \"apm\" | \"observability\" | \"logs\" | \"uptime\" | \"siem\"" ], "path": "packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts", "deprecated": false, diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 8842f16f95521..828c53662e410 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2022-10-10 +date: 2022-10-12 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 c1162de9f27a8..7999713a484fc 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2022-10-10 +date: 2022-10-12 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.devdocs.json b/api_docs/kbn_securitysolution_es_utils.devdocs.json index a96bb0f4d470e..e209c3759d537 100644 --- a/api_docs/kbn_securitysolution_es_utils.devdocs.json +++ b/api_docs/kbn_securitysolution_es_utils.devdocs.json @@ -631,14 +631,14 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", @@ -1877,14 +1877,14 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index 55450f4d392ab..7c4e69225c22d 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2022-10-10 +date: 2022-10-12 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 75ed0a758d7b4..a37de67738b0d 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2022-10-10 +date: 2022-10-12 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 99d48e0e7c4c4..b049a77659ca1 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2022-10-10 +date: 2022-10-12 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 47e94eafc034e..586a68a122b06 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2022-10-10 +date: 2022-10-12 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 0efde1f2fc5e5..bddf94d642610 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2022-10-10 +date: 2022-10-12 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 879dab8d19863..d57e192590342 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2022-10-10 +date: 2022-10-12 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 d5f0dd0f088f4..4aea1a7734fc6 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2022-10-10 +date: 2022-10-12 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 eb7870fb27812..728b01c4a4531 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2022-10-10 +date: 2022-10-12 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 a72acb71f8343..7dc32621c7543 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2022-10-10 +date: 2022-10-12 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 818f3cedcf431..b5d677859e541 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2022-10-10 +date: 2022-10-12 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 d3b238f064f04..91e2efc0dacca 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2022-10-10 +date: 2022-10-12 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 9819937553c2c..0be5f6f2e8738 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2022-10-10 +date: 2022-10-12 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 3fe4182737cb1..8d40b9ea81f38 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2022-10-10 +date: 2022-10-12 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 cffd24280bd80..b6037161773e8 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2022-10-10 +date: 2022-10-12 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 63492dc74b4a0..26f7c7c4802c4 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2022-10-10 +date: 2022-10-12 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 f129163c988e9..af2274bd382f0 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2022-10-10 +date: 2022-10-12 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 44d456487ad02..bbc2884357efa 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2022-10-10 +date: 2022-10-12 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_user_profile_components.mdx b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx index 01725450e1a3f..c515947dd4b15 100644 --- a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx +++ b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-user-profile-components title: "@kbn/shared-ux-avatar-user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-user-profile-components plugin -date: 2022-10-10 +date: 2022-10-12 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_mocks.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx index 1ca4cca275861..e1961b1c51c5e 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen-mocks title: "@kbn/shared-ux-button-exit-full-screen-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 54896916668a9..4a3f99895747b 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2022-10-10 +date: 2022-10-12 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 0c858f6846b3c..ac7c4aec5eb75 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2022-10-10 +date: 2022-10-12 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 78c646f343f8e..628178c910642 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index fe98104746134..6b23432d16cf6 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index 2d756c72ea7a1..70261eeb8d7ba 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2022-10-10 +date: 2022-10-12 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 a8ac95588218f..1f05323a42ac9 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 7926794780d49..fbcd68658536a 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2022-10-10 +date: 2022-10-12 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 5c8075601d9a8..444c7acd9590f 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 df0736b573f17..47001b9bce763 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2022-10-10 +date: 2022-10-12 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 39ee413fc7676..09a4c538d0ebc 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 edab8ba9cdeda..9eb91599bd7f9 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2022-10-10 +date: 2022-10-12 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 3238e35f522ab..4453df79afd58 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2022-10-10 +date: 2022-10-12 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 d91e3c960d34c..b6248fc610efa 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 c908ad8566edb..1f4999fa47c76 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 19fa427b65ad9..a323dad9a101b 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2022-10-10 +date: 2022-10-12 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 039d9ad79e772..7cbdac0243129 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2022-10-10 +date: 2022-10-12 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 691755b31bb3a..3d19c7f00f84e 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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_router.mdx b/api_docs/kbn_shared_ux_router.mdx index 838f60da629eb..30b0adbc074a8 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2022-10-10 +date: 2022-10-12 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 753b087e6f375..7c5e59de791bf 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2022-10-10 +date: 2022-10-12 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 c2935ffb7d512..d804fc8262bea 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2022-10-10 +date: 2022-10-12 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 0d2b31cecba0e..f1f618ee047d6 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2022-10-10 +date: 2022-10-12 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 e73b81401efa6..4832b976e2e19 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index d5317c0029e9c..c78619f3103ed 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2022-10-10 +date: 2022-10-12 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 c93ed16d6f152..d1c0fcfb329dd 100644 --- a/api_docs/kbn_sort_package_json.mdx +++ b/api_docs/kbn_sort_package_json.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-package-json title: "@kbn/sort-package-json" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-package-json plugin -date: 2022-10-10 +date: 2022-10-12 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 07dcb1a3659d0..347ad6e7b2345 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2022-10-10 +date: 2022-10-12 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 2e32807ed0a2e..0d28aaea7ca3e 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2022-10-10 +date: 2022-10-12 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 04a276c4eb964..eae6368c3f855 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2022-10-10 +date: 2022-10-12 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 bfa6f898f4309..d20393ebd25bb 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2022-10-10 +date: 2022-10-12 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 bb0dc9dcf8166..cf1b73be90aa3 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2022-10-10 +date: 2022-10-12 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 a1e8dbf164f44..c2c7d348104c8 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2022-10-10 +date: 2022-10-12 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 393f75434d833..263daf4250e9c 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2022-10-10 +date: 2022-10-12 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 3e90ec8fb19e9..48c5669da0ff1 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_type_summarizer.mdx b/api_docs/kbn_type_summarizer.mdx index 1b1c168133c53..1870dc47868ec 100644 --- a/api_docs/kbn_type_summarizer.mdx +++ b/api_docs/kbn_type_summarizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer title: "@kbn/type-summarizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/type-summarizer plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer'] --- import kbnTypeSummarizerObj from './kbn_type_summarizer.devdocs.json'; diff --git a/api_docs/kbn_type_summarizer_core.mdx b/api_docs/kbn_type_summarizer_core.mdx index 8d1abc35c23dc..895253c9031b1 100644 --- a/api_docs/kbn_type_summarizer_core.mdx +++ b/api_docs/kbn_type_summarizer_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer-core title: "@kbn/type-summarizer-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/type-summarizer-core plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer-core'] --- import kbnTypeSummarizerCoreObj from './kbn_type_summarizer_core.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index d108fa2cf7a0a..887a46239fbd3 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2022-10-10 +date: 2022-10-12 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_theme.mdx b/api_docs/kbn_ui_theme.mdx index c0ec429464c4e..b8d7112e81088 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2022-10-10 +date: 2022-10-12 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 b0967bc0c569a..4c6dbd264fa91 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2022-10-10 +date: 2022-10-12 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 418262e39279d..96edb9e4bb696 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2022-10-10 +date: 2022-10-12 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 662803563e248..a60bac13bcaf0 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2022-10-10 +date: 2022-10-12 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 0d1e452936370..8a8d59b78462b 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2022-10-10 +date: 2022-10-12 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 83b89a98d54b2..10d4c0f5dd2f9 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2022-10-10 +date: 2022-10-12 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 6f9e09103095d..17d4041cd6fc9 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2022-10-10 +date: 2022-10-12 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 8ea2cb868f741..968758a5f54d9 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index c35811e02734d..678ba5c46d9a5 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index fa1459a1b6c14..f83c40b4e695e 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.devdocs.json b/api_docs/lens.devdocs.json index 6749b467d5b11..bae1380e1ba54 100644 --- a/api_docs/lens.devdocs.json +++ b/api_docs/lens.devdocs.json @@ -7207,6 +7207,28 @@ "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_renderers.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "lens", + "id": "def-public.XYChartProps.syncTooltips", + "type": "boolean", + "tags": [], + "label": "syncTooltips", + "description": [], + "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_renderers.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "lens", + "id": "def-public.XYChartProps.syncColors", + "type": "boolean", + "tags": [], + "label": "syncColors", + "description": [], + "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_renderers.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -9142,15 +9164,75 @@ "parentPluginId": "lens", "id": "def-public.layerTypes", "type": "Object", - "tags": [], + "tags": [ + "deprecated" + ], "label": "layerTypes", "description": [], "signature": [ "{ readonly DATA: \"data\"; readonly REFERENCELINE: \"referenceLine\"; readonly ANNOTATIONS: \"annotations\"; }" ], - "path": "x-pack/plugins/lens/common/constants.ts", - "deprecated": false, + "path": "x-pack/plugins/lens/public/index.ts", + "deprecated": true, "trackAdoption": false, + "references": [ + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/lens/choropleth_chart/visualization.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/lens/choropleth_chart/visualization.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/lens/choropleth_chart/visualization.tsx" + }, + { + "plugin": "maps", + "path": "x-pack/plugins/maps/public/lens/choropleth_chart/visualization.tsx" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/visualization_extractor.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/visualization_extractor.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/visualization_extractor.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/visualization_extractor.ts" + } + ], "initialIsOpen": false } ] @@ -11457,22 +11539,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "lens", - "id": "def-common.CustomPaletteParamsConfig", - "type": "Type", - "tags": [], - "label": "CustomPaletteParamsConfig", - "description": [], - "signature": [ - "CustomPaletteParams", - " & { maxSteps?: number | undefined; }" - ], - "path": "x-pack/plugins/lens/common/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "lens", "id": "def-common.DOC_TYPE", @@ -11788,21 +11854,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "lens", - "id": "def-common.layerTypes", - "type": "Object", - "tags": [], - "label": "layerTypes", - "description": [], - "signature": [ - "{ readonly DATA: \"data\"; readonly REFERENCELINE: \"referenceLine\"; readonly ANNOTATIONS: \"annotations\"; }" - ], - "path": "x-pack/plugins/lens/common/constants.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "lens", "id": "def-common.LegendDisplay", diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 93d38cc9b09a5..d577af296db74 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2022-10-10 +date: 2022-10-12 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 44640af1df067..7db53f8d92f95 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2022-10-10 +date: 2022-10-12 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 c3a53ddfcb762..8b3cfd03ef521 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2022-10-10 +date: 2022-10-12 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 05f7e0d8fd343..4c6f54ef32e7d 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/lists.devdocs.json b/api_docs/lists.devdocs.json index 83be2ee9706c9..5270d0f1418e9 100644 --- a/api_docs/lists.devdocs.json +++ b/api_docs/lists.devdocs.json @@ -4063,7 +4063,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -4073,8 +4075,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index fb83ae6f81a32..2f65a1cae071a 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2022-10-10 +date: 2022-10-12 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 0393eb71f3632..77fb4facfe5a6 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2022-10-10 +date: 2022-10-12 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 9816101695ae5..35e8b62ff9d36 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2022-10-10 +date: 2022-10-12 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 fe95c1e9304be..f01fb59bfc5cb 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2022-10-10 +date: 2022-10-12 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 55d7ef71b1a20..800079590578b 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2022-10-10 +date: 2022-10-12 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 da7874274db48..2fb93bcaf631f 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2022-10-10 +date: 2022-10-12 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 2f60b591347cc..d0c831b176faf 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2022-10-10 +date: 2022-10-12 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 28aac147b57ed..0b94777896a20 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2022-10-10 +date: 2022-10-12 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 fecad3b643019..95aad8ac61ef4 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index 2c08034995076..8a0456fed6868 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -6050,7 +6050,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -6060,8 +6062,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index a3c878a3cf2bf..538cfc826867e 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2022-10-10 +date: 2022-10-12 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 e6cbfa7500c92..1879482892ba2 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2022-10-10 +date: 2022-10-12 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 020ecc70d4218..725656aff5b84 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -21,7 +21,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 32173 | 179 | 21657 | 1023 | +| 32288 | 179 | 21755 | 1023 | ## Plugin Directory @@ -45,16 +45,16 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Cloud Security Posture](https://github.com/orgs/elastic/teams/cloud-posture-security) | The cloud security posture plugin | 18 | 0 | 2 | 3 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 13 | 0 | 13 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 212 | 0 | 204 | 7 | -| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2689 | 0 | 23 | 0 | +| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2691 | 0 | 23 | 0 | | crossClusterReplication | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | -| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 104 | 0 | 85 | 1 | +| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 107 | 0 | 88 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 120 | 0 | 113 | 3 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 52 | 0 | 51 | 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. | 3221 | 33 | 2513 | 24 | +| | [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. | 3227 | 33 | 2515 | 24 | | | [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) | 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. | 983 | 0 | 225 | 2 | +| | [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. | 992 | 0 | 228 | 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. | 28 | 3 | 24 | 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. | 97 | 0 | 80 | 4 | @@ -67,7 +67,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | The Event Annotation service contains expressions for event annotations | 174 | 0 | 174 | 3 | | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 106 | 0 | 106 | 10 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'error' renderer to expressions | 17 | 0 | 15 | 2 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Gauge plugin adds a `gauge` renderer and function to the expression plugin. The renderer will display the `gauge` chart. | 57 | 0 | 57 | 2 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Gauge plugin adds a `gauge` renderer and function to the expression plugin. The renderer will display the `gauge` chart. | 58 | 0 | 58 | 2 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Heatmap plugin adds a `heatmap` renderer and function to the expression plugin. The renderer will display the `heatmap` chart. | 105 | 0 | 101 | 3 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'image' function and renderer to expressions | 26 | 0 | 26 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Adds a `metric` renderer and function to the expression plugin. The renderer will display the `legacy metric` chart. | 49 | 0 | 49 | 1 | @@ -78,7 +78,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'revealImage' function and renderer to expressions | 14 | 0 | 14 | 3 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'shape' function and renderer to expressions | 148 | 0 | 146 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Tagcloud plugin adds a `tagcloud` renderer and function to the expression plugin. The renderer will display the `Wordcloud` chart. | 7 | 0 | 7 | 0 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression XY plugin adds a `xy` renderer and function to the expression plugin. The renderer will display the `xy` chart. | 153 | 0 | 143 | 9 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression XY plugin adds a `xy` renderer and function to the expression plugin. The renderer will display the `xy` chart. | 157 | 0 | 147 | 9 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds expression runtime to Kibana | 2183 | 17 | 1729 | 5 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 222 | 0 | 95 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Index pattern fields and ambiguous values formatters | 288 | 5 | 249 | 3 | @@ -158,7 +158,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 517 | 1 | 489 | 49 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds UI Actions service to Kibana | 133 | 0 | 92 | 11 | | | [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 | 61 | 0 | 59 | 2 | +| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the field list which can be integrated into apps | 122 | 0 | 117 | 2 | | | [Unified Search](https://github.com/orgs/elastic/teams/kibana-app-services) | Contains all the key functionality of Kibana's unified search experience.Contains all the key functionality of Kibana's unified search experience. | 131 | 2 | 104 | 17 | | 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 | @@ -178,7 +178,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Registers the vega visualization. Is the elastic version of vega and vega-lite libraries. | 2 | 0 | 2 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the vislib visualizations. These are the classical area/line/bar, pie, gauge/goal and heatmap charts. We want to replace them with elastic-charts. | 26 | 0 | 25 | 1 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the new xy-axis chart using the elastic-charts library, which will eventually replace the vislib xy-axis charts including bar, area, and line. | 53 | 0 | 50 | 5 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the shared architecture among all the legacy visualizations, e.g. the visualization type registry or the visualization embeddable. | 729 | 12 | 699 | 18 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the shared architecture among all the legacy visualizations, e.g. the visualization type registry or the visualization embeddable. | 754 | 12 | 724 | 18 | | watcher | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | ## Package Directory @@ -245,7 +245,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | Kibana Core | - | 4 | 0 | 4 | 0 | | | Kibana Core | - | 15 | 0 | 13 | 2 | | | Kibana Core | - | 38 | 1 | 34 | 0 | -| | Kibana Core | - | 99 | 0 | 51 | 0 | +| | Kibana Core | - | 103 | 0 | 53 | 0 | | | Kibana Core | - | 33 | 0 | 29 | 0 | | | Kibana Core | - | 15 | 1 | 15 | 0 | | | Kibana Core | - | 4 | 0 | 4 | 0 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 72ab2b6b9b0c1..d9d7cdef186cd 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2022-10-10 +date: 2022-10-12 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 c374d8ff9bb23..0242ee4799f2d 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2022-10-10 +date: 2022-10-12 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 2cd2b8b545029..896d217a5398a 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2022-10-10 +date: 2022-10-12 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 25fde92c9c027..2350cb7765d6d 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2022-10-10 +date: 2022-10-12 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 a7ce02fa445ae..8c01ade0d5fcf 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.devdocs.json b/api_docs/rule_registry.devdocs.json index 37e78ced1236a..942341236243f 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -1917,7 +1917,7 @@ "\nID of the Kibana feature associated with the index.\nUsed by alerts-as-data RBAC.\n\nNote from @dhurley14\nThe purpose of the `feature` param is to force the user to update\nthe data structure which contains the mapping of consumers to alerts\nas data indices. The idea is it is typed such that it forces the\nuser to go to the code and modify it. At least until a better system\nis put in place or we move the alerts as data client out of rule registry.\n" ], "signature": [ - "\"infrastructure\" | \"observability\" | \"logs\" | \"apm\" | \"uptime\" | \"siem\"" + "\"infrastructure\" | \"apm\" | \"observability\" | \"logs\" | \"uptime\" | \"siem\"" ], "path": "x-pack/plugins/rule_registry/server/rule_data_plugin_service/index_options.ts", "deprecated": false, diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 36968e9f6d84c..a95a3ca67257c 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2022-10-10 +date: 2022-10-12 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 cfd864e5e1e7c..515b0d974ee17 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2022-10-10 +date: 2022-10-12 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 3ddfe47eb5d24..e440a4fb51772 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2022-10-10 +date: 2022-10-12 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 f947e389666e7..c3dde5347949a 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2022-10-10 +date: 2022-10-12 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 092940749757f..0f3d3ff072519 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2022-10-10 +date: 2022-10-12 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 6e3788871ed75..1caf87429860b 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2022-10-10 +date: 2022-10-12 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 b0006411b10ce..4b4091e561b5e 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2022-10-10 +date: 2022-10-12 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 4694eea70cade..23971cca9e111 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2022-10-10 +date: 2022-10-12 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 800a8386708e0..94e4ad8052dba 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2022-10-10 +date: 2022-10-12 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 e3e29cd303353..fe71e5edf87cc 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2022-10-10 +date: 2022-10-12 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 5fe2fe5894253..6f68b051f0996 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2022-10-10 +date: 2022-10-12 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 33d50cb8babe2..32ce2ab9dae00 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2022-10-10 +date: 2022-10-12 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 77ba39d41f48e..edebc1368a428 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2022-10-10 +date: 2022-10-12 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 df0619d9b5290..faae1f1e2c22a 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2022-10-10 +date: 2022-10-12 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 1c86c9c84811f..f54482e441f19 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2022-10-10 +date: 2022-10-12 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 04356137a0932..6d9ec83d5bbae 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2022-10-10 +date: 2022-10-12 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 909167b8d55ce..48e5bcfa379eb 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2022-10-10 +date: 2022-10-12 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 6c49650732577..f43e0e8aac084 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2022-10-10 +date: 2022-10-12 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 1217311901de7..585f3c1f868d1 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.devdocs.json b/api_docs/telemetry.devdocs.json index 27c6790692801..5749144af5150 100644 --- a/api_docs/telemetry.devdocs.json +++ b/api_docs/telemetry.devdocs.json @@ -617,7 +617,7 @@ "When the data comes from a matching index-pattern, the name of the pattern" ], "signature": [ - "\"search\" | \"logstash\" | \"enterprise-search\" | \"app-search\" | \"magento2\" | \"magento\" | \"shopify\" | \"wordpress\" | \"drupal\" | \"joomla\" | \"sharepoint\" | \"squarespace\" | \"sitecore\" | \"weebly\" | \"acquia\" | \"filebeat\" | \"metricbeat\" | \"apm\" | \"functionbeat\" | \"heartbeat\" | \"fluentd\" | \"telegraf\" | \"prometheusbeat\" | \"fluentbit\" | \"nginx\" | \"apache\" | \"endgame\" | \"logs-endpoint\" | \"metrics-endpoint\" | \"siem-signals\" | \"auditbeat\" | \"winlogbeat\" | \"packetbeat\" | \"tomcat\" | \"artifactory\" | \"aruba\" | \"barracuda\" | \"bluecoat\" | \"arcsight\" | \"checkpoint\" | \"cisco\" | \"citrix\" | \"cyberark\" | \"cylance\" | \"fireeye\" | \"fortinet\" | \"infoblox\" | \"kaspersky\" | \"mcafee\" | \"paloaltonetworks\" | \"rsa\" | \"snort\" | \"sonicwall\" | \"sophos\" | \"squid\" | \"symantec\" | \"tippingpoint\" | \"trendmicro\" | \"tripwire\" | \"zscaler\" | \"zeek\" | \"sigma_doc\" | \"ecs-corelight\" | \"suricata\" | \"wazuh\" | \"meow\" | \"host_risk_score\" | \"user_risk_score\" | undefined" + "\"search\" | \"apm\" | \"logstash\" | \"enterprise-search\" | \"app-search\" | \"magento2\" | \"magento\" | \"shopify\" | \"wordpress\" | \"drupal\" | \"joomla\" | \"sharepoint\" | \"squarespace\" | \"sitecore\" | \"weebly\" | \"acquia\" | \"filebeat\" | \"metricbeat\" | \"functionbeat\" | \"heartbeat\" | \"fluentd\" | \"telegraf\" | \"prometheusbeat\" | \"fluentbit\" | \"nginx\" | \"apache\" | \"endgame\" | \"logs-endpoint\" | \"metrics-endpoint\" | \"siem-signals\" | \"auditbeat\" | \"winlogbeat\" | \"packetbeat\" | \"tomcat\" | \"artifactory\" | \"aruba\" | \"barracuda\" | \"bluecoat\" | \"arcsight\" | \"checkpoint\" | \"cisco\" | \"citrix\" | \"cyberark\" | \"cylance\" | \"fireeye\" | \"fortinet\" | \"infoblox\" | \"kaspersky\" | \"mcafee\" | \"paloaltonetworks\" | \"rsa\" | \"snort\" | \"sonicwall\" | \"sophos\" | \"squid\" | \"symantec\" | \"tippingpoint\" | \"trendmicro\" | \"tripwire\" | \"zscaler\" | \"zeek\" | \"sigma_doc\" | \"ecs-corelight\" | \"suricata\" | \"wazuh\" | \"meow\" | \"host_risk_score\" | \"user_risk_score\" | undefined" ], "path": "src/plugins/telemetry/server/telemetry_collection/get_data_telemetry/get_data_telemetry.ts", "deprecated": false, diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index bcedaaf0d81ff..95ad8cd3b1f4b 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.devdocs.json b/api_docs/telemetry_collection_manager.devdocs.json index f5e1d86713cd2..efd0378614ce7 100644 --- a/api_docs/telemetry_collection_manager.devdocs.json +++ b/api_docs/telemetry_collection_manager.devdocs.json @@ -246,7 +246,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -256,8 +258,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 5d0c3054de25a..82f21627276f6 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2022-10-10 +date: 2022-10-12 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 e0bc1e797caaa..40b3b55da1538 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2022-10-10 +date: 2022-10-12 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 b352bd4e0dca3..431778cd7866d 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2022-10-10 +date: 2022-10-12 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 77d1f454f2f5a..fe386594ad013 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2022-10-10 +date: 2022-10-12 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 a010695c5c771..7d174743e5f56 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2022-10-10 +date: 2022-10-12 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 4d851dc086fe4..2bd4aa4f873da 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2022-10-10 +date: 2022-10-12 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 a4ab7aaa8680e..165ed631fcab2 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2022-10-10 +date: 2022-10-12 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 ba35eb86cbf0e..e3d0501c79406 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2022-10-10 +date: 2022-10-12 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 45bddb4318d64..99ca43fc442d6 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_field_list.devdocs.json b/api_docs/unified_field_list.devdocs.json index 9ade69bc0eab0..ac91e0235c30c 100644 --- a/api_docs/unified_field_list.devdocs.json +++ b/api_docs/unified_field_list.devdocs.json @@ -3,6 +3,153 @@ "client": { "classes": [], "functions": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopover", + "type": "Function", + "tags": [], + "label": "FieldPopover", + "description": [], + "signature": [ + "({ isOpen, closePopover, renderHeader, renderContent, ...otherPopoverProps }: React.PropsWithChildren<", + { + "pluginId": "unifiedFieldList", + "scope": "public", + "docId": "kibUnifiedFieldListPluginApi", + "section": "def-public.FieldPopoverProps", + "text": "FieldPopoverProps" + }, + ">) => JSX.Element" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopover.$1", + "type": "CompoundType", + "tags": [], + "label": "{\n isOpen,\n closePopover,\n renderHeader,\n renderContent,\n ...otherPopoverProps\n}", + "description": [], + "signature": [ + "React.PropsWithChildren<", + { + "pluginId": "unifiedFieldList", + "scope": "public", + "docId": "kibUnifiedFieldListPluginApi", + "section": "def-public.FieldPopoverProps", + "text": "FieldPopoverProps" + }, + ">" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeader", + "type": "Function", + "tags": [], + "label": "FieldPopoverHeader", + "description": [], + "signature": [ + "({ field, closePopover, buttonAddFieldToWorkspaceProps, buttonAddFilterProps, buttonEditFieldProps, buttonDeleteFieldProps, onAddFieldToWorkspace, onAddFilter, onEditField, onDeleteField, }: React.PropsWithChildren<", + { + "pluginId": "unifiedFieldList", + "scope": "public", + "docId": "kibUnifiedFieldListPluginApi", + "section": "def-public.FieldPopoverHeaderProps", + "text": "FieldPopoverHeaderProps" + }, + ">) => JSX.Element | null" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeader.$1", + "type": "CompoundType", + "tags": [], + "label": "{\n field,\n closePopover,\n buttonAddFieldToWorkspaceProps,\n buttonAddFilterProps,\n buttonEditFieldProps,\n buttonDeleteFieldProps,\n onAddFieldToWorkspace,\n onAddFilter,\n onEditField,\n onDeleteField,\n}", + "description": [], + "signature": [ + "React.PropsWithChildren<", + { + "pluginId": "unifiedFieldList", + "scope": "public", + "docId": "kibUnifiedFieldListPluginApi", + "section": "def-public.FieldPopoverHeaderProps", + "text": "FieldPopoverHeaderProps" + }, + ">" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverVisualize", + "type": "Function", + "tags": [], + "label": "FieldPopoverVisualize", + "description": [], + "signature": [ + "(props: React.PropsWithChildren<", + { + "pluginId": "unifiedFieldList", + "scope": "public", + "docId": "kibUnifiedFieldListPluginApi", + "section": "def-public.FieldPopoverVisualizeProps", + "text": "FieldPopoverVisualizeProps" + }, + ">) => JSX.Element" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_visualize.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverVisualize.$1", + "type": "CompoundType", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "React.PropsWithChildren<", + { + "pluginId": "unifiedFieldList", + "scope": "public", + "docId": "kibUnifiedFieldListPluginApi", + "section": "def-public.FieldPopoverVisualizeProps", + "text": "FieldPopoverVisualizeProps" + }, + ">" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_visualize.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "unifiedFieldList", "id": "def-public.FieldStats", @@ -59,102 +206,880 @@ }, { "parentPluginId": "unifiedFieldList", - "id": "def-public.loadFieldExisting", + "id": "def-public.FieldVisualizeButton", "type": "Function", "tags": [], - "label": "loadFieldExisting", + "label": "FieldVisualizeButton", "description": [], "signature": [ - "({\n data,\n dslQuery,\n fromDate,\n toDate,\n timeFieldName,\n dataViewsService,\n uiSettingsClient,\n dataView,\n}: FetchFieldExistenceParams) => Promise<{ indexPatternTitle: string; existingFieldNames: string[]; }>" + "React.FunctionComponent<", + { + "pluginId": "unifiedFieldList", + "scope": "public", + "docId": "kibUnifiedFieldListPluginApi", + "section": "def-public.FieldVisualizeButtonProps", + "text": "FieldVisualizeButtonProps" + }, + ">" ], - "path": "src/plugins/unified_field_list/public/services/field_existing/load_field_existing.ts", + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/field_visualize_button.tsx", "deprecated": false, "trackAdoption": false, + "returnComment": [], "children": [ { "parentPluginId": "unifiedFieldList", - "id": "def-public.loadFieldExisting.$1", - "type": "Object", + "id": "def-public.FieldVisualizeButton.$1", + "type": "CompoundType", "tags": [], - "label": "{\n data,\n dslQuery,\n fromDate,\n toDate,\n timeFieldName,\n dataViewsService,\n uiSettingsClient,\n dataView,\n}", + "label": "props", "description": [], "signature": [ - "FetchFieldExistenceParams" + "P & { children?: React.ReactNode; }" ], - "path": "src/plugins/unified_field_list/public/services/field_existing/load_field_existing.ts", + "path": "node_modules/@types/react/index.d.ts", "deprecated": false, - "trackAdoption": false, - "isRequired": true + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldVisualizeButton.$2", + "type": "Any", + "tags": [], + "label": "context", + "description": [], + "signature": [ + "any" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false } ], - "returnComment": [], "initialIsOpen": false }, { "parentPluginId": "unifiedFieldList", - "id": "def-public.loadFieldStats", + "id": "def-public.getVisualizeInformation", "type": "Function", "tags": [], - "label": "loadFieldStats", - "description": [], + "label": "getVisualizeInformation", + "description": [ + "\nReturns the field name and potentially href of the field or the first multi-field\nthat has a compatible visualize uiAction." + ], "signature": [ - "(params: FetchFieldStatsParams) => Promise<", - "FieldStatsResponse", - ">" + "(uiActions: ", + { + "pluginId": "uiActions", + "scope": "public", + "docId": "kibUiActionsPluginApi", + "section": "def-public.UiActionsStart", + "text": "UiActionsStart" + }, + ", field: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + ", dataView: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined, contextualFields: string[], multiFields: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + "[]) => Promise<", + { + "pluginId": "unifiedFieldList", + "scope": "public", + "docId": "kibUnifiedFieldListPluginApi", + "section": "def-public.VisualizeInformation", + "text": "VisualizeInformation" + }, + " | undefined>" ], - "path": "src/plugins/unified_field_list/public/services/field_stats/index.tsx", + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "unifiedFieldList", - "id": "def-public.loadFieldStats.$1", + "id": "def-public.getVisualizeInformation.$1", "type": "Object", "tags": [], - "label": "params", + "label": "uiActions", "description": [], "signature": [ - "FetchFieldStatsParams" + { + "pluginId": "uiActions", + "scope": "public", + "docId": "kibUiActionsPluginApi", + "section": "def-public.UiActionsStart", + "text": "UiActionsStart" + } ], - "path": "src/plugins/unified_field_list/public/services/field_stats/index.tsx", + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", "deprecated": false, "trackAdoption": false, "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - } - ], - "interfaces": [ - { - "parentPluginId": "unifiedFieldList", - "id": "def-public.BucketedAggregation", - "type": "Interface", - "tags": [], - "label": "BucketedAggregation", - "description": [], - "signature": [ - "BucketedAggregation", - "" - ], - "path": "src/plugins/unified_field_list/common/types/stats.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "unifiedFieldList", - "id": "def-public.BucketedAggregation.buckets", + "id": "def-public.getVisualizeInformation.$2", + "type": "Object", + "tags": [], + "label": "field", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + } + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.getVisualizeInformation.$3", + "type": "Object", + "tags": [], + "label": "dataView", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.getVisualizeInformation.$4", "type": "Array", "tags": [], - "label": "buckets", + "label": "contextualFields", "description": [], "signature": [ - "{ key: KeyType; count: number; }[]" + "string[]" ], - "path": "src/plugins/unified_field_list/common/types/stats.ts", + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.getVisualizeInformation.$5", + "type": "Array", + "tags": [], + "label": "multiFields", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + "[]" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.loadFieldExisting", + "type": "Function", + "tags": [], + "label": "loadFieldExisting", + "description": [], + "signature": [ + "({\n data,\n dslQuery,\n fromDate,\n toDate,\n timeFieldName,\n dataViewsService,\n uiSettingsClient,\n dataView,\n}: FetchFieldExistenceParams) => Promise<{ indexPatternTitle: string; existingFieldNames: string[]; }>" + ], + "path": "src/plugins/unified_field_list/public/services/field_existing/load_field_existing.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.loadFieldExisting.$1", + "type": "Object", + "tags": [], + "label": "{\n data,\n dslQuery,\n fromDate,\n toDate,\n timeFieldName,\n dataViewsService,\n uiSettingsClient,\n dataView,\n}", + "description": [], + "signature": [ + "FetchFieldExistenceParams" + ], + "path": "src/plugins/unified_field_list/public/services/field_existing/load_field_existing.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.loadFieldStats", + "type": "Function", + "tags": [], + "label": "loadFieldStats", + "description": [], + "signature": [ + "(params: FetchFieldStatsParams) => Promise<", + "FieldStatsResponse", + ">" + ], + "path": "src/plugins/unified_field_list/public/services/field_stats/index.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.loadFieldStats.$1", + "type": "Object", + "tags": [], + "label": "params", + "description": [], + "signature": [ + "FetchFieldStatsParams" + ], + "path": "src/plugins/unified_field_list/public/services/field_stats/index.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.triggerVisualizeActions", + "type": "Function", + "tags": [], + "label": "triggerVisualizeActions", + "description": [], + "signature": [ + "(uiActions: ", + { + "pluginId": "uiActions", + "scope": "public", + "docId": "kibUiActionsPluginApi", + "section": "def-public.UiActionsStart", + "text": "UiActionsStart" + }, + ", field: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + ", contextualFields: string[], originatingApp: string, dataView: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined) => void" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.triggerVisualizeActions.$1", + "type": "Object", + "tags": [], + "label": "uiActions", + "description": [], + "signature": [ + { + "pluginId": "uiActions", + "scope": "public", + "docId": "kibUiActionsPluginApi", + "section": "def-public.UiActionsStart", + "text": "UiActionsStart" + } + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.triggerVisualizeActions.$2", + "type": "Object", + "tags": [], + "label": "field", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + } + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.triggerVisualizeActions.$3", + "type": "Array", + "tags": [], + "label": "contextualFields", + "description": [], + "signature": [ + "string[]" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.triggerVisualizeActions.$4", + "type": "string", + "tags": [], + "label": "originatingApp", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.triggerVisualizeActions.$5", + "type": "Object", + "tags": [], + "label": "dataView", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.triggerVisualizeActionsTextBasedLanguages", + "type": "Function", + "tags": [], + "label": "triggerVisualizeActionsTextBasedLanguages", + "description": [], + "signature": [ + "(uiActions: ", + { + "pluginId": "uiActions", + "scope": "public", + "docId": "kibUiActionsPluginApi", + "section": "def-public.UiActionsStart", + "text": "UiActionsStart" + }, + ", contextualFields: string[], originatingApp: string, dataView: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined, query: ", + "AggregateQuery", + " | undefined) => void" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.triggerVisualizeActionsTextBasedLanguages.$1", + "type": "Object", + "tags": [], + "label": "uiActions", + "description": [], + "signature": [ + { + "pluginId": "uiActions", + "scope": "public", + "docId": "kibUiActionsPluginApi", + "section": "def-public.UiActionsStart", + "text": "UiActionsStart" + } + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.triggerVisualizeActionsTextBasedLanguages.$2", + "type": "Array", + "tags": [], + "label": "contextualFields", + "description": [], + "signature": [ + "string[]" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.triggerVisualizeActionsTextBasedLanguages.$3", + "type": "string", + "tags": [], + "label": "originatingApp", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.triggerVisualizeActionsTextBasedLanguages.$4", + "type": "Object", + "tags": [], + "label": "dataView", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.triggerVisualizeActionsTextBasedLanguages.$5", + "type": "CompoundType", + "tags": [], + "label": "query", + "description": [], + "signature": [ + "AggregateQuery", + " | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.BucketedAggregation", + "type": "Interface", + "tags": [], + "label": "BucketedAggregation", + "description": [], + "signature": [ + "BucketedAggregation", + "" + ], + "path": "src/plugins/unified_field_list/common/types/stats.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.BucketedAggregation.buckets", + "type": "Array", + "tags": [], + "label": "buckets", + "description": [], + "signature": [ + "{ key: KeyType; count: number; }[]" + ], + "path": "src/plugins/unified_field_list/common/types/stats.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeaderProps", + "type": "Interface", + "tags": [], + "label": "FieldPopoverHeaderProps", + "description": [], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeaderProps.field", + "type": "Object", + "tags": [], + "label": "field", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + } + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeaderProps.closePopover", + "type": "Function", + "tags": [], + "label": "closePopover", + "description": [], + "signature": [ + "() => void" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeaderProps.buttonAddFieldToWorkspaceProps", + "type": "Object", + "tags": [], + "label": "buttonAddFieldToWorkspaceProps", + "description": [], + "signature": [ + "Partial<", + "EuiButtonIconProps", + "> | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeaderProps.buttonAddFilterProps", + "type": "Object", + "tags": [], + "label": "buttonAddFilterProps", + "description": [], + "signature": [ + "Partial<", + "EuiButtonIconProps", + "> | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeaderProps.buttonEditFieldProps", + "type": "Object", + "tags": [], + "label": "buttonEditFieldProps", + "description": [], + "signature": [ + "Partial<", + "EuiButtonIconProps", + "> | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeaderProps.buttonDeleteFieldProps", + "type": "Object", + "tags": [], + "label": "buttonDeleteFieldProps", + "description": [], + "signature": [ + "Partial<", + "EuiButtonIconProps", + "> | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeaderProps.onAddFieldToWorkspace", + "type": "Function", + "tags": [], + "label": "onAddFieldToWorkspace", + "description": [], + "signature": [ + "((field: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + ") => unknown) | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeaderProps.onAddFieldToWorkspace.$1", + "type": "Object", + "tags": [], + "label": "field", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + } + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeaderProps.onAddFilter", + "type": "Function", + "tags": [], + "label": "onAddFilter", + "description": [], + "signature": [ + { + "pluginId": "unifiedFieldList", + "scope": "public", + "docId": "kibUnifiedFieldListPluginApi", + "section": "def-public.AddFieldFilterHandler", + "text": "AddFieldFilterHandler" + }, + " | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeaderProps.onEditField", + "type": "Function", + "tags": [], + "label": "onEditField", + "description": [], + "signature": [ + "((fieldName: string) => unknown) | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeaderProps.onEditField.$1", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeaderProps.onDeleteField", + "type": "Function", + "tags": [], + "label": "onDeleteField", + "description": [], + "signature": [ + "((fieldName: string) => unknown) | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverHeaderProps.onDeleteField.$1", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverProps", + "type": "Interface", + "tags": [], + "label": "FieldPopoverProps", + "description": [], + "signature": [ + { + "pluginId": "unifiedFieldList", + "scope": "public", + "docId": "kibUnifiedFieldListPluginApi", + "section": "def-public.FieldPopoverProps", + "text": "FieldPopoverProps" + }, + " extends ", + "EuiPopoverProps" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverProps.renderHeader", + "type": "Function", + "tags": [], + "label": "renderHeader", + "description": [], + "signature": [ + "(() => React.ReactNode) | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverProps.renderContent", + "type": "Function", + "tags": [], + "label": "renderContent", + "description": [], + "signature": [ + "(() => React.ReactNode) | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] } ], "initialIsOpen": false @@ -674,6 +1599,293 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldVisualizeButtonProps", + "type": "Interface", + "tags": [], + "label": "FieldVisualizeButtonProps", + "description": [], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/field_visualize_button.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldVisualizeButtonProps.field", + "type": "Object", + "tags": [], + "label": "field", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + } + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/field_visualize_button.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldVisualizeButtonProps.dataView", + "type": "Object", + "tags": [], + "label": "dataView", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + } + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/field_visualize_button.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldVisualizeButtonProps.originatingApp", + "type": "string", + "tags": [], + "label": "originatingApp", + "description": [], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/field_visualize_button.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldVisualizeButtonProps.uiActions", + "type": "Object", + "tags": [], + "label": "uiActions", + "description": [], + "signature": [ + "{ readonly clear: () => void; readonly addTriggerAction: (triggerId: string, action: ", + { + "pluginId": "uiActions", + "scope": "public", + "docId": "kibUiActionsPluginApi", + "section": "def-public.ActionDefinition", + "text": "ActionDefinition" + }, + ") => void; readonly attachAction: (triggerId: string, actionId: string) => void; readonly detachAction: (triggerId: string, actionId: string) => void; readonly registerAction: >(definition: A) => ", + { + "pluginId": "uiActions", + "scope": "public", + "docId": "kibUiActionsPluginApi", + "section": "def-public.Action", + "text": "Action" + }, + "<", + "ActionContext", + ">; readonly registerTrigger: (trigger: ", + { + "pluginId": "uiActions", + "scope": "public", + "docId": "kibUiActionsPluginApi", + "section": "def-public.Trigger", + "text": "Trigger" + }, + ") => void; readonly unregisterAction: (actionId: string) => void; readonly getTrigger: (triggerId: string) => ", + "TriggerContract", + "; readonly hasAction: (actionId: string) => boolean; readonly getAction: >(id: string) => ", + { + "pluginId": "uiActions", + "scope": "public", + "docId": "kibUiActionsPluginApi", + "section": "def-public.Action", + "text": "Action" + }, + "<", + "ActionContext", + ">; readonly getTriggerActions: (triggerId: string) => ", + { + "pluginId": "uiActions", + "scope": "public", + "docId": "kibUiActionsPluginApi", + "section": "def-public.Action", + "text": "Action" + }, + "[]; readonly getTriggerCompatibleActions: (triggerId: string, context: object) => Promise<", + { + "pluginId": "uiActions", + "scope": "public", + "docId": "kibUiActionsPluginApi", + "section": "def-public.Action", + "text": "Action" + }, + "[]>; readonly executeTriggerActions: (triggerId: string, context: object) => Promise; readonly fork: () => ", + { + "pluginId": "uiActions", + "scope": "public", + "docId": "kibUiActionsPluginApi", + "section": "def-public.UiActionsService", + "text": "UiActionsService" + }, + "; }" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/field_visualize_button.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldVisualizeButtonProps.multiFields", + "type": "Array", + "tags": [], + "label": "multiFields", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + "[] | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/field_visualize_button.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldVisualizeButtonProps.contextualFields", + "type": "Array", + "tags": [], + "label": "contextualFields", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/field_visualize_button.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldVisualizeButtonProps.trackUiMetric", + "type": "Function", + "tags": [], + "label": "trackUiMetric", + "description": [], + "signature": [ + "((metricType: string, eventName: string | string[]) => void) | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/field_visualize_button.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldVisualizeButtonProps.trackUiMetric.$1", + "type": "string", + "tags": [], + "label": "metricType", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/field_visualize_button.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldVisualizeButtonProps.trackUiMetric.$2", + "type": "CompoundType", + "tags": [], + "label": "eventName", + "description": [], + "signature": [ + "string | string[]" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/field_visualize_button.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldVisualizeButtonProps.buttonProps", + "type": "Object", + "tags": [], + "label": "buttonProps", + "description": [], + "signature": [ + "Partial<", + "EuiButtonProps", + "> | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/field_visualize_button.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldVisualizeButtonProps.wrapInContainer", + "type": "Function", + "tags": [], + "label": "wrapInContainer", + "description": [], + "signature": [ + "((element: React.ReactElement>) => React.ReactElement>) | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/field_visualize_button.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldVisualizeButtonProps.wrapInContainer.$1", + "type": "Object", + "tags": [], + "label": "element", + "description": [], + "signature": [ + "React.ReactElement>" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/field_visualize_button.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "unifiedFieldList", "id": "def-public.NumberStatsResult", @@ -768,6 +1980,54 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.VisualizeInformation", + "type": "Interface", + "tags": [], + "label": "VisualizeInformation", + "description": [], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.VisualizeInformation.field", + "type": "Object", + "tags": [], + "label": "field", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + } + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.VisualizeInformation.href", + "type": "string", + "tags": [], + "label": "href", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/unified_field_list/public/components/field_visualize_button/visualize_trigger_utils.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false } ], "enums": [], @@ -788,7 +2048,7 @@ "section": "def-common.DataViewField", "text": "DataViewField" }, - ", value: unknown, type: \"+\" | \"-\") => void" + " | \"_exists_\", value: unknown, type: \"+\" | \"-\") => void" ], "path": "src/plugins/unified_field_list/public/types.ts", "deprecated": false, @@ -798,7 +2058,7 @@ { "parentPluginId": "unifiedFieldList", "id": "def-public.AddFieldFilterHandler.$1", - "type": "Object", + "type": "CompoundType", "tags": [], "label": "field", "description": [], @@ -809,7 +2069,8 @@ "docId": "kibDataViewsPluginApi", "section": "def-common.DataViewField", "text": "DataViewField" - } + }, + " | \"_exists_\"" ], "path": "src/plugins/unified_field_list/public/types.ts", "deprecated": false, @@ -845,6 +2106,55 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "unifiedFieldList", + "id": "def-public.FieldPopoverVisualizeProps", + "type": "Type", + "tags": [], + "label": "FieldPopoverVisualizeProps", + "description": [], + "signature": [ + "{ field: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + "; dataView: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + "; originatingApp: string; uiActions: ", + { + "pluginId": "uiActions", + "scope": "public", + "docId": "kibUiActionsPluginApi", + "section": "def-public.UiActionsStart", + "text": "UiActionsStart" + }, + "; multiFields?: ", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataViewField", + "text": "DataViewField" + }, + "[] | undefined; contextualFields?: string[] | undefined; trackUiMetric?: ((metricType: string, eventName: string | string[]) => void) | undefined; buttonProps?: Partial<", + "EuiButtonProps", + "> | undefined; }" + ], + "path": "src/plugins/unified_field_list/public/components/field_popover/field_popover_visualize.tsx", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "objects": [], diff --git a/api_docs/unified_field_list.mdx b/api_docs/unified_field_list.mdx index 3b29a19fa6be6..9c977143fbd28 100644 --- a/api_docs/unified_field_list.mdx +++ b/api_docs/unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedFieldList title: "unifiedFieldList" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedFieldList plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedFieldList'] --- import unifiedFieldListObj from './unified_field_list.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 | |-------------------|-----------|------------------------|-----------------| -| 61 | 0 | 59 | 2 | +| 122 | 0 | 117 | 2 | ## Client diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index bdeec48aa8ea9..8e155a01b48b3 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index 191e2461415cf..174e87a61e3e4 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 47c97e65e6724..3863852aacced 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.devdocs.json b/api_docs/usage_collection.devdocs.json index c90dbcddab203..046c83b0d64c7 100644 --- a/api_docs/usage_collection.devdocs.json +++ b/api_docs/usage_collection.devdocs.json @@ -515,7 +515,9 @@ "TransportRequestOptions", " | undefined): Promise<", "UpdateResponse", - ">; }; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + ">; }; asyncSearch: ", + "default", + "; [kInternal]: symbol | null; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", "; helpers: ", "default", @@ -525,8 +527,6 @@ "default", "; Internal: ", "default", - "; asyncSearch: ", - "default", "; autoscaling: ", "default", "; bulk: { (this: That, params: ", diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index f8c3a14d66b2d..da3b6a7dc91b9 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2022-10-10 +date: 2022-10-12 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 f4689a3d2597d..e2455bca7a7b6 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2022-10-10 +date: 2022-10-12 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 b292069fca384..1ecbcdfec7226 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2022-10-10 +date: 2022-10-12 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 f36a18ef40bd0..9ae6f477d3e31 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2022-10-10 +date: 2022-10-12 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 89dfc16e9f523..ac6ee4ca35d5e 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2022-10-10 +date: 2022-10-12 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 1e7017d80aabf..df65f70e38d75 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2022-10-10 +date: 2022-10-12 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 79dde1fcfab44..b4fea6d0ba148 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2022-10-10 +date: 2022-10-12 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 21d856b2f4dd3..2a6d39e5238b3 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2022-10-10 +date: 2022-10-12 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 2c7ec032c466e..1bc333cde76f7 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2022-10-10 +date: 2022-10-12 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 fba1745b81e6b..9f489cc695418 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2022-10-10 +date: 2022-10-12 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 e211f35e5c3c7..61633b1020ec9 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2022-10-10 +date: 2022-10-12 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 db8a77c924275..b16556e817da6 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.devdocs.json b/api_docs/visualizations.devdocs.json index e283e14d8ba8f..01e4e670dbc22 100644 --- a/api_docs/visualizations.devdocs.json +++ b/api_docs/visualizations.devdocs.json @@ -7363,6 +7363,105 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "visualizations", + "id": "def-common.getStopsWithColorsFromRanges", + "type": "Function", + "tags": [], + "label": "getStopsWithColorsFromRanges", + "description": [], + "signature": [ + "(ranges: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.Range", + "text": "Range" + }, + "[], colorSchema: ", + { + "pluginId": "charts", + "scope": "common", + "docId": "kibChartsPluginApi", + "section": "def-common.ColorSchemas", + "text": "ColorSchemas" + }, + ", invertColors?: boolean) => ", + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.PaletteConfig", + "text": "PaletteConfig" + } + ], + "path": "src/plugins/visualizations/common/utils/palette.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizations", + "id": "def-common.getStopsWithColorsFromRanges.$1", + "type": "Array", + "tags": [], + "label": "ranges", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.Range", + "text": "Range" + }, + "[]" + ], + "path": "src/plugins/visualizations/common/utils/palette.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "visualizations", + "id": "def-common.getStopsWithColorsFromRanges.$2", + "type": "Enum", + "tags": [], + "label": "colorSchema", + "description": [], + "signature": [ + { + "pluginId": "charts", + "scope": "common", + "docId": "kibChartsPluginApi", + "section": "def-common.ColorSchemas", + "text": "ColorSchemas" + } + ], + "path": "src/plugins/visualizations/common/utils/palette.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "visualizations", + "id": "def-common.getStopsWithColorsFromRanges.$3", + "type": "boolean", + "tags": [], + "label": "invertColors", + "description": [], + "signature": [ + "boolean" + ], + "path": "src/plugins/visualizations/common/utils/palette.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "visualizations", "id": "def-common.isAnnotationsLayer", @@ -8239,6 +8338,59 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "visualizations", + "id": "def-common.BasicFullPercentageModeConfig", + "type": "Interface", + "tags": [], + "label": "BasicFullPercentageModeConfig", + "description": [], + "path": "src/plugins/visualizations/common/convert_to_lens/types/common.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizations", + "id": "def-common.BasicFullPercentageModeConfig.isPercentageMode", + "type": "boolean", + "tags": [], + "label": "isPercentageMode", + "description": [], + "path": "src/plugins/visualizations/common/convert_to_lens/types/common.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.BasicPercentageModeConfig", + "type": "Interface", + "tags": [], + "label": "BasicPercentageModeConfig", + "description": [], + "path": "src/plugins/visualizations/common/convert_to_lens/types/common.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizations", + "id": "def-common.BasicPercentageModeConfig.isPercentageMode", + "type": "boolean", + "tags": [], + "label": "isPercentageMode", + "description": [], + "signature": [ + "false" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/types/common.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "visualizations", "id": "def-common.ColumnState", @@ -9701,6 +9853,48 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "visualizations", + "id": "def-common.PaletteConfig", + "type": "Interface", + "tags": [], + "label": "PaletteConfig", + "description": [], + "path": "src/plugins/visualizations/common/utils/palette.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "visualizations", + "id": "def-common.PaletteConfig.color", + "type": "Array", + "tags": [], + "label": "color", + "description": [], + "signature": [ + "(string | undefined)[]" + ], + "path": "src/plugins/visualizations/common/utils/palette.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.PaletteConfig.stop", + "type": "Array", + "tags": [], + "label": "stop", + "description": [], + "signature": [ + "number[]" + ], + "path": "src/plugins/visualizations/common/utils/palette.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "visualizations", "id": "def-common.PartitionLayerState", @@ -12867,6 +13061,96 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "visualizations", + "id": "def-common.GaugeCentralMajorMode", + "type": "Type", + "tags": [], + "label": "GaugeCentralMajorMode", + "description": [], + "signature": [ + "\"none\" | \"auto\" | \"custom\"" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.GaugeColorMode", + "type": "Type", + "tags": [], + "label": "GaugeColorMode", + "description": [], + "signature": [ + "\"none\" | \"palette\"" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.GaugeLabelMajorMode", + "type": "Type", + "tags": [], + "label": "GaugeLabelMajorMode", + "description": [], + "signature": [ + "\"none\" | \"auto\" | \"custom\"" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.GaugeShape", + "type": "Type", + "tags": [], + "label": "GaugeShape", + "description": [], + "signature": [ + "\"horizontalBullet\" | \"verticalBullet\" | \"arc\" | \"circle\"" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.GaugeTicksPosition", + "type": "Type", + "tags": [], + "label": "GaugeTicksPosition", + "description": [], + "signature": [ + "\"auto\" | \"hidden\" | \"bands\"" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.GaugeVisConfiguration", + "type": "Type", + "tags": [], + "label": "GaugeVisConfiguration", + "description": [], + "signature": [ + "GaugeState & { layerId: string; layerType: \"data\"; }" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "visualizations", "id": "def-common.GenericColumnWithMeta", @@ -12942,6 +13226,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "visualizations", + "id": "def-common.LENS_GAUGE_ID", + "type": "string", + "tags": [], + "label": "LENS_GAUGE_ID", + "description": [], + "signature": [ + "\"lnsGauge\"" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "visualizations", "id": "def-common.MaxColumn", @@ -13208,15 +13507,50 @@ "label": "PercentageModeConfig", "description": [], "signature": [ - "({ isPercentageMode: true; } & ", + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.BasicPercentageModeConfig", + "text": "BasicPercentageModeConfig" + }, + " | ", + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.PercentageModeConfigWithMinMax", + "text": "PercentageModeConfigWithMinMax" + } + ], + "path": "src/plugins/visualizations/common/convert_to_lens/types/common.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.PercentageModeConfigWithMinMax", + "type": "Type", + "tags": [], + "label": "PercentageModeConfigWithMinMax", + "description": [], + "signature": [ + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.BasicFullPercentageModeConfig", + "text": "BasicFullPercentageModeConfig" + }, + " & ", { "pluginId": "visualizations", "scope": "common", "docId": "kibVisualizationsPluginApi", "section": "def-common.MinMax", "text": "MinMax" - }, - ") | { isPercentageMode: boolean; }" + } ], "path": "src/plugins/visualizations/common/convert_to_lens/types/common.ts", "deprecated": false, @@ -13703,6 +14037,96 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "visualizations", + "id": "def-common.GaugeCentralMajorModes", + "type": "Object", + "tags": [], + "label": "GaugeCentralMajorModes", + "description": [], + "signature": [ + "{ readonly AUTO: \"auto\"; readonly CUSTOM: \"custom\"; readonly NONE: \"none\"; }" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.GaugeColorModes", + "type": "Object", + "tags": [], + "label": "GaugeColorModes", + "description": [], + "signature": [ + "{ readonly PALETTE: \"palette\"; readonly NONE: \"none\"; }" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.GaugeLabelMajorModes", + "type": "Object", + "tags": [], + "label": "GaugeLabelMajorModes", + "description": [], + "signature": [ + "{ readonly AUTO: \"auto\"; readonly CUSTOM: \"custom\"; readonly NONE: \"none\"; }" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.GaugeShapes", + "type": "Object", + "tags": [], + "label": "GaugeShapes", + "description": [], + "signature": [ + "{ readonly HORIZONTAL_BULLET: \"horizontalBullet\"; readonly VERTICAL_BULLET: \"verticalBullet\"; readonly ARC: \"arc\"; readonly CIRCLE: \"circle\"; }" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.GaugeTicksPositions", + "type": "Object", + "tags": [], + "label": "GaugeTicksPositions", + "description": [], + "signature": [ + "{ readonly HIDDEN: \"hidden\"; readonly AUTO: \"auto\"; readonly BANDS: \"bands\"; }" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "visualizations", + "id": "def-common.GROUP_ID", + "type": "Object", + "tags": [], + "label": "GROUP_ID", + "description": [], + "signature": [ + "{ readonly METRIC: \"metric\"; readonly MIN: \"min\"; readonly MAX: \"max\"; readonly GOAL: \"goal\"; }" + ], + "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "visualizations", "id": "def-common.LayerTypes", diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index e09c5b43fe526..ffc0c0caa9b39 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2022-10-10 +date: 2022-10-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 729 | 12 | 699 | 18 | +| 754 | 12 | 724 | 18 | ## Client diff --git a/docs/api/alerting/create_rule.asciidoc b/docs/api/alerting/create_rule.asciidoc index 9394265f506b1..24abf15d02dea 100644 --- a/docs/api/alerting/create_rule.asciidoc +++ b/docs/api/alerting/create_rule.asciidoc @@ -62,7 +62,8 @@ the URL, the default space is used. types of alerts. If you don't need this, set this value to `default`. `id`::: -(Required, string) The ID of the connector saved object. +(Required, string) The ID of the connector saved object, which you can obtain by +using <>. `params`::: (Required, object) The map to the `params` that the @@ -131,7 +132,8 @@ is `onThrottleInterval`. [[create-rule-api-example]] === {api-examples-title} -Create a rule that has actions associated with a server log connector: +Create an <> that has actions +associated with a server log connector: [source,sh] -------------------------------------------------- diff --git a/docs/developer/contributing/development-functional-tests.asciidoc b/docs/developer/contributing/development-functional-tests.asciidoc index cf854c6d53cfa..95c6171aaecf5 100644 --- a/docs/developer/contributing/development-functional-tests.asciidoc +++ b/docs/developer/contributing/development-functional-tests.asciidoc @@ -67,14 +67,6 @@ export TEST_ES_PASS= node scripts/functional_test_runner ---------- -** If you are running x-pack functional tests, start server and runner from {blob}xpack[x-pack] folder: -+ -["source", "shell"] ----------- -node scripts/functional_tests_server.js -node ../scripts/functional_test_runner.js ----------- - ** Selenium tests are run in headless mode on CI. Locally the same tests will be executed in a real browser. You can activate headless mode by setting the environment variable: + ["source", "shell"] diff --git a/docs/discover/document-explorer.asciidoc b/docs/discover/document-explorer.asciidoc index 9547dbaf4477f..79bf640707ebf 100644 --- a/docs/discover/document-explorer.asciidoc +++ b/docs/discover/document-explorer.asciidoc @@ -1,19 +1,40 @@ [[document-explorer]] == Explore your documents - -*Discover* displays your documents in table format, so you can -best explore your data. Resize columns, set row height, -perform multi-column sorting, compare data, and more. +Fine tune your explorations by customizing *Discover* to bring out the the best view of your documents. +Adjust the chart height, modify the document table, and look inside a document. [role="screenshot"] -image:images/customer.png[Customer last name, first initial in the document table] +image:images/discover.png[A view of the Discover app] + [float] -[[document-explorer-columns]] -=== Reorder and resize columns +[[document-explorer-c]] +=== Hide or resize the chart + +Hide or resize the chart for a better fit. + +* To turn off the display of the chart, click +image:images/chart-icon.png[icon button for opening Show/Hide chart menu, width=24px] +to open the *Chart options* menu, and then click *Hide*. + +* To change the chart height, drag the resize handle +image:images/resize-icon.png[two-line icon for increasing or decreasing the height of the chart, width=24px] +to the size you want. +The chart size is saved in your browser. -Use drag and drop to organize the columns and improve the view of the data. +* To reset the height, open the *Chart options* menu, and then select *Reset to default height*. + +[float] +[[document-explorer-customize]] +=== Modify the document table + +Customize the appearance of the document table and its contents by resizing the columns and rows, +sorting and modifying the fields, and filtering the documents. + +[float] +[[document-explorer-columns]] +==== Reorder and resize the columns * To move a single column, click its header. In the dropdown menu, click *Move left* or *Move right*. @@ -22,26 +43,26 @@ click *Move left* or *Move right*. In the pop-up, drag the column names to their new order. * To resize a column, drag the right edge of the column header until the column is the width that you want. - ++ Column widths are stored with a saved search. When you visualize saved searches on dashboards, the saved search appears the same as in **Discover**. + [float] [[document-explorer-row-height]] -=== Adjust row height +==== Adjust the row height -To set the row height to 1 or more lines, or automatically +To set the row height to one or more lines, or automatically adjust the height to fit the contents, click the row height icon image:images/row-height-icon.png[icon to open the Row height pop-up]. [role="screenshot"] -image::images/document-explorer-row-height.png[Row height settings for the document table, width="75%"] - +image::images/document-explorer-row-height.png[Row height settings for the document table, width="50%"] [float] [[document-explorer-sort-data]] -=== Sort data +==== Sort the fields -Sort your data by one or more fields, in ascending or descending order. +Sort the data by one or more fields, in ascending or descending order. The default sort is based on the time field, from new to old. To add or remove a sort on a single field, click the @@ -49,38 +70,69 @@ column header, and then select the sort order. To sort by multiple fields: -. In the document table, click the *field sorted* option. +. Click the *field sorted* option. + [role="screenshot"] -image::images/document-explorer-sort-data.png[Pop-up in document table for sorting columns, width="75%"] +image::images/document-explorer-sort-data.png[Pop-up in document table for sorting columns, width="50%"] -. To add more fields to the sort, select from the dropdown menu. +. To add fields to the sort, select their names from the dropdown menu. + By default, columns are sorted in the order they are added. + [role="screenshot"] -image::images/document-explorer-multi-field.png[Multi field sort in the document table, width="75%"] +image::images/document-explorer-multi-field.png[Multi field sort in the document table, width="50%"] . To change the sort order, select a field in the pop-up, and then drag it to the new location. +[float] +[[document-explorer-edit-field]] +==== Edit a field + +Change how {kib} displays a field. + +. Click the column header for the field, and then select *Edit data view field.* + +. In the *Edit field* form, change the field name and format. ++ +For detailed information on formatting options, refer to <>. + [float] [[document-explorer-compare-data]] -=== Compare data +==== Filter the documents -Narrow your results to a subset of documents to easily -compare the data of interest. +Narrow your results to a subset of documents so you're comparing just the data of interest. . Select the documents you want to compare. . Click the *documents selected* option, and then select *Show selected documents only*. + [role="screenshot"] -image::images/document-explorer-compare-data.png[Compare data in the document table, width="75%"] +image::images/document-explorer-compare-data.png[Compare data in the document table, width="50%"] + +[float] +[[document-explorer-configure-table]] +==== Set the number of rows per page + +To change the numbers of rows you want to display on each page, use the *Rows per page* menu. By default, the document table displays 100 rows per page. + +[role="screenshot"] +image::images/document-table-rows-per-page.png["Menu with options for setting the number of rows in the document table"] + +To customize the default number of rows per page, go to *Stack Managaement > Advanced Settings* +and search for *rows per page*. + +[float] +[[document-explorer-full-screen]] +==== View in fullscreen + +To toggle the table in and out of fullscreen mode, click the fullscreen icon +image:images/fullscreen-icon.png[icon to display the document table in fullscreen mode]. [float] [[document-explorer-expand-documents]] -=== Expand documents + +=== Go inside a document Dive into an individual document to inspect its fields, set filters, and view the documents that occurred before and after it. @@ -97,8 +149,7 @@ image::images/document-table-expanded.png[Expanded view of the document table] . In the *Table* view, scan through the fields and their values, or search for a field by name. . When you find a field of interest, -click -image:images/actions-icon.png[three dots icon in table column] in the *Actions* column +hover your mouse over the *Actions* column to: .. Filter the results to include or exclude specific fields or values. .. Toggle the field in or out the document table. @@ -122,22 +173,3 @@ filters remain active, while other filters are copied in a disabled state. + [role="screenshot"] image::images/discover-context.png[Image showing context view feature, with anchor documents highlighted in blue] - - -[float] -[[document-explorer-full-screen]] -=== View documents in fullscreen - -To view as much data as possible and eliminate distractions, click the fullscreen icon -image:images/fullscreen-icon.png[icon to display the document table in fullscreen mode] -in the document table. - -[float] -[[document-explorer-configure-table]] -=== Configure the number of documents displayed - -By default, the document table displays 100 rows per page. To change this number, -click *Rows per page*. - -[role="screenshot"] -image::images/document-table-rows-per-page.png["Menu with options for setting the number of rows in the document table"] diff --git a/docs/discover/images/customer.png b/docs/discover/images/customer.png index c60c98b25e54d..11504bf10ac20 100644 Binary files a/docs/discover/images/customer.png and b/docs/discover/images/customer.png differ diff --git a/docs/discover/images/discover-add-filter.png b/docs/discover/images/discover-add-filter.png index 5a5a1a173b547..b022090afcb1f 100644 Binary files a/docs/discover/images/discover-add-filter.png and b/docs/discover/images/discover-add-filter.png differ diff --git a/docs/discover/images/discover-add-icon.png b/docs/discover/images/discover-add-icon.png new file mode 100644 index 0000000000000..c8330ef07b07c Binary files /dev/null and b/docs/discover/images/discover-add-icon.png differ diff --git a/docs/discover/images/discover-context.png b/docs/discover/images/discover-context.png index 35954fa7a2b51..e02171e3f8572 100644 Binary files a/docs/discover/images/discover-context.png and b/docs/discover/images/discover-context.png differ diff --git a/docs/discover/images/discover-data-view.png b/docs/discover/images/discover-data-view.png index 50b1866ab7a68..869fc9b928811 100644 Binary files a/docs/discover/images/discover-data-view.png and b/docs/discover/images/discover-data-view.png differ diff --git a/docs/discover/images/discover-search-for-relevance.png b/docs/discover/images/discover-search-for-relevance.png index e710cab0ddf2f..ea7c1a8d93436 100644 Binary files a/docs/discover/images/discover-search-for-relevance.png and b/docs/discover/images/discover-search-for-relevance.png differ diff --git a/docs/discover/images/discover-sidebar-available-fields.png b/docs/discover/images/discover-sidebar-available-fields.png index 363f3f7141086..37ae6858337b6 100644 Binary files a/docs/discover/images/discover-sidebar-available-fields.png and b/docs/discover/images/discover-sidebar-available-fields.png differ diff --git a/docs/discover/images/discover-visualize.png b/docs/discover/images/discover-visualize.png index 15f2eb4a7f60b..f88bbb7d51a62 100644 Binary files a/docs/discover/images/discover-visualize.png and b/docs/discover/images/discover-visualize.png differ diff --git a/docs/discover/images/discover.png b/docs/discover/images/discover.png index 1a2d839717f76..8b45b90225a50 100644 Binary files a/docs/discover/images/discover.png and b/docs/discover/images/discover.png differ diff --git a/docs/discover/images/document-explorer-compare-data.png b/docs/discover/images/document-explorer-compare-data.png index d5cb84af5bb37..aa14375a4f1ff 100644 Binary files a/docs/discover/images/document-explorer-compare-data.png and b/docs/discover/images/document-explorer-compare-data.png differ diff --git a/docs/discover/images/document-table-expanded.png b/docs/discover/images/document-table-expanded.png index 06b244268c1d7..d92bf70821126 100644 Binary files a/docs/discover/images/document-table-expanded.png and b/docs/discover/images/document-table-expanded.png differ diff --git a/docs/discover/images/document-table.png b/docs/discover/images/document-table.png index 6cb47390fd584..6a27d972655aa 100644 Binary files a/docs/discover/images/document-table.png and b/docs/discover/images/document-table.png differ diff --git a/docs/discover/images/field-statistics-geo.png b/docs/discover/images/field-statistics-geo.png index 35c727cb1fe76..da720e7429eb6 100644 Binary files a/docs/discover/images/field-statistics-geo.png and b/docs/discover/images/field-statistics-geo.png differ diff --git a/docs/discover/images/field-statistics-numeric.png b/docs/discover/images/field-statistics-numeric.png index cd587532c9cc4..cc298e75dcb65 100644 Binary files a/docs/discover/images/field-statistics-numeric.png and b/docs/discover/images/field-statistics-numeric.png differ diff --git a/docs/discover/images/field-statistics-view.png b/docs/discover/images/field-statistics-view.png index 836d0b5173005..bf610add8a790 100644 Binary files a/docs/discover/images/field-statistics-view.png and b/docs/discover/images/field-statistics-view.png differ diff --git a/docs/discover/images/find-manufacturer-field.png b/docs/discover/images/find-manufacturer-field.png index ce78aab933362..32cf7ee0c0ec4 100644 Binary files a/docs/discover/images/find-manufacturer-field.png and b/docs/discover/images/find-manufacturer-field.png differ diff --git a/docs/discover/images/hello-field.png b/docs/discover/images/hello-field.png index 40527e90fbb64..2471ee494f29d 100644 Binary files a/docs/discover/images/hello-field.png and b/docs/discover/images/hello-field.png differ diff --git a/docs/discover/images/resize-icon.png b/docs/discover/images/resize-icon.png new file mode 100644 index 0000000000000..a0725824510da Binary files /dev/null and b/docs/discover/images/resize-icon.png differ diff --git a/docs/discover/save-search.asciidoc b/docs/discover/save-search.asciidoc index 89adf4eac0ba1..deede3cf2b922 100644 --- a/docs/discover/save-search.asciidoc +++ b/docs/discover/save-search.asciidoc @@ -6,12 +6,6 @@ that you've created in *Discover*. Saved searches are good for adding search results to a dashboard, and can also serve as a foundation for building visualizations. -A saved search stores the query text, filters, and -current view of *Discover*, including the columns selected in the document table, -the sort order, and the {data-source}. -Saved searches are different from <>, which -are for storing query text and are available in any app with a query bar. - [role="xpack"] [[discover-read-only-access]] [float] @@ -24,8 +18,13 @@ image::discover/images/read-only-badge.png[Example of Discover's read only acces [float] === Save a search -. Once you've created a search worth saving in *Discover*, click *Save* in the toolbar. -. Enter a name for the search and click *Save*. +By default, a saved search stores the query text, filters, and +current view of *Discover*, including the columns and sort order in the document table, and the {data-source}. + +. Once you've created a search worth saving, click *Save* in the toolbar. +. Enter a name for the search. +. Optionally store <> and the time range with the search. +. Click *Save*. . To reload your search results in *Discover*, click *Open* in the toolbar, and select the saved search. + If the saved search is associated with a different {data-source} than is currently diff --git a/docs/discover/search-for-relevance.asciidoc b/docs/discover/search-for-relevance.asciidoc index c6f092edd0015..b2c69a3cc5479 100644 --- a/docs/discover/search-for-relevance.asciidoc +++ b/docs/discover/search-for-relevance.asciidoc @@ -26,7 +26,7 @@ At this point, you're sorting by the`timestamp` field. . Select *High-Low*. + [role="screenshot"] -image::images/field-sorting-popover.png["Field sorting popover", width=60%] +image::images/field-sorting-popover.png["Field sorting popover", width="60%"] + Your table now sorts documents from most to least relevant. diff --git a/docs/management/cases/cases.asciidoc b/docs/management/cases/cases.asciidoc index c08b99894eea0..de2f2196ee63f 100644 --- a/docs/management/cases/cases.asciidoc +++ b/docs/management/cases/cases.asciidoc @@ -3,10 +3,10 @@ preview::[] -Cases are used to open and track issues directly in {kib}. All cases list -the original reporter and all the users who contribute to a case (_participants_). -You can also send cases to external incident management systems by configuring -connectors. +Cases are used to open and track issues directly in {kib}. You can add +assignees and tags to your cases, set their severity and status, and add alerts, +comments, and visualizations. You can also send cases to external incident +management systems by configuring connectors. [role="screenshot"] image::images/cases.png[Cases page] diff --git a/docs/management/cases/images/cases-visualization.png b/docs/management/cases/images/cases-visualization.png index 53c4893bcc598..e5287ca45d3d4 100644 Binary files a/docs/management/cases/images/cases-visualization.png and b/docs/management/cases/images/cases-visualization.png differ diff --git a/docs/management/cases/images/cases.png b/docs/management/cases/images/cases.png index a69f21c2ec9f8..b313decf7b6b5 100644 Binary files a/docs/management/cases/images/cases.png and b/docs/management/cases/images/cases.png differ diff --git a/docs/management/cases/manage-cases.asciidoc b/docs/management/cases/manage-cases.asciidoc index f4693ef25950f..fd26221ba3432 100644 --- a/docs/management/cases/manage-cases.asciidoc +++ b/docs/management/cases/manage-cases.asciidoc @@ -10,12 +10,15 @@ Open a new case to keep track of issues and share their details with colleagues. . Go to *Management > {stack-manage-app} > Cases*, then click *Create case*. -. Give the case a name, add any relevant tags and a description. +. Give the case a name, severity, and description. + TIP: In the `Description` area, you can use https://www.markdownguide.org/cheat-sheet[Markdown] syntax to create formatted text. +. Optionally, add assignees and tags. You can add users only if they meet +the necessary <>. + . For *External incident management system*, select a connector. For more information, refer to <>. @@ -61,10 +64,12 @@ To view a case, click on its name. You can then: * Add a new comment. * Edit existing comments and the description. +* Add or remove assignees. * Add a connector. * Send updates to external systems (if external connections are configured). * Edit tags. * Refresh the case to retrieve the latest updates. * Change the status. +* Change the severity. * Close or delete the case. * Reopen a closed case. \ No newline at end of file diff --git a/docs/management/cases/setup-cases.asciidoc b/docs/management/cases/setup-cases.asciidoc index ee3a3cdaefc1b..bd99d499c81d1 100644 --- a/docs/management/cases/setup-cases.asciidoc +++ b/docs/management/cases/setup-cases.asciidoc @@ -18,6 +18,12 @@ a| NOTE: The *Actions and Connectors* feature privilege is required to create, add, delete, and modify case connectors and to send updates to external systems. +| Give assignee access to cases +a| `All` for the *Cases* feature under *Management*. + +NOTE: Before a user can be assigned to a case, they must log into {kib} at +least once, which creates a user profile. + | Give view-only access for cases | `Read` for the *Cases* feature under *Management*. | Give access to view and delete cases | `Read` for the *Cases* feature under diff --git a/docs/settings/search-sessions-settings.asciidoc b/docs/settings/search-sessions-settings.asciidoc index 7a51c23c9a1cc..2862dec25b881 100644 --- a/docs/settings/search-sessions-settings.asciidoc +++ b/docs/settings/search-sessions-settings.asciidoc @@ -19,7 +19,7 @@ How long {kib} stores search results from unsaved sessions, after the last search in the session completes. The default is `5m`. `data.search.sessions.maxUpdateRetries` {ess-icon}:: -How many retries {kib} can perform while attempting to save a search session. The default is `3`. +How many retries {kib} can perform while attempting to save a search session. The default is `10`. `data.search.sessions.defaultExpiration` {ess-icon}:: How long search session results are stored before they are deleted. diff --git a/docs/user/discover.asciidoc b/docs/user/discover.asciidoc index fab5dc372feac..823d9dcf1fe53 100644 --- a/docs/user/discover.asciidoc +++ b/docs/user/discover.asciidoc @@ -57,7 +57,8 @@ your {es} data. To view the ecommerce sample data, open the {data-source} menu, and then select **Kibana Sample Data Ecommerce**. + [role="screenshot"] -image::images/discover-data-view.png[How to set the {data-source} in Discover, width=50%] +image::images/discover-data-view.png[How to set the {data-source} in Discover, width="40%"] + + To create a data view for your own data, click *Create a data view*. @@ -87,12 +88,15 @@ You can also search for the field by name. [role="screenshot"] image:images/discover-sidebar-available-fields.png[Fields list that displays the top five search results, width=50%] -. Click the `manufacturer` field to view its five most popular values. +. Click `manufacturer` to view its most popular values. + -[role="screenshot"] -image:images/find-manufacturer-field.png[Fields list that displays the top five search results, width=75%] +**Discover** shows the top 10 values and the number of records used to calculate those values. . Click image:images/add-icon.png[Add icon] to toggle the field into the document table. ++ +[role="screenshot"] +image::images/discover-add-icon.png[How to add a field as a column in the table, width="50%"] + . Find the `customer_first_name` and `customer_last_name` fields and add them to the document table. Your table should look similar to this: @@ -103,7 +107,8 @@ image:images/document-table.png[Document table with fields for manufacturer, cus . To rearrange the table columns, click a column header, and then select *Move left* or *Move right*. -. To view more of the document table, click +. To view more of the document table, +click image:images/chart-icon.png[icon button for opening Show/Hide chart menu, width=24px] to open the *Chart options* menu, and then select *Hide chart*. @@ -217,8 +222,7 @@ to show document details. image:images/document-table-expanded.png[Table view with document expanded] . Scan through the fields and their values. If you find a field of interest, -click -image:images/actions-icon.png[three dots icon next to data view dropdown] in the *Actions* column for filters and other controls. +hover your mouse over the *Actions* column for filters and other options. . To create a view of the document that you can bookmark and share, click **Single document**. @@ -238,6 +242,8 @@ the document table, the sort order, and the {data-source}. . In the toolbar, click **Save**. +. Optionally store <> and the time range with the search. + . Give your search a title, and then click **Save**. [float] @@ -299,9 +305,8 @@ For more about this and other rules provided in {alert-features}, go to <>. -* <> to better meet your needs. -Go to **Advanced Settings** to configure the number of documents to show, -the table columns that display by default, and more. +* <> to better meet your needs. + -- include::{kib-repo-dir}/discover/document-explorer.asciidoc[] diff --git a/package.json b/package.json index bd550a1ea2c48..362b10f040087 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "@dnd-kit/utilities": "^2.0.0", "@elastic/apm-rum": "^5.12.0", "@elastic/apm-rum-react": "^1.4.2", - "@elastic/charts": "50.0.1", + "@elastic/charts": "50.0.2", "@elastic/datemath": "5.0.3", "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.3.0-canary.1", "@elastic/ems-client": "8.3.3", @@ -460,7 +460,7 @@ "constate": "^3.3.2", "content-disposition": "^0.5.4", "copy-to-clipboard": "^3.0.8", - "core-js": "^3.25.1", + "core-js": "^3.25.5", "cronstrue": "^1.51.0", "cuid": "^2.1.8", "cytoscape": "^3.10.0", diff --git a/packages/content-management/table_list/BUILD.bazel b/packages/content-management/table_list/BUILD.bazel index 36d84a426a017..170ce00558045 100644 --- a/packages/content-management/table_list/BUILD.bazel +++ b/packages/content-management/table_list/BUILD.bazel @@ -86,6 +86,8 @@ TYPES_DEPS = [ "@npm//@types/jest", "@npm//@types/lodash", "@npm//@types/react", + "@npm//@emotion/css", + "@npm//@emotion/react", "@npm//@elastic/eui", "@npm//react-use", "@npm//rxjs", @@ -101,7 +103,7 @@ jsts_transpiler( name = "target_web", srcs = SRCS, build_pkg_name = package_name(), - web = True, + web = True ) ts_config( diff --git a/packages/content-management/table_list/src/actions.ts b/packages/content-management/table_list/src/actions.ts index ad82aa7379812..9eff5f445079d 100644 --- a/packages/content-management/table_list/src/actions.ts +++ b/packages/content-management/table_list/src/actions.ts @@ -6,7 +6,9 @@ * Side Public License, v 1. */ import type { IHttpFetchError } from '@kbn/core-http-browser'; -import type { CriteriaWithPagination } from '@elastic/eui'; +import type { CriteriaWithPagination, Direction } from '@elastic/eui'; + +import type { SortColumnField } from './components'; /** Action to trigger a fetch of the table items */ export interface OnFetchItemsAction { @@ -52,6 +54,15 @@ export interface OnTableChangeAction { data: CriteriaWithPagination; } +/** Action to update the sort column of the table */ +export interface OnTableSortChangeAction { + type: 'onTableSortChange'; + data: { + field: SortColumnField; + direction: Direction; + }; +} + /** Action to display the delete confirmation modal */ export interface ShowConfirmDeleteItemsModalAction { type: 'showConfirmDeleteItemsModal'; @@ -70,5 +81,6 @@ export type Action = | DeleteItemsActions | OnSelectionChangeAction | OnTableChangeAction + | OnTableSortChangeAction | ShowConfirmDeleteItemsModalAction | OnSearchQueryChangeAction; diff --git a/packages/content-management/table_list/src/components/index.ts b/packages/content-management/table_list/src/components/index.ts index f2284a4cd67ab..004222d7729d0 100644 --- a/packages/content-management/table_list/src/components/index.ts +++ b/packages/content-management/table_list/src/components/index.ts @@ -11,3 +11,6 @@ export { UpdatedAtField } from './updated_at_field'; export { ConfirmDeleteModal } from './confirm_delete_modal'; export { ListingLimitWarning } from './listing_limit_warning'; export { ItemDetails } from './item_details'; +export { TableSortSelect } from './table_sort_select'; + +export type { SortColumnField } from './table_sort_select'; diff --git a/packages/content-management/table_list/src/components/table.tsx b/packages/content-management/table_list/src/components/table.tsx index feb83dbc30a40..846fa087a8db8 100644 --- a/packages/content-management/table_list/src/components/table.tsx +++ b/packages/content-management/table_list/src/components/table.tsx @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import React, { Dispatch, useCallback } from 'react'; +import React, { Dispatch, useCallback, useMemo } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiBasicTableColumn, @@ -14,6 +14,8 @@ import { EuiInMemoryTable, CriteriaWithPagination, PropertySort, + SearchFilterConfig, + Direction, } from '@elastic/eui'; import { useServices } from '../services'; @@ -23,6 +25,8 @@ import type { Props as TableListViewProps, UserContentCommonSchema, } from '../table_list_view'; +import { TableSortSelect } from './table_sort_select'; +import type { SortColumnField } from './table_sort_select'; type State = Pick< TableListViewState, @@ -36,7 +40,10 @@ interface Props extends State { isFetchingItems: boolean; tableCaption: string; tableColumns: Array>; + hasUpdatedAtMetadata: boolean; deleteItems: TableListViewProps['deleteItems']; + onSortChange: (column: SortColumnField, direction: Direction) => void; + onTableChange: (criteria: CriteriaWithPagination) => void; } export function Table({ @@ -48,10 +55,13 @@ export function Table({ pagination, tableColumns, tableSort, + hasUpdatedAtMetadata, entityName, entityNamePlural, deleteItems, tableCaption, + onTableChange, + onSortChange, }: Props) { const { getSearchBarFilters } = useServices(); @@ -87,19 +97,38 @@ export function Table({ } : undefined; - const searchFilters = getSearchBarFilters ? getSearchBarFilters() : []; + const searchFilters = useMemo(() => { + const tableSortSelectFilter: SearchFilterConfig = { + type: 'custom_component', + component: () => { + return ( + + ); + }, + }; - const search = { - onChange: ({ queryText }: { queryText: string }) => - dispatch({ type: 'onSearchQueryChange', data: queryText }), - toolsLeft: renderToolsLeft(), - defaultQuery: searchQuery, - box: { - incremental: true, - 'data-test-subj': 'tableListSearchBox', - }, - filters: searchFilters, - }; + return getSearchBarFilters + ? [tableSortSelectFilter, ...getSearchBarFilters()] + : [tableSortSelectFilter]; + }, [onSortChange, hasUpdatedAtMetadata, tableSort, getSearchBarFilters]); + + const search = useMemo(() => { + return { + onChange: ({ queryText }: { queryText: string }) => + dispatch({ type: 'onSearchQueryChange', data: queryText }), + toolsLeft: renderToolsLeft(), + defaultQuery: searchQuery, + box: { + incremental: true, + 'data-test-subj': 'tableListSearchBox', + }, + filters: searchFilters, + }; + }, [dispatch, renderToolsLeft, searchFilters, searchQuery]); const noItemsMessage = ( ({ selection={selection} search={search} sorting={tableSort ? { sort: tableSort as PropertySort } : undefined} - onChange={(criteria: CriteriaWithPagination) => - dispatch({ type: 'onTableChange', data: criteria }) - } + onChange={onTableChange} data-test-subj="itemsInMemTable" rowHeader="attributes.title" tableCaption={tableCaption} diff --git a/packages/content-management/table_list/src/components/table_sort_select.tsx b/packages/content-management/table_list/src/components/table_sort_select.tsx new file mode 100644 index 0000000000000..ec2c5c5db1f6d --- /dev/null +++ b/packages/content-management/table_list/src/components/table_sort_select.tsx @@ -0,0 +1,179 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import React, { useState, useEffect } from 'react'; +import { i18n } from '@kbn/i18n'; +import { + EuiSelectable, + EuiPopover, + EuiFilterButton, + EuiSelectableOption, + EuiIcon, + Direction, + EuiText, + useEuiTheme, +} from '@elastic/eui'; +import { css } from '@emotion/react'; + +import { State } from '../table_list_view'; + +type SortItem = EuiSelectableOption & { + column: SortColumnField; + direction: Direction; +}; + +export type SortColumnField = 'updatedAt' | 'attributes.title'; + +const i18nText = { + nameAscSort: i18n.translate('contentManagement.tableList.listing.tableSortSelect.nameAscLabel', { + defaultMessage: 'Name A-Z', + }), + nameDescSort: i18n.translate( + 'contentManagement.tableList.listing.tableSortSelect.nameDescLabel', + { + defaultMessage: 'Name Z-A', + } + ), + updatedAtAscSort: i18n.translate( + 'contentManagement.tableList.listing.tableSortSelect.updatedAtAscLabel', + { + defaultMessage: 'Least recently updated', + } + ), + updatedAtDescSort: i18n.translate( + 'contentManagement.tableList.listing.tableSortSelect.updatedAtDescLabel', + { + defaultMessage: 'Recently updated', + } + ), + headerSort: i18n.translate('contentManagement.tableList.listing.tableSortSelect.headerLabel', { + defaultMessage: 'Sort by', + }), +}; + +interface Props { + hasUpdatedAtMetadata: boolean; + tableSort: State['tableSort']; + onChange?: (column: SortColumnField, direction: Direction) => void; +} + +export function TableSortSelect({ tableSort, hasUpdatedAtMetadata, onChange }: Props) { + const { euiTheme } = useEuiTheme(); + + const [isPopoverOpen, setIsPopoverOpen] = useState(false); + const [options, setOptions] = useState(() => { + let opts: SortItem[] = [ + { + label: i18nText.nameAscSort, + column: 'attributes.title', + direction: 'asc', + append: , + }, + { + label: i18nText.nameDescSort, + column: 'attributes.title', + direction: 'desc', + append: , + }, + ]; + + if (hasUpdatedAtMetadata) { + opts = opts.concat([ + { + label: i18nText.updatedAtDescSort, + column: 'updatedAt', + direction: 'desc', + append: , + }, + { + label: i18nText.updatedAtAscSort, + column: 'updatedAt', + direction: 'asc', + append: , + }, + ]); + } + + return opts; + }); + const selectedOptionLabel = options.find(({ checked }) => checked === 'on')?.label ?? ''; + + const panelHeaderCSS = css` + border-bottom: ${euiTheme.border.thin}; + font-weight: ${600}; + padding: ${euiTheme.size.s}; + `; + + const togglePopOver = () => { + setIsPopoverOpen((prev) => !prev); + }; + + const closePopover = () => { + setIsPopoverOpen(false); + }; + + const button = ( + + {selectedOptionLabel} + + ); + + const onSelectChange = (updatedOptions: SortItem[]) => { + setOptions(updatedOptions); + + const selectedOption = updatedOptions.find(({ checked }) => checked === 'on'); + if (selectedOption && onChange) { + onChange(selectedOption.column, selectedOption.direction); + } + }; + + useEffect(() => { + setOptions((prev) => { + return prev.map((option) => { + const checked = + option.column === tableSort.field && option.direction === tableSort.direction + ? 'on' + : undefined; + + return { + ...option, + checked, + }; + }); + }); + }, [tableSort]); + + return ( + + <> + {i18nText.headerSort} + + singleSelection + aria-label="some aria label" + options={options} + onChange={onSelectChange} + data-test-subj="sortSelect" + > + {(list) => list} + + + + ); +} diff --git a/packages/content-management/table_list/src/mocks.tsx b/packages/content-management/table_list/src/mocks.tsx index 52f985edf7752..ed63e1c66d94b 100644 --- a/packages/content-management/table_list/src/mocks.tsx +++ b/packages/content-management/table_list/src/mocks.tsx @@ -30,10 +30,19 @@ const tags = [ }, ]; -export const TagList: Services['TagList'] = ({ onClick }) => { +interface Props { + onClick?: (tag: { name: string }) => void; + tags?: typeof tags | null; +} + +export const TagList = ({ onClick, tags: _tags = tags }: Props) => { + if (_tags === null) { + return null; + } + return ( - {tags.map((tag) => ( + {_tags.map((tag) => ( { @@ -54,6 +63,12 @@ export const TagList: Services['TagList'] = ({ onClick }) => { ); }; +export const getTagList = + ({ tags: _tags }: Props = {}) => + ({ onClick }: Props) => { + return ; + }; + /** * Returns Storybook-compatible service abstractions for the `NoDataCard` Provider. */ diff --git a/packages/content-management/table_list/src/reducer.tsx b/packages/content-management/table_list/src/reducer.tsx index 6ec7cbce37a49..c90cb4c883957 100644 --- a/packages/content-management/table_list/src/reducer.tsx +++ b/packages/content-management/table_list/src/reducer.tsx @@ -30,7 +30,7 @@ export function getReducer() { hasUpdatedAtMetadata = Boolean(items.find((item) => Boolean(item.updatedAt))); if (hasUpdatedAtMetadata) { tableSort = { - field: 'updatedAt' as keyof T, + field: 'updatedAt' as const, direction: 'desc' as const, }; } @@ -67,7 +67,7 @@ export function getReducer() { }; } case 'onTableChange': { - const tableSort = action.data.sort ?? state.tableSort; + const tableSort = (action.data.sort as State['tableSort']) ?? state.tableSort; return { ...state, pagination: { @@ -78,6 +78,12 @@ export function getReducer() { tableSort, }; } + case 'onTableSortChange': { + return { + ...state, + tableSort: action.data, + }; + } case 'showConfirmDeleteItemsModal': { return { ...state, diff --git a/packages/content-management/table_list/src/table_list_view.test.tsx b/packages/content-management/table_list/src/table_list_view.test.tsx index 755f1ebe10e59..8e5aff4ae0dbe 100644 --- a/packages/content-management/table_list/src/table_list_view.test.tsx +++ b/packages/content-management/table_list/src/table_list_view.test.tsx @@ -11,8 +11,10 @@ import { registerTestBed, TestBed } from '@kbn/test-jest-helpers'; import React, { useEffect } from 'react'; import moment, { Moment } from 'moment'; import { act } from 'react-dom/test-utils'; +import type { ReactWrapper } from 'enzyme'; import { WithServices } from './__jest__'; +import { getTagList } from './mocks'; import { TableListView, Props as TableListViewProps } from './table_list_view'; const mockUseEffect = useEffect; @@ -306,4 +308,202 @@ describe('TableListView', () => { expect(lastRowTitle).toBe('Item 29elasticcloud'); }); }); + + describe('column sorting', () => { + const setupColumnSorting = registerTestBed( + WithServices(TableListView, { TagList: getTagList({ tags: null }) }), + { + defaultProps: { ...requiredProps }, + memoryRouter: { wrapComponent: false }, + } + ); + + const twoDaysAgo = new Date(new Date().setDate(new Date().getDate() - 2)); + const twoDaysAgoToString = new Date(twoDaysAgo.getTime()).toDateString(); + const yesterday = new Date(new Date().setDate(new Date().getDate() - 1)); + const yesterdayToString = new Date(yesterday.getTime()).toDateString(); + const hits = [ + { + id: '123', + updatedAt: twoDaysAgo, // first asc, last desc + attributes: { + title: 'z-foo', // first desc, last asc + }, + }, + { + id: '456', + updatedAt: yesterday, // first desc, last asc + attributes: { + title: 'a-foo', // first asc, last desc + }, + }, + ]; + + test('should initially sort by "Last updated" column', async () => { + let testBed: TestBed; + + await act(async () => { + testBed = await setupColumnSorting({ + findItems: jest.fn().mockResolvedValue({ total: hits.length, hits }), + }); + }); + + const { component, table } = testBed!; + component.update(); + + const { tableCellsValues } = table.getMetaData('itemsInMemTable'); + + expect(tableCellsValues).toEqual([ + ['a-foo', yesterdayToString], + ['z-foo', twoDaysAgoToString], + ]); + }); + + test('filter select should have 4 options', async () => { + let testBed: TestBed; + + await act(async () => { + testBed = await setupColumnSorting({ + findItems: jest.fn().mockResolvedValue({ total: hits.length, hits }), + }); + }); + const { component, find } = testBed!; + component.update(); + + act(() => { + find('tableSortSelectBtn').simulate('click'); + }); + component.update(); + + const filterOptions = find('sortSelect').find('li'); + + expect(filterOptions.length).toBe(4); + expect(filterOptions.map((wrapper) => wrapper.text())).toEqual([ + 'Name A-Z ', + 'Name Z-A ', + 'Recently updated - Checked option. ', + 'Least recently updated ', + ]); + }); + + test('filter select should change the sort order', async () => { + let testBed: TestBed; + + await act(async () => { + testBed = await setupColumnSorting({ + findItems: jest.fn().mockResolvedValue({ total: hits.length, hits }), + }); + }); + + const { component, table, find } = testBed!; + component.update(); + + let { tableCellsValues } = table.getMetaData('itemsInMemTable'); + + expect(tableCellsValues).toEqual([ + ['a-foo', yesterdayToString], + ['z-foo', twoDaysAgoToString], + ]); + + act(() => { + find('tableSortSelectBtn').simulate('click'); + }); + component.update(); + const filterOptions = find('sortSelect').find('li'); + + // Click 'Name Z-A' + act(() => { + filterOptions.at(1).simulate('click'); + }); + component.update(); + + ({ tableCellsValues } = table.getMetaData('itemsInMemTable')); + + expect(tableCellsValues).toEqual([ + ['z-foo', twoDaysAgoToString], + ['a-foo', yesterdayToString], + ]); + }); + + test('should update the select option when toggling the column header', async () => { + const getTableColumnSortButton = (testBed: TestBed, text: string) => { + const buttons = testBed.find('tableHeaderSortButton'); + let wrapper: ReactWrapper | undefined; + + buttons.forEach((_wrapper) => { + if (wrapper) { + return; + } + + if (_wrapper.text().includes(text)) { + wrapper = _wrapper; + } + }); + return wrapper; + }; + + let testBed: TestBed; + + await act(async () => { + testBed = await setupColumnSorting({ + findItems: jest.fn().mockResolvedValue({ total: hits.length, hits }), + }); + }); + + const { component, table, find } = testBed!; + component.update(); + + act(() => { + find('tableSortSelectBtn').simulate('click'); + }); + component.update(); + let filterOptions = find('sortSelect').find('li'); + expect(filterOptions.map((wrapper) => wrapper.text())).toEqual([ + 'Name A-Z ', + 'Name Z-A ', + 'Recently updated - Checked option. ', // checked + 'Least recently updated ', + ]); + + const nameColumnHeaderButton = getTableColumnSortButton(testBed!, 'Name'); + if (!nameColumnHeaderButton) { + throw new Error('Could not find table header button containing "Name".'); + } + + act(() => { + nameColumnHeaderButton.simulate('click'); + }); + component.update(); + let { tableCellsValues } = table.getMetaData('itemsInMemTable'); + + expect(tableCellsValues).toEqual([ + ['a-foo', yesterdayToString], + ['z-foo', twoDaysAgoToString], + ]); + + act(() => { + nameColumnHeaderButton.simulate('click'); + }); + component.update(); + ({ tableCellsValues } = table.getMetaData('itemsInMemTable')); + + expect(tableCellsValues).toEqual([ + ['z-foo', twoDaysAgoToString], + ['a-foo', yesterdayToString], + ]); + + act(() => { + find('tableSortSelectBtn').simulate('click'); + }); + component.update(); + filterOptions = find('sortSelect').find('li'); + + expect(filterOptions.map((wrapper) => wrapper.text())).toEqual([ + 'Name A-Z ', + 'Name Z-A - Checked option. ', // now this option is checked + 'Recently updated ', + 'Least recently updated ', + ]); + }); + }); }); diff --git a/packages/content-management/table_list/src/table_list_view.tsx b/packages/content-management/table_list/src/table_list_view.tsx index f7386240826c7..80b814c4dcdb9 100644 --- a/packages/content-management/table_list/src/table_list_view.tsx +++ b/packages/content-management/table_list/src/table_list_view.tsx @@ -17,6 +17,7 @@ import { Direction, EuiSpacer, EuiTableActionsColumnType, + CriteriaWithPagination, } from '@elastic/eui'; import { keyBy, uniq, get } from 'lodash'; import { i18n } from '@kbn/i18n'; @@ -35,6 +36,7 @@ import { useServices } from './services'; import type { SavedObjectsReference, SavedObjectsFindOptionsReference } from './services'; import type { Action } from './actions'; import { getReducer } from './reducer'; +import type { SortColumnField } from './components'; export interface Props { entityName: string; @@ -79,8 +81,8 @@ export interface State({ pageSize: initialPageSize, pageSizeOptions: uniq([10, 20, 50, initialPageSize]).sort(), }, + tableSort: { + field: 'attributes.title' as const, + direction: 'asc', + }, }); const { @@ -308,6 +314,17 @@ function TableListViewComp({ } }, [searchQueryParser, searchQuery, findItems]); + const onSortChange = useCallback((field: SortColumnField, direction: Direction) => { + dispatch({ + type: 'onTableSortChange', + data: { field, direction }, + }); + }, []); + + const onTableChange = useCallback((criteria: CriteriaWithPagination) => { + dispatch({ type: 'onTableChange', data: criteria }); + }, []); + const deleteSelectedItems = useCallback(async () => { if (isDeletingItems) { return; @@ -468,6 +485,7 @@ function TableListViewComp({ isFetchingItems={isFetchingItems} searchQuery={searchQuery} tableColumns={tableColumns} + hasUpdatedAtMetadata={hasUpdatedAtMetadata} tableSort={tableSort} pagination={pagination} selectedIds={selectedIds} @@ -475,6 +493,8 @@ function TableListViewComp({ entityNamePlural={entityNamePlural} deleteItems={deleteItems} tableCaption={tableListTitle} + onTableChange={onTableChange} + onSortChange={onSortChange} /> {/* Delete modal */} diff --git a/packages/content-management/table_list/tsconfig.json b/packages/content-management/table_list/tsconfig.json index f9da39a3d7eb9..df09013c1e96f 100644 --- a/packages/content-management/table_list/tsconfig.json +++ b/packages/content-management/table_list/tsconfig.json @@ -11,7 +11,8 @@ "node", "react", "@kbn/ambient-ui-types", - "@kbn/ambient-storybook-types" + "@kbn/ambient-storybook-types", + "@emotion/react/types/css-prop" ] }, "include": [ diff --git a/packages/kbn-apm-synthtrace/src/lib/apm/apm_fields.ts b/packages/kbn-apm-synthtrace/src/lib/apm/apm_fields.ts index 7736aa8e8879b..07379b2a3002d 100644 --- a/packages/kbn-apm-synthtrace/src/lib/apm/apm_fields.ts +++ b/packages/kbn-apm-synthtrace/src/lib/apm/apm_fields.ts @@ -58,6 +58,8 @@ export type ApmFields = Fields & 'error.grouping_key': string; 'host.name': string; 'host.hostname': string; + 'http.request.method': string; + 'http.response.status_code': number; 'kubernetes.pod.uid': string; 'kubernetes.pod.name': string; 'metricset.name': string; @@ -84,14 +86,13 @@ export type ApmFields = Fields & 'service.framework.name': 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.name': string; 'span.destination.service.resource': string; - 'span.destination.service.type': string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; 'span.self_time.count': number; diff --git a/packages/kbn-apm-synthtrace/src/lib/apm/base_span.ts b/packages/kbn-apm-synthtrace/src/lib/apm/base_span.ts index f8c058592a494..0cfe5940405a2 100644 --- a/packages/kbn-apm-synthtrace/src/lib/apm/base_span.ts +++ b/packages/kbn-apm-synthtrace/src/lib/apm/base_span.ts @@ -40,6 +40,10 @@ export class BaseSpan extends Serializable { return this; } + getChildren() { + return this._children; + } + children(...children: BaseSpan[]): this { children.forEach((child) => { child.parent(this); diff --git a/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_apm_client.ts b/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_apm_client.ts index da836cd8a2119..af200a103558e 100644 --- a/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_apm_client.ts +++ b/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_apm_client.ts @@ -148,9 +148,7 @@ export class ApmSynthtraceApmClient { const destination = (e.context.destination = e.context.destination ?? {}); const destinationService = (destination.service = destination.service ?? { resource: '' }); - set('span.destination.service.name', destinationService, (c, v) => (c.name = v)); set('span.destination.service.resource', destinationService, (c, v) => (c.resource = v)); - set('span.destination.service.type', destinationService, (c, v) => (c.type = v)); } if (e.kind === 'transaction') { set('transaction.name', e, (c, v) => (c.name = v)); diff --git a/packages/kbn-apm-synthtrace/src/lib/apm/instance.ts b/packages/kbn-apm-synthtrace/src/lib/apm/instance.ts index 32a81de9f307a..f69e54b3e300b 100644 --- a/packages/kbn-apm-synthtrace/src/lib/apm/instance.ts +++ b/packages/kbn-apm-synthtrace/src/lib/apm/instance.ts @@ -13,6 +13,12 @@ import { Span } from './span'; import { Transaction } from './transaction'; import { ApmApplicationMetricFields, ApmFields } from './apm_fields'; +export type SpanParams = { + spanName: string; + spanType: string; + spanSubtype?: string; +} & ApmFields; + export class Instance extends Entity { transaction({ transactionName, @@ -28,16 +34,7 @@ export class Instance extends Entity { }); } - span({ - spanName, - spanType, - spanSubtype, - ...apmFields - }: { - spanName: string; - spanType: string; - spanSubtype?: string; - } & ApmFields) { + span({ spanName, spanType, spanSubtype, ...apmFields }: SpanParams) { return new Span({ ...this.fields, ...apmFields, diff --git a/packages/kbn-apm-synthtrace/src/lib/apm/span.ts b/packages/kbn-apm-synthtrace/src/lib/apm/span.ts index a5795ae321478..99e0b1053014a 100644 --- a/packages/kbn-apm-synthtrace/src/lib/apm/span.ts +++ b/packages/kbn-apm-synthtrace/src/lib/apm/span.ts @@ -10,6 +10,7 @@ import url from 'url'; import { BaseSpan } from './base_span'; import { generateShortId } from '../utils/generate_id'; import { ApmFields } from './apm_fields'; +import { SpanParams } from './instance'; export class Span extends BaseSpan { constructor(fields: ApmFields) { @@ -25,29 +26,26 @@ export class Span extends BaseSpan { return this; } - destination(resource: string, type?: string, name?: string) { - if (!type) { - type = this.fields['span.type']; - } - - if (!name) { - name = resource; - } + destination(resource: string) { this.fields['span.destination.service.resource'] = resource; - this.fields['span.destination.service.name'] = name; - this.fields['span.destination.service.type'] = type; return this; } } +export type HttpMethod = 'GET' | 'POST' | 'DELETE' | 'PUT'; + export function httpExitSpan({ spanName, destinationUrl, + method = 'GET', + statusCode = 200, }: { spanName: string; destinationUrl: string; -}) { + method?: HttpMethod; + statusCode?: number; +}): SpanParams { // origin: 'http://opbeans-go:3000', // host: 'opbeans-go:3000', // hostname: 'opbeans-go', @@ -55,31 +53,98 @@ export function httpExitSpan({ const destination = new url.URL(destinationUrl); const spanType = 'external'; - const spanSubType = 'http'; + const spanSubtype = 'http'; return { spanName, spanType, - spanSubType, + spanSubtype, + + // http + 'span.action': method, + 'http.request.method': method, + 'http.response.status_code': statusCode, + + // destination 'destination.address': destination.hostname, 'destination.port': parseInt(destination.port, 10), 'service.target.name': destination.host, - 'span.destination.service.name': destination.origin, 'span.destination.service.resource': destination.host, - 'span.destination.service.type': 'external', }; } -export function dbExitSpan({ spanName, spanSubType }: { spanName: string; spanSubType?: string }) { +export function dbExitSpan({ spanName, spanSubtype }: { spanName: string; spanSubtype?: string }) { const spanType = 'db'; return { spanName, spanType, - spanSubType, - 'service.target.type': spanSubType, - 'span.destination.service.name': spanSubType, - 'span.destination.service.resource': spanSubType, - 'span.destination.service.type': spanType, + spanSubtype, + 'service.target.type': spanSubtype, + 'span.destination.service.resource': spanSubtype, + }; +} + +export function elasticsearchSpan(spanName: string, statement?: string): SpanParams { + const spanType = 'db'; + const spanSubtype = 'elasticsearch'; + + return { + spanName, + spanType, + spanSubtype, + + ...(statement + ? { + 'span.db.statement': statement, + 'span.db.type': 'elasticsearch', + } + : {}), + + 'service.target.type': spanSubtype, + 'destination.address': 'qwerty.us-west2.gcp.elastic-cloud.com', + 'destination.port': 443, + 'span.destination.service.resource': spanSubtype, + }; +} + +export function sqliteSpan(spanName: string, statement?: string): SpanParams { + const spanType = 'db'; + const spanSubtype = 'sqlite'; + + return { + spanName, + spanType, + spanSubtype, + + ...(statement + ? { + 'span.db.statement': statement, + 'span.db.type': 'sql', + } + : {}), + + // destination + 'service.target.type': spanSubtype, + 'destination.address': 'qwerty.us-west2.gcp.elastic-cloud.com', + 'destination.port': 443, + 'span.destination.service.resource': spanSubtype, + }; +} + +export function redisSpan(spanName: string): SpanParams { + const spanType = 'db'; + const spanSubtype = 'redis'; + + return { + spanName, + spanType, + spanSubtype, + + // destination + 'service.target.type': spanSubtype, + 'destination.address': 'qwerty.us-west2.gcp.elastic-cloud.com', + 'destination.port': 443, + 'span.destination.service.resource': spanSubtype, }; } diff --git a/packages/kbn-apm-synthtrace/src/lib/dsl/distributed_trace_client.test.ts b/packages/kbn-apm-synthtrace/src/lib/dsl/distributed_trace_client.test.ts new file mode 100644 index 0000000000000..87e508abe87db --- /dev/null +++ b/packages/kbn-apm-synthtrace/src/lib/dsl/distributed_trace_client.test.ts @@ -0,0 +1,221 @@ +/* + * Copyright 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 { apm } from '../apm'; +import { ApmFields } from '../apm/apm_fields'; +import { BaseSpan } from '../apm/base_span'; +import { DistributedTrace } from './distributed_trace_client'; + +const opbeansRum = apm + .service({ name: 'opbeans-rum', environment: 'prod', agentName: 'rum-js' }) + .instance('my-instance'); + +const opbeansNode = apm + .service({ name: 'opbeans-node', environment: 'prod', agentName: 'nodejs' }) + .instance('my-instance'); + +const opbeansGo = apm + .service({ name: 'opbeans-go', environment: 'prod', agentName: 'go' }) + .instance('my-instance'); + +describe('DistributedTrace', () => { + describe('basic scenario', () => { + it('should add latency', () => { + const dt = new DistributedTrace({ + serviceInstance: opbeansRum, + transactionName: 'Dashboard', + timestamp: 0, + children: (s) => { + s.service({ + serviceInstance: opbeansNode, + transactionName: 'GET /nodejs/products', + + children: (_) => { + _.service({ serviceInstance: opbeansGo, transactionName: 'GET /gogo' }); + _.db({ name: 'GET apm-*/_search', type: 'elasticsearch', duration: 400 }); + }, + }); + }, + }).getTransaction(); + + const traceDocs = getTraceDocs(dt); + const formattedDocs = traceDocs.map((f) => { + return { + processorEvent: f['processor.event'], + timestamp: f['@timestamp'], + duration: (f['transaction.duration.us'] ?? f['span.duration.us'])! / 1000, + name: f['transaction.name'] ?? f['span.name'], + }; + }); + + expect(formattedDocs).toMatchInlineSnapshot(` + Array [ + Object { + "duration": 400, + "name": "Dashboard", + "processorEvent": "transaction", + "timestamp": 0, + }, + Object { + "duration": 400, + "name": "GET /nodejs/products", + "processorEvent": "span", + "timestamp": 0, + }, + Object { + "duration": 400, + "name": "GET /nodejs/products", + "processorEvent": "transaction", + "timestamp": 0, + }, + Object { + "duration": 0, + "name": "GET /gogo", + "processorEvent": "span", + "timestamp": 0, + }, + Object { + "duration": 0, + "name": "GET /gogo", + "processorEvent": "transaction", + "timestamp": 0, + }, + Object { + "duration": 400, + "name": "GET apm-*/_search", + "processorEvent": "span", + "timestamp": 0, + }, + ] + `); + }); + }); + + describe('latency', () => { + it('should add latency', () => { + const traceDocs = getSimpleScenario({ latency: 500 }); + const timestamps = traceDocs.map((f) => f['@timestamp']); + expect(timestamps).toMatchInlineSnapshot(` + Array [ + 0, + 0, + 250, + 250, + 250, + 250, + ] + `); + }); + + it('should not add latency', () => { + const traceDocs = getSimpleScenario(); + const timestamps = traceDocs.map((f) => f['@timestamp']); + expect(timestamps).toMatchInlineSnapshot(` + Array [ + 0, + 0, + 0, + 0, + 0, + 0, + ] + `); + }); + }); + + describe('duration', () => { + it('should add duration', () => { + const traceDocs = getSimpleScenario({ duration: 3000 }); + const durations = traceDocs.map( + (f) => (f['transaction.duration.us'] ?? f['span.duration.us'])! / 1000 + ); + expect(durations).toMatchInlineSnapshot(` + Array [ + 3000, + 3000, + 3000, + 300, + 400, + 500, + ] + `); + }); + + it('should not add duration', () => { + const traceDocs = getSimpleScenario(); + const durations = traceDocs.map( + (f) => (f['transaction.duration.us'] ?? f['span.duration.us'])! / 1000 + ); + expect(durations).toMatchInlineSnapshot(` + Array [ + 500, + 500, + 500, + 300, + 400, + 500, + ] + `); + }); + }); + + describe('repeat', () => { + it('produces few trace documents when "repeat" is disabled', () => { + const traceDocs = getSimpleScenario({ repeat: undefined }); + expect(traceDocs.length).toBe(6); + }); + + it('produces more trace documents when "repeat" is enabled', () => { + const traceDocs = getSimpleScenario({ repeat: 20 }); + expect(traceDocs.length).toBe(101); + }); + }); +}); + +function getTraceDocs(transaction: BaseSpan): ApmFields[] { + const children = transaction.getChildren(); + if (children) { + const childFields = children.flatMap((child) => getTraceDocs(child)); + return [transaction.fields, ...childFields]; + } + + return [transaction.fields]; +} + +function getSimpleScenario({ + duration, + latency, + repeat, +}: { + duration?: number; + latency?: number; + repeat?: number; +} = {}) { + const dt = new DistributedTrace({ + serviceInstance: opbeansRum, + transactionName: 'Dashboard', + timestamp: 0, + children: (s) => { + s.service({ + serviceInstance: opbeansNode, + transactionName: 'GET /nodejs/products', + duration, + latency, + repeat, + + children: (_) => { + _.db({ name: 'GET apm-*/_search', type: 'elasticsearch', duration: 300 }); + _.db({ name: 'GET apm-*/_search', type: 'elasticsearch', duration: 400 }); + _.db({ name: 'GET apm-*/_search', type: 'elasticsearch', duration: 500 }); + }, + }); + }, + }).getTransaction(); + + return getTraceDocs(dt); +} diff --git a/packages/kbn-apm-synthtrace/src/lib/dsl/distributed_trace_client.ts b/packages/kbn-apm-synthtrace/src/lib/dsl/distributed_trace_client.ts new file mode 100644 index 0000000000000..ceeb94f871e3a --- /dev/null +++ b/packages/kbn-apm-synthtrace/src/lib/dsl/distributed_trace_client.ts @@ -0,0 +1,183 @@ +/* + * Copyright 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 { times } from 'lodash'; +import { elasticsearchSpan, httpExitSpan, HttpMethod, redisSpan, sqliteSpan } from '../apm/span'; +import { BaseSpan } from '../apm/base_span'; +import { Instance, SpanParams } from '../apm/instance'; +import { Transaction } from '../apm/transaction'; + +export class DistributedTrace { + timestamp: number; + serviceInstance: Instance; + spanEndTimes: number[] = []; + childSpans: BaseSpan[] = []; + transaction: Transaction; + + constructor({ + serviceInstance, + transactionName, + timestamp, + children, + }: { + serviceInstance: Instance; + transactionName: string; + timestamp: number; + children?: (dt: DistributedTrace) => void; + }) { + this.timestamp = timestamp; + this.serviceInstance = serviceInstance; + + if (children) { + children(this); + } + + const maxEndTime = Math.max(...this.spanEndTimes); + const duration = maxEndTime - this.timestamp; + + this.transaction = serviceInstance + .transaction({ transactionName }) + .timestamp(timestamp) + .duration(duration) + .children(...this.childSpans); + + return this; + } + + getTransaction() { + return this.transaction; + } + + service({ + serviceInstance, + transactionName, + latency = 0, + repeat = 1, + timestamp = this.timestamp, + duration, + children, + }: { + serviceInstance: Instance; + transactionName: string; + repeat?: number; + timestamp?: number; + latency?: number; + duration?: number; + children?: (dt: DistributedTrace) => unknown; + }) { + const originServiceInstance = this.serviceInstance; + + times(repeat, () => { + const dt = new DistributedTrace({ + serviceInstance, + transactionName, + timestamp: timestamp + latency / 2, + children, + }); + + const maxSpanEndTime = Math.max(...dt.spanEndTimes, timestamp + (duration ?? 0)); + this.spanEndTimes.push(maxSpanEndTime + latency / 2); + + // origin service + const exitSpanStart = timestamp; + const exitSpanDuration = (duration ?? maxSpanEndTime - exitSpanStart) + latency / 2; + + // destination service + const transactionStart = timestamp + latency / 2; + const transactionDuration = duration ?? maxSpanEndTime - transactionStart; + + const span = originServiceInstance + .span( + httpExitSpan({ + spanName: transactionName, + destinationUrl: 'http://api-gateway:3000', // TODO: this should be derived from serviceInstance + }) + ) + .duration(exitSpanDuration) + .timestamp(exitSpanStart) + .children( + dt.serviceInstance + .transaction({ transactionName }) + .timestamp(transactionStart) + .duration(transactionDuration) + .children(...(dt.childSpans ?? [])) + ); + + this.childSpans.push(span); + }); + } + + external({ + name, + url, + method, + statusCode, + duration, + timestamp = this.timestamp, + }: { + name: string; + url: string; + method?: HttpMethod; + statusCode?: number; + duration: number; + timestamp?: number; + }) { + const startTime = timestamp; + const endTime = startTime + duration; + this.spanEndTimes.push(endTime); + + const span = this.serviceInstance + .span(httpExitSpan({ spanName: name, destinationUrl: url, method, statusCode })) + .timestamp(startTime) + .duration(duration) + .success(); + + this.childSpans.push(span); + } + + db({ + name, + duration, + type, + statement, + timestamp = this.timestamp, + }: { + name: string; + duration: number; + type: 'elasticsearch' | 'sqlite' | 'redis'; + statement?: string; + timestamp?: number; + }) { + const startTime = timestamp; + const endTime = startTime + duration; + this.spanEndTimes.push(endTime); + + let dbSpan: SpanParams; + switch (type) { + case 'elasticsearch': + dbSpan = elasticsearchSpan(name, statement); + break; + + case 'sqlite': + dbSpan = sqliteSpan(name, statement); + break; + + case 'redis': + dbSpan = redisSpan(name); + break; + } + + const span = this.serviceInstance + .span(dbSpan) + .timestamp(startTime) + .duration(duration) + .success(); + + this.childSpans.push(span); + } +} diff --git a/packages/kbn-apm-synthtrace/src/scenarios/distributed_trace_long.ts b/packages/kbn-apm-synthtrace/src/scenarios/distributed_trace_long.ts new file mode 100644 index 0000000000000..32542ee2c1d49 --- /dev/null +++ b/packages/kbn-apm-synthtrace/src/scenarios/distributed_trace_long.ts @@ -0,0 +1,134 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/* eslint-disable @typescript-eslint/no-shadow */ + +import { apm, timerange } from '../..'; +import { ApmFields } from '../lib/apm/apm_fields'; +import { Scenario } from '../cli/scenario'; +import { RunOptions } from '../cli/utils/parse_run_cli_flags'; +import { getSynthtraceEnvironment } from '../lib/utils/get_synthtrace_environment'; +import { DistributedTrace } from '../lib/dsl/distributed_trace_client'; + +const ENVIRONMENT = getSynthtraceEnvironment(__filename); + +const scenario: Scenario = async (runOptions: RunOptions) => { + return { + generate: ({ from, to }) => { + const ratePerMinute = 1; + const traceDuration = 1100; + const rootTransactionName = `${ratePerMinute}rpm / ${traceDuration}ms`; + + const opbeansRum = apm + .service({ name: 'opbeans-rum', environment: ENVIRONMENT, agentName: 'rum-js' }) + .instance('my-instance'); + + const opbeansNode = apm + .service({ name: 'opbeans-node', environment: ENVIRONMENT, agentName: 'nodejs' }) + .instance('my-instance'); + + const opbeansGo = apm + .service({ name: 'opbeans-go', environment: ENVIRONMENT, agentName: 'go' }) + .instance('my-instance'); + + const opbeansDotnet = apm + .service({ name: 'opbeans-dotnet', environment: ENVIRONMENT, agentName: 'dotnet' }) + .instance('my-instance'); + + const opbeansJava = apm + .service({ name: 'opbeans-java', environment: ENVIRONMENT, agentName: 'java' }) + .instance('my-instance'); + + const traces = timerange(from, to) + .ratePerMinute(ratePerMinute) + .generator((timestamp) => { + return new DistributedTrace({ + serviceInstance: opbeansRum, + transactionName: rootTransactionName, + timestamp, + children: (_) => { + _.service({ + repeat: 10, + serviceInstance: opbeansNode, + transactionName: 'GET /nodejs/products', + latency: 100, + + children: (_) => { + _.service({ + serviceInstance: opbeansGo, + transactionName: 'GET /go', + children: (_) => { + _.service({ + repeat: 20, + serviceInstance: opbeansJava, + transactionName: 'GET /java', + children: (_) => { + _.external({ + name: 'GET telemetry.elastic.co', + url: 'https://telemetry.elastic.co/ping', + duration: 50, + }); + }, + }); + }, + }); + _.db({ name: 'GET apm-*/_search', type: 'elasticsearch', duration: 400 }); + _.db({ name: 'GET', type: 'redis', duration: 500 }); + _.db({ name: 'SELECT * FROM users', type: 'sqlite', duration: 600 }); + }, + }); + + _.service({ + serviceInstance: opbeansNode, + transactionName: 'GET /nodejs/users', + latency: 100, + repeat: 10, + children: (_) => { + _.service({ + serviceInstance: opbeansGo, + transactionName: 'GET /go/security', + latency: 50, + children: (_) => { + _.service({ + repeat: 10, + serviceInstance: opbeansDotnet, + transactionName: 'GET /dotnet/cases/4', + latency: 50, + children: (_) => + _.db({ + name: 'GET apm-*/_search', + type: 'elasticsearch', + duration: 600, + statement: JSON.stringify( + { + query: { + query_string: { + query: '(new york city) OR (big apple)', + default_field: 'content', + }, + }, + }, + null, + 2 + ), + }), + }); + }, + }); + }, + }); + }, + }).getTransaction(); + }); + + return traces; + }, + }; +}; + +export default scenario; diff --git a/packages/kbn-babel-preset/node_preset.js b/packages/kbn-babel-preset/node_preset.js index caf5f7dce419e..31cebf7e1715a 100644 --- a/packages/kbn-babel-preset/node_preset.js +++ b/packages/kbn-babel-preset/node_preset.js @@ -31,7 +31,7 @@ module.exports = (_, options = {}) => { // Because of that we should use for that value the same version we install // in the package.json in order to have the same polyfills between the environment // and the tests - corejs: '3.25.1', + corejs: '3.25.5', bugfixes: true, ...(options['@babel/preset-env'] || {}), diff --git a/packages/kbn-babel-preset/webpack_preset.js b/packages/kbn-babel-preset/webpack_preset.js index 5d2fa5a627fb6..171b00911db17 100644 --- a/packages/kbn-babel-preset/webpack_preset.js +++ b/packages/kbn-babel-preset/webpack_preset.js @@ -18,7 +18,7 @@ module.exports = (_, options = {}) => { modules: false, // Please read the explanation for this // in node_preset.js - corejs: '3.25.1', + corejs: '3.25.5', bugfixes: true, }, ], diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts index b7a3326942582..277648f47117c 100644 --- a/packages/kbn-doc-links/src/get_doc_links.ts +++ b/packages/kbn-doc-links/src/get_doc_links.ts @@ -126,7 +126,6 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => { connectorsMongoDB: `${ENTERPRISE_SEARCH_DOCS}connectors-mongodb.html`, connectorsMySQL: `${ENTERPRISE_SEARCH_DOCS}connectors-mysql.html`, connectorsWorkplaceSearch: `${ENTERPRISE_SEARCH_DOCS}connectors.html#connectors-workplace-search`, - contentExtraction: `${ENTERPRISE_SEARCH_DOCS}content-extraction.html`, crawlerGettingStarted: `${ENTERPRISE_SEARCH_DOCS}crawler-getting-started.html`, crawlerManaging: `${ENTERPRISE_SEARCH_DOCS}crawler-managing.html`, crawlerOverview: `${ENTERPRISE_SEARCH_DOCS}crawler.html`, diff --git a/packages/kbn-doc-links/src/types.ts b/packages/kbn-doc-links/src/types.ts index 16a80e7f7bf33..649b0d6a87eda 100644 --- a/packages/kbn-doc-links/src/types.ts +++ b/packages/kbn-doc-links/src/types.ts @@ -111,7 +111,6 @@ export interface DocLinks { readonly connectorsMongoDB: string; readonly connectorsMySQL: string; readonly connectorsWorkplaceSearch: string; - readonly contentExtraction: string; readonly crawlerGettingStarted: string; readonly crawlerManaging: string; readonly crawlerOverview: string; diff --git a/packages/kbn-tinymath/README.md b/packages/kbn-tinymath/README.md index 1094c4286c851..3db95cef9adb0 100644 --- a/packages/kbn-tinymath/README.md +++ b/packages/kbn-tinymath/README.md @@ -66,7 +66,10 @@ parse('1 + random()') This package is rebuilt when running `yarn kbn bootstrap`, but can also be build directly using `yarn build` from the `packages/kbn-tinymath` directory. + ### Running tests -To test `@kbn/tinymath` from Kibana, run `yarn run jest --watch packages/kbn-tinymath` from +To test `@kbn/tinymath` from Kibana, run `node scripts/jest --config packages/kbn-tinymath/jest.config.js` from the top level of Kibana. + +To test grammar changes it is required to run a build task before the test suite. diff --git a/packages/kbn-tinymath/docs/functions.md b/packages/kbn-tinymath/docs/functions.md index 0c7460a8189dd..23d267ec975f5 100644 --- a/packages/kbn-tinymath/docs/functions.md +++ b/packages/kbn-tinymath/docs/functions.md @@ -96,6 +96,143 @@ clamp(35, 10, [20, 30, 40, 50]) // returns [20, 30, 35, 35] clamp([1, 9], 3, [4, 5]) // returns [clamp([1, 3, 4]), clamp([9, 3, 5])] = [3, 5] ``` *** +## _eq(_ _a_, _b_ _)_ +Performs an equality comparison between two values. + + +| Param | Type | Description | +| --- | --- | --- | +| a | number \| Array.<number> | a number or an array of numbers | +| b | number \| Array.<number> | a number or an array of numbers | + +**Returns**: boolean - Returns true if `a` and `b` are equal, false otherwise. Returns an array with the equality comparison of each element if `a` is an array. +**Throws**: + +- `'Missing b value'` if `b` is not provided +- `'Array length mismatch'` if `args` contains arrays of different lengths + +**Example** +```js +eq(1, 1) // returns true +eq(1, 2) // returns false +eq([1, 2], 1) // returns [true, false] +eq([1, 2], [1, 2]) // returns [true, true] +``` +*** +## _gt(_ _a_, _b_ _)_ +Performs a greater than comparison between two values. + + +| Param | Type | Description | +| --- | --- | --- | +| a | number \| Array.<number> | a number or an array of numbers | +| b | number \| Array.<number> | a number or an array of numbers | + +**Returns**: boolean - Returns true if `a` is greater than `b`, false otherwise. Returns an array with the greater than comparison of each element if `a` is an array. +**Throws**: + +- `'Missing b value'` if `b` is not provided +- `'Array length mismatch'` if `args` contains arrays of different lengths + +**Example** +```js +gt(1, 1) // returns false +gt(2, 1) // returns true +gt([1, 2], 1) // returns [true, false] +gt([1, 2], [2, 1]) // returns [false, true] +``` +*** +## _gte(_ _a_, _b_ _)_ +Performs a greater than or equal comparison between two values. + + +| Param | Type | Description | +| --- | --- | --- | +| a | number \| Array.<number> | a number or an array of numbers | +| b | number \| Array.<number> | a number or an array of numbers | + +**Returns**: boolean - Returns true if `a` is greater than or equal to `b`, false otherwise. Returns an array with the greater than or equal comparison of each element if `a` is an array. +**Throws**: + +- `'Array length mismatch'` if `args` contains arrays of different lengths + +**Example** +```js +gte(1, 1) // returns true +gte(1, 2) // returns false +gte([1, 2], 2) // returns [false, true] +gte([1, 2], [1, 1]) // returns [true, true] +``` +*** +## _ifelse(_ _cond_, _a_, _b_ _)_ +Evaluates the a conditional argument and returns one of the two values based on that. + + +| Param | Type | Description | +| --- | --- | --- | +| cond | boolean | a boolean value | +| a | any \| Array.<any> | a value or an array of any values | +| b | any \| Array.<any> | a value or an array of any values | + +**Returns**: any \| Array.<any> - if the value of cond is truthy, return `a`, otherwise return `b`. +**Throws**: + +- `'Condition clause is of the wrong type'` if the `cond` provided is not of boolean type +- `'Missing a value'` if `a` is not provided +- `'Missing b value'` if `b` is not provided + +**Example** +```js +ifelse(5 > 6, 1, 0) // returns 0 +ifelse(1 == 1, [1, 2, 3], 5) // returns [1, 2, 3] +ifelse(1 < 2, [1, 2, 3], [2, 3, 4]) // returns [1, 2, 3] +``` +*** +## _lt(_ _a_, _b_ _)_ +Performs a lower than comparison between two values. + + +| Param | Type | Description | +| --- | --- | --- | +| a | number \| Array.<number> | a number or an array of numbers | +| b | number \| Array.<number> | a number or an array of numbers | + +**Returns**: boolean - Returns true if `a` is lower than `b`, false otherwise. Returns an array with the lower than comparison of each element if `a` is an array. +**Throws**: + +- `'Missing b value'` if `b` is not provided +- `'Array length mismatch'` if `args` contains arrays of different lengths + +**Example** +```js +lt(1, 1) // returns false +lt(1, 2) // returns true +lt([1, 2], 2) // returns [true, false] +lt([1, 2], [1, 2]) // returns [false, false] +``` +*** +## _lte(_ _a_, _b_ _)_ +Performs a lower than or equal comparison between two values. + + +| Param | Type | Description | +| --- | --- | --- | +| a | number \| Array.<number> | a number or an array of numbers | +| b | number \| Array.<number> | a number or an array of numbers | + +**Returns**: boolean - Returns true if `a` is lower than or equal to `b`, false otherwise. Returns an array with the lower than or equal comparison of each element if `a` is an array. +**Throws**: + +- `'Array length mismatch'` if `args` contains arrays of different lengths + +**Example** +```js +lte(1, 1) // returns true +lte(1, 2) // returns true +lte([1, 2], 2) // returns [true, true] +lte([1, 2], [1, 1]) // returns [true, false] +``` +*** ## _cos(_ _a_ _)_ Calculates the the cosine of a number. For arrays, the function will be applied index-wise to each element. diff --git a/packages/kbn-tinymath/grammar/grammar.peggy b/packages/kbn-tinymath/grammar/grammar.peggy index 414bc2fa11cb7..7eb5f6c5f82d6 100644 --- a/packages/kbn-tinymath/grammar/grammar.peggy +++ b/packages/kbn-tinymath/grammar/grammar.peggy @@ -11,6 +11,32 @@ max: location.end.offset } } + + const symbolsToFn = { + '+': 'add', '-': 'subtract', + '*': 'multiply', '/': 'divide', + '<': 'lt', '>': 'gt', '==': 'eq', + '<=': 'lte', '>=': 'gte', + } + + // Shared function for AST operations + function parseSymbol(left, rest){ + const topLevel = rest.reduce((acc, [name, right]) => ({ + type: 'function', + name: symbolsToFn[name], + args: [acc, right], + }), left); + if (typeof topLevel === 'object') { + topLevel.location = simpleLocation(location()); + topLevel.text = text(); + } + return topLevel; + } + + // op is always defined, while eq can be null for gt and lt cases + function getComparisonSymbol([op, eq]){ + return symbolsToFn[op+(eq || '')]; + } } start @@ -70,45 +96,55 @@ Variable // expressions +// An Expression can be of 3 different types: +// * a Comparison operation, which can contain recursive MathOperations inside +// * a MathOperation, which can contain other MathOperations, but not Comparison types +// * an ExpressionGroup, which is a generic Grouping that contains also Comparison operations (i.e. ( 5 > 1)) Expression + = Comparison + / MathOperation + / ExpressionGroup + +Comparison + = _ left:MathOperation op:(('>' / '<')('=')? / '=''=') right:MathOperation _ { + return { + type: 'function', + name: getComparisonSymbol(op), + args: [left, right], + location: simpleLocation(location()), + text: text() + }; + } + +MathOperation = AddSubtract + / MultiplyDivide + / Factor AddSubtract = _ left:MultiplyDivide rest:(('+' / '-') MultiplyDivide)+ _ { - const topLevel = rest.reduce((acc, curr) => ({ - type: 'function', - name: curr[0] === '+' ? 'add' : 'subtract', - args: [acc, curr[1]], - }), left); - if (typeof topLevel === 'object') { - topLevel.location = simpleLocation(location()); - topLevel.text = text(); - } - return topLevel; + return parseSymbol(left, rest, {'+': 'add', '-': 'subtract'}); } - / MultiplyDivide MultiplyDivide = _ left:Factor rest:(('*' / '/') Factor)* _ { - const topLevel = rest.reduce((acc, curr) => ({ - type: 'function', - name: curr[0] === '*' ? 'multiply' : 'divide', - args: [acc, curr[1]], - }), left); - if (typeof topLevel === 'object') { - topLevel.location = simpleLocation(location()); - topLevel.text = text(); - } - return topLevel; + return parseSymbol(left, rest, {'*': 'multiply', '/': 'divide'}); } - / Factor Factor = Group / Function / Literal +// Because of the new Comparison syntax it is required a new Group type +// the previous Group has been renamed into ExpressionGroup while +// a new Group type has been defined to exclude the Comparison type from it Group + = _ '(' _ expr:MathOperation _ ')' _ { + return expr + } + +ExpressionGroup = _ '(' _ expr:Expression _ ')' _ { return expr } diff --git a/packages/kbn-tinymath/src/functions/abs.js b/packages/kbn-tinymath/src/functions/abs.js index aa3c808d89afd..46cf65837621b 100644 --- a/packages/kbn-tinymath/src/functions/abs.js +++ b/packages/kbn-tinymath/src/functions/abs.js @@ -17,11 +17,11 @@ * abs([-1 , -2, 3, -4]) // returns [1, 2, 3, 4] */ -module.exports = { abs }; - function abs(a) { if (Array.isArray(a)) { return a.map((a) => Math.abs(a)); } return Math.abs(a); } + +module.exports = { abs }; diff --git a/packages/kbn-tinymath/src/functions/add.js b/packages/kbn-tinymath/src/functions/add.js index 184c619c94534..b1abb23d99f6e 100644 --- a/packages/kbn-tinymath/src/functions/add.js +++ b/packages/kbn-tinymath/src/functions/add.js @@ -17,8 +17,6 @@ * add([1, 2], 3, [4, 5], 6) // returns [(1 + 3 + 4 + 6), (2 + 3 + 5 + 6)] = [14, 16] */ -module.exports = { add }; - function add(...args) { if (args.length === 1) { if (Array.isArray(args[0])) return args[0].reduce((result, current) => result + current); @@ -35,3 +33,4 @@ function add(...args) { return result + current; }); } +module.exports = { add }; diff --git a/packages/kbn-tinymath/src/functions/cbrt.js b/packages/kbn-tinymath/src/functions/cbrt.js index 1c5f75a724b5e..39ea7ffb33c1e 100644 --- a/packages/kbn-tinymath/src/functions/cbrt.js +++ b/packages/kbn-tinymath/src/functions/cbrt.js @@ -17,11 +17,11 @@ * cbrt([27, 64, 125]) // returns [3, 4, 5] */ -module.exports = { cbrt }; - function cbrt(a) { if (Array.isArray(a)) { return a.map((a) => Math.cbrt(a)); } return Math.cbrt(a); } + +module.exports = { cbrt }; diff --git a/packages/kbn-tinymath/src/functions/ceil.js b/packages/kbn-tinymath/src/functions/ceil.js index fe1ca21e4aed1..3dbfbcabaa224 100644 --- a/packages/kbn-tinymath/src/functions/ceil.js +++ b/packages/kbn-tinymath/src/functions/ceil.js @@ -17,11 +17,11 @@ * ceil([1.1, 2.2, 3.3]) // returns [2, 3, 4] */ -module.exports = { ceil }; - function ceil(a) { if (Array.isArray(a)) { return a.map((a) => Math.ceil(a)); } return Math.ceil(a); } + +module.exports = { ceil }; diff --git a/packages/kbn-tinymath/src/functions/clamp.js b/packages/kbn-tinymath/src/functions/clamp.js index 29c190aa8f921..a8563895abec1 100644 --- a/packages/kbn-tinymath/src/functions/clamp.js +++ b/packages/kbn-tinymath/src/functions/clamp.js @@ -30,8 +30,6 @@ const findClamp = (a, min, max) => { * clamp([1, 9], 3, [4, 5]) // returns [clamp([1, 3, 4]), clamp([9, 3, 5])] = [3, 5] */ -module.exports = { clamp }; - function clamp(a, min, max) { if (max === null) throw new Error("Missing maximum value. You may want to use the 'min' function instead"); @@ -73,3 +71,5 @@ function clamp(a, min, max) { return findClamp(a, min, max); } + +module.exports = { clamp }; diff --git a/packages/kbn-tinymath/src/functions/comparison/eq.js b/packages/kbn-tinymath/src/functions/comparison/eq.js new file mode 100644 index 0000000000000..dc1e7f027c44f --- /dev/null +++ b/packages/kbn-tinymath/src/functions/comparison/eq.js @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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. + */ + +/** + * Performs an equality comparison between two values. + * @param {number|number[]} a a number or an array of numbers + * @param {number|number[]} b a number or an array of numbers + * @return {boolean} Returns true if `a` and `b` are equal, false otherwise. Returns an array with the equality comparison of each element if `a` is an array. + * @throws `'Missing b value'` if `b` is not provided + * @throws `'Array length mismatch'` if `args` contains arrays of different lengths + * @example + * eq(1, 1) // returns true + * eq(1, 2) // returns false + * eq([1, 2], 1) // returns [true, false] + * eq([1, 2], [1, 2]) // returns [true, true] + */ + +function eq(a, b) { + if (b == null) { + throw new Error('Missing b value'); + } + if (Array.isArray(a)) { + if (!Array.isArray(b)) { + return a.every((v) => v === b); + } + if (a.length !== b.length) { + throw new Error('Array length mismatch'); + } + return a.every((v, i) => v === b[i]); + } + + return a === b; +} +module.exports = { eq }; diff --git a/packages/kbn-tinymath/src/functions/comparison/gt.js b/packages/kbn-tinymath/src/functions/comparison/gt.js new file mode 100644 index 0000000000000..1fc1a0cac083a --- /dev/null +++ b/packages/kbn-tinymath/src/functions/comparison/gt.js @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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. + */ + +/** + * Performs a greater than comparison between two values. + * @param {number|number[]} a a number or an array of numbers + * @param {number|number[]} b a number or an array of numbers + * @return {boolean} Returns true if `a` is greater than `b`, false otherwise. Returns an array with the greater than comparison of each element if `a` is an array. + * @throws `'Missing b value'` if `b` is not provided + * @throws `'Array length mismatch'` if `args` contains arrays of different lengths + * @example + * gt(1, 1) // returns false + * gt(2, 1) // returns true + * gt([1, 2], 1) // returns [true, false] + * gt([1, 2], [2, 1]) // returns [false, true] + */ + +function gt(a, b) { + if (b == null) { + throw new Error('Missing b value'); + } + if (Array.isArray(a)) { + if (!Array.isArray(b)) { + return a.every((v) => v > b); + } + if (a.length !== b.length) { + throw new Error('Array length mismatch'); + } + return a.every((v, i) => v > b[i]); + } + + return a > b; +} +module.exports = { gt }; diff --git a/packages/kbn-tinymath/src/functions/comparison/gte.js b/packages/kbn-tinymath/src/functions/comparison/gte.js new file mode 100644 index 0000000000000..2d70145e90f9e --- /dev/null +++ b/packages/kbn-tinymath/src/functions/comparison/gte.js @@ -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 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. + */ + +const { eq } = require('./eq'); +const { gt } = require('./gt'); + +/** + * Performs a greater than or equal comparison between two values. + * @param {number|number[]} a a number or an array of numbers + * @param {number|number[]} b a number or an array of numbers + * @return {boolean} Returns true if `a` is greater than or equal to `b`, false otherwise. Returns an array with the greater than or equal comparison of each element if `a` is an array. + * @throws `'Array length mismatch'` if `args` contains arrays of different lengths + * @example + * gte(1, 1) // returns true + * gte(1, 2) // returns false + * gte([1, 2], 2) // returns [false, true] + * gte([1, 2], [1, 1]) // returns [true, true] + */ + +function gte(a, b) { + return eq(a, b) || gt(a, b); +} +module.exports = { gte }; diff --git a/packages/kbn-tinymath/src/functions/comparison/ifelse.js b/packages/kbn-tinymath/src/functions/comparison/ifelse.js new file mode 100644 index 0000000000000..7f9c212d6029d --- /dev/null +++ b/packages/kbn-tinymath/src/functions/comparison/ifelse.js @@ -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 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. + */ + +/** + * Evaluates the a conditional argument and returns one of the two values based on that. + * @param {(boolean)} cond a boolean value + * @param {(any|any[])} a a value or an array of any values + * @param {(any|any[])} b a value or an array of any values + * @return {(any|any[])} if the value of cond is truthy, return `a`, otherwise return `b`. + * @throws `'Condition clause is of the wrong type'` if the `cond` provided is not of boolean type + * @throws `'Missing a value'` if `a` is not provided + * @throws `'Missing b value'` if `b` is not provided + * @example + * ifelse(5 > 6, 1, 0) // returns 0 + * ifelse(1 == 1, [1, 2, 3], 5) // returns [1, 2, 3] + * ifelse(1 < 2, [1, 2, 3], [2, 3, 4]) // returns [1, 2, 3] + */ + +function ifelse(cond, a, b) { + if (typeof cond !== 'boolean') { + throw Error('Condition clause is of the wrong type'); + } + if (a == null) { + throw new Error('Missing a value'); + } + if (b == null) { + throw new Error('Missing b value'); + } + return cond ? a : b; +} + +ifelse.skipNumberValidation = true; +module.exports = { ifelse }; diff --git a/packages/kbn-tinymath/src/functions/comparison/index.js b/packages/kbn-tinymath/src/functions/comparison/index.js new file mode 100644 index 0000000000000..b20cc39014a51 --- /dev/null +++ b/packages/kbn-tinymath/src/functions/comparison/index.js @@ -0,0 +1,16 @@ +/* + * Copyright 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. + */ + +const { eq } = require('./eq'); +const { lt } = require('./lt'); +const { gt } = require('./gt'); +const { lte } = require('./lte'); +const { gte } = require('./gte'); +const { ifelse } = require('./ifelse'); + +module.exports = { eq, lt, gt, lte, gte, ifelse }; diff --git a/packages/kbn-tinymath/src/functions/comparison/lt.js b/packages/kbn-tinymath/src/functions/comparison/lt.js new file mode 100644 index 0000000000000..fb7a444d1af7a --- /dev/null +++ b/packages/kbn-tinymath/src/functions/comparison/lt.js @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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. + */ + +/** + * Performs a lower than comparison between two values. + * @param {number|number[]} a a number or an array of numbers + * @param {number|number[]} b a number or an array of numbers + * @return {boolean} Returns true if `a` is lower than `b`, false otherwise. Returns an array with the lower than comparison of each element if `a` is an array. + * @throws `'Missing b value'` if `b` is not provided + * @throws `'Array length mismatch'` if `args` contains arrays of different lengths + * @example + * lt(1, 1) // returns false + * lt(1, 2) // returns true + * lt([1, 2], 2) // returns [true, false] + * lt([1, 2], [1, 2]) // returns [false, false] + */ + +function lt(a, b) { + if (b == null) { + throw new Error('Missing b value'); + } + if (Array.isArray(a)) { + if (!Array.isArray(b)) { + return a.every((v) => v < b); + } + if (a.length !== b.length) { + throw new Error('Array length mismatch'); + } + return a.every((v, i) => v < b[i]); + } + + return a < b; +} +module.exports = { lt }; diff --git a/packages/kbn-tinymath/src/functions/comparison/lte.js b/packages/kbn-tinymath/src/functions/comparison/lte.js new file mode 100644 index 0000000000000..36aceb11f3bd7 --- /dev/null +++ b/packages/kbn-tinymath/src/functions/comparison/lte.js @@ -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 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. + */ + +const { eq } = require('./eq'); +const { lt } = require('./lt'); + +/** + * Performs a lower than or equal comparison between two values. + * @param {number|number[]} a a number or an array of numbers + * @param {number|number[]} b a number or an array of numbers + * @return {boolean} Returns true if `a` is lower than or equal to `b`, false otherwise. Returns an array with the lower than or equal comparison of each element if `a` is an array. + * @throws `'Array length mismatch'` if `args` contains arrays of different lengths + * @example + * lte(1, 1) // returns true + * lte(1, 2) // returns true + * lte([1, 2], 2) // returns [true, true] + * lte([1, 2], [1, 1]) // returns [true, false] + */ + +function lte(a, b) { + return eq(a, b) || lt(a, b); +} +module.exports = { lte }; diff --git a/packages/kbn-tinymath/src/functions/cos.js b/packages/kbn-tinymath/src/functions/cos.js index 590cc2aee06b9..590f2bf5bd5e0 100644 --- a/packages/kbn-tinymath/src/functions/cos.js +++ b/packages/kbn-tinymath/src/functions/cos.js @@ -16,11 +16,10 @@ * cos([0, 1.5707963267948966]) // returns [1, 6.123233995736766e-17] */ -module.exports = { cos }; - function cos(a) { if (Array.isArray(a)) { return a.map((a) => Math.cos(a)); } return Math.cos(a); } +module.exports = { cos }; diff --git a/packages/kbn-tinymath/src/functions/count.js b/packages/kbn-tinymath/src/functions/count.js index aa01e1c25835a..ecddb623180f2 100644 --- a/packages/kbn-tinymath/src/functions/count.js +++ b/packages/kbn-tinymath/src/functions/count.js @@ -19,10 +19,10 @@ const { size } = require('./size'); * count(100) // returns 1 */ -module.exports = { count }; - function count(a) { return size(a); } count.skipNumberValidation = true; + +module.exports = { count }; diff --git a/packages/kbn-tinymath/src/functions/cube.js b/packages/kbn-tinymath/src/functions/cube.js index 4d6f8cbea6374..92fe42326f056 100644 --- a/packages/kbn-tinymath/src/functions/cube.js +++ b/packages/kbn-tinymath/src/functions/cube.js @@ -18,8 +18,7 @@ const { pow } = require('./pow'); * cube([3, 4, 5]) // returns [27, 64, 125] */ -module.exports = { cube }; - function cube(a) { return pow(a, 3); } +module.exports = { cube }; diff --git a/packages/kbn-tinymath/src/functions/degtorad.js b/packages/kbn-tinymath/src/functions/degtorad.js index e50365b0beabc..ce6f53ac29c27 100644 --- a/packages/kbn-tinymath/src/functions/degtorad.js +++ b/packages/kbn-tinymath/src/functions/degtorad.js @@ -16,11 +16,10 @@ * degtorad([0, 90, 180, 360]) // returns [0, 1.5707963267948966, 3.141592653589793, 6.283185307179586] */ -module.exports = { degtorad }; - function degtorad(a) { if (Array.isArray(a)) { return a.map((a) => (a * Math.PI) / 180); } return (a * Math.PI) / 180; } +module.exports = { degtorad }; diff --git a/packages/kbn-tinymath/src/functions/divide.js b/packages/kbn-tinymath/src/functions/divide.js index 3f323944c886b..b572217f3ce7d 100644 --- a/packages/kbn-tinymath/src/functions/divide.js +++ b/packages/kbn-tinymath/src/functions/divide.js @@ -20,8 +20,6 @@ * divide([14, 42, 65, 108], [2, 7, 5, 12]) // returns [7, 6, 13, 9] */ -module.exports = { divide }; - function divide(a, b) { if (Array.isArray(a) && Array.isArray(b)) { if (a.length !== b.length) throw new Error('Array length mismatch'); @@ -30,8 +28,14 @@ function divide(a, b) { return val / b[i]; }); } - if (Array.isArray(b)) return b.map((b) => a / b); + if (Array.isArray(b)) { + return b.map((bi) => { + if (bi === 0) throw new Error('Cannot divide by 0'); + return a / bi; + }); + } if (b === 0) throw new Error('Cannot divide by 0'); if (Array.isArray(a)) return a.map((a) => a / b); return a / b; } +module.exports = { divide }; diff --git a/packages/kbn-tinymath/src/functions/exp.js b/packages/kbn-tinymath/src/functions/exp.js index 79669b9dccedd..cf89785e507c1 100644 --- a/packages/kbn-tinymath/src/functions/exp.js +++ b/packages/kbn-tinymath/src/functions/exp.js @@ -16,11 +16,10 @@ * exp([1, 2, 3]) // returns [e^1, e^2, e^3] = [2.718281828459045, 7.3890560989306495, 20.085536923187668] */ -module.exports = { exp }; - function exp(a) { if (Array.isArray(a)) { return a.map((a) => Math.exp(a)); } return Math.exp(a); } +module.exports = { exp }; diff --git a/packages/kbn-tinymath/src/functions/first.js b/packages/kbn-tinymath/src/functions/first.js index 894cb38e69f47..d7970ac0abb71 100644 --- a/packages/kbn-tinymath/src/functions/first.js +++ b/packages/kbn-tinymath/src/functions/first.js @@ -16,8 +16,6 @@ * first([1, 2, 3]) // returns 1 */ -module.exports = { first }; - function first(a) { if (Array.isArray(a)) { return a[0]; @@ -26,3 +24,5 @@ function first(a) { } first.skipNumberValidation = true; + +module.exports = { first }; diff --git a/packages/kbn-tinymath/src/functions/fix.js b/packages/kbn-tinymath/src/functions/fix.js index 1d297327fd47b..3088a949add77 100644 --- a/packages/kbn-tinymath/src/functions/fix.js +++ b/packages/kbn-tinymath/src/functions/fix.js @@ -24,11 +24,11 @@ const fixer = (a) => { * fix([1.8, 2.9, -3.7, -4.6]) // returns [1, 2, -3, -4] */ -module.exports = { fix }; - function fix(a) { if (Array.isArray(a)) { return a.map((a) => fixer(a)); } return fixer(a); } + +module.exports = { fix }; diff --git a/packages/kbn-tinymath/src/functions/floor.js b/packages/kbn-tinymath/src/functions/floor.js index 5d27228d7cdf9..e13f64dc665ae 100644 --- a/packages/kbn-tinymath/src/functions/floor.js +++ b/packages/kbn-tinymath/src/functions/floor.js @@ -17,11 +17,11 @@ * floor([1.7, 2.8, 3.9]) // returns [1, 2, 3] */ -module.exports = { floor }; - function floor(a) { if (Array.isArray(a)) { return a.map((a) => Math.floor(a)); } return Math.floor(a); } + +module.exports = { floor }; diff --git a/packages/kbn-tinymath/src/functions/index.js b/packages/kbn-tinymath/src/functions/index.js index 37c2a13c41cf4..8f0740cb08571 100644 --- a/packages/kbn-tinymath/src/functions/index.js +++ b/packages/kbn-tinymath/src/functions/index.js @@ -45,6 +45,7 @@ const { subtract } = require('./subtract'); const { sum } = require('./sum'); const { tan } = require('./tan'); const { unique } = require('./unique'); +const { eq, lt, gt, lte, gte, ifelse } = require('./comparison'); module.exports = { functions: { @@ -63,6 +64,7 @@ module.exports = { first, fix, floor, + ifelse, last, log, log10, @@ -87,5 +89,10 @@ module.exports = { sum, tan, unique, + eq, + lt, + gt, + lte, + gte, }, }; diff --git a/packages/kbn-tinymath/src/functions/last.js b/packages/kbn-tinymath/src/functions/last.js index 63ba3bd1cfc35..7cdd5fe9cdde6 100644 --- a/packages/kbn-tinymath/src/functions/last.js +++ b/packages/kbn-tinymath/src/functions/last.js @@ -16,8 +16,6 @@ * last([1, 2, 3]) // returns 3 */ -module.exports = { last }; - function last(a) { if (Array.isArray(a)) { return a[a.length - 1]; @@ -26,3 +24,4 @@ function last(a) { } last.skipNumberValidation = true; +module.exports = { last }; diff --git a/packages/kbn-tinymath/src/functions/lib/transpose.js b/packages/kbn-tinymath/src/functions/lib/transpose.js index 9637971cec7cf..9e4d673fdf57a 100644 --- a/packages/kbn-tinymath/src/functions/lib/transpose.js +++ b/packages/kbn-tinymath/src/functions/lib/transpose.js @@ -8,6 +8,7 @@ /** * Transposes a 2D array, i.e. turns the rows into columns and vice versa. Scalar values are also included in the transpose. + * @private * @param {any[][]} args an array or an array that contains arrays * @param {number} index index of the first array element in args * @return {any[][]} transpose of args diff --git a/packages/kbn-tinymath/src/functions/log.js b/packages/kbn-tinymath/src/functions/log.js index 083c9cdef2dc0..06043eca5384c 100644 --- a/packages/kbn-tinymath/src/functions/log.js +++ b/packages/kbn-tinymath/src/functions/log.js @@ -22,8 +22,6 @@ const changeOfBase = (a, b) => Math.log(a) / Math.log(b); * log([2, 4, 8, 16, 32], 2) // returns [1, 2, 3, 4, 5] */ -module.exports = { log }; - function log(a, b = Math.E) { if (b <= 0) throw new Error('Base out of range'); @@ -36,3 +34,4 @@ function log(a, b = Math.E) { if (a < 0) throw new Error('Must be greater than 0'); return changeOfBase(a, b); } +module.exports = { log }; diff --git a/packages/kbn-tinymath/src/functions/log10.js b/packages/kbn-tinymath/src/functions/log10.js index 68c2ffb2bbd30..09f7182e70375 100644 --- a/packages/kbn-tinymath/src/functions/log10.js +++ b/packages/kbn-tinymath/src/functions/log10.js @@ -20,8 +20,7 @@ const { log } = require('./log'); * log([10, 100, 1000, 10000, 100000]) // returns [1, 2, 3, 4, 5] */ -module.exports = { log10 }; - function log10(a) { return log(a, 10); } +module.exports = { log10 }; diff --git a/packages/kbn-tinymath/src/functions/max.js b/packages/kbn-tinymath/src/functions/max.js index 4b6bb2bd27d5e..46e6fec0f6989 100644 --- a/packages/kbn-tinymath/src/functions/max.js +++ b/packages/kbn-tinymath/src/functions/max.js @@ -17,8 +17,6 @@ * max([1, 9], 4, [3, 5]) // returns [max([1, 4, 3]), max([9, 4, 5])] = [4, 9] */ -module.exports = { max }; - function max(...args) { if (args.length === 1) { if (Array.isArray(args[0])) @@ -36,3 +34,4 @@ function max(...args) { return Math.max(result, current); }); } +module.exports = { max }; diff --git a/packages/kbn-tinymath/src/functions/mean.js b/packages/kbn-tinymath/src/functions/mean.js index 441b90cff2ac3..995c54b3b1ea0 100644 --- a/packages/kbn-tinymath/src/functions/mean.js +++ b/packages/kbn-tinymath/src/functions/mean.js @@ -19,8 +19,6 @@ const { add } = require('./add'); * mean([1, 9], 5, [3, 4]) // returns [mean([1, 5, 3]), mean([9, 5, 4])] = [3, 6] */ -module.exports = { mean }; - function mean(...args) { if (args.length === 1) { if (Array.isArray(args[0])) return add(args[0]) / args[0].length; @@ -34,3 +32,4 @@ function mean(...args) { return sum / args.length; } +module.exports = { mean }; diff --git a/packages/kbn-tinymath/src/functions/median.js b/packages/kbn-tinymath/src/functions/median.js index 7c47158a81dda..facac3d367750 100644 --- a/packages/kbn-tinymath/src/functions/median.js +++ b/packages/kbn-tinymath/src/functions/median.js @@ -33,8 +33,6 @@ const findMedian = (a) => { * median([1, 9], 2, 4, [3, 5]) // returns [median([1, 2, 4, 3]), median([9, 2, 4, 5])] = [2.5, 4.5] */ -module.exports = { median }; - function median(...args) { if (args.length === 1) { if (Array.isArray(args[0])) return findMedian(args[0]); @@ -48,3 +46,4 @@ function median(...args) { } return findMedian(args); } +module.exports = { median }; diff --git a/packages/kbn-tinymath/src/functions/min.js b/packages/kbn-tinymath/src/functions/min.js index 356ccecc4b6f2..8f9ecd7c25c28 100644 --- a/packages/kbn-tinymath/src/functions/min.js +++ b/packages/kbn-tinymath/src/functions/min.js @@ -17,8 +17,6 @@ * min([1, 9], 4, [3, 5]) // returns [min([1, 4, 3]), min([9, 4, 5])] = [1, 4] */ -module.exports = { min }; - function min(...args) { if (args.length === 1) { if (Array.isArray(args[0])) @@ -36,3 +34,4 @@ function min(...args) { return Math.min(result, current); }); } +module.exports = { min }; diff --git a/packages/kbn-tinymath/src/functions/mod.js b/packages/kbn-tinymath/src/functions/mod.js index 7f6a4fffca829..bb945772f41c9 100644 --- a/packages/kbn-tinymath/src/functions/mod.js +++ b/packages/kbn-tinymath/src/functions/mod.js @@ -20,8 +20,6 @@ * mod([14, 42, 65, 108], [5, 4, 14, 2]) // returns [5, 2, 9, 0] */ -module.exports = { mod }; - function mod(a, b) { if (Array.isArray(a) && Array.isArray(b)) { if (a.length !== b.length) throw new Error('Array length mismatch'); @@ -35,3 +33,4 @@ function mod(a, b) { if (Array.isArray(a)) return a.map((a) => a % b); return a % b; } +module.exports = { mod }; diff --git a/packages/kbn-tinymath/src/functions/mode.js b/packages/kbn-tinymath/src/functions/mode.js index 0836c1c939f44..99f0086de0a78 100644 --- a/packages/kbn-tinymath/src/functions/mode.js +++ b/packages/kbn-tinymath/src/functions/mode.js @@ -40,8 +40,6 @@ const findMode = (a) => { * mode([1, 9], 1, 4, [3, 5]) // returns [mode([1, 1, 4, 3]), mode([9, 1, 4, 5])] = [[1], [4, 5, 9]] */ -module.exports = { mode }; - function mode(...args) { if (args.length === 1) { if (Array.isArray(args[0])) return findMode(args[0]); @@ -55,3 +53,4 @@ function mode(...args) { } return findMode(args); } +module.exports = { mode }; diff --git a/packages/kbn-tinymath/src/functions/multiply.js b/packages/kbn-tinymath/src/functions/multiply.js index d7c9c75ee3647..d9d6c751bdaf7 100644 --- a/packages/kbn-tinymath/src/functions/multiply.js +++ b/packages/kbn-tinymath/src/functions/multiply.js @@ -19,8 +19,6 @@ * multiply([1, 2, 3, 4], [2, 7, 5, 12]) // returns [2, 14, 15, 48] */ -module.exports = { multiply }; - function multiply(...args) { return args.reduce((result, current) => { if (Array.isArray(result) && Array.isArray(current)) { @@ -32,3 +30,4 @@ function multiply(...args) { return result * current; }); } +module.exports = { multiply }; diff --git a/packages/kbn-tinymath/src/functions/pi.js b/packages/kbn-tinymath/src/functions/pi.js index 9f0b74292524c..dacb0ea5ea4ed 100644 --- a/packages/kbn-tinymath/src/functions/pi.js +++ b/packages/kbn-tinymath/src/functions/pi.js @@ -14,8 +14,7 @@ * pi() // 3.141592653589793 */ -module.exports = { pi }; - function pi() { return Math.PI; } +module.exports = { pi }; diff --git a/packages/kbn-tinymath/src/functions/pow.js b/packages/kbn-tinymath/src/functions/pow.js index 2c600cb7f47aa..e2be268d3c623 100644 --- a/packages/kbn-tinymath/src/functions/pow.js +++ b/packages/kbn-tinymath/src/functions/pow.js @@ -17,8 +17,6 @@ * pow([1, 2, 3], 4) // returns [1, 16, 81] */ -module.exports = { pow }; - function pow(a, b) { if (b == null) throw new Error('Missing exponent'); if (Array.isArray(a)) { @@ -26,3 +24,4 @@ function pow(a, b) { } return Math.pow(a, b); } +module.exports = { pow }; diff --git a/packages/kbn-tinymath/src/functions/radtodeg.js b/packages/kbn-tinymath/src/functions/radtodeg.js index 6cfd40841ba55..733147334a637 100644 --- a/packages/kbn-tinymath/src/functions/radtodeg.js +++ b/packages/kbn-tinymath/src/functions/radtodeg.js @@ -16,11 +16,10 @@ * radtodeg([0, 1.5707963267948966, 3.141592653589793, 6.283185307179586]) // returns [0, 90, 180, 360] */ -module.exports = { radtodeg }; - function radtodeg(a) { if (Array.isArray(a)) { return a.map((a) => (a * 180) / Math.PI); } return (a * 180) / Math.PI; } +module.exports = { radtodeg }; diff --git a/packages/kbn-tinymath/src/functions/random.js b/packages/kbn-tinymath/src/functions/random.js index 799f6515d4ca5..be2dd2c773322 100644 --- a/packages/kbn-tinymath/src/functions/random.js +++ b/packages/kbn-tinymath/src/functions/random.js @@ -18,8 +18,6 @@ * random(-10,10) // returns a random number between -10 (inclusive) and 10 (exclusive) */ -module.exports = { random }; - function random(a, b) { if (a == null) return Math.random(); @@ -33,3 +31,5 @@ function random(a, b) { if (a > b) throw new Error(`Min is greater than max`); return Math.random() * (b - a) + a; } + +module.exports = { random }; diff --git a/packages/kbn-tinymath/src/functions/range.js b/packages/kbn-tinymath/src/functions/range.js index 571b179b75b65..0b2a05dfb8ae4 100644 --- a/packages/kbn-tinymath/src/functions/range.js +++ b/packages/kbn-tinymath/src/functions/range.js @@ -21,8 +21,7 @@ const { subtract } = require('./subtract'); * range([1, 9], 4, [3, 5]) // returns [range([1, 4, 3]), range([9, 4, 5])] = [3, 5] */ -module.exports = { range }; - function range(...args) { return subtract(max(...args), min(...args)); } +module.exports = { range }; diff --git a/packages/kbn-tinymath/src/functions/round.js b/packages/kbn-tinymath/src/functions/round.js index 9befb64ca5d45..88d45fda42b5f 100644 --- a/packages/kbn-tinymath/src/functions/round.js +++ b/packages/kbn-tinymath/src/functions/round.js @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -const rounder = (a, b) => Math.round(a * Math.pow(10, b)) / Math.pow(10, b); +const rounder = (a, b = 0) => Math.round(a * Math.pow(10, b)) / Math.pow(10, b); /** * Rounds a number towards the nearest integer by default or decimal place if specified. For arrays, the function will be applied index-wise to each element. @@ -22,11 +22,10 @@ const rounder = (a, b) => Math.round(a * Math.pow(10, b)) / Math.pow(10, b); * round([2.9234, 5.1234, 3.5234, 4.49234324], 2) // returns [2.92, 5.12, 3.52, 4.49] */ -module.exports = { round }; - -function round(a, b = 0) { +function round(a, b) { if (Array.isArray(a)) { return a.map((a) => rounder(a, b)); } return rounder(a, b); } +module.exports = { round }; diff --git a/packages/kbn-tinymath/src/functions/sin.js b/packages/kbn-tinymath/src/functions/sin.js index 591c799ff3ebe..6a2801623283e 100644 --- a/packages/kbn-tinymath/src/functions/sin.js +++ b/packages/kbn-tinymath/src/functions/sin.js @@ -16,11 +16,10 @@ * sin([0, 1.5707963267948966]) // returns [0, 1] */ -module.exports = { sin }; - function sin(a) { if (Array.isArray(a)) { return a.map((a) => Math.sin(a)); } return Math.sin(a); } +module.exports = { sin }; diff --git a/packages/kbn-tinymath/src/functions/size.js b/packages/kbn-tinymath/src/functions/size.js index fb16bcb905f96..f862ee33ed92a 100644 --- a/packages/kbn-tinymath/src/functions/size.js +++ b/packages/kbn-tinymath/src/functions/size.js @@ -17,11 +17,10 @@ * size(100) // returns 1 */ -module.exports = { size }; - function size(a) { if (Array.isArray(a)) return a.length; throw new Error('Must pass an array'); } size.skipNumberValidation = true; +module.exports = { size }; diff --git a/packages/kbn-tinymath/src/functions/sqrt.js b/packages/kbn-tinymath/src/functions/sqrt.js index 19aeaab964d03..fa666d6a4b0ba 100644 --- a/packages/kbn-tinymath/src/functions/sqrt.js +++ b/packages/kbn-tinymath/src/functions/sqrt.js @@ -17,8 +17,6 @@ * sqrt([9, 16, 25]) // returns [3, 4, 5] */ -module.exports = { sqrt }; - function sqrt(a) { if (Array.isArray(a)) { return a.map((a) => { @@ -30,3 +28,4 @@ function sqrt(a) { if (a < 0) throw new Error('Unable find the square root of a negative number'); return Math.sqrt(a); } +module.exports = { sqrt }; diff --git a/packages/kbn-tinymath/src/functions/square.js b/packages/kbn-tinymath/src/functions/square.js index 5c285eaee3209..58acd1c7f5e33 100644 --- a/packages/kbn-tinymath/src/functions/square.js +++ b/packages/kbn-tinymath/src/functions/square.js @@ -18,8 +18,7 @@ const { pow } = require('./pow'); * square([3, 4, 5]) // returns [9, 16, 25] */ -module.exports = { square }; - function square(a) { return pow(a, 2); } +module.exports = { square }; diff --git a/packages/kbn-tinymath/src/functions/subtract.js b/packages/kbn-tinymath/src/functions/subtract.js index becc267ca51bb..fe2b5ae754456 100644 --- a/packages/kbn-tinymath/src/functions/subtract.js +++ b/packages/kbn-tinymath/src/functions/subtract.js @@ -19,8 +19,6 @@ * subtract([14, 42, 65, 108], [2, 7, 5, 12]) // returns [12, 35, 52, 96] */ -module.exports = { subtract }; - function subtract(a, b) { if (Array.isArray(a) && Array.isArray(b)) { if (a.length !== b.length) throw new Error('Array length mismatch'); @@ -30,3 +28,4 @@ function subtract(a, b) { if (Array.isArray(b)) return b.map((b) => a - b); return a - b; } +module.exports = { subtract }; diff --git a/packages/kbn-tinymath/src/functions/sum.js b/packages/kbn-tinymath/src/functions/sum.js index d9a8f4e531010..fb5bca8abde00 100644 --- a/packages/kbn-tinymath/src/functions/sum.js +++ b/packages/kbn-tinymath/src/functions/sum.js @@ -20,8 +20,6 @@ const findSum = (total, current) => total + current; * sum([10, 20, 30, 40], 10, [1, 2, 3], 22) // returns sum(10, 20, 30, 40, 10, 1, 2, 3, 22) = 138 */ -module.exports = { sum }; - function sum(...args) { return args.reduce((total, current) => { if (Array.isArray(current)) { @@ -30,3 +28,4 @@ function sum(...args) { return total + current; }, 0); } +module.exports = { sum }; diff --git a/packages/kbn-tinymath/src/functions/tan.js b/packages/kbn-tinymath/src/functions/tan.js index 7f045acce0f38..4c980ee3fd272 100644 --- a/packages/kbn-tinymath/src/functions/tan.js +++ b/packages/kbn-tinymath/src/functions/tan.js @@ -16,11 +16,10 @@ * tan([0, 1, -1]) // returns [0, 1.5574077246549023, -1.5574077246549023] */ -module.exports = { tan }; - function tan(a) { if (Array.isArray(a)) { return a.map((a) => Math.tan(a)); } return Math.tan(a); } +module.exports = { tan }; diff --git a/packages/kbn-tinymath/src/functions/unique.js b/packages/kbn-tinymath/src/functions/unique.js index 5220b4ad79adf..77153c036822d 100644 --- a/packages/kbn-tinymath/src/functions/unique.js +++ b/packages/kbn-tinymath/src/functions/unique.js @@ -18,8 +18,6 @@ * unique([1, 2, 3, 4, 2, 2, 2, 3, 4, 2, 4, 5, 2, 1, 4, 2]) // returns 5 */ -module.exports = { unique }; - function unique(a) { if (Array.isArray(a)) { return a.filter((val, i) => a.indexOf(val) === i).length; @@ -28,3 +26,4 @@ function unique(a) { } unique.skipNumberValidation = true; +module.exports = { unique }; diff --git a/packages/kbn-tinymath/test/functions/comparison/eq.test.js b/packages/kbn-tinymath/test/functions/comparison/eq.test.js new file mode 100644 index 0000000000000..eb84479a3708a --- /dev/null +++ b/packages/kbn-tinymath/test/functions/comparison/eq.test.js @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +const { eq } = require('../../../src/functions/comparison/eq'); + +describe('Eq', () => { + it('numbers', () => { + expect(eq(-10, -10)).toBeTruthy(); + expect(eq(10, 10)).toBeTruthy(); + expect(eq(0, 0)).toBeTruthy(); + }); + + it('arrays', () => { + // Should pass + expect(eq([-1], -1)).toBeTruthy(); + expect(eq([-1], [-1])).toBeTruthy(); + expect(eq([-1, -1], -1)).toBeTruthy(); + expect(eq([-1, -1], [-1, -1])).toBeTruthy(); + + // Should not pass + expect(eq([-1], 0)).toBeFalsy(); + expect(eq([-1], [0])).toBeFalsy(); + expect(eq([-1, -1], 0)).toBeFalsy(); + expect(eq([-1, -1], [0, 0])).toBeFalsy(); + expect(eq([-1, -1], [-1, 0])).toBeFalsy(); + }); + + it('missing args', () => { + expect(() => eq()).toThrow(); + expect(() => eq(-10)).toThrow(); + expect(() => eq([])).toThrow(); + }); + + it('empty arrays', () => { + expect(eq([], [])).toBeTruthy(); + }); +}); diff --git a/packages/kbn-tinymath/test/functions/comparison/gt.test.js b/packages/kbn-tinymath/test/functions/comparison/gt.test.js new file mode 100644 index 0000000000000..a6a7173d35043 --- /dev/null +++ b/packages/kbn-tinymath/test/functions/comparison/gt.test.js @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +const { gt } = require('../../../src/functions/comparison/gt'); + +describe('Gt', () => { + it('missing args', () => { + expect(() => gt()).toThrow(); + expect(() => gt(-10)).toThrow(); + expect(() => gt([])).toThrow(); + }); + + it('empty arrays', () => { + expect(gt([], [])).toBeTruthy(); + }); + + it('numbers', () => { + expect(gt(-10, -20)).toBeTruthy(); + expect(gt(10, 0)).toBeTruthy(); + expect(gt(0, -1)).toBeTruthy(); + }); + + it('arrays', () => { + // Should pass + expect(gt([-1], -2)).toBeTruthy(); + expect(gt([-1], [-2])).toBeTruthy(); + expect(gt([-1, -1], -2)).toBeTruthy(); + expect(gt([-1, -1], [-2, -2])).toBeTruthy(); + + // Should not pass + expect(gt([-1], 2)).toBeFalsy(); + expect(gt([-1], [2])).toBeFalsy(); + expect(gt([-1, -1], 2)).toBeFalsy(); + expect(gt([-1, -1], [2, 2])).toBeFalsy(); + expect(gt([-1, -1], [-2, 2])).toBeFalsy(); + }); +}); diff --git a/packages/kbn-tinymath/test/functions/comparison/gte.test.js b/packages/kbn-tinymath/test/functions/comparison/gte.test.js new file mode 100644 index 0000000000000..fde1294a5a0fc --- /dev/null +++ b/packages/kbn-tinymath/test/functions/comparison/gte.test.js @@ -0,0 +1,59 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +const { gte } = require('../../../src/functions/comparison/gte'); + +describe('Gte', () => { + it('missing args', () => { + expect(() => gte()).toThrow(); + expect(() => gte(-10)).toThrow(); + expect(() => gte([])).toThrow(); + }); + + it('empty arrays', () => { + expect(gte([], [])).toBeTruthy(); + }); + + describe('eq values', () => { + it('numbers', () => { + expect(gte(-10, -10)).toBeTruthy(); + expect(gte(10, 10)).toBeTruthy(); + expect(gte(0, 0)).toBeTruthy(); + }); + + it('arrays', () => { + expect(gte([-1], -1)).toBeTruthy(); + expect(gte([-1], [-1])).toBeTruthy(); + expect(gte([-1, -1], -1)).toBeTruthy(); + expect(gte([-1, -1], [-1, -1])).toBeTruthy(); + }); + }); + + describe('gt values', () => { + it('numbers', () => { + expect(gte(-10, -20)).toBeTruthy(); + expect(gte(10, 0)).toBeTruthy(); + expect(gte(0, -1)).toBeTruthy(); + }); + + it('arrays', () => { + // Should pass + expect(gte([-1], -2)).toBeTruthy(); + expect(gte([-1], [-2])).toBeTruthy(); + expect(gte([-1, -1], -2)).toBeTruthy(); + expect(gte([-1, -1], [-2, -2])).toBeTruthy(); + + // Should not pass + expect(gte([-1], 2)).toBeFalsy(); + expect(gte([-1], [2])).toBeFalsy(); + expect(gte([-1, -1], 2)).toBeFalsy(); + expect(gte([-1, -1], [2, 2])).toBeFalsy(); + expect(gte([-1, -1], [-2, 2])).toBeFalsy(); + }); + }); +}); diff --git a/packages/kbn-tinymath/test/functions/comparison/ifelse.test.js b/packages/kbn-tinymath/test/functions/comparison/ifelse.test.js new file mode 100644 index 0000000000000..efd098e26292a --- /dev/null +++ b/packages/kbn-tinymath/test/functions/comparison/ifelse.test.js @@ -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 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. + */ + +const { ifelse } = require('../../../src/functions/comparison/ifelse'); + +describe('Ifelse', () => { + it('should basically work', () => { + expect(ifelse(true, 1, 0)).toEqual(1); + expect(ifelse(false, 1, 0)).toEqual(0); + expect(ifelse(1 > 0, 1, 0)).toEqual(1); + expect(ifelse(1 < 0, 1, 0)).toEqual(0); + }); + + it('should throw if cond is not of boolean type', () => { + expect(() => ifelse(5, 1, 0)).toThrow('Condition clause is of the wrong type'); + expect(() => ifelse(null, 1, 0)).toThrow('Condition clause is of the wrong type'); + expect(() => ifelse(undefined, 1, 0)).toThrow('Condition clause is of the wrong type'); + expect(() => ifelse(0, 1, 0)).toThrow('Condition clause is of the wrong type'); + }); + + it('missing args', () => { + expect(() => ifelse()).toThrow(); + expect(() => ifelse(-10)).toThrow(); + expect(() => ifelse([])).toThrow(); + expect(() => ifelse(true)).toThrow(); + expect(() => ifelse(true, 1)).toThrow(); + }); +}); diff --git a/packages/kbn-tinymath/test/functions/comparison/lt.test.js b/packages/kbn-tinymath/test/functions/comparison/lt.test.js new file mode 100644 index 0000000000000..cbd56a4ac674e --- /dev/null +++ b/packages/kbn-tinymath/test/functions/comparison/lt.test.js @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +const { lt } = require('../../../src/functions/comparison/lt'); + +describe('Lt', () => { + it('missing args', () => { + expect(() => lt()).toThrow(); + expect(() => lt(-10)).toThrow(); + expect(() => lt([])).toThrow(); + }); + + it('empty arrays', () => { + expect(lt([], [])).toBeTruthy(); + }); + + it('numbers', () => { + expect(lt(-10, -2)).toBeTruthy(); + expect(lt(10, 20)).toBeTruthy(); + expect(lt(0, 1)).toBeTruthy(); + }); + + it('arrays', () => { + // Should pass + expect(lt([-1], 0)).toBeTruthy(); + expect(lt([-1], [0])).toBeTruthy(); + expect(lt([-1, -1], 0)).toBeTruthy(); + expect(lt([-1, -1], [0, 0])).toBeTruthy(); + + // Should not pass + expect(lt([-1], -2)).toBeFalsy(); + expect(lt([-1], [-2])).toBeFalsy(); + expect(lt([-1, -1], -2)).toBeFalsy(); + expect(lt([-1, -1], [-2, -2])).toBeFalsy(); + expect(lt([-1, -1], [-2, 2])).toBeFalsy(); + }); +}); diff --git a/packages/kbn-tinymath/test/functions/comparison/lte.test.js b/packages/kbn-tinymath/test/functions/comparison/lte.test.js new file mode 100644 index 0000000000000..5c6f4a4b5eaa7 --- /dev/null +++ b/packages/kbn-tinymath/test/functions/comparison/lte.test.js @@ -0,0 +1,59 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +const { lte } = require('../../../src/functions/comparison/lte'); + +describe('Lte', () => { + it('missing args', () => { + expect(() => lte()).toThrow(); + expect(() => lte(-10)).toThrow(); + expect(() => lte([])).toThrow(); + }); + + it('empty arrays', () => { + expect(lte([], [])).toBeTruthy(); + }); + + describe('eq values', () => { + it('numbers', () => { + expect(lte(-10, -10)).toBeTruthy(); + expect(lte(10, 10)).toBeTruthy(); + expect(lte(0, 0)).toBeTruthy(); + }); + + it('arrays', () => { + expect(lte([-1], -1)).toBeTruthy(); + expect(lte([-1], [-1])).toBeTruthy(); + expect(lte([-1, -1], -1)).toBeTruthy(); + expect(lte([-1, -1], [-1, -1])).toBeTruthy(); + }); + }); + + describe('lt values', () => { + it('numbers', () => { + expect(lte(-10, -2)).toBeTruthy(); + expect(lte(10, 20)).toBeTruthy(); + expect(lte(0, 1)).toBeTruthy(); + }); + + it('arrays', () => { + // Should pass + expect(lte([-1], 0)).toBeTruthy(); + expect(lte([-1], [0])).toBeTruthy(); + expect(lte([-1, -1], 0)).toBeTruthy(); + expect(lte([-1, -1], [0, 0])).toBeTruthy(); + + // Should not pass + expect(lte([-1], -2)).toBeFalsy(); + expect(lte([-1], [-2])).toBeFalsy(); + expect(lte([-1, -1], -2)).toBeFalsy(); + expect(lte([-1, -1], [-2, -2])).toBeFalsy(); + expect(lte([-1, -1], [-2, 2])).toBeFalsy(); + }); + }); +}); diff --git a/packages/kbn-tinymath/test/functions/divide.test.js b/packages/kbn-tinymath/test/functions/divide.test.js index 00af7b1430e58..85851e78df8dd 100644 --- a/packages/kbn-tinymath/test/functions/divide.test.js +++ b/packages/kbn-tinymath/test/functions/divide.test.js @@ -29,4 +29,11 @@ describe('Divide', () => { it('array length mismatch', () => { expect(() => divide([1, 2], [3])).toThrow('Array length mismatch'); }); + + it('divide by 0', () => { + expect(() => divide([1, 2], 0)).toThrow('Cannot divide by 0'); + expect(() => divide(1, 0)).toThrow('Cannot divide by 0'); + expect(() => divide([1, 2], [0, 0])).toThrow('Cannot divide by 0'); + expect(() => divide(1, [1, 0])).toThrow('Cannot divide by 0'); + }); }); diff --git a/packages/kbn-tinymath/test/library.test.js b/packages/kbn-tinymath/test/library.test.js index 9d87919c4f1ac..054d78fc60adb 100644 --- a/packages/kbn-tinymath/test/library.test.js +++ b/packages/kbn-tinymath/test/library.test.js @@ -68,6 +68,91 @@ describe('Parser', () => { location: { min: 0, max: 13 }, }); }); + + describe('Comparison', () => { + it('should throw for non valid comparison symbols', () => { + const symbols = ['<>', '><', '===', '>>', '<<']; + for (const symbol of symbols) { + expect(() => parse(`5 ${symbol} 1`)).toThrow(); + } + }); + describe.each` + symbol | fn + ${'<'} | ${'lt'} + ${'>'} | ${'gt'} + ${'=='} | ${'eq'} + ${'>='} | ${'gte'} + ${'<='} | ${'lte'} + `('Symbol "$symbol" ( $fn )', ({ symbol, fn }) => { + it(`should parse comparison symbol: "$symbol"`, () => { + expect(parse(`5 ${symbol} 1`)).toEqual({ + name: fn, + type: 'function', + args: [5, 1], + text: `5 ${symbol} 1`, + location: { min: 0, max: 4 + symbol.length }, + }); + expect(parse(`a ${symbol} b`)).toEqual({ + name: fn, + type: 'function', + args: [variableEqual('a'), variableEqual('b')], + text: `a ${symbol} b`, + location: { min: 0, max: 4 + symbol.length }, + }); + }); + + it.each` + expression + ${`1 + (1 ${symbol} 1)`} + ${`(1 ${symbol} 1) + 1`} + ${`((1 ${symbol} 1) + 1)`} + ${`((1 ${symbol} 1) + (1 ${symbol} 1))`} + ${`((1 ${symbol} 1) + ( ${symbol} 1))`} + ${` ${symbol} 1`} + ${`1 ${symbol} `} + ${`a + (b ${symbol} c)`} + ${`(a ${symbol} b) + c`} + ${`((a ${symbol} b) + c)`} + ${`((a ${symbol} b) + (c ${symbol} d))`} + ${`((a ${symbol} b) + ( ${symbol} c))`} + ${` ${symbol} a`} + ${`a ${symbol} `} + `( + 'should throw for invalid expression with comparison arguments: $expression', + ({ expression }) => { + expect(() => parse(expression)).toThrow(); + } + ); + + it.each` + expression + ${`1 ${symbol} 1 ${symbol} 1`} + ${`(1 ${symbol} 1) ${symbol} 1`} + ${`1 ${symbol} (1 ${symbol} 1)`} + ${`a ${symbol} b ${symbol} c`} + ${`(a ${symbol} b) ${symbol} c`} + ${`a ${symbol} (b ${symbol} c)`} + `('should throw for cascading comparison operators: $expression', ({ expression }) => { + expect(() => parse(expression)).toThrow(); + }); + + it.each` + expression + ${`1 ${symbol} 1`} + ${`(1 ${symbol} 1)`} + ${`((1 ${symbol} 1))`} + ${`((1 + 1) ${symbol} 1)`} + ${`1 + 1 ${symbol} 1 * 1`} + ${`a ${symbol} b`} + ${`(a ${symbol} b)`} + ${`((a ${symbol} b))`} + ${`((a + b) ${symbol} c)`} + ${`a + b ${symbol} c * d`} + `('should parse comparison expressions: $expression', ({ expression }) => { + expect(() => parse(expression)).not.toThrow(); + }); + }); + }); }); describe('Variables', () => { diff --git a/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts b/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts index e7d02da09889d..f6591cf7a7759 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts @@ -62,11 +62,11 @@ describe('checking migration metadata changes on all registered SO types', () => "app_search_telemetry": "7fc4fc08852bf0924ee29942bb394fda9aa8954d", "application_usage_daily": "6e645e0b60ef3af2e8fde80963c2a4f09a190d61", "application_usage_totals": "b2af3577dcd50bfae492b166a7804f69e2cc41dc", - "canvas-element": "5f32b99ba6ff9c1f17cc093591b975be65a27b9b", - "canvas-workpad": "b60252414fb6159a14f9febf98dbe41e5a8bf199", - "canvas-workpad-template": "c371cad0a8d61385f4782cab9a9063d3cf241ee0", + "canvas-element": "c27505dcf2970760bea8a0fe1d000253f0c40f08", + "canvas-workpad": "eb7b28a3b1c24af615edbf29becddf2e750a4bb5", + "canvas-workpad-template": "34454b811e32993eaa55c6ec85a7aecca00c4cfc", "cases": "7ff5ce930146a2d6fc8fbf536ce2ee16e9df296f", - "cases-comments": "8cfbad4ede637305eb6fb79db680f03dc0ce5ec4", + "cases-comments": "d7c4c1d24e97620cd415e27e5eb7d5b5f2c5b461", "cases-configure": "1afc414f5563a36e4612fa269193d3ed7277c7bd", "cases-connector-mappings": "4b16d440af966e5d6e0fa33368bfa15d987a4b69", "cases-telemetry": "16e261e7378a72acd0806f18df92525dd1da4f37", @@ -76,7 +76,7 @@ describe('checking migration metadata changes on all registered SO types', () => "core-usage-stats": "f40a213da2c597b0de94e364a4326a5a1baa4ca9", "csp-rule-template": "3679c5f2431da8153878db79c78a4e695357fb61", "csp_rule": "d2bb53ea5d2bdfba1a835ad8956dfcd2b2c32e19", - "dashboard": "0b0842b6aa40c125d64233fd81cee11080580dc2", + "dashboard": "742f2d9f110709fd8599b14f7766f38efc30de61", "endpoint:user-artifact": "f94c250a52b30d0a2d32635f8b4c5bdabd1e25c0", "endpoint:user-artifact-manifest": "8c14d49a385d5d1307d956aa743ec78de0b2be88", "enterprise_search_telemetry": "fafcc8318528d34f721c42d1270787c52565bad5", @@ -103,7 +103,7 @@ describe('checking migration metadata changes on all registered SO types', () => "inventory-view": "bc2bd1e7ec7c186159447ab228d269f22bd39056", "kql-telemetry": "29544cd7d3b767c5399878efae6bd724d24c03fd", "legacy-url-alias": "7172dfd54f2e0c89fe263fd7095519b2d826a930", - "lens": "08769c789ad6d1b8a4d0cffebc9d9bb08bf01ad9", + "lens": "236ecd358ed3a4ecfc03ed676d958b64acf0b697", "lens-ui-telemetry": "df2844565c9e18fed2bdb1f6cc3aadd58cf1e45b", "map": "00ca6c4cf46ae59f70f1436262eb9f457b45eb14", "maps-telemetry": "5adbde35bd50ec2b8e9ea5b96d4d9f886e31ecfb", diff --git a/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker b/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker index 9a73f1f295492..e0a9171e52169 100755 --- a/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker +++ b/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker @@ -41,6 +41,9 @@ kibana_vars=( csp.report_to data.autocomplete.valueSuggestions.terminateAfter data.autocomplete.valueSuggestions.timeout + data.search.asyncSearch.waitForCompletion + data.search.asyncSearch.keepAlive + data.search.asyncSearch.batchedReduceSize data.search.sessions.defaultExpiration data.search.sessions.enabled data.search.sessions.maxUpdateRetries diff --git a/src/plugins/chart_expressions/expression_gauge/common/expression_functions/__snapshots__/gauge_function.test.ts.snap b/src/plugins/chart_expressions/expression_gauge/common/expression_functions/__snapshots__/gauge_function.test.ts.snap index bb2fe700f6f19..3a1f13de9c525 100644 --- a/src/plugins/chart_expressions/expression_gauge/common/expression_functions/__snapshots__/gauge_function.test.ts.snap +++ b/src/plugins/chart_expressions/expression_gauge/common/expression_functions/__snapshots__/gauge_function.test.ts.snap @@ -53,6 +53,7 @@ Object { "shape": "arc", "ticksPosition": "auto", }, + "canNavigateToLens": false, "data": Object { "columns": Array [ Object { @@ -105,6 +106,7 @@ Object { "shape": "arc", "ticksPosition": "auto", }, + "canNavigateToLens": false, "data": Object { "columns": Array [ Object { @@ -155,6 +157,7 @@ Object { "shape": "horizontalBullet", "ticksPosition": "auto", }, + "canNavigateToLens": false, "data": Object { "columns": Array [ Object { @@ -205,6 +208,7 @@ Object { "shape": "horizontalBullet", "ticksPosition": "auto", }, + "canNavigateToLens": false, "data": Object { "columns": Array [ Object { @@ -255,6 +259,7 @@ Object { "shape": "horizontalBullet", "ticksPosition": "bands", }, + "canNavigateToLens": false, "data": Object { "columns": Array [ Object { @@ -307,6 +312,7 @@ Object { "shape": "circle", "ticksPosition": "auto", }, + "canNavigateToLens": false, "data": Object { "columns": Array [ Object { @@ -359,6 +365,7 @@ Object { "shape": "circle", "ticksPosition": "auto", }, + "canNavigateToLens": false, "data": Object { "columns": Array [ Object { @@ -409,6 +416,7 @@ Object { "shape": "horizontalBullet", "ticksPosition": "auto", }, + "canNavigateToLens": false, "data": Object { "columns": Array [ Object { @@ -459,6 +467,7 @@ Object { "shape": "horizontalBullet", "ticksPosition": "hidden", }, + "canNavigateToLens": false, "data": Object { "columns": Array [ Object { @@ -509,6 +518,7 @@ Object { "shape": "horizontalBullet", "ticksPosition": "auto", }, + "canNavigateToLens": false, "data": Object { "columns": Array [ Object { @@ -559,6 +569,7 @@ Object { "shape": "horizontalBullet", "ticksPosition": "auto", }, + "canNavigateToLens": false, "data": Object { "columns": Array [ Object { @@ -609,6 +620,7 @@ Object { "shape": "horizontalBullet", "ticksPosition": "auto", }, + "canNavigateToLens": false, "data": Object { "columns": Array [ Object { @@ -659,6 +671,7 @@ Object { "shape": "horizontalBullet", "ticksPosition": "auto", }, + "canNavigateToLens": false, "data": Object { "columns": Array [ Object { @@ -709,6 +722,7 @@ Object { "shape": "verticalBullet", "ticksPosition": "auto", }, + "canNavigateToLens": false, "data": Object { "columns": Array [ Object { diff --git a/src/plugins/chart_expressions/expression_gauge/common/expression_functions/gauge_function.ts b/src/plugins/chart_expressions/expression_gauge/common/expression_functions/gauge_function.ts index 70ecd25839d19..72919e7c9b414 100644 --- a/src/plugins/chart_expressions/expression_gauge/common/expression_functions/gauge_function.ts +++ b/src/plugins/chart_expressions/expression_gauge/common/expression_functions/gauge_function.ts @@ -231,6 +231,7 @@ export const gaugeFunction = (): GaugeExpressionFunctionDefinition => ({ (handlers.variables?.embeddableTitle as string) ?? handlers.getExecutionContext?.()?.description, }, + canNavigateToLens: Boolean(handlers?.variables?.canNavigateToLens), }, }; }, diff --git a/src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts b/src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts index ed1098ea96ad8..a7a89a876d699 100644 --- a/src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts +++ b/src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts @@ -62,6 +62,7 @@ export type GaugeInput = Datatable; export interface GaugeExpressionProps { data: Datatable; args: GaugeArguments; + canNavigateToLens: boolean; } export interface GaugeRender { diff --git a/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.test.tsx b/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.test.tsx index 6588cefdb8f2b..640a8e17b47c7 100644 --- a/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.test.tsx +++ b/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.test.tsx @@ -94,6 +94,7 @@ describe('GaugeComponent', function () { beforeAll(async () => { wrapperProps = { + canNavigateToLens: false, data: createData(), chartsThemeService, args, diff --git a/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx b/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx index bdaa7f878fd6e..2a18a3891a3a6 100644 --- a/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx +++ b/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx @@ -57,9 +57,11 @@ export const gaugeRenderer: ( const visualizationType = extractVisualizationType(executionContext); if (containerType && visualizationType) { - plugins.usageCollection?.reportUiCounter(containerType, METRIC_TYPE.COUNT, [ + const events = [ `render_${visualizationType}_${type}`, - ]); + config.canNavigateToLens ? `render_${visualizationType}_${type}_convertable` : undefined, + ].filter((event): event is string => Boolean(event)); + plugins.usageCollection?.reportUiCounter(containerType, METRIC_TYPE.COUNT, events); } handlers.done(); diff --git a/src/plugins/console/public/application/containers/console_history/console_history.tsx b/src/plugins/console/public/application/containers/console_history/console_history.tsx index dcc19d340ae5d..6918f572ce916 100644 --- a/src/plugins/console/public/application/containers/console_history/console_history.tsx +++ b/src/plugins/console/public/application/containers/console_history/console_history.tsx @@ -188,7 +188,11 @@ export function ConsoleHistory({ close }: Props) { - clear()}> + clear()} + > {i18n.translate('console.historyPage.clearHistoryButtonLabel', { defaultMessage: 'Clear', })} @@ -198,7 +202,11 @@ export function ConsoleHistory({ close }: Props) { - close()}> + close()} + > {i18n.translate('console.historyPage.closehistoryButtonLabel', { defaultMessage: 'Close', })} @@ -207,6 +215,7 @@ export function ConsoleHistory({ close }: Props) { restoreRequestFromHistory(selectedReq.current)} diff --git a/src/plugins/custom_integrations/common/index.ts b/src/plugins/custom_integrations/common/index.ts index e52a5deac59e5..6d2252f3c3d43 100755 --- a/src/plugins/custom_integrations/common/index.ts +++ b/src/plugins/custom_integrations/common/index.ts @@ -51,6 +51,13 @@ export const INTEGRATION_CATEGORY_DISPLAY = { geo: 'Geo', }; +// featured integrations will be brought to the top of the search results for +// a given category. Integrations are displayed in the order of the array. +export const FEATURED_INTEGRATIONS_BY_CATEGORY = { + security: ['endpoint', 'cloud_security_posture', 'network_traffic'], + '': ['apm', 'endpoint', 'web_crawler'], // no category selected +}; + /** * A category applicable to an Integration. */ diff --git a/src/plugins/data/common/search/aggs/agg_type.ts b/src/plugins/data/common/search/aggs/agg_type.ts index 8d01377ddf808..4812ac6f07c5f 100644 --- a/src/plugins/data/common/search/aggs/agg_type.ts +++ b/src/plugins/data/common/search/aggs/agg_type.ts @@ -29,7 +29,8 @@ type PostFlightRequestFn = ( searchSource: ISearchSource, inspectorRequestAdapter?: RequestAdapter, abortSignal?: AbortSignal, - searchSessionId?: string + searchSessionId?: string, + disableShardFailureWarning?: boolean ) => Promise>; export interface AggTypeConfig< diff --git a/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.ts b/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.ts index cc49c896bdfe5..f695dc1b1d399 100644 --- a/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.ts +++ b/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.ts @@ -333,7 +333,8 @@ export const createOtherBucketPostFlightRequest = ( searchSource, inspectorRequestAdapter, abortSignal, - searchSessionId + searchSessionId, + disableShardFailureWarning ) => { if (!resp.aggregations) return resp; const nestedSearchSource = searchSource.createChild(); @@ -347,6 +348,7 @@ export const createOtherBucketPostFlightRequest = ( nestedSearchSource.fetch$({ abortSignal, sessionId: searchSessionId, + disableShardFailureWarning, inspector: { adapter: inspectorRequestAdapter, title: i18n.translate('data.search.aggs.buckets.terms.otherBucketTitle', { diff --git a/src/plugins/data/common/search/search_source/search_source.ts b/src/plugins/data/common/search/search_source/search_source.ts index d6ec49360e95b..497a247668694 100644 --- a/src/plugins/data/common/search/search_source/search_source.ts +++ b/src/plugins/data/common/search/search_source/search_source.ts @@ -511,7 +511,8 @@ export class SearchSource { this, options.inspector?.adapter, options.abortSignal, - options.sessionId + options.sessionId, + options.disableShardFailureWarning ); } } diff --git a/src/plugins/data/config.mock.ts b/src/plugins/data/config.mock.ts new file mode 100644 index 0000000000000..ab1d02cb63b31 --- /dev/null +++ b/src/plugins/data/config.mock.ts @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 moment from 'moment/moment'; +import { SearchConfigSchema, SearchSessionsConfigSchema } from './config'; + +export const getMockSearchConfig = ({ + sessions: { enabled = true, defaultExpiration = moment.duration(7, 'd') } = { + enabled: true, + defaultExpiration: moment.duration(7, 'd'), + }, + asyncSearch: { + waitForCompletion = moment.duration(100, 'ms'), + keepAlive = moment.duration(1, 'm'), + batchedReduceSize = 64, + } = { + waitForCompletion: moment.duration(100, 'ms'), + keepAlive: moment.duration(1, 'm'), + batchedReduceSize: 64, + }, +}: Partial<{ + sessions: Partial; + asyncSearch: Partial; +}>): SearchConfigSchema => + ({ + asyncSearch: { + waitForCompletion, + keepAlive, + batchedReduceSize, + } as SearchConfigSchema['asyncSearch'], + sessions: { + enabled, + defaultExpiration, + } as SearchSessionsConfigSchema, + } as SearchConfigSchema); diff --git a/src/plugins/data/config.ts b/src/plugins/data/config.ts index d4331ecd760b4..05d52b4e127b3 100644 --- a/src/plugins/data/config.ts +++ b/src/plugins/data/config.ts @@ -23,7 +23,7 @@ export const searchSessionsConfigSchema = schema.object({ /** * maxUpdateRetries controls how many retries we perform while attempting to save a search session */ - maxUpdateRetries: schema.number({ defaultValue: 3 }), + maxUpdateRetries: schema.number({ defaultValue: 10 }), /** * defaultExpiration controls how long search sessions are valid for, until they are expired. @@ -46,20 +46,29 @@ export const searchSessionsConfigSchema = schema.object({ }), }); -export const configSchema = schema.object({ - search: schema.object({ - aggs: schema.object({ - shardDelay: schema.object({ - // Whether or not to register the shard_delay (which is only available in snapshot versions - // of Elasticsearch) agg type/expression function to make it available in the UI for either - // functional or manual testing - enabled: schema.boolean({ defaultValue: false }), - }), +export const searchConfigSchema = schema.object({ + asyncSearch: schema.object({ + waitForCompletion: schema.duration({ defaultValue: '100ms' }), + keepAlive: schema.duration({ defaultValue: '1m' }), + batchedReduceSize: schema.number({ defaultValue: 64 }), + }), + aggs: schema.object({ + shardDelay: schema.object({ + // Whether or not to register the shard_delay (which is only available in snapshot versions + // of Elasticsearch) agg type/expression function to make it available in the UI for either + // functional or manual testing + enabled: schema.boolean({ defaultValue: false }), }), - sessions: searchSessionsConfigSchema, }), + sessions: searchSessionsConfigSchema, +}); + +export const configSchema = schema.object({ + search: searchConfigSchema, }); export type ConfigSchema = TypeOf; +export type SearchConfigSchema = TypeOf; + export type SearchSessionsConfigSchema = TypeOf; diff --git a/src/plugins/data/server/search/collectors/search/usage.ts b/src/plugins/data/server/search/collectors/search/usage.ts index c3e09257a4628..fb2a9acc37009 100644 --- a/src/plugins/data/server/search/collectors/search/usage.ts +++ b/src/plugins/data/server/search/collectors/search/usage.ts @@ -87,11 +87,11 @@ export function searchUsageObserver( return { next(response: IEsSearchResponse) { if (isRestore || !isCompleteResponse(response)) return; - logger.debug(`trackSearchStatus:next ${response.rawResponse.took}`); + logger.debug(`trackSearchStatus:success, took:${response.rawResponse.took}`); usage?.trackSuccess(response.rawResponse.took); }, - error() { - logger.debug(`trackSearchStatus:error`); + error(e: Error) { + logger.debug(`trackSearchStatus:error, ${e}`); usage?.trackError(); }, }; diff --git a/src/plugins/data/server/search/search_service.ts b/src/plugins/data/server/search/search_service.ts index 7523da61752b4..eba7ea22acf4f 100644 --- a/src/plugins/data/server/search/search_service.ts +++ b/src/plugins/data/server/search/search_service.ts @@ -178,6 +178,7 @@ export class SearchService implements Plugin { ENHANCED_ES_SEARCH_STRATEGY, enhancedEsSearchStrategyProvider( this.initializerContext.config.legacy.globalConfig$, + this.initializerContext.config.get().search, this.logger, usage ) @@ -189,13 +190,20 @@ export class SearchService implements Plugin { // for example use case this.searchAsInternalUser = enhancedEsSearchStrategyProvider( this.initializerContext.config.legacy.globalConfig$, + this.initializerContext.config.get().search, this.logger, usage, true ); - this.registerSearchStrategy(EQL_SEARCH_STRATEGY, eqlSearchStrategyProvider(this.logger)); - this.registerSearchStrategy(SQL_SEARCH_STRATEGY, sqlSearchStrategyProvider(this.logger)); + this.registerSearchStrategy( + EQL_SEARCH_STRATEGY, + eqlSearchStrategyProvider(this.initializerContext.config.get().search, this.logger) + ); + this.registerSearchStrategy( + SQL_SEARCH_STRATEGY, + sqlSearchStrategyProvider(this.initializerContext.config.get().search, this.logger) + ); registerBsearchRoute( bfetch, diff --git a/src/plugins/data/server/search/session/session_service.test.ts b/src/plugins/data/server/search/session/session_service.test.ts index b44b9a08b8d38..36b5d16e68a78 100644 --- a/src/plugins/data/server/search/session/session_service.test.ts +++ b/src/plugins/data/server/search/session/session_service.test.ts @@ -187,43 +187,12 @@ describe('SearchSessionService', () => { ).rejects.toMatchInlineSnapshot(`[Error: locatorId is required]`); }); - it('saving updates an existing saved object and persists it', async () => { - const mockUpdateSavedObject = { - ...mockSavedObject, - attributes: {}, - }; - savedObjectsClient.get.mockResolvedValue(mockSavedObject); - savedObjectsClient.update.mockResolvedValue(mockUpdateSavedObject); - - await service.save({ savedObjectsClient }, mockUser1, sessionId, { - name: 'banana', - appId: 'nanana', - locatorId: 'panama', - }); - - expect(savedObjectsClient.update).toHaveBeenCalled(); - expect(savedObjectsClient.create).not.toHaveBeenCalled(); - - const [type, id, callAttributes] = savedObjectsClient.update.mock.calls[0]; - expect(type).toBe(SEARCH_SESSION_TYPE); - expect(id).toBe(sessionId); - expect(callAttributes).not.toHaveProperty('idMapping'); - expect(callAttributes).toHaveProperty('name', 'banana'); - expect(callAttributes).toHaveProperty('appId', 'nanana'); - expect(callAttributes).toHaveProperty('locatorId', 'panama'); - expect(callAttributes).toHaveProperty('initialState', {}); - expect(callAttributes).toHaveProperty('restoreState', {}); - }); - - it('saving creates a new persisted saved object, if it did not exist', async () => { + it('saving creates a new persisted saved object', async () => { const mockCreatedSavedObject = { ...mockSavedObject, attributes: {}, }; - savedObjectsClient.update.mockRejectedValue( - SavedObjectsErrorHelpers.createGenericNotFoundError(sessionId) - ); savedObjectsClient.create.mockResolvedValue(mockCreatedSavedObject); await service.save({ savedObjectsClient }, mockUser1, sessionId, { @@ -232,7 +201,7 @@ describe('SearchSessionService', () => { locatorId: 'panama', }); - expect(savedObjectsClient.update).toHaveBeenCalledTimes(1); + expect(savedObjectsClient.update).toHaveBeenCalledTimes(0); expect(savedObjectsClient.create).toHaveBeenCalledTimes(1); const [type, callAttributes, options] = savedObjectsClient.create.mock.calls[0]; @@ -738,147 +707,19 @@ describe('SearchSessionService', () => { }); }); - it('retries updating the saved object if there was a ES conflict 409', async () => { + it('passes retryOnConflict param to es', async () => { const searchRequest = { params: {} }; const searchId = 'FnpFYlBpeXdCUTMyZXhCLTc1TWFKX0EbdDFDTzJzTE1Sck9PVTBIcW1iU05CZzo4MDA0'; - const mockUpdateSavedObject = { - ...mockSavedObject, - attributes: {}, - }; - - let counter = 0; - - savedObjectsClient.update.mockImplementation(() => { - return new Promise((resolve, reject) => { - if (counter === 0) { - counter++; - reject(SavedObjectsErrorHelpers.createConflictError(SEARCH_SESSION_TYPE, searchId)); - } else { - resolve(mockUpdateSavedObject); - } - }); - }); - - await service.trackId({ savedObjectsClient }, mockUser1, searchRequest, searchId, { - sessionId, - strategy: MOCK_STRATEGY, - }); - - expect(savedObjectsClient.update).toHaveBeenCalledTimes(2); - expect(savedObjectsClient.create).not.toHaveBeenCalled(); - }); - - it('retries updating the saved object if theres a ES conflict 409, but stops after MAX_RETRIES times', async () => { - const searchRequest = { params: {} }; - const searchId = 'FnpFYlBpeXdCUTMyZXhCLTc1TWFKX0EbdDFDTzJzTE1Sck9PVTBIcW1iU05CZzo4MDA0'; - - savedObjectsClient.update.mockImplementation(() => { - return new Promise((resolve, reject) => { - reject(SavedObjectsErrorHelpers.createConflictError(SEARCH_SESSION_TYPE, searchId)); - }); - }); - - await service.trackId({ savedObjectsClient }, mockUser1, searchRequest, searchId, { - sessionId, - strategy: MOCK_STRATEGY, - }); - - // Track ID doesn't throw errors even in cases of failure! - expect(savedObjectsClient.update).toHaveBeenCalledTimes(MAX_UPDATE_RETRIES); - expect(savedObjectsClient.create).not.toHaveBeenCalled(); - }); - - it('creates the saved object in non persisted state, if search session doesnt exists', async () => { - const searchRequest = { params: {} }; - const requestHash = createRequestHash(searchRequest.params); - const searchId = 'FnpFYlBpeXdCUTMyZXhCLTc1TWFKX0EbdDFDTzJzTE1Sck9PVTBIcW1iU05CZzo4MDA0'; - - const mockCreatedSavedObject = { - ...mockSavedObject, - attributes: {}, - }; - - savedObjectsClient.update.mockRejectedValue( - SavedObjectsErrorHelpers.createGenericNotFoundError(sessionId) - ); - savedObjectsClient.create.mockResolvedValue(mockCreatedSavedObject); - await service.trackId({ savedObjectsClient }, mockUser1, searchRequest, searchId, { sessionId, strategy: MOCK_STRATEGY, }); expect(savedObjectsClient.update).toHaveBeenCalled(); - expect(savedObjectsClient.create).toHaveBeenCalled(); - - const [type, callAttributes, options] = savedObjectsClient.create.mock.calls[0]; - expect(type).toBe(SEARCH_SESSION_TYPE); - expect(options).toStrictEqual({ id: sessionId }); - expect(callAttributes).toHaveProperty('idMapping', { - [requestHash]: { - id: searchId, - strategy: MOCK_STRATEGY, - }, - }); - expect(callAttributes).toHaveProperty('expires'); - expect(callAttributes).toHaveProperty('created'); - expect(callAttributes).toHaveProperty('sessionId', sessionId); - }); - - it('retries updating if update returned 404 and then update returned conflict 409 (first create race condition)', async () => { - const searchRequest = { params: {} }; - const searchId = 'FnpFYlBpeXdCUTMyZXhCLTc1TWFKX0EbdDFDTzJzTE1Sck9PVTBIcW1iU05CZzo4MDA0'; - - const mockUpdateSavedObject = { - ...mockSavedObject, - attributes: {}, - }; - - let counter = 0; - - savedObjectsClient.update.mockImplementation(() => { - return new Promise((resolve, reject) => { - if (counter === 0) { - counter++; - reject(SavedObjectsErrorHelpers.createGenericNotFoundError(sessionId)); - } else { - resolve(mockUpdateSavedObject); - } - }); - }); - - savedObjectsClient.create.mockRejectedValue( - SavedObjectsErrorHelpers.createConflictError(SEARCH_SESSION_TYPE, searchId) - ); - - await service.trackId({ savedObjectsClient }, mockUser1, searchRequest, searchId, { - sessionId, - strategy: MOCK_STRATEGY, - }); - - expect(savedObjectsClient.update).toHaveBeenCalledTimes(2); - expect(savedObjectsClient.create).toHaveBeenCalledTimes(1); - }); - - it('retries everything at most MAX_RETRIES times', async () => { - const searchRequest = { params: {} }; - const searchId = 'FnpFYlBpeXdCUTMyZXhCLTc1TWFKX0EbdDFDTzJzTE1Sck9PVTBIcW1iU05CZzo4MDA0'; - - savedObjectsClient.update.mockRejectedValue( - SavedObjectsErrorHelpers.createGenericNotFoundError(sessionId) - ); - savedObjectsClient.create.mockRejectedValue( - SavedObjectsErrorHelpers.createConflictError(SEARCH_SESSION_TYPE, searchId) - ); - - await service.trackId({ savedObjectsClient }, mockUser1, searchRequest, searchId, { - sessionId, - strategy: MOCK_STRATEGY, - }); - expect(savedObjectsClient.update).toHaveBeenCalledTimes(MAX_UPDATE_RETRIES); - expect(savedObjectsClient.create).toHaveBeenCalledTimes(MAX_UPDATE_RETRIES); + const [, , , opts] = savedObjectsClient.update.mock.calls[0]; + expect(opts).toHaveProperty('retryOnConflict', MAX_UPDATE_RETRIES); }); it('batches updates for the same session', async () => { diff --git a/src/plugins/data/server/search/session/session_service.ts b/src/plugins/data/server/search/session/session_service.ts index d82956d19f73f..d8426c03e91ed 100644 --- a/src/plugins/data/server/search/session/session_service.ts +++ b/src/plugins/data/server/search/session/session_service.ts @@ -7,7 +7,6 @@ */ import { notFound } from '@hapi/boom'; -import { debounce } from 'lodash'; import { fromKueryExpression, nodeBuilder } from '@kbn/es-query'; import { CoreSetup, @@ -16,11 +15,12 @@ import { Logger, SavedObject, SavedObjectsClientContract, - SavedObjectsErrorHelpers, SavedObjectsFindOptions, ElasticsearchClient, } from '@kbn/core/server'; import type { AuthenticatedUser, SecurityPluginSetup } from '@kbn/security-plugin/server'; +import { defer } from '@kbn/kibana-utils-plugin/common'; +import { debounce } from 'lodash'; import { ENHANCED_ES_SEARCH_STRATEGY, IKibanaSearchRequest, @@ -51,24 +51,24 @@ interface SetupDependencies { // eslint-disable-next-line @typescript-eslint/no-empty-interface interface StartDependencies {} -const DEBOUNCE_UPDATE_OR_CREATE_WAIT = 1000; -const DEBOUNCE_UPDATE_OR_CREATE_MAX_WAIT = 5000; - -interface UpdateOrCreateQueueEntry { +/** + * Used to batch requests that add searches into the session saved object + */ +const DEBOUNCE_TRACK_ID_WAIT = 1000; +const DEBOUNCE_TRACK_ID_MAX_WAIT = 5000; +interface TrackIdQueueEntry { deps: SearchSessionDependencies; user: AuthenticatedUser | null; sessionId: string; - attributes: Partial; resolve: () => void; reject: (reason?: unknown) => void; -} -function sleep(ms: number) { - return new Promise((r) => setTimeout(r, ms)); + searchInfo: SearchSessionRequestInfo; + requestHash: string; } + export class SearchSessionService implements ISearchSessionService { private sessionConfig: SearchSessionsConfigSchema; - private readonly updateOrCreateBatchQueue: UpdateOrCreateQueueEntry[] = []; private security?: SecurityPluginSetup; private setupCompleted = false; @@ -93,109 +93,6 @@ export class SearchSessionService implements ISearchSessionService { public stop() {} - private processUpdateOrCreateBatchQueue = debounce( - () => { - const queue = [...this.updateOrCreateBatchQueue]; - if (queue.length === 0) return; - this.updateOrCreateBatchQueue.length = 0; - const batchedSessionAttributes = queue.reduce((res, next) => { - if (!res[next.sessionId]) { - res[next.sessionId] = next.attributes; - } else { - res[next.sessionId] = { - ...res[next.sessionId], - ...next.attributes, - idMapping: { - ...res[next.sessionId].idMapping, - ...next.attributes.idMapping, - }, - }; - } - return res; - }, {} as { [sessionId: string]: Partial }); - - Object.keys(batchedSessionAttributes).forEach((sessionId) => { - const thisSession = queue.filter((s) => s.sessionId === sessionId); - this.updateOrCreate( - thisSession[0].deps, - thisSession[0].user, - sessionId, - batchedSessionAttributes[sessionId] - ) - .then(() => { - thisSession.forEach((s) => s.resolve()); - }) - .catch((e) => { - thisSession.forEach((s) => s.reject(e)); - }); - }); - }, - DEBOUNCE_UPDATE_OR_CREATE_WAIT, - { maxWait: DEBOUNCE_UPDATE_OR_CREATE_MAX_WAIT } - ); - private scheduleUpdateOrCreate = ( - deps: SearchSessionDependencies, - user: AuthenticatedUser | null, - sessionId: string, - attributes: Partial - ): Promise => { - return new Promise((resolve, reject) => { - this.updateOrCreateBatchQueue.push({ deps, user, sessionId, attributes, resolve, reject }); - // TODO: this would be better if we'd debounce per sessionId - this.processUpdateOrCreateBatchQueue(); - }); - }; - - private updateOrCreate = async ( - deps: SearchSessionDependencies, - user: AuthenticatedUser | null, - sessionId: string, - attributes: Partial, - retry: number = 1 - ): Promise | undefined> => { - const retryOnConflict = async (e: any) => { - this.logger.debug(`Conflict error | ${sessionId}`); - // Randomize sleep to spread updates out in case of conflicts - await sleep(100 + Math.random() * 50); - return await this.updateOrCreate(deps, user, sessionId, attributes, retry + 1); - }; - - this.logger.debug(`updateOrCreate | ${sessionId} | ${retry}`); - try { - return (await this.update( - deps, - user, - sessionId, - attributes - )) as SavedObject; - } catch (e) { - if (SavedObjectsErrorHelpers.isNotFoundError(e)) { - try { - this.logger.debug(`Object not found | ${sessionId}`); - return await this.create(deps, user, sessionId, attributes); - } catch (createError) { - if ( - SavedObjectsErrorHelpers.isConflictError(createError) && - retry < this.sessionConfig.maxUpdateRetries - ) { - return await retryOnConflict(createError); - } else { - this.logger.error(createError); - } - } - } else if ( - SavedObjectsErrorHelpers.isConflictError(e) && - retry < this.sessionConfig.maxUpdateRetries - ) { - return await retryOnConflict(e); - } else { - this.logger.error(e); - } - } - - return undefined; - }; - public save = async ( deps: SearchSessionDependencies, user: AuthenticatedUser | null, @@ -213,7 +110,7 @@ export class SearchSessionService implements ISearchSessionService { if (!appId) throw new Error('AppId is required'); if (!locatorId) throw new Error('locatorId is required'); - return this.updateOrCreate(deps, user, sessionId, { + return this.create(deps, user, sessionId, { name, appId, locatorId, @@ -228,7 +125,7 @@ export class SearchSessionService implements ISearchSessionService { sessionId: string, attributes: Partial ) => { - this.logger.debug(`create | ${sessionId}`); + this.logger.debug(`SearchSessionService: create | ${sessionId}`); const realmType = user?.authentication_realm.type; const realmName = user?.authentication_realm.name; @@ -310,10 +207,13 @@ export class SearchSessionService implements ISearchSessionService { return { ...findResponse, - statuses: sessionStatuses.reduce((res, status, index) => { - res[findResponse.saved_objects[index].id] = { status }; - return res; - }, {} as Record), + statuses: sessionStatuses.reduce>( + (res, status, index) => { + res[findResponse.saved_objects[index].id] = { status }; + return res; + }, + {} + ), }; }; @@ -323,7 +223,7 @@ export class SearchSessionService implements ISearchSessionService { sessionId: string, attributes: Partial ) => { - this.logger.debug(`update | ${sessionId}`); + this.logger.debug(`SearchSessionService: update | ${sessionId}`); if (!this.sessionConfig.enabled) throw new Error('Search sessions are disabled'); await this.get(deps, user, sessionId); // Verify correct user return deps.savedObjectsClient.update( @@ -331,7 +231,8 @@ export class SearchSessionService implements ISearchSessionService { sessionId, { ...attributes, - } + }, + { retryOnConflict: this.sessionConfig.maxUpdateRetries } ); }; @@ -341,7 +242,7 @@ export class SearchSessionService implements ISearchSessionService { sessionId: string, expires: Date ) { - this.logger.debug(`extend | ${sessionId}`); + this.logger.debug(`SearchSessionService: extend | ${sessionId}`); return this.update(deps, user, sessionId, { expires: expires.toISOString() }); } @@ -350,7 +251,7 @@ export class SearchSessionService implements ISearchSessionService { user: AuthenticatedUser | null, sessionId: string ) => { - this.logger.debug(`cancel | ${sessionId}`); + this.logger.debug(`SearchSessionService: cancel | ${sessionId}`); return this.update(deps, user, sessionId, { isCanceled: true, }); @@ -362,13 +263,25 @@ export class SearchSessionService implements ISearchSessionService { sessionId: string ) => { if (!this.sessionConfig.enabled) throw new Error('Search sessions are disabled'); - this.logger.debug(`delete | ${sessionId}`); + this.logger.debug(`SearchSessionService: delete | ${sessionId}`); await this.get(deps, user, sessionId); // Verify correct user return deps.savedObjectsClient.delete(SEARCH_SESSION_TYPE, sessionId); }; + /** + * Used to batch requests that add searches into the session saved object + * Requests are grouped and executed per sessionId + * @private + */ + private readonly trackIdBatchQueueMap = new Map< + string /* sessionId */, + { queue: TrackIdQueueEntry[]; scheduleProcessQueue: () => void } + >(); + /** * Tracks the given search request/search ID in the saved session. + * Instead of updating search-session saved object immediately, it debounces and batches updates internally, + * to reduce number of saved object updates and reduce a chance of running over update retries limit * @internal */ public trackId = async ( @@ -380,20 +293,63 @@ export class SearchSessionService implements ISearchSessionService { ) => { const { sessionId, strategy = ENHANCED_ES_SEARCH_STRATEGY } = options; if (!this.sessionConfig.enabled || !sessionId || !searchId) return; - this.logger.debug(`trackId | ${sessionId} | ${searchId}`); + if (!searchRequest.params) return; - let idMapping: Record = {}; + const requestHash = createRequestHash(searchRequest.params); - if (searchRequest.params) { - const requestHash = createRequestHash(searchRequest.params); - const searchInfo: SearchSessionRequestInfo = { - id: searchId, - strategy, - }; - idMapping = { [requestHash]: searchInfo }; + this.logger.debug( + `SearchSessionService: trackId | sessionId: "${sessionId}" | searchId:"${searchId}" | requestHash: "${requestHash}"` + ); + + const searchInfo: SearchSessionRequestInfo = { + id: searchId, + strategy, + }; + + if (!this.trackIdBatchQueueMap.has(sessionId)) { + this.trackIdBatchQueueMap.set(sessionId, { + queue: [], + scheduleProcessQueue: debounce( + () => { + const queue = this.trackIdBatchQueueMap.get(sessionId)?.queue ?? []; + if (queue.length === 0) return; + this.trackIdBatchQueueMap.delete(sessionId); + const batchedIdMapping = queue.reduce( + (res, next) => { + res[next.requestHash] = next.searchInfo; + return res; + }, + {} + ); + this.update(queue[0].deps, queue[0].user, sessionId, { idMapping: batchedIdMapping }) + .then(() => { + queue.forEach((q) => q.resolve()); + }) + .catch((e) => { + queue.forEach((q) => q.reject(e)); + }); + }, + DEBOUNCE_TRACK_ID_WAIT, + { maxWait: DEBOUNCE_TRACK_ID_MAX_WAIT } + ), + }); } - await this.scheduleUpdateOrCreate(deps, user, sessionId, { idMapping }); + const deferred = defer(); + const { queue, scheduleProcessQueue } = this.trackIdBatchQueueMap.get(sessionId)!; + queue.push({ + deps, + sessionId, + searchInfo, + requestHash, + resolve: deferred.resolve, + reject: deferred.reject, + user, + }); + + scheduleProcessQueue(); + + return deferred.promise; }; public async getSearchIdMapping( @@ -415,7 +371,7 @@ export class SearchSessionService implements ISearchSessionService { user: AuthenticatedUser | null, sessionId: string ): Promise { - this.logger.debug(`status | ${sessionId}`); + this.logger.debug(`SearchSessionService: status | ${sessionId}`); const session = await this.get(deps, user, sessionId); const sessionStatus = await getSessionStatus( @@ -451,10 +407,15 @@ export class SearchSessionService implements ISearchSessionService { const session = await this.get(deps, user, sessionId); const requestHash = createRequestHash(searchRequest.params); if (!session.attributes.idMapping.hasOwnProperty(requestHash)) { - this.logger.error(`getId | ${sessionId} | ${requestHash} not found`); + this.logger.error(`SearchSessionService: getId | ${sessionId} | ${requestHash} not found`); + this.logger.debug( + `SearchSessionService: getId not found search with params: ${JSON.stringify( + searchRequest.params + )}` + ); throw new NoSearchIdInSessionError(); } - this.logger.debug(`getId | ${sessionId} | ${requestHash}`); + this.logger.debug(`SearchSessionService: getId | ${sessionId} | ${requestHash}`); return session.attributes.idMapping[requestHash].id; }; diff --git a/src/plugins/data/server/search/session/types.ts b/src/plugins/data/server/search/session/types.ts index 76d5f30028736..88ad5f21e2755 100644 --- a/src/plugins/data/server/search/session/types.ts +++ b/src/plugins/data/server/search/session/types.ts @@ -49,7 +49,7 @@ export interface IScopedSearchSessionsClient { expires: Date ) => Promise>; status: (sessionId: string) => Promise; - getConfig: () => SearchSessionsConfigSchema | null; + getConfig: () => SearchSessionsConfigSchema; } export interface ISearchSessionService { diff --git a/src/plugins/data/server/search/strategies/common/async_utils.test.ts b/src/plugins/data/server/search/strategies/common/async_utils.test.ts index 9771a042f1872..f8cabdae04923 100644 --- a/src/plugins/data/server/search/strategies/common/async_utils.test.ts +++ b/src/plugins/data/server/search/strategies/common/async_utils.test.ts @@ -6,42 +6,39 @@ * Side Public License, v 1. */ -import { getCommonDefaultAsyncSubmitParams, getCommonDefaultAsyncGetParams } from './async_utils'; +import { getCommonDefaultAsyncGetParams, getCommonDefaultAsyncSubmitParams } from './async_utils'; import moment from 'moment'; -import { SearchSessionsConfigSchema } from '../../../../config'; - -const getMockSearchSessionsConfig = ({ - enabled = true, - defaultExpiration = moment.duration(7, 'd'), -} = {}) => - ({ - enabled, - defaultExpiration, - } as SearchSessionsConfigSchema); +import { getMockSearchConfig } from '../../../../config.mock'; describe('request utils', () => { describe('getCommonDefaultAsyncSubmitParams', () => { - test('Uses short `keep_alive` if no `sessionId` is provided', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), + test('Uses `keep_alive` from asyncSearch config if no `sessionId` is provided', async () => { + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + }, }); const params = getCommonDefaultAsyncSubmitParams(mockConfig, {}); - expect(params).toHaveProperty('keep_alive', '1m'); + expect(params).toHaveProperty('keep_alive', '60000ms'); }); test('Uses short `keep_alive` if sessions enabled but no yet saved', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + }, }); const params = getCommonDefaultAsyncSubmitParams(mockConfig, { sessionId: 'foo', }); - expect(params).toHaveProperty('keep_alive', '1m'); + expect(params).toHaveProperty('keep_alive', '60000ms'); }); test('Uses `keep_alive` from config if sessions enabled and session is saved', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + }, }); const params = getCommonDefaultAsyncSubmitParams(mockConfig, { sessionId: 'foo', @@ -50,29 +47,33 @@ describe('request utils', () => { expect(params).toHaveProperty('keep_alive', '259200000ms'); }); - test('Uses `keepAlive` of `1m` if disabled', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: false, + test('Uses `keepAlive` from asyncSearch config if sessions disabled', async () => { + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: false, + }, }); const params = getCommonDefaultAsyncSubmitParams(mockConfig, { sessionId: 'foo', }); - expect(params).toHaveProperty('keep_alive', '1m'); + expect(params).toHaveProperty('keep_alive', '60000ms'); }); - test('Uses `keep_on_completion` if enabled', async () => { - const mockConfig = getMockSearchSessionsConfig({}); + test('Uses `keep_on_completion` if sessions enabled', async () => { + const mockConfig = getMockSearchConfig({}); const params = getCommonDefaultAsyncSubmitParams(mockConfig, { sessionId: 'foo', }); expect(params).toHaveProperty('keep_on_completion', true); }); - test('Does not use `keep_on_completion` if disabled', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: false, + test('Does not use `keep_on_completion` if sessions disabled', async () => { + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: false, + }, }); const params = getCommonDefaultAsyncSubmitParams(mockConfig, { sessionId: 'foo', @@ -83,36 +84,44 @@ describe('request utils', () => { describe('getCommonDefaultAsyncGetParams', () => { test('Uses `wait_for_completion_timeout`', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: true, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, }); const params = getCommonDefaultAsyncGetParams(mockConfig, {}); expect(params).toHaveProperty('wait_for_completion_timeout'); }); test('Uses `keep_alive` if `sessionId` is not provided', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: true, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, }); const params = getCommonDefaultAsyncGetParams(mockConfig, {}); - expect(params).toHaveProperty('keep_alive', '1m'); + expect(params).toHaveProperty('keep_alive', '60000ms'); }); - test('Has short `keep_alive` if `sessionId` is provided', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: true, + test('Has `keep_alive` from asyncSearch config if `sessionId` is provided', async () => { + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, }); const params = getCommonDefaultAsyncGetParams(mockConfig, { sessionId: 'foo' }); - expect(params).toHaveProperty('keep_alive', '1m'); + expect(params).toHaveProperty('keep_alive', '60000ms'); }); test('Has `keep_alive` from config if `sessionId` is provided and session is stored', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: true, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, }); const params = getCommonDefaultAsyncGetParams(mockConfig, { sessionId: 'foo', @@ -122,9 +131,11 @@ describe('request utils', () => { }); test("Don't extend keepAlive if search has already been extended", async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: true, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, }); const params = getCommonDefaultAsyncGetParams(mockConfig, { sessionId: 'foo', @@ -135,9 +146,11 @@ describe('request utils', () => { }); test("Don't extend keepAlive if search is being restored", async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: true, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, }); const params = getCommonDefaultAsyncGetParams(mockConfig, { sessionId: 'foo', @@ -149,12 +162,68 @@ describe('request utils', () => { }); test('Uses `keep_alive` if `sessionId` is provided but sessions disabled', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: false, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: false, + }, }); const params = getCommonDefaultAsyncGetParams(mockConfig, { sessionId: 'foo' }); - expect(params).toHaveProperty('keep_alive', '1m'); + expect(params).toHaveProperty('keep_alive', '60000ms'); + }); + }); + + describe('overrides: force disable sessions', () => { + test('Does not use `keep_on_completion` if sessions disabled through overrides', async () => { + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, + }); + const params = getCommonDefaultAsyncSubmitParams( + mockConfig, + { + sessionId: 'foo', + }, + { disableSearchSessions: true } + ); + expect(params).toHaveProperty('keep_on_completion', false); + }); + + test('Uses `keepAlive` from asyncSearch config if sessions disabled through overrides', async () => { + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, + }); + const params = getCommonDefaultAsyncSubmitParams( + mockConfig, + { + sessionId: 'foo', + }, + { disableSearchSessions: true } + ); + expect(params).toHaveProperty('keep_alive', '60000ms'); + }); + + test('Uses `keep_alive` from asyncSearch config if sessions disabled through overrides and session is saved', async () => { + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, + }); + const params = getCommonDefaultAsyncSubmitParams( + mockConfig, + { + sessionId: 'foo', + isStored: true, + }, + { disableSearchSessions: true } + ); + expect(params).toHaveProperty('keep_alive', '60000ms'); }); }); }); diff --git a/src/plugins/data/server/search/strategies/common/async_utils.ts b/src/plugins/data/server/search/strategies/common/async_utils.ts index c0af68f915bd8..cbc1e1acd3cd0 100644 --- a/src/plugins/data/server/search/strategies/common/async_utils.ts +++ b/src/plugins/data/server/search/strategies/common/async_utils.ts @@ -10,29 +10,35 @@ import { AsyncSearchSubmitRequest, AsyncSearchGetRequest, } from '@elastic/elasticsearch/lib/api/types'; -import { SearchSessionsConfigSchema } from '../../../../config'; import { ISearchOptions } from '../../../../common'; +import { SearchConfigSchema } from '../../../../config'; /** @internal */ export function getCommonDefaultAsyncSubmitParams( - searchSessionsConfig: SearchSessionsConfigSchema | null, - options: ISearchOptions + config: SearchConfigSchema, + options: ISearchOptions, + /** + * Allows to override some of internal logic (e.g. eql / sql searches don't fully support search sessions yet) + */ + overrides?: { + disableSearchSessions?: true; + } ): Pick< AsyncSearchSubmitRequest, 'keep_alive' | 'wait_for_completion_timeout' | 'keep_on_completion' > { - const useSearchSessions = searchSessionsConfig?.enabled && !!options.sessionId; - + const useSearchSessions = + config.sessions.enabled && !!options.sessionId && !overrides?.disableSearchSessions; const keepAlive = useSearchSessions && options.isStored - ? `${searchSessionsConfig!.defaultExpiration.asMilliseconds()}ms` - : '1m'; + ? `${config.sessions.defaultExpiration.asMilliseconds()}ms` + : `${config.asyncSearch.keepAlive.asMilliseconds()}ms`; return { - // Wait up to 100ms for the response to return - wait_for_completion_timeout: '100ms', + // Wait up to the timeout for the response to return + wait_for_completion_timeout: `${config.asyncSearch.waitForCompletion.asMilliseconds()}ms`, // If search sessions are used, store and get an async ID even for short running requests. keep_on_completion: useSearchSessions, // The initial keepalive is as defined in defaultExpiration if search sessions are used or 1m otherwise. @@ -44,24 +50,31 @@ export function getCommonDefaultAsyncSubmitParams( @internal */ export function getCommonDefaultAsyncGetParams( - searchSessionsConfig: SearchSessionsConfigSchema | null, - options: ISearchOptions + config: SearchConfigSchema, + options: ISearchOptions, + /** + * Allows to override some of internal logic (e.g. eql / sql searches don't fully support search sessions yet) + */ + overrides?: { + disableSearchSessions?: true; + } ): Pick { - const useSearchSessions = searchSessionsConfig?.enabled && !!options.sessionId; + const useSearchSessions = + config.sessions.enabled && !!options.sessionId && !overrides?.disableSearchSessions; return { - // Wait up to 100ms for the response to return - wait_for_completion_timeout: '100ms', + // Wait up to the timeout for the response to return + wait_for_completion_timeout: `${config.asyncSearch.waitForCompletion.asMilliseconds()}ms`, ...(useSearchSessions && options.isStored ? // Use session's keep_alive if search belongs to a stored session options.isSearchStored || options.isRestore // if search was already stored and extended, then no need to extend keepAlive ? {} : { - keep_alive: `${searchSessionsConfig!.defaultExpiration.asMilliseconds()}ms`, + keep_alive: `${config.sessions.defaultExpiration.asMilliseconds()}ms`, } : { // We still need to do polling for searches not within the context of a search session or when search session disabled - keep_alive: '1m', + keep_alive: `${config.asyncSearch.keepAlive.asMilliseconds()}ms`, }), }; } diff --git a/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.test.ts b/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.test.ts index 7394f51f861ef..d6015c23058b1 100644 --- a/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.test.ts +++ b/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.test.ts @@ -11,6 +11,7 @@ import { eqlSearchStrategyProvider } from './eql_search_strategy'; import { SearchStrategyDependencies } from '../../types'; import { EqlSearchStrategyRequest } from '../../../../common'; import { firstValueFrom } from 'rxjs'; +import { getMockSearchConfig } from '../../../../config.mock'; const getMockEqlResponse = () => ({ body: { @@ -32,6 +33,7 @@ const getMockEqlResponse = () => ({ describe('EQL search strategy', () => { let mockLogger: Logger; + const mockSearchConfig = getMockSearchConfig({}); beforeEach(() => { mockLogger = { debug: jest.fn() } as unknown as Logger; @@ -39,12 +41,12 @@ describe('EQL search strategy', () => { describe('strategy interface', () => { it('returns a strategy with a `search` function', async () => { - const eqlSearch = await eqlSearchStrategyProvider(mockLogger); + const eqlSearch = await eqlSearchStrategyProvider(mockSearchConfig, mockLogger); expect(typeof eqlSearch.search).toBe('function'); }); it('returns a strategy with a `cancel` function', async () => { - const eqlSearch = await eqlSearchStrategyProvider(mockLogger); + const eqlSearch = await eqlSearchStrategyProvider(mockSearchConfig, mockLogger); expect(typeof eqlSearch.cancel).toBe('function'); }); }); @@ -81,7 +83,7 @@ describe('EQL search strategy', () => { describe('async functionality', () => { it('performs an eql client search with params when no ID is provided', async () => { - const eqlSearch = await eqlSearchStrategyProvider(mockLogger); + const eqlSearch = await eqlSearchStrategyProvider(mockSearchConfig, mockLogger); await eqlSearch.search({ options, params }, {}, mockDeps).toPromise(); const [[request, requestOptions]] = mockEqlSearch.mock.calls; @@ -89,7 +91,7 @@ describe('EQL search strategy', () => { body: { query: 'process where 1 == 1' }, ignore_unavailable: true, index: 'logstash-*', - keep_alive: '1m', + keep_alive: '60000ms', max_concurrent_shard_requests: undefined, wait_for_completion_timeout: '100ms', }); @@ -97,14 +99,14 @@ describe('EQL search strategy', () => { }); it('retrieves the current request if an id is provided', async () => { - const eqlSearch = await eqlSearchStrategyProvider(mockLogger); + const eqlSearch = await eqlSearchStrategyProvider(mockSearchConfig, mockLogger); await eqlSearch.search({ id: 'my-search-id' }, {}, mockDeps).toPromise(); const [[requestParams]] = mockEqlGet.mock.calls; expect(mockEqlSearch).not.toHaveBeenCalled(); expect(requestParams).toEqual({ id: 'my-search-id', - keep_alive: '1m', + keep_alive: '60000ms', wait_for_completion_timeout: '100ms', }); }); @@ -112,7 +114,7 @@ describe('EQL search strategy', () => { it('emits an error if the client throws', async () => { expect.assertions(1); mockEqlSearch.mockReset().mockRejectedValueOnce(new Error('client error')); - const eqlSearch = await eqlSearchStrategyProvider(mockLogger); + const eqlSearch = await eqlSearchStrategyProvider(mockSearchConfig, mockLogger); eqlSearch.search({ options, params }, {}, mockDeps).subscribe( () => {}, (err) => { @@ -124,7 +126,7 @@ describe('EQL search strategy', () => { describe('arguments', () => { it('sends along async search options', async () => { - const eqlSearch = await eqlSearchStrategyProvider(mockLogger); + const eqlSearch = await eqlSearchStrategyProvider(mockSearchConfig, mockLogger); await eqlSearch.search({ options, params }, {}, mockDeps).toPromise(); const [[request]] = mockEqlSearch.mock.calls; @@ -136,7 +138,7 @@ describe('EQL search strategy', () => { }); it('sends along default search parameters', async () => { - const eqlSearch = await eqlSearchStrategyProvider(mockLogger); + const eqlSearch = await eqlSearchStrategyProvider(mockSearchConfig, mockLogger); await eqlSearch.search({ options, params }, {}, mockDeps).toPromise(); const [[request]] = mockEqlSearch.mock.calls; @@ -148,7 +150,7 @@ describe('EQL search strategy', () => { }); it('allows search parameters to be overridden', async () => { - const eqlSearch = await eqlSearchStrategyProvider(mockLogger); + const eqlSearch = await eqlSearchStrategyProvider(mockSearchConfig, mockLogger); await eqlSearch .search( { @@ -174,7 +176,7 @@ describe('EQL search strategy', () => { }); it('allows search options to be overridden', async () => { - const eqlSearch = await eqlSearchStrategyProvider(mockLogger); + const eqlSearch = await eqlSearchStrategyProvider(mockSearchConfig, mockLogger); await eqlSearch .search( { @@ -196,7 +198,7 @@ describe('EQL search strategy', () => { }); it('passes (deprecated) transport options for an existing request', async () => { - const eqlSearch = await eqlSearchStrategyProvider(mockLogger); + const eqlSearch = await eqlSearchStrategyProvider(mockSearchConfig, mockLogger); await eqlSearch .search({ id: 'my-search-id', options: { ignore: [400] } }, {}, mockDeps) .toPromise(); @@ -207,7 +209,7 @@ describe('EQL search strategy', () => { }); it('passes abort signal', async () => { - const eqlSearch = eqlSearchStrategyProvider(mockLogger); + const eqlSearch = eqlSearchStrategyProvider(mockSearchConfig, mockLogger); const eql: EqlSearchStrategyRequest = { id: 'my-search-id' }; const abortController = new AbortController(); await firstValueFrom( @@ -219,7 +221,7 @@ describe('EQL search strategy', () => { }); it('passes transport options for search with id', async () => { - const eqlSearch = eqlSearchStrategyProvider(mockLogger); + const eqlSearch = eqlSearchStrategyProvider(mockSearchConfig, mockLogger); const eql: EqlSearchStrategyRequest = { id: 'my-search-id' }; await firstValueFrom( eqlSearch.search(eql, { transport: { maxResponseSize: 13131313 } }, mockDeps) @@ -234,7 +236,7 @@ describe('EQL search strategy', () => { }); it('passes transport options for search without id', async () => { - const eqlSearch = eqlSearchStrategyProvider(mockLogger); + const eqlSearch = eqlSearchStrategyProvider(mockSearchConfig, mockLogger); const eql: EqlSearchStrategyRequest = { params: { index: 'all' } }; await firstValueFrom(eqlSearch.search(eql, { transport: { ignore: [400] } }, mockDeps)); const [[_params, requestOptions]] = mockEqlSearch.mock.calls; @@ -245,7 +247,7 @@ describe('EQL search strategy', () => { describe('response', () => { it('contains a rawResponse field containing the full search response', async () => { - const eqlSearch = await eqlSearchStrategyProvider(mockLogger); + const eqlSearch = await eqlSearchStrategyProvider(mockSearchConfig, mockLogger); const response = await eqlSearch .search({ id: 'my-search-id', options: { ignore: [400] } }, {}, mockDeps) .toPromise(); diff --git a/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.ts b/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.ts index aab1341f9dbfa..14b5c76c67f46 100644 --- a/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.ts +++ b/src/plugins/data/server/search/strategies/eql_search/eql_search_strategy.ts @@ -9,6 +9,7 @@ import type { TransportResult } from '@elastic/elasticsearch'; import { tap } from 'rxjs/operators'; import type { IScopedClusterClient, Logger } from '@kbn/core/server'; +import { SearchConfigSchema } from '../../../../config'; import { EqlSearchStrategyRequest, EqlSearchStrategyResponse, @@ -23,6 +24,7 @@ import { getIgnoreThrottled } from '../ese_search/request_utils'; import { getCommonDefaultAsyncGetParams } from '../common/async_utils'; export const eqlSearchStrategyProvider = ( + searchConfig: SearchConfigSchema, logger: Logger ): ISearchStrategy => { async function cancelAsyncSearch(id: string, esClient: IScopedClusterClient) { @@ -46,11 +48,15 @@ export const eqlSearchStrategyProvider = ( uiSettingsClient ); const params = id - ? getCommonDefaultAsyncGetParams(null, options) + ? getCommonDefaultAsyncGetParams(searchConfig, options, { + /* disable until full eql support */ disableSearchSessions: true, + }) : { ...(await getIgnoreThrottled(uiSettingsClient)), ...defaultParams, - ...getCommonDefaultAsyncGetParams(null, options), + ...getCommonDefaultAsyncGetParams(searchConfig, options, { + /* disable until full eql support */ disableSearchSessions: true, + }), ...request.params, }; const response = id diff --git a/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.test.ts b/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.test.ts index c2c42f1ff8963..070d07c07c956 100644 --- a/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.test.ts +++ b/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.test.ts @@ -14,6 +14,7 @@ import * as xContentParseException from '../../../../common/search/test_data/x_c import { SearchStrategyDependencies } from '../../types'; import { enhancedEsSearchStrategyProvider } from './ese_search_strategy'; import { createSearchSessionsClientMock } from '../../mocks'; +import { getMockSearchConfig } from '../../../../config.mock'; const mockAsyncResponse = { body: { @@ -74,6 +75,8 @@ describe('ES search strategy', () => { }, }); + const mockSearchConfig = getMockSearchConfig({}); + beforeEach(() => { mockApiCaller.mockClear(); mockGetCaller.mockClear(); @@ -82,7 +85,11 @@ describe('ES search strategy', () => { }); it('returns a strategy with `search and `cancel`', async () => { - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); expect(typeof esSearch.search).toBe('function'); }); @@ -93,7 +100,11 @@ describe('ES search strategy', () => { mockSubmitCaller.mockResolvedValueOnce(mockAsyncResponse); const params = { index: 'logstash-*', body: { query: {} } }; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); await esSearch.search({ params }, {}, mockDeps).toPromise(); @@ -101,14 +112,18 @@ describe('ES search strategy', () => { const request = mockSubmitCaller.mock.calls[0][0]; expect(request.index).toEqual(params.index); expect(request.body).toEqual(params.body); - expect(request).toHaveProperty('keep_alive', '1m'); + expect(request).toHaveProperty('keep_alive', '60000ms'); }); it('makes a GET request to async search with ID', async () => { mockGetCaller.mockResolvedValueOnce(mockAsyncResponse); const params = { index: 'logstash-*', body: { query: {} } }; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); await esSearch.search({ id: 'foo', params }, {}, mockDeps).toPromise(); @@ -116,14 +131,18 @@ describe('ES search strategy', () => { const request = mockGetCaller.mock.calls[0][0]; expect(request.id).toEqual('foo'); expect(request).toHaveProperty('wait_for_completion_timeout'); - expect(request).toHaveProperty('keep_alive', '1m'); + expect(request).toHaveProperty('keep_alive', '60000ms'); }); it('sets transport options on POST requests', async () => { const transportOptions = { maxRetries: 1 }; mockSubmitCaller.mockResolvedValueOnce(mockAsyncResponse); const params = { index: 'logstash-*', body: { query: {} } }; - const esSearch = enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); await firstValueFrom( esSearch.search({ params }, { transport: transportOptions }, mockDeps) @@ -136,7 +155,7 @@ describe('ES search strategy', () => { body: { query: {} }, ignore_unavailable: true, index: 'logstash-*', - keep_alive: '1m', + keep_alive: '60000ms', keep_on_completion: false, max_concurrent_shard_requests: undefined, track_total_hits: true, @@ -149,7 +168,11 @@ describe('ES search strategy', () => { it('sets transport options on GET requests', async () => { mockGetCaller.mockResolvedValueOnce(mockAsyncResponse); const params = { index: 'logstash-*', body: { query: {} } }; - const esSearch = enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); await firstValueFrom( esSearch.search({ id: 'foo', params }, { transport: { maxRetries: 1 } }, mockDeps) @@ -159,7 +182,7 @@ describe('ES search strategy', () => { 1, expect.objectContaining({ id: 'foo', - keep_alive: '1m', + keep_alive: '60000ms', wait_for_completion_timeout: '100ms', }), expect.objectContaining({ maxRetries: 1, meta: true, signal: undefined }) @@ -170,7 +193,11 @@ describe('ES search strategy', () => { mockSubmitCaller.mockResolvedValueOnce(mockAsyncResponse); const params = { index: 'foo-*', body: {} }; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); await esSearch.search({ params }, {}, mockDeps).toPromise(); @@ -184,7 +211,11 @@ describe('ES search strategy', () => { mockApiCaller.mockResolvedValueOnce(mockRollupResponse); const params = { index: 'foo-程', body: {} }; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); await esSearch .search( @@ -209,7 +240,11 @@ describe('ES search strategy', () => { mockSubmitCaller.mockResolvedValueOnce(mockAsyncResponse); const params = { index: 'logstash-*', body: { query: {} } }; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); await esSearch.search({ params }, { sessionId: '1' }, mockDeps).toPromise(); @@ -218,14 +253,18 @@ describe('ES search strategy', () => { expect(request.index).toEqual(params.index); expect(request.body).toEqual(params.body); - expect(request).toHaveProperty('keep_alive', '1m'); + expect(request).toHaveProperty('keep_alive', '60000ms'); }); it('Submit search with session id and session is saved creates a search with long keep_alive', async () => { mockSubmitCaller.mockResolvedValueOnce(mockAsyncResponse); const params = { index: 'logstash-*', body: { query: {} } }; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); await esSearch.search({ params }, { sessionId: '1', isStored: true }, mockDeps).toPromise(); @@ -241,7 +280,11 @@ describe('ES search strategy', () => { mockGetCaller.mockResolvedValueOnce(mockAsyncResponse); const params = { index: 'logstash-*', body: { query: {} } }; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); await esSearch.search({ id: 'foo', params }, { sessionId: '1' }, mockDeps).toPromise(); @@ -249,14 +292,18 @@ describe('ES search strategy', () => { const request = mockGetCaller.mock.calls[0][0]; expect(request.id).toEqual('foo'); expect(request).toHaveProperty('wait_for_completion_timeout'); - expect(request).toHaveProperty('keep_alive', '1m'); + expect(request).toHaveProperty('keep_alive', '60000ms'); }); it('makes a GET request to async search with long keepalive, if session is saved', async () => { mockGetCaller.mockResolvedValueOnce(mockAsyncResponse); const params = { index: 'logstash-*', body: { query: {} } }; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); await esSearch .search({ id: 'foo', params }, { sessionId: '1', isStored: true }, mockDeps) @@ -273,7 +320,11 @@ describe('ES search strategy', () => { mockGetCaller.mockResolvedValueOnce(mockAsyncResponse); const params = { index: 'logstash-*', body: { query: {} } }; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); await esSearch .search( @@ -303,7 +354,11 @@ describe('ES search strategy', () => { mockSubmitCaller.mockRejectedValue(errResponse); const params = { index: 'logstash-*', body: { query: {} } }; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); let err: KbnServerError | undefined; try { @@ -324,7 +379,11 @@ describe('ES search strategy', () => { mockSubmitCaller.mockRejectedValue(errResponse); const params = { index: 'logstash-*', body: { query: {} } }; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); let err: KbnServerError | undefined; try { @@ -345,7 +404,11 @@ describe('ES search strategy', () => { mockDeleteCaller.mockResolvedValueOnce(200); const id = 'some_id'; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); await esSearch.cancel!(id, {}, mockDeps); @@ -365,7 +428,11 @@ describe('ES search strategy', () => { mockDeleteCaller.mockRejectedValue(errResponse); const id = 'some_id'; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); let err: KbnServerError | undefined; try { @@ -388,7 +455,11 @@ describe('ES search strategy', () => { const id = 'some_other_id'; const keepAlive = '1d'; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); await esSearch.extend!(id, keepAlive, {}, mockDeps); @@ -403,7 +474,11 @@ describe('ES search strategy', () => { const id = 'some_other_id'; const keepAlive = '1d'; - const esSearch = await enhancedEsSearchStrategyProvider(mockLegacyConfig$, mockLogger); + const esSearch = await enhancedEsSearchStrategyProvider( + mockLegacyConfig$, + mockSearchConfig, + mockLogger + ); let err: KbnServerError | undefined; try { diff --git a/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.ts b/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.ts index 33234d7c65730..3c9d6a40c58c1 100644 --- a/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.ts +++ b/src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.ts @@ -33,9 +33,11 @@ import { getTotalLoaded, shimHitsTotal, } from '../es_search'; +import { SearchConfigSchema } from '../../../../config'; export const enhancedEsSearchStrategyProvider = ( legacyConfig$: Observable, + searchConfig: SearchConfigSchema, logger: Logger, usage?: SearchUsage, useInternalUser: boolean = false @@ -52,19 +54,15 @@ export const enhancedEsSearchStrategyProvider = ( function asyncSearch( { id, ...request }: IEsSearchRequest, options: IAsyncSearchOptions, - { esClient, uiSettingsClient, searchSessionsClient }: SearchStrategyDependencies + { esClient, uiSettingsClient }: SearchStrategyDependencies ) { const client = useInternalUser ? esClient.asInternalUser : esClient.asCurrentUser; const search = async () => { const params = id - ? getDefaultAsyncGetParams(searchSessionsClient.getConfig(), options) + ? getDefaultAsyncGetParams(searchConfig, options) : { - ...(await getDefaultAsyncSubmitParams( - uiSettingsClient, - searchSessionsClient.getConfig(), - options - )), + ...(await getDefaultAsyncSubmitParams(uiSettingsClient, searchConfig, options)), ...request.params, }; const { body, headers } = id diff --git a/src/plugins/data/server/search/strategies/ese_search/request_utils.test.ts b/src/plugins/data/server/search/strategies/ese_search/request_utils.test.ts index b908a1df4f0ec..e14be555535d3 100644 --- a/src/plugins/data/server/search/strategies/ese_search/request_utils.test.ts +++ b/src/plugins/data/server/search/strategies/ese_search/request_utils.test.ts @@ -14,21 +14,12 @@ import { import { IUiSettingsClient } from '@kbn/core/server'; import { UI_SETTINGS } from '../../../../common'; import moment from 'moment'; -import { SearchSessionsConfigSchema } from '../../../../config'; +import { getMockSearchConfig } from '../../../../config.mock'; const getMockUiSettingsClient = (config: Record) => { return { get: async (key: string) => config[key] } as IUiSettingsClient; }; -const getMockSearchSessionsConfig = ({ - enabled = true, - defaultExpiration = moment.duration(7, 'd'), -} = {}) => - ({ - enabled, - defaultExpiration, - } as SearchSessionsConfigSchema); - describe('request utils', () => { describe('getIgnoreThrottled', () => { test('does not return `ignore_throttled` when `includeFrozen` is `false`', async () => { @@ -53,19 +44,23 @@ describe('request utils', () => { const mockUiSettingsClient = getMockUiSettingsClient({ [UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: false, }); - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + }, }); const params = await getDefaultAsyncSubmitParams(mockUiSettingsClient, mockConfig, {}); - expect(params).toHaveProperty('keep_alive', '1m'); + expect(params).toHaveProperty('keep_alive', '60000ms'); }); test('Uses `keep_alive` from config if enabled and session is stored', async () => { const mockUiSettingsClient = getMockUiSettingsClient({ [UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: false, }); - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + }, }); const params = await getDefaultAsyncSubmitParams(mockUiSettingsClient, mockConfig, { sessionId: 'foo', @@ -78,21 +73,23 @@ describe('request utils', () => { const mockUiSettingsClient = getMockUiSettingsClient({ [UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: false, }); - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: false, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: false, + }, }); const params = await getDefaultAsyncSubmitParams(mockUiSettingsClient, mockConfig, { sessionId: 'foo', }); - expect(params).toHaveProperty('keep_alive', '1m'); + expect(params).toHaveProperty('keep_alive', '60000ms'); }); test('Uses `keep_on_completion` if enabled', async () => { const mockUiSettingsClient = getMockUiSettingsClient({ [UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: false, }); - const mockConfig = getMockSearchSessionsConfig({}); + const mockConfig = getMockSearchConfig({}); const params = await getDefaultAsyncSubmitParams(mockUiSettingsClient, mockConfig, { sessionId: 'foo', }); @@ -103,9 +100,11 @@ describe('request utils', () => { const mockUiSettingsClient = getMockUiSettingsClient({ [UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: false, }); - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: false, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: false, + }, }); const params = await getDefaultAsyncSubmitParams(mockUiSettingsClient, mockConfig, { sessionId: 'foo', @@ -116,27 +115,33 @@ describe('request utils', () => { describe('getDefaultAsyncGetParams', () => { test('Uses `wait_for_completion_timeout`', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: true, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, }); const params = getDefaultAsyncGetParams(mockConfig, {}); expect(params).toHaveProperty('wait_for_completion_timeout'); }); test('Uses `keep_alive` if `sessionId` is not provided', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: true, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, }); const params = getDefaultAsyncGetParams(mockConfig, {}); - expect(params).toHaveProperty('keep_alive', '1m'); + expect(params).toHaveProperty('keep_alive', '60000ms'); }); test('Has no `keep_alive` if `sessionId` is provided and search already stored', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: true, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, }); const params = getDefaultAsyncGetParams(mockConfig, { sessionId: 'foo', @@ -147,12 +152,14 @@ describe('request utils', () => { }); test('Uses `keep_alive` if `sessionId` is provided but sessions disabled', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: false, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: false, + }, }); const params = getDefaultAsyncGetParams(mockConfig, { sessionId: 'foo' }); - expect(params).toHaveProperty('keep_alive', '1m'); + expect(params).toHaveProperty('keep_alive', '60000ms'); }); }); }); diff --git a/src/plugins/data/server/search/strategies/ese_search/request_utils.ts b/src/plugins/data/server/search/strategies/ese_search/request_utils.ts index 07f1c9d1ae9a5..e9bd7a54c0071 100644 --- a/src/plugins/data/server/search/strategies/ese_search/request_utils.ts +++ b/src/plugins/data/server/search/strategies/ese_search/request_utils.ts @@ -11,7 +11,7 @@ import { AsyncSearchGetRequest } from '@elastic/elasticsearch/lib/api/typesWithB import { AsyncSearchSubmitRequest } from '@elastic/elasticsearch/lib/api/types'; import { ISearchOptions, UI_SETTINGS } from '../../../../common'; import { getDefaultSearchParams } from '../es_search'; -import { SearchSessionsConfigSchema } from '../../../../config'; +import { SearchConfigSchema } from '../../../../config'; import { getCommonDefaultAsyncGetParams, getCommonDefaultAsyncSubmitParams, @@ -32,7 +32,7 @@ export async function getIgnoreThrottled( */ export async function getDefaultAsyncSubmitParams( uiSettingsClient: Pick, - searchSessionsConfig: SearchSessionsConfigSchema | null, + searchConfig: SearchConfigSchema, options: ISearchOptions ): Promise< Pick< @@ -49,11 +49,10 @@ export async function getDefaultAsyncSubmitParams( > { return { // TODO: adjust for partial results - batched_reduce_size: 64, - ...getCommonDefaultAsyncSubmitParams(searchSessionsConfig, options), + batched_reduce_size: searchConfig.asyncSearch.batchedReduceSize, + ...getCommonDefaultAsyncSubmitParams(searchConfig, options), ...(await getIgnoreThrottled(uiSettingsClient)), ...(await getDefaultSearchParams(uiSettingsClient)), - // If search sessions are used, set the initial expiration time. }; } @@ -61,10 +60,10 @@ export async function getDefaultAsyncSubmitParams( @internal */ export function getDefaultAsyncGetParams( - searchSessionsConfig: SearchSessionsConfigSchema | null, + searchConfig: SearchConfigSchema, options: ISearchOptions ): Pick { return { - ...getCommonDefaultAsyncGetParams(searchSessionsConfig, options), + ...getCommonDefaultAsyncGetParams(searchConfig, options), }; } diff --git a/src/plugins/data/server/search/strategies/sql_search/request_utils.test.ts b/src/plugins/data/server/search/strategies/sql_search/request_utils.test.ts index d37bcfb0655f8..f21b766db3e1d 100644 --- a/src/plugins/data/server/search/strategies/sql_search/request_utils.test.ts +++ b/src/plugins/data/server/search/strategies/sql_search/request_utils.test.ts @@ -8,30 +8,26 @@ import { getDefaultAsyncSubmitParams, getDefaultAsyncGetParams } from './request_utils'; import moment from 'moment'; -import { SearchSessionsConfigSchema } from '../../../../config'; - -const getMockSearchSessionsConfig = ({ - enabled = true, - defaultExpiration = moment.duration(7, 'd'), -} = {}) => - ({ - enabled, - defaultExpiration, - } as SearchSessionsConfigSchema); +import { getMockSearchConfig } from '../../../../config.mock'; describe('request utils', () => { describe('getDefaultAsyncSubmitParams', () => { test('Uses `keep_alive` from default params if no `sessionId` is provided', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + }, }); const params = getDefaultAsyncSubmitParams(mockConfig, {}); - expect(params).toHaveProperty('keep_alive', '1m'); + expect(params).toHaveProperty('keep_alive', '60000ms'); }); - test('Uses `keep_alive` from config if enabled and session is stored', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), + // unskip when SQL has full session support https://github.com/elastic/kibana/issues/127880 + test.skip('Uses `keep_alive` from config if enabled and session is stored', async () => { + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + }, }); const params = getDefaultAsyncSubmitParams(mockConfig, { sessionId: 'foo', @@ -40,29 +36,57 @@ describe('request utils', () => { expect(params).toHaveProperty('keep_alive', '259200000ms'); }); + // remove when SQL has full session support https://github.com/elastic/kibana/issues/127880 + test('Uses `keep_alive` from asyncSearch config if sessions enabled and session is stored', async () => { + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + }, + }); + const params = getDefaultAsyncSubmitParams(mockConfig, { + sessionId: 'foo', + isStored: true, + }); + expect(params).toHaveProperty('keep_alive', '60000ms'); + }); + test('Uses `keepAlive` of `1m` if disabled', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: false, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: false, + }, }); const params = getDefaultAsyncSubmitParams(mockConfig, { sessionId: 'foo', }); - expect(params).toHaveProperty('keep_alive', '1m'); + expect(params).toHaveProperty('keep_alive', '60000ms'); }); - test('Uses `keep_on_completion` if enabled', async () => { - const mockConfig = getMockSearchSessionsConfig({}); + // unskip when SQL has full session support https://github.com/elastic/kibana/issues/127880 + test.skip('Uses `keep_on_completion` if sessions enabled', async () => { + const mockConfig = getMockSearchConfig({}); const params = getDefaultAsyncSubmitParams(mockConfig, { sessionId: 'foo', }); expect(params).toHaveProperty('keep_on_completion', true); }); + // remove when SQL has full session support https://github.com/elastic/kibana/issues/127880 + test("Don't use `keep_on_completion` if sessions enabled", async () => { + const mockConfig = getMockSearchConfig({}); + const params = getDefaultAsyncSubmitParams(mockConfig, { + sessionId: 'foo', + }); + expect(params).toHaveProperty('keep_on_completion', false); + }); + test('Does not use `keep_on_completion` if disabled', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: false, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: false, + }, }); const params = getDefaultAsyncSubmitParams(mockConfig, { sessionId: 'foo', @@ -73,27 +97,34 @@ describe('request utils', () => { describe('getDefaultAsyncGetParams', () => { test('Uses `wait_for_completion_timeout`', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: true, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, }); const params = getDefaultAsyncGetParams(mockConfig, {}); expect(params).toHaveProperty('wait_for_completion_timeout'); }); test('Uses `keep_alive` if `sessionId` is not provided', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: true, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, }); const params = getDefaultAsyncGetParams(mockConfig, {}); - expect(params).toHaveProperty('keep_alive', '1m'); + expect(params).toHaveProperty('keep_alive', '60000ms'); }); - test('Has no `keep_alive` if `sessionId` is provided, search and session are stored', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: true, + // remove when SQL has full session support https://github.com/elastic/kibana/issues/127880 + test.skip('Has no `keep_alive` if `sessionId` is provided, search and session are stored', async () => { + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: true, + }, }); const params = getDefaultAsyncGetParams(mockConfig, { sessionId: 'foo', @@ -104,12 +135,14 @@ describe('request utils', () => { }); test('Uses `keep_alive` if `sessionId` is provided but sessions disabled', async () => { - const mockConfig = getMockSearchSessionsConfig({ - defaultExpiration: moment.duration(3, 'd'), - enabled: false, + const mockConfig = getMockSearchConfig({ + sessions: { + defaultExpiration: moment.duration(3, 'd'), + enabled: false, + }, }); const params = getDefaultAsyncGetParams(mockConfig, { sessionId: 'foo' }); - expect(params).toHaveProperty('keep_alive', '1m'); + expect(params).toHaveProperty('keep_alive', '60000ms'); }); }); }); diff --git a/src/plugins/data/server/search/strategies/sql_search/request_utils.ts b/src/plugins/data/server/search/strategies/sql_search/request_utils.ts index de8ced65d16c6..e170b506b537d 100644 --- a/src/plugins/data/server/search/strategies/sql_search/request_utils.ts +++ b/src/plugins/data/server/search/strategies/sql_search/request_utils.ts @@ -8,7 +8,7 @@ import { SqlGetAsyncRequest, SqlQueryRequest } from '@elastic/elasticsearch/lib/api/types'; import { ISearchOptions } from '../../../../common'; -import { SearchSessionsConfigSchema } from '../../../../config'; +import { SearchConfigSchema } from '../../../../config'; import { getCommonDefaultAsyncGetParams, getCommonDefaultAsyncSubmitParams, @@ -18,11 +18,17 @@ import { @internal */ export function getDefaultAsyncSubmitParams( - searchSessionsConfig: SearchSessionsConfigSchema | null, + searchConfig: SearchConfigSchema, options: ISearchOptions ): Pick { return { - ...getCommonDefaultAsyncSubmitParams(searchSessionsConfig, options), + ...getCommonDefaultAsyncSubmitParams(searchConfig, options, { + /** + * force disable search sessions until sessions support SQL + * https://github.com/elastic/kibana/issues/127880 + */ + disableSearchSessions: true, + }), }; } @@ -30,10 +36,16 @@ export function getDefaultAsyncSubmitParams( @internal */ export function getDefaultAsyncGetParams( - searchSessionsConfig: SearchSessionsConfigSchema | null, + searchConfig: SearchConfigSchema, options: ISearchOptions ): Pick { return { - ...getCommonDefaultAsyncGetParams(searchSessionsConfig, options), + ...getCommonDefaultAsyncGetParams(searchConfig, options, { + /** + * force disable search sessions until sessions support SQL + * https://github.com/elastic/kibana/issues/127880 + */ + disableSearchSessions: true, + }), }; } diff --git a/src/plugins/data/server/search/strategies/sql_search/sql_search_strategy.test.ts b/src/plugins/data/server/search/strategies/sql_search/sql_search_strategy.test.ts index e36b66a31c017..f4cfcabf0737b 100644 --- a/src/plugins/data/server/search/strategies/sql_search/sql_search_strategy.test.ts +++ b/src/plugins/data/server/search/strategies/sql_search/sql_search_strategy.test.ts @@ -14,6 +14,7 @@ import { SearchStrategyDependencies } from '../../types'; import { sqlSearchStrategyProvider } from './sql_search_strategy'; import { createSearchSessionsClientMock } from '../../mocks'; import { SqlSearchStrategyRequest } from '../../../../common'; +import { getMockSearchConfig } from '../../../../config.mock'; const mockSqlResponse = { body: { @@ -46,6 +47,8 @@ describe('SQL search strategy', () => { searchSessionsClient: createSearchSessionsClientMock(), } as unknown as SearchStrategyDependencies; + const mockSearchConfig = getMockSearchConfig({}); + beforeEach(() => { mockSqlGetAsync.mockClear(); mockSqlQuery.mockClear(); @@ -54,7 +57,7 @@ describe('SQL search strategy', () => { }); it('returns a strategy with `search and `cancel`, `extend`', async () => { - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); expect(typeof esSearch.search).toBe('function'); expect(typeof esSearch.cancel).toBe('function'); @@ -70,7 +73,7 @@ describe('SQL search strategy', () => { query: 'SELECT customer_first_name FROM kibana_sample_data_ecommerce ORDER BY order_date DESC', }; - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); await esSearch .search({ params }, { transport: { requestTimeout: 30000 } }, mockDeps) @@ -80,8 +83,8 @@ describe('SQL search strategy', () => { const [request, searchOptions] = mockSqlQuery.mock.calls[0]; expect(request).toEqual({ format: 'json', - keep_alive: '1m', - keep_on_completion: undefined, + keep_alive: '60000ms', + keep_on_completion: false, query: 'SELECT customer_first_name FROM kibana_sample_data_ecommerce ORDER BY order_date DESC', wait_for_completion_timeout: '100ms', @@ -101,7 +104,7 @@ describe('SQL search strategy', () => { 'SELECT customer_first_name FROM kibana_sample_data_ecommerce ORDER BY order_date DESC', }; - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); await esSearch .search({ id: 'foo', params }, { transport: { requestTimeout: 30000 } }, mockDeps) @@ -112,7 +115,7 @@ describe('SQL search strategy', () => { expect(request).toEqual({ format: 'json', id: 'foo', - keep_alive: '1m', + keep_alive: '60000ms', wait_for_completion_timeout: '100ms', }); expect(searchOptions).toEqual({ @@ -131,7 +134,7 @@ describe('SQL search strategy', () => { query: 'SELECT customer_first_name FROM kibana_sample_data_ecommerce ORDER BY order_date DESC', }; - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); await esSearch.search({ params }, { sessionId: '1' }, mockDeps).toPromise(); @@ -150,7 +153,7 @@ describe('SQL search strategy', () => { 'SELECT customer_first_name FROM kibana_sample_data_ecommerce ORDER BY order_date DESC', }; - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); await esSearch.search({ id: 'foo', params }, { sessionId: '1' }, mockDeps).toPromise(); @@ -169,7 +172,7 @@ describe('SQL search strategy', () => { query: 'SELECT customer_first_name FROM kibana_sample_data_ecommerce ORDER BY order_date DESC', }; - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); await esSearch.search({ params }, { sessionId: '1' }, mockDeps).toPromise(); @@ -178,7 +181,7 @@ describe('SQL search strategy', () => { expect(request.query).toEqual(params.query); expect(request).toHaveProperty('wait_for_completion_timeout'); - expect(request).toHaveProperty('keep_alive', '1m'); + expect(request).toHaveProperty('keep_alive', '60000ms'); }); it('makes a GET request to async search with keepalive', async () => { @@ -189,7 +192,7 @@ describe('SQL search strategy', () => { 'SELECT customer_first_name FROM kibana_sample_data_ecommerce ORDER BY order_date DESC', }; - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); await esSearch.search({ id: 'foo', params }, { sessionId: '1' }, mockDeps).toPromise(); @@ -197,7 +200,7 @@ describe('SQL search strategy', () => { const request = mockSqlGetAsync.mock.calls[0][0]; expect(request.id).toEqual('foo'); expect(request).toHaveProperty('wait_for_completion_timeout'); - expect(request).toHaveProperty('keep_alive', '1m'); + expect(request).toHaveProperty('keep_alive', '60000ms'); }); }); @@ -216,7 +219,7 @@ describe('SQL search strategy', () => { query: 'SELECT customer_first_name FROM kibana_sample_data_ecommerce ORDER BY order_date DESC', }; - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); let err: KbnServerError | undefined; try { @@ -240,7 +243,7 @@ describe('SQL search strategy', () => { query: 'SELECT customer_first_name FROM kibana_sample_data_ecommerce ORDER BY order_date DESC', }; - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); let err: KbnServerError | undefined; try { @@ -262,7 +265,7 @@ describe('SQL search strategy', () => { }) ); - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); await esSearch.search({ id: 'foo', params: { query: 'query' } }, {}, mockDeps).toPromise(); expect(mockSqlClearCursor).not.toHaveBeenCalled(); @@ -273,7 +276,7 @@ describe('SQL search strategy', () => { merge({}, mockSqlResponse, { body: { cursor: 'cursor' } }) ); - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); await esSearch .search({ id: 'foo', params: { query: 'query', keep_cursor: true } }, {}, mockDeps) .toPromise(); @@ -286,7 +289,7 @@ describe('SQL search strategy', () => { merge({}, mockSqlResponse, { body: { cursor: 'cursor' } }) ); - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); await esSearch.search({ id: 'foo', params: { query: 'query' } }, {}, mockDeps).toPromise(); expect(mockSqlClearCursor).toHaveBeenCalledWith({ cursor: 'cursor' }); @@ -295,7 +298,7 @@ describe('SQL search strategy', () => { it('returns the time it took to run a search', async () => { mockSqlGetAsync.mockResolvedValueOnce(mockSqlResponse); - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); await expect( esSearch.search({ id: 'foo', params: { query: 'query' } }, {}, mockDeps).toPromise() ).resolves.toHaveProperty('took', expect.any(Number)); @@ -307,7 +310,7 @@ describe('SQL search strategy', () => { mockSqlDelete.mockResolvedValueOnce(200); const id = 'some_id'; - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); await esSearch.cancel!(id, {}, mockDeps); @@ -323,7 +326,7 @@ describe('SQL search strategy', () => { const id = 'some_other_id'; const keepAlive = '1d'; - const esSearch = await sqlSearchStrategyProvider(mockLogger); + const esSearch = await sqlSearchStrategyProvider(mockSearchConfig, mockLogger); await esSearch.extend!(id, keepAlive, {}, mockDeps); expect(mockSqlGetAsync).toBeCalled(); diff --git a/src/plugins/data/server/search/strategies/sql_search/sql_search_strategy.ts b/src/plugins/data/server/search/strategies/sql_search/sql_search_strategy.ts index b84dcfe45d2cf..64c4d6fd5ee0f 100644 --- a/src/plugins/data/server/search/strategies/sql_search/sql_search_strategy.ts +++ b/src/plugins/data/server/search/strategies/sql_search/sql_search_strategy.ts @@ -20,8 +20,10 @@ import type { import { pollSearch } from '../../../../common'; import { getDefaultAsyncGetParams, getDefaultAsyncSubmitParams } from './request_utils'; import { toAsyncKibanaSearchResponse } from './response_utils'; +import { SearchConfigSchema } from '../../../../config'; export const sqlSearchStrategyProvider = ( + searchConfig: SearchConfigSchema, logger: Logger, useInternalUser: boolean = false ): ISearchStrategy => { @@ -42,11 +44,6 @@ export const sqlSearchStrategyProvider = ( const client = useInternalUser ? esClient.asInternalUser : esClient.asCurrentUser; const startTime = Date.now(); - // disable search sessions until session task manager supports SQL - // https://github.com/elastic/kibana/issues/127880 - // const sessionConfig = searchSessionsClient.getConfig(); - const sessionConfig = null; - const search = async () => { const { keep_cursor: keepCursor, ...params } = request.params ?? {}; let body: SqlQueryResponse; @@ -56,7 +53,7 @@ export const sqlSearchStrategyProvider = ( ({ body, headers } = await client.sql.getAsync( { format: params?.format ?? 'json', - ...getDefaultAsyncGetParams(sessionConfig, options), + ...getDefaultAsyncGetParams(searchConfig, options), id, }, { ...options.transport, signal: options.abortSignal, meta: true } @@ -65,7 +62,7 @@ export const sqlSearchStrategyProvider = ( ({ headers, body } = await client.sql.query( { format: params.format ?? 'json', - ...getDefaultAsyncSubmitParams(sessionConfig, options), + ...getDefaultAsyncSubmitParams(searchConfig, options), ...params, }, { ...options.transport, signal: options.abortSignal, meta: true } diff --git a/src/plugins/data/tsconfig.json b/src/plugins/data/tsconfig.json index 8f391fc15e871..2e9c05992cc9d 100644 --- a/src/plugins/data/tsconfig.json +++ b/src/plugins/data/tsconfig.json @@ -11,6 +11,7 @@ "public/**/*", "server/**/*", "config.ts", + "config.mock.ts", "common/**/*.json", "public/**/*.json", "../../../typings/index.d.ts" diff --git a/src/plugins/discover/public/__mocks__/services.ts b/src/plugins/discover/public/__mocks__/services.ts index 252aead2f76ed..97de63d231a46 100644 --- a/src/plugins/discover/public/__mocks__/services.ts +++ b/src/plugins/discover/public/__mocks__/services.ts @@ -26,10 +26,12 @@ import { FORMATS_UI_SETTINGS } from '@kbn/field-formats-plugin/common'; import { LocalStorageMock } from './local_storage_mock'; import { fieldFormatsMock } from '@kbn/field-formats-plugin/common/mocks'; import { dataViewsMock } from './data_views'; +import { Observable, of } from 'rxjs'; const dataPlugin = dataPluginMock.createStartContract(); const expressionsPlugin = expressionsPluginMock.createStartContract(); dataPlugin.query.filterManager.getFilters = jest.fn(() => []); +dataPlugin.query.filterManager.getUpdates$ = jest.fn(() => of({}) as unknown as Observable); export const discoverServiceMock = { core: coreMock.createStart(), diff --git a/src/plugins/discover/public/application/main/components/chart/histogram.tsx b/src/plugins/discover/public/application/main/components/chart/histogram.tsx index b34aa1595f81e..62ade96fceb86 100644 --- a/src/plugins/discover/public/application/main/components/chart/histogram.tsx +++ b/src/plugins/discover/public/application/main/components/chart/histogram.tsx @@ -41,6 +41,7 @@ import { renderEndzoneTooltip, } from '@kbn/charts-plugin/public'; import { LEGACY_TIME_AXIS, MULTILAYER_TIME_AXIS_STYLE } from '@kbn/charts-plugin/common'; +import { css } from '@emotion/react'; import { useDiscoverServices } from '../../../../hooks/use_discover_services'; import { DataCharts$, DataChartsMessage } from '../../hooks/use_saved_search'; import { FetchStatus } from '../../../types'; @@ -252,12 +253,16 @@ export function DiscoverHistogram({ ); if (bucketInterval?.scaled) { + const timeRangeWrapperCss = css` + flex-grow: 0; + `; timeRange = ( {timeRange} diff --git a/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx b/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx index fe6ac392c35a8..18d004c72c14f 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx @@ -152,9 +152,13 @@ export function DiscoverLayout({ [filterManager, dataView, dataViews, trackUiMetric, capabilities] ); - const onFieldEdited = useCallback(() => { + const onFieldEdited = useCallback(async () => { + if (!dataView.isPersisted()) { + await updateAdHocDataViewId(dataView); + return; + } savedSearchRefetch$.next('reset'); - }, [savedSearchRefetch$]); + }, [dataView, savedSearchRefetch$, updateAdHocDataViewId]); const onDisableFilters = useCallback(() => { const disabledFilters = filterManager diff --git a/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx b/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx index ae433ee8ba38e..6f66b1f613b22 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx @@ -256,7 +256,10 @@ describe('Discover main content component', () => { }); it('should pass undefined for onResetChartHeight to DiscoverChart when panels mode is DISCOVER_PANELS_MODE.FIXED', async () => { - const component = await mountComponent(); + const storage = new LocalStorageMock({}) as unknown as Storage; + const topPanelHeight = 123; + storage.get = jest.fn().mockImplementation(() => topPanelHeight); + const component = await mountComponent({ storage }); expect(component.find(DiscoverChart).prop('onResetChartHeight')).toBeDefined(); setWindowWidth(component, euiThemeVars.euiBreakpoints.s); expect(component.find(DiscoverChart).prop('onResetChartHeight')).toBeUndefined(); @@ -340,5 +343,21 @@ describe('Discover main content component', () => { expect(storage.set).toHaveBeenCalledWith(HISTOGRAM_HEIGHT_KEY, defaultTopPanelHeight); expect(component.find(DiscoverPanels).prop('topPanelHeight')).toBe(defaultTopPanelHeight); }); + + it('should pass undefined for onResetChartHeight to DiscoverChart when the chart is the default height', async () => { + const component = await mountComponent(); + const defaultTopPanelHeight = component.find(DiscoverPanels).prop('topPanelHeight'); + const newTopPanelHeight = 123; + act(() => { + component.find(DiscoverPanels).prop('onTopPanelHeightChange')(newTopPanelHeight); + }); + component.update(); + expect(component.find(DiscoverChart).prop('onResetChartHeight')).toBeDefined(); + act(() => { + component.find(DiscoverPanels).prop('onTopPanelHeightChange')(defaultTopPanelHeight); + }); + component.update(); + expect(component.find(DiscoverChart).prop('onResetChartHeight')).toBeUndefined(); + }); }); }); diff --git a/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx b/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx index 68d91c9123a6d..4998e561f5dd7 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_main_content.tsx @@ -52,7 +52,7 @@ export interface DiscoverMainContentProps { isTimeBased: boolean; viewMode: VIEW_MODE; onAddFilter: DocViewFilterFn | undefined; - onFieldEdited: () => void; + onFieldEdited: () => Promise; columns: string[]; resizeRef: RefObject; } @@ -161,7 +161,10 @@ export const DiscoverMainContent = ({ isTimeBased={isTimeBased} appendHistogram={showFixedPanels ? : } onResetChartHeight={ - panelsMode === DISCOVER_PANELS_MODE.RESIZABLE ? resetTopPanelHeight : undefined + topPanelHeight !== defaultTopPanelHeight && + panelsMode === DISCOVER_PANELS_MODE.RESIZABLE + ? resetTopPanelHeight + : undefined } /> 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 436fdc36f4d32..0172c32af4e84 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 @@ -283,7 +283,7 @@ export function DiscoverSidebarComponent({ }, fieldName, onDelete: async () => { - onFieldEdited(); + await onFieldEdited(); }, }); if (setFieldEditorRef) { diff --git a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.tsx b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.tsx index 274cb85cc3535..1387f3a0c8791 100644 --- a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.tsx +++ b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.tsx @@ -93,7 +93,7 @@ export interface DiscoverSidebarResponsiveProps { /** * callback to execute on edit runtime field */ - onFieldEdited: () => void; + onFieldEdited: () => Promise; /** * callback to execute on create dataview */ @@ -220,7 +220,7 @@ export function DiscoverSidebarResponsive(props: DiscoverSidebarResponsiveProps) }, fieldName, onSave: async () => { - onFieldEdited(); + await onFieldEdited(); }, }); if (setFieldEditorRef) { diff --git a/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx b/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx index 66f06169256ab..0aa132d1437d3 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx @@ -34,7 +34,7 @@ export type DiscoverTopNavProps = Pick< onChangeDataView: (dataView: string) => void; isPlainRecord: boolean; textBasedLanguageModeErrors?: Error; - onFieldEdited: () => void; + onFieldEdited: () => Promise; persistDataView: (dataView: DataView) => Promise; updateAdHocDataViewId: (dataView: DataView) => Promise; adHocDataViewList: DataView[]; @@ -111,7 +111,7 @@ export const DiscoverTopNav = ({ }, fieldName, onSave: async () => { - onFieldEdited(); + await onFieldEdited(); }, }); } diff --git a/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts b/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts index d06521d345270..e14defbdeb585 100644 --- a/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts +++ b/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.test.ts @@ -75,12 +75,18 @@ describe('useAdHocDataViews', () => { const hook = renderHook((d: DataView) => useAdHocDataViews({ dataView: mockDataView, - dataViews: mockDiscoverServices.dataViews, savedSearch: savedSearchMock, stateContainer: { appStateContainer: { getState: jest.fn().mockReturnValue({}) }, + replaceUrlAppState: jest.fn(), + kbnUrlStateStorage: { + kbnUrlControls: { flush: jest.fn() }, + }, } as unknown as GetStateReturn, - onChangeDataView: jest.fn(), + setUrlTracking: jest.fn(), + dataViews: mockDiscoverServices.dataViews, + filterManager: mockDiscoverServices.filterManager, + toastNotifications: mockDiscoverServices.toastNotifications, }) ); @@ -101,12 +107,18 @@ describe('useAdHocDataViews', () => { const hook = renderHook((d: DataView) => useAdHocDataViews({ dataView: mockDataView, - dataViews: mockDiscoverServices.dataViews, savedSearch: savedSearchMock, stateContainer: { appStateContainer: { getState: jest.fn().mockReturnValue({}) }, + replaceUrlAppState: jest.fn(), + kbnUrlStateStorage: { + kbnUrlControls: { flush: jest.fn() }, + }, } as unknown as GetStateReturn, - onChangeDataView: jest.fn(), + setUrlTracking: jest.fn(), + dataViews: mockDiscoverServices.dataViews, + filterManager: mockDiscoverServices.filterManager, + toastNotifications: mockDiscoverServices.toastNotifications, }) ); diff --git a/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts b/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts index ded1b90d69873..89fd4477da34c 100644 --- a/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts +++ b/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts @@ -7,29 +7,36 @@ */ import { useCallback, useEffect, useState } from 'react'; -import { DataViewsContract, type DataView } from '@kbn/data-views-plugin/public'; +import type { DataView, DataViewsContract } from '@kbn/data-views-plugin/public'; import { SavedSearch } from '@kbn/saved-search-plugin/public'; import { UPDATE_FILTER_REFERENCES_ACTION, UPDATE_FILTER_REFERENCES_TRIGGER, } from '@kbn/unified-search-plugin/public'; import { ActionExecutionContext } from '@kbn/ui-actions-plugin/public'; +import type { FilterManager } from '@kbn/data-plugin/public'; +import type { ToastsStart } from '@kbn/core-notifications-browser'; +import { getUiActions } from '../../../kibana_services'; import { useConfirmPersistencePrompt } from '../../../hooks/use_confirm_persistence_prompt'; -import { getUiActions, getUrlTracker } from '../../../kibana_services'; import { GetStateReturn } from '../services/discover_state'; +import { useFiltersValidation } from './use_filters_validation'; export const useAdHocDataViews = ({ dataView, savedSearch, - dataViews, stateContainer, - onChangeDataView, + setUrlTracking, + filterManager, + dataViews, + toastNotifications, }: { dataView: DataView; savedSearch: SavedSearch; - dataViews: DataViewsContract; stateContainer: GetStateReturn; - onChangeDataView: (dataViewId: string) => Promise; + setUrlTracking: (dataView: DataView) => void; + dataViews: DataViewsContract; + filterManager: FilterManager; + toastNotifications: ToastsStart; }) => { const [adHocDataViewList, setAdHocDataViewList] = useState( !dataView.isPersisted() ? [dataView] : [] @@ -44,6 +51,11 @@ export const useAdHocDataViews = ({ } }, [dataView]); + /** + * Takes care of checking data view id references in filters + */ + useFiltersValidation({ savedSearch, filterManager, toastNotifications }); + /** * When saving a saved search with an ad hoc data view, a new id needs to be generated for the data view * This is to prevent duplicate ids messing with our system @@ -57,12 +69,11 @@ export const useAdHocDataViews = ({ prev.filter((d) => d.id && dataViewToUpdate.id && d.id !== dataViewToUpdate.id) ); - savedSearch.searchSource.setField('index', newDataView); - - // update filters references const uiActions = await getUiActions(); const trigger = uiActions.getTrigger(UPDATE_FILTER_REFERENCES_TRIGGER); const action = uiActions.getAction(UPDATE_FILTER_REFERENCES_ACTION); + + // execute shouldn't be awaited, this is important for pending history push cancellation action?.execute({ trigger, fromDataView: dataViewToUpdate.id, @@ -70,9 +81,11 @@ export const useAdHocDataViews = ({ usedDataViews: [], } as ActionExecutionContext); + stateContainer.replaceUrlAppState({ index: newDataView.id }); + setUrlTracking(newDataView); return newDataView; }, - [dataViews, savedSearch.searchSource] + [dataViews, setUrlTracking, stateContainer] ); const { openConfirmSavePrompt, updateSavedSearch } = @@ -81,22 +94,16 @@ export const useAdHocDataViews = ({ const currentDataView = savedSearch.searchSource.getField('index')!; if (currentDataView && !currentDataView.isPersisted()) { const createdDataView = await openConfirmSavePrompt(currentDataView); - if (createdDataView) { - savedSearch.searchSource.setField('index', createdDataView); - await onChangeDataView(createdDataView.id!); - // update saved search with saved data view - if (savedSearch.id) { - const currentState = stateContainer.appStateContainer.getState(); - await updateSavedSearch({ savedSearch, dataView: createdDataView, state: currentState }); - } - getUrlTracker().setTrackingEnabled(true); - return createdDataView; + // update saved search with saved data view + if (createdDataView && savedSearch.id) { + const currentState = stateContainer.appStateContainer.getState(); + await updateSavedSearch({ savedSearch, dataView: createdDataView, state: currentState }); } - return undefined; + return createdDataView; } return currentDataView; - }, [stateContainer, onChangeDataView, openConfirmSavePrompt, savedSearch, updateSavedSearch]); + }, [stateContainer, openConfirmSavePrompt, savedSearch, updateSavedSearch]); return { adHocDataViewList, persistDataView, updateAdHocDataViewId }; }; diff --git a/src/plugins/discover/public/application/main/hooks/use_discover_state.test.ts b/src/plugins/discover/public/application/main/hooks/use_discover_state.test.tsx similarity index 100% rename from src/plugins/discover/public/application/main/hooks/use_discover_state.test.ts rename to src/plugins/discover/public/application/main/hooks/use_discover_state.test.tsx diff --git a/src/plugins/discover/public/application/main/hooks/use_discover_state.ts b/src/plugins/discover/public/application/main/hooks/use_discover_state.ts index 1c530f475f0b1..ff448e59917a8 100644 --- a/src/plugins/discover/public/application/main/hooks/use_discover_state.ts +++ b/src/plugins/discover/public/application/main/hooks/use_discover_state.ts @@ -44,7 +44,7 @@ export function useDiscoverState({ setExpandedDoc: (doc?: DataTableRecord) => void; dataViewList: DataViewListItem[]; }) { - const { uiSettings, data, filterManager, dataViews } = services; + const { uiSettings, data, filterManager, dataViews, toastNotifications } = services; const useNewFieldsApi = useMemo(() => !uiSettings.get(SEARCH_FIELDS_FROM_SOURCE), [uiSettings]); const { timefilter } = data.query.timefilter; @@ -126,10 +126,12 @@ export function useDiscoverState({ */ const { adHocDataViewList, persistDataView, updateAdHocDataViewId } = useAdHocDataViews({ dataView, - dataViews, stateContainer, savedSearch, - onChangeDataView, + setUrlTracking, + dataViews, + toastNotifications, + filterManager, }); /** diff --git a/src/plugins/discover/public/application/main/hooks/use_filters_validation.ts b/src/plugins/discover/public/application/main/hooks/use_filters_validation.ts new file mode 100644 index 0000000000000..f093edbd7c65b --- /dev/null +++ b/src/plugins/discover/public/application/main/hooks/use_filters_validation.ts @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { IToasts, ToastsStart } from '@kbn/core/public'; +import { FilterManager } from '@kbn/data-plugin/public'; +import { i18n } from '@kbn/i18n'; +import { SavedSearch } from '@kbn/saved-search-plugin/public'; +import { useEffect } from 'react'; +import { debounceTime } from 'rxjs'; + +const addInvalidFiltersWarn = (toastNotifications: IToasts) => { + const warningTitle = i18n.translate('discover.invalidFiltersWarnToast.title', { + defaultMessage: 'Different index references', + }); + toastNotifications.addWarning({ + title: warningTitle, + text: i18n.translate('discover.invalidFiltersWarnToast.description', { + defaultMessage: + 'Data view id references in some of the applied filters differ from the current data view.', + }), + 'data-test-subj': 'invalidFiltersWarnToast', + }); +}; + +export const useFiltersValidation = ({ + savedSearch, + filterManager, + toastNotifications, +}: { + savedSearch: SavedSearch; + filterManager: FilterManager; + toastNotifications: ToastsStart; +}) => { + useEffect(() => { + const subscription = filterManager + .getUpdates$() + .pipe(debounceTime(500)) + .subscribe(() => { + const currentFilters = filterManager.getFilters(); + const dataView = savedSearch.searchSource.getField('index'); + const areFiltersInvalid = + dataView && + !dataView.isPersisted() && + !currentFilters.every((current) => current.meta.index === dataView.id); + if (areFiltersInvalid) { + addInvalidFiltersWarn(toastNotifications); + } + }); + return () => subscription.unsubscribe(); + }, [filterManager, savedSearch.searchSource, toastNotifications]); +}; diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid.tsx b/src/plugins/discover/public/components/discover_grid/discover_grid.tsx index 1987542931676..2da63f982e305 100644 --- a/src/plugins/discover/public/components/discover_grid/discover_grid.tsx +++ b/src/plugins/discover/public/components/discover_grid/discover_grid.tsx @@ -376,7 +376,7 @@ export const DiscoverGrid = ({ }, fieldName, onSave: async () => { - onFieldEdited(); + await onFieldEdited(); }, }); } diff --git a/src/plugins/guided_onboarding/public/constants/guides_config/observability.ts b/src/plugins/guided_onboarding/public/constants/guides_config/observability.ts index 91b69490131b3..9fedb88af2253 100644 --- a/src/plugins/guided_onboarding/public/constants/guides_config/observability.ts +++ b/src/plugins/guided_onboarding/public/constants/guides_config/observability.ts @@ -9,31 +9,31 @@ import type { GuideConfig } from '../../types'; export const observabilityConfig: GuideConfig = { - title: 'Observe my infrastructure', - description: - 'The foundation of seeing Elastic in action, is adding you own data. Follow links to our documents below to learn more.', + title: 'Observe my Kubernetes infrastructure', + description: `We'll help you quickly gain visibility into your Kubernetes environment using Elastic's out-of-the-box integration. Gain deep insights from your logs, metrics, and traces, and proactively detect issues and take action to resolve issues.`, docs: { - text: 'Observability 101 Documentation', - url: 'example.com', + text: 'Kubernetes documentation', + url: 'example.com', // TODO update link to correct docs page }, steps: [ { id: 'add_data', title: 'Add data', - descriptionList: [ - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', - 'Nullam ligula enim, malesuada a finibus vel, cursus sed risus.', - 'Vivamus pretium, elit dictum lacinia aliquet, libero nibh dictum enim, a rhoncus leo magna in sapien.', - ], + integration: 'kubernetes', + descriptionList: ['Start by adding your data by setting up the Kubernetes integration.'], + location: { + appID: 'integrations', + path: '/detail/kubernetes/overview', + }, }, { id: 'view_dashboard', - title: 'View Kubernetes metrics', - descriptionList: [ - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', - 'Nullam ligula enim, malesuada a finibus vel, cursus sed risus.', - 'Vivamus pretium, elit dictum lacinia aliquet, libero nibh dictum enim, a rhoncus leo magna in sapien.', - ], + title: 'Explore Kubernetes metrics', + descriptionList: ['Stream, visualize, and analyze your Kubernetes infrastructure metrics.'], + location: { + appID: 'dashboards', + path: '#/view/kubernetes-e0195ce0-bcaf-11ec-b64f-7dd6e8e82013', + }, }, { id: 'tour_observability', diff --git a/src/plugins/vis_types/gauge/kibana.json b/src/plugins/vis_types/gauge/kibana.json index 5eb2794452de9..428ee970c4e7f 100755 --- a/src/plugins/vis_types/gauge/kibana.json +++ b/src/plugins/vis_types/gauge/kibana.json @@ -4,13 +4,26 @@ "kibanaVersion": "kibana", "server": true, "ui": true, - "requiredPlugins": ["charts", "data", "expressions", "visualizations"], - "requiredBundles": ["visDefaultEditor"], - "optionalPlugins": ["expressionGauge"], - "extraPublicDirs": ["common/index"], + "requiredPlugins": [ + "charts", + "data", + "expressions", + "visualizations", + "dataViews" + ], + "requiredBundles": [ + "visDefaultEditor", + "kibanaUtils" + ], + "optionalPlugins": [ + "expressionGauge" + ], + "extraPublicDirs": [ + "common/index" + ], "owner": { "name": "Vis Editors", "githubTeam": "kibana-vis-editors" }, "description": "Contains the gauge chart implementation using the elastic-charts library. The goal is to eventually deprecate the old implementation and keep only this. Until then, the library used is defined by the Legacy charts library advanced setting." -} +} \ No newline at end of file diff --git a/src/plugins/vis_types/gauge/public/convert_to_lens/configurations/gauge.test.ts b/src/plugins/vis_types/gauge/public/convert_to_lens/configurations/gauge.test.ts new file mode 100644 index 0000000000000..0b2bab509341d --- /dev/null +++ b/src/plugins/vis_types/gauge/public/convert_to_lens/configurations/gauge.test.ts @@ -0,0 +1,83 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { ColorSchemas } from '@kbn/charts-plugin/common'; +import { CustomPaletteParams, PaletteOutput } from '@kbn/coloring'; +import { getConfiguration } from './gauge'; +import { GaugeVisParams } from '../../types'; + +const params: GaugeVisParams = { + addTooltip: false, + addLegend: false, + isDisplayWarning: true, + gauge: { + type: 'meter', + orientation: 'vertical', + alignment: 'automatic', + gaugeType: 'Arc', + scale: { + color: 'rgba(105,112,125,0.2)', + labels: false, + show: false, + }, + gaugeStyle: 'Full', + extendRange: false, + backStyle: 'Full', + percentageMode: false, + percentageFormatPattern: '', + colorSchema: ColorSchemas.Greys, + colorsRange: [ + { type: 'range', from: 0, to: 100 }, + { type: 'range', from: 100, to: 200 }, + ], + labels: {}, + invertColors: false, + style: { + bgFill: '', + bgColor: false, + labelColor: false, + subText: '', + fontSize: 10, + }, + }, + type: 'gauge', +}; + +describe('getConfiguration', () => { + const palette = { + name: 'custom', + params: { name: 'custom' }, + type: 'palette', + } as PaletteOutput; + + test('shourd return correct configuration', () => { + const layerId = 'layer-id'; + const metricAccessor = 'metric-id'; + const minAccessor = 'min-accessor'; + const maxAccessor = 'max-accessor'; + expect( + getConfiguration(layerId, params, palette, { + metricAccessor, + minAccessor, + maxAccessor, + }) + ).toEqual({ + colorMode: 'palette', + labelMajorMode: 'none', + labelMinor: undefined, + layerId: 'layer-id', + layerType: 'data', + maxAccessor: 'max-accessor', + metricAccessor: 'metric-id', + minAccessor: 'min-accessor', + palette: { name: 'custom', params: { name: 'custom' }, type: 'palette' }, + shape: 'horizontalBullet', + ticksPosition: 'bands', + }); + }); +}); diff --git a/src/plugins/vis_types/gauge/public/convert_to_lens/configurations/gauge.ts b/src/plugins/vis_types/gauge/public/convert_to_lens/configurations/gauge.ts new file mode 100644 index 0000000000000..9a5483d038c2e --- /dev/null +++ b/src/plugins/vis_types/gauge/public/convert_to_lens/configurations/gauge.ts @@ -0,0 +1,41 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { CustomPaletteParams, PaletteOutput } from '@kbn/coloring'; +import { GaugeVisConfiguration } from '@kbn/visualizations-plugin/common'; +import { GaugeVisParams } from '../../types'; + +export const getConfiguration = ( + layerId: string, + params: GaugeVisParams, + palette: PaletteOutput | undefined, + { + metricAccessor, + minAccessor, + maxAccessor, + }: { + metricAccessor: string; + minAccessor: string; + maxAccessor: string; + } +): GaugeVisConfiguration => { + const showLabels = Boolean(params.gauge.labels.show); + return { + layerId, + layerType: 'data', + palette, + metricAccessor, + minAccessor, + maxAccessor, + shape: 'horizontalBullet', + ticksPosition: 'bands', + labelMajorMode: showLabels ? 'auto' : 'none', + colorMode: palette ? 'palette' : 'none', + labelMinor: showLabels ? params.gauge.style.subText : undefined, + }; +}; diff --git a/src/plugins/vis_types/gauge/public/convert_to_lens/configurations/goal.test.ts b/src/plugins/vis_types/gauge/public/convert_to_lens/configurations/goal.test.ts new file mode 100644 index 0000000000000..7c04f19400272 --- /dev/null +++ b/src/plugins/vis_types/gauge/public/convert_to_lens/configurations/goal.test.ts @@ -0,0 +1,84 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { ColorSchemas } from '@kbn/charts-plugin/common'; +import { CustomPaletteParams, PaletteOutput } from '@kbn/coloring'; +import { GaugeVisParams } from '../../types'; +import { getConfiguration } from './goal'; + +const params: GaugeVisParams = { + addTooltip: false, + addLegend: false, + isDisplayWarning: true, + gauge: { + type: 'meter', + orientation: 'vertical', + alignment: 'automatic', + gaugeType: 'Arc', + scale: { + color: 'rgba(105,112,125,0.2)', + labels: false, + show: false, + }, + gaugeStyle: 'Full', + extendRange: false, + backStyle: 'Full', + percentageMode: false, + percentageFormatPattern: '', + colorSchema: ColorSchemas.Greys, + colorsRange: [ + { type: 'range', from: 0, to: 100 }, + { type: 'range', from: 100, to: 200 }, + ], + labels: {}, + invertColors: false, + style: { + bgFill: '', + bgColor: false, + labelColor: false, + subText: '', + fontSize: 10, + }, + }, + type: 'gauge', +}; + +describe('getConfiguration', () => { + const palette = { + name: 'custom', + params: { name: 'custom' }, + type: 'palette', + } as PaletteOutput; + + test('shourd return correct configuration', () => { + const layerId = 'layer-id'; + const metricAccessor = 'metric-id'; + const breakdownByAccessor = 'bucket-id'; + const metrics = [metricAccessor]; + const buckets = [breakdownByAccessor]; + const maxAccessor = 'max-accessor-id'; + const collapseFn = 'sum'; + expect( + getConfiguration(layerId, params, palette, { + metrics, + buckets, + maxAccessor, + columnsWithoutReferenced: [], + bucketCollapseFn: { [metricAccessor]: collapseFn }, + }) + ).toEqual({ + breakdownByAccessor, + collapseFn, + layerId, + layerType: 'data', + maxAccessor, + metricAccessor, + palette, + }); + }); +}); diff --git a/src/plugins/vis_types/gauge/public/convert_to_lens/configurations/goal.ts b/src/plugins/vis_types/gauge/public/convert_to_lens/configurations/goal.ts new file mode 100644 index 0000000000000..91e58333e8d56 --- /dev/null +++ b/src/plugins/vis_types/gauge/public/convert_to_lens/configurations/goal.ts @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { CustomPaletteParams, PaletteOutput } from '@kbn/coloring'; +import { Column, MetricVisConfiguration } from '@kbn/visualizations-plugin/common'; +import { GaugeVisParams } from '../../types'; + +export const getConfiguration = ( + layerId: string, + { gauge }: GaugeVisParams, + palette: PaletteOutput | undefined, + { + metrics, + buckets, + maxAccessor, + columnsWithoutReferenced, + bucketCollapseFn, + }: { + metrics: string[]; + buckets: string[]; + maxAccessor: string; + columnsWithoutReferenced: Column[]; + bucketCollapseFn?: Record; + } +): MetricVisConfiguration => { + const [metricAccessor] = metrics; + const [breakdownByAccessor] = buckets; + return { + layerId, + layerType: 'data', + palette, + metricAccessor, + breakdownByAccessor, + maxAccessor, + collapseFn: Object.values(bucketCollapseFn ?? {})[0], + subtitle: gauge.labels.show && gauge.style.subText ? gauge.style.subText : undefined, + }; +}; diff --git a/src/plugins/vis_types/gauge/public/convert_to_lens/gauge.test.ts b/src/plugins/vis_types/gauge/public/convert_to_lens/gauge.test.ts new file mode 100644 index 0000000000000..f7c07dafd85c6 --- /dev/null +++ b/src/plugins/vis_types/gauge/public/convert_to_lens/gauge.test.ts @@ -0,0 +1,159 @@ +/* + * Copyright 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 { ColorSchemas } from '@kbn/charts-plugin/common'; +import { Vis } from '@kbn/visualizations-plugin/public'; +import { convertToLens } from './gauge'; +import { GaugeVisParams } from '../types'; + +const mockGetColumnsFromVis = jest.fn(); +const mockGetPercentageColumnFormulaColumn = jest.fn(); +const mockGetConfiguration = jest.fn().mockReturnValue({}); +const mockGetPercentageModeConfig = jest.fn(); +const mockGetPalette = jest.fn(); +const mockCreateStaticValueColumn = jest.fn(); + +jest.mock('../services', () => ({ + getDataViewsStart: jest.fn(() => ({ get: () => ({}), getDefault: () => ({}) })), +})); + +jest.mock('@kbn/visualizations-plugin/public', () => ({ + convertToLensModule: Promise.resolve({ + getColumnsFromVis: jest.fn(() => mockGetColumnsFromVis()), + getPercentageColumnFormulaColumn: jest.fn(() => mockGetPercentageColumnFormulaColumn()), + getPercentageModeConfig: jest.fn(() => mockGetPercentageModeConfig()), + getPalette: jest.fn(() => mockGetPalette()), + createStaticValueColumn: jest.fn(() => mockCreateStaticValueColumn()), + }), + getDataViewByIndexPatternId: jest.fn(() => ({ id: 'index-pattern' })), +})); + +jest.mock('./configurations/gauge', () => ({ + getConfiguration: jest.fn(() => mockGetConfiguration()), +})); + +const params: GaugeVisParams = { + addTooltip: false, + addLegend: false, + isDisplayWarning: true, + gauge: { + type: 'meter', + orientation: 'vertical', + alignment: 'automatic', + gaugeType: 'Arc', + scale: { + color: 'rgba(105,112,125,0.2)', + labels: false, + show: false, + }, + gaugeStyle: 'Full', + extendRange: false, + backStyle: 'Full', + percentageMode: false, + percentageFormatPattern: '', + colorSchema: ColorSchemas.Greys, + colorsRange: [], + labels: {}, + invertColors: false, + style: { + bgFill: '', + bgColor: false, + labelColor: false, + subText: '', + fontSize: 10, + }, + }, + type: 'gauge', +}; + +const vis = { + isHierarchical: () => false, + type: {}, + params, + data: {}, +} as unknown as Vis; + +const timefilter = { + getAbsoluteTime: () => {}, +} as any; + +describe('convertToLens', () => { + beforeEach(() => { + mockGetPercentageModeConfig.mockReturnValue({ + isPercentageMode: false, + min: 0, + max: 1000, + }); + mockCreateStaticValueColumn.mockReturnValue({}); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + test('should return null if getColumnsFromVis returns null', async () => { + mockGetColumnsFromVis.mockReturnValue(null); + const result = await convertToLens(vis, timefilter); + expect(mockGetColumnsFromVis).toBeCalledTimes(1); + expect(result).toBeNull(); + }); + + test('should return null if metrics count is more than 1', async () => { + mockGetColumnsFromVis.mockReturnValue({ + metrics: ['1', '2'], + buckets: [], + columns: [{ columnId: '2' }, { columnId: '1' }], + }); + const result = await convertToLens(vis, timefilter); + expect(mockGetColumnsFromVis).toBeCalledTimes(1); + expect(result).toBeNull(); + }); + + test('should return null if metric column data type is different from number', async () => { + mockGetColumnsFromVis.mockReturnValue({ + metrics: ['1'], + buckets: [], + columns: [{ columnId: '2' }, { columnId: '1', dataType: 'string' }], + }); + const result = await convertToLens(vis, timefilter); + expect(mockGetColumnsFromVis).toBeCalledTimes(1); + expect(result).toBeNull(); + }); + test('should return correct state for valid vis', async () => { + const config = { + layerType: 'data', + }; + + mockGetColumnsFromVis.mockReturnValue({ + metrics: ['1'], + buckets: [], + columns: [{ columnId: '1', dataType: 'number' }], + columnsWithoutReferenced: [ + { columnId: '1', meta: { aggId: 'agg-1' } }, + { columnId: '2', meta: { aggId: 'agg-2' } }, + ], + }); + mockGetConfiguration.mockReturnValue(config); + + const result = await convertToLens(vis, timefilter); + expect(mockGetColumnsFromVis).toBeCalledTimes(1); + expect(mockGetConfiguration).toBeCalledTimes(1); + expect(mockGetPalette).toBeCalledTimes(1); + expect(mockCreateStaticValueColumn).toBeCalledTimes(2); + expect(result?.type).toEqual('lnsGauge'); + expect(result?.layers.length).toEqual(1); + expect(result?.layers[0]).toEqual( + expect.objectContaining({ + columnOrder: [], + columns: [{ columnId: '1', dataType: 'number' }, {}, {}], + indexPatternId: 'index-pattern', + }) + ); + expect(result?.configuration).toEqual(config); + }); +}); diff --git a/src/plugins/vis_types/gauge/public/convert_to_lens/gauge.ts b/src/plugins/vis_types/gauge/public/convert_to_lens/gauge.ts new file mode 100644 index 0000000000000..be664d3500a7c --- /dev/null +++ b/src/plugins/vis_types/gauge/public/convert_to_lens/gauge.ts @@ -0,0 +1,113 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 uuid from 'uuid'; +import { + Column, + ColumnWithMeta, + PercentageModeConfigWithMinMax, +} from '@kbn/visualizations-plugin/common'; +import { + convertToLensModule, + getDataViewByIndexPatternId, +} from '@kbn/visualizations-plugin/public'; +import { getDataViewsStart } from '../services'; +import { ConvertGaugeVisToLensVisualization } from './types'; + +export const isColumnWithMeta = (column: Column): column is ColumnWithMeta => { + if ((column as ColumnWithMeta).meta) { + return true; + } + return false; +}; + +export const excludeMetaFromColumn = (column: Column) => { + if (isColumnWithMeta(column)) { + const { meta, ...rest } = column; + return rest; + } + return column; +}; + +export const convertToLens: ConvertGaugeVisToLensVisualization = async (vis, timefilter) => { + if (!timefilter) { + return null; + } + + const dataViews = getDataViewsStart(); + const dataView = await getDataViewByIndexPatternId(vis.data.indexPattern?.id, dataViews); + + if (!dataView) { + return null; + } + + const [ + { getColumnsFromVis, createStaticValueColumn, getPalette, getPercentageModeConfig }, + { getConfiguration }, + ] = await Promise.all([convertToLensModule, import('./configurations/gauge')]); + + const percentageModeConfig = getPercentageModeConfig(vis.params.gauge, false); + + const result = getColumnsFromVis( + vis, + timefilter, + dataView, + { + unsupported: ['group'], + }, + { dropEmptyRowsInDateHistogram: true, ...percentageModeConfig } + ); + + if (result === null) { + return null; + } + + // for now, multiple metrics are not supported + if (result.metrics.length > 1 || result.buckets.length) { + return null; + } + + if (result.metrics[0]) { + const metric = result.columns.find(({ columnId }) => columnId === result.metrics[0]); + if (metric?.dataType !== 'number') { + return null; + } + } + + const layerId = uuid(); + const indexPatternId = dataView.id!; + + const metricAccessor = result.metrics[0]; + const { min, max, isPercentageMode } = percentageModeConfig as PercentageModeConfigWithMinMax; + const minColumn = createStaticValueColumn(isPercentageMode ? 0 : min); + const maxColumn = createStaticValueColumn(isPercentageMode ? 1 : max); + const columns = [...result.columns, minColumn, maxColumn]; + + return { + type: 'lnsGauge', + layers: [ + { + indexPatternId, + layerId, + columns: columns.map(excludeMetaFromColumn), + columnOrder: [], + }, + ], + configuration: getConfiguration( + layerId, + vis.params, + getPalette(vis.params.gauge, percentageModeConfig, true), + { + metricAccessor, + minAccessor: minColumn.columnId, + maxAccessor: maxColumn.columnId, + } + ), + indexPatternIds: [indexPatternId], + }; +}; diff --git a/src/plugins/vis_types/gauge/public/convert_to_lens/goal.test.ts b/src/plugins/vis_types/gauge/public/convert_to_lens/goal.test.ts new file mode 100644 index 0000000000000..4d9247293e7a8 --- /dev/null +++ b/src/plugins/vis_types/gauge/public/convert_to_lens/goal.test.ts @@ -0,0 +1,168 @@ +/* + * Copyright 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 { ColorSchemas } from '@kbn/charts-plugin/common'; +import { Vis } from '@kbn/visualizations-plugin/public'; +import { convertToLens } from './goal'; +import { GaugeVisParams } from '../types'; + +const mockGetColumnsFromVis = jest.fn(); +const mockGetPercentageColumnFormulaColumn = jest.fn(); +const mockGetConfiguration = jest.fn().mockReturnValue({}); +const mockGetPercentageModeConfig = jest.fn(); +const mockGetPalette = jest.fn(); +const mockCreateStaticValueColumn = jest.fn(); + +jest.mock('../services', () => ({ + getDataViewsStart: jest.fn(() => ({ get: () => ({}), getDefault: () => ({}) })), +})); + +jest.mock('@kbn/visualizations-plugin/public', () => ({ + convertToLensModule: Promise.resolve({ + getColumnsFromVis: jest.fn(() => mockGetColumnsFromVis()), + getPercentageColumnFormulaColumn: jest.fn(() => mockGetPercentageColumnFormulaColumn()), + getPercentageModeConfig: jest.fn(() => mockGetPercentageModeConfig()), + getPalette: jest.fn(() => mockGetPalette()), + createStaticValueColumn: jest.fn(() => mockCreateStaticValueColumn()), + }), + getDataViewByIndexPatternId: jest.fn(() => ({ id: 'index-pattern' })), +})); + +jest.mock('./configurations/goal', () => ({ + getConfiguration: jest.fn(() => mockGetConfiguration()), +})); + +const params: GaugeVisParams = { + addTooltip: false, + addLegend: false, + isDisplayWarning: true, + gauge: { + type: 'meter', + orientation: 'vertical', + alignment: 'automatic', + gaugeType: 'Arc', + scale: { + color: 'rgba(105,112,125,0.2)', + labels: false, + show: false, + }, + gaugeStyle: 'Full', + extendRange: false, + backStyle: 'Full', + percentageMode: false, + percentageFormatPattern: '', + colorSchema: ColorSchemas.Greys, + colorsRange: [], + labels: {}, + invertColors: false, + style: { + bgFill: '', + bgColor: false, + labelColor: false, + subText: '', + fontSize: 10, + }, + }, + type: 'gauge', +}; + +const vis = { + isHierarchical: () => false, + type: {}, + params, + data: {}, +} as unknown as Vis; + +const timefilter = { + getAbsoluteTime: () => {}, +} as any; + +describe('convertToLens', () => { + beforeEach(() => { + mockGetPercentageModeConfig.mockReturnValue({ + isPercentageMode: false, + min: 0, + max: 100, + }); + mockCreateStaticValueColumn.mockReturnValue({}); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + test('should return null if getColumnsFromVis returns null', async () => { + mockGetColumnsFromVis.mockReturnValue(null); + const result = await convertToLens(vis, timefilter); + expect(mockGetColumnsFromVis).toBeCalledTimes(1); + expect(result).toBeNull(); + }); + + test('should return null if metrics count is more than 1', async () => { + mockGetColumnsFromVis.mockReturnValue({ + metrics: ['1', '2'], + columns: [{ columnId: '2' }, { columnId: '1' }], + }); + const result = await convertToLens(vis, timefilter); + expect(mockGetColumnsFromVis).toBeCalledTimes(1); + expect(result).toBeNull(); + }); + test('should return null if buckets count is more than 1', async () => { + mockGetColumnsFromVis.mockReturnValue({ + metrics: [], + buckets: ['1', '2'], + columns: [{ columnId: '2' }, { columnId: '1' }], + }); + const result = await convertToLens(vis, timefilter); + expect(mockGetColumnsFromVis).toBeCalledTimes(1); + expect(result).toBeNull(); + }); + + test('should return null if metric column data type is different from number', async () => { + mockGetColumnsFromVis.mockReturnValue({ + metrics: ['1'], + buckets: ['2'], + columns: [{ columnId: '2' }, { columnId: '1', dataType: 'string' }], + }); + const result = await convertToLens(vis, timefilter); + expect(mockGetColumnsFromVis).toBeCalledTimes(1); + expect(result).toBeNull(); + }); + test('should return correct state for valid vis', async () => { + const config = { + layerType: 'data', + metricAccessor: '1', + }; + + mockGetColumnsFromVis.mockReturnValue({ + metrics: ['1'], + buckets: ['2'], + columns: [{ columnId: '2' }, { columnId: '1', dataType: 'number' }], + columnsWithoutReferenced: [ + { columnId: '1', meta: { aggId: 'agg-1' } }, + { columnId: '2', meta: { aggId: 'agg-2' } }, + ], + }); + mockGetConfiguration.mockReturnValue(config); + + const result = await convertToLens(vis, timefilter); + expect(mockGetColumnsFromVis).toBeCalledTimes(1); + expect(mockGetConfiguration).toBeCalledTimes(1); + expect(mockGetPalette).toBeCalledTimes(1); + expect(result?.type).toEqual('lnsMetric'); + expect(result?.layers.length).toEqual(1); + expect(result?.layers[0]).toEqual( + expect.objectContaining({ + columnOrder: [], + columns: [{ columnId: '2' }, { columnId: '1', dataType: 'number' }, {}], + indexPatternId: 'index-pattern', + }) + ); + expect(result?.configuration).toEqual(config); + }); +}); diff --git a/src/plugins/vis_types/gauge/public/convert_to_lens/goal.ts b/src/plugins/vis_types/gauge/public/convert_to_lens/goal.ts new file mode 100644 index 0000000000000..a57dfedb02581 --- /dev/null +++ b/src/plugins/vis_types/gauge/public/convert_to_lens/goal.ts @@ -0,0 +1,109 @@ +/* + * Copyright 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 uuid from 'uuid'; +import { + Column, + ColumnWithMeta, + PercentageModeConfigWithMinMax, +} from '@kbn/visualizations-plugin/common'; +import { + convertToLensModule, + getDataViewByIndexPatternId, +} from '@kbn/visualizations-plugin/public'; +import { getDataViewsStart } from '../services'; +import { ConvertGoalVisToLensVisualization } from './types'; + +export const isColumnWithMeta = (column: Column): column is ColumnWithMeta => { + if ((column as ColumnWithMeta).meta) { + return true; + } + return false; +}; + +export const excludeMetaFromColumn = (column: Column) => { + if (isColumnWithMeta(column)) { + const { meta, ...rest } = column; + return rest; + } + return column; +}; + +export const convertToLens: ConvertGoalVisToLensVisualization = async (vis, timefilter) => { + if (!timefilter) { + return null; + } + + const dataViews = getDataViewsStart(); + const dataView = await getDataViewByIndexPatternId(vis.data.indexPattern?.id, dataViews); + + if (!dataView) { + return null; + } + + const [ + { getColumnsFromVis, getPalette, getPercentageModeConfig, createStaticValueColumn }, + { getConfiguration }, + ] = await Promise.all([convertToLensModule, import('./configurations/goal')]); + + const percentageModeConfig = getPercentageModeConfig(vis.params.gauge, false); + + const result = getColumnsFromVis( + vis, + timefilter, + dataView, + { + splits: ['group'], + }, + { dropEmptyRowsInDateHistogram: true, ...percentageModeConfig } + ); + + if (result === null) { + return null; + } + + // for now, multiple metrics are not supported + if (result.metrics.length > 1 || result.buckets.length > 1) { + return null; + } + + if (result.metrics[0]) { + const metric = result.columns.find(({ columnId }) => columnId === result.metrics[0]); + if (metric?.dataType !== 'number') { + return null; + } + } + const { isPercentageMode, max } = percentageModeConfig as PercentageModeConfigWithMinMax; + const maxColumn = createStaticValueColumn(isPercentageMode ? 1 : max); + + const columns = [...result.columns, maxColumn]; + const layerId = uuid(); + const indexPatternId = dataView.id!; + + return { + type: 'lnsMetric', + layers: [ + { + indexPatternId, + layerId, + columns: columns.map(excludeMetaFromColumn), + columnOrder: [], + }, + ], + configuration: getConfiguration( + layerId, + vis.params, + getPalette(vis.params.gauge, percentageModeConfig, true), + { + ...result, + maxAccessor: maxColumn.columnId, + } + ), + indexPatternIds: [indexPatternId], + }; +}; diff --git a/src/plugins/vis_types/metric/public/utils/index.ts b/src/plugins/vis_types/gauge/public/convert_to_lens/index.ts similarity index 74% rename from src/plugins/vis_types/metric/public/utils/index.ts rename to src/plugins/vis_types/gauge/public/convert_to_lens/index.ts index fb23c97d835fe..6bbf661086a54 100644 --- a/src/plugins/vis_types/metric/public/utils/index.ts +++ b/src/plugins/vis_types/gauge/public/convert_to_lens/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { getStopsWithColorsFromRanges } from './palette'; +export { convertToLens as convertGaugeToLens } from './gauge'; +export { convertToLens as convertGoalToLens } from './goal'; diff --git a/src/plugins/vis_types/gauge/public/convert_to_lens/types.ts b/src/plugins/vis_types/gauge/public/convert_to_lens/types.ts new file mode 100644 index 0000000000000..522c2931e3c0e --- /dev/null +++ b/src/plugins/vis_types/gauge/public/convert_to_lens/types.ts @@ -0,0 +1,26 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { TimefilterContract } from '@kbn/data-plugin/public'; +import { + NavigateToLensContext, + GaugeVisConfiguration, + MetricVisConfiguration, +} from '@kbn/visualizations-plugin/common'; +import { Vis } from '@kbn/visualizations-plugin/public'; +import { GaugeVisParams } from '../types'; + +export type ConvertGaugeVisToLensVisualization = ( + vis: Vis, + timefilter?: TimefilterContract +) => Promise | null>; + +export type ConvertGoalVisToLensVisualization = ( + vis: Vis, + timefilter?: TimefilterContract +) => Promise | null>; diff --git a/src/plugins/vis_types/gauge/public/plugin.ts b/src/plugins/vis_types/gauge/public/plugin.ts index 1db42c7cc01df..16e7a0a818487 100755 --- a/src/plugins/vis_types/gauge/public/plugin.ts +++ b/src/plugins/vis_types/gauge/public/plugin.ts @@ -6,12 +6,14 @@ * Side Public License, v 1. */ +import { CoreSetup, CoreStart } from '@kbn/core/public'; import { VisualizationsSetup } from '@kbn/visualizations-plugin/public'; import { DataPublicPluginStart } from '@kbn/data-plugin/public'; -import { CoreSetup } from '@kbn/core/public'; +import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { LEGACY_GAUGE_CHARTS_LIBRARY } from '../common'; import { VisTypeGaugePluginSetup } from './types'; import { gaugeVisType, goalVisType } from './vis_type'; +import { setDataViewsStart } from './services'; /** @internal */ export interface VisTypeGaugeSetupDependencies { @@ -19,13 +21,14 @@ export interface VisTypeGaugeSetupDependencies { } /** @internal */ -export interface VisTypePiePluginStartDependencies { +export interface VisTypeGaugePluginStartDependencies { data: DataPublicPluginStart; + dataViews: DataViewsPublicPluginStart; } export class VisTypeGaugePlugin { public setup( - core: CoreSetup, + core: CoreSetup, { visualizations }: VisTypeGaugeSetupDependencies ): VisTypeGaugePluginSetup { if (!core.uiSettings.get(LEGACY_GAUGE_CHARTS_LIBRARY)) { @@ -37,5 +40,7 @@ export class VisTypeGaugePlugin { return {}; } - public start() {} + public start(core: CoreStart, { dataViews }: VisTypeGaugePluginStartDependencies) { + setDataViewsStart(dataViews); + } } diff --git a/src/plugins/vis_types/gauge/public/services.ts b/src/plugins/vis_types/gauge/public/services.ts new file mode 100644 index 0000000000000..736ad70d49419 --- /dev/null +++ b/src/plugins/vis_types/gauge/public/services.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { createGetterSetter } from '@kbn/kibana-utils-plugin/public'; +import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; + +export const [getDataViewsStart, setDataViewsStart] = + createGetterSetter('dataViews'); diff --git a/src/plugins/vis_types/gauge/public/to_ast.ts b/src/plugins/vis_types/gauge/public/to_ast.ts index 697b9790468a3..8f7576b0b80c4 100644 --- a/src/plugins/vis_types/gauge/public/to_ast.ts +++ b/src/plugins/vis_types/gauge/public/to_ast.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import { getStopsWithColorsFromRanges } from '@kbn/visualizations-plugin/common/utils'; import { getVisSchemas, SchemaConfig, VisToExpressionAst } from '@kbn/visualizations-plugin/public'; import { buildExpression, buildExpressionFunction } from '@kbn/expressions-plugin/public'; import type { @@ -13,7 +14,6 @@ import type { GaugeShape, } from '@kbn/expression-gauge-plugin/common'; import { GaugeType, GaugeVisParams } from './types'; -import { getStopsWithColorsFromRanges } from './utils'; const prepareDimension = (params: SchemaConfig) => { const visdimension = buildExpressionFunction('visdimension', { accessor: params.accessor }); diff --git a/src/plugins/vis_types/gauge/public/vis_type/gauge.tsx b/src/plugins/vis_types/gauge/public/vis_type/gauge.tsx index b6bdf93a8ea89..d2e722c88717a 100644 --- a/src/plugins/vis_types/gauge/public/vis_type/gauge.tsx +++ b/src/plugins/vis_types/gauge/public/vis_type/gauge.tsx @@ -18,6 +18,7 @@ import { toExpressionAst } from '../to_ast'; import { getGaugeOptions } from '../editor/components'; import { GaugeVisParams } from '../types'; import { SplitTooltip } from './split_tooltip'; +import { convertGaugeToLens } from '../convert_to_lens'; export const getGaugeVisTypeDefinition = ( props: GaugeTypeProps @@ -130,4 +131,10 @@ export const getGaugeVisTypeDefinition = ( ], }, requiresSearch: true, + navigateToLens: async (vis, timefilter) => (vis ? convertGaugeToLens(vis, timefilter) : null), + getExpressionVariables: async (vis, timeFilter) => { + return { + canNavigateToLens: Boolean(vis?.params ? await convertGaugeToLens(vis, timeFilter) : null), + }; + }, }); diff --git a/src/plugins/vis_types/gauge/public/vis_type/goal.tsx b/src/plugins/vis_types/gauge/public/vis_type/goal.tsx index c43e9c8cd46f5..1e63652f5bd5f 100644 --- a/src/plugins/vis_types/gauge/public/vis_type/goal.tsx +++ b/src/plugins/vis_types/gauge/public/vis_type/goal.tsx @@ -17,6 +17,7 @@ import { getGaugeOptions } from '../editor/components'; import { toExpressionAst } from '../to_ast'; import { GaugeVisParams, GaugeType, GaugeTypeProps } from '../types'; import { SplitTooltip } from './split_tooltip'; +import { convertGoalToLens } from '../convert_to_lens'; export const getGoalVisTypeDefinition = ( props: GaugeTypeProps @@ -122,4 +123,10 @@ export const getGoalVisTypeDefinition = ( ], }, requiresSearch: true, + navigateToLens: async (vis, timefilter) => (vis ? convertGoalToLens(vis, timefilter) : null), + getExpressionVariables: async (vis, timeFilter) => { + return { + canNavigateToLens: Boolean(vis?.params ? await convertGoalToLens(vis, timeFilter) : null), + }; + }, }); diff --git a/src/plugins/vis_types/metric/public/convert_to_lens/configurations/index.test.ts b/src/plugins/vis_types/metric/public/convert_to_lens/configurations/index.test.ts index 97fb145e74a2f..29669c0286529 100644 --- a/src/plugins/vis_types/metric/public/convert_to_lens/configurations/index.test.ts +++ b/src/plugins/vis_types/metric/public/convert_to_lens/configurations/index.test.ts @@ -7,15 +7,10 @@ */ import { ColorSchemas } from '@kbn/charts-plugin/common'; -import { getConfiguration, getPercentageModeConfig } from '.'; +import { CustomPaletteParams, PaletteOutput } from '@kbn/coloring'; +import { getConfiguration } from '.'; import { VisParams } from '../../types'; -const mockGetPalette = jest.fn(); - -jest.mock('./palette', () => ({ - getPalette: jest.fn(() => mockGetPalette()), -})); - const params: VisParams = { addTooltip: false, addLegend: false, @@ -38,25 +33,12 @@ const params: VisParams = { type: 'metric', }; -describe('getPercentageModeConfig', () => { - test('should return falsy percentage mode if percentage mode is off', () => { - expect(getPercentageModeConfig(params)).toEqual({ isPercentageMode: false }); - }); - - test('should return percentage mode config', () => { - expect( - getPercentageModeConfig({ ...params, metric: { ...params.metric, percentageMode: true } }) - ).toEqual({ isPercentageMode: true, min: 0, max: 300 }); - }); -}); - describe('getConfiguration', () => { - const palette = { name: 'custom', params: { name: 'custom' }, type: 'palette' }; - - beforeEach(() => { - jest.clearAllMocks(); - mockGetPalette.mockReturnValue(palette); - }); + const palette = { + name: 'custom', + params: { name: 'custom' }, + type: 'palette', + } as PaletteOutput; test('shourd return correct configuration', () => { const layerId = 'layer-id'; @@ -64,7 +46,7 @@ describe('getConfiguration', () => { const bucket = 'bucket-id'; const collapseFn = 'sum'; expect( - getConfiguration(layerId, params, { + getConfiguration(layerId, params, palette, { metrics: [metric], buckets: [bucket], columnsWithoutReferenced: [], @@ -78,6 +60,5 @@ describe('getConfiguration', () => { metricAccessor: metric, palette, }); - expect(mockGetPalette).toBeCalledTimes(1); }); }); diff --git a/src/plugins/vis_types/metric/public/convert_to_lens/configurations/index.ts b/src/plugins/vis_types/metric/public/convert_to_lens/configurations/index.ts index 39e001c1b87b8..ae62b82408eeb 100644 --- a/src/plugins/vis_types/metric/public/convert_to_lens/configurations/index.ts +++ b/src/plugins/vis_types/metric/public/convert_to_lens/configurations/index.ts @@ -6,26 +6,14 @@ * Side Public License, v 1. */ +import { CustomPaletteParams, PaletteOutput } from '@kbn/coloring'; import { Column, MetricVisConfiguration } from '@kbn/visualizations-plugin/common'; -import { PercentageModeConfig } from '@kbn/visualizations-plugin/common/convert_to_lens'; import { VisParams } from '../../types'; -import { getPalette } from './palette'; - -export const getPercentageModeConfig = (params: VisParams): PercentageModeConfig => { - if (!params.metric.percentageMode) { - return { isPercentageMode: false }; - } - const { colorsRange } = params.metric; - return { - isPercentageMode: true, - min: colorsRange[0].from, - max: colorsRange[colorsRange.length - 1].to, - }; -}; export const getConfiguration = ( layerId: string, params: VisParams, + palette: PaletteOutput | undefined, { metrics, buckets, @@ -43,7 +31,7 @@ export const getConfiguration = ( return { layerId, layerType: 'data', - palette: getPalette(params), + palette: params.metric.metricColorMode !== 'None' ? palette : undefined, metricAccessor, breakdownByAccessor, collapseFn: Object.values(bucketCollapseFn ?? {})[0], diff --git a/src/plugins/vis_types/metric/public/convert_to_lens/configurations/palette.test.ts b/src/plugins/vis_types/metric/public/convert_to_lens/configurations/palette.test.ts deleted file mode 100644 index 7458a78b7b554..0000000000000 --- a/src/plugins/vis_types/metric/public/convert_to_lens/configurations/palette.test.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { ColorSchemas } from '@kbn/charts-plugin/common'; -import { VisParams } from '../../types'; -import { getPalette } from './palette'; - -describe('getPalette', () => { - const params: VisParams = { - addTooltip: false, - addLegend: false, - dimensions: {} as VisParams['dimensions'], - metric: { - percentageMode: false, - percentageFormatPattern: '', - useRanges: true, - colorSchema: ColorSchemas.Greys, - metricColorMode: 'Labels', - colorsRange: [ - { type: 'range', from: 0, to: 100 }, - { type: 'range', from: 100, to: 200 }, - { type: 'range', from: 200, to: 300 }, - ], - labels: {}, - invertColors: false, - style: {} as VisParams['metric']['style'], - }, - type: 'metric', - }; - - test('should return undefined if metricColorMode is `None`', () => { - const metricColorMode = 'None'; - const paramsWithNoneMetricColorMode: VisParams = { - ...params, - metric: { ...params.metric, metricColorMode }, - }; - expect(getPalette(paramsWithNoneMetricColorMode)).toBeUndefined(); - }); - - test('should return undefined if empty color ranges were passed', () => { - const paramsWithNoneMetricColorMode: VisParams = { - ...params, - metric: { ...params.metric, colorsRange: [] }, - }; - expect(getPalette(paramsWithNoneMetricColorMode)).toBeUndefined(); - }); - - test('should return correct palette', () => { - expect(getPalette(params)).toEqual({ - name: 'custom', - params: { - colorStops: [ - { color: '#FFFFFF', stop: 0 }, - { color: '#979797', stop: 100 }, - { color: '#000000', stop: 200 }, - ], - continuity: 'none', - maxSteps: 5, - name: 'custom', - progression: 'fixed', - rangeMax: 300, - rangeMin: 0, - rangeType: 'number', - reverse: false, - stops: [ - { color: '#FFFFFF', stop: 100 }, - { color: '#979797', stop: 200 }, - { color: '#000000', stop: 300 }, - ], - }, - type: 'palette', - }); - }); -}); diff --git a/src/plugins/vis_types/metric/public/convert_to_lens/configurations/palette.ts b/src/plugins/vis_types/metric/public/convert_to_lens/configurations/palette.ts deleted file mode 100644 index 360de60199efa..0000000000000 --- a/src/plugins/vis_types/metric/public/convert_to_lens/configurations/palette.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import color from 'color'; -import { CustomPaletteParams, PaletteOutput } from '@kbn/coloring'; -import { VisParams } from '../../types'; -import { getStopsWithColorsFromRanges } from '../../utils'; -import { PaletteConfig } from '../../utils/palette'; - -type ColorStopsWithMinMax = Pick< - CustomPaletteParams, - 'colorStops' | 'stops' | 'steps' | 'rangeMax' | 'rangeMin' | 'continuity' ->; - -const buildPaletteParams = ({ color: colors, stop }: PaletteConfig): ColorStopsWithMinMax => { - const colorsWithoutStartColor = colors.slice(1, colors.length); - return { - rangeMin: stop[0], - rangeMax: stop[stop.length - 1], - continuity: 'none', - colorStops: colorsWithoutStartColor.map((c, index) => ({ - color: color(c!).hex(), - stop: stop[index], - })), - stops: colorsWithoutStartColor.map((c, index) => ({ - color: color(c!).hex(), - stop: stop[index + 1], - })), - }; -}; - -const buildCustomPalette = ( - colorStopsWithMinMax: ColorStopsWithMinMax -): PaletteOutput => { - return { - name: 'custom', - params: { - maxSteps: 5, - name: 'custom', - progression: 'fixed', - rangeMax: Infinity, - rangeMin: -Infinity, - rangeType: 'number', - reverse: false, - ...colorStopsWithMinMax, - }, - type: 'palette', - }; -}; - -export const getPalette = (params: VisParams): PaletteOutput | undefined => { - const { colorSchema, colorsRange, invertColors, metricColorMode } = params.metric; - - if (metricColorMode === 'None' || !(colorsRange && colorsRange.length)) { - return; - } - - const stopsWithColors = getStopsWithColorsFromRanges(colorsRange, colorSchema, invertColors); - return buildCustomPalette(buildPaletteParams(stopsWithColors)); -}; diff --git a/src/plugins/vis_types/metric/public/convert_to_lens/index.test.ts b/src/plugins/vis_types/metric/public/convert_to_lens/index.test.ts index 015b19157e91a..e0c50cad16719 100644 --- a/src/plugins/vis_types/metric/public/convert_to_lens/index.test.ts +++ b/src/plugins/vis_types/metric/public/convert_to_lens/index.test.ts @@ -15,6 +15,7 @@ const mockGetColumnsFromVis = jest.fn(); const mockGetPercentageColumnFormulaColumn = jest.fn(); const mockGetConfiguration = jest.fn().mockReturnValue({}); const mockGetPercentageModeConfig = jest.fn(); +const mockGetPalette = jest.fn(); jest.mock('../services', () => ({ getDataViewsStart: jest.fn(() => ({ get: () => ({}), getDefault: () => ({}) })), @@ -24,13 +25,14 @@ jest.mock('@kbn/visualizations-plugin/public', () => ({ convertToLensModule: Promise.resolve({ getColumnsFromVis: jest.fn(() => mockGetColumnsFromVis()), getPercentageColumnFormulaColumn: jest.fn(() => mockGetPercentageColumnFormulaColumn()), + getPercentageModeConfig: jest.fn(() => mockGetPercentageModeConfig()), + getPalette: jest.fn(() => mockGetPalette()), }), getDataViewByIndexPatternId: jest.fn(() => ({ id: 'index-pattern' })), })); jest.mock('./configurations', () => ({ getConfiguration: jest.fn(() => mockGetConfiguration()), - getPercentageModeConfig: jest.fn(() => mockGetPercentageModeConfig()), })); const params: VisParams = { @@ -130,7 +132,7 @@ describe('convertToLens', () => { const result = await convertToLens(vis, timefilter); expect(mockGetColumnsFromVis).toBeCalledTimes(1); expect(mockGetConfiguration).toBeCalledTimes(1); - + expect(mockGetPalette).toBeCalledTimes(1); expect(result?.type).toEqual('lnsMetric'); expect(result?.layers.length).toEqual(1); expect(result?.layers[0]).toEqual( diff --git a/src/plugins/vis_types/metric/public/convert_to_lens/index.ts b/src/plugins/vis_types/metric/public/convert_to_lens/index.ts index 7675cbcc1d714..55f9e500b0a29 100644 --- a/src/plugins/vis_types/metric/public/convert_to_lens/index.ts +++ b/src/plugins/vis_types/metric/public/convert_to_lens/index.ts @@ -6,12 +6,12 @@ * Side Public License, v 1. */ +import uuid from 'uuid'; import { Column, ColumnWithMeta } from '@kbn/visualizations-plugin/common'; import { convertToLensModule, getDataViewByIndexPatternId, } from '@kbn/visualizations-plugin/public'; -import uuid from 'uuid'; import { getDataViewsStart } from '../services'; import { ConvertMetricVisToLensVisualization } from './types'; @@ -42,11 +42,10 @@ export const convertToLens: ConvertMetricVisToLensVisualization = async (vis, ti return null; } - const [{ getColumnsFromVis }, { getConfiguration, getPercentageModeConfig }] = await Promise.all([ - convertToLensModule, - import('./configurations'), - ]); + const [{ getColumnsFromVis, getPalette, getPercentageModeConfig }, { getConfiguration }] = + await Promise.all([convertToLensModule, import('./configurations')]); + const percentageModeConfig = getPercentageModeConfig(vis.params.metric); const result = getColumnsFromVis( vis, timefilter, @@ -54,7 +53,7 @@ export const convertToLens: ConvertMetricVisToLensVisualization = async (vis, ti { splits: ['group'], }, - { dropEmptyRowsInDateHistogram: true, ...getPercentageModeConfig(vis.params) } + { dropEmptyRowsInDateHistogram: true, ...percentageModeConfig } ); if (result === null) { @@ -86,7 +85,12 @@ export const convertToLens: ConvertMetricVisToLensVisualization = async (vis, ti columnOrder: [], }, ], - configuration: getConfiguration(layerId, vis.params, result), + configuration: getConfiguration( + layerId, + vis.params, + getPalette(vis.params.metric, percentageModeConfig), + result + ), indexPatternIds: [indexPatternId], }; }; diff --git a/src/plugins/vis_types/metric/public/to_ast.ts b/src/plugins/vis_types/metric/public/to_ast.ts index 0341d5d7b853b..2f4bed8652c62 100644 --- a/src/plugins/vis_types/metric/public/to_ast.ts +++ b/src/plugins/vis_types/metric/public/to_ast.ts @@ -7,13 +7,13 @@ */ import { get } from 'lodash'; +import { getStopsWithColorsFromRanges } from '@kbn/visualizations-plugin/common/utils'; import { getVisSchemas, SchemaConfig, VisToExpressionAst } from '@kbn/visualizations-plugin/public'; import { buildExpression, buildExpressionFunction } from '@kbn/expressions-plugin/public'; import { inter } from '@kbn/expressions-plugin/common'; import { ColorMode } from '@kbn/charts-plugin/public'; import { VisParams } from './types'; -import { getStopsWithColorsFromRanges } from './utils'; const prepareDimension = (params: SchemaConfig) => { const visdimension = buildExpressionFunction('visdimension', { accessor: params.accessor }); diff --git a/src/plugins/vis_types/metric/public/utils/palette.ts b/src/plugins/vis_types/metric/public/utils/palette.ts deleted file mode 100644 index c17e9ccbce0bb..0000000000000 --- a/src/plugins/vis_types/metric/public/utils/palette.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 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 { ColorSchemas, getHeatmapColors } from '@kbn/charts-plugin/common'; -import { Range } from '@kbn/expressions-plugin/common'; - -export interface PaletteConfig { - color: Array; - stop: number[]; -} - -const TRANSPARENT = 'rgb(0, 0, 0, 0)'; - -const getColor = ( - index: number, - elementsCount: number, - colorSchema: ColorSchemas, - invertColors: boolean = false -) => { - const divider = Math.max(elementsCount - 1, 1); - const value = invertColors ? 1 - index / divider : index / divider; - return getHeatmapColors(value, colorSchema); -}; - -export const getStopsWithColorsFromRanges = ( - ranges: Range[], - colorSchema: ColorSchemas, - invertColors: boolean = false -) => { - return ranges.reduce( - (acc, range, index, rangesArr) => { - if ((index && range.from !== rangesArr[index - 1].to) || index === 0) { - acc.color.push(TRANSPARENT); - acc.stop.push(range.from); - } - - acc.color.push(getColor(index, rangesArr.length, colorSchema, invertColors)); - acc.stop.push(range.to); - - return acc; - }, - { color: [], stop: [] } - ); -}; diff --git a/src/plugins/vis_types/timeseries/public/application/components/aggs/static.js b/src/plugins/vis_types/timeseries/public/application/components/aggs/static.js index 946c2912ae20a..23181594e4c0b 100644 --- a/src/plugins/vis_types/timeseries/public/application/components/aggs/static.js +++ b/src/plugins/vis_types/timeseries/public/application/components/aggs/static.js @@ -76,6 +76,7 @@ export const Static = (props) => { } > { )(await mathAgg(resp, panel, series)((results) => results))([]); } catch (e) { expect(e.message).toEqual( - 'Failed to parse expression. Expected "*", "+", "-", "/", end of input, or whitespace but "(" found.' + 'Failed to parse expression. Expected "*", "+", "-", "/", "<", "=", ">", end of input, or whitespace but "(" found.' ); } }); diff --git a/src/plugins/visualizations/common/convert_to_lens/constants.ts b/src/plugins/visualizations/common/convert_to_lens/constants.ts index 12ed815bc7247..b3af9b9394d67 100644 --- a/src/plugins/visualizations/common/convert_to_lens/constants.ts +++ b/src/plugins/visualizations/common/convert_to_lens/constants.ts @@ -104,3 +104,33 @@ export const RANGE_MODES = { Range: 'range', Histogram: 'histogram', } as const; + +export const GaugeShapes = { + HORIZONTAL_BULLET: 'horizontalBullet', + VERTICAL_BULLET: 'verticalBullet', + ARC: 'arc', + CIRCLE: 'circle', +} as const; + +export const GaugeTicksPositions = { + HIDDEN: 'hidden', + AUTO: 'auto', + BANDS: 'bands', +} as const; + +export const GaugeLabelMajorModes = { + AUTO: 'auto', + CUSTOM: 'custom', + NONE: 'none', +} as const; + +export const GaugeCentralMajorModes = { + AUTO: 'auto', + CUSTOM: 'custom', + NONE: 'none', +} as const; + +export const GaugeColorModes = { + PALETTE: 'palette', + NONE: 'none', +} as const; diff --git a/src/plugins/vis_types/gauge/public/utils/index.ts b/src/plugins/visualizations/common/convert_to_lens/lib/configurations/index.ts similarity index 77% rename from src/plugins/vis_types/gauge/public/utils/index.ts rename to src/plugins/visualizations/common/convert_to_lens/lib/configurations/index.ts index fb23c97d835fe..c4592f50836c5 100644 --- a/src/plugins/vis_types/gauge/public/utils/index.ts +++ b/src/plugins/visualizations/common/convert_to_lens/lib/configurations/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { getStopsWithColorsFromRanges } from './palette'; +export { getPalette } from './palette'; +export { getPercentageModeConfig } from './percentage_mode'; diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/configurations/palette.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/configurations/palette.test.ts new file mode 100644 index 0000000000000..e157803df1edb --- /dev/null +++ b/src/plugins/visualizations/common/convert_to_lens/lib/configurations/palette.test.ts @@ -0,0 +1,112 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { ColorSchemas } from '@kbn/charts-plugin/common'; +import { getPalette } from './palette'; +import { PaletteParams } from './types'; + +describe('getPalette', () => { + const params: PaletteParams = { + colorSchema: ColorSchemas.Greys, + colorsRange: [ + { type: 'range', from: 0, to: 100 }, + { type: 'range', from: 100, to: 200 }, + { type: 'range', from: 200, to: 300 }, + ], + invertColors: false, + }; + + test('should return undefined if empty color ranges were passed', () => { + const paramsWithNoneMetricColorMode: PaletteParams = { + ...params, + colorsRange: [], + }; + expect(getPalette(paramsWithNoneMetricColorMode, { isPercentageMode: false })).toBeUndefined(); + }); + + test('should return correct palette for percentage mode', () => { + expect(getPalette(params, { isPercentageMode: true, min: 0, max: 300 })).toEqual({ + name: 'custom', + params: { + colorStops: [ + { color: '#FFFFFF', stop: 0 }, + { color: '#979797', stop: 0.3333333333333333 }, + { color: '#000000', stop: 0.6666666666666666 }, + ], + continuity: 'none', + maxSteps: 5, + name: 'custom', + progression: 'fixed', + rangeMax: 1, + rangeMin: 0, + rangeType: 'number', + reverse: false, + stops: [ + { color: '#FFFFFF', stop: 0.3333333333333333 }, + { color: '#979797', stop: 0.6666666666666666 }, + { color: '#000000', stop: 1 }, + ], + }, + type: 'palette', + }); + }); + + test('should return correct palette for percentage mode with percent range type', () => { + expect(getPalette(params, { isPercentageMode: true, min: 0, max: 300 }, true)).toEqual({ + name: 'custom', + params: { + colorStops: [ + { color: '#FFFFFF', stop: 0 }, + { color: '#979797', stop: 33.33333333333333 }, + { color: '#000000', stop: 66.66666666666666 }, + ], + continuity: 'none', + maxSteps: 5, + name: 'custom', + progression: 'fixed', + rangeMax: 100, + rangeMin: 0, + rangeType: 'percent', + reverse: false, + stops: [ + { color: '#FFFFFF', stop: 33.33333333333333 }, + { color: '#979797', stop: 66.66666666666666 }, + { color: '#000000', stop: 100 }, + ], + }, + type: 'palette', + }); + }); + + test('should return correct palette', () => { + expect(getPalette(params, { isPercentageMode: false, min: 0, max: 300 })).toEqual({ + name: 'custom', + params: { + colorStops: [ + { color: '#FFFFFF', stop: 0 }, + { color: '#979797', stop: 100 }, + { color: '#000000', stop: 200 }, + ], + continuity: 'none', + maxSteps: 5, + name: 'custom', + progression: 'fixed', + rangeMax: 300, + rangeMin: 0, + rangeType: 'number', + reverse: false, + stops: [ + { color: '#FFFFFF', stop: 100 }, + { color: '#979797', stop: 200 }, + { color: '#000000', stop: 300 }, + ], + }, + type: 'palette', + }); + }); +}); diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/configurations/palette.ts b/src/plugins/visualizations/common/convert_to_lens/lib/configurations/palette.ts new file mode 100644 index 0000000000000..a89177c914996 --- /dev/null +++ b/src/plugins/visualizations/common/convert_to_lens/lib/configurations/palette.ts @@ -0,0 +1,97 @@ +/* + * Copyright 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 color from 'color'; +import { CustomPaletteParams, PaletteOutput } from '@kbn/coloring'; +import { getStopsWithColorsFromRanges, PaletteConfig } from '../../../utils'; +import { PaletteParams } from './types'; +import { PercentageModeConfig, PercentageModeConfigWithMinMax } from '../../types'; + +type ColorStopsWithMinMax = Pick< + CustomPaletteParams, + 'colorStops' | 'stops' | 'steps' | 'rangeMax' | 'rangeMin' | 'continuity' +>; + +const buildPaletteParams = ({ color: colors, stop }: PaletteConfig): ColorStopsWithMinMax => { + const colorsWithoutStartColor = colors.slice(1, colors.length); + return { + rangeMin: stop[0], + rangeMax: stop[stop.length - 1], + continuity: 'none', + colorStops: colorsWithoutStartColor.map((c, index) => ({ + color: color(c!).hex(), + stop: stop[index], + })), + stops: colorsWithoutStartColor.map((c, index) => ({ + color: color(c!).hex(), + stop: stop[index + 1], + })), + }; +}; + +const buildCustomPalette = ( + colorStopsWithMinMax: ColorStopsWithMinMax, + isPercentRangeType: boolean = false +): PaletteOutput => { + return { + name: 'custom', + params: { + maxSteps: 5, + name: 'custom', + progression: 'fixed', + rangeMax: Infinity, + rangeMin: -Infinity, + rangeType: isPercentRangeType ? 'percent' : 'number', + reverse: false, + ...colorStopsWithMinMax, + }, + type: 'palette', + }; +}; + +const convertToPercents = ( + value: number, + { min, max }: PercentageModeConfigWithMinMax, + isPercentPaletteSupported: boolean +) => { + const percent = (value - min) / (max - min); + return isPercentPaletteSupported ? percent * 100 : percent; +}; + +const convertToPercentColorStops = ( + colorStops: PaletteConfig, + percentageModeConfig: PercentageModeConfigWithMinMax, + isPercentPaletteSupported: boolean = false +) => { + const stop = colorStops.stop.map((stopValue) => + convertToPercents(stopValue, percentageModeConfig, isPercentPaletteSupported) + ); + return { ...colorStops, stop }; +}; + +export const getPalette = ( + params: PaletteParams, + percentageModeConfig: PercentageModeConfig, + isPercentPaletteSupported: boolean = false +): PaletteOutput | undefined => { + const { colorSchema, colorsRange, invertColors } = params; + + if (!(colorsRange && colorsRange.length)) { + return; + } + + const stopsWithColors = getStopsWithColorsFromRanges(colorsRange, colorSchema, invertColors); + const percentStopsWithColors = percentageModeConfig.isPercentageMode + ? convertToPercentColorStops(stopsWithColors, percentageModeConfig, isPercentPaletteSupported) + : stopsWithColors; + + return buildCustomPalette( + buildPaletteParams(percentStopsWithColors), + isPercentPaletteSupported && percentageModeConfig.isPercentageMode + ); +}; diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/configurations/percentage_mode.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/configurations/percentage_mode.test.ts new file mode 100644 index 0000000000000..f148bffc6ea88 --- /dev/null +++ b/src/plugins/visualizations/common/convert_to_lens/lib/configurations/percentage_mode.test.ts @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { ColorSchemas } from '@kbn/charts-plugin/common'; +import { getPercentageModeConfig } from './percentage_mode'; +import { ExtendedPaletteParams } from './types'; + +const params: ExtendedPaletteParams = { + percentageMode: false, + colorSchema: ColorSchemas.Greys, + colorsRange: [ + { type: 'range', from: 0, to: 100 }, + { type: 'range', from: 100, to: 200 }, + { type: 'range', from: 200, to: 300 }, + ], + invertColors: false, +}; + +describe('getPercentageModeConfig', () => { + test('should return falsy percentage mode if percentage mode is off', () => { + expect(getPercentageModeConfig(params)).toEqual({ isPercentageMode: false }); + }); + + test('should return percentage mode config', () => { + expect(getPercentageModeConfig({ ...params, percentageMode: true })).toEqual({ + isPercentageMode: true, + min: 0, + max: 300, + }); + }); +}); diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/configurations/percentage_mode.ts b/src/plugins/visualizations/common/convert_to_lens/lib/configurations/percentage_mode.ts new file mode 100644 index 0000000000000..d375856c620fe --- /dev/null +++ b/src/plugins/visualizations/common/convert_to_lens/lib/configurations/percentage_mode.ts @@ -0,0 +1,30 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { PercentageModeConfig } from '../../types'; +import { ExtendedPaletteParams } from './types'; + +export const getPercentageModeConfig = ( + params: ExtendedPaletteParams, + respectPercentageMode: boolean = true +): PercentageModeConfig => { + const { colorsRange } = params; + const minMax = { + min: colorsRange[0].from, + max: colorsRange[colorsRange.length - 1].to, + }; + if (!params.percentageMode) { + return respectPercentageMode + ? { isPercentageMode: false } + : { isPercentageMode: false, ...minMax }; + } + return { + isPercentageMode: true, + ...minMax, + }; +}; diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/configurations/types.ts b/src/plugins/visualizations/common/convert_to_lens/lib/configurations/types.ts new file mode 100644 index 0000000000000..9bc19946b769f --- /dev/null +++ b/src/plugins/visualizations/common/convert_to_lens/lib/configurations/types.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Range } from '@kbn/expressions-plugin/common'; +import { ColorSchemas } from '@kbn/charts-plugin/common'; + +export interface PaletteParams { + colorSchema: ColorSchemas; + colorsRange: Range[]; + invertColors: boolean; +} + +export interface ExtendedPaletteParams extends PaletteParams { + percentageMode: boolean; +} diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/index.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/index.ts index 9da33607be2a9..7f1fb81fd20b8 100644 --- a/src/plugins/visualizations/common/convert_to_lens/lib/convert/index.ts +++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/index.ts @@ -21,3 +21,4 @@ export * from './types'; export * from './last_value'; export * from './range'; export * from './percentage_mode'; +export * from './static_value'; diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/metric.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/metric.ts index f46adea9538dc..eb21b9f0fe91d 100644 --- a/src/plugins/visualizations/common/convert_to_lens/lib/convert/metric.ts +++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/metric.ts @@ -23,6 +23,7 @@ import { } from './types'; import { getFieldNameFromField } from '../utils'; import { isFieldValid } from '../../utils'; +import { Operation } from '../../types'; type MetricAggregationWithoutParams = | typeof Operations.AVERAGE @@ -97,12 +98,19 @@ export const convertMetricAggregationColumnWithoutSpecialParams = ( return null; } + const column = createColumn(agg, field, { + reducedTimeRange, + }); + return { operationType: aggregation.name, sourceField, - ...createColumn(agg, field, { - reducedTimeRange, - }), + ...column, + dataType: ([Operations.COUNT, Operations.UNIQUE_COUNT] as Operation[]).includes( + aggregation.name + ) + ? 'number' + : column.dataType, params: { ...getFormat() }, timeShift: agg.aggParams?.timeShift, }; diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/static_value.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/static_value.ts new file mode 100644 index 0000000000000..0310e162b8e85 --- /dev/null +++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/static_value.ts @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import uuid from 'uuid'; +import { StaticValueColumn } from '../../types'; + +export const createStaticValueColumn = (value: number): StaticValueColumn => ({ + operationType: 'static_value', + columnId: uuid(), + isBucketed: false, + isSplit: false, + dataType: 'number', + references: [], + params: { + value: value.toString(), + }, +}); diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/index.ts b/src/plugins/visualizations/common/convert_to_lens/lib/index.ts index 083450c8ff5d1..3c416dc5b95fa 100644 --- a/src/plugins/visualizations/common/convert_to_lens/lib/index.ts +++ b/src/plugins/visualizations/common/convert_to_lens/lib/index.ts @@ -9,3 +9,4 @@ export * from './buckets'; export * from './metrics'; export * from './convert'; +export * from './configurations'; diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/metrics/metrics.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/metrics/metrics.test.ts index 207dedd133bc9..1cf3ff0b84064 100644 --- a/src/plugins/visualizations/common/convert_to_lens/lib/metrics/metrics.test.ts +++ b/src/plugins/visualizations/common/convert_to_lens/lib/metrics/metrics.test.ts @@ -598,7 +598,7 @@ describe('convertMetricToColumns valid cases', () => { { aggType: METRIC_TYPES.AVG_BUCKET } as SchemaConfig, dataView, [], - { isPercentageMode: true }, + { isPercentageMode: true, min: 0, max: 100 }, ], result, mockConvertToColumnInPercentageMode, diff --git a/src/plugins/visualizations/common/convert_to_lens/types/common.ts b/src/plugins/visualizations/common/convert_to_lens/types/common.ts index c526a7116877d..63f9dcd482c58 100644 --- a/src/plugins/visualizations/common/convert_to_lens/types/common.ts +++ b/src/plugins/visualizations/common/convert_to_lens/types/common.ts @@ -51,6 +51,14 @@ export interface MinMax { max: number; } -export type PercentageModeConfig = - | ({ isPercentageMode: true } & MinMax) - | { isPercentageMode: boolean }; +export interface BasicFullPercentageModeConfig { + isPercentageMode: boolean; +} + +export interface BasicPercentageModeConfig { + isPercentageMode: false; +} + +export type PercentageModeConfigWithMinMax = BasicFullPercentageModeConfig & MinMax; + +export type PercentageModeConfig = BasicPercentageModeConfig | PercentageModeConfigWithMinMax; diff --git a/src/plugins/visualizations/common/convert_to_lens/types/configurations.ts b/src/plugins/visualizations/common/convert_to_lens/types/configurations.ts index a6a771d07e7a6..fbc9e17d77727 100644 --- a/src/plugins/visualizations/common/convert_to_lens/types/configurations.ts +++ b/src/plugins/visualizations/common/convert_to_lens/types/configurations.ts @@ -21,6 +21,11 @@ import { YAxisModes, XYCurveTypes, LayerTypes, + GaugeShapes, + GaugeTicksPositions, + GaugeLabelMajorModes, + GaugeColorModes, + GaugeCentralMajorModes, } from '../constants'; export type FillType = $Values; @@ -32,6 +37,11 @@ export type CategoryDisplayType = $Values; export type NumberDisplayType = $Values; export type LegendDisplayType = $Values; export type LayerType = $Values; +export type GaugeColorMode = $Values; +export type GaugeShape = $Values; +export type GaugeLabelMajorMode = $Values; +export type GaugeCentralMajorMode = $Values; +export type GaugeTicksPosition = $Values; export interface AxisExtentConfig { mode: 'full' | 'custom' | 'dataBounds'; @@ -227,6 +237,40 @@ export interface PartitionVisConfiguration { palette?: PaletteOutput; } +export const LENS_GAUGE_ID = 'lnsGauge'; + +export const GROUP_ID = { + METRIC: 'metric', + MIN: 'min', + MAX: 'max', + GOAL: 'goal', +} as const; + +interface GaugeState { + metricAccessor?: string; + minAccessor?: string; + maxAccessor?: string; + goalAccessor?: string; + ticksPosition: GaugeTicksPosition; + labelMajorMode: GaugeLabelMajorMode; + labelMajor?: string; + labelMinor?: string; + centralMajorMode?: GaugeCentralMajorMode; + centralMajor?: string; + colorMode?: GaugeColorMode; + palette?: PaletteOutput; + shape: GaugeShape; + /** @deprecated This field is deprecated and going to be removed in the futher release versions. */ + percentageMode?: boolean; + respectRanges?: boolean; + commonLabel?: string; +} + +export type GaugeVisConfiguration = GaugeState & { + layerId: string; + layerType: typeof LayerTypes.DATA; +}; + export type Configuration = | XYConfiguration | TableVisConfiguration diff --git a/src/plugins/visualizations/common/utils/index.ts b/src/plugins/visualizations/common/utils/index.ts index 35e01a9121ac4..d960607238394 100644 --- a/src/plugins/visualizations/common/utils/index.ts +++ b/src/plugins/visualizations/common/utils/index.ts @@ -17,3 +17,5 @@ export { getAccessor, getFormatByAccessor, } from './accessors'; +export { getStopsWithColorsFromRanges } from './palette'; +export type { PaletteConfig } from './palette'; diff --git a/src/plugins/vis_types/gauge/public/utils/palette.ts b/src/plugins/visualizations/common/utils/palette.ts similarity index 100% rename from src/plugins/vis_types/gauge/public/utils/palette.ts rename to src/plugins/visualizations/common/utils/palette.ts diff --git a/src/plugins/visualizations/public/convert_to_lens/index.ts b/src/plugins/visualizations/public/convert_to_lens/index.ts index 9cd2ba2768ad7..73509d49157ae 100644 --- a/src/plugins/visualizations/public/convert_to_lens/index.ts +++ b/src/plugins/visualizations/public/convert_to_lens/index.ts @@ -7,4 +7,9 @@ */ export { getColumnsFromVis } from './schemas'; -export { getPercentageColumnFormulaColumn } from '../../common/convert_to_lens/lib'; +export { + getPercentageColumnFormulaColumn, + getPalette, + getPercentageModeConfig, + createStaticValueColumn, +} from '../../common/convert_to_lens/lib'; diff --git a/test/functional/apps/console/_console.ts b/test/functional/apps/console/_console.ts index 6736dc5a2f721..d7a591efca014 100644 --- a/test/functional/apps/console/_console.ts +++ b/test/functional/apps/console/_console.ts @@ -27,7 +27,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const log = getService('log'); const browser = getService('browser'); const PageObjects = getPageObjects(['common', 'console', 'header']); - const toasts = getService('toasts'); const security = getService('security'); const testSubjects = getService('testSubjects'); @@ -72,32 +71,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(initialSize.width).to.be.greaterThan(afterSize.width); }); - describe('with a data URI in the load_from query', () => { - it('loads the data from the URI', async () => { - await PageObjects.common.navigateToApp('console', { - hash: '#/console?load_from=data:text/plain,BYUwNmD2Q', - }); - - await retry.try(async () => { - const actualRequest = await PageObjects.console.getRequest(); - log.debug(actualRequest); - expect(actualRequest.trim()).to.eql('hello'); - }); - }); - - describe('with invalid data', () => { - it('shows a toast error', async () => { - await PageObjects.common.navigateToApp('console', { - hash: '#/console?load_from=data:text/plain,BYUwNmD2', - }); - - await retry.try(async () => { - expect(await toasts.getToastCount()).to.equal(1); - }); - }); - }); - }); - describe('with kbn: prefix in request', () => { before(async () => { await PageObjects.console.clearTextArea(); diff --git a/test/functional/apps/console/_text_input.ts b/test/functional/apps/console/_text_input.ts new file mode 100644 index 0000000000000..29290fac6728f --- /dev/null +++ b/test/functional/apps/console/_text_input.ts @@ -0,0 +1,100 @@ +/* + * Copyright 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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const retry = getService('retry'); + const toasts = getService('toasts'); + const PageObjects = getPageObjects(['common', 'console', 'header']); + + describe('text input', function testTextInput() { + before(async () => { + await PageObjects.common.navigateToApp('console'); + await PageObjects.console.collapseHelp(); + }); + + beforeEach(async () => { + await PageObjects.console.clearTextArea(); + }); + + describe('with a data URI in the load_from query', () => { + it('loads the data from the URI', async () => { + await PageObjects.common.navigateToApp('console', { + hash: '#/console?load_from=data:text/plain,BYUwNmD2Q', + }); + + await retry.try(async () => { + const actualRequest = await PageObjects.console.getRequest(); + expect(actualRequest.trim()).to.eql('hello'); + }); + }); + + describe('with invalid data', () => { + it('shows a toast error', async () => { + await PageObjects.common.navigateToApp('console', { + hash: '#/console?load_from=data:text/plain,BYUwNmD2', + }); + + await retry.try(async () => { + expect(await toasts.getToastCount()).to.equal(1); + }); + }); + }); + }); + + describe('copy/pasting cURL commands into the console', () => { + it('should convert cURL commands into the console request format', async () => { + await PageObjects.console.enterRequest( + `\n curl -XGET "http://localhost:9200/_search?pretty" -d'\n{"query": {"match_all": {}}}'` + ); + await PageObjects.console.copyRequestsToClipboard(); + await PageObjects.console.clearTextArea(); + await PageObjects.console.pasteClipboardValue(); + await retry.try(async () => { + const actualRequest = await PageObjects.console.getRequest(); + expect(actualRequest.trim()).to.eql('GET /_search?pretty\n {"query": {"match_all": {}}}'); + }); + }); + }); + + describe('console history', () => { + const sendRequest = async (request: string) => { + await PageObjects.console.enterRequest(request); + await PageObjects.console.clickPlay(); + await PageObjects.header.waitUntilLoadingHasFinished(); + }; + + it('should show the history', async () => { + await sendRequest('GET /_search?pretty'); + await PageObjects.console.clickHistory(); + await retry.try(async () => { + const history = await PageObjects.console.getHistoryEntries(); + expect(history).to.eql(['/_search?pretty (a few seconds ago)']); + }); + + // Clear the history + await PageObjects.console.clickClearHistory(); + await PageObjects.console.closeHistory(); + }); + + it('should load a request from history', async () => { + await sendRequest('GET _search\n{"query": {"match_all": {}}}'); + await PageObjects.console.clearTextArea(); + await PageObjects.console.clickHistory(); + await PageObjects.console.loadRequestFromHistory(0); + await retry.try(async () => { + const actualRequest = await PageObjects.console.getRequest(); + expect(actualRequest.trim()).to.eql( + 'GET _search\n{\n "query": {\n "match_all": {}\n }\n}' + ); + }); + }); + }); + }); +} diff --git a/test/functional/apps/console/index.js b/test/functional/apps/console/index.js index 06c29f0e031ec..a2a1206fe85bd 100644 --- a/test/functional/apps/console/index.js +++ b/test/functional/apps/console/index.js @@ -25,6 +25,7 @@ export default function ({ getService, loadTestFile }) { loadTestFile(require.resolve('./_xjson')); loadTestFile(require.resolve('./_misc_console_behavior')); loadTestFile(require.resolve('./_context_menu')); + loadTestFile(require.resolve('./_text_input')); } }); } diff --git a/test/functional/apps/discover/group1/_discover.ts b/test/functional/apps/discover/group1/_discover.ts index 9ac159fa39168..1ac0ad6fe013f 100644 --- a/test/functional/apps/discover/group1/_discover.ts +++ b/test/functional/apps/discover/group1/_discover.ts @@ -364,20 +364,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); describe('URL state', () => { - const getCurrentDataViewId = (currentUrl: string) => { - const [indexSubstring] = currentUrl.match(/index:[^,]*/)!; - const dataViewId = indexSubstring.replace('index:', ''); - return dataViewId; - }; - it('should show a warning and fall back to the default data view when navigating to a URL with an invalid data view ID', async () => { await PageObjects.common.navigateToApp('discover'); await PageObjects.timePicker.setDefaultAbsoluteRange(); await PageObjects.header.waitUntilLoadingHasFinished(); + const dataViewId = await PageObjects.discover.getCurrentDataViewId(); + const originalUrl = await browser.getCurrentUrl(); - const dataViewId = getCurrentDataViewId(originalUrl); const newUrl = originalUrl.replace(dataViewId, 'invalid-data-view-id'); await browser.get(newUrl); + await PageObjects.header.waitUntilLoadingHasFinished(); expect(await browser.getCurrentUrl()).to.be(originalUrl); expect(await testSubjects.exists('dscDataViewNotFoundShowDefaultWarning')).to.be(true); @@ -387,10 +383,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.common.navigateToApp('discover'); await PageObjects.timePicker.setDefaultAbsoluteRange(); const originalHash = await browser.execute<[], string>('return window.location.hash'); - const dataViewId = getCurrentDataViewId(originalHash); + const dataViewId = await PageObjects.discover.getCurrentDataViewId(); + const newHash = originalHash.replace(dataViewId, 'invalid-data-view-id'); await browser.execute(`window.location.hash = "${newHash}"`); await PageObjects.header.waitUntilLoadingHasFinished(); + const currentHash = await browser.execute<[], string>('return window.location.hash'); expect(currentHash).to.be(originalHash); expect(await testSubjects.exists('dscDataViewNotFoundShowSavedWarning')).to.be(true); diff --git a/test/functional/apps/discover/group2/_adhoc_data_views.ts b/test/functional/apps/discover/group2/_adhoc_data_views.ts index c7f17472250fd..9a1f4dd84d300 100644 --- a/test/functional/apps/discover/group2/_adhoc_data_views.ts +++ b/test/functional/apps/discover/group2/_adhoc_data_views.ts @@ -11,15 +11,16 @@ import { FtrProviderContext } from '../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const dataGrid = getService('dataGrid'); + const toasts = getService('toasts'); const esArchiver = getService('esArchiver'); const filterBar = getService('filterBar'); const dashboardAddPanel = getService('dashboardAddPanel'); const fieldEditor = getService('fieldEditor'); const kibanaServer = getService('kibanaServer'); - const browser = getService('browser'); const retry = getService('retry'); const queryBar = getService('queryBar'); const testSubjects = getService('testSubjects'); + const browser = getService('browser'); const PageObjects = getPageObjects([ 'common', 'unifiedSearch', @@ -33,22 +34,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const find = getService('find'); const security = getService('security'); - const getCurrentDataViewId = async () => { - const currentUrl = await browser.getCurrentUrl(); - const [indexSubstring] = currentUrl.match(/index:[^,]*/)!; - const dataViewId = indexSubstring.replace('index:', ''); - return dataViewId; - }; - - const addRuntimeField = async (name: string, script: string) => { - await PageObjects.discover.clickAddField(); - await fieldEditor.setName(name); - await fieldEditor.enableValue(); - await fieldEditor.typeScript(script); - await fieldEditor.save(); - await PageObjects.header.waitUntilLoadingHasFinished(); - }; - const addSearchToDashboard = async (name: string) => { await dashboardAddPanel.addSavedSearch(name); await PageObjects.header.waitUntilLoadingHasFinished(); @@ -113,35 +98,35 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should not update data view id when saving search first time', async () => { - const prevDataViewId = await getCurrentDataViewId(); + const prevDataViewId = await PageObjects.discover.getCurrentDataViewId(); await PageObjects.discover.saveSearch('logstash*-ss'); await PageObjects.header.waitUntilLoadingHasFinished(); - const newDataViewId = await getCurrentDataViewId(); + const newDataViewId = await PageObjects.discover.getCurrentDataViewId(); expect(prevDataViewId).to.equal(newDataViewId); }); it('should update data view id when saving new search copy', async () => { - const prevDataViewId = await getCurrentDataViewId(); + const prevDataViewId = await PageObjects.discover.getCurrentDataViewId(); await PageObjects.discover.saveSearch('logstash*-ss-new', true); await PageObjects.header.waitUntilLoadingHasFinished(); - const newDataViewId = await getCurrentDataViewId(); + const newDataViewId = await PageObjects.discover.getCurrentDataViewId(); expect(prevDataViewId).not.to.equal(newDataViewId); }); it('should update data view id when saving data view from hoc one', async () => { - const prevDataViewId = await getCurrentDataViewId(); + const prevDataViewId = await PageObjects.discover.getCurrentDataViewId(); await testSubjects.click('discoverAlertsButton'); await testSubjects.click('confirmModalConfirmButton'); await PageObjects.header.waitUntilLoadingHasFinished(); - const newDataViewId = await getCurrentDataViewId(); + const newDataViewId = await PageObjects.discover.getCurrentDataViewId(); expect(prevDataViewId).not.to.equal(newDataViewId); }); @@ -149,9 +134,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('search results should be different after data view update', async () => { await PageObjects.discover.createAdHocDataView('logst', true); await PageObjects.header.waitUntilLoadingHasFinished(); + const prevDataViewId = await PageObjects.discover.getCurrentDataViewId(); - await addRuntimeField('_bytes-runtimefield', `emit(doc["bytes"].value.toString())`); + // trigger data view id update + await PageObjects.discover.addRuntimeField( + '_bytes-runtimefield', + `emit(doc["bytes"].value.toString())` + ); await PageObjects.discover.clickFieldListItemToggle('_bytes-runtimefield'); + const newDataViewId = await PageObjects.discover.getCurrentDataViewId(); + expect(newDataViewId).not.to.equal(prevDataViewId); // save first search await PageObjects.discover.saveSearch('logst*-ss-_bytes-runtimefield'); @@ -162,7 +154,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.discover.removeField('_bytes-runtimefield'); await PageObjects.header.waitUntilLoadingHasFinished(); - await addRuntimeField('_bytes-runtimefield', `emit((doc["bytes"].value * 2).toString())`); + // trigger data view id update + await PageObjects.discover.addRuntimeField( + '_bytes-runtimefield', + `emit((doc["bytes"].value * 2).toString())` + ); await PageObjects.discover.clickFieldListItemToggle('_bytes-runtimefield'); // save second search @@ -185,5 +181,61 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(+second).to.equal(+first * 2); }); + + it('should update id after data view field edit', async () => { + await PageObjects.common.navigateToApp('discover'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.loadSavedSearch('logst*-ss-_bytes-runtimefield'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + const prevDataViewId = await PageObjects.discover.getCurrentDataViewId(); + + // trigger data view id update + await dataGrid.clickEditField('_bytes-runtimefield'); + await fieldEditor.setName('_bytes-runtimefield-edited', true); + await fieldEditor.save(); + await fieldEditor.confirmSave(); + await PageObjects.header.waitUntilLoadingHasFinished(); + + const newDataViewId = await PageObjects.discover.getCurrentDataViewId(); + expect(prevDataViewId).not.to.equal(newDataViewId); + }); + + it('should notify about invalid filter reffs', async () => { + await PageObjects.discover.createAdHocDataView('logstas', true); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await filterBar.addFilter('nestedField.child', 'is', 'nestedValue'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await filterBar.addFilter('extension', 'is', 'jpg'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + const first = await PageObjects.discover.getCurrentDataViewId(); + // trigger data view id update + await PageObjects.discover.addRuntimeField( + '_bytes-runtimefield', + `emit((doc["bytes"].value * 2).toString())` + ); + await PageObjects.header.waitUntilLoadingHasFinished(); + + const second = await PageObjects.discover.getCurrentDataViewId(); + expect(first).not.equal(second); + + await toasts.dismissAllToasts(); + + await browser.goBack(); + await PageObjects.header.waitUntilLoadingHasFinished(); + + const firstToast = await toasts.getToastContent(1); + expect(firstToast).to.equal( + `"${first}" is not a configured data view ID\nShowing the saved data view: "logstas*" (${second})` + ); + + const secondToast = await toasts.getToastContent(2); + expect(secondToast).to.equal( + `Different index references\nData view id references in some of the applied filters differ from the current data view.` + ); + }); }); } diff --git a/test/functional/page_objects/console_page.ts b/test/functional/page_objects/console_page.ts index 0069682f828d6..a368d085160f4 100644 --- a/test/functional/page_objects/console_page.ts +++ b/test/functional/page_objects/console_page.ts @@ -505,4 +505,46 @@ export class ConsolePageObject extends FtrService { const body = await this.getRequestBody(); return body.split('\n').length; } + + public async copyRequestsToClipboard() { + const textArea = await this.testSubjects.find('console-textarea'); + await textArea.pressKeys([Key[process.platform === 'darwin' ? 'COMMAND' : 'CONTROL'], 'a']); + await textArea.pressKeys([Key[process.platform === 'darwin' ? 'COMMAND' : 'CONTROL'], 'c']); + } + + public async pasteClipboardValue() { + const textArea = await this.testSubjects.find('console-textarea'); + await textArea.pressKeys([Key[process.platform === 'darwin' ? 'COMMAND' : 'CONTROL'], 'v']); + } + + public async clickHistory() { + const historyButton = await this.testSubjects.find('consoleHistoryButton'); + await historyButton.click(); + } + + public async getHistoryEntries() { + const history = await this.find.allByCssSelector('.list-group-item'); + return await Promise.all(history.map(async (item) => await item.getVisibleText())); + } + + public async loadRequestFromHistory(index: number) { + const historyItem = await this.find.byCssSelector(`#historyReq${index}`); + await historyItem.click(); + await this.testSubjects.click('consoleHistoryApplyButton'); + } + + public async clickClearHistory() { + const clearHistoryButton = await this.testSubjects.find('consoleClearHistoryButton'); + await clearHistoryButton.click(); + + await this.retry.waitFor('history to be cleared', async () => { + const history = await this.getHistoryEntries(); + return history.length === 0; + }); + } + + public async closeHistory() { + const closeButton = await this.testSubjects.find('consoleHistoryCloseButton'); + await closeButton.click(); + } } diff --git a/test/functional/page_objects/discover_page.ts b/test/functional/page_objects/discover_page.ts index cc398f8d67be6..d9bc8c46a4acc 100644 --- a/test/functional/page_objects/discover_page.ts +++ b/test/functional/page_objects/discover_page.ts @@ -683,4 +683,36 @@ export class DiscoverPageObject extends FtrService { const button = await this.testSubjects.find('discover-dataView-switch-link'); return button.getAttribute('title'); } + + public async getCurrentDataViewId() { + const currentUrl = await this.browser.getCurrentUrl(); + const matches = currentUrl.matchAll(/index:[^,]*/g); + const indexes = []; + for (const matchEntry of matches) { + const [index] = matchEntry; + indexes.push(decodeURIComponent(index).replace('index:', '').replaceAll("'", '')); + } + + const first = indexes[0]; + if (first) { + const allEqual = indexes.every((val) => val === first); + if (allEqual) { + return first; + } else { + throw new Error( + 'Discover URL state contains different index references. They should be all the same.' + ); + } + } + throw new Error("Discover URL state doesn't contain an index reference."); + } + + public async addRuntimeField(name: string, script: string) { + await this.clickAddField(); + await this.fieldEditor.setName(name); + await this.fieldEditor.enableValue(); + await this.fieldEditor.typeScript(script); + await this.fieldEditor.save(); + await this.header.waitUntilLoadingHasFinished(); + } } diff --git a/test/functional/page_objects/visual_builder_page.ts b/test/functional/page_objects/visual_builder_page.ts index dc12e8ae8fa59..3e62d830cddbf 100644 --- a/test/functional/page_objects/visual_builder_page.ts +++ b/test/functional/page_objects/visual_builder_page.ts @@ -406,6 +406,17 @@ export class VisualBuilderPageObject extends FtrService { }); } + public async createNewAggSeries(nth = 0) { + const prevAggs = await this.testSubjects.findAll('draggable'); + const elements = await this.testSubjects.findAll('AddAddBtn'); + await elements[nth].click(); + await this.visChart.waitForVisualizationRenderingStabilized(); + await this.retry.waitFor('new agg series is added', async () => { + const currentAggs = await this.testSubjects.findAll('draggable'); + return currentAggs.length > prevAggs.length; + }); + } + public async selectAggType(value: string, nth = 0) { const elements = await this.testSubjects.findAll('aggSelector'); await this.comboBox.setElement(elements[nth], value); @@ -619,6 +630,11 @@ export class VisualBuilderPageObject extends FtrService { await input.type(labelName); } + public async setStaticValue(value: number, nth: number = 0): Promise { + const input = (await this.testSubjects.findAll('staticValue'))[nth]; + await input.type(value.toString()); + } + /** * set field for type of aggregation * diff --git a/test/functional/page_objects/visualize_page.ts b/test/functional/page_objects/visualize_page.ts index 95adb7e64b1ec..a75e54c6bcdd7 100644 --- a/test/functional/page_objects/visualize_page.ts +++ b/test/functional/page_objects/visualize_page.ts @@ -180,6 +180,10 @@ export class VisualizePageObject extends FtrService { await this.clickVisType('gauge'); } + public async clickGoal() { + await this.clickVisType('goal'); + } + public async clickPieChart() { await this.clickVisType('pie'); } diff --git a/test/functional/services/data_grid.ts b/test/functional/services/data_grid.ts index c3107188d7c56..0c3464e103eca 100644 --- a/test/functional/services/data_grid.ts +++ b/test/functional/services/data_grid.ts @@ -296,6 +296,10 @@ export class DataGridService extends FtrService { await this.openColMenuByField(field); await this.find.clickByButtonText('Copy name'); } + public async clickEditField(field: string) { + await this.openColMenuByField(field); + await this.testSubjects.click('gridEditFieldButton'); + } public async getDetailsRow(): Promise { const detailRows = await this.getDetailsRows(); diff --git a/test/functional/services/toasts.ts b/test/functional/services/toasts.ts index d71d66e399785..6866c2a8b2fd2 100644 --- a/test/functional/services/toasts.ts +++ b/test/functional/services/toasts.ts @@ -67,6 +67,11 @@ export class ToastsService extends FtrService { return await list.findByCssSelector(`.euiToast:nth-child(${index})`); } + public async getToastContent(index: number) { + const toast = await this.getToastElement(index); + return await toast.getVisibleText(); + } + private async getGlobalToastList() { return await this.testSubjects.find('globalToastList'); } diff --git a/test/plugin_functional/test_suites/core_plugins/rendering.ts b/test/plugin_functional/test_suites/core_plugins/rendering.ts index a3968330e1425..2bfd0c7b5dda3 100644 --- a/test/plugin_functional/test_suites/core_plugins/rendering.ts +++ b/test/plugin_functional/test_suites/core_plugins/rendering.ts @@ -91,6 +91,9 @@ export default function ({ getService }: PluginFunctionalProviderContext) { 'unifiedSearch.autocomplete.valueSuggestions.tiers (array)', 'unifiedSearch.autocomplete.valueSuggestions.timeout (duration)', 'data.search.aggs.shardDelay.enabled (boolean)', + 'data.search.asyncSearch.batchedReduceSize (number)', + 'data.search.asyncSearch.keepAlive (duration)', + 'data.search.asyncSearch.waitForCompletion (duration)', 'data.search.sessions.defaultExpiration (duration)', 'data.search.sessions.enabled (boolean)', 'data.search.sessions.management.expiresSoonWarning (duration)', diff --git a/x-pack/examples/embedded_lens_example/public/app.tsx b/x-pack/examples/embedded_lens_example/public/app.tsx index 42784984a0d44..e4df914a54c3c 100644 --- a/x-pack/examples/embedded_lens_example/public/app.tsx +++ b/x-pack/examples/embedded_lens_example/public/app.tsx @@ -100,7 +100,7 @@ function getLensAttributes( ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer1: dataLayer!, }, diff --git a/x-pack/examples/testing_embedded_lens/public/app.tsx b/x-pack/examples/testing_embedded_lens/public/app.tsx index cd550a9280004..2b8799c1951a3 100644 --- a/x-pack/examples/testing_embedded_lens/public/app.tsx +++ b/x-pack/examples/testing_embedded_lens/public/app.tsx @@ -148,7 +148,7 @@ function getBaseAttributes( ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer1: finalDataLayer, }, diff --git a/x-pack/examples/third_party_lens_navigation_prompt/public/plugin.ts b/x-pack/examples/third_party_lens_navigation_prompt/public/plugin.ts index aca5f5d0b37b8..0538c7f501742 100644 --- a/x-pack/examples/third_party_lens_navigation_prompt/public/plugin.ts +++ b/x-pack/examples/third_party_lens_navigation_prompt/public/plugin.ts @@ -71,7 +71,7 @@ function getLensAttributes(defaultDataView: DataView): TypedLensByValueInput['at ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer1: dataLayer, }, diff --git a/x-pack/examples/third_party_vis_lens_example/README.md b/x-pack/examples/third_party_vis_lens_example/README.md index f2fa563f33393..ccb8fc69d41ae 100644 --- a/x-pack/examples/third_party_vis_lens_example/README.md +++ b/x-pack/examples/third_party_vis_lens_example/README.md @@ -16,7 +16,7 @@ To test the migration, you can import the following ndjson file via saved object ``` {"attributes":{"fieldFormatMap":"{\"hour_of_day\":{}}","runtimeFieldMap":"{\"hour_of_day\":{\"type\":\"long\",\"script\":{\"source\":\"emit(doc['timestamp'].value.getHour());\"}}}","timeFieldName":"timestamp","title":"kibana_sample_data_logs"},"coreMigrationVersion":"8.0.0","id":"90943e30-9a47-11e8-b64d-95841ca0b247","migrationVersion":{"index-pattern":"8.0.0"},"references":[],"type":"index-pattern","updated_at":"2022-01-24T10:54:24.209Z","version":"WzQzMTQ3LDFd"} -{"attributes":{"description":"","state":{"datasourceStates":{"indexpattern":{"layers":{"f2700077-50bf-48e4-829c-f695f87e226d":{"columnOrder":["5e704cac-8490-457a-b635-01f3a5a132b7"],"columns":{"5e704cac-8490-457a-b635-01f3a5a132b7":{"dataType":"number","isBucketed":false,"label":"Count of records","operationType":"count","scale":"ratio","sourceField":"Records"}},"incompleteColumns":{}}}}},"filters":[],"query":{"language":"kuery","query":""},"visualization":{"column":"5e704cac-8490-457a-b635-01f3a5a132b7","layerId":"f2700077-50bf-48e4-829c-f695f87e226d"}},"title":"Rotating number test","visualizationType":"rotatingNumber"},"coreMigrationVersion":"8.0.0","id":"468f0be0-7e86-11ec-9739-d570ffd3fbe4","migrationVersion":{"lens":"8.0.0"},"references":[{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-layer-f2700077-50bf-48e4-829c-f695f87e226d","type":"index-pattern"}],"type":"lens","updated_at":"2022-01-26T08:59:31.618Z","version":"WzQzNjUzLDFd"} +{"attributes":{"description":"","state":{"datasourceStates":{"formBased":{"layers":{"f2700077-50bf-48e4-829c-f695f87e226d":{"columnOrder":["5e704cac-8490-457a-b635-01f3a5a132b7"],"columns":{"5e704cac-8490-457a-b635-01f3a5a132b7":{"dataType":"number","isBucketed":false,"label":"Count of records","operationType":"count","scale":"ratio","sourceField":"Records"}},"incompleteColumns":{}}}}},"filters":[],"query":{"language":"kuery","query":""},"visualization":{"column":"5e704cac-8490-457a-b635-01f3a5a132b7","layerId":"f2700077-50bf-48e4-829c-f695f87e226d"}},"title":"Rotating number test","visualizationType":"rotatingNumber"},"coreMigrationVersion":"8.0.0","id":"468f0be0-7e86-11ec-9739-d570ffd3fbe4","migrationVersion":{"lens":"8.0.0"},"references":[{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-layer-f2700077-50bf-48e4-829c-f695f87e226d","type":"index-pattern"}],"type":"lens","updated_at":"2022-01-26T08:59:31.618Z","version":"WzQzNjUzLDFd"} {"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":2,"missingRefCount":0,"missingReferences":[]} ``` diff --git a/x-pack/examples/third_party_vis_lens_example/public/plugin.ts b/x-pack/examples/third_party_vis_lens_example/public/plugin.ts index f7a0378619b3a..38922ae676666 100644 --- a/x-pack/examples/third_party_vis_lens_example/public/plugin.ts +++ b/x-pack/examples/third_party_vis_lens_example/public/plugin.ts @@ -67,7 +67,7 @@ function getLensAttributes(defaultDataView: DataView): TypedLensByValueInput['at ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer1: dataLayer, }, diff --git a/x-pack/plugins/actions/server/sub_action_framework/sub_action_connector.ts b/x-pack/plugins/actions/server/sub_action_framework/sub_action_connector.ts index 41f2b03b3da77..01b7876d69afd 100644 --- a/x-pack/plugins/actions/server/sub_action_framework/sub_action_connector.ts +++ b/x-pack/plugins/actions/server/sub_action_framework/sub_action_connector.ts @@ -146,7 +146,9 @@ export abstract class SubActionConnector { `Request to external service failed. Connector Id: ${this.connector.id}. Connector type: ${this.connector.type}. Method: ${error.config.method}. URL: ${error.config.url}` ); - const errorMessage = this.getResponseErrorMessage(error); + const errorMessage = `Status code: ${error.status}. Message: ${this.getResponseErrorMessage( + error + )}`; throw new Error(errorMessage); } diff --git a/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.test.ts b/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.test.ts index 598f41bc2ce03..2ec89ad6f3728 100644 --- a/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.test.ts +++ b/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.test.ts @@ -1737,13 +1737,18 @@ describe('getExecutionKPIAggregation', () => { executionUuid: { terms: { field: 'kibana.alert.rule.execution.uuid', - size: 1000, + order: [ + { + 'ruleExecution>executeStartTime': 'desc', + }, + ], + size: 10000, }, aggs: { executionUuidSorted: { bucket_sort: { from: 0, - size: 1000, + size: 10000, gap_policy: 'insert_zeros', }, }, @@ -1803,6 +1808,11 @@ describe('getExecutionKPIAggregation', () => { }, }, aggs: { + executeStartTime: { + min: { + field: 'event.start', + }, + }, numTriggeredActions: { sum: { field: 'kibana.alert.rule.execution.metrics.number_of_triggered_actions', @@ -1884,13 +1894,18 @@ describe('getExecutionKPIAggregation', () => { executionUuid: { terms: { field: 'kibana.alert.rule.execution.uuid', - size: 1000, + order: [ + { + 'ruleExecution>executeStartTime': 'desc', + }, + ], + size: 10000, }, aggs: { executionUuidSorted: { bucket_sort: { from: 0, - size: 1000, + size: 10000, gap_policy: 'insert_zeros', }, }, @@ -1962,6 +1977,11 @@ describe('getExecutionKPIAggregation', () => { }, }, aggs: { + executeStartTime: { + min: { + field: 'event.start', + }, + }, numTriggeredActions: { sum: { field: 'kibana.alert.rule.execution.metrics.number_of_triggered_actions', @@ -2043,13 +2063,18 @@ describe('getExecutionKPIAggregation', () => { executionUuid: { terms: { field: 'kibana.alert.rule.execution.uuid', - size: 1000, + order: [ + { + 'ruleExecution>executeStartTime': 'desc', + }, + ], + size: 10000, }, aggs: { executionUuidSorted: { bucket_sort: { from: 0, - size: 1000, + size: 10000, gap_policy: 'insert_zeros', }, }, @@ -2121,6 +2146,11 @@ describe('getExecutionKPIAggregation', () => { }, }, aggs: { + executeStartTime: { + min: { + field: 'event.start', + }, + }, numTriggeredActions: { sum: { field: 'kibana.alert.rule.execution.metrics.number_of_triggered_actions', diff --git a/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.ts b/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.ts index ca86f45083826..c2b261cd531ad 100644 --- a/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.ts +++ b/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.ts @@ -15,6 +15,7 @@ import { parseDuration } from '.'; import { IExecutionLog, IExecutionLogResult, EMPTY_EXECUTION_KPI_RESULT } from '../../common'; const DEFAULT_MAX_BUCKETS_LIMIT = 1000; // do not retrieve more than this number of executions +const DEFAULT_MAX_KPI_BUCKETS_LIMIT = 10000; const RULE_ID_FIELD = 'rule.id'; const RULE_NAME_FIELD = 'rule.name'; @@ -149,13 +150,14 @@ export const getExecutionKPIAggregation = (filter?: IExecutionLogAggOptions['fil // Bucket by execution UUID terms: { field: EXECUTION_UUID_FIELD, - size: DEFAULT_MAX_BUCKETS_LIMIT, + size: DEFAULT_MAX_KPI_BUCKETS_LIMIT, + order: formatSortForTermSort([{ timestamp: { order: 'desc' } }]), }, aggs: { executionUuidSorted: { bucket_sort: { from: 0, - size: 1000, + size: DEFAULT_MAX_KPI_BUCKETS_LIMIT, gap_policy: 'insert_zeros' as estypes.AggregationsGapPolicy, }, }, @@ -182,6 +184,11 @@ export const getExecutionKPIAggregation = (filter?: IExecutionLogAggOptions['fil }, }, aggs: { + executeStartTime: { + min: { + field: START_FIELD, + }, + }, numTriggeredActions: { sum: { field: 'kibana.alert.rule.execution.metrics.number_of_triggered_actions', diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/integration_settings/integration_policy.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/integration_settings/integration_policy.cy.ts index 5d275770e462d..528e260940e3c 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/integration_settings/integration_policy.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/integration_settings/integration_policy.cy.ts @@ -60,7 +60,7 @@ describe('when navigating to integration page', () => { cy.visitKibana(integrationsPath); // open integration policy form - cy.getByTestSubj('integration-card:epr:apm:featured').click(); + cy.getByTestSubj('integration-card:ui_link:apm').click(); cy.contains('Elastic APM in Fleet').click(); cy.contains('a', 'APM integration').click(); cy.getByTestSubj('addIntegrationPolicyButton').click(); diff --git a/x-pack/plugins/apm/public/components/app/metrics/index.tsx b/x-pack/plugins/apm/public/components/app/metrics/index.tsx new file mode 100644 index 0000000000000..3149a13b940f8 --- /dev/null +++ b/x-pack/plugins/apm/public/components/app/metrics/index.tsx @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { isJavaAgentName, isJRubyAgent } from '../../../../common/agent_name'; +import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context'; +import { ServiceMetrics } from './service_metrics'; +import { JvmMetricsOverview } from './jvm_metrics_overview'; + +export function Metrics() { + const { agentName, runtimeName } = useApmServiceContext(); + + if (isJavaAgentName(agentName) || isJRubyAgent(agentName, runtimeName)) { + return ; + } + + return ; +} diff --git a/x-pack/plugins/apm/public/components/app/service_node_overview/index.tsx b/x-pack/plugins/apm/public/components/app/metrics/jvm_metrics_overview/index.tsx similarity index 85% rename from x-pack/plugins/apm/public/components/app/service_node_overview/index.tsx rename to x-pack/plugins/apm/public/components/app/metrics/jvm_metrics_overview/index.tsx index 99222394bcfe2..437ebd7e672ee 100644 --- a/x-pack/plugins/apm/public/components/app/service_node_overview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/metrics/jvm_metrics_overview/index.tsx @@ -11,19 +11,19 @@ import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { getServiceNodeName, SERVICE_NODE_NAME_MISSING, -} from '../../../../common/service_nodes'; +} from '../../../../../common/service_nodes'; import { asDynamicBytes, asInteger, asPercent, -} from '../../../../common/utils/formatters'; -import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context'; -import { useApmParams } from '../../../hooks/use_apm_params'; -import { useFetcher, FETCH_STATUS } from '../../../hooks/use_fetcher'; -import { useTimeRange } from '../../../hooks/use_time_range'; -import { truncate, unit } from '../../../utils/style'; -import { ServiceNodeMetricOverviewLink } from '../../shared/links/apm/service_node_metric_overview_link'; -import { ITableColumn, ManagedTable } from '../../shared/managed_table'; +} from '../../../../../common/utils/formatters'; +import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; +import { useApmParams } from '../../../../hooks/use_apm_params'; +import { useFetcher, FETCH_STATUS } from '../../../../hooks/use_fetcher'; +import { useTimeRange } from '../../../../hooks/use_time_range'; +import { truncate, unit } from '../../../../utils/style'; +import { ServiceNodeMetricOverviewLink } from '../../../shared/links/apm/service_node_metric_overview_link'; +import { ITableColumn, ManagedTable } from '../../../shared/managed_table'; const INITIAL_SORT_FIELD = 'cpu'; const INITIAL_SORT_DIRECTION = 'desc'; @@ -32,10 +32,10 @@ const ServiceNodeName = euiStyled.div` ${truncate(8 * unit)} `; -function ServiceNodeOverview() { +export function JvmMetricsOverview() { const { query: { environment, kuery, rangeFrom, rangeTo }, - } = useApmParams('/services/{serviceName}/nodes'); + } = useApmParams('/services/{serviceName}/metrics'); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); @@ -47,7 +47,7 @@ function ServiceNodeOverview() { return undefined; } return callApmApi( - 'GET /internal/apm/services/{serviceName}/serviceNodes', + 'GET /internal/apm/services/{serviceName}/metrics/nodes', { params: { path: { @@ -177,5 +177,3 @@ function ServiceNodeOverview() { /> ); } - -export { ServiceNodeOverview }; diff --git a/x-pack/plugins/apm/public/components/app/service_metrics/index.tsx b/x-pack/plugins/apm/public/components/app/metrics/service_metrics/index.tsx similarity index 74% rename from x-pack/plugins/apm/public/components/app/service_metrics/index.tsx rename to x-pack/plugins/apm/public/components/app/metrics/service_metrics/index.tsx index 557a4a81c647d..6d0ddcb61fad0 100644 --- a/x-pack/plugins/apm/public/components/app/service_metrics/index.tsx +++ b/x-pack/plugins/apm/public/components/app/metrics/service_metrics/index.tsx @@ -7,11 +7,11 @@ import { EuiFlexGrid, EuiFlexItem, EuiPanel, EuiSpacer } from '@elastic/eui'; import React from 'react'; -import { ChartPointerEventContextProvider } from '../../../context/chart_pointer_event/chart_pointer_event_context'; -import { useApmParams } from '../../../hooks/use_apm_params'; -import { useServiceMetricChartsFetcher } from '../../../hooks/use_service_metric_charts_fetcher'; -import { useTimeRange } from '../../../hooks/use_time_range'; -import { MetricsChart } from '../../shared/charts/metrics_chart'; +import { ChartPointerEventContextProvider } from '../../../../context/chart_pointer_event/chart_pointer_event_context'; +import { useApmParams } from '../../../../hooks/use_apm_params'; +import { useServiceMetricChartsFetcher } from '../../../../hooks/use_service_metric_charts_fetcher'; +import { useTimeRange } from '../../../../hooks/use_time_range'; +import { MetricsChart } from '../../../shared/charts/metrics_chart'; export function ServiceMetrics() { const { diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page_header.tsx b/x-pack/plugins/apm/public/components/app/metrics_details/index.tsx similarity index 65% rename from x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page_header.tsx rename to x-pack/plugins/apm/public/components/app/metrics_details/index.tsx index 0425ab3ce309e..4adbb25c26d1e 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page_header.tsx +++ b/x-pack/plugins/apm/public/components/app/metrics_details/index.tsx @@ -4,10 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - import React from 'react'; -import { MonitorDetailsTabs } from './monitor_detials_tabs'; +import { ServiceNodeMetrics } from './service_node_metrics'; -export const MonitorDetailsPageHeader = () => { - return ; -}; +export function MetricsDetails() { + return ; +} diff --git a/x-pack/plugins/apm/public/components/app/service_node_metrics/index.test.tsx b/x-pack/plugins/apm/public/components/app/metrics_details/service_node_metrics/index.test.tsx similarity index 86% rename from x-pack/plugins/apm/public/components/app/service_node_metrics/index.test.tsx rename to x-pack/plugins/apm/public/components/app/metrics_details/service_node_metrics/index.test.tsx index bff224cdc791c..9356cab2d1f9c 100644 --- a/x-pack/plugins/apm/public/components/app/service_node_metrics/index.test.tsx +++ b/x-pack/plugins/apm/public/components/app/metrics_details/service_node_metrics/index.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import { ServiceNodeMetrics } from '.'; -import { MockApmPluginContextWrapper } from '../../../context/apm_plugin/mock_apm_plugin_context'; +import { MockApmPluginContextWrapper } from '../../../../context/apm_plugin/mock_apm_plugin_context'; describe('ServiceNodeMetrics', () => { describe('render', () => { diff --git a/x-pack/plugins/apm/public/components/app/service_node_metrics/index.tsx b/x-pack/plugins/apm/public/components/app/metrics_details/service_node_metrics/index.tsx similarity index 82% rename from x-pack/plugins/apm/public/components/app/service_node_metrics/index.tsx rename to x-pack/plugins/apm/public/components/app/metrics_details/service_node_metrics/index.tsx index b902c7f0f1cea..cc0703c036780 100644 --- a/x-pack/plugins/apm/public/components/app/service_node_metrics/index.tsx +++ b/x-pack/plugins/apm/public/components/app/metrics_details/service_node_metrics/index.tsx @@ -23,18 +23,18 @@ import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { getServiceNodeName, SERVICE_NODE_NAME_MISSING, -} from '../../../../common/service_nodes'; -import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context'; -import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; -import { useBreadcrumb } from '../../../context/breadcrumbs/use_breadcrumb'; -import { ChartPointerEventContextProvider } from '../../../context/chart_pointer_event/chart_pointer_event_context'; -import { useApmParams } from '../../../hooks/use_apm_params'; -import { useApmRouter } from '../../../hooks/use_apm_router'; -import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; -import { useServiceMetricChartsFetcher } from '../../../hooks/use_service_metric_charts_fetcher'; -import { useTimeRange } from '../../../hooks/use_time_range'; -import { truncate, unit } from '../../../utils/style'; -import { MetricsChart } from '../../shared/charts/metrics_chart'; +} from '../../../../../common/service_nodes'; +import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; +import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; +import { useBreadcrumb } from '../../../../context/breadcrumbs/use_breadcrumb'; +import { ChartPointerEventContextProvider } from '../../../../context/chart_pointer_event/chart_pointer_event_context'; +import { useApmParams } from '../../../../hooks/use_apm_params'; +import { useApmRouter } from '../../../../hooks/use_apm_router'; +import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; +import { useServiceMetricChartsFetcher } from '../../../../hooks/use_service_metric_charts_fetcher'; +import { useTimeRange } from '../../../../hooks/use_time_range'; +import { truncate, unit } from '../../../../utils/style'; +import { MetricsChart } from '../../../shared/charts/metrics_chart'; const INITIAL_DATA = { host: '', @@ -52,9 +52,9 @@ export function ServiceNodeMetrics() { const apmRouter = useApmRouter(); const { - path: { serviceNodeName }, + path: { id: serviceNodeName }, query, - } = useApmParams('/services/{serviceName}/nodes/{serviceNodeName}/metrics'); + } = useApmParams('/services/{serviceName}/metrics/{id}'); const { environment, kuery, rangeFrom, rangeTo } = query; @@ -63,16 +63,13 @@ export function ServiceNodeMetrics() { useBreadcrumb( () => ({ title: getServiceNodeName(serviceNodeName), - href: apmRouter.link( - '/services/{serviceName}/nodes/{serviceNodeName}/metrics', - { - path: { - serviceName, - serviceNodeName, - }, - query, - } - ), + href: apmRouter.link('/services/{serviceName}/metrics/{id}', { + path: { + serviceName, + id: serviceNodeName, + }, + query, + }), }), [apmRouter, query, serviceName, serviceNodeName] ); diff --git a/x-pack/plugins/apm/public/components/app/settings/general_settings/index.tsx b/x-pack/plugins/apm/public/components/app/settings/general_settings/index.tsx index 9e6e09d525fb5..2faad60fb8b81 100644 --- a/x-pack/plugins/apm/public/components/app/settings/general_settings/index.tsx +++ b/x-pack/plugins/apm/public/components/app/settings/general_settings/index.tsx @@ -5,8 +5,10 @@ * 2.0. */ +import { EuiCallOut, EuiLink, EuiSpacer } from '@elastic/eui'; import { LazyField } from '@kbn/advanced-settings-plugin/public'; import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; import { apmLabsButton, apmProgressiveLoading, @@ -31,7 +33,7 @@ const apmSettingsKeys = [ ]; export function GeneralSettings() { - const { docLinks, notifications } = useApmPluginContext().core; + const { docLinks, notifications, application } = useApmPluginContext().core; const { handleFieldChange, settingsEditableConfig, @@ -63,6 +65,29 @@ export function GeneralSettings() { return ( <> + + {i18n.translate('xpack.apm.apmSettings.kibanaLink.label', { + defaultMessage: 'Kibana advanced settings', + })} + + ), + }} + /> + } + iconType="iInCircle" + /> + {apmSettingsKeys.map((settingKey) => { const editableConfig = settingsEditableConfig[settingKey]; return ( diff --git a/x-pack/plugins/apm/public/components/routing/service_detail/index.tsx b/x-pack/plugins/apm/public/components/routing/service_detail/index.tsx index 8068ee3baf5ef..fdd1aedfa0022 100644 --- a/x-pack/plugins/apm/public/components/routing/service_detail/index.tsx +++ b/x-pack/plugins/apm/public/components/routing/service_detail/index.tsx @@ -4,32 +4,34 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import * as t from 'io-ts'; import { i18n } from '@kbn/i18n'; -import React from 'react'; -import { Outlet } from '@kbn/typed-react-router-config'; import { toBooleanRt, toNumberRt } from '@kbn/io-ts-utils'; +import { Outlet } from '@kbn/typed-react-router-config'; +import * as t from 'io-ts'; +import qs from 'query-string'; +import React from 'react'; +import { Redirect } from 'react-router-dom'; +import { offsetRt } from '../../../../common/comparison_rt'; import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; import { environmentRt } from '../../../../common/environment_rt'; -import { ServiceOverview } from '../../app/service_overview'; -import { ApmServiceTemplate } from '../templates/apm_service_template'; -import { RedirectToDefaultServiceRouteView } from './redirect_to_default_service_route_view'; -import { TransactionOverview } from '../../app/transaction_overview'; -import { ApmServiceWrapper } from './apm_service_wrapper'; -import { ErrorGroupOverview } from '../../app/error_group_overview'; +import { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; +import { TimeRangeMetadataContextProvider } from '../../../context/time_range_metadata/time_range_metadata_context'; +import { useApmParams } from '../../../hooks/use_apm_params'; +import { AlertsOverview } from '../../app/alerts_overview'; import { ErrorGroupDetails } from '../../app/error_group_details'; -import { ServiceMetrics } from '../../app/service_metrics'; -import { ServiceNodeOverview } from '../../app/service_node_overview'; -import { ServiceNodeMetrics } from '../../app/service_node_metrics'; -import { ServiceMapServiceDetail } from '../../app/service_map'; -import { TransactionDetails } from '../../app/transaction_details'; +import { ErrorGroupOverview } from '../../app/error_group_overview'; +import { InfraOverview } from '../../app/infra_overview'; +import { Metrics } from '../../app/metrics'; +import { MetricsDetails } from '../../app/metrics_details'; import { ServiceDependencies } from '../../app/service_dependencies'; import { ServiceLogs } from '../../app/service_logs'; -import { InfraOverview } from '../../app/infra_overview'; -import { AlertsOverview } from '../../app/alerts_overview'; -import { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; -import { offsetRt } from '../../../../common/comparison_rt'; -import { TimeRangeMetadataContextProvider } from '../../../context/time_range_metadata/time_range_metadata_context'; +import { ServiceMapServiceDetail } from '../../app/service_map'; +import { ServiceOverview } from '../../app/service_overview'; +import { TransactionDetails } from '../../app/transaction_details'; +import { TransactionOverview } from '../../app/transaction_overview'; +import { ApmServiceTemplate } from '../templates/apm_service_template'; +import { ApmServiceWrapper } from './apm_service_wrapper'; +import { RedirectToDefaultServiceRouteView } from './redirect_to_default_service_route_view'; function page({ title, @@ -62,6 +64,31 @@ function page({ }; } +function RedirectNodesToMetrics() { + const { query, path } = useApmParams('/services/{serviceName}/nodes'); + const search = qs.stringify(query); + return ( + + ); +} + +function RedirectNodeMetricsToMetricsDetails() { + const { query, path } = useApmParams( + '/services/{serviceName}/nodes/{serviceNodeName}/metrics' + ); + const search = qs.stringify(query); + return ( + + ); +} + export const serviceDetail = { '/services/{serviceName}': { element: ( @@ -210,13 +237,29 @@ export const serviceDetail = { }, }, }, - '/services/{serviceName}/metrics': page({ - tab: 'metrics', - title: i18n.translate('xpack.apm.views.metrics.title', { - defaultMessage: 'Metrics', + '/services/{serviceName}/metrics': { + ...page({ + tab: 'metrics', + title: i18n.translate('xpack.apm.views.metrics.title', { + defaultMessage: 'Metrics', + }), + element: , }), - element: , - }), + children: { + '/services/{serviceName}/metrics': { + element: , + }, + '/services/{serviceName}/metrics/{id}': { + element: , + params: t.type({ + path: t.type({ + id: t.string, + }), + }), + }, + }, + }, + // Deprecated: redirect it to metrics '/services/{serviceName}/nodes': { ...page({ tab: 'nodes', @@ -227,7 +270,7 @@ export const serviceDetail = { }), children: { '/services/{serviceName}/nodes/{serviceNodeName}/metrics': { - element: , + element: , params: t.type({ path: t.type({ serviceNodeName: t.string, @@ -235,7 +278,7 @@ export const serviceDetail = { }), }, '/services/{serviceName}/nodes': { - element: , + element: , params: t.partial({ query: t.partial({ sortDirection: t.string, diff --git a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.test.tsx b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.test.tsx index c8ab3acd1a0af..37271e32c67e3 100644 --- a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.test.tsx +++ b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.test.tsx @@ -4,11 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { - isMetricsTabHidden, - isMetricsJVMsTabHidden, - isInfraTabHidden, -} from '.'; +import { isMetricsTabHidden, isInfraTabHidden } from '.'; describe('APM service template', () => { describe('isMetricsTabHidden', () => { @@ -18,10 +14,7 @@ describe('APM service template', () => { { agentName: 'js-base' }, { agentName: 'rum-js' }, { agentName: 'opentelemetry/webjs' }, - { agentName: 'java' }, - { agentName: 'opentelemetry/java' }, { agentName: 'ios/swift' }, - { agentName: 'ruby', runtimeName: 'jruby' }, { runtimeName: 'aws_lambda' }, ].map((input) => { it(`when input ${JSON.stringify(input)}`, () => { @@ -38,39 +31,12 @@ describe('APM service template', () => { { agentName: 'nodejs' }, { agentName: 'php' }, { agentName: 'python' }, - ].map((input) => { - it(`when input ${JSON.stringify(input)}`, () => { - expect(isMetricsTabHidden(input)).toBeFalsy(); - }); - }); - }); - }); - describe('isMetricsJVMsTabHidden', () => { - describe('hides metrics JVMs tab', () => { - [ - { agentName: undefined }, - { agentName: 'ruby', runtimeName: 'ruby' }, - { agentName: 'ruby' }, - { agentName: 'dotnet' }, - { agentName: 'go' }, - { agentName: 'nodejs' }, - { agentName: 'php' }, - { agentName: 'python' }, - { runtimeName: 'aws_lambda' }, - ].map((input) => { - it(`when input ${JSON.stringify(input)}`, () => { - expect(isMetricsJVMsTabHidden(input)).toBeTruthy(); - }); - }); - }); - describe('shows metrics JVMs tab', () => { - [ + { agentName: 'ruby', runtimeName: 'jruby' }, { agentName: 'java' }, { agentName: 'opentelemetry/java' }, - { agentName: 'ruby', runtimeName: 'jruby' }, ].map((input) => { it(`when input ${JSON.stringify(input)}`, () => { - expect(isMetricsJVMsTabHidden(input)).toBeFalsy(); + expect(isMetricsTabHidden(input)).toBeFalsy(); }); }); }); diff --git a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx index c1bda0d2acfe6..6d3a6ff96b178 100644 --- a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx +++ b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx @@ -16,8 +16,6 @@ import { omit } from 'lodash'; import React from 'react'; import { enableAwsLambdaMetrics } from '@kbn/observability-plugin/common'; import { - isJavaAgentName, - isJRubyAgent, isMobileAgentName, isRumAgentName, isServerlessAgent, @@ -150,24 +148,7 @@ export function isMetricsTabHidden({ return !isAwsLambdaEnabled; } return ( - !agentName || - isRumAgentName(agentName) || - isJavaAgentName(agentName) || - isMobileAgentName(agentName) || - isJRubyAgent(agentName, runtimeName) - ); -} - -export function isMetricsJVMsTabHidden({ - agentName, - runtimeName, -}: { - agentName?: string; - runtimeName?: string; -}) { - return ( - !(isJavaAgentName(agentName) || isJRubyAgent(agentName, runtimeName)) || - isServerlessAgent(runtimeName) + !agentName || isRumAgentName(agentName) || isMobileAgentName(agentName) ); } @@ -276,17 +257,6 @@ function useTabs({ selectedTab }: { selectedTab: Tab['key'] }) { isAwsLambdaEnabled, }), }, - { - key: 'nodes', - href: router.link('/services/{serviceName}/nodes', { - path: { serviceName }, - query, - }), - label: i18n.translate('xpack.apm.serviceDetails.nodesTabLabel', { - defaultMessage: 'Metrics', - }), - hidden: isMetricsJVMsTabHidden({ agentName, runtimeName }), - }, { key: 'infrastructure', href: router.link('/services/{serviceName}/infrastructure', { diff --git a/x-pack/plugins/apm/public/components/shared/links/apm/service_node_metric_overview_link.tsx b/x-pack/plugins/apm/public/components/shared/links/apm/service_node_metric_overview_link.tsx index b8f0a0c53cb7d..8cb3bce94fc9d 100644 --- a/x-pack/plugins/apm/public/components/shared/links/apm/service_node_metric_overview_link.tsx +++ b/x-pack/plugins/apm/public/components/shared/links/apm/service_node_metric_overview_link.tsx @@ -30,9 +30,9 @@ export function useServiceNodeMetricOverviewHref({ serviceNodeName: string; }) { return useAPMHref({ - path: `/services/${serviceName}/nodes/${encodeURIComponent( + path: `/services/${serviceName}/metrics/${encodeURIComponent( serviceNodeName - )}/metrics`, + )}`, persistedFilters, }); } diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts index 2235de6c0be9f..d114b31d75e3c 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts @@ -1159,13 +1159,16 @@ export const tasks: TelemetryTask[] = [ name: 'per_service', executor: async ({ indices, search }) => { const response = await search({ - index: [indices.metric], + index: [indices.transaction], body: { size: 0, timeout, query: { bool: { - filter: [{ range: { '@timestamp': { gte: 'now-1h' } } }], + filter: [ + { range: { '@timestamp': { gte: 'now-1h' } } }, + { term: { [PROCESSOR_EVENT]: ProcessorEvent.transaction } }, + ], }, }, aggs: { diff --git a/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/fake_synthetic_source.test.ts b/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/fake_synthetic_source.test.ts deleted file mode 100644 index e29c9714be4b6..0000000000000 --- a/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/fake_synthetic_source.test.ts +++ /dev/null @@ -1,92 +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 { fakeSyntheticSource } from './fake_synthetic_source'; - -describe('fakeSyntheticSource', () => { - it('flattens and unflattens objects', () => { - const obj = { - service: { - name: 'my-service', - }, - transaction: { - type: 'request', - name: 'GET /api/my-transaction', - }, - }; - - expect(fakeSyntheticSource(obj)).toEqual(obj); - }); - - it('drops null and undefined values', () => { - const obj = { - service: { - name: null, - }, - transaction: { - type: 'request', - name: 'GET /api/my-transaction', - }, - }; - - expect(fakeSyntheticSource(obj)).toEqual({ - transaction: { - type: 'request', - name: 'GET /api/my-transaction', - }, - }); - }); - - it('only wraps multiple values in an array', () => { - const obj = { - span: { - links: [ - { trace: { id: '1' }, span: { id: '1' } }, - { trace: { id: '2' }, span: { id: '2' } }, - ], - }, - }; - - expect(fakeSyntheticSource(obj)).toEqual({ - span: { - links: { - trace: { - id: ['1', '2'], - }, - span: { - id: ['1', '2'], - }, - }, - }, - }); - }); - - it('deduplicates and sorts array values', () => { - const obj = { - span: { - links: [ - { trace: { id: '3' }, span: { id: '1' } }, - { trace: { id: '1' }, span: { id: '1' } }, - { trace: { id: '1' }, span: { id: '4' } }, - ], - }, - }; - - expect(fakeSyntheticSource(obj)).toEqual({ - span: { - links: { - trace: { - id: ['1', '3'], - }, - span: { - id: ['1', '4'], - }, - }, - }, - }); - }); -}); diff --git a/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/fake_synthetic_source.ts b/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/fake_synthetic_source.ts deleted file mode 100644 index 4068691296e74..0000000000000 --- a/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/fake_synthetic_source.ts +++ /dev/null @@ -1,56 +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 { isArray, isObjectLike, set, uniq } from 'lodash'; - -function flatten( - target: Record, - source: Record, - toArray: boolean, - prefix: string = '' -) { - for (const key in source) { - if (!Object.hasOwn(source, key)) { - continue; - } - const value = source[key]; - if (value === undefined || value === null) { - continue; - } - const nextKey = `${prefix}${key}`; - if (isArray(value)) { - value.forEach((val) => { - flatten(target, val, true, `${nextKey}.`); - }); - } else if (isObjectLike(value)) { - flatten(target, value, toArray, `${nextKey}.`); - } else if (toArray && Array.isArray(target[nextKey])) { - target[nextKey].push(value); - } else if (toArray) { - target[nextKey] = [value]; - } else { - target[nextKey] = value; - } - } - return target; -} - -export function fakeSyntheticSource(object: Record) { - const flattened = flatten({}, object, false, ''); - - const unflattened = {}; - for (const key in flattened) { - if (!Object.hasOwn(flattened, key)) { - continue; - } - let val = flattened[key]; - if (Array.isArray(val)) { - val = uniq(val).sort(); - } - set(unflattened, key, val); - } - return unflattened; -} diff --git a/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/index.ts b/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/index.ts index 773d11f2ed139..f013448d6abe5 100644 --- a/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/index.ts +++ b/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/index.ts @@ -34,7 +34,6 @@ import { unpackProcessorEvents, processorEventsToIndex, } from './unpack_processor_events'; -import { fakeSyntheticSource } from './fake_synthetic_source'; export type APMEventESSearchRequest = Omit & { apm: { @@ -159,48 +158,9 @@ export class APMEventClient { return this.callAsyncWithDebug({ cb: (opts) => - ( - this.esClient.search(searchParams, opts) as unknown as Promise<{ - body: TypedSearchResponse; - }> - ).then((response) => { - // ensure metric data is compatible with synthetic source - // enabled - const metricEventsOnly = params.apm.events.every( - (event) => event === ProcessorEvent.metric - ); - - if (!response.body?.hits?.hits) { - return response; - } - - const hits = response.body.hits.hits.map((hit) => { - if ( - metricEventsOnly || - // take filter_path etc into account - (hit._source && - 'processor' in hit._source && - hit._source.processor?.event === ProcessorEvent.metric) - ) { - return { - ...hit, - _source: fakeSyntheticSource(hit._source), - }; - } - return hit; - }); - - return { - ...response, - body: { - ...response.body, - hits: { - ...response.body.hits, - hits, - }, - }, - }; - }), + this.esClient.search(searchParams, opts) as unknown as Promise<{ + body: TypedSearchResponse; + }>, operationName, params: searchParams, requestType: 'search', diff --git a/x-pack/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts b/x-pack/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts index 0a6beb7f992d6..03971c6d115bf 100644 --- a/x-pack/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts +++ b/x-pack/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts @@ -29,7 +29,6 @@ import { observabilityOverviewRouteRepository } from '../observability_overview/ import { serviceRouteRepository } from '../services/route'; import { serviceGroupRouteRepository } from '../service_groups/route'; import { serviceMapRouteRepository } from '../service_map/route'; -import { serviceNodeRouteRepository } from '../service_nodes/route'; import { agentConfigurationRouteRepository } from '../settings/agent_configuration/route'; import { anomalyDetectionRouteRepository } from '../settings/anomaly_detection/route'; import { apmIndicesRouteRepository } from '../settings/apm_indices/route'; @@ -52,7 +51,6 @@ function getTypedGlobalApmServerRouteRepository() { ...metricsRouteRepository, ...observabilityOverviewRouteRepository, ...serviceMapRouteRepository, - ...serviceNodeRouteRepository, ...serviceRouteRepository, ...serviceGroupRouteRepository, ...suggestionsRouteRepository, diff --git a/x-pack/plugins/apm/server/routes/fleet/get_latest_apm_package.ts b/x-pack/plugins/apm/server/routes/fleet/get_latest_apm_package.ts index c7cd083fbda80..671b4d56dad94 100644 --- a/x-pack/plugins/apm/server/routes/fleet/get_latest_apm_package.ts +++ b/x-pack/plugins/apm/server/routes/fleet/get_latest_apm_package.ts @@ -20,7 +20,7 @@ export async function getLatestApmPackage({ const { name, version } = await packageClient.fetchFindLatestPackage( APM_PACKAGE_NAME ); - const registryPackage = await packageClient.getRegistryPackage(name, version); + const registryPackage = await packageClient.getPackage(name, version); const { title, policy_templates: policyTemplates } = registryPackage.packageInfo; const firstTemplate = policyTemplates?.[0]; diff --git a/x-pack/plugins/apm/server/routes/service_nodes/get_service_nodes.ts b/x-pack/plugins/apm/server/routes/metrics/get_service_nodes.ts similarity index 100% rename from x-pack/plugins/apm/server/routes/service_nodes/get_service_nodes.ts rename to x-pack/plugins/apm/server/routes/metrics/get_service_nodes.ts diff --git a/x-pack/plugins/apm/server/routes/metrics/route.ts b/x-pack/plugins/apm/server/routes/metrics/route.ts index 5d6b4f245c568..8aea9cc5a981c 100644 --- a/x-pack/plugins/apm/server/routes/metrics/route.ts +++ b/x-pack/plugins/apm/server/routes/metrics/route.ts @@ -11,6 +11,7 @@ import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { environmentRt, kueryRt, rangeRt } from '../default_api_types'; import { FetchAndTransformMetrics } from './fetch_and_transform_metrics'; import { getMetricsChartDataByAgent } from './get_metrics_chart_data_by_agent'; +import { getServiceNodes } from './get_service_nodes'; const metricsChartsRoute = createApmServerRoute({ endpoint: 'GET /internal/apm/services/{serviceName}/metrics/charts', @@ -66,4 +67,45 @@ const metricsChartsRoute = createApmServerRoute({ }, }); -export const metricsRouteRepository = metricsChartsRoute; +const serviceMetricsJvm = createApmServerRoute({ + endpoint: 'GET /internal/apm/services/{serviceName}/metrics/nodes', + params: t.type({ + path: t.type({ + serviceName: t.string, + }), + query: t.intersection([kueryRt, rangeRt, environmentRt]), + }), + options: { tags: ['access:apm'] }, + handler: async ( + resources + ): Promise<{ + serviceNodes: Array<{ + name: string; + cpu: number | null; + heapMemory: number | null; + hostName: string | null | undefined; + nonHeapMemory: number | null; + threadCount: number | null; + }>; + }> => { + const setup = await setupRequest(resources); + const { params } = resources; + const { serviceName } = params.path; + const { kuery, environment, start, end } = params.query; + + const serviceNodes = await getServiceNodes({ + kuery, + setup, + serviceName, + environment, + start, + end, + }); + return { serviceNodes }; + }, +}); + +export const metricsRouteRepository = { + ...metricsChartsRoute, + ...serviceMetricsJvm, +}; diff --git a/x-pack/plugins/apm/server/routes/service_nodes/__snapshots__/queries.test.ts.snap b/x-pack/plugins/apm/server/routes/service_nodes/__snapshots__/queries.test.ts.snap deleted file mode 100644 index 38719f84994a3..0000000000000 --- a/x-pack/plugins/apm/server/routes/service_nodes/__snapshots__/queries.test.ts.snap +++ /dev/null @@ -1,200 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`service node queries fetches metadata for a service node 1`] = ` -Object { - "apm": Object { - "events": Array [ - "metric", - ], - }, - "body": Object { - "aggs": Object { - "containerId": Object { - "terms": Object { - "field": "container.id", - "size": 1, - }, - }, - "host": Object { - "terms": Object { - "field": "host.name", - "size": 1, - }, - }, - "nodes": Object { - "terms": Object { - "field": "service.node.name", - }, - }, - }, - "query": Object { - "bool": Object { - "filter": Array [ - Object { - "term": Object { - "service.name": "foo", - }, - }, - Object { - "range": Object { - "@timestamp": Object { - "format": "epoch_millis", - "gte": 0, - "lte": 50000, - }, - }, - }, - Object { - "term": Object { - "service.node.name": "bar", - }, - }, - ], - }, - }, - "size": 0, - "track_total_hits": false, - }, -} -`; - -exports[`service node queries fetches metadata for unidentified service nodes 1`] = ` -Object { - "apm": Object { - "events": Array [ - "metric", - ], - }, - "body": Object { - "aggs": Object { - "containerId": Object { - "terms": Object { - "field": "container.id", - "size": 1, - }, - }, - "host": Object { - "terms": Object { - "field": "host.name", - "size": 1, - }, - }, - "nodes": Object { - "terms": Object { - "field": "service.node.name", - }, - }, - }, - "query": Object { - "bool": Object { - "filter": Array [ - Object { - "term": Object { - "service.name": "foo", - }, - }, - Object { - "range": Object { - "@timestamp": Object { - "format": "epoch_millis", - "gte": 0, - "lte": 50000, - }, - }, - }, - Object { - "bool": Object { - "must_not": Array [ - Object { - "exists": Object { - "field": "service.node.name", - }, - }, - ], - }, - }, - ], - }, - }, - "size": 0, - "track_total_hits": false, - }, -} -`; - -exports[`service node queries fetches services nodes 1`] = ` -Object { - "apm": Object { - "events": Array [ - "metric", - ], - }, - "body": Object { - "aggs": Object { - "nodes": Object { - "aggs": Object { - "cpu": Object { - "avg": Object { - "field": "system.process.cpu.total.norm.pct", - }, - }, - "heapMemory": Object { - "avg": Object { - "field": "jvm.memory.heap.used", - }, - }, - "latest": Object { - "top_metrics": Object { - "metrics": Array [ - Object { - "field": "host.name", - }, - ], - "sort": Object { - "@timestamp": "desc", - }, - }, - }, - "nonHeapMemory": Object { - "avg": Object { - "field": "jvm.memory.non_heap.used", - }, - }, - "threadCount": Object { - "max": Object { - "field": "jvm.thread.count", - }, - }, - }, - "terms": Object { - "field": "service.node.name", - "missing": "_service_node_name_missing_", - "size": 10000, - }, - }, - }, - "query": Object { - "bool": Object { - "filter": Array [ - Object { - "term": Object { - "service.name": "foo", - }, - }, - Object { - "range": Object { - "@timestamp": Object { - "format": "epoch_millis", - "gte": 0, - "lte": 50000, - }, - }, - }, - ], - }, - }, - "size": 0, - "track_total_hits": false, - }, -} -`; diff --git a/x-pack/plugins/apm/server/routes/service_nodes/queries.test.ts b/x-pack/plugins/apm/server/routes/service_nodes/queries.test.ts deleted file mode 100644 index 470be6142aaed..0000000000000 --- a/x-pack/plugins/apm/server/routes/service_nodes/queries.test.ts +++ /dev/null @@ -1,68 +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 { getServiceNodes } from './get_service_nodes'; -import { - SearchParamsMock, - inspectSearchParams, -} from '../../utils/test_helpers'; -import { getServiceNodeMetadata } from '../services/get_service_node_metadata'; -import { SERVICE_NODE_NAME_MISSING } from '../../../common/service_nodes'; -import { ENVIRONMENT_ALL } from '../../../common/environment_filter_values'; - -describe('service node queries', () => { - let mock: SearchParamsMock; - - afterEach(() => { - mock.teardown(); - }); - - it('fetches services nodes', async () => { - mock = await inspectSearchParams((setup) => - getServiceNodes({ - setup, - serviceName: 'foo', - kuery: '', - environment: ENVIRONMENT_ALL.value, - start: 0, - end: 50000, - }) - ); - - expect(mock.params).toMatchSnapshot(); - }); - - it('fetches metadata for a service node', async () => { - mock = await inspectSearchParams((setup) => - getServiceNodeMetadata({ - setup, - serviceName: 'foo', - serviceNodeName: 'bar', - kuery: '', - start: 0, - end: 50000, - }) - ); - - expect(mock.params).toMatchSnapshot(); - }); - - it('fetches metadata for unidentified service nodes', async () => { - mock = await inspectSearchParams((setup) => - getServiceNodeMetadata({ - setup, - serviceName: 'foo', - serviceNodeName: SERVICE_NODE_NAME_MISSING, - kuery: '', - start: 0, - end: 50000, - }) - ); - - expect(mock.params).toMatchSnapshot(); - }); -}); diff --git a/x-pack/plugins/apm/server/routes/service_nodes/route.ts b/x-pack/plugins/apm/server/routes/service_nodes/route.ts deleted file mode 100644 index eef2b29b1e373..0000000000000 --- a/x-pack/plugins/apm/server/routes/service_nodes/route.ts +++ /dev/null @@ -1,53 +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 * as t from 'io-ts'; -import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; -import { setupRequest } from '../../lib/helpers/setup_request'; -import { getServiceNodes } from './get_service_nodes'; -import { rangeRt, kueryRt } from '../default_api_types'; -import { environmentRt } from '../../../common/environment_rt'; - -const serviceNodesRoute = createApmServerRoute({ - endpoint: 'GET /internal/apm/services/{serviceName}/serviceNodes', - params: t.type({ - path: t.type({ - serviceName: t.string, - }), - query: t.intersection([kueryRt, rangeRt, environmentRt]), - }), - options: { tags: ['access:apm'] }, - handler: async ( - resources - ): Promise<{ - serviceNodes: Array<{ - name: string; - cpu: number | null; - heapMemory: number | null; - hostName: string | null | undefined; - nonHeapMemory: number | null; - threadCount: number | null; - }>; - }> => { - const setup = await setupRequest(resources); - const { params } = resources; - const { serviceName } = params.path; - const { kuery, environment, start, end } = params.query; - - const serviceNodes = await getServiceNodes({ - kuery, - setup, - serviceName, - environment, - start, - end, - }); - return { serviceNodes }; - }, -}); - -export const serviceNodeRouteRepository = serviceNodesRoute; diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/field_data_row/action_menu/lens_utils.ts b/x-pack/plugins/data_visualizer/public/application/common/components/field_data_row/action_menu/lens_utils.ts index 034f7037fc29a..b053715090c7b 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/field_data_row/action_menu/lens_utils.ts +++ b/x-pack/plugins/data_visualizer/public/application/common/components/field_data_row/action_menu/lens_utils.ts @@ -282,7 +282,7 @@ export function getLensAttributes( ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer1: { columnOrder: ['col1', 'col2'], diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/search_ui/search_ui.scss b/x-pack/plugins/enterprise_search/public/applications/app_search/components/search_ui/search_ui.scss new file mode 100644 index 0000000000000..85d01408cae96 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/search_ui/search_ui.scss @@ -0,0 +1,3 @@ +.searchUIGraphicContainer { + transform: translateZ(0); +} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/search_ui/search_ui.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/search_ui/search_ui.tsx index 43ea60fa84617..d7398357a5e58 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/search_ui/search_ui.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/search_ui/search_ui.tsx @@ -21,6 +21,7 @@ import { SearchUIForm } from './components/search_ui_form'; import { SearchUIGraphic } from './components/search_ui_graphic'; import { SEARCH_UI_TITLE } from './i18n'; import { SearchUILogic } from './search_ui_logic'; +import './search_ui.scss'; export const SearchUI: React.FC = () => { const { loadFieldData } = useActions(SearchUILogic); @@ -76,7 +77,7 @@ export const SearchUI: React.FC = () => { - + diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration.tsx index 233825d6af135..d554e26caf5dc 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration.tsx @@ -18,7 +18,6 @@ import { EuiSpacer, EuiSteps, EuiCodeBlock, - EuiHorizontalRule, EuiCallOut, EuiButton, } from '@elastic/eui'; @@ -179,7 +178,24 @@ export const ConnectorConfiguration: React.FC = () => { } )} - + + ), + status: + !indexData.connector.status || + indexData.connector.status === ConnectorStatus.CREATED + ? 'incomplete' + : 'complete', + title: i18n.translate( + 'xpack.enterpriseSearch.content.indices.configurationConnector.steps.deployConnector.title', + { + defaultMessage: 'Deploy a connector', + } + ), + titleSize: 'xs', + }, + { + children: ( + {!indexData.connector.status || indexData.connector.status === ConnectorStatus.CREATED ? ( { )} /> )} - - ), - status: - !indexData.connector.status || - indexData.connector.status === ConnectorStatus.CREATED - ? 'incomplete' - : 'complete', - title: i18n.translate( - 'xpack.enterpriseSearch.content.indices.configurationConnector.steps.deployConnector.title', - { - defaultMessage: 'Deploy a connector', - } + ), - titleSize: 'xs', - }, - { - children: , status: indexData.connector.status === ConnectorStatus.CONNECTED ? 'complete' diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs.tsx index 708f8a6a77253..b6ae8bdd40fff 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs.tsx @@ -85,9 +85,9 @@ export const SyncJobs: React.FC = () => { { + onChange={({ page: { index, size } }: { page: { index: number; size: number } }) => { if (connectorId) { - fetchSyncJobs({ connectorId, page: index, size: syncJobsPagination.pageSize }); + fetchSyncJobs({ connectorId, page: index, size }); } }} pagination={{ diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings.tsx index 94c4c1fdbaad9..a1bbe6c39956f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings.tsx @@ -72,8 +72,11 @@ export const Settings: React.FC = () => { 'Allow all ingestion mechanisms on your Enterprise Search deployment to extract searchable content from binary files, like PDFs and Word documents. This setting applies to all new Elasticsearch indices created by an Enterprise Search ingestion mechanism.', } )} + label={i18n.translate('xpack.enterpriseSearch.content.settings.contactExtraction.label', { + defaultMessage: 'Content extraction', + })} link={ - + {i18n.translate('xpack.enterpriseSearch.content.settings.contactExtraction.link', { defaultMessage: 'Learn more about content extraction', })} @@ -99,8 +102,11 @@ export const Settings: React.FC = () => { 'Whitespace reduction will strip your full-text content of whitespace by default.', } )} + label={i18n.translate('xpack.enterpriseSearch.content.settings.whitespaceReduction.label', { + defaultMessage: 'Whitespace reduction', + })} link={ - + {i18n.translate('xpack.enterpriseSearch.content.settings.whitespaceReduction.link', { defaultMessage: 'Learn more about whitespace reduction', })} @@ -129,8 +135,11 @@ export const Settings: React.FC = () => { 'ML Inference Pipelines will run as part of your pipelines. You will have to configure processors for each index individually on its pipelines page.', } )} + label={i18n.translate('xpack.enterpriseSearch.content.settings.mlInference.label', { + defaultMessage: 'ML Inference', + })} link={ - + {i18n.translate('xpack.enterpriseSearch.content.settings.mlInference.link', { defaultMessage: 'Learn more about content extraction', })} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_panel.tsx index 154da2649f9ae..fc0f3cca3e06c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_panel.tsx @@ -20,6 +20,7 @@ import { i18n } from '@kbn/i18n'; interface SettingsPanelProps { description: string; + label: string; link: React.ReactNode; onChange: (event: EuiSwitchEvent) => void; title: string; @@ -28,6 +29,7 @@ interface SettingsPanelProps { export const SettingsPanel: React.FC = ({ description, + label, link, onChange, title, @@ -57,13 +59,7 @@ export const SettingsPanel: React.FC = ({ - + {link} diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts index 975e7981829f2..34e781731988c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts @@ -61,7 +61,6 @@ class DocLinks { public connectorsMongoDB: string; public connectorsMySQL: string; public connectorsWorkplaceSearch: string; - public contentExtraction: string; public crawlerGettingStarted: string; public crawlerManaging: string; public crawlerOverview: string; @@ -175,7 +174,6 @@ class DocLinks { this.connectorsMongoDB = ''; this.connectorsMySQL = ''; this.connectorsWorkplaceSearch = ''; - this.contentExtraction = ''; this.crawlerGettingStarted = ''; this.crawlerManaging = ''; this.crawlerOverview = ''; @@ -291,7 +289,6 @@ class DocLinks { this.connectorsMongoDB = docLinks.links.enterpriseSearch.connectorsMongoDB; this.connectorsMySQL = docLinks.links.enterpriseSearch.connectorsMySQL; this.connectorsWorkplaceSearch = docLinks.links.enterpriseSearch.connectorsWorkplaceSearch; - this.contentExtraction = docLinks.links.enterpriseSearch.contentExtraction; this.crawlerGettingStarted = docLinks.links.enterpriseSearch.crawlerGettingStarted; this.crawlerManaging = docLinks.links.enterpriseSearch.crawlerManaging; this.crawlerOverview = docLinks.links.enterpriseSearch.crawlerOverview; diff --git a/x-pack/plugins/fleet/common/experimental_features.ts b/x-pack/plugins/fleet/common/experimental_features.ts index 8926a1092fca2..d10326f9a4f25 100644 --- a/x-pack/plugins/fleet/common/experimental_features.ts +++ b/x-pack/plugins/fleet/common/experimental_features.ts @@ -15,6 +15,7 @@ export const allowedExperimentalValues = Object.freeze({ createPackagePolicyMultiPageLayout: true, packageVerification: true, showDevtoolsRequest: true, + noLargeFeaturedIntegrations: false, }); type ExperimentalConfigKeys = Array; diff --git a/x-pack/plugins/fleet/common/openapi/README.md b/x-pack/plugins/fleet/common/openapi/README.md index 5e7a3d05cf996..954af7eb76b00 100644 --- a/x-pack/plugins/fleet/common/openapi/README.md +++ b/x-pack/plugins/fleet/common/openapi/README.md @@ -1,14 +1,13 @@ # OpenAPI (Experimental) -The current self-contained spec file is [as JSON](https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/fleet/common/openapi/bundled.json) or [as YAML](https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/fleet/common/openapi/bundled.yaml) and can be used for online tools like those found at https://openapi.tools/. This spec is experimental and may be incomplete or change later. +> **_NOTE:_** This spec is experimental and may be incomplete or change later. -For example, online viewers for the specification like these: +The current self-contained spec file, available [as JSON](https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/fleet/common/openapi/bundled.json) or [as YAML](https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/fleet/common/openapi/bundled.yaml), can be used for online tools like those found at https://openapi.tools/. -| View spec using MrinDoc | View spec using Swagger UI | -|----|----| -| Screen Shot 2021-03-09 at 10 14 52 AM | Screen Shot 2021-03-09 at 10 14 04 AM | +For example, [click here to view the specification in the Swagger UI](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/fleet/common/openapi/bundled.json). A guide about the openApi specification can be found at [https://swagger.io/docs/specification/about/](https://swagger.io/docs/specification/about/). + ## The `openapi` folder * `entrypoint.yaml` is the overview file which links to the various files on disk. @@ -18,15 +17,15 @@ A guide about the openApi specification can be found at [https://swagger.io/docs [`responses`](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#responseObject) [`parameters`](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#parameterObject) - ## Tools +## Tools It is possible to validate the docs before bundling them with the following command: ``` - npx swagger-cli validate x-pack/plugins/fleet/common/openapi/entrypoint.yaml + npx swagger-cli validate x-pack/plugins/fleet/common/openapi/entrypoint.yaml ``` Then generate the `bundled` files with the following: - ``` - npx @redocly/openapi-cli bundle --ext yaml --output bundled.yaml entrypoint.yaml - npx @redocly/openapi-cli bundle --ext json --output bundled.json entrypoint.yaml - ``` + ``` + npx @redocly/openapi-cli bundle --ext yaml --output bundled.yaml entrypoint.yaml + npx @redocly/openapi-cli bundle --ext json --output bundled.json entrypoint.yaml + ``` diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx index 5d6d6f5153360..9b94537a73c27 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx @@ -47,7 +47,7 @@ const ScrollAnchor = styled.div` scroll-margin-top: ${(props) => parseFloat(props.theme.eui.euiHeaderHeightCompensation) * 2}px; `; -export const PackagePolicyInputStreamConfig: React.FunctionComponent<{ +interface Props { packagePolicy: NewPackagePolicy; packageInputStream: RegistryStream & { data_stream: { dataset: string; type: string } }; packageInfo: PackageInfo; @@ -56,7 +56,9 @@ export const PackagePolicyInputStreamConfig: React.FunctionComponent<{ updatePackagePolicyInputStream: (updatedStream: Partial) => void; inputStreamValidationResults: PackagePolicyConfigValidationResults; forceShowErrors?: boolean; -}> = memo( +} + +export const PackagePolicyInputStreamConfig = memo( ({ packagePolicy, packageInputStream, @@ -193,161 +195,174 @@ export const PackagePolicyInputStreamConfig: React.FunctionComponent<{ ); })} - {/* Advanced section */} - {(isPackagePolicyEdit || !!advancedVars.length) && ( - - - + {/* Advanced section - always shown since we display experimental indexing settings here */} + + + + + setIsShowingAdvanced(!isShowingAdvanced)} + flush="left" + > + + + + {!isShowingAdvanced && hasErrors && advancedVarsWithErrorsCount ? ( - setIsShowingAdvanced(!isShowingAdvanced)} - flush="left" - > + - + - {!isShowingAdvanced && hasErrors && advancedVarsWithErrorsCount ? ( + ) : null} + + + {isShowingAdvanced ? ( + <> + {advancedVars.map((varDef) => { + if (!packagePolicyInputStream.vars) return null; + const { name: varName, type: varType } = varDef; + const value = packagePolicyInputStream.vars?.[varName]?.value; + + return ( + + { + updatePackagePolicyInputStream({ + vars: { + ...packagePolicyInputStream.vars, + [varName]: { + type: varType, + value: newValue, + }, + }, + }); + }} + errors={inputStreamValidationResults?.vars![varName]} + forceShowErrors={forceShowErrors} + /> + + ); + })} + {/* Only show datastream pipelines and mappings on edit */} + {isPackagePolicyEdit && ( + <> + + + + + + + + )} + {/* Experimental index/datastream settings e.g. synthetic source */} + + - + +
+ +
+
+
+ + + + + ), + }} /> - ) : null} -
-
- {isShowingAdvanced ? ( - <> - {advancedVars.map((varDef) => { - if (!packagePolicyInputStream.vars) return null; - const { name: varName, type: varType } = varDef; - const value = packagePolicyInputStream.vars?.[varName]?.value; - - return ( - - { - updatePackagePolicyInputStream({ - vars: { - ...packagePolicyInputStream.vars, - [varName]: { - type: varType, - value: newValue, - }, - }, - }); - }} - errors={inputStreamValidationResults?.vars![varName]} - forceShowErrors={forceShowErrors} - /> - - ); - })} - {/* Only show datastream pipelines and mappings on edit */} - {isPackagePolicyEdit && ( - <> - - - - - - - - )} - {/* Experimental index/datastream settings e.g. synthetic source */} - - - - -
- -
-
-
- - + + + + dataStream === + getRegistryDataStreamAssetBaseName( + packagePolicyInputStream.data_stream + ) && features.synthetic_source + ) ?? false + } + label={ - - - ), - }} + id="xpack.fleet.createPackagePolicy.experimentalFeatures.syntheticSourceLabel" + defaultMessage="Synthetic source" /> - - - - - - dataStream === - getRegistryDataStreamAssetBaseName( - packagePolicyInputStream.data_stream - ) && features.synthetic_source - ) ?? false - } - label={ - + } + onChange={(e) => { + if (!packagePolicy.package) { + return; } - onChange={(e) => { - if (!packagePolicy.package) { - return; - } - updatePackagePolicy({ - package: { - ...packagePolicy.package, - experimental_data_stream_features: [ - { - data_stream: getRegistryDataStreamAssetBaseName( - packagePolicyInputStream.data_stream - ), - features: { - synthetic_source: e.target.checked, - }, - }, - ], + const newExperimentalDataStreamFeatures = [ + ...(packagePolicy.package.experimental_data_stream_features ?? []), + ]; + + const dataStream = getRegistryDataStreamAssetBaseName( + packagePolicyInputStream.data_stream + ); + + const existingSettingRecord = newExperimentalDataStreamFeatures.find( + (x) => x.data_stream === dataStream + ); + + if (existingSettingRecord) { + existingSettingRecord.features.synthetic_source = e.target.checked; + } else { + newExperimentalDataStreamFeatures.push({ + data_stream: dataStream, + features: { + synthetic_source: e.target.checked, }, }); - }} - /> - -
-
- - ) : null} -
- )} + } + + updatePackagePolicy({ + package: { + ...packagePolicy.package, + experimental_data_stream_features: + newExperimentalDataStreamFeatures, + }, + }); + }} + /> +
+
+
+ + ) : null} +
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/components/post_install_add_agent_modal.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/components/post_install_add_agent_modal.tsx index e82d51440e067..b6d568971140a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/components/post_install_add_agent_modal.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/components/post_install_add_agent_modal.tsx @@ -6,9 +6,20 @@ */ import React from 'react'; -import { EuiConfirmModal } from '@elastic/eui'; +import { + EuiButton, + EuiButtonEmpty, + EuiModal, + EuiModalBody, + EuiModalFooter, + EuiModalHeader, + EuiModalHeaderTitle, + EuiText, +} from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; +import { WithGuidedOnboardingTour } from '../../../../../../../components'; +import { useIsGuidedOnboardingActive } from '../../../../../../../hooks'; import type { AgentPolicy, PackageInfo } from '../../../../../types'; const toTitleCase = (str: string) => str.charAt(0).toUpperCase() + str.substr(1); @@ -19,41 +30,64 @@ export const PostInstallAddAgentModal: React.FunctionComponent<{ packageInfo: PackageInfo; agentPolicy: AgentPolicy; }> = ({ onConfirm, onCancel, packageInfo, agentPolicy }) => { + const isGuidedOnboardingActive = useIsGuidedOnboardingActive(packageInfo.name); + return ( - - } - onCancel={onCancel} - onConfirm={onConfirm} - cancelButtonText={ - - } - confirmButtonText={ - - } - buttonColor="primary" - data-test-subj="postInstallAddAgentModal" - > - Elastic Agent, - }} - /> - + + + + + + + + + +

+ Elastic Agent, + }} + /> +

+
+
+ + + + + + + + + + + + +
); }; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid.tsx index a3495d599870d..727a81dbedc88 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid.tsx @@ -34,6 +34,10 @@ import type { IntegrationCardItem } from '../../../../../../common/types/models' import type { ExtendedIntegrationCategory, CategoryFacet } from '../screens/home/category_facets'; +import { ExperimentalFeaturesService } from '../../../services'; + +import { promoteFeaturedIntegrations } from './utils'; + import { PackageCard } from './package_card'; export interface Props { @@ -73,7 +77,7 @@ export const PackageListGrid: FunctionComponent = ({ const [isSticky, setIsSticky] = useState(false); const [windowScrollY] = useState(window.scrollY); const { euiTheme } = useEuiTheme(); - + const { noLargeFeaturedIntegrations } = ExperimentalFeaturesService.get(); useEffect(() => { const menuRefCurrent = menuRef.current; const onScroll = () => { @@ -99,16 +103,20 @@ export const PackageListGrid: FunctionComponent = ({ ? categories.find((category) => category.id === selectedCategory)?.title : undefined; - const filteredList = useMemo(() => { + const filteredPromotedList = useMemo(() => { if (isLoading) return []; - return searchTerm + const filteredList = searchTerm ? list.filter((item) => (localSearchRef.current!.search(searchTerm) as IntegrationCardItem[]) .map((match) => match[searchIdField]) .includes(item[searchIdField]) ) : list; - }, [isLoading, list, localSearchRef, searchTerm]); + + return noLargeFeaturedIntegrations + ? promoteFeaturedIntegrations(filteredList, selectedCategory) + : filteredList; + }, [isLoading, list, localSearchRef, noLargeFeaturedIntegrations, searchTerm, selectedCategory]); const controlsContent = ; let gridContent: JSX.Element; @@ -118,7 +126,7 @@ export const PackageListGrid: FunctionComponent = ({ } else { gridContent = ( @@ -127,7 +135,7 @@ export const PackageListGrid: FunctionComponent = ({ return ( <> - {featuredList} + {!noLargeFeaturedIntegrations && featuredList}
+ ({ + id: `epr:${name}`, + description: 'description', + icons: [], + title: name, + url: `/app/integrations/detail/${name}-1.0.0/overview`, + integration: '', + name, + version: '1.0.0', + release: 'ga', + categories: [], + isUnverified: false, + } as IntegrationCardItem); + +const intA = mockCard('A'); +const intB = mockCard('B'); +const intC = mockCard('C'); +const intD = mockCard('D'); + +describe('_promoteFeaturedIntegrations', () => { + it('should return list unaltered if no featured integrations for category', () => { + const list = [intA, intB]; + const selectedCategory = 'security'; + const featuredIntegrationsByCategory = {}; + expect( + _promoteFeaturedIntegrations(featuredIntegrationsByCategory, list, selectedCategory) + ).toEqual(list); + }); + it('should promote single integration to front of list if it matches the selected category', () => { + const list = [intA, intB]; + const selectedCategory = 'security'; + const featuredIntegrationsByCategory = { + security: ['B'], + }; + expect( + _promoteFeaturedIntegrations(featuredIntegrationsByCategory, list, selectedCategory) + ).toEqual([intB, intA]); + }); + it('should promote single integration to front of list if the selected category is empty string', () => { + const list = [intA, intB]; + const selectedCategory = ''; + const featuredIntegrationsByCategory = { + '': ['B'], + }; + expect( + _promoteFeaturedIntegrations(featuredIntegrationsByCategory, list, selectedCategory) + ).toEqual([intB, intA]); + }); + it('should respect the order of the featured integrations list', () => { + const list = [intA, intB, intC, intD]; + const selectedCategory = 'security'; + const featuredIntegrationsByCategory = { + security: ['C', 'B'], + }; + expect( + _promoteFeaturedIntegrations(featuredIntegrationsByCategory, list, selectedCategory) + ).toEqual([intC, intB, intA, intD]); + }); +}); diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/utils/promote_featured_integrations.ts b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/utils/promote_featured_integrations.ts new file mode 100644 index 0000000000000..93eac87a6aca1 --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/utils/promote_featured_integrations.ts @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import partition from 'lodash/partition'; + +import { FEATURED_INTEGRATIONS_BY_CATEGORY } from '@kbn/custom-integrations-plugin/common'; + +import type { Props as PackageListGridProps } from '../package_list_grid'; + +type Category = PackageListGridProps['selectedCategory']; + +// exported for testing +export function _promoteFeaturedIntegrations( + featuredIntegrationsByCategory: Partial>, + packageList: PackageListGridProps['list'], + selectedCategory: Category +) { + const featuredIntegrationNames = featuredIntegrationsByCategory[selectedCategory]; + + if (!featuredIntegrationNames) return packageList; + + const [featuredIntegrations, otherIntegrations] = partition(packageList, (card) => + featuredIntegrationNames.includes(card.name) + ); + + // now return the integrations in the order they are defined in + const orderedFeaturedIntegrations = featuredIntegrationNames + .map((integrationName) => featuredIntegrations.find(({ name }) => name === integrationName)) + .filter((v) => v) as PackageListGridProps['list']; + + return [...orderedFeaturedIntegrations, ...otherIntegrations]; +} + +export const promoteFeaturedIntegrations = _promoteFeaturedIntegrations.bind( + null, + FEATURED_INTEGRATIONS_BY_CATEGORY +); diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx index caefad75ad7a1..d649bede3db44 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx @@ -48,12 +48,15 @@ import { import { pkgKeyFromPackageInfo } from '../../../../services'; import type { DetailViewPanelName, PackageInfo } from '../../../../types'; import { InstallStatus } from '../../../../types'; -import { Error, Loading, HeaderReleaseBadge } from '../../../../components'; +import { + Error, + Loading, + HeaderReleaseBadge, + WithGuidedOnboardingTour, +} from '../../../../components'; import type { WithHeaderLayoutProps } from '../../../../layouts'; import { WithHeaderLayout } from '../../../../layouts'; -import { WithGuidedOnboardingTour } from './components/with_guided_onboarding_tour'; - import { useIsFirstTimeAgentUser } from './hooks'; import { getInstallPkgRouteOptions } from './utils'; import { @@ -121,6 +124,7 @@ export function Detail() { const { createPackagePolicyMultiPageLayout: isExperimentalAddIntegrationPageEnabled } = ExperimentalFeaturesService.get(); const agentPolicyIdFromContext = getAgentPolicyId(); + const isOverviewPage = panel === 'overview'; // Package info state const [packageInfo, setPackageInfo] = useState(null); @@ -362,7 +366,8 @@ export function Detail() { !!c), diff --git a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/confirm_incoming_data.tsx b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/confirm_incoming_data.tsx index 145811126691a..9e87a30034fd4 100644 --- a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/confirm_incoming_data.tsx +++ b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/confirm_incoming_data.tsx @@ -10,6 +10,8 @@ import { EuiCallOut, EuiText, EuiSpacer, EuiButton, EuiLink } from '@elastic/eui import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; +import { useIsGuidedOnboardingActive, useStartServices } from '../../hooks'; + import type { InstalledIntegrationPolicy } from './use_get_agent_incoming_data'; import { useGetAgentIncomingData, usePollingIncomingData } from './use_get_agent_incoming_data'; @@ -29,6 +31,8 @@ export const ConfirmIncomingData: React.FunctionComponent = ({ troubleshootLink, }) => { const { incomingData, isLoading } = usePollingIncomingData(agentIds); + const isGuidedOnboardingActive = useIsGuidedOnboardingActive(installedPolicy?.name); + const { guidedOnboarding } = useStartServices(); const { enrolledAgents, numAgentsWithData, linkButton, message } = useGetAgentIncomingData( incomingData, @@ -37,6 +41,11 @@ export const ConfirmIncomingData: React.FunctionComponent = ({ if (!isLoading && enrolledAgents > 0 && numAgentsWithData > 0) { setAgentDataConfirmed(true); + if (installedPolicy?.name && isGuidedOnboardingActive) { + guidedOnboarding.guidedOnboardingApi?.completeGuidedOnboardingForIntegration( + installedPolicy!.name + ); + } } if (!agentDataConfirmed) { diff --git a/x-pack/plugins/fleet/public/components/index.ts b/x-pack/plugins/fleet/public/components/index.ts index 7eb22e4c459bb..24d53e8e9eb4e 100644 --- a/x-pack/plugins/fleet/public/components/index.ts +++ b/x-pack/plugins/fleet/public/components/index.ts @@ -27,3 +27,4 @@ export * from './platform_selector'; export { ConfirmForceInstallModal } from './confirm_force_install_modal'; export { DevtoolsRequestFlyoutButton } from './devtools_request_flyout'; export { HeaderReleaseBadge, InlineReleaseBadge } from './release_badge'; +export { WithGuidedOnboardingTour } from './with_guided_onboarding_tour'; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/components/with_guided_onboarding_tour.tsx b/x-pack/plugins/fleet/public/components/with_guided_onboarding_tour.tsx similarity index 55% rename from x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/components/with_guided_onboarding_tour.tsx rename to x-pack/plugins/fleet/public/components/with_guided_onboarding_tour.tsx index 2ea4a6775d6e6..5ed0256e7f881 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/components/with_guided_onboarding_tour.tsx +++ b/x-pack/plugins/fleet/public/components/with_guided_onboarding_tour.tsx @@ -7,10 +7,11 @@ import React, { useEffect, useState } from 'react'; import type { FunctionComponent, ReactElement } from 'react'; +import type { EuiTourStepProps } from '@elastic/eui'; import { EuiButton, EuiText, EuiTourStep } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -type TourType = 'addIntegrationButton' | 'integrationsList'; +type TourType = 'addIntegrationButton' | 'integrationsList' | 'agentModalButton'; const getTourConfig = (packageKey: string, tourType: TourType) => { if (packageKey.startsWith('endpoint') && tourType === 'addIntegrationButton') { return { @@ -23,19 +24,52 @@ const getTourConfig = (packageKey: string, tourType: TourType) => { }), }; } + + if (packageKey.startsWith('kubernetes') && tourType === 'addIntegrationButton') { + return { + title: i18n.translate('xpack.fleet.guidedOnboardingTour.kubernetesButton.tourTitle', { + defaultMessage: 'Add Kubernetes', + }), + description: i18n.translate( + 'xpack.fleet.guidedOnboardingTour.kubernetesButton.tourDescription', + { + defaultMessage: + 'In just a few steps, configure your data with our recommended defaults. You can change this later.', + } + ), + }; + } + + if (packageKey.startsWith('kubernetes') && tourType === 'agentModalButton') { + return { + title: i18n.translate('xpack.fleet.guidedOnboardingTour.agentModalButton.tourTitle', { + defaultMessage: 'Add Elastic Agent', + }), + description: i18n.translate( + 'xpack.fleet.guidedOnboardingTour.agentModalButton.tourDescription', + { + defaultMessage: + 'In order to proceed with your setup, add Elastic Agent to your hosts now.', + } + ), + }; + } + return null; }; export const WithGuidedOnboardingTour: FunctionComponent<{ packageKey: string; - isGuidedOnboardingActive: boolean; + isTourVisible: boolean; tourType: TourType; + tourPosition?: EuiTourStepProps['anchorPosition']; children: ReactElement; -}> = ({ packageKey, isGuidedOnboardingActive, tourType, children }) => { + tourOffset?: EuiTourStepProps['offset']; +}> = ({ packageKey, isTourVisible, tourType, children, tourPosition, tourOffset }) => { const [isGuidedOnboardingTourOpen, setIsGuidedOnboardingTourOpen] = - useState(isGuidedOnboardingActive); + useState(isTourVisible); useEffect(() => { - setIsGuidedOnboardingTourOpen(isGuidedOnboardingActive); - }, [isGuidedOnboardingActive]); + setIsGuidedOnboardingTourOpen(isTourVisible); + }, [isTourVisible]); const config = getTourConfig(packageKey, tourType); return config ? ( @@ -46,8 +80,9 @@ export const WithGuidedOnboardingTour: FunctionComponent<{ onFinish={() => setIsGuidedOnboardingTourOpen(false)} step={1} stepsTotal={1} + offset={tourOffset} title={config.title} - anchorPosition="rightUp" + anchorPosition={tourPosition ? tourPosition : 'rightUp'} footerAction={ setIsGuidedOnboardingTourOpen(false)} size="s" color="success"> {i18n.translate('xpack.fleet.guidedOnboardingTour.nextButtonLabel', { diff --git a/x-pack/plugins/fleet/public/mock/create_test_renderer.tsx b/x-pack/plugins/fleet/public/mock/create_test_renderer.tsx index 51ff2cb0f8245..e2e3c58164021 100644 --- a/x-pack/plugins/fleet/public/mock/create_test_renderer.tsx +++ b/x-pack/plugins/fleet/public/mock/create_test_renderer.tsx @@ -67,6 +67,7 @@ export const createFleetTestRendererMock = (): TestRenderer => { ExperimentalFeaturesService.init({ createPackagePolicyMultiPageLayout: true, packageVerification: true, + noLargeFeaturedIntegrations: true, showDevtoolsRequest: false, }); diff --git a/x-pack/plugins/fleet/server/integration_tests/validate_bundled_packages.test.ts b/x-pack/plugins/fleet/server/integration_tests/validate_bundled_packages.test.ts index 79388d7d5b914..f43b1699eab10 100644 --- a/x-pack/plugins/fleet/server/integration_tests/validate_bundled_packages.test.ts +++ b/x-pack/plugins/fleet/server/integration_tests/validate_bundled_packages.test.ts @@ -50,7 +50,7 @@ describe('validate bundled packages', () => { bundledPackages .filter((pkg) => !EXCLUDED_PACKAGES.includes(pkg.name)) .map(async (bundledPackage) => { - const registryPackage = await Registry.getRegistryPackage( + const registryPackage = await Registry.getPackage( bundledPackage.name, bundledPackage.version ); diff --git a/x-pack/plugins/fleet/server/services/epm/package_service.mock.ts b/x-pack/plugins/fleet/server/services/epm/package_service.mock.ts index f703399ca6df7..806f295ec2c4e 100644 --- a/x-pack/plugins/fleet/server/services/epm/package_service.mock.ts +++ b/x-pack/plugins/fleet/server/services/epm/package_service.mock.ts @@ -11,7 +11,7 @@ const createClientMock = (): jest.Mocked => ({ getInstallation: jest.fn(), ensureInstalledPackage: jest.fn(), fetchFindLatestPackage: jest.fn(), - getRegistryPackage: jest.fn(), + getPackage: jest.fn(), reinstallEsAssets: jest.fn(), }); diff --git a/x-pack/plugins/fleet/server/services/epm/package_service.test.ts b/x-pack/plugins/fleet/server/services/epm/package_service.test.ts index 4f98776f53d60..f4f853d778923 100644 --- a/x-pack/plugins/fleet/server/services/epm/package_service.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/package_service.test.ts @@ -31,7 +31,7 @@ const testKeys = [ 'getInstallation', 'ensureInstalledPackage', 'fetchFindLatestPackage', - 'getRegistryPackage', + 'getPackage', 'reinstallEsAssets', ]; @@ -99,16 +99,16 @@ function getTest( break; case testKeys[3]: test = { - method: mocks.packageClient.getRegistryPackage.bind(mocks.packageClient), + method: mocks.packageClient.getPackage.bind(mocks.packageClient), args: ['package name', '8.0.0'], - spy: jest.spyOn(epmRegistry, 'getRegistryPackage'), + spy: jest.spyOn(epmRegistry, 'getPackage'), spyArgs: ['package name', '8.0.0', undefined], spyResponse: { - packageInfo: { name: 'getRegistryPackage test' }, + packageInfo: { name: 'getPackage test' }, paths: ['/some/test/path'], }, expectedReturnValue: { - packageInfo: { name: 'getRegistryPackage test' }, + packageInfo: { name: 'getPackage test' }, paths: ['/some/test/path'], }, }; diff --git a/x-pack/plugins/fleet/server/services/epm/package_service.ts b/x-pack/plugins/fleet/server/services/epm/package_service.ts index 71ab87c7d92bd..45fb673771327 100644 --- a/x-pack/plugins/fleet/server/services/epm/package_service.ts +++ b/x-pack/plugins/fleet/server/services/epm/package_service.ts @@ -19,13 +19,14 @@ import type { InstallablePackage, Installation, RegistryPackage, + ArchivePackage, BundledPackage, } from '../../types'; import { checkSuperuser } from '../../routes/security'; import { FleetUnauthorizedError } from '../../errors'; import { installTransforms, isTransform } from './elasticsearch/transform/install'; -import { fetchFindLatestPackageOrThrow, getRegistryPackage } from './registry'; +import { fetchFindLatestPackageOrThrow, getPackage } from './registry'; import { ensureInstalledPackage, getInstallation } from './packages'; export type InstalledAssetType = EsAssetReference; @@ -46,10 +47,10 @@ export interface PackageClient { fetchFindLatestPackage(packageName: string): Promise; - getRegistryPackage( + getPackage( packageName: string, packageVersion: string - ): Promise<{ packageInfo: RegistryPackage; paths: string[] }>; + ): Promise<{ packageInfo: ArchivePackage; paths: string[] }>; reinstallEsAssets( packageInfo: InstallablePackage, @@ -120,13 +121,13 @@ class PackageClientImpl implements PackageClient { return fetchFindLatestPackageOrThrow(packageName); } - public async getRegistryPackage( + public async getPackage( packageName: string, packageVersion: string, - options?: Parameters['2'] + options?: Parameters['2'] ) { await this.#runPreflight(); - return getRegistryPackage(packageName, packageVersion, options); + return getPackage(packageName, packageVersion, options); } public async reinstallEsAssets( diff --git a/x-pack/plugins/fleet/server/services/epm/packages/get.test.ts b/x-pack/plugins/fleet/server/services/epm/packages/get.test.ts index af168a8cc1619..1dacf4ed7df8a 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/get.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/get.test.ts @@ -188,7 +188,7 @@ describe('When using EPM `get` services', () => { name: 'my-package', version: '1.0.0', } as RegistryPackage); - MockRegistry.getRegistryPackage.mockResolvedValue({ + MockRegistry.getPackage.mockResolvedValue({ paths: [], packageInfo: { name: 'my-package', @@ -366,7 +366,7 @@ describe('When using EPM `get` services', () => { status: 'not_installed', }); - expect(MockRegistry.getRegistryPackage).not.toHaveBeenCalled(); + expect(MockRegistry.getPackage).not.toHaveBeenCalled(); }); // when calling the get package endpoint without a package version we @@ -392,7 +392,7 @@ describe('When using EPM `get` services', () => { status: 'not_installed', }); - expect(MockRegistry.getRegistryPackage).not.toHaveBeenCalled(); + expect(MockRegistry.getPackage).not.toHaveBeenCalled(); }); }); }); diff --git a/x-pack/plugins/fleet/server/services/epm/packages/get.ts b/x-pack/plugins/fleet/server/services/epm/packages/get.ts index b0aaa64a69239..0ce4e3c1cbea3 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/get.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/get.ts @@ -170,7 +170,6 @@ export async function getPackageInfo({ pkgVersion: resolvedPkgVersion, savedObjectsClient, installedPkg: savedObject?.attributes, - getPkgInfoFromArchive: packageInfo?.type === 'input', ignoreUnverified, })); } @@ -235,13 +234,12 @@ interface PackageResponse { } type GetPackageResponse = PackageResponse | undefined; -// gets package from install_source if it exists otherwise gets from registry +// gets package from install_source export async function getPackageFromSource(options: { pkgName: string; pkgVersion: string; installedPkg?: Installation; savedObjectsClient: SavedObjectsClientContract; - getPkgInfoFromArchive?: boolean; ignoreUnverified?: boolean; }): Promise { const logger = appContextService.getLogger(); @@ -250,7 +248,6 @@ export async function getPackageFromSource(options: { pkgVersion, installedPkg, savedObjectsClient, - getPkgInfoFromArchive = true, ignoreUnverified = false, } = options; let res: GetPackageResponse; @@ -280,11 +277,12 @@ export async function getPackageFromSource(options: { logger.debug(`retrieved installed package ${pkgName}-${pkgVersion} from ES`); } } - // for packages not in cache or package storage and installed from registry, check registry + // install source is now archive in all cases + // See https://github.com/elastic/kibana/issues/115032 if (!res && pkgInstallSource === 'registry') { try { - res = await Registry.getRegistryPackage(pkgName, pkgVersion); - logger.debug(`retrieved installed package ${pkgName}-${pkgVersion} from registry`); + res = await Registry.getPackage(pkgName, pkgVersion); + logger.debug(`retrieved installed package ${pkgName}-${pkgVersion}`); } catch (error) { if (error instanceof PackageFailedVerificationError) { throw error; @@ -294,12 +292,8 @@ export async function getPackageFromSource(options: { } } } else { - // else package is not installed or installed and missing from cache and storage and installed from registry - res = await Registry.getRegistryPackage(pkgName, pkgVersion, { - getPkgInfoFromArchive, - ignoreUnverified, - }); - logger.debug(`retrieved uninstalled package ${pkgName}-${pkgVersion} from registry`); + res = await Registry.getPackage(pkgName, pkgVersion, { ignoreUnverified }); + logger.debug(`retrieved uninstalled package ${pkgName}-${pkgVersion}`); } if (!res) { throw new FleetError(`package info for ${pkgName}-${pkgVersion} does not exist`); diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install.test.ts b/x-pack/plugins/fleet/server/services/epm/packages/install.test.ts index c58700716d18a..d8f4f4a70adaa 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install.test.ts @@ -84,7 +84,7 @@ describe('install', () => { .spyOn(Registry, 'fetchFindLatestPackageOrThrow') .mockImplementation(() => Promise.resolve({ version: '1.3.0' } as any)); jest - .spyOn(Registry, 'getRegistryPackage') + .spyOn(Registry, 'getPackage') .mockImplementation(() => Promise.resolve({ packageInfo: { license: 'basic' } } as any)); mockGetBundledPackages.mockReset(); diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install.ts b/x-pack/plugins/fleet/server/services/epm/packages/install.ts index 91e2c7d241fd7..ebd0bde8b09b4 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install.ts @@ -302,7 +302,7 @@ async function installPackageFromRegistry({ Registry.fetchFindLatestPackageOrThrow(pkgName, { ignoreConstraints, }), - Registry.getRegistryPackage(pkgName, pkgVersion, { + Registry.getPackage(pkgName, pkgVersion, { ignoreUnverified: force && !neverIgnoreVerificationError, }), ]); diff --git a/x-pack/plugins/fleet/server/services/epm/registry/index.ts b/x-pack/plugins/fleet/server/services/epm/registry/index.ts index 2e5fff50af576..3f648a7fd73dc 100644 --- a/x-pack/plugins/fleet/server/services/epm/registry/index.ts +++ b/x-pack/plugins/fleet/server/services/epm/registry/index.ts @@ -250,35 +250,59 @@ export async function getInfo(name: string, version: string) { }); } -export async function getRegistryPackage( +// Check that the packageInfo exists in cache +// If not, retrieve it from the archive +async function getPackageInfoFromArchiveOrCache( name: string, version: string, - options?: { ignoreUnverified?: boolean; getPkgInfoFromArchive?: boolean } + archiveBuffer: Buffer, + archivePath: string +): Promise { + const cachedInfo = getPackageInfo({ name, version }); + + if (!cachedInfo) { + const { packageInfo } = await generatePackageInfoFromArchiveBuffer( + archiveBuffer, + ensureContentType(archivePath) + ); + setPackageInfo({ packageInfo, name, version }); + return packageInfo; + } else { + return cachedInfo; + } +} + +export async function getPackage( + name: string, + version: string, + options?: { ignoreUnverified?: boolean } ): Promise<{ paths: string[]; - packageInfo: RegistryPackage; + packageInfo: ArchivePackage; verificationResult?: PackageVerificationResult; }> { const verifyPackage = appContextService.getExperimentalFeatures().packageVerification; let paths = getArchiveFilelist({ name, version }); let verificationResult = verifyPackage ? getVerificationResult({ name, version }) : undefined; + + const { + archiveBuffer, + archivePath, + verificationResult: latestVerificationResult, + } = await withPackageSpan('Fetch package archive from archive buffer', () => + fetchArchiveBuffer({ + pkgName: name, + pkgVersion: version, + shouldVerify: verifyPackage, + ignoreUnverified: options?.ignoreUnverified, + }) + ); + + if (latestVerificationResult) { + verificationResult = latestVerificationResult; + setVerificationResult({ name, version }, latestVerificationResult); + } if (!paths || paths.length === 0) { - const { - archiveBuffer, - archivePath, - verificationResult: latestVerificationResult, - } = await withPackageSpan('Fetch package archive from registry', () => - fetchArchiveBuffer({ - pkgName: name, - pkgVersion: version, - shouldVerify: verifyPackage, - ignoreUnverified: options?.ignoreUnverified, - }) - ); - if (latestVerificationResult) { - verificationResult = latestVerificationResult; - setVerificationResult({ name, version }, latestVerificationResult); - } paths = await withPackageSpan('Unpack archive', () => unpackBufferToCache({ name, @@ -287,17 +311,14 @@ export async function getRegistryPackage( contentType: ensureContentType(archivePath), }) ); - const cachedInfo = getPackageInfo({ name, version }); - if (options?.getPkgInfoFromArchive && !cachedInfo) { - const { packageInfo } = await generatePackageInfoFromArchiveBuffer( - archiveBuffer, - ensureContentType(archivePath) - ); - setPackageInfo({ packageInfo, name, version }); - } } - const packageInfo = await getInfo(name, version); + const packageInfo = await getPackageInfoFromArchiveOrCache( + name, + version, + archiveBuffer, + archivePath + ); return { paths, packageInfo, verificationResult }; } diff --git a/x-pack/plugins/infra/public/pages/metrics/hosts/components/hosts_table.tsx b/x-pack/plugins/infra/public/pages/metrics/hosts/components/hosts_table.tsx index e92ac801e8612..143f7fedb1420 100644 --- a/x-pack/plugins/infra/public/pages/metrics/hosts/components/hosts_table.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/hosts/components/hosts_table.tsx @@ -35,7 +35,7 @@ const getLensHostsTable = ( ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { 'cbe5d8a0-381d-49bf-b8ac-f8f312ec7129': { columns: { diff --git a/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts b/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts index 78934d09755be..4e2e6b780dafb 100644 --- a/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts +++ b/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts @@ -14,6 +14,8 @@ import { getGroupedESQuery, processUngroupedResults, processGroupByResults, + LogThresholdAlertFactory, + LogThresholdAlertLimit, } from './log_threshold_executor'; import { Comparator, @@ -406,9 +408,14 @@ describe('Log threshold executor', () => { }); describe('Results processors', () => { - describe('Can process ungrouped results', () => { - test('It handles the ALERT state correctly', () => { - const alertFactoryMock = jest.fn(); + describe('for ungrouped results', () => { + it('handles the ALERT state correctly', () => { + const alertFactoryMock: jest.MockedFunction = jest.fn(); + const alertLimitMock: jest.Mocked = { + getValue: jest.fn().mockReturnValue(10), + setLimitReached: jest.fn(), + }; + const ruleParams = { ...baseRuleParams, criteria: [positiveCriteria[0]], @@ -421,7 +428,7 @@ describe('Log threshold executor', () => { }, } as UngroupedSearchQueryResponse; - processUngroupedResults(results, ruleParams, alertFactoryMock); + processUngroupedResults(results, ruleParams, alertFactoryMock, alertLimitMock); // first call, fifth argument expect(alertFactoryMock.mock.calls[0][4]).toEqual([ @@ -437,11 +444,91 @@ describe('Log threshold executor', () => { }, ]); }); + + it('reports reaching a low limit when alerting', () => { + const alertFactoryMock: jest.MockedFunction = jest.fn(); + const alertLimitMock: jest.Mocked = { + getValue: jest.fn().mockReturnValue(1), + setLimitReached: jest.fn(), + }; + + const ruleParams = { + ...baseRuleParams, + criteria: [positiveCriteria[0]], + }; + const results = { + hits: { + total: { + value: 10, + }, + }, + } as UngroupedSearchQueryResponse; + + processUngroupedResults(results, ruleParams, alertFactoryMock, alertLimitMock); + + expect(alertFactoryMock).toBeCalledTimes(1); + expect(alertLimitMock.setLimitReached).toHaveBeenCalledWith(true); + }); + + it('reports not reaching a higher limit when alerting', () => { + const alertFactoryMock: jest.MockedFunction = jest.fn(); + const alertLimitMock: jest.Mocked = { + getValue: jest.fn().mockReturnValue(10), + setLimitReached: jest.fn(), + }; + + const ruleParams = { + ...baseRuleParams, + criteria: [positiveCriteria[0]], + }; + const results = { + hits: { + total: { + value: 10, + }, + }, + } as UngroupedSearchQueryResponse; + + processUngroupedResults(results, ruleParams, alertFactoryMock, alertLimitMock); + + expect(alertFactoryMock).toBeCalledTimes(1); + expect(alertLimitMock.setLimitReached).toHaveBeenCalledWith(false); + }); + + it('reports not reaching the limit without any alerts', () => { + const alertFactoryMock: jest.MockedFunction = jest.fn(); + const alertLimitMock: jest.Mocked = { + getValue: jest.fn().mockReturnValue(0), + setLimitReached: jest.fn(), + }; + + const ruleParams = { + ...baseRuleParams, + criteria: [positiveCriteria[0]], + }; + const results = { + hits: { + total: { + value: 0, + }, + }, + } as UngroupedSearchQueryResponse; + + processUngroupedResults(results, ruleParams, alertFactoryMock, alertLimitMock); + + expect(alertFactoryMock).not.toHaveBeenCalled(); + expect(alertLimitMock.setLimitReached).toHaveBeenCalledWith(false); + }); }); - describe('Can process grouped results', () => { - test('It handles the ALERT state correctly', () => { - const alertFactoryMock = jest.fn(); + describe('for grouped results', () => { + it('handles the ALERT state correctly', () => { + const alertFactoryMock: jest.MockedFunction = jest.fn(); + const alertLimitMock: jest.Mocked = { + getValue: jest.fn().mockReturnValue(2), + setLimitReached: jest.fn(), + }; + const ruleParams = { ...baseRuleParams, criteria: [positiveCriteria[0]], @@ -481,7 +568,7 @@ describe('Log threshold executor', () => { }, ] as GroupedSearchQueryResponse['aggregations']['groups']['buckets']; - processGroupByResults(results, ruleParams, alertFactoryMock); + processGroupByResults(results, ruleParams, alertFactoryMock, alertLimitMock); expect(alertFactoryMock.mock.calls.length).toBe(2); // First call, fifth argument @@ -514,6 +601,110 @@ describe('Log threshold executor', () => { }, ]); }); + + it('respects and reports reaching a low limit when alerting', () => { + const alertFactoryMock: jest.MockedFunction = jest.fn(); + const alertLimitMock: jest.Mocked = { + getValue: jest.fn().mockReturnValue(1), + setLimitReached: jest.fn(), + }; + + const ruleParams = { + ...baseRuleParams, + criteria: [positiveCriteria[0]], + groupBy: ['host.name', 'event.dataset'], + }; + // Two groups should fire, one shouldn't + const results = [ + { + key: { + 'host.name': 'i-am-a-host-name-1', + 'event.dataset': 'i-am-a-dataset-1', + }, + doc_count: 100, + filtered_results: { + doc_count: 10, + }, + }, + { + key: { + 'host.name': 'i-am-a-host-name-2', + 'event.dataset': 'i-am-a-dataset-2', + }, + doc_count: 100, + filtered_results: { + doc_count: 2, + }, + }, + { + key: { + 'host.name': 'i-am-a-host-name-3', + 'event.dataset': 'i-am-a-dataset-3', + }, + doc_count: 100, + filtered_results: { + doc_count: 20, + }, + }, + ] as GroupedSearchQueryResponse['aggregations']['groups']['buckets']; + + processGroupByResults(results, ruleParams, alertFactoryMock, alertLimitMock); + + expect(alertFactoryMock).toHaveBeenCalledTimes(1); + expect(alertLimitMock.setLimitReached).toHaveBeenCalledWith(true); + }); + + it('reports not reaching a higher limit when alerting', () => { + const alertFactoryMock: jest.MockedFunction = jest.fn(); + const alertLimitMock: jest.Mocked = { + getValue: jest.fn().mockReturnValue(10), + setLimitReached: jest.fn(), + }; + + const ruleParams = { + ...baseRuleParams, + criteria: [positiveCriteria[0]], + groupBy: ['host.name', 'event.dataset'], + }; + // Two groups should fire, one shouldn't + const results = [ + { + key: { + 'host.name': 'i-am-a-host-name-1', + 'event.dataset': 'i-am-a-dataset-1', + }, + doc_count: 100, + filtered_results: { + doc_count: 10, + }, + }, + { + key: { + 'host.name': 'i-am-a-host-name-2', + 'event.dataset': 'i-am-a-dataset-2', + }, + doc_count: 100, + filtered_results: { + doc_count: 2, + }, + }, + { + key: { + 'host.name': 'i-am-a-host-name-3', + 'event.dataset': 'i-am-a-dataset-3', + }, + doc_count: 100, + filtered_results: { + doc_count: 20, + }, + }, + ] as GroupedSearchQueryResponse['aggregations']['groups']['buckets']; + + processGroupByResults(results, ruleParams, alertFactoryMock, alertLimitMock); + + expect(alertFactoryMock).toHaveBeenCalledTimes(2); + expect(alertLimitMock.setLimitReached).toHaveBeenCalledWith(false); + }); }); }); }); diff --git a/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts b/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts index dab15eb5ca923..a475e6beea011 100644 --- a/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts +++ b/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts @@ -19,6 +19,7 @@ import { Alert, AlertInstanceContext as AlertContext, AlertInstanceState as AlertState, + RuleExecutorServices, RuleTypeState, } from '@kbn/alerting-plugin/server'; @@ -60,18 +61,23 @@ export type LogThresholdRuleTypeState = RuleTypeState; // no specific state used export type LogThresholdAlertState = AlertState; // no specific state used export type LogThresholdAlertContext = AlertContext; // no specific instance context used -type LogThresholdAlert = Alert< +export type LogThresholdAlert = Alert< LogThresholdAlertState, LogThresholdAlertContext, LogThresholdActionGroups >; -type LogThresholdAlertFactory = ( +export type LogThresholdAlertFactory = ( id: string, reason: string, value: number, threshold: number, actions?: Array<{ actionGroup: LogThresholdActionGroups; context: AlertContext }> ) => LogThresholdAlert; +export type LogThresholdAlertLimit = RuleExecutorServices< + LogThresholdAlertState, + LogThresholdAlertContext, + LogThresholdActionGroups +>['alertFactory']['alertLimit']; const COMPOSITE_GROUP_SIZE = 2000; @@ -96,8 +102,13 @@ export const createLogThresholdExecutor = (libs: InfraBackendLibs) => LogThresholdAlertContext, LogThresholdActionGroups >(async ({ services, params, startedAt }) => { - const { alertWithLifecycle, savedObjectsClient, scopedClusterClient, getAlertStartedDate } = - services; + const { + alertFactory: { alertLimit }, + alertWithLifecycle, + savedObjectsClient, + scopedClusterClient, + getAlertStartedDate, + } = services; const { basePath } = libs; const alertFactory: LogThresholdAlertFactory = (id, reason, value, threshold, actions) => { @@ -150,6 +161,7 @@ export const createLogThresholdExecutor = (libs: InfraBackendLibs) => runtimeMappings, scopedClusterClient.asCurrentUser, alertFactory, + alertLimit, startedAt.valueOf() ); } else { @@ -160,6 +172,7 @@ export const createLogThresholdExecutor = (libs: InfraBackendLibs) => runtimeMappings, scopedClusterClient.asCurrentUser, alertFactory, + alertLimit, startedAt.valueOf() ); } @@ -185,6 +198,7 @@ export async function executeAlert( runtimeMappings: estypes.MappingRuntimeFields, esClient: ElasticsearchClient, alertFactory: LogThresholdAlertFactory, + alertLimit: LogThresholdAlertLimit, executionTimestamp: number ) { const query = getESQuery( @@ -200,9 +214,19 @@ export async function executeAlert( } if (hasGroupBy(ruleParams)) { - processGroupByResults(await getGroupedResults(query, esClient), ruleParams, alertFactory); + processGroupByResults( + await getGroupedResults(query, esClient), + ruleParams, + alertFactory, + alertLimit + ); } else { - processUngroupedResults(await getUngroupedResults(query, esClient), ruleParams, alertFactory); + processUngroupedResults( + await getUngroupedResults(query, esClient), + ruleParams, + alertFactory, + alertLimit + ); } } @@ -213,6 +237,7 @@ export async function executeRatioAlert( runtimeMappings: estypes.MappingRuntimeFields, esClient: ElasticsearchClient, alertFactory: LogThresholdAlertFactory, + alertLimit: LogThresholdAlertLimit, executionTimestamp: number ) { // Ratio alert params are separated out into two standard sets of alert params @@ -254,7 +279,8 @@ export async function executeRatioAlert( numeratorGroupedResults, denominatorGroupedResults, ruleParams, - alertFactory + alertFactory, + alertLimit ); } else { const [numeratorUngroupedResults, denominatorUngroupedResults] = await Promise.all([ @@ -265,7 +291,8 @@ export async function executeRatioAlert( numeratorUngroupedResults, denominatorUngroupedResults, ruleParams, - alertFactory + alertFactory, + alertLimit ); } } @@ -297,7 +324,8 @@ const getESQuery = ( export const processUngroupedResults = ( results: UngroupedSearchQueryResponse, params: CountRuleParams, - alertFactory: LogThresholdAlertFactory + alertFactory: LogThresholdAlertFactory, + alertLimit: LogThresholdAlertLimit ) => { const { count, criteria, timeSize, timeUnit } = params; const documentCount = results.hits.total.value; @@ -323,6 +351,9 @@ export const processUngroupedResults = ( }, ]; alertFactory(UNGROUPED_FACTORY_KEY, reasonMessage, documentCount, count.value, actions); + alertLimit.setLimitReached(alertLimit.getValue() <= 1); + } else { + alertLimit.setLimitReached(false); } }; @@ -330,7 +361,8 @@ export const processUngroupedRatioResults = ( numeratorResults: UngroupedSearchQueryResponse, denominatorResults: UngroupedSearchQueryResponse, params: RatioRuleParams, - alertFactory: LogThresholdAlertFactory + alertFactory: LogThresholdAlertFactory, + alertLimit: LogThresholdAlertLimit ) => { const { count, criteria, timeSize, timeUnit } = params; @@ -360,6 +392,9 @@ export const processUngroupedRatioResults = ( }, ]; alertFactory(UNGROUPED_FACTORY_KEY, reasonMessage, ratio, count.value, actions); + alertLimit.setLimitReached(alertLimit.getValue() <= 1); + } else { + alertLimit.setLimitReached(false); } }; @@ -405,16 +440,24 @@ const getReducedGroupByResults = ( export const processGroupByResults = ( results: GroupedSearchQueryResponse['aggregations']['groups']['buckets'], params: CountRuleParams, - alertFactory: LogThresholdAlertFactory + alertFactory: LogThresholdAlertFactory, + alertLimit: LogThresholdAlertLimit ) => { const { count, criteria, timeSize, timeUnit } = params; const groupResults = getReducedGroupByResults(results); - groupResults.forEach((group) => { + let remainingAlertCount = alertLimit.getValue(); + + for (const group of groupResults) { + if (remainingAlertCount <= 0) { + break; + } + const documentCount = group.documentCount; if (checkValueAgainstComparatorMap[count.comparator](documentCount, count.value)) { + remainingAlertCount -= 1; const reasonMessage = getReasonMessageForGroupedCountAlert( documentCount, count.value, @@ -437,21 +480,30 @@ export const processGroupByResults = ( ]; alertFactory(group.name, reasonMessage, documentCount, count.value, actions); } - }); + } + + alertLimit.setLimitReached(remainingAlertCount <= 0); }; export const processGroupByRatioResults = ( numeratorResults: GroupedSearchQueryResponse['aggregations']['groups']['buckets'], denominatorResults: GroupedSearchQueryResponse['aggregations']['groups']['buckets'], params: RatioRuleParams, - alertFactory: LogThresholdAlertFactory + alertFactory: LogThresholdAlertFactory, + alertLimit: LogThresholdAlertLimit ) => { const { count, criteria, timeSize, timeUnit } = params; const numeratorGroupResults = getReducedGroupByResults(numeratorResults); const denominatorGroupResults = getReducedGroupByResults(denominatorResults); - numeratorGroupResults.forEach((numeratorGroup) => { + let remainingAlertCount = alertLimit.getValue(); + + for (const numeratorGroup of numeratorGroupResults) { + if (remainingAlertCount <= 0) { + break; + } + const numeratorDocumentCount = numeratorGroup.documentCount; const denominatorGroup = denominatorGroupResults.find( (_group) => _group.name === numeratorGroup.name @@ -464,6 +516,7 @@ export const processGroupByRatioResults = ( ratio !== undefined && checkValueAgainstComparatorMap[count.comparator](ratio, count.value) ) { + remainingAlertCount -= 1; const reasonMessage = getReasonMessageForGroupedRatioAlert( ratio, count.value, @@ -487,7 +540,9 @@ export const processGroupByRatioResults = ( ]; alertFactory(numeratorGroup.name, reasonMessage, ratio, count.value, actions); } - }); + } + + alertLimit.setLimitReached(remainingAlertCount <= 0); }; export const buildFiltersFromCriteria = ( diff --git a/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx b/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx index 4176e5f1e51a7..f2b4d2b315148 100644 --- a/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx +++ b/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx @@ -644,7 +644,7 @@ export const LensTopNavMenu = ({ setIsOnTextBasedMode(true); dispatch( switchAndCleanDatasource({ - newDatasourceId: 'textBasedLanguages', + newDatasourceId: 'textBased', visualizationId: visualization?.activeId, currentIndexPatternId: currentIndexPattern?.id, }) @@ -764,7 +764,7 @@ export const LensTopNavMenu = ({ if (isOnTextBasedMode) { dispatch( switchAndCleanDatasource({ - newDatasourceId: 'indexpattern', + newDatasourceId: 'formBased', visualizationId: visualization?.activeId, currentIndexPatternId: dataView?.id, }) @@ -795,7 +795,7 @@ export const LensTopNavMenu = ({ if (isOnTextBasedMode) { dispatch( switchAndCleanDatasource({ - newDatasourceId: 'indexpattern', + newDatasourceId: 'formBased', visualizationId: visualization?.activeId, currentIndexPatternId: dataView?.id, }) @@ -838,7 +838,7 @@ export const LensTopNavMenu = ({ if (isOnTextBasedMode) { dispatch( switchAndCleanDatasource({ - newDatasourceId: 'indexpattern', + newDatasourceId: 'formBased', visualizationId: visualization?.activeId, currentIndexPatternId: newIndexPatternId, }) diff --git a/x-pack/plugins/lens/public/app_plugin/show_underlying_data.test.ts b/x-pack/plugins/lens/public/app_plugin/show_underlying_data.test.ts index bd6b7a000ecd6..b185697021105 100644 --- a/x-pack/plugins/lens/public/app_plugin/show_underlying_data.test.ts +++ b/x-pack/plugins/lens/public/app_plugin/show_underlying_data.test.ts @@ -93,7 +93,7 @@ describe('getLayerMetaInfo', () => { it('should return error in case of getFilters returning errors', () => { const mockDatasource = createMockDatasource('testDatasource'); const updatedPublicAPI: DatasourcePublicAPI = { - datasourceId: 'indexpattern', + datasourceId: 'formBased', getOperationForColumnId: jest.fn(), getTableSpec: jest.fn(() => [{ columnId: 'col1', fields: ['bytes'] }]), getVisualDefaults: jest.fn(), @@ -166,7 +166,7 @@ describe('getLayerMetaInfo', () => { it('should basically work collecting fields and filters in the visualization', () => { const mockDatasource = createMockDatasource('testDatasource'); const updatedPublicAPI: DatasourcePublicAPI = { - datasourceId: 'indexpattern', + datasourceId: 'formBased', getOperationForColumnId: jest.fn(), getTableSpec: jest.fn(() => [{ columnId: 'col1', fields: ['bytes'] }]), getVisualDefaults: jest.fn(), diff --git a/x-pack/plugins/lens/public/async_services.ts b/x-pack/plugins/lens/public/async_services.ts index c0ccd2a71ce2b..1aa40cda21445 100644 --- a/x-pack/plugins/lens/public/async_services.ts +++ b/x-pack/plugins/lens/public/async_services.ts @@ -29,12 +29,12 @@ export * from './visualizations/heatmap'; export * from './visualizations/gauge/gauge_visualization'; export * from './visualizations/gauge'; -export * from './indexpattern_datasource/indexpattern'; -export { getTextBasedLanguagesDatasource } from './text_based_languages_datasource/text_based_languages'; -export { createFormulaPublicApi } from './indexpattern_datasource/operations/definitions/formula/formula_public_api'; +export * from './datasources/form_based/form_based'; +export { getTextBasedDatasource } from './datasources/text_based/text_based_languages'; +export { createFormulaPublicApi } from './datasources/form_based/operations/definitions/formula/formula_public_api'; -export * from './text_based_languages_datasource'; -export * from './indexpattern_datasource'; +export * from './datasources/text_based'; +export * from './datasources/form_based'; export * from './lens_ui_telemetry'; export * from './lens_ui_errors'; export * from './editor_frame_service/editor_frame'; diff --git a/x-pack/plugins/lens/public/data_views_service/loader.test.ts b/x-pack/plugins/lens/public/data_views_service/loader.test.ts index 340bc675bf3e7..97ded75233cda 100644 --- a/x-pack/plugins/lens/public/data_views_service/loader.test.ts +++ b/x-pack/plugins/lens/public/data_views_service/loader.test.ts @@ -14,7 +14,7 @@ import { syncExistingFields, } from './loader'; import { sampleIndexPatterns, mockDataViewsService } from './mocks'; -import { documentField } from '../indexpattern_datasource/document_field'; +import { documentField } from '../datasources/form_based/document_field'; import { coreMock } from '@kbn/core/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import type { DataView } from '@kbn/data-views-plugin/public'; diff --git a/x-pack/plugins/lens/public/data_views_service/loader.ts b/x-pack/plugins/lens/public/data_views_service/loader.ts index 3bb1bdf0612a7..f0184d0a11d0b 100644 --- a/x-pack/plugins/lens/public/data_views_service/loader.ts +++ b/x-pack/plugins/lens/public/data_views_service/loader.ts @@ -12,7 +12,7 @@ import { CoreStart } from '@kbn/core/public'; import { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { loadFieldExisting } from '@kbn/unified-field-list-plugin/public'; import { IndexPattern, IndexPatternField, IndexPatternMap, IndexPatternRef } from '../types'; -import { documentField } from '../indexpattern_datasource/document_field'; +import { documentField } from '../datasources/form_based/document_field'; import { DateRange } from '../../common'; import { DataViewsState } from '../state_management'; diff --git a/x-pack/plugins/lens/public/data_views_service/mocks.ts b/x-pack/plugins/lens/public/data_views_service/mocks.ts index 9b7f5cbc2a91a..ed8d6e86e58a4 100644 --- a/x-pack/plugins/lens/public/data_views_service/mocks.ts +++ b/x-pack/plugins/lens/public/data_views_service/mocks.ts @@ -6,11 +6,11 @@ */ import { DataViewsContract } from '@kbn/data-views-plugin/common'; -import { documentField } from '../indexpattern_datasource/document_field'; +import { documentField } from '../datasources/form_based/document_field'; import { createMockedIndexPattern, createMockedRestrictedIndexPattern, -} from '../indexpattern_datasource/mocks'; +} from '../datasources/form_based/mocks'; import { DataViewsState } from '../state_management'; import { ExistingFieldsMap, IndexPattern } from '../types'; import { getFieldByNameFactory } from './loader'; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/__mocks__/loader.ts b/x-pack/plugins/lens/public/datasources/form_based/__mocks__/loader.ts similarity index 91% rename from x-pack/plugins/lens/public/indexpattern_datasource/__mocks__/loader.ts rename to x-pack/plugins/lens/public/datasources/form_based/__mocks__/loader.ts index 1273d596576c4..47af8d816b73f 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/__mocks__/loader.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/__mocks__/loader.ts @@ -6,11 +6,11 @@ */ import { createMockedIndexPattern, createMockedRestrictedIndexPattern } from '../mocks'; -import { IndexPatternPrivateState } from '../types'; +import { FormBasedPrivateState } from '../types'; export function loadInitialState() { const indexPattern = createMockedIndexPattern(); - const result: IndexPatternPrivateState = { + const result: FormBasedPrivateState = { currentIndexPatternId: indexPattern.id, layers: {}, }; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/__snapshots__/utils.test.tsx.snap b/x-pack/plugins/lens/public/datasources/form_based/__snapshots__/utils.test.tsx.snap similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/__snapshots__/utils.test.tsx.snap rename to x-pack/plugins/lens/public/datasources/form_based/__snapshots__/utils.test.tsx.snap diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.scss b/x-pack/plugins/lens/public/datasources/form_based/datapanel.scss similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/datapanel.scss rename to x-pack/plugins/lens/public/datasources/form_based/datapanel.scss diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/datapanel.test.tsx similarity index 93% rename from x-pack/plugins/lens/public/indexpattern_datasource/datapanel.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/datapanel.test.tsx index 7ee461aa63369..deb9642e25dc3 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/datapanel.test.tsx @@ -13,13 +13,13 @@ import { dataViewPluginMocks, Start as DataViewPublicStart, } from '@kbn/data-views-plugin/public/mocks'; -import { InnerIndexPatternDataPanel, IndexPatternDataPanel, Props } from './datapanel'; +import { InnerFormBasedDataPanel, FormBasedDataPanel, Props } from './datapanel'; import { FieldList } from './field_list'; import { FieldItem } from './field_item'; import { NoFieldsCallout } from './no_fields_callout'; import { act } from 'react-dom/test-utils'; import { coreMock } from '@kbn/core/public/mocks'; -import { IndexPatternPrivateState } from './types'; +import { FormBasedPrivateState } from './types'; import { mountWithIntl, shallowWithIntl } from '@kbn/test-jest-helpers'; import { EuiProgress, EuiLoadingSpinner } from '@elastic/eui'; import { documentField } from './document_field'; @@ -29,12 +29,12 @@ import { indexPatternFieldEditorPluginMock } from '@kbn/data-view-field-editor-p import { getFieldByNameFactory } from './pure_helpers'; import { uiActionsPluginMock } from '@kbn/ui-actions-plugin/public/mocks'; import { TermsIndexPatternColumn } from './operations'; -import { DOCUMENT_FIELD_NAME } from '../../common'; -import { createIndexPatternServiceMock } from '../mocks/data_views_service_mock'; -import { createMockFramePublicAPI } from '../mocks'; -import { DataViewsState } from '../state_management'; -import { ExistingFieldsMap, FramePublicAPI, IndexPattern } from '../types'; -import { IndexPatternServiceProps } from '../data_views_service/service'; +import { DOCUMENT_FIELD_NAME } from '../../../common'; +import { createIndexPatternServiceMock } from '../../mocks/data_views_service_mock'; +import { createMockFramePublicAPI } from '../../mocks'; +import { DataViewsState } from '../../state_management'; +import { ExistingFieldsMap, FramePublicAPI, IndexPattern } from '../../types'; +import { IndexPatternServiceProps } from '../../data_views_service/service'; import { FieldSpec, DataView } from '@kbn/data-views-plugin/public'; import { UI_SETTINGS } from '@kbn/data-plugin/public'; @@ -174,7 +174,7 @@ function getExistingFields(indexPatterns: Record) { return existingFields; } -const initialState: IndexPatternPrivateState = { +const initialState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -285,7 +285,7 @@ const dslQuery = { bool: { must: [], filter: [], should: [], must_not: [] } }; // @ts-expect-error Portal mocks are notoriously difficult to type ReactDOM.createPortal = jest.fn((element) => element); -describe('IndexPattern Data Panel', () => { +describe('FormBased Data Panel', () => { const indexPatterns = { a: { id: 'a', @@ -304,7 +304,7 @@ describe('IndexPattern Data Panel', () => { hasRestrictions: false, }, }; - let defaultProps: Parameters[0] & { + let defaultProps: Parameters[0] & { showNoDataPopover: () => void; }; let core: ReturnType; @@ -340,7 +340,7 @@ describe('IndexPattern Data Panel', () => { it('should render a warning if there are no index patterns', () => { const wrapper = shallowWithIntl( - { columns: {}, }, }, - } as IndexPatternPrivateState, + } as FormBasedPrivateState, }; } async function testExistenceLoading( props: Props, - stateChanges?: Partial, + stateChanges?: Partial, propChanges?: Partial ) { - const inst = mountWithIntl(); + const inst = mountWithIntl(); await act(async () => { inst.update(); @@ -601,7 +601,7 @@ describe('IndexPattern Data Panel', () => { it('shows a loading indicator when loading', async () => { const updateIndexPatterns = jest.fn(); const load = async () => {}; - const inst = mountWithIntl(); + const inst = mountWithIntl(); expect(inst.find(EuiProgress).length).toEqual(1); await act(load); inst.update(); @@ -629,7 +629,7 @@ describe('IndexPattern Data Panel', () => { return result; }); - const inst = mountWithIntl(); + const inst = mountWithIntl(); inst.update(); @@ -676,7 +676,7 @@ describe('IndexPattern Data Panel', () => { }); describe('displaying field list', () => { - let props: Parameters[0]; + let props: Parameters[0]; beforeEach(() => { props = { ...defaultProps, @@ -691,7 +691,7 @@ describe('IndexPattern Data Panel', () => { }; }); it('should list all supported fields in the pattern sorted alphabetically in groups', async () => { - const wrapper = mountWithIntl(); + const wrapper = mountWithIntl(); expect(wrapper.find(FieldItem).first().prop('field').displayName).toEqual('Records'); expect( wrapper @@ -715,7 +715,7 @@ describe('IndexPattern Data Panel', () => { it('should show meta fields accordion', async () => { const wrapper = mountWithIntl( - { it('should display NoFieldsCallout when all fields are empty', async () => { const wrapper = mountWithIntl( - @@ -780,7 +780,7 @@ describe('IndexPattern Data Panel', () => { it('should display spinner for available fields accordion if existing fields are not loaded yet', async () => { const wrapper = mountWithIntl( - @@ -795,7 +795,7 @@ describe('IndexPattern Data Panel', () => { it('should not allow field details when error', () => { const wrapper = mountWithIntl( - @@ -810,7 +810,7 @@ describe('IndexPattern Data Panel', () => { it('should allow field details when timeout', () => { const wrapper = mountWithIntl( - @@ -824,7 +824,7 @@ describe('IndexPattern Data Panel', () => { }); it('should filter down by name', () => { - const wrapper = mountWithIntl(); + const wrapper = mountWithIntl(); act(() => { wrapper.find('[data-test-subj="lnsIndexPatternFieldSearch"]').simulate('change', { target: { value: 'me' }, @@ -843,7 +843,7 @@ describe('IndexPattern Data Panel', () => { }); it('should announce filter in live region', () => { - const wrapper = mountWithIntl(); + const wrapper = mountWithIntl(); act(() => { wrapper.find('[data-test-subj="lnsIndexPatternFieldSearch"]').simulate('change', { target: { value: 'me' }, @@ -862,7 +862,7 @@ describe('IndexPattern Data Panel', () => { }); it('should filter down by type', () => { - const wrapper = mountWithIntl(); + const wrapper = mountWithIntl(); wrapper.find('[data-test-subj="lnsIndexPatternFiltersToggle"]').first().simulate('click'); @@ -874,7 +874,7 @@ describe('IndexPattern Data Panel', () => { }); it('should display no fields in groups when filtered by type Record', () => { - const wrapper = mountWithIntl(); + const wrapper = mountWithIntl(); wrapper.find('[data-test-subj="lnsIndexPatternFiltersToggle"]').first().simulate('click'); @@ -887,7 +887,7 @@ describe('IndexPattern Data Panel', () => { }); it('should toggle type if clicked again', () => { - const wrapper = mountWithIntl(); + const wrapper = mountWithIntl(); wrapper.find('[data-test-subj="lnsIndexPatternFiltersToggle"]').first().simulate('click'); wrapper.find('[data-test-subj="typeFilter-number"]').first().simulate('click'); @@ -903,7 +903,7 @@ describe('IndexPattern Data Panel', () => { }); it('should filter down by type and by name', () => { - const wrapper = mountWithIntl(); + const wrapper = mountWithIntl(); act(() => { wrapper.find('[data-test-subj="lnsIndexPatternFieldSearch"]').simulate('change', { target: { value: 'me' }, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx b/x-pack/plugins/lens/public/datasources/form_based/datapanel.tsx similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx rename to x-pack/plugins/lens/public/datasources/form_based/datapanel.tsx index 4107cd0c14fa5..970db62925fe6 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/datapanel.tsx @@ -39,18 +39,18 @@ import type { FramePublicAPI, IndexPattern, IndexPatternField, -} from '../types'; -import { ChildDragDropProvider, DragContextState } from '../drag_drop'; -import type { IndexPatternPrivateState } from './types'; -import { Loader } from '../loader'; -import { LensFieldIcon } from '../shared_components/field_picker/lens_field_icon'; +} from '../../types'; +import { ChildDragDropProvider, DragContextState } from '../../drag_drop'; +import type { FormBasedPrivateState } from './types'; +import { Loader } from '../../loader'; +import { LensFieldIcon } from '../../shared_components/field_picker/lens_field_icon'; import { getFieldType } from './pure_utils'; import { FieldGroups, FieldList } from './field_list'; -import { fieldContainsData, fieldExists } from '../shared_components'; -import { IndexPatternServiceAPI } from '../data_views_service/service'; +import { fieldContainsData, fieldExists } from '../../shared_components'; +import { IndexPatternServiceAPI } from '../../data_views_service/service'; export type Props = Omit< - DatasourceDataPanelProps, + DatasourceDataPanelProps, 'core' | 'onChangeIndexPattern' > & { data: DataPublicPluginStart; @@ -124,7 +124,7 @@ function buildSafeEsQuery( } } -export function IndexPatternDataPanel({ +export function FormBasedDataPanel({ state, dragDropContext, core, @@ -264,7 +264,7 @@ const defaultFieldGroups: { const htmlId = htmlIdGenerator('datapanel'); const fieldSearchDescriptionId = htmlId(); -export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({ +export const InnerFormBasedDataPanel = function InnerFormBasedDataPanel({ currentIndexPatternId, query, dateRange, @@ -751,4 +751,4 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({ ); }; -export const MemoizedDataPanel = memo(InnerIndexPatternDataPanel); +export const MemoizedDataPanel = memo(InnerFormBasedDataPanel); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dedupe_aggs.test.ts b/x-pack/plugins/lens/public/datasources/form_based/dedupe_aggs.test.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/dedupe_aggs.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/dedupe_aggs.test.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dedupe_aggs.ts b/x-pack/plugins/lens/public/datasources/form_based/dedupe_aggs.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/dedupe_aggs.ts rename to x-pack/plugins/lens/public/datasources/form_based/dedupe_aggs.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/advanced_options.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/advanced_options.tsx similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/advanced_options.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/advanced_options.tsx diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/bucket_nesting_editor.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/bucket_nesting_editor.test.tsx similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/bucket_nesting_editor.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/bucket_nesting_editor.test.tsx index 248cc0f78756e..6c09849df04ac 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/bucket_nesting_editor.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/bucket_nesting_editor.test.tsx @@ -8,8 +8,8 @@ import { mount } from 'enzyme'; import React from 'react'; import { BucketNestingEditor } from './bucket_nesting_editor'; -import { GenericIndexPatternColumn } from '../indexpattern'; -import { IndexPatternField } from '../../types'; +import { GenericIndexPatternColumn } from '../form_based'; +import { IndexPatternField } from '../../../types'; const fieldMap: Record = { a: { displayName: 'a' } as IndexPatternField, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/bucket_nesting_editor.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/bucket_nesting_editor.tsx similarity index 96% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/bucket_nesting_editor.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/bucket_nesting_editor.tsx index 31a4b91706dfa..fb062e4231467 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/bucket_nesting_editor.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/bucket_nesting_editor.tsx @@ -8,10 +8,10 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { EuiFormRow, EuiSwitch, EuiSelect } from '@elastic/eui'; -import { IndexPatternLayer } from '../types'; +import { FormBasedLayer } from '../types'; import { hasField } from '../pure_utils'; import { GenericIndexPatternColumn } from '../operations'; -import { IndexPatternField } from '../../types'; +import { IndexPatternField } from '../../../types'; function nestColumn(columnOrder: string[], outer: string, inner: string) { const result = columnOrder.filter((c) => c !== inner); @@ -38,7 +38,7 @@ export function BucketNestingEditor({ getFieldByName, }: { columnId: string; - layer: IndexPatternLayer; + layer: FormBasedLayer; setColumns: (columns: string[]) => void; getFieldByName: (name: string) => IndexPatternField | undefined; }) { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.scss b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_editor.scss similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.scss rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_editor.scss diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_editor.tsx similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_editor.tsx index b4cad9aa73697..330d3285b2951 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_editor.tsx @@ -27,9 +27,9 @@ import { EuiButtonIcon, } from '@elastic/eui'; import ReactDOM from 'react-dom'; -import type { IndexPatternDimensionEditorProps } from './dimension_panel'; +import type { FormBasedDimensionEditorProps } from './dimension_panel'; import type { OperationSupportMatrix } from './operation_support'; -import { deleteColumn, GenericIndexPatternColumn } from '../indexpattern'; +import { deleteColumn, GenericIndexPatternColumn } from '../form_based'; import { operationDefinitionMap, getOperationDisplay, @@ -46,7 +46,7 @@ import { mergeLayer } from '../state_helpers'; import { getReferencedField, hasField } from '../pure_utils'; import { fieldIsInvalid } from '../utils'; import { BucketNestingEditor } from './bucket_nesting_editor'; -import type { IndexPatternLayer } from '../types'; +import type { FormBasedLayer } from '../types'; import { FormatSelector } from './format_selector'; import { ReferenceEditor } from './reference_editor'; import { TimeScaling } from './time_scaling'; @@ -54,8 +54,8 @@ import { Filtering } from './filtering'; import { ReducedTimeRange } from './reduced_time_range'; import { AdvancedOptions } from './advanced_options'; import { TimeShift } from './time_shift'; -import type { LayerType } from '../../../common'; -import { DOCUMENT_FIELD_NAME } from '../../../common'; +import type { LayerType } from '../../../../common'; +import { DOCUMENT_FIELD_NAME } from '../../../../common'; import { quickFunctionsName, staticValueOperationName, @@ -68,15 +68,15 @@ import { } from './dimensions_editor_helpers'; import type { TemporaryState } from './dimensions_editor_helpers'; import { FieldInput } from './field_input'; -import { NameInput } from '../../shared_components'; +import { NameInput } from '../../../shared_components'; import { ParamEditorProps } from '../operations/definitions'; import { WrappingHelpPopover } from '../help_popover'; import { isColumn } from '../operations/definitions/helpers'; import type { FieldChoiceWithOperationType } from './field_select'; -import type { IndexPattern, IndexPatternField } from '../../types'; +import type { IndexPattern, IndexPatternField } from '../../../types'; import { documentField } from '../document_field'; -export interface DimensionEditorProps extends IndexPatternDimensionEditorProps { +export interface DimensionEditorProps extends FormBasedDimensionEditorProps { selectedColumn?: GenericIndexPatternColumn; layerType: LayerType; operationSupportMatrix: OperationSupportMatrix; @@ -142,13 +142,13 @@ export function DimensionEditor(props: DimensionEditorProps) { const setStateWrapper = useCallback( ( setter: - | IndexPatternLayer - | ((prevLayer: IndexPatternLayer) => IndexPatternLayer) + | FormBasedLayer + | ((prevLayer: FormBasedLayer) => FormBasedLayer) | GenericIndexPatternColumn, options: { forceRender?: boolean } = {} ) => { const layer = state.layers[layerId]; - let hypotethicalLayer: IndexPatternLayer; + let hypotethicalLayer: FormBasedLayer; if (isColumn(setter)) { hypotethicalLayer = { ...layer, @@ -164,7 +164,7 @@ export function DimensionEditor(props: DimensionEditorProps) { setState( (prevState) => { - let outputLayer: IndexPatternLayer; + let outputLayer: FormBasedLayer; const prevLayer = prevState.layers[layerId]; if (isColumn(setter)) { outputLayer = { @@ -250,8 +250,8 @@ export function DimensionEditor(props: DimensionEditorProps) { // TODO: revisit this once we get rid of updateDatasourceAsync upstream const moveDefinetelyToStaticValueAndUpdate = ( setter: - | IndexPatternLayer - | ((prevLayer: IndexPatternLayer) => IndexPatternLayer) + | FormBasedLayer + | ((prevLayer: FormBasedLayer) => FormBasedLayer) | GenericIndexPatternColumn ) => { if (temporaryStaticValue) { @@ -501,7 +501,7 @@ export function DimensionEditor(props: DimensionEditorProps) { } else if (!selectedColumn || !compatibleWithCurrentField) { const possibleFields = fieldByOperation[operationType] || new Set(); - let newLayer: IndexPatternLayer; + let newLayer: FormBasedLayer; if (possibleFields.size === 1) { newLayer = insertOrReplaceColumn({ layer: props.state.layers[props.layerId], @@ -585,9 +585,7 @@ export function DimensionEditor(props: DimensionEditorProps) { const paramEditorProps: ParamEditorProps< GenericIndexPatternColumn, - | IndexPatternLayer - | ((prevLayer: IndexPatternLayer) => IndexPatternLayer) - | GenericIndexPatternColumn + FormBasedLayer | ((prevLayer: FormBasedLayer) => FormBasedLayer) | GenericIndexPatternColumn > = { layer: state.layers[layerId], layerId, @@ -769,11 +767,11 @@ export function DimensionEditor(props: DimensionEditorProps) { }} paramEditorUpdater={( setter: - | IndexPatternLayer - | ((prevLayer: IndexPatternLayer) => IndexPatternLayer) + | FormBasedLayer + | ((prevLayer: FormBasedLayer) => FormBasedLayer) | GenericIndexPatternColumn ) => { - let newLayer: IndexPatternLayer; + let newLayer: FormBasedLayer; if (typeof setter === 'function') { newLayer = setter(layer); } else if (isColumn(setter)) { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_panel.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_panel.test.tsx similarity index 89% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_panel.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_panel.test.tsx index 41dd1df5bcd92..456b1537db97c 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_panel.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_panel.test.tsx @@ -21,8 +21,8 @@ import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { fieldFormatsServiceMock } from '@kbn/field-formats-plugin/public/mocks'; import { - IndexPatternDimensionEditorComponent, - IndexPatternDimensionEditorProps, + FormBasedDimensionEditorComponent, + FormBasedDimensionEditorProps, } from './dimension_panel'; import { mountWithIntl as mount, shallowWithIntl as shallow } from '@kbn/test-jest-helpers'; import { @@ -32,9 +32,9 @@ import { CoreStart, } from '@kbn/core/public'; import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; +import { generateId } from '../../../id_generator'; +import { FormBasedPrivateState } from '../types'; import { LayerTypes } from '@kbn/expression-xy-plugin/public'; -import { generateId } from '../../id_generator'; -import { IndexPatternPrivateState } from '../types'; import { FiltersIndexPatternColumn, GenericIndexPatternColumn, @@ -42,7 +42,7 @@ import { TermsIndexPatternColumn, } from '../operations'; import { documentField } from '../document_field'; -import { OperationMetadata } from '../../types'; +import { OperationMetadata } from '../../../types'; import { DateHistogramIndexPatternColumn } from '../operations/definitions/date_histogram'; import { getFieldByNameFactory } from '../pure_helpers'; import { Filtering, setFilter } from './filtering'; @@ -69,7 +69,7 @@ jest.mock('lodash', () => { debounce: (fn: unknown) => fn, }; }); -jest.mock('../../id_generator'); +jest.mock('../../../id_generator'); // Mock the Monaco Editor component jest.mock('../operations/definitions/formula/editor/formula_editor', () => { return { @@ -148,10 +148,10 @@ const bytesColumn: GenericIndexPatternColumn = { * - Dimension trigger: Not tested here * - Dimension editor component: First half of the tests */ -describe('IndexPatternDimensionEditorPanel', () => { - let state: IndexPatternPrivateState; +describe('FormBasedDimensionEditor', () => { + let state: FormBasedPrivateState; let setState: jest.Mock; - let defaultProps: IndexPatternDimensionEditorProps; + let defaultProps: FormBasedDimensionEditorProps; function getStateWithColumns(columns: Record) { return { @@ -265,14 +265,14 @@ describe('IndexPatternDimensionEditorPanel', () => { const filterOperations = jest.fn().mockReturnValue(true); wrapper = shallow( - + ); expect(filterOperations).toBeCalled(); }); it('should show field select', () => { - wrapper = mount(); + wrapper = mount(); expect( wrapper.find(EuiComboBox).filter('[data-test-subj="indexPattern-dimension-field"]') @@ -281,7 +281,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should not show field select on fieldless operation', () => { wrapper = mount( - { it('should not show any choices if the filter returns false', () => { wrapper = mount( - false} @@ -320,7 +320,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should list all field names and document as a whole in prioritized order', () => { - wrapper = mount(); + wrapper = mount(); const options = wrapper .find(EuiComboBox) @@ -348,7 +348,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }, }, }; - wrapper = mount(); + wrapper = mount(); const options = wrapper .find(EuiComboBox) @@ -360,7 +360,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should indicate fields which are incompatible for the operation of the current column', () => { wrapper = mount( - @@ -383,7 +383,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should indicate operations which are incompatible for the field of the current column', () => { wrapper = mount( - @@ -407,7 +407,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should indicate when a transition is invalid due to filterOperations', () => { wrapper = mount( - { }); it('should not display hidden operation types', () => { - wrapper = mount(); + wrapper = mount(); const items: EuiListGroupItemProps[] = wrapper.find(EuiListGroup).prop('listItems') || []; @@ -442,7 +442,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should indicate that reference-based operations are not compatible when they are incomplete', () => { wrapper = mount( - { it('should indicate that reference-based operations are compatible sometimes', () => { wrapper = mount( - { }); it('should keep the operation when switching to another field compatible with this operation', () => { - const initialState: IndexPatternPrivateState = getStateWithColumns({ col1: bytesColumn }); + const initialState: FormBasedPrivateState = getStateWithColumns({ col1: bytesColumn }); - wrapper = mount( - - ); + wrapper = mount(); const comboBox = wrapper .find(EuiComboBox) @@ -562,7 +560,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should switch operations when selecting a field that requires another operation', () => { - wrapper = mount(); + wrapper = mount(); const comboBox = wrapper .find(EuiComboBox) @@ -597,7 +595,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should keep the field when switching to another operation compatible for this field', () => { wrapper = mount( - @@ -628,7 +626,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should not set the state if selecting the currently active operation', () => { - wrapper = mount(); + wrapper = mount(); act(() => { wrapper @@ -640,7 +638,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should update label and custom label flag on label input changes', () => { - wrapper = mount(); + wrapper = mount(); act(() => { wrapper @@ -669,7 +667,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should not keep the label as long as it is the default label', () => { wrapper = mount( - @@ -698,7 +696,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should keep the label on operation change if it is custom', () => { wrapper = mount( - { it('should remove customLabel flag if label is set to default', () => { wrapper = mount( - { describe('transient invalid state', () => { it('should set the state if selecting an operation incompatible with the current field', () => { - wrapper = mount(); + wrapper = mount(); act(() => { wrapper @@ -799,7 +797,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should show error message in invalid state', () => { - wrapper = mount(); + wrapper = mount(); wrapper .find('button[data-test-subj="lns-indexPatternDimension-terms incompatible"]') @@ -811,7 +809,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should leave error state if a compatible operation is selected', () => { - wrapper = mount(); + wrapper = mount(); wrapper .find('button[data-test-subj="lns-indexPatternDimension-terms incompatible"]') @@ -825,7 +823,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should leave error state if the original operation is re-selected', () => { - wrapper = mount(); + wrapper = mount(); wrapper .find('button[data-test-subj="lns-indexPatternDimension-terms incompatible"]') @@ -841,7 +839,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should leave error state when switching from incomplete state to fieldless operation', () => { // @ts-expect-error window['__react-beautiful-dnd-disable-dev-warnings'] = true; // issue with enzyme & react-beautiful-dnd throwing errors: https://github.com/atlassian/react-beautiful-dnd/issues/1593 - wrapper = mount(); + wrapper = mount(); wrapper .find('button[data-test-subj="lns-indexPatternDimension-terms incompatible"]') @@ -854,7 +852,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should leave error state when re-selecting the original fieldless function', () => { wrapper = mount( - { }); it('should indicate fields compatible with selected operation', () => { - wrapper = mount(); + wrapper = mount(); wrapper .find('button[data-test-subj="lns-indexPatternDimension-terms incompatible"]') @@ -901,7 +899,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should select compatible operation if field not compatible with selected operation', () => { - wrapper = mount(); + wrapper = mount(); wrapper.find('button[data-test-subj="lns-indexPatternDimension-average"]').simulate('click'); @@ -962,11 +960,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }, }); wrapper = mount( - + ); // Transition to a field operation (incompatible) @@ -991,7 +985,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should select the Records field when count is selected on non-existing column', () => { wrapper = mount( - { it('should indicate document and field compatibility with selected document operation', () => { wrapper = mount( - { }); it('should set datasource state if compatible field is selected for operation', () => { - wrapper = mount(); + wrapper = mount(); wrapper .find('button[data-test-subj="lns-indexPatternDimension-terms incompatible"]') @@ -1110,7 +1104,7 @@ describe('IndexPatternDimensionEditorPanel', () => { } it('should default to None if time scaling is not set', () => { - wrapper = mount(); + wrapper = mount(); findTestSubject(wrapper, 'indexPattern-advanced-accordion').simulate('click'); expect(wrapper.find('[data-test-subj="indexPattern-time-scaling-enable"]')).toHaveLength(1); expect( @@ -1122,7 +1116,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should show current time scaling if set', () => { - wrapper = mount(); + wrapper = mount(); findTestSubject(wrapper, 'indexPattern-advanced-accordion').simulate('click'); expect( wrapper @@ -1134,7 +1128,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should allow to set time scaling initially', () => { const props = getProps({}); - wrapper = mount(); + wrapper = mount(); findTestSubject(wrapper, 'indexPattern-advanced-accordion').simulate('click'); wrapper .find('[data-test-subj="indexPattern-time-scaling-unit"]') @@ -1167,7 +1161,7 @@ describe('IndexPatternDimensionEditorPanel', () => { operationType: 'sum', label: 'Sum of bytes per hour', }); - wrapper = mount(); + wrapper = mount(); wrapper.find('button[data-test-subj="lns-indexPatternDimension-count"]').simulate('click'); expect(setState.mock.calls[0]).toEqual([expect.any(Function), { isDimensionComplete: true }]); expect(setState.mock.calls[0][0](props.state)).toEqual({ @@ -1194,7 +1188,7 @@ describe('IndexPatternDimensionEditorPanel', () => { operationType: 'sum', label: 'Sum of bytes per hour', }); - wrapper = mount(); + wrapper = mount(); wrapper.find('button[data-test-subj="lns-indexPatternDimension-average"]').simulate('click'); expect(setState.mock.calls[0]).toEqual([expect.any(Function), { isDimensionComplete: true }]); expect(setState.mock.calls[0][0](props.state)).toEqual({ @@ -1216,7 +1210,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should allow to change time scaling', () => { const props = getProps({ timeScale: 's', label: 'Count of records per second' }); - wrapper = mount(); + wrapper = mount(); findTestSubject(wrapper, 'indexPattern-advanced-accordion').simulate('click'); wrapper.find('[data-test-subj="indexPattern-time-scaling-unit"] select').simulate('change', { @@ -1243,7 +1237,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should not adjust label if it is custom', () => { const props = getProps({ timeScale: 's', customLabel: true, label: 'My label' }); - wrapper = mount(); + wrapper = mount(); wrapper.find('[data-test-subj="indexPattern-time-scaling-unit"] select').simulate('change', { target: { value: 'h' }, }); @@ -1309,7 +1303,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }), columnId: 'col2', }; - wrapper = mount(); + wrapper = mount(); findTestSubject(wrapper, 'indexPattern-advanced-accordion').simulate('click'); expect( wrapper.find('[data-test-subj="indexPattern-dimension-reducedTimeRange-row"]') @@ -1318,7 +1312,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should show current reduced time range if set', () => { wrapper = mount( - + ); expect( wrapper.find(ReducedTimeRange).find(EuiComboBox).prop('selectedOptions')[0].value @@ -1327,7 +1321,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should allow to set reduced time range initially', () => { const props = getProps({}); - wrapper = mount(); + wrapper = mount(); findTestSubject(wrapper, 'indexPattern-advanced-accordion').simulate('click'); wrapper.find(ReducedTimeRange).find(EuiComboBox).prop('onChange')!([ { value: '1h', label: '' }, @@ -1355,7 +1349,7 @@ describe('IndexPatternDimensionEditorPanel', () => { operationType: 'sum', label: 'Sum of bytes per hour', }); - wrapper = mount(); + wrapper = mount(); wrapper.find('button[data-test-subj="lns-indexPatternDimension-count"]').simulate('click'); expect((props.setState as jest.Mock).mock.calls[0][0](props.state)).toEqual({ ...props.state, @@ -1377,7 +1371,7 @@ describe('IndexPatternDimensionEditorPanel', () => { const props = getProps({ timeShift: '1d', }); - wrapper = mount(); + wrapper = mount(); wrapper.find(ReducedTimeRange).find(EuiComboBox).prop('onCreateOption')!('7m', []); expect((props.setState as jest.Mock).mock.calls[0][0](props.state)).toEqual({ ...props.state, @@ -1399,7 +1393,7 @@ describe('IndexPatternDimensionEditorPanel', () => { const props = getProps({ reducedTimeRange: '5 months', }); - wrapper = mount(); + wrapper = mount(); expect(wrapper.find(ReducedTimeRange).find(EuiComboBox).prop('isInvalid')).toBeTruthy(); @@ -1457,7 +1451,7 @@ describe('IndexPatternDimensionEditorPanel', () => { columnId: 'col2', }; wrapper = mount( - { }); it('should show custom options if time shift is available', () => { - wrapper = shallow(); + wrapper = shallow(); expect( wrapper .find(DimensionEditor) @@ -1485,7 +1479,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should show current time shift if set', () => { - wrapper = mount(); + wrapper = mount(); expect(wrapper.find(TimeShift).find(EuiComboBox).prop('selectedOptions')[0].value).toEqual( '1d' ); @@ -1493,7 +1487,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should allow to set time shift initially', () => { const props = getProps({}); - wrapper = mount(); + wrapper = mount(); findTestSubject(wrapper, 'indexPattern-advanced-accordion').simulate('click'); wrapper.find(TimeShift).find(EuiComboBox).prop('onChange')!([{ value: '1h', label: '' }]); expect((props.setState as jest.Mock).mock.calls[0][0](props.state)).toEqual({ @@ -1519,7 +1513,7 @@ describe('IndexPatternDimensionEditorPanel', () => { operationType: 'sum', label: 'Sum of bytes per hour', }); - wrapper = mount(); + wrapper = mount(); wrapper.find('button[data-test-subj="lns-indexPatternDimension-count"]').simulate('click'); expect((props.setState as jest.Mock).mock.calls[0][0](props.state)).toEqual({ ...props.state, @@ -1541,7 +1535,7 @@ describe('IndexPatternDimensionEditorPanel', () => { const props = getProps({ timeShift: '1d', }); - wrapper = mount(); + wrapper = mount(); wrapper.find(TimeShift).find(EuiComboBox).prop('onCreateOption')!('1h', []); expect((props.setState as jest.Mock).mock.calls[0][0](props.state)).toEqual({ ...props.state, @@ -1563,7 +1557,7 @@ describe('IndexPatternDimensionEditorPanel', () => { const props = getProps({ timeShift: '5 months', }); - wrapper = mount(); + wrapper = mount(); expect(wrapper.find(TimeShift).find(EuiComboBox).prop('isInvalid')).toBeTruthy(); @@ -1608,7 +1602,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should not show custom options if time scaling is not available', () => { wrapper = mount( - { }); it('should show custom options if filtering is available', () => { - wrapper = mount(); + wrapper = mount(); findTestSubject(wrapper, 'indexPattern-advanced-accordion').simulate('click'); expect( wrapper.find('[data-test-subj="indexPattern-filter-by-enable"]').hostNodes() @@ -1635,7 +1629,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should show current filter if set', () => { wrapper = mount( - ); @@ -1655,7 +1649,7 @@ describe('IndexPatternDimensionEditorPanel', () => { operationType: 'sum', label: 'Sum of bytes per hour', }); - wrapper = mount(); + wrapper = mount(); wrapper.find('button[data-test-subj="lns-indexPatternDimension-count"]').simulate('click'); expect(setState.mock.calls[0]).toEqual([expect.any(Function), { isDimensionComplete: true }]); expect(setState.mock.calls[0][0](props.state)).toEqual({ @@ -1679,7 +1673,7 @@ describe('IndexPatternDimensionEditorPanel', () => { filter: { language: 'kuery', query: 'a: b' }, }); - wrapper = mount(); + wrapper = mount(); act(() => { const { updateLayer, columnId, layer } = wrapper.find(Filtering).props(); @@ -1707,7 +1701,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should render invalid field if field reference is broken', () => { wrapper = mount( - { }); it('should support selecting the operation before the field', () => { - wrapper = mount(); + wrapper = mount(); wrapper.find('button[data-test-subj="lns-indexPatternDimension-average"]').simulate('click'); @@ -1784,7 +1778,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should select operation directly if only one field is possible', () => { wrapper = mount( - { }); it('should select operation directly if only document is possible', () => { - wrapper = mount(); + wrapper = mount(); wrapper.find('button[data-test-subj="lns-indexPatternDimension-count"]').simulate('click'); @@ -1845,7 +1839,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should indicate compatible fields when selecting the operation first', () => { - wrapper = mount(); + wrapper = mount(); act(() => { wrapper.find('button[data-test-subj="lns-indexPatternDimension-average"]').simulate('click'); @@ -1871,7 +1865,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should indicate document compatibility when document operation is selected', () => { wrapper = mount( - { }); it('should not update when selecting the current field again', () => { - wrapper = mount(); + wrapper = mount(); const comboBox = wrapper .find(EuiComboBox) @@ -1914,7 +1908,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should show all operations that are not filtered out', () => { wrapper = mount( - !op.isBucketed && op.dataType === 'number'} /> @@ -1946,7 +1940,7 @@ describe('IndexPatternDimensionEditorPanel', () => { // Prevents field format from being loaded setState.mockImplementation(() => {}); - wrapper = mount(); + wrapper = mount(); const comboBox = wrapper .find(EuiComboBox) @@ -1981,12 +1975,10 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should use helper function when changing the function', () => { - const initialState: IndexPatternPrivateState = getStateWithColumns({ + const initialState: FormBasedPrivateState = getStateWithColumns({ col1: bytesColumn, }); - wrapper = mount( - - ); + wrapper = mount(); act(() => { wrapper .find('button[data-test-subj="lns-indexPatternDimension-min"]') @@ -2004,7 +1996,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should keep the latest valid dimension when removing the selection in field combobox', () => { - wrapper = mount(); + wrapper = mount(); act(() => { wrapper @@ -2017,7 +2009,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('allows custom format', () => { - const stateWithNumberCol: IndexPatternPrivateState = getStateWithColumns({ + const stateWithNumberCol: FormBasedPrivateState = getStateWithColumns({ col1: { label: 'Average of memory', dataType: 'number', @@ -2029,7 +2021,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); wrapper = mount( - + ); act(() => { @@ -2059,7 +2051,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('keeps decimal places while switching', () => { - const stateWithNumberCol: IndexPatternPrivateState = getStateWithColumns({ + const stateWithNumberCol: FormBasedPrivateState = getStateWithColumns({ col1: { label: 'Average of memory', dataType: 'number', @@ -2073,7 +2065,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }, }); wrapper = mount( - + ); act(() => { @@ -2099,7 +2091,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('allows custom format with number of decimal places', () => { - const stateWithNumberCol: IndexPatternPrivateState = getStateWithColumns({ + const stateWithNumberCol: FormBasedPrivateState = getStateWithColumns({ col1: { label: 'Average of memory', dataType: 'number', @@ -2114,7 +2106,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); wrapper = mount( - + ); act(() => { @@ -2145,7 +2137,7 @@ describe('IndexPatternDimensionEditorPanel', () => { it('should hide the top level field selector when switching from non-reference to reference', () => { (generateId as jest.Mock).mockReturnValue(`second`); - wrapper = mount(); + wrapper = mount(); expect(wrapper.find('ReferenceEditor')).toHaveLength(0); @@ -2157,7 +2149,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should hide the reference editors when switching from reference to non-reference', () => { - const stateWithReferences: IndexPatternPrivateState = getStateWithColumns({ + const stateWithReferences: FormBasedPrivateState = getStateWithColumns({ col1: { label: 'Differences of (incomplete)', dataType: 'number', @@ -2169,7 +2161,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); wrapper = mount( - + ); expect(wrapper.find('ReferenceEditor')).toHaveLength(1); @@ -2182,7 +2174,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should show a warning when the current dimension is no longer configurable', () => { - const stateWithInvalidCol: IndexPatternPrivateState = getStateWithColumns({ + const stateWithInvalidCol: FormBasedPrivateState = getStateWithColumns({ col1: { label: 'Invalid differences', dataType: 'number', @@ -2193,7 +2185,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); wrapper = mount( - + ); expect( @@ -2205,7 +2197,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should remove options to select references when there are no time fields', () => { - const stateWithoutTime: IndexPatternPrivateState = { + const stateWithoutTime: FormBasedPrivateState = { ...getStateWithColumns({ col1: { label: 'Avg', @@ -2218,7 +2210,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }; wrapper = mount( - { }); it('should not show tabs when formula and static_value operations are not available', () => { - const stateWithInvalidCol: IndexPatternPrivateState = getStateWithColumns({ + const stateWithInvalidCol: FormBasedPrivateState = getStateWithColumns({ col1: { label: 'Average of memory', dataType: 'number', @@ -2279,15 +2271,13 @@ describe('IndexPatternDimensionEditorPanel', () => { }), }; - wrapper = mount( - - ); + wrapper = mount(); expect(wrapper.find('[data-test-subj="lens-dimensionTabs"]').exists()).toBeFalsy(); }); it('should show the formula tab when supported', () => { - const stateWithFormulaColumn: IndexPatternPrivateState = getStateWithColumns({ + const stateWithFormulaColumn: FormBasedPrivateState = getStateWithColumns({ col1: { label: 'Formula', dataType: 'number', @@ -2299,7 +2289,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); wrapper = mount( - + ); expect( @@ -2308,7 +2298,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should not show the static_value tab when not supported', () => { - const stateWithFormulaColumn: IndexPatternPrivateState = getStateWithColumns({ + const stateWithFormulaColumn: FormBasedPrivateState = getStateWithColumns({ col1: { label: 'Formula', dataType: 'number', @@ -2320,14 +2310,14 @@ describe('IndexPatternDimensionEditorPanel', () => { }); wrapper = mount( - + ); expect(wrapper.find('[data-test-subj="lens-dimensionTabs-static_value"]').exists()).toBeFalsy(); }); it('should show the static value tab when supported', () => { - const staticWithFormulaColumn: IndexPatternPrivateState = getStateWithColumns({ + const staticWithFormulaColumn: FormBasedPrivateState = getStateWithColumns({ col1: { label: 'Formula', dataType: 'number', @@ -2339,7 +2329,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); wrapper = mount( - { }); it('should select the quick function tab by default', () => { - const stateWithNoColumn: IndexPatternPrivateState = getStateWithColumns({}); + const stateWithNoColumn: FormBasedPrivateState = getStateWithColumns({}); wrapper = mount( - + ); expect( @@ -2367,10 +2357,10 @@ describe('IndexPatternDimensionEditorPanel', () => { }); it('should select the static value tab when supported by default', () => { - const stateWithNoColumn: IndexPatternPrivateState = getStateWithColumns({}); + const stateWithNoColumn: FormBasedPrivateState = getStateWithColumns({}); wrapper = mount( - { }); it('should not show any tab when formula is in full screen mode', () => { - const stateWithFormulaColumn: IndexPatternPrivateState = getStateWithColumns({ + const stateWithFormulaColumn: FormBasedPrivateState = getStateWithColumns({ col1: { label: 'Formula', dataType: 'number', @@ -2395,7 +2385,7 @@ describe('IndexPatternDimensionEditorPanel', () => { }); wrapper = mount( - & { +export type FormBasedDimensionTriggerProps = + DatasourceDimensionTriggerProps & { uniqueLabel: string; }; -export type IndexPatternDimensionEditorProps = - DatasourceDimensionEditorProps & { +export type FormBasedDimensionEditorProps = + DatasourceDimensionEditorProps & { uiSettings: IUiSettingsClient; storage: IStorageWrapper; savedObjectsClient: SavedObjectsClientContract; @@ -49,8 +49,8 @@ function wrapOnDot(str?: string) { return str ? str.replace(/\./g, '.\u200B') : ''; } -export const IndexPatternDimensionTriggerComponent = function IndexPatternDimensionTrigger( - props: IndexPatternDimensionTriggerProps +export const FormBasedDimensionTriggerComponent = function FormBasedDimensionTrigger( + props: FormBasedDimensionTriggerProps ) { const layerId = props.layerId; const layer = props.state.layers[layerId]; @@ -80,8 +80,8 @@ export const IndexPatternDimensionTriggerComponent = function IndexPatternDimens ); }; -export const IndexPatternDimensionEditorComponent = function IndexPatternDimensionPanel( - props: IndexPatternDimensionEditorProps +export const FormBasedDimensionEditorComponent = function FormBasedDimensionPanel( + props: FormBasedDimensionEditorProps ) { const layerId = props.layerId; const currentIndexPattern = props.indexPatterns[props.state.layers[layerId]?.indexPatternId]; @@ -103,5 +103,5 @@ export const IndexPatternDimensionEditorComponent = function IndexPatternDimensi ); }; -export const IndexPatternDimensionTrigger = memo(IndexPatternDimensionTriggerComponent); -export const IndexPatternDimensionEditor = memo(IndexPatternDimensionEditorComponent); +export const FormBasedDimensionTrigger = memo(FormBasedDimensionTriggerComponent); +export const FormBasedDimensionEditor = memo(FormBasedDimensionEditorComponent); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimensions_editor_helpers.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimensions_editor_helpers.tsx similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimensions_editor_helpers.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimensions_editor_helpers.tsx diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/get_drop_props.test.ts b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/get_drop_props.test.ts similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/get_drop_props.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/get_drop_props.test.ts index 2f4d8a0121aa1..21650cffed54a 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/get_drop_props.test.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/get_drop_props.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DragDropOperation, OperationMetadata } from '../../../types'; +import { DragDropOperation, OperationMetadata } from '../../../../types'; import { TermsIndexPatternColumn } from '../../operations'; import { getDropProps } from './get_drop_props'; import { @@ -15,7 +15,7 @@ import { mockedDndOperations, mockedColumns, } from './mocks'; -import { generateId } from '../../../id_generator'; +import { generateId } from '../../../../id_generator'; const getDefaultProps = () => ({ indexPatterns: mockDataViews(), @@ -27,7 +27,7 @@ const getDefaultProps = () => ({ source: mockedDndOperations.bucket, }); -describe('IndexPatternDimensionEditorPanel#getDropProps', () => { +describe('FormBasedDimensionEditorPanel#getDropProps', () => { describe('not dragging', () => { it('returns undefined if no drag is happening', () => { expect(getDropProps({ ...getDefaultProps(), source: undefined })).toBe(undefined); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/get_drop_props.ts b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/get_drop_props.ts similarity index 95% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/get_drop_props.ts rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/get_drop_props.ts index a1f16006fd803..a9e81bd6df668 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/get_drop_props.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/get_drop_props.ts @@ -12,22 +12,22 @@ import { IndexPattern, IndexPatternMap, IndexPatternField, -} from '../../../types'; +} from '../../../../types'; import { getCurrentFieldsForOperation, getOperationDisplay, hasOperationSupportForMultipleFields, } from '../../operations'; -import { isDraggedDataViewField, isOperationFromTheSameGroup } from '../../../utils'; +import { isDraggedDataViewField, isOperationFromTheSameGroup } from '../../../../utils'; import { hasField } from '../../pure_utils'; -import { DragContextState } from '../../../drag_drop/providers'; -import { OperationMetadata, DraggedField } from '../../../types'; +import { DragContextState } from '../../../../drag_drop/providers'; +import { OperationMetadata, DraggedField } from '../../../../types'; import { getOperationTypesForField } from '../../operations'; -import { GenericIndexPatternColumn } from '../../indexpattern'; -import { IndexPatternPrivateState, DataViewDragDropOperation } from '../../types'; +import { GenericIndexPatternColumn } from '../../form_based'; +import { FormBasedPrivateState, DataViewDragDropOperation } from '../../types'; interface GetDropPropsArgs { - state: IndexPatternPrivateState; + state: FormBasedPrivateState; source?: DragContextState['dragging']; target: DragDropOperation; indexPatterns: IndexPatternMap; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/index.ts b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/index.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/index.ts rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/index.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/mocks.ts b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/mocks.ts similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/mocks.ts rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/mocks.ts index 93b63071d6642..ceb16345f475c 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/mocks.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/mocks.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { IndexPatternLayer } from '../../types'; +import { FormBasedLayer } from '../../types'; import { documentField } from '../../document_field'; -import { IndexPatternMap, OperationMetadata } from '../../../types'; +import { IndexPatternMap, OperationMetadata } from '../../../../types'; import { DateHistogramIndexPatternColumn, GenericIndexPatternColumn, @@ -15,7 +15,7 @@ import { TermsIndexPatternColumn, } from '../../operations'; import { getFieldByNameFactory } from '../../pure_helpers'; -jest.mock('../../../id_generator'); +jest.mock('../../../../id_generator'); export const mockDataViews = (): IndexPatternMap => { const fields = [ @@ -191,7 +191,7 @@ export const mockedColumns: Record = { } as GenericIndexPatternColumn, }; -export const mockedLayers: Record IndexPatternLayer> = { +export const mockedLayers: Record FormBasedLayer> = { singleColumnLayer: (id = 'col1') => ({ indexPatternId: 'first', columnOrder: [id], diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/on_drop_handler.test.ts b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/on_drop_handler.test.ts similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/on_drop_handler.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/on_drop_handler.test.ts index 3b468181db6df..1bff858194a36 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/on_drop_handler.test.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/on_drop_handler.test.ts @@ -6,10 +6,14 @@ */ import { onDrop } from './on_drop_handler'; -import { IndexPatternPrivateState } from '../../types'; -import { OperationMetadata, DropType, DatasourceDimensionDropHandlerProps } from '../../../types'; +import { FormBasedPrivateState } from '../../types'; +import { + OperationMetadata, + DropType, + DatasourceDimensionDropHandlerProps, +} from '../../../../types'; import { FormulaIndexPatternColumn, MedianIndexPatternColumn } from '../../operations'; -import { generateId } from '../../../id_generator'; +import { generateId } from '../../../../id_generator'; import { mockDataViews, mockedLayers, @@ -18,7 +22,7 @@ import { mockedColumns, } from './mocks'; -jest.mock('../../../id_generator'); +jest.mock('../../../../id_generator'); const dimensionGroups = [ { @@ -47,7 +51,7 @@ const dimensionGroups = [ }, ]; -function getStateWithMultiFieldColumn(state: IndexPatternPrivateState) { +function getStateWithMultiFieldColumn(state: FormBasedPrivateState) { return { ...state, layers: { @@ -62,10 +66,10 @@ function getStateWithMultiFieldColumn(state: IndexPatternPrivateState) { }; } -describe('IndexPatternDimensionEditorPanel: onDrop', () => { - let state: IndexPatternPrivateState; +describe('FormBasedDimensionEditorPanel: onDrop', () => { + let state: FormBasedPrivateState; let setState: jest.Mock; - let defaultProps: DatasourceDimensionDropHandlerProps; + let defaultProps: DatasourceDimensionDropHandlerProps; beforeEach(() => { state = { @@ -347,7 +351,7 @@ describe('IndexPatternDimensionEditorPanel: onDrop', () => { describe('dropping a dimension', () => { it('sets correct order in group for metric and bucket columns when duplicating a column in group', () => { - const testState: IndexPatternPrivateState = { + const testState: FormBasedPrivateState = { ...state, layers: { ...state.layers, @@ -439,7 +443,7 @@ describe('IndexPatternDimensionEditorPanel: onDrop', () => { it('when duplicating fullReference column, the referenced columns get duplicated too', () => { (generateId as jest.Mock).mockReturnValue(`ref1Copy`); - const testState: IndexPatternPrivateState = { + const testState: FormBasedPrivateState = { ...state, layers: { ...state.layers, @@ -501,7 +505,7 @@ describe('IndexPatternDimensionEditorPanel: onDrop', () => { it('when duplicating fullReference column, the multiple referenced columns get duplicated too', () => { (generateId as jest.Mock).mockReturnValueOnce(`ref1Copy`); (generateId as jest.Mock).mockReturnValueOnce(`ref2Copy`); - const testState: IndexPatternPrivateState = { + const testState: FormBasedPrivateState = { ...state, layers: { ...state.layers, @@ -566,7 +570,7 @@ describe('IndexPatternDimensionEditorPanel: onDrop', () => { it('when duplicating fullReference column, the referenced columns get duplicated', () => { (generateId as jest.Mock).mockReturnValueOnce(`ref1Copy`); (generateId as jest.Mock).mockReturnValueOnce(`ref2Copy`); - const testState: IndexPatternPrivateState = { + const testState: FormBasedPrivateState = { ...state, layers: { ...state.layers, @@ -854,7 +858,7 @@ describe('IndexPatternDimensionEditorPanel: onDrop', () => { }); describe('dimension group aware ordering and copying', () => { - let testState: IndexPatternPrivateState; + let testState: FormBasedPrivateState; beforeEach(() => { testState = { ...state }; testState.layers.first = { ...mockedLayers.multipleColumnsLayer() }; @@ -1541,7 +1545,7 @@ describe('IndexPatternDimensionEditorPanel: onDrop', () => { }, ]; describe('simple operations', () => { - let props: DatasourceDimensionDropHandlerProps; + let props: DatasourceDimensionDropHandlerProps; beforeEach(() => { setState = jest.fn(); @@ -2087,7 +2091,7 @@ describe('IndexPatternDimensionEditorPanel: onDrop', () => { }); }); describe('references', () => { - let props: DatasourceDimensionDropHandlerProps; + let props: DatasourceDimensionDropHandlerProps; beforeEach(() => { props = { dimensionGroups: defaultDimensionGroups, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/on_drop_handler.ts b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/on_drop_handler.ts similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/on_drop_handler.ts rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/on_drop_handler.ts index 232c96610f04c..ad575d3c53947 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/on_drop_handler.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/droppable/on_drop_handler.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { isDraggedDataViewField } from '../../../utils'; +import { isDraggedDataViewField } from '../../../../utils'; import { DatasourceDimensionDropHandlerProps, DragDropOperation, @@ -14,7 +14,7 @@ import { StateSetter, VisualizationDimensionGroupConfig, DraggedField, -} from '../../../types'; +} from '../../../../types'; import { insertOrReplaceColumn, deleteColumn, @@ -28,12 +28,12 @@ import { } from '../../operations'; import { mergeLayer, mergeLayers } from '../../state_helpers'; import { getNewOperation, getField } from './get_drop_props'; -import { IndexPatternPrivateState, DataViewDragDropOperation } from '../../types'; +import { FormBasedPrivateState, DataViewDragDropOperation } from '../../types'; interface DropHandlerProps { - state: IndexPatternPrivateState; + state: FormBasedPrivateState; setState: StateSetter< - IndexPatternPrivateState, + FormBasedPrivateState, { isDimensionComplete?: boolean; forceRender?: boolean; @@ -46,7 +46,7 @@ interface DropHandlerProps { indexPatterns: IndexPatternMap; } -export function onDrop(props: DatasourceDimensionDropHandlerProps) { +export function onDrop(props: DatasourceDimensionDropHandlerProps) { const { target, source, dropType, state, indexPatterns } = props; if (isDraggedDataViewField(source) && isFieldDropType(dropType)) { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_input.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/field_input.test.tsx similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_input.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/field_input.test.tsx index b7ab501f34d16..877dc18156cdf 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_input.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/field_input.test.tsx @@ -21,7 +21,7 @@ import { import { FieldInput, getErrorMessage } from './field_input'; import { createMockedIndexPattern } from '../mocks'; import { getOperationSupportMatrix } from '.'; -import { GenericIndexPatternColumn, IndexPatternLayer, IndexPatternPrivateState } from '../types'; +import { GenericIndexPatternColumn, FormBasedLayer, FormBasedPrivateState } from '../types'; import { ReferenceBasedIndexPatternColumn } from '../operations/definitions/column_types'; jest.mock('../operations/layer_helpers', () => { @@ -30,7 +30,7 @@ jest.mock('../operations/layer_helpers', () => { return { ...original, insertOrReplaceColumn: () => { - return {} as IndexPatternLayer; + return {} as FormBasedLayer; }, }; }); @@ -113,14 +113,14 @@ function getLayer(col1: GenericIndexPatternColumn = getStringBasedOperationColum }; } function getDefaultOperationSupportMatrix( - layer: IndexPatternLayer, + layer: FormBasedLayer, columnId: string, existingFields: Record> ) { return getOperationSupportMatrix({ state: { layers: { layer1: layer }, - } as unknown as IndexPatternPrivateState, + } as unknown as FormBasedPrivateState, layerId: 'layer1', filterOperations: () => true, columnId, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_input.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/field_input.tsx similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_input.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/field_input.tsx diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_select.scss b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/field_select.scss similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_select.scss rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/field_select.scss diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_select.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/field_select.tsx similarity index 95% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_select.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/field_select.tsx index af5dc76143b17..52b2c128af595 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_select.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/field_select.tsx @@ -10,11 +10,15 @@ import { partition } from 'lodash'; import React, { useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiComboBoxOptionOption, EuiComboBoxProps } from '@elastic/eui'; -import type { OperationType } from '../indexpattern'; +import type { OperationType } from '../form_based'; import type { OperationSupportMatrix } from './operation_support'; -import { FieldOption, FieldOptionValue, FieldPicker } from '../../shared_components/field_picker'; -import { fieldContainsData } from '../../shared_components'; -import type { ExistingFieldsMap, IndexPattern } from '../../types'; +import { + FieldOption, + FieldOptionValue, + FieldPicker, +} from '../../../shared_components/field_picker'; +import { fieldContainsData } from '../../../shared_components'; +import type { ExistingFieldsMap, IndexPattern } from '../../../types'; import { getFieldType } from '../pure_utils'; export type FieldChoiceWithOperationType = FieldOptionValue & { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/filtering.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/filtering.tsx similarity index 81% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/filtering.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/filtering.tsx index 059170d9702d8..13db26af12108 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/filtering.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/filtering.tsx @@ -8,11 +8,11 @@ import React, { useCallback } from 'react'; import { isEqual } from 'lodash'; import type { Query } from '@kbn/es-query'; import { GenericIndexPatternColumn, operationDefinitionMap } from '../operations'; -import type { IndexPatternLayer } from '../types'; -import { validateQuery, FilterQueryInput } from '../../shared_components'; -import type { IndexPattern } from '../../types'; +import type { FormBasedLayer } from '../types'; +import { validateQuery, FilterQueryInput } from '../../../shared_components'; +import type { IndexPattern } from '../../../types'; -export function setFilter(columnId: string, layer: IndexPatternLayer, query: Query | undefined) { +export function setFilter(columnId: string, layer: FormBasedLayer, query: Query | undefined) { return { ...layer, columns: { @@ -36,8 +36,8 @@ export function Filtering({ selectedColumn: GenericIndexPatternColumn; indexPattern: IndexPattern; columnId: string; - layer: IndexPatternLayer; - updateLayer: (newLayer: IndexPatternLayer) => void; + layer: FormBasedLayer; + updateLayer: (newLayer: FormBasedLayer) => void; helpMessage: string | null; }) { const inputFilter = selectedColumn.filter; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/format_selector.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/format_selector.test.tsx similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/format_selector.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/format_selector.test.tsx index d59cb4f136fda..6763d6337880b 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/format_selector.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/format_selector.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { mount, shallow } from 'enzyme'; import { FormatSelector } from './format_selector'; import { act } from 'react-dom/test-utils'; -import { GenericIndexPatternColumn } from '../..'; +import { GenericIndexPatternColumn } from '../../..'; jest.mock('lodash', () => { const original = jest.requireActual('lodash'); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/format_selector.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/format_selector.tsx similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/format_selector.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/format_selector.tsx index 280829c8c1573..62770711a62df 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/format_selector.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/format_selector.tsx @@ -8,9 +8,9 @@ import React, { useCallback, useMemo, useState } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiFormRow, EuiComboBox, EuiSpacer, EuiRange, EuiFieldText } from '@elastic/eui'; -import { GenericIndexPatternColumn } from '../indexpattern'; +import { GenericIndexPatternColumn } from '../form_based'; import { isColumnFormatted } from '../operations/definitions/helpers'; -import { useDebouncedValue } from '../../shared_components'; +import { useDebouncedValue } from '../../../shared_components'; const supportedFormats: Record = { number: { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/index.ts b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/index.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/index.ts rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/index.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/operation_support.ts b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/operation_support.ts similarity index 91% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/operation_support.ts rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/operation_support.ts index 43d9770deb228..5c08b98023c74 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/operation_support.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/operation_support.ts @@ -6,10 +6,10 @@ */ import memoizeOne from 'memoize-one'; -import { DatasourceDimensionDropProps, IndexPatternMap, OperationMetadata } from '../../types'; -import { OperationType } from '../indexpattern'; +import { DatasourceDimensionDropProps, IndexPatternMap, OperationMetadata } from '../../../types'; +import { OperationType } from '../form_based'; import { memoizedGetAvailableOperationsByMetadata, OperationFieldTuple } from '../operations'; -import { IndexPatternPrivateState } from '../types'; +import { FormBasedPrivateState } from '../types'; export interface OperationSupportMatrix { operationByField: Partial>>; @@ -18,9 +18,9 @@ export interface OperationSupportMatrix { } type Props = Pick< - DatasourceDimensionDropProps['target'], + DatasourceDimensionDropProps['target'], 'layerId' | 'columnId' | 'filterOperations' -> & { state: IndexPatternPrivateState; indexPatterns: IndexPatternMap }; +> & { state: FormBasedPrivateState; indexPatterns: IndexPatternMap }; function computeOperationMatrix( operationsByMetadata: Array<{ diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/reduced_time_range.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/reduced_time_range.tsx similarity index 96% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/reduced_time_range.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/reduced_time_range.tsx index 4d160f7923e06..6f92b8dc75c17 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/reduced_time_range.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/reduced_time_range.tsx @@ -17,13 +17,13 @@ import { GenericIndexPatternColumn, operationDefinitionMap, } from '../operations'; -import type { IndexPatternLayer } from '../types'; -import type { IndexPattern } from '../../types'; +import type { FormBasedLayer } from '../types'; +import type { IndexPattern } from '../../../types'; import { reducedTimeRangeOptions } from '../reduced_time_range_utils'; export function setReducedTimeRange( columnId: string, - layer: IndexPatternLayer, + layer: FormBasedLayer, reducedTimeRange: string | undefined, skipLabelUpdate?: boolean ) { @@ -69,8 +69,8 @@ export function ReducedTimeRange({ }: { selectedColumn: GenericIndexPatternColumn; columnId: string; - layer: IndexPatternLayer; - updateLayer: (newLayer: IndexPatternLayer) => void; + layer: FormBasedLayer; + updateLayer: (newLayer: FormBasedLayer) => void; indexPattern: IndexPattern; helpMessage: string | null; skipLabelUpdate?: boolean; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/reference_editor.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/reference_editor.test.tsx similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/reference_editor.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/reference_editor.test.tsx index 6e5c157e5b9e8..d46dabf6c12f3 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/reference_editor.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/reference_editor.test.tsx @@ -16,7 +16,7 @@ import { fieldFormatsServiceMock } from '@kbn/field-formats-plugin/public/mocks' import type { IUiSettingsClient, SavedObjectsClientContract, HttpSetup } from '@kbn/core/public'; import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; -import { OperationMetadata } from '../../types'; +import { OperationMetadata } from '../../../types'; import { createMockedIndexPattern, createMockedIndexPatternWithoutType } from '../mocks'; import { ReferenceEditor, ReferenceEditorProps } from './reference_editor'; import { @@ -26,7 +26,7 @@ import { TermsIndexPatternColumn, } from '../operations'; import { FieldSelect } from './field_select'; -import { IndexPatternLayer } from '../types'; +import { FormBasedLayer } from '../types'; jest.mock('../operations'); @@ -148,7 +148,7 @@ describe('reference editor', () => { sourceField: 'bytes', }, }, - } as IndexPatternLayer; + } as FormBasedLayer; wrapper = mount( { sourceField: 'dest', }, }, - } as IndexPatternLayer; + } as FormBasedLayer; wrapper = mount( { sourceField: 'bytes', }, }, - } as IndexPatternLayer; + } as FormBasedLayer; wrapper = mount( { sourceField: 'bytes', }, }, - } as IndexPatternLayer; + } as FormBasedLayer; wrapper = mount( { sourceField: 'dest', }, }, - } as IndexPatternLayer; + } as FormBasedLayer; const onChooseFunction = jest.fn(); wrapper = mount( { sourceField: 'bytes', }, }, - } as IndexPatternLayer; + } as FormBasedLayer; wrapper = mount( { incompleteColumns: { ref: { operationType: 'max' }, }, - } as IndexPatternLayer; + } as FormBasedLayer; wrapper = mount( { incompleteColumns: { ref: { sourceField: 'timestamp' }, }, - } as IndexPatternLayer; + } as FormBasedLayer; wrapper = mount( { sourceField: 'missing', }, }, - } as IndexPatternLayer; + } as FormBasedLayer; wrapper = mount( IndexPatternLayer) + | FormBasedLayer + | ((prevLayer: FormBasedLayer) => FormBasedLayer) | GenericIndexPatternColumn ) => void; onChooseField: (choice: FieldChoiceWithOperationType) => void; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/time_scaling.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/time_scaling.tsx similarity index 91% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/time_scaling.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/time_scaling.tsx index 791d3b5846f24..003407649622e 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/time_scaling.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/time_scaling.tsx @@ -20,13 +20,13 @@ import { GenericIndexPatternColumn, operationDefinitionMap, } from '../operations'; -import type { TimeScaleUnit } from '../../../common/expressions'; -import { unitSuffixesLong } from '../../../common/suffix_formatter'; -import type { IndexPatternLayer } from '../types'; +import type { TimeScaleUnit } from '../../../../common/expressions'; +import { unitSuffixesLong } from '../../../../common/suffix_formatter'; +import type { FormBasedLayer } from '../types'; export function setTimeScaling( columnId: string, - layer: IndexPatternLayer, + layer: FormBasedLayer, timeScale: TimeScaleUnit | undefined ) { const currentColumn = layer.columns[columnId]; @@ -62,8 +62,8 @@ export function TimeScaling({ }: { selectedColumn: GenericIndexPatternColumn; columnId: string; - layer: IndexPatternLayer; - updateLayer: (newLayer: IndexPatternLayer) => void; + layer: FormBasedLayer; + updateLayer: (newLayer: FormBasedLayer) => void; }) { const selectedOperation = operationDefinitionMap[selectedColumn.operationType]; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/time_shift.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/time_shift.tsx similarity index 94% rename from x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/time_shift.tsx rename to x-pack/plugins/lens/public/datasources/form_based/dimension_panel/time_shift.tsx index 63696a3a2196c..35f278cbbe988 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/time_shift.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/time_shift.tsx @@ -15,18 +15,18 @@ import { GenericIndexPatternColumn, operationDefinitionMap, } from '../operations'; -import type { IndexPatternLayer } from '../types'; -import type { IndexPatternDimensionEditorProps } from './dimension_panel'; +import type { FormBasedLayer } from '../types'; +import type { FormBasedDimensionEditorProps } from './dimension_panel'; import { getDateHistogramInterval, getLayerTimeShiftChecks, timeShiftOptions, } from '../time_shift_utils'; -import type { IndexPattern } from '../../types'; +import type { IndexPattern } from '../../../types'; export function setTimeShift( columnId: string, - layer: IndexPatternLayer, + layer: FormBasedLayer, timeShift: string | undefined ) { const trimmedTimeShift = timeShift?.trim(); @@ -69,9 +69,9 @@ export function TimeShift({ selectedColumn: GenericIndexPatternColumn; indexPattern: IndexPattern; columnId: string; - layer: IndexPatternLayer; - updateLayer: (newLayer: IndexPatternLayer) => void; - activeData: IndexPatternDimensionEditorProps['activeData']; + layer: FormBasedLayer; + updateLayer: (newLayer: FormBasedLayer) => void; + activeData: FormBasedDimensionEditorProps['activeData']; layerId: string; }) { const [localValue, setLocalValue] = useState(selectedColumn.timeShift); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/document_field.ts b/x-pack/plugins/lens/public/datasources/form_based/document_field.ts similarity index 86% rename from x-pack/plugins/lens/public/indexpattern_datasource/document_field.ts rename to x-pack/plugins/lens/public/datasources/form_based/document_field.ts index e6ef0fcfdc0bf..557a087d2a6e6 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/document_field.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/document_field.ts @@ -6,8 +6,8 @@ */ import { i18n } from '@kbn/i18n'; -import { DOCUMENT_FIELD_NAME } from '../../common'; -import type { IndexPatternField } from '../types'; +import { DOCUMENT_FIELD_NAME } from '../../../common'; +import type { IndexPatternField } from '../../types'; const customLabel = i18n.translate('xpack.lens.indexPattern.records', { defaultMessage: 'Records', diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/field_item.scss b/x-pack/plugins/lens/public/datasources/form_based/field_item.scss similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/field_item.scss rename to x-pack/plugins/lens/public/datasources/form_based/field_item.scss index 873f5bdcbdf52..5af939906b25c 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/field_item.scss +++ b/x-pack/plugins/lens/public/datasources/form_based/field_item.scss @@ -1,4 +1,4 @@ -@import '../mixins'; +@import '../../mixins'; .lnsFieldItem { width: 100%; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/field_item.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/field_item.test.tsx similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/field_item.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/field_item.test.tsx index 19b3f9e313267..a0514dafd61b0 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/field_item.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/field_item.test.tsx @@ -15,7 +15,7 @@ import { coreMock } from '@kbn/core/public/mocks'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import { findTestSubject } from '@elastic/eui/lib/test'; import { fieldFormatsServiceMock } from '@kbn/field-formats-plugin/public/mocks'; -import { IndexPattern } from '../types'; +import { IndexPattern } from '../../types'; import { chartPluginMock } from '@kbn/charts-plugin/public/mocks'; import { documentField } from './document_field'; import { uiActionsPluginMock } from '@kbn/ui-actions-plugin/public/mocks'; @@ -25,9 +25,9 @@ import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { DataView, DataViewField } from '@kbn/data-views-plugin/common'; import { loadFieldStats } from '@kbn/unified-field-list-plugin/public/services/field_stats'; +import { DOCUMENT_FIELD_NAME } from '../../../common'; +import { LensFieldIcon } from '../../shared_components'; import { FieldStats, FieldVisualizeButton } from '@kbn/unified-field-list-plugin/public'; -import { DOCUMENT_FIELD_NAME } from '../../common'; -import { LensFieldIcon } from '../shared_components'; jest.mock('@kbn/unified-field-list-plugin/public/services/field_stats', () => ({ loadFieldStats: jest.fn().mockResolvedValue({}), diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx b/x-pack/plugins/lens/public/datasources/form_based/field_item.tsx similarity index 95% rename from x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx rename to x-pack/plugins/lens/public/datasources/form_based/field_item.tsx index 17b1ce35f38b0..5ebfecc4cc95a 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/field_item.tsx @@ -26,16 +26,16 @@ import { FieldPopoverVisualize, } from '@kbn/unified-field-list-plugin/public'; import { generateFilters, getEsQueryConfig } from '@kbn/data-plugin/public'; -import { APP_ID } from '../../common/constants'; -import { DragDrop } from '../drag_drop'; -import { DatasourceDataPanelProps, DataType } from '../types'; -import { DOCUMENT_FIELD_NAME } from '../../common'; -import type { IndexPattern, IndexPatternField } from '../types'; -import { LensFieldIcon } from '../shared_components/field_picker/lens_field_icon'; -import type { LensAppServices } from '../app_plugin/types'; -import { debouncedComponent } from '../debounced_component'; +import { DragDrop } from '../../drag_drop'; +import { DatasourceDataPanelProps, DataType } from '../../types'; +import { DOCUMENT_FIELD_NAME } from '../../../common'; +import type { IndexPattern, IndexPatternField } from '../../types'; +import { LensFieldIcon } from '../../shared_components/field_picker/lens_field_icon'; +import type { LensAppServices } from '../../app_plugin/types'; +import { debouncedComponent } from '../../debounced_component'; +import { APP_ID } from '../../../common/constants'; import { getFieldType } from './pure_utils'; -import { combineQueryAndFilters } from '../app_plugin/show_underlying_data'; +import { combineQueryAndFilters } from '../../app_plugin/show_underlying_data'; export interface FieldItemProps { core: DatasourceDataPanelProps['core']; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/field_list.scss b/x-pack/plugins/lens/public/datasources/form_based/field_list.scss similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/field_list.scss rename to x-pack/plugins/lens/public/datasources/form_based/field_list.scss diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/field_list.tsx b/x-pack/plugins/lens/public/datasources/form_based/field_list.tsx similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/field_list.tsx rename to x-pack/plugins/lens/public/datasources/form_based/field_list.tsx index 18da8488db212..e2226def27a9a 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/field_list.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/field_list.tsx @@ -13,7 +13,7 @@ import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; import { FieldItem } from './field_item'; import { NoFieldsCallout } from './no_fields_callout'; import { FieldItemSharedProps, FieldsAccordion } from './fields_accordion'; -import type { DatasourceDataPanelProps, IndexPatternField } from '../types'; +import type { DatasourceDataPanelProps, IndexPatternField } from '../../types'; const PAGINATION_SIZE = 50; export type FieldGroups = Record< diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/fields_accordion.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/fields_accordion.test.tsx similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/fields_accordion.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/fields_accordion.test.tsx index 864ba4ac55af9..a471f8e0fa309 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/fields_accordion.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/fields_accordion.test.tsx @@ -10,7 +10,7 @@ import { EuiLoadingSpinner, EuiNotificationBadge } from '@elastic/eui'; import { coreMock } from '@kbn/core/public/mocks'; import { mountWithIntl, shallowWithIntl } from '@kbn/test-jest-helpers'; import { fieldFormatsServiceMock } from '@kbn/field-formats-plugin/public/mocks'; -import { IndexPattern } from '../types'; +import { IndexPattern } from '../../types'; import { FieldItem } from './field_item'; import { FieldsAccordion, FieldsAccordionProps, FieldItemSharedProps } from './fields_accordion'; import { chartPluginMock } from '@kbn/charts-plugin/public/mocks'; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/fields_accordion.tsx b/x-pack/plugins/lens/public/datasources/form_based/fields_accordion.tsx similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/fields_accordion.tsx rename to x-pack/plugins/lens/public/datasources/form_based/fields_accordion.tsx index 5db910e6d3eff..105c9583e300d 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/fields_accordion.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/fields_accordion.tsx @@ -23,7 +23,7 @@ import type { Query } from '@kbn/es-query'; import { ChartsPluginSetup } from '@kbn/charts-plugin/public'; import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; import { FieldItem } from './field_item'; -import type { DatasourceDataPanelProps, IndexPattern, IndexPatternField } from '../types'; +import type { DatasourceDataPanelProps, IndexPattern, IndexPatternField } from '../../types'; export interface FieldItemSharedProps { core: DatasourceDataPanelProps['core']; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.test.ts b/x-pack/plugins/lens/public/datasources/form_based/form_based.test.ts similarity index 93% rename from x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/form_based.test.ts index aefb4c7327463..5a30dad263123 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.test.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/form_based.test.ts @@ -10,7 +10,7 @@ import { SavedObjectReference } from '@kbn/core/public'; import { isFragment } from 'react-is'; import { coreMock } from '@kbn/core/public/mocks'; import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; -import { IndexPatternPersistedState, IndexPatternPrivateState } from './types'; +import { FormBasedPersistedState, FormBasedPrivateState } from './types'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; @@ -20,8 +20,8 @@ import { indexPatternFieldEditorPluginMock } from '@kbn/data-view-field-editor-p import { uiActionsPluginMock } from '@kbn/ui-actions-plugin/public/mocks'; import { fieldFormatsServiceMock } from '@kbn/field-formats-plugin/public/mocks'; import { TinymathAST } from '@kbn/tinymath'; -import { getIndexPatternDatasource, GenericIndexPatternColumn } from './indexpattern'; -import { DatasourcePublicAPI, Datasource, FramePublicAPI, OperationDescriptor } from '../types'; +import { getFormBasedDatasource, GenericIndexPatternColumn } from './form_based'; +import { DatasourcePublicAPI, Datasource, FramePublicAPI, OperationDescriptor } from '../../types'; import { getFieldByNameFactory } from './pure_helpers'; import { operationDefinitionMap, @@ -42,10 +42,10 @@ import { import { createMockedFullReference } from './operations/mocks'; import { cloneDeep } from 'lodash'; import { DatatableColumn } from '@kbn/expressions-plugin/common'; -import { createMockFramePublicAPI } from '../mocks'; +import { createMockFramePublicAPI } from '../../mocks'; jest.mock('./loader'); -jest.mock('../id_generator'); +jest.mock('../../id_generator'); jest.mock('./operations'); jest.mock('./dimension_panel/reference_editor', () => ({ ReferenceEditor: () => null, @@ -178,11 +178,11 @@ const expectedIndexPatterns = { const indexPatterns = expectedIndexPatterns; describe('IndexPattern Data Source', () => { - let baseState: IndexPatternPrivateState; - let indexPatternDatasource: Datasource; + let baseState: FormBasedPrivateState; + let FormBasedDatasource: Datasource; beforeEach(() => { - indexPatternDatasource = getIndexPatternDatasource({ + FormBasedDatasource = getFormBasedDatasource({ unifiedSearch: unifiedSearchPluginMock.createStartContract(), storage: {} as IStorageWrapper, core: coreMock.createStart(), @@ -230,7 +230,7 @@ describe('IndexPattern Data Source', () => { operationType: 'count', sourceField: '___records___', }; - const map = indexPatternDatasource.uniqueLabels({ + const map = FormBasedDatasource.uniqueLabels({ layers: { a: { columnOrder: ['a', 'b'], @@ -252,7 +252,7 @@ describe('IndexPattern Data Source', () => { indexPatternId: 'foo', }, }, - } as unknown as IndexPatternPrivateState); + } as unknown as FormBasedPrivateState); expect(map).toMatchInlineSnapshot(` Object { @@ -267,7 +267,7 @@ describe('IndexPattern Data Source', () => { describe('#getPersistedState', () => { it('should persist from saved state', async () => { - expect(indexPatternDatasource.getPersistableState(baseState)).toEqual({ + expect(FormBasedDatasource.getPersistableState(baseState)).toEqual({ state: { layers: { first: { @@ -300,12 +300,12 @@ describe('IndexPattern Data Source', () => { describe('#toExpression', () => { it('should generate an empty expression when no columns are selected', async () => { - const state = indexPatternDatasource.initialize(); - expect(indexPatternDatasource.toExpression(state, 'first', indexPatterns)).toEqual(null); + const state = FormBasedDatasource.initialize(); + expect(FormBasedDatasource.toExpression(state, 'first', indexPatterns)).toEqual(null); }); it('should create a table when there is a formula without aggs', async () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -324,7 +324,7 @@ describe('IndexPattern Data Source', () => { }, }, }; - expect(indexPatternDatasource.toExpression(queryBaseState, 'first', indexPatterns)).toEqual({ + expect(FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns)).toEqual({ chain: [ { function: 'createTable', @@ -342,7 +342,7 @@ describe('IndexPattern Data Source', () => { }); it('should generate an expression for an aggregated query', async () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -371,7 +371,7 @@ describe('IndexPattern Data Source', () => { }, }; - expect(indexPatternDatasource.toExpression(queryBaseState, 'first', indexPatterns)) + expect(FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns)) .toMatchInlineSnapshot(` Object { "chain": Array [ @@ -496,7 +496,7 @@ describe('IndexPattern Data Source', () => { }); it('should put all time fields used in date_histograms to the esaggs timeFields parameter if not ignoring global time range', async () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -546,16 +546,12 @@ describe('IndexPattern Data Source', () => { }, }; - const ast = indexPatternDatasource.toExpression( - queryBaseState, - 'first', - indexPatterns - ) as Ast; + const ast = FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns) as Ast; expect(ast.chain[1].arguments.timeFields).toEqual(['timestamp', 'another_datefield']); }); it('should pass time shift parameter to metric agg functions', async () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -585,11 +581,7 @@ describe('IndexPattern Data Source', () => { }, }; - const ast = indexPatternDatasource.toExpression( - queryBaseState, - 'first', - indexPatterns - ) as Ast; + const ast = FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns) as Ast; expect((ast.chain[1].arguments.aggs[1] as Ast).chain[0].arguments.timeShift).toEqual(['1d']); }); @@ -609,7 +601,7 @@ describe('IndexPattern Data Source', () => { * The sum has its own shift and does not respected the shift from the moving average * The differences has a filter which is inherited to the median, but not the average as it has its own filter */ - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -796,11 +788,7 @@ describe('IndexPattern Data Source', () => { }, }; - const ast = indexPatternDatasource.toExpression( - queryBaseState, - 'first', - indexPatterns - ) as Ast; + const ast = FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns) as Ast; const count = (ast.chain[1].arguments.aggs[1] as Ast).chain[0]; const sum = (ast.chain[1].arguments.aggs[2] as Ast).chain[0]; const average = (ast.chain[1].arguments.aggs[3] as Ast).chain[0]; @@ -822,7 +810,7 @@ describe('IndexPattern Data Source', () => { }); it('should wrap filtered metrics in filtered metric aggregation', async () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -864,11 +852,7 @@ describe('IndexPattern Data Source', () => { }, }; - const ast = indexPatternDatasource.toExpression( - queryBaseState, - 'first', - indexPatterns - ) as Ast; + const ast = FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns) as Ast; expect(ast.chain[1].arguments.aggs[0]).toMatchInlineSnapshot(` Object { "chain": Array [ @@ -954,7 +938,7 @@ describe('IndexPattern Data Source', () => { }); it('should add time_scale and format function if time scale is set and supported', async () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -992,11 +976,7 @@ describe('IndexPattern Data Source', () => { }, }; - const ast = indexPatternDatasource.toExpression( - queryBaseState, - 'first', - indexPatterns - ) as Ast; + const ast = FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns) as Ast; const timeScaleCalls = ast.chain.filter((fn) => fn.function === 'lens_time_scale'); const formatCalls = ast.chain.filter((fn) => fn.function === 'lens_format_column'); expect(timeScaleCalls).toHaveLength(1); @@ -1040,7 +1020,7 @@ describe('IndexPattern Data Source', () => { }); it('should not add time shift to nested count metric', async () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -1061,11 +1041,7 @@ describe('IndexPattern Data Source', () => { }, }; - const ast = indexPatternDatasource.toExpression( - queryBaseState, - 'first', - indexPatterns - ) as Ast; + const ast = FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns) as Ast; const filteredMetricAgg = (ast.chain[1].arguments.aggs[0] as Ast).chain[0].arguments; const metricAgg = (filteredMetricAgg.customMetric[0] as Ast).chain[0].arguments; const bucketAgg = (filteredMetricAgg.customBucket[0] as Ast).chain[0].arguments; @@ -1076,7 +1052,7 @@ describe('IndexPattern Data Source', () => { }); it('should put column formatters after calculated columns', async () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -1116,18 +1092,14 @@ describe('IndexPattern Data Source', () => { }, }; - const ast = indexPatternDatasource.toExpression( - queryBaseState, - 'first', - indexPatterns - ) as Ast; + const ast = FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns) as Ast; const formatIndex = ast.chain.findIndex((fn) => fn.function === 'lens_format_column'); const calculationIndex = ast.chain.findIndex((fn) => fn.function === 'moving_average'); expect(calculationIndex).toBeLessThan(formatIndex); }); it('should rename the output from esaggs when using flat query', () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -1168,11 +1140,7 @@ describe('IndexPattern Data Source', () => { }, }; - const ast = indexPatternDatasource.toExpression( - queryBaseState, - 'first', - indexPatterns - ) as Ast; + const ast = FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns) as Ast; expect(ast.chain[1].arguments.metricsAtAllLevels).toEqual([false]); expect(JSON.parse(ast.chain[2].arguments.idMap[0] as string)).toEqual({ 'col-0-0': [expect.objectContaining({ id: 'bucket1' })], @@ -1182,7 +1150,7 @@ describe('IndexPattern Data Source', () => { }); it('should not put date fields used outside date_histograms to the esaggs timeFields parameter', async () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -1211,18 +1179,14 @@ describe('IndexPattern Data Source', () => { }, }; - const ast = indexPatternDatasource.toExpression( - queryBaseState, - 'first', - indexPatterns - ) as Ast; + const ast = FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns) as Ast; expect(ast.chain[1].arguments.timeFields).toEqual(['timestamp']); expect(ast.chain[1].arguments.timeFields).not.toContain('timefield'); }); describe('optimizations', () => { it('should call optimizeEsAggs once per operation for which it is available', () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -1272,7 +1236,7 @@ describe('IndexPattern Data Source', () => { const optimizeMock = jest.spyOn(operationDefinitionMap.percentile, 'optimizeEsAggs'); - indexPatternDatasource.toExpression(queryBaseState, 'first', indexPatterns); + FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns); expect(operationDefinitionMap.percentile.optimizeEsAggs).toHaveBeenCalledTimes(1); @@ -1280,7 +1244,7 @@ describe('IndexPattern Data Source', () => { }); it('should update anticipated esAggs column IDs based on the order of the optimized agg expression builders', () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -1340,11 +1304,7 @@ describe('IndexPattern Data Source', () => { return { aggs: aggs.reverse(), esAggsIdMap }; }); - const ast = indexPatternDatasource.toExpression( - queryBaseState, - 'first', - indexPatterns - ) as Ast; + const ast = FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns) as Ast; expect(operationDefinitionMap.percentile.optimizeEsAggs).toHaveBeenCalledTimes(1); @@ -1356,7 +1316,7 @@ describe('IndexPattern Data Source', () => { }); it('should deduplicate aggs for supported operations', () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -1408,11 +1368,7 @@ describe('IndexPattern Data Source', () => { }, }; - const ast = indexPatternDatasource.toExpression( - queryBaseState, - 'first', - indexPatterns - ) as Ast; + const ast = FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns) as Ast; const idMap = JSON.parse(ast.chain[2].arguments.idMap as unknown as string); @@ -1491,7 +1447,7 @@ describe('IndexPattern Data Source', () => { }); it('should collect expression references and append them', async () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -1517,18 +1473,14 @@ describe('IndexPattern Data Source', () => { }, }; - const ast = indexPatternDatasource.toExpression( - queryBaseState, - 'first', - indexPatterns - ) as Ast; + const ast = FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns) as Ast; // @ts-expect-error we can't isolate just the reference type expect(operationDefinitionMap.testReference.toExpression).toHaveBeenCalled(); expect(ast.chain[3]).toEqual('mock'); }); it('should keep correct column mapping keys with reference columns present', async () => { - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -1554,11 +1506,7 @@ describe('IndexPattern Data Source', () => { }, }; - const ast = indexPatternDatasource.toExpression( - queryBaseState, - 'first', - indexPatterns - ) as Ast; + const ast = FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns) as Ast; expect(JSON.parse(ast.chain[2].arguments.idMap[0] as string)).toEqual({ 'col-0-0': [ @@ -1571,7 +1519,7 @@ describe('IndexPattern Data Source', () => { it('should topologically sort references', () => { // This is a real example of count() + count() - const queryBaseState: IndexPatternPrivateState = { + const queryBaseState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -1645,11 +1593,7 @@ describe('IndexPattern Data Source', () => { }, }; - const ast = indexPatternDatasource.toExpression( - queryBaseState, - 'first', - indexPatterns - ) as Ast; + const ast = FormBasedDatasource.toExpression(queryBaseState, 'first', indexPatterns) as Ast; const chainLength = ast.chain.length; expect(ast.chain[chainLength - 2].arguments.name).toEqual(['math']); expect(ast.chain[chainLength - 1].arguments.id).toEqual(['formula']); @@ -1674,7 +1618,7 @@ describe('IndexPattern Data Source', () => { }, currentIndexPatternId: '1', }; - expect(indexPatternDatasource.insertLayer(state, 'newLayer')).toEqual({ + expect(FormBasedDatasource.insertLayer(state, 'newLayer')).toEqual({ ...state, layers: { ...state.layers, @@ -1705,7 +1649,7 @@ describe('IndexPattern Data Source', () => { }, currentIndexPatternId: '1', }; - expect(indexPatternDatasource.removeLayer(state, 'first')).toEqual({ + expect(FormBasedDatasource.removeLayer(state, 'first')).toEqual({ ...state, layers: { second: { @@ -1720,7 +1664,7 @@ describe('IndexPattern Data Source', () => { describe('#createEmptyLayer', () => { it('creates state with empty layers', () => { - expect(indexPatternDatasource.createEmptyLayer('index-pattern-id')).toEqual({ + expect(FormBasedDatasource.createEmptyLayer('index-pattern-id')).toEqual({ currentIndexPatternId: 'index-pattern-id', layers: {}, }); @@ -1730,7 +1674,7 @@ describe('IndexPattern Data Source', () => { describe('#getLayers', () => { it('should list the current layers', () => { expect( - indexPatternDatasource.getLayers({ + FormBasedDatasource.getLayers({ layers: { first: { indexPatternId: '1', @@ -1753,7 +1697,7 @@ describe('IndexPattern Data Source', () => { let publicAPI: DatasourcePublicAPI; beforeEach(async () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: baseState, layerId: 'first', indexPatterns, @@ -1770,7 +1714,7 @@ describe('IndexPattern Data Source', () => { }); it('should skip columns that are being referenced', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -1808,7 +1752,7 @@ describe('IndexPattern Data Source', () => { }); it('should collect all fields (also from referenced columns)', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -1847,7 +1791,7 @@ describe('IndexPattern Data Source', () => { }); it('should collect and organize fields per visible column', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -1917,7 +1861,7 @@ describe('IndexPattern Data Source', () => { }); it('should return null for referenced columns', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -1962,7 +1906,7 @@ describe('IndexPattern Data Source', () => { describe('getFilters', () => { it('should return all filters in metrics, grouped by language', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -2004,7 +1948,7 @@ describe('IndexPattern Data Source', () => { }); }); it('should ignore empty filtered metrics', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -2034,7 +1978,7 @@ describe('IndexPattern Data Source', () => { }); }); it('shuold collect top values fields as kuery existence filters if no data is provided', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -2089,7 +2033,7 @@ describe('IndexPattern Data Source', () => { }); }); it('shuold collect top values fields and terms as kuery filters if data is provided', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -2160,7 +2104,7 @@ describe('IndexPattern Data Source', () => { }); }); it('shuold collect top values fields and terms and carefully handle empty string values', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -2231,7 +2175,7 @@ describe('IndexPattern Data Source', () => { }); }); it('should ignore top values fields if other/missing option is enabled', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -2278,7 +2222,7 @@ describe('IndexPattern Data Source', () => { }); }); it('should collect custom ranges as kuery filters', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -2333,7 +2277,7 @@ describe('IndexPattern Data Source', () => { }); }); it('should collect custom ranges as kuery filters as partial', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -2393,7 +2337,7 @@ describe('IndexPattern Data Source', () => { }); }); it('should collect filters within filters operation grouped by language', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -2464,7 +2408,7 @@ describe('IndexPattern Data Source', () => { }); }); it('should ignore filtered metrics if at least one metric is unfiltered', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -2502,7 +2446,7 @@ describe('IndexPattern Data Source', () => { }); }); it('should ignore filtered metrics if at least one metric is unfiltered in formula', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -2575,7 +2519,7 @@ describe('IndexPattern Data Source', () => { }); }); it('should support complete scenarios', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -2662,7 +2606,7 @@ describe('IndexPattern Data Source', () => { }); it('should avoid duplicate filters when formula has a global filter', () => { - publicAPI = indexPatternDatasource.getPublicAPI({ + publicAPI = FormBasedDatasource.getPublicAPI({ state: { ...baseState, layers: { @@ -2770,7 +2714,7 @@ describe('IndexPattern Data Source', () => { it('should use the results of getErrorMessages directly when single layer', () => { (getErrorMessages as jest.Mock).mockClear(); (getErrorMessages as jest.Mock).mockReturnValueOnce(['error 1', 'error 2']); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { layers: { first: { indexPatternId: '1', @@ -2780,7 +2724,7 @@ describe('IndexPattern Data Source', () => { }, currentIndexPatternId: '1', }; - expect(indexPatternDatasource.getErrorMessages(state, indexPatterns)).toEqual([ + expect(FormBasedDatasource.getErrorMessages(state, indexPatterns)).toEqual([ { longMessage: 'error 1', shortMessage: '' }, { longMessage: 'error 2', shortMessage: '' }, ]); @@ -2790,7 +2734,7 @@ describe('IndexPattern Data Source', () => { it('should prepend each error with its layer number on multi-layer chart', () => { (getErrorMessages as jest.Mock).mockClear(); (getErrorMessages as jest.Mock).mockReturnValueOnce(['error 1', 'error 2']); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { layers: { first: { indexPatternId: '1', @@ -2805,7 +2749,7 @@ describe('IndexPattern Data Source', () => { }, currentIndexPatternId: '1', }; - expect(indexPatternDatasource.getErrorMessages(state, indexPatterns)).toEqual([ + expect(FormBasedDatasource.getErrorMessages(state, indexPatterns)).toEqual([ { longMessage: 'Layer 1 error: error 1', shortMessage: '' }, { longMessage: 'Layer 1 error: error 2', shortMessage: '' }, ]); @@ -2814,7 +2758,7 @@ describe('IndexPattern Data Source', () => { }); describe('#getWarningMessages', () => { - let state: IndexPatternPrivateState; + let state: FormBasedPrivateState; let framePublicAPI: FramePublicAPI; beforeEach(() => { @@ -2948,12 +2892,7 @@ describe('IndexPattern Data Source', () => { ); it('should return mismatched time shifts', () => { - const warnings = indexPatternDatasource.getWarningMessages!( - state, - framePublicAPI, - {}, - () => {} - ); + const warnings = FormBasedDatasource.getWarningMessages!(state, framePublicAPI, {}, () => {}); expect(extractTranslationIdsFromWarnings(warnings)).toMatchInlineSnapshot(` Array [ @@ -2966,12 +2905,7 @@ describe('IndexPattern Data Source', () => { it('should show different types of warning messages', () => { framePublicAPI.activeData!.first.columns[1].meta.sourceParams!.hasPrecisionError = true; - const warnings = indexPatternDatasource.getWarningMessages!( - state, - framePublicAPI, - {}, - () => {} - ); + const warnings = FormBasedDatasource.getWarningMessages!(state, framePublicAPI, {}, () => {}); expect(extractTranslationIdsFromWarnings(warnings)).toMatchInlineSnapshot(` Array [ @@ -3002,7 +2936,7 @@ describe('IndexPattern Data Source', () => { currentIndexPatternId: '1', }; - expect(indexPatternDatasource.getErrorMessages(state, indexPatterns)).toEqual([ + expect(FormBasedDatasource.getErrorMessages(state, indexPatterns)).toEqual([ { longMessage: 'Layer 1 error: error 1', shortMessage: '' }, { longMessage: 'Layer 1 error: error 2', shortMessage: '' }, ]); @@ -3013,7 +2947,7 @@ describe('IndexPattern Data Source', () => { describe('#updateStateOnCloseDimension', () => { it('should not update when there are no incomplete columns', () => { expect( - indexPatternDatasource.updateStateOnCloseDimension!({ + FormBasedDatasource.updateStateOnCloseDimension!({ state: { layers: { first: { @@ -3055,7 +2989,7 @@ describe('IndexPattern Data Source', () => { currentIndexPatternId: '1', }; expect( - indexPatternDatasource.updateStateOnCloseDimension!({ + FormBasedDatasource.updateStateOnCloseDimension!({ state, layerId: 'first', columnId: 'col1', @@ -3127,9 +3061,9 @@ describe('IndexPattern Data Source', () => { }, }, }, - } as IndexPatternPrivateState; + } as FormBasedPrivateState; expect( - indexPatternDatasource.isTimeBased(state, { + FormBasedDatasource.isTimeBased(state, { ...indexPatterns, '1': { ...indexPatterns['1'], timeFieldName: undefined }, }) @@ -3189,9 +3123,9 @@ describe('IndexPattern Data Source', () => { }, }, }, - } as IndexPatternPrivateState; + } as FormBasedPrivateState; expect( - indexPatternDatasource.isTimeBased(state, { + FormBasedDatasource.isTimeBased(state, { ...indexPatterns, '1': { ...indexPatterns['1'], timeFieldName: undefined }, }) @@ -3215,9 +3149,9 @@ describe('IndexPattern Data Source', () => { }, }, }, - } as IndexPatternPrivateState; + } as FormBasedPrivateState; expect( - indexPatternDatasource.isTimeBased(state, { + FormBasedDatasource.isTimeBased(state, { ...indexPatterns, '1': { ...indexPatterns['1'], timeFieldName: undefined }, }) @@ -3241,8 +3175,8 @@ describe('IndexPattern Data Source', () => { }, }, }, - } as IndexPatternPrivateState; - expect(indexPatternDatasource.isTimeBased(state, indexPatterns)).toEqual(true); + } as FormBasedPrivateState; + expect(FormBasedDatasource.isTimeBased(state, indexPatterns)).toEqual(true); }); }); @@ -3265,9 +3199,9 @@ describe('IndexPattern Data Source', () => { }, }, }, - } as IndexPatternPrivateState; + } as FormBasedPrivateState; expect( - indexPatternDatasource.initializeDimension!(state, 'first', indexPatterns, { + FormBasedDatasource.initializeDimension!(state, 'first', indexPatterns, { columnId: 'newStatic', groupId: 'a', }) @@ -3292,9 +3226,9 @@ describe('IndexPattern Data Source', () => { }, }, }, - } as IndexPatternPrivateState; + } as FormBasedPrivateState; expect( - indexPatternDatasource.initializeDimension!(state, 'first', indexPatterns, { + FormBasedDatasource.initializeDimension!(state, 'first', indexPatterns, { columnId: 'newStatic', groupId: 'a', staticValue: 0, // use a falsy value to check also this corner case @@ -3329,7 +3263,7 @@ describe('IndexPattern Data Source', () => { describe('#isEqual', () => { const layerId = '8bd66b66-aba3-49fb-9ff2-4bf83f2be08e'; - const persistableState: IndexPatternPersistedState = { + const persistableState: FormBasedPersistedState = { layers: { [layerId]: { columns: { @@ -3366,7 +3300,7 @@ describe('IndexPattern Data Source', () => { it('should be false if datasource states are using different data views', () => { expect( - indexPatternDatasource.isEqual(persistableState, references1, persistableState, references2) + FormBasedDatasource.isEqual(persistableState, references1, persistableState, references2) ).toBe(false); }); @@ -3375,7 +3309,7 @@ describe('IndexPattern Data Source', () => { differentPersistableState.layers[layerId].columnOrder = ['something else']; expect( - indexPatternDatasource.isEqual( + FormBasedDatasource.isEqual( persistableState, references1, differentPersistableState, @@ -3386,7 +3320,7 @@ describe('IndexPattern Data Source', () => { it('should be true if datasource states are identical and they refer to the same data view', () => { expect( - indexPatternDatasource.isEqual(persistableState, references1, persistableState, references1) + FormBasedDatasource.isEqual(persistableState, references1, persistableState, references1) ).toBe(true); }); }); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.tsx b/x-pack/plugins/lens/public/datasources/form_based/form_based.tsx similarity index 90% rename from x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.tsx rename to x-pack/plugins/lens/public/datasources/form_based/form_based.tsx index fb31c3c1a9a71..984ce87dfefaf 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/form_based.tsx @@ -36,7 +36,7 @@ import type { IndexPatternField, IndexPattern, IndexPatternRef, -} from '../types'; +} from '../../types'; import { changeIndexPattern, changeLayerIndexPattern, @@ -49,18 +49,18 @@ import { } from './loader'; import { toExpression } from './to_expression'; import { - IndexPatternDimensionTrigger, - IndexPatternDimensionEditor, + FormBasedDimensionTrigger, + FormBasedDimensionEditor, getDropProps, onDrop, } from './dimension_panel'; -import { IndexPatternDataPanel } from './datapanel'; +import { FormBasedDataPanel } from './datapanel'; import { getDatasourceSuggestionsForField, getDatasourceSuggestionsFromCurrentState, getDatasourceSuggestionsForVisualizeField, getDatasourceSuggestionsForVisualizeCharts, -} from './indexpattern_suggestions'; +} from './form_based_suggestions'; import { getFiltersInLayer, @@ -69,7 +69,7 @@ import { isColumnInvalid, cloneLayer, } from './utils'; -import { isDraggedDataViewField } from '../utils'; +import { isDraggedDataViewField } from '../../utils'; import { normalizeOperationDataType } from './pure_utils'; import { LayerPanel } from './layerpanel'; import { @@ -81,15 +81,15 @@ import { TermsIndexPatternColumn, } from './operations'; import { getReferenceRoot } from './operations/layer_helpers'; -import { IndexPatternPrivateState, IndexPatternPersistedState } from './types'; +import { FormBasedPrivateState, FormBasedPersistedState } from './types'; import { mergeLayer } from './state_helpers'; -import { Datasource, VisualizeEditorContext } from '../types'; +import { Datasource, VisualizeEditorContext } from '../../types'; import { deleteColumn, isReferenced } from './operations'; -import { GeoFieldWorkspacePanel } from '../editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel'; -import { DraggingIdentifier } from '../drag_drop'; +import { GeoFieldWorkspacePanel } from '../../editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel'; +import { DraggingIdentifier } from '../../drag_drop'; import { getStateTimeShiftWarningMessages } from './time_shift_utils'; import { getPrecisionErrorWarningMessages } from './utils'; -import { DOCUMENT_FIELD_NAME } from '../../common/constants'; +import { DOCUMENT_FIELD_NAME } from '../../../common/constants'; import { isColumnOfType } from './operations/definitions/helpers'; export type { OperationType, GenericIndexPatternColumn } from './operations'; export { deleteColumn } from './operations'; @@ -119,15 +119,15 @@ export function columnToOperation( }; } -export type { FormatColumnArgs, TimeScaleArgs, CounterRateArgs } from '../../common/expressions'; +export type { FormatColumnArgs, TimeScaleArgs, CounterRateArgs } from '../../../common/expressions'; export { getSuffixFormatter, unitSuffixesLong, suffixFormatterId, -} from '../../common/suffix_formatter'; +} from '../../../common/suffix_formatter'; -export function getIndexPatternDatasource({ +export function getFormBasedDatasource({ core, storage, data, @@ -152,14 +152,14 @@ export function getIndexPatternDatasource({ }) { const uiSettings = core.uiSettings; - const DATASOURCE_ID = 'indexpattern'; + const DATASOURCE_ID = 'formBased'; // Not stateful. State is persisted to the frame - const indexPatternDatasource: Datasource = { + const formBasedDatasource: Datasource = { id: DATASOURCE_ID, initialize( - persistedState?: IndexPatternPersistedState, + persistedState?: FormBasedPersistedState, references?: SavedObjectReference[], initialContext?: VisualizeFieldContext | VisualizeEditorContext, indexPatternRefs?: IndexPatternRef[], @@ -176,11 +176,11 @@ export function getIndexPatternDatasource({ }); }, - getPersistableState(state: IndexPatternPrivateState) { + getPersistableState(state: FormBasedPrivateState) { return extractReferences(state); }, - insertLayer(state: IndexPatternPrivateState, newLayerId: string) { + insertLayer(state: FormBasedPrivateState, newLayerId: string) { return { ...state, layers: { @@ -204,7 +204,7 @@ export function getIndexPatternDatasource({ }; }, - removeLayer(state: IndexPatternPrivateState, layerId: string) { + removeLayer(state: FormBasedPrivateState, layerId: string) { const newLayers = { ...state.layers }; delete newLayers[layerId]; @@ -214,7 +214,7 @@ export function getIndexPatternDatasource({ }; }, - clearLayer(state: IndexPatternPrivateState, layerId: string) { + clearLayer(state: FormBasedPrivateState, layerId: string) { return { ...state, layers: { @@ -224,7 +224,7 @@ export function getIndexPatternDatasource({ }; }, - getLayers(state: IndexPatternPrivateState) { + getLayers(state: FormBasedPrivateState) { return Object.keys(state?.layers); }, @@ -266,10 +266,7 @@ export function getIndexPatternDatasource({ toExpression: (state, layerId, indexPatterns) => toExpression(state, layerId, indexPatterns, uiSettings), - renderDataPanel( - domElement: Element, - props: DatasourceDataPanelProps - ) { + renderDataPanel(domElement: Element, props: DatasourceDataPanelProps) { const { onChangeIndexPattern, ...otherProps } = props; render( @@ -285,7 +282,7 @@ export function getIndexPatternDatasource({ discover, }} > - ; const counts = {} as Record; @@ -342,9 +339,9 @@ export function getIndexPatternDatasource({ renderDimensionTrigger: ( domElement: Element, - props: DatasourceDimensionTriggerProps + props: DatasourceDimensionTriggerProps ) => { - const columnLabelMap = indexPatternDatasource.uniqueLabels(props.state); + const columnLabelMap = formBasedDatasource.uniqueLabels(props.state); render( @@ -361,10 +358,7 @@ export function getIndexPatternDatasource({ unifiedSearch, }} > - + , @@ -374,9 +368,9 @@ export function getIndexPatternDatasource({ renderDimensionEditor: ( domElement: Element, - props: DatasourceDimensionEditorProps + props: DatasourceDimensionEditorProps ) => { - const columnLabelMap = indexPatternDatasource.uniqueLabels(props.state); + const columnLabelMap = formBasedDatasource.uniqueLabels(props.state); render( @@ -394,7 +388,7 @@ export function getIndexPatternDatasource({ unifiedSearch, }} > - + props: DatasourceLayerPanelProps ) => { const { onChangeIndexPattern, ...otherProps } = props; render( @@ -445,7 +439,7 @@ export function getIndexPatternDatasource({ onDrop, getCustomWorkspaceRenderer: ( - state: IndexPatternPrivateState, + state: FormBasedPrivateState, dragging: DraggingIdentifier, indexPatterns: Record ) => { @@ -501,7 +495,7 @@ export function getIndexPatternDatasource({ onIndexPatternRename: (state, oldIndexPatternId, newIndexPatternId) => { return renameIndexPattern({ state, oldIndexPatternId, newIndexPatternId }); }, - getRenderEventCounters(state: IndexPatternPrivateState): string[] { + getRenderEventCounters(state: FormBasedPrivateState): string[] { const additionalEvents = { time_shift: false, filter: false, @@ -545,8 +539,8 @@ export function getIndexPatternDatasource({ }); }, - getPublicAPI({ state, layerId, indexPatterns }: PublicAPIProps) { - const columnLabelMap = indexPatternDatasource.uniqueLabels(state); + getPublicAPI({ state, layerId, indexPatterns }: PublicAPIProps) { + const columnLabelMap = formBasedDatasource.uniqueLabels(state); const layer = state.layers[layerId]; const visibleColumnIds = layer.columnOrder.filter((colId) => !isReferenced(layer, colId)); @@ -766,16 +760,16 @@ export function getIndexPatternDatasource({ ); }, isEqual: ( - persistableState1: IndexPatternPersistedState, + persistableState1: FormBasedPersistedState, references1: SavedObjectReference[], - persistableState2: IndexPatternPersistedState, + persistableState2: FormBasedPersistedState, references2: SavedObjectReference[] ) => isEqual( injectReferences(persistableState1, references1), injectReferences(persistableState2, references2) ), - getUsedDataView: (state: IndexPatternPrivateState, layerId?: string) => { + getUsedDataView: (state: FormBasedPrivateState, layerId?: string) => { if (!layerId) { return state.currentIndexPatternId; } @@ -786,7 +780,7 @@ export function getIndexPatternDatasource({ }, }; - return indexPatternDatasource; + return formBasedDatasource; } function blankLayer(indexPatternId: string) { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern_suggestions.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/form_based_suggestions.test.tsx similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/indexpattern_suggestions.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/form_based_suggestions.test.tsx index 382c11bda545a..d7a544a723e04 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern_suggestions.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/form_based_suggestions.test.tsx @@ -12,16 +12,16 @@ import type { StaticValueColumn, CountColumn, } from '@kbn/visualizations-plugin/common/convert_to_lens'; -import { DatasourceSuggestion } from '../types'; -import { generateId } from '../id_generator'; -import type { IndexPatternPrivateState } from './types'; +import { DatasourceSuggestion } from '../../types'; +import { generateId } from '../../id_generator'; +import type { FormBasedPrivateState } from './types'; import { getDatasourceSuggestionsForField, getDatasourceSuggestionsFromCurrentState, getDatasourceSuggestionsForVisualizeField, getDatasourceSuggestionsForVisualizeCharts, IndexPatternSuggestion, -} from './indexpattern_suggestions'; +} from './form_based_suggestions'; import { documentField } from './document_field'; import { getFieldByNameFactory } from './pure_helpers'; import { isEqual } from 'lodash'; @@ -33,7 +33,7 @@ import { } from './operations/definitions'; jest.mock('./loader'); -jest.mock('../id_generator'); +jest.mock('../../id_generator'); const fieldsOne = [ { @@ -171,7 +171,7 @@ const expectedIndexPatterns = { }, }; -function testInitialState(): IndexPatternPrivateState { +function testInitialState(): FormBasedPrivateState { return { currentIndexPatternId: '1', layers: { @@ -206,7 +206,7 @@ function getSuggestionSubset( ): Array> { return suggestions.map((s) => { const newSuggestion = { ...s } as Omit & { - state?: IndexPatternPrivateState; + state?: FormBasedPrivateState; }; delete newSuggestion.state; return newSuggestion; @@ -385,7 +385,7 @@ describe('IndexPattern Data Source suggestions', () => { }); it('should make a metric suggestion for a number field if there is no time field', async () => { - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -628,7 +628,7 @@ describe('IndexPattern Data Source suggestions', () => { }); it('should make a metric suggestion for a number field if there is no time field', async () => { - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { previousLayer: { @@ -764,7 +764,7 @@ describe('IndexPattern Data Source suggestions', () => { }); describe('suggesting extensions to non-empty tables', () => { - function stateWithNonEmptyTables(): IndexPatternPrivateState { + function stateWithNonEmptyTables(): FormBasedPrivateState { const state = testInitialState(); return { @@ -1036,7 +1036,7 @@ describe('IndexPattern Data Source suggestions', () => { it('adds a metric column on a number field if no other metrics set', () => { (generateId as jest.Mock).mockReturnValue('newid'); const initialState = stateWithNonEmptyTables(); - const modifiedState: IndexPatternPrivateState = { + const modifiedState: FormBasedPrivateState = { ...initialState, layers: { ...initialState.layers, @@ -1138,7 +1138,7 @@ describe('IndexPattern Data Source suggestions', () => { it('skips duplicates when the document-specific field is already in use', () => { const initialState = stateWithNonEmptyTables(); - const modifiedState: IndexPatternPrivateState = { + const modifiedState: FormBasedPrivateState = { ...initialState, layers: { ...initialState.layers, @@ -1170,7 +1170,7 @@ describe('IndexPattern Data Source suggestions', () => { it('hides any referenced metrics when adding new metrics', () => { (generateId as jest.Mock).mockReturnValue('newid'); const initialState = stateWithNonEmptyTables(); - const modifiedState: IndexPatternPrivateState = { + const modifiedState: FormBasedPrivateState = { ...initialState, layers: { currentLayer: { @@ -1239,7 +1239,7 @@ describe('IndexPattern Data Source suggestions', () => { it('makes a suggestion to extending from an invalid state with a new metric', () => { (generateId as jest.Mock).mockReturnValue('newid'); const initialState = stateWithNonEmptyTables(); - const modifiedState: IndexPatternPrivateState = { + const modifiedState: FormBasedPrivateState = { ...initialState, layers: { currentLayer: { @@ -1306,7 +1306,7 @@ describe('IndexPattern Data Source suggestions', () => { (generateId as jest.Mock).mockReturnValue('newid'); const initialState = stateWithNonEmptyTables(); - const modifiedState: IndexPatternPrivateState = { + const modifiedState: FormBasedPrivateState = { ...initialState, layers: { referenceLineLayer: { @@ -1394,7 +1394,7 @@ describe('IndexPattern Data Source suggestions', () => { }); describe('finding the layer that is using the current index pattern', () => { - function stateWithCurrentIndexPattern(): IndexPatternPrivateState { + function stateWithCurrentIndexPattern(): FormBasedPrivateState { const state = testInitialState(); return { @@ -2140,7 +2140,7 @@ describe('IndexPattern Data Source suggestions', () => { it('returns a single suggestion containing the current columns for each layer', async () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { ...initialState, layers: { ...initialState.layers, @@ -2233,7 +2233,7 @@ describe('IndexPattern Data Source suggestions', () => { it('returns a metric over time for single metric tables', async () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { ...initialState, layers: { first: { @@ -2296,7 +2296,7 @@ describe('IndexPattern Data Source suggestions', () => { it('adds date histogram over default time field for tables without time dimension', async () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { ...initialState, layers: { first: { @@ -2385,7 +2385,7 @@ describe('IndexPattern Data Source suggestions', () => { it('adds date histogram over default time field for tables without time dimension and a referenceLine', async () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { ...initialState, layers: { first: { @@ -2495,7 +2495,7 @@ describe('IndexPattern Data Source suggestions', () => { it('does not create an over time suggestion if tables with numeric buckets with time dimension', async () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { ...initialState, layers: { first: { @@ -2543,7 +2543,7 @@ describe('IndexPattern Data Source suggestions', () => { it('adds date histogram over default time field for custom range intervals', async () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { ...initialState, layers: { first: { @@ -2630,7 +2630,7 @@ describe('IndexPattern Data Source suggestions', () => { it('does not create an over time suggestion if there is no default time field', async () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { ...initialState, layers: { first: { @@ -2667,7 +2667,7 @@ describe('IndexPattern Data Source suggestions', () => { it('should not propose an over time suggestion if there are multiple bucket dimensions', () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { ...initialState, layers: { first: { @@ -2751,7 +2751,7 @@ describe('IndexPattern Data Source suggestions', () => { searchable: true, }, ]; - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -2858,7 +2858,7 @@ describe('IndexPattern Data Source suggestions', () => { it('returns an only metric version of a given table, but does not include current state as reduced', () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -2966,7 +2966,7 @@ describe('IndexPattern Data Source suggestions', () => { it('returns an alternative metric for an only-metric table', () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -3032,7 +3032,7 @@ describe('IndexPattern Data Source suggestions', () => { it('contains a reordering suggestion when there are exactly 2 buckets', () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -3084,7 +3084,7 @@ describe('IndexPattern Data Source suggestions', () => { it('will generate suggestions even if there are errors from missing fields', () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -3148,7 +3148,7 @@ describe('IndexPattern Data Source suggestions', () => { describe('references', () => { it('will extend the table with a date when starting in an invalid state', () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { ...initialState, layers: { ...initialState.layers, @@ -3237,7 +3237,7 @@ describe('IndexPattern Data Source suggestions', () => { it('will make an unchanged suggestion including incomplete references', () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { ...initialState, layers: { ...initialState.layers, @@ -3327,7 +3327,7 @@ describe('IndexPattern Data Source suggestions', () => { it('will create reduced suggestions with all referenced children when handling references', () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { ...initialState, layers: { ...initialState.layers, @@ -3473,7 +3473,7 @@ describe('IndexPattern Data Source suggestions', () => { it('will leave dangling references in place', () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { ...initialState, layers: { ...initialState.layers, @@ -3521,7 +3521,7 @@ describe('IndexPattern Data Source suggestions', () => { it('will not suggest reduced tables if there is just a referenced top level metric', () => { const initialState = testInitialState(); - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { ...initialState, layers: { ...initialState.layers, @@ -3566,7 +3566,7 @@ describe('IndexPattern Data Source suggestions', () => { }); function isTableWithBucketColumns( - suggestion: DatasourceSuggestion, + suggestion: DatasourceSuggestion, columnIds: string[], numBuckets: number ) { @@ -3577,7 +3577,7 @@ function isTableWithBucketColumns( } function isTableWithMetricColumns( - suggestion: DatasourceSuggestion, + suggestion: DatasourceSuggestion, columnIds: string[] ) { expect(suggestion.table.isMultiRow).toEqual(false); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern_suggestions.ts b/x-pack/plugins/lens/public/datasources/form_based/form_based_suggestions.ts similarity index 95% rename from x-pack/plugins/lens/public/indexpattern_datasource/indexpattern_suggestions.ts rename to x-pack/plugins/lens/public/datasources/form_based/form_based_suggestions.ts index 8503c369f4ec2..52008f10bcdeb 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern_suggestions.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/form_based_suggestions.ts @@ -14,7 +14,7 @@ import type { AnyColumnWithSourceField, TermsColumn, } from '@kbn/visualizations-plugin/common/convert_to_lens'; -import { generateId } from '../id_generator'; +import { generateId } from '../../id_generator'; import type { DatasourceSuggestion, IndexPattern, @@ -22,8 +22,8 @@ import type { IndexPatternMap, TableChangeType, VisualizationDimensionGroupConfig, -} from '../types'; -import { columnToOperation } from './indexpattern'; +} from '../../types'; +import { columnToOperation } from './form_based'; import { insertNewColumn, replaceColumn, @@ -41,12 +41,12 @@ import { ColumnAdvancedParams, } from './operations'; import { hasField } from './pure_utils'; -import type { IndexPatternPrivateState, IndexPatternLayer } from './types'; +import type { FormBasedPrivateState, FormBasedLayer } from './types'; import { documentField } from './document_field'; import { OperationDefinition } from './operations/definitions'; import { insertOrReplaceFormulaColumn } from './operations/definitions/formula'; -export type IndexPatternSuggestion = DatasourceSuggestion; +export type IndexPatternSuggestion = DatasourceSuggestion; interface ColumnChange { op: OperationType; @@ -67,12 +67,12 @@ function buildSuggestion({ label, changeType, }: { - state: IndexPatternPrivateState; + state: FormBasedPrivateState; layerId: string; changeType: TableChangeType; - updatedLayer?: IndexPatternLayer; + updatedLayer?: FormBasedLayer; label?: string; -}): DatasourceSuggestion { +}): DatasourceSuggestion { const updatedState = updatedLayer ? { ...state, @@ -120,7 +120,7 @@ function buildSuggestion({ } export function getDatasourceSuggestionsForField( - state: IndexPatternPrivateState, + state: FormBasedPrivateState, indexPatternId: string, field: IndexPatternField, indexPatterns: IndexPatternMap, @@ -176,7 +176,7 @@ export function getDatasourceSuggestionsForField( // Called when the user navigates from Visualize editor to Lens export function getDatasourceSuggestionsForVisualizeCharts( - state: IndexPatternPrivateState, + state: FormBasedPrivateState, contextLayers: Layer[], indexPatterns: IndexPatternMap ): IndexPatternSuggestion[] { @@ -184,7 +184,7 @@ export function getDatasourceSuggestionsForVisualizeCharts( } function getEmptyLayersSuggestionsForVisualizeCharts( - state: IndexPatternPrivateState, + state: FormBasedPrivateState, contextLayers: Layer[], indexPatterns: IndexPatternMap ): IndexPatternSuggestion[] { @@ -280,7 +280,7 @@ function convertToColumnChange(columns: Layer['columns'], indexPattern: IndexPat ) { const orderColumn = column.params.orderAgg; const operationDefinition = operationDefinitionMap[orderColumn.operationType]; - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: indexPattern.id, columns: {}, columnOrder: [], @@ -311,7 +311,7 @@ function createNewLayerWithMetricAggregationFromVizEditor( layer: Layer ) { const columns = convertToColumnChange(layer.columns, indexPattern); - let newLayer: IndexPatternLayer = { + let newLayer: FormBasedLayer = { indexPatternId: indexPattern.id, columns: {}, columnOrder: [], @@ -360,7 +360,7 @@ function createNewLayerWithMetricAggregationFromVizEditor( // Called when the user navigates from Discover to Lens (Visualize button) export function getDatasourceSuggestionsForVisualizeField( - state: IndexPatternPrivateState, + state: FormBasedPrivateState, indexPatternId: string, fieldName: string, indexPatterns: IndexPatternMap @@ -400,7 +400,7 @@ function getBucketOperation(field: IndexPatternField) { } function getExistingLayerSuggestionsForField( - state: IndexPatternPrivateState, + state: FormBasedPrivateState, layerId: string, field: IndexPatternField, indexPatterns: IndexPatternMap @@ -514,14 +514,14 @@ function getExistingLayerSuggestionsForField( } function getEmptyLayerSuggestionsForField( - state: IndexPatternPrivateState, + state: FormBasedPrivateState, layerId: string, indexPatternId: string, field: IndexPatternField, indexPatterns: IndexPatternMap ): IndexPatternSuggestion[] { const indexPattern = indexPatterns[indexPatternId]; - let newLayer: IndexPatternLayer | undefined; + let newLayer: FormBasedLayer | undefined; const bucketOperation = getBucketOperation(field); if (bucketOperation) { newLayer = createNewLayerWithBucketAggregation(indexPattern, field, bucketOperation); @@ -549,7 +549,7 @@ function createNewLayerWithBucketAggregation( indexPattern: IndexPattern, field: IndexPatternField, operation: OperationType -): IndexPatternLayer { +): FormBasedLayer { return insertNewColumn({ op: operation, layer: insertNewColumn({ @@ -570,7 +570,7 @@ function createNewLayerWithBucketAggregation( function createNewLayerWithMetricAggregation( indexPattern: IndexPattern, field: IndexPatternField -): IndexPatternLayer | undefined { +): FormBasedLayer | undefined { const dateField = indexPattern.getFieldByName(indexPattern.timeFieldName!); const [metricOperation] = getMetricOperationTypes(field); if (!metricOperation) { @@ -595,10 +595,10 @@ function createNewLayerWithMetricAggregation( } export function getDatasourceSuggestionsFromCurrentState( - state: IndexPatternPrivateState, + state: FormBasedPrivateState, indexPatterns: IndexPatternMap, filterLayers: (layerId: string) => boolean = () => true -): Array> { +): Array> { const layers = Object.entries(state.layers || {}).filter(([layerId]) => filterLayers(layerId)); if (layers.length > 1) { @@ -658,7 +658,7 @@ export function getDatasourceSuggestionsFromCurrentState( buckets.length === 1 && buckets.some((columnId) => layer.columns[columnId].dataType === 'number'); - const suggestions: Array> = []; + const suggestions: Array> = []; // Always suggest an unchanged table, including during invalid states suggestions.push( @@ -708,7 +708,7 @@ export function getDatasourceSuggestionsFromCurrentState( } function createChangedNestingSuggestion( - state: IndexPatternPrivateState, + state: FormBasedPrivateState, layerId: string, indexPatterns: IndexPatternMap ) { @@ -739,7 +739,7 @@ function createChangedNestingSuggestion( function createMetricSuggestion( indexPattern: IndexPattern, layerId: string, - state: IndexPatternPrivateState, + state: FormBasedPrivateState, field: IndexPatternField ) { const [operation] = getMetricOperationTypes(field); @@ -781,10 +781,10 @@ function getNestedTitle([outerBucketLabel, innerBucketLabel]: string[]) { function createAlternativeMetricSuggestions( indexPattern: IndexPattern, layerId: string, - state: IndexPatternPrivateState + state: FormBasedPrivateState ) { const layer = state.layers[layerId]; - const suggestions: Array> = []; + const suggestions: Array> = []; const topLevelMetricColumns = layer.columnOrder.filter( (columnId) => !isReferenced(layer, columnId) ); @@ -826,7 +826,7 @@ function createAlternativeMetricSuggestions( } function createSuggestionWithDefaultDateHistogram( - state: IndexPatternPrivateState, + state: FormBasedPrivateState, layerId: string, timeField: IndexPatternField, indexPatterns: IndexPatternMap @@ -852,7 +852,7 @@ function createSuggestionWithDefaultDateHistogram( }); } -function createSimplifiedTableSuggestions(state: IndexPatternPrivateState, layerId: string) { +function createSimplifiedTableSuggestions(state: FormBasedPrivateState, layerId: string) { const layer = state.layers[layerId]; const [availableBucketedColumns, availableMetricColumns] = partition( @@ -916,7 +916,7 @@ function createSimplifiedTableSuggestions(state: IndexPatternPrivateState, layer }); } -function getMetricSuggestionTitle(layer: IndexPatternLayer, onlySimpleMetric: boolean) { +function getMetricSuggestionTitle(layer: FormBasedLayer, onlySimpleMetric: boolean) { const { operationType, label } = layer.columns[layer.columnOrder[0]]; return i18n.translate('xpack.lens.indexpattern.suggestions.overallLabel', { defaultMessage: '{operation} overall', diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/help_popover.scss b/x-pack/plugins/lens/public/datasources/form_based/help_popover.scss similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/help_popover.scss rename to x-pack/plugins/lens/public/datasources/form_based/help_popover.scss diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/help_popover.tsx b/x-pack/plugins/lens/public/datasources/form_based/help_popover.tsx similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/help_popover.tsx rename to x-pack/plugins/lens/public/datasources/form_based/help_popover.tsx diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/index.ts b/x-pack/plugins/lens/public/datasources/form_based/index.ts similarity index 84% rename from x-pack/plugins/lens/public/indexpattern_datasource/index.ts rename to x-pack/plugins/lens/public/datasources/form_based/index.ts index 6b1b052c90b14..3b1f62829fa46 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/index.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/index.ts @@ -16,11 +16,11 @@ import type { IndexPatternFieldEditorStart } from '@kbn/data-view-field-editor-p import type { DataPublicPluginSetup, DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { UiActionsStart } from '@kbn/ui-actions-plugin/public'; import type { FieldFormatsStart, FieldFormatsSetup } from '@kbn/field-formats-plugin/public'; -import type { EditorFrameSetup } from '../types'; +import type { EditorFrameSetup } from '../../types'; export type { PersistedIndexPatternLayer, FormulaPublicApi } from './types'; -export interface IndexPatternDatasourceSetupPlugins { +export interface FormBasedDatasourceSetupPlugins { expressions: ExpressionsSetup; fieldFormats: FieldFormatsSetup; data: DataPublicPluginSetup; @@ -28,7 +28,7 @@ export interface IndexPatternDatasourceSetupPlugins { charts: ChartsPluginSetup; } -export interface IndexPatternDatasourceStartPlugins { +export interface FormBasedDatasourceStartPlugins { data: DataPublicPluginStart; unifiedSearch: UnifiedSearchPublicPluginStart; discover?: DiscoverStart; @@ -38,19 +38,19 @@ export interface IndexPatternDatasourceStartPlugins { uiActions: UiActionsStart; } -export class IndexPatternDatasource { +export class FormBasedDatasource { setup( - core: CoreSetup, + core: CoreSetup, { fieldFormats: fieldFormatsSetup, expressions, editorFrame, charts, - }: IndexPatternDatasourceSetupPlugins + }: FormBasedDatasourceSetupPlugins ) { editorFrame.registerDatasource(async () => { - const { getIndexPatternDatasource, getSuffixFormatter, suffixFormatterId } = await import( - '../async_services' + const { getFormBasedDatasource, getSuffixFormatter, suffixFormatterId } = await import( + '../../async_services' ); if (!fieldFormatsSetup.has(suffixFormatterId)) { @@ -67,7 +67,7 @@ export class IndexPatternDatasource { { dataViewFieldEditor, uiActions, data, fieldFormats, dataViews, unifiedSearch, discover }, ] = await core.getStartServices(); - return getIndexPatternDatasource({ + return getFormBasedDatasource({ core: coreStart, fieldFormats, storage: new Storage(localStorage), diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/layerpanel.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/layerpanel.test.tsx similarity index 95% rename from x-pack/plugins/lens/public/indexpattern_datasource/layerpanel.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/layerpanel.test.tsx index 7dde02c6c2b61..defc505f1d9e1 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/layerpanel.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/layerpanel.test.tsx @@ -6,13 +6,13 @@ */ import React, { MouseEvent } from 'react'; -import { IndexPatternPrivateState } from './types'; -import { IndexPatternLayerPanelProps, LayerPanel } from './layerpanel'; +import { FormBasedPrivateState } from './types'; +import { FormBasedLayerPanelProps, LayerPanel } from './layerpanel'; import { shallowWithIntl as shallow } from '@kbn/test-jest-helpers'; import { ShallowWrapper } from 'enzyme'; import { EuiSelectable } from '@elastic/eui'; import { DataViewsList } from '@kbn/unified-search-plugin/public'; -import { ChangeIndexPattern } from '../shared_components/dataview_picker/dataview_picker'; +import { ChangeIndexPattern } from '../../shared_components/dataview_picker/dataview_picker'; import { getFieldByNameFactory } from './pure_helpers'; import { TermsIndexPatternColumn } from './operations'; @@ -135,7 +135,7 @@ const fieldsThree = [ }, ]; -const initialState: IndexPatternPrivateState = { +const initialState: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { first: { @@ -168,7 +168,7 @@ const initialState: IndexPatternPrivateState = { }, }; describe('Layer Data Panel', () => { - let defaultProps: IndexPatternLayerPanelProps; + let defaultProps: FormBasedLayerPanelProps; beforeEach(() => { defaultProps = { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/layerpanel.tsx b/x-pack/plugins/lens/public/datasources/form_based/layerpanel.tsx similarity index 78% rename from x-pack/plugins/lens/public/indexpattern_datasource/layerpanel.tsx rename to x-pack/plugins/lens/public/datasources/form_based/layerpanel.tsx index 9824f70eeddfc..c18b79b28c58c 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/layerpanel.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/layerpanel.tsx @@ -8,13 +8,12 @@ import React from 'react'; import { I18nProvider } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; -import { DatasourceLayerPanelProps } from '../types'; -import { IndexPatternPrivateState } from './types'; -import { ChangeIndexPattern } from '../shared_components/dataview_picker/dataview_picker'; +import { DatasourceLayerPanelProps } from '../../types'; +import { FormBasedPrivateState } from './types'; +import { ChangeIndexPattern } from '../../shared_components/dataview_picker/dataview_picker'; -export interface IndexPatternLayerPanelProps - extends DatasourceLayerPanelProps { - state: IndexPatternPrivateState; +export interface FormBasedLayerPanelProps extends DatasourceLayerPanelProps { + state: FormBasedPrivateState; onChangeIndexPattern: (newId: string) => void; } @@ -23,7 +22,7 @@ export function LayerPanel({ layerId, onChangeIndexPattern, dataViews, -}: IndexPatternLayerPanelProps) { +}: FormBasedLayerPanelProps) { const layer = state.layers[layerId]; const indexPattern = dataViews.indexPatterns[layer.indexPatternId]; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/loader.test.ts b/x-pack/plugins/lens/public/datasources/form_based/loader.test.ts similarity index 96% rename from x-pack/plugins/lens/public/indexpattern_datasource/loader.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/loader.test.ts index a3bc7a21143c4..896fbd0e6404f 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/loader.test.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/loader.test.ts @@ -12,9 +12,9 @@ import { extractReferences, injectReferences, } from './loader'; -import { IndexPatternPersistedState, IndexPatternPrivateState } from './types'; +import { FormBasedPersistedState, FormBasedPrivateState } from './types'; import { DateHistogramIndexPatternColumn, TermsIndexPatternColumn } from './operations'; -import { sampleIndexPatterns } from '../data_views_service/mocks'; +import { sampleIndexPatterns } from '../../data_views_service/mocks'; const createMockStorage = (lastData?: Record) => { return { @@ -141,7 +141,7 @@ describe('loader', () => { }); it('should initialize all the embeddable references without local storage', () => { - const savedState: IndexPatternPersistedState = { + const savedState: FormBasedPersistedState = { layers: { layerb: { columnOrder: ['col1', 'col2'], @@ -189,7 +189,7 @@ describe('loader', () => { }); it('should initialize from saved state', () => { - const savedState: IndexPatternPersistedState = { + const savedState: FormBasedPersistedState = { layers: { layerb: { columnOrder: ['col1', 'col2'], @@ -242,7 +242,7 @@ describe('loader', () => { }); describe('saved object references', () => { - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { currentIndexPatternId: 'b', layers: { a: { @@ -300,7 +300,7 @@ describe('loader', () => { describe('changeIndexPattern', () => { it('sets the given indexpattern as current', () => { - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { currentIndexPatternId: '2', layers: {}, }; @@ -324,7 +324,7 @@ describe('loader', () => { }); it('should update an empty layer on indexpattern change', () => { - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { currentIndexPatternId: '2', layers: { layerId: { columnOrder: [], columns: {}, indexPatternId: '2' } }, }; @@ -345,7 +345,7 @@ describe('loader', () => { }); it('should keep layer indexpattern on change if not empty', () => { - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { currentIndexPatternId: '2', layers: { layerId: { @@ -402,7 +402,7 @@ describe('loader', () => { describe('changeLayerIndexPattern', () => { it('loads the index pattern and then changes the specified layer', async () => { - const state: IndexPatternPrivateState = { + const state: FormBasedPrivateState = { currentIndexPatternId: '1', layers: { l0: { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts b/x-pack/plugins/lens/public/datasources/form_based/loader.ts similarity index 89% rename from x-pack/plugins/lens/public/indexpattern_datasource/loader.ts rename to x-pack/plugins/lens/public/datasources/form_based/loader.ts index e26231995578e..6aa021a6f363f 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/loader.ts @@ -17,12 +17,12 @@ import { UiActionsStart, VisualizeFieldContext, } from '@kbn/ui-actions-plugin/public'; -import type { VisualizeEditorContext } from '../types'; -import { IndexPatternPersistedState, IndexPatternPrivateState, IndexPatternLayer } from './types'; +import type { VisualizeEditorContext } from '../../types'; +import { FormBasedPersistedState, FormBasedPrivateState, FormBasedLayer } from './types'; import { memoizedGetAvailableOperationsByMetadata, updateLayerIndexPattern } from './operations'; -import { readFromStorage, writeToStorage } from '../settings_storage'; -import type { IndexPattern, IndexPatternRef } from '../types'; +import { readFromStorage, writeToStorage } from '../../settings_storage'; +import type { IndexPattern, IndexPatternRef } from '../../types'; export function onRefreshIndexPattern() { if (memoizedGetAvailableOperationsByMetadata.cache.clear) { @@ -47,9 +47,9 @@ function getLayerReferenceName(layerId: string) { return `indexpattern-datasource-layer-${layerId}`; } -export function extractReferences({ layers }: IndexPatternPrivateState) { +export function extractReferences({ layers }: FormBasedPrivateState) { const savedObjectReferences: SavedObjectReference[] = []; - const persistableState: IndexPatternPersistedState = { + const persistableState: FormBasedPersistedState = { layers: {}, }; Object.entries(layers).forEach(([layerId, { indexPatternId, ...persistableLayer }]) => { @@ -64,10 +64,10 @@ export function extractReferences({ layers }: IndexPatternPrivateState) { } export function injectReferences( - state: IndexPatternPersistedState, + state: FormBasedPersistedState, references: SavedObjectReference[] ) { - const layers: Record = {}; + const layers: Record = {}; Object.entries(state.layers).forEach(([layerId, persistedLayer]) => { layers[layerId] = { ...persistedLayer, @@ -83,7 +83,7 @@ function createStateFromPersisted({ persistedState, references, }: { - persistedState?: IndexPatternPersistedState; + persistedState?: FormBasedPersistedState; references?: SavedObjectReference[]; }) { return persistedState && references ? injectReferences(persistedState, references) : undefined; @@ -97,7 +97,7 @@ function getUsedIndexPatterns({ defaultIndexPatternId, }: { state?: { - layers: Record; + layers: Record; }; defaultIndexPatternId?: string; storage: IStorageWrapper; @@ -139,14 +139,14 @@ export function loadInitialState({ indexPatternRefs = [], indexPatterns = {}, }: { - persistedState?: IndexPatternPersistedState; + persistedState?: FormBasedPersistedState; references?: SavedObjectReference[]; defaultIndexPatternId?: string; storage: IStorageWrapper; initialContext?: VisualizeFieldContext | VisualizeEditorContext; indexPatternRefs?: IndexPatternRef[]; indexPatterns?: Record; -}): IndexPatternPrivateState { +}): FormBasedPrivateState { const state = createStateFromPersisted({ persistedState, references }); const { usedPatterns, allIndexPatternIds: indexPatternIds } = getUsedIndexPatterns({ state, @@ -186,7 +186,7 @@ export function changeIndexPattern({ indexPatterns, }: { indexPatternId: string; - state: IndexPatternPrivateState; + state: FormBasedPrivateState; storage: IStorageWrapper; indexPatterns: Record; }) { @@ -209,7 +209,7 @@ export function renameIndexPattern({ }: { oldIndexPatternId: string; newIndexPatternId: string; - state: IndexPatternPrivateState; + state: FormBasedPrivateState; }) { return { ...state, @@ -231,7 +231,7 @@ export function triggerActionOnIndexPatternChange({ }: { indexPatternId: string; layerId: string; - state: IndexPatternPrivateState; + state: FormBasedPrivateState; uiActions: UiActionsStart; }) { const fromDataView = state.layers[layerId]?.indexPatternId; @@ -260,7 +260,7 @@ export function changeLayerIndexPattern({ }: { indexPatternId: string; layerId: string; - state: IndexPatternPrivateState; + state: FormBasedPrivateState; replaceIfPossible?: boolean; storage: IStorageWrapper; indexPatterns: Record; @@ -276,7 +276,7 @@ export function changeLayerIndexPattern({ }; } -function isSingleEmptyLayer(layerMap: IndexPatternPrivateState['layers']) { +function isSingleEmptyLayer(layerMap: FormBasedPrivateState['layers']) { const layers = Object.values(layerMap); return layers.length === 1 && layers[0].columnOrder.length === 0; } diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/mocks.ts b/x-pack/plugins/lens/public/datasources/form_based/mocks.ts similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/mocks.ts rename to x-pack/plugins/lens/public/datasources/form_based/mocks.ts index 7cd3639547e14..c2a85fbf0bac4 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/mocks.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/mocks.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { DragContextState } from '../drag_drop'; +import { DragContextState } from '../../drag_drop'; import { getFieldByNameFactory } from './pure_helpers'; -import type { IndexPattern, IndexPatternField } from '../types'; +import type { IndexPattern, IndexPatternField } from '../../types'; export const createMockedIndexPattern = (someProps?: Partial): IndexPattern => { const fields = [ diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/no_fields_callout.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/no_fields_callout.test.tsx similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/no_fields_callout.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/no_fields_callout.test.tsx diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/no_fields_callout.tsx b/x-pack/plugins/lens/public/datasources/form_based/no_fields_callout.tsx similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/no_fields_callout.tsx rename to x-pack/plugins/lens/public/datasources/form_based/no_fields_callout.tsx diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/__mocks__/index.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/__mocks__/index.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/__mocks__/index.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/__mocks__/index.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions.test.ts similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions.test.ts index c9b3ae608ec76..3dc58b7f1ef6c 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions.test.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions.test.ts @@ -18,8 +18,8 @@ import { } from './definitions'; import { getFieldByNameFactory } from '../pure_helpers'; import { documentField } from '../document_field'; -import { IndexPatternLayer } from '../types'; -import { IndexPattern, IndexPatternField } from '../../types'; +import { FormBasedLayer } from '../types'; +import { IndexPattern, IndexPatternField } from '../../../types'; import { GenericIndexPatternColumn } from '.'; import { DateHistogramIndexPatternColumn } from './definitions/date_histogram'; @@ -83,7 +83,7 @@ const indexPattern = { const baseColumnArgs: { previousColumn: GenericIndexPatternColumn; indexPattern: IndexPattern; - layer: IndexPatternLayer; + layer: FormBasedLayer; field: IndexPatternField; } = { previousColumn: { @@ -105,7 +105,7 @@ const baseColumnArgs: { field: indexPattern.fields[2], }; -const layer: IndexPatternLayer = { +const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['date', 'metric', 'ref'], columns: { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/counter_rate.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/counter_rate.tsx similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/counter_rate.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/counter_rate.tsx index f2c421946bafb..3b89de8e94c51 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/counter_rate.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/counter_rate.tsx @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedIndexPatternColumn, ReferenceBasedIndexPatternColumn } from '../column_types'; -import { IndexPatternLayer } from '../../../types'; +import { FormBasedLayer } from '../../../types'; import { buildLabelFunction, getErrorsForDateReference, @@ -106,7 +106,7 @@ export const counterRateOperation: OperationDefinition< isTransferable: (column, newIndexPattern) => { return hasDateField(newIndexPattern); }, - getErrorMessage: (layer: IndexPatternLayer, columnId: string) => { + getErrorMessage: (layer: FormBasedLayer, columnId: string) => { return combineErrorMessages([ getErrorsForDateReference( layer, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/cumulative_sum.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/cumulative_sum.tsx similarity index 96% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/cumulative_sum.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/cumulative_sum.tsx index 67260672fa66d..339f5e4bc4003 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/cumulative_sum.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/cumulative_sum.tsx @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedIndexPatternColumn, ReferenceBasedIndexPatternColumn } from '../column_types'; -import { IndexPatternLayer } from '../../../types'; +import { FormBasedLayer } from '../../../types'; import { checkForDateHistogram, getErrorsForDateReference, @@ -19,7 +19,7 @@ import { import { OperationDefinition } from '..'; import { getFormatFromPreviousColumn, getFilter, combineErrorMessages } from '../helpers'; import { getDisallowedPreviousShiftMessage } from '../../../time_shift_utils'; -import { DOCUMENT_FIELD_NAME } from '../../../../../common'; +import { DOCUMENT_FIELD_NAME } from '../../../../../../common'; const ofName = buildLabelFunction((name?: string) => { return i18n.translate('xpack.lens.indexPattern.cumulativeSumOf', { @@ -106,7 +106,7 @@ export const cumulativeSumOperation: OperationDefinition< isTransferable: () => { return true; }, - getErrorMessage: (layer: IndexPatternLayer, columnId: string) => { + getErrorMessage: (layer: FormBasedLayer, columnId: string) => { return combineErrorMessages([ getErrorsForDateReference( layer, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/differences.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/differences.tsx similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/differences.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/differences.tsx index 1d76667654cb3..f2c379b5af5c1 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/differences.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/differences.tsx @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedIndexPatternColumn, ReferenceBasedIndexPatternColumn } from '../column_types'; -import { IndexPatternLayer } from '../../../types'; +import { FormBasedLayer } from '../../../types'; import { buildLabelFunction, checkForDateHistogram, @@ -92,7 +92,7 @@ export const derivativeOperation: OperationDefinition< isTransferable: (column, newIndexPattern) => { return hasDateField(newIndexPattern); }, - getErrorMessage: (layer: IndexPatternLayer, columnId: string) => { + getErrorMessage: (layer: FormBasedLayer, columnId: string) => { return combineErrorMessages([ getErrorsForDateReference( layer, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/index.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/index.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/index.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/index.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/moving_average.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/moving_average.tsx similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/moving_average.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/moving_average.tsx index 0fbdd96153a0f..d7b46d09c0f1e 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/moving_average.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/moving_average.tsx @@ -9,9 +9,9 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useState } from 'react'; import { EuiFieldNumber, EuiFormRow } from '@elastic/eui'; -import { useDebounceWithOptions } from '../../../../shared_components'; +import { useDebounceWithOptions } from '../../../../../shared_components'; import { FormattedIndexPatternColumn, ReferenceBasedIndexPatternColumn } from '../column_types'; -import { IndexPatternLayer } from '../../../types'; +import { FormBasedLayer } from '../../../types'; import { buildLabelFunction, checkForDateHistogram, @@ -114,7 +114,7 @@ export const movingAverageOperation: OperationDefinition< isTransferable: (column, newIndexPattern) => { return hasDateField(newIndexPattern); }, - getErrorMessage: (layer: IndexPatternLayer, columnId: string) => { + getErrorMessage: (layer: FormBasedLayer, columnId: string) => { return combineErrorMessages([ getErrorsForDateReference( layer, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/overall_metric.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/overall_metric.test.ts similarity index 93% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/overall_metric.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/overall_metric.test.ts index 178a98074ad8a..901600e90f034 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/overall_metric.test.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/overall_metric.test.ts @@ -6,7 +6,7 @@ */ import { createMockedIndexPattern } from '../../../mocks'; -import type { IndexPatternLayer } from '../../../types'; +import type { FormBasedLayer } from '../../../types'; import { overallAverageOperation, overallMaxOperation, @@ -16,7 +16,7 @@ import { describe('overall_metric', () => { const indexPattern = createMockedIndexPattern(); - let layer: IndexPatternLayer; + let layer: FormBasedLayer; beforeEach(() => { layer = { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/overall_metric.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/overall_metric.tsx similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/overall_metric.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/overall_metric.tsx diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/time_scale.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/time_scale.tsx similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/time_scale.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/time_scale.tsx index 68df34650794d..59eb7fea46233 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/time_scale.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/time_scale.tsx @@ -13,7 +13,7 @@ import type { import { getErrorsForDateReference } from './utils'; import type { OperationDefinition } from '..'; import { combineErrorMessages, getFormatFromPreviousColumn } from '../helpers'; -import { IndexPatternLayer } from '../../../types'; +import { FormBasedLayer } from '../../../types'; import { getDisallowedPreviousShiftMessage } from '../../../time_shift_utils'; type OverallMetricIndexPatternColumn = FormattedIndexPatternColumn & @@ -101,7 +101,7 @@ export const timeScaleOperation: OperationDefinition { return true; }, - getErrorMessage: (layer: IndexPatternLayer, columnId: string) => { + getErrorMessage: (layer: FormBasedLayer, columnId: string) => { return combineErrorMessages([ getErrorsForDateReference( layer, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/utils.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/utils.test.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/utils.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/utils.test.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/utils.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/utils.ts similarity index 90% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/utils.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/utils.ts index 5b33fb0717539..bac4a8940c689 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/utils.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/calculations/utils.ts @@ -9,10 +9,10 @@ import { i18n } from '@kbn/i18n'; import type { AstFunction } from '@kbn/interpreter'; import memoizeOne from 'memoize-one'; import { LayerTypes } from '@kbn/expression-xy-plugin/public'; -import type { IndexPattern } from '../../../../types'; -import type { LayerType } from '../../../../../common'; -import type { TimeScaleUnit } from '../../../../../common/expressions'; -import type { IndexPatternLayer } from '../../../types'; +import type { IndexPattern } from '../../../../../types'; +import { LayerType } from '../../../../../../common'; +import type { TimeScaleUnit } from '../../../../../../common/expressions'; +import type { FormBasedLayer } from '../../../types'; import { adjustTimeScaleLabelSuffix } from '../../time_scale_utils'; import type { ReferenceBasedIndexPatternColumn } from '../column_types'; import { getManagedColumnsFrom, isColumnValidAsReference } from '../../layer_helpers'; @@ -49,7 +49,7 @@ export function checkForDataLayerType(layerType: LayerType, name: string) { /** * Checks whether the current layer includes a date histogram and returns an error otherwise */ -export function checkForDateHistogram(layer: IndexPatternLayer, name: string) { +export function checkForDateHistogram(layer: FormBasedLayer, name: string) { const buckets = layer.columnOrder.filter((colId) => layer.columns[colId].isBucketed); const hasDateHistogram = buckets.some( (colId) => layer.columns[colId].operationType === 'date_histogram' @@ -68,7 +68,7 @@ export function checkForDateHistogram(layer: IndexPatternLayer, name: string) { ]; } -const getFullyManagedColumnIds = memoizeOne((layer: IndexPatternLayer) => { +const getFullyManagedColumnIds = memoizeOne((layer: FormBasedLayer) => { const managedColumnIds = new Set(); Object.entries(layer.columns).forEach(([id, column]) => { if ( @@ -85,7 +85,7 @@ const getFullyManagedColumnIds = memoizeOne((layer: IndexPatternLayer) => { return managedColumnIds; }); -export function checkReferences(layer: IndexPatternLayer, columnId: string) { +export function checkReferences(layer: FormBasedLayer, columnId: string) { const column = layer.columns[columnId] as ReferenceBasedIndexPatternColumn; const errors: string[] = []; @@ -128,11 +128,7 @@ export function checkReferences(layer: IndexPatternLayer, columnId: string) { return errors.length ? errors : undefined; } -export function getErrorsForDateReference( - layer: IndexPatternLayer, - columnId: string, - name: string -) { +export function getErrorsForDateReference(layer: FormBasedLayer, columnId: string, name: string) { const dateErrors = checkForDateHistogram(layer, name) ?? []; const referenceErrors = checkReferences(layer, columnId) ?? []; if (dateErrors.length || referenceErrors.length) { @@ -149,7 +145,7 @@ export function hasDateField(indexPattern: IndexPattern) { * Creates an expression ast for a date based operation (cumulative sum, derivative, moving average, counter rate) */ export function dateBasedOperationToExpression( - layer: IndexPatternLayer, + layer: FormBasedLayer, columnId: string, functionName: string, additionalArgs: Record = {} @@ -180,7 +176,7 @@ export function dateBasedOperationToExpression( * Creates an expression ast for a date based operation (cumulative sum, derivative, moving average, counter rate) */ export function optionallHistogramBasedOperationToExpression( - layer: IndexPatternLayer, + layer: FormBasedLayer, columnId: string, functionName: string, additionalArgs: Record = {} diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/cardinality.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/cardinality.test.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/cardinality.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/cardinality.test.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/cardinality.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/cardinality.tsx similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/cardinality.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/cardinality.tsx diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/column_types.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/column_types.ts similarity index 91% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/column_types.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/column_types.ts index 8af67468f0ac1..a0931a23f4e5a 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/column_types.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/column_types.ts @@ -6,8 +6,8 @@ */ import type { Query } from '@kbn/es-query'; -import type { Operation } from '../../../types'; -import type { TimeScaleUnit } from '../../../../common/expressions'; +import type { Operation } from '../../../../types'; +import type { TimeScaleUnit } from '../../../../../common/expressions'; import type { OperationType } from '.'; export interface BaseIndexPatternColumn extends Operation { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/count.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/count.test.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/count.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/count.test.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/count.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/count.tsx similarity index 96% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/count.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/count.tsx index 1f67eebf3541a..c05b8d415de7e 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/count.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/count.tsx @@ -11,10 +11,10 @@ import { euiThemeVars } from '@kbn/ui-theme'; import { EuiSwitch, EuiText } from '@elastic/eui'; import { AggFunctionsMapping } from '@kbn/data-plugin/public'; import { buildExpressionFunction } from '@kbn/expressions-plugin/public'; -import type { TimeScaleUnit } from '../../../../common/expressions'; -import type { OperationDefinition, ParamEditorProps } from '.'; -import type { FieldBasedIndexPatternColumn, ValueFormatConfig } from './column_types'; -import type { IndexPatternField } from '../../../types'; +import { TimeScaleUnit } from '../../../../../common/expressions'; +import { OperationDefinition, ParamEditorProps } from '.'; +import { FieldBasedIndexPatternColumn, ValueFormatConfig } from './column_types'; +import type { IndexPatternField } from '../../../../types'; import { getInvalidFieldMessage, getFilter, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/date_histogram.test.tsx similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/date_histogram.test.tsx index a437cf63fd873..c08f8703c723f 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/date_histogram.test.tsx @@ -18,8 +18,8 @@ import type { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import { UI_SETTINGS } from '@kbn/data-plugin/public'; import { dataPluginMock, getCalculateAutoTimeExpression } from '@kbn/data-plugin/public/mocks'; import { createMockedIndexPattern } from '../../mocks'; -import type { IndexPatternLayer } from '../../types'; -import type { IndexPattern } from '../../../types'; +import type { FormBasedLayer } from '../../types'; +import type { IndexPattern } from '../../../../types'; import { getFieldByNameFactory } from '../../pure_helpers'; import { act } from 'react-dom/test-utils'; @@ -124,7 +124,7 @@ const defaultOptions = { }; describe('date_histogram', () => { - let layer: IndexPatternLayer; + let layer: FormBasedLayer; const InlineOptions = dateHistogramOperation.paramEditor!; beforeEach(() => { @@ -160,7 +160,7 @@ describe('date_histogram', () => { }, }, }, - } as unknown as IndexPatternLayer; + } as unknown as FormBasedLayer; } describe('buildColumn', () => { @@ -339,7 +339,7 @@ describe('date_histogram', () => { it('should render current value for other index pattern', () => { const updateLayerSpy = jest.fn(); - const secondLayer: IndexPatternLayer = { + const secondLayer: FormBasedLayer = { indexPatternId: '2', columnOrder: ['col2'], columns: { @@ -374,7 +374,7 @@ describe('date_histogram', () => { }); it('should render time interval control set to auto for auto interval', () => { - const thirdLayer: IndexPatternLayer = { + const thirdLayer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -409,7 +409,7 @@ describe('date_histogram', () => { }); it('should allow switching to manual interval', () => { - const thirdLayer: IndexPatternLayer = { + const thirdLayer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -451,7 +451,7 @@ describe('date_histogram', () => { }); it('should allow turning off time range sync', () => { - const thirdLayer: IndexPatternLayer = { + const thirdLayer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -493,7 +493,7 @@ describe('date_histogram', () => { }); it('turns off time range ignore on switching to auto interval', () => { - const thirdLayer: IndexPatternLayer = { + const thirdLayer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -535,7 +535,7 @@ describe('date_histogram', () => { }); it('turns off drop partial bucket on tuning off time range ignore', () => { - const thirdLayer: IndexPatternLayer = { + const thirdLayer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -735,7 +735,7 @@ describe('date_histogram', () => { }); it('should allow the drop of partial buckets', () => { - const thirdLayer: IndexPatternLayer = { + const thirdLayer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/date_histogram.tsx similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/date_histogram.tsx index 8d6b201b2cc19..87261f41338d0 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/date_histogram.tsx @@ -33,8 +33,8 @@ import { updateColumnParam } from '../layer_helpers'; import { OperationDefinition, ParamEditorProps } from '.'; import { FieldBasedIndexPatternColumn } from './column_types'; import { getInvalidFieldMessage, getSafeName } from './helpers'; -import { IndexPatternLayer } from '../../types'; -import { TooltipWrapper } from '../../../shared_components'; +import { FormBasedLayer } from '../../types'; +import { TooltipWrapper } from '../../../../shared_components'; const { isValidInterval } = search.aggs; const autoInterval = 'auto'; @@ -50,7 +50,7 @@ export interface DateHistogramIndexPatternColumn extends FieldBasedIndexPatternC }; } -function getMultipleDateHistogramsErrorMessage(layer: IndexPatternLayer, columnId: string) { +function getMultipleDateHistogramsErrorMessage(layer: FormBasedLayer, columnId: string) { const usesTimeShift = Object.values(layer.columns).some( (col) => col.timeShift && col.timeShift !== '' ); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filter_popover.scss b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.scss similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filter_popover.scss rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.scss diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filter_popover.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.test.tsx similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filter_popover.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.test.tsx index 475761c94ec54..9fbc38732806c 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filter_popover.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.test.tsx @@ -13,7 +13,7 @@ import { createMockedIndexPattern } from '../../../mocks'; import { FilterPopover } from './filter_popover'; import { LabelInput } from '../shared_components'; import { QueryStringInput } from '@kbn/unified-search-plugin/public'; -import { QueryInput } from '../../../../shared_components'; +import { QueryInput } from '../../../../../shared_components'; jest.mock('.', () => ({ isQueryValid: () => true, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filter_popover.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.tsx similarity index 94% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filter_popover.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.tsx index 17314bbc991c0..21a52f46e5c58 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filter_popover.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.tsx @@ -12,8 +12,8 @@ import { EuiPopover, EuiSpacer } from '@elastic/eui'; import type { Query } from '@kbn/es-query'; // Need to keep it separate to make it work Jest mocks in dimension_panel tests // import { QueryInput } from '../../../../shared_components/query_input'; -import { isQueryValid, QueryInput } from '../../../../shared_components'; -import { IndexPattern } from '../../../../types'; +import { isQueryValid, QueryInput } from '../../../../../shared_components'; +import { IndexPattern } from '../../../../../types'; import { FilterValue, defaultLabel } from '.'; import { LabelInput } from '../shared_components'; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.scss b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filters.scss similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.scss rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filters.scss diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filters.test.tsx similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filters.test.tsx index 2b227674c26e9..2264fa8f185fb 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filters.test.tsx @@ -16,7 +16,7 @@ import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import type { FiltersIndexPatternColumn } from '.'; import { filtersOperation } from '..'; -import type { IndexPatternLayer } from '../../../types'; +import type { FormBasedLayer } from '../../../types'; import { createMockedIndexPattern } from '../../../mocks'; import { FilterPopover } from './filter_popover'; @@ -62,7 +62,7 @@ jest.mock('@elastic/eui', () => { }); describe('filters', () => { - let layer: IndexPatternLayer; + let layer: FormBasedLayer; const InlineOptions = filtersOperation.paramEditor!; beforeEach(() => { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filters.tsx similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filters.tsx index 434dbb092bdb0..67f3af575f7db 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filters.tsx @@ -19,8 +19,8 @@ import { DraggableBucketContainer, isQueryValid, NewBucketButton, -} from '../../../../shared_components'; -import { IndexPattern } from '../../../../types'; +} from '../../../../../shared_components'; +import { IndexPattern } from '../../../../../types'; import { updateColumnParam } from '../../layer_helpers'; import type { OperationDefinition } from '..'; import type { BaseIndexPatternColumn } from '../column_types'; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/index.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/index.tsx similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/index.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/index.tsx diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula.scss b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula.scss similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula.scss rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula.scss diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula_editor.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_editor.tsx similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula_editor.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_editor.tsx index 1e9a304ffa8a2..4464b54fb8a32 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula_editor.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_editor.tsx @@ -27,7 +27,7 @@ import { monaco } from '@kbn/monaco'; import classNames from 'classnames'; import { CodeEditor } from '@kbn/kibana-react-plugin/public'; import type { CodeEditorProps } from '@kbn/kibana-react-plugin/public'; -import { TooltipWrapper, useDebounceWithOptions } from '../../../../../shared_components'; +import { TooltipWrapper, useDebounceWithOptions } from '../../../../../../shared_components'; import { ParamEditorProps } from '../..'; import { getManagedColumnsFrom } from '../../../layer_helpers'; import { ErrorWrapper, runASTValidation, tryToParse } from '../validation'; @@ -48,7 +48,7 @@ import { MemoizedFormulaHelp } from './formula_help'; import './formula.scss'; import { FormulaIndexPatternColumn } from '../formula'; import { insertOrReplaceFormulaColumn } from '../parse'; -import { filterByVisibleOperation } from '../util'; +import { filterByVisibleOperation, nonNullable } from '../util'; import { getColumnTimeShiftWarnings, getDateHistogramInterval } from '../../../../time_shift_utils'; function tableHasData( @@ -363,7 +363,7 @@ export function FormulaEditor({ } return newWarnings; }) - .filter((marker) => marker); + .filter(nonNullable); setWarnings(markers.map(({ severity, message }) => ({ severity, message }))); monaco.editor.setModelMarkers(editorModel.current, 'LENS', markers); } diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula_help.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_help.tsx similarity index 86% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula_help.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_help.tsx index 0a1cf746c19f8..8f728bc5d15a2 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula_help.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/formula_help.tsx @@ -21,7 +21,8 @@ import { EuiSpacer, } from '@elastic/eui'; import { Markdown } from '@kbn/kibana-react-plugin/public'; -import type { IndexPattern } from '../../../../../types'; +import { groupBy } from 'lodash'; +import type { IndexPattern } from '../../../../../../types'; import { tinymathFunctions } from '../util'; import { getPossibleFunctions } from './math_completion'; import { hasFunctionFieldArgument } from '../validation'; @@ -193,31 +194,40 @@ max(system.network.in.bytes, reducedTimeRange="30m") items: [], }); - const availableFunctions = getPossibleFunctions(indexPattern); + const { + elasticsearch: esFunction, + calculation: calculationFunction, + math: mathOperations, + comparison: comparisonOperations, + } = useMemo( + () => + groupBy(getPossibleFunctions(indexPattern), (key) => { + if (key in operationDefinitionMap) { + return operationDefinitionMap[key].documentation?.section; + } + if (key in tinymathFunctions) { + return tinymathFunctions[key].section; + } + }), + [operationDefinitionMap, indexPattern] + ); // Es aggs helpGroups[2].items.push( - ...availableFunctions - .filter( - (key) => - key in operationDefinitionMap && - operationDefinitionMap[key].documentation?.section === 'elasticsearch' - ) - .sort() - .map((key) => ({ - label: key, - description: ( - <> -

- {key}({operationDefinitionMap[key].documentation?.signature}) -

- - {operationDefinitionMap[key].documentation?.description ? ( - - ) : null} - - ), - })) + ...esFunction.sort().map((key) => ({ + label: key, + description: ( + <> +

+ {key}({operationDefinitionMap[key].documentation?.signature}) +

+ + {operationDefinitionMap[key].documentation?.description ? ( + + ) : null} + + ), + })) ); helpGroups.push({ @@ -236,31 +246,24 @@ max(system.network.in.bytes, reducedTimeRange="30m") // Calculations aggs helpGroups[3].items.push( - ...availableFunctions - .filter( - (key) => - key in operationDefinitionMap && - operationDefinitionMap[key].documentation?.section === 'calculation' - ) - .sort() - .map((key) => ({ - label: key, - description: ( - <> -

- {key}({operationDefinitionMap[key].documentation?.signature}) -

- - {operationDefinitionMap[key].documentation?.description ? ( - - ) : null} - - ), - checked: - selectedFunction === `${key}: ${operationDefinitionMap[key].displayName}` - ? ('on' as const) - : undefined, - })) + ...calculationFunction.sort().map((key) => ({ + label: key, + description: ( + <> +

+ {key}({operationDefinitionMap[key].documentation?.signature}) +

+ + {operationDefinitionMap[key].documentation?.description ? ( + + ) : null} + + ), + checked: + selectedFunction === `${key}: ${operationDefinitionMap[key].displayName}` + ? ('on' as const) + : undefined, + })) ); helpGroups.push({ @@ -274,22 +277,55 @@ max(system.network.in.bytes, reducedTimeRange="30m") items: [], }); - const tinymathFns = useMemo(() => { - return getPossibleFunctions(indexPattern) - .filter((key) => key in tinymathFunctions) - .sort() - .map((key) => { - const [description, examples] = tinymathFunctions[key].help.split(`\`\`\``); - return { - label: key, - description: description.replace(/\n/g, '\n\n'), - examples: examples ? `\`\`\`${examples}\`\`\`` : '', - }; - }); - }, [indexPattern]); + const mathFns = useMemo(() => { + return mathOperations.sort().map((key) => { + const [description, examples] = tinymathFunctions[key].help.split(`\`\`\``); + return { + label: key, + description: description.replace(/\n/g, '\n\n'), + examples: examples ? `\`\`\`${examples}\`\`\`` : '', + }; + }); + }, [mathOperations]); helpGroups[4].items.push( - ...tinymathFns.map(({ label, description, examples }) => { + ...mathFns.map(({ label, description, examples }) => { + return { + label, + description: ( + <> +

{getFunctionSignatureLabel(label, operationDefinitionMap)}

+ + + + ), + }; + }) + ); + + helpGroups.push({ + label: i18n.translate('xpack.lens.formulaDocumentation.comparisonSection', { + defaultMessage: 'Comparison', + }), + description: i18n.translate('xpack.lens.formulaDocumentation.comparisonSectionDescription', { + defaultMessage: 'These functions are used to perform value comparison.', + }), + items: [], + }); + + const comparisonFns = useMemo(() => { + return comparisonOperations.sort().map((key) => { + const [description, examples] = tinymathFunctions[key].help.split(`\`\`\``); + return { + label: key, + description: description.replace(/\n/g, '\n\n'), + examples: examples ? `\`\`\`${examples}\`\`\`` : '', + }; + }); + }, [comparisonOperations]); + + helpGroups[5].items.push( + ...comparisonFns.map(({ label, description, examples }) => { return { label, description: ( diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/index.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/index.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/index.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/index.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/math_completion.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.test.ts similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/math_completion.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.test.ts index 79e77c3275ea8..76b70ba9a471c 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/math_completion.test.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.test.ts @@ -11,7 +11,7 @@ import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { createMockedIndexPattern } from '../../../../mocks'; import { GenericOperationDefinition } from '../..'; -import type { IndexPatternField, OperationMetadata } from '../../../../../types'; +import type { OperationMetadata, IndexPatternField } from '../../../../../../types'; import { tinymathFunctions } from '../util'; import { getSignatureHelp, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/math_completion.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.ts similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/math_completion.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.ts index 94b8dcc2a9681..0dba9dc993151 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/math_completion.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_completion.ts @@ -22,9 +22,9 @@ import type { } from '@kbn/unified-search-plugin/public'; import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { parseTimeShift } from '@kbn/data-plugin/common'; -import type { IndexPattern } from '../../../../../types'; +import type { IndexPattern } from '../../../../../../types'; import { memoizedGetAvailableOperationsByMetadata } from '../../../operations'; -import { tinymathFunctions, groupArgsByType, unquotedStringRegex } from '../util'; +import { tinymathFunctions, groupArgsByType, unquotedStringRegex, nonNullable } from '../util'; import type { GenericOperationDefinition } from '../..'; import { getFunctionSignatureLabel, getHelpTextContent } from './formula_help'; import { hasFunctionFieldArgument } from '../validation'; @@ -78,7 +78,7 @@ export function getInfoAtZeroIndexedPosition( if (ast.type === 'function') { const [match] = ast.args .map((arg) => getInfoAtZeroIndexedPosition(arg, zeroIndexedPosition, ast)) - .filter((a) => a); + .filter(nonNullable); if (match) { return match; } else if (ast.location) { @@ -297,7 +297,7 @@ function getArgumentSuggestions( const fields = validOperation.operations .filter((op) => op.operationType === operation.type) .map((op) => ('field' in op ? op.field : undefined)) - .filter((field) => field); + .filter(nonNullable); const fieldArg = ast.args[0]; const location = typeof fieldArg !== 'string' && (fieldArg as TinymathVariable).location; let range: monaco.IRange | undefined; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/math_tokenization.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_tokenization.tsx similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/math_tokenization.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/editor/math_tokenization.tsx diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/formula.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula.test.tsx similarity index 90% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/formula.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula.test.tsx index 9c5cf27e60a88..90ece71627f42 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/formula.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula.test.tsx @@ -13,8 +13,8 @@ import { } from '..'; import type { FormulaIndexPatternColumn } from './formula'; import { insertOrReplaceFormulaColumn } from './parse'; -import type { IndexPatternLayer } from '../../../types'; -import { IndexPattern } from '../../../../types'; +import type { FormBasedLayer } from '../../../types'; +import { IndexPattern } from '../../../../../types'; import { tinymathFunctions } from './util'; import { TermsIndexPatternColumn } from '../terms'; import { MovingAverageIndexPatternColumn } from '../calculations'; @@ -69,7 +69,7 @@ const operationDefinitionMap: Record = { }; describe('formula', () => { - let layer: IndexPatternLayer; + let layer: FormBasedLayer; beforeEach(() => { layer = { @@ -894,7 +894,7 @@ describe('formula', () => { formula: string, isBroken = true, columnParams: Partial> = {} - ): IndexPatternLayer { + ): FormBasedLayer { return { columns: { col1: { @@ -1491,6 +1491,23 @@ invalid: " ).toEqual(undefined); }); + it('returns no error if the formula contains comparison operator within the ifelse operation', () => { + const formulas = [ + ...['lt', 'gt', 'lte', 'gte', 'eq'].map((op) => `${op}(5, 1)`), + ...['<', '>', '==', '>=', '<='].map((symbol) => `5 ${symbol} 1`), + ]; + for (const formula of formulas) { + expect( + formulaOperation.getErrorMessage!( + getNewLayerWithFormula(`ifelse(${formula}, 1, 5)`), + 'col1', + indexPattern, + operationDefinitionMap + ) + ).toEqual(undefined); + } + }); + it('returns no error if a math operation is passed to fullReference operations', () => { const formulas = [ 'derivative(7+1)', @@ -1534,6 +1551,8 @@ invalid: " { formula: 'last_value(dest)' }, { formula: 'terms(dest)' }, { formula: 'moving_average(last_value(dest), window=7)', errorFormula: 'last_value(dest)' }, + ...['lt', 'gt', 'lte', 'gte', 'eq'].map((op) => ({ formula: `${op}(5, 1)` })), + ...['<', '>', '==', '>=', '<='].map((symbol) => ({ formula: `5 ${symbol} 1` })), ]; for (const { formula, errorFormula } of formulas) { expect( @@ -1546,7 +1565,7 @@ invalid: " ).toEqual([ `The return value type of the operation ${ errorFormula ?? formula - } is not supported in Formula.`, + } is not supported in Formula`, ]); } }); @@ -1557,8 +1576,14 @@ invalid: " // * field passed // * missing argument const errors = [ - (operation: string) => - `The first argument for ${operation} should be a operation name. Found ()`, + (operation: string) => { + const required = tinymathFunctions[operation].positionalArguments.filter( + ({ optional }) => !optional + ); + return `The operation ${operation} in the Formula is missing ${ + required.length + } arguments: ${required.map(({ name }) => name).join(', ')}`; + }, (operation: string) => `The operation ${operation} has too many arguments`, (operation: string) => `The operation ${operation} does not accept any field as argument`, (operation: string) => { @@ -1573,9 +1598,11 @@ invalid: " .join(', ')}`; }, ]; + + const mathFns = Object.keys(tinymathFunctions); // we'll try to map all of these here in this test - for (const fn of Object.keys(tinymathFunctions)) { - it(`returns an error for the math functions available: ${fn}`, () => { + for (const fn of mathFns) { + it(`[${fn}] returns an error for the math functions available`, () => { const nArgs = tinymathFunctions[fn].positionalArguments; // start with the first 3 types const formulas = [ @@ -1585,14 +1612,22 @@ invalid: " `${fn}(${Array(nArgs.length).fill('bytes').join(', ')})`, ]; // add the fourth check only for those functions with more than 1 arg required + // and check that this first argument is of type number const enableFourthCheck = nArgs.filter( ({ optional, alternativeWhenMissing }) => !optional && !alternativeWhenMissing - ).length > 1; + ).length > 1 && nArgs[0]?.type === 'number'; if (enableFourthCheck) { formulas.push(`${fn}(1)`); } - formulas.forEach((formula, i) => { + const finalFormulas = formulas.map((text) => { + if (tinymathFunctions[fn].outputType !== 'boolean') { + return text; + } + // for comparison functions wrap the existing formula within the ifelse function + return `ifelse(${text}, 1, 0)`; + }); + finalFormulas.forEach((formula, i) => { expect( formulaOperation.getErrorMessage!( getNewLayerWithFormula(formula), @@ -1600,16 +1635,87 @@ invalid: " indexPattern, operationDefinitionMap ) - ).toEqual([errors[i](fn)]); + ).toContain(errors[i](fn)); }); }); } + // comparison tests + for (const fn of mathFns.filter((name) => tinymathFunctions[name].section === 'comparison')) { + if (tinymathFunctions[fn].outputType === 'boolean') { + it(`[${fn}] returns an error about unsupported return type and when partial arguments are passed`, () => { + const formulas = [`${fn}()`, `${fn}(1)`]; + formulas.forEach((formula, nArg) => { + const expectedCount = tinymathFunctions[fn].positionalArguments.length - nArg; + const expectedArgs = ['left', 'right'].slice(nArg).join(', '); + expect( + formulaOperation.getErrorMessage!( + getNewLayerWithFormula(formula), + 'col1', + indexPattern, + operationDefinitionMap + ) + ).toEqual([ + `The return value type of the operation ${formula} is not supported in Formula`, + `The operation ${fn} in the Formula is missing ${expectedCount} arguments: ${expectedArgs}`, + ]); + }); + }); + } else { + const indexReverseMap = { + cond: [0], + left: [1], + right: [2], + all: [0, 1, 2], + }; + it.each` + cond | left | right | expectedFail + ${'1'} | ${'2'} | ${'3'} | ${'cond'} + ${'1 > 1'} | ${'2 > 2'} | ${'3'} | ${'left'} + ${'1 > 1'} | ${'2'} | ${'3 > 3'} | ${'right'} + ${'1'} | ${'2 > 2'} | ${'3 > 3'} | ${'all'} + ${'count()'} | ${'average(bytes)'} | ${'average(bytes)'} | ${'cond'} + ${'count() > 1'} | ${'average(bytes) > 2'} | ${'average(bytes)'} | ${'left'} + ${'count() > 1'} | ${'average(bytes)'} | ${'average(bytes) > 3'} | ${'right'} + ${'count()'} | ${'average(bytes) > 2'} | ${'average(bytes) > 3'} | ${'all'} + `( + `[${fn}] returns an error if $expectedFail argument is/are of the wrong type: ${fn}($cond, $left, $right)`, + ({ + cond, + left, + right, + expectedFail, + }: { + cond: string; + left: string; + right: string; + expectedFail: keyof typeof indexReverseMap; + }) => { + const argsSorted = [cond, left, right]; + expect( + formulaOperation.getErrorMessage!( + getNewLayerWithFormula(`${fn}(${cond}, ${left}, ${right})`), + 'col1', + indexPattern, + operationDefinitionMap + ) + ).toEqual( + indexReverseMap[expectedFail].map((i) => { + const arg = tinymathFunctions[fn].positionalArguments[i]; + const passedValue = />/.test(argsSorted[i]) ? 'boolean' : 'number'; + return `The ${arg.name} argument for the operation ${fn} in the Formula is of the wrong type: ${passedValue} instead of ${arg.type}`; + }) + ); + } + ); + } + } + it('returns an error suggesting to use an alternative function', () => { const formulas = [`clamp(1)`, 'clamp(1, 5)']; const errorsWithSuggestions = [ - 'The operation clamp in the Formula is missing the min argument: use the pick_max operation instead.', - 'The operation clamp in the Formula is missing the max argument: use the pick_min operation instead.', + 'The operation clamp in the Formula is missing the min argument: use the pick_max operation instead', + 'The operation clamp in the Formula is missing the max argument: use the pick_min operation instead', ]; formulas.forEach((formula, i) => { expect( @@ -1648,7 +1754,7 @@ invalid: " operationDefinitionMap ) ).toEqual([ - `The Formula filter of type "lucene" is not compatible with the inner filter of type "kql" from the ${operation} operation.`, + `The Formula filter of type "lucene" is not compatible with the inner filter of type "kql" from the ${operation} operation`, ]); } }); @@ -1668,8 +1774,8 @@ invalid: " operationDefinitionMap ) ).toEqual([ - `The Formula filter of type "lucene" is not compatible with the inner filter of type "kql" from the count operation.`, - `The Formula filter of type "lucene" is not compatible with the inner filter of type "kql" from the sum operation.`, + `The Formula filter of type "lucene" is not compatible with the inner filter of type "kql" from the count operation`, + `The Formula filter of type "lucene" is not compatible with the inner filter of type "kql" from the sum operation`, ]); }); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/formula.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula.tsx similarity index 96% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/formula.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula.tsx index 2715ab96cef0c..9746a25ebf907 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/formula.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula.tsx @@ -8,12 +8,12 @@ import { i18n } from '@kbn/i18n'; import type { BaseIndexPatternColumn, OperationDefinition } from '..'; import type { ReferenceBasedIndexPatternColumn } from '../column_types'; -import type { IndexPattern } from '../../../../types'; +import type { IndexPattern } from '../../../../../types'; import { runASTValidation, tryToParse } from './validation'; import { WrappedFormulaEditor } from './editor'; import { insertOrReplaceFormulaColumn } from './parse'; import { generateFormula } from './generate'; -import { filterByVisibleOperation } from './util'; +import { filterByVisibleOperation, nonNullable } from './util'; import { getManagedColumnsFrom } from '../../layer_helpers'; import { getFilter, isColumnFormatted } from '../helpers'; @@ -77,7 +77,8 @@ export const formulaOperation: OperationDefinition message); + // remove duplicates + return Array.from(new Set(errors.map(({ message }) => message))); } const managedColumns = getManagedColumnsFrom(columnId, layer.columns); @@ -90,7 +91,7 @@ export const formulaOperation: OperationDefinition marker); + .filter(nonNullable); const hasBuckets = layer.columnOrder.some((colId) => layer.columns[colId].isBucketed); const hasOtherMetrics = layer.columnOrder.some((colId) => { const col = layer.columns[colId]; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/formula_public_api.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula_public_api.test.ts similarity index 96% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/formula_public_api.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula_public_api.test.ts index c854595757a0c..4c1ba662d1861 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/formula_public_api.test.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula_public_api.test.ts @@ -10,13 +10,13 @@ import { createFormulaPublicApi, FormulaPublicApi } from './formula_public_api'; import type { DataView } from '@kbn/data-views-plugin/public'; import type { DateHistogramIndexPatternColumn, PersistedIndexPatternLayer } from '../../../types'; -import { convertDataViewIntoLensIndexPattern } from '../../../../data_views_service/loader'; +import { convertDataViewIntoLensIndexPattern } from '../../../../../data_views_service/loader'; jest.mock('./parse', () => ({ insertOrReplaceFormulaColumn: jest.fn().mockReturnValue({}), })); -jest.mock('../../../../data_views_service/loader', () => ({ +jest.mock('../../../../../data_views_service/loader', () => ({ convertDataViewIntoLensIndexPattern: jest.fn((v) => v), })); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/formula_public_api.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula_public_api.ts similarity index 96% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/formula_public_api.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula_public_api.ts index 4085ec931d3a6..231cd82804c8f 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/formula_public_api.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/formula_public_api.ts @@ -6,8 +6,8 @@ */ import type { DataView } from '@kbn/data-views-plugin/public'; -import { convertDataViewIntoLensIndexPattern } from '../../../../data_views_service/loader'; -import type { IndexPattern } from '../../../../types'; +import { convertDataViewIntoLensIndexPattern } from '../../../../../data_views_service/loader'; +import type { IndexPattern } from '../../../../../types'; import type { PersistedIndexPatternLayer } from '../../../types'; import { insertOrReplaceFormulaColumn } from './parse'; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/generate.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/generate.ts similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/generate.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/generate.ts index 189a8d342b903..2315d6d164fc8 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/generate.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/generate.ts @@ -6,14 +6,14 @@ */ import { isObject } from 'lodash'; -import { DOCUMENT_FIELD_NAME } from '../../../../../common'; +import { DOCUMENT_FIELD_NAME } from '../../../../../../common'; import { FieldBasedIndexPatternColumn, GenericOperationDefinition, GenericIndexPatternColumn, } from '..'; import { BaseIndexPatternColumn, ReferenceBasedIndexPatternColumn } from '../column_types'; -import { IndexPatternLayer } from '../../../types'; +import { FormBasedLayer } from '../../../types'; import { unquotedStringRegex } from './util'; import { isColumnOfType } from '../helpers'; import { StaticValueIndexPatternColumn } from '../static_value'; @@ -37,7 +37,7 @@ export function getSafeFieldName({ export function generateFormula( previousColumn: ReferenceBasedIndexPatternColumn | GenericIndexPatternColumn, - layer: IndexPatternLayer, + layer: FormBasedLayer, previousFormula: string, operationDefinitionMap: Record | undefined ) { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/index.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/index.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/index.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/index.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/math.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/math.test.ts similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/math.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/math.test.ts index fdf4cc98c59d7..60fc7d5b72632 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/math.test.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/math.test.ts @@ -6,11 +6,11 @@ */ import { TinymathAST } from '@kbn/tinymath'; -import { IndexPattern } from '../../../../types'; -import { IndexPatternLayer } from '../../../types'; +import { IndexPattern } from '../../../../../types'; +import { FormBasedLayer } from '../../../types'; import { MathIndexPatternColumn, mathOperation } from './math'; -function createLayerWithMathColumn(tinymathAst: string | TinymathAST): IndexPatternLayer { +function createLayerWithMathColumn(tinymathAst: string | TinymathAST): FormBasedLayer { return { columnOrder: ['myColumnId'], columns: { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/math.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/math.tsx similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/math.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/math.tsx index c4e0cbed627f2..de197c2de8189 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/math.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/math.tsx @@ -8,7 +8,7 @@ import type { TinymathAST } from '@kbn/tinymath'; import { OperationDefinition } from '..'; import { ValueFormatConfig, ReferenceBasedIndexPatternColumn } from '../column_types'; -import { IndexPattern } from '../../../../types'; +import { IndexPattern } from '../../../../../types'; export interface MathIndexPatternColumn extends ReferenceBasedIndexPatternColumn { operationType: 'math'; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/math_examples.md b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/math_examples.md similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/math_examples.md rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/math_examples.md diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/mocks/operation_mocks.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/mocks/operation_mocks.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/mocks/operation_mocks.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/mocks/operation_mocks.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/parse.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/parse.ts similarity index 95% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/parse.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/parse.ts index 10789e181dcb9..ea204295500d4 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/parse.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/parse.ts @@ -8,14 +8,14 @@ import { i18n } from '@kbn/i18n'; import { isObject } from 'lodash'; import type { TinymathAST, TinymathVariable, TinymathLocation } from '@kbn/tinymath'; -import type { IndexPattern } from '../../../../types'; +import type { IndexPattern } from '../../../../../types'; import { OperationDefinition, GenericOperationDefinition, GenericIndexPatternColumn, operationDefinitionMap, } from '..'; -import type { IndexPatternLayer } from '../../../types'; +import type { FormBasedLayer } from '../../../types'; import { mathOperation } from './math'; import { documentField } from '../../../document_field'; import { runASTValidation, shouldHaveFieldArgument, tryToParse } from './validation'; @@ -25,6 +25,7 @@ import { getOperationParams, groupArgsByType, mergeWithGlobalFilters, + nonNullable, } from './util'; import { FormulaIndexPatternColumn, isFormulaIndexPatternColumn } from './formula'; import { getColumnOrder } from '../../layer_helpers'; @@ -36,7 +37,7 @@ export function getManagedId(mainId: string, index: number) { function parseAndExtract( text: string, - layer: IndexPatternLayer, + layer: FormBasedLayer, columnId: string, indexPattern: IndexPattern, operations: Record, @@ -72,7 +73,7 @@ function extractColumns( idPrefix: string, operations: Record, ast: TinymathAST, - layer: IndexPatternLayer, + layer: FormBasedLayer, indexPattern: IndexPattern, label: string ): Array<{ column: GenericIndexPatternColumn; location?: TinymathLocation }> { @@ -89,9 +90,9 @@ function extractColumns( const nodeOperation = operations[node.name]; if (!nodeOperation) { // it's a regular math node - const consumedArgs = node.args - .map(parseNode) - .filter((n) => typeof n !== 'undefined' && n !== null) as Array; + const consumedArgs = node.args.map(parseNode).filter(nonNullable) as Array< + number | TinymathVariable + >; return { ...node, args: consumedArgs, @@ -226,7 +227,7 @@ const getEmptyColumnsWithFormulaMeta = (): { function generateFormulaColumns( id: string, column: FormulaIndexPatternColumn, - layer: IndexPatternLayer, + layer: FormBasedLayer, { indexPattern, operations = operationDefinitionMap }: ExpandColumnProperties ) { const { columns, meta } = getEmptyColumnsWithFormulaMeta(); @@ -273,7 +274,7 @@ function generateFormulaColumns( export function insertOrReplaceFormulaColumn( id: string, column: FormulaIndexPatternColumn, - baseLayer: IndexPatternLayer, + baseLayer: FormBasedLayer, params: ExpandColumnProperties ) { const layer = { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/types.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/types.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/types.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/types.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/util.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/util.ts similarity index 73% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/util.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/util.ts index d66bac4cc8719..4c310b5efa5d3 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/util.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/util.ts @@ -114,12 +114,16 @@ function getTypeI18n(type: string) { if (type === 'string') { return i18n.translate('xpack.lens.formula.string', { defaultMessage: 'string' }); } + if (type === 'boolean') { + return i18n.translate('xpack.lens.formula.boolean', { defaultMessage: 'boolean' }); + } return ''; } export const tinymathFunctions: Record< string, { + section: 'math' | 'comparison'; positionalArguments: Array<{ name: string; optional?: boolean; @@ -129,9 +133,13 @@ export const tinymathFunctions: Record< }>; // Help is in Markdown format help: string; + // When omitted defaults to "number". + // Used for comparison functions return type + outputType?: string; } > = { add: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.left', { defaultMessage: 'left' }), @@ -158,6 +166,7 @@ Example: Offset count by a static value }), }, subtract: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.left', { defaultMessage: 'left' }), @@ -179,6 +188,7 @@ Example: Calculate the range of a field }), }, multiply: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.left', { defaultMessage: 'left' }), @@ -203,6 +213,7 @@ Example: Calculate price after constant tax rate }), }, divide: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.left', { defaultMessage: 'left' }), @@ -226,6 +237,7 @@ Example: \`divide(sum(bytes), 2)\` }), }, abs: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -241,6 +253,7 @@ Example: Calculate average distance to sea level \`abs(average(altitude))\` }), }, cbrt: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -257,6 +270,7 @@ Example: Calculate side length from volume }), }, ceil: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -273,6 +287,7 @@ Example: Round up price to the next dollar }), }, clamp: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -305,6 +320,7 @@ clamp( }), }, cube: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -321,6 +337,7 @@ Example: Calculate volume from side length }), }, exp: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -338,6 +355,7 @@ Example: Calculate the natural exponential function }), }, fix: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -354,6 +372,7 @@ Example: Rounding towards zero }), }, floor: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -370,6 +389,7 @@ Example: Round down a price }), }, log: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -395,6 +415,7 @@ log(sum(bytes), 2) }), }, mod: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -415,6 +436,7 @@ Example: Calculate last three digits of a value }), }, pow: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -435,6 +457,7 @@ Example: Calculate volume based on side length }), }, round: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -460,6 +483,7 @@ round(sum(bytes), 2) }), }, sqrt: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -476,6 +500,7 @@ Example: Calculate side length based on area }), }, square: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -492,6 +517,7 @@ Example: Calculate area based on side length }), }, pick_max: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.left', { defaultMessage: 'left' }), @@ -512,6 +538,7 @@ Example: Find the maximum between two fields averages }), }, pick_min: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.left', { defaultMessage: 'left' }), @@ -532,6 +559,7 @@ Example: Find the minimum between two fields averages }), }, defaults: { + section: 'math', positionalArguments: [ { name: i18n.translate('xpack.lens.formula.value', { defaultMessage: 'value' }), @@ -548,11 +576,170 @@ Returns a default numeric value when value is null. Example: Return -1 when a field has no data \`defaults(average(bytes), -1)\` +`, + }), + }, + lt: { + section: 'comparison', + positionalArguments: [ + { + name: i18n.translate('xpack.lens.formula.left', { defaultMessage: 'left' }), + type: getTypeI18n('number'), + }, + { + name: i18n.translate('xpack.lens.formula.right', { defaultMessage: 'right' }), + type: getTypeI18n('number'), + }, + ], + outputType: getTypeI18n('boolean'), + help: i18n.translate('xpack.lens.formula.ltFunction.markdown', { + defaultMessage: ` +Performs a lower than comparison between two values. +To be used as condition for \`ifelse\` comparison function. +Also works with \`<\` symbol. + +Example: Returns true if the average of bytes is lower than the average amount of memory +\`average(bytes) <= average(memory)\` + +Example: \`lt(average(bytes), 1000)\` + `, + }), + }, + gt: { + section: 'comparison', + positionalArguments: [ + { + name: i18n.translate('xpack.lens.formula.left', { defaultMessage: 'left' }), + type: getTypeI18n('number'), + }, + { + name: i18n.translate('xpack.lens.formula.right', { defaultMessage: 'right' }), + type: getTypeI18n('number'), + }, + ], + outputType: getTypeI18n('boolean'), + help: i18n.translate('xpack.lens.formula.gtFunction.markdown', { + defaultMessage: ` +Performs a greater than comparison between two values. +To be used as condition for \`ifelse\` comparison function. +Also works with \`>\` symbol. + +Example: Returns true if the average of bytes is greater than the average amount of memory +\`average(bytes) > average(memory)\` + +Example: \`gt(average(bytes), 1000)\` + `, + }), + }, + eq: { + section: 'comparison', + positionalArguments: [ + { + name: i18n.translate('xpack.lens.formula.left', { defaultMessage: 'left' }), + type: getTypeI18n('number'), + }, + { + name: i18n.translate('xpack.lens.formula.right', { defaultMessage: 'right' }), + type: getTypeI18n('number'), + }, + ], + outputType: getTypeI18n('boolean'), + help: i18n.translate('xpack.lens.formula.eqFunction.markdown', { + defaultMessage: ` +Performs an equality comparison between two values. +To be used as condition for \`ifelse\` comparison function. +Also works with \`==\` symbol. + +Example: Returns true if the average of bytes is exactly the same amount of average memory +\`average(bytes) == average(memory)\` + +Example: \`eq(sum(bytes), 1000000)\` + `, + }), + }, + lte: { + section: 'comparison', + positionalArguments: [ + { + name: i18n.translate('xpack.lens.formula.left', { defaultMessage: 'left' }), + type: getTypeI18n('number'), + }, + { + name: i18n.translate('xpack.lens.formula.right', { defaultMessage: 'right' }), + type: getTypeI18n('number'), + }, + ], + outputType: getTypeI18n('boolean'), + help: i18n.translate('xpack.lens.formula.lteFunction.markdown', { + defaultMessage: ` +Performs a lower than or equal comparison between two values. +To be used as condition for \`ifelse\` comparison function. +Also works with \`<=\` symbol. + +Example: Returns true if the average of bytes is lower than or equal to the average amount of memory +\`average(bytes) <= average(memory)\` + +Example: \`lte(average(bytes), 1000)\` + `, + }), + }, + gte: { + section: 'comparison', + positionalArguments: [ + { + name: i18n.translate('xpack.lens.formula.left', { defaultMessage: 'left' }), + type: getTypeI18n('number'), + }, + { + name: i18n.translate('xpack.lens.formula.right', { defaultMessage: 'right' }), + type: getTypeI18n('number'), + }, + ], + outputType: getTypeI18n('boolean'), + help: i18n.translate('xpack.lens.formula.gteFunction.markdown', { + defaultMessage: ` +Performs a greater than comparison between two values. +To be used as condition for \`ifelse\` comparison function. +Also works with \`>=\` symbol. + +Example: Returns true if the average of bytes is greater than or equal to the average amount of memory +\`average(bytes) >= average(memory)\` + +Example: \`gte(average(bytes), 1000)\` + `, + }), + }, + ifelse: { + section: 'comparison', + positionalArguments: [ + { + name: i18n.translate('xpack.lens.formula.condition', { defaultMessage: 'condition' }), + type: getTypeI18n('boolean'), + }, + { + name: i18n.translate('xpack.lens.formula.left', { defaultMessage: 'left' }), + type: getTypeI18n('number'), + }, + { + name: i18n.translate('xpack.lens.formula.right', { defaultMessage: 'right' }), + type: getTypeI18n('number'), + }, + ], + help: i18n.translate('xpack.lens.formula.ifElseFunction.markdown', { + defaultMessage: ` +Returns a value depending on whether the element of condition is true or false. + +Example: Average revenue per customer but in some cases customer id is not provided which counts as additional customer +\`sum(total)/(unique_count(customer_id) + ifelse( count() > count(kql='customer_id:*'), 1, 0))\` `, }), }, }; +export function nonNullable(v: T): v is NonNullable { + return v != null; +} + export function isMathNode(node: TinymathAST | string) { return isObject(node) && node.type === 'function' && tinymathFunctions[node.name]; } @@ -562,7 +749,7 @@ export function findMathNodes(root: TinymathAST | string): TinymathFunction[] { if (!isObject(node) || node.type !== 'function' || !isMathNode(node)) { return []; } - return [node, ...node.args.flatMap(flattenMathNodes)].filter(Boolean); + return [node, ...node.args.flatMap(flattenMathNodes)].filter(nonNullable); } return flattenMathNodes(root); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/validation.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/validation.ts similarity index 89% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/validation.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/validation.ts index a7ffc57a2361e..1601e53fef33d 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/validation.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/validation.ts @@ -19,6 +19,7 @@ import { getValueOrName, groupArgsByType, isMathNode, + nonNullable, tinymathFunctions, } from './util'; @@ -27,8 +28,8 @@ import type { GenericIndexPatternColumn, GenericOperationDefinition, } from '..'; -import type { IndexPatternLayer } from '../../../types'; -import type { IndexPattern } from '../../../../types'; +import type { FormBasedLayer } from '../../../types'; +import type { IndexPattern } from '../../../../../types'; import type { TinymathNodeTypes } from './types'; interface ValidationErrors { @@ -45,6 +46,10 @@ interface ValidationErrors { message: string; type: { operation: string; params: string }; }; + wrongTypeArgument: { + message: string; + type: { operation: string; name: string; type: string; expectedType: string }; + }; wrongFirstArgument: { message: string; type: { operation: string; type: string; argument: string | number }; @@ -109,6 +114,26 @@ export interface ErrorWrapper { severity?: 'error' | 'warning'; } +function getNodeLocation(node: TinymathFunction): TinymathLocation[] { + return [node.location].filter(nonNullable); +} + +function getArgumentType(arg: TinymathAST, operations: Record) { + if (!isObject(arg)) { + return typeof arg; + } + if (arg.type === 'function') { + if (tinymathFunctions[arg.name]) { + return tinymathFunctions[arg.name].outputType ?? 'number'; + } + // Assume it's a number for now + if (operations[arg.name]) { + return 'number'; + } + } + // leave for now other argument types +} + export function isParsingError(message: string) { return message.includes('Failed to parse expression'); } @@ -118,7 +143,7 @@ function findFunctionNodes(root: TinymathAST | string): TinymathFunction[] { if (!isObject(node) || node.type !== 'function') { return []; } - return [node, ...node.args.flatMap(flattenFunctionNodes)].filter(Boolean); + return [node, ...node.args.flatMap(flattenFunctionNodes)].filter(nonNullable); } return flattenFunctionNodes(root); @@ -132,14 +157,15 @@ export function hasInvalidOperations( return { // avoid duplicates names: Array.from(new Set(nodes.map(({ name }) => name))), - locations: nodes.map(({ location }) => location).filter((a) => a) as TinymathLocation[], + locations: nodes.map(({ location }) => location).filter(nonNullable), }; } export const getRawQueryValidationError = (text: string, operations: Record) => { // try to extract the query context here const singleLine = text.split('\n').join(''); - const allArgs = singleLine.split(',').filter((args) => /(kql|lucene)/.test(args)); + const languagesRegexp = /(kql|lucene)/; + const allArgs = singleLine.split(',').filter((args) => languagesRegexp.test(args)); // check for the presence of a valid ES operation const containsOneValidOperation = Object.keys(operations).some((operation) => singleLine.includes(operation) @@ -153,7 +179,7 @@ export const getRawQueryValidationError = (text: string, operations: Record - arg.split('count').filter((subArg) => /(kql|lucene)/.test(subArg)) + arg.split('count').filter((subArg) => languagesRegexp.test(subArg)) ); const [kqlQueries, luceneQueries] = partition(flattenArgs, (arg) => /kql/.test(arg)); const errors = []; @@ -260,6 +286,18 @@ function getMessageFromId({ values: { operation: out.operation, params: out.params }, }); break; + case 'wrongTypeArgument': + message = i18n.translate('xpack.lens.indexPattern.formulaExpressionWrongTypeArgument', { + defaultMessage: + 'The {name} argument for the operation {operation} in the Formula is of the wrong type: {type} instead of {expectedType}', + values: { + operation: out.operation, + name: out.name, + type: out.type, + expectedType: out.expectedType, + }, + }); + break; case 'duplicateArgument': message = i18n.translate('xpack.lens.indexPattern.formulaOperationDuplicateParams', { defaultMessage: @@ -332,21 +370,20 @@ function getMessageFromId({ break; case 'wrongReturnedType': message = i18n.translate('xpack.lens.indexPattern.formulaOperationWrongReturnedType', { - defaultMessage: - 'The return value type of the operation {text} is not supported in Formula.', + defaultMessage: 'The return value type of the operation {text} is not supported in Formula', values: { text: out.text }, }); break; case 'filtersTypeConflict': message = i18n.translate('xpack.lens.indexPattern.formulaOperationFiltersTypeConflicts', { defaultMessage: - 'The Formula filter of type "{outerType}" is not compatible with the inner filter of type "{innerType}" from the {operation} operation.', + 'The Formula filter of type "{outerType}" is not compatible with the inner filter of type "{innerType}" from the {operation} operation', values: { operation: out.operation, outerType: out.outerType, innerType: out.innerType }, }); break; case 'useAlternativeFunction': message = i18n.translate('xpack.lens.indexPattern.formulaUseAlternative', { - defaultMessage: `The operation {operation} in the Formula is missing the {params} argument: use the {alternativeFn} operation instead.`, + defaultMessage: `The operation {operation} in the Formula is missing the {params} argument: use the {alternativeFn} operation instead`, values: { operation: out.operation, params: out.params, alternativeFn: out.alternativeFn }, }); break; @@ -397,13 +434,14 @@ export function tryToParse( export function runASTValidation( ast: TinymathAST, - layer: IndexPatternLayer, + layer: FormBasedLayer, indexPattern: IndexPattern, operations: Record, currentColumn: GenericIndexPatternColumn ) { return [ ...checkMissingVariableOrFunctions(ast, layer, indexPattern, operations), + ...checkTopNodeReturnType(ast), ...runFullASTValidation(ast, layer, indexPattern, operations, currentColumn), ]; } @@ -426,7 +464,7 @@ function checkVariableEdgeCases(ast: TinymathAST, missingVariables: Set) function checkMissingVariableOrFunctions( ast: TinymathAST, - layer: IndexPatternLayer, + layer: FormBasedLayer, indexPattern: IndexPattern, operations: Record ): ErrorWrapper[] { @@ -548,7 +586,7 @@ function validateFiltersArguments( innerType, outerType, }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } @@ -574,7 +612,7 @@ function validateNameArguments( operation: node.name, params: missingParams.map(({ name }) => name).join(', '), }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } @@ -587,7 +625,7 @@ function validateNameArguments( operation: node.name, params: wrongTypeParams.map(({ name }) => name).join(', '), }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } @@ -600,7 +638,7 @@ function validateNameArguments( operation: node.name, params: duplicateParams.join(', '), }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } @@ -614,16 +652,37 @@ function validateNameArguments( getMessageFromId({ messageId: 'tooManyQueries', values: {}, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } return errors; } +const DEFAULT_RETURN_TYPE = 'number'; +function checkTopNodeReturnType(ast: TinymathAST): ErrorWrapper[] { + if ( + isObject(ast) && + ast.type === 'function' && + ast.text && + (tinymathFunctions[ast.name]?.outputType || DEFAULT_RETURN_TYPE) !== DEFAULT_RETURN_TYPE + ) { + return [ + getMessageFromId({ + messageId: 'wrongReturnedType', + values: { + text: ast.text, + }, + locations: getNodeLocation(ast), + }), + ]; + } + return []; +} + function runFullASTValidation( ast: TinymathAST, - layer: IndexPatternLayer, + layer: FormBasedLayer, indexPattern: IndexPattern, operations: Record, currentColumn?: GenericIndexPatternColumn @@ -645,7 +704,7 @@ function runFullASTValidation( const [firstArg] = node?.args || []; if (!nodeOperation) { - errors.push(...validateMathNodes(node, missingVariablesSet)); + errors.push(...validateMathNodes(node, missingVariablesSet, operations)); // carry on with the validation for all the functions within the math operation if (functions?.length) { return errors.concat(functions.flatMap((fn) => validateNode(fn))); @@ -664,7 +723,7 @@ function runFullASTValidation( }), argument: `math operation`, }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } else { @@ -683,7 +742,7 @@ function runFullASTValidation( defaultMessage: 'no field', }), }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } @@ -716,7 +775,7 @@ function runFullASTValidation( values: { operation: node.name, }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } else { @@ -742,7 +801,8 @@ function runFullASTValidation( // In general this should be handled down the Esaggs route rather than here const isFirstArgumentNotValid = Boolean( !isArgumentValidType(firstArg, 'function') || - (isMathNode(firstArg) && validateMathNodes(firstArg, missingVariablesSet).length) + (isMathNode(firstArg) && + validateMathNodes(firstArg, missingVariablesSet, operations).length) ); // First field has a special handling if (isFirstArgumentNotValid) { @@ -760,7 +820,7 @@ function runFullASTValidation( defaultMessage: 'no operation', }), }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } @@ -786,7 +846,7 @@ function runFullASTValidation( values: { operation: node.name, }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } else { @@ -946,22 +1006,27 @@ export function isArgumentValidType(arg: TinymathAST | string, type: TinymathNod return isObject(arg) && arg.type === type; } -export function validateMathNodes(root: TinymathAST, missingVariableSet: Set) { +export function validateMathNodes( + root: TinymathAST, + missingVariableSet: Set, + operations: Record +) { const mathNodes = findMathNodes(root); const errors: ErrorWrapper[] = []; mathNodes.forEach((node: TinymathFunction) => { const { positionalArguments } = tinymathFunctions[node.name]; + const mandatoryArguments = positionalArguments.filter(({ optional }) => !optional); if (!node.args.length) { // we can stop here return errors.push( getMessageFromId({ - messageId: 'wrongFirstArgument', + messageId: 'missingMathArgument', values: { operation: node.name, - type: 'operation', - argument: `()`, + count: mandatoryArguments.length, + params: mandatoryArguments.map(({ name }) => name).join(', '), }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } @@ -973,12 +1038,12 @@ export function validateMathNodes(root: TinymathAST, missingVariableSet: Set { const arg = node.args[index]; if (arg != null && typeof arg !== 'number') { @@ -992,12 +1057,11 @@ export function validateMathNodes(root: TinymathAST, missingVariableSet: Set !optional); // if there is only 1 mandatory arg, this is already handled by the wrongFirstArgument check if (mandatoryArguments.length > 1 && node.args.length < mandatoryArguments.length) { const missingArgs = mandatoryArguments.filter((_, i) => node.args[i] == null); @@ -1020,7 +1084,7 @@ export function validateMathNodes(root: TinymathAST, missingVariableSet: Set name).join(', '), }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } @@ -1035,11 +1099,37 @@ export function validateMathNodes(root: TinymathAST, missingVariableSet: Set { + const arg = node.args[index]; + if (arg != null) { + const argType = getArgumentType(arg, operations); + if (argType && argType !== type) { + return index; + } + } + }) + .filter(nonNullable); + for (const wrongTypeArgumentIndex of wrongTypeArgumentIndexes) { + const arg = node.args[wrongTypeArgumentIndex]; + errors.push( + getMessageFromId({ + messageId: 'wrongTypeArgument', + values: { + operation: node.name, + name: positionalArguments[wrongTypeArgumentIndex].name, + type: getArgumentType(arg, operations) || 'number', + expectedType: positionalArguments[wrongTypeArgumentIndex].type || '', + }, + locations: getNodeLocation(node), + }) + ); + } }); return errors; } @@ -1073,7 +1163,7 @@ function validateFieldArguments( supported: 1, text: (fields as TinymathVariable[]).map(({ text }) => text).join(', '), }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } @@ -1085,7 +1175,7 @@ function validateFieldArguments( values: { text: node.text ?? `${node.name}(${getValueOrName(firstArg)})`, }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } @@ -1101,7 +1191,7 @@ function validateFieldArguments( defaultMessage: 'field', }), }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } @@ -1133,7 +1223,7 @@ function validateFunctionArguments( defaultMessage: 'metric', }), }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } else { @@ -1146,7 +1236,7 @@ function validateFunctionArguments( supported: requiredFunctions, text: (esOperations as TinymathFunction[]).map(({ text }) => text).join(', '), }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } @@ -1164,7 +1254,7 @@ function validateFunctionArguments( type, text: (mathOperations as TinymathFunction[]).map(({ text }) => text).join(', '), }, - locations: node.location ? [node.location] : [], + locations: getNodeLocation(node), }) ); } diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/get_group_by_key.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/get_group_by_key.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/get_group_by_key.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/get_group_by_key.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/helpers.test.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/helpers.test.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/helpers.tsx similarity index 96% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/helpers.tsx index 868d5e2557e49..32d39f9527ef4 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/helpers.tsx @@ -6,14 +6,14 @@ */ import { i18n } from '@kbn/i18n'; -import type { IndexPattern, IndexPatternField } from '../../../types'; +import type { IndexPattern, IndexPatternField } from '../../../../types'; import { GenericIndexPatternColumn, operationDefinitionMap } from '.'; import { FieldBasedIndexPatternColumn, FormattedIndexPatternColumn, ReferenceBasedIndexPatternColumn, } from './column_types'; -import type { IndexPatternLayer } from '../../types'; +import type { FormBasedLayer } from '../../types'; import { hasField } from '../../pure_utils'; export function getInvalidFieldMessage( @@ -132,8 +132,8 @@ export function isColumnOfType( export const isColumn = ( setter: | GenericIndexPatternColumn - | IndexPatternLayer - | ((prevLayer: IndexPatternLayer) => IndexPatternLayer) + | FormBasedLayer + | ((prevLayer: FormBasedLayer) => FormBasedLayer) ): setter is GenericIndexPatternColumn => { return 'operationType' in setter; }; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/index.ts similarity index 95% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/index.ts index bde67ea14a488..5253267b286cd 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/index.ts @@ -55,17 +55,17 @@ import { IndexPatternField, OperationMetadata, ParamEditorCustomProps, -} from '../../../types'; +} from '../../../../types'; import type { BaseIndexPatternColumn, IncompleteColumn, GenericIndexPatternColumn, ReferenceBasedIndexPatternColumn, } from './column_types'; -import { DataViewDragDropOperation, IndexPatternLayer } from '../../types'; -import { DateRange, LayerType } from '../../../../common'; +import { DataViewDragDropOperation, FormBasedLayer } from '../../types'; +import { DateRange, LayerType } from '../../../../../common'; import { rangeOperation } from './ranges'; -import { IndexPatternDimensionEditorProps, OperationSupportMatrix } from '../../dimension_panel'; +import { FormBasedDimensionEditorProps, OperationSupportMatrix } from '../../dimension_panel'; import type { OriginalColumn } from '../../to_expression'; import { ReferenceEditorProps } from '../../dimension_panel/reference_editor'; @@ -174,10 +174,10 @@ export { staticValueOperation } from './static_value'; */ export interface ParamEditorProps< C, - U = IndexPatternLayer | ((prevLayer: IndexPatternLayer) => IndexPatternLayer) + U = FormBasedLayer | ((prevLayer: FormBasedLayer) => FormBasedLayer) > { currentColumn: C; - layer: IndexPatternLayer; + layer: FormBasedLayer; paramEditorUpdater: (setter: U) => void; ReferenceEditor?: (props: ReferenceEditorProps) => JSX.Element | null; toggleFullscreen: () => void; @@ -195,7 +195,7 @@ export interface ParamEditorProps< fieldFormats: FieldFormatsStart; unifiedSearch: UnifiedSearchPublicPluginStart; dataViews: DataViewsPublicPluginStart; - activeData?: IndexPatternDimensionEditorProps['activeData']; + activeData?: FormBasedDimensionEditorProps['activeData']; operationDefinitionMap: Record; paramEditorCustomProps?: ParamEditorCustomProps; existingFields: Record>; @@ -203,20 +203,18 @@ export interface ParamEditorProps< } export interface FieldInputProps { - layer: IndexPatternLayer; + layer: FormBasedLayer; selectedColumn?: C; columnId: string; indexPattern: IndexPattern; - updateLayer: ( - setter: IndexPatternLayer | ((prevLayer: IndexPatternLayer) => IndexPatternLayer) - ) => void; + updateLayer: (setter: FormBasedLayer | ((prevLayer: FormBasedLayer) => FormBasedLayer)) => void; onDeleteColumn?: () => void; currentFieldIsInvalid: boolean; incompleteField: IncompleteColumn['sourceField'] | null; incompleteOperation: IncompleteColumn['operationType']; incompleteParams: Omit; - dimensionGroups: IndexPatternDimensionEditorProps['dimensionGroups']; - groupId: IndexPatternDimensionEditorProps['groupId']; + dimensionGroups: FormBasedDimensionEditorProps['dimensionGroups']; + groupId: FormBasedDimensionEditorProps['groupId']; /** * indexPatternId -> fieldName -> boolean */ @@ -271,7 +269,7 @@ interface BaseOperationDefinitionProps< * Based on the current column and the other updated columns, this function has to * return an updated column. If not implemented, the `id` function is used instead. */ - onOtherColumnChanged?: (layer: IndexPatternLayer, thisColumnId: string) => C; + onOtherColumnChanged?: (layer: FormBasedLayer, thisColumnId: string) => C; /** * React component for operation specific settings shown in the flyout editor */ @@ -303,7 +301,7 @@ interface BaseOperationDefinitionProps< */ getDisabledStatus?: ( indexPattern: IndexPattern, - layer: IndexPatternLayer, + layer: FormBasedLayer, layerType?: LayerType ) => string | undefined; /** @@ -313,7 +311,7 @@ interface BaseOperationDefinitionProps< * - Missing references */ getErrorMessage?: ( - layer: IndexPatternLayer, + layer: FormBasedLayer, columnId: string, indexPattern: IndexPattern, operationDefinitionMap?: Record @@ -329,7 +327,7 @@ interface BaseOperationDefinitionProps< core: CoreStart, frame: FrameDatasourceAPI, layerId: string - ) => Promise; + ) => Promise; }; } > @@ -453,7 +451,7 @@ interface BaseOperationDefinitionProps< } interface BaseBuildColumnArgs { - layer: IndexPatternLayer; + layer: FormBasedLayer; indexPattern: IndexPattern; } @@ -499,7 +497,7 @@ interface FieldlessOperationDefinition column: C, columnId: string, indexPattern: IndexPattern, - layer: IndexPatternLayer, + layer: FormBasedLayer, uiSettings: IUiSettingsClient ) => ExpressionAstFunction; } @@ -556,7 +554,7 @@ interface FieldBasedOperationDefinition @@ -568,7 +566,7 @@ interface FieldBasedOperationDefinition @@ -584,7 +582,7 @@ interface FieldBasedOperationDefinition Promise; + ) => Promise; }; } > @@ -652,7 +650,7 @@ interface FullReferenceOperationDefinition { * A chain of expression functions which will transform the table */ toExpression: ( - layer: IndexPatternLayer, + layer: FormBasedLayer, columnId: string, indexPattern: IndexPattern ) => ExpressionAstFunction[]; @@ -680,7 +678,7 @@ interface ManagedReferenceOperationDefinition * A chain of expression functions which will transform the table */ toExpression: ( - layer: IndexPatternLayer, + layer: FormBasedLayer, columnId: string, indexPattern: IndexPattern ) => ExpressionAstFunction[]; @@ -689,11 +687,11 @@ interface ManagedReferenceOperationDefinition * root level */ createCopy: ( - layers: Record, + layers: Record, source: DataViewDragDropOperation, target: DataViewDragDropOperation, operationDefinitionMap: Record - ) => Record; + ) => Record; } interface OperationDefinitionMap { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/last_value.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/last_value.test.tsx similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/last_value.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/last_value.test.tsx index 05386492544f4..16c6f2727ea50 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/last_value.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/last_value.test.tsx @@ -17,8 +17,8 @@ import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { createMockedIndexPattern } from '../../mocks'; import { LastValueIndexPatternColumn } from './last_value'; import { lastValueOperation } from '.'; -import type { IndexPatternLayer } from '../../types'; -import type { IndexPattern } from '../../../types'; +import type { FormBasedLayer } from '../../types'; +import type { IndexPattern } from '../../../../types'; import { TermsIndexPatternColumn } from './terms'; import { EuiSwitch, EuiSwitchEvent } from '@elastic/eui'; import { buildExpression, parseExpression } from '@kbn/expressions-plugin/common'; @@ -55,7 +55,7 @@ const defaultProps = { }; describe('last_value', () => { - let layer: IndexPatternLayer; + let layer: FormBasedLayer; const InlineOptions = lastValueOperation.paramEditor!; beforeEach(() => { @@ -506,7 +506,7 @@ describe('last_value', () => { }, columnOrder: [], indexPatternId: '', - } as IndexPatternLayer; + } as FormBasedLayer; expect( lastValueOperation.buildColumn({ @@ -829,7 +829,7 @@ describe('last_value', () => { describe('getErrorMessage', () => { let indexPattern: IndexPattern; - let errorLayer: IndexPatternLayer; + let errorLayer: FormBasedLayer; beforeEach(() => { indexPattern = createMockedIndexPattern(); errorLayer = { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/last_value.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/last_value.tsx similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/last_value.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/last_value.tsx index 4206cd8109760..59b77cd73fc9d 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/last_value.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/last_value.tsx @@ -20,8 +20,8 @@ import { AggFunctionsMapping } from '@kbn/data-plugin/public'; import { buildExpressionFunction } from '@kbn/expressions-plugin/public'; import { OperationDefinition } from '.'; import { FieldBasedIndexPatternColumn, ValueFormatConfig } from './column_types'; -import type { IndexPatternField, IndexPattern } from '../../../types'; -import { DataType } from '../../../types'; +import type { IndexPatternField, IndexPattern } from '../../../../types'; +import { DataType } from '../../../../types'; import { getFormatFromPreviousColumn, getInvalidFieldMessage, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/metrics.test.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/metrics.test.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/metrics.tsx similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/metrics.tsx diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile.test.tsx similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile.test.tsx index 77434d7ecc7ad..e78ac9e9360da 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile.test.tsx @@ -18,7 +18,7 @@ import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { createMockedIndexPattern } from '../../mocks'; import { percentileOperation } from '.'; -import { IndexPatternLayer } from '../../types'; +import { FormBasedLayer } from '../../types'; import { PercentileIndexPatternColumn } from './percentile'; import { TermsIndexPatternColumn } from './terms'; import { @@ -27,7 +27,7 @@ import { ExpressionAstExpressionBuilder, } from '@kbn/expressions-plugin/public'; import type { OriginalColumn } from '../../to_expression'; -import { IndexPattern } from '../../../types'; +import { IndexPattern } from '../../../../types'; import faker from 'faker'; jest.mock('lodash', () => { @@ -71,7 +71,7 @@ const defaultProps = { }; describe('percentile', () => { - let layer: IndexPatternLayer; + let layer: FormBasedLayer; const InlineOptions = percentileOperation.paramEditor!; beforeEach(() => { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile.tsx similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile.tsx index ec4a3d569e7da..f391e3a6f9a2f 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile.tsx @@ -28,7 +28,7 @@ import { } from './helpers'; import { FieldBasedIndexPatternColumn } from './column_types'; import { adjustTimeScaleLabelSuffix } from '../time_scale_utils'; -import { useDebouncedValue } from '../../../shared_components'; +import { useDebouncedValue } from '../../../../shared_components'; import { getDisallowedPreviousShiftMessage } from '../../time_shift_utils'; import { FormRow } from './shared_components'; import { getColumnReducedTimeRangeError } from '../../reduced_time_range_utils'; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile_ranks.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile_ranks.test.tsx similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile_ranks.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile_ranks.test.tsx index a0c69a7354849..adb0d8e491fd7 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile_ranks.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile_ranks.test.tsx @@ -18,10 +18,10 @@ import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { createMockedIndexPattern } from '../../mocks'; import { percentileRanksOperation } from '.'; -import { IndexPatternLayer } from '../../types'; +import { FormBasedLayer } from '../../types'; import type { PercentileRanksIndexPatternColumn } from './percentile_ranks'; import { TermsIndexPatternColumn } from './terms'; -import { IndexPattern } from '../../../types'; +import { IndexPattern } from '../../../../types'; jest.mock('lodash', () => { const original = jest.requireActual('lodash'); @@ -64,7 +64,7 @@ const defaultProps = { }; describe('percentile ranks', () => { - let layer: IndexPatternLayer; + let layer: FormBasedLayer; const InlineOptions = percentileRanksOperation.paramEditor!; beforeEach(() => { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile_ranks.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile_ranks.tsx similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile_ranks.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile_ranks.tsx index 45bd05f37372f..3d7b12802858c 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile_ranks.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile_ranks.tsx @@ -22,7 +22,7 @@ import { } from './helpers'; import { FieldBasedIndexPatternColumn } from './column_types'; import { adjustTimeScaleLabelSuffix } from '../time_scale_utils'; -import { useDebouncedValue } from '../../../shared_components'; +import { useDebouncedValue } from '../../../../shared_components'; import { getDisallowedPreviousShiftMessage } from '../../time_shift_utils'; import { FormRow } from './shared_components'; import { getColumnReducedTimeRangeError } from '../../reduced_time_range_utils'; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/advanced_editor.scss b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/advanced_editor.scss similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/advanced_editor.scss rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/advanced_editor.scss diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/advanced_editor.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/advanced_editor.tsx similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/advanced_editor.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/advanced_editor.tsx index d3f5000646bc9..c3212642e0064 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/advanced_editor.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/advanced_editor.tsx @@ -28,7 +28,7 @@ import { DraggableBucketContainer, NewBucketButton, useDebounceWithOptions, -} from '../../../../shared_components'; +} from '../../../../../shared_components'; import { RangeTypeLens, isValidRange } from './ranges'; import { FROM_PLACEHOLDER, TO_PLACEHOLDER, TYPING_DEBOUNCE_TIME } from './constants'; import { LabelInput } from '../shared_components'; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/constants.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/constants.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/constants.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/constants.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/index.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/index.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/index.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/index.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/range_editor.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/range_editor.tsx similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/range_editor.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/range_editor.tsx index 92f0196b9cbb5..1f7565c9d31d6 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/range_editor.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/range_editor.tsx @@ -26,7 +26,7 @@ import { UI_SETTINGS } from '@kbn/data-plugin/public'; import { RangeColumnParams, UpdateParamsFnType, MODES_TYPES } from './ranges'; import { AdvancedRangeEditor } from './advanced_editor'; import { TYPING_DEBOUNCE_TIME, MODES, MIN_HISTOGRAM_BARS } from './constants'; -import { useDebounceWithOptions } from '../../../../shared_components'; +import { useDebounceWithOptions } from '../../../../../shared_components'; import { HelpPopover, HelpPopoverButton } from '../../../help_popover'; const GranularityHelpPopover = () => { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/ranges.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/ranges.test.tsx similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/ranges.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/ranges.test.tsx index 874559ae66c19..d0dd9f6458612 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/ranges.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/ranges.test.tsx @@ -15,7 +15,7 @@ import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { fieldFormatsServiceMock } from '@kbn/field-formats-plugin/public/mocks'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; -import type { IndexPatternLayer } from '../../../types'; +import type { FormBasedLayer } from '../../../types'; import { rangeOperation } from '..'; import { RangeIndexPatternColumn } from './ranges'; import { @@ -26,9 +26,9 @@ import { SLICES, } from './constants'; import { RangePopover } from './advanced_editor'; -import { DragDropBuckets } from '../../../../shared_components'; +import { DragDropBuckets } from '../../../../../shared_components'; import { getFieldByNameFactory } from '../../../pure_helpers'; -import { IndexPattern } from '../../../../types'; +import { IndexPattern } from '../../../../../types'; // mocking random id generator function jest.mock('@elastic/eui', () => { @@ -136,7 +136,7 @@ const defaultOptions = { }; describe('ranges', () => { - let layer: IndexPatternLayer; + let layer: FormBasedLayer; const InlineOptions = rangeOperation.paramEditor!; const MAX_HISTOGRAM_VALUE = 100; const GRANULARITY_DEFAULT_VALUE = (MAX_HISTOGRAM_VALUE - MIN_HISTOGRAM_BARS) / 2; @@ -156,7 +156,7 @@ describe('ranges', () => { column.params.type = MODES.Range; } - function getDefaultLayer(): IndexPatternLayer { + function getDefaultLayer(): FormBasedLayer { return { indexPatternId: '1', columnOrder: ['col1', 'col2'], diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/ranges.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/ranges.tsx similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/ranges.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/ranges.tsx index 52c9471aefe0e..2dab571dcfc39 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/ranges.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/ranges/ranges.tsx @@ -15,9 +15,9 @@ import { RangeEditor } from './range_editor'; import { OperationDefinition } from '..'; import { FieldBasedIndexPatternColumn } from '../column_types'; import { updateColumnParam } from '../../layer_helpers'; -import { supportedFormats } from '../../../../../common/expressions/format_column/supported_formats'; +import { supportedFormats } from '../../../../../../common/expressions/format_column/supported_formats'; import { MODES, AUTO_BARS, DEFAULT_INTERVAL, MIN_HISTOGRAM_BARS, SLICES } from './constants'; -import { IndexPattern, IndexPatternField } from '../../../../types'; +import { IndexPattern, IndexPatternField } from '../../../../../types'; import { getInvalidFieldMessage, isValidNumber } from '../helpers'; type RangeType = Omit; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/shared_components/form_row.scss b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/shared_components/form_row.scss similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/shared_components/form_row.scss rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/shared_components/form_row.scss diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/shared_components/form_row.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/shared_components/form_row.tsx similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/shared_components/form_row.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/shared_components/form_row.tsx diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/shared_components/index.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/shared_components/index.tsx similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/shared_components/index.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/shared_components/index.tsx diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/shared_components/label_input.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/shared_components/label_input.tsx similarity index 96% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/shared_components/label_input.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/shared_components/label_input.tsx index 4bc461aaa319b..9d8730d38216a 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/shared_components/label_input.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/shared_components/label_input.tsx @@ -8,7 +8,7 @@ import React, { useRef } from 'react'; import { EuiFieldText, keys } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { useDebouncedValue } from '../../../../shared_components'; +import { useDebouncedValue } from '../../../../../shared_components'; export const LabelInput = ({ value, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/static_value.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/static_value.test.tsx similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/static_value.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/static_value.test.tsx index a93b1ece5e13f..0ed6a60677f73 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/static_value.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/static_value.test.tsx @@ -17,8 +17,8 @@ import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { createMockedIndexPattern } from '../../mocks'; import { staticValueOperation } from '.'; -import { IndexPatternLayer } from '../../types'; -import { IndexPattern } from '../../../types'; +import { FormBasedLayer } from '../../types'; +import { IndexPattern } from '../../../../types'; import { StaticValueIndexPatternColumn } from './static_value'; import { TermsIndexPatternColumn } from './terms'; @@ -63,7 +63,7 @@ const defaultProps = { }; describe('static_value', () => { - let layer: IndexPatternLayer; + let layer: FormBasedLayer; beforeEach(() => { layer = { @@ -97,7 +97,7 @@ describe('static_value', () => { }; }); - function getLayerWithStaticValue(newValue: string | null | undefined): IndexPatternLayer { + function getLayerWithStaticValue(newValue: string | null | undefined): FormBasedLayer { return { ...layer, columns: { @@ -377,7 +377,7 @@ describe('static_value', () => { }, } as StaticValueIndexPatternColumn, }, - } as IndexPatternLayer; + } as FormBasedLayer; const instance = shallow( { - let layer: IndexPatternLayer; + let layer: FormBasedLayer; const InlineOptions = termsOperation.paramEditor!; const InlineFieldInput = termsOperation.renderFieldInput!; @@ -1187,7 +1187,7 @@ describe('terms', () => { return getOperationSupportMatrix({ state: { layers: { layer1: layer }, - } as unknown as IndexPatternPrivateState, + } as unknown as FormBasedPrivateState, layerId: 'layer1', filterOperations: () => true, columnId, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/types.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/types.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/types.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/types.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/values_input.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/values_input.test.tsx similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/values_input.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/values_input.test.tsx diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/values_input.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/values_input.tsx similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/values_input.tsx rename to x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/values_input.tsx index 9e86ea8525adc..33dd5b7206008 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/values_input.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/values_input.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiFieldNumber, EuiFormRow } from '@elastic/eui'; -import { useDebounceWithOptions } from '../../../../shared_components'; +import { useDebounceWithOptions } from '../../../../../shared_components'; export const ValuesInput = ({ value, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/index.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/index.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/index.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/index.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/layer_helpers.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/layer_helpers.test.ts similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/layer_helpers.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/layer_helpers.test.ts index 1a77cd253424f..65b11c2605cc3 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/layer_helpers.test.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/layer_helpers.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { OperationMetadata } from '../../types'; +import type { OperationMetadata } from '../../../types'; import { copyColumn, insertNewColumn, @@ -23,10 +23,10 @@ import { operationDefinitionMap, OperationType } from '.'; import { TermsIndexPatternColumn } from './definitions/terms'; import { DateHistogramIndexPatternColumn } from './definitions/date_histogram'; import { AvgIndexPatternColumn } from './definitions/metrics'; -import type { IndexPatternLayer, IndexPatternPrivateState } from '../types'; +import type { FormBasedLayer, FormBasedPrivateState } from '../types'; import { documentField } from '../document_field'; import { getFieldByNameFactory } from '../pure_helpers'; -import { generateId } from '../../id_generator'; +import { generateId } from '../../../id_generator'; import { createMockedFullReference, createMockedManagedReference } from './mocks'; import { FiltersIndexPatternColumn, @@ -38,13 +38,13 @@ import { } from './definitions'; import { TinymathAST } from '@kbn/tinymath'; import { CoreStart } from '@kbn/core/public'; -import { IndexPattern } from '../../types'; +import { IndexPattern } from '../../../types'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; const dataMock = dataPluginMock.createStartContract(); jest.mock('.'); -jest.mock('../../id_generator'); +jest.mock('../../../id_generator'); jest.mock('../dimension_panel/reference_editor', () => ({ ReferenceEditor: () => null, })); @@ -257,7 +257,7 @@ describe('state_helpers', () => { }); it('should update order on inserting a bucketed fieldless operation', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -284,7 +284,7 @@ describe('state_helpers', () => { }); it('should update order on inserting a bucketed field-based operation', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -312,7 +312,7 @@ describe('state_helpers', () => { }); it('should insert a metric after buckets', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -343,7 +343,7 @@ describe('state_helpers', () => { }); it('should insert a metric after references', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -382,7 +382,7 @@ describe('state_helpers', () => { }); it('should insert new buckets at the end of previous buckets', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1', 'col3'], columns: { @@ -421,7 +421,7 @@ describe('state_helpers', () => { }); it('should not change order of metrics and references on inserting new buckets', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1', 'col2'], columns: { @@ -665,7 +665,7 @@ describe('state_helpers', () => { specificOperations: [], }, ]; - const layer: IndexPatternLayer = { indexPatternId: '1', columnOrder: [], columns: {} }; + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: [], columns: {} }; expect(() => { insertNewColumn({ layer, @@ -678,7 +678,7 @@ describe('state_helpers', () => { }); it('should leave the references empty if too ambiguous', () => { - const layer: IndexPatternLayer = { indexPatternId: '1', columnOrder: [], columns: {} }; + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: [], columns: {} }; const result = insertNewColumn({ layer, indexPattern, @@ -710,7 +710,7 @@ describe('state_helpers', () => { validateMetadata: () => true, }, ]; - const layer: IndexPatternLayer = { indexPatternId: '1', columnOrder: [], columns: {} }; + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: [], columns: {} }; const result = insertNewColumn({ layer, indexPattern, @@ -728,7 +728,7 @@ describe('state_helpers', () => { }); it('should create a referenced column if the ID is being used as a reference', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -825,7 +825,7 @@ describe('state_helpers', () => { }); it('should update order on changing the column', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1', 'col2'], columns: { @@ -1498,7 +1498,7 @@ describe('state_helpers', () => { operationType: 'count' as const, }; - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { col1: expectedColumn }, @@ -1526,7 +1526,7 @@ describe('state_helpers', () => { }); it('should not wrap around the previous operation as a reference if excluded by validateMetadata (case new1)', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -1573,7 +1573,7 @@ describe('state_helpers', () => { const testFilter = { language: 'kuery', query: '' }; - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { col1: { ...expectedColumn, filter: testFilter } }, @@ -1612,7 +1612,7 @@ describe('state_helpers', () => { validateMetadata: () => true, }, ]; - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -1653,7 +1653,7 @@ describe('state_helpers', () => { specificOperations: ['unique_count', 'sum', 'average'], // this order is ignored }, ]; - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -1694,7 +1694,7 @@ describe('state_helpers', () => { specificOperations: ['unique_count'], }, ]; - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -1734,7 +1734,7 @@ describe('state_helpers', () => { specificOperations: [], }, ]; - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1'], columns: { @@ -1804,7 +1804,7 @@ describe('state_helpers', () => { }); it('should use existing references, delete invalid, when switching from one reference to another (case ref1)', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['ref1', 'invalid', 'output'], columns: { @@ -1856,7 +1856,7 @@ describe('state_helpers', () => { }); it('should modify a copied object, not the original layer', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['ref1', 'invalid', 'output'], columns: { @@ -1907,7 +1907,7 @@ describe('state_helpers', () => { label: 'math', operationType: 'math' as const, }; - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '', columnOrder: [], columns: { @@ -1977,7 +1977,7 @@ describe('state_helpers', () => { }); it('should transition by using the field from the previous reference if nothing else works (case new5)', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['fieldReused', 'output'], columns: { @@ -2045,7 +2045,7 @@ describe('state_helpers', () => { ], }, }; - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1', 'col2'], columns: { @@ -2089,7 +2089,7 @@ describe('state_helpers', () => { filter: { language: 'kuery', query: 'bytes > 4000' }, timeShift: '3h', }; - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1', 'col2'], columns: { @@ -2135,7 +2135,7 @@ describe('state_helpers', () => { timeShift: '3h', }; - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['metric', 'ref'], columns: { @@ -2168,7 +2168,7 @@ describe('state_helpers', () => { }); it('should keep state and set incomplete column on incompatible switch', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['metric', 'ref'], columns: { @@ -2272,7 +2272,7 @@ describe('state_helpers', () => { }, ]; - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1', 'col2'], columns: { @@ -2439,7 +2439,7 @@ describe('state_helpers', () => { }); it('should delete the column and all of its references', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1', 'col2'], columns: { @@ -2467,7 +2467,7 @@ describe('state_helpers', () => { }); it('should update the labels when deleting columns', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1', 'col2'], columns: { @@ -2512,7 +2512,7 @@ describe('state_helpers', () => { }); it('should recursively delete references', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: ['col1', 'col2', 'col3'], columns: { @@ -2837,7 +2837,7 @@ describe('state_helpers', () => { }); it('should remove operations referencing unavailable fields', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { columnOrder: ['col1', 'col2'], columns: { col1: { @@ -2870,7 +2870,7 @@ describe('state_helpers', () => { }); it('should remove operations indirectly referencing unavailable fields', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { columnOrder: ['col1', 'col2'], columns: { col1: { @@ -2902,7 +2902,7 @@ describe('state_helpers', () => { }); it('should remove operations referencing fields with insufficient capabilities', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { columnOrder: ['col1', 'col2'], columns: { col1: { @@ -2941,7 +2941,7 @@ describe('state_helpers', () => { interval: 'w', }, })) as OperationDefinition['transfer']; - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { columnOrder: ['col1', 'col2'], columns: { col1: { @@ -2971,7 +2971,7 @@ describe('state_helpers', () => { }); it('should remove operations referencing fields with wrong field types', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { columnOrder: ['col1', 'col2'], columns: { col1: { @@ -3004,7 +3004,7 @@ describe('state_helpers', () => { }); it('should remove operations referencing fields with incompatible restrictions', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { columnOrder: ['col1', 'col2'], columns: { col1: { @@ -3078,7 +3078,7 @@ describe('state_helpers', () => { }, }, indexPattern, - {} as IndexPatternPrivateState, + {} as FormBasedPrivateState, '1', {} as CoreStart, dataMock @@ -3114,7 +3114,7 @@ describe('state_helpers', () => { }, }, indexPattern, - {} as IndexPatternPrivateState, + {} as FormBasedPrivateState, '1', {} as CoreStart, dataMock @@ -3151,7 +3151,7 @@ describe('state_helpers', () => { }, }, indexPattern, - {} as IndexPatternPrivateState, + {} as FormBasedPrivateState, '1', {} as CoreStart, dataMock @@ -3181,7 +3181,7 @@ describe('state_helpers', () => { }, }, indexPattern, - {} as IndexPatternPrivateState, + {} as FormBasedPrivateState, '1', {} as CoreStart, dataMock @@ -3209,7 +3209,7 @@ describe('state_helpers', () => { describe('hasTermsWithManyBuckets', () => { it('should return false for a bucketed non terms operation', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { columnOrder: ['col1'], columns: { col1: { @@ -3230,7 +3230,7 @@ describe('state_helpers', () => { }); it('should return false if all terms operation have a lower size', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { columnOrder: ['col1'], columns: { col1: { @@ -3256,7 +3256,7 @@ describe('state_helpers', () => { }); it('should return true if the size is high', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { columnOrder: ['col1'], columns: { col1: { @@ -3284,7 +3284,7 @@ describe('state_helpers', () => { describe('isReferenced', () => { it('should return false for top column which has references', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: [], columns: { @@ -3308,7 +3308,7 @@ describe('state_helpers', () => { }); it('should return true for referenced column', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: [], columns: { @@ -3334,7 +3334,7 @@ describe('state_helpers', () => { describe('getReferenceRoot', () => { it("should just return the column id itself if it's not a referenced column", () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: [], columns: { @@ -3358,7 +3358,7 @@ describe('state_helpers', () => { }); it('should return the top column if a referenced column is passed', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '1', columnOrder: [], columns: { @@ -3389,7 +3389,7 @@ describe('state_helpers', () => { label: 'math', operationType: 'math' as const, }; - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '', columnOrder: [], columns: { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/layer_helpers.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/layer_helpers.ts similarity index 95% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/layer_helpers.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/layer_helpers.ts index eb0f39262874b..db9b744cd43b2 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/layer_helpers.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/layer_helpers.ts @@ -17,7 +17,7 @@ import type { IndexPatternField, OperationMetadata, VisualizationDimensionGroupConfig, -} from '../../types'; +} from '../../../types'; import { operationDefinitionMap, operationDefinitions, @@ -27,23 +27,19 @@ import { GenericOperationDefinition, TermsIndexPatternColumn, } from './definitions'; -import type { - DataViewDragDropOperation, - IndexPatternLayer, - IndexPatternPrivateState, -} from '../types'; +import type { DataViewDragDropOperation, FormBasedLayer, FormBasedPrivateState } from '../types'; import { getSortScoreByPriorityForField } from './operations'; -import { generateId } from '../../id_generator'; +import { generateId } from '../../../id_generator'; import { GenericIndexPatternColumn, ReferenceBasedIndexPatternColumn, BaseIndexPatternColumn, } from './definitions/column_types'; import { FormulaIndexPatternColumn, insertOrReplaceFormulaColumn } from './definitions/formula'; -import type { TimeScaleUnit } from '../../../common/expressions'; +import type { TimeScaleUnit } from '../../../../common/expressions'; import { documentField } from '../document_field'; import { isColumnOfType } from './definitions/helpers'; -import type { DataType } from '../..'; +import type { DataType } from '../../..'; export interface ColumnAdvancedParams { filter?: Query | undefined; @@ -54,7 +50,7 @@ export interface ColumnAdvancedParams { interface ColumnChange { op: OperationType; - layer: IndexPatternLayer; + layer: FormBasedLayer; columnId: string; indexPattern: IndexPattern; field?: IndexPatternField; @@ -72,7 +68,7 @@ interface ColumnChange { } interface ColumnCopy { - layers: Record; + layers: Record; target: DataViewDragDropOperation; source: DataViewDragDropOperation; shouldDeleteSource?: boolean; @@ -82,7 +78,7 @@ export const deleteColumnInLayers = ({ layers, source, }: { - layers: Record; + layers: Record; source: DataViewDragDropOperation; }) => ({ ...layers, @@ -98,7 +94,7 @@ export function copyColumn({ source, target, shouldDeleteSource, -}: ColumnCopy): Record { +}: ColumnCopy): Record { const outputLayers = createCopiedColumn(layers, target, source); return shouldDeleteSource ? deleteColumnInLayers({ @@ -109,10 +105,10 @@ export function copyColumn({ } function createCopiedColumn( - layers: Record, + layers: Record, target: DataViewDragDropOperation, source: DataViewDragDropOperation -): Record { +): Record { const sourceLayer = layers[source.layerId]; const sourceColumn = sourceLayer.columns[source.columnId]; const targetLayer = layers[target.layerId]; @@ -152,7 +148,7 @@ function createCopiedColumn( }; } -export function insertOrReplaceColumn(args: ColumnChange): IndexPatternLayer { +export function insertOrReplaceColumn(args: ColumnChange): FormBasedLayer { if (args.layer.columns[args.columnId]) { return replaceColumn(args); } @@ -185,7 +181,7 @@ const insertReferences = ({ visualizationGroups, targetGroup, }: { - layer: IndexPatternLayer; + layer: FormBasedLayer; references: Exclude; requiredReferences: RequiredReference[]; indexPattern: IndexPattern; @@ -269,7 +265,7 @@ const generateNewReferences = ({ incompleteFieldName?: string; incompleteFieldOperation?: OperationType; columnParams?: Record; - layer: IndexPatternLayer; + layer: FormBasedLayer; requiredReferences: RequiredReference[]; indexPattern: IndexPattern; visualizationGroups: VisualizationDimensionGroupConfig[]; @@ -364,7 +360,7 @@ export function insertNewColumn({ initialParams, references, respectOrder, -}: ColumnChange): IndexPatternLayer { +}: ColumnChange): FormBasedLayer { const operationDefinition = operationDefinitionMap[op]; if (!operationDefinition) { @@ -541,8 +537,8 @@ function replaceFormulaColumn( }: { operationDefinition: Extract; previousDefinition: GenericOperationDefinition; - layer: IndexPatternLayer; - previousColumn: IndexPatternLayer['columns'][number]; + layer: FormBasedLayer; + previousColumn: FormBasedLayer['columns'][number]; indexPattern: IndexPattern; columnId: string; }, @@ -615,7 +611,7 @@ export function replaceColumn({ initialParams, shouldResetLabel, shouldCombineField, -}: ColumnChange): IndexPatternLayer { +}: ColumnChange): FormBasedLayer { const previousColumn = layer.columns[columnId]; if (!previousColumn) { throw new Error(`Can't replace column because there is no prior column`); @@ -901,10 +897,10 @@ function removeOrphanedColumns( | OperationDefinition | OperationDefinition, previousColumn: GenericIndexPatternColumn, - tempLayer: IndexPatternLayer, + tempLayer: FormBasedLayer, indexPattern: IndexPattern ) { - let newLayer: IndexPatternLayer = tempLayer; + let newLayer: FormBasedLayer = tempLayer; if (previousDefinition.input === 'managedReference') { const [columnId] = Object.entries(tempLayer.columns).find(([_, currColumn]) => currColumn === previousColumn) || @@ -994,13 +990,13 @@ function applyReferenceTransition({ indexPattern, visualizationGroups, }: { - layer: IndexPatternLayer; + layer: FormBasedLayer; columnId: string; previousColumn: GenericIndexPatternColumn; op: OperationType; indexPattern: IndexPattern; visualizationGroups: VisualizationDimensionGroupConfig[]; -}): IndexPatternLayer { +}): FormBasedLayer { const operationDefinition = operationDefinitionMap[op]; if (operationDefinition.input !== 'fullReference') { @@ -1218,13 +1214,13 @@ function copyCustomLabel( } function addBucket( - layer: IndexPatternLayer, + layer: FormBasedLayer, column: BaseIndexPatternColumn, addedColumnId: string, visualizationGroups: VisualizationDimensionGroupConfig[], targetGroup?: string, respectOrder?: boolean -): IndexPatternLayer { +): FormBasedLayer { const [buckets, metrics] = partition( layer.columnOrder, (colId) => layer.columns[colId].isBucketed @@ -1314,10 +1310,10 @@ export function reorderByGroups( } function addMetric( - layer: IndexPatternLayer, + layer: FormBasedLayer, column: BaseIndexPatternColumn, addedColumnId: string -): IndexPatternLayer { +): FormBasedLayer { const tempLayer = { ...resetIncomplete(layer, addedColumnId), columns: { @@ -1347,10 +1343,10 @@ export function updateColumnLabel({ columnId, customLabel, }: { - layer: IndexPatternLayer; + layer: FormBasedLayer; columnId: string; customLabel?: string; -}): IndexPatternLayer { +}): FormBasedLayer { const oldColumn = layer.columns[columnId]; return { ...layer, @@ -1371,11 +1367,11 @@ export function updateColumnParam({ paramName, value, }: { - layer: IndexPatternLayer; + layer: FormBasedLayer; columnId: string; paramName: string; value: unknown; -}): IndexPatternLayer { +}): FormBasedLayer { const currentColumn = layer.columns[columnId]; return { ...layer, @@ -1392,7 +1388,7 @@ export function updateColumnParam({ }; } -export function adjustColumnReferences(layer: IndexPatternLayer) { +export function adjustColumnReferences(layer: FormBasedLayer) { const newColumns = { ...layer.columns }; Object.keys(newColumns).forEach((currentColumnId) => { const currentColumn = newColumns[currentColumnId]; @@ -1413,7 +1409,7 @@ export function adjustColumnReferences(layer: IndexPatternLayer) { } export function adjustColumnReferencesForChangedColumn( - layer: IndexPatternLayer, + layer: FormBasedLayer, changedColumnId: string ) { const newColumns = { ...layer.columns }; @@ -1440,10 +1436,10 @@ export function deleteColumn({ columnId, indexPattern, }: { - layer: IndexPatternLayer; + layer: FormBasedLayer; columnId: string; indexPattern: IndexPattern; -}): IndexPatternLayer { +}): FormBasedLayer { const column = layer.columns[columnId]; if (!column) { const newIncomplete = { ...(layer.incompleteColumns || {}) }; @@ -1491,7 +1487,7 @@ export function deleteColumn({ // // This does NOT topologically sort references, as this would cause the order in the UI // to change. Reference order is determined before creating the pipeline in to_expression -export function getColumnOrder(layer: IndexPatternLayer): string[] { +export function getColumnOrder(layer: FormBasedLayer): string[] { const entries = Object.entries(layer.columns); entries.sort(([idA], [idB]) => { const indexA = layer.columnOrder.indexOf(idA); @@ -1511,7 +1507,7 @@ export function getColumnOrder(layer: IndexPatternLayer): string[] { } // Splits existing columnOrder into the three categories -export function getExistingColumnGroups(layer: IndexPatternLayer): [string[], string[], string[]] { +export function getExistingColumnGroups(layer: FormBasedLayer): [string[], string[], string[]] { const [direct, referenced] = partition( layer.columnOrder, (columnId) => layer.columns[columnId] && !('references' in layer.columns[columnId]) @@ -1525,7 +1521,7 @@ export function getExistingColumnGroups(layer: IndexPatternLayer): [string[], st export function isColumnTransferable( column: GenericIndexPatternColumn, newIndexPattern: IndexPattern, - layer: IndexPatternLayer + layer: FormBasedLayer ): boolean { return ( operationDefinitionMap[column.operationType].isTransferable( @@ -1541,13 +1537,13 @@ export function isColumnTransferable( } export function updateLayerIndexPattern( - layer: IndexPatternLayer, + layer: FormBasedLayer, newIndexPattern: IndexPattern -): IndexPatternLayer { - const keptColumns: IndexPatternLayer['columns'] = pickBy(layer.columns, (column) => { +): FormBasedLayer { + const keptColumns: FormBasedLayer['columns'] = pickBy(layer.columns, (column) => { return isColumnTransferable(column, newIndexPattern, layer); }); - const newColumns: IndexPatternLayer['columns'] = mapValues(keptColumns, (column) => { + const newColumns: FormBasedLayer['columns'] = mapValues(keptColumns, (column) => { const operationDefinition = operationDefinitionMap[column.operationType]; return operationDefinition.transfer ? operationDefinition.transfer(column, newIndexPattern) @@ -1573,9 +1569,9 @@ export function updateLayerIndexPattern( * - If timeshift is used, only a single date histogram can be used */ export function getErrorMessages( - layer: IndexPatternLayer, + layer: FormBasedLayer, indexPattern: IndexPattern, - state: IndexPatternPrivateState, + state: FormBasedPrivateState, layerId: string, core: CoreStart, data: DataPublicPluginStart @@ -1584,7 +1580,7 @@ export function getErrorMessages( | string | { message: string; - fixAction?: DatasourceFixAction; + fixAction?: DatasourceFixAction; } > | undefined { @@ -1632,21 +1628,21 @@ export function getErrorMessages( | string | { message: string; - fixAction?: DatasourceFixAction; + fixAction?: DatasourceFixAction; } >; return errors.length ? errors : undefined; } -export function isReferenced(layer: IndexPatternLayer, columnId: string): boolean { +export function isReferenced(layer: FormBasedLayer, columnId: string): boolean { const allReferences = Object.values(layer.columns).flatMap((col) => 'references' in col ? col.references : [] ); return allReferences.includes(columnId); } -const computeReferenceLookup = memoizeOne((layer: IndexPatternLayer): Record => { +const computeReferenceLookup = memoizeOne((layer: FormBasedLayer): Record => { // speed up things for deep chains as in formula const refLookup: Record = {}; for (const [parentId, col] of Object.entries(layer.columns)) { @@ -1666,7 +1662,7 @@ const computeReferenceLookup = memoizeOne((layer: IndexPatternLayer): Record { const column = layer.columns[columnId]; if (column) { @@ -1740,9 +1736,9 @@ export function isOperationAllowedAsReference({ // Labels need to be updated when columns are added because reference-based column labels // are sometimes copied into the parents export function updateDefaultLabels( - layer: IndexPatternLayer, + layer: FormBasedLayer, indexPattern: IndexPattern -): IndexPatternLayer { +): FormBasedLayer { const copiedColumns = { ...layer.columns }; layer.columnOrder.forEach((id) => { const col = copiedColumns[id]; @@ -1760,7 +1756,7 @@ export function updateDefaultLabels( return { ...layer, columns: copiedColumns }; } -export function resetIncomplete(layer: IndexPatternLayer, columnId: string): IndexPatternLayer { +export function resetIncomplete(layer: FormBasedLayer, columnId: string): FormBasedLayer { const incompleteColumns = { ...(layer.incompleteColumns ?? {}) }; delete incompleteColumns[columnId]; return { ...layer, incompleteColumns }; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/mocks.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/mocks.ts similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/mocks.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/mocks.ts index 2d7e70179fb3f..3884bab02f200 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/mocks.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/mocks.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { OperationMetadata } from '../../types'; +import type { OperationMetadata } from '../../../types'; import type { OperationType } from './definitions'; export const createMockedFullReference = () => { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/operations.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/operations.test.ts similarity index 100% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/operations.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/operations.test.ts diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/operations.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/operations.ts similarity index 99% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/operations.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/operations.ts index 27071e5f0ee74..b44c0a0e4cc55 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/operations.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/operations.ts @@ -6,7 +6,7 @@ */ import { memoize } from 'lodash'; -import type { IndexPattern, IndexPatternField, OperationMetadata } from '../../types'; +import type { IndexPattern, IndexPatternField, OperationMetadata } from '../../../types'; import { operationDefinitionMap, operationDefinitions, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/time_scale_utils.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/time_scale_utils.test.ts similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/time_scale_utils.test.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/time_scale_utils.test.ts index 559086cf69b84..e249be575aac2 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/time_scale_utils.test.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/time_scale_utils.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { TimeScaleUnit } from '../../../common/expressions'; +import type { TimeScaleUnit } from '../../../../common/expressions'; import { adjustTimeScaleLabelSuffix } from './time_scale_utils'; export const DEFAULT_TIME_SCALE = 's' as TimeScaleUnit; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/time_scale_utils.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/time_scale_utils.ts similarity index 92% rename from x-pack/plugins/lens/public/indexpattern_datasource/operations/time_scale_utils.ts rename to x-pack/plugins/lens/public/datasources/form_based/operations/time_scale_utils.ts index 1ebf4ccc76a36..08dfa147bf88e 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/time_scale_utils.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/time_scale_utils.ts @@ -6,8 +6,8 @@ */ import { i18n } from '@kbn/i18n'; -import { unitSuffixesLong } from '../../../common/suffix_formatter'; -import type { TimeScaleUnit } from '../../../common/expressions'; +import { unitSuffixesLong } from '../../../../common/suffix_formatter'; +import type { TimeScaleUnit } from '../../../../common/expressions'; export const DEFAULT_TIME_SCALE = 's' as TimeScaleUnit; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/pure_helpers.ts b/x-pack/plugins/lens/public/datasources/form_based/pure_helpers.ts similarity index 92% rename from x-pack/plugins/lens/public/indexpattern_datasource/pure_helpers.ts rename to x-pack/plugins/lens/public/datasources/form_based/pure_helpers.ts index ba3ba9bbb824f..6355809369804 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/pure_helpers.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/pure_helpers.ts @@ -6,7 +6,7 @@ */ import { keyBy } from 'lodash'; -import { IndexPatternField } from '../types'; +import { IndexPatternField } from '../../types'; import { documentField } from './document_field'; export function getFieldByNameFactory( diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/pure_utils.ts b/x-pack/plugins/lens/public/datasources/form_based/pure_utils.ts similarity index 95% rename from x-pack/plugins/lens/public/indexpattern_datasource/pure_utils.ts rename to x-pack/plugins/lens/public/datasources/form_based/pure_utils.ts index 39b4bcdf49229..5d8d823c30ab4 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/pure_utils.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/pure_utils.ts @@ -5,8 +5,8 @@ * 2.0. */ -import type { DataType, IndexPattern, IndexPatternField } from '../types'; -import type { IndexPatternLayer } from './types'; +import type { DataType, IndexPattern, IndexPatternField } from '../../types'; +import type { FormBasedLayer } from './types'; import type { BaseIndexPatternColumn, FieldBasedIndexPatternColumn, @@ -36,7 +36,7 @@ export function getFieldType(field: IndexPatternField) { export function getReferencedField( column: GenericIndexPatternColumn | undefined, indexPattern: IndexPattern, - layer: IndexPatternLayer + layer: FormBasedLayer ) { if (!column) return; if (!('references' in column)) return; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/reduced_time_range_utils.tsx b/x-pack/plugins/lens/public/datasources/form_based/reduced_time_range_utils.tsx similarity index 95% rename from x-pack/plugins/lens/public/indexpattern_datasource/reduced_time_range_utils.tsx rename to x-pack/plugins/lens/public/datasources/form_based/reduced_time_range_utils.tsx index 04984a1c782bf..69e0fb4f07a5e 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/reduced_time_range_utils.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/reduced_time_range_utils.tsx @@ -6,8 +6,8 @@ */ import { i18n } from '@kbn/i18n'; -import type { IndexPatternLayer } from './types'; -import type { IndexPattern } from '../types'; +import type { FormBasedLayer } from './types'; +import type { IndexPattern } from '../../types'; export const reducedTimeRangeOptions = [ { @@ -53,7 +53,7 @@ export const reducedTimeRangeOptionOrder = reducedTimeRangeOptions.reduce<{ ); export function getColumnReducedTimeRangeError( - layer: IndexPatternLayer, + layer: FormBasedLayer, columnId: string, indexPattern: IndexPattern ): string[] | undefined { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/state_helpers.ts b/x-pack/plugins/lens/public/datasources/form_based/state_helpers.ts similarity index 73% rename from x-pack/plugins/lens/public/indexpattern_datasource/state_helpers.ts rename to x-pack/plugins/lens/public/datasources/form_based/state_helpers.ts index 6e16ebe5e8d53..0120c29713a83 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/state_helpers.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/state_helpers.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { IndexPatternPrivateState, IndexPatternLayer } from './types'; +import { FormBasedPrivateState, FormBasedLayer } from './types'; export function mergeLayer({ state, layerId, newLayer, }: { - state: IndexPatternPrivateState; + state: FormBasedPrivateState; layerId: string; - newLayer: Partial; + newLayer: Partial; }) { return { ...state, @@ -29,8 +29,8 @@ export function mergeLayers({ state, newLayers, }: { - state: IndexPatternPrivateState; - newLayers: Record; + state: FormBasedPrivateState; + newLayers: Record; }) { return { ...state, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/time_shift_utils.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/time_shift_utils.test.tsx similarity index 96% rename from x-pack/plugins/lens/public/indexpattern_datasource/time_shift_utils.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/time_shift_utils.test.tsx index 4cb251e3820be..a0ff29a684150 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/time_shift_utils.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/time_shift_utils.test.tsx @@ -6,11 +6,11 @@ */ import { getDisallowedPreviousShiftMessage } from './time_shift_utils'; -import { IndexPatternLayer } from './types'; +import { FormBasedLayer } from './types'; describe('time_shift_utils', () => { describe('getDisallowedPreviousShiftMessage', () => { - const layer: IndexPatternLayer = { + const layer: FormBasedLayer = { indexPatternId: '', columnOrder: [], columns: { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/time_shift_utils.tsx b/x-pack/plugins/lens/public/datasources/form_based/time_shift_utils.tsx similarity index 97% rename from x-pack/plugins/lens/public/indexpattern_datasource/time_shift_utils.tsx rename to x-pack/plugins/lens/public/datasources/form_based/time_shift_utils.tsx index 51f389e69a4f0..6dd4b88d3422a 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/time_shift_utils.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/time_shift_utils.tsx @@ -13,12 +13,8 @@ import type { DatatableUtilitiesService } from '@kbn/data-plugin/common'; import { Datatable } from '@kbn/expressions-plugin/common'; import { search } from '@kbn/data-plugin/public'; import { parseTimeShift } from '@kbn/data-plugin/common'; -import type { - GenericIndexPatternColumn, - IndexPatternLayer, - IndexPatternPrivateState, -} from './types'; -import type { FramePublicAPI, IndexPattern } from '../types'; +import type { GenericIndexPatternColumn, FormBasedLayer, FormBasedPrivateState } from './types'; +import type { FramePublicAPI, IndexPattern } from '../../types'; export const timeShiftOptions = [ { @@ -105,7 +101,7 @@ export const timeShiftOptionOrder = timeShiftOptions.reduce<{ [key: string]: num export function getDateHistogramInterval( datatableUtilities: DatatableUtilitiesService, - layer: IndexPatternLayer, + layer: FormBasedLayer, indexPattern: IndexPattern, activeData: Record | undefined, layerId: string @@ -163,7 +159,7 @@ export function getLayerTimeShiftChecks({ } export function getDisallowedPreviousShiftMessage( - layer: IndexPatternLayer, + layer: FormBasedLayer, columnId: string ): string[] | undefined { const currentColumn = layer.columns[columnId]; @@ -191,7 +187,7 @@ export function getDisallowedPreviousShiftMessage( export function getStateTimeShiftWarningMessages( datatableUtilities: DatatableUtilitiesService, - state: IndexPatternPrivateState, + state: FormBasedPrivateState, { activeData, dataViews }: FramePublicAPI ) { if (!state) return; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/to_expression.ts b/x-pack/plugins/lens/public/datasources/form_based/to_expression.ts similarity index 98% rename from x-pack/plugins/lens/public/indexpattern_datasource/to_expression.ts rename to x-pack/plugins/lens/public/datasources/form_based/to_expression.ts index 72cb2a2ab729e..fc77aa6520bd0 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/to_expression.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/to_expression.ts @@ -20,13 +20,13 @@ import { ExpressionAstExpressionBuilder, ExpressionAstFunction, } from '@kbn/expressions-plugin/public'; -import { GenericIndexPatternColumn } from './indexpattern'; +import { GenericIndexPatternColumn } from './form_based'; import { operationDefinitionMap } from './operations'; -import { IndexPatternPrivateState, IndexPatternLayer } from './types'; +import { FormBasedPrivateState, FormBasedLayer } from './types'; import { DateHistogramIndexPatternColumn, RangeIndexPatternColumn } from './operations/definitions'; import { FormattedIndexPatternColumn } from './operations/definitions/column_types'; import { isColumnFormatted, isColumnOfType } from './operations/definitions/helpers'; -import type { IndexPattern, IndexPatternMap } from '../types'; +import type { IndexPattern, IndexPatternMap } from '../../types'; import { dedupeAggs } from './dedupe_aggs'; export type OriginalColumn = { id: string } & GenericIndexPatternColumn; @@ -50,7 +50,7 @@ const updatePositionIndex = (currentId: string, newIndex: number) => { }; function getExpressionForLayer( - layer: IndexPatternLayer, + layer: FormBasedLayer, indexPattern: IndexPattern, uiSettings: IUiSettingsClient ): ExpressionAstExpression | null { @@ -438,7 +438,7 @@ function sortedReferences(columns: Array; // Each layer is tied to the index pattern that created it @@ -56,15 +55,15 @@ export interface IndexPatternLayer { incompleteColumns?: Record; } -export interface IndexPatternPersistedState { - layers: Record>; +export interface FormBasedPersistedState { + layers: Record>; } -export type PersistedIndexPatternLayer = Omit; +export type PersistedIndexPatternLayer = Omit; -export interface IndexPatternPrivateState { +export interface FormBasedPrivateState { currentIndexPatternId: string; - layers: Record; + layers: Record; isDimensionClosePrevented?: boolean; } diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/utils.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/utils.test.tsx similarity index 95% rename from x-pack/plugins/lens/public/indexpattern_datasource/utils.test.tsx rename to x-pack/plugins/lens/public/datasources/form_based/utils.test.tsx index 2d7a6334adaf6..5349e433f3cac 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/utils.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/utils.test.tsx @@ -9,19 +9,19 @@ import React from 'react'; import { shallow } from 'enzyme'; import { createDatatableUtilitiesMock } from '@kbn/data-plugin/common/mocks'; import { getPrecisionErrorWarningMessages, cloneLayer } from './utils'; -import type { IndexPatternPrivateState, GenericIndexPatternColumn } from './types'; -import type { FramePublicAPI } from '../types'; +import type { FormBasedPrivateState, GenericIndexPatternColumn } from './types'; +import type { FramePublicAPI } from '../../types'; import type { DocLinksStart } from '@kbn/core/public'; import { EuiButton } from '@elastic/eui'; import { TermsIndexPatternColumn } from './operations'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import { FormattedMessage } from '@kbn/i18n-react'; -import { IndexPatternLayer } from './types'; +import { FormBasedLayer } from './types'; describe('indexpattern_datasource utils', () => { describe('getPrecisionErrorWarningMessages', () => { const datatableUtilitites = createDatatableUtilitiesMock(); - let state: IndexPatternPrivateState; + let state: FormBasedPrivateState; let framePublicAPI: FramePublicAPI; let docLinks: DocLinksStart; @@ -42,7 +42,7 @@ describe('indexpattern_datasource utils', () => { }, }, }, - } as unknown as IndexPatternPrivateState; + } as unknown as FormBasedPrivateState; framePublicAPI = { activeData: { id: { @@ -227,7 +227,7 @@ describe('indexpattern_datasource utils', () => { incompleteColumns: {}, indexPatternId: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f', }, - } as unknown as Record, + } as unknown as Record, 'a', 'b', (id) => id + 'C' diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/utils.tsx b/x-pack/plugins/lens/public/datasources/form_based/utils.tsx similarity index 96% rename from x-pack/plugins/lens/public/indexpattern_datasource/utils.tsx rename to x-pack/plugins/lens/public/datasources/form_based/utils.tsx index 612719967161c..dfec3c723d189 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/utils.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/utils.tsx @@ -17,13 +17,9 @@ import type { DatatableColumn } from '@kbn/expressions-plugin/common'; import { groupBy, escape, uniq } from 'lodash'; import type { Query } from '@kbn/data-plugin/common'; import { SearchResponseWarning } from '@kbn/data-plugin/public/search/types'; -import type { FramePublicAPI, IndexPattern, StateSetter } from '../types'; -import { renewIDs } from '../utils'; -import type { - IndexPatternLayer, - IndexPatternPersistedState, - IndexPatternPrivateState, -} from './types'; +import type { FramePublicAPI, IndexPattern, StateSetter } from '../../types'; +import { renewIDs } from '../../utils'; +import type { FormBasedLayer, FormBasedPersistedState, FormBasedPrivateState } from './types'; import type { ReferenceBasedIndexPatternColumn } from './operations/definitions/column_types'; import { @@ -44,11 +40,11 @@ import { hasField } from './pure_utils'; import { mergeLayer } from './state_helpers'; import { supportsRarityRanking } from './operations/definitions/terms'; import { DEFAULT_MAX_DOC_COUNT } from './operations/definitions/terms/constants'; -import { getOriginalId } from '../../common/expressions/datatable/transpose_helpers'; -import { isQueryValid } from '../shared_components'; +import { getOriginalId } from '../../../common/expressions/datatable/transpose_helpers'; +import { isQueryValid } from '../../shared_components'; export function isColumnInvalid( - layer: IndexPatternLayer, + layer: FormBasedLayer, columnId: string, indexPattern: IndexPattern ) { @@ -76,7 +72,7 @@ export function isColumnInvalid( } function getReferencesErrors( - layer: IndexPatternLayer, + layer: FormBasedLayer, column: ReferenceBasedIndexPatternColumn, indexPattern: IndexPattern ) { @@ -167,7 +163,7 @@ const accuracyModeEnabledWarning = (columnName: string, docLink: string) => ( ); export function getTSDBRollupWarningMessages( - state: IndexPatternPersistedState, + state: FormBasedPersistedState, warning: SearchResponseWarning ) { if (state) { @@ -208,10 +204,10 @@ export function getTSDBRollupWarningMessages( export function getPrecisionErrorWarningMessages( datatableUtilities: DatatableUtilitiesService, - state: IndexPatternPrivateState, + state: FormBasedPrivateState, { activeData, dataViews }: FramePublicAPI, docLinks: DocLinksStart, - setState: StateSetter + setState: StateSetter ) { const warningMessages: React.ReactNode[] = []; @@ -338,7 +334,7 @@ export function getPrecisionErrorWarningMessages( return warningMessages; } -export function getVisualDefaultsForLayer(layer: IndexPatternLayer) { +export function getVisualDefaultsForLayer(layer: FormBasedLayer) { return Object.keys(layer.columns).reduce>>( (memo, columnId) => { const column = layer.columns[columnId]; @@ -461,7 +457,7 @@ function shouldUseTermsFallback( * * if there's at least one unfiltered metric, then just return an empty list of filters * * otherwise get all the filters, with the only exception of those from formula (referenced columns will have it anyway) */ -function collectFiltersFromMetrics(layer: IndexPatternLayer, columnIds: string[]) { +function collectFiltersFromMetrics(layer: FormBasedLayer, columnIds: string[]) { // Isolate filtered metrics first // mind to ignore non-filterable columns and formula columns const metricColumns = Object.keys(layer.columns).filter((colId) => { @@ -506,7 +502,7 @@ function collectOnlyValidQueries( } export function getFiltersInLayer( - layer: IndexPatternLayer, + layer: FormBasedLayer, columnIds: string[], layerData: NonNullable[string] | undefined, indexPattern: IndexPattern, @@ -617,7 +613,7 @@ export function getFiltersInLayer( } export const cloneLayer = ( - layers: Record, + layers: Record, layerId: string, newLayerId: string, getNewId: (id: string) => string diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/datapanel.test.tsx b/x-pack/plugins/lens/public/datasources/text_based/datapanel.test.tsx similarity index 88% rename from x-pack/plugins/lens/public/text_based_languages_datasource/datapanel.test.tsx rename to x-pack/plugins/lens/public/datasources/text_based/datapanel.test.tsx index 51ba02c1cdc6f..781b6547f8e15 100644 --- a/x-pack/plugins/lens/public/text_based_languages_datasource/datapanel.test.tsx +++ b/x-pack/plugins/lens/public/datasources/text_based/datapanel.test.tsx @@ -19,18 +19,18 @@ import { import type { DatatableColumn } from '@kbn/expressions-plugin/public'; import { FieldButton } from '@kbn/react-field'; -import { type TextBasedLanguagesDataPanelProps, TextBasedLanguagesDataPanel } from './datapanel'; +import { type TextBasedDataPanelProps, TextBasedDataPanel } from './datapanel'; import { coreMock } from '@kbn/core/public/mocks'; -import type { TextBasedLanguagesPrivateState } from './types'; +import type { TextBasedPrivateState } from './types'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import { uiActionsPluginMock } from '@kbn/ui-actions-plugin/public/mocks'; -import { createIndexPatternServiceMock } from '../mocks/data_views_service_mock'; -import { createMockFramePublicAPI } from '../mocks'; +import { createIndexPatternServiceMock } from '../../mocks/data_views_service_mock'; +import { createMockFramePublicAPI } from '../../mocks'; import { createMockedDragDropContext } from './mocks'; -import { DataViewsState } from '../state_management'; -import { ExistingFieldsMap, IndexPattern } from '../types'; +import { DataViewsState } from '../../state_management'; +import { ExistingFieldsMap, IndexPattern } from '../../types'; const fieldsFromQuery = [ { @@ -113,7 +113,7 @@ function getExistingFields(indexPatterns: Record) { return existingFields; } -const initialState: TextBasedLanguagesPrivateState = { +const initialState: TextBasedPrivateState = { layers: { first: { index: '1', @@ -163,7 +163,7 @@ describe('TextBased Query Languages Data Panel', () => { let core: ReturnType; let dataViews: DataViewPublicStart; - let defaultProps: TextBasedLanguagesDataPanelProps; + let defaultProps: TextBasedDataPanelProps; const dataViewsMock = dataViewPluginMocks.createStartContract(); beforeEach(() => { core = coreMock.createStart(); @@ -202,12 +202,12 @@ describe('TextBased Query Languages Data Panel', () => { }); it('should render a search box', async () => { - const wrapper = mountWithIntl(); + const wrapper = mountWithIntl(); expect(wrapper.find('[data-test-subj="lnsTextBasedLangugesFieldSearch"]').length).toEqual(1); }); it('should list all supported fields in the pattern', async () => { - const wrapper = mountWithIntl(); + const wrapper = mountWithIntl(); expect( wrapper .find('[data-test-subj="lnsTextBasedLanguagesPanelFields"]') @@ -217,7 +217,7 @@ describe('TextBased Query Languages Data Panel', () => { }); it('should list all supported fields in the pattern that match the search input', async () => { - const wrapper = mountWithIntl(); + const wrapper = mountWithIntl(); const searchBox = wrapper.find('[data-test-subj="lnsTextBasedLangugesFieldSearch"]'); act(() => { diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/datapanel.tsx b/x-pack/plugins/lens/public/datasources/text_based/datapanel.tsx similarity index 90% rename from x-pack/plugins/lens/public/text_based_languages_datasource/datapanel.tsx rename to x-pack/plugins/lens/public/datasources/text_based/datapanel.tsx index 9e15db381549d..925d92be5aa99 100644 --- a/x-pack/plugins/lens/public/text_based_languages_datasource/datapanel.tsx +++ b/x-pack/plugins/lens/public/datasources/text_based/datapanel.tsx @@ -17,23 +17,22 @@ import { isOfAggregateQueryType } from '@kbn/es-query'; import { ExpressionsStart } from '@kbn/expressions-plugin/public'; import { FieldButton } from '@kbn/react-field'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; -import { DatasourceDataPanelProps, DataType } from '../types'; -import type { TextBasedLanguagesPrivateState } from './types'; +import { DatasourceDataPanelProps, DataType } from '../../types'; +import type { TextBasedPrivateState } from './types'; import { getStateFromAggregateQuery } from './utils'; -import { DragDrop } from '../drag_drop'; -import { LensFieldIcon } from '../shared_components'; -import { ChildDragDropProvider } from '../drag_drop'; +import { DragDrop } from '../../drag_drop'; +import { LensFieldIcon } from '../../shared_components'; +import { ChildDragDropProvider } from '../../drag_drop'; -export type TextBasedLanguagesDataPanelProps = - DatasourceDataPanelProps & { - data: DataPublicPluginStart; - expressions: ExpressionsStart; - dataViews: DataViewsPublicPluginStart; - }; +export type TextBasedDataPanelProps = DatasourceDataPanelProps & { + data: DataPublicPluginStart; + expressions: ExpressionsStart; + dataViews: DataViewsPublicPluginStart; +}; const htmlId = htmlIdGenerator('datapanel-text-based-languages'); const fieldSearchDescriptionId = htmlId(); -export function TextBasedLanguagesDataPanel({ +export function TextBasedDataPanel({ setState, state, dragDropContext, @@ -44,7 +43,7 @@ export function TextBasedLanguagesDataPanel({ dateRange, expressions, dataViews, -}: TextBasedLanguagesDataPanelProps) { +}: TextBasedDataPanelProps) { const prevQuery = usePrevious(query); const [localState, setLocalState] = useState({ nameFilter: '' }); const clearLocalState = () => setLocalState((s) => ({ ...s, nameFilter: '' })); diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/fetch_data_from_aggregate_query.ts b/x-pack/plugins/lens/public/datasources/text_based/fetch_data_from_aggregate_query.ts similarity index 100% rename from x-pack/plugins/lens/public/text_based_languages_datasource/fetch_data_from_aggregate_query.ts rename to x-pack/plugins/lens/public/datasources/text_based/fetch_data_from_aggregate_query.ts diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/field_select.test.tsx b/x-pack/plugins/lens/public/datasources/text_based/field_select.test.tsx similarity index 96% rename from x-pack/plugins/lens/public/text_based_languages_datasource/field_select.test.tsx rename to x-pack/plugins/lens/public/datasources/text_based/field_select.test.tsx index f1051f3b8f61d..b344131747b1b 100644 --- a/x-pack/plugins/lens/public/text_based_languages_datasource/field_select.test.tsx +++ b/x-pack/plugins/lens/public/datasources/text_based/field_select.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import type { DatatableColumn } from '@kbn/expressions-plugin/public'; -import { FieldPicker, FieldOptionValue } from '../shared_components/field_picker'; +import { FieldPicker, FieldOptionValue } from '../../shared_components/field_picker'; import { FieldSelect, FieldSelectProps } from './field_select'; import { shallowWithIntl as shallow } from '@kbn/test-jest-helpers'; diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/field_select.tsx b/x-pack/plugins/lens/public/datasources/text_based/field_select.tsx similarity index 89% rename from x-pack/plugins/lens/public/text_based_languages_datasource/field_select.tsx rename to x-pack/plugins/lens/public/datasources/text_based/field_select.tsx index 63153bc87d59e..e7cb5451d31ab 100644 --- a/x-pack/plugins/lens/public/text_based_languages_datasource/field_select.tsx +++ b/x-pack/plugins/lens/public/datasources/text_based/field_select.tsx @@ -9,12 +9,12 @@ import React, { useMemo } from 'react'; import { EuiComboBoxOptionOption, EuiComboBoxProps } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import type { DatatableColumn } from '@kbn/expressions-plugin/public'; -import { FieldPicker, FieldOptionValue, FieldOption } from '../shared_components/field_picker'; -import type { TextBasedLanguagesLayerColumn } from './types'; -import type { DataType } from '../types'; +import { FieldPicker, FieldOptionValue, FieldOption } from '../../shared_components/field_picker'; +import type { TextBasedLayerColumn } from './types'; +import type { DataType } from '../../types'; export interface FieldSelectProps extends EuiComboBoxProps { - selectedField?: TextBasedLanguagesLayerColumn; + selectedField?: TextBasedLayerColumn; onChoose: (choice: FieldOptionValue) => void; existingFields: DatatableColumn[]; } diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/index.ts b/x-pack/plugins/lens/public/datasources/text_based/index.ts similarity index 71% rename from x-pack/plugins/lens/public/text_based_languages_datasource/index.ts rename to x-pack/plugins/lens/public/datasources/text_based/index.ts index b2cffc5659dbf..1041e94eb7c61 100644 --- a/x-pack/plugins/lens/public/text_based_languages_datasource/index.ts +++ b/x-pack/plugins/lens/public/datasources/text_based/index.ts @@ -10,31 +10,28 @@ import { Storage } from '@kbn/kibana-utils-plugin/public'; import { ExpressionsStart } from '@kbn/expressions-plugin/public'; import { DataPublicPluginSetup, DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; -import { EditorFrameSetup } from '../types'; +import { EditorFrameSetup } from '../../types'; -export interface TextBasedLanguageSetupPlugins { +export interface TextBasedSetupPlugins { data: DataPublicPluginSetup; editorFrame: EditorFrameSetup; } -export interface TextBasedLanguageStartPlugins { +export interface TextBasedStartPlugins { data: DataPublicPluginStart; dataViews: DataViewsPublicPluginStart; expressions: ExpressionsStart; } -export class TextBasedLanguagesDatasource { +export class TextBasedDatasource { constructor() {} - setup( - core: CoreSetup, - { editorFrame }: TextBasedLanguageSetupPlugins - ) { + setup(core: CoreSetup, { editorFrame }: TextBasedSetupPlugins) { editorFrame.registerDatasource(async () => { - const { getTextBasedLanguagesDatasource } = await import('../async_services'); + const { getTextBasedDatasource } = await import('../../async_services'); const [coreStart, { data, dataViews, expressions }] = await core.getStartServices(); - return getTextBasedLanguagesDatasource({ + return getTextBasedDatasource({ core: coreStart, storage: new Storage(localStorage), data, diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/layerpanel.test.tsx b/x-pack/plugins/lens/public/datasources/text_based/layerpanel.test.tsx similarity index 83% rename from x-pack/plugins/lens/public/text_based_languages_datasource/layerpanel.test.tsx rename to x-pack/plugins/lens/public/datasources/text_based/layerpanel.test.tsx index 7a3bf25b5e9e6..f0a9d147ddfd6 100644 --- a/x-pack/plugins/lens/public/text_based_languages_datasource/layerpanel.test.tsx +++ b/x-pack/plugins/lens/public/datasources/text_based/layerpanel.test.tsx @@ -7,12 +7,12 @@ import React from 'react'; import type { DatatableColumn } from '@kbn/expressions-plugin/public'; -import { TextBasedLanguagesPrivateState } from './types'; -import type { DataViewsState } from '../state_management/types'; +import { TextBasedPrivateState } from './types'; +import type { DataViewsState } from '../../state_management/types'; -import { TextBasedLanguageLayerPanelProps, LayerPanel } from './layerpanel'; +import { TextBasedLayerPanelProps, LayerPanel } from './layerpanel'; import { shallowWithIntl as shallow } from '@kbn/test-jest-helpers'; -import { ChangeIndexPattern } from '../shared_components/dataview_picker/dataview_picker'; +import { ChangeIndexPattern } from '../../shared_components/dataview_picker/dataview_picker'; const fields = [ { @@ -38,7 +38,7 @@ const fields = [ }, ] as DatatableColumn[]; -const initialState: TextBasedLanguagesPrivateState = { +const initialState: TextBasedPrivateState = { layers: { first: { index: '1', @@ -55,7 +55,7 @@ const initialState: TextBasedLanguagesPrivateState = { fieldList: fields, }; describe('Layer Data Panel', () => { - let defaultProps: TextBasedLanguageLayerPanelProps; + let defaultProps: TextBasedLayerPanelProps; beforeEach(() => { defaultProps = { diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/layerpanel.tsx b/x-pack/plugins/lens/public/datasources/text_based/layerpanel.tsx similarity index 75% rename from x-pack/plugins/lens/public/text_based_languages_datasource/layerpanel.tsx rename to x-pack/plugins/lens/public/datasources/text_based/layerpanel.tsx index 8f8e4a91242b1..879d28a607c7f 100644 --- a/x-pack/plugins/lens/public/text_based_languages_datasource/layerpanel.tsx +++ b/x-pack/plugins/lens/public/datasources/text_based/layerpanel.tsx @@ -8,16 +8,15 @@ import React from 'react'; import { I18nProvider } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; -import { DatasourceLayerPanelProps } from '../types'; -import { TextBasedLanguagesPrivateState } from './types'; -import { ChangeIndexPattern } from '../shared_components/dataview_picker/dataview_picker'; +import { DatasourceLayerPanelProps } from '../../types'; +import { TextBasedPrivateState } from './types'; +import { ChangeIndexPattern } from '../../shared_components/dataview_picker/dataview_picker'; -export interface TextBasedLanguageLayerPanelProps - extends DatasourceLayerPanelProps { - state: TextBasedLanguagesPrivateState; +export interface TextBasedLayerPanelProps extends DatasourceLayerPanelProps { + state: TextBasedPrivateState; } -export function LayerPanel({ state, layerId, dataViews }: TextBasedLanguageLayerPanelProps) { +export function LayerPanel({ state, layerId, dataViews }: TextBasedLayerPanelProps) { const layer = state.layers[layerId]; const dataView = dataViews.indexPatternRefs.find((ref) => ref.id === layer.index); const notFoundTitleLabel = i18n.translate('xpack.lens.layerPanel.missingDataView', { diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/mocks.ts b/x-pack/plugins/lens/public/datasources/text_based/mocks.ts similarity index 92% rename from x-pack/plugins/lens/public/text_based_languages_datasource/mocks.ts rename to x-pack/plugins/lens/public/datasources/text_based/mocks.ts index adca02ab2299d..8b191b815100e 100644 --- a/x-pack/plugins/lens/public/text_based_languages_datasource/mocks.ts +++ b/x-pack/plugins/lens/public/datasources/text_based/mocks.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DragContextState } from '../drag_drop'; +import { DragContextState } from '../../drag_drop'; export function createMockedDragDropContext(): jest.Mocked { return { diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/text_based_languages.test.ts b/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.test.ts similarity index 88% rename from x-pack/plugins/lens/public/text_based_languages_datasource/text_based_languages.test.ts rename to x-pack/plugins/lens/public/datasources/text_based/text_based_languages.test.ts index ae7e84c61b3c5..5f4df8492c9b3 100644 --- a/x-pack/plugins/lens/public/text_based_languages_datasource/text_based_languages.test.ts +++ b/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.test.ts @@ -8,14 +8,14 @@ import { coreMock } from '@kbn/core/public/mocks'; import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import { expressionsPluginMock } from '@kbn/expressions-plugin/public/mocks'; -import { TextBasedLanguagesPersistedState, TextBasedLanguagesPrivateState } from './types'; +import { TextBasedPersistedState, TextBasedPrivateState } from './types'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; -import { getTextBasedLanguagesDatasource } from './text_based_languages'; -import { generateId } from '../id_generator'; -import { DatasourcePublicAPI, Datasource } from '../types'; +import { getTextBasedDatasource } from './text_based_languages'; +import { generateId } from '../../id_generator'; +import { DatasourcePublicAPI, Datasource } from '../../types'; -jest.mock('../id_generator'); +jest.mock('../../id_generator'); const fieldsOne = [ { @@ -78,14 +78,11 @@ const expectedIndexPatterns = { const indexPatterns = expectedIndexPatterns; describe('IndexPattern Data Source', () => { - let baseState: TextBasedLanguagesPrivateState; - let textBasedLanguagesDatasource: Datasource< - TextBasedLanguagesPrivateState, - TextBasedLanguagesPersistedState - >; + let baseState: TextBasedPrivateState; + let TextBasedDatasource: Datasource; beforeEach(() => { - textBasedLanguagesDatasource = getTextBasedLanguagesDatasource({ + TextBasedDatasource = getTextBasedDatasource({ storage: {} as IStorageWrapper, core: coreMock.createStart(), data: dataPluginMock.createStartContract(), @@ -127,12 +124,12 @@ describe('IndexPattern Data Source', () => { }, }, ], - } as unknown as TextBasedLanguagesPrivateState; + } as unknown as TextBasedPrivateState; }); describe('uniqueLabels', () => { it('appends a suffix to duplicates', () => { - const map = textBasedLanguagesDatasource.uniqueLabels({ + const map = TextBasedDatasource.uniqueLabels({ layers: { a: { columns: [ @@ -154,7 +151,7 @@ describe('IndexPattern Data Source', () => { index: 'foo', }, }, - } as unknown as TextBasedLanguagesPrivateState); + } as unknown as TextBasedPrivateState); expect(map).toMatchInlineSnapshot(` Object { @@ -167,7 +164,7 @@ describe('IndexPattern Data Source', () => { describe('#getPersistedState', () => { it('should persist from saved state', async () => { - expect(textBasedLanguagesDatasource.getPersistableState(baseState)).toEqual({ + expect(TextBasedDatasource.getPersistableState(baseState)).toEqual({ state: { layers: baseState.layers, }, @@ -180,7 +177,7 @@ describe('IndexPattern Data Source', () => { describe('#insertLayer', () => { it('should insert an empty layer into the previous state', () => { - expect(textBasedLanguagesDatasource.insertLayer(baseState, 'newLayer')).toEqual({ + expect(TextBasedDatasource.insertLayer(baseState, 'newLayer')).toEqual({ ...baseState, layers: { ...baseState.layers, @@ -205,7 +202,7 @@ describe('IndexPattern Data Source', () => { describe('#removeLayer', () => { it('should remove a layer', () => { - expect(textBasedLanguagesDatasource.removeLayer(baseState, 'a')).toEqual({ + expect(TextBasedDatasource.removeLayer(baseState, 'a')).toEqual({ ...baseState, layers: { a: { @@ -229,7 +226,7 @@ describe('IndexPattern Data Source', () => { describe('#createEmptyLayer', () => { it('creates state with empty layers', () => { - expect(textBasedLanguagesDatasource.createEmptyLayer('index-pattern-id')).toEqual({ + expect(TextBasedDatasource.createEmptyLayer('index-pattern-id')).toEqual({ fieldList: [], layers: {}, indexPatternRefs: [], @@ -240,7 +237,7 @@ describe('IndexPattern Data Source', () => { describe('#getLayers', () => { it('should list the current layers', () => { expect( - textBasedLanguagesDatasource.getLayers({ + TextBasedDatasource.getLayers({ layers: { a: { columns: [ @@ -279,7 +276,7 @@ describe('IndexPattern Data Source', () => { index: 'foo', }, }, - } as unknown as TextBasedLanguagesPrivateState) + } as unknown as TextBasedPrivateState) ).toEqual(['a']); }); }); @@ -298,8 +295,8 @@ describe('IndexPattern Data Source', () => { name: 'Foo', }, }, - } as unknown as TextBasedLanguagesPrivateState; - const suggestions = textBasedLanguagesDatasource.getDatasourceSuggestionsForVisualizeField( + } as unknown as TextBasedPrivateState; + const suggestions = TextBasedDatasource.getDatasourceSuggestionsForVisualizeField( state, '1', '', @@ -417,8 +414,8 @@ describe('IndexPattern Data Source', () => { index: 'foo', }, }, - } as unknown as TextBasedLanguagesPrivateState; - expect(textBasedLanguagesDatasource.getErrorMessages(state, indexPatterns)).toEqual([ + } as unknown as TextBasedPrivateState; + expect(TextBasedDatasource.getErrorMessages(state, indexPatterns)).toEqual([ { longMessage: 'error 1', shortMessage: 'error 1' }, { longMessage: 'error 2', shortMessage: 'error 2' }, ]); @@ -466,9 +463,9 @@ describe('IndexPattern Data Source', () => { index: '1', }, }, - } as unknown as TextBasedLanguagesPrivateState; + } as unknown as TextBasedPrivateState; expect( - textBasedLanguagesDatasource.isTimeBased(state, { + TextBasedDatasource.isTimeBased(state, { ...indexPatterns, }) ).toEqual(true); @@ -513,9 +510,9 @@ describe('IndexPattern Data Source', () => { index: '1', }, }, - } as unknown as TextBasedLanguagesPrivateState; + } as unknown as TextBasedPrivateState; expect( - textBasedLanguagesDatasource.isTimeBased(state, { + TextBasedDatasource.isTimeBased(state, { ...indexPatterns, '1': { ...indexPatterns['1'], timeFieldName: undefined }, }) @@ -525,10 +522,8 @@ describe('IndexPattern Data Source', () => { describe('#toExpression', () => { it('should generate an empty expression when no columns are selected', async () => { - const state = textBasedLanguagesDatasource.initialize(); - expect(textBasedLanguagesDatasource.toExpression(state, 'first', indexPatterns)).toEqual( - null - ); + const state = TextBasedDatasource.initialize(); + expect(TextBasedDatasource.toExpression(state, 'first', indexPatterns)).toEqual(null); }); it('should generate an expression for an SQL query', async () => { @@ -576,9 +571,9 @@ describe('IndexPattern Data Source', () => { { id: '2', title: 'my-fake-restricted-pattern' }, { id: '3', title: 'my-compatible-pattern' }, ], - } as unknown as TextBasedLanguagesPrivateState; + } as unknown as TextBasedPrivateState; - expect(textBasedLanguagesDatasource.toExpression(queryBaseState, 'a', indexPatterns)) + expect(TextBasedDatasource.toExpression(queryBaseState, 'a', indexPatterns)) .toMatchInlineSnapshot(` Object { "chain": Array [ @@ -621,7 +616,7 @@ describe('IndexPattern Data Source', () => { let publicAPI: DatasourcePublicAPI; beforeEach(async () => { - publicAPI = textBasedLanguagesDatasource.getPublicAPI({ + publicAPI = TextBasedDatasource.getPublicAPI({ state: baseState, layerId: 'a', indexPatterns, @@ -676,9 +671,9 @@ describe('IndexPattern Data Source', () => { }, }, ], - } as unknown as TextBasedLanguagesPrivateState; + } as unknown as TextBasedPrivateState; - publicAPI = textBasedLanguagesDatasource.getPublicAPI({ + publicAPI = TextBasedDatasource.getPublicAPI({ state, layerId: 'a', indexPatterns, @@ -701,9 +696,9 @@ describe('IndexPattern Data Source', () => { }, }, ], - } as unknown as TextBasedLanguagesPrivateState; + } as unknown as TextBasedPrivateState; - publicAPI = textBasedLanguagesDatasource.getPublicAPI({ + publicAPI = TextBasedDatasource.getPublicAPI({ state, layerId: 'a', indexPatterns, diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/text_based_languages.tsx b/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx similarity index 89% rename from x-pack/plugins/lens/public/text_based_languages_datasource/text_based_languages.tsx rename to x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx index 7157f643c6e8c..d7897362e86c4 100644 --- a/x-pack/plugins/lens/public/text_based_languages_datasource/text_based_languages.tsx +++ b/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.tsx @@ -25,25 +25,25 @@ import { DataType, TableChangeType, DatasourceDimensionTriggerProps, -} from '../types'; -import { generateId } from '../id_generator'; +} from '../../types'; +import { generateId } from '../../id_generator'; import { toExpression } from './to_expression'; -import { TextBasedLanguagesDataPanel } from './datapanel'; +import { TextBasedDataPanel } from './datapanel'; import type { - TextBasedLanguagesPrivateState, - TextBasedLanguagesPersistedState, - TextBasedLanguagesLayerColumn, - TextBasedLanguageField, + TextBasedPrivateState, + TextBasedPersistedState, + TextBasedLayerColumn, + TextBasedField, } from './types'; import { FieldSelect } from './field_select'; -import type { Datasource, IndexPatternMap } from '../types'; +import type { Datasource, IndexPatternMap } from '../../types'; import { LayerPanel } from './layerpanel'; function getLayerReferenceName(layerId: string) { return `textBasedLanguages-datasource-layer-${layerId}`; } -export function getTextBasedLanguagesDatasource({ +export function getTextBasedDatasource({ core, storage, data, @@ -56,7 +56,7 @@ export function getTextBasedLanguagesDatasource({ expressions: ExpressionsStart; dataViews: DataViewsPublicPluginStart; }) { - const getSuggestionsForState = (state: TextBasedLanguagesPrivateState) => { + const getSuggestionsForState = (state: TextBasedPrivateState) => { return Object.entries(state.layers)?.map(([id, layer]) => { return { state: { @@ -83,7 +83,7 @@ export function getTextBasedLanguagesDatasource({ }); }; const getSuggestionsForVisualizeField = ( - state: TextBasedLanguagesPrivateState, + state: TextBasedPrivateState, indexPatternId: string, fieldName: string, indexPatterns: IndexPatternMap @@ -153,11 +153,8 @@ export function getTextBasedLanguagesDatasource({ return []; }; - const TextBasedLanguagesDatasource: Datasource< - TextBasedLanguagesPrivateState, - TextBasedLanguagesPersistedState - > = { - id: 'textBasedLanguages', + const TextBasedDatasource: Datasource = { + id: 'textBased', checkIntegrity: () => { return []; @@ -188,7 +185,7 @@ export function getTextBasedLanguagesDatasource({ return errors; }, initialize( - state?: TextBasedLanguagesPersistedState, + state?: TextBasedPersistedState, savedObjectReferences?, context?, indexPatternRefs?, @@ -217,7 +214,7 @@ export function getTextBasedLanguagesDatasource({ return Object.values(state.layers).map(({ index }) => index); }, - getPersistableState({ layers }: TextBasedLanguagesPrivateState) { + getPersistableState({ layers }: TextBasedPrivateState) { const savedObjectReferences: SavedObjectReference[] = []; Object.entries(layers).forEach(([layerId, { index, ...persistableLayer }]) => { if (index) { @@ -237,7 +234,7 @@ export function getTextBasedLanguagesDatasource({ if (!column || !indexPattern) return false; return true; }, - insertLayer(state: TextBasedLanguagesPrivateState, newLayerId: string) { + insertLayer(state: TextBasedPrivateState, newLayerId: string) { const layer = Object.values(state?.layers)?.[0]; const query = layer?.query; const columns = layer?.allColumns ?? []; @@ -267,7 +264,7 @@ export function getTextBasedLanguagesDatasource({ }; }, - removeLayer(state: TextBasedLanguagesPrivateState, layerId: string) { + removeLayer(state: TextBasedPrivateState, layerId: string) { const newLayers = { ...state.layers, [layerId]: { @@ -283,7 +280,7 @@ export function getTextBasedLanguagesDatasource({ }; }, - clearLayer(state: TextBasedLanguagesPrivateState, layerId: string) { + clearLayer(state: TextBasedPrivateState, layerId: string) { return { ...state, layers: { @@ -293,7 +290,7 @@ export function getTextBasedLanguagesDatasource({ }; }, - getLayers(state: TextBasedLanguagesPrivateState) { + getLayers(state: TextBasedPrivateState) { return state && state.layers ? Object.keys(state?.layers) : []; }, isTimeBased: (state, indexPatterns) => { @@ -306,7 +303,7 @@ export function getTextBasedLanguagesDatasource({ }) ); }, - getUsedDataView: (state: TextBasedLanguagesPrivateState, layerId?: string) => { + getUsedDataView: (state: TextBasedPrivateState, layerId?: string) => { if (!layerId) { const layers = Object.values(state.layers); return layers?.[0]?.index; @@ -331,13 +328,10 @@ export function getTextBasedLanguagesDatasource({ return toExpression(state, layerId); }, - renderDataPanel( - domElement: Element, - props: DatasourceDataPanelProps - ) { + renderDataPanel(domElement: Element, props: DatasourceDataPanelProps) { render( - + props: DatasourceDimensionTriggerProps ) => { - const columnLabelMap = TextBasedLanguagesDatasource.uniqueLabels(props.state); + const columnLabelMap = TextBasedDatasource.uniqueLabels(props.state); const layer = props.state.layers[props.layerId]; const selectedField = layer?.allColumns?.find((column) => column.columnId === props.columnId); let customLabel: string | undefined = columnLabelMap[props.columnId]; @@ -377,13 +371,13 @@ export function getTextBasedLanguagesDatasource({ ); }, - getRenderEventCounters(state: TextBasedLanguagesPrivateState): string[] { + getRenderEventCounters(state: TextBasedPrivateState): string[] { return []; }, renderDimensionEditor: ( domElement: Element, - props: DatasourceDimensionEditorProps + props: DatasourceDimensionEditorProps ) => { const fields = props.state.fieldList; const selectedField = props.state.layers[props.layerId]?.allColumns?.find( @@ -450,7 +444,7 @@ export function getTextBasedLanguagesDatasource({ renderLayerPanel: ( domElement: Element, - props: DatasourceLayerPanelProps + props: DatasourceLayerPanelProps ) => { render( @@ -460,7 +454,7 @@ export function getTextBasedLanguagesDatasource({ ); }, - uniqueLabels(state: TextBasedLanguagesPrivateState) { + uniqueLabels(state: TextBasedPrivateState) { const layers = state.layers; const columnLabelMap = {} as Record; const counts = {} as Record; @@ -536,9 +530,9 @@ export function getTextBasedLanguagesDatasource({ return false; }, - getPublicAPI({ state, layerId }: PublicAPIProps) { + getPublicAPI({ state, layerId }: PublicAPIProps) { return { - datasourceId: 'textBasedLanguages', + datasourceId: 'textBased', getTableSpec: () => { const columns = state.layers[layerId]?.columns.filter((c) => { @@ -555,7 +549,7 @@ export function getTextBasedLanguagesDatasource({ getOperationForColumnId: (columnId: string) => { const layer = state.layers[layerId]; const column = layer?.allColumns?.find((c) => c.columnId === columnId); - const columnLabelMap = TextBasedLanguagesDatasource.uniqueLabels(state); + const columnLabelMap = TextBasedDatasource.uniqueLabels(state); if (column) { return { @@ -591,9 +585,7 @@ export function getTextBasedLanguagesDatasource({ }; }, getDatasourceSuggestionsForField(state, draggedField) { - const field = state.fieldList.find( - (f) => f.id === (draggedField as TextBasedLanguageField).id - ); + const field = state.fieldList.find((f) => f.id === (draggedField as TextBasedField).id); if (!field) return []; return Object.entries(state.layers)?.map(([id, layer]) => { const newId = generateId(); @@ -650,14 +642,10 @@ export function getTextBasedLanguagesDatasource({ isEqual: () => true, }; - return TextBasedLanguagesDatasource; + return TextBasedDatasource; } -function blankLayer( - index: string, - query?: AggregateQuery, - columns?: TextBasedLanguagesLayerColumn[] -) { +function blankLayer(index: string, query?: AggregateQuery, columns?: TextBasedLayerColumn[]) { return { index, query, diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/to_expression.ts b/x-pack/plugins/lens/public/datasources/text_based/to_expression.ts similarity index 80% rename from x-pack/plugins/lens/public/text_based_languages_datasource/to_expression.ts rename to x-pack/plugins/lens/public/datasources/text_based/to_expression.ts index aa7a264673a3e..dba9a93555ce2 100644 --- a/x-pack/plugins/lens/public/text_based_languages_datasource/to_expression.ts +++ b/x-pack/plugins/lens/public/datasources/text_based/to_expression.ts @@ -7,13 +7,10 @@ import { Ast } from '@kbn/interpreter'; import { textBasedQueryStateToExpressionAst } from '@kbn/data-plugin/common'; -import type { OriginalColumn } from '../../common/types'; -import { TextBasedLanguagesPrivateState, TextBasedLanguagesLayer, IndexPatternRef } from './types'; +import type { OriginalColumn } from '../../../common/types'; +import { TextBasedPrivateState, TextBasedLayer, IndexPatternRef } from './types'; -function getExpressionForLayer( - layer: TextBasedLanguagesLayer, - refs: IndexPatternRef[] -): Ast | null { +function getExpressionForLayer(layer: TextBasedLayer, refs: IndexPatternRef[]): Ast | null { if (!layer.columns || layer.columns?.length === 0) { return null; } @@ -53,7 +50,7 @@ function getExpressionForLayer( return textBasedQueryToAst; } -export function toExpression(state: TextBasedLanguagesPrivateState, layerId: string) { +export function toExpression(state: TextBasedPrivateState, layerId: string) { if (state.layers[layerId]) { return getExpressionForLayer(state.layers[layerId], state.indexPatternRefs); } diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/types.ts b/x-pack/plugins/lens/public/datasources/text_based/types.ts similarity index 65% rename from x-pack/plugins/lens/public/text_based_languages_datasource/types.ts rename to x-pack/plugins/lens/public/datasources/text_based/types.ts index 11b9612624efd..0e30e0d517054 100644 --- a/x-pack/plugins/lens/public/text_based_languages_datasource/types.ts +++ b/x-pack/plugins/lens/public/datasources/text_based/types.ts @@ -7,33 +7,33 @@ import type { DatatableColumn } from '@kbn/expressions-plugin/public'; import type { AggregateQuery } from '@kbn/es-query'; import type { VisualizeFieldContext } from '@kbn/ui-actions-plugin/public'; -import type { VisualizeEditorContext } from '../types'; +import type { VisualizeEditorContext } from '../../types'; -export interface TextBasedLanguagesLayerColumn { +export interface TextBasedLayerColumn { columnId: string; fieldName: string; meta?: DatatableColumn['meta']; } -export interface TextBasedLanguageField { +export interface TextBasedField { id: string; field: string; } -export interface TextBasedLanguagesLayer { +export interface TextBasedLayer { index: string; query: AggregateQuery | undefined; - columns: TextBasedLanguagesLayerColumn[]; - allColumns: TextBasedLanguagesLayerColumn[]; + columns: TextBasedLayerColumn[]; + allColumns: TextBasedLayerColumn[]; timeField?: string; errors?: Error[]; } -export interface TextBasedLanguagesPersistedState { - layers: Record; +export interface TextBasedPersistedState { + layers: Record; } -export type TextBasedLanguagesPrivateState = TextBasedLanguagesPersistedState & { +export type TextBasedPrivateState = TextBasedPersistedState & { indexPatternRefs: IndexPatternRef[]; fieldList: DatatableColumn[]; initialContext?: VisualizeFieldContext | VisualizeEditorContext; diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/utils.test.ts b/x-pack/plugins/lens/public/datasources/text_based/utils.test.ts similarity index 97% rename from x-pack/plugins/lens/public/text_based_languages_datasource/utils.test.ts rename to x-pack/plugins/lens/public/datasources/text_based/utils.test.ts index 1e7096414d19e..1698ae536f44f 100644 --- a/x-pack/plugins/lens/public/text_based_languages_datasource/utils.test.ts +++ b/x-pack/plugins/lens/public/datasources/text_based/utils.test.ts @@ -9,14 +9,14 @@ import type { DatatableColumn } from '@kbn/expressions-plugin/public'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { expressionsPluginMock } from '@kbn/expressions-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; -import { mockDataViewsService } from '../data_views_service/mocks'; +import { mockDataViewsService } from '../../data_views_service/mocks'; import { getIndexPatternFromTextBasedQuery, loadIndexPatternRefs, getStateFromAggregateQuery, getAllColumns, } from './utils'; -import type { TextBasedLanguagesLayerColumn } from './types'; +import type { TextBasedLayerColumn } from './types'; import { type AggregateQuery } from '@kbn/es-query'; jest.mock('./fetch_data_from_aggregate_query', () => ({ @@ -92,7 +92,7 @@ describe('Text based languages utils', () => { type: 'number', }, }, - ] as TextBasedLanguagesLayerColumn[]; + ] as TextBasedLayerColumn[]; const columnsFromQuery = [ { name: 'timestamp', diff --git a/x-pack/plugins/lens/public/text_based_languages_datasource/utils.ts b/x-pack/plugins/lens/public/datasources/text_based/utils.ts similarity index 92% rename from x-pack/plugins/lens/public/text_based_languages_datasource/utils.ts rename to x-pack/plugins/lens/public/datasources/text_based/utils.ts index 5504cd39bd6a1..5078c967ff9e8 100644 --- a/x-pack/plugins/lens/public/text_based_languages_datasource/utils.ts +++ b/x-pack/plugins/lens/public/datasources/text_based/utils.ts @@ -10,14 +10,10 @@ import type { ExpressionsStart } from '@kbn/expressions-plugin/public'; import { type AggregateQuery, getIndexPatternFromSQLQuery } from '@kbn/es-query'; import type { DatatableColumn } from '@kbn/expressions-plugin/public'; -import { generateId } from '../id_generator'; +import { generateId } from '../../id_generator'; import { fetchDataFromAggregateQuery } from './fetch_data_from_aggregate_query'; -import type { - IndexPatternRef, - TextBasedLanguagesPrivateState, - TextBasedLanguagesLayerColumn, -} from './types'; +import type { IndexPatternRef, TextBasedPrivateState, TextBasedLayerColumn } from './types'; export async function loadIndexPatternRefs( indexPatternsService: DataViewsPublicPluginStart @@ -36,7 +32,7 @@ export async function loadIndexPatternRefs( } export const getAllColumns = ( - existingColumns: TextBasedLanguagesLayerColumn[], + existingColumns: TextBasedLayerColumn[], columnsFromQuery: DatatableColumn[] ) => { // filter out columns that do not exist on the query @@ -64,7 +60,7 @@ export const getAllColumns = ( }; export async function getStateFromAggregateQuery( - state: TextBasedLanguagesPrivateState, + state: TextBasedPrivateState, query: AggregateQuery, dataViews: DataViewsPublicPluginStart, data: DataPublicPluginStart, @@ -80,7 +76,7 @@ export async function getStateFromAggregateQuery( // get the id of the dataview const index = indexPatternRefs.find((r) => r.title === indexPattern)?.id ?? ''; let columnsFromQuery: DatatableColumn[] = []; - let allColumns: TextBasedLanguagesLayerColumn[] = []; + let allColumns: TextBasedLayerColumn[] = []; let timeFieldName; try { const table = await fetchDataFromAggregateQuery(query, dataViews, data, expressions); diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_helpers.ts b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_helpers.ts index c96a022f4aed2..81298a97f650e 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_helpers.ts +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_helpers.ts @@ -209,7 +209,7 @@ export function getVisualizeFieldSuggestions({ // suggestions for visualizing textbased languages if (visualizeTriggerFieldContext && 'query' in visualizeTriggerFieldContext) { if (visualizeTriggerFieldContext.query) { - return suggestions.find((s) => s.datasourceId === 'textBasedLanguages'); + return suggestions.find((s) => s.datasourceId === 'textBased'); } } diff --git a/x-pack/plugins/lens/public/embeddable/embeddable_component.tsx b/x-pack/plugins/lens/public/embeddable/embeddable_component.tsx index 98c8d363a45b7..56939b54299ce 100644 --- a/x-pack/plugins/lens/public/embeddable/embeddable_component.tsx +++ b/x-pack/plugins/lens/public/embeddable/embeddable_component.tsx @@ -22,7 +22,7 @@ import { } from '@kbn/embeddable-plugin/public'; import type { LensByReferenceInput, LensByValueInput } from './embeddable'; import type { Document } from '../persistence'; -import type { IndexPatternPersistedState } from '../indexpattern_datasource/types'; +import type { FormBasedPersistedState } from '../datasources/form_based/types'; import type { XYState } from '../visualizations/xy/types'; import type { PieVisualizationState, LegacyMetricState } from '../../common'; import type { DatatableVisualizationState } from '../visualizations/datatable/visualization'; @@ -37,7 +37,7 @@ type LensAttributes = Omit< visualizationType: TVisType; state: Omit & { datasourceStates: { - indexpattern: IndexPatternPersistedState; + formBased: FormBasedPersistedState; }; visualization: TVisState; }; diff --git a/x-pack/plugins/lens/public/index.ts b/x-pack/plugins/lens/public/index.ts index 9efe67c4283e3..54380bd7eec63 100644 --- a/x-pack/plugins/lens/public/index.ts +++ b/x-pack/plugins/lens/public/index.ts @@ -44,7 +44,7 @@ export type { DatatableVisualizationState } from './visualizations/datatable/vis export type { HeatmapVisualizationState } from './visualizations/heatmap/types'; export type { GaugeVisualizationState } from './visualizations/gauge/constants'; export type { - IndexPatternPersistedState, + FormBasedPersistedState, PersistedIndexPatternLayer, OperationType, IncompleteColumn, @@ -75,8 +75,8 @@ export type { FormulaPublicApi, StaticValueIndexPatternColumn, TimeScaleIndexPatternColumn, - IndexPatternLayer, -} from './indexpattern_datasource/types'; + FormBasedLayer, +} from './datasources/form_based/types'; export type { XYArgs, XYRender, diff --git a/x-pack/plugins/lens/public/plugin.ts b/x-pack/plugins/lens/public/plugin.ts index 6b06978befea7..c4d4cf9bfab9f 100644 --- a/x-pack/plugins/lens/public/plugin.ts +++ b/x-pack/plugins/lens/public/plugin.ts @@ -52,11 +52,11 @@ import type { AdvancedUiActionsSetup } from '@kbn/ui-actions-enhanced-plugin/pub import type { DocLinksStart } from '@kbn/core-doc-links-browser'; import type { EditorFrameService as EditorFrameServiceType } from './editor_frame_service'; import type { - IndexPatternDatasource as IndexPatternDatasourceType, - IndexPatternDatasourceSetupPlugins, + FormBasedDatasource as FormBasedDatasourceType, + FormBasedDatasourceSetupPlugins, FormulaPublicApi, -} from './indexpattern_datasource'; -import type { TextBasedLanguagesDatasource as TextBasedLanguagesDatasourceType } from './text_based_languages_datasource'; +} from './datasources/form_based'; +import type { TextBasedDatasource as TextBasedDatasourceType } from './datasources/text_based'; import type { XyVisualization as XyVisualizationType, @@ -231,8 +231,8 @@ export class LensPlugin { private editorFrameService: EditorFrameServiceType | undefined; private editorFrameSetup: EditorFrameSetup | undefined; private queuedVisualizations: Array Promise)> = []; - private indexpatternDatasource: IndexPatternDatasourceType | undefined; - private textBasedLanguagesDatasource: TextBasedLanguagesDatasourceType | undefined; + private FormBasedDatasource: FormBasedDatasourceType | undefined; + private TextBasedDatasource: TextBasedDatasourceType | undefined; private xyVisualization: XyVisualizationType | undefined; private legacyMetricVisualization: LegacyMetricVisualizationType | undefined; private metricVisualization: MetricVisualizationType | undefined; @@ -423,19 +423,19 @@ export class LensPlugin { const { DatatableVisualization, EditorFrameService, - IndexPatternDatasource, + FormBasedDatasource, XyVisualization, LegacyMetricVisualization, MetricVisualization, PieVisualization, HeatmapVisualization, GaugeVisualization, - TextBasedLanguagesDatasource, + TextBasedDatasource, } = await import('./async_services'); this.datatableVisualization = new DatatableVisualization(); this.editorFrameService = new EditorFrameService(); - this.indexpatternDatasource = new IndexPatternDatasource(); - this.textBasedLanguagesDatasource = new TextBasedLanguagesDatasource(); + this.FormBasedDatasource = new FormBasedDatasource(); + this.TextBasedDatasource = new TextBasedDatasource(); this.xyVisualization = new XyVisualization(); this.legacyMetricVisualization = new LegacyMetricVisualization(); this.metricVisualization = new MetricVisualization(); @@ -445,7 +445,7 @@ export class LensPlugin { const editorFrameSetupInterface = this.editorFrameService.setup(); - const dependencies: IndexPatternDatasourceSetupPlugins & + const dependencies: FormBasedDatasourceSetupPlugins & XyVisualizationPluginSetupPlugins & DatatableVisualizationPluginSetupPlugins & LegacyMetricVisualizationPluginSetupPlugins & @@ -458,8 +458,8 @@ export class LensPlugin { formatFactory, eventAnnotation, }; - this.indexpatternDatasource.setup(core, dependencies); - this.textBasedLanguagesDatasource.setup(core, dependencies); + this.FormBasedDatasource.setup(core, dependencies); + this.TextBasedDatasource.setup(core, dependencies); this.xyVisualization.setup(core, dependencies); this.datatableVisualization.setup(core, dependencies); this.legacyMetricVisualization.setup(core, dependencies); diff --git a/x-pack/plugins/lens/public/shared_components/field_picker/lens_field_icon.tsx b/x-pack/plugins/lens/public/shared_components/field_picker/lens_field_icon.tsx index fabb8cab6fd0e..e3be012647e8c 100644 --- a/x-pack/plugins/lens/public/shared_components/field_picker/lens_field_icon.tsx +++ b/x-pack/plugins/lens/public/shared_components/field_picker/lens_field_icon.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { FieldIcon, FieldIconProps } from '@kbn/react-field'; import { DataType } from '../../types'; -import { normalizeOperationDataType } from '../../indexpattern_datasource/pure_utils'; +import { normalizeOperationDataType } from '../../datasources/form_based/pure_utils'; export function LensFieldIcon({ type, ...rest }: FieldIconProps & { type: DataType }) { return ( diff --git a/x-pack/plugins/lens/public/state_management/init_middleware/load_initial.ts b/x-pack/plugins/lens/public/state_management/init_middleware/load_initial.ts index 5b942eff4a683..69e93f7a763a3 100644 --- a/x-pack/plugins/lens/public/state_management/init_middleware/load_initial.ts +++ b/x-pack/plugins/lens/public/state_management/init_middleware/load_initial.ts @@ -117,7 +117,7 @@ export function loadInitial( let activeDatasourceId: string | undefined; if (initialContext && 'query' in initialContext) { - activeDatasourceId = 'textBasedLanguages'; + activeDatasourceId = 'textBased'; } if ( diff --git a/x-pack/plugins/lens/public/trigger_actions/open_in_discover_drilldown.test.tsx b/x-pack/plugins/lens/public/trigger_actions/open_in_discover_drilldown.test.tsx index 84ae2a21a9a92..c4e8fe050df23 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_in_discover_drilldown.test.tsx +++ b/x-pack/plugins/lens/public/trigger_actions/open_in_discover_drilldown.test.tsx @@ -26,6 +26,13 @@ jest.mock('./open_in_discover_helpers', () => ({ describe('open in discover drilldown', () => { let drilldown: OpenInDiscoverDrilldown; + const originalOpen = window.open; + + // Prevent the JSDOM error about missing "window.open" + beforeAll(() => { + window.open = jest.fn(); + }); + beforeEach(() => { drilldown = new OpenInDiscoverDrilldown({ discover: {} as DiscoverSetup, @@ -34,6 +41,11 @@ describe('open in discover drilldown', () => { application: () => ({} as ApplicationStart), }); }); + + afterAll(() => { + window.open = originalOpen; + }); + it('provides UI to edit config', () => { const Component = (drilldown as unknown as { ReactCollectConfig: React.FC }) .ReactCollectConfig; diff --git a/x-pack/plugins/lens/public/types.ts b/x-pack/plugins/lens/public/types.ts index 29aff3d428690..bed1acfad574f 100644 --- a/x-pack/plugins/lens/public/types.ts +++ b/x-pack/plugins/lens/public/types.ts @@ -47,7 +47,7 @@ import { LENS_EDIT_PAGESIZE_ACTION, } from './visualizations/datatable/components/constants'; import type { LensInspector } from './lens_inspector_service'; -import type { FormatSelectorOptions } from './indexpattern_datasource/dimension_panel/format_selector'; +import type { FormatSelectorOptions } from './datasources/form_based/dimension_panel/format_selector'; import type { DataViewsState } from './state_management/types'; import type { IndexPatternServiceAPI } from './data_views_service/service'; import type { Document } from './persistence/saved_object_store'; diff --git a/x-pack/plugins/lens/public/visualizations/datatable/visualization.tsx b/x-pack/plugins/lens/public/visualizations/datatable/visualization.tsx index ad5e8118c5226..27ac3d5b092b9 100644 --- a/x-pack/plugins/lens/public/visualizations/datatable/visualization.tsx +++ b/x-pack/plugins/lens/public/visualizations/datatable/visualization.tsx @@ -29,7 +29,7 @@ import type { LayerType } from '../../../common'; import { getDefaultSummaryLabel } from '../../../common/expressions/datatable/summary'; import type { ColumnState, SortingState, PagingState } from '../../../common/expressions'; import { DataTableToolbar } from './components/toolbar'; -import type { IndexPatternLayer } from '../../indexpattern_datasource/types'; +import type { FormBasedLayer } from '../../datasources/form_based/types'; export interface DatatableVisualizationState { columns: ColumnState[]; @@ -45,7 +45,7 @@ export interface DatatableVisualizationState { interface DatatableDatasourceState { [prop: string]: unknown; - layers: IndexPatternLayer[]; + layers: FormBasedLayer[]; } export interface DatatableSuggestion extends Suggestion { diff --git a/x-pack/plugins/lens/public/visualizations/gauge/suggestions.ts b/x-pack/plugins/lens/public/visualizations/gauge/suggestions.ts index e90aa5e7d0895..424accee1572c 100644 --- a/x-pack/plugins/lens/public/visualizations/gauge/suggestions.ts +++ b/x-pack/plugins/lens/public/visualizations/gauge/suggestions.ts @@ -41,7 +41,7 @@ export const getSuggestions: Visualization['getSuggesti if ( hasLayerMismatch(keptLayerIds, table) || isNotNumericMetric(table) || - (!isGauge && table.columns.length > 1) || + (state && !isGauge && table.columns.length > 1) || (isGauge && (numberOfAccessors !== table.columns.length || table.changeType === 'initial')) ) { return []; diff --git a/x-pack/plugins/lens/public/visualizations/gauge/visualization.tsx b/x-pack/plugins/lens/public/visualizations/gauge/visualization.tsx index 4ea17a2136aa7..f78529a17c8f4 100644 --- a/x-pack/plugins/lens/public/visualizations/gauge/visualization.tsx +++ b/x-pack/plugins/lens/public/visualizations/gauge/visualization.tsx @@ -24,7 +24,7 @@ import { } from '@kbn/expression-gauge-plugin/public'; import { IconChartHorizontalBullet, IconChartVerticalBullet } from '@kbn/chart-icons'; import { LayerTypes } from '@kbn/expression-xy-plugin/public'; -import type { DatasourceLayers, OperationMetadata, Visualization } from '../../types'; +import type { DatasourceLayers, OperationMetadata, Suggestion, Visualization } from '../../types'; import { getSuggestions } from './suggestions'; import { GROUP_ID, @@ -37,6 +37,7 @@ import { applyPaletteParams } from '../../shared_components'; import { GaugeDimensionEditor } from './dimension_editor'; import { generateId } from '../../id_generator'; import { getAccessorsFromState } from './utils'; +import { FormBasedLayer } from '../..'; const groupLabelForGauge = i18n.translate('xpack.lens.metric.groupLabel', { defaultMessage: 'Goal and single value', @@ -47,6 +48,16 @@ interface GaugeVisualizationDeps { theme: ThemeServiceStart; } +interface GaugeDatasourceState { + [prop: string]: unknown; + layers: FormBasedLayer[]; +} + +export interface GaugeSuggestion extends Suggestion { + datasourceState: GaugeDatasourceState; + visualizationState: GaugeVisualizationState; +} + export const isNumericMetric = (op: OperationMetadata) => !op.isBucketed && op.dataType === 'number'; @@ -543,4 +554,25 @@ export const getGaugeVisualization = ({ return warnings; }, + + getSuggestionFromConvertToLensContext({ suggestions, context }) { + const allSuggestions = suggestions as GaugeSuggestion[]; + return { + ...allSuggestions[0], + datasourceState: { + ...allSuggestions[0].datasourceState, + layers: allSuggestions.reduce( + (acc, s) => ({ + ...acc, + ...s.datasourceState.layers, + }), + {} + ), + }, + visualizationState: { + ...allSuggestions[0].visualizationState, + ...context.configuration, + }, + }; + }, }); diff --git a/x-pack/plugins/lens/public/visualizations/metric/visualization.tsx b/x-pack/plugins/lens/public/visualizations/metric/visualization.tsx index e3b42fedc45e4..5fe14fb58cc21 100644 --- a/x-pack/plugins/lens/public/visualizations/metric/visualization.tsx +++ b/x-pack/plugins/lens/public/visualizations/metric/visualization.tsx @@ -31,8 +31,8 @@ import { GROUP_ID, LENS_METRIC_ID } from './constants'; import { DimensionEditor } from './dimension_editor'; import { Toolbar } from './toolbar'; import { generateId } from '../../id_generator'; -import { FormatSelectorOptions } from '../../indexpattern_datasource/dimension_panel/format_selector'; -import { IndexPatternLayer } from '../../indexpattern_datasource/types'; +import { FormatSelectorOptions } from '../../datasources/form_based/dimension_panel/format_selector'; +import { FormBasedLayer } from '../../datasources/form_based/types'; export const DEFAULT_MAX_COLUMNS = 3; @@ -59,7 +59,7 @@ export interface MetricVisualizationState { interface MetricDatasourceState { [prop: string]: unknown; - layers: IndexPatternLayer[]; + layers: FormBasedLayer[]; } export interface MetricSuggestion extends Suggestion { diff --git a/x-pack/plugins/lens/public/visualizations/partition/suggestions.ts b/x-pack/plugins/lens/public/visualizations/partition/suggestions.ts index 25742f7cab033..961b6a68e745c 100644 --- a/x-pack/plugins/lens/public/visualizations/partition/suggestions.ts +++ b/x-pack/plugins/lens/public/visualizations/partition/suggestions.ts @@ -284,6 +284,7 @@ export function suggestions({ ...state.layers[0], layerId: table.layerId, primaryGroups: groups.map((col) => col.columnId), + secondaryGroups: [], metric: metricColumnId, categoryDisplay: CategoryDisplay.DEFAULT, layerType: LayerTypes.DATA, diff --git a/x-pack/plugins/lens/public/visualizations/partition/visualization.tsx b/x-pack/plugins/lens/public/visualizations/partition/visualization.tsx index 49a485debcf27..17f03a44f666b 100644 --- a/x-pack/plugins/lens/public/visualizations/partition/visualization.tsx +++ b/x-pack/plugins/lens/public/visualizations/partition/visualization.tsx @@ -37,11 +37,11 @@ import { suggestions } from './suggestions'; import { PartitionChartsMeta } from './partition_charts_meta'; import { DimensionEditor, PieToolbar } from './toolbar'; import { checkTableForContainsSmallValues } from './render_helpers'; -import type { IndexPatternLayer } from '../..'; +import type { FormBasedLayer } from '../..'; interface DatatableDatasourceState { [prop: string]: unknown; - layers: IndexPatternLayer[]; + layers: FormBasedLayer[]; } export interface PartitionSuggestion extends Suggestion { @@ -201,6 +201,7 @@ export const getPieVisualization = ({ supportsMoreColumns: totalNonCollapsedAccessors < PartitionChartsMeta.pie.maxBuckets, dimensionsTooMany: totalNonCollapsedAccessors - PartitionChartsMeta.pie.maxBuckets, dataTestSubj: 'lnsPie_sliceByDimensionPanel', + hideGrouping: true, }; case 'mosaic': return { @@ -229,6 +230,7 @@ export const getPieVisualization = ({ dimensionsTooMany: totalNonCollapsedAccessors - PartitionChartsMeta[state.shape].maxBuckets, dataTestSubj: 'lnsPie_groupByDimensionPanel', + hideGrouping: state.shape === 'treemap', }; } }; diff --git a/x-pack/plugins/lens/public/visualizations/xy/visualization.test.ts b/x-pack/plugins/lens/public/visualizations/xy/visualization.test.ts index 6c2d61d7bb869..8c6da8bf95a6b 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/visualization.test.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/visualization.test.ts @@ -28,7 +28,7 @@ import { EventAnnotationConfig } from '@kbn/event-annotation-plugin/common'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import { DataViewsState } from '../../state_management'; -import { createMockedIndexPattern } from '../../indexpattern_datasource/mocks'; +import { createMockedIndexPattern } from '../../datasources/form_based/mocks'; import { createMockDataViewsState } from '../../data_views_service/mocks'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/index.test.tsx b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/index.test.tsx index 7d581d50d0859..185a73c64d4e6 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/index.test.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/index.test.tsx @@ -18,7 +18,7 @@ import { chartPluginMock } from '@kbn/charts-plugin/public/mocks'; import moment from 'moment'; import { EventAnnotationConfig } from '@kbn/event-annotation-plugin/common'; import { createMockDataViewsState } from '../../../../data_views_service/mocks'; -import { createMockedIndexPattern } from '../../../../indexpattern_datasource/mocks'; +import { createMockedIndexPattern } from '../../../../datasources/form_based/mocks'; import { act } from 'react-dom/test-utils'; import { EuiButtonGroup } from '@elastic/eui'; diff --git a/x-pack/plugins/lens/readme.md b/x-pack/plugins/lens/readme.md index d8b80e864be58..d276a45eb00ac 100644 --- a/x-pack/plugins/lens/readme.md +++ b/x-pack/plugins/lens/readme.md @@ -82,7 +82,7 @@ References (`references`) are regular saved object references forming a graph of ### Datasource state -The data source state (`state.datasourceStates.indexPattern.layers`) contains the configuration state of the data fetching and processing part of Lens. It's not specific to a certain representation (xy, pie, gauge, ...), but instead it defines a data table per layer made out of columns with various properties. This data table is passed over to the visualization state which maps it to various dimensions of the specific visualization. Layer and columns have unique ids which are shared amongst visualization and datasource - it's important to make sure they are always in sync. The keys of the `state.datasourceStates.indexPattern.layers` object are the layer ids. Lens editor chooses uuids for these, but when programmatically generating Lens attributes, any string can be used for them. The `layers[].columns` object is constructed in a similar way (keys represent the column ids). The `operationType` property defines the type of the column, other properties depend on the specific operation. Types for individual parts of the datasource state are provided (check the `lens/public` export, e.g. there's the `MaxIndexPatternColumn` for a column of operation type `max`) +The data source state (`state.datasourceStates.formBased.layers`) contains the configuration state of the data fetching and processing part of Lens. It's not specific to a certain representation (xy, pie, gauge, ...), but instead it defines a data table per layer made out of columns with various properties. This data table is passed over to the visualization state which maps it to various dimensions of the specific visualization. Layer and columns have unique ids which are shared amongst visualization and datasource - it's important to make sure they are always in sync. The keys of the `state.datasourceStates.formBased.layers` object are the layer ids. Lens editor chooses uuids for these, but when programmatically generating Lens attributes, any string can be used for them. The `layers[].columns` object is constructed in a similar way (keys represent the column ids). The `operationType` property defines the type of the column, other properties depend on the specific operation. Types for individual parts of the datasource state are provided (check the `lens/public` export, e.g. there's the `MaxIndexPatternColumn` for a column of operation type `max`) ### Visualization state diff --git a/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts b/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts index 8b977fbce5742..42846e84377dd 100644 --- a/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts +++ b/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts @@ -7,6 +7,7 @@ import { EmbeddableRegistryDefinition } from '@kbn/embeddable-plugin/server'; import type { SerializableRecord } from '@kbn/utility-types'; +import type { SavedObject } from '@kbn/core-saved-objects-common'; import { mergeMigrationFunctionMaps, MigrateFunctionsObject, @@ -31,6 +32,7 @@ import { getLensDataViewMigrations, commonMigrateMetricIds, commonMigratePartitionChartGroups, + commonMigrateIndexPatternDatasource, } from '../migrations/common_migrations'; import { CustomVisualizationMigrations, @@ -155,6 +157,15 @@ export const makeLensEmbeddableFactory = attributes: migratedLensState, } as unknown as SerializableRecord; }, + '8.6.0': (state) => { + const lensState = state as unknown as SavedObject>; + + const migratedLensState = commonMigrateIndexPatternDatasource(lensState.attributes); + return { + ...lensState, + attributes: migratedLensState, + } as unknown as SerializableRecord; + }, }), getLensCustomVisualizationMigrations(customVisualizationMigrations) ), diff --git a/x-pack/plugins/lens/server/migrations/common_migrations.ts b/x-pack/plugins/lens/server/migrations/common_migrations.ts index 4afe60729920f..b56f4b691911b 100644 --- a/x-pack/plugins/lens/server/migrations/common_migrations.ts +++ b/x-pack/plugins/lens/server/migrations/common_migrations.ts @@ -34,6 +34,7 @@ import { XYVisStatePre850, VisState850, LensDocShape850, + LensDocShape860, } from './types'; import { DOCUMENT_FIELD_NAME, LegacyMetricState } from '../../common'; import { isPartitionShape } from '../../common/visualizations'; @@ -477,6 +478,22 @@ export const commonMigrateMetricIds = ( return newAttributes; }; +export const commonMigrateIndexPatternDatasource = ( + attributes: LensDocShape850 +): LensDocShape860 => { + const newAttrs = { + ...attributes, + state: { + ...attributes.state, + datasourceStates: { + formBased: attributes.state.datasourceStates.indexpattern, + }, + }, + }; + + return newAttrs; +}; + export const commonMigratePartitionChartGroups = ( attributes: LensDocShape850<{ shape: string; diff --git a/x-pack/plugins/lens/server/migrations/saved_object_migrations.test.ts b/x-pack/plugins/lens/server/migrations/saved_object_migrations.test.ts index fcb1e2a5722f1..54504b9201f67 100644 --- a/x-pack/plugins/lens/server/migrations/saved_object_migrations.test.ts +++ b/x-pack/plugins/lens/server/migrations/saved_object_migrations.test.ts @@ -2363,4 +2363,100 @@ describe('Lens migrations', () => { expect(result.attributes.visualizationType).toBe('lnsMetric'); }); }); + + describe('8.6.0 migrates indexpattern datasource', () => { + const context = { log: { warn: () => {} } } as unknown as SavedObjectMigrationContext; + const example = { + type: 'lens', + id: 'mock-saved-object-id', + attributes: { + state: { + datasourceMetaData: { + filterableIndexPatterns: [ + { + id: 'logstash-*', + title: 'logstash-*', + }, + ], + }, + datasourceStates: { + indexpattern: { + currentIndexPatternId: 'logstash-*', + layers: { + 'c61a8afb-a185-4fae-a064-fb3846f6c451': { + columnOrder: ['2cd09808-3915-49f4-b3b0-82767eba23f7'], + columns: { + '2cd09808-3915-49f4-b3b0-82767eba23f7': { + dataType: 'number', + isBucketed: false, + label: 'Maximum of bytes', + operationType: 'max', + scale: 'ratio', + sourceField: 'bytes', + }, + 'd3e62a7a-c259-4fff-a2fc-eebf20b7008a': { + dataType: 'number', + isBucketed: false, + label: 'Minimum of bytes', + operationType: 'min', + scale: 'ratio', + sourceField: 'bytes', + }, + 'd6e40cea-6299-43b4-9c9d-b4ee305a2ce8': { + dataType: 'date', + isBucketed: true, + label: 'Date Histogram of @timestamp', + operationType: 'date_histogram', + params: { + interval: 'auto', + }, + scale: 'interval', + sourceField: '@timestamp', + }, + }, + indexPatternId: 'logstash-*', + }, + }, + }, + }, + filters: [], + query: { + language: 'kuery', + query: '', + }, + visualization: { + accessor: '2cd09808-3915-49f4-b3b0-82767eba23f7', + isHorizontal: false, + layerId: 'c61a8afb-a185-4fae-a064-fb3846f6c451', + layers: [ + { + accessors: [ + 'd3e62a7a-c259-4fff-a2fc-eebf20b7008a', + '26ef70a9-c837-444c-886e-6bd905ee7335', + ], + layerId: 'c61a8afb-a185-4fae-a064-fb3846f6c451', + seriesType: 'area', + splitAccessor: '54cd64ed-2a44-4591-af84-b2624504569a', + xAccessor: 'd6e40cea-6299-43b4-9c9d-b4ee305a2ce8', + }, + ], + legend: { + isVisible: true, + position: 'right', + }, + preferredSeriesType: 'area', + }, + }, + title: 'Artistpreviouslyknownaslens', + visualizationType: 'lnsXY', + }, + }; + + it('migrates the indexpattern datasource to formBased', () => { + const result = migrations['8.6.0'](example, context); + expect(result.attributes.state.datasourceStates.formBased).toBe( + example.attributes.state.datasourceStates.indexpattern + ); + }); + }); }); diff --git a/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts b/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts index 2f02ca358fcc0..8e4914b94fe83 100644 --- a/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts +++ b/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts @@ -38,6 +38,7 @@ import { LensDocShape850, LensDocShape840, VisState850, + LensDocShape860, } from './types'; import { commonRenameOperationsForFormula, @@ -59,6 +60,7 @@ import { getLensDataViewMigrations, commonMigrateMetricIds, commonMigratePartitionChartGroups, + commonMigrateIndexPatternDatasource, } from './common_migrations'; interface LensDocShapePre710 { @@ -533,6 +535,13 @@ const migrateMetricIds: SavedObjectMigrationFn attributes: commonMigrateMetricIds(doc.attributes), }); +const migrateIndexPatternDatasource: SavedObjectMigrationFn = ( + doc +) => ({ + ...doc, + attributes: commonMigrateIndexPatternDatasource(doc.attributes), +}); + const migratePartitionChartGroups: SavedObjectMigrationFn = ( doc ) => ({ @@ -566,6 +575,7 @@ const lensMigrations: SavedObjectMigrationMap = { ), '8.3.0': flow(lockOldMetricVisSettings, preserveOldLegendSizeDefault, fixValueLabelsInXY), '8.5.0': flow(migrateMetricIds, enrichAnnotationLayers, migratePartitionChartGroups), + '8.6.0': flow(migrateIndexPatternDatasource), }; export const getAllMigrations = ( diff --git a/x-pack/plugins/lens/server/migrations/types.ts b/x-pack/plugins/lens/server/migrations/types.ts index 87c993a712e01..061ba113f734a 100644 --- a/x-pack/plugins/lens/server/migrations/types.ts +++ b/x-pack/plugins/lens/server/migrations/types.ts @@ -303,3 +303,24 @@ export type VisState840 = VisState830; export type LensDocShape840 = LensDocShape830; export type LensDocShape850 = LensDocShape840; + +export type LensDocShape860 = Omit< + LensDocShape850, + 'state' +> & { + state: Omit['state'], 'datasourceStates'> & { + datasourceStates: { + // This is hardcoded as our only datasource + formBased: { + currentIndexPatternId: string; + layers: Record< + string, + { + columnOrder: string[]; + columns: Record>; + } + >; + }; + }; + }; +}; diff --git a/x-pack/plugins/licensing/common/license_update.ts b/x-pack/plugins/licensing/common/license_update.ts index b674f4a066ce3..b344d8ce2d16a 100644 --- a/x-pack/plugins/licensing/common/license_update.ts +++ b/x-pack/plugins/licensing/common/license_update.ts @@ -39,11 +39,11 @@ export function createLicenseUpdate( const startWithArgs = initialValues ? [undefined, initialValues] : [undefined]; const license$: Observable = fetched$.pipe( - shareReplay(1), startWith(...startWithArgs), pairwise(), filter(([previous, next]) => hasLicenseInfoChanged(previous, next!)), - map(([, next]) => next!) + map(([, next]) => next!), + shareReplay(1) ); // start periodic license fetch right away diff --git a/x-pack/plugins/ml/public/application/components/ml_entity_selector/index.ts b/x-pack/plugins/ml/public/application/components/ml_entity_selector/index.ts new file mode 100644 index 0000000000000..4caa8db2deb83 --- /dev/null +++ b/x-pack/plugins/ml/public/application/components/ml_entity_selector/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 { MlEntitySelector, type MlEntitySelectorProps } from './ml_entity_selector'; diff --git a/x-pack/plugins/ml/public/application/components/ml_entity_selector/ml_entity_selector.test.tsx b/x-pack/plugins/ml/public/application/components/ml_entity_selector/ml_entity_selector.test.tsx new file mode 100644 index 0000000000000..8ae78666f2afb --- /dev/null +++ b/x-pack/plugins/ml/public/application/components/ml_entity_selector/ml_entity_selector.test.tsx @@ -0,0 +1,210 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { render, waitFor, screen } from '@testing-library/react'; +import { MlEntitySelector } from './ml_entity_selector'; +import { useMlApiContext } from '../../contexts/kibana'; +import { MlApiServices } from '../../services/ml_api_service'; +import { useToastNotificationService } from '../../services/toast_notification_service'; + +jest.mock('../../contexts/kibana'); +jest.mock('../../services/toast_notification_service'); + +describe('MlEntitySelector', () => { + const getAllJobAndGroupIds = jest.fn(() => { + return Promise.resolve({ jobIds: ['ad_01', 'ad_02'] }); + }); + + const getDataFrameAnalytics = jest.fn(() => { + return Promise.resolve({ + count: 2, + data_frame_analytics: [{ id: 'dfa_01' }, { id: 'dfa_02' }], + }); + }); + + const getTrainedModels = jest.fn(() => { + return Promise.resolve([{ model_id: 'model_01' }]); + }); + + (useMlApiContext as jest.MockedFunction).mockImplementation(() => { + return { + jobs: { + getAllJobAndGroupIds, + }, + dataFrameAnalytics: { + getDataFrameAnalytics, + }, + trainedModels: { + getTrainedModels, + }, + } as unknown as jest.Mocked; + }); + + beforeEach(() => {}); + + afterEach(() => { + jest.clearAllMocks(); + }); + + test('fetches all available options on mount by default', async () => { + const { getByTestId } = render(); + + await waitFor(() => { + expect(getByTestId('mlEntitySelector_loaded')).toBeInTheDocument(); + }); + + expect(getTrainedModels).toHaveBeenCalledTimes(1); + expect(getAllJobAndGroupIds).toHaveBeenCalledTimes(1); + expect(getDataFrameAnalytics).toHaveBeenCalledTimes(1); + }); + + test('fetches requested entity types on mount', async () => { + const { getByTestId } = render(); + + await waitFor(() => { + expect(getByTestId('mlEntitySelector_loaded')).toBeInTheDocument(); + }); + + expect(getTrainedModels).not.toHaveBeenCalled(); + expect(getDataFrameAnalytics).not.toHaveBeenCalled(); + expect(getAllJobAndGroupIds).toHaveBeenCalledTimes(1); + }); + + test('marks selected entities', async () => { + const { getByTestId } = render( + + ); + + await waitFor(() => { + expect(getByTestId('mlEntitySelector_loaded')).toBeInTheDocument(); + }); + + // Assert available options to select + const optionsContainer = await screen.findByTestId( + 'comboBoxOptionsList mlEntitySelector_loaded-optionsList' + ); + const optionElements = optionsContainer.querySelectorAll('[data-test-subj="mlAdJobOption"]'); + expect(optionElements).toHaveLength(1); + expect(optionElements[0]).toHaveAttribute('id', 'anomaly_detector:ad_02'); + expect(optionsContainer.querySelectorAll('[data-test-subj="mlDfaJobOption"]')).toHaveLength(2); + expect( + optionsContainer.querySelectorAll('[data-test-subj="mlTrainedModelOption"]') + ).toHaveLength(1); + + // Assert selected + const comboBoxInput = getByTestId('comboBoxInput'); + expect(comboBoxInput.querySelectorAll('[data-test-subj="mlAdJobOption"]')).toHaveLength(1); + }); + + test('provide current selection update on change', async () => { + const onChangeSpy = jest.fn(); + + const { getByTestId } = render( + + ); + + await waitFor(() => { + expect(getByTestId('mlEntitySelector_loaded')).toBeInTheDocument(); + }); + + // Assert available options to select + const optionsContainer = await screen.findByTestId( + 'comboBoxOptionsList mlEntitySelector_loaded-optionsList' + ); + + optionsContainer + .querySelector('[id="data_frame_analytics:dfa_01"]')! + .click(); + + expect(onChangeSpy).toHaveBeenCalledWith([ + { id: 'ad_01', type: 'anomaly_detector' }, + { id: 'dfa_01', type: 'data_frame_analytics' }, + ]); + }); + + test('provide current selection update on change with duplicates handling', async () => { + (useMlApiContext as jest.MockedFunction).mockImplementationOnce(() => { + return { + jobs: { + getAllJobAndGroupIds, + }, + dataFrameAnalytics: { + getDataFrameAnalytics: jest.fn(() => { + return Promise.resolve({ + count: 2, + // same ID as the anomaly detection job + data_frame_analytics: [{ id: 'ad_01' }, { id: 'dfa_02' }], + }); + }), + }, + trainedModels: { + getTrainedModels, + }, + } as unknown as jest.Mocked; + }); + + const onChangeSpy = jest.fn(); + + const { getByTestId } = render( + + ); + + await waitFor(() => { + expect(getByTestId('mlEntitySelector_loaded')).toBeInTheDocument(); + }); + + // Assert selected + const comboBoxInput = getByTestId('comboBoxInput'); + const selectedOptions = comboBoxInput.querySelectorAll('.euiComboBoxPill'); + expect(selectedOptions).toHaveLength(3); + expect(selectedOptions[0]).toHaveAttribute('id', 'anomaly_detector:ad_01'); + expect(selectedOptions[1]).toHaveAttribute('id', 'data_frame_analytics:ad_01'); + + // Assert removal + selectedOptions[0].getElementsByTagName('button')[0].click(); + expect(onChangeSpy).toHaveBeenCalledWith([{ id: 'keep_it', type: 'unknown' }]); + }); + + test('display a toast on error', async () => { + const displayErrorToast = jest.fn(); + const sampleError = new Error('try a bit later'); + + (useMlApiContext as jest.MockedFunction).mockImplementationOnce(() => { + return { + jobs: { + getAllJobAndGroupIds: jest.fn(() => { + throw sampleError; + }), + }, + } as unknown as jest.Mocked; + }); + ( + useToastNotificationService as jest.MockedFunction + ).mockImplementationOnce(() => { + return { displayErrorToast } as unknown as ReturnType; + }); + + const { getByTestId } = render( + + ); + + await waitFor(() => { + expect(getByTestId('mlEntitySelector_loaded')).toBeInTheDocument(); + }); + + expect(displayErrorToast).toHaveBeenCalledTimes(1); + expect(displayErrorToast).toHaveBeenCalledWith(sampleError, 'Failed to fetch ML entities'); + }); +}); diff --git a/x-pack/plugins/ml/public/application/components/ml_entity_selector/ml_entity_selector.tsx b/x-pack/plugins/ml/public/application/components/ml_entity_selector/ml_entity_selector.tsx new file mode 100644 index 0000000000000..c31d091fdf67c --- /dev/null +++ b/x-pack/plugins/ml/public/application/components/ml_entity_selector/ml_entity_selector.tsx @@ -0,0 +1,212 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { FC, useCallback, useState, useMemo } from 'react'; +import { + EuiComboBox, + type EuiComboBoxOptionOption, + type EuiComboBoxProps, + euiPaletteColorBlindBehindText, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { countBy } from 'lodash'; +import useMount from 'react-use/lib/useMount'; +import { useMlApiContext } from '../../contexts/kibana'; +import { useToastNotificationService } from '../../services/toast_notification_service'; + +type EntityType = 'anomaly_detector' | 'data_frame_analytics' | 'trained_models'; + +type EntitiesSelection = Array<{ id: string; type: EntityType }>; + +export interface MlEntitySelectorProps { + entityTypes?: Partial<{ [key in EntityType]: boolean }>; + multiSelect?: boolean; + /** + * Array of selected ids + */ + selectedOptions?: Array<{ id: string; type?: EntityType }>; + onSelectionChange?: (jobSelection: EntitiesSelection) => void; + /** + * In case the there are duplicated IDs across different ML entity types, + * they should be de-selected simultaneously if this setting is enabled. + */ + handleDuplicates?: boolean; +} + +const defaultEntities = { + anomaly_detector: true, + data_frame_analytics: true, + trained_models: true, +}; + +/** + * Reusable component for picking ML entities. + * + * @param entityTypes + * @param multiSelect + * @param selectedOptions + * @param onSelectionChange + * @param handleDuplicates + * @constructor + */ +export const MlEntitySelector: FC = ({ + entityTypes = defaultEntities, + multiSelect = true, + selectedOptions, + onSelectionChange, + handleDuplicates = false, +}) => { + const { jobs: jobsApi, trainedModels, dataFrameAnalytics } = useMlApiContext(); + const { displayErrorToast } = useToastNotificationService(); + const visColorsBehindText = euiPaletteColorBlindBehindText(); + + const [isLoading, setIsLoading] = useState(true); + const [options, setOptions] = useState>>([]); + + const fetchOptions = useCallback(async () => { + try { + const newOptions: Array> = []; + if (entityTypes?.anomaly_detector) { + const { jobIds: jobIdOptions } = await jobsApi.getAllJobAndGroupIds(); + + newOptions.push({ + label: i18n.translate('xpack.ml.mlEntitySelector.adOptionsLabel', { + defaultMessage: 'Anomaly detection jobs', + }), + isGroupLabelOption: true, + color: visColorsBehindText[0], + options: jobIdOptions.map((adId) => ({ + label: adId, + value: adId, + id: `anomaly_detector:${adId}`, + key: `anomaly_detector:${adId}`, + color: visColorsBehindText[0], + 'data-test-subj': `mlAdJobOption`, + })), + }); + } + + if (entityTypes?.data_frame_analytics) { + const dfa = await dataFrameAnalytics.getDataFrameAnalytics(); + if (dfa.count > 0) { + newOptions.push({ + label: i18n.translate('xpack.ml.mlEntitySelector.dfaOptionsLabel', { + defaultMessage: 'Data frame analytics', + }), + isGroupLabelOption: true, + options: dfa.data_frame_analytics.map(({ id: dfaId }) => ({ + label: dfaId, + value: dfaId, + id: `data_frame_analytics:${dfaId}`, + key: `data_frame_analytics:${dfaId}`, + color: visColorsBehindText[2], + 'data-test-subj': `mlDfaJobOption`, + })), + }); + } + } + + if (entityTypes?.trained_models) { + const models = await trainedModels.getTrainedModels(); + if (models.length > 0) { + newOptions.push({ + label: i18n.translate('xpack.ml.mlEntitySelector.trainedModelsLabel', { + defaultMessage: 'Trained models', + }), + isGroupLabelOption: true, + options: models.map(({ model_id: modelId }) => ({ + label: modelId, + value: modelId, + id: `trained_models:${modelId}`, + key: `trained_models:${modelId}`, + color: visColorsBehindText[3], + 'data-test-subj': `mlTrainedModelOption`, + })), + }); + } + } + + setOptions(newOptions); + } catch (error) { + displayErrorToast( + error, + i18n.translate('xpack.ml.mlEntitySelector.fetchError', { + defaultMessage: 'Failed to fetch ML entities', + }) + ); + } + setIsLoading(false); + }, [ + jobsApi, + trainedModels, + dataFrameAnalytics, + entityTypes, + visColorsBehindText, + displayErrorToast, + ]); + + useMount(function fetchOptionsOnMount() { + fetchOptions(); + }); + + const selectedEntities = useMemo>>(() => { + return (selectedOptions ?? []).flatMap((o) => { + const fromOptions = options + .flatMap((g) => g.options) + .filter((op): op is EuiComboBoxOptionOption => op!.value === o.id); + return fromOptions.length > 0 + ? fromOptions + : [ + { + value: o.id, + label: o.id, + key: `unknown:${o.id}`, + 'data-test-subj': `mlUnknownOption ${o.id}`, + }, + ]; + }); + }, [options, selectedOptions]); + + const onChange = useCallback['onChange'], undefined>>( + (selection) => { + if (!onSelectionChange) return; + + let resultSelection = selection; + + if (handleDuplicates) { + const prevCounts = countBy(selectedEntities, 'value'); + const currentCounts = countBy(selection, 'value'); + resultSelection = resultSelection.filter(({ value }) => { + // If an ID with duplicates has been removed, delete all of them. + return !(prevCounts[value!] > 1 && currentCounts[value!] < prevCounts[value!]); + }); + } + + onSelectionChange( + resultSelection.map((s) => { + const [type] = s.key!.split(':'); + return { id: s.value!, type: type as EntityType }; + }) + ); + }, + [onSelectionChange, selectedEntities, handleDuplicates] + ); + + return ( + + autoFocus={true} + isLoading={isLoading} + singleSelection={!multiSelect} + selectedOptions={selectedEntities} + options={options} + onChange={onChange} + fullWidth + data-test-subj={`mlEntitySelector_${isLoading ? 'loading' : 'loaded'}`} + isInvalid={false} + /> + ); +}; diff --git a/x-pack/plugins/ml/public/application/components/saved_objects_warning/__mocks__/index.ts b/x-pack/plugins/ml/public/application/components/saved_objects_warning/__mocks__/index.ts new file mode 100644 index 0000000000000..f7f39c66ae293 --- /dev/null +++ b/x-pack/plugins/ml/public/application/components/saved_objects_warning/__mocks__/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor 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 SavedObjectsWarning = jest.fn(() => { + return null; +}); diff --git a/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/index.ts b/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/index.ts index df9e3c12c69d7..65ce9c9288d4e 100644 --- a/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/index.ts +++ b/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/index.ts @@ -7,3 +7,4 @@ export { useMlKibana } from './kibana_context'; export { useTimefilter } from './use_timefilter'; +export { useMlApiContext } from './use_ml_api_context'; diff --git a/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/kibana_context.ts b/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/kibana_context.ts index fb9b48f218b7c..fe71841719639 100644 --- a/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/kibana_context.ts +++ b/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/kibana_context.ts @@ -6,7 +6,9 @@ */ import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; +import { fieldFormatsServiceMock } from '@kbn/field-formats-plugin/public/mocks'; import { BehaviorSubject } from 'rxjs'; +import { mlApiServicesMock } from '../../../services/__mocks__/ml_api_services'; export const chartsServiceMock = { theme: { @@ -30,6 +32,7 @@ export const chartsServiceMock = { }), }, }; + export const kibanaContextMock = { services: { uiSettings: { get: jest.fn() }, @@ -45,6 +48,10 @@ export const kibanaContextMock = { }, data: dataPluginMock.createStartContract(), charts: chartsServiceMock, + fieldFormats: fieldFormatsServiceMock.createStartContract(), + mlServices: { + mlApiServices: mlApiServicesMock, + }, }, }; diff --git a/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/use_field_formatter.ts b/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/use_field_formatter.ts new file mode 100644 index 0000000000000..83ff20394b6bc --- /dev/null +++ b/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/use_field_formatter.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +jest.mock('./kibana_context'); + +export const useFieldFormatter = jest.fn(); diff --git a/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/use_ml_api_context.ts b/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/use_ml_api_context.ts new file mode 100644 index 0000000000000..a690cd0d26384 --- /dev/null +++ b/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/use_ml_api_context.ts @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { MlApiServices } from '../../../services/ml_api_service'; + +export const useMlApiContext: () => jest.Mocked = jest.fn(() => { + return { + jobs: { + getAllJobAndGroupIds: jest.fn(), + }, + trainedModels: { + getTrainedModels: jest.fn(), + }, + dataFrameAnalytics: { + getDataFrameAnalytics: jest.fn(), + }, + } as unknown as jest.Mocked; +}); diff --git a/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/use_timefilter.ts b/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/use_timefilter.ts index b53137aec1838..f302de4fb1ae9 100644 --- a/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/use_timefilter.ts +++ b/x-pack/plugins/ml/public/application/contexts/kibana/__mocks__/use_timefilter.ts @@ -8,6 +8,8 @@ import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { TimefilterContract } from '@kbn/data-plugin/public'; +jest.mock('./kibana_context'); + export const timefilterMock = dataPluginMock.createStartContract().query.timefilter .timefilter as jest.Mocked; diff --git a/x-pack/plugins/ml/public/application/contexts/kibana/index.ts b/x-pack/plugins/ml/public/application/contexts/kibana/index.ts index 0873d395f0b79..5db1956cd8400 100644 --- a/x-pack/plugins/ml/public/application/contexts/kibana/index.ts +++ b/x-pack/plugins/ml/public/application/contexts/kibana/index.ts @@ -14,3 +14,4 @@ export { useTimefilter } from './use_timefilter'; export { useNotifications } from './use_notifications_context'; export { useMlLocator, useMlLink } from './use_create_url'; export { useMlApiContext } from './use_ml_api_context'; +export { useFieldFormatter } from './use_field_formatter'; diff --git a/x-pack/plugins/ml/public/application/contexts/ml/__mocks__/ml_notifications_context.tsx b/x-pack/plugins/ml/public/application/contexts/ml/__mocks__/ml_notifications_context.tsx new file mode 100644 index 0000000000000..d7d7c36178228 --- /dev/null +++ b/x-pack/plugins/ml/public/application/contexts/ml/__mocks__/ml_notifications_context.tsx @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const useMlNotifications = jest.fn(() => { + return { + lastCheckedAt: undefined, + setLastCheckedAt: jest.fn(), + notificationsCounts: { info: 0, error: 0, warning: 0 }, + latestRequestedAt: null, + }; +}); 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 fef04e9366671..6cf931fe2f5fe 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 @@ -9,6 +9,7 @@ import React, { FC, useContext, useEffect, useState } from 'react'; import { combineLatest, of, timer } from 'rxjs'; import { catchError, switchMap, map, tap } from 'rxjs/operators'; import moment from 'moment'; +import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import { useMlKibana } from '../kibana'; import { useStorage } from '../storage'; import { ML_NOTIFICATIONS_LAST_CHECKED_AT } from '../../../../common/types/storage'; @@ -17,6 +18,8 @@ import type { NotificationsCountResponse } from '../../../../common/types/notifi const NOTIFICATIONS_CHECK_INTERVAL = 60000; +const defaultCounts = { info: 0, error: 0, warning: 0 }; + export const MlNotificationsContext = React.createContext<{ notificationsCounts: NotificationsCountResponse; /** Timestamp of the latest notification checked by the user */ @@ -25,7 +28,7 @@ export const MlNotificationsContext = React.createContext<{ latestRequestedAt: number | null; setLastCheckedAt: (v: number) => void; }>({ - notificationsCounts: { info: 0, error: 0, warning: 0 }, + notificationsCounts: defaultCounts, lastCheckedAt: null, latestRequestedAt: null, setLastCheckedAt: () => {}, @@ -43,11 +46,8 @@ export const MlNotificationsContextProvider: FC = ({ children }) => { /** Holds the value used for the actual request */ const [latestRequestedAt, setLatestRequestedAt] = useState(null); - const [notificationsCounts, setNotificationsCounts] = useState({ - info: 0, - error: 0, - warning: 0, - }); + const [notificationsCounts, setNotificationsCounts] = + useState(defaultCounts); useEffect(function startPollingNotifications() { const subscription = combineLatest([lastCheckedAt$, timer(0, NOTIFICATIONS_CHECK_INTERVAL)]) @@ -68,7 +68,7 @@ export const MlNotificationsContextProvider: FC = ({ children }) => { }) ) .subscribe((response) => { - setNotificationsCounts(response); + setNotificationsCounts(isPopulatedObject(response) ? response : defaultCounts); }); return () => { diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/visualization_extractor.ts b/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/visualization_extractor.ts index d3fe88a390c1e..31cec1635968f 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/visualization_extractor.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/visualization_extractor.ts @@ -14,8 +14,8 @@ import type { LensSavedObjectAttributes, FieldBasedIndexPatternColumn, XYDataLayerConfig, - IndexPatternPersistedState, - IndexPatternLayer, + FormBasedPersistedState, + FormBasedLayer, XYLayerConfig, } from '@kbn/lens-plugin/public'; import { layerTypes } from '@kbn/lens-plugin/public'; @@ -68,7 +68,7 @@ export class VisualizationExtractor { ); } - const indexpattern = vis.state.datasourceStates.indexpattern as IndexPatternPersistedState; + const indexpattern = vis.state.datasourceStates.formBased as FormBasedPersistedState; const compatibleIndexPatternLayer = Object.entries(indexpattern.layers).find( ([id]) => layer.layerId === id ); @@ -192,10 +192,7 @@ export class VisualizationExtractor { } } -function getColumns( - { columns }: Omit, - layer: XYDataLayerConfig -) { +function getColumns({ columns }: Omit, layer: XYDataLayerConfig) { layer.accessors.forEach((a) => { const col = columns[a]; // fail early if any of the cols being used as accessors diff --git a/x-pack/plugins/ml/public/application/notifications/components/entity_filter.tsx b/x-pack/plugins/ml/public/application/notifications/components/entity_filter.tsx new file mode 100644 index 0000000000000..01159b7491c25 --- /dev/null +++ b/x-pack/plugins/ml/public/application/notifications/components/entity_filter.tsx @@ -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 React, { type FC, useState, useCallback, useMemo } from 'react'; +import { uniqBy } from 'lodash'; +import { EuiFilterButton, EuiPanel, EuiPopover } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import type { CustomComponentProps } from '@elastic/eui/src/components/search_bar/filters/custom_component_filter'; +import { MlEntitySelector, type MlEntitySelectorProps } from '../../components/ml_entity_selector'; + +/** + * Custom filter component to use with {@link EuiInMemoryTable} + */ +export const EntityFilter: FC = React.memo(({ query, onChange }) => { + const [isOpen, setIsOpen] = useState(false); + + const hasActiveFilters = query.hasOrFieldClause('job_id') || query.hasSimpleFieldClause('job_id'); + const orFieldClause = query.getOrFieldClause('job_id'); + const simpleFieldClause = query.getSimpleFieldClause('job_id'); + + const closePopover = setIsOpen.bind(null, false); + + const selectedOptions = useMemo(() => { + let options: Exclude = []; + + if (orFieldClause && Array.isArray(orFieldClause.value)) { + options = orFieldClause.value.map((v) => ({ id: v as string })); + } + if (simpleFieldClause && simpleFieldClause.value) { + options.push({ id: simpleFieldClause.value as string }); + } + return options; + }, [orFieldClause, simpleFieldClause]); + + const onSelectionChange = useCallback< + Exclude + >( + (entitiesSelection) => { + // first clean up + let newQuery = query.removeOrFieldClauses('job_id'); + newQuery = newQuery.removeSimpleFieldClauses('job_id'); + + if (entitiesSelection.length > 0) { + newQuery = uniqBy(entitiesSelection, 'id').reduce((acc, curr) => { + return acc.addOrFieldValue('job_id', curr.id, true, 'eq'); + }, newQuery); + } + + onChange!(newQuery); + }, + [onChange, query] + ); + + const button = ( + !prev)} + hasActiveFilters={hasActiveFilters} + numActiveFilters={hasActiveFilters ? selectedOptions.length : undefined} + grow + > + + + ); + + return ( + + + + + + ); +}); diff --git a/x-pack/plugins/ml/public/application/notifications/components/notifications_list.test.tsx b/x-pack/plugins/ml/public/application/notifications/components/notifications_list.test.tsx new file mode 100644 index 0000000000000..a40f7dc51352c --- /dev/null +++ b/x-pack/plugins/ml/public/application/notifications/components/notifications_list.test.tsx @@ -0,0 +1,51 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { I18nProvider } from '@kbn/i18n-react'; +import { render, waitFor } from '@testing-library/react'; +import { NotificationsList } from './notifications_list'; +import { useMlKibana } from '../../contexts/kibana'; + +jest.mock('../../contexts/kibana'); +jest.mock('../../services/toast_notification_service'); +jest.mock('../../contexts/ml/ml_notifications_context'); +jest.mock('../../contexts/kibana/use_timefilter'); +jest.mock('../../contexts/kibana/use_field_formatter'); +jest.mock('../../components/saved_objects_warning'); + +describe('NotificationsList', () => { + beforeEach(() => { + jest.useFakeTimers('modern'); + }); + + afterEach(() => { + jest.clearAllMocks(); + jest.useRealTimers(); + }); + + test('starts fetching notification on mount with default params', async () => { + const {} = render(, { wrapper: I18nProvider }); + + jest.advanceTimersByTime(500); + + await waitFor(() => { + expect( + useMlKibana().services.mlServices.mlApiServices.notifications.findMessages + ).toHaveBeenCalledTimes(1); + expect( + useMlKibana().services.mlServices.mlApiServices.notifications.findMessages + ).toHaveBeenCalledWith({ + earliest: '', + latest: '', + queryString: '*', + sortDirection: 'desc', + sortField: 'timestamp', + }); + }); + }); +}); diff --git a/x-pack/plugins/ml/public/application/notifications/components/notifications_list.tsx b/x-pack/plugins/ml/public/application/notifications/components/notifications_list.tsx index cd68f366b57a6..21b52fa374abd 100644 --- a/x-pack/plugins/ml/public/application/notifications/components/notifications_list.tsx +++ b/x-pack/plugins/ml/public/application/notifications/components/notifications_list.tsx @@ -22,6 +22,7 @@ import { import { EuiBasicTableColumn } from '@elastic/eui/src/components/basic_table/basic_table'; import { FIELD_FORMAT_IDS } from '@kbn/field-formats-plugin/common'; import useDebounce from 'react-use/lib/useDebounce'; +import { EntityFilter } from './entity_filter'; import { useMlNotifications } from '../../contexts/ml/ml_notifications_context'; import { ML_NOTIFICATIONS_MESSAGE_LEVEL } from '../../../../common/constants/notifications'; import { SavedObjectsWarning } from '../../components/saved_objects_warning'; @@ -77,7 +78,7 @@ export const NotificationsList: FC = () => { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); - const [isLoading, setIsLoading] = useState(false); + const [isLoading, setIsLoading] = useState(true); const [items, setItems] = useState([]); const [totalCount, setTotalCount] = useState(0); const [queryError, setQueryError] = useState(''); @@ -277,6 +278,10 @@ export const NotificationsList: FC = () => { }, ], }, + { + type: 'custom_component', + component: EntityFilter, + }, ]; }, []); @@ -286,7 +291,7 @@ export const NotificationsList: FC = () => { <> - {newNotificationsCount ? ( + {newNotificationsCount && !isLoading ? ( <> { return { displayWarningToast: jest.fn(() => {}), + displayErrorToast: jest.fn(() => {}), }; }); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.test.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.test.ts index 8f2953a45834e..a21684bd0d08c 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.test.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.test.ts @@ -118,7 +118,7 @@ describe('Lens Attribute', () => { ReportTypes.KPI ); - expect(lnsAttrKpi.getJSON().state.datasourceStates.indexpattern.layers.layer0.columns).toEqual({ + expect(lnsAttrKpi.getJSON().state.datasourceStates.formBased.layers.layer0.columns).toEqual({ 'x-axis-column-layer0': { dataType: 'date', isBucketed: true, @@ -352,7 +352,7 @@ describe('Lens Attribute', () => { }); it('should return first layer', function () { - expect(lnsAttr.getLayers()).toEqual(sampleAttribute.state.datasourceStates.indexpattern.layers); + expect(lnsAttr.getLayers()).toEqual(sampleAttribute.state.datasourceStates.formBased.layers); }); it('should return expected XYState', function () { diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts index 3c8c2e5d4bffb..50701e12f94be 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts @@ -1100,7 +1100,7 @@ export class LensAttributes { references: this.getReferences(), state: { datasourceStates: { - indexpattern: { + formBased: { layers: this.layers, }, }, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/sample_formula_metric_attribute.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/sample_formula_metric_attribute.ts index d6f572fcacde6..c70d0ee031451 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/sample_formula_metric_attribute.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/sample_formula_metric_attribute.ts @@ -21,7 +21,7 @@ export const sampleMetricFormulaAttribute = { ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer0: { columnOrder: [ diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts index 2f06db3ae144a..d6c5bfea5f1d6 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts @@ -74,7 +74,7 @@ describe('SingleMetricAttributes', () => { ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer0: { columnOrder: ['layer-0-column-1'], @@ -136,7 +136,7 @@ describe('SingleMetricAttributes', () => { ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer0: { columnOrder: ['layer-0-column-1'], diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.ts index fd53d9025d4dc..f674ab1f9914f 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.ts @@ -49,13 +49,20 @@ export class SingleMetricLensAttributes extends LensAttributes { getSingleMetricLayer() { const { seriesConfig, selectedMetricField, operationType, indexPattern } = this.layerConfigs[0]; - const { columnFilter, columnField, columnLabel, columnType, formula, metricStateOptions } = - parseCustomFieldName(seriesConfig, selectedMetricField); + const { + columnFilter, + columnField, + columnLabel, + columnType, + formula, + metricStateOptions, + format, + } = parseCustomFieldName(seriesConfig, selectedMetricField); this.metricStateOptions = metricStateOptions; if (columnType === FORMULA_COLUMN && formula) { - return this.getFormulaLayer({ formula, label: columnLabel, dataView: indexPattern }); + return this.getFormulaLayer({ formula, label: columnLabel, dataView: indexPattern, format }); } const getSourceField = () => { @@ -99,9 +106,11 @@ export class SingleMetricLensAttributes extends LensAttributes { formula, label, dataView, + format, }: { formula: string; label?: string; + format?: string; dataView: DataView; }) { const layer = this.lensFormulaHelper?.insertOrReplaceFormulaColumn( @@ -109,12 +118,15 @@ export class SingleMetricLensAttributes extends LensAttributes { { formula, label, - format: { - id: 'percent', - params: { - decimals: 1, - }, - }, + format: + format === 'percent' || !format + ? { + id: 'percent', + params: { + decimals: 1, + }, + } + : undefined, }, { columns: {}, columnOrder: [] }, dataView @@ -176,7 +188,7 @@ export class SingleMetricLensAttributes extends LensAttributes { state: { visualization, datasourceStates: { - indexpattern: { + formBased: { layers: this.layers, }, }, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/single_metric_config.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/single_metric_config.ts index 173b92cf6ba42..b9efbd865b3ed 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/single_metric_config.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/single_metric_config.ts @@ -76,6 +76,36 @@ export function getSyntheticsSingleMetricConfig({ dataView }: ConfigProps): Seri titlePosition: 'bottom', }, }, + { + id: 'monitor_errors', + field: 'state.id', + label: i18n.translate('xpack.observability.expView.errors', { + defaultMessage: 'Errors', + }), + metricStateOptions: { + titlePosition: 'bottom', + colorMode: 'Labels', + palette: { + name: 'custom', + type: 'palette', + params: { + steps: 3, + name: 'custom', + reverse: false, + rangeType: 'number', + rangeMin: 0, + progression: 'fixed', + stops: [{ color: '#E7664C', stop: 100 }], + colorStops: [{ color: '#E7664C', stop: 0 }], + continuity: 'above', + maxSteps: 5, + }, + }, + }, + columnType: FORMULA_COLUMN, + formula: 'unique_count(state.id, kql=\'monitor.status: "down"\')', + format: 'number', + }, ], labels: FieldLabels, }; diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/mobile_test_attribute.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/mobile_test_attribute.ts index 02678ad91ba12..874d6e45b2234 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/mobile_test_attribute.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/mobile_test_attribute.ts @@ -23,7 +23,7 @@ export const testMobileKPIAttr = { visualizationType: 'lnsXY', state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer0: { columnOrder: ['x-axis-column-layer0', 'y-axis-column-layer0'], diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute.ts index dcc2775a54871..5302078d372ce 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute.ts @@ -27,7 +27,7 @@ export const sampleAttribute = { ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer0: { columnOrder: [ diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_cwv.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_cwv.ts index a688962459a24..108112e43ae35 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_cwv.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_cwv.ts @@ -22,7 +22,7 @@ export const sampleAttributeCoreWebVital = { ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer0: { columnOrder: [ diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts index c5b62ce3f14b4..c1bd53c85b760 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts @@ -22,7 +22,7 @@ export const sampleAttributeKpi = { ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer0: { columnOrder: ['x-axis-column-layer0', 'y-axis-column-layer0'], diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_with_reference_lines.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_with_reference_lines.ts index 32d3d480e777d..2cf6cdc8a6054 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_with_reference_lines.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_with_reference_lines.ts @@ -27,7 +27,7 @@ export const sampleAttributeWithReferenceLines = { ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer0: { columnOrder: [ diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.test.tsx index fecb9e7172cc6..a6c3cd1777ec5 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.test.tsx @@ -32,7 +32,7 @@ const mockLensAttrs = { }, filters: [], datasourceStates: { - indexpattern: { + formBased: { layers: { '416b6fad-1923-4f6a-a2df-b223bb287e30': { columnOrder: ['b00c65ea-32be-4163-bfc8-f795b1ef9d06'], diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts index a30a146aaf844..11f6ad624fcbe 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts @@ -69,6 +69,7 @@ export interface MetricOption { formula?: string; metricStateOptions?: Pick; palette?: PaletteOutput; + format?: 'percent' | 'number'; } export interface SeriesConfig { diff --git a/x-pack/plugins/osquery/public/lens/view_results_in_lens.tsx b/x-pack/plugins/osquery/public/lens/view_results_in_lens.tsx index 080c078f6a290..a61e986fd1201 100644 --- a/x-pack/plugins/osquery/public/lens/view_results_in_lens.tsx +++ b/x-pack/plugins/osquery/public/lens/view_results_in_lens.tsx @@ -174,7 +174,7 @@ function getLensAttributes( ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer1: dataLayer, }, diff --git a/x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx b/x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx index 2ba4a76c48515..df08fa6d1bf9b 100644 --- a/x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx +++ b/x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx @@ -151,7 +151,7 @@ function getLensAttributes( ], state: { datasourceStates: { - indexpattern: { + formBased: { layers: { layer1: dataLayer, }, diff --git a/x-pack/plugins/profiling/server/routes/stacktrace.ts b/x-pack/plugins/profiling/server/routes/stacktrace.ts index 6dbe063e2c4f9..aee9b61694e21 100644 --- a/x-pack/plugins/profiling/server/routes/stacktrace.ts +++ b/x-pack/plugins/profiling/server/routes/stacktrace.ts @@ -283,34 +283,38 @@ export async function mgetStackTraces({ const executableDocIDs = new Set(); const t0 = Date.now(); - // flatMap() is significantly slower than an explicit for loop - for (const res of stackResponses) { - for (const trace of res.docs) { - if ('error' in trace) { - continue; - } - // Sometimes we don't find the trace. - // This is due to ES delays writing (data is not immediately seen after write). - // Also, ES doesn't know about transactions. - if (trace.found) { - const traceid = trace._id as StackTraceID; - let stackTrace = traceLRU.get(traceid) as StackTrace; - if (!stackTrace) { - stackTrace = decodeStackTrace(trace._source as EncodedStackTrace); - traceLRU.set(traceid, stackTrace); - } - totalFrames += stackTrace.FrameIDs.length; - stackTraces.set(traceid, stackTrace); - for (const frameID of stackTrace.FrameIDs) { - stackFrameDocIDs.add(frameID); + await withProfilingSpan('decode_stacktraces', async () => { + // flatMap() is significantly slower than an explicit for loop + for (const res of stackResponses) { + for (const trace of res.docs) { + if ('error' in trace) { + continue; } - for (const fileID of stackTrace.FileIDs) { - executableDocIDs.add(fileID); + // Sometimes we don't find the trace. + // This is due to ES delays writing (data is not immediately seen after write). + // Also, ES doesn't know about transactions. + if (trace.found) { + const traceid = trace._id as StackTraceID; + let stackTrace = traceLRU.get(traceid) as StackTrace; + if (!stackTrace) { + stackTrace = decodeStackTrace(trace._source as EncodedStackTrace); + traceLRU.set(traceid, stackTrace); + } + + totalFrames += stackTrace.FrameIDs.length; + stackTraces.set(traceid, stackTrace); + for (const frameID of stackTrace.FrameIDs) { + stackFrameDocIDs.add(frameID); + } + for (const fileID of stackTrace.FileIDs) { + executableDocIDs.add(fileID); + } } } } - } + }); + logger.info(`processing data took ${Date.now() - t0} ms`); if (stackTraces.size !== 0) { diff --git a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx index 5899fb68ec3d3..9b35c7b1558f8 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx @@ -141,7 +141,7 @@ function usePrivileges( ); useEffect(() => { Promise.all([ - privilegesAPIClient.getAll({ includeActions: true }), + privilegesAPIClient.getAll({ includeActions: true, respectLicenseLevel: false }), privilegesAPIClient.getBuiltIn(), ]).then( ([kibanaPrivileges, builtInESPrivileges]) => diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table.tsx index a506f8675bc11..505dd8e70024e 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table.tsx @@ -216,7 +216,6 @@ export class FeatureTable extends Component { extraAction: EuiAccordionProps['extraAction'], infoIcon: JSX.Element ) => { - const { canCustomizeSubFeaturePrivileges } = this.props; const hasSubFeaturePrivileges = feature.getSubFeaturePrivileges().length > 0; return ( @@ -228,12 +227,8 @@ export class FeatureTable extends Component { data-test-subj="featurePrivilegeControls" buttonContent={buttonContent} extraAction={extraAction} - forceState={ - canCustomizeSubFeaturePrivileges && hasSubFeaturePrivileges ? undefined : 'closed' - } - arrowDisplay={ - canCustomizeSubFeaturePrivileges && hasSubFeaturePrivileges ? 'left' : 'none' - } + forceState={hasSubFeaturePrivileges ? undefined : 'closed'} + arrowDisplay={hasSubFeaturePrivileges ? 'left' : 'none'} onToggle={(isOpen: boolean) => { if (isOpen) { this.state.expandedPrivilegeControls.add(feature.id); @@ -256,6 +251,9 @@ export class FeatureTable extends Component { this.props.role.kibana[this.props.privilegeIndex].feature[feature.id] ?? [] } disabled={this.props.disabled} + licenseAllowsSubFeatPrivCustomization={ + this.props.canCustomizeSubFeaturePrivileges + } />
@@ -335,14 +333,10 @@ export class FeatureTable extends Component { ); } - const { canCustomizeSubFeaturePrivileges } = this.props; const hasSubFeaturePrivileges = feature.getSubFeaturePrivileges().length > 0; - - const showAccordionArrow = canCustomizeSubFeaturePrivileges && hasSubFeaturePrivileges; - const buttonContent = ( <> - {!showAccordionArrow && }{' '} + {!hasSubFeaturePrivileges && }{' '} ); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.test.tsx index 0503ec1bf75f9..8e435dc43ef20 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.test.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.test.tsx @@ -25,6 +25,75 @@ const createRole = (kibana: Role['kibana'] = []): Role => { }; describe('FeatureTableExpandedRow', () => { + it('indicates sub-feature privileges are not customizable when licenseAllowsSubFeatPrivCustomization is false', () => { + const role = createRole([ + { + base: [], + feature: { + with_sub_features: ['minimal_read'], + }, + spaces: ['foo'], + }, + ]); + const kibanaPrivileges = createKibanaPrivileges(kibanaFeatures); + + const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); + + const feature = kibanaPrivileges.getSecuredFeature('with_sub_features'); + + const wrapper = mountWithIntl( + + ); + + expect( + wrapper.find('EuiSwitch[data-test-subj="customizeSubFeaturePrivileges"]').props() + ).toMatchObject({ + disabled: true, + checked: false, + }); + + expect(wrapper.find('EuiIconTip[data-test-subj="subFeaturesTip"]').length).toBe(1); + }); + + it('indicates sub-feature privileges can be customized when licenseAllowsSubFeatPrivCustomization is true', () => { + const role = createRole([ + { + base: [], + feature: { + with_sub_features: ['minimal_read'], + }, + spaces: ['foo'], + }, + ]); + const kibanaPrivileges = createKibanaPrivileges(kibanaFeatures); + + const calculator = new PrivilegeFormCalculator(kibanaPrivileges, role); + + const feature = kibanaPrivileges.getSecuredFeature('with_sub_features'); + + const wrapper = mountWithIntl( + + ); + + expect( + wrapper.find('EuiIconTip[data-test-subj="cannotCustomizeSubFeaturesTooltip"]').length + ).toBe(0); + }); + it('indicates sub-feature privileges are being customized if a minimal feature privilege is set', () => { const role = createRole([ { @@ -48,6 +117,7 @@ describe('FeatureTableExpandedRow', () => { privilegeCalculator={calculator} selectedFeaturePrivileges={['minimal_read']} onChange={jest.fn()} + licenseAllowsSubFeatPrivCustomization={true} /> ); @@ -82,6 +152,7 @@ describe('FeatureTableExpandedRow', () => { privilegeCalculator={calculator} selectedFeaturePrivileges={['read']} onChange={jest.fn()} + licenseAllowsSubFeatPrivCustomization={true} /> ); @@ -114,6 +185,7 @@ describe('FeatureTableExpandedRow', () => { privilegeCalculator={calculator} selectedFeaturePrivileges={['read']} onChange={jest.fn()} + licenseAllowsSubFeatPrivCustomization={true} /> ); @@ -150,6 +222,7 @@ describe('FeatureTableExpandedRow', () => { privilegeCalculator={calculator} selectedFeaturePrivileges={['read']} onChange={onChange} + licenseAllowsSubFeatPrivCustomization={true} /> ); @@ -189,6 +262,7 @@ describe('FeatureTableExpandedRow', () => { privilegeCalculator={calculator} selectedFeaturePrivileges={['minimal_read', 'cool_read', 'cool_toggle_2']} onChange={onChange} + licenseAllowsSubFeatPrivCustomization={true} /> ); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.tsx index 50f2b8c504ee7..a0726ad2ef566 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table_expanded_row.tsx @@ -6,9 +6,10 @@ */ import type { EuiSwitchEvent } from '@elastic/eui'; -import { EuiFlexGroup, EuiFlexItem, EuiSwitch } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiIconTip, EuiSwitch } from '@elastic/eui'; import React, { useEffect, useState } from 'react'; +import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import type { SecuredFeature } from '../../../../model'; @@ -21,6 +22,7 @@ interface Props { privilegeIndex: number; selectedFeaturePrivileges: string[]; disabled?: boolean; + licenseAllowsSubFeatPrivCustomization: boolean; onChange: (featureId: string, featurePrivileges: string[]) => void; } @@ -31,11 +33,13 @@ export const FeatureTableExpandedRow = ({ privilegeCalculator, selectedFeaturePrivileges, disabled, + licenseAllowsSubFeatPrivCustomization, }: Props) => { const [isCustomizing, setIsCustomizing] = useState(() => { - return feature - .getMinimalFeaturePrivileges() - .some((p) => selectedFeaturePrivileges.includes(p.id)); + return ( + licenseAllowsSubFeatPrivCustomization && + feature.getMinimalFeaturePrivileges().some((p) => selectedFeaturePrivileges.includes(p.id)) + ); }); useEffect(() => { @@ -43,10 +47,13 @@ export const FeatureTableExpandedRow = ({ .getMinimalFeaturePrivileges() .some((p) => selectedFeaturePrivileges.includes(p.id)); - if (!hasMinimalFeaturePrivilegeSelected && isCustomizing) { + if ( + (!licenseAllowsSubFeatPrivCustomization || !hasMinimalFeaturePrivilegeSelected) && + isCustomizing + ) { setIsCustomizing(false); } - }, [feature, isCustomizing, selectedFeaturePrivileges]); + }, [feature, isCustomizing, selectedFeaturePrivileges, licenseAllowsSubFeatPrivCustomization]); const onCustomizeSubFeatureChange = (e: EuiSwitchEvent) => { onChange( @@ -63,21 +70,44 @@ export const FeatureTableExpandedRow = ({ return ( - + + } + checked={isCustomizing} + onChange={onCustomizeSubFeatureChange} + data-test-subj="customizeSubFeaturePrivileges" + disabled={ + disabled || + !licenseAllowsSubFeatPrivCustomization || + !privilegeCalculator.canCustomizeSubFeaturePrivileges(feature.id, privilegeIndex) + } + /> + {licenseAllowsSubFeatPrivCustomization ? undefined : ( + - } - checked={isCustomizing} - onChange={onCustomizeSubFeatureChange} - data-test-subj="customizeSubFeaturePrivileges" - disabled={ - disabled || - !privilegeCalculator.canCustomizeSubFeaturePrivileges(feature.id, privilegeIndex) - } - /> + )} + {feature.getSubFeatures().map((subFeature) => { return ( diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx index 52b8025b2b668..a26b9587d450a 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx @@ -547,6 +547,7 @@ export class PrivilegeSpaceForm extends Component { } }); } + this.setState({ role, privilegeCalculator: new PrivilegeFormCalculator(this.props.kibanaPrivileges, role), diff --git a/x-pack/plugins/security/public/management/roles/privileges_api_client.ts b/x-pack/plugins/security/public/management/roles/privileges_api_client.ts index b4b372faec710..a96fdd4340cc6 100644 --- a/x-pack/plugins/security/public/management/roles/privileges_api_client.ts +++ b/x-pack/plugins/security/public/management/roles/privileges_api_client.ts @@ -12,9 +12,19 @@ import type { BuiltinESPrivileges, RawKibanaPrivileges } from '../../../common/m export class PrivilegesAPIClient { constructor(private readonly http: HttpStart) {} - async getAll({ includeActions }: { includeActions: boolean }) { + /* + * respectLicenseLevel is an internal optional parameter soley for getting all sub-feature + * privilieges to use in the UI. It is not meant for any other use. + */ + async getAll({ + includeActions, + respectLicenseLevel = true, + }: { + includeActions: boolean; + respectLicenseLevel: boolean; + }) { return await this.http.get('/api/security/privileges', { - query: { includeActions }, + query: { includeActions, respectLicenseLevel }, }); } diff --git a/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts b/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts index 1a8d7814e5a38..17a157263cf52 100644 --- a/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts +++ b/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts @@ -1888,6 +1888,225 @@ describe('subFeatures', () => { actions.ui.get('foo', 'sub-feature-ui'), ]); }); + + test(`should get the sub-feature privileges if 'respectLicenseLevel' is false`, () => { + const features: KibanaFeature[] = [ + new KibanaFeature({ + id: 'foo', + name: 'Foo KibanaFeature', + app: [], + category: { id: 'foo', label: 'foo' }, + privileges: { + all: { + savedObject: { + all: [], + read: [], + }, + ui: ['foo'], + }, + read: { + savedObject: { + all: [], + read: [], + }, + ui: ['foo'], + }, + }, + subFeatures: [ + { + name: 'subFeature1', + privilegeGroups: [ + { + groupType: 'independent', + privileges: [ + { + id: 'subFeaturePriv1', + name: 'sub feature priv 1', + includeIn: 'read', + savedObject: { + all: ['all-sub-feature-type'], + read: ['read-sub-feature-type'], + }, + ui: ['sub-feature-ui'], + }, + ], + }, + ], + }, + ], + }), + ]; + + const mockFeaturesPlugin = featuresPluginMock.createSetup(); + mockFeaturesPlugin.getKibanaFeatures.mockReturnValue(features); + const privileges = privilegesFactory(actions, mockFeaturesPlugin, mockLicenseServiceBasic); + + const actual = privileges.get(false); + expect(actual.features).toHaveProperty(`foo.subFeaturePriv1`); + + expect(actual.features).toHaveProperty(`foo.all`, [ + actions.login, + actions.version, + actions.savedObject.get('all-sub-feature-type', 'bulk_get'), + actions.savedObject.get('all-sub-feature-type', 'get'), + actions.savedObject.get('all-sub-feature-type', 'find'), + actions.savedObject.get('all-sub-feature-type', 'open_point_in_time'), + actions.savedObject.get('all-sub-feature-type', 'close_point_in_time'), + actions.savedObject.get('all-sub-feature-type', 'create'), + actions.savedObject.get('all-sub-feature-type', 'bulk_create'), + actions.savedObject.get('all-sub-feature-type', 'update'), + actions.savedObject.get('all-sub-feature-type', 'bulk_update'), + actions.savedObject.get('all-sub-feature-type', 'delete'), + actions.savedObject.get('all-sub-feature-type', 'bulk_delete'), + actions.savedObject.get('all-sub-feature-type', 'share_to_space'), + actions.savedObject.get('read-sub-feature-type', 'bulk_get'), + actions.savedObject.get('read-sub-feature-type', 'get'), + actions.savedObject.get('read-sub-feature-type', 'find'), + actions.savedObject.get('read-sub-feature-type', 'open_point_in_time'), + actions.savedObject.get('read-sub-feature-type', 'close_point_in_time'), + actions.ui.get('foo', 'foo'), + actions.ui.get('foo', 'sub-feature-ui'), + ]); + + expect(actual.features).toHaveProperty(`foo.minimal_all`, [ + actions.login, + actions.version, + actions.ui.get('foo', 'foo'), + ]); + + expect(actual.features).toHaveProperty(`foo.read`, [ + actions.login, + actions.version, + actions.savedObject.get('all-sub-feature-type', 'bulk_get'), + actions.savedObject.get('all-sub-feature-type', 'get'), + actions.savedObject.get('all-sub-feature-type', 'find'), + actions.savedObject.get('all-sub-feature-type', 'open_point_in_time'), + actions.savedObject.get('all-sub-feature-type', 'close_point_in_time'), + actions.savedObject.get('all-sub-feature-type', 'create'), + actions.savedObject.get('all-sub-feature-type', 'bulk_create'), + actions.savedObject.get('all-sub-feature-type', 'update'), + actions.savedObject.get('all-sub-feature-type', 'bulk_update'), + actions.savedObject.get('all-sub-feature-type', 'delete'), + actions.savedObject.get('all-sub-feature-type', 'bulk_delete'), + actions.savedObject.get('all-sub-feature-type', 'share_to_space'), + actions.savedObject.get('read-sub-feature-type', 'bulk_get'), + actions.savedObject.get('read-sub-feature-type', 'get'), + actions.savedObject.get('read-sub-feature-type', 'find'), + actions.savedObject.get('read-sub-feature-type', 'open_point_in_time'), + actions.savedObject.get('read-sub-feature-type', 'close_point_in_time'), + actions.ui.get('foo', 'foo'), + actions.ui.get('foo', 'sub-feature-ui'), + ]); + + expect(actual.features).toHaveProperty(`foo.minimal_read`, [ + actions.login, + actions.version, + actions.ui.get('foo', 'foo'), + ]); + + expect(actual).toHaveProperty('global.all', [ + actions.login, + actions.version, + actions.api.get('decryptedTelemetry'), + actions.api.get('features'), + actions.api.get('taskManager'), + actions.space.manage, + actions.ui.get('spaces', 'manage'), + actions.ui.get('management', 'kibana', 'spaces'), + actions.ui.get('catalogue', 'spaces'), + actions.ui.get('enterpriseSearch', 'all'), + actions.savedObject.get('all-sub-feature-type', 'bulk_get'), + actions.savedObject.get('all-sub-feature-type', 'get'), + actions.savedObject.get('all-sub-feature-type', 'find'), + actions.savedObject.get('all-sub-feature-type', 'open_point_in_time'), + actions.savedObject.get('all-sub-feature-type', 'close_point_in_time'), + actions.savedObject.get('all-sub-feature-type', 'create'), + actions.savedObject.get('all-sub-feature-type', 'bulk_create'), + actions.savedObject.get('all-sub-feature-type', 'update'), + actions.savedObject.get('all-sub-feature-type', 'bulk_update'), + actions.savedObject.get('all-sub-feature-type', 'delete'), + actions.savedObject.get('all-sub-feature-type', 'bulk_delete'), + actions.savedObject.get('all-sub-feature-type', 'share_to_space'), + actions.savedObject.get('read-sub-feature-type', 'bulk_get'), + actions.savedObject.get('read-sub-feature-type', 'get'), + actions.savedObject.get('read-sub-feature-type', 'find'), + actions.savedObject.get('read-sub-feature-type', 'open_point_in_time'), + actions.savedObject.get('read-sub-feature-type', 'close_point_in_time'), + actions.ui.get('foo', 'foo'), + actions.ui.get('foo', 'sub-feature-ui'), + ]); + expect(actual).toHaveProperty('global.read', [ + actions.login, + actions.version, + actions.api.get('decryptedTelemetry'), + actions.savedObject.get('all-sub-feature-type', 'bulk_get'), + actions.savedObject.get('all-sub-feature-type', 'get'), + actions.savedObject.get('all-sub-feature-type', 'find'), + actions.savedObject.get('all-sub-feature-type', 'open_point_in_time'), + actions.savedObject.get('all-sub-feature-type', 'close_point_in_time'), + actions.savedObject.get('all-sub-feature-type', 'create'), + actions.savedObject.get('all-sub-feature-type', 'bulk_create'), + actions.savedObject.get('all-sub-feature-type', 'update'), + actions.savedObject.get('all-sub-feature-type', 'bulk_update'), + actions.savedObject.get('all-sub-feature-type', 'delete'), + actions.savedObject.get('all-sub-feature-type', 'bulk_delete'), + actions.savedObject.get('all-sub-feature-type', 'share_to_space'), + actions.savedObject.get('read-sub-feature-type', 'bulk_get'), + actions.savedObject.get('read-sub-feature-type', 'get'), + actions.savedObject.get('read-sub-feature-type', 'find'), + actions.savedObject.get('read-sub-feature-type', 'open_point_in_time'), + actions.savedObject.get('read-sub-feature-type', 'close_point_in_time'), + actions.ui.get('foo', 'foo'), + actions.ui.get('foo', 'sub-feature-ui'), + ]); + + expect(actual).toHaveProperty('space.all', [ + actions.login, + actions.version, + actions.savedObject.get('all-sub-feature-type', 'bulk_get'), + actions.savedObject.get('all-sub-feature-type', 'get'), + actions.savedObject.get('all-sub-feature-type', 'find'), + actions.savedObject.get('all-sub-feature-type', 'open_point_in_time'), + actions.savedObject.get('all-sub-feature-type', 'close_point_in_time'), + actions.savedObject.get('all-sub-feature-type', 'create'), + actions.savedObject.get('all-sub-feature-type', 'bulk_create'), + actions.savedObject.get('all-sub-feature-type', 'update'), + actions.savedObject.get('all-sub-feature-type', 'bulk_update'), + actions.savedObject.get('all-sub-feature-type', 'delete'), + actions.savedObject.get('all-sub-feature-type', 'bulk_delete'), + actions.savedObject.get('all-sub-feature-type', 'share_to_space'), + actions.savedObject.get('read-sub-feature-type', 'bulk_get'), + actions.savedObject.get('read-sub-feature-type', 'get'), + actions.savedObject.get('read-sub-feature-type', 'find'), + actions.savedObject.get('read-sub-feature-type', 'open_point_in_time'), + actions.savedObject.get('read-sub-feature-type', 'close_point_in_time'), + actions.ui.get('foo', 'foo'), + actions.ui.get('foo', 'sub-feature-ui'), + ]); + expect(actual).toHaveProperty('space.read', [ + actions.login, + actions.version, + actions.savedObject.get('all-sub-feature-type', 'bulk_get'), + actions.savedObject.get('all-sub-feature-type', 'get'), + actions.savedObject.get('all-sub-feature-type', 'find'), + actions.savedObject.get('all-sub-feature-type', 'open_point_in_time'), + actions.savedObject.get('all-sub-feature-type', 'close_point_in_time'), + actions.savedObject.get('all-sub-feature-type', 'create'), + actions.savedObject.get('all-sub-feature-type', 'bulk_create'), + actions.savedObject.get('all-sub-feature-type', 'update'), + actions.savedObject.get('all-sub-feature-type', 'bulk_update'), + actions.savedObject.get('all-sub-feature-type', 'delete'), + actions.savedObject.get('all-sub-feature-type', 'bulk_delete'), + actions.savedObject.get('all-sub-feature-type', 'share_to_space'), + actions.savedObject.get('read-sub-feature-type', 'bulk_get'), + actions.savedObject.get('read-sub-feature-type', 'get'), + actions.savedObject.get('read-sub-feature-type', 'find'), + actions.savedObject.get('read-sub-feature-type', 'open_point_in_time'), + actions.savedObject.get('read-sub-feature-type', 'close_point_in_time'), + actions.ui.get('foo', 'foo'), + actions.ui.get('foo', 'sub-feature-ui'), + ]); + }); }); describe(`when license allows subfeatures, but not a specific sub feature`, () => { diff --git a/x-pack/plugins/security/server/authorization/privileges/privileges.ts b/x-pack/plugins/security/server/authorization/privileges/privileges.ts index 3684014fd5b1d..546a392c73e1e 100644 --- a/x-pack/plugins/security/server/authorization/privileges/privileges.ts +++ b/x-pack/plugins/security/server/authorization/privileges/privileges.ts @@ -18,7 +18,7 @@ import type { Actions } from '../actions'; import { featurePrivilegeBuilderFactory } from './feature_privilege_builder'; export interface PrivilegesService { - get(): RawKibanaPrivileges; + get(respectLicenseLevel?: boolean): RawKibanaPrivileges; } export function privilegesFactory( @@ -29,7 +29,7 @@ export function privilegesFactory( const featurePrivilegeBuilder = featurePrivilegeBuilderFactory(actions); return { - get() { + get(respectLicenseLevel: boolean = true) { const features = featuresService.getKibanaFeatures(); const { allowSubFeaturePrivileges } = licenseService.getFeatures(); const { hasAtLeast: licenseHasAtLeast } = licenseService; @@ -82,7 +82,10 @@ export function privilegesFactory( ]; } - if (allowSubFeaturePrivileges && feature.subFeatures?.length > 0) { + if ( + (!respectLicenseLevel || allowSubFeaturePrivileges) && + feature.subFeatures?.length > 0 + ) { for (const subFeaturePrivilege of featuresService.subFeaturePrivilegeIterator( feature, licenseHasAtLeast diff --git a/x-pack/plugins/security/server/routes/authorization/privileges/get.ts b/x-pack/plugins/security/server/routes/authorization/privileges/get.ts index 8724323fdf510..8817fca4831ae 100644 --- a/x-pack/plugins/security/server/routes/authorization/privileges/get.ts +++ b/x-pack/plugins/security/server/routes/authorization/privileges/get.ts @@ -21,11 +21,15 @@ export function defineGetPrivilegesRoutes({ router, authz }: RouteDefinitionPara includeActions: schema.maybe( schema.oneOf([schema.literal('true'), schema.literal('false')]) ), + respectLicenseLevel: schema.maybe( + schema.oneOf([schema.literal('true'), schema.literal('false')]) + ), }), }, }, createLicensedRouteHandler((context, request, response) => { - const privileges = authz.privileges.get(); + const respectLicenseLevel = request.query.respectLicenseLevel !== 'false'; // if undefined resolve to true by default + const privileges = authz.privileges.get(respectLicenseLevel); const includeActions = request.query.includeActions === 'true'; const privilegesResponseBody = includeActions ? privileges diff --git a/x-pack/plugins/security_solution/common/endpoint/constants.ts b/x-pack/plugins/security_solution/common/endpoint/constants.ts index 19df6122044a4..2d8f468233f0d 100644 --- a/x-pack/plugins/security_solution/common/endpoint/constants.ts +++ b/x-pack/plugins/security_solution/common/endpoint/constants.ts @@ -67,6 +67,7 @@ export const UNISOLATE_HOST_ROUTE_V2 = `${BASE_ENDPOINT_ACTION_ROUTE}/unisolate` export const GET_PROCESSES_ROUTE = `${BASE_ENDPOINT_ACTION_ROUTE}/running_procs`; export const KILL_PROCESS_ROUTE = `${BASE_ENDPOINT_ACTION_ROUTE}/kill_process`; export const SUSPEND_PROCESS_ROUTE = `${BASE_ENDPOINT_ACTION_ROUTE}/suspend_process`; +export const GET_FILE_ROUTE = `${BASE_ENDPOINT_ACTION_ROUTE}/get_file`; /** Endpoint Actions Routes */ export const ENDPOINT_ACTION_LOG_ROUTE = `${BASE_ENDPOINT_ROUTE}/action_log/{agent_id}`; @@ -78,26 +79,3 @@ export const failedFleetActionErrorCode = '424'; export const ENDPOINT_DEFAULT_PAGE = 0; export const ENDPOINT_DEFAULT_PAGE_SIZE = 10; - -/** - * The list of possible capabilities, reported by the endpoint in the metadata document - */ -export const RESPONDER_CAPABILITIES = [ - 'isolation', - 'kill_process', - 'suspend_process', - 'running_processes', -] as const; - -export type ResponderCapabilities = typeof RESPONDER_CAPABILITIES[number]; - -/** The list of possible responder command names **/ -export const RESPONDER_COMMANDS = [ - 'isolate', - 'release', - 'kill-process', - 'suspend-process', - 'processes', -] as const; - -export type ResponderCommands = typeof RESPONDER_COMMANDS[number]; diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts index 971f096300e66..79a02f79c5008 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts @@ -22,7 +22,7 @@ import type { ActionResponseOutput, } from '../types'; import { ActivityLogItemTypes } from '../types'; -import { RESPONSE_ACTION_COMMANDS } from '../service/response_actions/constants'; +import { RESPONSE_ACTION_API_COMMANDS_NAMES } from '../service/response_actions/constants'; export class EndpointActionGenerator extends BaseDataGenerator { /** Generate a random endpoint Action request (isolate or unisolate) */ @@ -245,6 +245,6 @@ export class EndpointActionGenerator extends BaseDataGenerator { } protected randomResponseActionCommand() { - return this.randomChoice(RESPONSE_ACTION_COMMANDS); + return this.randomChoice(RESPONSE_ACTION_API_COMMANDS_NAMES); } } diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_metadata_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_metadata_generator.ts index 67ff2d3605093..3c370dc99aa62 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_metadata_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_metadata_generator.ts @@ -8,6 +8,7 @@ import type { DeepPartial } from 'utility-types'; import { merge } from 'lodash'; import { gte } from 'semver'; +import type { EndpointCapabilities } from '../service/response_actions/constants'; import { BaseDataGenerator } from './base_data_generator'; import type { HostMetadataInterface, OSFields } from '../types'; import { EndpointStatus, HostPolicyResponseActionStatus } from '../types'; @@ -23,13 +24,17 @@ export class EndpointMetadataGenerator extends BaseDataGenerator { const agentVersion = overrides?.agent?.version ?? this.randomVersion(); const agentId = this.seededUUIDv4(); const isIsolated = this.randomBoolean(0.3); - const capabilities = ['isolation']; + const capabilities: EndpointCapabilities[] = ['isolation']; // v8.4 introduced additional endpoint capabilities if (gte(agentVersion, '8.4.0')) { capabilities.push('kill_process', 'suspend_process', 'running_processes'); } + if (gte(agentVersion, '8.6.0')) { + capabilities.push('get_file'); + } + const hostMetadataDoc: HostMetadataInterface = { '@timestamp': ts, event: { diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_action_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_action_generator.ts index f1d81c902a4a8..215a8d5b339cf 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_action_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_action_generator.ts @@ -17,7 +17,7 @@ import type { EndpointActionResponse, } from '../types'; import { ActivityLogItemTypes } from '../types'; -import { RESPONSE_ACTION_COMMANDS } from '../service/response_actions/constants'; +import { RESPONSE_ACTION_API_COMMANDS_NAMES } from '../service/response_actions/constants'; export class FleetActionGenerator extends BaseDataGenerator { /** Generate a random endpoint Action (isolate or unisolate) */ @@ -143,6 +143,6 @@ export class FleetActionGenerator extends BaseDataGenerator { } protected randomResponseActionCommand() { - return this.randomChoice(RESPONSE_ACTION_COMMANDS); + return this.randomChoice(RESPONSE_ACTION_API_COMMANDS_NAMES); } } diff --git a/x-pack/plugins/security_solution/common/endpoint/schema/actions.ts b/x-pack/plugins/security_solution/common/endpoint/schema/actions.ts index 8b982e6e6f463..0a7c401e3a589 100644 --- a/x-pack/plugins/security_solution/common/endpoint/schema/actions.ts +++ b/x-pack/plugins/security_solution/common/endpoint/schema/actions.ts @@ -9,7 +9,7 @@ import type { TypeOf } from '@kbn/config-schema'; import { schema } from '@kbn/config-schema'; import { ENDPOINT_DEFAULT_PAGE_SIZE } from '../constants'; import { - RESPONSE_ACTION_COMMANDS, + RESPONSE_ACTION_API_COMMANDS_NAMES, RESPONSE_ACTION_STATUS, } from '../service/response_actions/constants'; @@ -78,7 +78,7 @@ export const ActionDetailsRequestSchema = { // TODO: fix the odd TS error const commandsSchema = schema.oneOf( // @ts-expect-error TS2769: No overload matches this call - RESPONSE_ACTION_COMMANDS.map((command) => schema.literal(command)) + RESPONSE_ACTION_API_COMMANDS_NAMES.map((command) => schema.literal(command)) ); // TODO: fix the odd TS error @@ -115,3 +115,13 @@ export const EndpointActionListRequestSchema = { }; export type EndpointActionListRequestQuery = TypeOf; + +export const EndpointActionGetFileSchema = { + body: schema.object({ + ...BaseActionRequestSchema, + + parameters: schema.object({ + path: schema.string({ minLength: 1 }), + }), + }), +}; diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts index e5b2f78c25472..e00434559b9ca 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts @@ -5,7 +5,13 @@ * 2.0. */ -import { calculateEndpointAuthz, getEndpointAuthzInitialState } from './authz'; +import { + calculateEndpointAuthz, + calculatePermissionsFromCapabilities, + calculatePermissionsFromPrivileges, + defaultEndpointPermissions, + getEndpointAuthzInitialState, +} from './authz'; import type { FleetAuthz } from '@kbn/fleet-plugin/common'; import { createFleetAuthzMock } from '@kbn/fleet-plugin/common'; import { createLicenseServiceMock } from '../../../license/mocks'; @@ -168,11 +174,31 @@ describe('Endpoint Authz service', () => { expect(authz[auth]).toBe(false); }); }); + + it('correctly handles permissions', () => { + const authz = calculateEndpointAuthz(licenseService, fleetAuthz, userRoles, true, { + canWriteSecuritySolution: false, + canReadSecuritySolution: true, + }); + expect(authz.canWriteSecuritySolution).toBe(false); + expect(authz.canReadSecuritySolution).toBe(true); + }); + }); + + describe('defaultEndpointPermissions', () => { + it('returns expected permissions', () => { + expect(defaultEndpointPermissions()).toEqual({ + canWriteSecuritySolution: false, + canReadSecuritySolution: false, + }); + }); }); describe('getEndpointAuthzInitialState()', () => { it('returns expected initial state', () => { expect(getEndpointAuthzInitialState()).toEqual({ + canWriteSecuritySolution: false, + canReadSecuritySolution: false, canAccessFleet: false, canAccessEndpointManagement: false, canCreateArtifactsByPolicy: false, @@ -200,4 +226,49 @@ describe('Endpoint Authz service', () => { }); }); }); + + describe('calculatePermissionsFromPrivileges', () => { + it('returns default permissions if no privileges', () => { + const permissions = calculatePermissionsFromPrivileges(undefined); + expect(permissions).toEqual(defaultEndpointPermissions()); + }); + + it('returns expected permissions from privileges', () => { + const privileges = [ + { privilege: 'ui:8.6.0:siem/crud', authorized: false }, + { privilege: 'ui:8.6.0:siem/show', authorized: true }, + { privilege: 'ui:8.6.0:siem/foobar', authorized: true }, + ]; + const permissions = calculatePermissionsFromPrivileges(privileges); + expect(permissions).toEqual({ + canWriteSecuritySolution: false, + canReadSecuritySolution: true, + }); + }); + }); + + describe('calculatePermissionsFromCapabilities', () => { + it('returns default permissions if no capabilities', () => { + const permissions = calculatePermissionsFromCapabilities(undefined); + expect(permissions).toEqual(defaultEndpointPermissions()); + }); + + it('returns expected permissions from capabilities', () => { + const capabilities = { + navLinks: {}, + management: {}, + catalogue: {}, + siem: { + crud: false, + show: true, + foobar: true, + }, + }; + const permissions = calculatePermissionsFromCapabilities(capabilities); + expect(permissions).toEqual({ + canWriteSecuritySolution: false, + canReadSecuritySolution: true, + }); + }); + }); }); diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts index d25fd440d1c24..93b5289bdc391 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts @@ -5,18 +5,26 @@ * 2.0. */ -import type { ENDPOINT_PRIVILEGES } from '@kbn/fleet-plugin/common'; -import { type FleetAuthz } from '@kbn/fleet-plugin/common'; +import type { ENDPOINT_PRIVILEGES, FleetAuthz } from '@kbn/fleet-plugin/common'; +import type { Capabilities } from '@kbn/core-capabilities-common'; + import type { LicenseService } from '../../../license'; -import type { EndpointAuthz } from '../../types/authz'; +import type { EndpointPermissions, EndpointAuthz } from '../../types/authz'; import type { MaybeImmutable } from '../../types'; +export function defaultEndpointPermissions(): EndpointPermissions { + return { + canWriteSecuritySolution: false, + canReadSecuritySolution: false, + }; +} + function hasPermission( fleetAuthz: FleetAuthz, isEndpointRbacEnabled: boolean, hasEndpointManagementAccess: boolean, privilege: typeof ENDPOINT_PRIVILEGES[number] -) { +): boolean { return isEndpointRbacEnabled ? fleetAuthz.packagePrivileges?.endpoint?.actions[privilege].executePackageAction ?? false : hasEndpointManagementAccess; @@ -34,11 +42,13 @@ export const calculateEndpointAuthz = ( licenseService: LicenseService, fleetAuthz: FleetAuthz, userRoles: MaybeImmutable, - isEndpointRbacEnabled: boolean = false + isEndpointRbacEnabled: boolean = false, + permissions: Partial = defaultEndpointPermissions() ): EndpointAuthz => { const isPlatinumPlusLicense = licenseService.isPlatinumPlus(); const isEnterpriseLicense = licenseService.isEnterprise(); const hasEndpointManagementAccess = userRoles.includes('superuser'); + const { canWriteSecuritySolution = false, canReadSecuritySolution = false } = permissions; const canWriteEndpointList = hasPermission( fleetAuthz, isEndpointRbacEnabled, @@ -152,6 +162,8 @@ export const calculateEndpointAuthz = ( ); return { + canWriteSecuritySolution, + canReadSecuritySolution, canAccessFleet: fleetAuthz?.fleet.all ?? userRoles.includes('superuser'), canAccessEndpointManagement: hasEndpointManagementAccess, canCreateArtifactsByPolicy: hasEndpointManagementAccess && isPlatinumPlusLicense, @@ -160,14 +172,16 @@ export const calculateEndpointAuthz = ( canWritePolicyManagement, canReadPolicyManagement, canWriteActionsLogManagement, - canReadActionsLogManagement: canReadActionsLogManagement && isPlatinumPlusLicense, + canReadActionsLogManagement: canReadActionsLogManagement && isEnterpriseLicense, // Response Actions canIsolateHost: canIsolateHost && isPlatinumPlusLicense, canUnIsolateHost: canIsolateHost, canKillProcess: canWriteProcessOperations && isEnterpriseLicense, canSuspendProcess: canWriteProcessOperations && isEnterpriseLicense, canGetRunningProcesses: canWriteProcessOperations && isEnterpriseLicense, - canAccessResponseConsole: hasEndpointManagementAccess && isEnterpriseLicense, + canAccessResponseConsole: + isEnterpriseLicense && + (canIsolateHost || canWriteProcessOperations || canWriteFileOperations), canWriteFileOperations: canWriteFileOperations && isEnterpriseLicense, // artifacts canWriteTrustedApplications, @@ -183,6 +197,7 @@ export const calculateEndpointAuthz = ( export const getEndpointAuthzInitialState = (): EndpointAuthz => { return { + ...defaultEndpointPermissions(), canAccessFleet: false, canAccessEndpointManagement: false, canCreateArtifactsByPolicy: false, @@ -209,3 +224,66 @@ export const getEndpointAuthzInitialState = (): EndpointAuthz => { canReadEventFilters: false, }; }; + +const SIEM_PERMISSIONS = [ + { permission: 'canWriteSecuritySolution', privilege: 'crud' }, + { permission: 'canReadSecuritySolution', privilege: 'show' }, +] as const; + +function hasPrivilege( + kibanaPrivileges: Array<{ + resource?: string; + privilege: string; + authorized: boolean; + }>, + prefix: string, + searchPrivilege: string +): boolean { + const privilege = kibanaPrivileges.find((p) => + p.privilege.endsWith(`${prefix}${searchPrivilege}`) + ); + return privilege?.authorized || false; +} + +export function calculatePermissionsFromPrivileges( + kibanaPrivileges: + | Array<{ + resource?: string; + privilege: string; + authorized: boolean; + }> + | undefined +): EndpointPermissions { + if (!kibanaPrivileges || !kibanaPrivileges.length) { + return defaultEndpointPermissions(); + } + + const siemPermissions: EndpointPermissions = SIEM_PERMISSIONS.reduce( + (acc, { permission, privilege }) => { + return { + ...acc, + [permission]: hasPrivilege(kibanaPrivileges, 'siem/', privilege), + }; + }, + {} as EndpointPermissions + ); + + return { + ...siemPermissions, + }; +} + +export function calculatePermissionsFromCapabilities( + capabilities: Capabilities | undefined +): EndpointPermissions { + if (!capabilities || !capabilities.siem) { + return defaultEndpointPermissions(); + } + + return SIEM_PERMISSIONS.reduce((acc, { permission, privilege }) => { + return { + ...acc, + [permission]: capabilities.siem[privilege] || false, + }; + }, {} as EndpointPermissions); +} diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/index.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/index.ts index 03d14a0945184..e1e2d241754e9 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/authz/index.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/index.ts @@ -5,4 +5,10 @@ * 2.0. */ -export { getEndpointAuthzInitialState, calculateEndpointAuthz } from './authz'; +export { + getEndpointAuthzInitialState, + calculateEndpointAuthz, + calculatePermissionsFromPrivileges, + calculatePermissionsFromCapabilities, + defaultEndpointPermissions, +} from './authz'; diff --git a/x-pack/plugins/security_solution/common/endpoint/service/response_actions/constants.ts b/x-pack/plugins/security_solution/common/endpoint/service/response_actions/constants.ts index 5a22f37e0e006..06072813956b4 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/response_actions/constants.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/response_actions/constants.ts @@ -7,7 +7,10 @@ export const RESPONSE_ACTION_STATUS = ['failed', 'pending', 'successful'] as const; export type ResponseActionStatus = typeof RESPONSE_ACTION_STATUS[number]; -export const RESPONSE_ACTION_COMMANDS = [ +/** + * The Command names that are used in the API payload for the `{ command: '' }` attribute + */ +export const RESPONSE_ACTION_API_COMMANDS_NAMES = [ 'isolate', 'unisolate', 'kill-process', @@ -15,4 +18,33 @@ export const RESPONSE_ACTION_COMMANDS = [ 'running-processes', 'get-file', ] as const; -export type ResponseActions = typeof RESPONSE_ACTION_COMMANDS[number]; + +export type ResponseActionsApiCommandNames = typeof RESPONSE_ACTION_API_COMMANDS_NAMES[number]; + +/** + * The list of possible capabilities, reported by the endpoint in the metadata document + */ +export const ENDPOINT_CAPABILITIES = [ + 'isolation', + 'kill_process', + 'suspend_process', + 'running_processes', + 'get_file', +] as const; + +export type EndpointCapabilities = typeof ENDPOINT_CAPABILITIES[number]; + +/** + * The list of possible console command names that generate a Response Action to be dispatched + * to the Endpoint. (FYI: not all console commands are response actions) + */ +export const CONSOLE_RESPONSE_ACTION_COMMANDS = [ + 'isolate', + 'release', + 'kill-process', + 'suspend-process', + 'processes', + 'get-file', +] as const; + +export type ConsoleResponseActionCommands = typeof CONSOLE_RESPONSE_ACTION_COMMANDS[number]; diff --git a/x-pack/plugins/security_solution/common/endpoint/types/actions.ts b/x-pack/plugins/security_solution/common/endpoint/types/actions.ts index 40a65e886fb6d..53c6c0ae245cb 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/actions.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/actions.ts @@ -12,7 +12,10 @@ import type { ResponseActionBodySchema, KillOrSuspendProcessRequestSchema, } from '../schema/actions'; -import type { ResponseActionStatus, ResponseActions } from '../service/response_actions/constants'; +import type { + ResponseActionStatus, + ResponseActionsApiCommandNames, +} from '../service/response_actions/constants'; export type ISOLATION_ACTIONS = 'isolate' | 'unisolate'; @@ -140,7 +143,7 @@ export interface EndpointActionData< T extends EndpointActionDataParameterTypes = never, TOutputContent extends object = object > { - command: ResponseActions; + command: ResponseActionsApiCommandNames; comment?: string; parameters?: T; output?: ActionResponseOutput; @@ -282,7 +285,7 @@ export interface ActionDetails { * The Endpoint type of action (ex. `isolate`, `release`) that is being requested to be * performed on the endpoint */ - command: ResponseActions; + command: ResponseActionsApiCommandNames; /** * Will be set to true only if action is not yet completed and elapsed time has exceeded * the request's expiration date diff --git a/x-pack/plugins/security_solution/common/endpoint/types/authz.ts b/x-pack/plugins/security_solution/common/endpoint/types/authz.ts index b8ca15d69d1a6..838edc695c540 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/authz.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/authz.ts @@ -5,11 +5,21 @@ * 2.0. */ +/** + * Endpoint permissions derived from Kibana capabilities and privileges + */ +export interface EndpointPermissions { + /** if user has write permissions to the security solution app */ + canWriteSecuritySolution: boolean; + /** if user has read permissions to the security solution app */ + canReadSecuritySolution: boolean; +} + /** * Set of Endpoint Specific privileges that control application authorization. This interface is * used both on the client and server for consistency */ -export interface EndpointAuthz { +export interface EndpointAuthz extends EndpointPermissions { /** If user has permissions to access Fleet */ canAccessFleet: boolean; /** If user has permissions to access Endpoint management (includes check to ensure they also have access to fleet) */ diff --git a/x-pack/plugins/security_solution/cypress/screens/alerts.ts b/x-pack/plugins/security_solution/cypress/screens/alerts.ts index db8596074ca99..2ceeaac0e8ca7 100644 --- a/x-pack/plugins/security_solution/cypress/screens/alerts.ts +++ b/x-pack/plugins/security_solution/cypress/screens/alerts.ts @@ -22,8 +22,6 @@ export const ALERT_SEVERITY = '[data-test-subj="formatted-field-kibana.alert.sev export const ALERT_DATA_GRID = '[data-test-subj="euiDataGridBody"]'; -export const ALERTS = '[data-test-subj="events-viewer-panel"][data-test-subj="event"]'; - export const ALERTS_COUNT = '[data-test-subj="events-viewer-panel"] [data-test-subj="server-side-event-count"]'; diff --git a/x-pack/plugins/security_solution/cypress/screens/alerts_details.ts b/x-pack/plugins/security_solution/cypress/screens/alerts_details.ts index ee8bbd66b771d..5963307075113 100644 --- a/x-pack/plugins/security_solution/cypress/screens/alerts_details.ts +++ b/x-pack/plugins/security_solution/cypress/screens/alerts_details.ts @@ -42,7 +42,7 @@ export const OVERVIEW_SEVERITY = '[data-test-subj="eventDetails"] [data-test-sub export const OVERVIEW_STATUS = '[data-test-subj="eventDetails"] [data-test-subj="alertStatus"]'; -export const SUMMARY_VIEW = '[data-test-subj="summary-view"]'; +const SUMMARY_VIEW = '[data-test-subj="summary-view"]'; export const TABLE_CELL = '.euiTableRowCell'; @@ -64,8 +64,6 @@ export const THREAT_DETAILS_VIEW = '[data-test-subj="threat-details-view-0"]'; export const THREAT_INTEL_TAB = '[data-test-subj="threatIntelTab"]'; -export const TITLE = '.euiTitle'; - export const UPDATE_ENRICHMENT_RANGE_BUTTON = '[data-test-subj="enrichment-button"]'; export const OVERVIEW_TAB = '[data-test-subj="overviewTab"]'; diff --git a/x-pack/plugins/security_solution/cypress/screens/alerts_detection_rules.ts b/x-pack/plugins/security_solution/cypress/screens/alerts_detection_rules.ts index f68f31750a890..8b717d7f6bd22 100644 --- a/x-pack/plugins/security_solution/cypress/screens/alerts_detection_rules.ts +++ b/x-pack/plugins/security_solution/cypress/screens/alerts_detection_rules.ts @@ -78,8 +78,6 @@ export const RULES_MONITORING_TABLE = '[data-test-subj="allRulesTableTab-monitor export const SEVERITY = '[data-test-subj="severity"]'; -export const SHOWING_RULES_TEXT = '[data-test-subj="showingRules"]'; - export const SORT_RULES_BTN = '[data-test-subj="tableHeaderSortButton"]'; export const PAGINATION_POPOVER_BTN = '[data-test-subj="tablePaginationPopoverButton"]'; @@ -90,9 +88,6 @@ export const rowsPerPageSelector = (count: number) => export const pageSelector = (pageNumber: number) => `[data-test-subj="pagination-button-${pageNumber - 1}"]`; -export const ruleCheckboxByIdSelector = (id: string) => - `[data-test-subj="checkboxSelectRow-${id}"]`; - export const SELECT_ALL_RULES_BTN = '[data-test-subj="selectAllRules"]'; export const RULES_EMPTY_PROMPT = '[data-test-subj="rulesEmptyPrompt"]'; diff --git a/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts b/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts index 85f91188e6535..0d14673f4cf2b 100644 --- a/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts +++ b/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts @@ -125,10 +125,6 @@ export const MITRE_ATTACK_ADD_TECHNIQUE_BUTTON = '[data-test-subj="addMitreAttac export const MITRE_ATTACK_ADD_SUBTECHNIQUE_BUTTON = '[data-test-subj="addMitreAttackSubtechnique"]'; -export const PREVIEW_HEADER_SUBTITLE = '[data-test-subj="header-panel-subtitle"]'; - -export const QUERY_PREVIEW_BUTTON = '[data-test-subj="queryPreviewButton"]'; - export const REFERENCE_URLS_INPUT = '[data-test-subj="detectionEngineStepAboutRuleReferenceUrls"] input'; diff --git a/x-pack/plugins/security_solution/cypress/screens/date_picker.ts b/x-pack/plugins/security_solution/cypress/screens/date_picker.ts index 337a53650d250..b4d4e459871d8 100644 --- a/x-pack/plugins/security_solution/cypress/screens/date_picker.ts +++ b/x-pack/plugins/security_solution/cypress/screens/date_picker.ts @@ -30,8 +30,5 @@ export const SHOW_DATES_BUTTON = '[data-test-subj="superDatePickerShowDatesButto export const DATE_PICKER_SHOW_DATE_POPOVER_BUTTON = `${GLOBAL_FILTERS_CONTAINER} ${SHOW_DATES_BUTTON}`; -export const DATE_PICKER_RELATIVE_DATE_INPUT_UNIT_SELECTOR = - '[data-test-subj="superDatePickerRelativeDateInputUnitSelector"]'; - export const DATE_PICKER_START_DATE_POPOVER_BUTTON_TIMELINE = '[data-test-subj="timeline-date-picker-container"] [data-test-subj="superDatePickerstartDatePopoverButton"]'; diff --git a/x-pack/plugins/security_solution/cypress/screens/fields_browser.ts b/x-pack/plugins/security_solution/cypress/screens/fields_browser.ts index a7616e1792a65..d554d1195adef 100644 --- a/x-pack/plugins/security_solution/cypress/screens/fields_browser.ts +++ b/x-pack/plugins/security_solution/cypress/screens/fields_browser.ts @@ -18,7 +18,7 @@ export const FIELDS_BROWSER_FIELDS_COUNT = `${FIELDS_BROWSER_CONTAINER} [data-te export const FIELDS_BROWSER_FILTER_INPUT = `${FIELDS_BROWSER_CONTAINER} [data-test-subj="field-search"]`; export const FIELDS_BROWSER_VIEW_BUTTON = `${FIELDS_BROWSER_CONTAINER} [data-test-subj="viewSelectorButton"]`; -export const FIELDS_BROWSER_VIEW_MENU = '[data-test-subj="viewSelectorMenu"]'; +const FIELDS_BROWSER_VIEW_MENU = '[data-test-subj="viewSelectorMenu"]'; export const FIELDS_BROWSER_VIEW_ALL = `${FIELDS_BROWSER_VIEW_MENU} [data-test-subj="viewSelectorOption-all"]`; export const FIELDS_BROWSER_VIEW_SELECTED = `${FIELDS_BROWSER_VIEW_MENU} [data-test-subj="viewSelectorOption-selected"]`; diff --git a/x-pack/plugins/security_solution/cypress/screens/hosts/host_risk.ts b/x-pack/plugins/security_solution/cypress/screens/hosts/host_risk.ts index 8144f27565ad7..c9a1e0691f4fe 100644 --- a/x-pack/plugins/security_solution/cypress/screens/hosts/host_risk.ts +++ b/x-pack/plugins/security_solution/cypress/screens/hosts/host_risk.ts @@ -5,8 +5,6 @@ * 2.0. */ -export const RULE_NAME = '[data-test-subj="topRiskScoreContributors"] .euiTableCellContent'; - export const RISK_DETAILS_NAV = '[data-test-subj="navigation-hostRisk"]'; export const LOADING_SPINNER = '[data-test-subj="loading-spinner"]'; diff --git a/x-pack/plugins/security_solution/cypress/screens/overview.ts b/x-pack/plugins/security_solution/cypress/screens/overview.ts index 14bfce599dfaf..12de337a51aa3 100644 --- a/x-pack/plugins/security_solution/cypress/screens/overview.ts +++ b/x-pack/plugins/security_solution/cypress/screens/overview.ts @@ -6,67 +6,67 @@ */ // Host Stats -export const STAT_AUDITD = { +const STAT_AUDITD = { value: '1', domId: '[data-test-subj="host-stat-auditbeatAuditd"]', }; -export const ENDGAME_DNS = { +const ENDGAME_DNS = { value: '1', domId: '[data-test-subj="host-stat-endgameDns"]', }; -export const ENDGAME_FILE = { +const ENDGAME_FILE = { value: '1', domId: '[data-test-subj="host-stat-endgameFile"]', }; -export const ENDGAME_IMAGE_LOAD = { +const ENDGAME_IMAGE_LOAD = { value: '1', domId: '[data-test-subj="host-stat-endgameImageLoad"]', }; -export const ENDGAME_NETWORK = { +const ENDGAME_NETWORK = { value: '1', domId: '[data-test-subj="host-stat-endgameNetwork"]', }; -export const ENDGAME_PROCESS = { +const ENDGAME_PROCESS = { value: '1', domId: '[data-test-subj="host-stat-endgameProcess"]', }; -export const ENDGAME_REGISTRY = { +const ENDGAME_REGISTRY = { value: '1', domId: '[data-test-subj="host-stat-endgameRegistry"]', }; -export const ENDGAME_SECURITY = { +const ENDGAME_SECURITY = { value: '1', domId: '[data-test-subj="host-stat-endgameSecurity"]', }; -export const STAT_FILEBEAT = { +const STAT_FILEBEAT = { value: '1', domId: '[data-test-subj="host-stat-filebeatSystemModule"]', }; -export const STAT_FIM = { +const STAT_FIM = { value: '1', domId: '[data-test-subj="host-stat-auditbeatFIM"]', }; -export const STAT_LOGIN = { +const STAT_LOGIN = { value: '1', domId: '[data-test-subj="host-stat-auditbeatLogin"]', }; -export const STAT_PACKAGE = { +const STAT_PACKAGE = { value: '1', domId: '[data-test-subj="host-stat-auditbeatPackage"]', }; -export const STAT_PROCESS = { +const STAT_PROCESS = { value: '2', domId: '[data-test-subj="host-stat-auditbeatProcess"]', }; -export const STAT_USER = { +const STAT_USER = { value: '1', domId: '[data-test-subj="host-stat-auditbeatUser"]', }; -export const STAT_WINLOGBEAT_SECURITY = { +const STAT_WINLOGBEAT_SECURITY = { value: '1', domId: '[data-test-subj="host-stat-winlogbeatSecurity"]', }; -export const STAT_WINLOGBEAT_MWSYSMON_OPERATIONAL = { +const STAT_WINLOGBEAT_MWSYSMON_OPERATIONAL = { value: '1', domId: '[data-test-subj="host-stat-winlogbeatMWSysmonOperational"]', }; @@ -91,39 +91,39 @@ export const HOST_STATS = [ ]; // Network Stats -export const STAT_SOCKET = { +const STAT_SOCKET = { value: '1', domId: '[data-test-subj="network-stat-auditbeatSocket"]', }; -export const STAT_CISCO = { +const STAT_CISCO = { value: '1', domId: '[data-test-subj="network-stat-filebeatCisco"]', }; -export const STAT_NETFLOW = { +const STAT_NETFLOW = { value: '1', domId: '[data-test-subj="network-stat-filebeatNetflow"]', }; -export const STAT_PANW = { +const STAT_PANW = { value: '1', domId: '[data-test-subj="network-stat-filebeatPanw"]', }; -export const STAT_SURICATA = { +const STAT_SURICATA = { value: '1', domId: '[data-test-subj="network-stat-filebeatSuricata"]', }; -export const STAT_ZEEK = { +const STAT_ZEEK = { value: '1', domId: '[data-test-subj="network-stat-filebeatZeek"]', }; -export const STAT_DNS = { +const STAT_DNS = { value: '1', domId: '[data-test-subj="network-stat-packetbeatDNS"]', }; -export const STAT_FLOW = { +const STAT_FLOW = { value: '1', domId: '[data-test-subj="network-stat-packetbeatFlow"]', }; -export const STAT_TLS = { +const STAT_TLS = { value: '1', domId: '[data-test-subj="network-stat-packetbeatTLS"]', }; diff --git a/x-pack/plugins/security_solution/cypress/screens/rule_details.ts b/x-pack/plugins/security_solution/cypress/screens/rule_details.ts index 853e6036aac12..bad0770ffd763 100644 --- a/x-pack/plugins/security_solution/cypress/screens/rule_details.ts +++ b/x-pack/plugins/security_solution/cypress/screens/rule_details.ts @@ -28,8 +28,6 @@ export const SAVED_QUERY_DETAILS = /^Saved query$/; export const SAVED_QUERY_FILTERS_DETAILS = 'Saved query filters'; -export const FILTERS_DETAILS = 'Filters'; - export const DATA_VIEW_DETAILS = 'Data View'; export const DEFINITION_DETAILS = diff --git a/x-pack/plugins/security_solution/cypress/screens/rules_bulk_edit.ts b/x-pack/plugins/security_solution/cypress/screens/rules_bulk_edit.ts index f31d8ca86a824..9546b5da8ad8d 100644 --- a/x-pack/plugins/security_solution/cypress/screens/rules_bulk_edit.ts +++ b/x-pack/plugins/security_solution/cypress/screens/rules_bulk_edit.ts @@ -64,8 +64,6 @@ export const UPDATE_SCHEDULE_INTERVAL_INPUT = export const UPDATE_SCHEDULE_LOOKBACK_INPUT = '[data-test-subj="bulkEditRulesScheduleLookbackSelector"]'; -export const UPDATE_SCHEDULE_TIME_INTERVAL = '[data-test-subj="interval"]'; - export const UPDATE_SCHEDULE_TIME_UNIT_SELECT = '[data-test-subj="timeType"]'; export const RULES_BULK_EDIT_ACTIONS_THROTTLE_INPUT = diff --git a/x-pack/plugins/security_solution/cypress/screens/timeline.ts b/x-pack/plugins/security_solution/cypress/screens/timeline.ts index c2f83fe2b4760..529847261e06d 100644 --- a/x-pack/plugins/security_solution/cypress/screens/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/screens/timeline.ts @@ -215,8 +215,6 @@ export const TIMELINE_KQLMODE_SEARCH = '[data-test-subj="kqlModePopoverSearch"]' export const TIMELINE_KQLMODE_FILTER = '[data-test-subj="kqlModePopoverFilter"]'; -export const QUERYBAR_MENU_POPOVER = '[data-test-subj="queryBarMenuPopover"]'; - export const TIMELINE_SHOWQUERYBARMENU_BUTTON = `${TIMELINE_FLYOUT} [data-test-subj="showQueryBarMenu"]`; export const TIMELINE_SWITCHQUERYLANGUAGE_BUTTON = '[data-test-subj="switchQueryLanguageButton"]'; @@ -247,7 +245,7 @@ export const TIMELINE_FLYOUT_WRAPPER = '[data-test-subj="flyout-pane"]'; export const TIMELINE_FULL_SCREEN_BUTTON = '[data-test-subj="full-screen-active"]'; -export const TIMELINE_ROW_RENDERERS_MODAL = '[data-test-subj="row-renderers-modal"]'; +const TIMELINE_ROW_RENDERERS_MODAL = '[data-test-subj="row-renderers-modal"]'; export const TIMELINE_ROW_RENDERERS_DISABLE_ALL_BTN = `[data-test-subj="disable-all"]`; @@ -293,14 +291,9 @@ export const ALERT_TABLE_CELL_ACTIONS_ADD_TO_TIMELINE = '[data-test-subj="add-to export const ACTIVE_TIMELINE_BOTTOM_BAR = '[data-test-subj="flyoutBottomBar"] .active-timeline-button'; -export const DATA_GRID_BODY = '[data-test-subj=body-data-grid] .euiDataGrid__virtualized'; - export const GET_TIMELINE_GRID_CELL = (fieldName: string) => `[data-test-subj="draggable-content-${fieldName}"]`; -export const GET_TIMELINE_GRID_HEADER = (fieldName: string) => - `[data-test-subj="header-${fieldName}"]`; - export const EMPTY_DROPPABLE_DATA_PROVIDER_GROUP = `.empty-providers-group`; export const TIMELINE_DATA_PROVIDERS_CONTAINER = '[data-test-subj="dataProviders"]'; diff --git a/x-pack/plugins/security_solution/cypress/screens/timelines.ts b/x-pack/plugins/security_solution/cypress/screens/timelines.ts index c9f06fa88b52f..40b75ad9c63be 100644 --- a/x-pack/plugins/security_solution/cypress/screens/timelines.ts +++ b/x-pack/plugins/security_solution/cypress/screens/timelines.ts @@ -46,7 +46,7 @@ export const TIMELINES_USERNAME = '[data-test-subj="username"]'; export const REFRESH_BUTTON = '[data-test-subj="refreshButton-linkIcon"]'; -export const TIMELINES_OVERVIEW = '[data-test-subj="timelines-container"]'; +const TIMELINES_OVERVIEW = '[data-test-subj="timelines-container"]'; export const TIMELINES_OVERVIEW_ONLY_FAVORITES = `${TIMELINES_OVERVIEW} [data-test-subj="only-favorites-toggle"]`; diff --git a/x-pack/plugins/security_solution/cypress/screens/users/user_risk_score.ts b/x-pack/plugins/security_solution/cypress/screens/users/user_risk_score.ts index 717cefb6190a8..816334d7fc197 100644 --- a/x-pack/plugins/security_solution/cypress/screens/users/user_risk_score.ts +++ b/x-pack/plugins/security_solution/cypress/screens/users/user_risk_score.ts @@ -7,4 +7,3 @@ export const RISK_SCORE_TAB = '[data-test-subj="navigation-userRisk"]'; export const RISK_SCORE_TAB_CONTENT = '[data-test-subj="table-userRisk-loading-false"]'; -export const RISK_SCORE_ENABLE_BUTTON = '[data-test-subj="enable_user_risk_score"]'; diff --git a/x-pack/plugins/security_solution/cypress/tasks/alerts.ts b/x-pack/plugins/security_solution/cypress/tasks/alerts.ts index b9191075a214f..9df0fb86f218c 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/alerts.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/alerts.ts @@ -16,7 +16,6 @@ import { GROUP_BY_TOP_INPUT, ACKNOWLEDGED_ALERTS_FILTER_BTN, LOADING_ALERTS_PANEL, - MANAGE_ALERT_DETECTION_RULES_BTN, MARK_ALERT_ACKNOWLEDGED_BTN, OPEN_ALERT_BTN, OPENED_ALERTS_FILTER_BTN, @@ -107,10 +106,6 @@ export const goToClosedAlerts = () => { cy.get(TIMELINE_COLUMN_SPINNER).should('not.exist'); }; -export const goToManageAlertsDetectionRules = () => { - cy.get(MANAGE_ALERT_DETECTION_RULES_BTN).should('exist').click({ force: true }); -}; - export const goToOpenedAlerts = () => { cy.get(OPENED_ALERTS_FILTER_BTN).click({ force: true }); cy.get(REFRESH_BUTTON).should('not.have.attr', 'aria-label', 'Needs updating'); diff --git a/x-pack/plugins/security_solution/cypress/tasks/alerts_details.ts b/x-pack/plugins/security_solution/cypress/tasks/alerts_details.ts index e95e031680e7b..b5bff14fd5492 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/alerts_details.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/alerts_details.ts @@ -9,7 +9,6 @@ import { ALERT_FLYOUT, ENRICHMENT_COUNT_NOTIFICATION, JSON_VIEW_TAB, - OVERVIEW_TAB, TABLE_TAB, FILTER_INPUT, } from '../screens/alerts_details'; @@ -23,10 +22,6 @@ export const openJsonView = () => { cy.get(JSON_VIEW_TAB).click(); }; -export const openOverview = () => { - cy.get(OVERVIEW_TAB).click(); -}; - export const openTable = () => { cy.get(TABLE_TAB).click(); }; diff --git a/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts b/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts index 45d594e236316..13c0c7a7735bc 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts @@ -9,7 +9,6 @@ import { duplicatedRuleName } from '../objects/rule'; import { BULK_ACTIONS_BTN, COLLAPSED_ACTION_BTN, - CREATE_NEW_RULE_BTN, CUSTOM_RULES_BTN, DELETE_RULE_ACTION_BTN, DELETE_RULE_BULK_BTN, @@ -164,10 +163,6 @@ export const filterByCustomRules = () => { cy.get(CUSTOM_RULES_BTN).click({ force: true }); }; -export const goToCreateNewRule = () => { - cy.get(CREATE_NEW_RULE_BTN).click({ force: true }); -}; - export const goToRuleDetails = () => { cy.get(RULE_NAME).first().click({ force: true }); }; @@ -348,13 +343,13 @@ export const importRules = (rulesFile: string) => { cy.get(INPUT_FILE).should('not.exist'); }; -export const selectOverwriteRulesImport = () => { +const selectOverwriteRulesImport = () => { cy.get(RULE_IMPORT_OVERWRITE_CHECKBOX) .pipe(($el) => $el.trigger('click')) .should('be.checked'); }; -export const selectOverwriteExceptionsRulesImport = () => { +const selectOverwriteExceptionsRulesImport = () => { cy.get(RULE_IMPORT_OVERWRITE_EXCEPTIONS_CHECKBOX) .pipe(($el) => $el.trigger('click')) .should('be.checked'); diff --git a/x-pack/plugins/security_solution/cypress/tasks/api_calls/elasticsearch.ts b/x-pack/plugins/security_solution/cypress/tasks/api_calls/elasticsearch.ts index 7e2cef6654034..385b38ffca507 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/api_calls/elasticsearch.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/api_calls/elasticsearch.ts @@ -5,24 +5,6 @@ * 2.0. */ -export const createIndex = (index: string) => { - cy.request({ - method: 'PUT', - url: `${Cypress.env('ELASTICSEARCH_URL')}/${index}`, - headers: { 'kbn-xsrf': 'cypress-creds' }, - failOnStatusCode: false, - }); -}; - -export const createDocument = (index: string, document: string) => { - cy.request({ - method: 'POST', - url: `${Cypress.env('ELASTICSEARCH_URL')}/${index}/_doc`, - headers: { 'kbn-xsrf': 'cypress-creds' }, - body: JSON.parse(document), - }); -}; - export const deleteIndex = (index: string) => { cy.request({ method: 'DELETE', diff --git a/x-pack/plugins/security_solution/cypress/tasks/api_calls/risk_scores/saved_objects.ts b/x-pack/plugins/security_solution/cypress/tasks/api_calls/risk_scores/saved_objects.ts index 786396654b3bf..8cdc0bbf2c1e9 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/api_calls/risk_scores/saved_objects.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/api_calls/risk_scores/saved_objects.ts @@ -24,15 +24,6 @@ export const deleteSavedObjects = ( }); }; -export const createSavedObjects = (templateName: `${RiskScoreEntity}RiskScoreDashboards`) => { - return cy.request({ - method: 'post', - url: `${RISK_SCORE_SAVED_OBJECTS_URL}/_bulk_create/${templateName}`, - failOnStatusCode: false, - headers: { 'kbn-xsrf': 'cypress-creds-via-config' }, - }); -}; - export const findSavedObjects = (riskScoreEntity: RiskScoreEntity, spaceId = 'default') => { const search = getRiskScoreTagName(riskScoreEntity, spaceId); diff --git a/x-pack/plugins/security_solution/cypress/tasks/api_calls/spaces.ts b/x-pack/plugins/security_solution/cypress/tasks/api_calls/spaces.ts deleted file mode 100644 index 2bcd2910a3c1a..0000000000000 --- a/x-pack/plugins/security_solution/cypress/tasks/api_calls/spaces.ts +++ /dev/null @@ -1,30 +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 const createSpace = (id: string) => { - cy.request({ - method: 'POST', - url: 'api/spaces/space', - body: { - id, - name: id, - }, - headers: { 'kbn-xsrf': 'cypress-creds' }, - }).then((response) => { - expect(response.status).equal(200); - }); -}; - -export const removeSpace = (id: string) => { - cy.request({ - method: 'delete', - url: `/api/spaces/space/${id}`, - headers: { 'kbn-xsrf': 'cypress-creds' }, - }).then((response) => { - expect(response.status).equal(204); - }); -}; diff --git a/x-pack/plugins/security_solution/cypress/tasks/common.ts b/x-pack/plugins/security_solution/cypress/tasks/common.ts index 738563d002368..4b1a647906d46 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/common.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/common.ts @@ -156,23 +156,6 @@ export const deleteConnectors = () => { }); }; -export const deleteSavedQueries = () => { - const kibanaIndexUrl = `${Cypress.env('ELASTICSEARCH_URL')}/.kibana_\*`; - cy.request('POST', `${kibanaIndexUrl}/_delete_by_query?conflicts=proceed`, { - query: { - bool: { - filter: [ - { - match: { - type: 'query', - }, - }, - ], - }, - }, - }); -}; - export const postDataView = (dataSource: string) => { cy.request({ method: 'POST', diff --git a/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts b/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts index e2b0b1bca56f0..7fdc101f8b14c 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts @@ -56,7 +56,6 @@ import { MITRE_ATTACK_TECHNIQUE_DROPDOWN, MITRE_TACTIC, QUERY_BAR, - QUERY_PREVIEW_BUTTON, REFERENCE_URLS_INPUT, REFRESH_BUTTON, RISK_MAPPING_OVERRIDE_OPTION, @@ -150,11 +149,11 @@ export const fillAboutRule = ( } }; -export const fillNote = (note: string) => { +const fillNote = (note: string) => { cy.get(INVESTIGATION_NOTES_TEXTAREA).clear({ force: true }).type(note, { force: true }); }; -export const fillMitre = (mitreAttacks: Mitre[]) => { +const fillMitre = (mitreAttacks: Mitre[]) => { let techniqueIndex = 0; let subtechniqueInputIndex = 0; mitreAttacks.forEach((mitre, tacticIndex) => { @@ -181,7 +180,7 @@ export const fillMitre = (mitreAttacks: Mitre[]) => { }); }; -export const fillFalsePositiveExamples = (falsePositives: string[]) => { +const fillFalsePositiveExamples = (falsePositives: string[]) => { falsePositives.forEach((falsePositive, index) => { cy.get(FALSE_POSITIVES_INPUT) .eq(index) @@ -191,22 +190,22 @@ export const fillFalsePositiveExamples = (falsePositives: string[]) => { }); }; -export const fillSeverity = (severity: string) => { +const fillSeverity = (severity: string) => { cy.get(SEVERITY_DROPDOWN).click({ force: true }); cy.get(`#${severity.toLowerCase()}`).click(); }; -export const fillRiskScore = (riskScore: string) => { +const fillRiskScore = (riskScore: string) => { cy.get(DEFAULT_RISK_SCORE_INPUT).type(`{selectall}${riskScore}`, { force: true }); }; -export const fillRuleTags = (tags: string[]) => { +const fillRuleTags = (tags: string[]) => { tags.forEach((tag) => { cy.get(TAGS_INPUT).type(`${tag}{enter}`, { force: true }); }); }; -export const fillReferenceUrls = (referenceUrls: string[]) => { +const fillReferenceUrls = (referenceUrls: string[]) => { referenceUrls.forEach((url, index) => { cy.get(REFERENCE_URLS_INPUT).eq(index).clear({ force: true }).type(url, { force: true }); cy.get(ADD_REFERENCE_URL_BTN).click({ force: true }); @@ -275,7 +274,7 @@ export const fillAboutRuleWithOverrideAndContinue = (rule: OverrideRule) => { getAboutContinueButton().should('exist').click({ force: true }); }; -export const fillCustomQuery = (rule: CustomRule | OverrideRule) => { +const fillCustomQuery = (rule: CustomRule | OverrideRule) => { if (rule.timeline?.id) { cy.get(IMPORT_QUERY_FROM_SAVED_TIMELINE_LINK).click(); cy.get(TIMELINE(rule.timeline.id)).click(); @@ -329,29 +328,6 @@ export const fillRuleAction = (rule: CustomRule) => { } }; -export const fillDefineThresholdRule = (rule: ThresholdRule) => { - const thresholdField = 0; - const threshold = 1; - - fillCustomQuery(rule); - cy.get(COMBO_BOX_CLEAR_BTN).first().click(); - - if (rule.dataSource.type === 'indexPatterns') { - rule.dataSource.index.forEach((index) => { - cy.get(COMBO_BOX_INPUT).first().type(`${index}{enter}`); - }); - } - - cy.get(CUSTOM_QUERY_INPUT).should('have.value', rule.customQuery); - cy.get(THRESHOLD_INPUT_AREA) - .find(INPUT) - .then((inputs) => { - cy.wrap(inputs[thresholdField]).type(rule.thresholdField); - cy.get(EUI_FILTER_SELECT_ITEM).click({ force: true }); - cy.wrap(inputs[threshold]).clear().type(rule.threshold); - }); -}; - export const fillDefineThresholdRuleAndContinue = (rule: ThresholdRule) => { const thresholdField = 0; const threshold = 1; @@ -504,7 +480,7 @@ export const getIndicatorAtLeastOneInvalidationText = () => cy.contains(AT_LEAST export const getIndexPatternInvalidationText = () => cy.contains(AT_LEAST_ONE_INDEX_PATTERN); /** Returns the continue button on the step of about */ -export const getAboutContinueButton = () => cy.get(ABOUT_CONTINUE_BTN); +const getAboutContinueButton = () => cy.get(ABOUT_CONTINUE_BTN); /** Returns the continue button on the step of define */ export const getDefineContinueButton = () => cy.get(DEFINE_CONTINUE_BUTTON); @@ -595,10 +571,6 @@ export const selectNewTermsRuleType = () => { cy.get(NEW_TERMS_TYPE).click({ force: true }); }; -export const previewResults = () => { - cy.get(QUERY_PREVIEW_BUTTON).click(); -}; - export const waitForAlertsToPopulate = async (alertCountThreshold = 1) => { cy.waitUntil( () => { diff --git a/x-pack/plugins/security_solution/cypress/tasks/kibana_navigation.ts b/x-pack/plugins/security_solution/cypress/tasks/kibana_navigation.ts index 43630e63ebfe2..3b3fc0c6da4e4 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/kibana_navigation.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/kibana_navigation.ts @@ -5,11 +5,7 @@ * 2.0. */ -import { - KIBANA_NAVIGATION_TOGGLE, - SPACES_BUTTON, - getGoToSpaceMenuItem, -} from '../screens/kibana_navigation'; +import { KIBANA_NAVIGATION_TOGGLE } from '../screens/kibana_navigation'; export const navigateFromKibanaCollapsibleTo = (page: string) => { cy.get(page).click(); @@ -18,9 +14,3 @@ export const navigateFromKibanaCollapsibleTo = (page: string) => { export const openKibanaNavigation = () => { cy.get(KIBANA_NAVIGATION_TOGGLE).click(); }; - -export const changeSpace = (space: string) => { - cy.get(`${SPACES_BUTTON}`).click(); - cy.get(getGoToSpaceMenuItem(space)).click(); - cy.get(`[data-test-subj="space-avatar-${space}"]`).should('exist'); -}; diff --git a/x-pack/plugins/security_solution/cypress/tasks/lists.ts b/x-pack/plugins/security_solution/cypress/tasks/lists.ts index 19f7645b8522d..edbeb785d4297 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/lists.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/lists.ts @@ -70,9 +70,7 @@ export const exportValueList = (): Cypress.Chainable> => { * Given an array of value lists this will delete them all using Cypress Request and the lists REST API * Ref: https://www.elastic.co/guide/en/security/current/lists-api-delete-container.html */ -export const deleteValueLists = ( - lists: string[] -): Array>> => { +const deleteValueLists = (lists: string[]): Array>> => { return lists.map((list) => deleteValueList(list)); }; @@ -80,7 +78,7 @@ export const deleteValueLists = ( * Given a single value list this will delete it using Cypress Request and lists REST API * Ref: https://www.elastic.co/guide/en/security/current/lists-api-delete-container.html */ -export const deleteValueList = (list: string): Cypress.Chainable> => { +const deleteValueList = (list: string): Cypress.Chainable> => { return cy.request({ method: 'DELETE', url: `api/lists?id=${list}`, @@ -99,7 +97,7 @@ export const deleteValueList = (list: string): Cypress.Chainable { +const getUrlWithRoute = (role: ROLES, route: string) => { const url = Cypress.config().baseUrl; const kibana = new URL(String(url)); const theUrl = `${Url.format({ @@ -100,14 +100,14 @@ export const constructUrlWithUser = (user: User, route: string) => { return builtUrl.href; }; -export const getCurlScriptEnvVars = () => ({ +const getCurlScriptEnvVars = () => ({ ELASTICSEARCH_URL: Cypress.env('ELASTICSEARCH_URL'), ELASTICSEARCH_USERNAME: Cypress.env('ELASTICSEARCH_USERNAME'), ELASTICSEARCH_PASSWORD: Cypress.env('ELASTICSEARCH_PASSWORD'), KIBANA_URL: Cypress.config().baseUrl, }); -export const postRoleAndUser = (role: ROLES) => { +const postRoleAndUser = (role: ROLES) => { const env = getCurlScriptEnvVars(); const detectionsRoleScriptPath = `./server/lib/detection_engine/scripts/roles_users/${role}/post_detections_role.sh`; const detectionsRoleJsonPath = `./server/lib/detection_engine/scripts/roles_users/${role}/detections_role.json`; @@ -152,7 +152,7 @@ export const loginWithUser = (user: User) => { }); }; -export const loginWithRole = async (role: ROLES) => { +const loginWithRole = async (role: ROLES) => { postRoleAndUser(role); const theUrl = Url.format({ auth: `${role}:changeme`, diff --git a/x-pack/plugins/security_solution/cypress/tasks/overview.ts b/x-pack/plugins/security_solution/cypress/tasks/overview.ts index efda406c46243..315591c94c11d 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/overview.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/overview.ts @@ -7,7 +7,7 @@ import { OVERVIEW_HOST_STATS, OVERVIEW_NETWORK_STATS } from '../screens/overview'; -export const expand = (statType: string) => { +const expand = (statType: string) => { cy.get(statType).find('button').invoke('click'); }; diff --git a/x-pack/plugins/security_solution/cypress/tasks/risk_scores/transforms.ts b/x-pack/plugins/security_solution/cypress/tasks/risk_scores/transforms.ts index aa41facee24e9..c1e654d530653 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/risk_scores/transforms.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/risk_scores/transforms.ts @@ -16,7 +16,7 @@ import { } from './stored_scripts'; const DEFAULT_ALERTS_INDEX = '.alerts-security.alerts' as const; -export const getAlertsIndex = (spaceId = 'default') => `${DEFAULT_ALERTS_INDEX}-${spaceId}`; +const getAlertsIndex = (spaceId = 'default') => `${DEFAULT_ALERTS_INDEX}-${spaceId}`; export const getRiskScorePivotTransformId = ( riskScoreEntity: RiskScoreEntity, @@ -76,7 +76,7 @@ export const createTransform = (transformId: string, options: string | Record { +const deleteTransform = (transformId: string) => { return cy.request({ method: 'post', url: `${TRANSFORMS_URL}/delete_transforms`, diff --git a/x-pack/plugins/security_solution/cypress/tasks/rule_details.ts b/x-pack/plugins/security_solution/cypress/tasks/rule_details.ts index a412675ab5331..3f7d31f060473 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/rule_details.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/rule_details.ts @@ -86,7 +86,7 @@ export const searchForExceptionItem = (query: string) => { }); }; -export const addExceptionFlyoutFromViewerHeader = () => { +const addExceptionFlyoutFromViewerHeader = () => { cy.root() .pipe(($el) => { $el.find(ADD_EXCEPTIONS_BTN_FROM_VIEWER_HEADER).trigger('click'); diff --git a/x-pack/plugins/security_solution/cypress/tasks/rules_bulk_edit.ts b/x-pack/plugins/security_solution/cypress/tasks/rules_bulk_edit.ts index 2f6863dbd3a1c..64f0e88849356 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/rules_bulk_edit.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/rules_bulk_edit.ts @@ -48,12 +48,12 @@ export const clickApplyTimelineTemplatesMenuItem = () => { cy.get(APPLY_TIMELINE_RULE_BULK_MENU_ITEM).click().should('not.exist'); }; -export const clickIndexPatternsMenuItem = () => { +const clickIndexPatternsMenuItem = () => { cy.get(BULK_ACTIONS_BTN).click(); cy.get(INDEX_PATTERNS_RULE_BULK_MENU_ITEM).click().should('not.exist'); }; -export const clickTagsMenuItem = () => { +const clickTagsMenuItem = () => { cy.get(BULK_ACTIONS_BTN).click(); cy.get(TAGS_RULE_BULK_MENU_ITEM).click(); }; @@ -73,11 +73,6 @@ export const clickAddIndexPatternsMenuItem = () => { cy.get(ADD_INDEX_PATTERNS_RULE_BULK_MENU_ITEM).click(); }; -export const clickDeleteIndexPatternsMenuItem = () => { - clickIndexPatternsMenuItem(); - cy.get(DELETE_INDEX_PATTERNS_RULE_BULK_MENU_ITEM).click().should('not.exist'); -}; - export const openBulkEditAddIndexPatternsForm = () => { clickAddIndexPatternsMenuItem(); diff --git a/x-pack/plugins/security_solution/cypress/tasks/sourcerer.ts b/x-pack/plugins/security_solution/cypress/tasks/sourcerer.ts index d8fe638da7f0c..dc600f9250618 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/sourcerer.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/sourcerer.ts @@ -22,7 +22,8 @@ export const openSourcerer = (sourcererScope?: string) => { cy.get(SOURCERER.trigger).click(); cy.get(SOURCERER.wrapper).should('be.visible'); }; -export const openTimelineSourcerer = () => { + +const openTimelineSourcerer = () => { cy.get(SOURCERER.triggerTimeline).should('be.enabled'); cy.get(SOURCERER.triggerTimeline).should('be.visible'); cy.get(SOURCERER.triggerTimeline).first().click(); @@ -33,7 +34,7 @@ export const openAdvancedSettings = () => { cy.get(SOURCERER.advancedSettings).click(); }; -export const clickOutOfSelector = () => { +const clickOutOfSelector = () => { return cy.get(SOURCERER.popoverTitle).first().click(); }; @@ -128,7 +129,7 @@ export const deleteAlertsIndex = () => { }); }; -export const refreshUntilAlertsIndexExists = async () => { +const refreshUntilAlertsIndexExists = async () => { cy.waitUntil( () => { cy.reload(); diff --git a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts index f5b1a2c794cbc..1ff04833db2a4 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts @@ -85,7 +85,7 @@ import { drag, drop } from './common'; import { closeFieldsBrowser, filterFieldsBrowser } from './fields_browser'; -export const hostExistsQuery = 'host.name: *'; +const hostExistsQuery = 'host.name: *'; export const addDescriptionToTimeline = ( description: string, diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/insights/related_alerts_by_process_ancestry.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/insights/related_alerts_by_process_ancestry.tsx index 28737c60f4e07..d0330345e364a 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/insights/related_alerts_by_process_ancestry.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/insights/related_alerts_by_process_ancestry.tsx @@ -6,7 +6,7 @@ */ import React, { useMemo, useCallback, useEffect, useState } from 'react'; -import { EuiSpacer, EuiLoadingSpinner } from '@elastic/eui'; +import { EuiBetaBadge, EuiSpacer, EuiLoadingSpinner } from '@elastic/eui'; import type { DataProvider } from '../../../../../common/types'; import { TimelineId } from '../../../../../common/types/timeline'; @@ -23,6 +23,7 @@ import { PROCESS_ANCESTRY_EMPTY, PROCESS_ANCESTRY_ERROR, } from './translations'; +import { BETA } from '../../../translations'; interface Props { data: TimelineEventsDetailsItem; @@ -97,6 +98,8 @@ export const RelatedAlertsByProcessAncestry = React.memo( ); }, [showContent, cache, data, eventId, timelineId, index, originalDocumentId]); + const betaBadge = useMemo(() => , []); + return ( ( } renderContent={renderContent} onToggle={onToggle} + extraAction={betaBadge} /> ); } diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts index a0d23820025b8..b9df2e976966a 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts @@ -52,6 +52,15 @@ describe('When using useEndpointPrivileges hook', () => { (useCurrentUser as jest.Mock).mockReturnValue(authenticatedUser); useKibanaMock().services.fleet!.authz = createFleetAuthzMock(); + useKibanaMock().services.application.capabilities = { + catalogue: {}, + management: {}, + navLinks: {}, + siem: { + crud: true, + show: true, + }, + }; licenseServiceMock.isPlatinumPlus.mockReturnValue(true); @@ -63,6 +72,7 @@ describe('When using useEndpointPrivileges hook', () => { }); afterEach(() => { + jest.resetAllMocks(); unmount(); }); diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.ts b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.ts index 7d7233312fecc..17de09113df9a 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.ts +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.ts @@ -17,6 +17,7 @@ import type { import { calculateEndpointAuthz, getEndpointAuthzInitialState, + calculatePermissionsFromCapabilities, } from '../../../../../common/endpoint/service/authz'; import { useSecuritySolutionStartDependencies } from './security_solution_start_dependencies'; import { useIsExperimentalFeatureEnabled } from '../../../hooks/use_experimental_features'; @@ -44,11 +45,21 @@ export const useEndpointPrivileges = (): Immutable => { const fleetServices = fleetServicesFromUseKibana ?? fleetServicesFromPluginStart; const isEndpointRbacEnabled = useIsExperimentalFeatureEnabled('endpointRbacEnabled'); + const endpointPermissions = calculatePermissionsFromCapabilities( + useKibana().services.application.capabilities + ); + const privileges = useMemo(() => { const privilegeList: EndpointPrivileges = Object.freeze({ loading: !fleetCheckDone || !userRolesCheckDone || !user, ...(fleetAuthz - ? calculateEndpointAuthz(licenseService, fleetAuthz, userRoles, isEndpointRbacEnabled) + ? calculateEndpointAuthz( + licenseService, + fleetAuthz, + userRoles, + isEndpointRbacEnabled, + endpointPermissions + ) : getEndpointAuthzInitialState()), }); @@ -61,6 +72,7 @@ export const useEndpointPrivileges = (): Immutable => { licenseService, userRoles, isEndpointRbacEnabled, + endpointPermissions, ]); // Check if user can access fleet diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/__snapshots__/authentication.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/__snapshots__/authentication.test.ts.snap index 747487203066b..f683d2828bae3 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/__snapshots__/authentication.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/__snapshots__/authentication.test.ts.snap @@ -27,7 +27,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "3fd0c5d5-f762-4a27-8c56-14eee0223e13": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/__snapshots__/external_alert.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/__snapshots__/external_alert.test.ts.snap index ac42b228012fe..425f545129ee6 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/__snapshots__/external_alert.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/__snapshots__/external_alert.test.ts.snap @@ -27,7 +27,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "a3c54471-615f-4ff9-9fda-69b5b2ea3eef": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/authentication.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/authentication.ts index 15d7f029ae612..4e69bac6287ec 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/authentication.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/authentication.ts @@ -98,7 +98,7 @@ export const authenticationLensAttributes: LensAttributes = { }, ], datasourceStates: { - indexpattern: { + formBased: { layers: { '3fd0c5d5-f762-4a27-8c56-14eee0223e13': { columns: { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/external_alert.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/external_alert.ts index a815d442b043e..f5a664b98161b 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/external_alert.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/external_alert.ts @@ -71,7 +71,7 @@ export const getExternalAlertLensAttributes: GetLensAttributes = ( }, ], datasourceStates: { - indexpattern: { + formBased: { layers: { 'a3c54471-615f-4ff9-9fda-69b5b2ea3eef': { columns: { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/event.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/event.test.ts.snap index 7f3fdb6c66107..129a82aa1692c 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/event.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/event.test.ts.snap @@ -17,7 +17,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "0039eb0c-9a1a-4687-ae54-0f4e239bec75": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_host_area.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_host_area.test.ts.snap index c5e4e272ec9c4..b9165ea5c38a8 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_host_area.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_host_area.test.ts.snap @@ -17,7 +17,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "416b6fad-1923-4f6a-a2df-b223bb287e30": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_host_metric.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_host_metric.test.ts.snap index 3669de2d30109..ea37bec0d1976 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_host_metric.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_host_metric.test.ts.snap @@ -17,7 +17,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "416b6fad-1923-4f6a-a2df-b223bb287e30": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_area.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_area.test.ts.snap index acaf78556269f..f45cd86c70ed2 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_area.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_area.test.ts.snap @@ -22,7 +22,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "8be0156b-d423-4a39-adf1-f54d4c9f2e69": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_bar.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_bar.test.ts.snap index 9f702ecb06412..0a66d46f9a7db 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_bar.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_bar.test.ts.snap @@ -22,7 +22,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "8be0156b-d423-4a39-adf1-f54d4c9f2e69": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_destination_metric.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_destination_metric.test.ts.snap index ebeb85e27a44f..3ca56d9f020b2 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_destination_metric.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_destination_metric.test.ts.snap @@ -17,7 +17,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "8be0156b-d423-4a39-adf1-f54d4c9f2e69": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_source_metric.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_source_metric.test.ts.snap index f8ec7bb8c70d7..2972842a6f419 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_source_metric.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/__snapshots__/kpi_unique_ips_source_metric.test.ts.snap @@ -17,7 +17,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "8be0156b-d423-4a39-adf1-f54d4c9f2e69": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/events.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/events.ts index da244d40565fb..f07716f8c4bd7 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/events.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/events.ts @@ -53,7 +53,7 @@ export const getEventsHistogramLensAttributes: GetLensAttributes = ( }, filters: [], datasourceStates: { - indexpattern: { + formBased: { layers: { '0039eb0c-9a1a-4687-ae54-0f4e239bec75': { columns: { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_area.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_area.ts index 64f62133e9406..6eb400734ebe0 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_area.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_area.ts @@ -12,7 +12,7 @@ export const kpiHostAreaLensAttributes: LensAttributes = { description: '', state: { datasourceStates: { - indexpattern: { + formBased: { layers: { '416b6fad-1923-4f6a-a2df-b223bb287e30': { columnOrder: [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric.ts index 00ab0239acb40..66b6b63a69321 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric.ts @@ -11,7 +11,7 @@ export const kpiHostMetricLensAttributes: LensAttributes = { description: '', state: { datasourceStates: { - indexpattern: { + formBased: { layers: { '416b6fad-1923-4f6a-a2df-b223bb287e30': { columnOrder: ['b00c65ea-32be-4163-bfc8-f795b1ef9d06'], diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area.ts index ac0d102a5f03c..79539f40390af 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area.ts @@ -12,7 +12,7 @@ export const kpiUniqueIpsAreaLensAttributes: LensAttributes = { description: '', state: { datasourceStates: { - indexpattern: { + formBased: { layers: { '8be0156b-d423-4a39-adf1-f54d4c9f2e69': { columnOrder: [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar.ts index cf7dbf21913b5..862eb64b44eeb 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar.ts @@ -12,7 +12,7 @@ export const kpiUniqueIpsBarLensAttributes: LensAttributes = { description: '', state: { datasourceStates: { - indexpattern: { + formBased: { layers: { '8be0156b-d423-4a39-adf1-f54d4c9f2e69': { columnOrder: [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric.ts index 5c4aa31f65833..094bc189f1ac7 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric.ts @@ -11,7 +11,7 @@ export const kpiUniqueIpsDestinationMetricLensAttributes: LensAttributes = { description: '', state: { datasourceStates: { - indexpattern: { + formBased: { layers: { '8be0156b-d423-4a39-adf1-f54d4c9f2e69': { columnOrder: ['d9a6eb6b-8b78-439e-98e7-a718f8ffbebe'], diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric.ts index 4d308b95d796d..388f5ef53b301 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric.ts @@ -11,7 +11,7 @@ export const kpiUniqueIpsSourceMetricLensAttributes: LensAttributes = { description: '', state: { datasourceStates: { - indexpattern: { + formBased: { layers: { '8be0156b-d423-4a39-adf1-f54d4c9f2e69': { columnOrder: ['d9a6eb6b-8b78-439e-98e7-a718f8ffbebe'], diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/dns_top_domains.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/dns_top_domains.test.ts.snap index 6e0f9c2bbd516..392d68b512b41 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/dns_top_domains.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/dns_top_domains.test.ts.snap @@ -22,7 +22,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "b1c3efc6-c886-4fba-978f-3b6bb5e7948a": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_dns_queries.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_dns_queries.test.ts.snap index 39f16779abaf4..173a1229e1282 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_dns_queries.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_dns_queries.test.ts.snap @@ -22,7 +22,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "cea37c70-8f91-43bf-b9fe-72d8c049f6a3": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_network_events.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_network_events.test.ts.snap index 03bacfac49ad7..c9b0441a25a4b 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_network_events.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_network_events.test.ts.snap @@ -27,7 +27,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "eaadfec7-deaa-4aeb-a403-3b4e516416d2": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_tls_handshakes.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_tls_handshakes.test.ts.snap index 6e695484fdc0f..532d81001ab06 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_tls_handshakes.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_tls_handshakes.test.ts.snap @@ -17,7 +17,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "1f48a633-8eee-45ae-9471-861227e9ca03": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_flow_ids.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_flow_ids.test.ts.snap index 1e3f1f63c40c8..60a52f4f5b4a9 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_flow_ids.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_flow_ids.test.ts.snap @@ -17,7 +17,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "5d46d48f-6ce8-46be-a797-17ad50642564": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_area.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_area.test.ts.snap index 2415dcc6c750c..11e3f62d0cd4c 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_area.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_area.test.ts.snap @@ -22,7 +22,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "38aa6532-6bf9-4c8f-b2a6-da8d32f7d0d7": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_bar.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_bar.test.ts.snap index 2ea658869183c..2a702bb87f3fd 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_bar.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_bar.test.ts.snap @@ -22,7 +22,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "38aa6532-6bf9-4c8f-b2a6-da8d32f7d0d7": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_destination_metric.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_destination_metric.test.ts.snap index 37311a980c6b4..9f205c5c23c07 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_destination_metric.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_destination_metric.test.ts.snap @@ -17,7 +17,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "cea37c70-8f91-43bf-b9fe-72d8c049f6a3": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_source_metric.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_source_metric.test.ts.snap index 2f7ba7d2997b1..b7e25a6ceb8f4 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_source_metric.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/__snapshots__/kpi_unique_private_ips_source_metric.test.ts.snap @@ -17,7 +17,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "cea37c70-8f91-43bf-b9fe-72d8c049f6a3": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/dns_top_domains.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/dns_top_domains.ts index ef75bea77c3e0..0f195bdeaa8d4 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/dns_top_domains.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/dns_top_domains.ts @@ -89,7 +89,7 @@ export const dnsTopDomainsLensAttributes: LensAttributes = { }, ], datasourceStates: { - indexpattern: { + formBased: { layers: { 'b1c3efc6-c886-4fba-978f-3b6bb5e7948a': { columns: { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_dns_queries.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_dns_queries.ts index 681cd278214b1..c4691a4797b5b 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_dns_queries.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_dns_queries.ts @@ -64,7 +64,7 @@ export const kpiDnsQueriesLensAttributes: LensAttributes = { }, ], datasourceStates: { - indexpattern: { + formBased: { layers: { 'cea37c70-8f91-43bf-b9fe-72d8c049f6a3': { columns: { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_network_events.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_network_events.ts index 534ffeb2024e6..bb88ceb732c66 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_network_events.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_network_events.ts @@ -62,7 +62,7 @@ export const kpiNetworkEventsLensAttributes: LensAttributes = { }, ], datasourceStates: { - indexpattern: { + formBased: { layers: { 'eaadfec7-deaa-4aeb-a403-3b4e516416d2': { columns: { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes.ts index 367fe6fd40f6f..b7b651bf56362 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes.ts @@ -93,7 +93,7 @@ export const kpiTlsHandshakesLensAttributes: LensAttributes = { }, ], datasourceStates: { - indexpattern: { + formBased: { layers: { '1f48a633-8eee-45ae-9471-861227e9ca03': { columns: { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids.ts index 5f31645c75eca..3660f2ff6ad06 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids.ts @@ -56,7 +56,7 @@ export const kpiUniqueFlowIdsLensAttributes: LensAttributes = { }, ], datasourceStates: { - indexpattern: { + formBased: { layers: { '5d46d48f-6ce8-46be-a797-17ad50642564': { columns: { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area.ts index 394bc227e871c..86e9f21d7ffef 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area.ts @@ -82,7 +82,7 @@ export const kpiUniquePrivateIpsAreaLensAttributes: LensAttributes = { }, filters: [], datasourceStates: { - indexpattern: { + formBased: { layers: { '38aa6532-6bf9-4c8f-b2a6-da8d32f7d0d7': { columns: { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar.ts index fe4a698aedf5e..07a81a273e2b5 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar.ts @@ -85,7 +85,7 @@ export const kpiUniquePrivateIpsBarLensAttributes: LensAttributes = { }, filters: [], datasourceStates: { - indexpattern: { + formBased: { layers: { 'e406bf4f-942b-41ac-b516-edb5cef06ec8': { columns: { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric.ts index 6e3d440619e76..bcdd7d377b82b 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric.ts @@ -11,7 +11,7 @@ export const kpiUniquePrivateIpsDestinationMetricLensAttributes: LensAttributes description: '', state: { datasourceStates: { - indexpattern: { + formBased: { layers: { 'cea37c70-8f91-43bf-b9fe-72d8c049f6a3': { columnOrder: ['bd17c23e-4f83-4108-8005-2669170d064b'], diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric.ts index 3f1110d706300..411dd90828a7b 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric.ts @@ -10,7 +10,7 @@ export const kpiUniquePrivateIpsSourceMetricLensAttributes: LensAttributes = { description: '', state: { datasourceStates: { - indexpattern: { + formBased: { layers: { 'cea37c70-8f91-43bf-b9fe-72d8c049f6a3': { columnOrder: ['bd17c23e-4f83-4108-8005-2669170d064b'], diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_total_users_area.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_total_users_area.test.ts.snap index 11df964f2eca1..f474a4c9d6e10 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_total_users_area.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_total_users_area.test.ts.snap @@ -17,7 +17,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "416b6fad-1923-4f6a-a2df-b223bb287e30": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_total_users_metric.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_total_users_metric.test.ts.snap index b53e1bd24d303..eef74c94537d4 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_total_users_metric.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_total_users_metric.test.ts.snap @@ -17,7 +17,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "416b6fad-1923-4f6a-a2df-b223bb287e30": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentication_metric_failure.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentication_metric_failure.test.ts.snap index 37c20b7e80265..b87fad1faa055 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentication_metric_failure.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentication_metric_failure.test.ts.snap @@ -17,7 +17,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "4590dafb-4ac7-45aa-8641-47a3ff0b817c": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_area.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_area.test.ts.snap index 1954bccfaffbe..1dcaab239de8e 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_area.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_area.test.ts.snap @@ -22,7 +22,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "31213ae3-905b-4e88-b987-0cccb1f3209f": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_bar.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_bar.test.ts.snap index 5335dca6057a6..ac7c883ca71b7 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_bar.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_bar.test.ts.snap @@ -22,7 +22,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "31213ae3-905b-4e88-b987-0cccb1f3209f": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_metric_success.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_metric_success.test.ts.snap index 4cadcaf19e91e..0b652257864c0 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_metric_success.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/__snapshots__/kpi_user_authentications_metric_success.test.ts.snap @@ -17,7 +17,7 @@ Object { ], "state": Object { "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "4590dafb-4ac7-45aa-8641-47a3ff0b817c": Object { "columnOrder": Array [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_area.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_area.ts index c97748077a6be..c241d03266cc3 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_area.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_area.ts @@ -12,7 +12,7 @@ export const kpiTotalUsersAreaLensAttributes: LensAttributes = { description: '', state: { datasourceStates: { - indexpattern: { + formBased: { layers: { '416b6fad-1923-4f6a-a2df-b223bb287e30': { columnOrder: [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric.ts index faa6b62e18b65..08cfed0cb91f7 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric.ts @@ -11,7 +11,7 @@ export const kpiTotalUsersMetricLensAttributes: LensAttributes = { description: '', state: { datasourceStates: { - indexpattern: { + formBased: { layers: { '416b6fad-1923-4f6a-a2df-b223bb287e30': { columnOrder: ['3e51b035-872c-4b44-824b-fe069c222e91'], diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentication_metric_failure.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentication_metric_failure.ts index 3f421f8a1c30a..238a8b95e35d9 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentication_metric_failure.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentication_metric_failure.ts @@ -49,7 +49,7 @@ export const kpiUserAuthenticationsMetricFailureLensAttributes: LensAttributes = }, ], datasourceStates: { - indexpattern: { + formBased: { layers: { '4590dafb-4ac7-45aa-8641-47a3ff0b817c': { columnOrder: ['0eb97c09-a351-4280-97da-944e4bd30dd7'], diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.ts index d96ea21489bb2..da6bdf139a1ca 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.ts @@ -109,7 +109,7 @@ export const kpiUserAuthenticationsAreaLensAttributes: LensAttributes = { }, ], datasourceStates: { - indexpattern: { + formBased: { layers: { '31213ae3-905b-4e88-b987-0cccb1f3209f': { columnOrder: [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar.ts index 4727c6010b751..a4a1629e360de 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar.ts @@ -104,7 +104,7 @@ export const kpiUserAuthenticationsBarLensAttributes: LensAttributes = { }, ], datasourceStates: { - indexpattern: { + formBased: { layers: { '31213ae3-905b-4e88-b987-0cccb1f3209f': { columnOrder: [ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success.ts index 3af6f5734d458..58ee89ac81b42 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success.ts @@ -49,7 +49,7 @@ export const kpiUserAuthenticationsMetricSuccessLensAttributes: LensAttributes = }, ], datasourceStates: { - indexpattern: { + formBased: { layers: { '4590dafb-4ac7-45aa-8641-47a3ff0b817c': { columnOrder: ['0eb97c09-a351-4280-97da-944e4bd30dd7'], diff --git a/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_does_endpoint_support_responder.ts b/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_does_endpoint_support_responder.ts index 5c4de2c8953a3..f98020fe62d7f 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_does_endpoint_support_responder.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_does_endpoint_support_responder.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { RESPONDER_CAPABILITIES } from '../../../../common/endpoint/constants'; +import { ENDPOINT_CAPABILITIES } from '../../../../common/endpoint/service/response_actions/constants'; import type { HostMetadata, MaybeImmutable } from '../../../../common/endpoint/types'; export const useDoesEndpointSupportResponder = ( endpointMetadata: MaybeImmutable | undefined ): boolean => { if (endpointMetadata) { - return RESPONDER_CAPABILITIES.every((capability) => + return ENDPOINT_CAPABILITIES.every((capability) => endpointMetadata?.Endpoint.capabilities?.includes(capability) ); } diff --git a/x-pack/plugins/security_solution/public/common/translations.ts b/x-pack/plugins/security_solution/public/common/translations.ts index 18661e6580013..824b86cd8bb55 100644 --- a/x-pack/plugins/security_solution/public/common/translations.ts +++ b/x-pack/plugins/security_solution/public/common/translations.ts @@ -37,6 +37,14 @@ export const UPGRADE_ENDPOINT_FOR_RESPONDER = i18n.translate( } ); +export const INSUFFICIENT_PRIVILEGES_FOR_COMMAND = i18n.translate( + 'xpack.securitySolution.endpoint.actions.insufficientPrivileges.error', + { + defaultMessage: + 'You do not have sufficient privileges to use this command. Please contact your administrator for access.', + } +); + export const UNSAVED_TIMELINE_SAVE_PROMPT = i18n.translate( 'xpack.securitySolution.timeline.unsavedWorkMessage', { diff --git a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx index 80ec4956fd1b6..5802ca16fe09f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx @@ -36,7 +36,7 @@ import { import { getUserPrivilegesMockDefaultValue } from '../../../common/components/user_privileges/__mocks__'; import { allCasesPermissions } from '../../../cases_test_utils'; import { HostStatus } from '../../../../common/endpoint/types'; -import { RESPONDER_CAPABILITIES } from '../../../../common/endpoint/constants'; +import { ENDPOINT_CAPABILITIES } from '../../../../common/endpoint/service/response_actions/constants'; jest.mock('../../../common/components/user_privileges'); @@ -367,6 +367,50 @@ describe('take action dropdown', () => { }); }); + describe('should correctly enable/disable the "Isolate Host" button', () => { + let wrapper: ReactWrapper; + + const render = (): ReactWrapper => { + wrapper = mount( + + + + ); + wrapper.find('button[data-test-subj="take-action-dropdown-btn"]').simulate('click'); + + return wrapper; + }; + + const isolateHostButtonExists = (): ReturnType => { + return wrapper.exists('[data-test-subj="isolate-host-action-item"]'); + }; + + beforeEach(() => { + setTypeOnEcsDataWithAgentType(); + }); + + it('should show Isolate host button if user has "Host isolation" privileges set to all', async () => { + (useUserPrivileges as jest.Mock).mockReturnValue({ + ...mockInitialUserPrivilegesState(), + endpointPrivileges: { loading: false, canIsolateHost: true }, + }); + render(); + + await waitFor(() => { + expect(isolateHostButtonExists()).toBeTruthy(); + }); + }); + it('should hide Isolate host button if user has "Host isolation" privileges set to none', () => { + (useUserPrivileges as jest.Mock).mockReturnValue({ + ...mockInitialUserPrivilegesState(), + endpointPrivileges: { loading: false, canIsolateHost: false }, + }); + render(); + + expect(isolateHostButtonExists()).toBeFalsy(); + }); + }); + describe('should correctly enable/disable the "Respond" button', () => { let wrapper: ReactWrapper; let apiMocks: ReturnType; @@ -470,7 +514,7 @@ describe('take action dropdown', () => { ...getApiResponse().metadata, Endpoint: { ...getApiResponse().metadata.Endpoint, - capabilities: [...RESPONDER_CAPABILITIES], + capabilities: [...ENDPOINT_CAPABILITIES], }, }, host_status: HostStatus.UNENROLLED, diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/hooks/use_input_hints.ts b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/hooks/use_input_hints.ts index 3201d3633168a..c8f4f00d0b758 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/hooks/use_input_hints.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/hooks/use_input_hints.ts @@ -43,7 +43,7 @@ export const useInputHints = () => { // If we know the command name and the input popover is not opened, then show hints (if any) if (commandEntered && !isInputPopoverOpen) { // Is valid command name? ==> show usage - if (commandEnteredDefinition) { + if (commandEnteredDefinition && commandEnteredDefinition.helpHidden !== true) { const exampleInstruction = commandEnteredDefinition?.exampleInstruction ?? ''; const exampleUsage = commandEnteredDefinition?.exampleUsage ?? ''; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_list.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_list.tsx index d1660b1ffe950..83c5df7397daa 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_list.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_list.tsx @@ -82,6 +82,8 @@ export const CommandList = memo(({ commands, display = 'defaul const dispatch = useConsoleStateDispatch(); const { docLinks } = useKibana().services; + const allowedCommands = commands.filter((command) => command.helpHidden !== true); + const footerMessage = useMemo(() => { return ( (({ commands, display = 'defaul ); const commandsByGroups = useMemo(() => { - return Object.values(groupBy(commands, 'helpGroupLabel')).reduce( + return Object.values(groupBy(allowedCommands, 'helpGroupLabel')).reduce( (acc, current) => { if (current[0].helpGroupPosition !== undefined) { // If it already exists just move it to the end @@ -149,7 +151,7 @@ export const CommandList = memo(({ commands, display = 'defaul }, [] ); - }, [commands]); + }, [allowedCommands]); const getTableItems = useCallback( ( @@ -198,6 +200,7 @@ export const CommandList = memo(({ commands, display = 'defaul /> {command.helpGroupLabel !== HELP_GROUPS.supporting.label && + command.helpHidden !== true && command.RenderComponent && ( { }); }); - describe('and when the console page overlay is rendered into the page', () => { + // FLAKY: https://github.com/elastic/kibana/issues/142683 + describe.skip('and when the console page overlay is rendered into the page', () => { type ConsoleManagerQueriesAndActions = ReturnType< typeof getConsoleManagerMockRenderResultQueriesAndActions >; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx index 1f2b20df776ee..b54af6f02f4f9 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx @@ -449,7 +449,6 @@ export const handleExecuteCommand: ConsoleStoreReducer< // if the Command definition has a `validate()` callback, then call it now if (commandDefinition.validate) { const validationResult = commandDefinition.validate(command); - if (validationResult !== true) { return updateStateWithNewCommandHistoryItem( state, diff --git a/x-pack/plugins/security_solution/public/management/components/console/types.ts b/x-pack/plugins/security_solution/public/management/components/console/types.ts index 5b90a18f27ce1..ef9191bbad522 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/types.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/types.ts @@ -58,9 +58,13 @@ export interface CommandDefinition { */ HelpComponent?: CommandExecutionComponent; /** - * If defined, the button to add to the text bar will be disabled. + * If defined, the button to add to the text bar will be disabled and the user will not be able to use this command if entered into the console. */ helpDisabled?: boolean; + /** + * If defined, the command will be hidden from in the Help menu and help text. It will warn the user and not execute the command if manually typed in. + */ + helpHidden?: boolean; /** * A store for any data needed when the command is executed. * The entire `CommandDefinition` is passed along to the component diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_response_actions_console_commands.ts b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_response_actions_console_commands.ts index 456162545fec6..b75cd91b768cd 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_response_actions_console_commands.ts +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_response_actions_console_commands.ts @@ -6,6 +6,10 @@ */ import { i18n } from '@kbn/i18n'; +import type { + EndpointCapabilities, + ConsoleResponseActionCommands, +} from '../../../../common/endpoint/service/response_actions/constants'; import type { Command, CommandDefinition } from '../console'; import { IsolateActionResult } from './isolate_action'; import { ReleaseActionResult } from './release_action'; @@ -14,12 +18,11 @@ import { SuspendProcessActionResult } from './suspend_process_action'; import { EndpointStatusActionResult } from './status_action'; import { GetProcessesActionResult } from './get_processes_action'; import type { ParsedArgData } from '../console/service/parsed_command_input'; -import type { ImmutableArray } from '../../../../common/endpoint/types'; -import { UPGRADE_ENDPOINT_FOR_RESPONDER } from '../../../common/translations'; -import type { - ResponderCapabilities, - ResponderCommands, -} from '../../../../common/endpoint/constants'; +import type { EndpointPrivileges, ImmutableArray } from '../../../../common/endpoint/types'; +import { + INSUFFICIENT_PRIVILEGES_FOR_COMMAND, + UPGRADE_ENDPOINT_FOR_RESPONDER, +} from '../../../common/translations'; import { getCommandAboutInfo } from './get_command_about_info'; const emptyArgumentValidator = (argData: ParsedArgData): true | string => { @@ -45,7 +48,7 @@ const pidValidator = (argData: ParsedArgData): true | string => { } }; -const commandToCapabilitiesMap = new Map([ +const commandToCapabilitiesMap = new Map([ ['isolate', 'isolation'], ['release', 'isolation'], ['kill-process', 'kill_process'], @@ -53,17 +56,46 @@ const commandToCapabilitiesMap = new Map { - const endpointCapabilities: ResponderCapabilities[] = command.commandDefinition.meta.capabilities; - const responderCapability = commandToCapabilitiesMap.get( - command.commandDefinition.name as ResponderCommands - ); +const getRbacControl = ({ + commandName, + privileges, +}: { + commandName: ConsoleResponseActionCommands; + privileges: EndpointPrivileges; +}): boolean => { + const commandToPrivilegeMap = new Map([ + ['isolate', privileges.canIsolateHost], + ['release', privileges.canUnIsolateHost], + ['kill-process', privileges.canKillProcess], + ['suspend-process', privileges.canSuspendProcess], + ['processes', privileges.canGetRunningProcesses], + ]); + return commandToPrivilegeMap.get(commandName as ConsoleResponseActionCommands) ?? false; +}; + +const capabilitiesAndPrivilegesValidator = (command: Command): true | string => { + const privileges = command.commandDefinition.meta.privileges; + const endpointCapabilities: EndpointCapabilities[] = command.commandDefinition.meta.capabilities; + const commandName = command.commandDefinition.name as ConsoleResponseActionCommands; + const responderCapability = commandToCapabilitiesMap.get(commandName); + let errorMessage = ''; + if (!responderCapability) { + errorMessage = errorMessage.concat(UPGRADE_ENDPOINT_FOR_RESPONDER); + } if (responderCapability) { - if (endpointCapabilities.includes(responderCapability)) { - return true; + if (!endpointCapabilities.includes(responderCapability)) { + errorMessage = errorMessage.concat(UPGRADE_ENDPOINT_FOR_RESPONDER); } } - return UPGRADE_ENDPOINT_FOR_RESPONDER; + if (getRbacControl({ commandName, privileges }) !== true) { + errorMessage = errorMessage.concat(INSUFFICIENT_PRIVILEGES_FOR_COMMAND); + } + + if (errorMessage.length) { + return errorMessage; + } + + return true; }; const HELP_GROUPS = Object.freeze({ @@ -93,17 +125,20 @@ const COMMENT_ARG_ABOUT = i18n.translate( export const getEndpointResponseActionsConsoleCommands = ({ endpointAgentId, endpointCapabilities, + endpointPrivileges, }: { endpointAgentId: string; endpointCapabilities: ImmutableArray; + endpointPrivileges: EndpointPrivileges; }): CommandDefinition[] => { - const doesEndpointSupportCommand = (commandName: ResponderCommands) => { + const doesEndpointSupportCommand = (commandName: ConsoleResponseActionCommands) => { const responderCapability = commandToCapabilitiesMap.get(commandName); if (responderCapability) { return endpointCapabilities.includes(responderCapability); } return false; }; + return [ { name: 'isolate', @@ -117,10 +152,11 @@ export const getEndpointResponseActionsConsoleCommands = ({ meta: { endpointId: endpointAgentId, capabilities: endpointCapabilities, + privileges: endpointPrivileges, }, exampleUsage: 'isolate --comment "isolate this host"', exampleInstruction: ENTER_OR_ADD_COMMENT_ARG_INSTRUCTION, - validate: capabilitiesValidator, + validate: capabilitiesAndPrivilegesValidator, args: { comment: { required: false, @@ -132,6 +168,7 @@ export const getEndpointResponseActionsConsoleCommands = ({ helpGroupPosition: HELP_GROUPS.responseActions.position, helpCommandPosition: 0, helpDisabled: doesEndpointSupportCommand('isolate') === false, + helpHidden: !getRbacControl({ commandName: 'isolate', privileges: endpointPrivileges }), }, { name: 'release', @@ -145,10 +182,11 @@ export const getEndpointResponseActionsConsoleCommands = ({ meta: { endpointId: endpointAgentId, capabilities: endpointCapabilities, + privileges: endpointPrivileges, }, exampleUsage: 'release --comment "release this host"', exampleInstruction: ENTER_OR_ADD_COMMENT_ARG_INSTRUCTION, - validate: capabilitiesValidator, + validate: capabilitiesAndPrivilegesValidator, args: { comment: { required: false, @@ -160,6 +198,7 @@ export const getEndpointResponseActionsConsoleCommands = ({ helpGroupPosition: HELP_GROUPS.responseActions.position, helpCommandPosition: 1, helpDisabled: doesEndpointSupportCommand('release') === false, + helpHidden: !getRbacControl({ commandName: 'release', privileges: endpointPrivileges }), }, { name: 'kill-process', @@ -176,10 +215,11 @@ export const getEndpointResponseActionsConsoleCommands = ({ meta: { endpointId: endpointAgentId, capabilities: endpointCapabilities, + privileges: endpointPrivileges, }, exampleUsage: 'kill-process --pid 123 --comment "kill this process"', exampleInstruction: ENTER_PID_OR_ENTITY_ID_INSTRUCTION, - validate: capabilitiesValidator, + validate: capabilitiesAndPrivilegesValidator, mustHaveArgs: true, args: { comment: { @@ -213,6 +253,7 @@ export const getEndpointResponseActionsConsoleCommands = ({ helpGroupPosition: HELP_GROUPS.responseActions.position, helpCommandPosition: 4, helpDisabled: doesEndpointSupportCommand('kill-process') === false, + helpHidden: !getRbacControl({ commandName: 'kill-process', privileges: endpointPrivileges }), }, { name: 'suspend-process', @@ -229,10 +270,11 @@ export const getEndpointResponseActionsConsoleCommands = ({ meta: { endpointId: endpointAgentId, capabilities: endpointCapabilities, + privileges: endpointPrivileges, }, exampleUsage: 'suspend-process --pid 123 --comment "suspend this process"', exampleInstruction: ENTER_PID_OR_ENTITY_ID_INSTRUCTION, - validate: capabilitiesValidator, + validate: capabilitiesAndPrivilegesValidator, mustHaveArgs: true, args: { comment: { @@ -269,6 +311,10 @@ export const getEndpointResponseActionsConsoleCommands = ({ helpGroupPosition: HELP_GROUPS.responseActions.position, helpCommandPosition: 5, helpDisabled: doesEndpointSupportCommand('suspend-process') === false, + helpHidden: !getRbacControl({ + commandName: 'suspend-process', + privileges: endpointPrivileges, + }), }, { name: 'status', @@ -298,10 +344,11 @@ export const getEndpointResponseActionsConsoleCommands = ({ meta: { endpointId: endpointAgentId, capabilities: endpointCapabilities, + privileges: endpointPrivileges, }, exampleUsage: 'processes --comment "get the processes"', exampleInstruction: ENTER_OR_ADD_COMMENT_ARG_INSTRUCTION, - validate: capabilitiesValidator, + validate: capabilitiesAndPrivilegesValidator, args: { comment: { required: false, @@ -313,6 +360,7 @@ export const getEndpointResponseActionsConsoleCommands = ({ helpGroupPosition: HELP_GROUPS.responseActions.position, helpCommandPosition: 3, helpDisabled: doesEndpointSupportCommand('processes') === false, + helpHidden: !getRbacControl({ commandName: 'processes', privileges: endpointPrivileges }), }, ]; }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/get_processes_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/get_processes_action.test.tsx index 3b46967c33abf..e39cea0b7ce1c 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/get_processes_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/get_processes_action.test.tsx @@ -16,12 +16,13 @@ import { getEndpointResponseActionsConsoleCommands } from '../endpoint_response_ import { responseActionsHttpMocks } from '../../../mocks/response_actions_http_mocks'; import { enterConsoleCommand } from '../../console/mocks'; import { waitFor } from '@testing-library/react'; -import type { ResponderCapabilities } from '../../../../../common/endpoint/constants'; -import { RESPONDER_CAPABILITIES } from '../../../../../common/endpoint/constants'; +import { getEndpointAuthzInitialState } from '../../../../../common/endpoint/service/authz'; +import type { EndpointCapabilities } from '../../../../../common/endpoint/service/response_actions/constants'; +import { ENDPOINT_CAPABILITIES } from '../../../../../common/endpoint/service/response_actions/constants'; describe('When using processes action from response actions console', () => { let render: ( - capabilities?: ResponderCapabilities[] + capabilities?: EndpointCapabilities[] ) => Promise>; let renderResult: ReturnType; let apiMocks: ReturnType; @@ -34,7 +35,7 @@ describe('When using processes action from response actions console', () => { apiMocks = responseActionsHttpMocks(mockedContext.coreStart.http); - render = async (capabilities: ResponderCapabilities[] = [...RESPONDER_CAPABILITIES]) => { + render = async (capabilities: EndpointCapabilities[] = [...ENDPOINT_CAPABILITIES]) => { renderResult = mockedContext.render( { @@ -44,6 +45,13 @@ describe('When using processes action from response actions console', () => { commands: getEndpointResponseActionsConsoleCommands({ endpointAgentId: 'a.b.c', endpointCapabilities: [...capabilities], + endpointPrivileges: { + ...getEndpointAuthzInitialState(), + loading: false, + canKillProcess: true, + canSuspendProcess: true, + canGetRunningProcesses: true, + }, }), }, }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/isolate_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/isolate_action.test.tsx index 10dde22e6083a..f111b7aafbff6 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/isolate_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/isolate_action.test.tsx @@ -16,13 +16,14 @@ import { getEndpointResponseActionsConsoleCommands } from '../endpoint_response_ import { responseActionsHttpMocks } from '../../../mocks/response_actions_http_mocks'; import { enterConsoleCommand } from '../../console/mocks'; import { waitFor } from '@testing-library/react'; -import type { ResponderCapabilities } from '../../../../../common/endpoint/constants'; -import { RESPONDER_CAPABILITIES } from '../../../../../common/endpoint/constants'; import { getDeferred } from '../../../mocks/utils'; +import { getEndpointAuthzInitialState } from '../../../../../common/endpoint/service/authz'; +import type { EndpointCapabilities } from '../../../../../common/endpoint/service/response_actions/constants'; +import { ENDPOINT_CAPABILITIES } from '../../../../../common/endpoint/service/response_actions/constants'; describe('When using isolate action from response actions console', () => { let render: ( - capabilities?: ResponderCapabilities[] + capabilities?: EndpointCapabilities[] ) => Promise>; let renderResult: ReturnType; let apiMocks: ReturnType; @@ -35,7 +36,7 @@ describe('When using isolate action from response actions console', () => { apiMocks = responseActionsHttpMocks(mockedContext.coreStart.http); - render = async (capabilities: ResponderCapabilities[] = [...RESPONDER_CAPABILITIES]) => { + render = async (capabilities: EndpointCapabilities[] = [...ENDPOINT_CAPABILITIES]) => { renderResult = mockedContext.render( { @@ -45,6 +46,11 @@ describe('When using isolate action from response actions console', () => { commands: getEndpointResponseActionsConsoleCommands({ endpointAgentId: 'a.b.c', endpointCapabilities: [...capabilities], + endpointPrivileges: { + ...getEndpointAuthzInitialState(), + loading: false, + canIsolateHost: true, + }, }), }, }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/kill_process_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/kill_process_action.test.tsx index 12cec2dd613b5..631da12cc1d3a 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/kill_process_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/kill_process_action.test.tsx @@ -16,12 +16,13 @@ import { getEndpointResponseActionsConsoleCommands } from '../endpoint_response_ import { enterConsoleCommand } from '../../console/mocks'; import { waitFor } from '@testing-library/react'; import { responseActionsHttpMocks } from '../../../mocks/response_actions_http_mocks'; -import type { ResponderCapabilities } from '../../../../../common/endpoint/constants'; -import { RESPONDER_CAPABILITIES } from '../../../../../common/endpoint/constants'; +import { getEndpointAuthzInitialState } from '../../../../../common/endpoint/service/authz'; +import type { EndpointCapabilities } from '../../../../../common/endpoint/service/response_actions/constants'; +import { ENDPOINT_CAPABILITIES } from '../../../../../common/endpoint/service/response_actions/constants'; describe('When using the kill-process action from response actions console', () => { let render: ( - capabilities?: ResponderCapabilities[] + capabilities?: EndpointCapabilities[] ) => Promise>; let renderResult: ReturnType; let apiMocks: ReturnType; @@ -34,7 +35,7 @@ describe('When using the kill-process action from response actions console', () apiMocks = responseActionsHttpMocks(mockedContext.coreStart.http); - render = async (capabilities: ResponderCapabilities[] = [...RESPONDER_CAPABILITIES]) => { + render = async (capabilities: EndpointCapabilities[] = [...ENDPOINT_CAPABILITIES]) => { renderResult = mockedContext.render( { @@ -44,6 +45,13 @@ describe('When using the kill-process action from response actions console', () commands: getEndpointResponseActionsConsoleCommands({ endpointAgentId: 'a.b.c', endpointCapabilities: [...capabilities], + endpointPrivileges: { + ...getEndpointAuthzInitialState(), + loading: false, + canKillProcess: true, + canSuspendProcess: true, + canGetRunningProcesses: true, + }, }), }, }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/release_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/release_action.test.tsx index c2052a4e6401a..e377d23c2c145 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/release_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/release_action.test.tsx @@ -16,13 +16,14 @@ import { getEndpointResponseActionsConsoleCommands } from '../endpoint_response_ import { enterConsoleCommand } from '../../console/mocks'; import { waitFor } from '@testing-library/react'; import { responseActionsHttpMocks } from '../../../mocks/response_actions_http_mocks'; -import type { ResponderCapabilities } from '../../../../../common/endpoint/constants'; -import { RESPONDER_CAPABILITIES } from '../../../../../common/endpoint/constants'; import { getDeferred } from '../../../mocks/utils'; +import { getEndpointAuthzInitialState } from '../../../../../common/endpoint/service/authz'; +import type { EndpointCapabilities } from '../../../../../common/endpoint/service/response_actions/constants'; +import { ENDPOINT_CAPABILITIES } from '../../../../../common/endpoint/service/response_actions/constants'; describe('When using the release action from response actions console', () => { let render: ( - capabilities?: ResponderCapabilities[] + capabilities?: EndpointCapabilities[] ) => Promise>; let renderResult: ReturnType; let apiMocks: ReturnType; @@ -35,7 +36,7 @@ describe('When using the release action from response actions console', () => { apiMocks = responseActionsHttpMocks(mockedContext.coreStart.http); - render = async (capabilities: ResponderCapabilities[] = [...RESPONDER_CAPABILITIES]) => { + render = async (capabilities: EndpointCapabilities[] = [...ENDPOINT_CAPABILITIES]) => { renderResult = mockedContext.render( { @@ -45,6 +46,10 @@ describe('When using the release action from response actions console', () => { commands: getEndpointResponseActionsConsoleCommands({ endpointAgentId: 'a.b.c', endpointCapabilities: [...capabilities], + endpointPrivileges: { + ...getEndpointAuthzInitialState(), + loading: false, + }, }), }, }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/suspend_process_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/suspend_process_action.test.tsx index 28fe91999662a..a41ed9fe3d6eb 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/suspend_process_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/integration_tests/suspend_process_action.test.tsx @@ -16,12 +16,13 @@ import { getEndpointResponseActionsConsoleCommands } from '../endpoint_response_ import { enterConsoleCommand } from '../../console/mocks'; import { waitFor } from '@testing-library/react'; import { responseActionsHttpMocks } from '../../../mocks/response_actions_http_mocks'; -import type { ResponderCapabilities } from '../../../../../common/endpoint/constants'; -import { RESPONDER_CAPABILITIES } from '../../../../../common/endpoint/constants'; +import { getEndpointAuthzInitialState } from '../../../../../common/endpoint/service/authz'; +import type { EndpointCapabilities } from '../../../../../common/endpoint/service/response_actions/constants'; +import { ENDPOINT_CAPABILITIES } from '../../../../../common/endpoint/service/response_actions/constants'; describe('When using the suspend-process action from response actions console', () => { let render: ( - capabilities?: ResponderCapabilities[] + capabilities?: EndpointCapabilities[] ) => Promise>; let renderResult: ReturnType; let apiMocks: ReturnType; @@ -34,7 +35,7 @@ describe('When using the suspend-process action from response actions console', apiMocks = responseActionsHttpMocks(mockedContext.coreStart.http); - render = async (capabilities: ResponderCapabilities[] = [...RESPONDER_CAPABILITIES]) => { + render = async (capabilities: EndpointCapabilities[] = [...ENDPOINT_CAPABILITIES]) => { renderResult = mockedContext.render( { @@ -44,6 +45,13 @@ describe('When using the suspend-process action from response actions console', commands: getEndpointResponseActionsConsoleCommands({ endpointAgentId: 'a.b.c', endpointCapabilities: [...capabilities], + endpointPrivileges: { + ...getEndpointAuthzInitialState(), + loading: false, + canKillProcess: true, + canSuspendProcess: true, + canGetRunningProcesses: true, + }, }), }, }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/actions_log_filter.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/actions_log_filter.tsx index e4f03aec7953a..8482e275f7811 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/actions_log_filter.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/actions_log_filter.tsx @@ -8,7 +8,7 @@ import { orderBy } from 'lodash/fp'; import React, { memo, useEffect, useMemo, useState, useCallback, useRef } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiSelectable, EuiPopoverTitle } from '@elastic/eui'; -import type { ResponseActions } from '../../../../../common/endpoint/service/response_actions/constants'; +import type { ResponseActionsApiCommandNames } from '../../../../../common/endpoint/service/response_actions/constants'; import { ActionsLogFilterPopover } from './actions_log_filter_popover'; import { type FilterItems, type FilterName, useActionsLogFilter, getUiCommand } from './hooks'; import { ClearAllButton } from './clear_all_button'; @@ -105,7 +105,9 @@ export const ActionsLogFilter = memo( // update URL params if (filterName === 'actions') { setUrlActionsFilters( - selectedItems.map((item) => getUiCommand(item as ResponseActions)).join() + selectedItems + .map((item) => getUiCommand(item as ResponseActionsApiCommandNames)) + .join() ); } else if (filterName === 'hosts') { setUrlHostsFilters(selectedItems.join()); diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/actions_log_users_filter.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/actions_log_users_filter.test.tsx index 5cf43df4ee2dc..60b5f5368dafc 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/actions_log_users_filter.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/actions_log_users_filter.test.tsx @@ -44,9 +44,7 @@ describe('Users filter', () => { const searchInput = renderResult.getByTestId(`${testPrefix}-search`); expect(searchInput).toBeTruthy(); - expect(searchInput.getAttribute('placeholder')).toEqual( - 'Filter by user or comma separated list of users' - ); + expect(searchInput.getAttribute('placeholder')).toEqual('Filter by username'); }); it('should search on given search string on enter', () => { diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/hooks.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/hooks.tsx index 34cc5a3ca0f99..e72e8614d6764 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/hooks.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/hooks.tsx @@ -11,11 +11,12 @@ import type { OnRefreshChangeProps, } from '@elastic/eui/src/components/date_picker/types'; import type { - ResponseActions, + ConsoleResponseActionCommands, + ResponseActionsApiCommandNames, ResponseActionStatus, } from '../../../../../common/endpoint/service/response_actions/constants'; import { - RESPONSE_ACTION_COMMANDS, + RESPONSE_ACTION_API_COMMANDS_NAMES, RESPONSE_ACTION_STATUS, } from '../../../../../common/endpoint/service/response_actions/constants'; import type { DateRangePickerValues } from './actions_log_date_range_picker'; @@ -131,8 +132,8 @@ export const getActionStatus = (status: ResponseActionStatus): string => { * running-processes -> processes */ export const getUiCommand = ( - command: ResponseActions -): Exclude | 'release' | 'processes' => { + command: ResponseActionsApiCommandNames +): ConsoleResponseActionCommands => { if (command === 'unisolate') { return 'release'; } else if (command === 'running-processes') { @@ -148,8 +149,8 @@ export const getUiCommand = ( * processes -> running-processes */ export const getCommandKey = ( - uiCommand: Exclude | 'release' | 'processes' -): ResponseActions => { + uiCommand: ConsoleResponseActionCommands +): ResponseActionsApiCommandNames => { if (uiCommand === 'release') { return 'unisolate'; } else if (uiCommand === 'processes') { @@ -231,7 +232,7 @@ export const useActionsLogFilter = ({ })) : isHostsFilter ? [] - : RESPONSE_ACTION_COMMANDS.map((commandName) => ({ + : RESPONSE_ACTION_API_COMMANDS_NAMES.map((commandName) => ({ key: commandName, label: getUiCommand(commandName), checked: diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/use_action_history_url_params.test.ts b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/use_action_history_url_params.test.ts index 5b62dbe814d3c..cd5655c7b96ea 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/use_action_history_url_params.test.ts +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/use_action_history_url_params.test.ts @@ -5,8 +5,18 @@ * 2.0. */ import { actionsLogFiltersFromUrlParams } from './use_action_history_url_params'; +import type { ConsoleResponseActionCommands } from '../../../../../common/endpoint/service/response_actions/constants'; +import { CONSOLE_RESPONSE_ACTION_COMMANDS } from '../../../../../common/endpoint/service/response_actions/constants'; describe('#actionsLogFiltersFromUrlParams', () => { + const getConsoleCommandsAsString = (): string => { + return [...CONSOLE_RESPONSE_ACTION_COMMANDS].sort().join(','); + }; + + const getConsoleCommandsAsArray = (): ConsoleResponseActionCommands[] => { + return [...CONSOLE_RESPONSE_ACTION_COMMANDS].sort(); + }; + it('should not use invalid command values from URL params', () => { expect(actionsLogFiltersFromUrlParams({ commands: 'asa,was' })).toEqual({ commands: undefined, @@ -21,10 +31,10 @@ describe('#actionsLogFiltersFromUrlParams', () => { it('should use valid command values from URL params', () => { expect( actionsLogFiltersFromUrlParams({ - commands: 'kill-process,isolate,processes,release,suspend-process', + commands: getConsoleCommandsAsString(), }) ).toEqual({ - commands: ['isolate', 'kill-process', 'processes', 'release', 'suspend-process'], + commands: getConsoleCommandsAsArray(), endDate: undefined, hosts: undefined, startDate: undefined, @@ -62,7 +72,7 @@ describe('#actionsLogFiltersFromUrlParams', () => { it('should use valid command and status along with given host, user and date values from URL params', () => { expect( actionsLogFiltersFromUrlParams({ - commands: 'release,kill-process,isolate,processes,suspend-process', + commands: getConsoleCommandsAsString(), statuses: 'successful,pending,failed', hosts: 'host-1,host-2', users: 'user-1,user-2', @@ -70,7 +80,7 @@ describe('#actionsLogFiltersFromUrlParams', () => { endDate: '2022-09-12T08:30:33.140Z', }) ).toEqual({ - commands: ['isolate', 'kill-process', 'processes', 'release', 'suspend-process'], + commands: getConsoleCommandsAsArray(), endDate: '2022-09-12T08:30:33.140Z', hosts: ['host-1', 'host-2'], startDate: '2022-09-12T08:00:00.000Z', diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/use_action_history_url_params.ts b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/use_action_history_url_params.ts index 8e12f429c3183..a0e1623055f26 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/use_action_history_url_params.ts +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/use_action_history_url_params.ts @@ -6,10 +6,11 @@ */ import { useCallback, useEffect, useMemo, useState } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; +import type { ConsoleResponseActionCommands } from '../../../../../common/endpoint/service/response_actions/constants'; import { - RESPONSE_ACTION_COMMANDS, + RESPONSE_ACTION_API_COMMANDS_NAMES, RESPONSE_ACTION_STATUS, - type ResponseActions, + type ResponseActionsApiCommandNames, type ResponseActionStatus, } from '../../../../../common/endpoint/service/response_actions/constants'; import { useUrlParams } from '../../../hooks/use_url_params'; @@ -24,9 +25,7 @@ interface UrlParamsActionsLogFilters { } interface ActionsLogFiltersFromUrlParams { - commands?: Array< - Exclude | 'release' | 'processes' - >; + commands?: ConsoleResponseActionCommands[]; hosts?: string[]; statuses?: ResponseActionStatus[]; startDate?: string; @@ -61,7 +60,7 @@ export const actionsLogFiltersFromUrlParams = ( .split(',') .reduce['commands']>((acc, curr) => { if ( - RESPONSE_ACTION_COMMANDS.includes(curr as ResponseActions) || + RESPONSE_ACTION_API_COMMANDS_NAMES.includes(curr as ResponseActionsApiCommandNames) || curr === 'release' || curr === 'processes' ) { diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.test.tsx index ae59f3ceaa8b3..09d201c171e9e 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.test.tsx @@ -20,7 +20,7 @@ import { MANAGEMENT_PATH } from '../../../../common/constants'; import { getActionListMock } from './mocks'; import { useGetEndpointsList } from '../../hooks/endpoint/use_get_endpoints_list'; import uuid from 'uuid'; -import { RESPONSE_ACTION_COMMANDS } from '../../../../common/endpoint/service/response_actions/constants'; +import { RESPONSE_ACTION_API_COMMANDS_NAMES } from '../../../../common/endpoint/service/response_actions/constants'; let mockUseGetEndpointActionList: { isFetched?: boolean; @@ -557,7 +557,9 @@ describe('Response actions history', () => { userEvent.click(getByTestId(`${testPrefix}-${filterPrefix}-popoverButton`)); const filterList = getByTestId(`${testPrefix}-${filterPrefix}-popoverList`); expect(filterList).toBeTruthy(); - expect(filterList.querySelectorAll('ul>li').length).toEqual(RESPONSE_ACTION_COMMANDS.length); + expect(filterList.querySelectorAll('ul>li').length).toEqual( + RESPONSE_ACTION_API_COMMANDS_NAMES.length + ); expect( Array.from(filterList.querySelectorAll('ul>li')).map((option) => option.textContent) ).toEqual(['isolate', 'release', 'kill-process', 'suspend-process', 'processes', 'get-file']); diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.tsx index ac9a0829bb7b8..fc046ff574685 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.tsx @@ -11,7 +11,7 @@ import type { CriteriaWithPagination } from '@elastic/eui'; import React, { memo, useCallback, useEffect, useMemo, useState } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import type { - ResponseActions, + ResponseActionsApiCommandNames, ResponseActionStatus, } from '../../../../common/endpoint/service/response_actions/constants'; @@ -142,7 +142,7 @@ export const ResponseActionsLog = memo< (selectedCommands: string[]) => { setQueryParams((prevState) => ({ ...prevState, - commands: selectedCommands as ResponseActions[], + commands: selectedCommands as ResponseActionsApiCommandNames[], })); }, [setQueryParams] diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/translations.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/translations.tsx index 36dfc76dc1d9e..363da92a025bf 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/translations.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/translations.tsx @@ -177,6 +177,6 @@ export const FILTER_NAMES = Object.freeze({ defaultMessage: 'Statuses', }), users: i18n.translate('xpack.securitySolution.responseActionsList.list.filter.users', { - defaultMessage: 'Filter by user or comma separated list of users', + defaultMessage: 'Filter by username', }), }); diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_with_show_endpoint_responder.tsx b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_with_show_endpoint_responder.tsx index 8c0236a42073d..7931e8a9765b8 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_with_show_endpoint_responder.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_with_show_endpoint_responder.tsx @@ -25,12 +25,12 @@ const RESPONDER_PAGE_TITLE = i18n.translate('xpack.securitySolution.responder_ov export const useWithShowEndpointResponder = (): ShowEndpointResponseActionsConsole => { const consoleManager = useConsoleManager(); - const { canAccessResponseConsole } = useUserPrivileges().endpointPrivileges; + const endpointPrivileges = useUserPrivileges().endpointPrivileges; return useCallback( (endpointMetadata: HostMetadata) => { // If no authz, just exit and log something to the console - if (!canAccessResponseConsole) { + if (!endpointPrivileges.canAccessResponseConsole) { window.console.error(new Error('Access denied to endpoint response actions console')); return; } @@ -51,6 +51,7 @@ export const useWithShowEndpointResponder = (): ShowEndpointResponseActionsConso commands: getEndpointResponseActionsConsoleCommands({ endpointAgentId, endpointCapabilities: endpointMetadata.Endpoint.capabilities ?? [], + endpointPrivileges, }), 'data-test-subj': 'endpointResponseActionsConsole', TitleComponent: () => , @@ -62,6 +63,6 @@ export const useWithShowEndpointResponder = (): ShowEndpointResponseActionsConso .show(); } }, - [canAccessResponseConsole, consoleManager] + [endpointPrivileges, consoleManager] ); }; diff --git a/x-pack/plugins/security_solution/public/management/links.ts b/x-pack/plugins/security_solution/public/management/links.ts index 12a904201a9c5..b5cafa42ca177 100644 --- a/x-pack/plugins/security_solution/public/management/links.ts +++ b/x-pack/plugins/security_solution/public/management/links.ts @@ -11,6 +11,7 @@ import { i18n } from '@kbn/i18n'; import { calculateEndpointAuthz, getEndpointAuthzInitialState, + calculatePermissionsFromCapabilities, } from '../../common/endpoint/service/authz'; import { BLOCKLIST_PATH, @@ -237,6 +238,7 @@ export const getManagementFilteredLinks = async ( ): Promise => { const fleetAuthz = plugins.fleet?.authz; const isEndpointRbacEnabled = ExperimentalFeaturesService.get().endpointRbacEnabled; + const endpointPermissions = calculatePermissionsFromCapabilities(core.application.capabilities); try { const currentUserResponse = await plugins.security.authc.getCurrentUser(); @@ -245,7 +247,8 @@ export const getManagementFilteredLinks = async ( licenseService, fleetAuthz, currentUserResponse.roles, - isEndpointRbacEnabled + isEndpointRbacEnabled, + endpointPermissions ) : getEndpointAuthzInitialState(); if (!privileges.canAccessEndpointManagement) { diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx index 7d8d625d97e39..2c898e825258e 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx @@ -50,11 +50,11 @@ import { HOST_METADATA_LIST_ROUTE, metadataTransformPrefix, METADATA_UNITED_TRANSFORM, - RESPONDER_CAPABILITIES, } from '../../../../../common/endpoint/constants'; import { useUserPrivileges } from '../../../../common/components/user_privileges'; import { initialUserPrivilegesState as mockInitialUserPrivilegesState } from '../../../../common/components/user_privileges/user_privileges_context'; import { getUserPrivilegesMockDefaultValue } from '../../../../common/components/user_privileges/__mocks__'; +import { ENDPOINT_CAPABILITIES } from '../../../../../common/endpoint/service/response_actions/constants'; // not sure why this can't be imported from '../../../../common/mock/formatted_relative'; // but sure enough it needs to be inline in this one file @@ -1019,7 +1019,7 @@ describe('when on the endpoint list page', () => { ...hosts[0].metadata, Endpoint: { ...hosts[0].metadata.Endpoint, - capabilities: [...RESPONDER_CAPABILITIES], + capabilities: [...ENDPOINT_CAPABILITIES], state: { ...hosts[0].metadata.Endpoint.state, isolation: false, diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts b/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts index b54d50011f99b..e1885881d81a5 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts @@ -914,7 +914,7 @@ export const AdvancedPolicySchema: AdvancedPolicySchemaType[] = [ 'xpack.securitySolution.endpoint.policy.advanced.linux.advanced.kernel.capture_mode', { defaultMessage: - 'Allows users to control whether kprobes or ebpf are used to gather data. Possible options are kprobes, ebpf, or auto. Default: kprobes', + 'Allows users to control whether kprobes or ebpf are used to gather data. Options are kprobe, ebpf, or auto. Auto uses ebpf if possible, otherwise uses kprobe. Default: auto', } ), }, diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_create_extension/endpoint_policy_create_extension.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_create_extension/endpoint_policy_create_extension.tsx index 21bba2c37922d..216875237cf43 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_create_extension/endpoint_policy_create_extension.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_create_extension/endpoint_policy_create_extension.tsx @@ -338,11 +338,22 @@ export const EndpointPolicyCreateExtension = memo {'nginx'}, postgres: {'postgres'}, + cron: {'cron'}, + recommendation: ( + + + + + + ), }} /> @@ -357,10 +368,20 @@ export const EndpointPolicyCreateExtension = memo {'ssh'}, telnet: {'telnet'}, + recommendation: ( + + + + + + ), }} /> diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/linux.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/linux.tsx index 984bc53a014e3..f32f83cdf70cb 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/linux.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/linux.tsx @@ -81,7 +81,7 @@ const SUPPLEMENTAL_OPTIONS: ReadonlyArray { const { services: { ml, http }, @@ -86,7 +88,7 @@ export const EntityAnalyticsAnomalies = () => { }, [getSecuritySolutionLinkProps]); return ( - + eui.euiColorDanger}; @@ -74,10 +73,6 @@ export const EntityAnalyticsHeader = () => { const getSecuritySolutionLinkProps = useGetSecuritySolutionLinkProps(); const isPlatinumOrTrialLicense = useMlCapabilities().isPlatinumOrTrialLicense; - const { - services: { ml, http }, - } = useKibana(); - const [goToHostRiskTabFilteredByCritical, hostRiskTabUrl] = useMemo(() => { const { onClick, href } = getSecuritySolutionLinkProps({ deepLinkId: SecurityPageName.hosts, @@ -151,9 +146,14 @@ export const EntityAnalyticsHeader = () => { [data, areJobsEnabled] ); - const jobsUrl = useMlHref(ml, http.basePath.get(), { - page: ML_PAGES.ANOMALY_DETECTION_JOBS_MANAGE, - }); + const scrollToAnomalies = useCallback(() => { + const element = document.querySelector( + `[data-test-subj="${ENTITY_ANALYTICS_ANOMALIES_PANEL}"]` + ); + if (element) { + element.scrollIntoView({ behavior: 'smooth' }); + } + }, []); return ( @@ -211,9 +211,9 @@ export const EntityAnalyticsHeader = () => { - + {i18n.ANOMALIES} - + diff --git a/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts index 06d54a4353958..6b6baf163dc90 100644 --- a/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts +++ b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts @@ -40,7 +40,11 @@ import type { } from './services/fleet/endpoint_fleet_services_factory'; import { registerListsPluginEndpointExtensionPoints } from '../lists_integration'; import type { EndpointAuthz } from '../../common/endpoint/types/authz'; -import { calculateEndpointAuthz } from '../../common/endpoint/service/authz'; +import { + calculateEndpointAuthz, + calculatePermissionsFromPrivileges, + defaultEndpointPermissions, +} from '../../common/endpoint/service/authz'; import type { FeatureUsageService } from './services/feature_usage/service'; import type { ExperimentalFeatures } from '../../common/experimental_features'; @@ -162,14 +166,27 @@ export class EndpointAppContextService { public async getEndpointAuthz(request: KibanaRequest): Promise { const fleetAuthz = await this.getFleetAuthzService().fromRequest(request); - const userRoles = this.startDependencies?.security.authc.getCurrentUser(request)?.roles ?? []; + const userRoles = this.security?.authc.getCurrentUser(request)?.roles ?? []; const isEndpointRbacEnabled = this.experimentalFeatures.endpointRbacEnabled; + let endpointPermissions = defaultEndpointPermissions(); + if (this.security) { + const checkPrivileges = this.security.authz.checkPrivilegesDynamicallyWithRequest(request); + const { privileges } = await checkPrivileges({ + kibana: [ + this.security.authz.actions.ui.get('siem', 'crud'), + this.security.authz.actions.ui.get('siem', 'show'), + ], + }); + endpointPermissions = calculatePermissionsFromPrivileges(privileges.kibana); + } + return calculateEndpointAuthz( this.getLicenseService(), fleetAuthz, userRoles, - isEndpointRbacEnabled + isEndpointRbacEnabled, + endpointPermissions ); } diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.test.ts b/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.test.ts index 84d124a398a93..dabd2feed57e2 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.test.ts @@ -277,7 +277,7 @@ describe('check metadata transforms task', () => { }); describe('transforms reinstall', () => { - let getRegistryPackageSpy: jest.SpyInstance; + let getPackageSpy: jest.SpyInstance; let reinstallEsAssetsSpy: jest.SpyInstance; let mockPackageClient: jest.Mocked; @@ -291,7 +291,7 @@ describe('check metadata transforms task', () => { mockPackageClient = mockEndpointAppContext.service.getInternalFleetServices() .packages as jest.Mocked; - getRegistryPackageSpy = jest.spyOn(mockPackageClient, 'getRegistryPackage'); + getPackageSpy = jest.spyOn(mockPackageClient, 'getPackage'); reinstallEsAssetsSpy = jest.spyOn(mockPackageClient, 'reinstallEsAssets'); const transformStatsResponseMock = { @@ -313,7 +313,7 @@ describe('check metadata transforms task', () => { packageInfo: { name: 'package name' }, paths: ['some/test/transform/path'], }; - getRegistryPackageSpy.mockResolvedValue(expectedArgs); + getPackageSpy.mockResolvedValue(expectedArgs); reinstallEsAssetsSpy.mockResolvedValue([{}]); await runTask(); @@ -338,7 +338,7 @@ describe('check metadata transforms task', () => { }); it('should return correct runAt', async () => { - getRegistryPackageSpy.mockResolvedValue({ + getPackageSpy.mockResolvedValue({ packageInfo: { name: 'package name' }, paths: ['some/test/transform/path'], }); diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.ts b/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.ts index 64d37e07342c4..1c2d51510c3f6 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.ts @@ -256,7 +256,7 @@ export class CheckMetadataTransformsTask { const packageClient = this.endpointAppContext.service.getInternalFleetServices().packages; - const { packageInfo, paths } = await packageClient.getRegistryPackage( + const { packageInfo, paths } = await packageClient.getPackage( FLEET_ENDPOINT_PACKAGE, pkgVersion ); diff --git a/x-pack/plugins/security_solution/server/endpoint/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/mocks.ts index 50785f9c29bf9..7639e73b0a36d 100644 --- a/x-pack/plugins/security_solution/server/endpoint/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/mocks.ts @@ -135,6 +135,10 @@ export const createMockEndpointAppContextServiceStartContract = securityMock.createMockAuthenticatedUser({ roles: ['superuser'] }) ); + security.authz.checkPrivilegesDynamicallyWithRequest.mockReturnValue( + jest.fn(() => ({ privileges: { kibana: [] } })) + ); + return { agentService, agentPolicyService, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/details.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/details.ts index 9f087cc65b358..4a0c30c6d990c 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/details.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/details.ts @@ -35,7 +35,7 @@ export const registerActionDetailsRoutes = ( options: { authRequired: true, tags: ['access:securitySolution'] }, }, withEndpointAuthz( - { all: ['canAccessEndpointManagement'] }, + { all: ['canReadSecuritySolution'] }, endpointContext.logFactory.get('hostIsolationDetails'), getActionDetailsRequestHandler(endpointContext) ) diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts index 70c268d430382..c2a460fa88b79 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts @@ -117,14 +117,14 @@ describe('Action List Route', () => { }); describe('User auth level', () => { - it('allows user with canAccessEndpointManagement access to allow requests to API', async () => { + it('allows user with canReadSecuritySolution access to allow requests to API', async () => { await callApiRoute(ENDPOINTS_ACTION_LIST_ROUTE, {}); expect(mockResponse.ok).toBeCalled(); }); - it('does not allow user with canAccessEndpointManagement access to allow requests to API', async () => { + it('does not allow user without canReadSecuritySolution access to allow requests to API', async () => { await callApiRoute(ENDPOINTS_ACTION_LIST_ROUTE, { - authz: { canAccessEndpointManagement: false }, + authz: { canReadSecuritySolution: false }, }); expect(mockResponse.forbidden).toBeCalled(); }); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.ts index 520fc19a85b9c..a8b3ff5d70749 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.ts @@ -33,7 +33,7 @@ export function registerActionListRoutes( options: { authRequired: true, tags: ['access:securitySolution'] }, }, withEndpointAuthz( - { all: ['canAccessEndpointManagement'] }, + { all: ['canReadSecuritySolution'] }, endpointContext.logFactory.get('endpointActionList'), actionListHandler(endpointContext) ) diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.ts index ea1409ce323f9..9566d84898b71 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.ts @@ -19,7 +19,7 @@ import type { SecuritySolutionRequestHandlerContext } from '../../../types'; import type { EndpointAppContext } from '../../types'; import { errorHandler } from '../error_handler'; import type { - ResponseActions, + ResponseActionsApiCommandNames, ResponseActionStatus, } from '../../../../common/endpoint/service/response_actions/constants'; import { doesLogsEndpointActionsIndexExist } from '../../utils'; @@ -28,8 +28,8 @@ const formatStringIds = (value: string | string[] | undefined): undefined | stri typeof value === 'string' ? [value] : value; const formatCommandValues = ( - value: ResponseActions | ResponseActions[] | undefined -): undefined | ResponseActions[] => (typeof value === 'string' ? [value] : value); + value: ResponseActionsApiCommandNames | ResponseActionsApiCommandNames[] | undefined +): undefined | ResponseActionsApiCommandNames[] => (typeof value === 'string' ? [value] : value); const formatStatusValues = ( value: ResponseActionStatus | ResponseActionStatus[] diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts index a0acd5927f5a8..8624bc375cd9f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts @@ -43,6 +43,7 @@ import { GET_PROCESSES_ROUTE, ISOLATE_HOST_ROUTE, UNISOLATE_HOST_ROUTE, + GET_FILE_ROUTE, } from '../../../../common/endpoint/constants'; import type { ActionDetails, @@ -196,7 +197,7 @@ describe('Response actions', () => { ctx.core.elasticsearch.client.asInternalUser.index.mockResponseImplementation( () => withIdxResp ); - ctx.core.elasticsearch.client.asCurrentUser.search.mockResponseImplementation(() => { + ctx.core.elasticsearch.client.asInternalUser.search.mockResponseImplementation(() => { return { body: legacyMetadataSearchResponseMock(searchResponse), }; @@ -412,6 +413,17 @@ describe('Response actions', () => { expect(actionDoc.data.command).toEqual('running-processes'); }); + it('sends the get-file command payload from the get file route', async () => { + const ctx = await callRoute(GET_FILE_ROUTE, { + body: { endpoint_ids: ['XYZ'], parameters: { path: '/one/two/three' } }, + }); + const actionDoc: EndpointAction = ( + ctx.core.elasticsearch.client.asInternalUser.index.mock + .calls[0][0] as estypes.IndexRequest + ).body!; + expect(actionDoc.data.command).toEqual('get-file'); + }); + describe('With endpoint data streams', () => { it('handles unisolation', async () => { const ctx = await callRoute( @@ -553,6 +565,33 @@ describe('Response actions', () => { expect(responseBody.action).toBeUndefined(); }); + it('handles get-file', async () => { + const ctx = await callRoute( + GET_FILE_ROUTE, + { + body: { endpoint_ids: ['XYZ'], parameters: { path: '/one/two/three' } }, + }, + { endpointDsExists: true } + ); + const indexDoc = ctx.core.elasticsearch.client.asInternalUser.index; + const actionDocs: [ + { index: string; body?: LogsEndpointAction }, + { index: string; body?: EndpointAction } + ] = [ + indexDoc.mock.calls[0][0] as estypes.IndexRequest, + indexDoc.mock.calls[1][0] as estypes.IndexRequest, + ]; + + expect(actionDocs[0].index).toEqual(ENDPOINT_ACTIONS_INDEX); + expect(actionDocs[1].index).toEqual(AGENT_ACTIONS_INDEX); + expect(actionDocs[0].body!.EndpointActions.data.command).toEqual('get-file'); + expect(actionDocs[1].body!.data.command).toEqual('get-file'); + + expect(mockResponse.ok).toBeCalled(); + const responseBody = mockResponse.ok.mock.calls[0][0]?.body as ResponseActionApiResponse; + expect(responseBody.action).toBeUndefined(); + }); + it('handles errors', async () => { const ErrMessage = 'Uh oh!'; await callRoute( diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts index 7ff7a8253ba3d..1ddf38e390d10 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts @@ -18,6 +18,7 @@ import type { ResponseActionBodySchema } from '../../../../common/endpoint/schem import { NoParametersRequestSchema, KillOrSuspendProcessRequestSchema, + EndpointActionGetFileSchema, } from '../../../../common/endpoint/schema/actions'; import { APP_ID } from '../../../../common/constants'; import { @@ -32,6 +33,7 @@ import { ISOLATE_HOST_ROUTE, UNISOLATE_HOST_ROUTE, ENDPOINT_ACTIONS_INDEX, + GET_FILE_ROUTE, } from '../../../../common/endpoint/constants'; import type { EndpointAction, @@ -42,7 +44,7 @@ import type { LogsEndpointActionResponse, ResponseActionParametersWithPidOrEntityId, } from '../../../../common/endpoint/types'; -import type { ResponseActions } from '../../../../common/endpoint/service/response_actions/constants'; +import type { ResponseActionsApiCommandNames } from '../../../../common/endpoint/service/response_actions/constants'; import type { SecuritySolutionPluginRouter, SecuritySolutionRequestHandlerContext, @@ -157,21 +159,35 @@ export function registerResponseActionRoutes( responseActionRequestHandler(endpointContext, 'running-processes') ) ); + + router.post( + { + path: GET_FILE_ROUTE, + validate: EndpointActionGetFileSchema, + options: { authRequired: true, tags: ['access:securitySolution'] }, + }, + withEndpointAuthz( + { all: ['canWriteFileOperations'] }, + logger, + responseActionRequestHandler(endpointContext, 'get-file') + ) + ); } -const commandToFeatureKeyMap = new Map([ +const commandToFeatureKeyMap = new Map([ ['isolate', 'HOST_ISOLATION'], ['unisolate', 'HOST_ISOLATION'], ['kill-process', 'KILL_PROCESS'], ['suspend-process', 'SUSPEND_PROCESS'], ['running-processes', 'RUNNING_PROCESSES'], + ['get-file', 'GET_FILE'], ]); -const returnActionIdCommands: ResponseActions[] = ['isolate', 'unisolate']; +const returnActionIdCommands: ResponseActionsApiCommandNames[] = ['isolate', 'unisolate']; function responseActionRequestHandler( endpointContext: EndpointAppContext, - command: ResponseActions + command: ResponseActionsApiCommandNames ): RequestHandler< unknown, unknown, @@ -233,8 +249,7 @@ function responseActionRequestHandler, } as Omit, user: { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - id: user!.username, + id: user ? user.username : 'unknown', }, }; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/status.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/status.ts index 5f648bf44704d..2660fcd37103e 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/status.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/status.ts @@ -32,7 +32,7 @@ export function registerActionStatusRoutes( options: { authRequired: true, tags: ['access:securitySolution'] }, }, withEndpointAuthz( - { all: ['canAccessEndpointManagement'] }, + { all: ['canReadSecuritySolution'] }, endpointContext.logFactory.get('hostIsolationStatus'), actionStatusRequestHandler(endpointContext) ) diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts index 0cc0d4bb50e55..b9a187b592dbc 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts @@ -63,7 +63,7 @@ export function getMetadataListRequestHandler( > { return async (context, request, response) => { const endpointMetadataService = endpointAppContext.service.getEndpointMetadataService(); - const fleetServices = endpointAppContext.service.getScopedFleetServices(request); + const fleetServices = endpointAppContext.service.getInternalFleetServices(); const esClient = (await context.core).elasticsearch.client.asInternalUser; let doesUnitedIndexExist = false; @@ -142,7 +142,7 @@ export const getMetadataRequestHandler = function ( return response.ok({ body: await endpointMetadataService.getEnrichedHostMetadata( esClient.asInternalUser, - endpointAppContext.service.getScopedFleetServices(request), + endpointAppContext.service.getInternalFleetServices(), request.params.id ), }); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts index eba1c27d91f8d..abe65089143aa 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts @@ -57,7 +57,7 @@ export function registerEndpointRoutes( options: { authRequired: true, tags: ['access:securitySolution'] }, }, withEndpointAuthz( - { all: ['canAccessEndpointManagement'] }, + { all: ['canReadSecuritySolution'] }, logger, getMetadataListRequestHandler(endpointAppContext, logger) ) @@ -70,7 +70,7 @@ export function registerEndpointRoutes( options: { authRequired: true, tags: ['access:securitySolution'] }, }, withEndpointAuthz( - { all: ['canAccessEndpointManagement'] }, + { all: ['canReadSecuritySolution'] }, logger, getMetadataRequestHandler(endpointAppContext, logger) ) @@ -83,7 +83,7 @@ export function registerEndpointRoutes( options: { authRequired: true, tags: ['access:securitySolution'] }, }, withEndpointAuthz( - { all: ['canAccessEndpointManagement'] }, + { all: ['canReadSecuritySolution'] }, logger, getMetadataTransformStatsHandler(logger) ) diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts index d03117225279a..58cda4c9737c9 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts @@ -152,7 +152,7 @@ describe('test endpoint routes', () => { endpointAppContextService.start({ ...startContract, packageService: mockPackageService }); mockAgentService = startContract.agentService!; mockAgentClient = createMockAgentClient(); - mockAgentService.asScoped = () => mockAgentClient; + mockAgentService.asInternalUser = mockAgentClient; mockAgentPolicyService = startContract.agentPolicyService!; registerEndpointRoutes(routerMock, { @@ -629,6 +629,25 @@ describe('test endpoint routes', () => { expect(endpointResultList.pageSize).toEqual(10); }); }); + + it('should get forbidden if no security solution access', async () => { + const mockRequest = httpServerMock.createKibanaRequest(); + + [routeConfig, routeHandler] = routerMock.get.mock.calls.find(([{ path }]) => + path.startsWith(HOST_METADATA_LIST_ROUTE) + )!; + + const contextOverrides = { + endpointAuthz: getEndpointAuthzInitialStateMock({ canReadSecuritySolution: false }), + }; + await routeHandler( + createRouteHandlerContext(mockScopedClient, mockSavedObjectClient, contextOverrides), + mockRequest, + mockResponse + ); + + expect(mockResponse.forbidden).toBeCalled(); + }); }); describe('GET endpoint details route', () => { @@ -794,10 +813,29 @@ describe('test endpoint routes', () => { expect(esSearchMock).toHaveBeenCalledTimes(1); expect(mockResponse.badRequest).toBeCalled(); }); + + it('should get forbidden if no security solution access', async () => { + const mockRequest = httpServerMock.createKibanaRequest(); + + [routeConfig, routeHandler] = routerMock.get.mock.calls.find(([{ path }]) => + path.startsWith(HOST_METADATA_GET_ROUTE) + )!; + + const contextOverrides = { + endpointAuthz: getEndpointAuthzInitialStateMock({ canReadSecuritySolution: false }), + }; + await routeHandler( + createRouteHandlerContext(mockScopedClient, mockSavedObjectClient, contextOverrides), + mockRequest, + mockResponse + ); + + expect(mockResponse.forbidden).toBeCalled(); + }); }); describe('GET metadata transform stats route', () => { - it('should get forbidden if no fleet access', async () => { + it('should get forbidden if no security solution access', async () => { const mockRequest = httpServerMock.createKibanaRequest(); [routeConfig, routeHandler] = routerMock.get.mock.calls.find(([{ path }]) => @@ -805,7 +843,7 @@ describe('test endpoint routes', () => { )!; const contextOverrides = { - endpointAuthz: getEndpointAuthzInitialStateMock({ canAccessEndpointManagement: false }), + endpointAuthz: getEndpointAuthzInitialStateMock({ canReadSecuritySolution: false }), }; await routeHandler( createRouteHandlerContext(mockScopedClient, mockSavedObjectClient, contextOverrides), diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/utils.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/utils.ts index 036e9f0cc1edd..17f8be8c8811f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/utils.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/utils.ts @@ -7,7 +7,7 @@ import type { ElasticsearchClient } from '@kbn/core/server'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import type { ResponseActions } from '../../../../common/endpoint/service/response_actions/constants'; +import type { ResponseActionsApiCommandNames } from '../../../../common/endpoint/service/response_actions/constants'; import { ENDPOINT_ACTIONS_DS, ENDPOINT_ACTION_RESPONSES_DS, @@ -55,7 +55,7 @@ interface NormalizedActionRequest { agents: string[]; createdBy: string; createdAt: string; - command: ResponseActions; + command: ResponseActionsApiCommandNames; comment?: string; parameters?: EndpointActionDataParameterTypes; } diff --git a/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/service.ts b/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/service.ts index 46c75cd6f73eb..d83066414add2 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/service.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/service.ts @@ -21,6 +21,7 @@ const FEATURES = { KILL_PROCESS: 'Kill process', SUSPEND_PROCESS: 'Suspend process', RUNNING_PROCESSES: 'Get running processes', + GET_FILE: 'Get file', ALERTS_BY_PROCESS_ANCESTRY: 'Get related alerts by process ancestry', } as const; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/metadata/metadata.ts b/x-pack/plugins/security_solution/server/endpoint/services/metadata/metadata.ts index 1f68552e999ae..529903d97403e 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/metadata/metadata.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/metadata/metadata.ts @@ -18,7 +18,7 @@ export async function getMetadataForEndpoints( requestHandlerContext: SecuritySolutionRequestHandlerContext ): Promise { const query = getESQueryHostMetadataByIDs(endpointIDs); - const esClient = (await requestHandlerContext.core).elasticsearch.client.asCurrentUser; + const esClient = (await requestHandlerContext.core).elasticsearch.client.asInternalUser; const { body } = await esClient.search(query as estypes.SearchRequest, { meta: true, }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/get_installed_integrations_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/get_installed_integrations_route.ts index 50c89f989f990..9e9091e1b578c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/get_installed_integrations_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/get_installed_integrations_route.ts @@ -50,7 +50,7 @@ export const getInstalledIntegrationsRoute = ( concurrency: MAX_CONCURRENT_REQUESTS_TO_PACKAGE_REGISTRY, items: set.getPackages(), executor: async (packageInfo) => { - const registryPackage = await fleet.packages.getRegistryPackage( + const registryPackage = await fleet.packages.getPackage( packageInfo.package_name, packageInfo.package_version ); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/installed_integration_set.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/installed_integration_set.ts index d55b8fdce3a3f..e124e0322192c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/installed_integration_set.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/installed_integration_set.ts @@ -6,7 +6,7 @@ */ import { capitalize, flatten } from 'lodash'; -import type { PackagePolicy, RegistryPackage } from '@kbn/fleet-plugin/common'; +import type { PackagePolicy, ArchivePackage } from '@kbn/fleet-plugin/common'; import type { InstalledIntegration, InstalledIntegrationArray, @@ -18,7 +18,7 @@ import type { export interface IInstalledIntegrationSet { addPackagePolicy(policy: PackagePolicy): void; - addRegistryPackage(registryPackage: RegistryPackage): void; + addRegistryPackage(registryPackage: ArchivePackage): void; getPackages(): InstalledPackageArray; getIntegrations(): InstalledIntegrationArray; @@ -56,7 +56,7 @@ export const createInstalledIntegrationSet = (): IInstalledIntegrationSet => { } }; - const addRegistryPackage = (registryPackage: RegistryPackage): void => { + const addRegistryPackage = (registryPackage: ArchivePackage): void => { const policyTemplates = registryPackage.policy_templates ?? []; const packageKey = `${registryPackage.name}:${registryPackage.version}`; const existingPackageInfo = packageMap.get(packageKey); diff --git a/x-pack/plugins/security_solution/server/request_context_factory.ts b/x-pack/plugins/security_solution/server/request_context_factory.ts index 730cbd259f50e..ecf56a988636d 100644 --- a/x-pack/plugins/security_solution/server/request_context_factory.ts +++ b/x-pack/plugins/security_solution/server/request_context_factory.ts @@ -27,6 +27,8 @@ import type { Immutable } from '../common/endpoint/types'; import type { EndpointAuthz } from '../common/endpoint/types/authz'; import { calculateEndpointAuthz, + calculatePermissionsFromPrivileges, + defaultEndpointPermissions, getEndpointAuthzInitialState, } from '../common/endpoint/service/authz'; import { licenseService } from './lib/license'; @@ -79,11 +81,21 @@ export class RequestContextFactory implements IRequestContextFactory { (await context.fleet)?.authz ?? (await startPlugins.fleet?.authz.fromRequest(request)); } - const isEndpointRbacEnabled = - endpointAppContextService.experimentalFeatures.endpointRbacEnabled; - const coreContext = await context.core; + let endpointPermissions = defaultEndpointPermissions(); + if (endpointAppContextService.security) { + const checkPrivileges = + endpointAppContextService.security.authz.checkPrivilegesDynamicallyWithRequest(request); + const { privileges } = await checkPrivileges({ + kibana: [ + endpointAppContextService.security.authz.actions.ui.get('siem', 'crud'), + endpointAppContextService.security.authz.actions.ui.get('siem', 'show'), + ], + }); + endpointPermissions = calculatePermissionsFromPrivileges(privileges.kibana); + } + return { core: coreContext, @@ -94,12 +106,15 @@ export class RequestContextFactory implements IRequestContextFactory { if (!startPlugins.fleet) { endpointAuthz = getEndpointAuthzInitialState(); } else { + const isEndpointRbacEnabled = + endpointAppContextService.experimentalFeatures.endpointRbacEnabled; const userRoles = security?.authc.getCurrentUser(request)?.roles ?? []; endpointAuthz = calculateEndpointAuthz( licenseService, fleetAuthz, userRoles, - isEndpointRbacEnabled + isEndpointRbacEnabled, + endpointPermissions ); } } diff --git a/x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/es_query_expression.tsx b/x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/es_query_expression.tsx index caee77b9b720a..37369d60335a5 100644 --- a/x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/es_query_expression.tsx +++ b/x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/es_query_expression.tsx @@ -192,6 +192,7 @@ export const EsQueryExpression: React.FC< 0} error={errors.esQuery} @@ -208,7 +209,6 @@ export const EsQueryExpression: React.FC< languageId="xjson" width="100%" height="200px" - data-test-subj="queryJsonEditor" value={xJson} onChange={(xjson: string) => { setXJson(xjson); diff --git a/x-pack/plugins/stack_connectors/README.md b/x-pack/plugins/stack_connectors/README.md index 38685950658d6..d92225a641e3d 100644 --- a/x-pack/plugins/stack_connectors/README.md +++ b/x-pack/plugins/stack_connectors/README.md @@ -332,6 +332,32 @@ The following table describes the properties of the `incident` object. | severity | The severity of the incident. | string _(optional)_ | --- +## Ospgenie + +Refer to the [Run connector API documentation](https://www.elastic.co/guide/en/kibana/master/execute-connector-api.html#execute-connector-api-request-body) +for the full list of properties. + +### `params` + +| Property | Description | Type | +| --------------- | ------------------------------------------------------------------ | ------ | +| subAction | The subaction to perform. It can be `createAlert` or `closeAlert`. | string | +| subActionParams | The parameters of the subaction. | object | + +`subActionParams (createAlert)` + +| Property | Description | Type | +| -------- | ------------------------------------------------------------------------------------------------------------- | --------------------- | +| message | The alert message. | string | + +The optional parameters `alias`, `description`, `responders`, `visibleTo`, `actions`, `tags`, `details`, `entity`, `source`, `priority`, `user`, and `note` are supported. See the [Opsgenie API documentation](https://docs.opsgenie.com/docs/alert-api#create-alert) for more information on their types. + +`subActionParams (closeAlert)` + +No parameters are required. For the definition of the optional parameters see the [Opsgenie API documentation](https://docs.opsgenie.com/docs/alert-api#close-alert). + +--- + # Developing New Connector Types When creating a new connector type, your plugin will eventually call `server.plugins.actions.setup.registerType()` to register the type with the `actions` plugin, but there are some additional things to think about about and implement. @@ -370,4 +396,4 @@ Instead of `schema.maybe()`, use `schema.nullable()`, which is the same as `sche ## User interface -To make this connector usable in the Kibana UI, you will need to provide all the UI editing aspects of the connector. The existing connector type user interfaces are defined in [`x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types`](../triggers_actions_ui/public/application/components/builtin_action_types). For more information, see the [UI documentation](../triggers_actions_ui/README.md#create-and-register-new-action-type-ui). \ No newline at end of file +To make this connector usable in the Kibana UI, you will need to provide all the UI editing aspects of the connector. The existing connector type user interfaces are defined in [`x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types`](../triggers_actions_ui/public/application/components/builtin_action_types). For more information, see the [UI documentation](../triggers_actions_ui/README.md#create-and-register-new-action-type-ui). diff --git a/x-pack/plugins/stack_connectors/server/connector_types/index.ts b/x-pack/plugins/stack_connectors/server/connector_types/index.ts index 67a34dd285fe3..5aa352986939e 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/index.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/index.ts @@ -16,6 +16,7 @@ import { getSlackConnectorType, getTeamsConnectorType, getWebhookConnectorType, + getOpsgenieConnectorType, getXmattersConnectorType, } from './stack'; import { @@ -26,7 +27,6 @@ import { getServiceNowSIRConnectorType, getSwimlaneConnectorType, } from './cases'; - export type { EmailActionParams, IndexActionParams, @@ -46,6 +46,7 @@ export { SlackConnectorTypeId, TeamsConnectorTypeId, WebhookConnectorTypeId, + OpsgenieConnectorTypeId, XmattersConnectorTypeId, } from './stack'; export type { @@ -86,4 +87,5 @@ export function registerConnectorTypes({ actions.registerType(getJiraConnectorType({ logger })); actions.registerType(getResilientConnectorType({ logger })); actions.registerType(getTeamsConnectorType({ logger })); + actions.registerSubActionConnectorType(getOpsgenieConnectorType()); } diff --git a/x-pack/plugins/stack_connectors/server/connector_types/stack/index.ts b/x-pack/plugins/stack_connectors/server/connector_types/stack/index.ts index 6fd7faeaf1729..1d7df7b21ed94 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/stack/index.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/stack/index.ts @@ -49,6 +49,8 @@ export { } from './webhook'; export type { ActionParamsType as WebhookActionParams } from './webhook'; +export { getOpsgenieConnectorType, OpsgenieConnectorTypeId } from './opsgenie'; + export { getConnectorType as getXmattersConnectorType, ConnectorTypeId as XmattersConnectorTypeId, diff --git a/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/connector.test.ts b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/connector.test.ts new file mode 100644 index 0000000000000..af9380b8ea75b --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/connector.test.ts @@ -0,0 +1,150 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import axios, { AxiosInstance } from 'axios'; +import crypto from 'crypto'; +import { ActionsConfigurationUtilities } from '@kbn/actions-plugin/server/actions_config'; +import { actionsConfigMock } from '@kbn/actions-plugin/server/actions_config.mock'; +import { actionsMock } from '@kbn/actions-plugin/server/mocks'; +import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; +import { MockedLogger } from '@kbn/logging-mocks'; +import { OpsgenieConnectorTypeId } from '.'; +import { OpsgenieConnector } from './connector'; +import * as utils from '@kbn/actions-plugin/server/lib/axios_utils'; + +jest.mock('axios'); + +jest.mock('@kbn/actions-plugin/server/lib/axios_utils', () => { + const originalUtils = jest.requireActual('@kbn/actions-plugin/server/lib/axios_utils'); + return { + ...originalUtils, + request: jest.fn(), + }; +}); + +const axiosMock = axios as jest.Mocked; +const requestMock = utils.request as jest.Mock; + +describe('OpsgenieConnector', () => { + const axiosInstanceMock = jest.fn(); + + let connector: OpsgenieConnector; + let mockedActionsConfig: jest.Mocked; + let logger: MockedLogger; + let services: ReturnType; + + const defaultCreateAlertExpect = { + method: 'post', + url: 'https://example.com/v2/alerts', + headers: { Authorization: 'GenieKey 123', 'Content-Type': 'application/json' }, + }; + + const createCloseAlertExpect = (alias: string) => ({ + method: 'post', + url: `https://example.com/v2/alerts/${alias}/close?identifierType=alias`, + headers: { Authorization: 'GenieKey 123', 'Content-Type': 'application/json' }, + }); + + const ignoredRequestFields = { + axios: expect.anything(), + configurationUtilities: expect.anything(), + logger: expect.anything(), + }; + + beforeEach(() => { + jest.resetAllMocks(); + jest.clearAllMocks(); + requestMock.mockReturnValue({ data: { took: 5, requestId: '123', result: 'ok' } }); + axiosMock.create.mockImplementation(() => { + return axiosInstanceMock as unknown as AxiosInstance; + }); + + logger = loggingSystemMock.createLogger(); + services = actionsMock.createServices(); + mockedActionsConfig = actionsConfigMock.create(); + + connector = new OpsgenieConnector({ + configurationUtilities: mockedActionsConfig, + config: { apiUrl: 'https://example.com' }, + connector: { id: '1', type: OpsgenieConnectorTypeId }, + secrets: { apiKey: '123' }, + logger, + services, + }); + }); + + it('calls request with the correct arguments for creating an alert', async () => { + await connector.createAlert({ message: 'hello' }); + + expect(requestMock.mock.calls[0][0]).toEqual({ + data: { message: 'hello' }, + ...ignoredRequestFields, + ...defaultCreateAlertExpect, + }); + }); + + it('calls request without modifying the alias when it is less than 512 characters when creating an alert', async () => { + await connector.createAlert({ message: 'hello', alias: '111' }); + + expect(requestMock.mock.calls[0][0]).toEqual({ + ...ignoredRequestFields, + ...defaultCreateAlertExpect, + data: { message: 'hello', alias: '111' }, + }); + }); + + it('calls request without modifying the alias when it is equal to 512 characters when creating an alert', async () => { + const alias = 'a'.repeat(512); + await connector.createAlert({ message: 'hello', alias }); + + expect(requestMock.mock.calls[0][0]).toEqual({ + ...ignoredRequestFields, + ...defaultCreateAlertExpect, + data: { message: 'hello', alias }, + }); + }); + + it('calls request with the sha256 hash of the alias when it is greater than 512 characters when creating an alert', async () => { + const alias = 'a'.repeat(513); + + const hasher = crypto.createHash('sha256'); + const sha256Hash = hasher.update(alias); + + await connector.createAlert({ message: 'hello', alias }); + + expect(requestMock.mock.calls[0][0]).toEqual({ + ...ignoredRequestFields, + ...defaultCreateAlertExpect, + data: { message: 'hello', alias: `sha-${sha256Hash.digest('hex')}` }, + }); + }); + + it('calls request with the sha256 hash of the alias when it is greater than 512 characters when closing an alert', async () => { + const alias = 'a'.repeat(513); + + const hasher = crypto.createHash('sha256'); + const sha256Hash = hasher.update(alias); + + await connector.closeAlert({ alias }); + + expect(requestMock.mock.calls[0][0]).toEqual({ + ...ignoredRequestFields, + ...createCloseAlertExpect(`sha-${sha256Hash.digest('hex')}`), + data: {}, + }); + }); + + it('calls request with the correct arguments for closing an alert', async () => { + await connector.closeAlert({ user: 'sam', alias: '111' }); + + expect(requestMock.mock.calls[0][0]).toEqual({ + ...ignoredRequestFields, + ...createCloseAlertExpect('111'), + data: { user: 'sam' }, + }); + }); +}); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/connector.ts b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/connector.ts new file mode 100644 index 0000000000000..4c053c954a192 --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/connector.ts @@ -0,0 +1,112 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import crypto from 'crypto'; +import { ServiceParams, SubActionConnector } from '@kbn/actions-plugin/server'; +import { AxiosError } from 'axios'; +import { CloseAlertParamsSchema, CreateAlertParamsSchema, Response } from './schema'; +import { CloseAlertParams, Config, CreateAlertParams, Secrets } from './types'; +import * as i18n from './translations'; + +interface ErrorSchema { + message?: string; + errors?: { + message?: string; + }; +} + +export class OpsgenieConnector extends SubActionConnector { + constructor(params: ServiceParams) { + super(params); + + this.registerSubAction({ + method: this.createAlert.name, + name: 'createAlert', + schema: CreateAlertParamsSchema, + }); + + this.registerSubAction({ + method: this.closeAlert.name, + name: 'closeAlert', + schema: CloseAlertParamsSchema, + }); + } + + public getResponseErrorMessage(error: AxiosError) { + return `Message: ${ + error.response?.data.errors?.message ?? + error.response?.data.message ?? + error.message ?? + i18n.UNKNOWN_ERROR + }`; + } + + public async createAlert(params: CreateAlertParams) { + const res = await this.request({ + method: 'post', + url: this.concatPathToURL('v2/alerts').toString(), + data: { ...params, ...OpsgenieConnector.createAliasObj(params.alias) }, + headers: this.createHeaders(), + responseSchema: Response, + }); + + return res.data; + } + + private static createAliasObj(alias?: string) { + if (!alias) { + return {}; + } + + const newAlias = OpsgenieConnector.createAlias(alias); + + return { alias: newAlias }; + } + + private static createAlias(alias: string) { + // opsgenie v2 requires that the alias length be no more than 512 characters + // see their docs for more details https://docs.opsgenie.com/docs/alert-api#create-alert + if (alias.length <= 512) { + return alias; + } + + // To give preference to avoiding collisions we're using sha256 over of md5 but we are compromising on speed a bit here + const hasher = crypto.createHash('sha256'); + const sha256Hash = hasher.update(alias); + + return `sha-${sha256Hash.digest('hex')}`; + } + + private createHeaders() { + return { Authorization: `GenieKey ${this.secrets.apiKey}` }; + } + + public async closeAlert(params: CloseAlertParams) { + const newAlias = OpsgenieConnector.createAlias(params.alias); + + const fullURL = this.concatPathToURL(`v2/alerts/${newAlias}/close`); + fullURL.searchParams.set('identifierType', 'alias'); + + const { alias, ...paramsWithoutAlias } = params; + + const res = await this.request({ + method: 'post', + url: fullURL.toString(), + data: paramsWithoutAlias, + headers: this.createHeaders(), + responseSchema: Response, + }); + + return res.data; + } + + private concatPathToURL(path: string) { + const fullURL = new URL(path, this.config.apiUrl); + + return fullURL; + } +} diff --git a/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/index.ts b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/index.ts new file mode 100644 index 0000000000000..b5c453ae22e0b --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/index.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + AlertingConnectorFeatureId, + SecurityConnectorFeatureId, + UptimeConnectorFeatureId, +} from '@kbn/actions-plugin/common'; +import { urlAllowListValidator } from '@kbn/actions-plugin/server'; +import { + SubActionConnectorType, + ValidatorType, +} from '@kbn/actions-plugin/server/sub_action_framework/types'; +import { OpsgenieConnector } from './connector'; +import { ConfigSchema, SecretsSchema } from './schema'; +import { Config, Secrets } from './types'; +import * as i18n from './translations'; + +export const OpsgenieConnectorTypeId = '.opsgenie'; + +export const getOpsgenieConnectorType = (): SubActionConnectorType => { + return { + Service: OpsgenieConnector, + minimumLicenseRequired: 'platinum', + name: i18n.OPSGENIE_NAME, + id: OpsgenieConnectorTypeId, + schema: { config: ConfigSchema, secrets: SecretsSchema }, + validators: [{ type: ValidatorType.CONFIG, validator: urlAllowListValidator('apiUrl') }], + supportedFeatureIds: [ + AlertingConnectorFeatureId, + UptimeConnectorFeatureId, + SecurityConnectorFeatureId, + ], + }; +}; diff --git a/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/schema.ts b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/schema.ts new file mode 100644 index 0000000000000..23fbe6be32b97 --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/schema.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 { schema } from '@kbn/config-schema'; + +export const ConfigSchema = schema.object({ + apiUrl: schema.string(), +}); + +export const SecretsSchema = schema.object({ + apiKey: schema.string(), +}); + +const responderTypes = schema.oneOf([ + schema.literal('team'), + schema.literal('user'), + schema.literal('escalation'), + schema.literal('schedule'), +]); + +export const CreateAlertParamsSchema = schema.object({ + message: schema.string({ maxLength: 130 }), + /** + * The max length here should be 512 according to Opsgenie's docs but we will sha256 hash the alias if it is longer than 512 + * so we'll not impose a limit on the schema otherwise it'll get rejected prematurely. + */ + alias: schema.maybe(schema.string()), + description: schema.maybe(schema.string({ maxLength: 15000 })), + responders: schema.maybe( + schema.arrayOf( + schema.oneOf([ + schema.object({ + name: schema.string(), + type: responderTypes, + }), + schema.object({ id: schema.string(), type: responderTypes }), + ]), + { maxSize: 50 } + ) + ), + visibleTo: schema.maybe( + schema.arrayOf( + schema.oneOf([ + schema.object({ + name: schema.string(), + type: schema.literal('team'), + }), + schema.object({ + id: schema.string(), + type: schema.literal('team'), + }), + schema.object({ + id: schema.string(), + type: schema.literal('user'), + }), + schema.object({ + username: schema.string(), + type: schema.literal('user'), + }), + ]), + { maxSize: 50 } + ) + ), + actions: schema.maybe(schema.arrayOf(schema.string({ maxLength: 50 }), { maxSize: 10 })), + tags: schema.maybe(schema.arrayOf(schema.string({ maxLength: 50 }), { maxSize: 20 })), + /** + * The validation requirement here is that the total characters between the key and value do not exceed 8000. Opsgenie + * will truncate the value if it would exceed the 8000 but it doesn't throw an error. Because of this I'm intentionally + * not validating the length of the keys and values here. + */ + details: schema.maybe(schema.recordOf(schema.string(), schema.string())), + entity: schema.maybe(schema.string({ maxLength: 512 })), + source: schema.maybe(schema.string({ maxLength: 100 })), + priority: schema.maybe( + schema.oneOf([ + schema.literal('P1'), + schema.literal('P2'), + schema.literal('P3'), + schema.literal('P4'), + schema.literal('P5'), + ]) + ), + user: schema.maybe(schema.string({ maxLength: 100 })), + note: schema.maybe(schema.string({ maxLength: 25000 })), +}); + +const SuccessfulResponse = schema.object( + { + took: schema.number(), + requestId: schema.string(), + result: schema.string(), + }, + { unknowns: 'allow' } +); + +const FailureResponse = schema.object( + { + took: schema.number(), + requestId: schema.string(), + message: schema.maybe(schema.string()), + result: schema.maybe(schema.string()), + errors: schema.maybe(schema.object({ message: schema.string() })), + }, + { unknowns: 'allow' } +); + +export const Response = schema.oneOf([SuccessfulResponse, FailureResponse]); + +export const CloseAlertParamsSchema = schema.object({ + alias: schema.string(), + user: schema.maybe(schema.string({ maxLength: 100 })), + source: schema.maybe(schema.string({ maxLength: 100 })), + note: schema.maybe(schema.string({ maxLength: 25000 })), +}); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/translations.ts b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/translations.ts new file mode 100644 index 0000000000000..d5cd24f10a329 --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/translations.ts @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const UNKNOWN_ERROR = i18n.translate('xpack.stackConnectors.opsgenie.unknownError', { + defaultMessage: 'unknown error', +}); + +export const OPSGENIE_NAME = i18n.translate('xpack.stackConnectors.opsgenie.name', { + defaultMessage: 'Opsgenie', +}); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/types.ts b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/types.ts new file mode 100644 index 0000000000000..eaf436fbe256a --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/stack/opsgenie/types.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { TypeOf } from '@kbn/config-schema'; +import { + CloseAlertParamsSchema, + ConfigSchema, + CreateAlertParamsSchema, + SecretsSchema, +} from './schema'; + +export type Config = TypeOf; +export type Secrets = TypeOf; + +export type CreateAlertParams = TypeOf; +export type CloseAlertParams = TypeOf; diff --git a/x-pack/plugins/synthetics/e2e/journeys/data_view_permissions.ts b/x-pack/plugins/synthetics/e2e/journeys/data_view_permissions.ts index e5714234de690..5aa7ee96f25b1 100644 --- a/x-pack/plugins/synthetics/e2e/journeys/data_view_permissions.ts +++ b/x-pack/plugins/synthetics/e2e/journeys/data_view_permissions.ts @@ -6,8 +6,12 @@ */ import { journey, step, expect, before } from '@elastic/synthetics'; +import { + byTestId, + TIMEOUT_60_SEC, + waitForLoadingToFinish, +} from '@kbn/observability-plugin/e2e/utils'; import { callKibana } from '@kbn/apm-plugin/server/test_helpers/create_apm_users/helpers/call_kibana'; -import { byTestId, waitForLoadingToFinish } from '@kbn/observability-plugin/e2e/utils'; import { loginPageProvider } from '../page_objects/login'; journey('DataViewPermissions', async ({ page, params }) => { @@ -44,7 +48,7 @@ journey('DataViewPermissions', async ({ page, params }) => { step('Click explore data button', async () => { await page.click(byTestId('uptimeExploreDataButton')); await waitForLoadingToFinish({ page }); - await page.waitForSelector(`text=${permissionError}`); + await page.waitForSelector(`text=${permissionError}`, TIMEOUT_60_SEC); expect(await page.$(`text=${permissionError}`)).toBeTruthy(); }); }); diff --git a/x-pack/plugins/synthetics/e2e/journeys/index.ts b/x-pack/plugins/synthetics/e2e/journeys/index.ts index a33a5185fcac2..5651b092544de 100644 --- a/x-pack/plugins/synthetics/e2e/journeys/index.ts +++ b/x-pack/plugins/synthetics/e2e/journeys/index.ts @@ -5,9 +5,9 @@ * 2.0. */ +export * from './data_view_permissions'; export * from './synthetics'; export * from './alerts'; -export * from './data_view_permissions'; export * from './uptime.journey'; export * from './step_duration.journey'; export * from './read_only_user'; diff --git a/x-pack/plugins/synthetics/e2e/journeys/synthetics/index.ts b/x-pack/plugins/synthetics/e2e/journeys/synthetics/index.ts index 3c8869fab85a8..1b74aa6a05b42 100644 --- a/x-pack/plugins/synthetics/e2e/journeys/synthetics/index.ts +++ b/x-pack/plugins/synthetics/e2e/journeys/synthetics/index.ts @@ -7,3 +7,4 @@ export * from './getting_started.journey'; export * from './add_monitor.journey'; +export * from './monitor_selector.journey'; diff --git a/x-pack/plugins/synthetics/e2e/journeys/synthetics/monitor_selector.journey.ts b/x-pack/plugins/synthetics/e2e/journeys/synthetics/monitor_selector.journey.ts new file mode 100644 index 0000000000000..866df48d97e78 --- /dev/null +++ b/x-pack/plugins/synthetics/e2e/journeys/synthetics/monitor_selector.journey.ts @@ -0,0 +1,62 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { journey, step, expect, before } from '@elastic/synthetics'; +import { + addTestMonitor, + cleanTestMonitors, + enableMonitorManagedViaApi, +} from './services/add_monitor'; +import { syntheticsAppPageProvider } from '../../page_objects/synthetics_app'; + +journey(`MonitorSelector`, async ({ page, params }) => { + const syntheticsApp = syntheticsAppPageProvider({ page, kibanaUrl: params.kibanaUrl }); + const testMonitor1 = 'Test monitor 1'; + const testMonitor2 = 'Test monitor 2'; + const testMonitor3 = 'Test monitor 3'; + + before(async () => { + await enableMonitorManagedViaApi(params.kibanaUrl); + await cleanTestMonitors(params); + + await addTestMonitor(params.kibanaUrl, testMonitor1); + await addTestMonitor(params.kibanaUrl, testMonitor2); + await addTestMonitor(params.kibanaUrl, testMonitor3); + }); + + step('Go to monitor-management', async () => { + await syntheticsApp.navigateToMonitorManagement(); + }); + + step('login to Kibana', async () => { + await syntheticsApp.loginToKibana(); + const invalid = await page.locator(`text=Username or password is incorrect. Please try again.`); + expect(await invalid.isVisible()).toBeFalsy(); + }); + + step('go to monitor', async () => { + await page.click('text=' + testMonitor1); + }); + + step('shows recently viewed monitors', async () => { + await page.click('text=' + testMonitor1); + await page.click('[aria-label="Select a different monitor to view its details"]'); + await page.click('text=' + testMonitor2); + + await page.click('[aria-label="Select a different monitor to view its details"]'); + await page.click('text=Recently viewed'); + await page.click('text=Other monitors'); + await page.click('text=' + testMonitor3); + + await page.click('[aria-label="Select a different monitor to view its details"]'); + await page.click('[placeholder="Monitor name or tag"]'); + await page.fill('[placeholder="Monitor name or tag"]', '2'); + await page.click('text=' + testMonitor2); + + await page.click('[aria-label="Select a different monitor to view its details"]'); + }); +}); diff --git a/x-pack/plugins/synthetics/e2e/journeys/synthetics/services/add_monitor.ts b/x-pack/plugins/synthetics/e2e/journeys/synthetics/services/add_monitor.ts new file mode 100644 index 0000000000000..37078cb3c0676 --- /dev/null +++ b/x-pack/plugins/synthetics/e2e/journeys/synthetics/services/add_monitor.ts @@ -0,0 +1,96 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import axios from 'axios'; + +export const enableMonitorManagedViaApi = async (kibanaUrl: string) => { + try { + await axios.post(kibanaUrl + '/internal/uptime/service/enablement', undefined, { + auth: { username: 'elastic', password: 'changeme' }, + headers: { 'kbn-xsrf': 'true' }, + }); + } catch (e) { + // eslint-disable-next-line no-console + console.log(e); + } +}; + +export const addTestMonitor = async (kibanaUrl: string, name: string) => { + data.name = name; + + try { + await axios.post(kibanaUrl + '/internal/uptime/service/monitors', data, { + auth: { username: 'elastic', password: 'changeme' }, + headers: { 'kbn-xsrf': 'true' }, + }); + } catch (e) { + // eslint-disable-next-line no-console + console.log(e); + } +}; + +export const cleanTestMonitors = async (params: Record) => { + const getService = params.getService; + const server = getService('kibanaServer'); + + try { + await server.savedObjects.clean({ types: ['synthetics-monitor'] }); + } catch (e) { + // eslint-disable-next-line no-console + console.log(e); + } +}; + +const data = { + type: 'browser', + form_monitor_type: 'single', + enabled: true, + schedule: { unit: 'm', number: '10' }, + 'service.name': '', + config_id: '', + tags: [], + timeout: '16', + name: 'Monitor 2', + locations: [{ id: 'us_central', isServiceManaged: true }], + namespace: 'default', + origin: 'ui', + journey_id: '', + project_id: '', + playwright_options: '', + __ui: { + script_source: { is_generated_script: false, file_name: '' }, + is_zip_url_tls_enabled: false, + }, + params: '', + 'url.port': null, + 'source.inline.script': + "step('Go to https://www.google.com', async () => {\n await page.goto('https://www.google.com');\n expect(await page.isVisible('text=Data')).toBeTruthy();\n });", + 'source.project.content': '', + 'source.zip_url.url': '', + 'source.zip_url.username': '', + 'source.zip_url.password': '', + 'source.zip_url.folder': '', + 'source.zip_url.proxy_url': '', + playwright_text_assertion: 'Data', + urls: 'https://www.google.com', + screenshots: 'on', + synthetics_args: [], + 'filter_journeys.match': '', + 'filter_journeys.tags': [], + ignore_https_errors: false, + 'throttling.is_enabled': true, + 'throttling.download_speed': '5', + 'throttling.upload_speed': '3', + 'throttling.latency': '20', + 'throttling.config': '5d/3u/20l', + 'ssl.certificate_authorities': '', + 'ssl.certificate': '', + 'ssl.key': '', + 'ssl.key_passphrase': '', + 'ssl.verification_mode': 'full', + 'ssl.supported_protocols': ['TLSv1.1', 'TLSv1.2', 'TLSv1.3'], +}; diff --git a/x-pack/plugins/synthetics/public/apps/locators/edit_monitor.ts b/x-pack/plugins/synthetics/public/apps/locators/edit_monitor.ts index 199ed93c4c393..81139421817e9 100644 --- a/x-pack/plugins/synthetics/public/apps/locators/edit_monitor.ts +++ b/x-pack/plugins/synthetics/public/apps/locators/edit_monitor.ts @@ -9,7 +9,7 @@ import { syntheticsEditMonitorLocatorID } from '@kbn/observability-plugin/common async function navigate({ monitorId }: { monitorId: string }) { return { - app: 'uptime', + app: 'synthetics', path: `/edit-monitor/${monitorId}`, state: {}, }; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/links/add_monitor.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/links/add_monitor.tsx new file mode 100644 index 0000000000000..41cf49f5703f4 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/links/add_monitor.tsx @@ -0,0 +1,25 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiButtonEmpty } from '@elastic/eui'; +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { useSyntheticsSettingsContext } from '../../../contexts'; + +export const AddMonitorLink = () => { + const { basePath } = useSyntheticsSettingsContext(); + + return ( + + {CREATE_NEW_MONITOR} + + ); +}; + +const CREATE_NEW_MONITOR = i18n.translate('xpack.synthetics.monitorSummary.createNewMonitor', { + defaultMessage: 'Create monitor', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/use_simple_monitor.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/use_simple_monitor.ts index d8d645451c18a..ec4c4e6507358 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/use_simple_monitor.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/use_simple_monitor.ts @@ -62,7 +62,7 @@ export const useSimpleMonitor = ({ monitorData }: { monitorData?: SimpleFormData title: MONITOR_SUCCESS_LABEL, toastLifeTimeMs: 3000, }); - application?.navigateToApp('uptime', { path: `/monitor/${btoa(newMonitor.id)}` }); + application?.navigateToApp('synthetics', { path: `` }); } }, [application, data, loading, serviceLocations]); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_monitor_latest_ping.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_monitor_latest_ping.tsx new file mode 100644 index 0000000000000..2017109855bfb --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_monitor_latest_ping.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 { useEffect } from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { getMonitorRecentPingsAction, selectLatestPing, selectPingsLoading } from '../../../state'; +import { useSelectedLocation } from './use_selected_location'; +import { useSelectedMonitor } from './use_selected_monitor'; + +interface UseMonitorLatestPingParams { + monitorId?: string; + locationLabel?: string; +} + +export const useMonitorLatestPing = (params?: UseMonitorLatestPingParams) => { + const dispatch = useDispatch(); + + const { monitor } = useSelectedMonitor(); + const location = useSelectedLocation(); + + const monitorId = params?.monitorId ?? monitor?.id; + const locationLabel = params?.locationLabel ?? location?.label; + + const latestPing = useSelector(selectLatestPing); + const pingsLoading = useSelector(selectPingsLoading); + + const isUpToDate = + latestPing && + latestPing.monitor.id === monitorId && + latestPing.observer?.geo?.name === locationLabel; + + useEffect(() => { + if (monitorId && locationLabel && !isUpToDate) { + dispatch(getMonitorRecentPingsAction.get({ monitorId, locationId: locationLabel })); + } + }, [dispatch, monitorId, locationLabel, isUpToDate]); + + if (!monitorId || !locationLabel) { + return { loading: pingsLoading, latestPing: null }; + } + + if (!latestPing) { + return { loading: pingsLoading, latestPing: null }; + } + + if (latestPing.monitor.id !== monitorId || latestPing.observer?.geo?.name !== locationLabel) { + return { loading: pingsLoading, latestPing: null }; + } + + return { loading: pingsLoading, latestPing }; +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/last_run_info.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/last_run_info.tsx deleted file mode 100644 index d69cde15f734d..0000000000000 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/last_run_info.tsx +++ /dev/null @@ -1,85 +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 { EuiBadge, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; -import moment from 'moment'; -import { i18n } from '@kbn/i18n'; -import { useTheme } from '@kbn/observability-plugin/public'; -import { Ping } from '../../../../../common/runtime_types'; -import { useSelectedLocation } from './hooks/use_selected_location'; - -export const MonitorSummaryLastRunInfo = ({ ping }: { ping: Ping }) => { - const selectedLocation = useSelectedLocation(); - const isBrowserType = ping.monitor.type === 'browser'; - const theme = useTheme(); - - return ( - - - {ping.monitor.status === 'up' ? ( - - {isBrowserType ? SUCCESS_LABEL : UP_LABEL} - - ) : ping.monitor.status === 'down' ? ( - - {isBrowserType ? FAILED_LABEL : DOWN_LABEL} - - ) : ( - {PENDING_LABEL} - )} - - - - {i18n.translate('xpack.synthetics.monitorSummary.lastRunLocation', { - defaultMessage: 'in {loc}.', - values: { - // empty value will be replaced with value from location select - loc: selectedLocation?.label ?? '--', - }, - })} - - - - - {ping.timestamp - ? i18n.translate('xpack.synthetics.monitorSummary.lastRunTime', { - defaultMessage: 'Last run on {time}', - values: { - time: moment(ping.timestamp).format('LLL'), - }, - }) - : WAITING} - - - - ); -}; - -const FAILED_LABEL = i18n.translate('xpack.synthetics.monitorSummary.failed', { - defaultMessage: 'Failed', -}); - -const PENDING_LABEL = i18n.translate('xpack.synthetics.monitorSummary.pending', { - defaultMessage: 'Pending', -}); - -const SUCCESS_LABEL = i18n.translate('xpack.synthetics.monitorSummary.succeeded', { - defaultMessage: 'Succeeded', -}); - -const UP_LABEL = i18n.translate('xpack.synthetics.monitorSummary.up', { - defaultMessage: 'Up', -}); - -const DOWN_LABEL = i18n.translate('xpack.synthetics.monitorSummary.down', { - defaultMessage: 'Down', -}); - -const WAITING = i18n.translate('xpack.synthetics.monitorSummary.waiting', { - defaultMessage: 'Waiting for test run result.', -}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_last_run.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_last_run.tsx new file mode 100644 index 0000000000000..891421e1158d3 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_last_run.tsx @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import moment from 'moment'; +import { EuiDescriptionList, EuiLoadingSpinner } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +import { useSelectedMonitor } from './hooks/use_selected_monitor'; +import { useMonitorLatestPing } from './hooks/use_monitor_latest_ping'; + +export const MonitorDetailsLastRun: React.FC = () => { + const { monitor } = useSelectedMonitor(); + const { latestPing, loading: pingsLoading } = useMonitorLatestPing(); + + if (!monitor) { + return null; + } + + const description = pingsLoading ? ( + + ) : latestPing ? ( + moment(latestPing.timestamp).fromNow() + ) : ( + '--' + ); + + return ; +}; + +const LAST_RUN_LABEL = i18n.translate('xpack.synthetics.monitorLastRun.lastRunLabel', { + defaultMessage: 'Last run', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_location.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_location.tsx new file mode 100644 index 0000000000000..2966aee8e53b7 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_location.tsx @@ -0,0 +1,131 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { + EuiContextMenuItem, + EuiContextMenuPanel, + EuiDescriptionList, + EuiHealth, + EuiIcon, + EuiLink, + EuiPopover, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { useTheme } from '@kbn/observability-plugin/public'; +import React, { useMemo, useState, useCallback } from 'react'; + +import { PLUGIN } from '../../../../../common/constants/plugin'; +import { useLocations } from '../../hooks'; +import { useStatusByLocation } from '../../hooks'; +import { useSelectedLocation } from './hooks/use_selected_location'; +import { useSelectedMonitor } from './hooks/use_selected_monitor'; + +export const MonitorDetailsLocation: React.FC = () => { + const { monitor } = useSelectedMonitor(); + const { services } = useKibana(); + const { locations } = useLocations(); + const theme = useTheme(); + + const { locations: locationsStatus, loading: loadingLocationsStatus } = useStatusByLocation(); + const selectedLocation = useSelectedLocation(); + + const [isLocationListOpen, setIsLocationListOpen] = useState(false); + const openLocationList = useCallback(() => setIsLocationListOpen(true), []); + const closeLocationList = useCallback(() => setIsLocationListOpen(false), []); + + const locationList = useMemo(() => { + if (!selectedLocation || !monitor) { + return ''; + } + + if (monitor?.locations && monitor.locations.length > 1) { + const button = ( + + {selectedLocation.label} + + ); + + const menuItems = loadingLocationsStatus + ? [Loading...] + : monitor.locations + .map((location) => { + const fullLocation = locations.find((l) => l.id === location.id); + if (!fullLocation) { + return; + } + + const locationStatus = locationsStatus.find( + (ls) => ls.observer?.geo?.name === fullLocation.label + ); + + const locationHealthColor = + typeof locationStatus === 'undefined' + ? 'subdued' + : (locationStatus?.summary?.down ?? 0) > 0 + ? theme.eui.euiColorVis9 // down + : theme.eui.euiColorVis0; // up + + return ( + } + onClick={() => { + closeLocationList(); + services.application!.navigateToApp(PLUGIN.SYNTHETICS_PLUGIN_ID, { + path: `/monitor/${monitor.id}?locationId=${fullLocation.id}`, + }); + }} + > + {fullLocation.label} + + ); + }) + .filter((l): l is JSX.Element => typeof l !== undefined); + + return ( + + + + ); + } else { + return selectedLocation.label; + } + }, [ + closeLocationList, + isLocationListOpen, + loadingLocationsStatus, + locations, + locationsStatus, + monitor, + openLocationList, + selectedLocation, + services.application, + theme, + ]); + + if (!selectedLocation || !monitor) { + return null; + } + + return ; +}; + +const LOCATION_LABEL = i18n.translate('xpack.synthetics.monitorLocation.locationLabel', { + defaultMessage: 'Location', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page.tsx index ee9ba46c561bb..58b5f724d53b9 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page.tsx @@ -12,6 +12,7 @@ import { useSelectedMonitor } from './hooks/use_selected_monitor'; import { useSelectedLocation } from './hooks/use_selected_location'; import { getMonitorAction, getMonitorRecentPingsAction } from '../../state/monitor_details'; import { useMonitorListBreadcrumbs } from '../monitors_page/hooks/use_breadcrumbs'; +import { MonitorDetailsTabs } from './monitor_detials_tabs'; export const MonitorDetailsPage = () => { const { monitor } = useSelectedMonitor(); @@ -26,9 +27,9 @@ export const MonitorDetailsPage = () => { dispatch(getMonitorAction.get({ monitorId })); if (selectedLocation) { - dispatch(getMonitorRecentPingsAction.get({ monitorId, locationId: selectedLocation.id })); + dispatch(getMonitorRecentPingsAction.get({ monitorId, locationId: selectedLocation.label })); } }, [dispatch, monitorId, selectedLocation]); - return <>; + return ; }; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page_title.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page_title.tsx index 954ecc77c26c0..abe1a496df1a6 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page_title.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page_title.tsx @@ -5,51 +5,19 @@ * 2.0. */ -import React, { useEffect } from 'react'; -import { useDispatch, useSelector } from 'react-redux'; -import { useParams } from 'react-router-dom'; -import { EuiFlexGroup, EuiFlexItem, EuiLoadingContent, EuiText } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; +import React from 'react'; +import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { MonitorSelector } from './monitor_selector/monitor_selector'; import { useSelectedMonitor } from './hooks/use_selected_monitor'; -import { useSelectedLocation } from './hooks/use_selected_location'; -import { getMonitorRecentPingsAction, selectLatestPing, selectPingsLoading } from '../../state'; -import { MonitorSummaryLastRunInfo } from './last_run_info'; export const MonitorDetailsPageTitle = () => { - const dispatch = useDispatch(); - - const latestPing = useSelector(selectLatestPing); - const pingsLoading = useSelector(selectPingsLoading); - - const { monitorId } = useParams<{ monitorId: string }>(); const { monitor } = useSelectedMonitor(); - const location = useSelectedLocation(); - - useEffect(() => { - const locationId = location?.label; - if (monitorId && locationId) { - dispatch(getMonitorRecentPingsAction.get({ monitorId, locationId })); - } - }, [dispatch, monitorId, location]); return ( - - {monitor?.name} - - {pingsLoading || (latestPing && latestPing.monitor.id !== monitorId) ? ( - - ) : latestPing ? ( - - ) : ( - - {i18n.translate('xpack.synthetics.monitorSummary.noLastRunInformationAvailable', { - defaultMessage: 'No last run information available for {location} yet.', - values: { - location: location?.label, - }, - })} - - )} + + {monitor?.name} + + ); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_status.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_status.tsx new file mode 100644 index 0000000000000..ac2ae19700e41 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_status.tsx @@ -0,0 +1,62 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import { EuiBadge, EuiDescriptionList, EuiLoadingSpinner } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { useTheme } from '@kbn/observability-plugin/public'; + +import { useSelectedMonitor } from './hooks/use_selected_monitor'; +import { useMonitorLatestPing } from './hooks/use_monitor_latest_ping'; + +export const MonitorDetailsStatus: React.FC = () => { + const theme = useTheme(); + const { latestPing, loading: pingsLoading } = useMonitorLatestPing(); + + const { monitor } = useSelectedMonitor(); + + if (!monitor) { + return null; + } + + const isBrowserType = monitor.type === 'browser'; + + const badge = pingsLoading ? ( + + ) : !latestPing ? ( + {PENDING_LABEL} + ) : latestPing.monitor.status === 'up' ? ( + {isBrowserType ? SUCCESS_LABEL : UP_LABEL} + ) : ( + {isBrowserType ? FAILED_LABEL : DOWN_LABEL} + ); + + return ; +}; + +const STATUS_LABEL = i18n.translate('xpack.synthetics.monitorStatus.statusLabel', { + defaultMessage: 'Status', +}); + +const FAILED_LABEL = i18n.translate('xpack.synthetics.monitorStatus.failedLabel', { + defaultMessage: 'Failed', +}); + +const PENDING_LABEL = i18n.translate('xpack.synthetics.monitorStatus.pendingLabel', { + defaultMessage: 'Pending', +}); + +const SUCCESS_LABEL = i18n.translate('xpack.synthetics.monitorStatus.succeededLabel', { + defaultMessage: 'Succeeded', +}); + +const UP_LABEL = i18n.translate('xpack.synthetics.monitorStatus.upLabel', { + defaultMessage: 'Up', +}); + +const DOWN_LABEL = i18n.translate('xpack.synthetics.monitorStatus.downLabel', { + defaultMessage: 'Down', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/monitor_selector.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/monitor_selector.tsx new file mode 100644 index 0000000000000..3fb4ff71aaf74 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/monitor_selector.tsx @@ -0,0 +1,160 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor 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, { Fragment, useEffect, useState } from 'react'; +import { + EuiPopover, + EuiPopoverTitle, + EuiSelectable, + EuiButtonIcon, + EuiSelectableOption, + EuiHighlight, + EuiLink, + EuiText, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { useHistory } from 'react-router-dom'; +import { AddMonitorLink } from '../../common/links/add_monitor'; +import { useRecentlyViewedMonitors } from './use_recently_viewed_monitors'; +import { useSyntheticsSettingsContext } from '../../../contexts'; +import { useMonitorName } from './use_monitor_name'; +import { useSelectedLocation } from '../hooks/use_selected_location'; + +export const MonitorSelector = () => { + const history = useHistory(); + + const [options, setOptions] = useState([]); + const [searchValue, setSearchValue] = useState(''); + const [isPopoverOpen, setIsPopoverOpen] = useState(false); + + const selectedLocation = useSelectedLocation(); + + const { basePath } = useSyntheticsSettingsContext(); + + const { values, loading } = useMonitorName({ search: searchValue }); + + const recentlyViewed = useRecentlyViewedMonitors(); + + useEffect(() => { + const newOptions: EuiSelectableOption[] = []; + if (recentlyViewed.length > 0 && !searchValue) { + const otherMonitors = values.filter((value) => + recentlyViewed.every((recent) => recent.key !== value.key) + ); + + if (otherMonitors.length > 0) { + newOptions.push({ key: 'monitors', label: OTHER_MONITORS, isGroupLabel: true }); + } + + setOptions([...recentlyViewed, ...newOptions, ...otherMonitors]); + } else { + setOptions(values); + } + }, [recentlyViewed, searchValue, values]); + + const onButtonClick = () => { + setIsPopoverOpen(!isPopoverOpen); + }; + + const closePopover = () => { + setIsPopoverOpen(false); + }; + + const button = ( + + ); + + return ( + + + {GO_TO_MONITOR} + setSearchValue(val), + autoFocus: true, + }} + options={options} + onChange={(selectedOptions) => { + setOptions(selectedOptions); + const option = selectedOptions.find((opt) => opt.checked === 'on'); + if (option) { + history.push(`/monitor/${option.key}?locationId=${selectedLocation?.id}`); + } + closePopover(); + }} + singleSelection={true} + listProps={{ + showIcons: false, + }} + renderOption={(option, search) => ( + + {option.label} + + )} + noMatchesMessage={NO_RESULT_FOUND} + emptyMessage={} + loadingMessage={LOADING_MONITORS} + > + {(list, search) => ( +
+ + {options.length > 0 || searchValue ? ( + search + ) : ( + + {NO_OTHER_MONITORS_EXISTS} + + )} + + {list} +
+ )} +
+
+
+ ); +}; + +const GO_TO_MONITOR = i18n.translate('xpack.synthetics.monitorSummary.goToMonitor', { + defaultMessage: 'Go to monitor', +}); + +const NO_RESULT_FOUND = i18n.translate('xpack.synthetics.monitorSummary.noResultsFound', { + defaultMessage: 'No monitors found. Try modifying your query.', +}); + +const PLACEHOLDER = i18n.translate('xpack.synthetics.monitorSummary.placeholderSearch', { + defaultMessage: 'Monitor name or tag', +}); + +const SELECT_MONITOR = i18n.translate('xpack.synthetics.monitorSummary.selectMonitor', { + defaultMessage: 'Select a different monitor to view its details', +}); + +const OTHER_MONITORS = i18n.translate('xpack.synthetics.monitorSummary.otherMonitors', { + defaultMessage: 'Other monitors', +}); + +const LOADING_MONITORS = i18n.translate('xpack.synthetics.monitorSummary.loadingMonitors', { + defaultMessage: 'Loading monitors', +}); + +const NO_OTHER_MONITORS_EXISTS = i18n.translate('xpack.synthetics.monitorSummary.noOtherMonitors', { + defaultMessage: 'No other monitors exist.', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_monitor_name.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_monitor_name.ts new file mode 100644 index 0000000000000..cb097b0f99342 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_monitor_name.ts @@ -0,0 +1,35 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useMemo } from 'react'; +import { useFetcher } from '@kbn/observability-plugin/public'; +import { useParams } from 'react-router-dom'; +import { fetchMonitorManagementList } from '../../../state'; + +export const useMonitorName = ({ search = '' }: { search?: string }) => { + const { data, loading } = useFetcher(() => { + return fetchMonitorManagementList({ + pageSize: 100, + pageIndex: 0, + sortField: 'name.keyword', + sortOrder: 'asc', + query: search, + }); + }, [search]); + + const { monitorId } = useParams<{ monitorId: string }>(); + + return useMemo(() => { + const { monitors = [] } = data ?? {}; + const values = monitors.map((monitor) => ({ + label: monitor.attributes.name as string, + key: monitor.id, + })); + + return { values: values.filter((val) => val.key !== monitorId), loading }; + }, [data, loading, monitorId]); +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.test.tsx new file mode 100644 index 0000000000000..8c5922f4acc7a --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.test.tsx @@ -0,0 +1,83 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import { renderHook } from '@testing-library/react-hooks'; +import { useRecentlyViewedMonitors } from './use_recently_viewed_monitors'; +import { mockCore, WrappedHelper } from '../../../utils/testing'; +import { syntheticsMonitorType } from '../../../../../../common/types/saved_objects'; +import { MONITOR_ROUTE } from '../../../../../../common/constants'; + +const resultData = { + resolved_objects: [ + { + saved_object: { + id: 'c9322230-2a11-11ed-962b-d3e7eeedf9d1', + + attributes: { + name: 'Test Monitor', + }, + }, + }, + ], +}; + +describe('useRecentlyViewedMonitors', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('returns expected result', () => { + const WrapperWithState = ({ children }: { children: React.ReactElement }) => { + return ( + + {children} + + ); + }; + + const { result } = renderHook(() => useRecentlyViewedMonitors(), { wrapper: WrapperWithState }); + expect(result.current).toEqual([]); + }); + + it('returns the result when found', async () => { + const core = mockCore(); + + core.savedObjects!.client.bulkResolve = jest.fn().mockResolvedValue(resultData); + + const WrapperWithState = ({ children }: { children: React.ReactElement }) => { + return ( + + {children} + + ); + }; + + const { result, waitForNextUpdate } = renderHook(() => useRecentlyViewedMonitors(), { + wrapper: WrapperWithState, + }); + expect(result.current).toEqual([]); + + expect(core.savedObjects?.client.bulkResolve).toHaveBeenCalledTimes(1); + expect(core.savedObjects?.client.bulkResolve).toHaveBeenLastCalledWith([ + { id: '1', type: syntheticsMonitorType }, + ]); + + await waitForNextUpdate(); + + expect(result.current).toEqual([ + { + isGroupLabel: true, + key: 'recently_viewed', + label: 'Recently viewed', + }, + { + key: 'c9322230-2a11-11ed-962b-d3e7eeedf9d1', + label: 'Test Monitor', + }, + ]); + }); +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts new file mode 100644 index 0000000000000..64f7a60c28c7a --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts @@ -0,0 +1,80 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor 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 useLocalStorage from 'react-use/lib/useLocalStorage'; +import { i18n } from '@kbn/i18n'; +import { useParams } from 'react-router-dom'; +import { useEffect, useMemo } from 'react'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { useFetcher } from '@kbn/observability-plugin/public'; +import { MonitorFields } from '../../../../../../common/runtime_types'; +import { syntheticsMonitorType } from '../../../../../../common/types/saved_objects'; + +export const useRecentlyViewedMonitors = () => { + const [recentlyViewed, setRecentlyViewed] = useLocalStorage( + 'xpack.synthetics.recentlyViewedMonitors', + [] + ); + const { monitorId } = useParams<{ monitorId: string }>(); + + const { savedObjects } = useKibana().services; + + useEffect(() => { + const newRecentlyViewed = [ + ...new Set([...(monitorId ? [monitorId] : []), ...(recentlyViewed ?? [])]), + ].slice(0, 5); + + if ( + newRecentlyViewed?.[0] !== recentlyViewed?.[0] || + newRecentlyViewed.length !== recentlyViewed?.length + ) { + setRecentlyViewed(newRecentlyViewed); + } + }, [monitorId, recentlyViewed, setRecentlyViewed]); + + const { data } = useFetcher(async () => { + const monitorsList = recentlyViewed ?? []; + + const { resolved_objects: monitorObjects } = await savedObjects!.client.bulkResolve( + monitorsList.map((monId) => ({ + type: syntheticsMonitorType, + id: monId, + })) + ); + + const missingMonitors = monitorObjects + .filter((mon) => mon.saved_object.error?.statusCode === 404) + .map((mon) => mon.saved_object.id); + + if (missingMonitors.length > 0) { + setRecentlyViewed(monitorsList.filter((monId) => !missingMonitors.includes(monId))); + } + + return monitorObjects + .filter( + ({ saved_object: monitor }) => Boolean(monitor.attributes) && monitor.id !== monitorId + ) + .map(({ saved_object: monitor }) => ({ + key: monitor.id, + label: (monitor.attributes as MonitorFields).name, + })); + }, [monitorId, recentlyViewed]); + + return useMemo(() => { + if ((data ?? []).length === 0) { + return []; + } + return [ + { key: 'recently_viewed', label: RECENTLY_VIEWED, isGroupLabel: true }, + ...(data ?? []), + ]; + }, [data]); +}; + +const RECENTLY_VIEWED = i18n.translate('xpack.synthetics.monitorSummary.recentlyViewed', { + defaultMessage: 'Recently viewed', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_errors_count.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_errors_count.tsx new file mode 100644 index 0000000000000..9c5bf090607c9 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_errors_count.tsx @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import React from 'react'; +import { ReportTypes } from '@kbn/observability-plugin/public'; +import { useParams } from 'react-router-dom'; +import { ClientPluginsStart } from '../../../../../plugin'; + +export const MonitorErrorsCount = () => { + const { observability } = useKibana().services; + + const { ExploratoryViewEmbeddable } = observability; + + const { monitorId } = useParams<{ monitorId: string }>(); + + return ( + + ); +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_summary.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_summary.tsx index 0349b3e96cea1..efba55158c5b8 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_summary.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/monitor_summary.tsx @@ -25,6 +25,7 @@ import { MonitorDetailsPanel } from './monitor_details_panel'; import { AvailabilitySparklines } from './availability_sparklines'; import { LastTestRun } from './last_test_run'; import { LastTenTestRuns } from './last_ten_test_runs'; +import { MonitorErrorsCount } from './monitor_errors_count'; export const MonitorSummary = () => { const { euiTheme } = useEuiTheme(); @@ -56,7 +57,10 @@ export const MonitorSummary = () => {
{/* TODO: Add duration metric sparkline*/} - {/* TODO: Add error metric and sparkline*/} + + + + {/* TODO: Add error sparkline*/}
diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/run_test_manually.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/run_test_manually.tsx index 7ff4754fc9001..475436d6577db 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/run_test_manually.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/run_test_manually.tsx @@ -11,7 +11,7 @@ import { i18n } from '@kbn/i18n'; export const RunTestManually = () => { return ( - + {RUN_TEST_LABEL} ); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx index 3c1081f9f1f04..6d6cdd18e8953 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx @@ -7,17 +7,17 @@ import { EuiThemeComputed } from '@elastic/eui/src/services/theme/types'; import React, { FC, useEffect } from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiLink, useEuiTheme } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLink, useEuiTheme } from '@elastic/eui'; import { Route, Switch, useHistory } from 'react-router-dom'; import { OutPortal } from 'react-reverse-portal'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { APP_WRAPPER_CLASS } from '@kbn/core/public'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; import { useInspectorContext } from '@kbn/observability-plugin/public'; import type { LazyObservabilityPageTemplateProps } from '@kbn/observability-plugin/public'; import { MonitorAddPage } from './components/monitor_add_edit/monitor_add_page'; import { MonitorEditPage } from './components/monitor_add_edit/monitor_edit_page'; -import { MonitorDetailsPageHeader } from './components/monitor_details/monitor_details_page_header'; import { MonitorDetailsPageTitle } from './components/monitor_details/monitor_details_page_title'; import { MonitorDetailsPage } from './components/monitor_details/monitor_details_page'; import { GettingStartedPage } from './components/getting_started/getting_started_page'; @@ -38,8 +38,13 @@ import { GETTING_STARTED_ROUTE, MONITOR_ROUTE, } from '../../../common/constants'; +import { PLUGIN } from '../../../common/constants/plugin'; import { MonitorPage } from './components/monitors_page/monitor_page'; import { apiService } from '../../utils/api_service'; +import { RunTestManually } from './components/monitor_details/run_test_manually'; +import { MonitorDetailsStatus } from './components/monitor_details/monitor_details_status'; +import { MonitorDetailsLocation } from './components/monitor_details/monitor_details_location'; +import { MonitorDetailsLastRun } from './components/monitor_details/monitor_details_last_run'; type RouteProps = LazyObservabilityPageTemplateProps & { path: string; @@ -61,7 +66,8 @@ export const MONITOR_MANAGEMENT_LABEL = i18n.translate( const getRoutes = ( euiTheme: EuiThemeComputed, - history: ReturnType + history: ReturnType, + syntheticsPath: string ): RouteProps[] => { return [ { @@ -86,9 +92,29 @@ const getRoutes = ( component: () => , dataTestSubj: 'syntheticsMonitorDetailsPage', pageHeader: { - children: , pageTitle: , - // rightSideItems: [], + breadcrumbs: [ + { + text: ( + <> + {' '} + + + ), + color: 'primary', + 'aria-current': false, + href: `${syntheticsPath}${MONITORS_ROUTE}`, + }, + ], + rightSideItems: [ + , + , + , + , + ], }, }, { @@ -254,10 +280,15 @@ const RouteInit: React.FC> = ({ path, title } }; export const PageRouter: FC = () => { + const { services } = useKibana(); const { addInspectorRequest } = useInspectorContext(); const { euiTheme } = useEuiTheme(); const history = useHistory(); - const routes = getRoutes(euiTheme, history); + const routes = getRoutes( + euiTheme, + history, + services.application!.getUrlForApp(PLUGIN.SYNTHETICS_PLUGIN_ID) + ); apiService.addInspectorRequest = addInspectorRequest; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/rtl_helpers.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/rtl_helpers.tsx index 1e0a277d2c654..55ae549a032b3 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/rtl_helpers.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/rtl_helpers.tsx @@ -226,6 +226,10 @@ export function WrappedHelper({ }: RenderRouterOptions & { children: ReactElement; useRealStore?: boolean }) { const testState: AppState = merge({}, mockState, state); + if (url) { + history = getHistoryFromUrl(url); + } + return ( diff --git a/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.test.tsx b/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.test.tsx index 26300400dbcfd..905852b8f182d 100644 --- a/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.test.tsx +++ b/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.test.tsx @@ -9,7 +9,11 @@ import { EuiButtonEmpty } from '@elastic/eui'; import { act, fireEvent, render, screen } from '@testing-library/react'; import React from 'react'; -import AddToTimelineButton, { ADD_TO_TIMELINE_KEYBOARD_SHORTCUT } from './add_to_timeline'; +import AddToTimelineButton, { + ADD_TO_TIMELINE_KEYBOARD_SHORTCUT, + SuccessMessageProps, + AddSuccessMessage, +} from './add_to_timeline'; import { DataProvider, IS_OPERATOR } from '../../../../common/types'; import { useDeepEqualSelector } from '../../../hooks/use_selector'; import { TestProviders } from '../../../mock'; @@ -391,7 +395,11 @@ describe('add to timeline', () => { fireEvent.click(screen.getByRole('button')); - expect(mockAddSuccess).toBeCalledWith('Added a to timeline'); + const message: SuccessMessageProps = { + children: i18n.ADDED_TO_TIMELINE_OR_TEMPLATE_MESSAGE(providerA.name, true), + }; + const wrapper = render(); + expect(wrapper.container.textContent).toBe('Added a to timeline'); }); test('Add success is called with "template" if timeline type is template', () => { @@ -405,7 +413,11 @@ describe('add to timeline', () => { fireEvent.click(screen.getByRole('button')); - expect(mockAddSuccess).toBeCalledWith('Added a to template'); + const message: SuccessMessageProps = { + children: i18n.ADDED_TO_TIMELINE_OR_TEMPLATE_MESSAGE(providerA.name, false), + }; + const wrapper = render(); + expect(wrapper.container.textContent).toBe('Added a to template'); }); }); }); diff --git a/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx b/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx index 6cbfee6bec99f..f3a37563ebfe0 100644 --- a/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx +++ b/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx @@ -11,6 +11,7 @@ import { DraggableId } from 'react-beautiful-dnd'; import { useDispatch } from 'react-redux'; import { isEmpty } from 'lodash'; +import { toMountPoint } from '@kbn/kibana-react-plugin/public'; import { stopPropagationAndPreventDefault } from '../../../../common/utils/accessibility'; import { DataProvider, TimelineId } from '../../../../common/types'; import { useDeepEqualSelector } from '../../../hooks/use_selector'; @@ -46,6 +47,17 @@ const useGetHandleStartDragToTimeline = ({ return handleStartDragToTimeline; }; +export interface SuccessMessageProps { + children: React.ReactChild; +} +export const AddSuccessMessage = (props: SuccessMessageProps) => { + return ( + + {props.children} + + ); +}; + export interface AddToTimelineButtonProps extends HoverActionComponentProps { /** `Component` is only used with `EuiDataGrid`; the grid keeps a reference to `Component` for show / hide functionality */ Component?: typeof EuiButtonEmpty | typeof EuiButtonIcon | typeof EuiContextMenuItem; @@ -88,9 +100,16 @@ const AddToTimelineButton: React.FC = React.memo( dataProvider: provider, }) ); - addSuccess( - i18n.ADDED_TO_TIMELINE_OR_TEMPLATE_MESSAGE(provider.name, timelineType === 'default') - ); + addSuccess({ + title: toMountPoint( + + {i18n.ADDED_TO_TIMELINE_OR_TEMPLATE_MESSAGE( + provider.name, + timelineType === 'default' + )} + + ), + }); } }); } diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 976c14d76903b..b7cf2985d8a94 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -7500,7 +7500,6 @@ "xpack.apm.serviceDetails.metrics.errorsList.title": "Erreurs", "xpack.apm.serviceDetails.metrics.memoryUsageChartTitle": "Utilisation mémoire système", "xpack.apm.serviceDetails.metricsTabLabel": "Indicateurs", - "xpack.apm.serviceDetails.nodesTabLabel": "JVM", "xpack.apm.serviceDetails.overviewTabLabel": "Aperçu", "xpack.apm.serviceDetails.transactionsTabLabel": "Transactions", "xpack.apm.serviceGroup.allServices.title": "Tous les services", @@ -13443,12 +13442,6 @@ "xpack.fleet.externallyManagedLabel": "Ceci est une politique d'intégration gérée de manière externe.", "xpack.fleet.featureCatalogueDescription": "Ajouter et gérer des intégrations avec Elastic Agent", "xpack.fleet.featureCatalogueTitle": "Ajouter des intégrations Elastic Agent", - "xpack.fleet.featuredObsDesc": "Surveillez, détectez et diagnostiquez des problèmes complexes de performances des applications.", - "xpack.fleet.featuredObsTitle": "Elastic APM", - "xpack.fleet.featuredSearchDesc": "Ajoutez la recherche à votre site web avec le robot d'indexation Enterprise Search.", - "xpack.fleet.featuredSearchTitle": "Robot d'indexation", - "xpack.fleet.featuredSecurityDesc": "Protégez vos hôtes et vos charges de travail cloud grâce à la prévention des menaces, la détection et la visibilité des données en profondeur en toute sécurité.", - "xpack.fleet.featuredSecurityTitle": "Sécurité du cloud et des points de terminaison", "xpack.fleet.fleetServerCloudRequiredCallout.cloudDeploymentLink": "déploiement sur le cloud", "xpack.fleet.fleetServerCloudRequiredCallout.editDeploymentButtonLabel": "Modifier le déploiement", "xpack.fleet.fleetServerCloudRequiredCallout.guideLink": "Guide de Fleet et d’Elastic Agent", @@ -30626,8 +30619,6 @@ "xpack.synthetics.monitorRoute.title": "Moniteur | {baseTitle}", "xpack.synthetics.monitorStatusBar.locations.oneLocStatus": "{status} dans {loc} emplacement", "xpack.synthetics.monitorStatusBar.locations.upStatus": "{status} dans {loc} emplacements", - "xpack.synthetics.monitorSummary.lastRunLocation": "dans {loc}.", - "xpack.synthetics.monitorSummary.lastRunTime": "Dernière exécution à {time}", "xpack.synthetics.overview.alerts.enabled.success.description": "Un message sera envoyé à {actionConnectors} lorsque ce monitoring sera arrêté.", "xpack.synthetics.overview.durationMsFormatting": "{millis} ms", "xpack.synthetics.overview.durationSecondsFormatting": "{seconds} s", @@ -31367,16 +31358,10 @@ "xpack.synthetics.monitorStatusBar.timestampFromNowTextAriaLabel": "Temps depuis la dernière vérification", "xpack.synthetics.monitorStatusBar.type.ariaLabel": "Type de moniteur", "xpack.synthetics.monitorStatusBar.type.label": "Type", - "xpack.synthetics.monitorSummary.down": "Arrêté", "xpack.synthetics.monitorSummary.errors": "Erreurs", - "xpack.synthetics.monitorSummary.failed": "Échoué", "xpack.synthetics.monitorSummary.history": "Historique", - "xpack.synthetics.monitorSummary.pending": "En attente", "xpack.synthetics.monitorSummary.runTestManually": "Exécuter le test manuellement", - "xpack.synthetics.monitorSummary.succeeded": "Réussi", "xpack.synthetics.monitorSummary.summary": "Résumé", - "xpack.synthetics.monitorSummary.up": "Opérationnel", - "xpack.synthetics.monitorSummary.waiting": "En attente du résultat du test.", "xpack.synthetics.navigateToAlertingButton.content": "Gérer les règles", "xpack.synthetics.navigateToAlertingUi": "Quitter Uptime et accéder à la page de gestion Alerting", "xpack.synthetics.noDataConfig.beatsCard.description": "Monitorez de façon proactive la disponibilité de vos sites et services. Recevez des alertes et corrigez les problèmes plus rapidement pour optimiser l'expérience de vos utilisateurs.", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index e920046b1b016..e92746d023fdb 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -7487,7 +7487,6 @@ "xpack.apm.serviceDetails.metrics.errorsList.title": "エラー", "xpack.apm.serviceDetails.metrics.memoryUsageChartTitle": "システムメモリー使用状況", "xpack.apm.serviceDetails.metricsTabLabel": "メトリック", - "xpack.apm.serviceDetails.nodesTabLabel": "JVM", "xpack.apm.serviceDetails.overviewTabLabel": "概要", "xpack.apm.serviceDetails.transactionsTabLabel": "トランザクション", "xpack.apm.serviceGroup.allServices.title": "すべてのサービス", @@ -13429,12 +13428,6 @@ "xpack.fleet.externallyManagedLabel": "これは外部で管理されている統合ポリシーです。", "xpack.fleet.featureCatalogueDescription": "Elasticエージェントとの統合を追加して管理します", "xpack.fleet.featureCatalogueTitle": "Elasticエージェント統合を追加", - "xpack.fleet.featuredObsDesc": "複雑なアプリケーションパフォーマンスの問題を監視、検出、診断します。", - "xpack.fleet.featuredObsTitle": "Elastic APM", - "xpack.fleet.featuredSearchDesc": "エンタープライズ サーチWebクローラーを使用して、検索をWebサイトに追加します。", - "xpack.fleet.featuredSearchTitle": "Webクローラー", - "xpack.fleet.featuredSecurityDesc": "脅威防御、検出、深いセキュリティデータの可視化を実現し、ホストおよびクラウドワークロードを保護します。", - "xpack.fleet.featuredSecurityTitle": "エンドポイントとクラウドセキュリティ", "xpack.fleet.fleetServerCloudRequiredCallout.cloudDeploymentLink": "クラウド展開", "xpack.fleet.fleetServerCloudRequiredCallout.editDeploymentButtonLabel": "デプロイを編集", "xpack.fleet.fleetServerCloudRequiredCallout.guideLink": "FleetおよびElasticエージェントガイド", @@ -30602,8 +30595,6 @@ "xpack.synthetics.monitorRoute.title": "モニター | {baseTitle}", "xpack.synthetics.monitorStatusBar.locations.oneLocStatus": "{loc}場所での{status}", "xpack.synthetics.monitorStatusBar.locations.upStatus": "{loc}場所での{status}", - "xpack.synthetics.monitorSummary.lastRunLocation": "{loc}で。", - "xpack.synthetics.monitorSummary.lastRunTime": "前回実行日時:{time}", "xpack.synthetics.overview.alerts.enabled.success.description": "この監視が停止しているときには、メッセージが {actionConnectors} に送信されます。", "xpack.synthetics.overview.durationMsFormatting": "{millis}ミリ秒", "xpack.synthetics.overview.durationSecondsFormatting": "{seconds}秒", @@ -31343,16 +31334,10 @@ "xpack.synthetics.monitorStatusBar.timestampFromNowTextAriaLabel": "最終確認からの経過時間", "xpack.synthetics.monitorStatusBar.type.ariaLabel": "モニタータイプ", "xpack.synthetics.monitorStatusBar.type.label": "型", - "xpack.synthetics.monitorSummary.down": "ダウン", "xpack.synthetics.monitorSummary.errors": "エラー", - "xpack.synthetics.monitorSummary.failed": "失敗", "xpack.synthetics.monitorSummary.history": "履歴", - "xpack.synthetics.monitorSummary.pending": "保留中", "xpack.synthetics.monitorSummary.runTestManually": "手動でテストを実行", - "xpack.synthetics.monitorSummary.succeeded": "成功", "xpack.synthetics.monitorSummary.summary": "まとめ", - "xpack.synthetics.monitorSummary.up": "アップ", - "xpack.synthetics.monitorSummary.waiting": "テスト実行結果を待機しています。", "xpack.synthetics.navigateToAlertingButton.content": "ルールの管理", "xpack.synthetics.navigateToAlertingUi": "Uptime を離れてアラート管理ページに移動します", "xpack.synthetics.noDataConfig.beatsCard.description": "サイトとサービスの可用性をアクティブに監視するアラートを受信し、問題をより迅速に解決して、ユーザーエクスペリエンスを最適化します。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 76bca99b96d6a..f317146612142 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -7504,7 +7504,6 @@ "xpack.apm.serviceDetails.metrics.errorsList.title": "错误", "xpack.apm.serviceDetails.metrics.memoryUsageChartTitle": "系统内存使用", "xpack.apm.serviceDetails.metricsTabLabel": "指标", - "xpack.apm.serviceDetails.nodesTabLabel": "JVM", "xpack.apm.serviceDetails.overviewTabLabel": "概览", "xpack.apm.serviceDetails.transactionsTabLabel": "事务", "xpack.apm.serviceGroup.allServices.title": "所有服务", @@ -13449,12 +13448,6 @@ "xpack.fleet.externallyManagedLabel": "这是外部托管的集成策略。", "xpack.fleet.featureCatalogueDescription": "添加和管理 Elastic 代理集成", "xpack.fleet.featureCatalogueTitle": "添加 Elastic 代理集成", - "xpack.fleet.featuredObsDesc": "监测、检测并诊断复杂的应用程序性能问题。", - "xpack.fleet.featuredObsTitle": "Elastic APM", - "xpack.fleet.featuredSearchDesc": "通过 Enterprise Search 网络爬虫将搜索功能添加到您的网站。", - "xpack.fleet.featuredSearchTitle": "网络爬虫", - "xpack.fleet.featuredSecurityDesc": "使用威胁防御、检测和深度安全数据可见性功能保护您的主机和云工作负载。", - "xpack.fleet.featuredSecurityTitle": "终端和云安全", "xpack.fleet.fleetServerCloudRequiredCallout.cloudDeploymentLink": "云部署", "xpack.fleet.fleetServerCloudRequiredCallout.editDeploymentButtonLabel": "编辑部署", "xpack.fleet.fleetServerCloudRequiredCallout.guideLink": "Fleet 和 Elastic 代理指南", @@ -30637,8 +30630,6 @@ "xpack.synthetics.monitorRoute.title": "监测 | {baseTitle}", "xpack.synthetics.monitorStatusBar.locations.oneLocStatus": "在 {loc} 位置处于 {status}", "xpack.synthetics.monitorStatusBar.locations.upStatus": "在 {loc} 位置处于 {status}", - "xpack.synthetics.monitorSummary.lastRunLocation": "在 {loc} 中。", - "xpack.synthetics.monitorSummary.lastRunTime": "上次运行时间:{time}", "xpack.synthetics.overview.alerts.enabled.success.description": "此监测关闭时,将有消息发送到 {actionConnectors}。", "xpack.synthetics.overview.durationMsFormatting": "{millis} 毫秒", "xpack.synthetics.overview.durationSecondsFormatting": "{seconds} 秒", @@ -31378,16 +31369,10 @@ "xpack.synthetics.monitorStatusBar.timestampFromNowTextAriaLabel": "自上次检查以来经过的时间", "xpack.synthetics.monitorStatusBar.type.ariaLabel": "监测类型", "xpack.synthetics.monitorStatusBar.type.label": "类型", - "xpack.synthetics.monitorSummary.down": "关闭", "xpack.synthetics.monitorSummary.errors": "错误", - "xpack.synthetics.monitorSummary.failed": "失败", "xpack.synthetics.monitorSummary.history": "历史记录", - "xpack.synthetics.monitorSummary.pending": "待处理", "xpack.synthetics.monitorSummary.runTestManually": "手动运行测试", - "xpack.synthetics.monitorSummary.succeeded": "成功", "xpack.synthetics.monitorSummary.summary": "摘要", - "xpack.synthetics.monitorSummary.up": "运行", - "xpack.synthetics.monitorSummary.waiting": "等待测试运行结果。", "xpack.synthetics.navigateToAlertingButton.content": "管理规则", "xpack.synthetics.navigateToAlertingUi": "离开 Uptime 并前往“Alerting 管理”页面", "xpack.synthetics.noDataConfig.beatsCard.description": "主动监测站点和服务的可用性。接收告警并更快地解决问题,从而优化用户体验。", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.tsx index db82f36cbc90c..02c740d2b6cc8 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.tsx @@ -103,7 +103,12 @@ export function RuleComponent({ defaultMessage: 'Alerts', }), 'data-test-subj': 'ruleAlertListTab', - content: renderRuleAlertList(), + content: ( + <> + + {renderRuleAlertList()} + + ), }, { id: EVENT_LOG_LIST_TAB, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list.tsx index 90a721423e848..aec6566d58668 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list.tsx @@ -77,6 +77,7 @@ export const RuleEventLogList = ( requestRefresh={requestRefresh} fetchRuleSummary={fetchRuleSummary} /> + { /> ); - expect(wrapper.find('[data-test-subj="centerJustifiedSpinner"]').exists()).toBeTruthy(); + expect( + wrapper + .find('[data-test-subj="ruleEventLogKpi-successOutcome"] .euiStat__title') + .first() + .text() + ).toEqual('--'); + expect( + wrapper + .find('[data-test-subj="ruleEventLogKpi-unknownOutcome"] .euiStat__title') + .first() + .text() + ).toEqual('--'); + expect( + wrapper + .find('[data-test-subj="ruleEventLogKpi-failureOutcome"] .euiStat__title') + .first() + .text() + ).toEqual('--'); + expect( + wrapper.find('[data-test-subj="ruleEventLogKpi-activeAlerts"] .euiStat__title').first().text() + ).toEqual('--'); + expect( + wrapper.find('[data-test-subj="ruleEventLogKpi-newAlerts"] .euiStat__title').first().text() + ).toEqual('--'); + expect( + wrapper + .find('[data-test-subj="ruleEventLogKpi-recoveredAlerts"] .euiStat__title') + .first() + .text() + ).toEqual('--'); + expect( + wrapper + .find('[data-test-subj="ruleEventLogKpi-erroredActions"] .euiStat__title') + .first() + .text() + ).toEqual('--'); + expect( + wrapper + .find('[data-test-subj="ruleEventLogKpi-triggeredActions"] .euiStat__title') + .first() + .text() + ).toEqual('--'); // Let the load resolve await act(async () => { @@ -71,8 +112,6 @@ describe('rule_event_log_list_kpi', () => { wrapper.update(); }); - expect(wrapper.find('[data-test-subj="centerJustifiedSpinner"]').exists()).toBeFalsy(); - expect(loadExecutionKPIAggregationsMock).toHaveBeenCalledWith( expect.objectContaining({ id: '123', diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_kpi.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_kpi.tsx index 5658f99f21c34..970390359f0d7 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_kpi.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_kpi.tsx @@ -15,7 +15,6 @@ import { withBulkRuleOperations, } from '../../common/components/with_bulk_rule_api_operations'; import { useKibana } from '../../../../common/lib/kibana'; -import { CenterJustifiedSpinner } from '../../../components/center_justified_spinner'; import { RuleEventLogListStatus } from './rule_event_log_list_status'; const getParsedDate = (date: string) => { @@ -35,21 +34,21 @@ const API_FAILED_MESSAGE = i18n.translate( const RESPONSE_TOOLTIP = i18n.translate( 'xpack.triggersActionsUI.sections.ruleDetails.ruleEventLogListKpi.responseTooltip', { - defaultMessage: 'The responses for the latest rule runs.', + defaultMessage: 'The responses for up to 10,000 most recent rule runs.', } ); const ALERTS_TOOLTIP = i18n.translate( 'xpack.triggersActionsUI.sections.ruleDetails.ruleEventLogListKpi.alertsTooltip', { - defaultMessage: 'The alert statuses for the latest rule runs.', + defaultMessage: 'The alert statuses for up to 10,000 most recent rule runs.', } ); const ACTIONS_TOOLTIP = i18n.translate( 'xpack.triggersActionsUI.sections.ruleDetails.ruleEventLogListKpi.actionsTooltip', { - defaultMessage: 'The action statuses for the latest rule runs.', + defaultMessage: 'The action statuses for up to 10,000 most recent rule runs.', } ); @@ -147,9 +146,7 @@ export const RuleEventLogListKPI = (props: RuleEventLogListKPIProps) => { // eslint-disable-next-line react-hooks/exhaustive-deps }, [refreshToken]); - if (isLoading || !kpi) { - return ; - } + const isLoadingData = useMemo(() => isLoading || !kpi, [isLoading, kpi]); const getStatDescription = (element: React.ReactNode) => { return ( @@ -170,7 +167,8 @@ export const RuleEventLogListKPI = (props: RuleEventLogListKPIProps) => { data-test-subj="ruleEventLogKpi-successOutcome" description={getStatDescription()} titleSize="s" - title={kpi.success} + title={kpi?.success ?? 0} + isLoading={isLoadingData} /> @@ -178,7 +176,8 @@ export const RuleEventLogListKPI = (props: RuleEventLogListKPIProps) => { data-test-subj="ruleEventLogKpi-warningOutcome" description={getStatDescription()} titleSize="s" - title={kpi.warning} + title={kpi?.warning ?? 0} + isLoading={isLoadingData} /> @@ -186,7 +185,8 @@ export const RuleEventLogListKPI = (props: RuleEventLogListKPIProps) => { data-test-subj="ruleEventLogKpi-failureOutcome" description={getStatDescription()} titleSize="s" - title={kpi.failure} + title={kpi?.failure ?? 0} + isLoading={isLoadingData} /> @@ -200,7 +200,8 @@ export const RuleEventLogListKPI = (props: RuleEventLogListKPIProps) => { data-test-subj="ruleEventLogKpi-activeAlerts" description={getStatDescription('Active')} titleSize="s" - title={kpi.activeAlerts} + title={kpi?.activeAlerts ?? 0} + isLoading={isLoadingData} /> @@ -208,7 +209,8 @@ export const RuleEventLogListKPI = (props: RuleEventLogListKPIProps) => { data-test-subj="ruleEventLogKpi-newAlerts" description={getStatDescription('New')} titleSize="s" - title={kpi.newAlerts} + title={kpi?.newAlerts ?? 0} + isLoading={isLoadingData} /> @@ -216,7 +218,8 @@ export const RuleEventLogListKPI = (props: RuleEventLogListKPIProps) => { data-test-subj="ruleEventLogKpi-recoveredAlerts" description={getStatDescription('Recovered')} titleSize="s" - title={kpi.recoveredAlerts} + title={kpi?.recoveredAlerts ?? 0} + isLoading={isLoadingData} /> @@ -230,7 +233,8 @@ export const RuleEventLogListKPI = (props: RuleEventLogListKPIProps) => { data-test-subj="ruleEventLogKpi-erroredActions" description={getStatDescription('Errored')} titleSize="s" - title={kpi.erroredActions} + title={kpi?.erroredActions ?? 0} + isLoading={isLoadingData} /> @@ -238,7 +242,8 @@ export const RuleEventLogListKPI = (props: RuleEventLogListKPIProps) => { data-test-subj="ruleEventLogKpi-triggeredActions" description={getStatDescription('Triggered')} titleSize="s" - title={kpi.triggeredActions} + title={kpi?.triggeredActions ?? 0} + isLoading={isLoadingData} /> diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_table.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_table.tsx index 2c1d6df71fc3d..58cd6447ca737 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_table.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_table.tsx @@ -348,54 +348,60 @@ export const RuleEventLogListTable = ( }, [refreshToken]); return ( - <> - - - - - - - - - - - - - - - {renderList()} - {isOnLastPage && ( - + + + + + + + + + + + + + + + + - )} + + + + {renderList()} + {isOnLastPage && ( + + )} + {isFlyoutOpen && selectedRunLog && ( ( onClose={onFlyoutClose} /> )} - + ); }; diff --git a/x-pack/plugins/ux/public/components/app/rum_dashboard/charts/__snapshots__/visitor_breakdown_chart.test.tsx.snap b/x-pack/plugins/ux/public/components/app/rum_dashboard/charts/__snapshots__/visitor_breakdown_chart.test.tsx.snap index c3bc67a02749c..1e7d3ca13e43c 100644 --- a/x-pack/plugins/ux/public/components/app/rum_dashboard/charts/__snapshots__/visitor_breakdown_chart.test.tsx.snap +++ b/x-pack/plugins/ux/public/components/app/rum_dashboard/charts/__snapshots__/visitor_breakdown_chart.test.tsx.snap @@ -2,21 +2,15 @@ exports[`VisitorBreakdownChart getVisitorBreakdownLensAttributes generates expected lens attributes 1`] = ` Object { - "references": Array [ - Object { - "id": "Required", - "name": "indexpattern-datasource-current-indexpattern", - "type": "index-pattern", - }, - Object { - "id": "Required", - "name": "indexpattern-datasource-layer-layer1", - "type": "index-pattern", - }, - ], + "references": Array [], "state": Object { + "adHocDataViews": Object { + "xxxx-xxxxxxxxxxx-xxxx": Object { + "id": "xxxx-xxxxxxxxxxx-xxxx", + }, + }, "datasourceStates": Object { - "indexpattern": Object { + "formBased": Object { "layers": Object { "layer1": Object { "columnOrder": Array [ @@ -95,6 +89,18 @@ Object { }, }, ], + "internalReferences": Array [ + Object { + "id": "xxxx-xxxxxxxxxxx-xxxx", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern", + }, + Object { + "id": "xxxx-xxxxxxxxxxx-xxxx", + "name": "indexpattern-datasource-layer-layer1", + "type": "index-pattern", + }, + ], "query": Object { "language": "kuery", "query": "", diff --git a/x-pack/plugins/ux/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.test.tsx b/x-pack/plugins/ux/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.test.tsx index 536a5158cac9c..65f76b705ef54 100644 --- a/x-pack/plugins/ux/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.test.tsx +++ b/x-pack/plugins/ux/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.test.tsx @@ -13,8 +13,19 @@ import { VisitorBreakdownMetric, } from './visitor_breakdown_chart'; import { useKibanaServices } from '../../../../hooks/use_kibana_services'; +import type { DataView } from '@kbn/data-views-plugin/public'; jest.mock('../../../../hooks/use_kibana_services'); +jest.mock('uuid'); + +const mockDataView = { + id: 'mock-id', + title: 'mock-title', + timeFieldName: 'mock-time-field-name', + isPersisted: () => false, + getName: () => 'mock-data-view', + toSpec: () => ({}), +} as DataView; describe('VisitorBreakdownChart', () => { describe('getVisitorBreakdownLensAttributes', () => { @@ -25,7 +36,8 @@ describe('VisitorBreakdownChart', () => { environment: 'ENVIRONMENT_ALL', }, urlQuery: 'elastic.co', - dataView: 'Required', + dataView: mockDataView, + localDataViewId: 'xxxx-xxxxxxxxxxx-xxxx', }; expect(getVisitorBreakdownLensAttributes(props)).toMatchSnapshot(); @@ -33,6 +45,8 @@ describe('VisitorBreakdownChart', () => { }); describe('component', () => { + const mockUuid = jest.requireMock('uuid'); + mockUuid.v4 = jest.fn().mockReturnValue('xxxx-xxxxxxxxxxx-xxxx'); const mockEmbeddableComponent = jest.fn((_) => <>); beforeEach(() => { @@ -53,7 +67,8 @@ describe('VisitorBreakdownChart', () => { environment: 'ENVIRONMENT_ALL', }, urlQuery: 'elastic.co', - dataView: 'Required', + dataView: mockDataView, + localDataViewId: 'xxxx-xxxxxxxxxxx-xxxx', onFilter: (_m: VisitorBreakdownMetric, _e: any) => {}, }; diff --git a/x-pack/plugins/ux/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.tsx b/x-pack/plugins/ux/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.tsx index 89176ea2e21c0..e20e9b1f89f7e 100644 --- a/x-pack/plugins/ux/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.tsx +++ b/x-pack/plugins/ux/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { useCallback, useMemo } from 'react'; +import React, { useCallback, useMemo, useState } from 'react'; import { ViewMode } from '@kbn/embeddable-plugin/public'; import { CountIndexPatternColumn, @@ -16,6 +16,8 @@ import { } from '@kbn/lens-plugin/public'; import { EuiText } from '@elastic/eui'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; +import { DataView } from '@kbn/data-views-plugin/public'; +import uuid from 'uuid'; import { TRANSACTION_PAGE_LOAD } from '../../../../../common/transaction_types'; import { PROCESSOR_EVENT, @@ -36,7 +38,7 @@ interface LensAttributes { metric: VisitorBreakdownMetric; uiFilters: UxUIFilters; urlQuery?: string; - dataView: string; + dataView: DataView; } type Props = { @@ -56,6 +58,7 @@ export function VisitorBreakdownChart({ }: Props) { const kibana = useKibanaServices(); const LensEmbeddableComponent = kibana.lens.EmbeddableComponent; + const [localDataViewId] = useState(uuid.v4()); const lensAttributes = useMemo( () => @@ -64,8 +67,9 @@ export function VisitorBreakdownChart({ urlQuery, metric, dataView, + localDataViewId, }), - [uiFilters, urlQuery, metric, dataView] + [uiFilters, urlQuery, metric, dataView, localDataViewId] ); const filterHandler = useCallback( @@ -118,7 +122,13 @@ export function getVisitorBreakdownLensAttributes({ urlQuery, metric, dataView, -}: LensAttributes): TypedLensByValueInput['attributes'] { + localDataViewId, +}: LensAttributes & { + localDataViewId: string; +}): TypedLensByValueInput['attributes'] { + const localDataView = dataView.toSpec(false); + localDataView.id = localDataViewId; + const dataLayer: PersistedIndexPatternLayer = { incompleteColumns: {}, columnOrder: ['col1', 'col2'], @@ -160,21 +170,25 @@ export function getVisitorBreakdownLensAttributes({ return { visualizationType: 'lnsPie', title: `ux-visitor-breakdown-${metric}`, - references: [ - { - id: dataView, - name: 'indexpattern-datasource-current-indexpattern', - type: 'index-pattern', - }, - { - id: dataView, - name: 'indexpattern-datasource-layer-layer1', - type: 'index-pattern', - }, - ], + references: [], state: { + internalReferences: [ + { + id: localDataView.id, + name: 'indexpattern-datasource-current-indexpattern', + type: 'index-pattern', + }, + { + id: localDataView.id, + name: 'indexpattern-datasource-layer-layer1', + type: 'index-pattern', + }, + ], + adHocDataViews: { + [localDataView.id]: localDataView, + }, datasourceStates: { - indexpattern: { + formBased: { layers: { layer1: dataLayer, }, diff --git a/x-pack/plugins/ux/public/components/app/rum_dashboard/csm_shared_context/index.tsx b/x-pack/plugins/ux/public/components/app/rum_dashboard/csm_shared_context/index.tsx index e3a888effd319..9c63c77735341 100644 --- a/x-pack/plugins/ux/public/components/app/rum_dashboard/csm_shared_context/index.tsx +++ b/x-pack/plugins/ux/public/components/app/rum_dashboard/csm_shared_context/index.tsx @@ -57,6 +57,7 @@ export function CsmSharedContextProvider({ if (dataViewTitle) { return dataViews.create({ title: dataViewTitle, + timeFieldName: '@timestamp', }); } }, [dataViewTitle, dataViews]); diff --git a/x-pack/plugins/ux/public/components/app/rum_dashboard/hooks/use_local_uifilters.ts b/x-pack/plugins/ux/public/components/app/rum_dashboard/hooks/use_local_uifilters.ts index e208e8536b718..6ae8b593296ee 100644 --- a/x-pack/plugins/ux/public/components/app/rum_dashboard/hooks/use_local_uifilters.ts +++ b/x-pack/plugins/ux/public/components/app/rum_dashboard/hooks/use_local_uifilters.ts @@ -8,6 +8,7 @@ import { omit } from 'lodash'; import { useHistory } from 'react-router-dom'; import { fromQuery, toQuery } from '@kbn/observability-plugin/public'; +import { useCallback, useMemo } from 'react'; import { useLegacyUrlParams } from '../../../../context/url_params_context/use_url_params'; import { getExcludedName } from '../local_uifilters'; @@ -28,55 +29,57 @@ export function useLocalUIFilters({ const history = useHistory(); const { uxUiFilters } = useLegacyUrlParams(); - const setFilterValue = (name: UxLocalUIFilterName, value: string[]) => { - const search = omit(toQuery(history.location.search), name); + const setFilterValue = useCallback( + (name: UxLocalUIFilterName, value: string[]) => { + const search = omit(toQuery(history.location.search), name); - history.push({ - ...history.location, - search: fromQuery( - removeUndefinedProps({ - ...search, - [name]: value.length ? value.join(',') : undefined, - }) - ), - }); - }; + history.push({ + ...history.location, + search: fromQuery( + removeUndefinedProps({ + ...search, + [name]: value.length ? value.join(',') : undefined, + }) + ), + }); + }, + [history] + ); - const invertFilter = ( - name: UxLocalUIFilterName, - value: string, - negate: boolean - ) => { - if (!negate) { - setFilterValue( - name, - (uxUiFilters?.[name] as string[]).filter((valT) => valT !== value) - ); + const invertFilter = useCallback( + (name: UxLocalUIFilterName, value: string, negate: boolean) => { + if (!negate) { + setFilterValue( + name, + (uxUiFilters?.[name] as string[]).filter((valT) => valT !== value) + ); - const excludedName = getExcludedName(name); - setFilterValue(excludedName, [ - ...(uxUiFilters?.[excludedName] ?? []), - value, - ]); - } else { - const includeName = name.split('Excluded')[0] as UxLocalUIFilterName; - const excludedName = name; + const excludedName = getExcludedName(name); + setFilterValue(excludedName, [ + ...(uxUiFilters?.[excludedName] ?? []), + value, + ]); + } else { + const includeName = name.split('Excluded')[0] as UxLocalUIFilterName; + const excludedName = name; - setFilterValue( - excludedName, - (uxUiFilters?.[excludedName] as string[]).filter( - (valT) => valT !== value - ) - ); + setFilterValue( + excludedName, + (uxUiFilters?.[excludedName] as string[]).filter( + (valT) => valT !== value + ) + ); - setFilterValue(includeName, [ - ...(uxUiFilters?.[includeName] ?? []), - value, - ]); - } - }; + setFilterValue(includeName, [ + ...(uxUiFilters?.[includeName] ?? []), + value, + ]); + } + }, + [setFilterValue, uxUiFilters] + ); - const clearValues = () => { + const clearValues = useCallback(() => { const search = omit(toQuery(history.location.search), [ ...filterNames, 'searchTerm', @@ -87,13 +90,17 @@ export function useLocalUIFilters({ ...history.location, search: fromQuery(search), }); - }; + }, [filterNames, history]); - const filters: UxLocalUIFilter[] = filterNames.map((name) => ({ - value: (uxUiFilters[name] as string[]) ?? [], - ...uxFiltersByName[name], - name, - })); + const filters: UxLocalUIFilter[] = useMemo( + () => + filterNames.map((name) => ({ + value: (uxUiFilters[name] as string[]) ?? [], + ...uxFiltersByName[name], + name, + })), + [filterNames, uxUiFilters] + ); return { filters, diff --git a/x-pack/plugins/ux/public/components/app/rum_dashboard/visitor_breakdown/index.tsx b/x-pack/plugins/ux/public/components/app/rum_dashboard/visitor_breakdown/index.tsx index 699c4aad80724..9d631524308a2 100644 --- a/x-pack/plugins/ux/public/components/app/rum_dashboard/visitor_breakdown/index.tsx +++ b/x-pack/plugins/ux/public/components/app/rum_dashboard/visitor_breakdown/index.tsx @@ -19,9 +19,9 @@ import { } from '../charts/visitor_breakdown_chart'; import { I18LABELS, VisitorBreakdownLabel } from '../translations'; import { useLegacyUrlParams } from '../../../../context/url_params_context/use_url_params'; -import { useStaticDataView } from '../../../../hooks/use_static_data_view'; import { useLocalUIFilters } from '../hooks/use_local_uifilters'; import { getExcludedName } from '../local_uifilters'; +import { useDataView } from '../local_uifilters/use_data_view'; type VisitorBreakdownFieldMap = Record< VisitorBreakdownMetric, @@ -40,20 +40,21 @@ const EuiLoadingEmbeddable = styled(EuiFlexGroup)` } `; +const vistorBreakdownFilter = { + filterNames: uxLocalUIFilterNames.filter((name) => + ['browser', 'browserExcluded', 'os', 'osExcluded'].includes(name) + ), +}; + const getInvertedFilterName = (filter: UxLocalUIFilterName, negate: boolean) => negate ? filter : getExcludedName(filter); export function VisitorBreakdown() { const { urlParams, uxUiFilters } = useLegacyUrlParams(); const { start, end, searchTerm } = urlParams; - // static dataView is required for lens - const { dataView, loading } = useStaticDataView(); + const { dataView } = useDataView(); - const { filters, setFilterValue } = useLocalUIFilters({ - filterNames: uxLocalUIFilterNames.filter((name) => - ['browser', 'browserExcluded', 'os', 'osExcluded'].includes(name) - ), - }); + const { filters, setFilterValue } = useLocalUIFilters(vistorBreakdownFilter); const onFilter = useCallback( (metric: VisitorBreakdownMetric, event: any) => { @@ -96,7 +97,7 @@ export function VisitorBreakdown() {

{I18LABELS.browser}

- {!!loading ? ( + {!dataView?.id ? ( ) : ( {I18LABELS.operatingSystem} - {!!loading ? ( + {!dataView?.id ? ( ) : ( { + if (request.method !== 'POST') { + return {}; + } + + const buffers = []; + + for await (const chunk of request) { + buffers.push(chunk); + } + + return JSON.parse(Buffer.concat(buffers).toString()); +}; diff --git a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/opsgenie_simulation.ts b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/opsgenie_simulation.ts new file mode 100644 index 0000000000000..abc73b48a7e72 --- /dev/null +++ b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/opsgenie_simulation.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 http from 'http'; + +import { ProxyArgs, Simulator } from './simulator'; + +export class OpsgenieSimulator extends Simulator { + private readonly returnError: boolean; + + constructor({ returnError = false, proxy }: { returnError?: boolean; proxy?: ProxyArgs }) { + super(proxy); + + this.returnError = returnError; + } + + public async handler( + request: http.IncomingMessage, + response: http.ServerResponse, + data: Record + ) { + if (this.returnError) { + return OpsgenieSimulator.sendErrorResponse(response); + } + + return OpsgenieSimulator.sendResponse(response); + } + + private static sendResponse(response: http.ServerResponse) { + response.statusCode = 202; + response.setHeader('Content-Type', 'application/json'); + response.end(JSON.stringify(opsgenieSuccessResponse, null, 4)); + } + + private static sendErrorResponse(response: http.ServerResponse) { + response.statusCode = 422; + response.setHeader('Content-Type', 'application/json;charset=UTF-8'); + response.end(JSON.stringify(opsgenieFailedResponse, null, 4)); + } +} + +export const opsgenieSuccessResponse = { + result: 'Request will be processed', + took: 0.107, + requestId: '43a29c5c-3dbf-4fa4-9c26-f4f71023e120', +}; + +export const opsgenieFailedResponse = { + result: 'error', + errors: { + message: 'failed', + }, + took: 0.107, + requestId: '43a29c5c-3dbf-4fa4-9c26-f4f71023e120', +}; diff --git a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/plugin.ts b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/plugin.ts index 52f4b035341b0..ae874d942e75b 100644 --- a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/plugin.ts +++ b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/plugin.ts @@ -26,6 +26,7 @@ import { initPlugin as initXmatters } from './xmatters_simulation'; export const NAME = 'actions-FTS-external-service-simulators'; export enum ExternalServiceSimulator { + OPSGENIE = 'opsgenie', PAGERDUTY = 'pagerduty', SWIMLANE = 'swimlane', SERVICENOW = 'servicenow', diff --git a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/servicenow_simulation.ts b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/servicenow_simulation.ts index 007c03193d5a0..4d4b0ce43df24 100644 --- a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/servicenow_simulation.ts +++ b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/servicenow_simulation.ts @@ -6,6 +6,7 @@ */ import http from 'http'; +import { getDataFromPostRequest } from './data_handler'; /** * This server records the data from a create incident request. It only saves the most recent request. When building tests, @@ -28,7 +29,7 @@ export class RecordingServiceNowSimulator { } private handler = async (request: http.IncomingMessage, response: http.ServerResponse) => { - const data = await getData(request); + const data = await getDataFromPostRequest(request); const pathName = request.url!; if (isCreateRequest(pathName)) { @@ -62,7 +63,7 @@ const sendResponse = (response: http.ServerResponse, data: any) => { }; const requestHandler = async (request: http.IncomingMessage, response: http.ServerResponse) => { - const data: Record = await getData(request); + const data: Record = await getDataFromPostRequest(request); return handleSendingResponse(request, response, data); }; @@ -230,19 +231,3 @@ const handleSendingResponse = async ( response.setHeader('Content-Type', 'application/json'); response.end('Not supported endpoint to request servicenow simulator'); }; - -const getData = async (request: http.IncomingMessage) => { - let data: Record = {}; - - if (request.method === 'POST') { - const buffers = []; - - for await (const chunk of request) { - buffers.push(chunk); - } - - data = JSON.parse(Buffer.concat(buffers).toString()); - } - - return data; -}; diff --git a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/simulator.ts b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/simulator.ts new file mode 100644 index 0000000000000..2a6bda8c35bd1 --- /dev/null +++ b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/simulator.ts @@ -0,0 +1,92 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor 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 getPort from 'get-port'; +import http from 'http'; +import httpProxy from 'http-proxy'; +import { getProxyPort } from '../../../../lib/get_proxy_server'; +import { getDataFromPostRequest } from './data_handler'; + +export interface ProxyArgs { + config: string; + proxyHandler?: (proxyRes?: unknown, req?: unknown, res?: unknown) => void; +} + +export abstract class Simulator { + private _requestData: Record | undefined; + private _requestUrl: string | undefined; + private proxyServer: httpProxy | undefined; + private readonly proxyArgs: ProxyArgs | undefined; + protected server: http.Server; + + constructor(proxy?: ProxyArgs) { + this.server = http.createServer(this.baseHandler); + + if (proxy) { + this.proxyArgs = proxy; + } + } + + private createAndStartHttpProxyServer = (targetUrl: string) => { + if (!this.proxyArgs) { + return; + } + + this.proxyServer = httpProxy.createProxyServer({ + target: targetUrl, + secure: false, + selfHandleResponse: false, + }); + + this.proxyServer.on('proxyRes', (proxyRes: unknown, req: unknown, res: unknown) => { + if (this.proxyArgs?.proxyHandler) { + this.proxyArgs.proxyHandler(proxyRes, req, res); + } + }); + + const proxyPort = getProxyPort(this.proxyArgs.config); + this.proxyServer.listen(proxyPort); + }; + + private baseHandler = async (request: http.IncomingMessage, response: http.ServerResponse) => { + const data = await getDataFromPostRequest(request); + this._requestData = data; + this._requestUrl = new URL(request.url ?? '', `http://${request.headers.host}`).toString(); + + return this.handler(request, response, data); + }; + + protected abstract handler( + request: http.IncomingMessage, + response: http.ServerResponse, + data: Record + ): Promise; + + public async start() { + const port = await getPort({ port: getPort.makeRange(9000, 9100) }); + if (!this.server.listening) { + this.server.listen(port); + } + const url = `http://localhost:${port}`; + + this.createAndStartHttpProxyServer(url); + return url; + } + + public close() { + this.proxyServer?.close(); + this.server.close(); + } + + public get requestData() { + return this._requestData; + } + + public get requestUrl() { + return this._requestUrl; + } +} diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/stack/opsgenie.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/stack/opsgenie.ts new file mode 100644 index 0000000000000..e1011059b8532 --- /dev/null +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/stack/opsgenie.ts @@ -0,0 +1,747 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor 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 { + OpsgenieSimulator, + opsgenieSuccessResponse, +} from '../../../../../../common/fixtures/plugins/actions_simulators/server/opsgenie_simulation'; + +// eslint-disable-next-line import/no-default-export +export default function opsgenieTest({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + const configService = getService('config'); + + describe('Opsgenie', () => { + describe('action creation', () => { + const simulator = new OpsgenieSimulator({ + returnError: false, + proxy: { + config: configService.get('kbnTestServer.serverArgs'), + }, + }); + let simulatorUrl: string; + + before(async () => { + simulatorUrl = await simulator.start(); + }); + + after(() => { + simulator.close(); + }); + + it('should return 200 when creating the connector', async () => { + const { body: createdAction } = await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name: 'An opsgenie action', + connector_type_id: '.opsgenie', + config: { + apiUrl: simulatorUrl, + }, + secrets: { + apiKey: '123', + }, + }) + .expect(200); + + expect(createdAction).to.eql({ + id: createdAction.id, + is_preconfigured: false, + is_deprecated: false, + name: 'An opsgenie action', + connector_type_id: '.opsgenie', + is_missing_secrets: false, + config: { + apiUrl: simulatorUrl, + }, + }); + }); + + it('should return 400 Bad Request when creating the connector without the apiUrl', async () => { + await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name: 'An opsgenie action', + connector_type_id: '.opsgenie', + config: {}, + secrets: { + apiKey: '123', + }, + }) + .expect(400) + .then((resp: any) => { + expect(resp.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: + 'error validating action type config: [apiUrl]: expected value of type [string] but got [undefined]', + }); + }); + }); + + it('should return 400 Bad Request when creating the connector with a apiUrl that is not allowed', async () => { + await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name: 'An opsgenie action', + connector_type_id: '.opsgenie', + config: { + apiUrl: 'http://opsgenie.mynonexistent.com', + }, + secrets: { + apiKey: '123', + }, + }) + .expect(400) + .then((resp: any) => { + expect(resp.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: + 'error validating action type config: error validating url: target url "http://opsgenie.mynonexistent.com" is not added to the Kibana config xpack.actions.allowedHosts', + }); + }); + }); + + it('should return 400 Bad Request when creating the connector without secrets', async () => { + await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name: 'An opsgenie action', + connector_type_id: '.opsgenie', + config: { + apiUrl: simulatorUrl, + }, + }) + .expect(400) + .then((resp: any) => { + expect(resp.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: + 'error validating action type secrets: [apiKey]: expected value of type [string] but got [undefined]', + }); + }); + }); + }); + + describe('executor', () => { + describe('validation', () => { + const simulator = new OpsgenieSimulator({ + proxy: { + config: configService.get('kbnTestServer.serverArgs'), + }, + }); + let simulatorUrl: string; + let opsgenieActionId: string; + + before(async () => { + simulatorUrl = await simulator.start(); + opsgenieActionId = await createConnector(simulatorUrl); + }); + + after(() => { + simulator.close(); + }); + + it('should fail when the params is empty', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: {}, + }); + expect(200); + + expect(Object.keys(body)).to.eql(['status', 'message', 'retry', 'connector_id']); + expect(body.connector_id).to.eql(opsgenieActionId); + expect(body.status).to.eql('error'); + }); + + it('should fail when the subAction is invalid', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { subAction: 'invalidAction' }, + }) + .expect(200); + + expect(body).to.eql({ + connector_id: opsgenieActionId, + status: 'error', + retry: false, + message: 'an error occurred while running the action', + service_message: `Sub action "invalidAction" is not registered. Connector id: ${opsgenieActionId}. Connector name: Opsgenie. Connector type: .opsgenie`, + }); + }); + + it("should fail to create an alert when the message parameter isn't included", async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { subAction: 'createAlert', subActionParams: {} }, + }) + .expect(200); + + expect(body).to.eql({ + connector_id: opsgenieActionId, + status: 'error', + retry: false, + message: 'an error occurred while running the action', + service_message: + 'Request validation failed (Error: [message]: expected value of type [string] but got [undefined])', + }); + }); + + it("should fail to close an alert when the alias parameter isn't included", async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { subAction: 'closeAlert', subActionParams: {} }, + }) + .expect(200); + + expect(body).to.eql({ + connector_id: opsgenieActionId, + status: 'error', + retry: false, + message: 'an error occurred while running the action', + service_message: + 'Request validation failed (Error: [alias]: expected value of type [string] but got [undefined])', + }); + }); + + describe('optional parameters', async () => { + describe('responders', () => { + it('should fail to create an alert when the responders is an invalid type', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + subAction: 'createAlert', + subActionParams: { + message: 'hello', + responders: [ + { + name: 'sam', + type: 'invalidType', + }, + ], + }, + }, + }) + .expect(200); + + expect(body).to.eql({ + connector_id: opsgenieActionId, + status: 'error', + retry: false, + message: 'an error occurred while running the action', + service_message: + 'Request validation failed (Error: [responders.0]: types that failed validation:\n- [responders.0.0.type]: types that failed validation:\n - [responders.0.type.0]: expected value to equal [team]\n - [responders.0.type.1]: expected value to equal [user]\n - [responders.0.type.2]: expected value to equal [escalation]\n - [responders.0.type.3]: expected value to equal [schedule]\n- [responders.0.1.id]: expected value of type [string] but got [undefined])', + }); + }); + + it('should fail to create an alert when the responders is missing the id', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + subAction: 'createAlert', + subActionParams: { + message: 'hello', + responders: [ + { + type: 'schedule', + }, + ], + }, + }, + }) + .expect(200); + + expect(body).to.eql({ + connector_id: opsgenieActionId, + status: 'error', + retry: false, + message: 'an error occurred while running the action', + service_message: + 'Request validation failed (Error: [responders.0]: types that failed validation:\n- [responders.0.0.name]: expected value of type [string] but got [undefined]\n- [responders.0.1.id]: expected value of type [string] but got [undefined])', + }); + }); + + it('should succeed to create an alert when the responders has a valid team and id', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + subAction: 'createAlert', + subActionParams: { + message: 'hello', + responders: [ + { + id: '123', + type: 'team', + }, + { + id: '456', + type: 'team', + }, + ], + }, + }, + }) + .expect(200); + + expect(body).to.eql({ + connector_id: opsgenieActionId, + status: 'ok', + data: { + requestId: '43a29c5c-3dbf-4fa4-9c26-f4f71023e120', + result: 'Request will be processed', + took: 0.107, + }, + }); + }); + + it('should succeed to create an alert when the responders has a valid escalation and name', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + subAction: 'createAlert', + subActionParams: { + message: 'hello', + responders: [ + { + name: 'sam', + type: 'escalation', + }, + { + name: 'bob', + type: 'escalation', + }, + ], + }, + }, + }) + .expect(200); + + expect(body).to.eql({ + connector_id: opsgenieActionId, + status: 'ok', + data: { + requestId: '43a29c5c-3dbf-4fa4-9c26-f4f71023e120', + result: 'Request will be processed', + took: 0.107, + }, + }); + }); + }); + + describe('visibleTo', () => { + it('should fail to create an alert when the visibleTo uses the name field with type user', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + subAction: 'createAlert', + subActionParams: { + message: 'hello', + visibleTo: [ + { + name: 'sam', + type: 'user', + }, + ], + }, + }, + }) + .expect(200); + + expect(body).to.eql({ + connector_id: opsgenieActionId, + status: 'error', + retry: false, + message: 'an error occurred while running the action', + service_message: + 'Request validation failed (Error: [visibleTo.0]: types that failed validation:\n- [visibleTo.0.0.type]: expected value to equal [team]\n- [visibleTo.0.1.id]: expected value of type [string] but got [undefined]\n- [visibleTo.0.2.id]: expected value of type [string] but got [undefined]\n- [visibleTo.0.3.username]: expected value of type [string] but got [undefined])', + }); + }); + + it('should succeed to create an alert when the visibleTo is set to a user', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + subAction: 'createAlert', + subActionParams: { + message: 'hello', + visibleTo: [ + { + username: 'sam', + type: 'user', + }, + { + username: 'bob', + type: 'user', + }, + ], + }, + }, + }) + .expect(200); + + expect(body).to.eql({ + connector_id: opsgenieActionId, + status: 'ok', + data: { + requestId: '43a29c5c-3dbf-4fa4-9c26-f4f71023e120', + result: 'Request will be processed', + took: 0.107, + }, + }); + }); + }); + + describe('details', () => { + it('should fail to create an alert when the details field is a record of string to number', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + subAction: 'createAlert', + subActionParams: { + message: 'hello', + details: { + bananas: 1, + }, + }, + }, + }) + .expect(200); + + expect(body).to.eql({ + connector_id: opsgenieActionId, + status: 'error', + retry: false, + message: 'an error occurred while running the action', + service_message: + 'Request validation failed (Error: [details.bananas]: expected value of type [string] but got [number])', + }); + }); + + it('should succeed to create an alert when the details field a record of string to string', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + subAction: 'createAlert', + subActionParams: { + message: 'hello', + details: { + bananas: 'hello', + }, + }, + }, + }) + .expect(200); + + expect(body).to.eql({ + connector_id: opsgenieActionId, + status: 'ok', + data: { + requestId: '43a29c5c-3dbf-4fa4-9c26-f4f71023e120', + result: 'Request will be processed', + took: 0.107, + }, + }); + }); + }); + }); + }); + + describe('execution', () => { + describe('successful response simulator', () => { + const simulator = new OpsgenieSimulator({ + proxy: { + config: configService.get('kbnTestServer.serverArgs'), + }, + }); + let simulatorUrl: string; + let opsgenieActionId: string; + let createAlertUrl: string; + + before(async () => { + simulatorUrl = await simulator.start(); + createAlertUrl = createUrlString(simulatorUrl, 'v2/alerts'); + opsgenieActionId = await createConnector(simulatorUrl); + }); + + after(() => { + simulator.close(); + }); + + it('should create an alert', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { subAction: 'createAlert', subActionParams: { message: 'message' } }, + }) + .expect(200); + + expect(simulator.requestData).to.eql({ message: 'message' }); + expect(simulator.requestUrl).to.eql(createAlertUrl); + expect(body).to.eql({ + status: 'ok', + connector_id: opsgenieActionId, + data: opsgenieSuccessResponse, + }); + }); + + it('should preserve the alias when it is 512 characters when creating an alert', async () => { + const alias = 'a'.repeat(512); + + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + subAction: 'createAlert', + subActionParams: { message: 'message', alias }, + }, + }) + .expect(200); + + expect(simulator.requestData).to.eql({ message: 'message', alias }); + expect(simulator.requestUrl).to.eql(createAlertUrl); + expect(body).to.eql({ + status: 'ok', + connector_id: opsgenieActionId, + data: opsgenieSuccessResponse, + }); + }); + + it('should sha256 hash the alias when it is over 512 characters when creating an alert', async () => { + const alias = 'a'.repeat(513); + + // sha256 hash for 513 a characters + const hashedAlias = + 'sha-02425c0f5b0dabf3d2b9115f3f7723a02ad8bcfb1534a0d231614fd42b8188f6'; + + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + subAction: 'createAlert', + subActionParams: { message: 'message', alias }, + }, + }) + .expect(200); + + expect(simulator.requestData).to.eql({ message: 'message', alias: hashedAlias }); + expect(simulator.requestUrl).to.eql(createAlertUrl); + expect(body).to.eql({ + status: 'ok', + connector_id: opsgenieActionId, + data: opsgenieSuccessResponse, + }); + }); + + it('should sha256 hash the alias when it is over 512 characters when closing an alert', async () => { + const alias = 'a'.repeat(513); + + // sha256 hash for 513 a characters + const hashedAlias = + 'sha-02425c0f5b0dabf3d2b9115f3f7723a02ad8bcfb1534a0d231614fd42b8188f6'; + + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + subAction: 'closeAlert', + subActionParams: { alias }, + }, + }) + .expect(200); + + expect(simulator.requestData).to.eql({}); + expect(simulator.requestUrl).to.eql( + createCloseAlertUrl(simulatorUrl, `v2/alerts/${hashedAlias}/close`) + ); + expect(body).to.eql({ + status: 'ok', + connector_id: opsgenieActionId, + data: opsgenieSuccessResponse, + }); + }); + + it('should close an alert', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { subAction: 'closeAlert', subActionParams: { alias: '123' } }, + }) + .expect(200); + + expect(simulator.requestData).to.eql({}); + expect(simulator.requestUrl).to.eql( + createCloseAlertUrl(simulatorUrl, 'v2/alerts/123/close') + ); + expect(body).to.eql({ + status: 'ok', + connector_id: opsgenieActionId, + data: opsgenieSuccessResponse, + }); + }); + + it('should close an alert with an alias that is 512 characters', async () => { + const alias = 'a'.repeat(512); + + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { subAction: 'closeAlert', subActionParams: { alias } }, + }) + .expect(200); + + expect(simulator.requestData).to.eql({}); + expect(simulator.requestUrl).to.eql( + createCloseAlertUrl(simulatorUrl, `v2/alerts/${alias}/close`) + ); + expect(body).to.eql({ + status: 'ok', + connector_id: opsgenieActionId, + data: opsgenieSuccessResponse, + }); + }); + }); + + describe('error response simulator', () => { + const simulator = new OpsgenieSimulator({ + returnError: true, + proxy: { + config: configService.get('kbnTestServer.serverArgs'), + }, + }); + + let simulatorUrl: string; + let opsgenieActionId: string; + + before(async () => { + simulatorUrl = await simulator.start(); + opsgenieActionId = await createConnector(simulatorUrl); + }); + + after(() => { + simulator.close(); + }); + + it('should return a failure when attempting to create an alert', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + subAction: 'createAlert', + subActionParams: { message: 'message', note: 'a note' }, + }, + }) + .expect(200); + + expect(simulator.requestData).to.eql({ message: 'message', note: 'a note' }); + expect(body).to.eql({ + status: 'error', + message: 'an error occurred while running the action', + retry: false, + connector_id: opsgenieActionId, + service_message: 'Status code: undefined. Message: Message: failed', + }); + }); + + it('should return a failure when attempting to close an alert', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${opsgenieActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + subAction: 'closeAlert', + subActionParams: { note: 'a note', alias: '123' }, + }, + }) + .expect(200); + + expect(simulator.requestData).to.eql({ note: 'a note' }); + expect(body).to.eql({ + status: 'error', + message: 'an error occurred while running the action', + retry: false, + connector_id: opsgenieActionId, + service_message: 'Status code: undefined. Message: Message: failed', + }); + }); + }); + }); + + const createConnector = async (url: string) => { + const { body } = await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name: 'An Opsgenie simulator', + connector_type_id: '.opsgenie', + config: { + apiUrl: url, + }, + secrets: { + apiKey: '123', + }, + }) + .expect(200); + + return body.id; + }; + }); + }); +} + +const createCloseAlertUrl = (baseUrl: string, path: string) => { + return createUrlString(baseUrl, path, { identifierType: 'alias' }); +}; + +const createUrlString = (baseUrl: string, path: string, queryParams?: Record) => { + const fullURL = new URL(path, baseUrl); + + for (const [key, value] of Object.entries(queryParams ?? {})) { + fullURL.searchParams.set(key, value); + } + + return fullURL.toString(); +}; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/index.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/index.ts index 5207b0c711411..34fd7d16b26ff 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/index.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/index.ts @@ -29,6 +29,7 @@ export default function connectorsTests({ loadTestFile, getService }: FtrProvide loadTestFile(require.resolve('./connector_types/stack/email')); loadTestFile(require.resolve('./connector_types/stack/es_index')); loadTestFile(require.resolve('./connector_types/stack/es_index_preconfigured')); + loadTestFile(require.resolve('./connector_types/stack/opsgenie')); loadTestFile(require.resolve('./connector_types/stack/pagerduty')); loadTestFile(require.resolve('./connector_types/stack/server_log')); loadTestFile(require.resolve('./connector_types/stack/slack')); diff --git a/x-pack/test/api_integration/apis/logs_ui/log_threshold_alert.ts b/x-pack/test/api_integration/apis/logs_ui/log_threshold_alert.ts index 43699de65e524..2ada34d4dcd5f 100644 --- a/x-pack/test/api_integration/apis/logs_ui/log_threshold_alert.ts +++ b/x-pack/test/api_integration/apis/logs_ui/log_threshold_alert.ts @@ -10,6 +10,8 @@ import sinon from 'sinon'; import { executeAlert, executeRatioAlert, + LogThresholdAlertFactory, + LogThresholdAlertLimit, } from '@kbn/infra-plugin/server/lib/alerting/log_threshold/log_threshold_executor'; import { Comparator, @@ -28,9 +30,13 @@ export default function ({ getService }: FtrProviderContext) { after(() => esArchiver.unload('x-pack/test/functional/es_archives/infra/alerts_test_data')); describe('without group by', () => { - it('should work', async () => { + it('should trigger alerts below the alert limit', async () => { const timestamp = new Date(DATES['alert-test-data'].gauge.max); - const alertFactory = sinon.fake(); + const alertFactory = sinon.fake() as SinonSpyOf; + const alertLimit = { + getValue: sinon.fake.returns(10), + setLimitReached: sinon.fake(), + } as SinonSpiesOf; const ruleParams = { count: { comparator: Comparator.GT_OR_EQ, @@ -46,6 +52,7 @@ export default function ({ getService }: FtrProviderContext) { }, ], }; + await executeAlert( ruleParams, '@timestamp', @@ -53,8 +60,10 @@ export default function ({ getService }: FtrProviderContext) { {}, esClient, alertFactory, + alertLimit, timestamp.valueOf() ); + expect(alertFactory.callCount).to.equal(1); expect(alertFactory.getCall(0).args).to.eql([ '*', @@ -74,13 +83,18 @@ export default function ({ getService }: FtrProviderContext) { }, ], ]); + expect(alertLimit.setLimitReached.calledOnceWith(false)).to.be(true); }); }); describe('with group by', () => { - it('should work', async () => { + it('should trigger alerts up to the alert limit', async () => { const timestamp = new Date(DATES['alert-test-data'].gauge.max); - const alertFactory = sinon.fake(); + const alertFactory = sinon.fake() as SinonSpyOf; + const alertLimit = { + getValue: sinon.fake.returns(2), + setLimitReached: sinon.fake(), + } as SinonSpiesOf; const ruleParams = { count: { comparator: Comparator.GT_OR_EQ, @@ -97,6 +111,7 @@ export default function ({ getService }: FtrProviderContext) { }, ], }; + await executeAlert( ruleParams, '@timestamp', @@ -104,8 +119,10 @@ export default function ({ getService }: FtrProviderContext) { {}, esClient, alertFactory, + alertLimit, timestamp.valueOf() ); + expect(alertFactory.callCount).to.equal(2); expect(alertFactory.getCall(0).args).to.eql([ 'dev', @@ -125,6 +142,64 @@ export default function ({ getService }: FtrProviderContext) { }, ], ]); + expect(alertLimit.setLimitReached.calledOnceWith(true)).to.be(true); + }); + + it('should limit alerts to the alert limit', async () => { + const timestamp = new Date(DATES['alert-test-data'].gauge.max); + const alertFactory = sinon.fake() as SinonSpyOf; + const alertLimit = { + getValue: sinon.fake.returns(1), + setLimitReached: sinon.fake(), + } as SinonSpiesOf; + const ruleParams = { + count: { + comparator: Comparator.GT_OR_EQ, + value: 1, + }, + timeUnit: 'm' as TimeUnit, + timeSize: 5, + groupBy: ['env'], + criteria: [ + { + field: 'env', + comparator: Comparator.NOT_EQ, + value: 'test', + }, + ], + }; + + await executeAlert( + ruleParams, + '@timestamp', + 'alerts-test-data', + {}, + esClient, + alertFactory, + alertLimit, + timestamp.valueOf() + ); + + expect(alertFactory.callCount).to.equal(1); + expect(alertFactory.getCall(0).args).to.eql([ + 'dev', + '2 log entries in the last 5 mins for dev. Alert when ≥ 1.', + 2, + 1, + [ + { + actionGroup: 'logs.threshold.fired', + context: { + conditions: 'env does not equal test', + group: 'dev', + isRatio: false, + matchingDocuments: 2, + reason: '2 log entries in the last 5 mins for dev. Alert when ≥ 1.', + }, + }, + ], + ]); + expect(alertLimit.setLimitReached.calledOnceWith(true)).to.be(true); }); }); }); @@ -134,9 +209,13 @@ export default function ({ getService }: FtrProviderContext) { after(() => esArchiver.unload('x-pack/test/functional/es_archives/infra/ten_thousand_plus')); describe('without group by', () => { - it('should work', async () => { + it('should trigger alerts below the alert limit', async () => { const timestamp = new Date(DATES.ten_thousand_plus.max); - const alertFactory = sinon.fake(); + const alertFactory = sinon.fake() as SinonSpyOf; + const alertLimit = { + getValue: sinon.fake.returns(2), + setLimitReached: sinon.fake(), + } as SinonSpiesOf; const ruleParams = { count: { comparator: Comparator.GT_OR_EQ, @@ -156,6 +235,7 @@ export default function ({ getService }: FtrProviderContext) { {}, esClient, alertFactory, + alertLimit, timestamp.valueOf() ); expect(alertFactory.callCount).to.equal(1); @@ -179,13 +259,18 @@ export default function ({ getService }: FtrProviderContext) { }, ], ]); + expect(alertLimit.setLimitReached.calledOnceWith(false)).to.be(true); }); }); describe('with group by', () => { - it('should work', async () => { + it('should trigger alerts below the alert limit', async () => { const timestamp = new Date(DATES.ten_thousand_plus.max); - const alertFactory = sinon.fake(); + const alertFactory = sinon.fake() as SinonSpyOf; + const alertLimit = { + getValue: sinon.fake.returns(2), + setLimitReached: sinon.fake(), + } as SinonSpiesOf; const ruleParams = { count: { comparator: Comparator.GT_OR_EQ, @@ -206,6 +291,7 @@ export default function ({ getService }: FtrProviderContext) { {}, esClient, alertFactory, + alertLimit, timestamp.valueOf() ); expect(alertFactory.callCount).to.equal(1); @@ -229,8 +315,18 @@ export default function ({ getService }: FtrProviderContext) { }, ], ]); + expect(alertLimit.setLimitReached.calledOnceWith(false)).to.be(true); }); }); }); }); } + +type SinonSpyOf any> = sinon.SinonSpy< + Parameters, + ReturnType +>; + +type SinonSpiesOf any>> = { + [Key in keyof SpyTarget]: SinonSpyOf; +}; diff --git a/x-pack/test/api_integration/apis/security/privileges.ts b/x-pack/test/api_integration/apis/security/privileges.ts index 3e6d18ef40840..987c22e35064f 100644 --- a/x-pack/test/api_integration/apis/security/privileges.ts +++ b/x-pack/test/api_integration/apis/security/privileges.ts @@ -14,70 +14,71 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); + const expectedWithoutActions = { + global: ['all', 'read'], + space: ['all', 'read'], + features: { + graph: ['all', 'read', 'minimal_all', 'minimal_read'], + savedObjectsTagging: ['all', 'read', 'minimal_all', 'minimal_read'], + canvas: ['all', 'read', 'minimal_all', 'minimal_read'], + maps: ['all', 'read', 'minimal_all', 'minimal_read'], + generalCases: ['all', 'read', 'minimal_all', 'minimal_read', 'cases_delete'], + observabilityCases: ['all', 'read', 'minimal_all', 'minimal_read', 'cases_delete'], + fleetv2: ['all', 'read', 'minimal_all', 'minimal_read'], + fleet: ['all', 'read', 'minimal_all', 'minimal_read'], + actions: ['all', 'read', 'minimal_all', 'minimal_read'], + stackAlerts: ['all', 'read', 'minimal_all', 'minimal_read'], + ml: ['all', 'read', 'minimal_all', 'minimal_read'], + siem: ['all', 'read', 'minimal_all', 'minimal_read'], + uptime: ['all', 'read', 'minimal_all', 'minimal_read'], + securitySolutionCases: ['all', 'read', 'minimal_all', 'minimal_read', 'cases_delete'], + infrastructure: ['all', 'read', 'minimal_all', 'minimal_read'], + logs: ['all', 'read', 'minimal_all', 'minimal_read'], + apm: ['all', 'read', 'minimal_all', 'minimal_read'], + discover: [ + 'all', + 'read', + 'minimal_all', + 'minimal_read', + 'url_create', + 'store_search_session', + ], + visualize: ['all', 'read', 'minimal_all', 'minimal_read', 'url_create'], + dashboard: [ + 'all', + 'read', + 'minimal_all', + 'minimal_read', + 'url_create', + 'store_search_session', + ], + dev_tools: ['all', 'read', 'minimal_all', 'minimal_read'], + advancedSettings: ['all', 'read', 'minimal_all', 'minimal_read'], + indexPatterns: ['all', 'read', 'minimal_all', 'minimal_read'], + savedObjectsManagement: ['all', 'read', 'minimal_all', 'minimal_read'], + osquery: [ + 'all', + 'read', + 'minimal_all', + 'minimal_read', + 'live_queries_all', + 'live_queries_read', + 'run_saved_queries', + 'saved_queries_all', + 'saved_queries_read', + 'packs_all', + 'packs_read', + ], + }, + reserved: ['fleet-setup', 'ml_user', 'ml_admin', 'ml_apm_user', 'monitoring'], + }; + describe('Privileges', () => { describe('GET /api/security/privileges', () => { it('should return a privilege map with all known privileges, without actions', async () => { // If you're adding a privilege to the following, that's great! // If you're removing a privilege, this breaks backwards compatibility // Roles are associated with these privileges, and we shouldn't be removing them in a minor version. - const expected = { - global: ['all', 'read'], - space: ['all', 'read'], - features: { - graph: ['all', 'read', 'minimal_all', 'minimal_read'], - savedObjectsTagging: ['all', 'read', 'minimal_all', 'minimal_read'], - canvas: ['all', 'read', 'minimal_all', 'minimal_read'], - maps: ['all', 'read', 'minimal_all', 'minimal_read'], - generalCases: ['all', 'read', 'minimal_all', 'minimal_read', 'cases_delete'], - observabilityCases: ['all', 'read', 'minimal_all', 'minimal_read', 'cases_delete'], - fleetv2: ['all', 'read', 'minimal_all', 'minimal_read'], - fleet: ['all', 'read', 'minimal_all', 'minimal_read'], - actions: ['all', 'read', 'minimal_all', 'minimal_read'], - stackAlerts: ['all', 'read', 'minimal_all', 'minimal_read'], - ml: ['all', 'read', 'minimal_all', 'minimal_read'], - siem: ['all', 'read', 'minimal_all', 'minimal_read'], - uptime: ['all', 'read', 'minimal_all', 'minimal_read'], - securitySolutionCases: ['all', 'read', 'minimal_all', 'minimal_read', 'cases_delete'], - infrastructure: ['all', 'read', 'minimal_all', 'minimal_read'], - logs: ['all', 'read', 'minimal_all', 'minimal_read'], - apm: ['all', 'read', 'minimal_all', 'minimal_read'], - discover: [ - 'all', - 'read', - 'minimal_all', - 'minimal_read', - 'url_create', - 'store_search_session', - ], - visualize: ['all', 'read', 'minimal_all', 'minimal_read', 'url_create'], - dashboard: [ - 'all', - 'read', - 'minimal_all', - 'minimal_read', - 'url_create', - 'store_search_session', - ], - dev_tools: ['all', 'read', 'minimal_all', 'minimal_read'], - advancedSettings: ['all', 'read', 'minimal_all', 'minimal_read'], - indexPatterns: ['all', 'read', 'minimal_all', 'minimal_read'], - savedObjectsManagement: ['all', 'read', 'minimal_all', 'minimal_read'], - osquery: [ - 'all', - 'read', - 'minimal_all', - 'minimal_read', - 'live_queries_all', - 'live_queries_read', - 'run_saved_queries', - 'saved_queries_all', - 'saved_queries_read', - 'packs_all', - 'packs_read', - ], - }, - reserved: ['fleet-setup', 'ml_user', 'ml_admin', 'ml_apm_user', 'monitoring'], - }; await supertest .get('/api/security/privileges') @@ -89,7 +90,7 @@ export default function ({ getService }: FtrProviderContext) { // supertest uses assert.deepStrictEqual. // expect.js doesn't help us here. // and lodash's isEqual doesn't know how to compare Sets. - const success = isEqualWith(res.body, expected, (value, other, key) => { + const success = isEqualWith(res.body, expectedWithoutActions, (value, other, key) => { if (Array.isArray(value) && Array.isArray(other)) { if (key === 'reserved') { // order does not matter for the reserved privilege set. @@ -106,7 +107,9 @@ export default function ({ getService }: FtrProviderContext) { if (!success) { throw new Error( - `Expected ${util.inspect(res.body)} to equal ${util.inspect(expected)}` + `Expected ${util.inspect(res.body)} to equal ${util.inspect( + expectedWithoutActions + )}` ); } }) @@ -178,5 +181,115 @@ export default function ({ getService }: FtrProviderContext) { }); }); }); + + // In this non-Basic case, results should be exactly the same as not supplying the respectLicenseLevel flag + describe('GET /api/security/privileges?respectLicenseLevel=false', () => { + it('should return a privilege map with all known privileges, without actions', async () => { + // If you're adding a privilege to the following, that's great! + // If you're removing a privilege, this breaks backwards compatibility + // Roles are associated with these privileges, and we shouldn't be removing them in a minor version. + + await supertest + .get('/api/security/privileges?respectLicenseLevel=false') + .set('kbn-xsrf', 'xxx') + .send() + .expect(200) + .expect((res: any) => { + // when comparing privileges, the order of the features doesn't matter (but the order of the privileges does) + // supertest uses assert.deepStrictEqual. + // expect.js doesn't help us here. + // and lodash's isEqual doesn't know how to compare Sets. + const success = isEqualWith(res.body, expectedWithoutActions, (value, other, key) => { + if (Array.isArray(value) && Array.isArray(other)) { + if (key === 'reserved') { + // order does not matter for the reserved privilege set. + return isEqual(value.sort(), other.sort()); + } + // order matters for the rest, as the UI assumes they are returned in a descending order of permissiveness. + return isEqual(value, other); + } + + // Lodash types aren't correct, `undefined` should be supported as a return value here and it + // has special meaning. + return undefined as any; + }); + + if (!success) { + throw new Error( + `Expected ${util.inspect(res.body)} to equal ${util.inspect( + expectedWithoutActions + )}` + ); + } + }) + .expect(200); + }); + }); + + // In this non-Basic case, results should be exactly the same as not supplying the respectLicenseLevel flag + describe('GET /api/security/privileges?includeActions=true&respectLicenseLevel=false', () => { + // The UI assumes that no wildcards are present when calculating the effective set of privileges. + // If this changes, then the "privilege calculators" will need revisiting to account for these wildcards. + it('should return a privilege map with actions which do not include wildcards', async () => { + await supertest + .get('/api/security/privileges?includeActions=true') + .set('kbn-xsrf', 'xxx') + .send() + .expect(200) + .expect((res: any) => { + const { features, global, space, reserved } = res.body as RawKibanaPrivileges; + expect(features).to.be.an('object'); + expect(global).to.be.an('object'); + expect(space).to.be.an('object'); + expect(reserved).to.be.an('object'); + + Object.entries(features).forEach(([featureId, featurePrivs]) => { + Object.values(featurePrivs).forEach((actions) => { + expect(actions).to.be.an('array'); + actions.forEach((action) => { + expect(action).to.be.a('string'); + expect(action.indexOf('*')).to.eql( + -1, + `Feature ${featureId} with action ${action} cannot contain a wildcard` + ); + }); + }); + }); + + Object.entries(global).forEach(([privilegeId, actions]) => { + expect(actions).to.be.an('array'); + actions.forEach((action) => { + expect(action).to.be.a('string'); + expect(action.indexOf('*')).to.eql( + -1, + `Global privilege ${privilegeId} with action ${action} cannot contain a wildcard` + ); + }); + }); + + Object.entries(space).forEach(([privilegeId, actions]) => { + expect(actions).to.be.an('array'); + actions.forEach((action) => { + expect(action).to.be.a('string'); + expect(action.indexOf('*')).to.eql( + -1, + `Space privilege ${privilegeId} with action ${action} cannot contain a wildcard` + ); + }); + }); + + Object.entries(reserved).forEach(([privilegeId, actions]) => { + expect(actions).to.be.an('array'); + actions.forEach((action) => { + expect(action).to.be.a('string'); + expect(action.indexOf('*')).to.eql( + -1, + `Reserved privilege ${privilegeId} with action ${action} cannot contain a wildcard` + ); + }); + }); + }); + }); + }); }); } diff --git a/x-pack/test/api_integration/apis/security/privileges_basic.ts b/x-pack/test/api_integration/apis/security/privileges_basic.ts index dfc60aaebca34..3d470259267e4 100644 --- a/x-pack/test/api_integration/apis/security/privileges_basic.ts +++ b/x-pack/test/api_integration/apis/security/privileges_basic.ts @@ -79,6 +79,95 @@ export default function ({ getService }: FtrProviderContext) { }) .expect(200); }); + + it('should include sub-feature privileges when respectlicenseLevel is false', async () => { + const expected = { + global: ['all', 'read'], + space: ['all', 'read'], + features: { + graph: ['all', 'read', 'minimal_all', 'minimal_read'], + savedObjectsTagging: ['all', 'read', 'minimal_all', 'minimal_read'], + canvas: ['all', 'read', 'minimal_all', 'minimal_read'], + maps: ['all', 'read', 'minimal_all', 'minimal_read'], + generalCases: ['all', 'read', 'minimal_all', 'minimal_read', 'cases_delete'], + observabilityCases: ['all', 'read', 'minimal_all', 'minimal_read', 'cases_delete'], + fleetv2: ['all', 'read', 'minimal_all', 'minimal_read'], + fleet: ['all', 'read', 'minimal_all', 'minimal_read'], + actions: ['all', 'read', 'minimal_all', 'minimal_read'], + stackAlerts: ['all', 'read', 'minimal_all', 'minimal_read'], + ml: ['all', 'read', 'minimal_all', 'minimal_read'], + siem: ['all', 'read', 'minimal_all', 'minimal_read'], + uptime: ['all', 'read', 'minimal_all', 'minimal_read'], + securitySolutionCases: ['all', 'read', 'minimal_all', 'minimal_read', 'cases_delete'], + infrastructure: ['all', 'read', 'minimal_all', 'minimal_read'], + logs: ['all', 'read', 'minimal_all', 'minimal_read'], + apm: ['all', 'read', 'minimal_all', 'minimal_read'], + discover: [ + 'all', + 'read', + 'minimal_all', + 'minimal_read', + 'url_create', + 'store_search_session', + ], + visualize: ['all', 'read', 'minimal_all', 'minimal_read', 'url_create'], + dashboard: [ + 'all', + 'read', + 'minimal_all', + 'minimal_read', + 'url_create', + 'store_search_session', + ], + dev_tools: ['all', 'read', 'minimal_all', 'minimal_read'], + advancedSettings: ['all', 'read', 'minimal_all', 'minimal_read'], + indexPatterns: ['all', 'read', 'minimal_all', 'minimal_read'], + savedObjectsManagement: ['all', 'read', 'minimal_all', 'minimal_read'], + osquery: [ + 'all', + 'read', + 'minimal_all', + 'minimal_read', + 'live_queries_all', + 'live_queries_read', + 'run_saved_queries', + 'saved_queries_all', + 'saved_queries_read', + 'packs_all', + 'packs_read', + ], + }, + reserved: ['fleet-setup', 'ml_user', 'ml_admin', 'ml_apm_user', 'monitoring'], + }; + + await supertest + .get('/api/security/privileges?respectLicenseLevel=false') + .set('kbn-xsrf', 'xxx') + .send() + .expect(200) + .expect((res: any) => { + // when comparing privileges, the order of the privileges doesn't matter. + // supertest uses assert.deepStrictEqual. + // expect.js doesn't help us here. + // and lodash's isEqual doesn't know how to compare Sets. + const success = isEqualWith(res.body, expected, (value, other, key) => { + if (Array.isArray(value) && Array.isArray(other)) { + return isEqual(value.sort(), other.sort()); + } + + // Lodash types aren't correct, `undefined` should be supported as a return value here and it + // has special meaning. + return undefined as any; + }); + + if (!success) { + throw new Error( + `Expected ${util.inspect(res.body)} to equal ${util.inspect(expected)}` + ); + } + }) + .expect(200); + }); }); }); } diff --git a/x-pack/test/apm_api_integration/tests/service_nodes/get_service_nodes.spec.ts b/x-pack/test/apm_api_integration/tests/service_nodes/get_service_nodes.spec.ts index 5aeb0e7db72a4..6008480234668 100644 --- a/x-pack/test/apm_api_integration/tests/service_nodes/get_service_nodes.spec.ts +++ b/x-pack/test/apm_api_integration/tests/service_nodes/get_service_nodes.spec.ts @@ -21,7 +21,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { async function callApi() { return await apmApiClient.readUser({ - endpoint: 'GET /internal/apm/services/{serviceName}/serviceNodes', + endpoint: 'GET /internal/apm/services/{serviceName}/metrics/nodes', params: { path: { serviceName }, query: { diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_ml.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_ml.ts index c94f73713e6a4..a29963ec3b6cb 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_ml.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_ml.ts @@ -89,7 +89,8 @@ export default ({ getService }: FtrProviderContext) => { } // FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/125033 - describe('Generating signals from ml anomalies', () => { + // FLAKY: https://github.com/elastic/kibana/issues/142993 + describe.skip('Generating signals from ml anomalies', () => { before(async () => { // Order is critical here: auditbeat data must be loaded before attempting to start the ML job, // as the job looks for certain indices on start diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts b/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts index e71c14a8054c8..277bafb998761 100644 --- a/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts +++ b/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts @@ -17,6 +17,7 @@ export default function (providerContext: FtrProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); + describe('fleet_agent_policies', () => { skipIfNoDockerRegistry(providerContext); describe('POST /api/fleet/agent_policies', () => { @@ -287,8 +288,20 @@ export default function (providerContext: FtrProviderContext) { setupFleetAndAgents(providerContext); after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/fleet/agents'); + if (systemPkgVersion) { + await supertest.delete(`/api/fleet/epm/packages/system-${systemPkgVersion}`); + } + if (packagePoliciesToDeleteIds.length > 0) { + await kibanaServer.savedObjects.bulkDelete({ + objects: packagePoliciesToDeleteIds.map((id) => ({ + id, + type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + })), + }); + } }); - + let systemPkgVersion: string; + const packagePoliciesToDeleteIds: string[] = []; const TEST_POLICY_ID = 'policy1'; it('should work with valid values', async () => { @@ -327,13 +340,43 @@ export default function (providerContext: FtrProviderContext) { }, } = await supertest.get(`/api/fleet/agent_policies/${policyId}`).expect(200); - const matches = packagePolicies[0].name.match(/^(.*)\s\(copy\s?([0-9]*)\)$/); + const matches = packagePolicies[0]?.name.match(/^(.*)\s\(copy\s?([0-9]*)\)$/); + if (matches) { return parseInt(matches[2], 10) || 1; } - return 0; } + + const policyId = 'package-policy-test-1'; + packagePoliciesToDeleteIds.push(policyId); + const getPkRes = await supertest + .get(`/api/fleet/epm/packages/system`) + .set('kbn-xsrf', 'xxxx') + .expect(200); + systemPkgVersion = getPkRes.body.item.version; + // we must first force install the system package to override package verification error on policy create + const installPromise = supertest + .post(`/api/fleet/epm/packages/system-${systemPkgVersion}`) + .set('kbn-xsrf', 'xxxx') + .send({ force: true }) + .expect(200); + + await Promise.all([ + installPromise, + kibanaServer.savedObjects.create({ + id: policyId, + type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + overwrite: true, + attributes: { + name: `system-1`, + package: { + name: 'system', + }, + }, + }), + ]); + const { body: { item: { id: originalPolicyId }, @@ -349,7 +392,6 @@ export default function (providerContext: FtrProviderContext) { namespace: 'default', }) .expect(200); - expect(await getSystemPackagePolicyCopyVersion(originalPolicyId)).to.be(0); const { diff --git a/x-pack/test/functional/apps/dashboard/group2/dashboard_tagging.ts b/x-pack/test/functional/apps/dashboard/group2/dashboard_tagging.ts index 535e287cfc5eb..1bd258233a7cc 100644 --- a/x-pack/test/functional/apps/dashboard/group2/dashboard_tagging.ts +++ b/x-pack/test/functional/apps/dashboard/group2/dashboard_tagging.ts @@ -32,7 +32,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await listingTable.waitUntilTableIsLoaded(); // open the filter dropdown - const filterButton = await find.byCssSelector('.euiFilterGroup .euiFilterButton'); + const filterButton = await find.byCssSelector( + '.euiFilterGroup .euiPopover:nth-child(2) .euiFilterButton' + ); await filterButton.click(); await testSubjects.click( `tag-searchbar-option-${PageObjects.tagManagement.testSubjFriendly(dashboardTag)}` diff --git a/x-pack/test/functional/apps/lens/group1/ad_hoc_data_view.ts b/x-pack/test/functional/apps/lens/group1/ad_hoc_data_view.ts index 48bcf11c0db07..e70e4b59dc31d 100644 --- a/x-pack/test/functional/apps/lens/group1/ad_hoc_data_view.ts +++ b/x-pack/test/functional/apps/lens/group1/ad_hoc_data_view.ts @@ -18,6 +18,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'dashboard', 'timeToVisualize', 'common', + 'discover', ]); const elasticChart = getService('elasticChart'); const fieldEditor = getService('fieldEditor'); @@ -156,8 +157,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await browser.switchToWindow(discoverWindowHandle); await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.common.sleep(15000); - const actualIndexPattern = await ( await testSubjects.find('discover-dataView-switch-link') ).getVisibleText(); @@ -165,6 +164,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const actualDiscoverQueryHits = await testSubjects.getVisibleText('discoverQueryHits'); expect(actualDiscoverQueryHits).to.be('14,005'); + + const prevDataViewId = await PageObjects.discover.getCurrentDataViewId(); + + await PageObjects.discover.addRuntimeField( + '_bytes-runtimefield', + `emit(doc["bytes"].value.toString())` + ); + await PageObjects.discover.clickFieldListItemToggle('_bytes-runtimefield'); + const newDataViewId = await PageObjects.discover.getCurrentDataViewId(); + expect(newDataViewId).not.to.equal(prevDataViewId); }); }); } diff --git a/x-pack/test/functional/apps/lens/group1/index.ts b/x-pack/test/functional/apps/lens/group1/index.ts index c01a43ce8c6ab..aa2b078a50a6b 100644 --- a/x-pack/test/functional/apps/lens/group1/index.ts +++ b/x-pack/test/functional/apps/lens/group1/index.ts @@ -74,6 +74,7 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext } else { loadTestFile(require.resolve('./smokescreen')); loadTestFile(require.resolve('./ad_hoc_data_view')); + loadTestFile(require.resolve('./partition')); loadTestFile(require.resolve('./persistent_context')); loadTestFile(require.resolve('./table_dashboard')); loadTestFile(require.resolve('./table')); diff --git a/x-pack/test/functional/apps/lens/group1/partition.ts b/x-pack/test/functional/apps/lens/group1/partition.ts new file mode 100644 index 0000000000000..45c4d1b1dfda0 --- /dev/null +++ b/x-pack/test/functional/apps/lens/group1/partition.ts @@ -0,0 +1,148 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const PageObjects = getPageObjects(['visualize', 'lens', 'common']); + const testSubjects = getService('testSubjects'); + + describe('lens partition charts', () => { + before(async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.goToTimeRange(); + }); + + it('should be able to nest up to 3 levels for Pie charts', async () => { + await PageObjects.lens.switchToVisualization('pie'); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsPie_sizeByDimensionPanel > lns-empty-dimension', + operation: 'average', + field: 'bytes', + }); + + for (const field of ['ip', 'extension.raw', 'geo.dest']) { + await PageObjects.lens.configureDimension({ + dimension: 'lnsPie_sliceByDimensionPanel > lns-empty-dimension', + operation: 'terms', + field, + }); + } + }); + + it('should not expose the grouping switch in Pie', async () => { + await PageObjects.lens.openDimensionEditor( + 'lnsPie_sliceByDimensionPanel > lns-dimensionTrigger' + ); + + expect(await testSubjects.exists('indexPattern-nesting-switch')).to.eql(false); + expect(await testSubjects.exists('indexPattern-nesting-select')).to.eql(false); + + await PageObjects.lens.closeDimensionEditor(); + }); + + it('should switch to donut charts keeping all dimensions', async () => { + await PageObjects.lens.switchToVisualization('donut'); + + expect( + await testSubjects.exists('lnsPie_sliceByDimensionPanel > lns-empty-dimension') + ).to.eql(false); + + expect( + (await testSubjects.findAll('lnsPie_sliceByDimensionPanel > lns-dimensionTrigger')).length + ).to.eql(3); + }); + + it('should not expose the grouping switch in Donut', async () => { + await PageObjects.lens.openDimensionEditor( + 'lnsPie_sliceByDimensionPanel > lns-dimensionTrigger' + ); + + expect(await testSubjects.exists('indexPattern-nesting-switch')).to.eql(false); + expect(await testSubjects.exists('indexPattern-nesting-select')).to.eql(false); + + await PageObjects.lens.closeDimensionEditor(); + }); + + it('should switch to treemap chart and keep only the first 2 dimensions', async () => { + await PageObjects.lens.switchToVisualization('treemap'); + + expect( + await testSubjects.exists('lnsPie_groupByDimensionPanel > lns-empty-dimension') + ).to.eql(false); + + expect( + (await testSubjects.findAll('lnsPie_groupByDimensionPanel > lns-dimensionTrigger')).length + ).to.eql(2); + }); + + it('should not expose the grouping switch in Treemap', async () => { + await PageObjects.lens.openDimensionEditor( + 'lnsPie_groupByDimensionPanel > lns-dimensionTrigger' + ); + + expect(await testSubjects.exists('indexPattern-nesting-switch')).to.eql(false); + expect(await testSubjects.exists('indexPattern-nesting-select')).to.eql(false); + + await PageObjects.lens.closeDimensionEditor(); + }); + + it('should switch to Mosaic chart and distribute dimensions as vertical and horizontal', async () => { + await PageObjects.lens.switchToVisualization('mosaic'); + + expect( + await testSubjects.exists('lnsPie_sliceByDimensionPanel > lns-empty-dimension') + ).to.eql(false); + + expect( + (await testSubjects.findAll('lnsPie_verticalAxisDimensionPanel > lns-dimensionTrigger')) + .length + ).to.eql(1); + + expect( + (await testSubjects.findAll('lnsPie_horizontalAxisDimensionPanel > lns-dimensionTrigger')) + .length + ).to.eql(1); + }); + + it('should expose the grouping switch in Mosaic', async () => { + await PageObjects.lens.openDimensionEditor( + 'lnsPie_verticalAxisDimensionPanel > lns-dimensionTrigger' + ); + + expect(await testSubjects.exists('indexPattern-nesting-switch')).to.eql(true); + + await PageObjects.lens.closeDimensionEditor(); + }); + + it('should switch to Waffle chart', async () => { + await PageObjects.lens.switchToVisualization('waffle'); + + expect( + await testSubjects.exists('lnsPie_groupByDimensionPanel > lns-empty-dimension') + ).to.eql(false); + + expect( + (await testSubjects.findAll('lnsPie_groupByDimensionPanel > lns-dimensionTrigger')).length + ).to.eql(1); + }); + + it('should expose the grouping switch in Waffle', async () => { + await PageObjects.lens.openDimensionEditor( + 'lnsPie_groupByDimensionPanel > lns-dimensionTrigger' + ); + + expect(await testSubjects.exists('indexPattern-nesting-switch')).to.eql(false); + expect(await testSubjects.exists('indexPattern-nesting-select')).to.eql(false); + + await PageObjects.lens.closeDimensionEditor(); + }); + }); +} diff --git a/x-pack/test/functional/apps/lens/group3/lens_tagging.ts b/x-pack/test/functional/apps/lens/group3/lens_tagging.ts index d4d9f084a64f7..42bb90e84a903 100644 --- a/x-pack/test/functional/apps/lens/group3/lens_tagging.ts +++ b/x-pack/test/functional/apps/lens/group3/lens_tagging.ts @@ -106,7 +106,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await listingTable.waitUntilTableIsLoaded(); // open the filter dropdown - const filterButton = await find.byCssSelector('.euiFilterGroup .euiFilterButton'); + const filterButton = await find.byCssSelector( + '.euiFilterGroup .euiPopover:nth-child(2) .euiFilterButton' + ); await filterButton.click(); await testSubjects.click( `tag-searchbar-option-${PageObjects.tagManagement.testSubjFriendly(lensTag)}` diff --git a/x-pack/test/functional/apps/lens/group3/open_in_lens/agg_based/gauge.ts b/x-pack/test/functional/apps/lens/group3/open_in_lens/agg_based/gauge.ts new file mode 100644 index 0000000000000..a5d348b4ed6f5 --- /dev/null +++ b/x-pack/test/functional/apps/lens/group3/open_in_lens/agg_based/gauge.ts @@ -0,0 +1,41 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../../../ftr_provider_context'; + +export default function ({ getPageObjects, getService }: FtrProviderContext) { + const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + + const testSubjects = getService('testSubjects'); + + describe('Gauge', function describeIndexTests() { + const isNewChartsLibraryEnabled = true; + + before(async () => { + await visualize.initTests(isNewChartsLibraryEnabled); + }); + + beforeEach(async () => { + await visualize.navigateToNewAggBasedVisualization(); + await visualize.clickGauge(); + await visualize.clickNewSearch(); + await timePicker.setDefaultAbsoluteRange(); + }); + + it('should show the "Edit Visualization in Lens" menu item', async () => { + const button = await testSubjects.exists('visualizeEditInLensButton'); + expect(button).to.eql(true); + }); + + it('should convert to Lens', async () => { + const button = await testSubjects.find('visualizeEditInLensButton'); + await button.click(); + await lens.waitForVisualization('gaugeChart'); + }); + }); +} diff --git a/x-pack/test/functional/apps/lens/group3/open_in_lens/agg_based/goal.ts b/x-pack/test/functional/apps/lens/group3/open_in_lens/agg_based/goal.ts new file mode 100644 index 0000000000000..0aa44c8dcd6e9 --- /dev/null +++ b/x-pack/test/functional/apps/lens/group3/open_in_lens/agg_based/goal.ts @@ -0,0 +1,52 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../../../ftr_provider_context'; + +export default function ({ getPageObjects, getService }: FtrProviderContext) { + const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + + const testSubjects = getService('testSubjects'); + + describe('Goal', function describeIndexTests() { + const isNewChartsLibraryEnabled = true; + + before(async () => { + await visualize.initTests(isNewChartsLibraryEnabled); + }); + + beforeEach(async () => { + await visualize.navigateToNewAggBasedVisualization(); + await visualize.clickGoal(); + await visualize.clickNewSearch(); + await timePicker.setDefaultAbsoluteRange(); + }); + + it('should show the "Edit Visualization in Lens" menu item', async () => { + const button = await testSubjects.exists('visualizeEditInLensButton'); + expect(button).to.eql(true); + }); + + it('should convert to Lens', async () => { + const button = await testSubjects.find('visualizeEditInLensButton'); + await button.click(); + await lens.waitForVisualization('mtrVis'); + expect((await lens.getMetricVisualizationData()).length).to.be.equal(1); + expect(await lens.getMetricVisualizationData()).to.eql([ + { + title: 'Count', + subtitle: undefined, + extraText: '', + value: '140.05%', + color: 'rgba(245, 247, 250, 1)', + showingBar: true, + }, + ]); + }); + }); +} diff --git a/x-pack/test/functional/apps/lens/group3/open_in_lens/agg_based/index.ts b/x-pack/test/functional/apps/lens/group3/open_in_lens/agg_based/index.ts index 66de13c67d94c..cc28ead0c55cd 100644 --- a/x-pack/test/functional/apps/lens/group3/open_in_lens/agg_based/index.ts +++ b/x-pack/test/functional/apps/lens/group3/open_in_lens/agg_based/index.ts @@ -11,5 +11,7 @@ export default function ({ loadTestFile }: FtrProviderContext) { describe('Agg based Vis to Lens', function () { loadTestFile(require.resolve('./pie')); loadTestFile(require.resolve('./metric')); + loadTestFile(require.resolve('./gauge')); + loadTestFile(require.resolve('./goal')); }); } diff --git a/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/timeseries.ts b/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/timeseries.ts index 17e3a6b1bee8a..87f9a196b5fba 100644 --- a/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/timeseries.ts +++ b/x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/timeseries.ts @@ -27,11 +27,14 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visualize.initTests(); }); - it('should show the "Edit Visualization in Lens" menu item for a count aggregation', async () => { + beforeEach(async () => { await visualize.navigateToNewVisualization(); await visualize.clickVisualBuilder(); await visualBuilder.checkVisualBuilderIsPresent(); await visualBuilder.resetPage(); + }); + + it('should show the "Edit Visualization in Lens" menu item for a count aggregation', async () => { const isMenuItemVisible = await find.existsByCssSelector( '[data-test-subj="visualizeEditInLensButton"]' ); @@ -51,6 +54,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('navigates back to TSVB when the Back button is clicked', async () => { + const button = await testSubjects.find('visualizeEditInLensButton'); + await button.click(); + await lens.waitForVisualization('xyVisChart'); + const goBackBtn = await testSubjects.find('lnsApp_goBackToAppButton'); goBackBtn.click(); await visualBuilder.checkVisualBuilderIsPresent(); @@ -71,9 +78,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should preserve query in lens', async () => { - const goBackBtn = await testSubjects.find('lnsApp_goBackToAppButton'); - goBackBtn.click(); - await visualBuilder.checkVisualBuilderIsPresent(); await queryBar.setQuery('machine.os : ios'); await queryBar.submitQuery(); await header.waitUntilLoadingHasFinished(); @@ -83,5 +87,117 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { expect(await queryBar.getQueryString()).to.equal('machine.os : ios'); }); + + it('should draw a reference line', async () => { + await visualBuilder.createNewAggSeries(); + await visualBuilder.selectAggType('Static Value'); + await visualBuilder.setStaticValue(10); + + await header.waitUntilLoadingHasFinished(); + + const button = await testSubjects.find('visualizeEditInLensButton'); + await button.click(); + await lens.waitForVisualization('xyVisChart'); + await retry.try(async () => { + const layers = await find.allByCssSelector(`[data-test-subj^="lns-layerPanel-"]`); + + const referenceLineDimensions = await testSubjects.findAllDescendant( + 'lns-dimensionTrigger', + layers[0] + ); + expect(referenceLineDimensions).to.have.length(1); + expect(await referenceLineDimensions[0].getVisibleText()).to.be('Static value: 10'); + + const dimensions = await testSubjects.findAllDescendant('lns-dimensionTrigger', layers[1]); + expect(dimensions).to.have.length(2); + expect(await dimensions[0].getVisibleText()).to.be('@timestamp'); + expect(await dimensions[1].getVisibleText()).to.be('Count of records'); + }); + }); + + it('should convert metric with params', async () => { + await visualBuilder.selectAggType('Counter Rate'); + await visualBuilder.setFieldForAggregation('machine.ram'); + + await header.waitUntilLoadingHasFinished(); + + const button = await testSubjects.find('visualizeEditInLensButton'); + await button.click(); + await lens.waitForVisualization('xyVisChart'); + await retry.try(async () => { + expect(await lens.getLayerCount()).to.be(1); + + const dimensions = await testSubjects.findAll('lns-dimensionTrigger'); + expect(dimensions).to.have.length(2); + expect(await dimensions[0].getVisibleText()).to.be('@timestamp'); + expect(await dimensions[1].getVisibleText()).to.eql( + 'Counter rate of machine.ram per second' + ); + }); + }); + + it('should not allow converting of not valid panel', async () => { + await visualBuilder.selectAggType('Counter Rate'); + await header.waitUntilLoadingHasFinished(); + const canEdit = await testSubjects.exists('visualizeEditInLensButton'); + expect(canEdit).to.be(false); + }); + + it('should not allow converting of unsupported aggregations', async () => { + await visualBuilder.selectAggType('Variance'); + await visualBuilder.setFieldForAggregation('machine.ram'); + + await header.waitUntilLoadingHasFinished(); + const canEdit = await testSubjects.exists('visualizeEditInLensButton'); + expect(canEdit).to.be(false); + }); + + it('should convert parent pipeline aggregation with terms', async () => { + await visualBuilder.createNewAgg(); + + await visualBuilder.selectAggType('Cumulative Sum', 1); + await visualBuilder.setFieldForAggregation('Count', 1); + + await visualBuilder.setMetricsGroupByTerms('extension.raw'); + + await header.waitUntilLoadingHasFinished(); + const button = await testSubjects.find('visualizeEditInLensButton'); + await button.click(); + + await lens.waitForVisualization('xyVisChart'); + await retry.try(async () => { + expect(await lens.getLayerCount()).to.be(1); + + const dimensions = await testSubjects.findAll('lns-dimensionTrigger'); + expect(dimensions).to.have.length(3); + expect(await dimensions[0].getVisibleText()).to.be('@timestamp'); + expect(await dimensions[1].getVisibleText()).to.eql('Cumulative sum of Records'); + expect(await dimensions[2].getVisibleText()).to.eql('Top 10 values of extension.raw'); + }); + }); + + it('should convert sibling pipeline aggregation with terms', async () => { + await visualBuilder.createNewAgg(); + + await visualBuilder.selectAggType('Overall Average', 1); + await visualBuilder.setFieldForAggregation('Count', 1); + + await visualBuilder.setMetricsGroupByTerms('extension.raw'); + + await header.waitUntilLoadingHasFinished(); + const button = await testSubjects.find('visualizeEditInLensButton'); + await button.click(); + + await lens.waitForVisualization('xyVisChart'); + await retry.try(async () => { + expect(await lens.getLayerCount()).to.be(1); + + const dimensions = await testSubjects.findAll('lns-dimensionTrigger'); + expect(dimensions).to.have.length(3); + expect(await dimensions[0].getVisibleText()).to.be('@timestamp'); + expect(await dimensions[1].getVisibleText()).to.eql('overall_average(count())'); + expect(await dimensions[2].getVisibleText()).to.eql('Top 10 values of extension.raw'); + }); + }); }); } diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/classification_creation.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/classification_creation.ts index ea95525062700..2ba4ac6f08350 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/classification_creation.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/classification_creation.ts @@ -13,8 +13,7 @@ export default function ({ getService }: FtrProviderContext) { const ml = getService('ml'); const editedDescription = 'Edited description'; - // FLAKY: https://github.com/elastic/kibana/issues/142102 - describe.skip('classification creation', function () { + describe('classification creation', function () { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/bm_classification'); await ml.testResources.createIndexPatternIfNeeded('ft_bank_marketing', '@timestamp'); @@ -93,8 +92,7 @@ export default function ({ getService }: FtrProviderContext) { }, ]; for (const testData of testDataList) { - // FLAKY: https://github.com/elastic/kibana/issues/142102 - describe.skip(`${testData.suiteTitle}`, function () { + describe(`${testData.suiteTitle}`, function () { after(async () => { await ml.api.deleteIndices(testData.destinationIndex); await ml.testResources.deleteIndexPatternByTitle(testData.destinationIndex); diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/cloning.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/cloning.ts index a3314aabce725..3a33c95edba42 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/cloning.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/cloning.ts @@ -15,9 +15,7 @@ export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); - // FLAKY: https://github.com/elastic/kibana/issues/142118 - // Failing: See https://github.com/elastic/kibana/issues/142118 - describe.skip('jobs cloning supported by UI form', function () { + describe('jobs cloning supported by UI form', function () { const testDataList: Array<{ suiteTitle: string; archive: string; @@ -137,8 +135,7 @@ export default function ({ getService }: FtrProviderContext) { }); for (const testData of testDataList) { - // FLAKY: https://github.com/elastic/kibana/issues/142118 - describe.skip(`${testData.suiteTitle}`, function () { + describe(`${testData.suiteTitle}`, function () { const cloneJobId = `${testData.job.id}_clone`; const cloneDestIndex = `${testData.job!.dest!.index}_clone`; diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts index fb04cd793d9d8..947cd82cdd342 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts @@ -13,8 +13,7 @@ export default function ({ getService }: FtrProviderContext) { const ml = getService('ml'); const editedDescription = 'Edited description'; - // FLAKY: https://github.com/elastic/kibana/issues/142083 - describe.skip('outlier detection creation', function () { + describe('outlier detection creation', function () { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/ihp_outlier'); await ml.testResources.createIndexPatternIfNeeded('ft_ihp_outlier', '@timestamp'); @@ -109,8 +108,7 @@ export default function ({ getService }: FtrProviderContext) { ]; for (const testData of testDataList) { - // FLAKY: https://github.com/elastic/kibana/issues/142083 - describe.skip(`${testData.suiteTitle}`, function () { + describe(`${testData.suiteTitle}`, function () { after(async () => { await ml.api.deleteIndices(testData.destinationIndex); await ml.testResources.deleteIndexPatternByTitle(testData.destinationIndex); diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/regression_creation.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/regression_creation.ts index 744b61a2a06ca..7a84c41aa4a66 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/regression_creation.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/regression_creation.ts @@ -13,8 +13,7 @@ export default function ({ getService }: FtrProviderContext) { const ml = getService('ml'); const editedDescription = 'Edited description'; - // FLAKY: https://github.com/elastic/kibana/issues/142095 - describe.skip('regression creation', function () { + describe('regression creation', function () { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/egs_regression'); await ml.testResources.createIndexPatternIfNeeded('ft_egs_regression', '@timestamp'); @@ -87,8 +86,7 @@ export default function ({ getService }: FtrProviderContext) { ]; for (const testData of testDataList) { - // FLAKY: https://github.com/elastic/kibana/issues/142095 - describe.skip(`${testData.suiteTitle}`, function () { + describe(`${testData.suiteTitle}`, function () { after(async () => { await ml.api.deleteIndices(testData.destinationIndex); await ml.testResources.deleteIndexPatternByTitle(testData.destinationIndex); diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts index af023ea52d9b3..2bddf0a7d9512 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts @@ -14,8 +14,7 @@ export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); - // Failing: See https://github.com/elastic/kibana/issues/142152 - describe.skip('results view content and total feature importance', function () { + describe('results view content and total feature importance', function () { const testDataList: Array<{ suiteTitle: string; archive: string; diff --git a/x-pack/test/functional/services/cases/common.ts b/x-pack/test/functional/services/cases/common.ts index 8a61358d04521..067cdf008a9e9 100644 --- a/x-pack/test/functional/services/cases/common.ts +++ b/x-pack/test/functional/services/cases/common.ts @@ -101,5 +101,14 @@ export function CasesCommonServiceProvider({ getService, getPageObject }: FtrPro await (await find.byClassName('euiSelectableListItem__content')).click(); await header.waitUntilLoadingHasFinished(); }, + + async selectAllRowsInAssigneesPopover() { + const rows = await find.allByCssSelector('.euiSelectableListItem__content'); + for (const row of rows) { + await row.click(); + } + + await header.waitUntilLoadingHasFinished(); + }, }; } diff --git a/x-pack/test/functional/services/cases/create.ts b/x-pack/test/functional/services/cases/create.ts index 872113f1a51be..0b4c62f572f23 100644 --- a/x-pack/test/functional/services/cases/create.ts +++ b/x-pack/test/functional/services/cases/create.ts @@ -16,6 +16,7 @@ export interface CreateCaseParams { tag?: string; severity?: CaseSeverity; owner?: string; + assignees?: []; } export function CasesCreateViewServiceProvider( @@ -55,38 +56,50 @@ export function CasesCreateViewServiceProvider( severity = CaseSeverity.LOW, owner, }: CreateCaseParams) { - await this.setCaseTitle(title); - - await this.setCaseTags(tag); - - // case description - const descriptionArea = await find.byCssSelector('textarea.euiMarkdownEditorTextArea'); - await descriptionArea.focus(); - await descriptionArea.type(description); + await this.setTitle(title); + await this.setDescription(description); + await this.setTags(tag); if (severity !== CaseSeverity.LOW) { - await common.clickAndValidate( - 'case-severity-selection', - `case-severity-selection-${severity}` - ); + await this.setSeverity(severity); } if (owner) { - await testSubjects.click(`${owner}RadioButton`); + await this.setSolution(owner); } - // save - await testSubjects.click('create-case-submit'); + await this.submitCase(); }, - async setCaseTitle(title: string) { + async setTitle(title: string) { await testSubjects.setValue('input', title); }, - async setCaseTags(tag: string) { + async setDescription(description: string) { + const descriptionArea = await find.byCssSelector('textarea.euiMarkdownEditorTextArea'); + await descriptionArea.focus(); + await descriptionArea.type(description); + }, + + async setTags(tag: string) { await comboBox.setCustom('caseTags', tag); }, + async setSolution(owner: string) { + await testSubjects.click(`${owner}RadioButton`); + }, + + async setSeverity(severity: CaseSeverity) { + await common.clickAndValidate( + 'case-severity-selection', + `case-severity-selection-${severity}` + ); + }, + + async submitCase() { + await testSubjects.click('create-case-submit'); + }, + async assertCreateCaseFlyoutVisible(expectVisible = true) { await retry.tryForTime(5000, async () => { if (expectVisible) { diff --git a/x-pack/test/functional/services/cases/single_case_view.ts b/x-pack/test/functional/services/cases/single_case_view.ts index aead59186b46d..bd9377ebd5abd 100644 --- a/x-pack/test/functional/services/cases/single_case_view.ts +++ b/x-pack/test/functional/services/cases/single_case_view.ts @@ -120,8 +120,12 @@ export function CasesSingleViewServiceProvider({ getService, getPageObject }: Ft }, async closeAssigneesPopover() { - await testSubjects.click('case-refresh'); - await header.waitUntilLoadingHasFinished(); + await retry.try(async () => { + // Click somewhere outside the popover + await testSubjects.click('header-page-title'); + await header.waitUntilLoadingHasFinished(); + await testSubjects.missingOrFail('euiSelectableList'); + }); }, }; } diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/attachment_framework.ts b/x-pack/test/functional_with_es_ssl/apps/cases/attachment_framework.ts index f9bcd5946d400..2d16926b47660 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/attachment_framework.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/attachment_framework.ts @@ -145,7 +145,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { query: { query: '', language: 'kuery' }, filters: [], datasourceStates: { - indexpattern: { + formBased: { layers: { '85863a23-73a0-4e11-9774-70f77b9a5898': { columns: { diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/create_case_form.ts b/x-pack/test/functional_with_es_ssl/apps/cases/create_case_form.ts index 42ed68a9f36da..e601ce9381ed6 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/create_case_form.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/create_case_form.ts @@ -9,15 +9,22 @@ import expect from '@kbn/expect'; import uuid from 'uuid'; import { CaseSeverity } from '@kbn/cases-plugin/common/api'; import { FtrProviderContext } from '../../ftr_provider_context'; +import { + createUsersAndRoles, + deleteUsersAndRoles, +} from '../../../cases_api_integration/common/lib/authentication'; +import { users, roles, casesAllUser, casesAllUser2 } from './common'; -export default ({ getService }: FtrProviderContext) => { +export default ({ getService, getPageObject }: FtrProviderContext) => { describe('Create case', function () { const find = getService('find'); const cases = getService('cases'); const testSubjects = getService('testSubjects'); const config = getService('config'); + const comboBox = getService('comboBox'); + const header = getPageObject('header'); - before(async () => { + beforeEach(async () => { await cases.navigation.navigateToApp(); }); @@ -54,5 +61,33 @@ export default ({ getService }: FtrProviderContext) => { const button = await find.byCssSelector('[data-test-subj*="case-callout"] button'); expect(await button.getVisibleText()).equal('Add connector'); }); + + describe('Assignees', function () { + before(async () => { + await createUsersAndRoles(getService, users, roles); + await cases.api.activateUserProfiles([casesAllUser, casesAllUser2]); + }); + + after(async () => { + await deleteUsersAndRoles(getService, users, roles); + }); + + it('creates a case with assignees', async () => { + const caseTitle = 'test-' + uuid.v4(); + await cases.create.openCreateCasePage(); + + await cases.create.setTitle(caseTitle); + await comboBox.set('createCaseAssigneesComboBox', 'cases_all_user'); + await comboBox.set('createCaseAssigneesComboBox', 'cases_all_user2'); + await cases.create.setDescription('my description'); + + await cases.create.submitCase(); + + await header.waitUntilLoadingHasFinished(); + await testSubjects.existOrFail('case-view-title'); + await testSubjects.existOrFail('user-profile-assigned-user-group-cases_all_user'); + await testSubjects.existOrFail('user-profile-assigned-user-group-cases_all_user2'); + }); + }); }); }; diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/list_view.ts b/x-pack/test/functional_with_es_ssl/apps/cases/list_view.ts index b212b48dc2e9d..ce7ab737621f5 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/list_view.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/list_view.ts @@ -228,14 +228,18 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { await cases.casesTable.validateCasesTableHasNthRows(1); }); - it('filters cases by the first cases all user assignee', async () => { - await cases.casesTable.filterByAssignee('all'); - await cases.casesTable.validateCasesTableHasNthRows(1); - }); + describe('assignees filtering', () => { + it('filters cases by the first cases all user assignee', async () => { + await cases.casesTable.filterByAssignee('all'); + await cases.casesTable.validateCasesTableHasNthRows(1); + await testSubjects.exists('case-user-profile-avatar-cases_all_user'); + }); - it('filters cases by the casesAllUser2 assignee', async () => { - await cases.casesTable.filterByAssignee('2'); - await cases.casesTable.validateCasesTableHasNthRows(1); + it('filters cases by the casesAllUser2 assignee', async () => { + await cases.casesTable.filterByAssignee('2'); + await cases.casesTable.validateCasesTableHasNthRows(1); + await testSubjects.exists('case-user-profile-avatar-cases_all_user2'); + }); }); }); diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/view_case.ts b/x-pack/test/functional_with_es_ssl/apps/cases/view_case.ts index 18adfa55a3d1b..9bae9f83c9f97 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/view_case.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/view_case.ts @@ -256,27 +256,38 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { }); describe('logs in with default user', () => { - createOneCaseBeforeDeleteAllAfter(getPageObject, getService); + beforeEach(async () => { + await createAndNavigateToCase(getPageObject, getService); + }); afterEach(async () => { - await cases.singleCase.closeAssigneesPopover(); + await cases.api.deleteAllCases(); }); it('shows the assign users popover when clicked', async () => { await testSubjects.missingOrFail('euiSelectableList'); - await cases.singleCase.openAssigneesPopover(); + await cases.singleCase.closeAssigneesPopover(); }); it('assigns a user from the popover', async () => { await cases.singleCase.openAssigneesPopover(); await cases.common.setSearchTextInAssigneesPopover('case'); await cases.common.selectFirstRowInAssigneesPopover(); + await cases.singleCase.closeAssigneesPopover(); + await header.waitUntilLoadingHasFinished(); + await testSubjects.existOrFail('user-profile-assigned-user-group-cases_all_user'); + }); + + it('assigns multiple users', async () => { + await cases.singleCase.openAssigneesPopover(); + await cases.common.setSearchTextInAssigneesPopover('case'); + await cases.common.selectAllRowsInAssigneesPopover(); - // navigate out of the modal await cases.singleCase.closeAssigneesPopover(); await header.waitUntilLoadingHasFinished(); await testSubjects.existOrFail('user-profile-assigned-user-group-cases_all_user'); + await testSubjects.existOrFail('user-profile-assigned-user-group-cases_all_user2'); }); }); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts index 46532fa570f46..d2ad05486a18a 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts @@ -43,6 +43,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await pageObjects.triggersActionsUI.clickCreateAlertButton(); await testSubjects.setValue('ruleNameInput', alertName); await testSubjects.click(`.es-query-SelectOption`); + await testSubjects.click('queryFormType_esQuery'); await testSubjects.click('selectIndexExpression'); const indexComboBox = await find.byCssSelector('#indexSelectSearchBox'); await indexComboBox.click(); @@ -112,8 +113,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await testSubjects.missingOrFail('confirmRuleCloseModal'); } - // Failing: See https://github.com/elastic/kibana/issues/126873 - describe.skip('create alert', function () { + describe('create alert', function () { before(async () => { await pageObjects.common.navigateToApp('triggersActions'); await testSubjects.click('rulesTab'); @@ -279,34 +279,42 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await discardNewRuleCreation(); }); - it('should successfully test valid es_query alert', async () => { + it('should show error when es_query is invalid', async () => { const alertName = generateUniqueKey(); await defineEsQueryAlert(alertName); - // Valid query - await testSubjects.setValue('queryJsonEditor', '{"query":{"match_all":{}}}', { + await testSubjects.setValue('queryJsonEditor', '', { + clearWithKeyboard: true, + }); + const queryJsonEditor = await testSubjects.find('queryJsonEditor'); + await queryJsonEditor.clearValue(); + // Invalid query + await testSubjects.setValue('queryJsonEditor', '{"query":{"foo":""}}', { clearWithKeyboard: true, }); await testSubjects.click('testQuery'); - await testSubjects.existOrFail('testQuerySuccess'); - await testSubjects.missingOrFail('testQueryError'); - + await testSubjects.missingOrFail('testQuerySuccess'); + await testSubjects.existOrFail('testQueryError'); + await testSubjects.setValue('queryJsonEditor', ''); await discardNewRuleCreation(); }); - it('should show error when es_query is invalid', async () => { + it('should successfully test valid es_query alert', async () => { const alertName = generateUniqueKey(); await defineEsQueryAlert(alertName); + await testSubjects.setValue('queryJsonEditor', '', { + clearWithKeyboard: true, + }); const queryJsonEditor = await testSubjects.find('queryJsonEditor'); await queryJsonEditor.clearValue(); - // Invalid query - await testSubjects.setValue('queryJsonEditor', JSON.stringify({ query: { foo: {} } }), { + // Valid query + await testSubjects.setValue('queryJsonEditor', '{"query":{"match_all":{}}}', { clearWithKeyboard: true, }); await testSubjects.click('testQuery'); - await testSubjects.missingOrFail('testQuerySuccess'); - await testSubjects.existOrFail('testQueryError'); + await testSubjects.existOrFail('testQuerySuccess'); + await testSubjects.missingOrFail('testQueryError'); await discardNewRuleCreation(); }); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts index 7262ff280faea..c1c5e391686a3 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts @@ -30,8 +30,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await testSubjects.click('rulesTab'); } - // Failing: See https://github.com/elastic/kibana/issues/141093 - describe.skip('rules list', function () { + describe('rules list', function () { const assertRulesLength = async (length: number) => { return await retry.try(async () => { const rules = await pageObjects.triggersActionsUI.getAlertsList(); @@ -198,6 +197,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await testSubjects.click('collapsedItemActions'); + await retry.waitForWithTimeout('disable button to show up', 30000, async () => { + return await testSubjects.isDisplayed('disableButton'); + }); + await testSubjects.click('disableButton'); await refreshAlertsList(); diff --git a/x-pack/test/saved_object_tagging/functional/tests/constants.ts b/x-pack/test/saved_object_tagging/functional/tests/constants.ts new file mode 100644 index 0000000000000..7c5a441e2cefe --- /dev/null +++ b/x-pack/test/saved_object_tagging/functional/tests/constants.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const TAGFILTER_DROPDOWN_SELECTOR = + '.euiFilterGroup .euiPopover:nth-child(2) .euiFilterButton'; diff --git a/x-pack/test/saved_object_tagging/functional/tests/dashboard_integration.ts b/x-pack/test/saved_object_tagging/functional/tests/dashboard_integration.ts index 22c8b159b12ed..41b337ed6a8c2 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/dashboard_integration.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/dashboard_integration.ts @@ -7,6 +7,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../ftr_provider_context'; +import { TAGFILTER_DROPDOWN_SELECTOR } from './constants'; // eslint-disable-next-line import/no-default-export export default function ({ getPageObjects, getService }: FtrProviderContext) { @@ -22,7 +23,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { */ const selectFilterTags = async (...tagNames: string[]) => { // open the filter dropdown - const filterButton = await find.byCssSelector('.euiFilterGroup .euiFilterButton'); + const filterButton = await find.byCssSelector(TAGFILTER_DROPDOWN_SELECTOR); await filterButton.click(); // select the tags for (const tagName of tagNames) { diff --git a/x-pack/test/saved_object_tagging/functional/tests/maps_integration.ts b/x-pack/test/saved_object_tagging/functional/tests/maps_integration.ts index 97402fe5c76c7..fb484b61b96d5 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/maps_integration.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/maps_integration.ts @@ -7,6 +7,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../ftr_provider_context'; +import { TAGFILTER_DROPDOWN_SELECTOR } from './constants'; // eslint-disable-next-line import/no-default-export export default function ({ getPageObjects, getService }: FtrProviderContext) { @@ -21,7 +22,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { */ const selectFilterTags = async (...tagNames: string[]) => { // open the filter dropdown - const filterButton = await find.byCssSelector('.euiFilterGroup .euiFilterButton'); + const filterButton = await find.byCssSelector(TAGFILTER_DROPDOWN_SELECTOR); await filterButton.click(); // select the tags for (const tagName of tagNames) { diff --git a/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts b/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts index faf9e8aed8306..445b748987c1a 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts @@ -7,6 +7,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../ftr_provider_context'; +import { TAGFILTER_DROPDOWN_SELECTOR } from './constants'; // eslint-disable-next-line import/no-default-export export default function ({ getPageObjects, getService }: FtrProviderContext) { @@ -22,7 +23,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { */ const selectFilterTags = async (...tagNames: string[]) => { // open the filter dropdown - const filterButton = await find.byCssSelector('.euiFilterGroup .euiFilterButton'); + const filterButton = await find.byCssSelector(TAGFILTER_DROPDOWN_SELECTOR); await filterButton.click(); // select the tags for (const tagName of tagNames) { diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts index 6aab2457c5278..eeeb92d379eef 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts @@ -15,7 +15,7 @@ import { export default function (providerContext: FtrProviderContext) { const { loadTestFile, getService } = providerContext; - describe('endpoint', function () { + describe.skip('endpoint', function () { const ingestManager = getService('ingestManager'); const log = getService('log'); const endpointTestResources = getService('endpointTestResources'); diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/trusted_apps_list.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/trusted_apps_list.ts index 4643b91303be0..80053108b46fa 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/trusted_apps_list.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/trusted_apps_list.ts @@ -16,7 +16,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const endpointTestResources = getService('endpointTestResources'); const policyTestResources = getService('policyTestResources'); - describe('When on the Trusted Apps list', function () { + // FLAKY: https://github.com/elastic/kibana/issues/114309 + describe.skip('When on the Trusted Apps list', function () { let indexedData: IndexedHostsAndAlertsResponse; before(async () => { const endpointPackage = await policyTestResources.getEndpointPackage(); diff --git a/x-pack/test/security_solution_endpoint_api_int/apis/endpoint_authz.ts b/x-pack/test/security_solution_endpoint_api_int/apis/endpoint_authz.ts index 6152bbfe150c6..ca6a72f50d00e 100644 --- a/x-pack/test/security_solution_endpoint_api_int/apis/endpoint_authz.ts +++ b/x-pack/test/security_solution_endpoint_api_int/apis/endpoint_authz.ts @@ -7,11 +7,9 @@ import { wrapErrorAndRejectPromise } from '@kbn/security-solution-plugin/common/endpoint/data_loaders/utils'; import { - ACTION_STATUS_ROUTE, AGENT_POLICY_SUMMARY_ROUTE, BASE_POLICY_RESPONSE_ROUTE, GET_PROCESSES_ROUTE, - HOST_METADATA_LIST_ROUTE, ISOLATE_HOST_ROUTE, ISOLATE_HOST_ROUTE_V2, KILL_PROCESS_ROUTE, @@ -41,16 +39,6 @@ export default function ({ getService }: FtrProviderContext) { }); const apiList = [ - { - method: 'get', - path: HOST_METADATA_LIST_ROUTE, - body: undefined, - }, - { - method: 'get', - path: `${ACTION_STATUS_ROUTE}?agent_ids=1`, - body: undefined, - }, { method: 'get', path: `${AGENT_POLICY_SUMMARY_ROUTE}?package_name=endpoint`, diff --git a/x-pack/test/stack_functional_integration/apps/telemetry/_telemetry.js b/x-pack/test/stack_functional_integration/apps/telemetry/_telemetry.js index d35102cae1b7f..46d8af2280264 100644 --- a/x-pack/test/stack_functional_integration/apps/telemetry/_telemetry.js +++ b/x-pack/test/stack_functional_integration/apps/telemetry/_telemetry.js @@ -11,6 +11,7 @@ export default ({ getService, getPageObjects }) => { const log = getService('log'); const browser = getService('browser'); const PageObjects = getPageObjects(['common']); + const retry = getService('retry'); describe('telemetry', function () { before(async () => { @@ -23,9 +24,11 @@ export default ({ getService, getPageObjects }) => { }); it('should show banner Help us improve the Elastic Stack', async () => { - const actualMessage = await PageObjects.common.getWelcomeText(); - log.debug(`### X-Pack Welcome Text: ${actualMessage}`); - expect(actualMessage).to.contain('Help us improve the Elastic Stack'); + await retry.tryForTime(20000, async () => { + const actualMessage = await PageObjects.common.getWelcomeText(); + log.debug(`### X-Pack Welcome Text: ${actualMessage}`); + expect(actualMessage).to.contain('Help us improve the Elastic Stack'); + }); }); }); }; diff --git a/yarn.lock b/yarn.lock index 6539efddf1481..8b859199fdac4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -650,7 +650,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-jsx@^7.12.13", "@babel/plugin-syntax-jsx@^7.17.12", "@babel/plugin-syntax-jsx@^7.18.6": +"@babel/plugin-syntax-jsx@^7.17.12", "@babel/plugin-syntax-jsx@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== @@ -929,18 +929,7 @@ dependencies: "@babel/plugin-transform-react-jsx" "^7.18.6" -"@babel/plugin-transform-react-jsx@^7.12.12", "@babel/plugin-transform-react-jsx@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.18.6.tgz#2721e96d31df96e3b7ad48ff446995d26bc028ff" - integrity sha512-Mz7xMPxoy9kPS/JScj6fJs03TZ/fZ1dJPlMjRAgTaxaS0fUBk8FV/A2rRgfPsVCZqALNwMexD+0Uaf5zlcKPpw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-jsx" "^7.18.6" - "@babel/types" "^7.18.6" - -"@babel/plugin-transform-react-jsx@^7.17.12": +"@babel/plugin-transform-react-jsx@^7.12.12", "@babel/plugin-transform-react-jsx@^7.17.12", "@babel/plugin-transform-react-jsx@^7.18.6": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.19.0.tgz#b3cbb7c3a00b92ec8ae1027910e331ba5c500eb9" integrity sha512-UVEvX3tXie3Szm3emi1+G63jyw1w5IcMY0FSKM+CRnKRI5Mr1YbCNgsSTwoTwKphQEG9P+QqmuRFneJPZuHNhg== @@ -1186,7 +1175,7 @@ core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.19.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.19.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.0.tgz#22b11c037b094d27a8a2504ea4dcff00f50e2259" integrity sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA== @@ -1466,10 +1455,10 @@ dependencies: object-hash "^1.3.0" -"@elastic/charts@50.0.1": - version "50.0.1" - resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-50.0.1.tgz#a0ee66668c857be7cfea2e134e0b84930d1564c5" - integrity sha512-O1L8rot0dycTQo/0eW7aD2P4K3Bh1LtzMgRBXYZAtIpbzdxveRkl8fOlIkGxeeHE4YNvntUJaJWeyT+ngGg7QA== +"@elastic/charts@50.0.2": + version "50.0.2" + resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-50.0.2.tgz#45d37544d57af8d67a1033bbd78ebe3f58d9f662" + integrity sha512-Q2fPS/bwKCYfTE7/dFO9OdlFtQQ7NMhflbl4WnHjpBcDeqUsqE/6cHd8XyvY/+WFhH9fkyCzBlO/eRBA3KatmA== dependencies: "@popperjs/core" "^2.4.0" bezier-easing "^2.1.0" @@ -1733,24 +1722,6 @@ source-map "^0.5.7" stylis "4.0.13" -"@emotion/babel-plugin@^11.7.1": - version "11.7.1" - resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.7.1.tgz#853fc4985d89dab0ea8e17af2858473d1b11be7e" - integrity sha512-K3/6Y+J/sIAjplf3uIteWLhPuOyuMNnE+iyYnTF/m294vc6IL90kTHp7y8ldZYbpKlP17rpOWDKM9DvTcrOmNQ== - dependencies: - "@babel/helper-module-imports" "^7.12.13" - "@babel/plugin-syntax-jsx" "^7.12.13" - "@babel/runtime" "^7.13.10" - "@emotion/hash" "^0.8.0" - "@emotion/memoize" "^0.7.5" - "@emotion/serialize" "^1.0.2" - babel-plugin-macros "^2.6.1" - convert-source-map "^1.5.0" - escape-string-regexp "^4.0.0" - find-root "^1.1.0" - source-map "^0.5.7" - stylis "4.0.13" - "@emotion/babel-preset-css-prop@^11.10.0": version "11.10.0" resolved "https://registry.yarnpkg.com/@emotion/babel-preset-css-prop/-/babel-preset-css-prop-11.10.0.tgz#23922787561d8376782b0e9006323512fe797275" @@ -1771,7 +1742,7 @@ "@emotion/utils" "0.11.3" "@emotion/weak-memoize" "0.2.5" -"@emotion/cache@^11.10.0", "@emotion/cache@^11.10.3": +"@emotion/cache@^11.10.0", "@emotion/cache@^11.10.3", "@emotion/cache@^11.4.0": version "11.10.3" resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.10.3.tgz#c4f67904fad10c945fea5165c3a5a0583c164b87" integrity sha512-Psmp/7ovAa8appWh3g51goxu/z3iVms7JXOreq136D8Bbn6dYraPnmL6mdM8GThEx9vwSn92Fz+mGSjBzN8UPQ== @@ -1782,17 +1753,6 @@ "@emotion/weak-memoize" "^0.3.0" stylis "4.0.13" -"@emotion/cache@^11.4.0", "@emotion/cache@^11.9.3": - version "11.9.3" - resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.9.3.tgz#96638449f6929fd18062cfe04d79b29b44c0d6cb" - integrity sha512-0dgkI/JKlCXa+lEXviaMtGBL0ynpx4osh7rjOXE71q9bIF8G+XhJgvi+wDu0B0IdCVx37BffiwXlN9I3UuzFvg== - dependencies: - "@emotion/memoize" "^0.7.4" - "@emotion/sheet" "^1.1.1" - "@emotion/utils" "^1.0.0" - "@emotion/weak-memoize" "^0.2.5" - stylis "4.0.13" - "@emotion/core@^10.0.9": version "10.1.1" resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.1.1.tgz#c956c1365f2f2481960064bcb8c4732e5fb612c3" @@ -1833,7 +1793,7 @@ "@emotion/sheet" "^1.2.0" "@emotion/utils" "^1.2.0" -"@emotion/hash@0.8.0", "@emotion/hash@^0.8.0": +"@emotion/hash@0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== @@ -1866,17 +1826,12 @@ resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== -"@emotion/memoize@^0.7.4", "@emotion/memoize@^0.7.5": - version "0.7.5" - resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.5.tgz#2c40f81449a4e554e9fc6396910ed4843ec2be50" - integrity sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ== - "@emotion/memoize@^0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.0.tgz#f580f9beb67176fa57aae70b08ed510e1b18980f" integrity sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA== -"@emotion/react@^11.10.4": +"@emotion/react@^11.10.4", "@emotion/react@^11.8.1": version "11.10.4" resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.10.4.tgz#9dc6bccbda5d70ff68fdb204746c0e8b13a79199" integrity sha512-j0AkMpr6BL8gldJZ6XQsQ8DnS9TxEQu1R+OGmDZiWjBAJtCcbt0tS3I/YffoqHXxH6MjgI7KdMbYKw3MEiU9eA== @@ -1890,19 +1845,6 @@ "@emotion/weak-memoize" "^0.3.0" hoist-non-react-statics "^3.3.1" -"@emotion/react@^11.8.1": - version "11.9.3" - resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.9.3.tgz#f4f4f34444f6654a2e550f5dab4f2d360c101df9" - integrity sha512-g9Q1GcTOlzOEjqwuLF/Zd9LC+4FljjPjDfxSM7KmEakm+hsHXk+bYZ2q+/hTJzr0OUNkujo72pXLQvXj6H+GJQ== - dependencies: - "@babel/runtime" "^7.13.10" - "@emotion/babel-plugin" "^11.7.1" - "@emotion/cache" "^11.9.3" - "@emotion/serialize" "^1.0.4" - "@emotion/utils" "^1.1.0" - "@emotion/weak-memoize" "^0.2.5" - hoist-non-react-statics "^3.3.1" - "@emotion/serialize@^0.11.15", "@emotion/serialize@^0.11.16": version "0.11.16" resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.16.tgz#dee05f9e96ad2fb25a5206b6d759b2d1ed3379ad" @@ -1914,17 +1856,6 @@ "@emotion/utils" "0.11.3" csstype "^2.5.7" -"@emotion/serialize@^1.0.2", "@emotion/serialize@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.0.4.tgz#ff31fd11bb07999611199c2229e152faadc21a3c" - integrity sha512-1JHamSpH8PIfFwAMryO2bNka+y8+KA5yga5Ocf2d7ZEiJjb7xlLW7aknBGZqJLajuLOvJ+72vN+IBSwPlXD1Pg== - dependencies: - "@emotion/hash" "^0.8.0" - "@emotion/memoize" "^0.7.4" - "@emotion/unitless" "^0.7.5" - "@emotion/utils" "^1.0.0" - csstype "^3.0.2" - "@emotion/serialize@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.1.0.tgz#b1f97b1011b09346a40e9796c37a3397b4ea8ea8" @@ -1951,11 +1882,6 @@ resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.4.tgz#894374bea39ec30f489bbfc3438192b9774d32e5" integrity sha512-zM9PFmgVSqBw4zL101Q0HrBVTGmpAxFZH/pYx/cjJT5advXguvcgjHFTCaIO3enL/xr89vK2bh0Mfyj9aa0ANA== -"@emotion/sheet@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.1.1.tgz#015756e2a9a3c7c5f11d8ec22966a8dbfbfac787" - integrity sha512-J3YPccVRMiTZxYAY0IOq3kd+hUP8idY8Kz6B/Cyo+JuXq52Ek+zbPbSQUrVQp95aJ+lsAW7DPL1P2Z+U1jGkKA== - "@emotion/sheet@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.2.0.tgz#771b1987855839e214fc1741bde43089397f7be5" @@ -1966,7 +1892,7 @@ resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== -"@emotion/unitless@0.7.5", "@emotion/unitless@^0.7.4", "@emotion/unitless@^0.7.5": +"@emotion/unitless@0.7.5", "@emotion/unitless@^0.7.4": version "0.7.5" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== @@ -1986,17 +1912,12 @@ resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.3.tgz#a759863867befa7e583400d322652a3f44820924" integrity sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw== -"@emotion/utils@^1.0.0", "@emotion/utils@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.1.0.tgz#86b0b297f3f1a0f2bdb08eeac9a2f49afd40d0cf" - integrity sha512-iRLa/Y4Rs5H/f2nimczYmS5kFJEbpiVvgN3XVfZ022IYhuNA1IRSHEizcof88LtCTXtl9S2Cxt32KgaXEu72JQ== - "@emotion/utils@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.2.0.tgz#9716eaccbc6b5ded2ea5a90d65562609aab0f561" integrity sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw== -"@emotion/weak-memoize@0.2.5", "@emotion/weak-memoize@^0.2.5": +"@emotion/weak-memoize@0.2.5": version "0.2.5" resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== @@ -10564,7 +10485,7 @@ babel-plugin-jest-hoist@^26.6.2: "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" -babel-plugin-macros@^2.0.0, babel-plugin-macros@^2.6.1: +babel-plugin-macros@^2.0.0: version "2.8.0" resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== @@ -12280,10 +12201,10 @@ 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.25.1, core-js@^3.6.5, core-js@^3.8.2, core-js@^3.8.3: - version "3.25.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.25.1.tgz#5818e09de0db8956e16bf10e2a7141e931b7c69c" - integrity sha512-sr0FY4lnO1hkQ4gLDr24K0DGnweGO1QwSj5BpfQjpSJPdqWalja4cTps29Y/PJVG/P7FYlPDkH3hO+Tr0CvDgQ== +core-js@^3.0.4, core-js@^3.25.5, core-js@^3.6.5, core-js@^3.8.2, core-js@^3.8.3: + version "3.25.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.25.5.tgz#e86f651a2ca8a0237a5f064c2fe56cef89646e27" + integrity sha512-nbm6eZSjm+ZuBQxCUPQKQCoUEfFOXjUZ8dTTyikyKaWrTYmAVbykQfwsKE5dBK88u3QCkCrzsx/PPlKfhsvgpw== core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -15543,12 +15464,7 @@ folktale@2.3.2: resolved "https://registry.yarnpkg.com/folktale/-/folktale-2.3.2.tgz#38231b039e5ef36989920cbf805bf6b227bf4fd4" integrity sha512-+8GbtQBwEqutP0v3uajDDoN64K2ehmHd0cjlghhxh0WpcfPzAIjPA03e1VvHlxL02FVGR0A6lwXsNQKn3H1RNQ== -follow-redirects@^1.0.0, follow-redirects@^1.14.0, follow-redirects@^1.14.9: - version "1.15.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.0.tgz#06441868281c86d0dda4ad8bdaead2d02dca89d4" - integrity sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ== - -follow-redirects@^1.15.0: +follow-redirects@^1.0.0, follow-redirects@^1.14.0, follow-redirects@^1.14.9, follow-redirects@^1.15.0: version "1.15.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== @@ -29335,20 +29251,7 @@ yargs@^15.0.2, yargs@^15.3.1, yargs@^15.4.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^17.0.1, yargs@^17.2.1, yargs@~17.5.1: - version "17.5.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" - integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.0.0" - -yargs@^17.6.0: +yargs@^17.0.1, yargs@^17.2.1, yargs@^17.6.0: version "17.6.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.6.0.tgz#e134900fc1f218bc230192bdec06a0a5f973e46c" integrity sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g== @@ -29374,6 +29277,19 @@ yargs@^3.15.0: window-size "^0.1.4" y18n "^3.2.0" +yargs@~17.5.1: + version "17.5.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" + integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.0.0" + yauzl@^2.10.0: version "2.10.0" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"