From 0af724761227347b2112abd8a177fa1d6e854484 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Thu, 28 Sep 2023 13:31:07 -0700 Subject: [PATCH] Chore: cleanup old dashboardPreviews files (#75682) --- packages/grafana-runtime/src/config.ts | 7 ---- .../migrations/dashboard_thumbs_mig.go | 32 ------------------- 2 files changed, 39 deletions(-) delete mode 100644 pkg/services/sqlstore/migrations/dashboard_thumbs_mig.go diff --git a/packages/grafana-runtime/src/config.ts b/packages/grafana-runtime/src/config.ts index 991704aa19c..8ba941af6ab 100644 --- a/packages/grafana-runtime/src/config.ts +++ b/packages/grafana-runtime/src/config.ts @@ -94,13 +94,6 @@ export class GrafanaBootConfig implements GrafanaConfig { anonymousEnabled = false; licenseInfo: LicenseInfo = {} as LicenseInfo; rendererAvailable = false; - dashboardPreviews: { - systemRequirements: { - met: boolean; - requiredImageRendererPluginVersion: string; - }; - thumbnailsExist: boolean; - } = { systemRequirements: { met: false, requiredImageRendererPluginVersion: '' }, thumbnailsExist: false }; rendererVersion = ''; secretsManagerPluginEnabled = false; supportBundlesEnabled = false; diff --git a/pkg/services/sqlstore/migrations/dashboard_thumbs_mig.go b/pkg/services/sqlstore/migrations/dashboard_thumbs_mig.go deleted file mode 100644 index 7a2124811c4..00000000000 --- a/pkg/services/sqlstore/migrations/dashboard_thumbs_mig.go +++ /dev/null @@ -1,32 +0,0 @@ -package migrations - -// This migration was run behind the `dashboardPreviews` flag. -// The feature flag and the whole dashboard previews feature was removed in https://github.com/grafana/grafana/pull/66176 - -//func addDashboardThumbsMigrations(mg *migrator.Migrator) { -// dashThumbs := migrator.Table{ -// Name: "dashboard_thumbnail", -// Columns: []*migrator.Column{ -// {Name: "id", Type: migrator.DB_BigInt, IsPrimaryKey: true, IsAutoIncrement: true}, -// {Name: "dashboard_id", Type: migrator.DB_BigInt, Nullable: false}, // can join with dashboard table -// {Name: "dashboard_version", Type: migrator.DB_Int, Nullable: false}, // screenshoted version of the dashboard -// {Name: "state", Type: migrator.DB_NVarchar, Length: 10, Nullable: false}, // stale | locked -// {Name: "panel_id", Type: migrator.DB_SmallInt, Nullable: false, Default: "0"}, // for panel thumbnails -// {Name: "image", Type: migrator.DB_MediumBlob, Nullable: false}, // image stored as blob. MediumBlob has a max limit of 16mb in MySQL -// {Name: "mime_type", Type: migrator.DB_NVarchar, Length: 255, Nullable: false}, // e.g. image/png, image/webp -// {Name: "kind", Type: migrator.DB_NVarchar, Length: 8, Nullable: false}, // thumb | tall -// {Name: "theme", Type: migrator.DB_NVarchar, Length: 8, Nullable: false}, // light|dark -// {Name: "updated", Type: migrator.DB_DateTime, Nullable: false}, -// }, -// Indices: []*migrator.Index{ -// {Cols: []string{"dashboard_id", "panel_id", "kind", "theme"}, Type: migrator.UniqueIndex}, -// }, -// } -// -// mg.AddMigration("create dashboard_thumbnail table", migrator.NewAddTableMigration(dashThumbs)) -// mg.AddMigration("add unique indexes for dashboard_thumbnail", migrator.NewAddIndexMigration(dashThumbs, dashThumbs.Indices[0])) -// mg.AddMigration("Add ds_uids column to dashboard_thumbnail table", migrator.NewAddColumnMigration(dashThumbs, -// // uids of datasources used in the dashboard when taking preview -// &migrator.Column{Name: "ds_uids", Type: migrator.DB_Text, Nullable: true, Default: ""}, -// )) -//}