From 498ab849e496641d8a7fa87ecdeccba9d76f88cc Mon Sep 17 00:00:00 2001 From: Josh Hunt Date: Tue, 24 Jun 2025 18:13:46 +0100 Subject: [PATCH] Cue: Add 'Join' variable format (#107129) Add Join variable format --- packages/grafana-schema/src/common/common.gen.ts | 1 + packages/grafana-schema/src/common/variables.cue | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/grafana-schema/src/common/common.gen.ts b/packages/grafana-schema/src/common/common.gen.ts index 3ece6c59d7a..7986476fa56 100644 --- a/packages/grafana-schema/src/common/common.gen.ts +++ b/packages/grafana-schema/src/common/common.gen.ts @@ -862,6 +862,7 @@ export enum VariableFormatID { Glob = 'glob', HTML = 'html', JSON = 'json', + Join = 'join', Lucene = 'lucene', PercentEncode = 'percentencode', Pipe = 'pipe', diff --git a/packages/grafana-schema/src/common/variables.cue b/packages/grafana-schema/src/common/variables.cue index e16db2f54a1..2c161ee06ea 100644 --- a/packages/grafana-schema/src/common/variables.cue +++ b/packages/grafana-schema/src/common/variables.cue @@ -3,6 +3,8 @@ package common // Optional formats for the template variable replace functions // See also https://grafana.com/docs/grafana/latest/dashboards/variables/variable-syntax/#advanced-variable-format-options VariableFormatID: + // Values are joined with a separator + "join" | // Values are lucene escaped and multi-valued variables generate an OR expression "lucene" | // Raw values @@ -36,4 +38,4 @@ VariableFormatID: // Format variables in their text representation. Example in multi-variable scenario A + B + C. "text" | // Format variables as URL parameters. Example in multi-variable scenario A + B + C => var-foo=A&var-foo=B&var-foo=C. - "queryparam" @cuetsy(kind="enum",memberNames="Lucene|Raw|Regex|Pipe|Distributed|CSV|HTML|JSON|PercentEncode|UriEncode|SingleQuote|DoubleQuote|SQLString|Date|Glob|Text|QueryParam") + "queryparam" @cuetsy(kind="enum",memberNames="Join|Lucene|Raw|Regex|Pipe|Distributed|CSV|HTML|JSON|PercentEncode|UriEncode|SingleQuote|DoubleQuote|SQLString|Date|Glob|Text|QueryParam")