blob: 17d8cb4cd0ef628fc05878f728c8c93cede7cfa1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
{% extends 'commands.html' %}
{% import "bootstrap/wtf.html" as wtf %}
{% set sidebar_state = 'disabled' %}
{% set btn_back = true %}
{% block nav_client %} active{% endblock %}
{% block nav_client_cache %} active{% endblock %}
{% block content %}
{% set ip_list = form.ips.data.split(' ') %}
{% set ip_count = ip_list | length %}
<h2 class="mx-5 subhead-heading">
{{ _('Manage Cache') }}
</h2>
<p>{{ _('Check free cache space in the client\'s bubbles:') }}</p>
{{ macros.cmd_selected_clients(selected_clients) }}
<p>{{ _('Select the images to be deleted:') }}</p>
{% if form.images|length > 0 %}
<form class="form-inline" method="POST" id="cacheForm">
<table class="table table-hover">
<thead class="thead-light">
<tr>
<th>{{ _('Image') }}</th>
<th>{{ _('Clients') }}</th>
</tr>
</thead>
<tbody data-target="cache-fieldset" id="cacheTable" class="text-left">
{{ form.hidden_tag() }}
{% for image in form.images %}
<tr data-toggle="fieldset-entry">
<td class="radio-container">
{{ image.selected(class_="form-control") }}
{{ image.image_name() }}
{{ image.clients() }}
<b>{{ image.image_name.data }} ({{ (images_data[image.selected.label.text]['size'] | int / 2**20)|round(3) }} MiB)</b>
<div>∘︎ Checksum: {{images_data[image.selected.label.text]['checksum']}}</div>
</td>
<td>
{% for ip in images_data[image.selected.label.text]['clients'] %}<div class="card d-inline-block" style="padding: 5px; margin: 3px;">{{ ip }}</div>{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<button class="btn btn-danger" form="cacheForm">
{{ _('Delete') }}
</button>
</form>
{% endif %}
{% include 'cache_inspector.html' %}
{% endblock %}
|