Remove redudant titles

This commit is contained in:
Sukhwinder Dhillon 2021-08-05 13:43:04 +02:00 committed by Johannes Meyer
parent bc118516ec
commit 2f8bb8bb6c
2 changed files with 7 additions and 15 deletions

View file

@ -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()

View file

@ -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;