diff options
Diffstat (limited to 'ogcp')
-rw-r--r-- | ogcp/views.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ogcp/views.py b/ogcp/views.py index c414af3..c00098f 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -838,9 +838,14 @@ def action_session(): form.ips.data = ' '.join(ips) r = server.get('/session', payload={'client': list(ips)}) sessions = r.json()['sessions'] + if not sessions: + flash(_('ogServer returned an empty session list'), + category='error') + return redirect(url_for('commands')) + for os in sessions: choice = (f"{os['disk']} {os['partition']}", - f"{os['name']} ({os['disk']},{os['partition']})") + f"OS: {os['name']} (Disk:{os['disk']}, Partition:{os['partition']})") form.os.choices.append(choice) scopes, clients = get_scopes(set(ips)) selected_clients = list(get_selected_clients(scopes['scope']).items()) |