ShowController: Restrict the servicestatus summary

I doubt that this is necessary, since showing hosts and services by using
this controller is deprecated, but I've added it nonetheless..

refs #9009
This commit is contained in:
Johannes Meyer 2015-06-15 16:03:46 +02:00
parent 8b749521ba
commit 32c5d5a1ee
1 changed files with 4 additions and 2 deletions

View File

@ -80,7 +80,7 @@ class Monitoring_ShowController extends Controller
protected function fetchHostStats()
{
$this->view->stats = $this->backend->select()->from('servicestatussummary', array(
$query = $this->backend->select()->from('servicestatussummary', array(
'services_total',
'services_ok',
'services_critical',
@ -93,7 +93,9 @@ class Monitoring_ShowController extends Controller
'services_unknown_unhandled',
'services_unknown_handled',
'services_pending',
))->where('service_host_name', $this->params->get('host'))->getQuery()->fetchRow();
))->where('service_host_name', $this->params->get('host'));
$this->applyRestriction('monitoring/filter/objects', $query);
$this->view->stats = $query->getQuery()->fetchRow();
}
public function contactAction()