add page for warnings and errors
This commit is contained in:
18
app/src/web/notes_table.py
Normal file
18
app/src/web/notes_table.py
Normal 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
|
||||||
@@ -18,6 +18,13 @@ async def mqtt():
|
|||||||
fetch_url=url_for('.mqtt_fetch'))
|
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')
|
@web.route('/logging')
|
||||||
async def logging():
|
async def logging():
|
||||||
return await render_template(
|
return await render_template(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends 'base.html.j2' %}
|
{% extends 'base.html.j2' %}
|
||||||
|
|
||||||
{% block title %} TSUN Proxy - Log Files {% endblock title%}
|
{% 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 headline %}<i class="fa fa-file-export fa-fw"></i> {{_('Log Files')}}{% endblock headline %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="id01" class="w3-modal">
|
<div id="id01" class="w3-modal">
|
||||||
|
|||||||
10
app/src/web/templates/page_notes.html.j2
Normal file
10
app/src/web/templates/page_notes.html.j2
Normal 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 %}
|
||||||
Reference in New Issue
Block a user