mirror of
https://github.com/grafana/grafana.git
synced 2025-01-18 04:23:33 -06:00
OpenTSDB: Fixed issue with auto interval variable going below 1s, Fixes #1325
This commit is contained in:
parent
2c5f19253c
commit
a5fd40ed80
@ -26,9 +26,6 @@ function (angular, _, kbn) {
|
||||
var end = convertToTSDBTime(options.range.to);
|
||||
var qs = [];
|
||||
|
||||
if (options.interval.match(/\.[0-9]+s/)) {
|
||||
options.interval = parseFloat(options.interval)*1000 + "ms";
|
||||
}
|
||||
_.each(options.targets, function(target) {
|
||||
qs.push(convertTargetToQuery(target, options.interval));
|
||||
});
|
||||
@ -158,8 +155,13 @@ function (angular, _, kbn) {
|
||||
}
|
||||
|
||||
if (!target.disableDownsampling) {
|
||||
var buf = target.downsampleInterval || interval;
|
||||
query.downsample = templateSrv.replace(buf) + "-" + target.downsampleAggregator;
|
||||
interval = templateSrv.replace(target.downsampleInterval || interval);
|
||||
|
||||
if (interval.match(/\.[0-9]+s/)) {
|
||||
interval = parseFloat(interval)*1000 + "ms";
|
||||
}
|
||||
|
||||
query.downsample = interval + "-" + target.downsampleAggregator;
|
||||
}
|
||||
|
||||
query.tags = angular.copy(target.tags);
|
||||
|
Loading…
Reference in New Issue
Block a user