mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 07:44:05 +02:00
ObjectsTableService: shorten line
This commit is contained in:
parent
350e21f368
commit
00e0f9574d
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Director\Web\Table;
|
namespace Icinga\Module\Director\Web\Table;
|
||||||
|
|
||||||
use Icinga\Module\Director\Db\IcingaObjectFilterHelper;
|
|
||||||
use Icinga\Module\Director\Objects\IcingaService;
|
|
||||||
use ipl\Html\Html;
|
use ipl\Html\Html;
|
||||||
use ipl\Web\Table\Extension\MultiSelect;
|
use ipl\Web\Table\Extension\MultiSelect;
|
||||||
use ipl\Html\Link;
|
use ipl\Html\Link;
|
||||||
@ -56,8 +54,11 @@ class ObjectsTableService extends ObjectsTable
|
|||||||
'id' => $row->id,
|
'id' => $row->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$hostField = static::td(
|
$caption = $row->host === null
|
||||||
Link::create($row->host === null ? Html::span(['class' => 'error'], '- none -') : $row->host, $url));
|
? Html::span(['class' => 'error'], '- none -')
|
||||||
|
: $row->host;
|
||||||
|
|
||||||
|
$hostField = static::td(Link::create($caption, $url));
|
||||||
if ($row->host === null) {
|
if ($row->host === null) {
|
||||||
$hostField->attributes()->add('class', 'error');
|
$hostField->attributes()->add('class', 'error');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user