{% extends "base.html" %}

{% block content %}

<nav aria-label="breadcrumb">
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="{% url 'grafana:org-list' %}">Organizations</a></li>
        <li class="breadcrumb-item active" aria-current="page"><a href="{% url 'grafana:org-detail' object.pk %}">{{object.name}}</a></li>
        <li class="breadcrumb-item active" aria-current="page">Versions</li>
    </ol>
</nav>

<table class="table table-bordered">
    <tr>
        <th>Dashboard</th>
        <th>View</th>
        <th>Revision</th>
        <th>Created</th>
        <th>Created By</th>
        <th>Message</th>
    </tr>
    {% for version in object_list %}
    <tr>
        <td><a href="{% url 'grafana:dash-detail' version.dashboard.pk %}">{{ version.dashboard.title }}</a></td>
        <td><a href="{{version.dashboard.get_public_link}}">View on Grafana</a></td>
        <td><a href="{{version.get_absolute_url}}">{{version.version}}</a></td>
        <td>{{version.created}}</td>
        <td>{{version.created_by.login}}</td>
        <td>{{version.message}}</td>
    </tr>
    {% endfor %}
</table>

{% endblock %}
