mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-12 16:34:26 +02:00
ObjectController: Don't let DeploymentLink break the interface on errors
This can happen whenever the deployment related config of Zones, Endpoints or ApiUsers is incomplete or missing. This should not break forms needed to fix the problem.
This commit is contained in:
parent
44c2a1b7db
commit
efc36fdbb8
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Icinga\Module\Director\Web\Controller;
|
||||
|
||||
use Icinga\Exception\IcingaException;
|
||||
use Icinga\Exception\InvalidPropertyException;
|
||||
use Icinga\Exception\NotFoundError;
|
||||
use Icinga\Module\Director\Deployment\DeploymentInfo;
|
||||
@ -379,6 +380,7 @@ abstract class ObjectController extends ActionController
|
||||
|
||||
protected function addDeploymentLink()
|
||||
{
|
||||
try {
|
||||
$info = new DeploymentInfo($this->db());
|
||||
$info->setObject($this->object);
|
||||
|
||||
@ -392,6 +394,9 @@ abstract class ObjectController extends ActionController
|
||||
)->handleRequest()
|
||||
);
|
||||
}
|
||||
} catch (IcingaException $e) {
|
||||
// pass (deployment may not be set up yet)
|
||||
}
|
||||
}
|
||||
|
||||
protected function addBackToObjectLink()
|
||||
|
Loading…
x
Reference in New Issue
Block a user