mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-25 23:04:53 +02:00
parent
05d8e5bb00
commit
6874a5f90c
@ -17,8 +17,9 @@ class DashboardController extends ActionController
|
|||||||
$this->setAutorefreshInterval(10);
|
$this->setAutorefreshInterval(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setTitle($this->translate('Icinga Director'));
|
$mainDashlets = ['Objects', 'Alerts', 'Automation', 'Deployment', 'Data'];
|
||||||
$names = $this->params->getValues('name', array('Objects', 'Deployment', 'Data'));
|
$this->setTitle($this->translate('Icinga Director - Main Dashboard'));
|
||||||
|
$names = $this->params->getValues('name', $mainDashlets);
|
||||||
if (count($names) === 1) {
|
if (count($names) === 1) {
|
||||||
// TODO: Find a better way for this
|
// TODO: Find a better way for this
|
||||||
$this->addSingleTab($this->translate(ucfirst($names[0])));
|
$this->addSingleTab($this->translate(ucfirst($names[0])));
|
||||||
|
17
library/Director/Dashboard/AlertsDashboard.php
Normal file
17
library/Director/Dashboard/AlertsDashboard.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Director\Dashboard;
|
||||||
|
|
||||||
|
class AlertsDashboard extends Dashboard
|
||||||
|
{
|
||||||
|
protected $dashletNames = array(
|
||||||
|
'Notifications',
|
||||||
|
'Users',
|
||||||
|
'Timeperiods',
|
||||||
|
);
|
||||||
|
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
return $this->translate('Get alerts when something goes wrong');
|
||||||
|
}
|
||||||
|
}
|
17
library/Director/Dashboard/AutomationDashboard.php
Normal file
17
library/Director/Dashboard/AutomationDashboard.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Director\Dashboard;
|
||||||
|
|
||||||
|
class AutomationDashboard extends Dashboard
|
||||||
|
{
|
||||||
|
protected $dashletNames = array(
|
||||||
|
'ImportSource',
|
||||||
|
'Sync',
|
||||||
|
'Job'
|
||||||
|
);
|
||||||
|
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
return $this->translate('Automate all tasks');
|
||||||
|
}
|
||||||
|
}
|
25
library/Director/Dashboard/Dashlet/TimeperiodsDashlet.php
Normal file
25
library/Director/Dashboard/Dashlet/TimeperiodsDashlet.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Director\Dashboard\Dashlet;
|
||||||
|
|
||||||
|
class TimeperiodsDashlet extends Dashlet
|
||||||
|
{
|
||||||
|
protected $icon = 'calendar';
|
||||||
|
|
||||||
|
protected $requiredStats = array('timeperiod');
|
||||||
|
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
return $this->translate('Timeperiods');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUrl()
|
||||||
|
{
|
||||||
|
return 'director/dashboard?name=timePeriods';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function listRequiredPermissions()
|
||||||
|
{
|
||||||
|
return array('director/admin');
|
||||||
|
}
|
||||||
|
}
|
25
library/Director/Dashboard/Dashlet/UsersDashlet.php
Normal file
25
library/Director/Dashboard/Dashlet/UsersDashlet.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Director\Dashboard\Dashlet;
|
||||||
|
|
||||||
|
class UsersDashlet extends Dashlet
|
||||||
|
{
|
||||||
|
protected $icon = 'users';
|
||||||
|
|
||||||
|
protected $requiredStats = array('user', 'usergroup');
|
||||||
|
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
return $this->translate('Users / Contacts');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function listRequiredPermissions()
|
||||||
|
{
|
||||||
|
return array('director/users');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUrl()
|
||||||
|
{
|
||||||
|
return 'director/dashboard?name=users';
|
||||||
|
}
|
||||||
|
}
|
@ -5,14 +5,13 @@ namespace Icinga\Module\Director\Dashboard;
|
|||||||
class DataDashboard extends Dashboard
|
class DataDashboard extends Dashboard
|
||||||
{
|
{
|
||||||
protected $dashletNames = array(
|
protected $dashletNames = array(
|
||||||
'ImportSource',
|
|
||||||
'Sync',
|
|
||||||
'Datafield',
|
'Datafield',
|
||||||
'Datalist',
|
'Datalist',
|
||||||
|
// 'CustomVars'
|
||||||
);
|
);
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle()
|
||||||
{
|
{
|
||||||
return $this->translate('Do more with your data');
|
return $this->translate('Do more with custom data');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,8 @@ namespace Icinga\Module\Director\Dashboard;
|
|||||||
class DeploymentDashboard extends Dashboard
|
class DeploymentDashboard extends Dashboard
|
||||||
{
|
{
|
||||||
protected $dashletNames = array(
|
protected $dashletNames = array(
|
||||||
'Deployment',
|
|
||||||
'ActivityLog',
|
'ActivityLog',
|
||||||
'Job',
|
'Deployment',
|
||||||
'Infrastructure',
|
'Infrastructure',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -7,8 +7,6 @@ class NotificationsDashboard extends Dashboard
|
|||||||
protected $dashletNames = [
|
protected $dashletNames = [
|
||||||
'NotificationTemplate',
|
'NotificationTemplate',
|
||||||
'NotificationApply',
|
'NotificationApply',
|
||||||
'UserObject',
|
|
||||||
'TimeperiodObject'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle()
|
||||||
|
@ -8,7 +8,7 @@ class ObjectsDashboard extends Dashboard
|
|||||||
'HostObject',
|
'HostObject',
|
||||||
'ServiceObject',
|
'ServiceObject',
|
||||||
'CommandObject',
|
'CommandObject',
|
||||||
'Notifications',
|
// 'Notifications',
|
||||||
);
|
);
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle()
|
||||||
|
26
library/Director/Dashboard/TimePeriodsDashboard.php
Normal file
26
library/Director/Dashboard/TimePeriodsDashboard.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Director\Dashboard;
|
||||||
|
|
||||||
|
class TimePeriodsDashboard extends Dashboard
|
||||||
|
{
|
||||||
|
protected $dashletNames = [
|
||||||
|
'TimeperiodObject'
|
||||||
|
// 'TimeperiodTemplate',
|
||||||
|
];
|
||||||
|
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
return $this->translate('Define custom Time Periods');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription()
|
||||||
|
{
|
||||||
|
return $this->translate(
|
||||||
|
'Want to define to execute specific checks only withing specific'
|
||||||
|
. ' time periods? Get mobile notifications only out of office hours,'
|
||||||
|
. ' but mail notifications all around the clock? Time Periods allow'
|
||||||
|
. ' you to tackle those and similar requirements.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
29
library/Director/Dashboard/UsersDashboard.php
Normal file
29
library/Director/Dashboard/UsersDashboard.php
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Director\Dashboard;
|
||||||
|
|
||||||
|
class UsersDashboard extends Dashboard
|
||||||
|
{
|
||||||
|
protected $dashletNames = [
|
||||||
|
'UserObject',
|
||||||
|
// 'UserTemplate',
|
||||||
|
// 'UserGroup',
|
||||||
|
];
|
||||||
|
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
return $this->translate('Schedule your notifications');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription()
|
||||||
|
{
|
||||||
|
return $this->translate(
|
||||||
|
'This is where you manage your Icinga 2 User (Contact) objects. Try'
|
||||||
|
. ' to keep your User objects simply by movin complexity to your'
|
||||||
|
. ' templates. Bundle your users in groups and build Notifications'
|
||||||
|
. ' based on them. Running MS Active Directory or another central'
|
||||||
|
. ' User inventory? Stay away from fiddling with manual config, try'
|
||||||
|
. ' to automate all the things with Imports and related Sync Rules!'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user