manager exposes renderer + secrets manager (#54629)

This commit is contained in:
Will Browne
2022-09-02 14:20:10 +02:00
committed by GitHub
parent 43987e7f8c
commit ecdcafb258
26 changed files with 126 additions and 122 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ func (d byOrgId) Less(i, j int) bool { return d[i].OrgId > d[j].OrgId }
func (d byOrgId) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
func (r *simpleCrawler) Run(ctx context.Context, auth CrawlerAuth, mode CrawlerMode, theme models.Theme, thumbnailKind models.ThumbnailKind) error {
res, err := r.renderService.HasCapability(rendering.ScalingDownImages)
res, err := r.renderService.HasCapability(ctx, rendering.ScalingDownImages)
if err != nil {
return err
}
+3 -3
View File
@@ -317,7 +317,7 @@ func (hs *thumbService) GetDashboardPreviewsSetupSettings(c *models.ReqContext)
}
func (hs *thumbService) getDashboardPreviewsSetupSettings(ctx context.Context) dashboardPreviewsSetupConfig {
systemRequirements := hs.getSystemRequirements()
systemRequirements := hs.getSystemRequirements(ctx)
thumbnailsExist, err := hs.thumbnailRepo.doThumbnailsExist(ctx)
if err != nil {
@@ -333,8 +333,8 @@ func (hs *thumbService) getDashboardPreviewsSetupSettings(ctx context.Context) d
}
}
func (hs *thumbService) getSystemRequirements() dashboardPreviewsSystemRequirements {
res, err := hs.renderingService.HasCapability(rendering.ScalingDownImages)
func (hs *thumbService) getSystemRequirements(ctx context.Context) dashboardPreviewsSystemRequirements {
res, err := hs.renderingService.HasCapability(ctx, rendering.ScalingDownImages)
if err != nil {
hs.log.Error("Error when verifying dashboard previews system requirements thumbnail", "err", err.Error())
return dashboardPreviewsSystemRequirements{