Преглед изворни кода

heatmap: fix middle bucket bound for prometheus

Alexander Zobnin пре 7 година
родитељ
комит
2085397f31
1 измењених фајлова са 4 додато и 1 уклоњено
  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 {