blob: 964fd20e603b66500594981a94e7198134934bae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<?php
/* Icinga DB Web | (c) 2020 Icinga GmbH | GPLv2 */
namespace Icinga\Module\Icingadb\Widget\ItemList;
use Icinga\Module\Icingadb\Common\BaseItemList;
use Icinga\Module\Icingadb\Common\CaptionDisabled;
use Icinga\Module\Icingadb\Common\Links;
use Icinga\Module\Icingadb\Common\NoSubjectLink;
use Icinga\Module\Icingadb\Common\ObjectLinkDisabled;
use Icinga\Module\Icingadb\Common\TicketLinks;
use Icinga\Module\Icingadb\Common\ViewMode;
use ipl\Web\Url;
class DowntimeList extends BaseItemList
{
use CaptionDisabled;
use NoSubjectLink;
use ObjectLinkDisabled;
use ViewMode;
use TicketLinks;
protected $defaultAttributes = ['class' => 'downtime-list'];
protected function getItemClass(): string
{
$viewMode = $this->getViewMode();
$this->addAttributes(['class' => $viewMode]);
if ($viewMode === 'minimal') {
return DowntimeListItemMinimal::class;
}
return DowntimeListItem::class;
}
protected function init()
{
$this->setMultiselectUrl(Links::downtimesDetails());
$this->setDetailUrl(Url::fromPath('icingadb/downtime'));
}
}
|