schema: Migrate from scuemata to thema (#49805)
* Remove crufty scuemata bits Buhbye to: cue/ dir with old definitions, CI steps for checking unnecessary things, and the original dashboard scuemata file. * Remove grafana-cli cue subcommand * Remove old testdata * Don't swallow errors from codegen * Small nits and tweaks to cuectx package * WIP - refactor pluggen to use Thema Also consolidate the embed.FS in the repo root. * Finish halfway rename * Convert all panel models.cue to thema * Rewrite pluggen to use Thema * Remove pkg/schema, and trim command * Remove schemaloader service and usages Will be replaced by coremodel-centric hydrate/dehydrate system Soon™. * Remove schemaloader from wire * Remove hangover field on histogram models.cue * Fix lint errors, some vestiges of trim service * Remove unused cuetsify cli command
This commit is contained in:
+2
-10
@@ -58,20 +58,12 @@ func (hs *HTTPServer) TrimDashboard(c *models.ReqContext) response.Response {
|
||||
if err := web.Bind(c.Req, &cmd); err != nil {
|
||||
return response.Error(http.StatusBadRequest, "bad request data", err)
|
||||
}
|
||||
var err error
|
||||
dash := cmd.Dashboard
|
||||
meta := cmd.Meta
|
||||
|
||||
trimedResult := *dash
|
||||
if !hs.LoadSchemaService.IsDisabled() {
|
||||
trimedResult, err = hs.LoadSchemaService.DashboardTrimDefaults(*dash)
|
||||
if err != nil {
|
||||
return response.Error(500, "Error while exporting with default values removed", err)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO temporarily just return the input as a no-op while we convert to thema calls
|
||||
dto := dtos.TrimDashboardFullWithMeta{
|
||||
Dashboard: &trimedResult,
|
||||
Dashboard: dash,
|
||||
Meta: meta,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user