summaryrefslogtreecommitdiffstats
path: root/application/forms/Config
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 /application/forms/Config
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 'application/forms/Config')
-rw-r--r--application/forms/Config/GeneralConfigForm.php62
1 files changed, 62 insertions, 0 deletions
diff --git a/application/forms/Config/GeneralConfigForm.php b/application/forms/Config/GeneralConfigForm.php
new file mode 100644
index 0000000..d751055
--- /dev/null
+++ b/application/forms/Config/GeneralConfigForm.php
@@ -0,0 +1,62 @@
+<?php
+/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
+
+namespace Icinga\Module\Pnp\Forms\Config;
+
+use Icinga\Forms\ConfigForm;
+
+class GeneralConfigForm extends ConfigForm
+{
+ /**
+ * Initialize this form
+ */
+ public function init()
+ {
+ $this->setName('form_config_pnp4nagios_general');
+ $this->setSubmitLabel($this->translate('Save Changes'));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function createElements(array $formData)
+ {
+ $this->addElement(
+ 'text',
+ 'pnp4nagios_config_dir',
+ array(
+ 'value' => '/etc/pnp4nagios',
+ 'label' => $this->translate('PNP4Nagios configuration'),
+ 'description' => $this->translate('PNP4Nagios configuration path name (e.g. /etc/pnp4nagios)')
+ )
+ );
+ $this->addElement(
+ 'text',
+ 'pnp4nagios_base_url',
+ array(
+ 'value' => '/pnp4nagios',
+ 'label' => $this->translate('PNP4Nagios url'),
+ 'description' => $this->translate('The base URL of your PNP4Nagios installation (e.g. /pnp4nagios)')
+ )
+ );
+
+ $this->addElement(
+ 'checkbox',
+ 'pnp4nagios_menu_disabled',
+ array(
+ 'label' => $this->translate('Disable menu entry'),
+ 'description' => $this->translate('Hide PNP from main menu')
+ )
+ );
+
+ $this->addElement(
+ 'text',
+ 'pnp4nagios_default_query',
+ array(
+ 'value' => 'host=.pnp-internal&srv=runtime',
+ 'label' => $this->translate('Index query'),
+ 'description' => $this->translate('Default URL query for the index view: /pnp4nagios/graph?{query}')
+ )
+ );
+ }
+}