summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/commands.html
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-05-16 12:38:28 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-05-30 15:50:32 +0200
commit9cb3a952b4ceb3c33e8481250179023fdf5ceebb (patch)
tree6d590a2b18869a20370ae4513cbd4ad4559fb603 /ogcp/templates/commands.html
parentf896107375cc2a47a5c4eb3095c6c365d8eed98e (diff)
ogcp: add cache management page
Implement cache management through cache/list and cache/delete API REST methods. The view corresponds to the URL action/cache and contains three main parts: - Free cache available in the client's bubbles. - Image selection form to request the deletion and view the client with that image in cache. - Cache details per client to see total, used and available cache. The main usecase for the view is the removal of cache to make room for new images in clients with slow connections. Checking clients where available cache space is not enough to hold the new image and then requesting removal of specific images. The html template receives the following structures from the view: storage_data[ip] = {'used': 223452345, 'total': 2345234523452} client_images[ip] = [f'{image_name}.{image_checksum}', ...] image_data[f'{image_name}.{image_checksum}'] = { clients: ['192.168.0.1', ...], size: 34534530850, name: image_name, }
Diffstat (limited to 'ogcp/templates/commands.html')
-rw-r--r--ogcp/templates/commands.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/ogcp/templates/commands.html b/ogcp/templates/commands.html
index 92a1284..316eb8f 100644
--- a/ogcp/templates/commands.html
+++ b/ogcp/templates/commands.html
@@ -28,6 +28,8 @@
form="scopesForm" formaction="{{ url_for('action_session') }}" formmethod="get">
<input class="btn btn-light dropdown-item{% block nav_client_details %}{% endblock %}" type="submit" value="{{ _('Client details') }}"
form="scopesForm" formaction="{{ url_for('action_client_info') }}" formmethod="get">
+ <input class="btn btn-light dropdown-item{% block nav_client_cache %}{% endblock %}" type="submit" value="{{ _('Manage cache') }}"
+ form="scopesForm" formaction="{{ url_for('action_client_cache') }}" formmethod="get">
</div>
</div>