mirror of
https://github.com/grafana/grafana.git
synced 2026-08-14 15:15:03 -05:00
Kindsys: Target k8s style resource definitions (#67008)
Co-authored-by: sam boyer <sdboyer@grafana.com>
This commit is contained in:
co-authored by
sam boyer
parent
b71b778d0d
commit
ca1f79b9ba
@@ -840,7 +840,10 @@ func (hs *HTTPServer) ValidateDashboard(c *contextmodel.ReqContext) response.Res
|
||||
// work), or if schemaVersion is absent (which will happen once the Thema
|
||||
// schema becomes canonical).
|
||||
if err != nil || schemaVersion >= dashboard.HandoffSchemaVersion {
|
||||
_, _, validationErr := dk.JSONValueMux(dashboardBytes)
|
||||
// Schemas expect the dashboard to live in the spec field
|
||||
k8sResource := `{"spec": ` + cmd.Dashboard + "}"
|
||||
|
||||
_, _, validationErr := dk.JSONValueMux([]byte(k8sResource))
|
||||
|
||||
if validationErr == nil {
|
||||
isValid = true
|
||||
|
||||
Reference in New Issue
Block a user