ui: drop Graph page, add host switcher to left nav

The System Map subsumes the read-only Graph diagnostic, so remove the page,
its route, and nav entry (the /graph API + useGraph stay — the map and palette
consume them).

Add a host switcher under the sidebar brand: it shows which castle host you're
driving (the is_local node) and, when peers are present, jumps to a peer's
dashboard at castle.<domain>, preserving the current view. Node summaries now
carry gateway_domain so the switcher can build each host's URL.
This commit is contained in:
2026-07-07 06:44:48 -07:00
parent ee7e5cc825
commit c525e154da
7 changed files with 108 additions and 152 deletions

View File

@@ -53,6 +53,7 @@ def _local_node_summary(registry: object) -> NodeSummary:
return NodeSummary(
hostname=registry.node.hostname,
gateway_port=registry.node.gateway_port,
gateway_domain=registry.node.gateway_domain,
deployed_count=len(registry.deployed),
service_count=sum(1 for d in registry.deployed.values() if d.port is not None),
is_local=True,
@@ -67,6 +68,7 @@ def _remote_node_summary(hostname: str, remote: object) -> NodeSummary:
return NodeSummary(
hostname=hostname,
gateway_port=reg.node.gateway_port,
gateway_domain=getattr(reg.node, "gateway_domain", None),
deployed_count=len(reg.deployed),
service_count=sum(1 for d in reg.deployed.values() if d.port is not None),
is_local=False,