Don't raise error if 'modules/monitoring/instances.ini' is missing
This commit is contained in:
parent
a0e3720abb
commit
be43014e0c
|
@ -71,8 +71,18 @@ class Monitoring_ConfigController extends BaseConfigController {
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
$this->view->messageBox = new AlertMessageBox(true);
|
$this->view->messageBox = new AlertMessageBox(true);
|
||||||
$this->view->backends = IcingaConfig::module('monitoring', 'backends')->toArray();
|
$monitoring_backends = IcingaConfig::module('monitoring', 'backends');
|
||||||
$this->view->instances = IcingaConfig::module('monitoring', 'instances')->toArray();
|
$monitoring_instances = IcingaConfig::module('monitoring', 'instances');
|
||||||
|
if ($monitoring_backends === null) {
|
||||||
|
$this->view->backends = array();
|
||||||
|
} else {
|
||||||
|
$this->view->backends = $monitoring_backends->toArray();
|
||||||
|
}
|
||||||
|
if ($monitoring_instances === null) {
|
||||||
|
$this->view->instances = array();
|
||||||
|
} else {
|
||||||
|
$this->view->instances = $monitoring_instances->toArray();
|
||||||
|
}
|
||||||
$this->render('index');
|
$this->render('index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue