2015-12-17 14:58:43 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Icinga\Module\Director\Tables;
|
|
|
|
|
|
|
|
use Icinga\Module\Director\Web\Table\IcingaObjectTable;
|
|
|
|
|
|
|
|
class IcingaApiUserTable extends IcingaObjectTable
|
|
|
|
{
|
|
|
|
protected $searchColumns = array(
|
|
|
|
'object_name',
|
|
|
|
);
|
|
|
|
|
|
|
|
public function getColumns()
|
|
|
|
{
|
|
|
|
return array(
|
|
|
|
'id' => 'o.id',
|
|
|
|
'object_name' => 'o.object_name',
|
|
|
|
'object_type' => 'o.object_type',
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function getActionUrl($row)
|
|
|
|
{
|
|
|
|
return $this->url('director/apiuser', array('name' => $row->object_name));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getTitles()
|
|
|
|
{
|
|
|
|
$view = $this->view();
|
|
|
|
return array(
|
|
|
|
'object_name' => $view->translate('User'),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getBaseQuery()
|
|
|
|
{
|
2016-11-02 14:27:23 +01:00
|
|
|
return $this->db()->select()->from(
|
2015-12-17 14:58:43 +01:00
|
|
|
array('o' => 'icinga_apiuser'),
|
|
|
|
array()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|