Display all Grapher hooks not just the first one

refs 

Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
This commit is contained in:
Matthias 2018-06-15 10:40:14 +02:00 committed by Eric Lippmann
parent 1ae2507f0e
commit 4c9dac5fb8
2 changed files with 5 additions and 3 deletions
modules/monitoring
application/views/scripts/show/components
library/Monitoring/Web/Controller

View File

@ -1,4 +1,6 @@
<?php if (isset($grapher)) { <?php if (isset($graphers)) {
echo $grapher->getPreviewHtml($object); foreach ($graphers as $grapher) {
echo $grapher->getPreviewHtml($object);
}
} ?> } ?>

View File

@ -47,7 +47,7 @@ abstract class MonitoredObjectController extends Controller
$this->view->tickets = Hook::first('ticket'); $this->view->tickets = Hook::first('ticket');
} }
if (Hook::has('grapher')) { if (Hook::has('grapher')) {
$this->view->grapher = Hook::first('grapher'); $this->view->graphers = Hook::all('grapher');
} }
} }