File: configuration.php

package info (click to toggle)
icingaweb2-module-graphite 1.2.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,000 kB
  • sloc: php: 3,546; javascript: 88; sh: 54; makefile: 15
file content (31 lines) | stat: -rw-r--r-- 1,104 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
<?php

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

/** @var \Icinga\Application\Modules\MenuItemContainer $section */

use Icinga\Module\Graphite\ProvidedHook\Icingadb\IcingadbSupport;

$section = $this->menuSection(N_('Graphite'), ['icon' => 'chart-area']);

if ($this::exists('icingadb') && IcingadbSupport::useIcingaDbAsBackend()) {
    $section->add(N_('Hosts'), ['url' => 'graphite/hosts']);
    $section->add(N_('Services'), ['url' => 'graphite/services']);
} else {
    $section->add(N_('Hosts'), ['url' => 'graphite/list/hosts']);
    $section->add(N_('Services'), ['url' => 'graphite/list/services']);
}

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

$this->provideConfigTab('advanced', array(
    'title' => $this->translate('Advanced configuration'),
    'label' => $this->translate('Advanced'),
    'url' => 'config/advanced'
));

$this->providePermission('graphite/debug', $this->translate('Allow debugging directly via the web UI'));