summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/actions/select_client.html
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-08-29 11:55:52 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-09-02 15:05:45 +0200
commitd00e437b8d76bc32732643a92f0ea32fbe0b7901 (patch)
treecf8998b06022b7ca8e29eedb74c0a32b1ecea6b5 /ogcp/templates/actions/select_client.html
parent78a26f947fba1af6b339567cb58e0f852d253137 (diff)
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.
Diffstat (limited to 'ogcp/templates/actions/select_client.html')
-rw-r--r--ogcp/templates/actions/select_client.html42
1 files changed, 42 insertions, 0 deletions
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 %}
+
+<div class="form-group mx-5">
+ <label class="control-label">{{ _('Disk inventory') }}</label>
+ <table class="table table-bordered">
+ <thead class="thead-light">
+ <tr>
+ <th>{{ _('Disk') }}</th>
+ <th>{{ _('Size (MiB)') }}</th>
+ <th>{{ _('Clients') }}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for disk, data in common_disk_data.items() %}
+ {% for size, ips in data.inventory.items() %}
+ <tr>
+ {% if loop.first %}
+ <td rowspan="{{ data.inventory | length }}">{{ disk }}</td>
+ {% endif %}
+ <td>
+ {% if size == data.common_size %}
+ <strong>{{ size // 1024 }}</strong>
+ {% else %}
+ {{ size // 1024 }}
+ {% endif %}
+ </td>
+ <td>
+ {% for ip in ips %}
+ <div class="card d-inline-block" style="padding: 5px;">{{ ip }}</div>
+ {% endfor %}
+ </td>
+ </tr>
+ {% endfor %}
+
+ {% endfor %}
+ </tbody>
+ </table>
+ <p>{{ _('Note: the disk size in bold represents the selected common size for partitioning') }}</p>
+</div>
+
+{% endif %}
+
{{ wtf.quick_form(form,
action=url_for('action_setup_show'),
method='get',