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

Graph with in iFrame is much smaller after update #328

Open
mdicss opened this issue Nov 27, 2023 · 1 comment
Open

Graph with in iFrame is much smaller after update #328

mdicss opened this issue Nov 27, 2023 · 1 comment

Comments

@mdicss
Copy link

mdicss commented Nov 27, 2023

After the update of icinga2, icingaweb2 and all modules to the actual version, the 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

@mdicss
Copy link
Author

mdicss commented Nov 29, 2023

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.

I added this change to my pull request #318

gbin2265 added a commit to gbin2265/icingaweb2-module-grafana that referenced this issue Nov 29, 2023
gbin2265 added a commit to gbin2265/icingaweb2-module-grafana that referenced this issue Nov 29, 2023
gbin2265 added a commit to gbin2265/icingaweb2-module-grafana that referenced this issue Nov 29, 2023
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

No branches or pull requests

1 participant