summaryrefslogtreecommitdiffstats
path: root/configuration.php
blob: 0147b898a6e4e35cd2ae56a73656878f8d1a5357 (plain)
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
<?php
/** @var Icinga\Application\Modules\Module $this */

$config = $this->getConfig();

$url = 'eventdb/events';
if (($default_filter = $config->get('global', 'default_filter')) !== null) {
    $url .= '?' . $default_filter;
}

$section = $this->menuSection('EventDB', array(
    'icon'      => 'tasks',
    'priority'  => 200,
    'url'       => $url,
));

$this->provideConfigTab('config', array(
    'title' => $this->translate('Configure EventDB'),
    'label' => $this->translate('Config'),
    'url' => 'config'
));
$this->provideConfigTab('monitoring', array(
    'title' => $this->translate('Configure integration into the monitoring module'),
    'label' => $this->translate('Monitoring'),
    'url' => 'config/monitoring'
));

$this->providePermission(
    'eventdb/events',
    $this->translate('Allow to view events')
);

$this->providePermission(
    'eventdb/comments',
    $this->translate('Allow to view comments')
);

$this->providePermission(
    'eventdb/interact',
    $this->translate('Allow to acknowledge and comment events')
);

$this->provideRestriction(
    'eventdb/events/filter',
    $this->translate('Restrict views to the events that match the filter')
);