parent
e6279d87e3
commit
bd157b865b
|
@ -75,6 +75,10 @@ class IcingaCloneObjectForm extends DirectorForm
|
|||
$connection
|
||||
)->set('object_name', $newname);
|
||||
|
||||
if ($new->isExternal()) {
|
||||
$new->set('object_type', 'object');
|
||||
}
|
||||
|
||||
if ($object instanceof IcingaHost) {
|
||||
$new->set('api_key', null);
|
||||
if ($this->getValue('clone_services') === 'y') {
|
||||
|
|
|
@ -102,6 +102,9 @@ abstract class ObjectController extends ActionController
|
|||
$this->assertPermission('director/showconfig');
|
||||
$this->tabs()->activate('render');
|
||||
$preview = new ObjectPreview($this->requireObject(), $this->getRequest());
|
||||
if ($this->object->isExternal()) {
|
||||
$this->addActionClone();
|
||||
}
|
||||
$preview->renderTo($this);
|
||||
}
|
||||
|
||||
|
@ -113,7 +116,11 @@ abstract class ObjectController extends ActionController
|
|||
->setObject($object)
|
||||
->handleRequest();
|
||||
|
||||
if ($object->isExternal()) {
|
||||
$this->tabs()->activate('render');
|
||||
} else {
|
||||
$this->tabs()->activate('modify');
|
||||
}
|
||||
$this->addTitle($this->translate('Clone: %s'), $object->getObjectName())
|
||||
->addBackToObjectLink()
|
||||
->content()->add($form);
|
||||
|
|
Loading…
Reference in New Issue