{% from "job-table.html" import job_table with context %}
{% macro filtered_jobs(running, failed, pending, completed) %}
{% if jobs.items()|length %}
{% for state, state_jobs in jobs.items() %}
{% if state_jobs|length %}
{{ state.capitalize() }}
{{ job_table(state_jobs, "{{ state }}-jobs", "{{ state }}JobsSearchBar") }}
{% endif %}
{% endfor %}
{% else %}