You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 431e3eb
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: packages/api/src/mcp/prompts/dashboards/content.ts
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1222,6 +1222,7 @@ Only add one when the default is wrong. \${service:sqlstring} is redundant in a
1222
1222
sqlstring 'a', 'b' NULL the default in SQL inputs
1223
1223
lucene ("a" OR "b") ("") the default in Lucene inputs; ("") is a match-all, so no guard is needed
1224
1224
regex (a|b) .* use with match()
1225
+
promql a or (a|b) "" or .* the default in PromQL; a single-select variable (maxSelections: 1) renders its raw value for {label="$var"}, a multi-select one an escaped regex for {label=~"$var"}
1225
1226
csv a,b <empty> use INSIDE a string literal
1226
1227
markdown a, b <empty> the default in markdown tiles; markdown syntax in values is escaped
'An OR of quoted terms, for Lucene inputs. e.g. ("a" OR "b" OR "c"). Quote the reference (field:"$var") for exact-match behavior. Leave unquoted (field:$var) for substring matching.',
31
32
},
32
33
promql: {
34
+
promql:
35
+
'The default format, written out. A single-select variable renders its value as written, for {label="$var"}; a multi-select variable renders a regex alternation, for {label=~"$var"}. Escaped for the double-quoted string literal it sits in.',
33
36
regex:
34
-
'The default format, written out. A regex alternation, escaped for the string literal it sits in. e.g. (a|b|c)',
37
+
'A regex alternation, always regex escaped, and escaped for the double-quoted string literal it sits in. e.g. (a|b|c)',
35
38
csv: 'Comma-separated and unquoted, with no escaping.',
36
39
},
37
40
// Lucene inputs suggest only the bare `$name` reference.
@@ -186,7 +189,9 @@ function getPromqlVariableCompletions(
186
189
return[
187
190
reference(
188
191
`$${name}`,
189
-
`The selected values of ${name} as a regex alternation, for use inside a matcher such as {label=~"$${name}"}. Matches everything when nothing is selected.`,
192
+
isFilterSingleSelect(variable)
193
+
? `The selected value of ${name} as written, for use inside an exact matcher such as {label="$${name}"}. An empty string when nothing is selected.`
194
+
: `The selected values of ${name} as a regex alternation, for use inside a matcher such as {label=~"$${name}"}. Matches everything when nothing is selected.`,
0 commit comments