Make tabs available in all host controller actions

refs #8565
This commit is contained in:
Matthias Jentsch 2015-03-06 12:53:58 +01:00
parent 0623404963
commit a077472226
2 changed files with 12 additions and 13 deletions

View File

@ -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

View File

@ -1,6 +1,5 @@
<?php
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
use Icinga\Web\Url;
?>
<div class="controls">