diff --git a/static/js/highlight.log.js b/static/js/highlight.log.js new file mode 100644 index 0000000..66809d6 --- /dev/null +++ b/static/js/highlight.log.js @@ -0,0 +1,12 @@ +// static/js/highlight.log.js +hljs.registerLanguage('log', function(hljs) { + return { + contains: [ + { className: 'timestamp', begin: /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/, relevance: 10 }, + { className: 'level', begin: /\| (INFO|WARNING|ERROR|DEBUG|CRITICAL) +\|/, relevance: 10 }, + { className: 'traceback', begin: /Traceback/, end: /$/, contains: [hljs.BACKSLASH_ESCAPE] }, + hljs.QUOTE_STRING_MODE, + hljs.NUMBER_MODE + ] + }; +}); \ No newline at end of file diff --git a/templates/admin_logs.html b/templates/admin_logs.html index ae92e4a..2ebf8e0 100644 --- a/templates/admin_logs.html +++ b/templates/admin_logs.html @@ -15,12 +15,37 @@ {% endfor %} - + + +
+
+{{ logs | safe }}
+
+
+
+
Zurück zum Admin
diff --git a/templates/base.html b/templates/base.html
index 9b04dd8..b7d47cd 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -14,6 +14,7 @@
+