From d00e437b8d76bc32732643a92f0ea32fbe0b7901 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Thu, 29 Aug 2024 11:55:52 +0200 Subject: ogcp: add support for multi-disk partition and format Add support for selecting different disks in the disk inspector. Add disk_inspector.html as a template to show the disk contents of a client. The view can define the variable readonly_disk_inspector to make the view non editable. Use disk_inspector.html in the following views: - client details - partition and format Update code to obtain the partitions of a client to better fit the requirements of disk_inspector.html Remove code to setup the SetupForm as the contents of the disks are now dynamically loaded through javascript. --- ogcp/templates/actions/select_client.html | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'ogcp/templates/actions/select_client.html') diff --git a/ogcp/templates/actions/select_client.html b/ogcp/templates/actions/select_client.html index 0415621..a44c551 100644 --- a/ogcp/templates/actions/select_client.html +++ b/ogcp/templates/actions/select_client.html @@ -17,6 +17,48 @@ {{ macros.cmd_selected_clients(selected_clients) }} +{% if common_disk_data|length > 0 %} + +
+ + + + + + + + + + + {% for disk, data in common_disk_data.items() %} + {% for size, ips in data.inventory.items() %} + + {% if loop.first %} + + {% endif %} + + + + {% endfor %} + + {% endfor %} + +
{{ _('Disk') }}{{ _('Size (MiB)') }}{{ _('Clients') }}
{{ disk }} + {% if size == data.common_size %} + {{ size // 1024 }} + {% else %} + {{ size // 1024 }} + {% endif %} + + {% for ip in ips %} +
{{ ip }}
+ {% endfor %} +
+

{{ _('Note: the disk size in bold represents the selected common size for partitioning') }}

+
+ +{% endif %} + {{ wtf.quick_form(form, action=url_for('action_setup_show'), method='get', -- cgit v1.2.3-18-g5258