ObjectController: fix "add to basket" for Sets

This commit is contained in:
Thomas Gelf 2018-10-25 08:38:24 +02:00
parent cdff318b24
commit bff93725eb
2 changed files with 4 additions and 2 deletions

View File

@ -12,6 +12,7 @@ use Icinga\Module\Director\Forms\IcingaCloneObjectForm;
use Icinga\Module\Director\Forms\IcingaObjectFieldForm;
use Icinga\Module\Director\Objects\IcingaObject;
use Icinga\Module\Director\Objects\IcingaObjectGroup;
use Icinga\Module\Director\Objects\IcingaServiceSet;
use Icinga\Module\Director\RestApi\IcingaObjectHandler;
use Icinga\Module\Director\Web\Controller\Extension\ObjectRestrictions;
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
@ -309,7 +310,9 @@ abstract class ObjectController extends ActionController
if ($this->hasBasketSupport()) {
$object = $this->object;
if ($object instanceof ExportInterface) {
if ($object->isTemplate()) {
if ($object instanceof IcingaServiceSet) {
$type = 'ServiceSet';
} elseif ($object->isTemplate()) {
$type = $this->getType() . 'Template';
} elseif ($object->isGroup()) {
$type = ucfirst($this->getType());

View File

@ -266,7 +266,6 @@ abstract class ObjectsController extends ActionController
/**
* @throws NotFoundError
* @throws \Icinga\Exception\ConfigurationError
* @throws \Icinga\Exception\Http\HttpNotFoundException
* @throws \Icinga\Security\SecurityException
*/