template_srv.test.ts
17.5 KB
-
Fix: Avoid glob of single-value array variables (#18420) · b424e12a
* Fix: Avoid glob of single-value array variables Based on our current implementation of templates, when multi-select variables are part of a dashboard query the default/fallback formatting option is `glob`. Some data sources do not support glob (e.g. metrics.{a}.* instead of metrics.a.*) for single variable queries. This behaviour breaks dashboards. This commit introduces an alternative formatting option where globing is avoided if it's there is only one value as part of the query variable. This means, queries previously formatted as `query=metrics.{a}.*.*`, are now formatted as `query=metrics.a.*.*`. However, queries formatted as `query=metrics.{a,b}.*.*` continue to be as is.
gotjosh committed