From fc6a5531b43aae40c6be52ab597fae5bf016f917 Mon Sep 17 00:00:00 2001 From: Shahzad Date: Wed, 19 May 2021 12:27:12 +0200 Subject: [PATCH] fix issues --- .../configurations/rum/core_web_vitals_config.ts | 8 ++++++++ .../series_builder/columns/report_definition_col.tsx | 11 +++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/core_web_vitals_config.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/core_web_vitals_config.ts index 96cf2fc69bf00..de9ea12be20cf 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/core_web_vitals_config.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/core_web_vitals_config.ts @@ -24,6 +24,7 @@ import { TRANSACTION_URL, USER_AGENT_OS_VERSION, URL_FULL, + SERVICE_ENVIRONMENT, } from '../constants/elasticsearch_fieldnames'; export function getCoreWebVitalsConfig({ seriesId, indexPattern }: ConfigProps): DataSeries { @@ -83,6 +84,13 @@ export function getCoreWebVitalsConfig({ seriesId, indexPattern }: ConfigProps): ], labels: { ...FieldLabels, [SERVICE_NAME]: 'Web Application' }, reportDefinitions: [ + { + field: SERVICE_NAME, + required: true, + }, + { + field: SERVICE_ENVIRONMENT, + }, { field: 'core.web.vitals', custom: true, 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 44fe07a4fd563..43be687760fa4 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 @@ -6,12 +6,11 @@ */ import React from 'react'; -import { EuiBadge, EuiFlexGroup, EuiFlexItem, EuiHorizontalRule } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule } from '@elastic/eui'; import styled from 'styled-components'; import { useAppIndexPatternContext } from '../../hooks/use_app_index_pattern'; import { useUrlStorage } from '../../hooks/use_url_storage'; import { CustomReportField } from '../custom_report_field'; -import FieldValueSuggestions from '../../../field_value_suggestions'; import { DataSeries, URLReportDefinition } from '../../types'; import { SeriesChartTypesSelect } from './chart_types'; import { OperationTypeSelect } from './operation_type_select'; @@ -69,7 +68,7 @@ export function ReportDefinitionCol({ {indexPattern && - reportDefinitions.map(({ field, custom, options }) => ( + reportDefinitions.map(({ field, custom, options, defaultValue }) => ( {!custom ? ( )} - + );