File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
x-pack/plugins/observability/public/components/shared/exploratory_view/configurations Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -230,15 +230,20 @@ export class LensAttributes {
230
230
alphabeticOrder ?: boolean ;
231
231
size ?: number ;
232
232
} ) : TermsIndexPatternColumn {
233
- const { dataView, seriesConfig } = layerConfig ;
233
+ const { dataView, seriesConfig, selectedMetricField } = layerConfig ;
234
234
235
235
const fieldMeta = dataView . getFieldByName ( sourceField ) ;
236
-
236
+ const { metricOptions } = seriesConfig ;
237
237
const { sourceField : yAxisSourceField } = seriesConfig . yAxisColumns [ 0 ] ;
238
238
239
239
const labels = seriesConfig . labels ?? { } ;
240
240
241
- const isFormulaColumn = yAxisSourceField === RECORDS_PERCENTAGE_FIELD ;
241
+ const isFormulaColumn =
242
+ Boolean (
243
+ metricOptions &&
244
+ ( metricOptions . find ( ( option ) => option . id === selectedMetricField ) as MetricOption )
245
+ ?. formula
246
+ ) || yAxisSourceField === RECORDS_PERCENTAGE_FIELD ;
242
247
243
248
let orderBy : TermColumnParamsOrderBy = {
244
249
type : 'column' ,
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ export function getSyntheticsKPIConfig({ dataView }: ConfigProps): SeriesConfig
93
93
label : 'Monitor availability' ,
94
94
id : 'monitor_availability' ,
95
95
columnType : FORMULA_COLUMN ,
96
- formula : "1- (count(kql='summary.down > 0') / count())" ,
96
+ formula : "1- (count(kql='summary.down > 0') / count(kql='summary: *' ))" ,
97
97
} ,
98
98
{
99
99
label : 'Monitor Errors' ,
You can’t perform that action at this time.
0 commit comments