{# Status colouring shared by the agents list and the subtree header card. #} {% macro box_class(b) -%} t-{{ b.type }} s-{{ b.status }}{% if b.status == "ok" and b.errors %} recovered{% endif %} {%- endmacro %} {% macro pct(value) -%} {% set p = (value or 0) * 100 %}{{ "<1" if 0 < p < 0.5 else (p | round | int) }}% {%- endmacro %}