From bdd239e933085ef63a7a3f21403f6d331172fd05 Mon Sep 17 00:00:00 2001 From: Alin Sinpalean Date: Tue, 29 Aug 2017 09:57:45 +0200 Subject: [PATCH] Prometheus: Fix actual step computation logic when a min_step is specified and the range is longer than min_step * 11000. (#9109) --- public/app/plugins/datasource/prometheus/datasource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/prometheus/datasource.ts b/public/app/plugins/datasource/prometheus/datasource.ts index 36fc1e5de4b..9e416de44c7 100644 --- a/public/app/plugins/datasource/prometheus/datasource.ts +++ b/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 // 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); };