conductor(checkpoint): Checkpoint end of Phase 3 - UI and Health Logic
This commit is contained in:
@@ -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 ""
|
||||
|
||||
Reference in New Issue
Block a user