{% extends "apps/base.html" %}
{% load staticfiles %}
{% load filters_deploys %}

{% block extra_css %}
{{ block.super }}
<link rel="stylesheet" href="{% static "css/abyss.widget.css" %}">
<link rel="stylesheet" href="{% static "css/detail.css" %}">
<link rel="stylesheet" href="{% static "css/deploy-diff.css" %}">
{% endblock %}

{% block navbar %}
{% include "apps/navbar.html" with active="deploys" %}
{% endblock %}

{% block app-content %}
<div class="row">
  <div class="col-md-12">
    <h3>Info</h3>
    <div class="content">
      <p><strong>App:</strong> <a href="{% url 'app-info' deploy.App %}">{{ deploy.App }}</a></p>
      <p><strong>User:</strong> {{ deploy.User }}</p>
      <p><strong>Duration:</strong> {{ deploy.Duration|time_to_string }}</p>
      <p><strong>Timestamp:</strong> {{ deploy.Timestamp|string_to_date|date:" d-m-Y H:i:s " }}</p>
      {% if deploy.Commit %}<p><strong>Last Commit:</strong> {{ deploy.Commit }}</p>{% endif %}
      {% if deploy.Error %}<p><strong>Error:</strong> {{ deploy.Error }}</p>{% endif %}
      {% if deploy.Diff %}
      <p><strong>Diff:</strong></p>{{ deploy.Diff|safe }}
      {% endif %}
      <p><strong>Log:</strong></p>
      <div>
        <pre>{{ deploy.Log|escape }}</pre>
      </div>
    </div>
  </div>
</div>
{% endblock %}
