parent
1ba3954b95
commit
65473ac8ee
|
@ -14,6 +14,7 @@ use Icinga\Module\Monitoring\Form\Config\Backend\EditBackendForm;
|
|||
use Icinga\Module\Monitoring\Form\Config\Backend\CreateBackendForm;
|
||||
use Icinga\Module\Monitoring\Form\Config\Instance\EditInstanceForm;
|
||||
use Icinga\Module\Monitoring\Form\Config\Instance\CreateInstanceForm;
|
||||
use Icinga\Module\Monitoring\Form\Config\SecurityForm;
|
||||
|
||||
use Icinga\Exception\NotReadableError;
|
||||
|
||||
|
@ -262,5 +263,21 @@ class Monitoring_ConfigController extends ModuleActionController
|
|||
public function securityAction()
|
||||
{
|
||||
$this->view->tabs = $this->Module()->getConfigTabs()->activate('security');
|
||||
|
||||
$form = new SecurityForm();
|
||||
$form->setConfiguration($this->Config()->get('security'));
|
||||
$form->setRequest($this->getRequest());
|
||||
if ($form->isSubmittedAndValid()) {
|
||||
$config = $this->Config()->toArray();
|
||||
$config['security'] = $form->getConfig();
|
||||
if ($this->writeConfiguration(new Zend_Config($config))) {
|
||||
Notification::success('Configuration modified successfully');
|
||||
$this->redirectNow('monitoring/config/security');
|
||||
} else {
|
||||
$this->render('show-configuration');
|
||||
return;
|
||||
}
|
||||
}
|
||||
$this->view->form = $form;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
</div>
|
||||
<?= $this->form ?>
|
||||
|
|
Loading…
Reference in New Issue