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

master: get graph width/height for html in graph-cgi mode also #1498

Open
wants to merge 1 commit into
base: stable-2.0
Choose a base branch
from

Conversation

ploxiln
Copy link

@ploxiln ploxiln commented Nov 25, 2022

When generating html, if graph mode is cron, munin looks for the generated graph png files (from the previous run) to get width and height for the img elements, so that the page doesn't jump around for the few seconds it takes to download all the graph images. This can be done if graph mode is cgi, also, by looking in the cgitmpdir. Sometimes graph images won't be found, but if they are found they can be used.


This is admittedly a "hacky" implementation, targeting the last stable branch instead of master. It is offered as an illustration of an idea that would be nice to have, if implemented properly. (The hacky implementation does work!)

If you can recommend a strategy for implementing this "properly" I may attempt it :)

When generating html, if graph mode is cron, munin looks for
the generated graph png files (from the previous run) to get
width and height for the img elements, so that the page doesn't
jump around for the few seconds it takes to download all the graph
images. This can be done if graph mode is cgi, also, by looking
in the cgitmpdir. Sometimes graph images won't be found, but if
they are found they can be used.

-----------------

This is admittedly a "hacky" implementation, and targetting
the last stable branch instead of master. It is offered as an
illustration of an idea that would be nice to have, if implemented
properly. (The hacky implementation does work :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants