2017-06-16 13:52:53 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Icinga\Module\Director\Web\Table;
|
|
|
|
|
2017-07-20 17:19:51 +02:00
|
|
|
use Zend_Db_Select as ZfSelect;
|
|
|
|
|
2017-06-16 13:52:53 +02:00
|
|
|
class ObjectsTableCommand extends ObjectsTable
|
|
|
|
{
|
2017-08-25 10:51:21 +02:00
|
|
|
// TODO: Notifications separately?
|
2017-06-16 13:52:53 +02:00
|
|
|
protected $searchColumns = [
|
|
|
|
'o.object_name',
|
|
|
|
'o.command',
|
|
|
|
];
|
|
|
|
|
|
|
|
protected $columns = [
|
|
|
|
'object_name' => 'o.object_name',
|
2017-07-04 01:34:19 +02:00
|
|
|
'disabled' => 'o.disabled',
|
2017-06-16 13:52:53 +02:00
|
|
|
'command' => 'o.command',
|
|
|
|
];
|
|
|
|
|
|
|
|
protected $showColumns = [
|
|
|
|
'object_name' => 'Command',
|
|
|
|
'command' => 'Command line'
|
|
|
|
];
|
2017-07-20 17:19:51 +02:00
|
|
|
|
|
|
|
private $objectType;
|
|
|
|
|
|
|
|
public function setType($type)
|
|
|
|
{
|
|
|
|
$this->getQuery()->where('object_type = ?', $type);
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function applyObjectTypeFilter(ZfSelect $query)
|
|
|
|
{
|
|
|
|
return $query;
|
|
|
|
}
|
2017-06-16 13:52:53 +02:00
|
|
|
}
|