Source

tinpan / templates / integration / project.html

{% extends 'base.html' %}


{% block title %}{{ project.name }} - {% endblock title %}

{% block header %}
    /
    <a href="{% url project_detail slug=project.slug %}">{{ project.name }}</a>
{% endblock header %}

{% block content %}
    <ul class="info-list">
        <li><span class="info-label">Test Bed:</span><code>{{ project.test_bed }}</code></li>
        <li><span class="info-label">Test Command:</span><code>{{ project.command }}</code></li>
    </ul>
    
    {% if not project.last_build or project.last_build.end_time %}
        <form method="post" action="{% url run_build slug=project.slug %}">
            <p><input type="submit" value="Start a build" /></p>
            <input type="hidden" name="run" value="run" />
        </form>
    {% else %}
        {% if project.last_build %}
            <p><a href="{{ project.last_build.get_absolute_url }}">A build</a> is currently running (it started {{ project.last_build.start_time|timesince }} ago).  Wait for it to finish before you start another one!</p>
        {% endif %}
    {% endif %}
    
    <h2>All Builds</h2>
    {% for run in project.buildrun_set.all %}
        <p class="project-run {% if forloop.last %}last{% endif %}">
            <a href="{% url build_detail slug=project.slug,id=run.id %}">A build of {{ project.name }}</a>
            {% if run.end_time %}
                finished {{ run.end_time|timesince }} ago and
                {% if run.success %}
                    succeeded.
                {% else %}
                    <span class="build-failure">failed!</span>
                {% endif %}
            {% else %}
                is currently running (started {{ run.start_time|timesince }} ago)...
            {% endif %}
        </p>
    {% empty %}
        <p class="empty-page">This project has never been built.</p>
    {% endfor %}
{% endblock content %}