mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +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');
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
if ($this->isApplyRule()
|
||||
|
Loading…
x
Reference in New Issue
Block a user