mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 20:24:18 -06:00
parent
5c1833de1f
commit
26ec874fb1
@ -28,8 +28,8 @@ function (angular, _, dateMath) {
|
||||
|
||||
_.each(options.targets, function(target) {
|
||||
if (!target.metric) { return; }
|
||||
qs.push(convertTargetToQuery(target, options));
|
||||
});
|
||||
qs.push(convertTargetToQuery(target, options, this.tsdbVersion));
|
||||
}.bind(this));
|
||||
|
||||
var queries = _.compact(qs);
|
||||
|
||||
@ -366,7 +366,7 @@ function (angular, _, dateMath) {
|
||||
return label;
|
||||
}
|
||||
|
||||
function convertTargetToQuery(target, options) {
|
||||
function convertTargetToQuery(target, options, tsdbVersion) {
|
||||
if (!target.metric || target.hide) {
|
||||
return null;
|
||||
}
|
||||
@ -393,6 +393,11 @@ function (angular, _, dateMath) {
|
||||
if (target.counterResetValue && target.counterResetValue.length) {
|
||||
query.rateOptions.resetValue = parseInt(target.counterResetValue);
|
||||
}
|
||||
|
||||
if(tsdbVersion >= 2) {
|
||||
query.rateOptions.dropResets = !query.rateOptions.counterMax &&
|
||||
(!query.rateOptions.ResetValue || query.rateOptions.ResetValue === 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (!target.disableDownsampling) {
|
||||
|
Loading…
Reference in New Issue
Block a user