🎉 Refactored backend structure: Removed unused files including app_cleaned.py, admin_api.py, admin.py, user.py, and others. Updated settings.local.json to include additional Bash commands. Enhanced admin templates for better navigation and functionality. Improved logging and error handling across various modules.

This commit is contained in:
2025-06-09 19:33:06 +02:00
parent 876b5a64e4
commit c7f9738bbe
115 changed files with 23507 additions and 9958 deletions

View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>400 - Ungültige Anfrage | MYP System</title>
<link href="{{ url_for('static', filename='css/tailwind.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/glassmorphism.min.css') }}" rel="stylesheet">
</head>
<body class="bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800 min-h-screen flex items-center justify-center">
<div class="glass-card max-w-md w-full mx-4 p-8 text-center">
<div class="mb-6">
<div class="text-6xl font-bold text-red-500 mb-4">400</div>
<h1 class="text-2xl font-bold text-gray-800 dark:text-white mb-2">Ungültige Anfrage</h1>
<p class="text-gray-600 dark:text-gray-300">
Die Anfrage konnte nicht verarbeitet werden. Bitte überprüfen Sie Ihre Eingaben.
</p>
</div>
<div class="space-y-4">
<a href="{{ url_for('dashboard') if current_user.is_authenticated else url_for('auth.login') }}"
class="block w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
{% if current_user.is_authenticated %}
Zum Dashboard
{% else %}
Zur Anmeldung
{% endif %}
</a>
<button onclick="history.back()"
class="block w-full bg-gray-500 hover:bg-gray-600 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Zurück
</button>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>405 - Methode nicht erlaubt | MYP System</title>
<link href="{{ url_for('static', filename='css/tailwind.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/glassmorphism.min.css') }}" rel="stylesheet">
</head>
<body class="bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800 min-h-screen flex items-center justify-center">
<div class="glass-card max-w-md w-full mx-4 p-8 text-center">
<div class="mb-6">
<div class="text-6xl font-bold text-orange-500 mb-4">405</div>
<h1 class="text-2xl font-bold text-gray-800 dark:text-white mb-2">Methode nicht erlaubt</h1>
<p class="text-gray-600 dark:text-gray-300">
Die verwendete HTTP-Methode ist für diese URL nicht erlaubt.
</p>
</div>
<div class="space-y-4">
<a href="{{ url_for('dashboard') if current_user.is_authenticated else url_for('auth.login') }}"
class="block w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
{% if current_user.is_authenticated %}
Zum Dashboard
{% else %}
Zur Anmeldung
{% endif %}
</a>
<button onclick="history.back()"
class="block w-full bg-gray-500 hover:bg-gray-600 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Zurück
</button>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>413 - Datei zu groß | MYP System</title>
<link href="{{ url_for('static', filename='css/tailwind.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/glassmorphism.min.css') }}" rel="stylesheet">
</head>
<body class="bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800 min-h-screen flex items-center justify-center">
<div class="glass-card max-w-md w-full mx-4 p-8 text-center">
<div class="mb-6">
<div class="text-6xl font-bold text-yellow-500 mb-4">413</div>
<h1 class="text-2xl font-bold text-gray-800 dark:text-white mb-2">Datei zu groß</h1>
<p class="text-gray-600 dark:text-gray-300">
Die hochgeladene Datei ist zu groß. Maximale Dateigröße: 16 MB.
</p>
</div>
<div class="space-y-4">
<a href="{{ url_for('dashboard') if current_user.is_authenticated else url_for('auth.login') }}"
class="block w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
{% if current_user.is_authenticated %}
Zum Dashboard
{% else %}
Zur Anmeldung
{% endif %}
</a>
<button onclick="history.back()"
class="block w-full bg-gray-500 hover:bg-gray-600 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Zurück
</button>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>429 - Zu viele Anfragen | MYP System</title>
<link href="{{ url_for('static', filename='css/tailwind.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/glassmorphism.min.css') }}" rel="stylesheet">
</head>
<body class="bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800 min-h-screen flex items-center justify-center">
<div class="glass-card max-w-md w-full mx-4 p-8 text-center">
<div class="mb-6">
<div class="text-6xl font-bold text-red-500 mb-4">429</div>
<h1 class="text-2xl font-bold text-gray-800 dark:text-white mb-2">Zu viele Anfragen</h1>
<p class="text-gray-600 dark:text-gray-300">
Sie haben zu viele Anfragen gesendet. Bitte warten Sie einen Moment und versuchen Sie es erneut.
</p>
</div>
<div class="mb-6">
<div class="bg-yellow-100 dark:bg-yellow-900 border border-yellow-400 text-yellow-700 dark:text-yellow-300 px-4 py-3 rounded">
<p class="text-sm">
<strong>Tipp:</strong> Warten Sie 60 Sekunden und versuchen Sie es dann erneut.
</p>
</div>
</div>
<div class="space-y-4">
<a href="{{ url_for('dashboard') if current_user.is_authenticated else url_for('auth.login') }}"
class="block w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
{% if current_user.is_authenticated %}
Zum Dashboard
{% else %}
Zur Anmeldung
{% endif %}
</a>
<button onclick="setTimeout(() => history.back(), 1000)"
class="block w-full bg-gray-500 hover:bg-gray-600 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Zurück (in 1 Sekunde)
</button>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>502 - Gateway-Fehler | MYP System</title>
<link href="{{ url_for('static', filename='css/tailwind.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/glassmorphism.min.css') }}" rel="stylesheet">
</head>
<body class="bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800 min-h-screen flex items-center justify-center">
<div class="glass-card max-w-md w-full mx-4 p-8 text-center">
<div class="mb-6">
<div class="text-6xl font-bold text-red-600 mb-4">502</div>
<h1 class="text-2xl font-bold text-gray-800 dark:text-white mb-2">Gateway-Fehler</h1>
<p class="text-gray-600 dark:text-gray-300">
Der Server ist vorübergehend nicht verfügbar. Bitte versuchen Sie es in wenigen Minuten erneut.
</p>
</div>
<div class="mb-6">
<div class="bg-red-100 dark:bg-red-900 border border-red-400 text-red-700 dark:text-red-300 px-4 py-3 rounded">
<p class="text-sm">
<strong>Hinweis:</strong> Dies ist ein temporärer Fehler. Der Service wird automatisch wiederhergestellt.
</p>
</div>
</div>
<div class="space-y-4">
<button onclick="location.reload()"
class="block w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Seite neu laden
</button>
<a href="{{ url_for('dashboard') if current_user.is_authenticated else url_for('auth.login') }}"
class="block w-full bg-gray-500 hover:bg-gray-600 text-white font-medium py-2 px-4 rounded-lg transition-colors">
{% if current_user.is_authenticated %}
Zum Dashboard
{% else %}
Zur Anmeldung
{% endif %}
</a>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>503 - Service nicht verfügbar | MYP System</title>
<link href="{{ url_for('static', filename='css/tailwind.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/glassmorphism.min.css') }}" rel="stylesheet">
</head>
<body class="bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800 min-h-screen flex items-center justify-center">
<div class="glass-card max-w-md w-full mx-4 p-8 text-center">
<div class="mb-6">
<div class="text-6xl font-bold text-orange-600 mb-4">503</div>
<h1 class="text-2xl font-bold text-gray-800 dark:text-white mb-2">Service nicht verfügbar</h1>
<p class="text-gray-600 dark:text-gray-300">
Der Service ist vorübergehend nicht verfügbar. Wir arbeiten an der Behebung des Problems.
</p>
</div>
<div class="mb-6">
<div class="bg-orange-100 dark:bg-orange-900 border border-orange-400 text-orange-700 dark:text-orange-300 px-4 py-3 rounded">
<p class="text-sm">
<strong>Wartung:</strong> Der Service wird in Kürze wieder verfügbar sein.
</p>
</div>
</div>
<div class="space-y-4">
<button onclick="setTimeout(() => location.reload(), 5000)"
class="block w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Automatisch neu laden (5s)
</button>
<button onclick="location.reload()"
class="block w-full bg-green-600 hover:bg-green-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Jetzt neu laden
</button>
<a href="{{ url_for('dashboard') if current_user.is_authenticated else url_for('auth.login') }}"
class="block w-full bg-gray-500 hover:bg-gray-600 text-white font-medium py-2 px-4 rounded-lg transition-colors">
{% if current_user.is_authenticated %}
Zum Dashboard
{% else %}
Zur Anmeldung
{% endif %}
</a>
</div>
</div>
<script>
// Automatisches Neuladen nach 30 Sekunden
setTimeout(() => {
location.reload();
}, 30000);
</script>
</body>
</html>

View File

@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="de" x-data="{ darkMode: window.matchMedia('(prefers-color-scheme: dark)').matches || localStorage.getItem('theme') === 'dark' }" x-bind:class="{ 'dark': darkMode }">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>505 - HTTP-Version nicht unterstützt | MYP 3D-Druck-Management</title>
<link href="{{ url_for('static', filename='css/tailwind.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/glassmorphism.min.css') }}" rel="stylesheet">
<style>
.error-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
</style>
</head>
<body class="min-h-screen bg-gradient-to-br from-slate-100 to-slate-200 dark:from-slate-900 dark:to-slate-800 flex items-center justify-center px-4 error-bg">
<div class="max-w-lg w-full">
<div class="glassmorphism-card text-center p-8">
<div class="mb-6">
<div class="w-24 h-24 mx-auto bg-red-100 dark:bg-red-900/30 rounded-full flex items-center justify-center mb-4">
<svg class="w-12 h-12 text-red-600 dark:text-red-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 19c-.77.833.192 2.5 1.732 2.5z"></path>
</svg>
</div>
<h1 class="text-4xl font-bold text-slate-800 dark:text-white mb-2">505</h1>
<h2 class="text-xl font-semibold text-slate-700 dark:text-slate-300 mb-4">HTTP-Version nicht unterstützt</h2>
<p class="text-slate-600 dark:text-slate-400 leading-relaxed">
Die verwendete HTTP-Version wird vom Server nicht unterstützt. Bitte verwenden Sie einen aktuellen Browser.
</p>
</div>
<div class="space-y-3">
<a href="{{ url_for('dashboard') if current_user.is_authenticated else url_for('auth.login') }}"
class="inline-flex items-center justify-center w-full px-6 py-3 bg-blue-600 hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600 text-white font-medium rounded-lg transition-all duration-200 shadow-lg hover:shadow-xl">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path>
</svg>
Zur Startseite
</a>
<button onclick="history.back()"
class="inline-flex items-center justify-center w-full px-6 py-3 bg-slate-600 hover:bg-slate-700 dark:bg-slate-500 dark:hover:bg-slate-600 text-white font-medium rounded-lg transition-all duration-200">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path>
</svg>
Zurück
</button>
</div>
</div>
</div>
</body>
</html>