Implement and use Hostgroupsummary and Servicegroupsummary

refs #8241
This commit is contained in:
Alexander A. Klimov 2015-05-19 17:31:17 +02:00
parent 2ed1d6c66b
commit 6ba07b089d
5 changed files with 28 additions and 9 deletions

View File

@ -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',

View File

@ -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',

View File

@ -64,9 +64,4 @@ class Groupsummary extends DataView
)
);
}
public function getFilterColumns()
{
return array('hostgroup', 'servicegroup');
}
}

View File

@ -0,0 +1,12 @@
<?php
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
namespace Icinga\Module\Monitoring\DataView;
class Hostgroupsummary extends Groupsummary
{
public function getFilterColumns()
{
return array('hostgroup');
}
}

View File

@ -0,0 +1,12 @@
<?php
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
namespace Icinga\Module\Monitoring\DataView;
class Servicegroupsummary extends Groupsummary
{
public function getFilterColumns()
{
return array('servicegroup');
}
}