DashboardSchema: Add options to VariableModel (#79236)

* Add includeAll and regex fields to VariableModel  #67639

* Add allValue option to VariableModel
This commit is contained in:
Denis
2024-01-23 10:56:20 -05:00
committed by GitHub
parent cbdbdf72e5
commit f7fd8e6cd1
4 changed files with 38 additions and 0 deletions
+10
View File
@@ -900,6 +900,9 @@ type VariableHide int
// A variable is a placeholder for a value. You can use variables in metric queries and in panel titles.
type VariableModel struct {
// Custom all value
AllValue *string `json:"allValue,omitempty"`
// Option to be selected in a variable.
Current *VariableOption `json:"current,omitempty"`
@@ -913,6 +916,9 @@ type VariableModel struct {
// Accepted values are 0 (show label and value), 1 (show value only), 2 (show nothing).
Hide *VariableHide `json:"hide,omitempty"`
// Whether all value option is available or not
IncludeAll *bool `json:"includeAll,omitempty"`
// Optional display name
Label *string `json:"label,omitempty"`
@@ -934,6 +940,10 @@ type VariableModel struct {
// `2`: Queries the data source when the dashboard time range changes.
Refresh *VariableRefresh `json:"refresh,omitempty"`
// Optional field, if you want to extract part of a series name or metric node segment.
// Named capture groups can be used to separate the display text and value.
Regex *string `json:"regex,omitempty"`
// Whether the variable value should be managed by URL query params or not
SkipUrlSync *bool `json:"skipUrlSync,omitempty"`