File: configuration.php

package info (click to toggle)
icingaweb2-module-eventdb 1.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 968 kB
  • sloc: php: 2,044; javascript: 85; sh: 51; xml: 18; makefile: 11
file content (46 lines) | stat: -rw-r--r-- 1,189 bytes parent folder | download | duplicates (3)
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')
);