mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 09:14:09 +02:00
Dashboard: add missing Dashlets
This commit is contained in:
parent
5596df5039
commit
7028a64c1b
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Icinga\Module\Director\Dashboard\Dashlet;
|
||||
|
||||
class TimeperiodTemplateDashlet extends Dashlet
|
||||
{
|
||||
protected $icon = 'cubes';
|
||||
|
||||
protected $requiredStats = array('timeperiod');
|
||||
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->translate('Timeperiod Templates');
|
||||
}
|
||||
|
||||
public function getSummary()
|
||||
{
|
||||
return $this->translate('Provide templates for your TimePeriod objects.')
|
||||
. ' ' . $this->getTemplateSummaryText('timeperiod');
|
||||
}
|
||||
|
||||
public function listRequiredPermissions()
|
||||
{
|
||||
return array('director/admin');
|
||||
}
|
||||
|
||||
public function getUrl()
|
||||
{
|
||||
return 'director/timeperiods/templates';
|
||||
}
|
||||
}
|
31
library/Director/Dashboard/Dashlet/UserGroupsDashlet.php
Normal file
31
library/Director/Dashboard/Dashlet/UserGroupsDashlet.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Icinga\Module\Director\Dashboard\Dashlet;
|
||||
|
||||
class UserGroupsDashlet extends Dashlet
|
||||
{
|
||||
protected $icon = 'tags';
|
||||
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->translate('User Groups');
|
||||
}
|
||||
|
||||
public function getSummary()
|
||||
{
|
||||
return $this->translate(
|
||||
'Defining Notifications for User Groups instead of single Users'
|
||||
. ' gives more flexibility'
|
||||
);
|
||||
}
|
||||
|
||||
public function getUrl()
|
||||
{
|
||||
return 'director/usergroups';
|
||||
}
|
||||
|
||||
public function listRequiredPermissions()
|
||||
{
|
||||
return array('director/admin');
|
||||
}
|
||||
}
|
31
library/Director/Dashboard/Dashlet/UserTemplateDashlet.php
Normal file
31
library/Director/Dashboard/Dashlet/UserTemplateDashlet.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Icinga\Module\Director\Dashboard\Dashlet;
|
||||
|
||||
class UserTemplateDashlet extends Dashlet
|
||||
{
|
||||
protected $icon = 'cubes';
|
||||
|
||||
protected $requiredStats = array('user');
|
||||
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->translate('User Templates');
|
||||
}
|
||||
|
||||
public function getSummary()
|
||||
{
|
||||
return $this->translate('Provide templates for your User objects.')
|
||||
. ' ' . $this->getTemplateSummaryText('user');
|
||||
}
|
||||
|
||||
public function listRequiredPermissions()
|
||||
{
|
||||
return array('director/admin');
|
||||
}
|
||||
|
||||
public function getUrl()
|
||||
{
|
||||
return 'director/users/templates';
|
||||
}
|
||||
}
|
@ -5,8 +5,8 @@ namespace Icinga\Module\Director\Dashboard;
|
||||
class TimeperiodsDashboard extends Dashboard
|
||||
{
|
||||
protected $dashletNames = [
|
||||
'TimeperiodObject'
|
||||
// 'TimeperiodTemplate',
|
||||
'TimeperiodObject',
|
||||
'TimeperiodTemplate',
|
||||
];
|
||||
|
||||
public function getTitle()
|
||||
|
@ -6,8 +6,8 @@ class UsersDashboard extends Dashboard
|
||||
{
|
||||
protected $dashletNames = [
|
||||
'UserObject',
|
||||
// 'UserTemplate',
|
||||
// 'UserGroup',
|
||||
'UserTemplate',
|
||||
'UserGroups',
|
||||
];
|
||||
|
||||
public function getTitle()
|
||||
|
Loading…
x
Reference in New Issue
Block a user