diff options
Diffstat (limited to 'ogcp/views.py')
-rw-r--r-- | ogcp/views.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ogcp/views.py b/ogcp/views.py index 1221478..ad5a8cb 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -113,7 +113,7 @@ def add_state_and_ips(scope, clients, ips): if client: scope['state'] = client['state'] else: - scope['state'] = 'OFF' + scope['state'] = 'off' scope['ip'] = [scope['ip']] scope['selected'] = set(scope['ip']).issubset(ips) else: @@ -191,6 +191,12 @@ def logout(): logout_user() return redirect(url_for('index')) +@app.route('/scopes/status') +@login_required +def scopes_status(): + scopes, _clients = get_scopes() + return jsonify(scopes) + @app.route('/scopes/') @login_required def scopes(): |