2013-09-26 17:02:56 +02:00
|
|
|
<?php
|
2015-02-04 10:46:36 +01:00
|
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
2013-09-26 17:02:56 +02:00
|
|
|
|
|
|
|
namespace Icinga\Module\Monitoring\DataView;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* View representation for comments
|
|
|
|
*/
|
|
|
|
class Comment extends DataView
|
|
|
|
{
|
|
|
|
/**
|
2015-03-11 10:43:19 +01:00
|
|
|
* {@inheritdoc}
|
2013-09-26 17:02:56 +02:00
|
|
|
*/
|
|
|
|
public function getColumns()
|
|
|
|
{
|
|
|
|
return array(
|
2014-03-09 19:29:23 +01:00
|
|
|
'comment_objecttype',
|
|
|
|
'comment_internal_id',
|
2013-09-26 17:02:56 +02:00
|
|
|
'comment_data',
|
|
|
|
'comment_author',
|
|
|
|
'comment_timestamp',
|
|
|
|
'comment_type',
|
|
|
|
'comment_is_persistent',
|
2014-03-09 20:05:59 +01:00
|
|
|
'comment_expiration',
|
|
|
|
'comment_host',
|
|
|
|
'comment_service',
|
2014-06-20 12:21:50 +02:00
|
|
|
'host',
|
|
|
|
'service',
|
2015-01-21 16:09:36 +01:00
|
|
|
'host_display_name',
|
|
|
|
'service_display_name'
|
2013-09-26 17:02:56 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-03-11 10:43:19 +01:00
|
|
|
* {@inheritdoc}
|
2013-09-26 17:02:56 +02:00
|
|
|
*/
|
|
|
|
public function getSortRules()
|
|
|
|
{
|
|
|
|
return array(
|
|
|
|
'comment_timestamp' => array(
|
2014-03-09 19:29:23 +01:00
|
|
|
'order' => self::SORT_DESC
|
2013-09-26 17:02:56 +02:00
|
|
|
),
|
2015-01-21 16:15:09 +01:00
|
|
|
'host_display_name' => array(
|
2014-03-09 19:29:23 +01:00
|
|
|
'columns' => array(
|
2015-01-21 16:15:09 +01:00
|
|
|
'host_display_name',
|
|
|
|
'service_display_name'
|
2013-09-26 17:02:56 +02:00
|
|
|
),
|
2014-03-09 19:29:23 +01:00
|
|
|
'order' => self::SORT_ASC
|
2013-09-26 17:02:56 +02:00
|
|
|
),
|
2015-01-21 16:15:09 +01:00
|
|
|
'service_display_name' => array(
|
|
|
|
'columns' => array(
|
|
|
|
'service_display_name',
|
|
|
|
'host_display_name'
|
|
|
|
),
|
|
|
|
'order' => self::SORT_ASC
|
|
|
|
)
|
2013-09-26 17:02:56 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|