From b9eb4e51049173c4b61988772a8feb4303bb6c0c Mon Sep 17 00:00:00 2001 From: Roland Date: Wed, 24 Dec 2025 16:43:37 -0700 Subject: [PATCH] Expanding modal width on controller dashboard. Including hostname in controller dashboard title. --- controller/api/services.py | 2 ++ controller/main.py | 3 +++ controller/templates/index.html | 8 ++++---- controller/test/test_api.py | 4 +++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/controller/api/services.py b/controller/api/services.py index 8e6ea12b..c154d7ba 100644 --- a/controller/api/services.py +++ b/controller/api/services.py @@ -45,6 +45,7 @@ async def list_services() -> Union[list[ServiceStatusResponse], ServicesListErro if is_docker_mode(): if can_manage_containers(): statuses = get_all_containers_status() + statuses = sorted(statuses, key=lambda s: s["name"]) return [ServiceStatusResponse(**s) for s in statuses if "error" not in s] else: return ServicesListErrorResponse( @@ -53,6 +54,7 @@ async def list_services() -> Union[list[ServiceStatusResponse], ServicesListErro ) else: statuses = get_all_services_status() + statuses = sorted(statuses, key=lambda s: s["name"]) return [ServiceStatusResponse(**s) for s in statuses] diff --git a/controller/main.py b/controller/main.py index a659a488..a415f30e 100644 --- a/controller/main.py +++ b/controller/main.py @@ -150,6 +150,9 @@ async def dashboard(request: Request): else: services = get_all_services_status() + # Sort services by name for consistent display + services = sorted(services, key=lambda s: s["name"]) + context = { "version": __version__, "docker_mode": is_docker_mode(), diff --git a/controller/templates/index.html b/controller/templates/index.html index 9e3f97e4..30a79a1f 100644 --- a/controller/templates/index.html +++ b/controller/templates/index.html @@ -3,7 +3,7 @@ - WROLPi Controller + Controller - {{ host }} WROLPi