Skip to content

Commit

Permalink
Make tabs available in all host controller actions
Browse files Browse the repository at this point in the history
refs #8565
  • Loading branch information
majentsch committed Mar 6, 2015
1 parent 0623404 commit a077472
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
24 changes: 12 additions & 12 deletions modules/monitoring/application/controllers/HostsController.php
Expand Up @@ -27,6 +27,18 @@ public function init()
$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)
Expand Down Expand Up @@ -69,18 +81,6 @@ protected function handleCommandForm(ObjectsCommandForm $form)

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
Expand Down
@@ -1,6 +1,5 @@
<?php
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
use Icinga\Web\Url;
?>

<div class="controls">
Expand Down

0 comments on commit a077472

Please sign in to comment.