mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
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
|
class CommandTemplatesDashlet extends CheckCommandsDashlet
|
||||||
{
|
{
|
||||||
protected $icon = 'wrench';
|
protected $icon = 'cubes';
|
||||||
|
|
||||||
public function getSummary()
|
public function getSummary()
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@ namespace Icinga\Module\Director\Dashboard\Dashlet;
|
|||||||
|
|
||||||
class ExternalCheckCommandsDashlet extends CheckCommandsDashlet
|
class ExternalCheckCommandsDashlet extends CheckCommandsDashlet
|
||||||
{
|
{
|
||||||
protected $icon = 'wrench';
|
protected $icon = 'download';
|
||||||
|
|
||||||
public function getSummary()
|
public function getSummary()
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@ namespace Icinga\Module\Director\Dashboard\Dashlet;
|
|||||||
|
|
||||||
class NotificationTemplateDashlet extends Dashlet
|
class NotificationTemplateDashlet extends Dashlet
|
||||||
{
|
{
|
||||||
protected $icon = 'paste';
|
protected $icon = 'cubes';
|
||||||
|
|
||||||
protected $requiredStats = array('notification');
|
protected $requiredStats = array('notification');
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ namespace Icinga\Module\Director\Dashboard\Dashlet;
|
|||||||
|
|
||||||
class ServiceSetsDashlet extends Dashlet
|
class ServiceSetsDashlet extends Dashlet
|
||||||
{
|
{
|
||||||
protected $icon = 'pin';
|
protected $icon = 'services';
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle()
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@ namespace Icinga\Module\Director\Dashboard\Dashlet;
|
|||||||
|
|
||||||
class ServiceTemplatesDashlet extends Dashlet
|
class ServiceTemplatesDashlet extends Dashlet
|
||||||
{
|
{
|
||||||
protected $icon = 'services';
|
protected $icon = 'cubes';
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle()
|
||||||
{
|
{
|
||||||
|
@ -5,8 +5,8 @@ namespace Icinga\Module\Director\Dashboard;
|
|||||||
class NotificationsDashboard extends Dashboard
|
class NotificationsDashboard extends Dashboard
|
||||||
{
|
{
|
||||||
protected $dashletNames = [
|
protected $dashletNames = [
|
||||||
'NotificationTemplate',
|
|
||||||
'NotificationApply',
|
'NotificationApply',
|
||||||
|
'NotificationTemplate',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle()
|
||||||
|
@ -6,9 +6,9 @@ class ServicesDashboard extends Dashboard
|
|||||||
{
|
{
|
||||||
protected $dashletNames = array(
|
protected $dashletNames = array(
|
||||||
'SingleServices',
|
'SingleServices',
|
||||||
|
'ServiceApplyRules',
|
||||||
'ServiceTemplates',
|
'ServiceTemplates',
|
||||||
'ServiceGroups',
|
'ServiceGroups',
|
||||||
'ServiceApplyRules',
|
|
||||||
'ServiceChoices',
|
'ServiceChoices',
|
||||||
'ServiceSets'
|
'ServiceSets'
|
||||||
);
|
);
|
||||||
|
@ -23,6 +23,17 @@ class ObjectsTabs extends Tabs
|
|||||||
'label' => $this->translate(ucfirst($type) . 's'),
|
'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 ($auth->hasPermission('director/admin')) {
|
||||||
if ($object->supportsImports()) {
|
if ($object->supportsImports()) {
|
||||||
$this->add('templates', array(
|
$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 ($auth->hasPermission('director/admin')) {
|
||||||
if ($object->supportsChoices()) {
|
if ($object->supportsChoices()) {
|
||||||
$this->add('choices', array(
|
$this->add('choices', array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user