mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 23:55:47 -06:00
merge PR #390
This commit is contained in:
commit
adaf9cbc90
@ -62,16 +62,10 @@ 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,
|
||||
@ -99,7 +93,7 @@ function (angular, _, kbn) {
|
||||
};
|
||||
|
||||
InfluxDatasource.prototype.listColumns = function(seriesName) {
|
||||
return this.doInfluxRequest('select * from ' + seriesName + ' limit 1').then(function(data) {
|
||||
return this.doInfluxRequest('select * from "' + seriesName + '" limit 1').then(function(data) {
|
||||
if (!data) {
|
||||
return [];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user