summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-09-09 09:54:06 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-09-10 15:11:11 +0200
commita1b164b1062eb7ba6b724ebe84d8d7e0b308e234 (patch)
treec0f3c689fdbf036b77952356062c31f84435f532 /ogcp/views.py
parentfd4da7d3edbc60c2575d4f3485128b09630beb75 (diff)
templates: add efi data to /client/info
Show EFI info obtained through GET /efi.
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index af0f3fa..77bad42 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -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