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

Undefined $dashboarduid when using Iframe mode #266

Closed
mdetrano opened this issue Apr 29, 2021 · 1 comment
Closed

Undefined $dashboarduid when using Iframe mode #266

mdetrano opened this issue Apr 29, 2021 · 1 comment
Assignees
Labels

Comments

@mdetrano
Copy link

When using the iFrame mode to view graphs from Grafana, opening any host or service produces error:

Undefined property: Icinga\Module\Grafana\ProvidedHook\Grapher::$dashboarduid

Expected Behavior

Should show the grafana frame.

Current Behavior

Shows:
#0 /usr/share/icingaweb2/modules/grafana/library/Grafana/ProvidedHook/Grapher.php(259): Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}(Integer, String, String, Integer, Array)
#1 /usr/share/icingaweb2/modules/grafana/library/Grafana/ProvidedHook/Grapher.php(379): Icinga\Module\Grafana\ProvidedHook\Grapher->getMyPreviewHtml(String, String, String)
#2 /usr/share/icingaweb2/modules/monitoring/application/views/scripts/show/components/grapher.phtml(3): Icinga\Module\Grafana\ProvidedHook\Grapher->getPreviewHtml(Object(Icinga\Module\Monitoring\Object\Host))...

Possible Solution

In Grapher.php, line 259, it looks like the variable in question is not defined when iFrame mode is used. May have missed a call to getGraphConf or some other means to initialize it.

Steps to Reproduce (for bugs)

Select iFrame for "Grafana Access" in module configuration, then view details on any host or service.

Context

Your Environment

  • Icinga Web 2 Grafana version (System - About): 1.4.0
  • Icinga Web 2 version and modules (System - About): 2.8.2
  • Version used (icinga2 --version):
  • Operating System and version:
  • Enabled features (icinga2 feature list):
  • Config validation (icinga2 daemon -C):
@Bierchermuesli
Copy link

Same here, same versions.

@Mikesch-mp Mikesch-mp self-assigned this Apr 30, 2021
@Mikesch-mp Mikesch-mp added the bug label Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants