Files
docker_flask/templates/images.html

61 lines
1.9 KiB
HTML

{% extends "layout.html" %}
{% block body %}
<h1><a href="/">Dashboard</a> &raquo; {{ client_name }} &raquo; <a href="/{{ client_name }}/images">Images</a></h1>
<a class="button--link" href="/{{ client_name }}/images/dangling">Dangling Images</a>
<a class="button--link" href="/{{ client_name }}/images/all">All Images</a>
<input type="text" class="search_table" placeholder="search">
<table>
<thead>
<tr>
<th>REPOSITORY</th>
<th>TAG</th>
<th>IMAGE ID</th>
<th>CREATED</th>
<th>SIZE</th>
</tr>
</thead>
<tbody>
{% for image in images %}
<tr>
<td>
{% if image.attrs['RepoTags']|length > 0 %}
<a href="{{ url_for('image_action', client_name=client_name, image_id=image.attrs['Id'][7:]) }}">{{ image.attrs['RepoTags'][0].split(':')[0] }} </a>
{% endif %}
</td>
<td>
{% if image.attrs['RepoTags']|length > 0 %}
{{ image.attrs['RepoTags'][0].split(':')[1] }}
{% endif %}
</td>
<td>{{ image.attrs['Id'][7:] }}</td>
<td>{{ image.attrs['Created'][0:19] }}</td>
<td>{{ image.attrs['Size']|file_size }}</td>
<td>
{% if image.attrs['RepoTags']|length %}
<a href="{{ url_for('export_image_action', client_name=client_name, image_tag=image.attrs['RepoTags'][0]|encode64 )}}">export</a>
<a href="{{ url_for('remove_image_action', client_name=client_name, image_tag=image.attrs['RepoTags'][0]|encode64 )}}">remove</a>
{% else %}
<a href="{{ url_for('remove_imageby_id_action', client_name=client_name, image_id=image.attrs['Id'][7:] )}}">remove</a>
{% endif %}
</td>
</tr>
{% else %}
<tr>
<td colspan="9">
no images
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}