2019-09-09 08:49:46 -04:00
|
|
|
<?php
|
|
|
|
|
|
2019-11-04 19:07:30 -05:00
|
|
|
namespace Icinga\Module\Icingadb
|
2019-09-09 08:49:46 -04:00
|
|
|
{
|
2019-12-10 04:46:10 -05:00
|
|
|
use Icinga\Authentication\Auth;
|
|
|
|
|
|
2019-09-09 08:49:46 -04:00
|
|
|
/** @var \Icinga\Application\Modules\Module $this */
|
|
|
|
|
$section = $this->menuSection(N_('Icinga DB'), [
|
|
|
|
|
'icon' => 'database',
|
|
|
|
|
'priority' => 30
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
$section->add(N_('Hosts'), [
|
2019-11-27 07:18:24 -05:00
|
|
|
'priority' => 10,
|
|
|
|
|
'renderer' => 'HostProblemsBadge',
|
|
|
|
|
'url' => 'icingadb/hosts'
|
2019-09-09 08:49:46 -04:00
|
|
|
]);
|
2019-10-09 11:25:52 -04:00
|
|
|
$section->add(N_('Services'), [
|
2019-11-27 07:18:24 -05:00
|
|
|
'priority' => 20,
|
|
|
|
|
'renderer' => 'ServiceProblemsBadge',
|
|
|
|
|
'url' => 'icingadb/services'
|
2019-10-09 11:25:52 -04:00
|
|
|
]);
|
2019-10-17 04:16:28 -04:00
|
|
|
$section->add(N_('Downtimes'), [
|
2019-11-04 19:07:30 -05:00
|
|
|
'url' => 'icingadb/downtimes',
|
2019-10-17 04:16:28 -04:00
|
|
|
'priority' => 30
|
|
|
|
|
]);
|
2019-10-16 10:47:08 -04:00
|
|
|
$section->add(N_('Comments'), [
|
2019-11-04 19:07:30 -05:00
|
|
|
'url' => 'icingadb/comments',
|
2019-10-16 10:47:08 -04:00
|
|
|
'priority' => 40
|
|
|
|
|
]);
|
2019-10-23 06:28:28 -04:00
|
|
|
$section->add(N_('Notifications'), [
|
2019-11-04 19:07:30 -05:00
|
|
|
'url' => 'icingadb/notifications',
|
2019-10-23 06:28:28 -04:00
|
|
|
'priority' => 50
|
|
|
|
|
]);
|
2019-12-10 04:46:10 -05:00
|
|
|
|
|
|
|
|
$auth = Auth::getInstance();
|
|
|
|
|
if ($auth->hasPermission('*') || ! $auth->hasPermission('no-monitoring/contacts')) {
|
|
|
|
|
$section->add(N_('Users'), [
|
|
|
|
|
'url' => 'icingadb/users',
|
|
|
|
|
'priority' => 60
|
|
|
|
|
]);
|
|
|
|
|
$section->add(N_('User Groups'), [
|
|
|
|
|
'url' => 'icingadb/usergroups',
|
|
|
|
|
'priority' => 70
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-31 05:56:36 -04:00
|
|
|
$section->add(N_('Host Groups'), [
|
2019-11-04 19:07:30 -05:00
|
|
|
'url' => 'icingadb/hostgroups',
|
2019-10-31 05:56:36 -04:00
|
|
|
'priority' => 80
|
|
|
|
|
]);
|
2019-11-01 18:10:45 -04:00
|
|
|
$section->add(N_('Service Groups'), [
|
2019-11-04 19:07:30 -05:00
|
|
|
'url' => 'icingadb/servicegroups',
|
2019-11-01 18:10:45 -04:00
|
|
|
'priority' => 80
|
|
|
|
|
]);
|
2019-11-03 17:18:55 -05:00
|
|
|
$section->add(N_('History'), [
|
2019-11-04 19:07:30 -05:00
|
|
|
'url' => 'icingadb/history',
|
2019-11-03 17:18:55 -05:00
|
|
|
'priority' => 90
|
|
|
|
|
]);
|
2019-12-13 07:55:02 -05:00
|
|
|
$section->add(N_('Health'), [
|
|
|
|
|
'url' => 'icingadb/health',
|
|
|
|
|
'priority' => 100
|
|
|
|
|
]);
|
2020-01-16 05:44:25 -05:00
|
|
|
$section->add(N_('Tactical Overview'), [
|
|
|
|
|
'url' => 'icingadb/tactical',
|
|
|
|
|
'priority' => 110
|
|
|
|
|
]);
|
2019-09-13 05:31:16 -04:00
|
|
|
|
2019-12-04 04:17:26 -05:00
|
|
|
$this->provideConfigTab('database', [
|
|
|
|
|
'label' => $this->translate('Database'),
|
|
|
|
|
'title' => $this->translate('Configure the database backend'),
|
|
|
|
|
'url' => 'config/database'
|
|
|
|
|
]);
|
2019-12-05 04:06:54 -05:00
|
|
|
$this->provideConfigTab('redis', [
|
|
|
|
|
'label' => $this->translate('Redis'),
|
|
|
|
|
'title' => $this->translate('Configure the Redis connections'),
|
|
|
|
|
'url' => 'config/redis'
|
|
|
|
|
]);
|
2019-12-04 07:14:28 -05:00
|
|
|
$this->provideConfigTab('command-transports', [
|
|
|
|
|
'label' => $this->translate('Command Transports'),
|
|
|
|
|
'title' => $this->translate('Configure command transports'),
|
|
|
|
|
'url' => 'config/command-transports'
|
|
|
|
|
]);
|
2019-12-04 07:21:57 -05:00
|
|
|
$this->provideConfigTab('security', [
|
|
|
|
|
'label' => $this->translate('Security'),
|
|
|
|
|
'title' => $this->translate('Configure security related settings'),
|
|
|
|
|
'url' => 'config/security'
|
|
|
|
|
]);
|
2019-12-04 04:17:26 -05:00
|
|
|
|
2019-11-05 03:42:42 -05:00
|
|
|
$this->requireCssFile('balls.less', 'ipl');
|
2019-09-26 09:37:46 -04:00
|
|
|
|
|
|
|
|
$this->provideCssFile('lists.less');
|
2019-11-03 07:42:21 -05:00
|
|
|
$this->provideCssFile('mixins.less');
|
|
|
|
|
$this->provideCssFile('widgets.less');
|
2020-02-07 02:47:54 -05:00
|
|
|
$this->provideCssFile('icinga-icons.less');
|
2019-11-28 09:58:28 -05:00
|
|
|
|
2019-12-16 04:42:30 -05:00
|
|
|
$this->provideJsFile('action-list.js');
|
2019-11-28 09:58:28 -05:00
|
|
|
$this->provideJsFile('migrate.js');
|
2019-12-13 10:15:58 -05:00
|
|
|
$this->provideJsFile('loadmore.js');
|
2019-09-09 08:49:46 -04:00
|
|
|
}
|