ChoicesDashlet: new dashlets, host, service

This commit is contained in:
Thomas Gelf 2017-06-20 20:45:42 +02:00
parent 9208c3b53c
commit 0cb1b328ec
3 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,41 @@
<?php
namespace Icinga\Module\Director\Dashboard\Dashlet;
abstract class ChoicesDashlet extends Dashlet
{
protected $icon = 'flapping';
public function getTitle()
{
return $this->translate('Choices');
}
public function getSummary()
{
return $this->translate(
'Combine multiple templates into meaningful Choices, making live'
. ' easier for your users'
);
}
protected function getType()
{
return strtolower(substr(
substr(get_called_class(), strlen(__NAMESPACE__) + 1),
0,
- strlen('ChoicesDashlet')
));
}
public function getUrl()
{
return 'director/templatechoices/' . $this->getType();
}
public function listRequiredPermissions()
{
return array('director/admin');
}
}

View File

@ -0,0 +1,7 @@
<?php
namespace Icinga\Module\Director\Dashboard\Dashlet;
class HostChoicesDashlet extends ChoicesDashlet
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace Icinga\Module\Director\Dashboard\Dashlet;
class ServiceChoicesDashlet extends ChoicesDashlet
{
}