mdicss
(Mdicss)
November 29, 2023, 2:51pm
1
After the update of icinga2, icingaweb2 and all modules to the actual version, the width of the grafana-graphs is much smaller now. Changing the height works but the width stays the same. I use icingadb and iFrame for embedding the graphs. Before the update, the width was 100%. In the html-output, width is still defined as 100%.
I think, the change comes from the new icingaweb2 and the updated php-libraries.
Any ideas how to fix this?
I already opened an issue on github, but maybe someone already solved this:
opened 05:16PM - 27 Nov 23 UTC
After the update of icinga2, icingaweb2 and all modules to the actual version, t… he with of the grafana-graphs is much smaller now. Changing the height works but the width stays the same. I use icingadb and iFrame for embedding the graphs. Before the update, the width was 100%. In the html-output, width is still defined as 100%.
I think, the change comes from the new icingaweb2 and the updated php-libraries.
## Your Environment
Icinga Web 2 Version 2.12.1
Git commit cd2daeb2cb8537c633d343a29eb76c54cd2ebbf2
PHP Version 8.0.30
Git commit date 2023-11-15
Loaded Libraries
icinga/icinga-php-library 0.13.1
icinga/icinga-php-thirdparty 0.12.0
Loaded Modules
icingadb 1.1.1 Configure
cube 1.3.2 Configure
director 1.11.0 Configure
doc 2.12.1 Configure
fileshipper 1.2.0 Configure
grafana 2.0.3 Configure
incubator 0.20.0 Configure
theme-solarized 1.0.0 Configure
x509 1.3.2 Configure
## Former Environment before update
Icinga Web 2 Version 2.11.4
Git commit 11453bfa92a70a44efbf7f966f5e7f27e9300a28
PHP Version 8.0.29
Git commit date 2023-01-26
Loaded Libraries
icinga/icinga-php-library 0.12.0
icinga/icinga-php-thirdparty 0.11.0
Loaded Modules
icingadb 1.0.2 Configure
cube 1.3.0 Configure
director 1.10.2 Configure
doc 2.11.4 Configure
fileshipper 1.2.0 Configure
grafana 2.0.3 Configure
incubator 0.20.0 Configure
theme-solarized 1.0.0 Configure
x509 1.2.1 Configure
Actual Environment
Icinga Web 2 Version 2.12.1
Git commit cd2daeb2cb8537c633d343a29eb76c54cd2ebbf2
PHP Version 8.0.30
Git commit date 2023-11-15
Loaded Libraries
icinga/icinga-php-library 0.13.1
icinga/icinga-php-thirdparty 0.12.0
Loaded Modules
icingadb 1.1.1 Configure
cube 1.3.2 Configure
director 1.11.0 Configure
doc 2.12.1 Configure
fileshipper 1.2.0 Configure
grafana 2.0.3 Configure
incubator 0.20.0 Configure
theme-solarized 1.0.0 Configure
x509 1.3.2 Configure
Former Environment before update
Icinga Web 2 Version 2.11.4
Git commit 11453bfa92a70a44efbf7f966f5e7f27e9300a28
PHP Version 8.0.29
Git commit date 2023-01-26
Loaded Libraries
icinga/icinga-php-library 0.12.0
icinga/icinga-php-thirdparty 0.11.0
Loaded Modules
icingadb 1.0.2 Configure
cube 1.3.0 Configure
director 1.10.2 Configure
doc 2.11.4 Configure
fileshipper 1.2.0 Configure
grafana 2.0.3 Configure
incubator 0.20.0 Configure
theme-solarized 1.0.0 Configure
x509 1.2.1 Configure
mdicss
(Mdicss)
November 29, 2023, 3:58pm
2
I found a solution. In https://github.com/Mikesch-mp/icingaweb2-module-grafana/blob/master/library/Grafana/ProvidedHook/Icingadb/IcingaDbGrapher.php , I had to change line 329:
"style" => "width: 100%; border: none;"
to
"width" => "100%",
"style" => "border: none;"
With this change, the width of the graphs is set to 100% again.
See also my patch: https://github.com/Mikesch-mp/icingaweb2-module-grafana/pull/318