From c31213933404f35152f5ea1b302f92467a393887 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 5 Sep 2014 17:40:57 +0200 Subject: [PATCH] list/services: provide summaries to the view refs #6993 --- .../controllers/ListController.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index e56bb62af..7eb32a2ea 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -235,6 +235,25 @@ class Monitoring_ListController extends Controller // TODO: Workaround, paginate should be able to fetch limit from new params $this->view->services = $query->paginate($this->params->get('limit')); } + + $this->view->stats = $this->backend->select()->from('statusSummary', array( + 'services_total', + 'services_ok', + 'services_problem', + 'services_problem_handled', + 'services_problem_unhandled', + 'services_critical', + 'services_critical_unhandled', + 'services_critical_handled', + 'services_warning', + 'services_warning_unhandled', + 'services_warning_handled', + 'services_unknown', + 'services_unknown_unhandled', + 'services_unknown_handled', + 'services_pending', + ))->getQuery()->fetchRow(); + } /**