mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
parent
5028ec7b0b
commit
403f745488
@ -37,9 +37,6 @@ class ConfigController extends BaseConfigController
|
|||||||
))->add('resources', array(
|
))->add('resources', array(
|
||||||
'title' => 'Resources',
|
'title' => 'Resources',
|
||||||
'url' => 'config/resource'
|
'url' => 'config/resource'
|
||||||
))->add('logging', array(
|
|
||||||
'title' => 'Logging',
|
|
||||||
'url' => 'config/logging'
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,36 +69,6 @@ class ConfigController extends BaseConfigController
|
|||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Form for modifying the logging configuration
|
|
||||||
*/
|
|
||||||
public function loggingAction()
|
|
||||||
{
|
|
||||||
$this->view->messageBox = new AlertMessageBox(true);
|
|
||||||
$this->view->tabs->activate('logging');
|
|
||||||
|
|
||||||
$form = new LoggingForm();
|
|
||||||
$request = $this->getRequest();
|
|
||||||
if ($request->isPost()) {
|
|
||||||
if ($form->isValid($request->getPost())) {
|
|
||||||
$appConfig = IcingaConfig::app();
|
|
||||||
$appConfig->logging = new Zend_Config($form->getValues());
|
|
||||||
if ($this->writeConfigFile($appConfig, 'config')) {
|
|
||||||
$this->addSuccessMessage($this->translate('Logging configuration has sucessfully been stored'));
|
|
||||||
$this->redirectNow('config/logging');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$loggingConfig = Icinga::app()->getConfig()->logging;
|
|
||||||
if ($loggingConfig === null) {
|
|
||||||
$loggingConfig = new Zend_Config(array());
|
|
||||||
}
|
|
||||||
$form->populate($loggingConfig->toArray());
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->view->form = $form;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display the list of all modules
|
* Display the list of all modules
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user