2013-09-24 15:26:10 +02:00
|
|
|
<?php
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
|
|
|
|
namespace Icinga\Module\Monitoring\DataView;
|
|
|
|
|
|
|
|
class Downtime extends DataView
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Retrieve columns provided by this view
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function getColumns()
|
|
|
|
{
|
|
|
|
return array(
|
2014-03-09 21:58:01 +01:00
|
|
|
'downtime_objecttype',
|
2013-10-19 17:24:28 +02:00
|
|
|
'downtime_author',
|
2014-11-06 13:22:38 +01:00
|
|
|
'author',
|
2013-10-19 17:24:28 +02:00
|
|
|
'downtime_comment',
|
|
|
|
'downtime_entry_time',
|
2013-09-24 15:26:10 +02:00
|
|
|
'downtime_is_fixed',
|
2013-10-19 17:24:28 +02:00
|
|
|
'downtime_is_flexible',
|
|
|
|
'downtime_start',
|
2014-03-09 22:32:40 +01:00
|
|
|
'downtime_scheduled_start',
|
2014-03-09 22:35:33 +01:00
|
|
|
'downtime_scheduled_end',
|
2013-10-19 17:24:28 +02:00
|
|
|
'downtime_end',
|
2013-09-24 15:26:10 +02:00
|
|
|
'downtime_duration',
|
|
|
|
'downtime_is_in_effect',
|
|
|
|
'downtime_triggered_by_id',
|
2014-03-09 21:58:01 +01:00
|
|
|
'downtime_internal_id',
|
|
|
|
'downtime_host',
|
|
|
|
'downtime_service',
|
2014-08-19 17:03:35 +02:00
|
|
|
'downtime_host_state',
|
2015-01-21 12:52:58 +01:00
|
|
|
'downtime_service_state',
|
|
|
|
'host_display_name',
|
|
|
|
'service_display_name'
|
2013-09-24 15:26:10 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getSortRules()
|
|
|
|
{
|
|
|
|
return array(
|
|
|
|
'downtime_is_in_effect' => array(
|
|
|
|
'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
|
|
|
),
|
|
|
|
'downtime_host' => array(
|
|
|
|
'columns' => array(
|
|
|
|
'downtime_host',
|
|
|
|
'downtime_service'
|
|
|
|
),
|
|
|
|
'order' => self::SORT_ASC
|
2015-01-21 12:52:58 +01:00
|
|
|
)
|
2013-09-24 15:26:10 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|