Skip to content

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

Open
ploxiln wants to merge 1 commit into
munin-monitoring:stable-2.0from
ploxiln:png_size_cgi
Open

master: get graph width/height for html in graph-cgi mode also#1498
ploxiln wants to merge 1 commit into
munin-monitoring:stable-2.0from
ploxiln:png_size_cgi

Conversation

@ploxiln

@ploxiln ploxiln commented Nov 25, 2022

Copy link
Copy Markdown

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