Skip to content

Commit

Permalink
monitoring: Fix downtime filter columns
Browse files Browse the repository at this point in the history
refs #9009
refs #9319
  • Loading branch information
lippserd committed May 26, 2015
1 parent cd1ee3e commit 6156554
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions modules/monitoring/library/Monitoring/DataView/Downtime.php
Expand Up @@ -6,9 +6,20 @@
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()
{
Expand Down Expand Up @@ -37,6 +48,17 @@ public function getColumns()
);
}

/**
* {@inheritdoc}
*/
public function getFilterColumns()
{
return array('hostgroup', 'hostgroup_alias', 'hostgroup_name', 'servicegroup', 'servicegroup_alias', 'servicegroup_name');
}

/**
* {@inheritdoc}
*/
public function getSortRules()
{
return array(
Expand Down Expand Up @@ -66,9 +88,4 @@ public function getSortRules()
)
);
}

public function getFilterColumns()
{
return array('author', 'host', 'service', 'service_host');
}
}

0 comments on commit 6156554

Please sign in to comment.