{# Status Components Macros: status_dot, stage_dots, progress_dots #} {% macro status_dot(status, size="sm", animate=true) %} {# Colored dot indicator for status values. Args: status: One of success, failed, error, running, pending, cancelled, skipped, etc. size: "xs" (1.5), "sm" (2), "md" (3) animate: Pulse animation for running/active states Maps: success/ok/healthy/online → green failed/error/unhealthy → red running/active/connected → yellow (pulse) pending/waiting/queued → blue cancelled/stopped/paused → gray skipped/inactive → gray (no pulse) #} {% set sizes = {"xs": "w-1.5 h-1.5", "sm": "w-2 h-2", "md": "w-3 h-3"} %} {% set s = status | lower %} {% if s in ["success", "ok", "healthy", "online", "passed"] %} {% elif s in ["failed", "error", "unhealthy", "offline"] %} {% elif s in ["running", "active", "connected"] %} {% elif s in ["pending", "waiting", "queued"] %} {% elif s in ["cancelled", "stopped", "paused"] %} {% elif s in ["skipped", "inactive"] %} {% elif s in ["warning"] %} {% else %} {% endif %} {% endmacro %} {% macro stage_dots(stages, size="xs") %} {# Row of tiny dots showing stage pass/fail status, for run history rows. Args: stages: List of objects with .status attribute (or dicts with "status" key) size: Dot size — "xs" (1.5), "sm" (2), "md" (3). Default "xs". #} {% for s in stages %} {{ status_dot(s.status, size=size, animate=false) }} {% endfor %} {% endmacro %} {% macro progress_stages(stages) %} {# Full-width progress bar split into colored segments per stage. Use in run detail pages for visual progress overview. Args: stages: List of stage objects with .stage_name and .status attributes #} {% if stages | length > 0 %}
{% for stage in stages %}
{% endfor %}
{{ stages[0].stage_name }} {% if stages | length > 1 %} {{ stages[-1].stage_name }} {% endif %}
{% endif %} {% endmacro %} {% macro status_icon(status, size="sm") %} {# Circular icon indicator for stage statuses (larger, with icon inside). Args: status: success, failed, running, skipped, pending size: "sm" (6), "md" (8) #} {% set sizes = {"sm": "w-6 h-6", "md": "w-8 h-8"} %} {% set icon_sizes = {"sm": "w-3.5 h-3.5", "md": "w-4 h-4"} %} {% if status == "success" %} {% elif status == "failed" or status == "error" %} {% elif status == "running" %} {% elif status == "skipped" %} {% else %} {% endif %} {% endmacro %}