From a077472226fe5a2c6472ac70243ebb76b0afd19d Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Fri, 6 Mar 2015 12:53:58 +0100 Subject: [PATCH] Make tabs available in all host controller actions refs #8565 --- .../controllers/HostsController.php | 24 +++++++++---------- .../views/scripts/services/show.phtml | 1 - 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/modules/monitoring/application/controllers/HostsController.php b/modules/monitoring/application/controllers/HostsController.php index 2c9ebc20e..aa119c161 100644 --- a/modules/monitoring/application/controllers/HostsController.php +++ b/modules/monitoring/application/controllers/HostsController.php @@ -27,6 +27,18 @@ class Monitoring_HostsController extends Controller $hostList = new HostList($this->backend); $hostList->setFilter(Filter::fromQueryString((string) $this->params)); $this->hostList = $hostList; + $this->getTabs()->add( + 'show', + array( + 'title' => sprintf( + $this->translate('Show summarized information for %u hosts'), + count($this->hostList) + ), + 'label' => $this->translate('Hosts'), + 'url' => Url::fromRequest(), + 'icon' => 'host' + ) + )->activate('show'); } protected function handleCommandForm(ObjectsCommandForm $form) @@ -69,18 +81,6 @@ class Monitoring_HostsController extends Controller public function showAction() { - $this->getTabs()->add( - 'show', - array( - 'title' => sprintf( - $this->translate('Show summarized information for %u hosts'), - count($this->hostList) - ), - 'label' => $this->translate('Hosts'), - 'url' => Url::fromRequest(), - 'icon' => 'host' - ) - )->activate('show'); $this->setAutorefreshInterval(15); $checkNowForm = new CheckNowCommandForm(); $checkNowForm diff --git a/modules/monitoring/application/views/scripts/services/show.phtml b/modules/monitoring/application/views/scripts/services/show.phtml index d9aed1581..2933e6623 100644 --- a/modules/monitoring/application/views/scripts/services/show.phtml +++ b/modules/monitoring/application/views/scripts/services/show.phtml @@ -1,6 +1,5 @@