Dashlets: unify tabs, change apply position
This commit is contained in:
parent
74a887f5af
commit
85e1f0053e
|
@ -4,7 +4,7 @@ namespace Icinga\Module\Director\Dashboard\Dashlet;
|
|||
|
||||
class CommandTemplatesDashlet extends CheckCommandsDashlet
|
||||
{
|
||||
protected $icon = 'wrench';
|
||||
protected $icon = 'cubes';
|
||||
|
||||
public function getSummary()
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Icinga\Module\Director\Dashboard\Dashlet;
|
|||
|
||||
class ExternalCheckCommandsDashlet extends CheckCommandsDashlet
|
||||
{
|
||||
protected $icon = 'wrench';
|
||||
protected $icon = 'download';
|
||||
|
||||
public function getSummary()
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Icinga\Module\Director\Dashboard\Dashlet;
|
|||
|
||||
class NotificationTemplateDashlet extends Dashlet
|
||||
{
|
||||
protected $icon = 'paste';
|
||||
protected $icon = 'cubes';
|
||||
|
||||
protected $requiredStats = array('notification');
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Icinga\Module\Director\Dashboard\Dashlet;
|
|||
|
||||
class ServiceSetsDashlet extends Dashlet
|
||||
{
|
||||
protected $icon = 'pin';
|
||||
protected $icon = 'services';
|
||||
|
||||
public function getTitle()
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Icinga\Module\Director\Dashboard\Dashlet;
|
|||
|
||||
class ServiceTemplatesDashlet extends Dashlet
|
||||
{
|
||||
protected $icon = 'services';
|
||||
protected $icon = 'cubes';
|
||||
|
||||
public function getTitle()
|
||||
{
|
||||
|
|
|
@ -5,8 +5,8 @@ namespace Icinga\Module\Director\Dashboard;
|
|||
class NotificationsDashboard extends Dashboard
|
||||
{
|
||||
protected $dashletNames = [
|
||||
'NotificationTemplate',
|
||||
'NotificationApply',
|
||||
'NotificationTemplate',
|
||||
];
|
||||
|
||||
public function getTitle()
|
||||
|
|
|
@ -6,9 +6,9 @@ class ServicesDashboard extends Dashboard
|
|||
{
|
||||
protected $dashletNames = array(
|
||||
'SingleServices',
|
||||
'ServiceApplyRules',
|
||||
'ServiceTemplates',
|
||||
'ServiceGroups',
|
||||
'ServiceApplyRules',
|
||||
'ServiceChoices',
|
||||
'ServiceSets'
|
||||
);
|
||||
|
|
|
@ -23,6 +23,17 @@ class ObjectsTabs extends Tabs
|
|||
'label' => $this->translate(ucfirst($type) . 's'),
|
||||
));
|
||||
|
||||
if ($auth->hasPermission('director/admin') || (
|
||||
$object->getShortTableName() && $auth->hasPermission('director/notifications')
|
||||
)) {
|
||||
if ($object->supportsApplyRules()) {
|
||||
$this->add('applyrules', array(
|
||||
'url' => sprintf('director/%ss/applyrules', $type),
|
||||
'label' => $this->translate('Apply')
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
if ($auth->hasPermission('director/admin')) {
|
||||
if ($object->supportsImports()) {
|
||||
$this->add('templates', array(
|
||||
|
@ -39,17 +50,6 @@ class ObjectsTabs extends Tabs
|
|||
}
|
||||
}
|
||||
|
||||
if ($auth->hasPermission('director/admin') || (
|
||||
$object->getShortTableName() && $auth->hasPermission('director/notifications')
|
||||
)) {
|
||||
if ($object->supportsApplyRules()) {
|
||||
$this->add('applyrules', array(
|
||||
'url' => sprintf('director/%ss/applyrules', $type),
|
||||
'label' => $this->translate('Apply')
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
if ($auth->hasPermission('director/admin')) {
|
||||
if ($object->supportsChoices()) {
|
||||
$this->add('choices', array(
|
||||
|
|
Loading…
Reference in New Issue