summaryrefslogtreecommitdiffstats
path: root/application/controllers/IndexController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers/IndexController.php')
-rw-r--r--application/controllers/IndexController.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php
new file mode 100644
index 0000000..7725268
--- /dev/null
+++ b/application/controllers/IndexController.php
@@ -0,0 +1,25 @@
+<?php
+/* Icinga Web 2 | (c) 2013-2017 Icinga Development Team | GPLv2+ */
+
+namespace Icinga\Module\Pnp\Controllers;
+
+use Icinga\Module\Pnp\Web\Controller;
+
+class IndexController extends Controller
+{
+ public function indexAction()
+ {
+ $this->getTabs()->activate('pnp');
+
+ $defaultQuery = $this->Config()->get('pnp4nagios', 'default_query', 'host=.pnp-internal&srv=runtime');
+
+ $this->view->title = 'PNP';
+ $this->view->url = sprintf(
+ '%s/graph?%s',
+ $this->getBaseUrl(),
+ $defaultQuery
+ );
+
+ $this->setViewScript('index/iframe');
+ }
+}