summaryrefslogtreecommitdiffstats
path: root/application/controllers/ConfigController.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:43:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:43:29 +0000
commita9b77c01caef9ae7a2c84e2333d28ceb028cf4d3 (patch)
tree4a77cd3e323c37b0e5b3d7578b9718cdf1a89262 /application/controllers/ConfigController.php
parentInitial commit. (diff)
downloadicingaweb2-module-eventdb-a9b77c01caef9ae7a2c84e2333d28ceb028cf4d3.tar.xz
icingaweb2-module-eventdb-a9b77c01caef9ae7a2c84e2333d28ceb028cf4d3.zip
Adding upstream version 1.3.0.upstream/1.3.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'application/controllers/ConfigController.php')
-rw-r--r--application/controllers/ConfigController.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php
new file mode 100644
index 0000000..d812918
--- /dev/null
+++ b/application/controllers/ConfigController.php
@@ -0,0 +1,45 @@
+<?php
+/* Icinga Web 2 | (c) 2016 Icinga Development Team | GPLv2+ */
+
+namespace Icinga\Module\Eventdb\Controllers;
+
+use Icinga\Module\Eventdb\Forms\Config\BackendConfigForm;
+use Icinga\Module\Eventdb\Forms\Config\GlobalConfigForm;
+use Icinga\Module\Eventdb\Forms\Config\MonitoringConfigForm;
+use Icinga\Web\Controller;
+
+class ConfigController extends Controller
+{
+ public function init()
+ {
+ $this->assertPermission('config/modules');
+ parent::init();
+ }
+
+ public function indexAction()
+ {
+ $backendConfig = new BackendConfigForm();
+ $backendConfig
+ ->setIniConfig($this->Config())
+ ->handleRequest();
+ $this->view->backendConfig = $backendConfig;
+
+ $globalConfig = new GlobalConfigForm();
+ $globalConfig
+ ->setIniConfig($this->Config())
+ ->handleRequest();
+ $this->view->globalConfig = $globalConfig;
+
+ $this->view->tabs = $this->Module()->getConfigTabs()->activate('config');
+ }
+
+ public function monitoringAction()
+ {
+ $monitoringConfig = new MonitoringConfigForm();
+ $monitoringConfig
+ ->setIniConfig($this->Config())
+ ->handleRequest();
+ $this->view->form = $monitoringConfig;
+ $this->view->tabs = $this->Module()->getConfigTabs()->activate('monitoring');
+ }
+}