2013-09-24 09:26:10 -04:00
|
|
|
<?php
|
2015-02-04 04:46:36 -05:00
|
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
2013-09-24 09:26:10 -04:00
|
|
|
|
|
|
|
|
namespace Icinga\Module\Monitoring\DataView;
|
|
|
|
|
|
|
|
|
|
class Notification extends DataView
|
|
|
|
|
{
|
2015-06-08 11:09:24 -04:00
|
|
|
/**
|
|
|
|
|
* {@inheritdoc}
|
|
|
|
|
*/
|
2013-09-24 09:26:10 -04:00
|
|
|
public function getColumns()
|
|
|
|
|
{
|
|
|
|
|
return array(
|
2015-08-25 10:35:16 -04:00
|
|
|
'instance_name',
|
2013-10-19 07:13:56 -04:00
|
|
|
'notification_state',
|
2013-09-24 09:26:10 -04:00
|
|
|
'notification_start_time',
|
2015-04-13 09:26:06 -04:00
|
|
|
'notification_contact_name',
|
2013-10-19 07:13:56 -04:00
|
|
|
'notification_output',
|
2015-06-08 11:09:24 -04:00
|
|
|
'notification_object_id',
|
|
|
|
|
'contact_object_id',
|
|
|
|
|
'acknowledgement_entry_time',
|
|
|
|
|
'acknowledgement_author_name',
|
|
|
|
|
'acknowledgement_comment_data',
|
2015-01-21 09:47:36 -05:00
|
|
|
'host_display_name',
|
2015-06-08 11:09:24 -04:00
|
|
|
'host_name',
|
|
|
|
|
'object_type',
|
|
|
|
|
'service_description',
|
|
|
|
|
'service_display_name',
|
|
|
|
|
'service_host_name'
|
2013-09-24 09:26:10 -04:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-08 11:09:24 -04:00
|
|
|
/**
|
|
|
|
|
* {@inheritdoc}
|
|
|
|
|
*/
|
2013-09-24 09:26:10 -04:00
|
|
|
public function getSortRules()
|
|
|
|
|
{
|
|
|
|
|
return array(
|
|
|
|
|
'notification_start_time' => array(
|
2014-06-06 03:07:07 -04:00
|
|
|
'order' => self::SORT_DESC,
|
|
|
|
|
'title' => 'Notification Start'
|
2015-06-08 11:09:24 -04:00
|
|
|
),
|
|
|
|
|
'host_display_name' => array(
|
|
|
|
|
'columns' => array(
|
|
|
|
|
'host_display_name',
|
|
|
|
|
'service_display_name'
|
|
|
|
|
),
|
|
|
|
|
'order' => self::SORT_ASC
|
|
|
|
|
),
|
|
|
|
|
'service_display_name' => array(
|
|
|
|
|
'columns' => array(
|
|
|
|
|
'service_display_name',
|
|
|
|
|
'host_display_name'
|
|
|
|
|
),
|
|
|
|
|
'order' => self::SORT_ASC
|
2013-09-24 09:26:10 -04:00
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
}
|
2015-04-13 09:32:52 -04:00
|
|
|
|
2015-06-08 11:09:24 -04:00
|
|
|
/**
|
|
|
|
|
* {@inheritdoc}
|
|
|
|
|
*/
|
2015-08-17 08:05:56 -04:00
|
|
|
public function getStaticFilterColumns()
|
2015-04-13 09:32:52 -04:00
|
|
|
{
|
2015-06-08 11:09:24 -04:00
|
|
|
return array(
|
|
|
|
|
'contact',
|
|
|
|
|
'host', 'host_alias',
|
|
|
|
|
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
|
|
|
|
'service',
|
|
|
|
|
'servicegroup', 'servicegroup_alias', 'servicegroup_name'
|
|
|
|
|
);
|
2015-04-13 09:32:52 -04:00
|
|
|
}
|
2015-06-25 07:21:43 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* {@inheritdoc}
|
|
|
|
|
*/
|
|
|
|
|
public function getSearchColumns()
|
|
|
|
|
{
|
2015-07-31 09:15:13 -04:00
|
|
|
return array('host_display_name', 'service_display_name');
|
2015-06-25 07:21:43 -04:00
|
|
|
}
|
2013-09-24 09:26:10 -04:00
|
|
|
}
|