template.custom does not support commas in values
Opened this issue · 0 comments
AndiDog commented
Here's a valid multi-value query for a custom variable that works in Grafana:
cluster="a"\,app="foo",cluster="b"\,app="foo"
which leads to 2 values cluster="a",app="foo"
and cluster="b",app="foo"
.
Unfortunately grafonnet's implementation does a simple split like this (code taken from grafonnet/template.libsonnet
):
query_array(query):: std.split(
if includeAll then 'All,' + query else query, ','
),
and therefore creates more than 2 values by accident.
This could either be fixed, or an options
field provided as alternative to query
?! The bug means that visualizations with variable repeat can't be nicely developed with grafonnet yet 😐