gateway: alphabetize the displayed route table
Sort routes by address in GET /gateway and 'castle gateway status' (so the dashboard + CLI tables read alphabetically). The Caddyfile keeps its precedence-sensitive order — only the display is sorted.
This commit is contained in:
@@ -878,6 +878,8 @@ def get_gateway() -> GatewayInfo:
|
||||
)
|
||||
for r in compute_routes(registry, config, remote or None)
|
||||
]
|
||||
# Caddyfile order is precedence-sensitive; the displayed table is alphabetical.
|
||||
routes.sort(key=lambda r: r.address)
|
||||
|
||||
return GatewayInfo(
|
||||
port=registry.node.gateway_port,
|
||||
|
||||
Reference in New Issue
Block a user