Grafana Schema: Extend the VariableHide enum (#110579)
* feat: extend the `VariableHide` enum with a new option * feat: extend the `VariableHide` for v1
This commit is contained in:
@@ -243,8 +243,8 @@ lineage: schemas: [{
|
||||
#VariableRefresh: 0 | 1 | 2 @cuetsy(kind="enum",memberNames="never|onDashboardLoad|onTimeRangeChanged")
|
||||
|
||||
// Determine if the variable shows on dashboard
|
||||
// Accepted values are 0 (show label and value), 1 (show value only), 2 (show nothing).
|
||||
#VariableHide: 0 | 1 | 2 @cuetsy(kind="enum",memberNames="dontHide|hideLabel|hideVariable") @grafana(TSVeneer="type")
|
||||
// Accepted values are 0 (show label and value), 1 (show value only), 2 (show nothing), 3 (show under the controls dropdown menu).
|
||||
#VariableHide: 0 | 1 | 2 | 3 @cuetsy(kind="enum",memberNames="dontHide|hideLabel|hideVariable|inControlsMenu") @grafana(TSVeneer="type")
|
||||
|
||||
// Sort variable options
|
||||
// Accepted values are:
|
||||
|
||||
@@ -243,8 +243,8 @@ lineage: schemas: [{
|
||||
#VariableRefresh: 0 | 1 | 2 @cuetsy(kind="enum",memberNames="never|onDashboardLoad|onTimeRangeChanged")
|
||||
|
||||
// Determine if the variable shows on dashboard
|
||||
// Accepted values are 0 (show label and value), 1 (show value only), 2 (show nothing).
|
||||
#VariableHide: 0 | 1 | 2 @cuetsy(kind="enum",memberNames="dontHide|hideLabel|hideVariable") @grafana(TSVeneer="type")
|
||||
// Accepted values are 0 (show label and value), 1 (show value only), 2 (show nothing), 3 (show under the controls dropdown menu).
|
||||
#VariableHide: 0 | 1 | 2 | 3 @cuetsy(kind="enum",memberNames="dontHide|hideLabel|hideVariable|inControlsMenu") @grafana(TSVeneer="type")
|
||||
|
||||
// Sort variable options
|
||||
// Accepted values are:
|
||||
|
||||
@@ -688,8 +688,8 @@ VariableSort: "disabled" | "alphabeticalAsc" | "alphabeticalDesc" | "numericalAs
|
||||
VariableRefresh: *"never" | "onDashboardLoad" | "onTimeRangeChanged"
|
||||
|
||||
// Determine if the variable shows on dashboard
|
||||
// Accepted values are `dontHide` (show label and value), `hideLabel` (show value only), `hideVariable` (show nothing).
|
||||
VariableHide: *"dontHide" | "hideLabel" | "hideVariable"
|
||||
// Accepted values are `dontHide` (show label and value), `hideLabel` (show value only), `hideVariable` (show nothing), `inControlsMenu` (show in a drop-down menu).
|
||||
VariableHide: *"dontHide" | "hideLabel" | "hideVariable" | "inControlsMenu"
|
||||
|
||||
// Determine the origin of the adhoc variable filter
|
||||
FilterOrigin: "dashboard"
|
||||
|
||||
@@ -1282,14 +1282,15 @@ func NewDashboardVariableOption() *DashboardVariableOption {
|
||||
}
|
||||
|
||||
// Determine if the variable shows on dashboard
|
||||
// Accepted values are `dontHide` (show label and value), `hideLabel` (show value only), `hideVariable` (show nothing).
|
||||
// Accepted values are `dontHide` (show label and value), `hideLabel` (show value only), `hideVariable` (show nothing), `inControlsMenu` (show in a drop-down menu).
|
||||
// +k8s:openapi-gen=true
|
||||
type DashboardVariableHide string
|
||||
|
||||
const (
|
||||
DashboardVariableHideDontHide DashboardVariableHide = "dontHide"
|
||||
DashboardVariableHideHideLabel DashboardVariableHide = "hideLabel"
|
||||
DashboardVariableHideHideVariable DashboardVariableHide = "hideVariable"
|
||||
DashboardVariableHideDontHide DashboardVariableHide = "dontHide"
|
||||
DashboardVariableHideHideLabel DashboardVariableHide = "hideLabel"
|
||||
DashboardVariableHideHideVariable DashboardVariableHide = "hideVariable"
|
||||
DashboardVariableHideInControlsMenu DashboardVariableHide = "inControlsMenu"
|
||||
)
|
||||
|
||||
// Options to config when to refresh a variable
|
||||
|
||||
Reference in New Issue
Block a user