{% from "ui.html" import badge, scenario, empty_row with context %} {% from "flash.html" import flash %}
{% for row in rows %} {% set trainee = users.get(row.trainee_id) %} {% set agent = agents.get(row.agent_id) if row.agent_id else None %} {% else %} {% if failure %} {{ empty_row(7, 'The list could not be loaded', 'It is tried again on the next refresh, in 5 seconds.') }} {% elif status %} {{ empty_row(7, "No deployments match the filter", "Nothing is " ~ status ~ " right now.", "Clear filter", url_for('deployments').path) }} {% else %} {{ empty_row(7, 'No deployments yet', 'A deployment starts a VM for one trainee from a registered scenario.', 'New deployment', '/deployments/new', True) }} {% endif %} {% endfor %}
Status Scenario Trainee Agent Created Ended
{{ badge(row.status) }} {{ scenario(scenarios.get(row.scenario_id)) }} {{ trainee.name if trainee else '-' }} {{ agent.name if agent else '-' }} {{ row.created_at | when }} {{ row.ended_at | when }}
Open {% if row.status in stoppable %} {% endif %}
{% if rows %}{{ rows | length | counted("deployment") }}{% endif %} {% if failure and swapped %}
{{ flash(failure) }}
{% endif %}