Schema: Change how origin filters are added to AdHocVariable (#106086)
* refactor origin filters schema * add canary version * update schema * fix failing tests * refactor * remove autogenerated import * tests * maintain only dashboard originated filters * refactor * refactor * Schema: Persist defaultValue for groupBy in schema (#106542) * persist defaultValue for groupBy in schema * fix * type * refactor * refactor * bump scenes
This commit is contained in:
@@ -696,8 +696,7 @@ VariableRefresh: *"never" | "onDashboardLoad" | "onTimeRangeChanged"
|
||||
VariableHide: *"dontHide" | "hideLabel" | "hideVariable"
|
||||
|
||||
// Determine the origin of the adhoc variable filter
|
||||
// Accepted values are `dashboard` (filter originated from dashboard), or `scope` (filter originated from scope).
|
||||
FilterOrigin: "dashboard" | "scope"
|
||||
FilterOrigin: "dashboard"
|
||||
|
||||
// FIXME: should we introduce this? --- Variable value option
|
||||
VariableValueOption: {
|
||||
|
||||
@@ -1673,14 +1673,14 @@ func NewDashboardAdhocVariableSpec() *DashboardAdhocVariableSpec {
|
||||
// Define the AdHocFilterWithLabels type
|
||||
// +k8s:openapi-gen=true
|
||||
type DashboardAdHocFilterWithLabels struct {
|
||||
Key string `json:"key"`
|
||||
Operator string `json:"operator"`
|
||||
Value string `json:"value"`
|
||||
Values []string `json:"values,omitempty"`
|
||||
KeyLabel *string `json:"keyLabel,omitempty"`
|
||||
ValueLabels []string `json:"valueLabels,omitempty"`
|
||||
ForceEdit *bool `json:"forceEdit,omitempty"`
|
||||
Origin *DashboardFilterOrigin `json:"origin,omitempty"`
|
||||
Key string `json:"key"`
|
||||
Operator string `json:"operator"`
|
||||
Value string `json:"value"`
|
||||
Values []string `json:"values,omitempty"`
|
||||
KeyLabel *string `json:"keyLabel,omitempty"`
|
||||
ValueLabels []string `json:"valueLabels,omitempty"`
|
||||
ForceEdit *bool `json:"forceEdit,omitempty"`
|
||||
Origin string `json:"origin,omitempty"`
|
||||
// @deprecated
|
||||
Condition *string `json:"condition,omitempty"`
|
||||
}
|
||||
@@ -1691,14 +1691,8 @@ func NewDashboardAdHocFilterWithLabels() *DashboardAdHocFilterWithLabels {
|
||||
}
|
||||
|
||||
// Determine the origin of the adhoc variable filter
|
||||
// Accepted values are `dashboard` (filter originated from dashboard), or `scope` (filter originated from scope).
|
||||
// +k8s:openapi-gen=true
|
||||
type DashboardFilterOrigin string
|
||||
|
||||
const (
|
||||
DashboardFilterOriginDashboard DashboardFilterOrigin = "dashboard"
|
||||
DashboardFilterOriginScope DashboardFilterOrigin = "scope"
|
||||
)
|
||||
const DashboardFilterOrigin = "dashboard"
|
||||
|
||||
// Define the MetricFindValue type
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
Reference in New Issue
Block a user