add page for warnings and errors

This commit is contained in:
Stefan Allius
2025-05-04 16:06:52 +02:00
parent 298b72bbc9
commit c6822fd309
4 changed files with 36 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
from quart import render_template
from quart_babel import format_datetime
from . import web
from .log_handler import LogHandler
@web.route('/notes-fetch')
async def notes_fetch():
data = {
"update-time": format_datetime(format="medium"),
}
data["notes-list"] = await render_template(
'templ_notes_list.html.j2',
notes=LogHandler().get_buffer())
return data

View File

@@ -18,6 +18,13 @@ async def mqtt():
fetch_url=url_for('.mqtt_fetch'))
@web.route('/notes')
async def notes():
return await render_template(
'page_notes.html.j2',
fetch_url=url_for('.notes_fetch'))
@web.route('/logging')
async def logging():
return await render_template(

View File

@@ -1,7 +1,7 @@
{% extends 'base.html.j2' %}
{% block title %} TSUN Proxy - Log Files {% endblock title%}
{% block menu3_class %}w3-blue{% endblock %}
{% block menu4_class %}w3-blue{% endblock %}
{% block headline %}<i class="fa fa-file-export fa-fw"></i>  {{_('Log Files')}}{% endblock headline %}
{% block content %}
<div id="id01" class="w3-modal">

View File

@@ -0,0 +1,10 @@
{% extends 'base.html.j2' %}
{% block title %} TSUN Proxy - Warnings, Errors {% endblock title%}
{% block menu3_class %}w3-blue{% endblock %}
{% block headline %}<i class="fa fa-exclamation-triangle fa-fw"></i>  {{_('Warnings, Errors')}}{% endblock headline %}
{% block content %}
<div id="notes-list"></div>
{% endblock content%}
{% block footer %}{% endblock footer %}