mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
parent
7c2a3f254b
commit
ca855c6ee7
@ -6,6 +6,7 @@ use Icinga\Authentication\Auth;
|
|||||||
use Icinga\Exception\ProgrammingError;
|
use Icinga\Exception\ProgrammingError;
|
||||||
use Icinga\Module\Director\Db;
|
use Icinga\Module\Director\Db;
|
||||||
use Icinga\Module\Director\Db\Branch\Branch;
|
use Icinga\Module\Director\Db\Branch\Branch;
|
||||||
|
use Icinga\Module\Director\Db\IcingaObjectFilterHelper;
|
||||||
use Icinga\Module\Director\Objects\IcingaObject;
|
use Icinga\Module\Director\Objects\IcingaObject;
|
||||||
use gipfl\IcingaWeb2\Link;
|
use gipfl\IcingaWeb2\Link;
|
||||||
use ipl\Html\Table;
|
use ipl\Html\Table;
|
||||||
@ -119,12 +120,19 @@ class TemplateUsageTable extends Table
|
|||||||
$templateType = $template->getShortTableName();
|
$templateType = $template->getShortTableName();
|
||||||
|
|
||||||
foreach ($this->getSummaryTables($templateType, $connection) as $type => $summaryTable) {
|
foreach ($this->getSummaryTables($templateType, $connection) as $type => $summaryTable) {
|
||||||
$direct[$type] = $db
|
$directTable = clone $summaryTable;
|
||||||
->query($summaryTable->filterTemplate($template, 'direct')->getQuery())
|
$inDirectTable = clone $summaryTable;
|
||||||
->rowCount();
|
|
||||||
$indirect[$type] = $db
|
$direct[$type] = $db->query(
|
||||||
->query($summaryTable->filterTemplate($template, 'indirect')->getQuery())
|
$directTable
|
||||||
->rowCount();
|
->filterTemplate($template, IcingaObjectFilterHelper::INHERIT_DIRECT)
|
||||||
|
->getQuery()
|
||||||
|
)->rowCount();
|
||||||
|
$indirect[$type] = $db->query(
|
||||||
|
$inDirectTable
|
||||||
|
->filterTemplate($template, IcingaObjectFilterHelper::INHERIT_INDIRECT)
|
||||||
|
->getQuery()
|
||||||
|
)->rowCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
$total = [];
|
$total = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user