Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support rendering panel PNGs natively #224

Merged
merged 3 commits into from
Jan 6, 2025
Merged

Conversation

mahendrapaipuri
Copy link
Owner

  • Using capture screenshot API of chromedp, we can generate PNG of each panel using current plugin. Thus, we avoid the dependency with grafana-image-renderer

  • Move all panel related JS to a separate .js file and embed that file with the app. Read the file content at runtime and inject it into chrome tab tasks.

  • Add duration debug logs for better debugging experience

  • Add e2e tests to test both native renderer and grafana-image-renderer integrations

* Using capture screenshot API of chromedp, we can generate PNG of each panel using current plugin. Thus, we avoid the dependency with grafana-image-renderer

* Move all panel related JS to a separate .js file and embed that file with the app. Read the file content at runtime and inject it into chrome tab tasks.

* Add duration debug logs for better debugging experience

* Add e2e tests to test both native renderer and grafana-image-renderer integrations

Signed-off-by: Mahendra Paipuri <[email protected]>
@mahendrapaipuri mahendrapaipuri added enhancement New feature or request maintenance labels Jan 4, 2025
Signed-off-by: Mahendra Paipuri <[email protected]>
* This test uses a wider interval simulating a real case where panel loading takes time. This ensures that the plugin works in real life scenarios as well.

Signed-off-by: Mahendra Paipuri <[email protected]>
@mahendrapaipuri mahendrapaipuri merged commit 7c954c1 into main Jan 6, 2025
13 checks passed
@mahendrapaipuri mahendrapaipuri deleted the native_renderer branch January 6, 2025 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant