conductor(checkpoint): Checkpoint end of Phase 3 - UI and Health Logic

This commit is contained in:
2026-02-09 06:14:47 -08:00
parent c5a3cbfeb8
commit 21e9c3d72d
2 changed files with 29 additions and 2 deletions

View File

@@ -44,7 +44,15 @@ def format_node_table(nodes, use_color=True):
for node in nodes:
# Consul status color
status = node["status"]
status_color = GREEN if status == "passing" else RED
if status == "passing":
status_color = GREEN
elif status == "standby":
status_color = CYAN
elif status == "unregistered":
status_color = YELLOW
else:
status_color = RED
colored_status = colorize(status, status_color, use_color)
# Role color
@@ -90,7 +98,9 @@ def format_diagnostics(nodes, use_color=True):
"""
Formats detailed diagnostic information for nodes with errors.
"""
error_nodes = [n for n in nodes if n["status"] != "passing" or n.get("litefs_error")]
# Only show diagnostics if status is critical/unregistered OR if there is a LiteFS error
# Ignore 'standby' since it is expected for replicas
error_nodes = [n for n in nodes if (n["status"] not in ["passing", "standby"]) or n.get("litefs_error")]
if not error_nodes:
return ""