04/30 Web Checker web app ver. 1.0

This commit is contained in:
2026-04-30 17:15:56 -04:00
parent feb8e5051c
commit cd63d5a020
39 changed files with 8031 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
"""
routes/admin_dashboard.py — Admin dashboard: today's completion stats.
"""
import logging
from flask import Blueprint, render_template
from models import get_admin_dashboard_stats
from utils.decorators import admin_required
logger = logging.getLogger("routes.admin_dashboard")
admin_dashboard_bp = Blueprint("admin_dashboard", __name__, url_prefix="/admin")
@admin_dashboard_bp.route("/dashboard")
@admin_required
def dashboard():
try:
stats = get_admin_dashboard_stats()
except Exception as e:
logger.error(f"Dashboard stats error: {e}")
stats = {"user_stats": [], "total_sites": 0, "total_users": 0, "active_today": 0}
return render_template("admin/dashboard.html", stats=stats)