Skip to content

Commit b440332

Browse files
committed
Fixing open in visualize for percentiles
1 parent a847cc5 commit b440332

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

  • x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers

x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,24 @@ export const metricsExplorerMetricToTSVBMetric = (metric: MetricsExplorerOptions
4646
field: derivativeId,
4747
},
4848
];
49+
} else if (metric.aggregation === 'p95' || metric.aggregation === 'p99') {
50+
const percentileValue = metric.aggregation === 'p95' ? '95' : '99';
51+
return [
52+
{
53+
id: uuid.v1(),
54+
type: 'percentile',
55+
field: metric.field,
56+
percentiles: [
57+
{
58+
id: uuid.v1(),
59+
value: percentileValue,
60+
mode: 'line',
61+
percentile: '',
62+
shade: 0.2,
63+
},
64+
],
65+
},
66+
];
4967
} else {
5068
return [
5169
{

0 commit comments

Comments
 (0)