mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2026-02-18 18:19:05 -05:00
ObjectsTableService: Fix blacklist check to target inheriting host for inherited services
Some checks failed
L10n Update / update (push) Has been cancelled
PHP Tests / Static analysis for php 7.2 on ubuntu-latest (push) Has been cancelled
PHP Tests / Static analysis for php 7.3 on ubuntu-latest (push) Has been cancelled
PHP Tests / Static analysis for php 7.4 on ubuntu-latest (push) Has been cancelled
PHP Tests / Static analysis for php 8.0 on ubuntu-latest (push) Has been cancelled
PHP Tests / Static analysis for php 8.1 on ubuntu-latest (push) Has been cancelled
PHP Tests / Static analysis for php 8.2 on ubuntu-latest (push) Has been cancelled
PHP Tests / Static analysis for php 8.3 on ubuntu-latest (push) Has been cancelled
PHP Tests / Unit tests with php 8.2 on ubuntu-latest (push) Has been cancelled
PHP Tests / Unit tests with php 8.3 on ubuntu-latest (push) Has been cancelled
Some checks failed
L10n Update / update (push) Has been cancelled
PHP Tests / Static analysis for php 7.2 on ubuntu-latest (push) Has been cancelled
PHP Tests / Static analysis for php 7.3 on ubuntu-latest (push) Has been cancelled
PHP Tests / Static analysis for php 7.4 on ubuntu-latest (push) Has been cancelled
PHP Tests / Static analysis for php 8.0 on ubuntu-latest (push) Has been cancelled
PHP Tests / Static analysis for php 8.1 on ubuntu-latest (push) Has been cancelled
PHP Tests / Static analysis for php 8.2 on ubuntu-latest (push) Has been cancelled
PHP Tests / Static analysis for php 8.3 on ubuntu-latest (push) Has been cancelled
PHP Tests / Unit tests with php 8.2 on ubuntu-latest (push) Has been cancelled
PHP Tests / Unit tests with php 8.3 on ubuntu-latest (push) Has been cancelled
This commit is contained in:
parent
76c3661ec9
commit
705631d79d
1 changed files with 26 additions and 6 deletions
|
|
@ -198,12 +198,32 @@ class ObjectsTableService extends ObjectsTable
|
|||
['h' => 'icinga_host'],
|
||||
'o.host_id = h.id',
|
||||
[]
|
||||
)->joinLeft(
|
||||
['hsb' => 'icinga_host_service_blacklist'],
|
||||
'hsb.service_id = o.id AND hsb.host_id = o.host_id',
|
||||
[]
|
||||
)->where('o.service_set_id IS NULL')
|
||||
->group(['o.id', 'h.id','hsb.service_id', 'hsb.host_id'])
|
||||
);
|
||||
|
||||
if ($this->inheritedBy) {
|
||||
$subQuery->joinLeft(
|
||||
['hi' => 'icinga_host_inheritance'],
|
||||
'h.id = hi.parent_host_id',
|
||||
[]
|
||||
)->joinLeft(
|
||||
['hc' => 'icinga_host'],
|
||||
'hi.host_id = hc.id',
|
||||
[]
|
||||
)->joinLeft(
|
||||
['hsb' => 'icinga_host_service_blacklist'],
|
||||
'hsb.service_id = o.id AND hsb.host_id = hc.id',
|
||||
[]
|
||||
)->where('hc.id = ?', $this->inheritedBy->get('id'));
|
||||
} else {
|
||||
$subQuery->joinLeft(
|
||||
['hsb' => 'icinga_host_service_blacklist'],
|
||||
'hsb.service_id = o.id AND hsb.host_id = o.host_id',
|
||||
[]
|
||||
);
|
||||
}
|
||||
|
||||
$subQuery->where('o.service_set_id IS NULL')
|
||||
->group(['o.id', 'h.id', 'o.object_name', 'h.object_name', 'hsb.service_id', 'hsb.host_id'])
|
||||
->order('o.object_name')->order('h.object_name');
|
||||
|
||||
if ($this->branchUuid) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue