summaryrefslogtreecommitdiffstats
path: root/configuration.php
blob: bb5b2e664f965cd3e3f1d710142517a9e6a12ab9 (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
47
48
49
50
51
52
<?php
// Icinga Reporting | (c) 2018 Icinga GmbH | GPLv2

namespace Icinga\Module\Reporting {

    use Icinga\Application\Version;

    /** @var \Icinga\Application\Modules\Module $this */

    $this->provideCssFile('system-report.css');

    if (version_compare(Version::VERSION, '2.9.0', '<')) {
        $this->provideJsFile('vendor/flatpickr.min.js');
        $this->provideCssFile('vendor/flatpickr.min.css');
    }

    $this->menuSection(N_('Reporting'))->add(N_('Reports'), array(
        'url' => 'reporting/reports',
    ));

    $this->provideConfigTab('backend', array(
        'title' => $this->translate('Configure the database backend'),
        'label' => $this->translate('Backend'),
        'url'   => 'config/backend'
    ));

    $this->provideConfigTab('mail', array(
        'title' => $this->translate('Configure mail'),
        'label' => $this->translate('Mail'),
        'url'   => 'config/mail'
    ));

    $this->providePermission(
        'reporting/reports',
        $this->translate('Allow managing reports')
    );

    $this->providePermission(
        'reporting/schedules',
        $this->translate('Allow managing schedules')
    );

    $this->providePermission(
        'reporting/templates',
        $this->translate('Allow managing templates')
    );

    $this->providePermission(
        'reporting/timeframes',
        $this->translate('Allow managing timeframes')
    );
}