diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:44:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:44:18 +0000 |
commit | 23be945fd2810ee82e3a23cbcd2352c9bda43d4f (patch) | |
tree | dd511b321f308264952cffb005a4288ea4e478e6 /configuration.php | |
parent | Initial commit. (diff) | |
download | icingaweb2-module-graphite-23be945fd2810ee82e3a23cbcd2352c9bda43d4f.tar.xz icingaweb2-module-graphite-23be945fd2810ee82e3a23cbcd2352c9bda43d4f.zip |
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'configuration.php')
-rw-r--r-- | configuration.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/configuration.php b/configuration.php new file mode 100644 index 0000000..1ac05b3 --- /dev/null +++ b/configuration.php @@ -0,0 +1,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')); |