From 51f3f8b96fbb4271f66d5d2e6ad3d6bf74903d72 Mon Sep 17 00:00:00 2001 From: Joshua Laymon Date: Sun, 31 Aug 2025 13:04:19 +0000 Subject: [PATCH] Add web/templates/tools/audit_log.html --- web/templates/tools/audit_log.html | 108 +++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 web/templates/tools/audit_log.html diff --git a/web/templates/tools/audit_log.html b/web/templates/tools/audit_log.html new file mode 100644 index 0000000..2665b40 --- /dev/null +++ b/web/templates/tools/audit_log.html @@ -0,0 +1,108 @@ +{% extends "base.html" %} +{% block title %}Audit Log (latest 100){% endblock %} +{% block body_class %}themed-bg{% endblock %} + +{% block content %} +
+

Security · Audit Log (latest 100)

+ +
+
+ + + + + + + + + + + {% for r in rows %} + + + + + + + {% empty %} + + {% endfor %} + +
Date / TimeEntryAction & ChangesUser
{{ r.timestamp|date:"Y-m-d H:i:s" }} + {% if r.action == "delete" %} + #{{ r.entry_id }} + {% else %} + #{{ r.entry_id }} + {% endif %} + + {% if r.action == "create" %} + Created + {% elif r.action == "update" %} + Updated + {% else %} + Deleted + {% endif %} + + {% if r.action == "update" and r.changes %} +
    + {% for field, pair in r.changes.items %} +
  • + {{ field }}: + {{ pair.0 }} + + {{ pair.1 }} +
  • + {% endfor %} +
+ {% elif r.action == "create" and r.changes.__created__ %} +
+ Show created fields +
    + {% for k, v in r.changes.__created__.items %} +
  • {{ k }}: {{ v }}
  • + {% endfor %} +
+
+ {% elif r.action == "delete" and r.changes.__deleted__ %} +
+ Deleted record snapshot +
    + {% for k, v in r.changes.__deleted__.items %} +
  • {{ k }}: {{ v }}
  • + {% endfor %} +
+
+ {% endif %} +
{{ r.username|default:"—" }}
No audit entries yet.
+
+
+
+ + +{% endblock %} \ No newline at end of file