mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 17:24:18 +02:00
IcingaService: disable services belonging to a...
...single disabled host fixes #12049
This commit is contained in:
parent
a4ef711ef0
commit
78903553e9
@ -170,6 +170,18 @@ class IcingaService extends IcingaObject
|
|||||||
return $this->renderRelationProperty('host', $this->host_id, 'host_name');
|
return $this->renderRelationProperty('host', $this->host_id, 'host_name');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function toConfigString()
|
||||||
|
{
|
||||||
|
$str = parent::toConfigString();
|
||||||
|
|
||||||
|
if ($this->host_id && $this->getRelated('host')->isDisabled()) {
|
||||||
|
return "/* --- This services host has been disabled ---\n"
|
||||||
|
. $str . "*/\n";
|
||||||
|
} else {
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected function renderObjectHeader()
|
protected function renderObjectHeader()
|
||||||
{
|
{
|
||||||
if ($this->isApplyRule()
|
if ($this->isApplyRule()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user