Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

template.custom does not support commas in values #325

Open
AndiDog opened this issue Apr 16, 2021 · 0 comments
Open

template.custom does not support commas in values #325

AndiDog opened this issue Apr 16, 2021 · 0 comments

Comments

@AndiDog
Copy link

AndiDog commented Apr 16, 2021

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 😐

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant