2015-05-19 11:31:17 -04:00
|
|
|
<?php
|
2016-02-08 09:41:00 -05:00
|
|
|
/* Icinga Web 2 | (c) 2015 Icinga Development Team | GPLv2+ */
|
2015-05-19 11:31:17 -04:00
|
|
|
|
|
|
|
|
namespace Icinga\Module\Monitoring\DataView;
|
|
|
|
|
|
2015-06-03 06:53:56 -04:00
|
|
|
/**
|
|
|
|
|
* Data view for service group summaries
|
|
|
|
|
*/
|
2015-05-20 10:16:21 -04:00
|
|
|
class Servicegroupsummary extends DataView
|
2015-05-19 11:31:17 -04:00
|
|
|
{
|
2015-05-20 10:16:21 -04:00
|
|
|
public function getColumns()
|
|
|
|
|
{
|
|
|
|
|
return array(
|
|
|
|
|
'servicegroup_alias',
|
|
|
|
|
'servicegroup_name',
|
|
|
|
|
'services_critical_handled',
|
|
|
|
|
'services_critical_unhandled',
|
|
|
|
|
'services_ok',
|
|
|
|
|
'services_pending',
|
2018-04-04 04:05:27 -04:00
|
|
|
'services_severity',
|
2015-05-20 10:16:21 -04:00
|
|
|
'services_total',
|
|
|
|
|
'services_unknown_handled',
|
|
|
|
|
'services_unknown_unhandled',
|
|
|
|
|
'services_warning_handled',
|
2017-07-27 09:03:12 -04:00
|
|
|
'services_warning_unhandled'
|
2015-05-20 10:16:21 -04:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2015-05-19 11:50:07 -04:00
|
|
|
public function getSearchColumns()
|
|
|
|
|
{
|
2017-11-08 09:40:43 -05:00
|
|
|
return array('servicegroup', 'servicegroup_alias');
|
2015-05-19 11:50:07 -04:00
|
|
|
}
|
2015-05-21 06:41:29 -04:00
|
|
|
|
|
|
|
|
public function getSortRules()
|
|
|
|
|
{
|
|
|
|
|
return array(
|
|
|
|
|
'servicegroup_alias' => array(
|
|
|
|
|
'order' => self::SORT_ASC
|
2018-04-04 04:05:27 -04:00
|
|
|
),
|
|
|
|
|
'services_severity' => array(
|
|
|
|
|
'columns' => array(
|
|
|
|
|
'services_severity',
|
|
|
|
|
'servicegroup_alias ASC'
|
|
|
|
|
),
|
|
|
|
|
'order' => self::SORT_DESC
|
2015-05-21 06:41:29 -04:00
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
}
|
2017-07-27 09:03:12 -04:00
|
|
|
|
|
|
|
|
public function getStaticFilterColumns()
|
|
|
|
|
{
|
|
|
|
|
return array(
|
|
|
|
|
'instance_name',
|
|
|
|
|
'services_severity',
|
2019-09-26 07:48:49 -04:00
|
|
|
'host_contact', 'host_contactgroup', 'host_name',
|
|
|
|
|
'hostgroup_name',
|
|
|
|
|
'service_contact', 'service_contactgroup', 'service_description',
|
2017-07-27 09:03:12 -04:00
|
|
|
'servicegroup'
|
|
|
|
|
);
|
|
|
|
|
}
|
2019-09-26 07:48:49 -04:00
|
|
|
|
|
|
|
|
public function getFilterColumns()
|
|
|
|
|
{
|
|
|
|
|
if ($this->filterColumns === null) {
|
|
|
|
|
$filterColumns = parent::getFilterColumns();
|
|
|
|
|
$diff = array_diff($filterColumns, $this->getColumns());
|
|
|
|
|
$this->filterColumns = array_merge($diff, [
|
|
|
|
|
'Servicegroup Name' => 'servicegroup_name',
|
|
|
|
|
'Servicegroup Alias' => 'servicegroup_alias'
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $this->filterColumns;
|
|
|
|
|
}
|
2015-05-19 11:31:17 -04:00
|
|
|
}
|