<span class="mistral-wrapper detail-screen">
{% extends 'mistral/default/base.html' %}
{% load i18n %}
{% block title %}{% trans "Action Execution Details" %}{% endblock %}

{% block page_header %}
    <h1>
        {% trans "Action Execution Details" %}
    </h1>
{% endblock page_header %}

{% block main %}
    {% load i18n sizeformat %}

    <div class="detail">
        <h4>{% trans "Overview" %}</h4>
        <hr class="header_rule">
        <dl class="dl-horizontal">
            <dt>{% trans "Name" %}</dt>
            <dd>{{ action_execution.name }}</dd>
            <dt>{% trans "ID" %}</dt>
            <dd>{{ action_execution.id }}</dd>
            {% if action_execution.description %}
                <dt>{% trans "Description" %}</dt>
                <dd>{{ action_execution.description }}</dd>
            {% endif %}
            <div class="line-space">
                <dt>{% trans "State" %}</dt>
                <dd>{{ action_execution.state }}</dd>
            </div>
            {% if action_execution.state_info %}
                <dt>{% trans "State Info" %}</dt>
                <dd>{{ action_execution.state_info }}</dd>
            {% endif %}
            <dt>{% trans "Accepted" %}</dt>
            <dd>{{ action_execution.accepted }}</dd>
            <dt>{% trans "Tags" %}</dt>
            <dd>{{ action_execution.tags }}</dd>
            <br/>
            <dt>{% trans "Creation Date" %}</dt>
            <dd>{{ action_execution.created_at|parse_isotime}}</dd>
            <dt>{% trans "Time Since Created" %}</dt>
            <dd>{{ action_execution.created_at|parse_isotime|timesince }}</dd>
            <br/>
            <dt>{% trans "Update Date" %}</dt>
            <dd>{{ action_execution.updated_at|parse_isotime}}</dd>
            <dt>{% trans "Time Since Updated" %}</dt>
            <dd>{{ action_execution.updated_at|parse_isotime|timesince }}</dd>
            <br/>
            <dt>{% trans "Input" %}</dt>
            <dd>{{ action_execution.input }}</dd>
            <dt>{% trans "Output" %}</dt>
            <dd>{{ action_execution.output }}</dd>
        </dl>
    </div>

    {% if action_execution.workflow_url %}
        <div class="detail">
            <h4>{% trans "Workflow" %}</h4>
            <hr class="header_rule">
            <dl class="dl-horizontal">
                <dt>{% trans "Name" %}</dt>
                <dd>
                    <a href="{{ action_execution.workflow_url }}"
                       title="{{action_execution.workflow_name}} {% trans "overview" %}">
                        {{ action_execution.workflow_name }}
                    </a>
                </dd>
            </dl>
        </div>
    {% endif %}
    {% if action_execution.task_execution_url %}
        <div class="detail">
            <h4>{% trans "Task Execution" %}</h4>
            <hr class="header_rule">
            <dl class="dl-horizontal">
                <dt>{% trans "Name" %}</dt>
                <dd>
                    <a href="{{ action_execution.task_execution_url }}"
                       title="{{action_execution.task_name}} {% trans "overview" %}">
                        {{ action_execution.task_name }}
                    </a>
                </dd>
                <dt>{% trans "ID" %}</dt>
                <dd>
                    <a href="{{ action_execution.task_execution_url }}"
                       title="{{ action_execution.task_execution_id }} {% trans "overview" %}">
                        {{ action_execution.task_execution_id }}
                    </a>
                </dd>
            </dl>
        </div>
    {% endif %}

{% endblock %}
</span>
