mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
hosts/services: Fix that overdue items do not appear as such
fixes #1193
This commit is contained in:
parent
0f81a7c3fb
commit
30658ef116
3 changed files with 11 additions and 0 deletions
|
|
@ -50,6 +50,13 @@ abstract class BaseHostAndServiceRenderer implements ItemRenderer
|
|||
*/
|
||||
abstract protected function createSubject($item, string $layout): ValidHtml;
|
||||
|
||||
public function assembleAttributes($item, Attributes $attributes, string $layout): void
|
||||
{
|
||||
if ($item->state->is_overdue) {
|
||||
$attributes->get('class')->addValue('overdue');
|
||||
}
|
||||
}
|
||||
|
||||
public function assembleVisual($item, HtmlDocument $visual, string $layout): void
|
||||
{
|
||||
if ($layout === 'header') {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ class HostRenderer extends BaseHostAndServiceRenderer
|
|||
{
|
||||
public function assembleAttributes($item, Attributes $attributes, string $layout): void
|
||||
{
|
||||
parent::assembleAttributes($item, $attributes, $layout);
|
||||
|
||||
$attributes->get('class')->addValue('host');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ class ServiceRenderer extends BaseHostAndServiceRenderer
|
|||
{
|
||||
public function assembleAttributes($item, Attributes $attributes, string $layout): void
|
||||
{
|
||||
parent::assembleAttributes($item, $attributes, $layout);
|
||||
|
||||
$attributes->get('class')->addValue('service');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue