summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-05-11 17:32:10 +0200
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-05-13 11:34:44 +0200
commit4c6e3a90f10e90ad888f32738a408cadedb28aa3 (patch)
tree81cdcf2d9be4cad180578bb3c1ccc9321ba91292 /ogcp/views.py
parent08cae4b6caf164f3e7fd5609fec5d37158ea6330 (diff)
Show last command result for clients in ogLive
If the last command sent to a client/s finishes with errors, their icons in the scopes tree change to a yellow circle with an times sign inside.
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index 2d995fd..36bd216 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -140,6 +140,8 @@ def add_state_and_ips(scope, clients, ips):
if client:
scope['state'] = client['state']
scope['link'] = client.get('speed')
+ scope['last_cmd'] = {}
+ scope['last_cmd']['result'] = client.get('last_cmd').get('result')
else:
scope['state'] = 'off'
scope['ip'] = [scope['ip']]