summaryrefslogtreecommitdiff
path: root/jimbrella
diff options
context:
space:
mode:
Diffstat (limited to 'jimbrella')
-rw-r--r--jimbrella/admin.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/jimbrella/admin.py b/jimbrella/admin.py
index 04a3f88..9a9f6c8 100644
--- a/jimbrella/admin.py
+++ b/jimbrella/admin.py
@@ -1,6 +1,7 @@
from flask import Blueprint, request, session, render_template, redirect, url_for, abort
from user_agents import parse as user_agent
from .database import Database
+from .admin_log import AdminLog
from .users import Users
from .exceptions import *
from .config import *
@@ -8,6 +9,7 @@ from .config import *
bp = Blueprint("admin", __name__, url_prefix="/admin")
db = Database(DATABASE_PATH)
users = Users(USERS_PATH)
+admin_log = AdminLog(ADMIN_LOG_PATH)
@bp.before_request
@@ -84,3 +86,9 @@ def umbrellas_edit():
pass # impossible on web console
return redirect(url_for("admin.umbrellas"))
+
+
+@bp.route("/logs")
+def logs():
+ logs = admin_log.read()
+ return render_template("admin/logs.html", logs=logs)