Merge pull request #3475 from matthenning/master

Make all grapher hooks available in the view
This commit is contained in:
Eric Lippmann 2018-07-18 14:17:32 +02:00 committed by GitHub
commit 7c22dd0325
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,6 @@
<?php if (isset($grapher)) {
echo $grapher->getPreviewHtml($object);
<?php if (isset($graphers)) {
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');
}
if (Hook::has('grapher')) {
$this->view->grapher = Hook::first('grapher');
$this->view->graphers = Hook::all('grapher');
}
}