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

This commit is contained in:
Alin Sinpalean
2017-08-29 09:57:45 +02:00
committed by Torkel Ödegaard
parent aef4eca254
commit bdd239e933

View File

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