From d86eee5847a925f9b69deeb3d74098c90c2bdfd1 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Thu, 12 Mar 2026 15:44:19 +0100 Subject: [PATCH] Give all containers a display_name, hide from list by dedicated attribute We want a display-name for all containers in the overlay-log, but still want to exclude some containers from the list on top of the web UI. Signed-off-by: Pablo Zmdl --- php/containers-schema.json | 5 ++++- php/containers.json | 6 ++++++ php/src/Container/Container.php | 3 ++- php/src/ContainerDefinitionFetcher.php | 5 ++++- php/templates/containers.twig | 6 +++--- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/php/containers-schema.json b/php/containers-schema.json index 7accc513..329cb6e8 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -49,6 +49,9 @@ "type": "string", "pattern": "^[()A-Za-z &0-9-]+$" }, + "hide_from_list": { + "type": "boolean" + }, "environment": { "type": "array", "items": { @@ -229,4 +232,4 @@ } } } -} \ No newline at end of file +}} diff --git a/php/containers.json b/php/containers.json index 2e1923c0..3f84f109 100644 --- a/php/containers.json +++ b/php/containers.json @@ -530,6 +530,8 @@ }, { "container_name": "nextcloud-aio-borgbackup", + "display_name": "Borgbackup", + "hide_from_list": true, "image_tag": "%AIO_CHANNEL%", "image": "ghcr.io/nextcloud-releases/aio-borgbackup", "init": true, @@ -598,6 +600,8 @@ }, { "container_name": "nextcloud-aio-watchtower", + "display_name": "Watchtower", + "hide_from_list": true, "image_tag": "%AIO_CHANNEL%", "image": "ghcr.io/nextcloud-releases/aio-watchtower", "init": true, @@ -618,6 +622,8 @@ }, { "container_name": "nextcloud-aio-domaincheck", + "display_name": "Domaincheck", + "hide_from_list": true, "image_tag": "%AIO_CHANNEL%", "image": "ghcr.io/nextcloud-releases/aio-domaincheck", "init": true, diff --git a/php/src/Container/Container.php b/php/src/Container/Container.php index 67ff72ad..e69ce058 100644 --- a/php/src/Container/Container.php +++ b/php/src/Container/Container.php @@ -38,7 +38,8 @@ readonly class Container { public string $imageTag, public AioVariables $aioVariables, public string $documentation, - private DockerActionManager $dockerActionManager + private DockerActionManager $dockerActionManager, + public bool $hideFromList ) { } diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 5481cd00..c1b62788 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -324,6 +324,8 @@ readonly class ContainerDefinitionFetcher { $documentation = $entry['documentation']; } + $hideFromList = $entry['hide_from_list'] ?? false; + $containers[] = new Container( $entry['container_name'], $displayName, @@ -349,7 +351,8 @@ readonly class ContainerDefinitionFetcher { $imageTag, $aioVariables, $documentation, - $this->container->get(DockerActionManager::class) + $this->container->get(DockerActionManager::class), + $hideFromList ); } diff --git a/php/templates/containers.twig b/php/templates/containers.twig index fa174836..68e00c8a 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -47,10 +47,10 @@ {% endif %} {% for container in containers %} - {% if container.displayName != '' and container.GetRunningState().value == 'running' %} + {% if container.hideFromList != true and container.GetRunningState().value == 'running' %} {% set isAnyRunning = true %} {% endif %} - {% if container.displayName != '' and container.GetRestartingState().value == 'restarting' %} + {% if container.hideFromList != true and container.GetRestartingState().value == 'restarting' %} {% set isAnyRestarting = true %} {% endif %} {% if container.identifier == 'nextcloud-aio-watchtower' and container.GetRunningState().value == 'running' %} @@ -282,7 +282,7 @@