{% load i18n %}

<table class="list" width="100%">
  <tr>
    <th>{% trans "Name" %}</th>
    <th>{% trans "Arches" %}</th>
    <th>{% trans "Enabled" %}</th>
    <th>{% trans "Ready" %}</th>
    <th>{% trans "Tasks" %}</th>
  </tr>
{% for worker in worker_list %}
  <tr>
    <td><a href="{% url 'worker/detail' worker.id %}">{{ worker.name }}</a></td>
    <td>{{ worker.arches.all|join:" " }}</td>
    <td>{% if worker.enabled %}<span class="FREE">{% trans 'YES' %}</span>{% else %}<span class="FAILED">{% trans 'NO' %}</span>{% endif %}</td>
    <td>{% if worker.ready %}<span class="FREE">{% trans 'YES' %}</span>{% else %}<span class="FAILED">{% trans 'NO' %}</span>{% endif %}</td>
    <td><span class="{% ifnotequal worker.task_count worker.max_tasks %}FREE{% else %}FAILED{% endifnotequal %}">{{ worker.task_count }}</span> / {{ worker.max_tasks }}</td>
  </tr>
{% endfor %}
</table>
