icingaweb2-module-graphite/configuration.php

35 lines
1.2 KiB
PHP
Raw Permalink Normal View History

<?php
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-3.0-or-later
2017-08-30 07:31:13 -04:00
/** @var \Icinga\Application\Modules\Module $this */
/** @var \Icinga\Application\Modules\MenuItemContainer $section */
use Icinga\Module\Graphite\ProvidedHook\Icingadb\IcingadbSupport;
2017-09-19 04:36:36 -04:00
$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'),
2017-09-26 05:20:49 -04:00
'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'));