summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-05-05 17:33:44 +0200
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-05-11 17:37:00 +0200
commit08cae4b6caf164f3e7fd5609fec5d37158ea6330 (patch)
treefaa2d8dfcfddc4e93c9b0c664ec08f34685b3b59 /ogcp/views.py
parentce651453c420527208d2c7a26a9634de59b09a1e (diff)
Add link speed to pills
If the clients API response include link speed information, show it in clients' pills.
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index aae889f..2d995fd 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -139,6 +139,7 @@ def add_state_and_ips(scope, clients, ips):
client = next(filtered_client, False)
if client:
scope['state'] = client['state']
+ scope['link'] = client.get('speed')
else:
scope['state'] = 'off'
scope['ip'] = [scope['ip']]