monitoring/list/hosts: filter-related cleanup
This commit is contained in:
parent
28c61c2595
commit
0642c9d33c
|
@ -59,8 +59,6 @@ class Monitoring_ListController extends Controller
|
|||
{
|
||||
$this->addTitleTab('hosts');
|
||||
$this->setAutorefreshInterval(10);
|
||||
// TODO: Get rid of query here (multiselect)
|
||||
$this->view->query = $this->_request->getQuery();
|
||||
$this->compactView = 'hosts-compact';
|
||||
$query = $this->backend->select()->from('hostStatus', array(
|
||||
'host_icon_image',
|
||||
|
@ -89,11 +87,11 @@ class Monitoring_ListController extends Controller
|
|||
$this->applyFilters($query);
|
||||
|
||||
$this->setupSortControl(array(
|
||||
'host_last_check' => 'Last Host Check',
|
||||
'host_severity' => 'Host Severity',
|
||||
'host_state' => 'Current Host State',
|
||||
'host_name' => 'Host Name',
|
||||
'host_last_check' => 'Last Check',
|
||||
'host_severity' => 'Severity',
|
||||
'host_name' => 'Hostname',
|
||||
'host_address' => 'Address',
|
||||
'host_state' => 'Current State',
|
||||
'host_state' => 'Hard State'
|
||||
));
|
||||
$this->view->hosts = $query->paginate();
|
||||
|
|
|
@ -5,13 +5,16 @@ $helper = $this->getHelper('MonitoringState');
|
|||
<?= $this->tabs ?>
|
||||
<div style="margin: 1em;" class="dontprint">
|
||||
<?= $this->translate('Sort by') ?> <?= $this->sortControl->render($this); ?>
|
||||
<?php if (! $this->filterEditor): ?>
|
||||
<?= $this->filterPreview ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<?= $this->paginationControl($hosts, null, null, array('preserve' => $this->preserve)); ?>
|
||||
<?= $this->selectionToolbar('multi', $this->href('monitoring/multi/host', $query)); ?>
|
||||
|
||||
<?= $this->selectionToolbar('multi', $this->href('monitoring/multi/host?' . $this->filter->toQueryString())); ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?= $this->filterEditor ?>
|
||||
<?php
|
||||
|
||||
if ($hosts->count() === 0) {
|
||||
|
|
Loading…
Reference in New Issue