mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Image-rendering: Cleanup of rendering code (#20496)
This commit is contained in:
parent
432f36024b
commit
1b38d94537
@ -27,7 +27,6 @@ type Opts struct {
|
|||||||
|
|
||||||
type RenderResult struct {
|
type RenderResult struct {
|
||||||
FilePath string
|
FilePath string
|
||||||
KeepFileAfterRender bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type renderFunc func(ctx context.Context, options Opts) (*RenderResult, error)
|
type renderFunc func(ctx context.Context, options Opts) (*RenderResult, error)
|
||||||
|
@ -97,7 +97,6 @@ func (rs *RenderingService) RenderErrorImage(err error) (*RenderResult, error) {
|
|||||||
|
|
||||||
return &RenderResult{
|
return &RenderResult{
|
||||||
FilePath: filepath.Join(setting.HomePath, imgUrl),
|
FilePath: filepath.Join(setting.HomePath, imgUrl),
|
||||||
KeepFileAfterRender: true,
|
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,7 +104,6 @@ func (rs *RenderingService) Render(ctx context.Context, opts Opts) (*RenderResul
|
|||||||
if rs.inProgressCount > opts.ConcurrentLimit {
|
if rs.inProgressCount > opts.ConcurrentLimit {
|
||||||
return &RenderResult{
|
return &RenderResult{
|
||||||
FilePath: filepath.Join(setting.HomePath, "public/img/rendering_limit.png"),
|
FilePath: filepath.Join(setting.HomePath, "public/img/rendering_limit.png"),
|
||||||
KeepFileAfterRender: true,
|
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user