mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
dont quote numbers for influxdb, closes #4163
This commit is contained in:
parent
75555c470b
commit
b6de656cf1
@ -152,7 +152,9 @@ export default class InfluxQuery {
|
|||||||
if (interpolate) {
|
if (interpolate) {
|
||||||
value = this.templateSrv.replace(value, this.scopedVars);
|
value = this.templateSrv.replace(value, this.scopedVars);
|
||||||
}
|
}
|
||||||
value = "'" + value.replace('\\', '\\\\') + "'";
|
if (isNaN(+value)) {
|
||||||
|
value = "'" + value.replace('\\', '\\\\') + "'";
|
||||||
|
}
|
||||||
} else if (interpolate){
|
} else if (interpolate){
|
||||||
value = this.templateSrv.replace(value, this.scopedVars, 'regex');
|
value = this.templateSrv.replace(value, this.scopedVars, 'regex');
|
||||||
}
|
}
|
||||||
|
@ -25,8 +25,8 @@ function (_) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// quote value unless regex
|
// quote value unless regex or number
|
||||||
if (operator !== '=~' && operator !== '!~') {
|
if (operator !== '=~' && operator !== '!~' && isNaN(+value)) {
|
||||||
value = "'" + value + "'";
|
value = "'" + value + "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user