{% extends 'images.html' %}
{% import "bootstrap/wtf.html" as wtf %}

{% set sidebar_state = 'disabled' %}
{% set btn_back = true %}

{% block content %}

<h2 class="mx-5 subhead-heading">{{_('List images')}}</h2>
{% for server in servers %}
    {% for repo, images in server['repos'] %}
    <h4 class="mx-5">{{repo}}</h4>
        <table class="table table-hover mx-5">
        <thead class="thead-light">
            <tr>
                <th>Name</th>
                <th>Size (MiB)</th>
                <th>Datasize (MiB)</th>
                <th>Last update</th>
            </tr>
        </thead>
        <tbody class="text-left">
            {% for img in images %}
            <tr>
                <th>{{img['name']}}</th>
                <td>{{(img['size'] / 1024 ** 2) |round(2, 'floor')}}</td>
                <td>{{(img['datasize'] / 1024 ** 2) |round(2, 'floor')}}</td>
                <td>{{img['modified']}}</td>
            </tr>
            {% endfor %}
        </tbody>
        </table>
    {% endfor %}
{% endfor %}

{% endblock %}
