diff --git a/application/controllers/CommentsController.php b/application/controllers/CommentsController.php index 1f841971..a65fb24c 100644 --- a/application/controllers/CommentsController.php +++ b/application/controllers/CommentsController.php @@ -11,8 +11,8 @@ use Icinga\Module\Icingadb\Model\Comment; use Icinga\Module\Icingadb\Web\Control\SearchBar\ObjectSuggestions; use Icinga\Module\Icingadb\Web\Controller; use Icinga\Module\Icingadb\Widget\ItemList\CommentList; -use Icinga\Module\Icingadb\Widget\ShowMore; use Icinga\Module\Icingadb\Web\Control\ViewModeSwitcher; +use Icinga\Module\Icingadb\Widget\ShowMore; use ipl\Web\Control\LimitControl; use ipl\Web\Control\SortControl; use ipl\Web\Filter\QueryString; diff --git a/application/controllers/DowntimesController.php b/application/controllers/DowntimesController.php index f2b87888..7aa02360 100644 --- a/application/controllers/DowntimesController.php +++ b/application/controllers/DowntimesController.php @@ -11,8 +11,8 @@ use Icinga\Module\Icingadb\Model\Downtime; use Icinga\Module\Icingadb\Web\Control\SearchBar\ObjectSuggestions; use Icinga\Module\Icingadb\Web\Controller; use Icinga\Module\Icingadb\Widget\ItemList\DowntimeList; -use Icinga\Module\Icingadb\Widget\ShowMore; use Icinga\Module\Icingadb\Web\Control\ViewModeSwitcher; +use Icinga\Module\Icingadb\Widget\ShowMore; use ipl\Web\Control\LimitControl; use ipl\Web\Control\SortControl; use ipl\Web\Filter\QueryString; diff --git a/application/controllers/HostgroupsController.php b/application/controllers/HostgroupsController.php index 0d04b20f..700c6fd7 100644 --- a/application/controllers/HostgroupsController.php +++ b/application/controllers/HostgroupsController.php @@ -10,9 +10,8 @@ use Icinga\Module\Icingadb\Model\Hostgroupsummary; use Icinga\Module\Icingadb\Web\Control\SearchBar\ObjectSuggestions; use Icinga\Module\Icingadb\Web\Controller; use Icinga\Module\Icingadb\Widget\ItemTable\HostgroupTable; -use Icinga\Module\Icingadb\Widget\ShowMore; use Icinga\Module\Icingadb\Web\Control\ViewModeSwitcher; -use ipl\Orm\Query; +use Icinga\Module\Icingadb\Widget\ShowMore; use ipl\Web\Control\LimitControl; use ipl\Web\Control\SortControl; use ipl\Web\Url; diff --git a/application/controllers/HostsController.php b/application/controllers/HostsController.php index 90da1e64..8839c04b 100644 --- a/application/controllers/HostsController.php +++ b/application/controllers/HostsController.php @@ -18,8 +18,8 @@ use Icinga\Module\Icingadb\Widget\Detail\ObjectsDetail; use Icinga\Module\Icingadb\Widget\ItemList\HostList; use Icinga\Module\Icingadb\Widget\HostStatusBar; use Icinga\Module\Icingadb\Widget\ItemTable\HostItemTable; -use Icinga\Module\Icingadb\Widget\ShowMore; use Icinga\Module\Icingadb\Web\Control\ViewModeSwitcher; +use Icinga\Module\Icingadb\Widget\ShowMore; use ipl\Orm\Query; use ipl\Stdlib\Filter; use ipl\Web\Control\LimitControl; @@ -121,7 +121,9 @@ class HostsController extends Controller )) ); } else { - $this->addFooter((new HostStatusBar($summary->first()))->setBaseFilter($filter)); + /** @var HoststateSummary $hostsSummary */ + $hostsSummary = $summary->first(); + $this->addFooter((new HostStatusBar($hostsSummary))->setBaseFilter($filter)); } if (! $searchBar->hasBeenSubmitted() && $searchBar->hasBeenSent()) { diff --git a/application/controllers/ServicegroupsController.php b/application/controllers/ServicegroupsController.php index 4343dc41..299d001b 100644 --- a/application/controllers/ServicegroupsController.php +++ b/application/controllers/ServicegroupsController.php @@ -10,8 +10,8 @@ use Icinga\Module\Icingadb\Model\ServicegroupSummary; use Icinga\Module\Icingadb\Web\Control\SearchBar\ObjectSuggestions; use Icinga\Module\Icingadb\Web\Controller; use Icinga\Module\Icingadb\Widget\ItemTable\ServicegroupTable; -use Icinga\Module\Icingadb\Widget\ShowMore; use Icinga\Module\Icingadb\Web\Control\ViewModeSwitcher; +use Icinga\Module\Icingadb\Widget\ShowMore; use ipl\Web\Control\LimitControl; use ipl\Web\Control\SortControl; use ipl\Web\Url; diff --git a/application/controllers/ServicesController.php b/application/controllers/ServicesController.php index 40503b4a..346a00ae 100644 --- a/application/controllers/ServicesController.php +++ b/application/controllers/ServicesController.php @@ -20,8 +20,8 @@ use Icinga\Module\Icingadb\Widget\Detail\ObjectsDetail; use Icinga\Module\Icingadb\Widget\ItemList\ServiceList; use Icinga\Module\Icingadb\Widget\ItemTable\ServiceItemTable; use Icinga\Module\Icingadb\Widget\ServiceStatusBar; -use Icinga\Module\Icingadb\Widget\ShowMore; use Icinga\Module\Icingadb\Web\Control\ViewModeSwitcher; +use Icinga\Module\Icingadb\Widget\ShowMore; use Icinga\Util\Environment; use ipl\Html\HtmlString; use ipl\Orm\Query; @@ -132,7 +132,9 @@ class ServicesController extends Controller )) ); } else { - $this->addFooter((new ServiceStatusBar($summary->first()))->setBaseFilter($filter)); + /** @var ServicestateSummary $servicesSummary */ + $servicesSummary = $summary->first(); + $this->addFooter((new ServiceStatusBar($servicesSummary))->setBaseFilter($filter)); } if (! $searchBar->hasBeenSubmitted() && $searchBar->hasBeenSent()) { diff --git a/library/Icingadb/Common/BaseItemList.php b/library/Icingadb/Common/BaseItemList.php deleted file mode 100644 index 38218288..00000000 --- a/library/Icingadb/Common/BaseItemList.php +++ /dev/null @@ -1,100 +0,0 @@ - 'item-list', - 'data-base-target' => '_next', - 'data-pdfexport-page-breaks-at' => '.list-item' - ]; - - /** @var iterable */ - protected $data; - - /** @var bool Whether the list contains at least one item with an icon_image */ - protected $hasIconImages = false; - - protected $tag = 'ul'; - - /** - * Create a new item list - * - * @param iterable $data Data source of the list - */ - public function __construct($data) - { - if (! is_iterable($data)) { - throw new InvalidArgumentException('Data must be an array or an instance of Traversable'); - } - - $this->data = $data; - - $this->addAttributes($this->baseAttributes); - - $this->initializeDetailActions(); - $this->init(); - } - - abstract protected function getItemClass(): string; - - /** - * Get whether the list contains at least one item with an icon_image - * - * @return bool - */ - public function hasIconImages(): bool - { - return $this->hasIconImages; - } - - /** - * Set whether the list contains at least one item with an icon_image - * - * @param bool $hasIconImages - */ - public function setHasIconImages(bool $hasIconImages) - { - $this->hasIconImages = $hasIconImages; - } - - /** - * Initialize the item list - * - * If you want to adjust the item list after construction, override this method. - */ - protected function init() - { - } - - protected function assemble() - { - $itemClass = $this->getItemClass(); - - foreach ($this->data as $data) { - /** @var BaseListItem|BaseTableRowItem $item */ - $item = new $itemClass($data, $this); - - $this->add($item); - } - - if ($this->isEmpty()) { - $this->setTag('div'); - $this->add(new EmptyState(t('No items found.'))); - } - } -} diff --git a/library/Icingadb/Common/BaseItemTable.php b/library/Icingadb/Common/BaseItemTable.php deleted file mode 100644 index 9d4f9b3c..00000000 --- a/library/Icingadb/Common/BaseItemTable.php +++ /dev/null @@ -1,88 +0,0 @@ - 'item-table', - 'data-base-target' => '_next' - ]; - - /** @var iterable */ - protected $data; - - protected $tag = 'ul'; - - /** - * Create a new item table - * - * @param iterable $data Data source of the table - */ - public function __construct($data) - { - if (! is_iterable($data)) { - throw new InvalidArgumentException('Data must be an array or an instance of Traversable'); - } - - $this->data = $data; - - $this->addAttributes($this->baseAttributes); - - $this->initializeDetailActions(); - $this->init(); - } - - /** - * Initialize the item table - * - * If you want to adjust the item table after construction, override this method. - */ - protected function init() - { - } - - /** - * Get the table layout to use - * - * @return string - */ - protected function getLayout(): string - { - return 'table-layout'; - } - - abstract protected function getItemClass(): string; - - protected function assemble() - { - $this->addAttributes(['class' => $this->getLayout()]); - - $itemClass = $this->getItemClass(); - - foreach ($this->data as $data) { - /** @var BaseTableRowItem $item */ - $item = new $itemClass($data, $this); - - $this->addHtml($item); - } - - if ($this->isEmpty()) { - $this->setTag('div'); - $this->addHtml(new EmptyState(t('No items found.'))); - } - } -} diff --git a/library/Icingadb/Common/BaseListItem.php b/library/Icingadb/Common/BaseListItem.php deleted file mode 100644 index c552bb64..00000000 --- a/library/Icingadb/Common/BaseListItem.php +++ /dev/null @@ -1,165 +0,0 @@ - 'list-item']; - - /** @var object The associated list item */ - protected $item; - - /** @var BaseItemList The list where the item is part of */ - protected $list; - - protected $tag = 'li'; - - /** - * Create a new list item - * - * @param object $item - * @param BaseItemList $list - */ - public function __construct($item, BaseItemList $list) - { - $this->item = $item; - $this->list = $list; - - $this->addAttributes($this->baseAttributes); - - $this->init(); - } - - abstract protected function assembleHeader(BaseHtmlElement $header); - - abstract protected function assembleMain(BaseHtmlElement $main); - - protected function assembleFooter(BaseHtmlElement $footer) - { - } - - protected function assembleCaption(BaseHtmlElement $caption) - { - } - - protected function assembleIconImage(BaseHtmlElement $iconImage) - { - } - - protected function assembleTitle(BaseHtmlElement $title) - { - } - - protected function assembleVisual(BaseHtmlElement $visual) - { - } - - protected function createCaption(): BaseHtmlElement - { - $caption = Html::tag('section', ['class' => 'caption']); - - $this->assembleCaption($caption); - - return $caption; - } - - protected function createHeader(): BaseHtmlElement - { - $header = Html::tag('header'); - - $this->assembleHeader($header); - - return $header; - } - - protected function createMain(): BaseHtmlElement - { - $main = Html::tag('div', ['class' => 'main']); - - $this->assembleMain($main); - - return $main; - } - - protected function createFooter(): BaseHtmlElement - { - $footer = new HtmlElement('footer'); - - $this->assembleFooter($footer); - - return $footer; - } - - /** - * @return ?BaseHtmlElement - */ - protected function createIconImage() - { - if (! $this->list->hasIconImages()) { - return null; - } - - $iconImage = HtmlElement::create('div', [ - 'class' => 'icon-image', - ]); - - $this->assembleIconImage($iconImage); - - return $iconImage; - } - - protected function createTimestamp() - { - } - - protected function createTitle(): BaseHtmlElement - { - $title = HTML::tag('div', ['class' => 'title']); - - $this->assembleTitle($title); - - return $title; - } - - /** - * @return ?BaseHtmlElement - */ - protected function createVisual() - { - $visual = Html::tag('div', ['class' => 'visual']); - - $this->assembleVisual($visual); - - return $visual; - } - - /** - * Initialize the list item - * - * If you want to adjust the list item after construction, override this method. - */ - protected function init() - { - } - - protected function assemble() - { - $this->add([ - $this->createVisual(), - $this->createIconImage(), - $this->createMain() - ]); - } -} diff --git a/library/Icingadb/Common/BaseOrderedItemList.php b/library/Icingadb/Common/BaseOrderedItemList.php deleted file mode 100644 index 23ae7e95..00000000 --- a/library/Icingadb/Common/BaseOrderedItemList.php +++ /dev/null @@ -1,34 +0,0 @@ -getItemClass(); - - $i = 0; - foreach ($this->data as $data) { - $item = new $itemClass($data, $this); - $item->setOrder($i++); - - $this->add($item); - } - - if ($this->isEmpty()) { - $this->setTag('div'); - $this->add(new EmptyState(t('No items found.'))); - } - } -} diff --git a/library/Icingadb/Common/BaseOrderedListItem.php b/library/Icingadb/Common/BaseOrderedListItem.php deleted file mode 100644 index bf0f2b2a..00000000 --- a/library/Icingadb/Common/BaseOrderedListItem.php +++ /dev/null @@ -1,41 +0,0 @@ -order = $order; - - return $this; - } - - /** - * Get this element's position - * - * @return int - */ - public function getOrder() - { - if ($this->order === null) { - throw new \LogicException( - 'You are accessing an unset property. Please make sure to set it beforehand.' - ); - } - - return $this->order; - } -} diff --git a/library/Icingadb/Common/BaseTableRowItem.php b/library/Icingadb/Common/BaseTableRowItem.php deleted file mode 100644 index f54405b8..00000000 --- a/library/Icingadb/Common/BaseTableRowItem.php +++ /dev/null @@ -1,116 +0,0 @@ - 'table-row']; - - /** @var object The associated list item */ - protected $item; - - /** @var ?BaseItemTable The list where the item is part of */ - protected $table; - - protected $tag = 'li'; - - /** - * Create a new table row item - * - * @param object $item - * @param BaseItemTable $table - */ - public function __construct($item, BaseItemTable $table = null) - { - $this->item = $item; - $this->table = $table; - - if ($table === null) { - $this->setTag('div'); - } - - $this->addAttributes($this->baseAttributes); - - $this->init(); - } - - abstract protected function assembleTitle(BaseHtmlElement $title); - - protected function assembleColumns(HtmlDocument $columns) - { - } - - protected function assembleVisual(BaseHtmlElement $visual) - { - } - - protected function createColumn($content = null): BaseHtmlElement - { - return new HtmlElement( - 'div', - Attributes::create(['class' => 'col']), - new HtmlElement( - 'div', - Attributes::create(['class' => 'content']), - ...Html::wantHtmlList($content) - ) - ); - } - - protected function createColumns(): HtmlDocument - { - $columns = new HtmlDocument(); - - $this->assembleColumns($columns); - - return $columns; - } - - protected function createTitle(): BaseHtmlElement - { - $title = $this->createColumn()->addAttributes(['class' => 'title']); - - $this->assembleTitle($title->getFirst('div')); - - $title->prepend($this->createVisual()); - - return $title; - } - - /** - * @return ?BaseHtmlElement - */ - protected function createVisual() - { - $visual = new HtmlElement('div', Attributes::create(['class' => 'visual'])); - - $this->assembleVisual($visual); - - return $visual->isEmpty() ? null : $visual; - } - - /** - * Initialize the list item - * - * If you want to adjust the list item after construction, override this method. - */ - protected function init() - { - } - - protected function assemble() - { - $this->add([ - $this->createTitle(), - $this->createColumns() - ]); - } -} diff --git a/library/Icingadb/Common/DetailActions.php b/library/Icingadb/Common/DetailActions.php index 2f2e13eb..bc62f48a 100644 --- a/library/Icingadb/Common/DetailActions.php +++ b/library/Icingadb/Common/DetailActions.php @@ -70,7 +70,6 @@ trait DetailActions */ protected function setMultiselectUrl(Url $url): self { - /** @var BaseHtmlElement $this */ $this->getAttributes() ->registerAttributeCallback('data-icinga-multiselect-url', function () use ($url) { return $this->getDetailActionsDisabled() ? null : (string) $url; @@ -88,7 +87,6 @@ trait DetailActions */ protected function setDetailUrl(Url $url): self { - /** @var BaseHtmlElement $this */ $this->getAttributes() ->registerAttributeCallback('data-icinga-detail-url', function () use ($url) { return $this->getDetailActionsDisabled() ? null : (string) $url; diff --git a/library/Icingadb/Common/ListItemCommonLayout.php b/library/Icingadb/Common/ListItemCommonLayout.php index 4777c7cd..5a11be30 100644 --- a/library/Icingadb/Common/ListItemCommonLayout.php +++ b/library/Icingadb/Common/ListItemCommonLayout.php @@ -10,17 +10,17 @@ trait ListItemCommonLayout { use CaptionDisabled; - protected function assembleHeader(BaseHtmlElement $header) + protected function assembleHeader(BaseHtmlElement $header): void { - $header->add($this->createTitle()); + $header->addHtml($this->createTitle()); $header->add($this->createTimestamp()); } - protected function assembleMain(BaseHtmlElement $main) + protected function assembleMain(BaseHtmlElement $main): void { - $main->add($this->createHeader()); - if (! $this->isCaptionDisabled()) { - $main->add($this->createCaption()); + $main->addHtml($this->createHeader()); + if (!$this->isCaptionDisabled()) { + $main->addHtml($this->createCaption()); } } } diff --git a/library/Icingadb/Common/ListItemDetailedLayout.php b/library/Icingadb/Common/ListItemDetailedLayout.php index 3db91a33..23aa0179 100644 --- a/library/Icingadb/Common/ListItemDetailedLayout.php +++ b/library/Icingadb/Common/ListItemDetailedLayout.php @@ -8,13 +8,13 @@ use ipl\Html\BaseHtmlElement; trait ListItemDetailedLayout { - protected function assembleHeader(BaseHtmlElement $header) + protected function assembleHeader(BaseHtmlElement $header): void { $header->add($this->createTitle()); $header->add($this->createTimestamp()); } - protected function assembleMain(BaseHtmlElement $main) + protected function assembleMain(BaseHtmlElement $main): void { $main->add($this->createHeader()); $main->add($this->createCaption()); diff --git a/library/Icingadb/Common/ListItemMinimalLayout.php b/library/Icingadb/Common/ListItemMinimalLayout.php index 9b0dc5b9..3cdf3a9e 100644 --- a/library/Icingadb/Common/ListItemMinimalLayout.php +++ b/library/Icingadb/Common/ListItemMinimalLayout.php @@ -10,7 +10,7 @@ trait ListItemMinimalLayout { use CaptionDisabled; - protected function assembleHeader(BaseHtmlElement $header) + protected function assembleHeader(BaseHtmlElement $header): void { $header->add($this->createTitle()); if (! $this->isCaptionDisabled()) { @@ -19,7 +19,7 @@ trait ListItemMinimalLayout $header->add($this->createTimestamp()); } - protected function assembleMain(BaseHtmlElement $main) + protected function assembleMain(BaseHtmlElement $main): void { $main->add($this->createHeader()); } diff --git a/library/Icingadb/Common/ObjectInspectionDetail.php b/library/Icingadb/Common/ObjectInspectionDetail.php index 54b31faf..6f2472ca 100644 --- a/library/Icingadb/Common/ObjectInspectionDetail.php +++ b/library/Icingadb/Common/ObjectInspectionDetail.php @@ -12,7 +12,6 @@ use Icinga\Exception\Json\JsonDecodeException; use Icinga\Module\Icingadb\Model\Host; use Icinga\Module\Icingadb\Model\Service; use Icinga\Module\Icingadb\Widget\Detail\CustomVarTable; -use Icinga\Module\Icingadb\Widget\EmptyState; use Icinga\Util\Format; use Icinga\Util\Json; use ipl\Html\BaseHtmlElement; @@ -22,6 +21,7 @@ use ipl\Html\Table; use ipl\Html\Text; use ipl\Orm\Model; use ipl\Web\Widget\CopyToClipboard; +use ipl\Web\Widget\EmptyState; abstract class ObjectInspectionDetail extends BaseHtmlElement { diff --git a/library/Icingadb/Hook/Common/TotalSlaReportUtils.php b/library/Icingadb/Hook/Common/TotalSlaReportUtils.php index d7e7819e..1006056a 100644 --- a/library/Icingadb/Hook/Common/TotalSlaReportUtils.php +++ b/library/Icingadb/Hook/Common/TotalSlaReportUtils.php @@ -5,9 +5,9 @@ namespace Icinga\Module\Icingadb\Hook\Common; use Icinga\Module\Icingadb\ProvidedHook\Reporting\HostSlaReport; -use Icinga\Module\Icingadb\Widget\EmptyState; use Icinga\Module\Reporting\Timerange; use ipl\Html\Html; +use ipl\Web\Widget\EmptyState; use function ipl\I18n\t; diff --git a/library/Icingadb/ProvidedHook/Reporting/SlaReport.php b/library/Icingadb/ProvidedHook/Reporting/SlaReport.php index 3f651b57..8dcc64e4 100644 --- a/library/Icingadb/ProvidedHook/Reporting/SlaReport.php +++ b/library/Icingadb/ProvidedHook/Reporting/SlaReport.php @@ -8,16 +8,15 @@ use DateInterval; use DatePeriod; use Icinga\Module\Icingadb\Common\Auth; use Icinga\Module\Icingadb\Common\Database; -use Icinga\Module\Icingadb\Widget\EmptyState; use Icinga\Module\Reporting\Hook\ReportHook; use Icinga\Module\Reporting\ReportData; use Icinga\Module\Reporting\ReportRow; use Icinga\Module\Reporting\Timerange; use ipl\Html\Form; use ipl\Html\Html; -use ipl\Html\HtmlElement; use ipl\Stdlib\Filter\Rule; use ipl\Web\Filter\QueryString; +use ipl\Web\Widget\EmptyState; use function ipl\I18n\t; diff --git a/library/Icingadb/Web/Controller.php b/library/Icingadb/Web/Controller.php index 546d3da9..e5d430d1 100644 --- a/library/Icingadb/Web/Controller.php +++ b/library/Icingadb/Web/Controller.php @@ -18,9 +18,7 @@ use Icinga\Exception\ConfigurationError; use Icinga\Exception\Http\HttpBadRequestException; use Icinga\Exception\Json\JsonDecodeException; use Icinga\Module\Icingadb\Common\Auth; -use Icinga\Module\Icingadb\Common\BaseItemTable; use Icinga\Module\Icingadb\Common\Database; -use Icinga\Module\Icingadb\Common\BaseItemList; use Icinga\Module\Icingadb\Common\SearchControls; use Icinga\Module\Icingadb\Data\CsvResultSet; use Icinga\Module\Icingadb\Data\JsonResultSet; @@ -39,6 +37,8 @@ use ipl\Html\ValidHtml; use ipl\Orm\Query; use ipl\Orm\UnionQuery; use ipl\Stdlib\Filter; +use ipl\Web\Common\BaseItemList; +use ipl\Web\Common\BaseItemTable; use ipl\Web\Compat\CompatController; use ipl\Web\Control\LimitControl; use ipl\Web\Control\PaginationControl; diff --git a/library/Icingadb/Widget/Detail/CheckStatistics.php b/library/Icingadb/Widget/Detail/CheckStatistics.php index 94e325d8..f443ac13 100644 --- a/library/Icingadb/Widget/Detail/CheckStatistics.php +++ b/library/Icingadb/Widget/Detail/CheckStatistics.php @@ -6,7 +6,6 @@ namespace Icinga\Module\Icingadb\Widget\Detail; use Icinga\Date\DateFormatter; use Icinga\Module\Icingadb\Widget\CheckAttempt; -use Icinga\Module\Icingadb\Widget\EmptyState; use Icinga\Util\Format; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; @@ -15,6 +14,7 @@ use ipl\Html\HtmlElement; use ipl\Html\HtmlString; use ipl\Html\Text; use ipl\Web\Common\Card; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\StateBall; use ipl\Web\Widget\TimeAgo; use ipl\Web\Widget\TimeSince; diff --git a/library/Icingadb/Widget/Detail/CustomVarTable.php b/library/Icingadb/Widget/Detail/CustomVarTable.php index 7a27a633..9d6916b3 100644 --- a/library/Icingadb/Widget/Detail/CustomVarTable.php +++ b/library/Icingadb/Widget/Detail/CustomVarTable.php @@ -5,7 +5,6 @@ namespace Icinga\Module\Icingadb\Widget\Detail; use Icinga\Module\Icingadb\Hook\CustomVarRendererHook; -use Icinga\Module\Icingadb\Widget\EmptyState; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; use ipl\Html\Html; @@ -13,6 +12,7 @@ use ipl\Html\HtmlDocument; use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\Orm\Model; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\Icon; use Closure; diff --git a/library/Icingadb/Widget/Detail/DowntimeDetail.php b/library/Icingadb/Widget/Detail/DowntimeDetail.php index 291c06a4..92bd25a8 100644 --- a/library/Icingadb/Widget/Detail/DowntimeDetail.php +++ b/library/Icingadb/Widget/Detail/DowntimeDetail.php @@ -10,14 +10,14 @@ use Icinga\Module\Icingadb\Common\Auth; use Icinga\Module\Icingadb\Common\Database; use Icinga\Module\Icingadb\Common\HostLink; use Icinga\Module\Icingadb\Common\Links; -use Icinga\Module\Icingadb\Widget\EmptyState; use Icinga\Module\Icingadb\Widget\MarkdownText; use Icinga\Module\Icingadb\Common\ServiceLink; use Icinga\Module\Icingadb\Forms\Command\Object\DeleteDowntimeForm; use Icinga\Module\Icingadb\Model\Downtime; use Icinga\Module\Icingadb\Widget\ItemList\DowntimeList; -use ipl\Web\Widget\HorizontalKeyValue; use Icinga\Module\Icingadb\Widget\ShowMore; +use ipl\Web\Widget\EmptyState; +use ipl\Web\Widget\HorizontalKeyValue; use ipl\Html\BaseHtmlElement; use ipl\Html\Html; use ipl\Html\HtmlElement; diff --git a/library/Icingadb/Widget/Detail/EventDetail.php b/library/Icingadb/Widget/Detail/EventDetail.php index a0e7fa30..181c9aea 100644 --- a/library/Icingadb/Widget/Detail/EventDetail.php +++ b/library/Icingadb/Widget/Detail/EventDetail.php @@ -25,12 +25,12 @@ use Icinga\Module\Icingadb\Model\History; use Icinga\Module\Icingadb\Model\NotificationHistory; use Icinga\Module\Icingadb\Model\StateHistory; use Icinga\Module\Icingadb\Util\PluginOutput; -use Icinga\Module\Icingadb\Widget\EmptyState; +use Icinga\Module\Icingadb\Widget\ShowMore; use ipl\Web\Widget\CopyToClipboard; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\HorizontalKeyValue; use Icinga\Module\Icingadb\Widget\ItemTable\UserTable; use Icinga\Module\Icingadb\Widget\PluginOutputContainer; -use Icinga\Module\Icingadb\Widget\ShowMore; use ipl\Html\BaseHtmlElement; use ipl\Html\FormattedString; use ipl\Html\HtmlElement; diff --git a/library/Icingadb/Widget/Detail/HostDetail.php b/library/Icingadb/Widget/Detail/HostDetail.php index 87574367..8b80480a 100644 --- a/library/Icingadb/Widget/Detail/HostDetail.php +++ b/library/Icingadb/Widget/Detail/HostDetail.php @@ -7,9 +7,9 @@ namespace Icinga\Module\Icingadb\Widget\Detail; use Icinga\Module\Icingadb\Hook\ExtensionHook\ObjectDetailExtensionHook; use Icinga\Module\Icingadb\Model\Host; use Icinga\Module\Icingadb\Model\ServicestateSummary; -use Icinga\Module\Icingadb\Widget\EmptyState; use ipl\Html\Html; use ipl\Stdlib\Filter; +use ipl\Web\Widget\EmptyState; class HostDetail extends ObjectDetail { diff --git a/library/Icingadb/Widget/Detail/HostMetaInfo.php b/library/Icingadb/Widget/Detail/HostMetaInfo.php index 852e6e20..78209aa5 100644 --- a/library/Icingadb/Widget/Detail/HostMetaInfo.php +++ b/library/Icingadb/Widget/Detail/HostMetaInfo.php @@ -6,7 +6,7 @@ namespace Icinga\Module\Icingadb\Widget\Detail; use Icinga\Date\DateFormatter; use Icinga\Module\Icingadb\Model\Host; -use Icinga\Module\Icingadb\Widget\EmptyState; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\HorizontalKeyValue; use ipl\Web\Widget\VerticalKeyValue; use ipl\Html\Attributes; diff --git a/library/Icingadb/Widget/Detail/ObjectDetail.php b/library/Icingadb/Widget/Detail/ObjectDetail.php index 035e329c..c431a84b 100644 --- a/library/Icingadb/Widget/Detail/ObjectDetail.php +++ b/library/Icingadb/Widget/Detail/ObjectDetail.php @@ -32,13 +32,12 @@ use Icinga\Module\Icingadb\Model\User; use Icinga\Module\Icingadb\Model\Usergroup; use Icinga\Module\Icingadb\Util\PluginOutput; use Icinga\Module\Icingadb\Widget\ItemList\DowntimeList; -use Icinga\Module\Icingadb\Widget\EmptyState; -use Icinga\Module\Icingadb\Widget\StateChange; +use Icinga\Module\Icingadb\Widget\ShowMore; use ipl\Web\Widget\CopyToClipboard; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\HorizontalKeyValue; use Icinga\Module\Icingadb\Widget\ItemList\CommentList; use Icinga\Module\Icingadb\Widget\PluginOutputContainer; -use Icinga\Module\Icingadb\Widget\ShowMore; use Icinga\Module\Icingadb\Widget\TagList; use Icinga\Module\Monitoring\Hook\DetailviewExtensionHook; use Icinga\Web\Navigation\Navigation; diff --git a/library/Icingadb/Widget/Detail/ObjectsDetail.php b/library/Icingadb/Widget/Detail/ObjectsDetail.php index 2a3e670d..223719d4 100644 --- a/library/Icingadb/Widget/Detail/ObjectsDetail.php +++ b/library/Icingadb/Widget/Detail/ObjectsDetail.php @@ -11,12 +11,11 @@ use Icinga\Module\Icingadb\Hook\ExtensionHook\ObjectsDetailExtensionHook; use Icinga\Module\Icingadb\Model\HoststateSummary; use Icinga\Module\Icingadb\Model\ServicestateSummary; use Icinga\Module\Icingadb\Util\FeatureStatus; -use Icinga\Module\Icingadb\Widget\EmptyState; use Icinga\Module\Icingadb\Widget\HostStateBadges; use Icinga\Module\Icingadb\Widget\ServiceStateBadges; -use ipl\Html\HtmlElement; use ipl\Orm\Query; use ipl\Stdlib\BaseFilter; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\VerticalKeyValue; use ipl\Html\BaseHtmlElement; use ipl\Html\Html; diff --git a/library/Icingadb/Widget/Detail/PerfDataTable.php b/library/Icingadb/Widget/Detail/PerfDataTable.php index 957c9cac..aaee7c95 100644 --- a/library/Icingadb/Widget/Detail/PerfDataTable.php +++ b/library/Icingadb/Widget/Detail/PerfDataTable.php @@ -6,13 +6,13 @@ namespace Icinga\Module\Icingadb\Widget\Detail; use Icinga\Module\Icingadb\Util\PerfData; use Icinga\Module\Icingadb\Util\PerfDataSet; -use Icinga\Module\Icingadb\Widget\EmptyState; use ipl\Html\Attributes; use ipl\Html\HtmlElement; use ipl\Html\HtmlString; use ipl\Html\Table; use ipl\Html\Text; use ipl\I18n\Translation; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\Icon; class PerfDataTable extends Table diff --git a/library/Icingadb/Widget/Detail/UserDetail.php b/library/Icingadb/Widget/Detail/UserDetail.php index 06b07dd0..0bc1acb7 100644 --- a/library/Icingadb/Widget/Detail/UserDetail.php +++ b/library/Icingadb/Widget/Detail/UserDetail.php @@ -9,11 +9,11 @@ use Icinga\Module\Icingadb\Common\Database; use Icinga\Module\Icingadb\Common\Links; use Icinga\Module\Icingadb\Hook\ExtensionHook\ObjectDetailExtensionHook; use Icinga\Module\Icingadb\Model\User; -use Icinga\Module\Icingadb\Widget\EmptyState; +use Icinga\Module\Icingadb\Widget\ShowMore; use ipl\Html\Attributes; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\HorizontalKeyValue; use Icinga\Module\Icingadb\Widget\ItemTable\UsergroupTable; -use Icinga\Module\Icingadb\Widget\ShowMore; use ipl\Html\BaseHtmlElement; use ipl\Html\HtmlElement; use ipl\Html\Text; diff --git a/library/Icingadb/Widget/Detail/UsergroupDetail.php b/library/Icingadb/Widget/Detail/UsergroupDetail.php index 85ab5f99..249c7955 100644 --- a/library/Icingadb/Widget/Detail/UsergroupDetail.php +++ b/library/Icingadb/Widget/Detail/UsergroupDetail.php @@ -9,13 +9,13 @@ use Icinga\Module\Icingadb\Common\Database; use Icinga\Module\Icingadb\Common\Links; use Icinga\Module\Icingadb\Hook\ExtensionHook\ObjectDetailExtensionHook; use Icinga\Module\Icingadb\Model\Usergroup; -use Icinga\Module\Icingadb\Widget\EmptyState; use Icinga\Module\Icingadb\Widget\ItemTable\UserTable; use Icinga\Module\Icingadb\Widget\ShowMore; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; use ipl\Html\HtmlElement; use ipl\Html\Text; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\HorizontalKeyValue; class UsergroupDetail extends BaseHtmlElement diff --git a/library/Icingadb/Widget/EmptyState.php b/library/Icingadb/Widget/EmptyState.php deleted file mode 100644 index 48002440..00000000 --- a/library/Icingadb/Widget/EmptyState.php +++ /dev/null @@ -1,27 +0,0 @@ - 'empty-state']; - - public function __construct($content) - { - $this->content = $content; - } - - protected function assemble() - { - $this->add($this->content); - } -} diff --git a/library/Icingadb/Widget/HostStatusBar.php b/library/Icingadb/Widget/HostStatusBar.php index f4f4a4d8..f900f760 100644 --- a/library/Icingadb/Widget/HostStatusBar.php +++ b/library/Icingadb/Widget/HostStatusBar.php @@ -9,7 +9,7 @@ use ipl\Html\BaseHtmlElement; class HostStatusBar extends BaseStatusBar { - protected function assembleTotal(BaseHtmlElement $total) + protected function assembleTotal(BaseHtmlElement $total): void { $total->add(sprintf(tp('%d Host', '%d Hosts', $this->summary->hosts_total), $this->summary->hosts_total)); } diff --git a/library/Icingadb/Widget/ItemList/BaseCommentListItem.php b/library/Icingadb/Widget/ItemList/BaseCommentListItem.php index a8517cbb..de11c0c9 100644 --- a/library/Icingadb/Widget/ItemList/BaseCommentListItem.php +++ b/library/Icingadb/Widget/ItemList/BaseCommentListItem.php @@ -4,18 +4,18 @@ namespace Icinga\Module\Icingadb\Widget\ItemList; +use Icinga\Module\Icingadb\Common\NoSubjectLink; +use Icinga\Module\Icingadb\Common\ObjectLinkDisabled; use Icinga\Module\Icingadb\Common\TicketLinks; use ipl\Html\Html; use Icinga\Module\Icingadb\Common\HostLink; use Icinga\Module\Icingadb\Common\Icons; use Icinga\Module\Icingadb\Common\Links; use Icinga\Module\Icingadb\Widget\MarkdownLine; -use Icinga\Module\Icingadb\Common\NoSubjectLink; -use Icinga\Module\Icingadb\Common\ObjectLinkDisabled; use Icinga\Module\Icingadb\Common\ServiceLink; use Icinga\Module\Icingadb\Model\Comment; -use Icinga\Module\Icingadb\Common\BaseListItem; use ipl\Html\FormattedString; +use ipl\Web\Common\BaseListItem; use ipl\Web\Widget\TimeAgo; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; @@ -40,7 +40,7 @@ abstract class BaseCommentListItem extends BaseListItem use ObjectLinkDisabled; use TicketLinks; - protected function assembleCaption(BaseHtmlElement $caption) + protected function assembleCaption(BaseHtmlElement $caption): void { $markdownLine = new MarkdownLine($this->createTicketLinks($this->item->text)); @@ -48,7 +48,7 @@ abstract class BaseCommentListItem extends BaseListItem $caption->addFrom($markdownLine); } - protected function assembleTitle(BaseHtmlElement $title) + protected function assembleTitle(BaseHtmlElement $title): void { $isAck = $this->item->entry_type === 'ack'; $expires = $this->item->expire_time; @@ -96,7 +96,7 @@ abstract class BaseCommentListItem extends BaseListItem $title->addHtml(...$headerParts); } - protected function assembleVisual(BaseHtmlElement $visual) + protected function assembleVisual(BaseHtmlElement $visual): void { $visual->addHtml(new HtmlElement( 'div', @@ -105,7 +105,7 @@ abstract class BaseCommentListItem extends BaseListItem )); } - protected function createTimestamp() + protected function createTimestamp(): ?BaseHtmlElement { if ($this->item->expire_time) { return Html::tag( @@ -120,7 +120,7 @@ abstract class BaseCommentListItem extends BaseListItem ); } - protected function init() + protected function init(): void { $this->setTicketLinkEnabled($this->list->getTicketLinkEnabled()); $this->list->addDetailFilterAttribute($this, Filter::equal('name', $this->item->name)); diff --git a/library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php b/library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php index f30268d0..7ebc1f6d 100644 --- a/library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php +++ b/library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php @@ -5,7 +5,6 @@ namespace Icinga\Module\Icingadb\Widget\ItemList; use Icinga\Date\DateFormatter; -use Icinga\Module\Icingadb\Common\BaseListItem; use Icinga\Module\Icingadb\Common\HostLink; use Icinga\Module\Icingadb\Common\Icons; use Icinga\Module\Icingadb\Common\Links; @@ -22,6 +21,7 @@ use ipl\Html\HtmlElement; use ipl\Html\TemplateString; use ipl\Html\Text; use ipl\Stdlib\Filter; +use ipl\Web\Common\BaseListItem; use ipl\Web\Widget\Icon; use ipl\Web\Widget\Link; @@ -54,7 +54,7 @@ abstract class BaseDowntimeListItem extends BaseListItem /** @var int Downtime start time */ protected $startTime; - protected function init() + protected function init(): void { if ($this->item->is_flexible && $this->item->is_in_effect) { $this->startTime = $this->item->start_time->getTimestamp(); @@ -102,7 +102,7 @@ abstract class BaseDowntimeListItem extends BaseListItem ); } - protected function assembleCaption(BaseHtmlElement $caption) + protected function assembleCaption(BaseHtmlElement $caption): void { $markdownLine = new MarkdownLine($this->createTicketLinks($this->item->comment)); $caption->getAttributes()->add($markdownLine->getAttributes()); @@ -117,7 +117,7 @@ abstract class BaseDowntimeListItem extends BaseListItem )->addFrom($markdownLine); } - protected function assembleTitle(BaseHtmlElement $title) + protected function assembleTitle(BaseHtmlElement $title): void { if ($this->getObjectLinkDisabled()) { $link = null; @@ -164,7 +164,7 @@ abstract class BaseDowntimeListItem extends BaseListItem } } - protected function assembleVisual(BaseHtmlElement $visual) + protected function assembleVisual(BaseHtmlElement $visual): void { $dateTime = DateFormatter::formatDateTime($this->endTime); @@ -191,7 +191,7 @@ abstract class BaseDowntimeListItem extends BaseListItem } } - protected function createTimestamp() + protected function createTimestamp(): ?BaseHtmlElement { $dateTime = DateFormatter::formatDateTime($this->isActive ? $this->endTime : $this->startTime); diff --git a/library/Icingadb/Widget/ItemList/BaseHistoryListItem.php b/library/Icingadb/Widget/ItemList/BaseHistoryListItem.php index 8f6cb572..6999324d 100644 --- a/library/Icingadb/Widget/ItemList/BaseHistoryListItem.php +++ b/library/Icingadb/Widget/ItemList/BaseHistoryListItem.php @@ -9,19 +9,19 @@ use Icinga\Module\Icingadb\Common\HostLink; use Icinga\Module\Icingadb\Common\HostStates; use Icinga\Module\Icingadb\Common\Icons; use Icinga\Module\Icingadb\Common\Links; -use Icinga\Module\Icingadb\Common\TicketLinks; -use Icinga\Module\Icingadb\Widget\EmptyState; -use Icinga\Module\Icingadb\Widget\MarkdownLine; use Icinga\Module\Icingadb\Common\NoSubjectLink; +use Icinga\Module\Icingadb\Common\TicketLinks; +use Icinga\Module\Icingadb\Widget\MarkdownLine; use Icinga\Module\Icingadb\Common\ServiceLink; use Icinga\Module\Icingadb\Common\ServiceStates; use Icinga\Module\Icingadb\Model\History; use Icinga\Module\Icingadb\Util\PluginOutput; -use Icinga\Module\Icingadb\Common\BaseListItem; use Icinga\Module\Icingadb\Widget\CheckAttempt; use Icinga\Module\Icingadb\Widget\PluginOutputContainer; use Icinga\Module\Icingadb\Widget\StateChange; use ipl\Stdlib\Filter; +use ipl\Web\Common\BaseListItem; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\StateBall; use ipl\Web\Widget\TimeAgo; use ipl\Html\BaseHtmlElement; @@ -43,7 +43,7 @@ abstract class BaseHistoryListItem extends BaseListItem /** @var HistoryList */ protected $list; - protected function init() + protected function init(): void { $this->setNoSubjectLink($this->list->getNoSubjectLink()); $this->setTicketLinkEnabled($this->list->getTicketLinkEnabled()); @@ -52,7 +52,7 @@ abstract class BaseHistoryListItem extends BaseListItem abstract protected function getStateBallSize(): string; - protected function assembleCaption(BaseHtmlElement $caption) + protected function assembleCaption(BaseHtmlElement $caption): void { switch ($this->item->event_type) { case 'comment_add': @@ -168,7 +168,7 @@ abstract class BaseHistoryListItem extends BaseListItem } } - protected function assembleVisual(BaseHtmlElement $visual) + protected function assembleVisual(BaseHtmlElement $visual): void { switch ($this->item->event_type) { case 'comment_add': @@ -270,7 +270,7 @@ abstract class BaseHistoryListItem extends BaseListItem } } - protected function assembleTitle(BaseHtmlElement $title) + protected function assembleTitle(BaseHtmlElement $title): void { switch ($this->item->event_type) { case 'comment_add': @@ -398,7 +398,7 @@ abstract class BaseHistoryListItem extends BaseListItem } } - protected function createTimestamp() + protected function createTimestamp(): ?BaseHtmlElement { return new TimeAgo($this->item->event_time->getTimestamp()); } diff --git a/library/Icingadb/Widget/ItemList/BaseHostListItem.php b/library/Icingadb/Widget/ItemList/BaseHostListItem.php index 99a8c631..edaf6c88 100644 --- a/library/Icingadb/Widget/ItemList/BaseHostListItem.php +++ b/library/Icingadb/Widget/ItemList/BaseHostListItem.php @@ -42,7 +42,7 @@ abstract class BaseHostListItem extends StateListItem } } - protected function init() + protected function init(): void { parent::init(); diff --git a/library/Icingadb/Widget/ItemList/BaseNotificationListItem.php b/library/Icingadb/Widget/ItemList/BaseNotificationListItem.php index 9c2bfb0c..b538ac4a 100644 --- a/library/Icingadb/Widget/ItemList/BaseNotificationListItem.php +++ b/library/Icingadb/Widget/ItemList/BaseNotificationListItem.php @@ -12,11 +12,11 @@ use Icinga\Module\Icingadb\Common\NoSubjectLink; use Icinga\Module\Icingadb\Common\ServiceLink; use Icinga\Module\Icingadb\Common\ServiceStates; use Icinga\Module\Icingadb\Util\PluginOutput; -use Icinga\Module\Icingadb\Common\BaseListItem; -use Icinga\Module\Icingadb\Widget\EmptyState; use Icinga\Module\Icingadb\Widget\PluginOutputContainer; use Icinga\Module\Icingadb\Widget\StateChange; use ipl\Stdlib\Filter; +use ipl\Web\Common\BaseListItem; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\TimeAgo; use InvalidArgumentException; use ipl\Html\BaseHtmlElement; @@ -34,7 +34,7 @@ abstract class BaseNotificationListItem extends BaseListItem /** @var NotificationList */ protected $list; - protected function init() + protected function init(): void { $this->setNoSubjectLink($this->list->getNoSubjectLink()); $this->list->addDetailFilterAttribute($this, Filter::equal('id', bin2hex($this->item->history->id))); @@ -75,7 +75,7 @@ abstract class BaseNotificationListItem extends BaseListItem abstract protected function getStateBallSize(); - protected function assembleCaption(BaseHtmlElement $caption) + protected function assembleCaption(BaseHtmlElement $caption): void { if (in_array($this->item->type, ['flapping_end', 'flapping_start', 'problem', 'recovery'])) { $commandName = $this->item->object_type === 'host' @@ -103,7 +103,7 @@ abstract class BaseNotificationListItem extends BaseListItem } } - protected function assembleVisual(BaseHtmlElement $visual) + protected function assembleVisual(BaseHtmlElement $visual): void { switch ($this->item->type) { case 'acknowledgement': @@ -157,7 +157,7 @@ abstract class BaseNotificationListItem extends BaseListItem } } - protected function assembleTitle(BaseHtmlElement $title) + protected function assembleTitle(BaseHtmlElement $title): void { if ($this->getNoSubjectLink()) { $title->addHtml(HtmlElement::create( @@ -182,7 +182,7 @@ abstract class BaseNotificationListItem extends BaseListItem $title->addHtml(Text::create(' '), $link); } - protected function createTimestamp() + protected function createTimestamp(): ?BaseHtmlElement { return new TimeAgo($this->item->send_time->getTimestamp()); } diff --git a/library/Icingadb/Widget/ItemList/BaseServiceListItem.php b/library/Icingadb/Widget/ItemList/BaseServiceListItem.php index 208e4962..fe4f0146 100644 --- a/library/Icingadb/Widget/ItemList/BaseServiceListItem.php +++ b/library/Icingadb/Widget/ItemList/BaseServiceListItem.php @@ -44,7 +44,7 @@ abstract class BaseServiceListItem extends StateListItem return [Html::sprintf(t('%s on %s', ' on '), $service, $host)]; } - protected function init() + protected function init(): void { parent::init(); diff --git a/library/Icingadb/Widget/ItemList/CommandTransportList.php b/library/Icingadb/Widget/ItemList/CommandTransportList.php index 50ae06dc..61d771d1 100644 --- a/library/Icingadb/Widget/ItemList/CommandTransportList.php +++ b/library/Icingadb/Widget/ItemList/CommandTransportList.php @@ -4,14 +4,18 @@ namespace Icinga\Module\Icingadb\Widget\ItemList; -use Icinga\Module\Icingadb\Common\BaseOrderedItemList; +use Icinga\Module\Icingadb\Common\DetailActions; +use ipl\Web\Common\BaseOrderedItemList; use ipl\Web\Url; class CommandTransportList extends BaseOrderedItemList { - protected function init() + use DetailActions; + + protected function init(): void { $this->getAttributes()->add('class', 'command-transport-list'); + $this->initializeDetailActions(); $this->setDetailUrl(Url::fromPath('icingadb/command-transport/show')); } diff --git a/library/Icingadb/Widget/ItemList/CommandTransportListItem.php b/library/Icingadb/Widget/ItemList/CommandTransportListItem.php index c15e1bc7..9873403b 100644 --- a/library/Icingadb/Widget/ItemList/CommandTransportListItem.php +++ b/library/Icingadb/Widget/ItemList/CommandTransportListItem.php @@ -4,27 +4,27 @@ namespace Icinga\Module\Icingadb\Widget\ItemList; -use Icinga\Module\Icingadb\Common\BaseOrderedListItem; use ipl\Html\BaseHtmlElement; use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\Stdlib\Filter; +use ipl\Web\Common\BaseOrderedListItem; use ipl\Web\Url; use ipl\Web\Widget\Icon; use ipl\Web\Widget\Link; class CommandTransportListItem extends BaseOrderedListItem { - protected function init() + protected function init(): void { $this->list->addDetailFilterAttribute($this, Filter::equal('name', $this->item->name)); } - protected function assembleHeader(BaseHtmlElement $header) + protected function assembleHeader(BaseHtmlElement $header): void { } - protected function assembleMain(BaseHtmlElement $main) + protected function assembleMain(BaseHtmlElement $main): void { $main->addHtml(new Link( new HtmlElement('strong', null, Text::create($this->item->name)), @@ -64,7 +64,8 @@ class CommandTransportListItem extends BaseOrderedListItem } } - protected function createVisual() + protected function createVisual(): ?BaseHtmlElement { + return null; } } diff --git a/library/Icingadb/Widget/ItemList/CommentList.php b/library/Icingadb/Widget/ItemList/CommentList.php index db164ff2..5cf65aeb 100644 --- a/library/Icingadb/Widget/ItemList/CommentList.php +++ b/library/Icingadb/Widget/ItemList/CommentList.php @@ -5,12 +5,13 @@ namespace Icinga\Module\Icingadb\Widget\ItemList; use Icinga\Module\Icingadb\Common\CaptionDisabled; +use Icinga\Module\Icingadb\Common\DetailActions; 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 Icinga\Module\Icingadb\Common\BaseItemList; +use ipl\Web\Common\BaseItemList; use ipl\Web\Url; class CommentList extends BaseItemList @@ -20,6 +21,7 @@ class CommentList extends BaseItemList use ObjectLinkDisabled; use ViewMode; use TicketLinks; + use DetailActions; protected $defaultAttributes = ['class' => 'comment-list']; @@ -31,13 +33,16 @@ class CommentList extends BaseItemList if ($viewMode === 'minimal') { return CommentListItemMinimal::class; + } elseif ($viewMode === 'detailed') { + $this->removeAttribute('class', 'default-layout'); } return CommentListItem::class; } - protected function init() + protected function init(): void { + $this->initializeDetailActions(); $this->setMultiselectUrl(Links::commentsDetails()); $this->setDetailUrl(Url::fromPath('icingadb/comment')); } diff --git a/library/Icingadb/Widget/ItemList/CommentListItemMinimal.php b/library/Icingadb/Widget/ItemList/CommentListItemMinimal.php index fc204b3a..3c23ccd3 100644 --- a/library/Icingadb/Widget/ItemList/CommentListItemMinimal.php +++ b/library/Icingadb/Widget/ItemList/CommentListItemMinimal.php @@ -10,7 +10,7 @@ class CommentListItemMinimal extends BaseCommentListItem { use ListItemMinimalLayout; - protected function init() + protected function init(): void { parent::init(); diff --git a/library/Icingadb/Widget/ItemList/DowntimeList.php b/library/Icingadb/Widget/ItemList/DowntimeList.php index 964fd20e..591ad984 100644 --- a/library/Icingadb/Widget/ItemList/DowntimeList.php +++ b/library/Icingadb/Widget/ItemList/DowntimeList.php @@ -4,13 +4,14 @@ namespace Icinga\Module\Icingadb\Widget\ItemList; -use Icinga\Module\Icingadb\Common\BaseItemList; use Icinga\Module\Icingadb\Common\CaptionDisabled; +use Icinga\Module\Icingadb\Common\DetailActions; 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\Common\BaseItemList; use ipl\Web\Url; class DowntimeList extends BaseItemList @@ -20,6 +21,7 @@ class DowntimeList extends BaseItemList use ObjectLinkDisabled; use ViewMode; use TicketLinks; + use DetailActions; protected $defaultAttributes = ['class' => 'downtime-list']; @@ -31,13 +33,16 @@ class DowntimeList extends BaseItemList if ($viewMode === 'minimal') { return DowntimeListItemMinimal::class; + } elseif ($viewMode === 'detailed') { + $this->removeAttribute('class', 'default-layout'); } return DowntimeListItem::class; } - protected function init() + protected function init(): void { + $this->initializeDetailActions(); $this->setMultiselectUrl(Links::downtimesDetails()); $this->setDetailUrl(Url::fromPath('icingadb/downtime')); } diff --git a/library/Icingadb/Widget/ItemList/DowntimeListItem.php b/library/Icingadb/Widget/ItemList/DowntimeListItem.php index 0a009867..cb7e9b38 100644 --- a/library/Icingadb/Widget/ItemList/DowntimeListItem.php +++ b/library/Icingadb/Widget/ItemList/DowntimeListItem.php @@ -11,7 +11,7 @@ class DowntimeListItem extends BaseDowntimeListItem { use ListItemCommonLayout; - protected function assembleMain(BaseHtmlElement $main) + protected function assembleMain(BaseHtmlElement $main): void { if ($this->item->is_in_effect) { $main->add($this->createProgress()); diff --git a/library/Icingadb/Widget/ItemList/DowntimeListItemMinimal.php b/library/Icingadb/Widget/ItemList/DowntimeListItemMinimal.php index 58ef3d86..b8581d29 100644 --- a/library/Icingadb/Widget/ItemList/DowntimeListItemMinimal.php +++ b/library/Icingadb/Widget/ItemList/DowntimeListItemMinimal.php @@ -10,7 +10,7 @@ class DowntimeListItemMinimal extends BaseDowntimeListItem { use ListItemMinimalLayout; - protected function init() + protected function init(): void { parent::init(); diff --git a/library/Icingadb/Widget/ItemList/HistoryList.php b/library/Icingadb/Widget/ItemList/HistoryList.php index dbb7cea7..d3b62328 100644 --- a/library/Icingadb/Widget/ItemList/HistoryList.php +++ b/library/Icingadb/Widget/ItemList/HistoryList.php @@ -5,12 +5,13 @@ namespace Icinga\Module\Icingadb\Widget\ItemList; use Icinga\Module\Icingadb\Common\CaptionDisabled; +use Icinga\Module\Icingadb\Common\DetailActions; use Icinga\Module\Icingadb\Common\LoadMore; use Icinga\Module\Icingadb\Common\NoSubjectLink; use Icinga\Module\Icingadb\Common\TicketLinks; use Icinga\Module\Icingadb\Common\ViewMode; -use Icinga\Module\Icingadb\Common\BaseItemList; use ipl\Orm\ResultSet; +use ipl\Web\Common\BaseItemList; use ipl\Web\Url; class HistoryList extends BaseItemList @@ -20,20 +21,16 @@ class HistoryList extends BaseItemList use ViewMode; use LoadMore; use TicketLinks; + use DetailActions; protected $defaultAttributes = ['class' => 'history-list']; - /** @var ResultSet */ - protected $data; - - public function __construct(ResultSet $data) + protected function init(): void { - parent::__construct($data); - } - - protected function init() - { - $this->data = $this->getIterator($this->data); + /** @var ResultSet $data */ + $data = $this->data; + $this->data = $this->getIterator($data); + $this->initializeDetailActions(); $this->setDetailUrl(Url::fromPath('icingadb/event')); } @@ -43,13 +40,15 @@ class HistoryList extends BaseItemList case 'minimal': return HistoryListItemMinimal::class; case 'detailed': + $this->removeAttribute('class', 'default-layout'); + return HistoryListItemDetailed::class; default: return HistoryListItem::class; } } - protected function assemble() + protected function assemble(): void { $this->addAttributes(['class' => $this->getViewMode()]); diff --git a/library/Icingadb/Widget/ItemList/HistoryListItemMinimal.php b/library/Icingadb/Widget/ItemList/HistoryListItemMinimal.php index b516a4e3..5a7f2145 100644 --- a/library/Icingadb/Widget/ItemList/HistoryListItemMinimal.php +++ b/library/Icingadb/Widget/ItemList/HistoryListItemMinimal.php @@ -11,7 +11,7 @@ class HistoryListItemMinimal extends BaseHistoryListItem { use ListItemMinimalLayout; - protected function init() + protected function init(): void { parent::init(); diff --git a/library/Icingadb/Widget/ItemList/HostDetailHeader.php b/library/Icingadb/Widget/ItemList/HostDetailHeader.php index 7b187dcb..97176dac 100644 --- a/library/Icingadb/Widget/ItemList/HostDetailHeader.php +++ b/library/Icingadb/Widget/ItemList/HostDetailHeader.php @@ -16,7 +16,7 @@ class HostDetailHeader extends HostListItemMinimal return ''; } - protected function assembleVisual(BaseHtmlElement $visual) + protected function assembleVisual(BaseHtmlElement $visual): void { if ($this->state->state_type === 'soft') { $stateType = 'soft_state'; @@ -55,7 +55,7 @@ class HostDetailHeader extends HostListItemMinimal $visual->addHtml($stateChange); } - protected function assemble() + protected function assemble(): void { $attributes = $this->list->getAttributes(); if (! in_array('minimal', $attributes->get('class')->getValue())) { diff --git a/library/Icingadb/Widget/ItemList/HostList.php b/library/Icingadb/Widget/ItemList/HostList.php index 51d218e1..2be1f84a 100644 --- a/library/Icingadb/Widget/ItemList/HostList.php +++ b/library/Icingadb/Widget/ItemList/HostList.php @@ -20,6 +20,8 @@ class HostList extends StateList case 'minimal': return HostListItemMinimal::class; case 'detailed': + $this->removeAttribute('class', 'default-layout'); + return HostListItemDetailed::class; case 'objectHeader': return HostDetailHeader::class; @@ -28,8 +30,9 @@ class HostList extends StateList } } - protected function init() + protected function init(): void { + $this->initializeDetailActions(); $this->setMultiselectUrl(Links::hostsDetails()); $this->setDetailUrl(Url::fromPath('icingadb/host')); } diff --git a/library/Icingadb/Widget/ItemList/HostListItemDetailed.php b/library/Icingadb/Widget/ItemList/HostListItemDetailed.php index 4c11b35c..255bdcc1 100644 --- a/library/Icingadb/Widget/ItemList/HostListItemDetailed.php +++ b/library/Icingadb/Widget/ItemList/HostListItemDetailed.php @@ -27,7 +27,7 @@ class HostListItemDetailed extends BaseHostListItem return StateBall::SIZE_LARGE; } - protected function assembleFooter(BaseHtmlElement $footer) + protected function assembleFooter(BaseHtmlElement $footer): void { $statusIcons = new HtmlElement('div', Attributes::create(['class' => 'status-icons'])); diff --git a/library/Icingadb/Widget/ItemList/NotificationList.php b/library/Icingadb/Widget/ItemList/NotificationList.php index 8c95d267..3a16b0b3 100644 --- a/library/Icingadb/Widget/ItemList/NotificationList.php +++ b/library/Icingadb/Widget/ItemList/NotificationList.php @@ -5,11 +5,12 @@ namespace Icinga\Module\Icingadb\Widget\ItemList; use Icinga\Module\Icingadb\Common\CaptionDisabled; +use Icinga\Module\Icingadb\Common\DetailActions; use Icinga\Module\Icingadb\Common\LoadMore; use Icinga\Module\Icingadb\Common\NoSubjectLink; use Icinga\Module\Icingadb\Common\ViewMode; -use Icinga\Module\Icingadb\Common\BaseItemList; use ipl\Orm\ResultSet; +use ipl\Web\Common\BaseItemList; use ipl\Web\Url; class NotificationList extends BaseItemList @@ -18,20 +19,16 @@ class NotificationList extends BaseItemList use NoSubjectLink; use ViewMode; use LoadMore; + use DetailActions; protected $defaultAttributes = ['class' => 'notification-list']; - /** @var ResultSet */ - protected $data; - - public function __construct(ResultSet $data) + protected function init(): void { - parent::__construct($data); - } - - protected function init() - { - $this->data = $this->getIterator($this->data); + /** @var ResultSet $data */ + $data = $this->data; + $this->data = $this->getIterator($data); + $this->initializeDetailActions(); $this->setDetailUrl(Url::fromPath('icingadb/event')); } @@ -41,13 +38,15 @@ class NotificationList extends BaseItemList case 'minimal': return NotificationListItemMinimal::class; case 'detailed': + $this->removeAttribute('class', 'default-layout'); + return NotificationListItemDetailed::class; default: return NotificationListItem::class; } } - protected function assemble() + protected function assemble(): void { $this->addAttributes(['class' => $this->getViewMode()]); diff --git a/library/Icingadb/Widget/ItemList/NotificationListItemMinimal.php b/library/Icingadb/Widget/ItemList/NotificationListItemMinimal.php index dcda5fd0..dd6d2261 100644 --- a/library/Icingadb/Widget/ItemList/NotificationListItemMinimal.php +++ b/library/Icingadb/Widget/ItemList/NotificationListItemMinimal.php @@ -11,7 +11,7 @@ class NotificationListItemMinimal extends BaseNotificationListItem { use ListItemMinimalLayout; - protected function init() + protected function init(): void { parent::init(); diff --git a/library/Icingadb/Widget/ItemList/ServiceDetailHeader.php b/library/Icingadb/Widget/ItemList/ServiceDetailHeader.php index aaad7f16..2f0dbbd8 100644 --- a/library/Icingadb/Widget/ItemList/ServiceDetailHeader.php +++ b/library/Icingadb/Widget/ItemList/ServiceDetailHeader.php @@ -16,7 +16,7 @@ class ServiceDetailHeader extends ServiceListItemMinimal return ''; } - protected function assembleVisual(BaseHtmlElement $visual) + protected function assembleVisual(BaseHtmlElement $visual): void { if ($this->state->state_type === 'soft') { $stateType = 'soft_state'; @@ -55,7 +55,7 @@ class ServiceDetailHeader extends ServiceListItemMinimal $visual->addHtml($stateChange); } - protected function assemble() + protected function assemble(): void { $attributes = $this->list->getAttributes(); if (! in_array('minimal', $attributes->get('class')->getValue())) { diff --git a/library/Icingadb/Widget/ItemList/ServiceList.php b/library/Icingadb/Widget/ItemList/ServiceList.php index 11febb0a..8d41a701 100644 --- a/library/Icingadb/Widget/ItemList/ServiceList.php +++ b/library/Icingadb/Widget/ItemList/ServiceList.php @@ -17,6 +17,8 @@ class ServiceList extends StateList case 'minimal': return ServiceListItemMinimal::class; case 'detailed': + $this->removeAttribute('class', 'default-layout'); + return ServiceListItemDetailed::class; case 'objectHeader': return ServiceDetailHeader::class; @@ -25,8 +27,9 @@ class ServiceList extends StateList } } - protected function init() + protected function init(): void { + $this->initializeDetailActions(); $this->setMultiselectUrl(Links::servicesDetails()); $this->setDetailUrl(Url::fromPath('icingadb/service')); } diff --git a/library/Icingadb/Widget/ItemList/ServiceListItemDetailed.php b/library/Icingadb/Widget/ItemList/ServiceListItemDetailed.php index f38243de..16135998 100644 --- a/library/Icingadb/Widget/ItemList/ServiceListItemDetailed.php +++ b/library/Icingadb/Widget/ItemList/ServiceListItemDetailed.php @@ -27,7 +27,7 @@ class ServiceListItemDetailed extends BaseServiceListItem return StateBall::SIZE_LARGE; } - protected function assembleFooter(BaseHtmlElement $footer) + protected function assembleFooter(BaseHtmlElement $footer): void { $statusIcons = new HtmlElement('div', Attributes::create(['class' => 'status-icons'])); diff --git a/library/Icingadb/Widget/ItemList/StateList.php b/library/Icingadb/Widget/ItemList/StateList.php index cf6ec0b8..1e6dcb9a 100644 --- a/library/Icingadb/Widget/ItemList/StateList.php +++ b/library/Icingadb/Widget/ItemList/StateList.php @@ -4,19 +4,48 @@ namespace Icinga\Module\Icingadb\Widget\ItemList; -use Icinga\Module\Icingadb\Common\BaseItemList; +use Icinga\Module\Icingadb\Common\DetailActions; use Icinga\Module\Icingadb\Common\NoSubjectLink; use Icinga\Module\Icingadb\Common\ViewMode; use Icinga\Module\Icingadb\Redis\VolatileStateResults; use Icinga\Module\Icingadb\Widget\Notice; use ipl\Html\HtmlDocument; +use ipl\Web\Common\BaseItemList; abstract class StateList extends BaseItemList { use ViewMode; use NoSubjectLink; + use DetailActions; - protected function assemble() + /** @var bool Whether the list contains at least one item with an icon_image */ + protected $hasIconImages = false; + + /** + * Get whether the list contains at least one item with an icon_image + * + * @return bool + */ + public function hasIconImages(): bool + { + return $this->hasIconImages; + } + + /** + * Set whether the list contains at least one item with an icon_image + * + * @param bool $hasIconImages + * + * @return $this + */ + public function setHasIconImages(bool $hasIconImages): self + { + $this->hasIconImages = $hasIconImages; + + return $this; + } + + protected function assemble(): void { $this->addAttributes(['class' => $this->getViewMode()]); diff --git a/library/Icingadb/Widget/ItemList/StateListItem.php b/library/Icingadb/Widget/ItemList/StateListItem.php index 5b54ea17..d7c6d268 100644 --- a/library/Icingadb/Widget/ItemList/StateListItem.php +++ b/library/Icingadb/Widget/ItemList/StateListItem.php @@ -4,14 +4,15 @@ namespace Icinga\Module\Icingadb\Widget\ItemList; -use Icinga\Module\Icingadb\Common\BaseListItem; use Icinga\Module\Icingadb\Common\Icons; use Icinga\Module\Icingadb\Model\State; use Icinga\Module\Icingadb\Util\PluginOutput; use Icinga\Module\Icingadb\Widget\CheckAttempt; -use Icinga\Module\Icingadb\Widget\EmptyState; use Icinga\Module\Icingadb\Widget\IconImage; use Icinga\Module\Icingadb\Widget\PluginOutputContainer; +use ipl\Html\HtmlElement; +use ipl\Web\Common\BaseListItem; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\TimeSince; use ipl\Html\BaseHtmlElement; use ipl\Html\Html; @@ -24,10 +25,13 @@ use ipl\Web\Widget\StateBall; */ abstract class StateListItem extends BaseListItem { + /** @var StateList The list where the item is part of */ + protected $list; + /** @var State The state of the item */ protected $state; - protected function init() + protected function init(): void { $this->state = $this->item->state; @@ -40,7 +44,25 @@ abstract class StateListItem extends BaseListItem abstract protected function getStateBallSize(): string; - protected function assembleCaption(BaseHtmlElement $caption) + /** + * @return ?BaseHtmlElement + */ + protected function createIconImage(): ?BaseHtmlElement + { + if (! $this->list->hasIconImages()) { + return null; + } + + $iconImage = HtmlElement::create('div', [ + 'class' => 'icon-image', + ]); + + $this->assembleIconImage($iconImage); + + return $iconImage; + } + + protected function assembleCaption(BaseHtmlElement $caption): void { if ($this->state->soft_state === null && $this->state->output === null) { $caption->addHtml(Text::create(t('Waiting for Icinga DB to synchronize the state.'))); @@ -55,7 +77,7 @@ abstract class StateListItem extends BaseListItem } } - protected function assembleIconImage(BaseHtmlElement $iconImage) + protected function assembleIconImage(BaseHtmlElement $iconImage): void { if (isset($this->item->icon_image->icon_image)) { $iconImage->addHtml(new IconImage($this->item->icon_image->icon_image, $this->item->icon_image_alt)); @@ -64,7 +86,7 @@ abstract class StateListItem extends BaseListItem } } - protected function assembleTitle(BaseHtmlElement $title) + protected function assembleTitle(BaseHtmlElement $title): void { $title->addHtml(Html::sprintf( t('%s is %s', ' is '), @@ -73,7 +95,7 @@ abstract class StateListItem extends BaseListItem )); } - protected function assembleVisual(BaseHtmlElement $visual) + protected function assembleVisual(BaseHtmlElement $visual): void { $stateBall = new StateBall($this->state->getStateText(), $this->getStateBallSize()); $stateBall->add($this->state->getIcon()); @@ -89,7 +111,7 @@ abstract class StateListItem extends BaseListItem } } - protected function createTimestamp() + protected function createTimestamp(): ?BaseHtmlElement { if ($this->state->is_overdue) { $since = new TimeSince($this->state->next_update->getTimestamp()); @@ -99,14 +121,20 @@ abstract class StateListItem extends BaseListItem } elseif ($this->state->last_state_change !== null && $this->state->last_state_change->getTimestamp() > 0) { return new TimeSince($this->state->last_state_change->getTimestamp()); } + + return null; } - protected function assemble() + protected function assemble(): void { if ($this->state->is_overdue) { $this->addAttributes(['class' => 'overdue']); } - parent::assemble(); + $this->add([ + $this->createVisual(), + $this->createIconImage(), + $this->createMain() + ]); } } diff --git a/library/Icingadb/Widget/ItemTable/BaseHostGroupItem.php b/library/Icingadb/Widget/ItemTable/BaseHostGroupItem.php index 6c344237..c56a1f8f 100644 --- a/library/Icingadb/Widget/ItemTable/BaseHostGroupItem.php +++ b/library/Icingadb/Widget/ItemTable/BaseHostGroupItem.php @@ -4,7 +4,6 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; -use Icinga\Module\Icingadb\Common\BaseTableRowItem; use Icinga\Module\Icingadb\Common\Links; use Icinga\Module\Icingadb\Model\Hostgroup; use ipl\Html\Attributes; @@ -13,6 +12,7 @@ use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\I18n\Translation; use ipl\Stdlib\Filter; +use ipl\Web\Common\BaseTableRowItem; use ipl\Web\Widget\Link; /** @@ -25,7 +25,7 @@ abstract class BaseHostGroupItem extends BaseTableRowItem { use Translation; - protected function init() + protected function init(): void { if (isset($this->table)) { $this->table->addDetailFilterAttribute($this, Filter::equal('name', $this->item->name)); diff --git a/library/Icingadb/Widget/ItemTable/BaseServiceGroupItem.php b/library/Icingadb/Widget/ItemTable/BaseServiceGroupItem.php index f33d59b5..7bee532e 100644 --- a/library/Icingadb/Widget/ItemTable/BaseServiceGroupItem.php +++ b/library/Icingadb/Widget/ItemTable/BaseServiceGroupItem.php @@ -4,7 +4,6 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; -use Icinga\Module\Icingadb\Common\BaseTableRowItem; use Icinga\Module\Icingadb\Common\Links; use Icinga\Module\Icingadb\Model\Servicegroup; use ipl\Html\Attributes; @@ -13,6 +12,7 @@ use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\I18n\Translation; use ipl\Stdlib\Filter; +use ipl\Web\Common\BaseTableRowItem; use ipl\Web\Widget\Link; /** @@ -25,7 +25,7 @@ abstract class BaseServiceGroupItem extends BaseTableRowItem { use Translation; - protected function init() + protected function init(): void { if (isset($this->table)) { $this->table->addDetailFilterAttribute($this, Filter::equal('name', $this->item->name)); diff --git a/library/Icingadb/Widget/ItemTable/GridCellLayout.php b/library/Icingadb/Widget/ItemTable/GridCellLayout.php index b22c649a..95b1a0af 100644 --- a/library/Icingadb/Widget/ItemTable/GridCellLayout.php +++ b/library/Icingadb/Widget/ItemTable/GridCellLayout.php @@ -17,12 +17,12 @@ trait GridCellLayout */ abstract public function createGroupBadge(): Link; - protected function assembleVisual(BaseHtmlElement $visual) + protected function assembleVisual(BaseHtmlElement $visual): void { $visual->add($this->createGroupBadge()); } - protected function assembleTitle(BaseHtmlElement $title) + protected function assembleTitle(BaseHtmlElement $title): void { $title->addHtml( $this->createSubject(), @@ -30,7 +30,7 @@ trait GridCellLayout ); } - protected function assemble() + protected function assemble(): void { $this->add([ $this->createTitle() diff --git a/library/Icingadb/Widget/ItemTable/HostgroupTable.php b/library/Icingadb/Widget/ItemTable/HostgroupTable.php index 8a1542a2..6b40f762 100644 --- a/library/Icingadb/Widget/ItemTable/HostgroupTable.php +++ b/library/Icingadb/Widget/ItemTable/HostgroupTable.php @@ -4,18 +4,21 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; -use Icinga\Module\Icingadb\Common\BaseItemTable; +use Icinga\Module\Icingadb\Common\DetailActions; use Icinga\Module\Icingadb\Common\ViewMode; +use ipl\Web\Common\BaseItemTable; use ipl\Web\Url; class HostgroupTable extends BaseItemTable { + use DetailActions; use ViewMode; protected $defaultAttributes = ['class' => 'hostgroup-table']; - protected function init() + protected function init(): void { + $this->initializeDetailActions(); $this->setDetailUrl(Url::fromPath('icingadb/hostgroup')); } diff --git a/library/Icingadb/Widget/ItemTable/ServicegroupTable.php b/library/Icingadb/Widget/ItemTable/ServicegroupTable.php index 6226d366..2378a77d 100644 --- a/library/Icingadb/Widget/ItemTable/ServicegroupTable.php +++ b/library/Icingadb/Widget/ItemTable/ServicegroupTable.php @@ -4,18 +4,21 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; -use Icinga\Module\Icingadb\Common\BaseItemTable; +use Icinga\Module\Icingadb\Common\DetailActions; use Icinga\Module\Icingadb\Common\ViewMode; +use ipl\Web\Common\BaseItemTable; use ipl\Web\Url; class ServicegroupTable extends BaseItemTable { + use DetailActions; use ViewMode; protected $defaultAttributes = ['class' => 'servicegroup-table']; - protected function init() + protected function init(): void { + $this->initializeDetailActions(); $this->setDetailUrl(Url::fromPath('icingadb/servicegroup')); } diff --git a/library/Icingadb/Widget/ItemTable/ServicegroupTableRow.php b/library/Icingadb/Widget/ItemTable/ServicegroupTableRow.php index 0164726c..3dea4c1e 100644 --- a/library/Icingadb/Widget/ItemTable/ServicegroupTableRow.php +++ b/library/Icingadb/Widget/ItemTable/ServicegroupTableRow.php @@ -4,17 +4,10 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; -use Icinga\Module\Icingadb\Common\BaseTableRowItem; -use Icinga\Module\Icingadb\Common\Links; use Icinga\Module\Icingadb\Model\Servicegroup; use Icinga\Module\Icingadb\Widget\Detail\ServiceStatistics; -use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; -use ipl\Html\HtmlDocument; -use ipl\Html\HtmlElement; -use ipl\Html\Text; use ipl\Stdlib\Filter; -use ipl\Web\Widget\Link; /** * Servicegroup item of a servicegroup list. Represents one database row. diff --git a/library/Icingadb/Widget/ItemTable/StateItemTable.php b/library/Icingadb/Widget/ItemTable/StateItemTable.php index 980c8593..8d7b5f77 100644 --- a/library/Icingadb/Widget/ItemTable/StateItemTable.php +++ b/library/Icingadb/Widget/ItemTable/StateItemTable.php @@ -4,7 +4,6 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; -use Icinga\Module\Icingadb\Widget\EmptyState; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; use ipl\Html\Form; @@ -14,6 +13,7 @@ use ipl\Html\HtmlString; use ipl\Orm\Common\SortUtil; use ipl\Orm\Query; use ipl\Web\Control\SortControl; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\Icon; /** @todo Figure out what this might (should) have in common with the new BaseItemTable implementation */ diff --git a/library/Icingadb/Widget/ItemTable/StateRowItem.php b/library/Icingadb/Widget/ItemTable/StateRowItem.php index b4bb4489..f62286b7 100644 --- a/library/Icingadb/Widget/ItemTable/StateRowItem.php +++ b/library/Icingadb/Widget/ItemTable/StateRowItem.php @@ -5,13 +5,11 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; use Icinga\Module\Icingadb\Common\HostStates; -use Icinga\Module\Icingadb\Common\Icons; use Icinga\Module\Icingadb\Common\ServiceStates; use Icinga\Module\Icingadb\Model\Host; use Icinga\Module\Icingadb\Util\PerfDataSet; use Icinga\Module\Icingadb\Util\PluginOutput; use Icinga\Module\Icingadb\Widget\CheckAttempt; -use Icinga\Module\Icingadb\Widget\EmptyState; use Icinga\Module\Icingadb\Widget\IconImage; use Icinga\Module\Icingadb\Widget\PluginOutputContainer; use ipl\Html\Attributes; @@ -19,6 +17,7 @@ use ipl\Html\BaseHtmlElement; use ipl\Html\HtmlElement; use ipl\Html\HtmlString; use ipl\Html\Text; +use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\Icon; use ipl\Web\Widget\StateBall; use ipl\Web\Widget\TimeSince; diff --git a/library/Icingadb/Widget/ItemTable/TableRowLayout.php b/library/Icingadb/Widget/ItemTable/TableRowLayout.php index 1c2a20d0..b9ce0226 100644 --- a/library/Icingadb/Widget/ItemTable/TableRowLayout.php +++ b/library/Icingadb/Widget/ItemTable/TableRowLayout.php @@ -9,14 +9,14 @@ use ipl\Html\HtmlDocument; trait TableRowLayout { - protected function assembleColumns(HtmlDocument $columns) + protected function assembleColumns(HtmlDocument $columns): void { foreach ($this->createStatistics() as $objectStatistic) { $columns->addHtml($objectStatistic); } } - protected function assembleTitle(BaseHtmlElement $title) + protected function assembleTitle(BaseHtmlElement $title): void { $title->addHtml( $this->createSubject(), diff --git a/library/Icingadb/Widget/ItemTable/UserTable.php b/library/Icingadb/Widget/ItemTable/UserTable.php index 0a363fbf..432817b5 100644 --- a/library/Icingadb/Widget/ItemTable/UserTable.php +++ b/library/Icingadb/Widget/ItemTable/UserTable.php @@ -4,15 +4,19 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; -use Icinga\Module\Icingadb\Common\BaseItemTable; +use Icinga\Module\Icingadb\Common\DetailActions; +use ipl\Web\Common\BaseItemTable; use ipl\Web\Url; class UserTable extends BaseItemTable { + use DetailActions; + protected $defaultAttributes = ['class' => 'user-table']; - protected function init() + protected function init(): void { + $this->initializeDetailActions(); $this->setDetailUrl(Url::fromPath('icingadb/user')); } diff --git a/library/Icingadb/Widget/ItemTable/UserTableRow.php b/library/Icingadb/Widget/ItemTable/UserTableRow.php index 3ec469ec..c10851e1 100644 --- a/library/Icingadb/Widget/ItemTable/UserTableRow.php +++ b/library/Icingadb/Widget/ItemTable/UserTableRow.php @@ -4,7 +4,6 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; -use Icinga\Module\Icingadb\Common\BaseTableRowItem; use Icinga\Module\Icingadb\Common\Links; use Icinga\Module\Icingadb\Model\User; use ipl\Html\Attributes; @@ -13,6 +12,7 @@ use ipl\Html\HtmlDocument; use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\Stdlib\Filter; +use ipl\Web\Common\BaseTableRowItem; use ipl\Web\Widget\Link; /** @@ -25,14 +25,14 @@ class UserTableRow extends BaseTableRowItem { protected $defaultAttributes = ['class' => 'user-table-row']; - protected function init() + protected function init(): void { if (isset($this->table)) { $this->table->addDetailFilterAttribute($this, Filter::equal('name', $this->item->name)); } } - protected function assembleVisual(BaseHtmlElement $visual) + protected function assembleVisual(BaseHtmlElement $visual): void { $visual->addHtml(new HtmlElement( 'div', @@ -41,7 +41,7 @@ class UserTableRow extends BaseTableRowItem )); } - protected function assembleTitle(BaseHtmlElement $title) + protected function assembleTitle(BaseHtmlElement $title): void { $title->addHtml( isset($this->table) @@ -55,7 +55,7 @@ class UserTableRow extends BaseTableRowItem ); } - protected function assembleColumns(HtmlDocument $columns) + protected function assembleColumns(HtmlDocument $columns): void { } } diff --git a/library/Icingadb/Widget/ItemTable/UsergroupTable.php b/library/Icingadb/Widget/ItemTable/UsergroupTable.php index e166fed5..77d3ba90 100644 --- a/library/Icingadb/Widget/ItemTable/UsergroupTable.php +++ b/library/Icingadb/Widget/ItemTable/UsergroupTable.php @@ -4,15 +4,19 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; -use Icinga\Module\Icingadb\Common\BaseItemTable; +use Icinga\Module\Icingadb\Common\DetailActions; +use ipl\Web\Common\BaseItemTable; use ipl\Web\Url; class UsergroupTable extends BaseItemTable { + use DetailActions; + protected $defaultAttributes = ['class' => 'usergroup-table']; - protected function init() + protected function init(): void { + $this->initializeDetailActions(); $this->setDetailUrl(Url::fromPath('icingadb/usergroup')); } diff --git a/library/Icingadb/Widget/ItemTable/UsergroupTableRow.php b/library/Icingadb/Widget/ItemTable/UsergroupTableRow.php index c9b6c5a7..c3cbf74e 100644 --- a/library/Icingadb/Widget/ItemTable/UsergroupTableRow.php +++ b/library/Icingadb/Widget/ItemTable/UsergroupTableRow.php @@ -4,7 +4,6 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; -use Icinga\Module\Icingadb\Common\BaseTableRowItem; use Icinga\Module\Icingadb\Common\Links; use Icinga\Module\Icingadb\Model\Usergroup; use ipl\Html\Attributes; @@ -13,6 +12,7 @@ use ipl\Html\HtmlDocument; use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\Stdlib\Filter; +use ipl\Web\Common\BaseTableRowItem; use ipl\Web\Widget\Link; /** @@ -25,14 +25,14 @@ class UsergroupTableRow extends BaseTableRowItem { protected $defaultAttributes = ['class' => 'usergroup-table-row']; - protected function init() + protected function init(): void { if (isset($this->table)) { $this->table->addDetailFilterAttribute($this, Filter::equal('name', $this->item->name)); } } - protected function assembleVisual(BaseHtmlElement $visual) + protected function assembleVisual(BaseHtmlElement $visual): void { $visual->addHtml(new HtmlElement( 'div', @@ -41,7 +41,7 @@ class UsergroupTableRow extends BaseTableRowItem )); } - protected function assembleTitle(BaseHtmlElement $title) + protected function assembleTitle(BaseHtmlElement $title): void { $title->addHtml( isset($this->table) @@ -55,7 +55,7 @@ class UsergroupTableRow extends BaseTableRowItem ); } - protected function assembleColumns(HtmlDocument $columns) + protected function assembleColumns(HtmlDocument $columns): void { } } diff --git a/library/Icingadb/Widget/ServiceStatusBar.php b/library/Icingadb/Widget/ServiceStatusBar.php index bb1d6d70..56f47aa8 100644 --- a/library/Icingadb/Widget/ServiceStatusBar.php +++ b/library/Icingadb/Widget/ServiceStatusBar.php @@ -9,7 +9,7 @@ use ipl\Html\BaseHtmlElement; class ServiceStatusBar extends BaseStatusBar { - protected function assembleTotal(BaseHtmlElement $total) + protected function assembleTotal(BaseHtmlElement $total): void { $total->add(sprintf( tp('%d Service', '%d Services', $this->summary->services_total), diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index f0d8b02c..c685ff8c 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -2080,206 +2080,6 @@ parameters: count: 1 path: library/Icingadb/Command/Transport/CommandTransportInterface.php - - - message: "#^Call to an undefined method ipl\\\\Html\\\\BaseHtmlElement\\:\\:getDetailActionsDisabled\\(\\)\\.$#" - count: 2 - path: library/Icingadb/Common/BaseItemList.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemList\\:\\:__construct\\(\\) has parameter \\$data with no value type specified in iterable type iterable\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemList.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemList\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemList.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemList\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemList.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemList\\:\\:setDetailUrl\\(\\) should return \\$this\\(Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemList\\) but returns ipl\\\\Html\\\\BaseHtmlElement\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemList.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemList\\:\\:setHasIconImages\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemList.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemList\\:\\:setMultiselectUrl\\(\\) should return \\$this\\(Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemList\\) but returns ipl\\\\Html\\\\BaseHtmlElement\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemList.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemList\\:\\:\\$baseAttributes has no type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemList.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemList\\:\\:\\$data type has no value type specified in iterable type iterable\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemList.php - - - - message: "#^Call to an undefined method ipl\\\\Html\\\\BaseHtmlElement\\:\\:getDetailActionsDisabled\\(\\)\\.$#" - count: 2 - path: library/Icingadb/Common/BaseItemTable.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemTable\\:\\:__construct\\(\\) has parameter \\$data with no value type specified in iterable type iterable\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemTable.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemTable\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemTable.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemTable\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemTable.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemTable\\:\\:setDetailUrl\\(\\) should return \\$this\\(Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemTable\\) but returns ipl\\\\Html\\\\BaseHtmlElement\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemTable.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemTable\\:\\:setMultiselectUrl\\(\\) should return \\$this\\(Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemTable\\) but returns ipl\\\\Html\\\\BaseHtmlElement\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemTable.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemTable\\:\\:\\$baseAttributes has no type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemTable.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseItemTable\\:\\:\\$data type has no value type specified in iterable type iterable\\.$#" - count: 1 - path: library/Icingadb/Common/BaseItemTable.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseListItem\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseListItem\\:\\:assembleCaption\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseListItem\\:\\:assembleFooter\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseListItem\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseListItem\\:\\:assembleIconImage\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseListItem\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseListItem\\:\\:assembleTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseListItem\\:\\:assembleVisual\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseListItem\\:\\:createTimestamp\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseListItem\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseListItem.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseListItem\\:\\:\\$baseAttributes has no type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseOrderedItemList\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseOrderedItemList.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseStatusBar\\:\\:__construct\\(\\) has parameter \\$summary with no type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseStatusBar.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseStatusBar\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseStatusBar.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseStatusBar\\:\\:assembleTotal\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseStatusBar.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseStatusBar\\:\\:\\$summary has no type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseStatusBar.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseTableRowItem\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseTableRowItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseTableRowItem\\:\\:assembleColumns\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseTableRowItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseTableRowItem\\:\\:assembleTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseTableRowItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseTableRowItem\\:\\:assembleVisual\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseTableRowItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseTableRowItem\\:\\:createColumn\\(\\) has parameter \\$content with no type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseTableRowItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseTableRowItem\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseTableRowItem.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Common\\\\BaseTableRowItem\\:\\:\\$baseAttributes has no type specified\\.$#" - count: 1 - path: library/Icingadb/Common/BaseTableRowItem.php - - message: "#^Cannot access offset 'in_downtime' on mixed\\.$#" count: 4 @@ -8060,16 +7860,6 @@ parameters: count: 2 path: library/Icingadb/Widget/Detail/UsergroupDetail.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\EmptyState\\:\\:__construct\\(\\) has parameter \\$content with no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/EmptyState.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\EmptyState\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/EmptyState.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\Health\\:\\:__construct\\(\\) has parameter \\$data with no type specified\\.$#" count: 1 @@ -8091,7 +7881,12 @@ parameters: path: library/Icingadb/Widget/HostStateBadges.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\HostStatusBar\\:\\:assembleTotal\\(\\) has no return type specified\\.$#" + message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + count: 1 + path: library/Icingadb/Widget/HostStatusBar.php + + - + message: "#^Parameter \\#3 \\$number of function tp expects int\\|null, mixed given\\.$#" count: 1 path: library/Icingadb/Widget/HostStatusBar.php @@ -8155,36 +7950,11 @@ parameters: count: 2 path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseCommentListItem\\:\\:assembleCaption\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseCommentListItem\\:\\:assembleTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseCommentListItem\\:\\:assembleVisual\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseCommentListItem\\:\\:createTicketLinks\\(\\) has parameter \\$text with no type specified\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseCommentListItem\\:\\:createTimestamp\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseCommentListItem\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" count: 1 @@ -8225,36 +7995,11 @@ parameters: count: 5 path: library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseDowntimeListItem\\:\\:assembleCaption\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseDowntimeListItem\\:\\:assembleTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseDowntimeListItem\\:\\:assembleVisual\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseDowntimeListItem\\:\\:createTicketLinks\\(\\) has parameter \\$text with no type specified\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseDowntimeListItem\\:\\:createTimestamp\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseDowntimeListItem\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" count: 1 @@ -8435,36 +8180,11 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/BaseHistoryListItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseHistoryListItem\\:\\:assembleCaption\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseHistoryListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseHistoryListItem\\:\\:assembleTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseHistoryListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseHistoryListItem\\:\\:assembleVisual\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseHistoryListItem.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseHistoryListItem\\:\\:createTicketLinks\\(\\) has parameter \\$text with no type specified\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/BaseHistoryListItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseHistoryListItem\\:\\:createTimestamp\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseHistoryListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseHistoryListItem\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseHistoryListItem.php - - message: "#^Parameter \\#1 \\$host of method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseHistoryListItem\\:\\:createHostLink\\(\\) expects Icinga\\\\Module\\\\Icingadb\\\\Model\\\\Host, object given\\.$#" count: 1 @@ -8490,11 +8210,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/BaseHistoryListItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseHostListItem\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseHostListItem.php - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" count: 1 @@ -8560,36 +8275,11 @@ parameters: count: 3 path: library/Icingadb/Widget/ItemList/BaseNotificationListItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseNotificationListItem\\:\\:assembleCaption\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseNotificationListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseNotificationListItem\\:\\:assembleTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseNotificationListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseNotificationListItem\\:\\:assembleVisual\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseNotificationListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseNotificationListItem\\:\\:createTimestamp\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseNotificationListItem.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseNotificationListItem\\:\\:getStateBallSize\\(\\) has no return type specified\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/BaseNotificationListItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseNotificationListItem\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseNotificationListItem.php - - message: "#^Cannot access property \\$display_name on mixed\\.$#" count: 1 @@ -8610,11 +8300,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/BaseServiceListItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseServiceListItem\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseServiceListItem.php - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" count: 1 @@ -8635,28 +8320,13 @@ parameters: count: 2 path: library/Icingadb/Widget/ItemList/BaseServiceListItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\CommandTransportList\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/CommandTransportList.php - - message: "#^Access to an undefined property object\\:\\:\\$name\\.$#" count: 7 path: library/Icingadb/Widget/ItemList/CommandTransportListItem.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\CommandTransportListItem\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/CommandTransportListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\CommandTransportListItem\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/CommandTransportListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\CommandTransportListItem\\:\\:init\\(\\) has no return type specified\\.$#" + message: "#^Call to an undefined method ipl\\\\Web\\\\Common\\\\BaseItemList\\:\\:addDetailFilterAttribute\\(\\)\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/CommandTransportListItem.php @@ -8665,211 +8335,26 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/CommentList.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\CommentList\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/CommentList.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\CommentList\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/CommentList.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\CommentListItem\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/CommentListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\CommentListItem\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/CommentListItem.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\CommentListItem\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/CommentListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\CommentListItemMinimal\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/CommentListItemMinimal.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\CommentListItemMinimal\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/CommentListItemMinimal.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\CommentListItemMinimal\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/CommentListItemMinimal.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\CommentListItemMinimal\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/CommentListItemMinimal.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\DowntimeList\\:\\:createTicketLinks\\(\\) has parameter \\$text with no type specified\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/DowntimeList.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\DowntimeList\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/DowntimeList.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\DowntimeList\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/DowntimeList.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\DowntimeListItem\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/DowntimeListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\DowntimeListItem\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/DowntimeListItem.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\DowntimeListItem\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/DowntimeListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\DowntimeListItemMinimal\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/DowntimeListItemMinimal.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\DowntimeListItemMinimal\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/DowntimeListItemMinimal.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\DowntimeListItemMinimal\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/DowntimeListItemMinimal.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\DowntimeListItemMinimal\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/DowntimeListItemMinimal.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HistoryList\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HistoryList.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HistoryList\\:\\:createTicketLinks\\(\\) has parameter \\$text with no type specified\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/HistoryList.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HistoryList\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HistoryList.php - - message: "#^Parameter \\#2 \\$value of method Icinga\\\\Web\\\\Url\\:\\:setParam\\(\\) expects array\\|bool\\|string, int given\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/HistoryList.php - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HistoryList\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HistoryList.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HistoryList\\:\\:\\$data \\(ipl\\\\Orm\\\\ResultSet\\) does not accept Generator\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HistoryList.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HistoryListItem\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HistoryListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HistoryListItem\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HistoryListItem.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HistoryListItem\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HistoryListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HistoryListItemDetailed\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HistoryListItemDetailed.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HistoryListItemDetailed\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HistoryListItemDetailed.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HistoryListItemMinimal\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HistoryListItemMinimal.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HistoryListItemMinimal\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HistoryListItemMinimal.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HistoryListItemMinimal\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HistoryListItemMinimal.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HistoryListItemMinimal\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HistoryListItemMinimal.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HostDetailHeader\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HostDetailHeader.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HostDetailHeader\\:\\:assembleVisual\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HostDetailHeader.php - - message: "#^Parameter \\#2 \\$haystack of function in_array expects array, array\\|bool\\|string\\|null given\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/HostDetailHeader.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HostList\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HostList.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HostListItem\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HostListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HostListItem\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HostListItem.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HostListItem\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HostListItem.php - - message: "#^Cannot access property \\$is_flapping on mixed\\.$#" count: 1 @@ -8890,151 +8375,26 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/HostListItemDetailed.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HostListItemDetailed\\:\\:assembleFooter\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HostListItemDetailed.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HostListItemDetailed\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HostListItemDetailed.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HostListItemDetailed\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HostListItemDetailed.php - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/HostListItemDetailed.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HostListItemMinimal\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HostListItemMinimal.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HostListItemMinimal\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HostListItemMinimal.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\HostListItemMinimal\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HostListItemMinimal.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\NotificationList\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/NotificationList.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\NotificationList\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/NotificationList.php - - message: "#^Parameter \\#2 \\$value of method Icinga\\\\Web\\\\Url\\:\\:setParam\\(\\) expects array\\|bool\\|string, int given\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/NotificationList.php - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\NotificationList\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/NotificationList.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\NotificationList\\:\\:\\$data \\(ipl\\\\Orm\\\\ResultSet\\) does not accept Generator\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/NotificationList.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\NotificationListItem\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/NotificationListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\NotificationListItem\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/NotificationListItem.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\NotificationListItem\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/NotificationListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\NotificationListItemDetailed\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/NotificationListItemDetailed.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\NotificationListItemDetailed\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/NotificationListItemDetailed.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\NotificationListItemMinimal\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/NotificationListItemMinimal.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\NotificationListItemMinimal\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/NotificationListItemMinimal.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\NotificationListItemMinimal\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/NotificationListItemMinimal.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\NotificationListItemMinimal\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/NotificationListItemMinimal.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\PageSeparatorItem\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/PageSeparatorItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\ServiceDetailHeader\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/ServiceDetailHeader.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\ServiceDetailHeader\\:\\:assembleVisual\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/ServiceDetailHeader.php - - message: "#^Parameter \\#2 \\$haystack of function in_array expects array, array\\|bool\\|string\\|null given\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/ServiceDetailHeader.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\ServiceList\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/ServiceList.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\ServiceListItem\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/ServiceListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\ServiceListItem\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/ServiceListItem.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\ServiceListItem\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/ServiceListItem.php - - message: "#^Cannot access property \\$display_name on mixed\\.$#" count: 1 @@ -9060,46 +8420,11 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/ServiceListItemDetailed.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\ServiceListItemDetailed\\:\\:assembleFooter\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/ServiceListItemDetailed.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\ServiceListItemDetailed\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/ServiceListItemDetailed.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\ServiceListItemDetailed\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/ServiceListItemDetailed.php - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/ServiceListItemDetailed.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\ServiceListItemMinimal\\:\\:assembleHeader\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/ServiceListItemMinimal.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\ServiceListItemMinimal\\:\\:assembleMain\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/ServiceListItemMinimal.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\ServiceListItemMinimal\\:\\:\\$captionDisabled has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/ServiceListItemMinimal.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\StateList\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/StateList.php - - message: "#^Access to an undefined property object\\:\\:\\$icon_image_alt\\.$#" count: 1 @@ -9120,56 +8445,16 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/StateListItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\StateListItem\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/StateListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\StateListItem\\:\\:assembleCaption\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/StateListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\StateListItem\\:\\:assembleIconImage\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/StateListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\StateListItem\\:\\:assembleTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/StateListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\StateListItem\\:\\:assembleVisual\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/StateListItem.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\StateListItem\\:\\:createSubject\\(\\) has no return type specified\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/StateListItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\StateListItem\\:\\:createTimestamp\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/StateListItem.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\StateListItem\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/StateListItem.php - - message: "#^Parameter \\#1 \\$object of static method Icinga\\\\Module\\\\Icingadb\\\\Util\\\\PluginOutput\\:\\:fromObject\\(\\) expects Icinga\\\\Module\\\\Icingadb\\\\Model\\\\Host\\|Icinga\\\\Module\\\\Icingadb\\\\Model\\\\Service, object given\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/StateListItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\BaseHostGroupItem\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/BaseHostGroupItem.php - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" count: 2 @@ -9185,11 +8470,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemTable/BaseHostGroupItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\BaseServiceGroupItem\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/BaseServiceGroupItem.php - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" count: 2 @@ -9230,26 +8510,11 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemTable/BaseStateRowItem.php - - - message: "#^Call to an undefined method ipl\\\\Html\\\\BaseHtmlElement\\:\\:getDetailActionsDisabled\\(\\)\\.$#" - count: 2 - path: library/Icingadb/Widget/ItemTable/HostItemTable.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\HostItemTable\\:\\:init\\(\\) has no return type specified\\.$#" count: 1 path: library/Icingadb/Widget/ItemTable/HostItemTable.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\HostItemTable\\:\\:setDetailUrl\\(\\) should return \\$this\\(Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\HostItemTable\\) but returns ipl\\\\Html\\\\BaseHtmlElement\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/HostItemTable.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\HostItemTable\\:\\:setMultiselectUrl\\(\\) should return \\$this\\(Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\HostItemTable\\) but returns ipl\\\\Html\\\\BaseHtmlElement\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/HostItemTable.php - - message: "#^Cannot access property \\$display_name on mixed\\.$#" count: 1 @@ -9285,21 +8550,6 @@ parameters: count: 2 path: library/Icingadb/Widget/ItemTable/HostRowItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\HostgroupGridCell\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/HostgroupGridCell.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\HostgroupGridCell\\:\\:assembleTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/HostgroupGridCell.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\HostgroupGridCell\\:\\:assembleVisual\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/HostgroupGridCell.php - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" count: 1 @@ -9320,21 +8570,6 @@ parameters: count: 4 path: library/Icingadb/Widget/ItemTable/HostgroupGridCell.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\HostgroupTable\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/HostgroupTable.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\HostgroupTableRow\\:\\:assembleColumns\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/HostgroupTableRow.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\HostgroupTableRow\\:\\:assembleTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/HostgroupTableRow.php - - message: "#^Parameter \\#1 \\.\\.\\.\\$rules of static method ipl\\\\Stdlib\\\\Filter\\:\\:all\\(\\) expects ipl\\\\Stdlib\\\\Filter\\\\Rule, ipl\\\\Stdlib\\\\Filter\\\\Rule\\|null given\\.$#" count: 2 @@ -9350,26 +8585,11 @@ parameters: count: 2 path: library/Icingadb/Widget/ItemTable/HostgroupTableRow.php - - - message: "#^Call to an undefined method ipl\\\\Html\\\\BaseHtmlElement\\:\\:getDetailActionsDisabled\\(\\)\\.$#" - count: 2 - path: library/Icingadb/Widget/ItemTable/ServiceItemTable.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\ServiceItemTable\\:\\:init\\(\\) has no return type specified\\.$#" count: 1 path: library/Icingadb/Widget/ItemTable/ServiceItemTable.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\ServiceItemTable\\:\\:setDetailUrl\\(\\) should return \\$this\\(Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\ServiceItemTable\\) but returns ipl\\\\Html\\\\BaseHtmlElement\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/ServiceItemTable.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\ServiceItemTable\\:\\:setMultiselectUrl\\(\\) should return \\$this\\(Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\ServiceItemTable\\) but returns ipl\\\\Html\\\\BaseHtmlElement\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/ServiceItemTable.php - - message: "#^Cannot access property \\$display_name on mixed\\.$#" count: 1 @@ -9410,21 +8630,6 @@ parameters: count: 2 path: library/Icingadb/Widget/ItemTable/ServiceRowItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\ServicegroupGridCell\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/ServicegroupGridCell.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\ServicegroupGridCell\\:\\:assembleTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/ServicegroupGridCell.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\ServicegroupGridCell\\:\\:assembleVisual\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/ServicegroupGridCell.php - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" count: 1 @@ -9445,21 +8650,6 @@ parameters: count: 8 path: library/Icingadb/Widget/ItemTable/ServicegroupGridCell.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\ServicegroupTable\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/ServicegroupTable.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\ServicegroupTableRow\\:\\:assembleColumns\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/ServicegroupTableRow.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\ServicegroupTableRow\\:\\:assembleTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/ServicegroupTableRow.php - - message: "#^Parameter \\#1 \\.\\.\\.\\$rules of static method ipl\\\\Stdlib\\\\Filter\\:\\:all\\(\\) expects ipl\\\\Stdlib\\\\Filter\\\\Rule, ipl\\\\Stdlib\\\\Filter\\\\Rule\\|null given\\.$#" count: 1 @@ -9645,36 +8835,11 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemTable/StateRowItem.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\UserTable\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/UserTable.php - - message: "#^Cannot access offset 0 on mixed\\.$#" count: 1 path: library/Icingadb/Widget/ItemTable/UserTableRow.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\UserTableRow\\:\\:assembleColumns\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/UserTableRow.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\UserTableRow\\:\\:assembleTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/UserTableRow.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\UserTableRow\\:\\:assembleVisual\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/UserTableRow.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\UserTableRow\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/UserTableRow.php - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" count: 3 @@ -9685,36 +8850,11 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemTable/UserTableRow.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\UsergroupTable\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/UsergroupTable.php - - message: "#^Cannot access offset 0 on mixed\\.$#" count: 1 path: library/Icingadb/Widget/ItemTable/UsergroupTableRow.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\UsergroupTableRow\\:\\:assembleColumns\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/UsergroupTableRow.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\UsergroupTableRow\\:\\:assembleTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/UsergroupTableRow.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\UsergroupTableRow\\:\\:assembleVisual\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/UsergroupTableRow.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\UsergroupTableRow\\:\\:init\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/UsergroupTableRow.php - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" count: 3 @@ -9725,23 +8865,18 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemTable/UsergroupTableRow.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\Notice\\:\\:__construct\\(\\) has parameter \\$content with no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/Notice.php - - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\Notice\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/Notice.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ServiceStateBadges\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 path: library/Icingadb/Widget/ServiceStateBadges.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ServiceStatusBar\\:\\:assembleTotal\\(\\) has no return type specified\\.$#" + message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + count: 1 + path: library/Icingadb/Widget/ServiceStatusBar.php + + - + message: "#^Parameter \\#3 \\$number of function tp expects int\\|null, mixed given\\.$#" count: 1 path: library/Icingadb/Widget/ServiceStatusBar.php @@ -9780,26 +8915,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ServiceSummaryDonut.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ShowMore\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ShowMore.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ShowMore\\:\\:\\$label has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ShowMore.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ShowMore\\:\\:\\$resultSet has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ShowMore.php - - - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ShowMore\\:\\:\\$url has no type specified\\.$#" - count: 1 - path: library/Icingadb/Widget/ShowMore.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\StateChange\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 diff --git a/public/css/list/item-list.less b/public/css/list/item-list.less index ab575357..251eec31 100644 --- a/public/css/list/item-list.less +++ b/public/css/list/item-list.less @@ -1,13 +1,6 @@ // Style .item-list { - list-style-type: none; - - > .empty-state { - .rounded-corners(); - background-color: @gray-lighter; - } - .load-more:hover, .page-separator:hover { background: none; @@ -50,60 +43,11 @@ // Layout -.item-list { - margin: 0; - padding: 0; - - .list-item { - display: flex; - - &.load-more a { - flex: 1; - margin: 1.5em 0; - padding: .5em 0; - } - - .main { - flex: 1 1 auto; - padding: .5em 0; - width: 0; - margin-left: .5em; - } - - .visual { - display: flex; - align-items: center; - flex-direction: column; - } - - .caption { - height: 3em; - text-overflow: ellipsis; - overflow: hidden; - - .line-clamp(); - - img { - max-height: 1em; - } - } - - header { - display: flex; - align-items: flex-start; - justify-content: space-between; - } - - footer { - display: flex; - justify-content: space-between; - } - } - - > .empty-state { - margin: 0 1em; - padding: 1em; - text-align: center; +.item-list .list-item { + &.load-more a { + flex: 1; + margin: 1.5em 0; + padding: .5em 0; } } @@ -151,31 +95,6 @@ } } -.item-list:not(.detailed) .list-item { - .title { - display: inline-flex; - align-items: baseline; - white-space: nowrap; - min-width: 0; - - > * { - margin: 0 .28125em; // 0 calculated   width - - &:first-child { - margin-left: 0; - } - - &:last-child { - margin-right: 0; - } - } - - .subject { - .text-ellipsis(); - } - } -} - .item-list.detailed .list-item { .title { word-break: break-word; @@ -220,10 +139,6 @@ } } -.controls .list-item:not(:last-child) { - margin-bottom: .5em; -} - .controls .item-list:not(.detailed):not(.minimal) .list-item { .plugin-output { line-height: 1.5 diff --git a/public/css/list/item-table.less b/public/css/list/item-table.less deleted file mode 100644 index f75b6233..00000000 --- a/public/css/list/item-table.less +++ /dev/null @@ -1,104 +0,0 @@ -// Style - -ul.item-table { - list-style-type: none; -} - -div.item-table { - > .empty-state { - .rounded-corners(); - background-color: @gray-lighter; - } -} - -.table-row { - color: @text-color-light; - - .title { - .subject { - color: @text-color; - } - - a { - font-weight: bold; - - &:hover { - color: @icinga-blue; - text-decoration: none; - } - } - } -} - -@media print { - .item-table li.page-break-follows:not(:last-of-type) { - .col { - border-bottom: none; - } - - .visual { - margin-bottom: 0; - } - } -} - -// Layout - -.table-row { - .title { - display: flex; - - .visual { - width: 2.5em; - padding: .5em 0; - margin-top: -.5em; - margin-bottom: -.5em; - } - - .content { - flex: 1 1 auto; - width: 0; - - > * { - .text-ellipsis(); - } - } - } - - .col { - white-space: nowrap; - } -} - -ul.item-table { - display: grid; - - > .table-row { - .col:not(.title) { - display: grid; - align-items: center; - } - } -} - -ul.item-table { - padding: 0; - margin: 0; -} - -div.item-table { - > .empty-state { - margin: 0 1em; - padding: 1em; - text-align: center; - } -} - -div.table-row { - display: flex; - column-gap: 1em; - - .title { - flex: 1 1 auto; - } -} diff --git a/public/css/list/list-item.less b/public/css/list/list-item.less index c66ad90f..2e67e3d4 100644 --- a/public/css/list/list-item.less +++ b/public/css/list/list-item.less @@ -1,8 +1,6 @@ // Style .list-item { - color: @text-color-light; - &.overdue { background-color: @gray-lighter; } @@ -18,50 +16,14 @@ color: @text-color-on-icinga-blue; } - &:not(:first-child) > .main { - border-top: 1px solid @gray-light; - } - - &:not(:first-child) .visual { - margin-top: 1px; - } - - .caption { - i { - opacity: 0.8; - } - - a { - color: @text-color; - } - } - .title { - span.subject, .state-text { color: @text-color; - } - - .state-text { text-transform: uppercase; } - - a { - color: @text-color; - font-weight: bold; - - &:hover { - color: @icinga-blue; - text-decoration: none; - } - } } footer { - &:not(:empty) { - padding-top: .5em; - } - .status-icons { color: @text-color-light; @@ -72,14 +34,6 @@ } } -@media print { - .list-item.page-break-follows + .list-item { - .main { - border-top: 1px solid transparent; - } - } -} - // Layout .list-item { @@ -88,44 +42,18 @@ padding: 0 0.5em; } - .visual { - padding: .5em 0; - width: 2.5em; - - .check-attempt { - margin-top: .5em; - } + .visual .check-attempt { + margin-top: .5em; } .caption { - p { - display: inline-block; - } - &.plugin-output, .plugin-output { font-size: 11/12em; line-height: 1.5*12/11em; } } - .title { - margin-right: 1em; - - p { - margin: 0; - } - } - - time { - white-space: nowrap; - } - footer { - > * { - font-size: .857em; - line-height: 1.5*.857em; - } - .status-icons { display: flex; align-items: center; diff --git a/public/css/mixins.less b/public/css/mixins.less index c6607c29..326bf46c 100644 --- a/public/css/mixins.less +++ b/public/css/mixins.less @@ -1,22 +1,5 @@ /* Icinga DB Web | (c) 2020 Icinga GmbH | GPLv2 */ -.line-clamp(@numOfLines: 2) when (@numOfLines > 1) { - display: -webkit-box; - -webkit-line-clamp: @numOfLines; - -webkit-box-orient: vertical; -} -.line-clamp(@numOfLines: 2) when (@numOfLines = "reset") { - display: block; // Would have used "revert", but browser support is still poor and it's not final yet - -webkit-line-clamp: initial; - -webkit-box-orient: initial; -} - -.text-ellipsis() { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - .monospace() { font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; }