parent
cd1ee3e306
commit
61565543ab
|
@ -6,9 +6,20 @@ namespace Icinga\Module\Monitoring\DataView;
|
|||
class Downtime extends DataView
|
||||
{
|
||||
/**
|
||||
* Retrieve columns provided by this view
|
||||
*
|
||||
* @return array
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function isValidFilterTarget($column)
|
||||
{
|
||||
if ($column[0] === '_'
|
||||
&& preg_match('/^_(?:host|service)_/', $column)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return parent::isValidFilterTarget($column);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getColumns()
|
||||
{
|
||||
|
@ -37,6 +48,17 @@ class Downtime extends DataView
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getFilterColumns()
|
||||
{
|
||||
return array('hostgroup', 'hostgroup_alias', 'hostgroup_name', 'servicegroup', 'servicegroup_alias', 'servicegroup_name');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSortRules()
|
||||
{
|
||||
return array(
|
||||
|
@ -66,9 +88,4 @@ class Downtime extends DataView
|
|||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function getFilterColumns()
|
||||
{
|
||||
return array('author', 'host', 'service', 'service_host');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue