Dashboard Migrations: V28 singlestat panel and deprecated variable properties (#108416)

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
This commit is contained in:
Haris Rozajac
2025-08-06 17:51:55 +02:00
committed by GitHub
co-authored by Ivan Ortega
parent 3dcda77462
commit 5ad751ea28
22 changed files with 3067 additions and 134 deletions
@@ -5,7 +5,7 @@ import (
)
const (
MIN_VERSION = 28
MIN_VERSION = 27
LATEST_VERSION = 41
)
@@ -24,8 +24,21 @@ type DataSourceInfoProvider interface {
GetDataSourceInfo() []DataSourceInfo
}
func GetMigrations(dsInfoProvider DataSourceInfoProvider) map[int]SchemaVersionMigrationFunc {
type PanelPluginInfo struct {
ID string
Version string
}
type PanelPluginInfoProvider interface {
// Gets all the panels from the plugin store.
// Equivalent to grafanaBootData.settings.panels on the frontend.
GetPanels() []PanelPluginInfo
GetPanelPlugin(id string) PanelPluginInfo
}
func GetMigrations(dsInfoProvider DataSourceInfoProvider, panelProvider PanelPluginInfoProvider) map[int]SchemaVersionMigrationFunc {
return map[int]SchemaVersionMigrationFunc{
28: V28(panelProvider),
29: V29,
30: V30,
31: V31,