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