From 6ba07b089ddd7b9c76730455a60e2733784bdcbe Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 19 May 2015 17:31:17 +0200 Subject: [PATCH] Implement and use Hostgroupsummary and Servicegroupsummary refs #8241 --- .../application/controllers/ChartController.php | 4 ++-- .../application/controllers/ListController.php | 4 ++-- .../library/Monitoring/DataView/Groupsummary.php | 5 ----- .../library/Monitoring/DataView/Hostgroupsummary.php | 12 ++++++++++++ .../Monitoring/DataView/Servicegroupsummary.php | 12 ++++++++++++ 5 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php create mode 100644 modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php diff --git a/modules/monitoring/application/controllers/ChartController.php b/modules/monitoring/application/controllers/ChartController.php index 39f60c304..d2e9f990c 100644 --- a/modules/monitoring/application/controllers/ChartController.php +++ b/modules/monitoring/application/controllers/ChartController.php @@ -163,7 +163,7 @@ class Monitoring_ChartController extends Controller public function hostgroupAction() { $query = $this->backend->select()->from( - 'groupsummary', + 'hostgroupsummary', array( 'hostgroup', 'hosts_up', @@ -194,7 +194,7 @@ class Monitoring_ChartController extends Controller public function servicegroupAction() { $query = $this->backend->select()->from( - 'groupsummary', + 'servicegroupsummary', array( 'servicegroup', 'services_ok', diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index df5a10dee..01e2adc44 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -470,7 +470,7 @@ class Monitoring_ListController extends Controller ); $this->setAutorefreshInterval(12); - $query = $this->backend->select()->from('groupsummary', array( + $query = $this->backend->select()->from('servicegroupsummary', array( 'servicegroup_name', 'servicegroup_alias', 'hosts_up', @@ -521,7 +521,7 @@ class Monitoring_ListController extends Controller $this->addTitleTab('hostgroups', $this->translate('Host Groups'), $this->translate('List host groups')); $this->setAutorefreshInterval(12); - $query = $this->backend->select()->from('groupsummary', array( + $query = $this->backend->select()->from('hostgroupsummary', array( 'hostgroup_name', 'hostgroup_alias', 'hosts_up', diff --git a/modules/monitoring/library/Monitoring/DataView/Groupsummary.php b/modules/monitoring/library/Monitoring/DataView/Groupsummary.php index d29c1c418..f823d00a4 100644 --- a/modules/monitoring/library/Monitoring/DataView/Groupsummary.php +++ b/modules/monitoring/library/Monitoring/DataView/Groupsummary.php @@ -64,9 +64,4 @@ class Groupsummary extends DataView ) ); } - - public function getFilterColumns() - { - return array('hostgroup', 'servicegroup'); - } } diff --git a/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php b/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php new file mode 100644 index 000000000..ba8e49987 --- /dev/null +++ b/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php @@ -0,0 +1,12 @@ +