From 290271a4f9da79995bea8a43e035082270553a62 Mon Sep 17 00:00:00 2001 From: Reditus Date: Wed, 13 May 2026 22:05:05 +0100 Subject: [PATCH] cleanup: remove admin page, add fuel keywords to vehicle API, ignore temp scripts and AI docs --- .gitignore | 5 +++++ app/routes/api.py | 2 +- app/routes/main.py | 11 ---------- app/utils/constants.py | 1 - templates/admin.html | 46 ------------------------------------------ 5 files changed, 6 insertions(+), 59 deletions(-) delete mode 100644 templates/admin.html diff --git a/.gitignore b/.gitignore index 1aefaac..5b0a972 100644 --- a/.gitignore +++ b/.gitignore @@ -75,5 +75,10 @@ htmlcov/ coverage.xml .pytest_cache/ +# Temporary/exploratory scripts +temp_*.py +temp_*.ps1 +temp_*.sh + # AI-generated analysis docs AI_DOCS/ diff --git a/app/routes/api.py b/app/routes/api.py index 44c2361..28387c5 100644 --- a/app/routes/api.py +++ b/app/routes/api.py @@ -471,7 +471,7 @@ def register_api_routes(app, services, settings): return result all_keys = extract_all_keys(props)[:100] - relevant = [k for k in all_keys if any(x in k.lower() for x in ['health', 'damage', 'part', 'module', 'component', 'hit', 'armor', 'slot'])] + relevant = [k for k in all_keys if any(x in k.lower() for x in ['health', 'damage', 'part', 'module', 'component', 'hit', 'armor', 'slot', 'fuel', 'gas', 'energy', 'resource'])] return jsonify({ 'id': vehicle_id, 'class': vehicle['class'], diff --git a/app/routes/main.py b/app/routes/main.py index 07f6feb..c69138f 100644 --- a/app/routes/main.py +++ b/app/routes/main.py @@ -16,7 +16,6 @@ def register_routes(app, services, settings): player_svc = services['player'] vehicle_svc = services['vehicle'] chat_svc = services['chat'] - admin_svc = services['admin'] static_cache = services['static_cache'] def fmt_role(role_id): @@ -376,16 +375,6 @@ def register_routes(app, services, settings): director_port = settings.get('director', {}).get('port', 32479) return render_template('director.html', director_port=director_port) - # Admin - @app.route('/admin') - @login_required - def admin_page(): - try: - bans = admin_svc.get_bans() - except Exception: - bans = [] - return render_template('admin.html', bans=bans) - # Server status @app.route('/server') @login_required diff --git a/app/utils/constants.py b/app/utils/constants.py index d0dadd4..b53498b 100644 --- a/app/utils/constants.py +++ b/app/utils/constants.py @@ -37,5 +37,4 @@ NAV_PAGES = [ ('/vehicles', 'Vehicles'), ('/guilds', 'Guilds'), ('/buildings', 'Buildings'), - ('/admin', 'Admin'), ] diff --git a/templates/admin.html b/templates/admin.html deleted file mode 100644 index d407275..0000000 --- a/templates/admin.html +++ /dev/null @@ -1,46 +0,0 @@ -{% extends "base.html" %} -{% block title %}Admin - Dune Awakening Dashboard{% endblock %} -{% block content %} - - - -
-
- Upcoming Feature: Advanced admin tools (live command execution, player management, server config editor) are currently in development. -
-
- -{% if tunnel_down %} -
SSH Tunnel Not Detected
-{% else %} - -
-
Bans ({{ bans|length }})
-
- - - - - - {% for b in bans %} - - - - - - - - - {% else %} - - {% endfor %} - -
IDPlayerReasonStatusBanned AtExpires
{{ b.id }}{{ b.character_name or b.player_id or '-' }}{{ b.reason or '-' }}{{ 'Active' if b.active else 'Inactive' }}{{ b.banned_at.strftime('%Y-%m-%d %H:%M') if b.banned_at else '-' }}{{ b.expires_at.strftime('%Y-%m-%d %H:%M') if b.expires_at else 'Never' }}
No bans found
-
-
- -{% endif %} -{% endblock %} \ No newline at end of file