From 5ad5bc0a2faecbdffb6d8b78cf68be20d2da711c Mon Sep 17 00:00:00 2001 From: Stephan Porada Date: Wed, 18 Sep 2019 12:06:34 +0200 Subject: [PATCH] Add foreign admin views --- app/main/events.py | 3 ++ app/templates/admin/admin_user_page.html.j2 | 60 ++++++++++++++------- app/templates/base.html.j2 | 4 +- app/templates/main/dashboard.html.j2 | 2 +- 4 files changed, 47 insertions(+), 22 deletions(-) diff --git a/app/main/events.py b/app/main/events.py index c734799e..cae1ee32 100644 --- a/app/main/events.py +++ b/app/main/events.py @@ -24,6 +24,8 @@ def connect(): ' will be used for further information exchange generated by a background ' task associated with the sid. ''' + logger = logging.getLogger(__name__) + logger.warning('[connect] Session id is: {}.'.format(request.sid)) socketio.start_background_task(background_task, current_app._get_current_object(), current_user.id, @@ -43,6 +45,7 @@ def connect_admin(selected_user_id): ''' logger = logging.getLogger(__name__) logger.warning('Admin emitted "connect_admin".') + logger.warning('[connect_admin] Session id is: {}.'.format(request.sid)) logger.warning('Selected user id is: {}'.format(selected_user_id)) socketio.start_background_task(background_task_foreign, current_app._get_current_object(), diff --git a/app/templates/admin/admin_user_page.html.j2 b/app/templates/admin/admin_user_page.html.j2 index 8b13a6d4..6e148f0f 100644 --- a/app/templates/admin/admin_user_page.html.j2 +++ b/app/templates/admin/admin_user_page.html.j2 @@ -17,16 +17,28 @@
editEdit user + deleteDelete User + + +
-
-
+
@@ -47,7 +59,7 @@
-
-
-
- Administration actions - - deleteDelete User - -