浏览代码

fix(influxdb): fixed annotation queries containting template variables, fixes #4602

Torkel Ödegaard 9 年之前
父节点
当前提交
262c341bdc
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      CHANGELOG.md
  2. 1 1
      public/app/plugins/datasource/influxdb/datasource.ts

+ 1 - 0
CHANGELOG.md

@@ -10,6 +10,7 @@
 * **Graph Panel**: Fixed legend option max not updating, fixes [#4601](https://github.com/grafana/grafana/issues/4601)
 * **Graph Panel**: Fixed issue where newly added graph panels shared same axes config, fixes [#4582](https://github.com/grafana/grafana/issues/4582)
 * **Graph Panel**: Fixed issue with axis labels overlapping Y-axis, fixes [#4626](https://github.com/grafana/grafana/issues/4626)
+* **InfluxDB**: Fixed issue with templating query containing template variable, fixes [#4602](https://github.com/grafana/grafana/issues/4602)
 
 # 3.0.0-beta2 (2016-04-04)
 

+ 1 - 1
public/app/plugins/datasource/influxdb/datasource.ts

@@ -107,7 +107,7 @@ export default class InfluxDatasource {
 
     var timeFilter = this.getTimeFilter({rangeRaw: options.rangeRaw});
     var query = options.annotation.query.replace('$timeFilter', timeFilter);
-    query = this.templateSrv.replace(query);
+    query = this.templateSrv.replace(query, null, 'regex');
 
     return this._seriesQuery(query).then(data => {
       if (!data || !data.results || !data.results[0]) {