GroupByVariable: Add support for default values in schema (#105518)

* update schema

* update schema

* refactor property to singular naming

* bump scenes

* leave scenes to caret version

* add defaultValue to groupBy model

* typo
This commit is contained in:
Victor Marin
2025-05-23 01:13:52 +03:00
committed by GitHub
parent 7e1c5a37e5
commit 5cee301e75
7 changed files with 23 additions and 17 deletions
@@ -878,6 +878,7 @@ CustomVariableKind: {
GroupByVariableSpec: {
name: string | *""
datasource?: DataSourceRef
defaultValue?: VariableOption
current: VariableOption | *{
text: ""
value: ""
@@ -1601,15 +1601,16 @@ func NewDashboardGroupByVariableKind() *DashboardGroupByVariableKind {
// GroupBy variable specification
// +k8s:openapi-gen=true
type DashboardGroupByVariableSpec struct {
Name string `json:"name"`
Datasource *DashboardDataSourceRef `json:"datasource,omitempty"`
Current DashboardVariableOption `json:"current"`
Options []DashboardVariableOption `json:"options"`
Multi bool `json:"multi"`
Label *string `json:"label,omitempty"`
Hide DashboardVariableHide `json:"hide"`
SkipUrlSync bool `json:"skipUrlSync"`
Description *string `json:"description,omitempty"`
Name string `json:"name"`
Datasource *DashboardDataSourceRef `json:"datasource,omitempty"`
DefaultValue *DashboardVariableOption `json:"defaultValue,omitempty"`
Current DashboardVariableOption `json:"current"`
Options []DashboardVariableOption `json:"options"`
Multi bool `json:"multi"`
Label *string `json:"label,omitempty"`
Hide DashboardVariableHide `json:"hide"`
SkipUrlSync bool `json:"skipUrlSync"`
Description *string `json:"description,omitempty"`
}
// NewDashboardGroupByVariableSpec creates a new DashboardGroupByVariableSpec object.