mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
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->addTitleTab('hosts');
|
||||||
$this->setAutorefreshInterval(10);
|
$this->setAutorefreshInterval(10);
|
||||||
// TODO: Get rid of query here (multiselect)
|
|
||||||
$this->view->query = $this->_request->getQuery();
|
|
||||||
$this->compactView = 'hosts-compact';
|
$this->compactView = 'hosts-compact';
|
||||||
$query = $this->backend->select()->from('hostStatus', array(
|
$query = $this->backend->select()->from('hostStatus', array(
|
||||||
'host_icon_image',
|
'host_icon_image',
|
||||||
@ -89,11 +87,11 @@ class Monitoring_ListController extends Controller
|
|||||||
$this->applyFilters($query);
|
$this->applyFilters($query);
|
||||||
|
|
||||||
$this->setupSortControl(array(
|
$this->setupSortControl(array(
|
||||||
'host_last_check' => 'Last Host Check',
|
'host_last_check' => 'Last Check',
|
||||||
'host_severity' => 'Host Severity',
|
'host_severity' => 'Severity',
|
||||||
'host_state' => 'Current Host State',
|
'host_name' => 'Hostname',
|
||||||
'host_name' => 'Host Name',
|
|
||||||
'host_address' => 'Address',
|
'host_address' => 'Address',
|
||||||
|
'host_state' => 'Current State',
|
||||||
'host_state' => 'Hard State'
|
'host_state' => 'Hard State'
|
||||||
));
|
));
|
||||||
$this->view->hosts = $query->paginate();
|
$this->view->hosts = $query->paginate();
|
||||||
|
@ -5,13 +5,16 @@ $helper = $this->getHelper('MonitoringState');
|
|||||||
<?= $this->tabs ?>
|
<?= $this->tabs ?>
|
||||||
<div style="margin: 1em;" class="dontprint">
|
<div style="margin: 1em;" class="dontprint">
|
||||||
<?= $this->translate('Sort by') ?> <?= $this->sortControl->render($this); ?>
|
<?= $this->translate('Sort by') ?> <?= $this->sortControl->render($this); ?>
|
||||||
|
<?php if (! $this->filterEditor): ?>
|
||||||
|
<?= $this->filterPreview ?>
|
||||||
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?= $this->paginationControl($hosts, null, null, array('preserve' => $this->preserve)); ?>
|
<?= $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>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
<?= $this->filterEditor ?>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($hosts->count() === 0) {
|
if ($hosts->count() === 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user