From 343e5a8669193c3acb18e7d74f92911bf3915e96 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 20 Mar 2016 11:27:19 +0100 Subject: [PATCH] host/edit: show link to monitoring if available --- application/controllers/HostController.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/application/controllers/HostController.php b/application/controllers/HostController.php index ee434ffc..d7000d71 100644 --- a/application/controllers/HostController.php +++ b/application/controllers/HostController.php @@ -31,6 +31,24 @@ class HostController extends ObjectController } } + public function editAction() + { + parent::editAction(); + $host = $this->object; + $mon = $this->monitoring(); + if ($host->isObject() && $mon->isAvailable() && $mon->hasHost($host->object_name)) { + $this->view->actionLinks .= ' ' . $this->view->qlink( + $this->translate('Show'), + 'monitoring/host/show', + array('host' => $host->object_name), + array( + 'class' => 'icon-globe critical', + 'data-base-target' => '_next' + ) + ); + } + } + public function servicesAction() { $host = $this->object;