mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 22:34:24 +02:00
parent
9ea3f73e83
commit
0c43e4a36b
@ -581,29 +581,31 @@ class Monitoring_ListController extends Controller
|
||||
{
|
||||
$this->addTitleTab('servicegrid', $this->translate('Service Grid'), $this->translate('Show the Service Grid'));
|
||||
$this->setAutorefreshInterval(15);
|
||||
$problems = (bool) $this->params->shift('problems', 0);
|
||||
$query = $this->backend->select()->from('servicestatus', array(
|
||||
'host_display_name',
|
||||
'host_name',
|
||||
'service_description',
|
||||
'service_state',
|
||||
'service_display_name',
|
||||
'service_handled',
|
||||
'service_output',
|
||||
'service_handled'
|
||||
'service_state'
|
||||
));
|
||||
$this->filterQuery($query);
|
||||
$this->applyRestriction('monitoring/filter/objects', $query);
|
||||
$this->setupSortControl(array(
|
||||
'host_name' => $this->translate('Hostname'),
|
||||
'service_description' => $this->translate('Service description')
|
||||
'host_display_name' => $this->translate('Hostname'),
|
||||
'service_display_name' => $this->translate('Service Name')
|
||||
), $query);
|
||||
$filter = (bool) $this->params->shift('problems', false) ? Filter::where('service_problem', 1) : null;
|
||||
$pivot = $query->pivot(
|
||||
'service_description',
|
||||
'host_name',
|
||||
$problems ? Filter::where('service_problem', 1) : null,
|
||||
$problems ? Filter::where('service_problem', 1) : null
|
||||
$filter,
|
||||
$filter ? clone $filter : null
|
||||
);
|
||||
$this->view->pivot = $pivot;
|
||||
$this->view->horizontalPaginator = $pivot->paginateXAxis();
|
||||
$this->view->verticalPaginator = $pivot->paginateYAxis();
|
||||
$this->view->verticalPaginator = $pivot->paginateYAxis();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user