mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 04:52:10 +08:00
Rendering: add capabilities check (#44470)
* #44449: add feature check to rendering service * #44449: formatting * #44449: rename feature -> capability (https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/getCapabilities, https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceInfo/getCapabilities) * #44449: refactor * #44449: remove commented code * Update pkg/services/rendering/capabilities.go Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com> * #44449: review fixes Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
This commit is contained in:
@ -37,6 +37,7 @@ type RenderingService struct {
|
||||
inProgressCount int32
|
||||
version string
|
||||
versionMutex sync.RWMutex
|
||||
capabilities []Capability
|
||||
|
||||
perRequestRenderKeyProvider renderKeyProvider
|
||||
Cfg *setting.Cfg
|
||||
@ -81,6 +82,16 @@ func ProvideService(cfg *setting.Cfg, remoteCache *remotecache.RemoteCache, rm p
|
||||
log: logger,
|
||||
keyExpiry: 5 * time.Minute,
|
||||
},
|
||||
capabilities: []Capability{
|
||||
{
|
||||
name: FullHeightImages,
|
||||
semverConstraint: ">= 3.4.0",
|
||||
},
|
||||
{
|
||||
name: ScalingDownImages,
|
||||
semverConstraint: ">= 3.4.0",
|
||||
},
|
||||
},
|
||||
Cfg: cfg,
|
||||
RemoteCacheService: remoteCache,
|
||||
RendererPluginManager: rm,
|
||||
|
Reference in New Issue
Block a user