summaryrefslogtreecommitdiffstats
path: root/configuration.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:21:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:21:16 +0000
commit2e582fe0b8b6a8e67982ddb84935db1bd3b401fe (patch)
treedd511b321f308264952cffb005a4288ea4e478e6 /configuration.php
parentInitial commit. (diff)
downloadicingaweb2-module-graphite-2e582fe0b8b6a8e67982ddb84935db1bd3b401fe.tar.xz
icingaweb2-module-graphite-2e582fe0b8b6a8e67982ddb84935db1bd3b401fe.zip
Adding upstream version 1.2.2.upstream/1.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'configuration.php')
-rw-r--r--configuration.php31
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'));