Explorar o código

fix(influxdb): fixed issue with backslash escaping in tag filter, fixes #5249

Torkel Ödegaard %!s(int64=9) %!d(string=hai) anos
pai
achega
acbaef1907
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      public/app/plugins/datasource/influxdb/influx_query.ts

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

@@ -153,7 +153,7 @@ export default class InfluxQuery {
         value = this.templateSrv.replace(value, this.scopedVars);
       }
       if (operator !== '>' && operator !== '<') {
-        value = "'" + value.replace('\\', '\\\\') + "'";
+        value = "'" + value.replace(/\\/g, '\\\\') + "'";
       }
     } else if (interpolate){
       value = this.templateSrv.replace(value, this.scopedVars, 'regex');