summaryrefslogtreecommitdiffstats
path: root/library/Director/Dashboard/Dashlet/ServiceObjectDashlet.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Director/Dashboard/Dashlet/ServiceObjectDashlet.php')
-rw-r--r--library/Director/Dashboard/Dashlet/ServiceObjectDashlet.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/library/Director/Dashboard/Dashlet/ServiceObjectDashlet.php b/library/Director/Dashboard/Dashlet/ServiceObjectDashlet.php
new file mode 100644
index 0000000..01fb800
--- /dev/null
+++ b/library/Director/Dashboard/Dashlet/ServiceObjectDashlet.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Icinga\Module\Director\Dashboard\Dashlet;
+
+use Icinga\Module\Director\Acl;
+
+class ServiceObjectDashlet extends Dashlet
+{
+ protected $icon = 'services';
+
+ protected $requiredStats = array('service', 'servicegroup');
+
+ public function getTitle()
+ {
+ return $this->translate('Monitored Services');
+ }
+
+ public function getUrl()
+ {
+ return 'director/dashboard?name=services';
+ }
+
+ public function listRequiredPermissions()
+ {
+ return ['director/services'];
+ }
+
+ public function isAllowed()
+ {
+ $acl = Acl::instance();
+ return $acl->hasPermission('director/services')
+ || $acl->hasPermission('director/service_sets');
+ }
+}