diff --git a/library/Icingadb/Widget/Detail/HostDetail.php b/library/Icingadb/Widget/Detail/HostDetail.php index 666f1f06..528b722e 100644 --- a/library/Icingadb/Widget/Detail/HostDetail.php +++ b/library/Icingadb/Widget/Detail/HostDetail.php @@ -29,9 +29,7 @@ class HostDetail extends ObjectDetail $services = new EmptyState(t('This host has no services')); } - $stats = [Html::tag('h2', t('Services'))]; - $stats[] = new HorizontalKeyValue(t('Services'), $services); - return $stats; + return [Html::tag('h2', t('Services')), $services]; } protected function assemble() diff --git a/library/Icingadb/Widget/Detail/ObjectDetail.php b/library/Icingadb/Widget/Detail/ObjectDetail.php index 950539a4..d8833e12 100644 --- a/library/Icingadb/Widget/Detail/ObjectDetail.php +++ b/library/Icingadb/Widget/Detail/ObjectDetail.php @@ -211,12 +211,9 @@ class ObjectDetail extends BaseHtmlElement $hostgroupList->addLink($hostgroup->display_name, Links::hostgroup($hostgroup)); } - $groups[] = new HorizontalKeyValue( - t('Host Groups'), - $hostgroupList->hasContent() - ? $hostgroupList - : new EmptyState(t('Not a member of any host group.')) - ); + $groups[] = $hostgroupList->hasContent() + ? $hostgroupList + : new EmptyState(t('Not a member of any host group.')); } else { $servicegroups = []; if ($this->isPermittedRoute('servicegroups')) { @@ -229,12 +226,9 @@ class ObjectDetail extends BaseHtmlElement $servicegroupList->addLink($servicegroup->display_name, Links::servicegroup($servicegroup)); } - $groups[] = new HorizontalKeyValue( - t('Service Groups'), - $servicegroupList->hasContent() - ? $servicegroupList - : new EmptyState(t('Not a member of any service group.')) - ); + $groups[] = $servicegroupList->hasContent() + ? $servicegroupList + : new EmptyState(t('Not a member of any service group.')); } return $groups;