{% extends "ereuse_devicehub/base_site.html" %}
{% block main %}

<div class="pagetitle">
  <h1>Inventory</h1>
  <nav>
    <ol class="breadcrumb">
      <li class="breadcrumb-item"><a href="{{ url_for('inventory.devicelist')}}">Inventory</a></li>
      <li class="breadcrumb-item active">{{ page_title }}</li>
    </ol>
  </nav>
</div><!-- End Page Title -->

<section class="section profile">
  <div class="row">

    <div class="col-xl-12">

      <div class="card">
        <div class="card-body pt-3">
          <h3>{{ snapshot_sid }} | {{ snapshot_uuid }}</h3>
          <!-- Bordered Tabs -->
          <div class="tab-content pt-2">

            <div class="tab-pane fade show active">
              <h5 class="card-title">Traceability log Details</h5>
              <div class="list-group col-6">
                {% for log in snapshots_log %}
                <div class="list-group-item">
                  <div class="d-flex w-100 justify-content-between">
                    <h5 class="mb-1">{{ log.get_status() }}</h5>
                    <small class="text-muted">{{ log.created.strftime('%H:%M %d-%m-%Y') }}</small>
                  </div>
                  <p class="mb-1">
                    Device:
                    {{ log.get_device() }}<br />
                    Version: {{ log.version }}<br />
                  </p>
                  <p>
                    <small class="text-muted">
                      {{ log.description }}
                    </small>
                  </p>
                </div>
                {% endfor %}
              </div>
            </div>

        </div>
      </div>
    </div>
  </div>
</section>
{% endblock main %}
