mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-21 21:04:25 +02:00
parent
ebe8a409e3
commit
a9680bfd68
@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
||||||
|
|
||||||
|
namespace Icinga\Module\Monitoring\DataView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Host comment view
|
||||||
|
*/
|
||||||
|
class Hostcomment extends DataView
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function isValidFilterTarget($column)
|
||||||
|
{
|
||||||
|
if ($column[0] === '_'
|
||||||
|
&& preg_match('/^_(?:host|service)_/', $column)
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return parent::isValidFilterTarget($column);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getColumns()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'comment_author',
|
||||||
|
'comment_author_name',
|
||||||
|
'comment_data',
|
||||||
|
'comment_expiration',
|
||||||
|
'comment_internal_id',
|
||||||
|
'comment_is_persistent',
|
||||||
|
'comment_timestamp',
|
||||||
|
'comment_type',
|
||||||
|
'host_display_name',
|
||||||
|
'host_name',
|
||||||
|
'object_type'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getFilterColumns()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'host', 'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
||||||
|
'service', 'servicegroup', 'servicegroup_alias', 'servicegroup_name'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user