summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2021-12-17 13:14:46 +0100
committerJavier Sánchez Parra <jsanchez@soleta.eu>2021-12-17 13:24:00 +0100
commitd12b401d304f0fbc57289ecf601e1a39aab6e624 (patch)
treea6759374e0e30e97830022f1e2defb6fb5713c95 /ogcp/views.py
parente07c8afcce3f16739bbf9e8c52405f327f367977 (diff)
Add available ogLives to client details
Otherwise, ogLive field always shows the default value.
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index 4f29f2f..c05511b 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -559,6 +559,12 @@ def action_client_info():
form.room.data = db_client['room']
form.boot.data = db_client['boot']
+ r = g.server.get('/oglive/list')
+ available_oglives = r.json()['oglive']
+ for oglive in available_oglives:
+ choice = (oglive.get('directory'), oglive.get('directory'))
+ form.livedir.choices.append(choice)
+
r = g.server.get('/mode')
available_modes = [(mode, mode) for mode in r.json()['modes']]
form.boot.choices = list(available_modes)