diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2021-06-16 10:30:39 +0000 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2021-06-17 09:58:11 +0200 |
commit | 3667db8662c1ee2ae058627447c4eda1898621ab (patch) | |
tree | 337bfc1c453db27b780a4c352898bd5763b7c06b /ogcp/views.py | |
parent | 514fb84a565e8bc9eb550164d545fa72d77c2b38 (diff) |
Add commands view and macros.html
Commands view has a scope sidebar with the content block filled with
command buttons (poweroff, wol, etc.)
This commit leaves scope create/delete/update buttons in the /scopes
view, which serves that purpose.
To avoid duplicating scope tree creation macro, an external macros.html
is created, this template can be imported. Future macros needed can be
written in there.
Diffstat (limited to 'ogcp/views.py')
-rw-r--r-- | ogcp/views.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py index bb9eaeb..3e7c4e4 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -711,3 +711,9 @@ def action_room_delete(): for room in rooms] form.room.choices = list(rooms) return render_template('actions/delete_room.html', form=form) + +@app.route('/commands/', methods=['GET']) +@login_required +def commands(): + scopes, clients = get_scopes() + return render_template('commands.html', scopes=scopes, clients=clients) |