2013-09-24 15:26:10 +02:00
|
|
|
<?php
|
2015-02-04 10:46:36 +01:00
|
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
2013-09-24 15:26:10 +02:00
|
|
|
|
|
|
|
namespace Icinga\Module\Monitoring\DataView;
|
|
|
|
|
2015-05-29 15:36:42 +02:00
|
|
|
/**
|
|
|
|
* Host and service downtimes view
|
|
|
|
*/
|
2013-09-24 15:26:10 +02:00
|
|
|
class Downtime extends DataView
|
|
|
|
{
|
2015-05-26 17:10:23 +02:00
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
2013-09-24 15:26:10 +02:00
|
|
|
*/
|
|
|
|
public function getColumns()
|
|
|
|
{
|
|
|
|
return array(
|
2015-08-25 16:34:18 +02:00
|
|
|
'instance_name',
|
2015-04-10 14:23:05 +02:00
|
|
|
'downtime_author_name',
|
2013-10-19 17:24:28 +02:00
|
|
|
'downtime_comment',
|
2015-05-29 11:44:34 +02:00
|
|
|
'downtime_duration',
|
|
|
|
'downtime_end',
|
2013-10-19 17:24:28 +02:00
|
|
|
'downtime_entry_time',
|
2015-05-29 11:44:34 +02:00
|
|
|
'downtime_internal_id',
|
2013-09-24 15:26:10 +02:00
|
|
|
'downtime_is_fixed',
|
2013-10-19 17:24:28 +02:00
|
|
|
'downtime_is_flexible',
|
2013-09-24 15:26:10 +02:00
|
|
|
'downtime_is_in_effect',
|
2015-05-29 11:44:34 +02:00
|
|
|
'downtime_scheduled_end',
|
|
|
|
'downtime_scheduled_start',
|
|
|
|
'downtime_start',
|
2015-01-21 12:52:58 +01:00
|
|
|
'host_display_name',
|
2015-03-06 13:13:48 +01:00
|
|
|
'host_name',
|
2015-06-18 10:37:27 +02:00
|
|
|
'host_state',
|
2015-05-29 11:44:34 +02:00
|
|
|
'object_type',
|
|
|
|
'service_description',
|
|
|
|
'service_display_name',
|
2015-06-18 10:37:27 +02:00
|
|
|
'service_host_name',
|
|
|
|
'service_state'
|
2013-09-24 15:26:10 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2015-05-26 17:10:23 +02:00
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
2015-08-17 14:04:41 +02:00
|
|
|
public function getStaticFilterColumns()
|
2015-05-26 17:10:23 +02:00
|
|
|
{
|
2015-05-29 11:44:34 +02:00
|
|
|
return array(
|
2015-05-29 15:36:42 +02:00
|
|
|
'downtime_author',
|
2015-06-05 15:48:37 +02:00
|
|
|
'host', 'host_alias',
|
|
|
|
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
|
|
|
'service',
|
|
|
|
'servicegroup', 'servicegroup_alias', 'servicegroup_name'
|
2015-05-29 11:44:34 +02:00
|
|
|
);
|
2015-05-26 17:10:23 +02:00
|
|
|
}
|
|
|
|
|
2015-06-25 13:24:35 +02:00
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function getSearchColumns()
|
|
|
|
{
|
2015-07-31 15:15:13 +02:00
|
|
|
return array('host_display_name', 'service_display_name');
|
2015-06-25 13:24:35 +02:00
|
|
|
}
|
|
|
|
|
2015-05-26 17:10:23 +02:00
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
2013-09-24 15:26:10 +02:00
|
|
|
public function getSortRules()
|
|
|
|
{
|
|
|
|
return array(
|
|
|
|
'downtime_is_in_effect' => array(
|
2015-01-21 12:58:46 +01:00
|
|
|
'columns' => array(
|
|
|
|
'downtime_is_in_effect',
|
|
|
|
'downtime_scheduled_start'
|
|
|
|
),
|
2013-09-24 15:26:10 +02:00
|
|
|
'order' => self::SORT_DESC
|
|
|
|
),
|
2013-10-19 17:24:28 +02:00
|
|
|
'downtime_start' => array(
|
2013-09-24 15:26:10 +02:00
|
|
|
'order' => self::SORT_DESC
|
2014-03-09 22:32:40 +01:00
|
|
|
),
|
2015-01-21 13:06:03 +01:00
|
|
|
'host_display_name' => array(
|
2014-03-09 22:32:40 +01:00
|
|
|
'columns' => array(
|
2015-01-21 13:06:03 +01:00
|
|
|
'host_display_name',
|
|
|
|
'service_display_name'
|
|
|
|
),
|
|
|
|
'order' => self::SORT_ASC
|
|
|
|
),
|
|
|
|
'service_display_name' => array(
|
|
|
|
'columns' => array(
|
|
|
|
'service_display_name',
|
|
|
|
'host_display_name'
|
2014-03-09 22:32:40 +01:00
|
|
|
),
|
|
|
|
'order' => self::SORT_ASC
|
2015-01-21 12:52:58 +01:00
|
|
|
)
|
2013-09-24 15:26:10 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|