Przeglądaj źródła

Prometheus: Fix actual step computation logic when a min_step is specified and the range is longer than min_step * 11000.

Alin Sinpalean 8 lat temu
rodzic
commit
84c6caabc5

+ 1 - 1
public/app/plugins/datasource/prometheus/datasource.ts

@@ -128,7 +128,7 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS
     // Prometheus drop query if range/step > 11000
     // Prometheus drop query if range/step > 11000
     // calibrate step if it is too big
     // calibrate step if it is too big
     if (step !== 0 && range / step > 11000) {
     if (step !== 0 && range / step > 11000) {
-      return Math.ceil(range / 11000);
+      step = Math.ceil(range / 11000);
     }
     }
     return Math.max(step, autoStep);
     return Math.max(step, autoStep);
   };
   };