Closed zarbis closed 5 years ago
I don't think the suggested change is necessary, because you can control how Grafana embeds variable using :pipe suffix, like this:
r.host =~ /^${host:pipe}$/
@nikolay-t yeah, sure you can, but does "only working version" not qualify for sensible default?
Agreed on using pipe as default.
If when trying to use variables in queries, they are expanded in format that Flux doesn't expect, even if those variables were defined with Flux query themselves.
For example, if I use it to filter:
Variable will be expanded into
{foo,bar,baz}
while Flux expects Go-style regex like/^(foo|bar|baz)$/
.Also single choice variable will be expanded without double quotes, which also breaks Flux query. One cannot just blindly wrap variable in quotes themselves
"$source"
since if this variable has multiple/all checkboxes - it will break Go-style regex. Not sure how to deal with this one.Grafana: 5.4.0 Flux Datasource: 5.2.6