-
Notifications
You must be signed in to change notification settings - Fork 95
/
configuration.php
34 lines (26 loc) · 1.27 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
<?php
use Icinga\Authentication\Auth;
use Icinga\Module\Grafana\ProvidedHook\Icingadb\IcingadbSupport;
$auth = Auth::getInstance();
$this->providePermission('grafana/graphconfig', $this->translate('Allow to configure graphs.'));
$this->providePermission('grafana/graph', $this->translate('Allow to view graphs in dashboards.'));
$this->providePermission('grafana/debug', $this->translate('Allow to see module debug informations.'));
$this->providePermission('grafana/showall', $this->translate('Allow access to see all graphs of a host.'));
$this->providePermission('grafana/enablelink', $this->translate('Allow to follow links to Grafana'));
$this->provideConfigTab('config', array(
'title' => 'Configuration',
'label' => 'Configuration',
'url' => 'config'
));
if ($auth->hasPermission('grafana/graphconfig'))
{
$section = $this->menuSection('Grafana Graphs')->setUrl('grafana/graph')->setPriority(999)->setIcon('chart-area');
$section->add(N_('Graphs Configuration'))->setUrl('grafana/graph')->setPriority(30);
$section->add(N_('Module Configuration'))->setUrl('grafana/config')->setPriority(40);
$this->provideConfigTab('graph', array(
'title' => 'Graphs',
'label' => 'Graphs',
'url' => 'graph'
));
}
$this->provideJsFile('behavior/iframe.js');