monitoring/service grid: Set up the sort control for the pivot table instead of the service status query

refs #9333
This commit is contained in:
Eric Lippmann 2015-08-18 14:23:12 +02:00
parent 1492218962
commit d449ff661e
1 changed files with 4 additions and 4 deletions

View File

@ -591,16 +591,16 @@ class Monitoring_ListController extends Controller
));
$this->filterQuery($query);
$this->applyRestriction('monitoring/filter/objects', $query);
$this->setupSortControl(array(
'host_name' => $this->translate('Hostname'),
'service_description' => $this->translate('Service description')
), $query);
$pivot = $query->pivot(
'service_description',
'host_name',
$problems ? Filter::where('service_problem', 1) : null,
$problems ? Filter::where('service_problem', 1) : null
);
$this->setupSortControl(array(
'host_name' => $this->translate('Hostname'),
'service_description' => $this->translate('Service description')
), $pivot);
$this->view->pivot = $pivot;
$this->view->horizontalPaginator = $pivot->paginateXAxis();
$this->view->verticalPaginator = $pivot->paginateYAxis();