modified: web/app.py
modified: web/blueprints/auth.py modified: web/blueprints/group_admin.py modified: web/blueprints/panel.py modified: web/blueprints/site_admin.py modified: web/config.py new file: web/templates/404.html modified: web/templates/admin/base.html modified: web/templates/admin/group_edit.html modified: web/templates/admin/group_members.html modified: web/templates/admin/groups.html modified: web/templates/admin/user_edit.html modified: web/templates/admin/users.html modified: web/templates/auth/admin_login.html modified: web/templates/auth/login.html modified: web/templates/base.html modified: web/templates/group_admin/base.html modified: web/templates/group_admin/database.html modified: web/templates/group_admin/member_edit.html modified: web/templates/group_admin/members.html modified: web/templates/login.html modified: web/templates/panel/dashboard.html
This commit is contained in:
@@ -118,7 +118,7 @@ def dashboard():
|
||||
"proxy_events_today": query("SELECT COUNT(*) AS c FROM proxy_events WHERE timestamp >= CURDATE()", fetchone=True)["c"],
|
||||
}
|
||||
online = query("""
|
||||
SELECT p.username, ps.server_name, ps.login_time
|
||||
SELECT p.uuid AS player_uuid, p.username AS player_name, ps.server_name, ps.login_time
|
||||
FROM player_sessions ps
|
||||
JOIN players p ON p.uuid = ps.player_uuid
|
||||
WHERE ps.logout_time IS NULL
|
||||
@@ -148,8 +148,9 @@ def dashboard():
|
||||
recent = query("""
|
||||
SELECT * FROM v_recent_activity LIMIT 50
|
||||
""")
|
||||
except Exception as e:
|
||||
flash(f"Database error: {e}", "danger")
|
||||
except Exception:
|
||||
panel.logger.exception("Database error while rendering dashboard")
|
||||
flash("Database query failed. Please contact an administrator.", "danger")
|
||||
return render_template("panel/no_db.html")
|
||||
|
||||
return render_template("panel/dashboard.html",
|
||||
@@ -405,7 +406,7 @@ def perms():
|
||||
@login_required
|
||||
def api_online():
|
||||
rows = query("""
|
||||
SELECT p.username, ps.server_name, ps.login_time
|
||||
SELECT p.uuid AS player_uuid, p.username AS player_name, ps.server_name, ps.login_time
|
||||
FROM player_sessions ps
|
||||
JOIN players p ON p.uuid = ps.player_uuid
|
||||
WHERE ps.logout_time IS NULL ORDER BY ps.login_time DESC
|
||||
|
||||
Reference in New Issue
Block a user