S allius/issue397 (#405)
* add Dashboards log handler to all known loggers * add list of last 3 warnings/errors to page * add note list to page * create LogHandler for the dashboard - simple memory log handler which stores the last 64 warnings/errors for the dashboard * render warnings/errors as note list * add page for warnings and errors * fix double defined build target * add well done message if no errors in the logs * translate page titles * more translations * add Notes page and table for important messages * add unit tests
This commit is contained in:
19
app/src/web/notes_list.py
Normal file
19
app/src/web/notes_list.py
Normal file
@@ -0,0 +1,19 @@
|
||||
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(),
|
||||
hide_if_empty=False)
|
||||
|
||||
return data
|
||||
Reference in New Issue
Block a user