Skip to content

Commit

Permalink
fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed May 19, 2021
1 parent 1094c28 commit fc6a553
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -69,7 +68,7 @@ export function ReportDefinitionCol({
</EuiFlexItem>
<EuiHorizontalRule margin="xs" />
{indexPattern &&
reportDefinitions.map(({ field, custom, options }) => (
reportDefinitions.map(({ field, custom, options, defaultValue }) => (
<EuiFlexItem key={field}>
{!custom ? (
<ReportDefinitionField
Expand Down Expand Up @@ -97,7 +96,11 @@ export function ReportDefinitionCol({
</EuiFlexItem>
)}
<EuiFlexItem>
<SeriesChartTypesSelect seriesId={seriesId} defaultChartType={defaultSeriesType} seriesTypes={dataViewSeries.seriesTypes} />
<SeriesChartTypesSelect
seriesId={seriesId}
defaultChartType={defaultSeriesType}
seriesTypes={dataViewSeries.seriesTypes}
/>
</EuiFlexItem>
</FlexGroup>
);
Expand Down

0 comments on commit fc6a553

Please sign in to comment.