2014-10-29 10:40:34 -04:00
|
|
|
<?php
|
2015-02-04 04:46:36 -05:00
|
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
2014-10-29 10:40:34 -04:00
|
|
|
|
2014-11-14 05:17:22 -05:00
|
|
|
namespace Icinga\Module\Monitoring\Forms\Setup;
|
2014-10-29 10:40:34 -04:00
|
|
|
|
|
|
|
|
use Icinga\Web\Form;
|
2014-11-14 05:17:22 -05:00
|
|
|
use Icinga\Module\Monitoring\Forms\Config\InstanceConfigForm;
|
2014-10-29 10:40:34 -04:00
|
|
|
|
|
|
|
|
class InstancePage extends Form
|
|
|
|
|
{
|
|
|
|
|
public function init()
|
|
|
|
|
{
|
|
|
|
|
$this->setName('setup_monitoring_instance');
|
2015-03-02 12:36:04 -05:00
|
|
|
$this->setTitle($this->translate('Monitoring Instance', 'setup.page.title'));
|
|
|
|
|
$this->addDescription($this->translate(
|
|
|
|
|
'Please define the settings specific to your monitoring instance below.'
|
|
|
|
|
));
|
2014-10-29 10:40:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function createElements(array $formData)
|
|
|
|
|
{
|
|
|
|
|
$instanceConfigForm = new InstanceConfigForm();
|
2015-07-03 09:07:58 -04:00
|
|
|
$this->addSubForm($instanceConfigForm, 'instance_form');
|
|
|
|
|
$instanceConfigForm->create($formData);
|
|
|
|
|
$instanceConfigForm->getElement('name')->setValue('icinga');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getValues($suppressArrayNotation = false)
|
|
|
|
|
{
|
|
|
|
|
return $this->getSubForm('instance_form')->getValues($suppressArrayNotation);
|
2014-10-29 10:40:34 -04:00
|
|
|
}
|
|
|
|
|
}
|