Rendering: Add PDFRendering capability (#84438)
* Rendering: Add PDFRendering capability * fix tests
This commit is contained in:
@@ -6,15 +6,10 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/grafana/grafana/pkg/plugins/backendplugin/pluginextensionv2"
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
)
|
||||
|
||||
func (rs *RenderingService) renderViaPlugin(ctx context.Context, renderType RenderType, renderKey string, opts Opts) (*RenderResult, error) {
|
||||
if renderType == RenderPDF {
|
||||
if !rs.features.IsEnabled(ctx, featuremgmt.FlagNewPDFRendering) {
|
||||
return nil, fmt.Errorf("feature 'newPDFRendering' disabled")
|
||||
}
|
||||
|
||||
opts.Encoding = "pdf"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user