{% extends "script/script_base.html" %} {% load static %} {% load i18n %} {% load utility_tags %} {% block head %} {{block.super}} {% endblock %} {% block content %}

{% blocktrans with name=script.name|unquote_plus run=run.name|unquote_plus %}Edit run {{run}} of script {{name}}{% endblocktrans %}

{% if run %}
{% csrf_token %}
{% endif %}
{% if run.scheduled %} {# Usiamo blocktrans per far combaciare l'ID nel file .po #} {% blocktrans with time=run.scheduled %}Scheduled at {{time}}{% endblocktrans %} {% if run.completed %} {% blocktrans with time=run.completed %}Completed at {{time}}{% endblocktrans %} {% else %} {% trans "Not completed yet" %} {% endif %} {% endif %}
{% if not run.scheduled %}
{% csrf_token %} {{form.as_p}}
{% if run.hosts %} {% endif %}

{% trans "Host list" %}

{% for host in run.hosts %} {% endfor %}
{{host.name}}
{% csrf_token %}
{% else %}

{% trans "Execution Results" %}

{% for host in run.hosts %} {% endfor %}
{% trans "Name" %} {% trans "Start time" %} {% trans "End time" %} {% trans "Result" %} {% trans "Output" %} {% trans "Action" %}
{{host.name}} {{host.started|default:"--"}} {{host.ended|default:"--"}} {% if host.result == 0 %}Ok {% elif host.result == None %}-- {% else %}{{host.result}}{% endif %} {% if host.output and host.output != "None" and host.output != "b''" %}
{{host.output}}
{% else %} no output {% endif %}
{% csrf_token %}
{% endif %}
{% endblock %}