mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Adapt dashboard schema to validate on some devenv dashboards (#37594)
* Remove null values from JSON * Specify the color field * Add note about openness of custom field's struct * Update schemaVersion * Specify thresholds * Add panel id * Add maxDataPoints and interval * Add mappings, albeit very under-specified * Allow empty string for timezone field This is probably not a good idea - same as allowing nulls. * Allow false for refresh - otherwise, string * Make threshold value optional * Make interval optional * Fix broken and changed decls in ui models * Add models.cue for timeseries panel * Fixups for home dashboard * Add timeShift, timeFrom * Abstract out #Target, rejigger comments
This commit is contained in:
42
public/app/plugins/panel/timeseries/models.cue
Normal file
42
public/app/plugins/panel/timeseries/models.cue
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright 2021 Grafana Labs
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package grafanaschema
|
||||
|
||||
import (
|
||||
ui "github.com/grafana/grafana/cue/ui:grafanaschema"
|
||||
)
|
||||
|
||||
Family: {
|
||||
lineages: [
|
||||
[
|
||||
{
|
||||
PanelOptions: {
|
||||
legend: ui.VizLegendOptions
|
||||
tooltip: ui.VizTooltipOptions
|
||||
}
|
||||
PanelFieldConfig: {
|
||||
ui.LineConfig
|
||||
ui.FillConfig
|
||||
ui.PointsConfig
|
||||
ui.AxisConfig
|
||||
drawStyle?: ui.DrawStyle
|
||||
gradientMode?: ui.GraphGradientMode
|
||||
hideFrom?: ui.HideSeriesConfig
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
migrations: []
|
||||
}
|
||||
Reference in New Issue
Block a user