mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 16:24:05 +02:00
IcingaServiceSetTable: Fix counter to show distinct counted values
refs #12891
This commit is contained in:
parent
01ef8cb4ba
commit
ae70de9755
@ -13,13 +13,13 @@ class IcingaServiceSetTable extends IcingaObjectTable
|
|||||||
public function getColumns()
|
public function getColumns()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'id' => 'sset.id',
|
'id' => 'sset.id',
|
||||||
'name' => 'sset.object_name',
|
'name' => 'sset.object_name',
|
||||||
'object_type' => 'sset.object_type',
|
'object_type' => 'sset.object_type',
|
||||||
'assign_filter' => 'sset.assign_filter',
|
'assign_filter' => 'sset.assign_filter',
|
||||||
'description' => 'sset.description',
|
'description' => 'sset.description',
|
||||||
'count_hosts' => 'count(ssetobj.id)',
|
'count_hosts' => 'count(distinct ssetobj.id)',
|
||||||
'count_services' => 'count(s.id)',
|
'count_services' => 'count(distinct s.id)',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ use Icinga\Module\Director\Db;
|
|||||||
use Icinga\Module\Director\PlainObjectRenderer;
|
use Icinga\Module\Director\PlainObjectRenderer;
|
||||||
use Icinga\Web\Request;
|
use Icinga\Web\Request;
|
||||||
use Icinga\Web\Url;
|
use Icinga\Web\Url;
|
||||||
|
use Icinga\Web\View;
|
||||||
use Icinga\Web\Widget;
|
use Icinga\Web\Widget;
|
||||||
use Icinga\Web\Widget\Paginator;
|
use Icinga\Web\Widget\Paginator;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
@ -314,6 +315,9 @@ abstract class QuickTable implements Paginatable
|
|||||||
return $htm . "</tbody>\n</table>\n";
|
return $htm . "</tbody>\n</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return View
|
||||||
|
*/
|
||||||
protected function view()
|
protected function view()
|
||||||
{
|
{
|
||||||
if ($this->view === null) {
|
if ($this->view === null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user