mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
servicegroup: Add missing details to pdf exports
This commit is contained in:
parent
44754948b3
commit
e293a8cbb0
1 changed files with 16 additions and 4 deletions
|
|
@ -11,6 +11,7 @@ use Icinga\Module\Icingadb\Redis\VolatileStateResults;
|
|||
use Icinga\Module\Icingadb\Web\Controller;
|
||||
use Icinga\Module\Icingadb\Widget\ItemList\ServiceList;
|
||||
use Icinga\Module\Icingadb\Widget\ItemList\ServicegroupList;
|
||||
use ipl\Html\Html;
|
||||
use ipl\Stdlib\Filter;
|
||||
|
||||
class ServicegroupController extends Controller
|
||||
|
|
@ -40,6 +41,7 @@ class ServicegroupController extends Controller
|
|||
}
|
||||
|
||||
$this->servicegroup = $servicegroup;
|
||||
$this->view->title = $servicegroup->display_name;
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
|
|
@ -67,10 +69,20 @@ class ServicegroupController extends Controller
|
|||
|
||||
yield $this->export($services);
|
||||
|
||||
$this->addControl((new ServicegroupList([$this->servicegroup]))
|
||||
->setViewMode('minimal')
|
||||
->setDetailActionsDisabled()
|
||||
->setNoSubjectLink());
|
||||
// ICINGAWEB_EXPORT_FORMAT is not set yet and $this->format is inaccessible, yeah...
|
||||
if ($this->getRequest()->getParam('format') === 'pdf') {
|
||||
$this->addContent((new ServicegroupList([$this->servicegroup]))
|
||||
->setViewMode('minimal')
|
||||
->setDetailActionsDisabled()
|
||||
->setNoSubjectLink());
|
||||
$this->addContent(Html::tag('h2', null, t('Services')));
|
||||
} else {
|
||||
$this->addControl((new ServicegroupList([$this->servicegroup]))
|
||||
->setViewMode('minimal')
|
||||
->setDetailActionsDisabled()
|
||||
->setNoSubjectLink());
|
||||
}
|
||||
|
||||
$this->addControl($paginationControl);
|
||||
$this->addControl($viewModeSwitcher);
|
||||
$this->addControl($limitControl);
|
||||
|
|
|
|||
Loading…
Reference in a new issue