diff --git a/library/Icingadb/Widget/ItemList/DependencyNodeList.php b/library/Icingadb/Widget/ItemList/DependencyNodeList.php index c95f883fa..3457b16e9 100644 --- a/library/Icingadb/Widget/ItemList/DependencyNodeList.php +++ b/library/Icingadb/Widget/ItemList/DependencyNodeList.php @@ -28,14 +28,23 @@ protected function getItemClass(): string protected function createListItem(object $data): BaseListItem { + $viewMode = $this->getViewMode(); /** @var UnreachableParent|DependencyNode $data */ if ($data->redundancy_group_id !== null) { + if ($viewMode === 'minimal') { + return new RedundancyGroupListItemMinimal($data->redundancy_group, $this); + } + + if ($viewMode === 'detailed') { + $this->removeAttribute('class', 'default-layout'); + } + return new RedundancyGroupListItem($data->redundancy_group, $this); } $object = $data->service_id !== null ? $data->service : $data->host; - switch ($this->getViewMode()) { + switch ($viewMode) { case 'minimal': $class = $object instanceof Host ? HostListItemMinimal::class : ServiceListItemMinimal::class; break; diff --git a/library/Icingadb/Widget/ItemList/RedundancyGroupListItemMinimal.php b/library/Icingadb/Widget/ItemList/RedundancyGroupListItemMinimal.php new file mode 100644 index 000000000..be6b96cb6 --- /dev/null +++ b/library/Icingadb/Widget/ItemList/RedundancyGroupListItemMinimal.php @@ -0,0 +1,18 @@ + * { + margin: 0 .28125em; // 0 calculated   width + + &:first-child { + margin-left: 0; + } + + &:last-child { + margin-right: 0; + } + } + + .caption .object-statistics { + justify-self: end; + } + } +} + +.item-list.minimal > .list-item.redundancy-group-list-item { + .caption .object-statistics { + font-size: 0.75em; } }