IcingaService: cosmetics, render single hosts...
...with equals, multiple ones as "in array" refs #907
This commit is contained in:
parent
409661f7d0
commit
c3fd50003a
|
@ -411,10 +411,17 @@ class IcingaService extends IcingaObject
|
||||||
|
|
||||||
$blacklist = $this->getBlacklistedHostnames();
|
$blacklist = $this->getBlacklistedHostnames();
|
||||||
if (! empty($blacklist)) {
|
if (! empty($blacklist)) {
|
||||||
$output .= sprintf(
|
if (count($blacklist) === 1) {
|
||||||
" ignore where host.name in %s\n",
|
$output .= sprintf(
|
||||||
c::renderArray($blacklist)
|
" ignore host.name == %s\n",
|
||||||
);
|
c::renderString($blacklist[0])
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$output .= sprintf(
|
||||||
|
" ignore where host.name in %s\n",
|
||||||
|
c::renderArray($blacklist)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// A hand-crafted command endpoint overrides use_agent
|
// A hand-crafted command endpoint overrides use_agent
|
||||||
|
|
Loading…
Reference in New Issue