Commit 07610a5f by Torkel Ödegaard

small change to influxdb template to support older versions of influxdb

parent f4568ef5
......@@ -62,10 +62,16 @@ function (angular, _, kbn) {
query = queryElements.join(" ");
}
else {
var template = "select [[func]](\"[[column]]\") as \"[[column]]_[[func]]\" from [[series]] " +
var template = "select [[func]]([[column]]) as [[column]]_[[func]] from [[series]] " +
"where [[timeFilter]] [[condition_add]] [[condition_key]] [[condition_op]] [[condition_value]] " +
"group by time([[interval]]) order asc";
if (target.column.indexOf('-') !== -1 || target.column.indexOf('.') !== -1) {
template = "select [[func]](\"[[column]]\") as \"[[column]]_[[func]]\" from [[series]] " +
"where [[timeFilter]] [[condition_add]] [[condition_key]] [[condition_op]] [[condition_value]] " +
"group by time([[interval]]) order asc";
}
var templateData = {
series: target.series,
column: target.column,
......
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