Commit 26ec874f by Pranay Kanwar Committed by Torkel Ödegaard

Frontend query changes corresponding #8336 (#8489)

parent 5c1833de
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment