parent
cc9f5037f4
commit
0b92ca922f
|
@ -7,7 +7,7 @@
|
|||
</div>
|
||||
|
||||
<div class="content">
|
||||
<?php if ($object->disabled === 'y'): ?>
|
||||
<?php if ($this->isDisabled): ?>
|
||||
<p class="error"><?= $this->translate('This object will not be deployed as it has been disabled') ?></p>
|
||||
<?php endif ?>
|
||||
<?php if ($this->isExternal): ?>
|
||||
|
|
|
@ -1123,7 +1123,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
|
||||
public function renderToConfig(IcingaConfig $config)
|
||||
{
|
||||
if ($this->isDisabled() || $this->isExternal()) {
|
||||
if ($this->isExternal()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1373,7 +1373,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
|
||||
public function toConfigString()
|
||||
{
|
||||
return implode(array(
|
||||
$str = implode(array(
|
||||
$this->renderObjectHeader(),
|
||||
$this->renderImports(),
|
||||
$this->renderProperties(),
|
||||
|
@ -1387,6 +1387,13 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
$this->renderAssignments(),
|
||||
$this->renderSuffix()
|
||||
));
|
||||
|
||||
if ($this->isDisabled()) {
|
||||
return "// --- This object has been disabled ---\n// \n// "
|
||||
. str_replace("\n", "\n// ", $str);
|
||||
} else {
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
|
||||
public function isGroup()
|
||||
|
|
Loading…
Reference in New Issue