Commit 28f7806d by Teet Talviste

fix some linting problems

parent 72f6dc1e
...@@ -24,9 +24,9 @@ function (angular, _, kbn) { ...@@ -24,9 +24,9 @@ function (angular, _, kbn) {
OpenTSDBDatasource.prototype.query = function(options) { OpenTSDBDatasource.prototype.query = function(options) {
var start = convertToTSDBTime(options.range.from); var start = convertToTSDBTime(options.range.from);
var end = convertToTSDBTime(options.range.to); var end = convertToTSDBTime(options.range.to);
var qs = Array(); var qs = [];
if (options.interval.match(/\.[0-9]+s/)) { if (options.interval.match(/\.[0-9]+s/)) {
options.interval = parseFloat(options.interval)*1000 + "ms" options.interval = parseFloat(options.interval)*1000 + "ms";
} }
_.each(options.targets, function(target){ _.each(options.targets, function(target){
qs.push(convertTargetToQuery(target, options.interval)); qs.push(convertTargetToQuery(target, options.interval));
...@@ -157,7 +157,8 @@ function (angular, _, kbn) { ...@@ -157,7 +157,8 @@ function (angular, _, kbn) {
} }
if (target.shouldDownsample) { if (target.shouldDownsample) {
query.downsample = templateSrv.replace(target.downsampleInterval ? target.downsampleInterval : interval ) + "-" + target.downsampleAggregator; var buf = target.downsampleInterval || interval;
query.downsample = templateSrv.replace(buf) + "-" + target.downsampleAggregator;
} }
query.tags = angular.copy(target.tags); query.tags = angular.copy(target.tags);
......
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