api: Validate dashboards on save via coremodels, behind feature toggle (#48252)
* Add coremodelValidation feature flag * coremodels: use stubs when feature flag is off * api: validate dashboards on save * Need pointer receiver for FeatureManager * Update dashboard Go model * Align doc comments * Include CoremodelRegistry in test * Wedge coremodel in on all test cases, ugh * Ugh fix comment again * Update pkg/framework/coremodel/staticregistry/provide.go Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com> * Update Thema (and its deps) for better errs * omg whitespace Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
This commit is contained in:
co-authored by
Artur Wierzbicki
parent
03fe1435a0
commit
a3402641d6
@@ -92,9 +92,19 @@ type model struct {
|
||||
Refresh interface{} `json:"refresh"` // (bool|string)
|
||||
SchemaVersion int `json:"schemaVersion"`
|
||||
Links []struct {
|
||||
Title string `json:"title"`
|
||||
Type string `json:"type"`
|
||||
Icon string `json:"icon,omitempty"`
|
||||
Tooltip string `json:"tooltip,omitempty"`
|
||||
Url string `json:"url,omitempty"`
|
||||
Tags []string `json:"tags"`
|
||||
AsDropdown bool `json:"asDropdown"`
|
||||
TargetBlank bool `json:"targetBlank"`
|
||||
IncludeVars bool `json:"includeVars"`
|
||||
KeepTime bool `json:"keepTime"`
|
||||
} `json:"links"`
|
||||
Panels []interface{} `json:"panels"`
|
||||
FiscalYearStartMonth string `json:"fiscalYearStartMonth"`
|
||||
FiscalYearStartMonth uint8 `json:"fiscalYearStartMonth"`
|
||||
LiveNow bool `json:"liveNow"`
|
||||
WeekStart string `json:"weekStart"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user