Mikesch-mp / icingaweb2-module-grafana

Grafana module for Icinga Web 2 (supports InfluxDB & Graphite)
https://icinga.com/community/
GNU General Public License v2.0
241 stars 95 forks source link

Add link when using iframes to have iframes without using the grafana-renderer and still have links to Grafana #300

Open mdicss opened 2 years ago

mdicss commented 2 years ago

Hi Carsten We have the problem, that the grafana-renderer is very slow and uses a lot resources. Is much faster, to use iframes to embed graphs in icingaweb2. Further you then have tooltips in the graphs. The downside is, that you do no longer have links to grafana to open a dashboard from icingaweb2. So I extended Grapher.php to add a link above the grafana panels embedded as iframes into icingaweb2. With this, you have much faster rendering of the graphs in the iframes and you still can click on a link '=> see in Grafana' to open the panel in Grafana.

I did the according changes to GeneralConfigForm.php to be able to interactively do the config for the grafana-module too.

mdicss commented 2 years ago

I just have seen, that there is a different behaviour regarding the width of the graphs depending on debug mode is on or off.

mdicss commented 2 years ago

I did some enhancements to my changes in Grapher.php and set the with of iframes to 100%, so the width is set by the width of the browser window. I made hight configurable for iframes in GeneralConfigForm.php

egnappahz commented 1 year ago

I like this, and I like this alot. Thank you for your work.