modified: web/blueprints/site_admin.py
This commit is contained in:
@@ -27,10 +27,15 @@ def admin_required(f):
|
|||||||
def dashboard():
|
def dashboard():
|
||||||
groups = db.list_all_groups()
|
groups = db.list_all_groups()
|
||||||
users = db.list_all_users()
|
users = db.list_all_users()
|
||||||
# Für jede Gruppe DB-Status prüfen
|
|
||||||
for g in groups:
|
for g in groups:
|
||||||
g["has_db"] = db.has_db_configured(g["id"])
|
g["has_db"] = db.has_db_configured(g["id"])
|
||||||
return render_template("admin/dashboard.html", groups=groups, users=users)
|
stats = {
|
||||||
|
"group_count": len(groups),
|
||||||
|
"user_count": len(users),
|
||||||
|
"db_configured": sum(1 for g in groups if g["has_db"]),
|
||||||
|
"admin_count": sum(1 for u in users if u.get("is_site_admin")),
|
||||||
|
}
|
||||||
|
return render_template("admin/dashboard.html", groups=groups, users=users, stats=stats)
|
||||||
|
|
||||||
|
|
||||||
# ──────────────────────────────────────────────────────────────
|
# ──────────────────────────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user