Align queries to prometheus with the step to ensure 'rate' type expressions get consistent results

This commit is contained in:
Craig Miskell
2018-01-05 09:08:40 +13:00
parent ccf1a5124b
commit 61e6f63b32
@@ -173,6 +173,9 @@ export class PrometheusDatasource {
throw { message: 'Invalid time range' };
}
start = start - (start % query.step);
end = end - (end % query.step) + query.step;
var url =
'/api/v1/query_range?query=' +
encodeURIComponent(query.expr) +