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

Icingaweb2 version 2.8.2 #6

Open
daku69 opened this issue Jan 5, 2021 · 3 comments
Open

Icingaweb2 version 2.8.2 #6

daku69 opened this issue Jan 5, 2021 · 3 comments

Comments

@daku69
Copy link

daku69 commented Jan 5, 2021

In the title: Undefined variable: host
#0 /usr/share/icingaweb2/modules/boxydash/application/views/scripts/index/index.phtml(52): Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}(Integer, String, String, Integer, Array)
#1 /usr/share/php/Icinga/Web/View.php(248): include(String)
#2 /usr/share/icingaweb2/library/vendor/Zend/View/Abstract.php(877): Icinga\Web\View->_run(String)
#3 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(904): Zend_View_Abstract->render(NULL)
#4 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(925): Zend_Controller_Action_Helper_ViewRenderer->renderScript(String, NULL)
#5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(964): Zend_Controller_Action_Helper_ViewRenderer->render()
#6 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/HelperBroker.php(272): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(518): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#8 /usr/share/icingaweb2/library/vendor/Zend/Controller/Dispatcher/Standard.php(303): Zend_Controller_Action->dispatch(String)
#9 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(56): Zend_Controller_Dispatcher_Standard->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#10 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#11 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#12 /usr/share/php/Icinga/Application/webrouter.php(99): Icinga\Application\Web->dispatch()
#13 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#14 {main}

@slavkoja
Copy link

I meet the same problem on Debian testing, with its boxydash package (0.0.1) and icingaweb2 (2.8.2), see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977714

@slavkoja
Copy link

slavkoja commented Feb 7, 2021

It was fixed in debian. The problem is/was short PHP tags.

@daku69
Copy link
Author

daku69 commented Feb 8, 2021

Can you add this change in Upstream.
`diff -Naurp icingaweb2-module-boxydash-orig/application/views/scripts/index/index.phtml icingaweb2-module-boxydash/application/views/scripts/index/index.phtml
--- icingaweb2-module-boxydash-orig/application/views/scripts/index/index.phtml
+++ icingaweb2-module-boxydash/application/views/scripts/index/index.phtml
@@ -1,4 +1,4 @@
-<?
+<?php
use Icinga\Module\Monitoring\Object\Service;
use Icinga\Module\Monitoring\Object\Host;

@@ -15,7 +15,7 @@ use Icinga\Module\Monitoring\Object\Host

 <h1>Boxy Dashboard</h1>
  • showlegend){ ?>
  • showlegend){ ?>
    ✔ = Acknowledged

@@ -36,9 +36,9 @@ use Icinga\Module\Monitoring\Object\Host
unknown

Host Info

-hosts as $host){ $title = htmlspecialchars($host->{'host_display_name'}); $size=$this->boxsize; @@ -50,12 +50,12 @@ foreach ($this->hosts as $host){ $title.=" (Acknowledged)"; }?> ' class='boxy_box state ' style='width:px; height:px; font-size:px;' title=""> - +

Service Info

-services as $service){ +services as $service){ $service->{'service_hard_state'} = ($service->{'service_hard_state'}) ? "hard" : "soft"; $title = $service->{'host_display_name'}.": ".$service->{'service_description'}; #."(".$service->{'current_check_attempt'} .",".$service->{'max_check_attempts'} .")(". $service->{'service_hard_state'}.")+acked:".$service->{'service_acknowledged'} ; @@ -78,7 +78,7 @@ foreach ($this->hosts as $host){ $title=htmlspecialchars($title."\n ".$service->{'service_output'});?>
<a href='path_prefix ?>/monitoring/service/show?host={'host_name'}?>&service={'service_description'}?>' class='boxy_box state ' style='width:px; height:px; font-size:px;' title="">

-
+

debug?>
`

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

2 participants