-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.php
98 lines (81 loc) · 2.2 KB
/
configuration.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
/* Icinga Notifications Web | (c) 2023 Icinga GmbH | GPLv2 */
use Icinga\Application\Modules\Module;
/** @var Module $this */
$section = $this->menuSection(
N_('Notifications'),
[
'icon' => 'bell-alt',
'priority' => 52
]
);
$section->add(
N_('Configuration'),
[
'icon' => 'wrench',
'description' => $this->translate('Configuration'),
'url' => 'notifications/schedules'
]
);
$section->add(
N_('Events'),
[
'icon' => 'history',
'description' => $this->translate('Events'),
'url' => 'notifications/events'
]
);
$this->providePermission(
'notifications/config/event-rules',
$this->translate('Allow to configure event rules')
);
$this->providePermission(
'notifications/config/contact-groups',
$this->translate('Allow to configure contact groups')
);
$this->provideRestriction(
'notifications/filter/objects',
$this->translate('Restrict access to the objects that match the filter')
);
$this->provideConfigTab(
'database',
[
'title' => $this->translate('Database'),
'label' => $this->translate('Database'),
'url' => 'config/database'
]
);
$this->provideConfigTab(
'channels',
[
'title' => $this->translate('Channels'),
'label' => $this->translate('Channels'),
'url' => 'channels'
]
);
$this->provideConfigTab(
'sources',
[
'title' => $this->translate('Sources'),
'label' => $this->translate('Sources'),
'url' => 'sources'
]
);
$section->add(
N_('Incidents'),
[
'icon' => 'th-list',
'description' => $this->translate('Incidents'),
'url' => 'notifications/incidents'
]
);
$this->provideJsFile('schedule.js');
$cssDirectory = $this->getCssDir();
$cssFiles = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(
$cssDirectory,
RecursiveDirectoryIterator::CURRENT_AS_PATHNAME | RecursiveDirectoryIterator::SKIP_DOTS
));
foreach ($cssFiles as $path) {
$this->provideCssFile(ltrim(substr($path, strlen($cssDirectory)), DIRECTORY_SEPARATOR));
}
$this->provideJsFile('notifications.js');