diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/constants.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/constants.ts index 7c80bf4e7afb6..e1142a071aab5 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/constants.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/constants.ts @@ -12,6 +12,7 @@ import { BROWSER_FAMILY_LABEL, BROWSER_VERSION_LABEL, CLS_LABEL, + CORE_WEB_VITALS_LABEL, CPU_USAGE_LABEL, DEVICE_LABEL, ENVIRONMENT_LABEL, @@ -92,6 +93,7 @@ export const DataViewLabels: Record = { logs: LOGS_FREQUENCY_LABEL, mem: MEMORY_USAGE_LABEL, nwk: NETWORK_ACTIVITY_LABEL, + cwv: CORE_WEB_VITALS_LABEL, }; export const ReportToDataTypeMap: Record = { @@ -105,6 +107,7 @@ export const ReportToDataTypeMap: Record = { mem: 'infra_metrics', logs: 'infra_logs', cpu: 'infra_metrics', + cwv: 'ux', }; export const USE_BREAK_DOWN_COLUMN = 'USE_BREAK_DOWN_COLUMN'; diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/labels.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/labels.ts index ba820a25f868a..92150a76319f8 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/labels.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/labels.ts @@ -200,6 +200,14 @@ export const NETWORK_ACTIVITY_LABEL = i18n.translate( defaultMessage: 'Network activity', } ); + +export const CORE_WEB_VITALS_LABEL = i18n.translate( + 'xpack.observability.expView.fieldLabels.coreWebVitals', + { + defaultMessage: 'Core web vitals', + } +); + export const MEMORY_USAGE_LABEL = i18n.translate( 'xpack.observability.expView.fieldLabels.memoryUsage', { diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_builder/columns/report_definition_col.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_builder/columns/report_definition_col.tsx index 43be687760fa4..ff8b0f7aa578b 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_builder/columns/report_definition_col.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_builder/columns/report_definition_col.tsx @@ -68,7 +68,7 @@ export function ReportDefinitionCol({ {indexPattern && - reportDefinitions.map(({ field, custom, options, defaultValue }) => ( + reportDefinitions.map(({ field, custom, options }) => ( {!custom ? ( ) : ( - + )} ))} diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_builder/custom_report_field.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_builder/custom_report_field.tsx index a94664aa7067d..2299d5871a275 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_builder/custom_report_field.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_builder/custom_report_field.tsx @@ -17,7 +17,7 @@ interface Props { options: ReportDefinition['options']; } -export function CustomReportField({ field, seriesId, options: opts, defaultValue }: Props) { +export function CustomReportField({ field, seriesId, options: opts }: Props) { const { series, setSeries } = useUrlStorage(seriesId); const { reportDefinitions: rtd = {} } = series; @@ -39,7 +39,7 @@ export function CustomReportField({ field, seriesId, options: opts, defaultValue value: fd || id, inputDisplay: label, }))} - valueOfSelected={reportDefinitions?.[field]?.[0] || defaultValue || options?.[0].field} + valueOfSelected={reportDefinitions?.[field]?.[0] || options?.[0].field} onChange={(value) => onChange(value)} /> ); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/chart_edit_options.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/chart_edit_options.tsx index c95d322748607..4bef3e8f71821 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/chart_edit_options.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/chart_edit_options.tsx @@ -20,7 +20,7 @@ export function ChartEditOptions({ series, seriesId, breakdowns }: Props) { return ( - + diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/breakdowns.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/breakdowns.tsx index 2b0da37cc243f..5cf6ac47aa8c7 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/breakdowns.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/breakdowns.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiSuperSelect } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { FieldLabels, USE_BREAK_DOWN_COLUMN } from '../../configurations/constants'; +import { USE_BREAK_DOWN_COLUMN } from '../../configurations/constants'; import { useUrlStorage } from '../../hooks/use_url_storage'; import { DataSeries } from '../../types';