Coverage for seedboxsync/front/views/admin/logs.py: 75%

8 statements  

« prev     ^ index     » next       coverage.py v7.17.0, created at 2026-10-31 17:10 +0000

1# 

2# Copyright (C) 2015-2026 Guillaume Kulakowski <guillaume@kulakowski.fr> 

3# 

4# For the full copyright and license information, please view the LICENSE 

5# file that was distributed with this source code. 

6# 

7"""SeedboxSync Flask view for info.""" 

8 

9from flask import render_template 

10from seedboxsync.front.login_manager import admin_required 

11from seedboxsync.front.views import bp_admin as bp 

12 

13 

14@bp.route("/logs") 

15@admin_required 

16def logs() -> str: 

17 """ 

18 Render the system information view. 

19 

20 Gathers download metrics, system task statuses, database versioning, 

21 and application runtime statistics (cached for 60 seconds). 

22 

23 Returns: 

24 str: Rendered HTML template containing overall application information. 

25 """ 

26 LEVELS = ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] 

27 return render_template("admin/logs.html", levels=LEVELS)