parent
cf079fbc02
commit
2da7ef0eb2
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
namespace Icinga\Module\Monitoring\Web\Controller;
|
namespace Icinga\Module\Monitoring\Web\Controller;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
use Icinga\Module\Monitoring\Controller;
|
use Icinga\Module\Monitoring\Controller;
|
||||||
use Icinga\Module\Monitoring\Forms\Command\Object\CheckNowCommandForm;
|
use Icinga\Module\Monitoring\Forms\Command\Object\CheckNowCommandForm;
|
||||||
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
|
@ -84,9 +85,16 @@ abstract class MonitoredObjectController extends Controller
|
||||||
$this->view->extensionsHtml = array();
|
$this->view->extensionsHtml = array();
|
||||||
foreach (Hook::all('Monitoring\DetailviewExtension') as $hook) {
|
foreach (Hook::all('Monitoring\DetailviewExtension') as $hook) {
|
||||||
/** @var DetailviewExtensionHook $hook */
|
/** @var DetailviewExtensionHook $hook */
|
||||||
|
|
||||||
|
try {
|
||||||
|
$html = $hook->setView($this->view)->getHtmlForObject($this->object);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$html = $this->view->escape($e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
$this->view->extensionsHtml[] =
|
$this->view->extensionsHtml[] =
|
||||||
'<div class="icinga-module module-' . $this->view->escape($hook->getModule()->getName()) . '">'
|
'<div class="icinga-module module-' . $this->view->escape($hook->getModule()->getName()) . '">'
|
||||||
. $hook->setView($this->view)->getHtmlForObject($this->object)
|
. $html
|
||||||
. '</div>';
|
. '</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue