Browse Source

Change InfluxDB SQL generation template to wrap column names in quoutes

Since column names can contain dots or dashes, which will give syntax errors from InfluxDB API, unless wrapped in quoutes
Joakim Bodin 11 năm trước cách đây
mục cha
commit
11446b3e53
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/app/services/influxdb/influxdbDatasource.js

+ 1 - 1
src/app/services/influxdb/influxdbDatasource.js

@@ -62,7 +62,7 @@ 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";