2016-12-14 15:00:51 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Icinga\Module\Director\Dashboard\Dashlet;
|
|
|
|
|
|
|
|
class NotificationApplyDashlet extends Dashlet
|
|
|
|
{
|
2022-01-04 19:35:15 +01:00
|
|
|
protected $icon = 'bell';
|
2016-12-14 15:00:51 +01:00
|
|
|
|
|
|
|
protected $requiredStats = array('notification');
|
|
|
|
|
|
|
|
public function getTitle()
|
|
|
|
{
|
|
|
|
return $this->translate('Notifications');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getSummary()
|
|
|
|
{
|
|
|
|
return $this->translate(
|
2021-12-13 13:36:26 +01:00
|
|
|
'Apply notifications with specific properties according to given rules.'
|
|
|
|
) . ' ' . $this->getApplySummaryText('notification');
|
2016-12-14 15:00:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function shouldBeShown()
|
|
|
|
{
|
|
|
|
return $this->getStats('notification', 'template') > 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function listRequiredPermissions()
|
|
|
|
{
|
|
|
|
return array('director/notifications');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getUrl()
|
|
|
|
{
|
2017-06-19 00:43:45 +02:00
|
|
|
return 'director/notifications/applyrules';
|
2016-12-14 15:00:51 +01:00
|
|
|
}
|
|
|
|
}
|