ServiceTemplateUsageTable: new implementation

This commit is contained in:
Thomas Gelf 2017-06-14 12:56:14 +02:00
parent bf5b7dbf32
commit 9d3b1d1096
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
<?php
namespace Icinga\Module\Director\Web\Table;
class ServiceTemplateUsageTable extends TemplateUsageTable
{
public function getTypes()
{
return [
'templates' => $this->translate('Templates'),
'objects' => $this->translate('Objects'),
'applyrules' => $this->translate('Apply Rules'),
'setmembers' => $this->translate('Set Members'),
];
}
protected function getTypeSummaryDefinitions()
{
return [
'templates' => $this->getSummaryLine('template'),
'objects' => $this->getSummaryLine('object'),
'applyrules' => $this->getSummaryLine('apply', 'o.service_set_id IS NULL'),
'setmembers' => $this->getSummaryLine('apply', 'o.service_set_id IS NOT NULL'),
];
}
}