From 94978f13409d217bb59d896d195df6ddb0bbc1f6 Mon Sep 17 00:00:00 2001 From: "stone-24tch3r (aider)" <100294019+stone-w4tch3r@users.noreply.github.com> Date: Fri, 27 Sep 2024 01:44:46 +0500 Subject: [PATCH] refactor: Refactor logs.html.j2 to support template rendering and extract log items --- front/templates/logs.html.j2 | 68 ++++++++++-------------------------- 1 file changed, 19 insertions(+), 49 deletions(-) diff --git a/front/templates/logs.html.j2 b/front/templates/logs.html.j2 index 53362c4..8ee7800 100644 --- a/front/templates/logs.html.j2 +++ b/front/templates/logs.html.j2 @@ -7,39 +7,29 @@ {% block content %}
Severity: + {% for severity in ['INFO', 'WARN', 'DEBUG', 'ERROR'] %} - - - + {% endfor %}
- + @@ -51,41 +41,21 @@ + {% for log in logs %} - - - - + + + + - - - - - - - - - - - - - - - - - - - - - + {% endfor %}
000022023-08-17 10:15INFOabc123{{ log.entry_id }}{{ log.timestamp }}{{ log.severity }}{{ log.trace_id }} - Generating new cert
- $ step ca certificate ...
+ {{ log.message | safe }}
000032023-08-17 10:14WARNdef456Cert not exists
000042023-08-17 10:13DEBUGdef456Request revoke
000052023-08-17 10:12ERRORghi789Permission denied
{% endblock %} {% block bottom_button %} - + {% endblock %}