mirror of https://git.48k.eu/ogcp
templates: add efi data to /client/info
Show EFI info obtained through GET /efi.master
parent
fd4da7d3ed
commit
a1b164b106
|
@ -41,7 +41,12 @@
|
|||
{% set readonly_disk_inspector = True %}
|
||||
{% include 'disk_inspector.html' %}
|
||||
|
||||
<br>
|
||||
|
||||
{% include 'cache_inspector.html' %}
|
||||
|
||||
<br>
|
||||
|
||||
{% include 'efi_inspector.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
{% if efi_data is defined %}
|
||||
|
||||
{% if efi_data['entries']|length > 0 %}
|
||||
|
||||
<div class="form-group mx-5">
|
||||
<label class="control-label">{{ _('Boot entries') }}</label>
|
||||
<table class="table table-bordered">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>{{ _('Order') }}</th>
|
||||
<th>{{ _('Active') }}</th>
|
||||
<th>{{ _('Name') }}</th>
|
||||
<th>{{ _('Description') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entry_data in efi_data['entries'] %}
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
{% if entry_data['order'] is defined %}
|
||||
{{ entry_data['order'] }}
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
{% if entry_data['active'] == 1 %}
|
||||
{{ _('yes') }}
|
||||
{% else %}
|
||||
{{ _('no') }}
|
||||
{% endif %}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>{{ entry_data['name'] }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>{{ entry_data['description'] }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<div class="card text-center p-3">
|
||||
<b>{{ _('No EFI contents') }}</b>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
|
@ -1551,6 +1551,14 @@ def action_client_info():
|
|||
|
||||
get_cache_info(clients_info, storage_data, images_data, client_images)
|
||||
|
||||
r = server.get('/efi', payload={'clients': [ip]})
|
||||
if not r:
|
||||
return ogserver_down('commands')
|
||||
if r.status_code != requests.codes.ok:
|
||||
return ogserver_error('commands')
|
||||
|
||||
efi_data = r.json()['clients'][0]
|
||||
|
||||
scopes, clients = get_scopes(set(ips))
|
||||
|
||||
return render_template('actions/client_details.html', form=form,
|
||||
|
@ -1560,7 +1568,8 @@ def action_client_info():
|
|||
selected_disk=selected_disk,
|
||||
images_data=images_data,
|
||||
storage_data=storage_data,
|
||||
client_images=client_images)
|
||||
client_images=client_images,
|
||||
efi_data=efi_data)
|
||||
|
||||
@app.route('/action/client/update', methods=['GET', 'POST'])
|
||||
@login_required
|
||||
|
|
Loading…
Reference in New Issue