Previews: datasource permissions (#52747)
* Previews: datasource permissions * lint * simplify - force non-null `ds_uids` * add `canBeDisabled` to search service * add `IncludeThumbnailsWithEmptyDsUids` * remove force refresh migration * refactor main preview service * add safeguard * revert ticker interval * update testdata * fix test * add mock search service * add datasources lookup test * update migration * extract ds lookup to its own package to avoid cyclic imports * lint * fix dashbaord extract, use the real datasource lookup in tests. IS IT BULLETPROOF YET?! * fix dashbaord extract, use the real datasource lookup in tests. IS IT BULLETPROOF YET?! * remove stale log * consistent casing * pass context to `createServiceAccount` * filter out the special grafana ds
This commit is contained in:
@@ -24,4 +24,8 @@ func addDashboardThumbsMigrations(mg *migrator.Migrator) {
|
||||
|
||||
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: false, Default: ""},
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user