From f400f4d96dc534d34cd3345c6ee1ba1fad7ae097 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 21 Jun 2021 16:10:55 +0200 Subject: [PATCH] AppHealth: Use strict interfaces to construct ipl\Html objects --- library/Icinga/Web/View/AppHealth.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/library/Icinga/Web/View/AppHealth.php b/library/Icinga/Web/View/AppHealth.php index e52eb8699..fe1c56cbe 100644 --- a/library/Icinga/Web/View/AppHealth.php +++ b/library/Icinga/Web/View/AppHealth.php @@ -31,23 +31,21 @@ class AppHealth extends Table { foreach ($this->data as $row) { $this->add(Table::tr([ - Table::th(new HtmlElement('span', ['class' => [ + Table::th(HtmlElement::create('span', ['class' => [ 'ball', 'ball-size-xl', $this->getStateClass($row->state) ]])), Table::td([ - new HtmlElement('header', null, [ - FormattedString::create( - t('%s by %s is %s', ' by is '), - $row->url - ? new Link(new HtmlElement('span', null, $row->name), $row->url) - : new HtmlElement('span', null, $row->name), - new HtmlElement('span', null, $row->module), - new HtmlElement('span', null, $this->getStateText($row->state)) - ) - ]), - new HtmlElement('section', null, $row->message) + new HtmlElement('header', null, FormattedString::create( + t('%s by %s is %s', ' by is '), + $row->url + ? new Link(HtmlElement::create('span', null, $row->name), $row->url) + : HtmlElement::create('span', null, $row->name), + HtmlElement::create('span', null, $row->module), + HtmlElement::create('span', null, $this->getStateText($row->state)) + )), + HtmlElement::create('section', null, $row->message) ]) ])); }