Dashlet: introduce new command dashlets, wip

This commit is contained in:
Thomas Gelf 2017-06-19 00:35:32 +02:00
parent 8f30956992
commit 36eaff3d9c
5 changed files with 115 additions and 0 deletions

View File

@ -0,0 +1,31 @@
<?php
namespace Icinga\Module\Director\Dashboard\Dashlet;
class CheckCommandsDashlet extends Dashlet
{
protected $icon = 'wrench';
public function getSummary()
{
return $this->translate(
'Check Commands are executed every time a Host or Service check has'
. ' to be run'
);
}
public function getTitle()
{
return $this->translate('Check Commands');
}
public function listRequiredPermissions()
{
return array('director/admin');
}
public function getUrl()
{
return 'director/commands';
}
}

View File

@ -0,0 +1,21 @@
<?php
namespace Icinga\Module\Director\Dashboard\Dashlet;
class CommandTemplatesDashlet extends CheckCommandsDashlet
{
protected $icon = 'wrench';
public function getSummary()
{
return $this->translate(
'External Notification Commands have been defined in your local Icinga 2'
. ' Configuration. '
);
}
public function getTitle()
{
return $this->translate('External Notification Commands');
}
}

View File

@ -0,0 +1,21 @@
<?php
namespace Icinga\Module\Director\Dashboard\Dashlet;
class ExternalCheckCommandsDashlet extends CheckCommandsDashlet
{
protected $icon = 'wrench';
public function getSummary()
{
return $this->translate(
'External Check Commands have been defined in your local Icinga 2'
. ' Configuration. '
);
}
public function getTitle()
{
return $this->translate('External Check Commands');
}
}

View File

@ -0,0 +1,21 @@
<?php
namespace Icinga\Module\Director\Dashboard\Dashlet;
class ExternalNotificationCommandsDashlet extends CheckCommandsDashlet
{
protected $icon = 'wrench';
public function getSummary()
{
return $this->translate(
'External Notification Commands have been defined in your local Icinga 2'
. ' Configuration. '
);
}
public function getTitle()
{
return $this->translate('External Notification Commands');
}
}

View File

@ -0,0 +1,21 @@
<?php
namespace Icinga\Module\Director\Dashboard\Dashlet;
class NotificationCommandsDashlet extends CheckCommandsDashlet
{
protected $icon = 'wrench';
public function getSummary()
{
return $this->translate(
'Notification Commands allow you to trigger any action you want when'
. ' a notification takes place'
);
}
public function getTitle()
{
return $this->translate('Notification Commands');
}
}