parent
f88e318dce
commit
193c575e3a
|
@ -108,6 +108,7 @@ class PrefetchCache
|
|||
{
|
||||
if ($this->hostServiceBlacklist === null) {
|
||||
$this->hostServiceBlacklist = new HostServiceBlacklist($this->db);
|
||||
$this->hostServiceBlacklist->preloadMappings();
|
||||
}
|
||||
|
||||
return $this->hostServiceBlacklist;
|
||||
|
|
|
@ -413,7 +413,7 @@ class IcingaService extends IcingaObject
|
|||
if (! empty($blacklist)) {
|
||||
if (count($blacklist) === 1) {
|
||||
$output .= sprintf(
|
||||
" ignore host.name == %s\n",
|
||||
" ignore where host.name == %s\n",
|
||||
c::renderString($blacklist[0])
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -61,6 +61,10 @@ class HostServiceBlacklist
|
|||
|
||||
public function fetchMappingsForService(IcingaService $service)
|
||||
{
|
||||
if (! $service->hasBeenLoadedFromDb()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$db = $this->db->getDbAdapter();
|
||||
$query = $db->select()->from(['hsb' => $this->table], [
|
||||
'host_name' => 'h.object_name',
|
||||
|
|
Loading…
Reference in New Issue