mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
notification(s): controllers, table
This commit is contained in:
parent
915b776e37
commit
30868c16a1
9
application/controllers/NotificationController.php
Normal file
9
application/controllers/NotificationController.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Director\Controllers;
|
||||||
|
|
||||||
|
use Icinga\Module\Director\Web\Controller\ObjectController;
|
||||||
|
|
||||||
|
class NotificationController extends ObjectController
|
||||||
|
{
|
||||||
|
}
|
9
application/controllers/NotificationsController.php
Normal file
9
application/controllers/NotificationsController.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Director\Controllers;
|
||||||
|
|
||||||
|
use Icinga\Module\Director\Web\Controller\ObjectsController;
|
||||||
|
|
||||||
|
class NotificationsController extends ObjectsController
|
||||||
|
{
|
||||||
|
}
|
50
application/tables/IcingaNotificationTable.php
Normal file
50
application/tables/IcingaNotificationTable.php
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Director\Tables;
|
||||||
|
|
||||||
|
use Icinga\Module\Director\Web\Table\IcingaObjectTable;
|
||||||
|
|
||||||
|
class IcingaNotificationTable extends IcingaObjectTable
|
||||||
|
{
|
||||||
|
protected $searchColumns = array(
|
||||||
|
'user',
|
||||||
|
);
|
||||||
|
|
||||||
|
public function getColumns()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'id' => 'n.id',
|
||||||
|
'object_type' => 'n.object_type',
|
||||||
|
'notification' => 'n.object_name',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getActionUrl($row)
|
||||||
|
{
|
||||||
|
return $this->url('director/notification', array('id' => $row->id));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTitles()
|
||||||
|
{
|
||||||
|
$view = $this->view();
|
||||||
|
return array(
|
||||||
|
'notification' => $view->translate('Notification'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUnfilteredQuery()
|
||||||
|
{
|
||||||
|
$db = $this->connection()->getConnection();
|
||||||
|
$query = $db->select()->from(
|
||||||
|
array('n' => 'icinga_notification'),
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBaseQuery()
|
||||||
|
{
|
||||||
|
return $this->getUnfilteredQuery();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user