From 05a64ceea97ec2db8129553ae5592f8b3edfeea7 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 4 Sep 2014 18:51:54 +0200 Subject: [PATCH] monitoring/show: use global hasPreviews check once refs #6932 --- .../monitoring/application/controllers/ShowController.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index 6b45f3980..7c2c67f41 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -48,6 +48,9 @@ class Monitoring_ShowController extends Controller } if (Hook::has('grapher')) { $this->grapher = Hook::first('grapher'); + if (! $this->grapher->hasPreviews()) { + $this->grapher = null; + } } $this->createTabs(); @@ -64,7 +67,7 @@ class Monitoring_ShowController extends Controller . ' on ' . $o->host_name; $this->getTabs()->activate('service'); $o->populate(); - if ($this->grapher && $this->grapher->hasPreviews($o)) { + if ($this->grapher) { $this->view->grapherHtml = $this->grapher->getPreviewHtml($o); } } @@ -79,7 +82,7 @@ class Monitoring_ShowController extends Controller $this->getTabs()->activate('host'); $this->view->title = $o->host_name; $o->populate(); - if ($this->grapher && $this->grapher->hasPreviews($o)) { + if ($this->grapher) { $this->view->grapherHtml = $this->grapher->getPreviewHtml($o); } }