Schema V2: Adjust quick_ranges in time settings and remove time_options (#100135)
* adjut quickRanges type in v2 * clean up unused time_options property * remove deprecated time_options property on time picker * add schema migration for time_options * adjust test
This commit is contained in:
@@ -48,8 +48,6 @@ type TimePickerConfig struct {
|
||||
Hidden *bool `json:"hidden,omitempty"`
|
||||
// Interval options available in the refresh picker dropdown.
|
||||
RefreshIntervals []string `json:"refresh_intervals,omitempty"`
|
||||
// Selectable options available in the time picker dropdown. Has no effect on provisioned dashboard.
|
||||
TimeOptions []string `json:"time_options,omitempty"`
|
||||
// Quick ranges for time picker.
|
||||
QuickRanges []TimeOption `json:"quick_ranges,omitempty"`
|
||||
// Override the now time by entering a time delay. Use this option to accommodate known delays in data aggregation to avoid null values.
|
||||
@@ -61,7 +59,6 @@ func NewTimePickerConfig() *TimePickerConfig {
|
||||
return &TimePickerConfig{
|
||||
Hidden: (func(input bool) *bool { return &input })(false),
|
||||
RefreshIntervals: []string{"5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"},
|
||||
TimeOptions: []string{"5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -927,7 +924,7 @@ func NewSpec() *Spec {
|
||||
Editable: (func(input bool) *bool { return &input })(true),
|
||||
GraphTooltip: (func(input DashboardCursorSync) *DashboardCursorSync { return &input })(DashboardCursorSyncOff),
|
||||
FiscalYearStartMonth: (func(input uint8) *uint8 { return &input })(0),
|
||||
SchemaVersion: 39,
|
||||
SchemaVersion: 41,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user