Monitoring/DataView: allow to hook in columns
This commit is contained in:
parent
4b9607ad35
commit
f3cb1f915d
|
@ -4,6 +4,7 @@
|
||||||
namespace Icinga\Module\Monitoring\DataView;
|
namespace Icinga\Module\Monitoring\DataView;
|
||||||
|
|
||||||
use IteratorAggregate;
|
use IteratorAggregate;
|
||||||
|
use Icinga\Application\Hook;
|
||||||
use Icinga\Data\ConnectionInterface;
|
use Icinga\Data\ConnectionInterface;
|
||||||
use Icinga\Data\Filter\Filter;
|
use Icinga\Data\Filter\Filter;
|
||||||
use Icinga\Data\Filter\FilterMatch;
|
use Icinga\Data\Filter\FilterMatch;
|
||||||
|
@ -122,6 +123,18 @@ abstract class DataView implements QueryInterface, SortRules, FilterColumns, Ite
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getHookedColumns()
|
||||||
|
{
|
||||||
|
$columns = array();
|
||||||
|
foreach (Hook::all('monitoring/dataviewExtension') as $hook) {
|
||||||
|
foreach ($hook->getAdditionalQueryColumns($this->getQueryName()) as $col) {
|
||||||
|
$columns[] = $col;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $columns;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: This is not the right place for this, move it away
|
// TODO: This is not the right place for this, move it away
|
||||||
protected function applyUrlFilter($request = null)
|
protected function applyUrlFilter($request = null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue