divinity666 / ruby-grafana-reporter

Reporting Service for Grafana
MIT License
66 stars 5 forks source link

Enhancement - render scale #44

Closed ilmarietto123 closed 4 months ago

ilmarietto123 commented 1 year ago

Hi Divinity666, I found out it is not possible to set the rendering scale of a panel image if renderer is not a Grafana plugin but a standalone server (in my case, a container) using config files, both in Grafana and/or Grafana-image-renderer. When a remote request appens, the value of "DeviceScaleFactor" is hardcoded overridden to 1. The result is a poor quality image (low res). I managed changing ruby-grafana-reporter.rb file, line 1174, like this and it works:

  "/render/d-solo/#{@dashboard.id}?scale=4&panelId=#{@model['id']}"

Maybe can be an idea to add a new parameter like "render-scale" for "grafana_panel_image" in a future release. Thanks!

divinity666 commented 4 months ago

Feature is now available in latest release.