MediaDash/templates/containers/index.html

58 lines
No EOL
1.9 KiB
HTML

{% extends "base.html" %}
{% from "utils.html" import make_tabs %}
{% macro container_row(info) %}
<div class="row">
<div class="col">
Image
</div>
<div class="col">
<a href="{{urljoin('https://hub.docker.com/r/',info.Image)}}">{{info.Image}}</a>
</div>
<div class="col">
Status
</div>
<div class="col">
{{info.Status}}
</div>
</div>
<div class="row">
<div class="col">
Id: <a href="{{'{}#/containers/{}'.format(config.APP_CONFIG.portainer_url,info.Id)}}">{{info.Id}}</a>
</div>
</div>
<div class="row">
<pre>{{info|tojson(indent=4)}}</pre>
</div>
{% endmacro %}
{% block app_content %}
<h1>
<a href="{{config.APP_CONFIG.portainer_url}}">Portainer</a>
</h1>
<table class="table table-sm table-bordered">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Image</th>
<th scope="col">Status</th>
</tr>
</thead>
{% for container in containers %}
{% set label = container.Labels["com.docker.compose.service"] %}
<tr>
<td>
<a href="{{url_for('containers.details',container_id=container.Id)}}">
{{container.Labels["com.docker.compose.project"]}}/{{container.Labels["com.docker.compose.service"]}}
</a>
</td>
<td>
<a href="{{urljoin('https://hub.docker.com/r/',container.Image)}}">{{container.Image}}</a>
</td>
<td>
{{container.Status}}
</td>
</tr>
{% endfor %}
</table>
{% endblock %}