Explorar o código

heatmap: fix middle bucket bound for prometheus

Alexander Zobnin %!s(int64=7) %!d(string=hai) anos
pai
achega
2085397f31
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      public/app/plugins/panel/heatmap/heatmap_ctrl.ts

+ 4 - 1
public/app/plugins/panel/heatmap/heatmap_ctrl.ts

@@ -231,7 +231,10 @@ export class HeatmapCtrl extends MetricsPanelCtrl {
 
     tsBuckets = _.map(this.series, 'label');
     const yBucketBound = this.panel.yBucketBound;
-    if ((panelDatasource === 'prometheus' && yBucketBound !== 'lower') || yBucketBound === 'upper') {
+    if (
+      (panelDatasource === 'prometheus' && yBucketBound !== 'lower' && yBucketBound !== 'middle') ||
+      yBucketBound === 'upper'
+    ) {
       // Prometheus labels are upper inclusive bounds, so add empty bottom bucket label.
       tsBuckets = [''].concat(tsBuckets);
     } else {