{% load buttons %} {% load helpers %} {% load perms %} {% load i18n %} {# Core script list content - used by both full page and embedded views #} {% for module in script_modules %} {% include 'inc/sync_warning.html' with object=module %}
{% if not embedded %}

{{ module }}
{% if perms.extras.edit_scriptmodule %} {% trans "Edit" %} {% endif %} {% if perms.extras.delete_scriptmodule %} {% trans "Delete" %} {% endif %}

{% endif %} {% with scripts=module.ordered_scripts %} {% if scripts %} {% for script in scripts %} {% with last_job=script.get_latest_jobs|first %} {% if last_job %} {% else %} {% endif %} {% if last_job and not embedded %} {% for test_name, data in last_job.data.tests.items %} {% endfor %} {% elif last_job and not last_job.data.log and not embedded %} {# legacy #} {% for method, stats in last_job.data.items %} {% endfor %} {% endif %} {% endwith %} {% endfor %}
{% trans "Name" %} {% trans "Description" %} {% trans "Last Run" %} {% trans "Status" %}
{% if script.is_executable %} {{ script.python_class.name }} {% else %} {{ script.python_class.name }} {% endif %} {{ script.python_class.description|markdown|placeholder }} {{ last_job.created|isodatetime }} {% badge last_job.get_status_display last_job.get_status_color %} {% trans "Never" %} {{ ''|placeholder }} {% if request.user|can_run:script and script.is_executable %}
{% if script.python_class.commit_default %} {% endif %} {% csrf_token %}
{% endif %}
{{ test_name }} {{ data.success }} {{ data.info }} {{ data.warning }} {{ data.failure }}
{{ method }} {{ stats.success }} {{ stats.info }} {{ stats.warning }} {{ stats.failure }}
{% else %}
{% endif %} {% endwith %}
{% empty %} {% endfor %}