mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 14:52:16 +08:00
Rendering: Add light theme for errors (#41616)
* Add light theme for error rendering * Fix lint * Update images and add rendering_limit_x images
This commit is contained in:
@ -19,6 +19,13 @@ const (
|
||||
RenderPNG RenderType = "png"
|
||||
)
|
||||
|
||||
type Theme string
|
||||
|
||||
const (
|
||||
ThemeLight Theme = "light"
|
||||
ThemeDark Theme = "dark"
|
||||
)
|
||||
|
||||
type Opts struct {
|
||||
Width int
|
||||
Height int
|
||||
@ -32,6 +39,7 @@ type Opts struct {
|
||||
ConcurrentLimit int
|
||||
DeviceScaleFactor float64
|
||||
Headers map[string][]string
|
||||
Theme Theme
|
||||
}
|
||||
|
||||
type CSVOpts struct {
|
||||
@ -63,6 +71,6 @@ type Service interface {
|
||||
Version() string
|
||||
Render(ctx context.Context, opts Opts) (*RenderResult, error)
|
||||
RenderCSV(ctx context.Context, opts CSVOpts) (*RenderCSVResult, error)
|
||||
RenderErrorImage(error error) (*RenderResult, error)
|
||||
RenderErrorImage(theme Theme, error error) (*RenderResult, error)
|
||||
GetRenderUser(key string) (*RenderUser, bool)
|
||||
}
|
||||
|
Reference in New Issue
Block a user