{% if status == "pending" %}
    <span class="badge text-bg-secondary">Pending</span>
{% elif status == "running" %}
    <span class="badge text-bg-info">Running</span>
{% elif status == "completed" %}
    <span class="badge text-bg-primary">Completed</span>
{% elif status == "aborted" %}
    {% if aborted_by %}
        <span class="badge text-bg-dark" title="Aborted by {{ aborted_by }}">Aborted</span>
    {% else %}
        <span class="badge text-bg-dark">Aborted</span>
    {% endif %}
{% elif status == "blocked" %}
    <span class="badge text-bg-dark">Blocked</span>
{% endif %}
