From e879ba445dc308c5524bb83e6cddb9c73b32071e Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 13 May 2015 18:15:04 +0200 Subject: [PATCH] List number of hosts in host groups refs #8054 --- .../application/controllers/ListController.php | 1 + .../application/views/scripts/list/hostgroups.phtml | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 948050db6..540f21bae 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -534,6 +534,7 @@ class Monitoring_ListController extends Controller 'hosts_unreachable_last_state_change_handled', 'hosts_down_last_state_change_unhandled', 'hosts_unreachable_last_state_change_unhandled', + 'hosts_total', 'services_ok', 'services_unknown_handled', 'services_unknown_unhandled', diff --git a/modules/monitoring/application/views/scripts/list/hostgroups.phtml b/modules/monitoring/application/views/scripts/list/hostgroups.phtml index 90e96e660..89045d9ab 100644 --- a/modules/monitoring/application/views/scripts/list/hostgroups.phtml +++ b/modules/monitoring/application/views/scripts/list/hostgroups.phtml @@ -22,6 +22,7 @@ if (count($hostgroups) === 0) { translate('Last Problem'); ?> translate('Host Group'); ?> + translate('Total Hosts'); ?> translate('Total Services'); ?> translate('Service States'); ?> @@ -68,6 +69,17 @@ if (count($hostgroups) === 0) { array('title' => sprintf($this->translate('List all hosts in the group "%s"'), $h->hostgroup_alias)) ); ?> + + qlink( + $h->hosts_total, + 'monitoring/list/hosts', + array('hostgroup_name' => $h->hostgroup_name), + array('title' => sprintf( + $this->translate('List all hosts in host group "%s"'), + $h->hostgroup_alias + )) + ); ?> + qlink( $h->services_total,