parent
7ae7bf38c4
commit
faa29e3dee
|
@ -569,8 +569,10 @@ class Monitoring_ListController extends Controller
|
|||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
|
||||
$this->addTitleTab('hostgroups', $this->translate('Host Groups'), $this->translate('List host groups'));
|
||||
$this->setAutorefreshInterval(12);
|
||||
|
||||
$query = $this->backend->select()->from('groupsummary', array(
|
||||
'hostgroup_name',
|
||||
'hostgroup_alias',
|
||||
|
@ -602,6 +604,9 @@ class Monitoring_ListController extends Controller
|
|||
// service groups. We should separate them.
|
||||
$this->filterQuery($query);
|
||||
$this->view->hostgroups = $query->paginate();
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->hostgroups);
|
||||
$this->setupSortControl(array(
|
||||
'services_severity' => $this->translate('Severity'),
|
||||
'hostgroup_alias' => $this->translate('Host Group Name'),
|
||||
|
|
|
@ -1,24 +1,20 @@
|
|||
<?php if ($this->compact): ?>
|
||||
<div class="content">
|
||||
<?php else: ?>
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<div style="margin: 1em;" class="dontprint">
|
||||
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
|
||||
</div>
|
||||
<?= $this->widget('limiter')->setMaxLimit(count($hostgroups)); ?>
|
||||
<?= $this->paginationControl($hostgroups, null, null, array('preserve' => $this->preserve)); ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?= $this->tabs; ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php
|
||||
if (count($hostgroups) === 0) {
|
||||
echo $this->translate('No host groups matching the filter');
|
||||
echo '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="content">
|
||||
<?php
|
||||
|
||||
if (count($hostgroups) === 0) {
|
||||
echo $this->translate('No hostgroups found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<table class="groupview" data-base-target="_next">
|
||||
<thead>
|
||||
<th><?= $this->translate('Last Problem'); ?></th>
|
||||
|
|
Loading…
Reference in New Issue