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

Updated the panel render wait function to account for Grafana version 6 #26

Merged
merged 1 commit into from
Sep 9, 2019

Conversation

bmichaelis
Copy link

@bmichaelis bmichaelis commented Aug 27, 2019

When using grafana-image-renderer with Grafana 6.3.3 I was getting several dashboards that were rendering with empty panels. Upon inspection of the page, I realized that there is not a '.panel' class applied to the panels any more.

I added || document.querySelectorAll('.panel-container').length to line 73 to account for this change.

I have not done any rigorous testing, but it did solve my problem.

I am using grafana-image-renderer as a docker image.

@marefr
Copy link
Member

marefr commented Aug 27, 2019

Are you trying to render a full dashboard?

@bmichaelis
Copy link
Author

bmichaelis commented Aug 27, 2019

@marefr Yes, I am rendering a full dashboard. I assumed that was what this particular function was for since it takes a count of the panels on the page and then compares that number to the number of panels that have been rendered. Am I correct in my assumption?

Copy link
Member

@marefr marefr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marefr marefr merged commit c771abd into grafana:master Sep 9, 2019
@marefr marefr changed the title Updated the panelCount query in the page.waitForFunction() Updated the panel render wait function to account for Grafana version 6 Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants