summaryrefslogtreecommitdiffstats
path: root/library/Pnp/Web
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:27:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:27:46 +0000
commitbee4bf82bcf2cc61a803310ea557cb2633d7e021 (patch)
treefdc7483ceea33373b6cfa4a8c20c11cb02a2676a /library/Pnp/Web
parentInitial commit. (diff)
downloadicingaweb2-module-pnp-bee4bf82bcf2cc61a803310ea557cb2633d7e021.tar.xz
icingaweb2-module-pnp-bee4bf82bcf2cc61a803310ea557cb2633d7e021.zip
Adding upstream version 1.1.0.upstream/1.1.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/Pnp/Web')
-rw-r--r--library/Pnp/Web/Controller.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/library/Pnp/Web/Controller.php b/library/Pnp/Web/Controller.php
new file mode 100644
index 0000000..4af5c06
--- /dev/null
+++ b/library/Pnp/Web/Controller.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Icinga\Module\Pnp\Web;
+
+use Icinga\Web\Controller as IcingaController;
+
+class Controller extends IcingaController
+{
+ public function init()
+ {
+ $this->getTabs()->add('pnp', array(
+ 'label' => $this->translate('PNP'),
+ 'url' => 'pnp',
+ ));
+ }
+
+ protected function setViewScript($name)
+ {
+ $this->_helper->viewRenderer->setNoController(true);
+ $this->_helper->viewRenderer->setScriptAction($name);
+ }
+
+ protected function getBaseUrl()
+ {
+ return rtrim($this->Config()->get('pnp4nagios', 'base_url', '/pnp4nagios'), '/');
+ }
+}