mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 06:14:25 +02:00
Always use subquery filters for subquery targets in the group views
This commit is contained in:
parent
31d3153d2b
commit
214a34a5a8
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Monitoring\Backend\Ido\Query;
|
namespace Icinga\Module\Monitoring\Backend\Ido\Query;
|
||||||
|
|
||||||
use Icinga\Exception\NotImplementedError;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query for host groups
|
* Query for host groups
|
||||||
*/
|
*/
|
||||||
@ -276,13 +274,8 @@ class HostgroupQuery extends IdoQuery
|
|||||||
protected function joinSubQuery(IdoQuery $query, $name, $filter, $and, $negate, &$additionalFilter)
|
protected function joinSubQuery(IdoQuery $query, $name, $filter, $and, $negate, &$additionalFilter)
|
||||||
{
|
{
|
||||||
if ($name === 'hostgroup') {
|
if ($name === 'hostgroup') {
|
||||||
if (! $and) {
|
// Propagate that the "parent" query has to be filtered as well
|
||||||
// IN AND NOT IN works for OR filters w/o subquery joins
|
$additionalFilter = clone $filter;
|
||||||
throw new NotImplementedError('');
|
|
||||||
} else {
|
|
||||||
// Propagate that the "parent" query has to be filtered as well
|
|
||||||
$additionalFilter = clone $filter;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->requireVirtualTable('members');
|
$this->requireVirtualTable('members');
|
||||||
|
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Monitoring\Backend\Ido\Query;
|
namespace Icinga\Module\Monitoring\Backend\Ido\Query;
|
||||||
|
|
||||||
use Icinga\Exception\NotImplementedError;
|
|
||||||
|
|
||||||
class ServicegroupQuery extends IdoQuery
|
class ServicegroupQuery extends IdoQuery
|
||||||
{
|
{
|
||||||
protected $groupBase = array(
|
protected $groupBase = array(
|
||||||
@ -290,13 +288,8 @@ class ServicegroupQuery extends IdoQuery
|
|||||||
|
|
||||||
return ['so.object_id', 'so.object_id'];
|
return ['so.object_id', 'so.object_id'];
|
||||||
} elseif ($name === 'servicegroup') {
|
} elseif ($name === 'servicegroup') {
|
||||||
if (! $and) {
|
// Propagate that the "parent" query has to be filtered as well
|
||||||
// IN AND NOT IN for OR filters works w/o subquery joins
|
$additionalFilter = clone $filter;
|
||||||
throw new NotImplementedError('');
|
|
||||||
} else {
|
|
||||||
// Propagate that the "parent" query has to be filtered as well
|
|
||||||
$additionalFilter = clone $filter;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->requireVirtualTable('members');
|
$this->requireVirtualTable('members');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user