diff --git a/backend/app.py b/backend/app.py index 54612e0c8..fe4fd0e5f 100644 --- a/backend/app.py +++ b/backend/app.py @@ -691,6 +691,16 @@ def inject_now(): """Injiziert die aktuelle Zeit in alle Templates""" return {'now': datetime.now} +@app.context_processor +def inject_current_route(): + """ + Stellt current_route für alle Templates bereit. + + Verhindert Template-Fehler wenn request.endpoint None ist (z.B. bei 404-Fehlern). + """ + current_route = getattr(request, 'endpoint', None) or '' + return {'current_route': current_route} + @app.template_filter('format_datetime') def format_datetime_filter(value, format='%d.%m.%Y %H:%M'): """Template-Filter für Datums-Formatierung""" @@ -1093,7 +1103,8 @@ def api_stats(): try: from models import get_db_session, User, Printer, Job - with get_cached_session() as db_session: + db_session = get_db_session() + try: # Grundlegende Counts total_users = db_session.query(User).count() total_printers = db_session.query(Printer).count() @@ -1116,6 +1127,8 @@ def api_stats(): online_printers = db_session.query(Printer).filter( Printer.active == True ).count() + finally: + db_session.close() stats = { 'total_users': total_users, @@ -1199,7 +1212,13 @@ def forbidden_error(error): "message": "Sie haben keine Berechtigung für diese Aktion", "status_code": 403 }), 403 - return render_template('errors/403.html'), 403 + + try: + return render_template('errors/403.html'), 403 + except Exception as template_error: + # Fallback bei Template-Fehlern + app_logger.error(f"Template-Fehler in 403-Handler: {str(template_error)}") + return f"

403 - Zugriff verweigert

Sie haben keine Berechtigung für diese Aktion.

", 403 @app.errorhandler(404) def not_found_error(error): @@ -1211,7 +1230,13 @@ def not_found_error(error): "message": "Die angeforderte Ressource wurde nicht gefunden", "status_code": 404 }), 404 - return render_template('errors/404.html'), 404 + + try: + return render_template('errors/404.html'), 404 + except Exception as template_error: + # Fallback bei Template-Fehlern + app_logger.error(f"Template-Fehler in 404-Handler: {str(template_error)}") + return f"

404 - Nicht gefunden

Die angeforderte Seite wurde nicht gefunden.

", 404 @app.errorhandler(405) def method_not_allowed_error(error): @@ -1271,7 +1296,12 @@ def internal_error(error): "status_code": 500 }), 500 - return render_template('errors/500.html', error_id=error_id), 500 + try: + return render_template('errors/500.html', error_id=error_id), 500 + except Exception as template_error: + # Fallback bei Template-Fehlern + app_logger.error(f"Template-Fehler in 500-Handler: {str(template_error)}") + return f"

500 - Interner Serverfehler

Ein unerwarteter Fehler ist aufgetreten. Fehler-ID: {error_id}

", 500 @app.errorhandler(502) def bad_gateway_error(error): @@ -1338,7 +1368,12 @@ def handle_exception(error): "status_code": 500 }), 500 - return render_template('errors/500.html', error_id=error_id), 500 + try: + return render_template('errors/500.html', error_id=error_id), 500 + except Exception as template_error: + # Fallback bei Template-Fehlern + app_logger.error(f"Template-Fehler im Exception-Handler: {str(template_error)}") + return f"

500 - Unerwarteter Fehler

Ein unerwarteter Fehler ist aufgetreten. Fehler-ID: {error_id}

", 500 # ===== HAUPTFUNKTION ===== def main(): @@ -1506,5 +1541,17 @@ def production_info(): """Stellt Production-Informationen für Templates bereit""" return get_production_info() +# Nach der Initialisierung der Blueprints und vor dem App-Start +try: + # Admin-Berechtigungen beim Start korrigieren + from utils.permissions import fix_all_admin_permissions + result = fix_all_admin_permissions() + if result['success']: + app_logger.info(f"Admin-Berechtigungen beim Start korrigiert: {result['created']} erstellt, {result['corrected']} aktualisiert") + else: + app_logger.warning(f"Fehler beim Korrigieren der Admin-Berechtigungen: {result.get('error', 'Unbekannter Fehler')}") +except Exception as e: + app_logger.error(f"Fehler beim Korrigieren der Admin-Berechtigungen beim Start: {str(e)}") + if __name__ == "__main__": main() \ No newline at end of file diff --git a/backend/backend/database/myp.db b/backend/backend/database/myp.db index e9ce12da7..60d10e0a1 100644 Binary files a/backend/backend/database/myp.db and b/backend/backend/database/myp.db differ diff --git a/backend/blueprints/__pycache__/admin_unified.cpython-313.pyc b/backend/blueprints/__pycache__/admin_unified.cpython-313.pyc index 01a1a6a5c..4d80a3e4f 100644 Binary files a/backend/blueprints/__pycache__/admin_unified.cpython-313.pyc and b/backend/blueprints/__pycache__/admin_unified.cpython-313.pyc differ diff --git a/backend/blueprints/__pycache__/api.cpython-313.pyc b/backend/blueprints/__pycache__/api.cpython-313.pyc index e284af6ee..e96193ad7 100644 Binary files a/backend/blueprints/__pycache__/api.cpython-313.pyc and b/backend/blueprints/__pycache__/api.cpython-313.pyc differ diff --git a/backend/blueprints/__pycache__/guest.cpython-313.pyc b/backend/blueprints/__pycache__/guest.cpython-313.pyc index 54da915b4..8b892b4b5 100644 Binary files a/backend/blueprints/__pycache__/guest.cpython-313.pyc and b/backend/blueprints/__pycache__/guest.cpython-313.pyc differ diff --git a/backend/blueprints/__pycache__/printers.cpython-313.pyc b/backend/blueprints/__pycache__/printers.cpython-313.pyc index 8386c32e0..31fed3585 100644 Binary files a/backend/blueprints/__pycache__/printers.cpython-313.pyc and b/backend/blueprints/__pycache__/printers.cpython-313.pyc differ diff --git a/backend/blueprints/admin_unified.py b/backend/blueprints/admin_unified.py index a126ccdcc..8faf52415 100644 --- a/backend/blueprints/admin_unified.py +++ b/backend/blueprints/admin_unified.py @@ -1823,4 +1823,656 @@ def get_status_color(status): 'disconnected': '#ef4444', # Rot 'unknown': '#6b7280' # Grau } - return status_colors.get(status, '#6b7280') \ No newline at end of file + return status_colors.get(status, '#6b7280') + +# ===== FEHLENDE API-ROUTEN HINZUFÜGEN ===== + +@admin_api_blueprint.route('/system-health', methods=['GET']) +@admin_required +def api_admin_system_health_alias(): + """ + Alias-Route für system-health (Kompatibilität mit Frontend). + + Leitet Anfragen an die bestehende system/health Route weiter. + """ + return api_admin_system_health() + +@admin_api_blueprint.route('/error-recovery/status', methods=['GET']) +@admin_required +def api_admin_error_recovery_status(): + """ + API-Endpunkt für Error-Recovery-Status. + + Gibt Informationen über das Error-Recovery-System zurück, + einschließlich Status, Statistiken und letzter Aktionen. + """ + try: + admin_api_logger.info(f"Error-Recovery-Status angefordert von {current_user.username}") + + # Error-Recovery-Basis-Status sammeln + recovery_status = { + 'enabled': True, # Error-Recovery ist standardmäßig aktiviert + 'last_check': datetime.now().isoformat(), + 'status': 'active', + 'errors_detected': 0, + 'errors_recovered': 0, + 'last_recovery_action': None, + 'monitoring_active': True, + 'recovery_methods': [ + 'automatic_restart', + 'service_health_check', + 'database_recovery', + 'cache_cleanup' + ] + } + + # Versuche Log-Informationen zu sammeln + try: + # Prüfe auf kürzliche Fehler in System-Logs + with get_cached_session() as db_session: + # Letzte Stunde nach Error-Logs suchen + last_hour = datetime.now() - timedelta(hours=1) + + error_logs = db_session.query(SystemLog).filter( + SystemLog.level == 'ERROR', + SystemLog.timestamp >= last_hour + ).count() + + recovery_logs = db_session.query(SystemLog).filter( + SystemLog.message.like('%Recovery%'), + SystemLog.timestamp >= last_hour + ).count() + + recovery_status['errors_detected'] = error_logs + recovery_status['errors_recovered'] = recovery_logs + + # Letzten Recovery-Eintrag finden + last_recovery = db_session.query(SystemLog).filter( + SystemLog.message.like('%Recovery%') + ).order_by(SystemLog.timestamp.desc()).first() + + if last_recovery: + recovery_status['last_recovery_action'] = { + 'timestamp': last_recovery.timestamp.isoformat(), + 'action': 'system_log_recovery', + 'message': last_recovery.message, + 'module': last_recovery.module + } + + except Exception as log_error: + admin_api_logger.warning(f"Log-Analyse für Error-Recovery fehlgeschlagen: {str(log_error)}") + recovery_status['errors_detected'] = 0 + recovery_status['errors_recovered'] = 0 + + # System-Load als Indikator für potenzielle Probleme + try: + import psutil + cpu_percent = psutil.cpu_percent(interval=1) + memory_percent = psutil.virtual_memory().percent + + # Hohe System-Last kann auf Probleme hindeuten + if cpu_percent > 80 or memory_percent > 85: + recovery_status['status'] = 'warning' + recovery_status['last_recovery_action'] = { + 'timestamp': datetime.now().isoformat(), + 'action': 'system_load_warning', + 'details': { + 'cpu_percent': cpu_percent, + 'memory_percent': memory_percent + } + } + + # System-Performance-Daten hinzufügen + recovery_status['system_performance'] = { + 'cpu_percent': cpu_percent, + 'memory_percent': memory_percent, + 'status': 'normal' if cpu_percent < 80 and memory_percent < 85 else 'high_load' + } + + except ImportError: + admin_api_logger.info("psutil nicht verfügbar für Error-Recovery-Monitoring") + recovery_status['system_performance'] = { + 'available': False, + 'message': 'psutil-Bibliothek nicht installiert' + } + except Exception as system_error: + admin_api_logger.warning(f"System-Load-Check für Error-Recovery fehlgeschlagen: {str(system_error)}") + recovery_status['system_performance'] = { + 'available': False, + 'error': str(system_error) + } + + # Datenbank-Gesundheit als Recovery-Indikator + try: + with get_cached_session() as db_session: + # Einfacher DB-Test + db_session.execute("SELECT 1") + recovery_status['database_health'] = 'healthy' + except Exception as db_error: + recovery_status['database_health'] = 'unhealthy' + recovery_status['status'] = 'critical' + admin_api_logger.error(f"Datenbank-Health-Check für Error-Recovery fehlgeschlagen: {str(db_error)}") + + admin_api_logger.info(f"Error-Recovery-Status abgerufen: {recovery_status['status']}") + + return jsonify({ + 'success': True, + 'error_recovery': recovery_status, + 'message': f"Error-Recovery-Status: {recovery_status['status']}" + }) + + except Exception as e: + admin_api_logger.error(f"Fehler beim Abrufen des Error-Recovery-Status: {str(e)}") + return jsonify({ + 'success': False, + 'error': 'Error-Recovery-Status nicht verfügbar', + 'details': str(e), + 'error_recovery': { + 'status': 'error', + 'enabled': False, + 'last_check': datetime.now().isoformat() + } + }), 500 + +# ===== ERWEITERTE TAPO-STECKDOSEN-VERWALTUNG ===== + +@admin_blueprint.route("/tapo-monitoring") +@admin_required +def tapo_monitoring(): + """ + Erweiterte Tapo-Steckdosen-Überwachung für Administratoren. + Bietet Real-Time-Monitoring aller Drucker-Steckdosen mit automatischer Überprüfung. + """ + admin_logger.info(f"Tapo-Monitoring aufgerufen von {current_user.username}") + + try: + with get_cached_session() as db_session: + # Alle Drucker mit konfigurierten Steckdosen laden + printers_with_plugs = db_session.query(Printer).filter( + Printer.plug_ip.isnot(None), + Printer.active == True + ).all() + + # Grundlegende Statistiken + total_printers = db_session.query(Printer).count() + printers_with_tapo = len(printers_with_plugs) + + # Aktueller Status aller Tapo-Steckdosen abrufen + try: + from utils.hardware_integration import tapo_controller + tapo_available = True + + # Status für jeden Drucker mit Tapo-Steckdose abrufen + printer_status = [] + online_count = 0 + offline_count = 0 + error_count = 0 + + for printer in printers_with_plugs: + try: + reachable, status = tapo_controller.check_outlet_status( + printer.plug_ip, + printer_id=printer.id + ) + + if reachable: + if status == 'on': + online_count += 1 + status_class = 'success' + else: + offline_count += 1 + status_class = 'secondary' + else: + error_count += 1 + status_class = 'danger' + status = 'unreachable' + + # Aktuelle Jobs für diesen Drucker prüfen + active_jobs = db_session.query(Job).filter( + Job.printer_id == printer.id, + Job.status.in_(['running', 'printing', 'active', 'scheduled']) + ).count() + + printer_info = { + 'id': printer.id, + 'name': printer.name, + 'model': printer.model, + 'location': printer.location, + 'plug_ip': printer.plug_ip, + 'plug_status': status, + 'plug_reachable': reachable, + 'status_class': status_class, + 'active_jobs': active_jobs, + 'last_checked': datetime.now(), + 'has_issues': not reachable or active_jobs > 0 + } + + printer_status.append(printer_info) + + except Exception as e: + admin_logger.error(f"Fehler beim Status-Check für {printer.name}: {str(e)}") + error_count += 1 + printer_status.append({ + 'id': printer.id, + 'name': printer.name, + 'model': printer.model, + 'location': printer.location, + 'plug_ip': printer.plug_ip, + 'plug_status': 'error', + 'plug_reachable': False, + 'status_class': 'danger', + 'active_jobs': 0, + 'last_checked': datetime.now(), + 'has_issues': True, + 'error': str(e) + }) + + except Exception as e: + admin_logger.error(f"Tapo-Controller nicht verfügbar: {str(e)}") + tapo_available = False + printer_status = [] + online_count = offline_count = error_count = 0 + + # Statistiken zusammenstellen + monitoring_stats = { + 'total_printers': total_printers, + 'printers_with_tapo': printers_with_tapo, + 'tapo_available': tapo_available, + 'online_count': online_count, + 'offline_count': offline_count, + 'error_count': error_count, + 'coverage_percentage': round((printers_with_tapo / total_printers * 100), 1) if total_printers > 0 else 0 + } + + admin_logger.info(f"Tapo-Monitoring geladen: {printers_with_tapo} Steckdosen, {online_count} online") + + return render_template('admin_tapo_monitoring.html', + printer_status=printer_status, + stats=monitoring_stats, + page_title="Tapo-Steckdosen-Monitoring", + breadcrumb=[ + {"name": "Admin-Dashboard", "url": url_for("admin.admin_dashboard")}, + {"name": "Tapo-Monitoring", "url": "#"} + ]) + + except Exception as e: + admin_logger.error(f"Fehler beim Laden des Tapo-Monitorings: {str(e)}") + flash("Fehler beim Laden der Tapo-Monitoring-Daten.", "error") + return redirect(url_for("admin.admin_dashboard")) + +@admin_api_blueprint.route('/tapo/bulk-control', methods=['POST']) +@admin_required +def api_admin_bulk_tapo_control(): + """ + API-Endpunkt für Massensteuerung von Tapo-Steckdosen. + Ermöglicht das gleichzeitige Ein-/Ausschalten mehrerer Steckdosen. + """ + admin_api_logger.info(f"Bulk-Tapo-Steuerung von {current_user.username}") + + try: + data = request.get_json() + action = data.get('action') # 'on', 'off', 'status' + printer_ids = data.get('printer_ids', []) + + if not action or not printer_ids: + return jsonify({ + 'success': False, + 'error': 'Aktion und Drucker-IDs sind erforderlich' + }), 400 + + if action not in ['on', 'off', 'status']: + return jsonify({ + 'success': False, + 'error': 'Ungültige Aktion. Erlaubt: on, off, status' + }), 400 + + # Tapo-Controller laden + try: + from utils.hardware_integration import tapo_controller + except Exception as e: + return jsonify({ + 'success': False, + 'error': f'Tapo-Controller nicht verfügbar: {str(e)}' + }), 500 + + results = [] + success_count = 0 + error_count = 0 + + with get_cached_session() as db_session: + for printer_id in printer_ids: + try: + printer = db_session.query(Printer).filter(Printer.id == printer_id).first() + + if not printer: + results.append({ + 'printer_id': printer_id, + 'success': False, + 'error': 'Drucker nicht gefunden' + }) + error_count += 1 + continue + + if not printer.plug_ip: + results.append({ + 'printer_id': printer_id, + 'printer_name': printer.name, + 'success': False, + 'error': 'Keine Steckdose konfiguriert' + }) + error_count += 1 + continue + + # Aktion ausführen + if action == 'status': + reachable, status = tapo_controller.check_outlet_status( + printer.plug_ip, + printer_id=printer_id + ) + results.append({ + 'printer_id': printer_id, + 'printer_name': printer.name, + 'success': True, + 'status': status, + 'reachable': reachable + }) + success_count += 1 + else: + # Ein- oder Ausschalten + state = action == 'on' + success = tapo_controller.toggle_plug(printer.plug_ip, state) + + if success: + # Drucker-Status in DB aktualisieren + printer.status = 'starting' if state else 'offline' + printer.last_checked = datetime.now() + + results.append({ + 'printer_id': printer_id, + 'printer_name': printer.name, + 'success': True, + 'action': action, + 'message': f'Steckdose erfolgreich {"ein" if state else "aus"}geschaltet' + }) + success_count += 1 + else: + results.append({ + 'printer_id': printer_id, + 'printer_name': printer.name, + 'success': False, + 'error': f'Steckdose konnte nicht {"ein" if state else "aus"}geschaltet werden' + }) + error_count += 1 + + except Exception as e: + admin_api_logger.error(f"Fehler bei Bulk-Steuerung für Drucker {printer_id}: {str(e)}") + results.append({ + 'printer_id': printer_id, + 'success': False, + 'error': str(e) + }) + error_count += 1 + + # Änderungen speichern + if action in ['on', 'off']: + db_session.commit() + + admin_api_logger.info(f"Bulk-Tapo-Steuerung abgeschlossen: {success_count} erfolgreich, {error_count} Fehler") + + return jsonify({ + 'success': True, + 'results': results, + 'summary': { + 'total': len(printer_ids), + 'success': success_count, + 'errors': error_count + }, + 'timestamp': datetime.now().isoformat() + }) + + except Exception as e: + admin_api_logger.error(f"Unerwarteter Fehler bei Bulk-Tapo-Steuerung: {str(e)}") + return jsonify({ + 'success': False, + 'error': f'Systemfehler: {str(e)}' + }), 500 + +@admin_api_blueprint.route('/tapo/health-check', methods=['POST']) +@admin_required +def api_admin_tapo_health_check(): + """ + Führt eine umfassende Gesundheitsüberprüfung aller Tapo-Steckdosen durch. + Testet Konnektivität, Authentifizierung und Funktionsfähigkeit. + """ + admin_api_logger.info(f"Tapo-Gesundheitscheck von {current_user.username}") + + try: + # Tapo-Controller laden + try: + from utils.hardware_integration import tapo_controller + tapo_available = True + except Exception as e: + return jsonify({ + 'success': False, + 'error': f'Tapo-Controller nicht verfügbar: {str(e)}', + 'tapo_available': False + }), 500 + + health_results = { + 'overall_status': 'healthy', + 'tapo_available': tapo_available, + 'timestamp': datetime.now().isoformat(), + 'printers': [], + 'summary': { + 'total': 0, + 'healthy': 0, + 'warning': 0, + 'critical': 0 + }, + 'recommendations': [] + } + + with get_cached_session() as db_session: + # Alle Drucker mit Steckdosen laden + printers_with_plugs = db_session.query(Printer).filter( + Printer.plug_ip.isnot(None) + ).all() + + health_results['summary']['total'] = len(printers_with_plugs) + + for printer in printers_with_plugs: + printer_health = { + 'id': printer.id, + 'name': printer.name, + 'plug_ip': printer.plug_ip, + 'status': 'unknown', + 'issues': [], + 'checks': { + 'connectivity': False, + 'authentication': False, + 'functionality': False + } + } + + try: + # Check 1: Konnektivität (Ping) + ping_success = tapo_controller.ping_address(printer.plug_ip, timeout=3) + printer_health['checks']['connectivity'] = ping_success + + if not ping_success: + printer_health['issues'].append('Netzwerkverbindung fehlgeschlagen') + + # Check 2: Authentifizierung und Geräteinformationen + if ping_success: + try: + test_result = tapo_controller.test_connection(printer.plug_ip) + printer_health['checks']['authentication'] = test_result['success'] + + if not test_result['success']: + printer_health['issues'].append(f'Authentifizierung fehlgeschlagen: {test_result.get("error", "Unbekannt")}') + except Exception as auth_error: + printer_health['issues'].append(f'Authentifizierungstest fehlgeschlagen: {str(auth_error)}') + + # Check 3: Funktionalität (Status abrufen) + if printer_health['checks']['authentication']: + try: + reachable, status = tapo_controller.check_outlet_status( + printer.plug_ip, + printer_id=printer.id + ) + printer_health['checks']['functionality'] = reachable + printer_health['current_status'] = status + + if not reachable: + printer_health['issues'].append('Status-Abfrage fehlgeschlagen') + except Exception as func_error: + printer_health['issues'].append(f'Funktionstest fehlgeschlagen: {str(func_error)}') + + # Gesamtstatus bewerten + if len(printer_health['issues']) == 0: + printer_health['status'] = 'healthy' + health_results['summary']['healthy'] += 1 + elif len(printer_health['issues']) <= 1: + printer_health['status'] = 'warning' + health_results['summary']['warning'] += 1 + else: + printer_health['status'] = 'critical' + health_results['summary']['critical'] += 1 + + # Aktuelle Jobs prüfen (für Sicherheitswarnungen) + active_jobs = db_session.query(Job).filter( + Job.printer_id == printer.id, + Job.status.in_(['running', 'printing', 'active']) + ).count() + + if active_jobs > 0: + printer_health['active_jobs'] = active_jobs + printer_health['issues'].append(f'{active_jobs} aktive(r) Job(s) - Vorsicht bei Steckdosen-Änderungen') + + except Exception as e: + admin_api_logger.error(f"Fehler beim Gesundheitscheck für {printer.name}: {str(e)}") + printer_health['status'] = 'critical' + printer_health['issues'].append(f'Systemfehler: {str(e)}') + health_results['summary']['critical'] += 1 + + health_results['printers'].append(printer_health) + + # Gesamtstatus und Empfehlungen bestimmen + if health_results['summary']['critical'] > 0: + health_results['overall_status'] = 'critical' + health_results['recommendations'].append('Kritische Probleme bei Tapo-Steckdosen beheben') + elif health_results['summary']['warning'] > 0: + health_results['overall_status'] = 'warning' + health_results['recommendations'].append('Warnungen bei Tapo-Steckdosen überprüfen') + + # Zusätzliche Empfehlungen + coverage = (len(printers_with_plugs) / db_session.query(Printer).count()) * 100 if db_session.query(Printer).count() > 0 else 0 + if coverage < 80: + health_results['recommendations'].append(f'Tapo-Abdeckung nur {coverage:.1f}% - weitere Steckdosen konfigurieren') + + admin_api_logger.info(f"Tapo-Gesundheitscheck abgeschlossen: {health_results['summary']}") + + return jsonify(health_results) + + except Exception as e: + admin_api_logger.error(f"Unerwarteter Fehler beim Tapo-Gesundheitscheck: {str(e)}") + return jsonify({ + 'success': False, + 'error': 'Fehler beim Health-Check', + 'message': str(e), + 'health': { + 'overall': 'error', + 'timestamp': datetime.now().isoformat() + } + }), 500 + +@admin_api_blueprint.route('/printers/tapo-configure', methods=['POST']) +@admin_required +def api_admin_configure_printer_tapo(): + """ + Konfiguriert oder aktualisiert die Tapo-Steckdosen-Einstellungen für einen Drucker. + """ + admin_api_logger.info(f"Tapo-Konfiguration von {current_user.username}") + + try: + data = request.get_json() + printer_id = data.get('printer_id') + plug_ip = data.get('plug_ip') + plug_username = data.get('plug_username') + plug_password = data.get('plug_password') + test_connection = data.get('test_connection', True) + + if not printer_id: + return jsonify({ + 'success': False, + 'error': 'Drucker-ID ist erforderlich' + }), 400 + + with get_cached_session() as db_session: + printer = db_session.query(Printer).filter(Printer.id == printer_id).first() + + if not printer: + return jsonify({ + 'success': False, + 'error': 'Drucker nicht gefunden' + }), 404 + + # Tapo-Einstellungen aktualisieren + if plug_ip: + try: + import ipaddress + ipaddress.ip_address(plug_ip) + printer.plug_ip = plug_ip + except ValueError: + return jsonify({ + 'success': False, + 'error': 'Ungültige IP-Adresse' + }), 400 + + if plug_username: + printer.plug_username = plug_username + + if plug_password: + printer.plug_password = plug_password + + # Verbindung testen falls gewünscht + test_result = None + if test_connection and printer.plug_ip: + try: + from utils.hardware_integration import tapo_controller + test_result = tapo_controller.test_connection( + printer.plug_ip, + username=printer.plug_username, + password=printer.plug_password + ) + + if test_result['success']: + printer.last_checked = datetime.now() + printer.status = 'online' + else: + admin_api_logger.warning(f"Tapo-Test für {printer.name} fehlgeschlagen: {test_result.get('error')}") + + except Exception as e: + test_result = { + 'success': False, + 'error': f'Test fehlgeschlagen: {str(e)}' + } + + db_session.commit() + + admin_api_logger.info(f"Tapo-Konfiguration für {printer.name} aktualisiert") + + return jsonify({ + 'success': True, + 'message': f'Tapo-Einstellungen für {printer.name} erfolgreich aktualisiert', + 'printer_id': printer_id, + 'test_result': test_result, + 'timestamp': datetime.now().isoformat() + }) + + except Exception as e: + admin_api_logger.error(f"Fehler bei Tapo-Konfiguration: {str(e)}") + return jsonify({ + 'success': False, + 'error': f'Systemfehler: {str(e)}' + }), 500 \ No newline at end of file diff --git a/backend/blueprints/api.py b/backend/blueprints/api.py index 32622523e..d155cdf7a 100644 --- a/backend/blueprints/api.py +++ b/backend/blueprints/api.py @@ -519,4 +519,40 @@ def get_error_recovery_status(): 'success': False, 'error': 'Fehler beim Laden des Wiederherstellungs-Status', 'message': str(e) + }), 500 + +@api_blueprint.route('/admin/fix-permissions', methods=['POST']) +@admin_required +def fix_admin_permissions(): + """ + Korrigiert die Admin-Berechtigungen im System. + + Nur für Administratoren zugänglich. + """ + try: + from utils.permissions import fix_all_admin_permissions + + result = fix_all_admin_permissions() + + if result['success']: + api_logger.info(f"Admin-Berechtigungen korrigiert von {current_user.username}: {result['created']} erstellt, {result['corrected']} aktualisiert") + return jsonify({ + 'success': True, + 'message': 'Admin-Berechtigungen erfolgreich korrigiert', + 'details': result + }) + else: + api_logger.error(f"Fehler beim Korrigieren der Admin-Berechtigungen: {result['error']}") + return jsonify({ + 'success': False, + 'error': 'Fehler beim Korrigieren der Berechtigungen', + 'message': result['error'] + }), 500 + + except Exception as e: + api_logger.error(f"Fehler beim Korrigieren der Admin-Berechtigungen: {str(e)}") + return jsonify({ + 'success': False, + 'error': 'Fehler beim Korrigieren der Berechtigungen', + 'message': str(e) }), 500 \ No newline at end of file diff --git a/backend/blueprints/guest.py b/backend/blueprints/guest.py index affec09b6..e9730feed 100644 --- a/backend/blueprints/guest.py +++ b/backend/blueprints/guest.py @@ -32,23 +32,8 @@ class GuestRequestForm(FlaskForm): '3D-Dateien sind erlaubt!')]) # Hilfsfunktionen -def can_approve_jobs(user_id): - """Prüft, ob ein Benutzer Anfragen genehmigen darf.""" - with get_cached_session() as db_session: - permission = db_session.query(UserPermission).filter_by(user_id=user_id).first() - if not permission: - return False - return permission.can_approve_jobs - -def approver_required(f): - """Decorator zur Prüfung der Genehmigungsberechtigung.""" - @wraps(f) - @login_required - def decorated_function(*args, **kwargs): - if not can_approve_jobs(current_user.id): - abort(403, "Keine Berechtigung zum Genehmigen von Anfragen") - return f(*args, **kwargs) - return decorated_function +# Importiere Berechtigungsfunktionen aus utils.permissions +from utils.permissions import can_approve_jobs, approver_required # Gast-Routen @guest_blueprint.route('/request', methods=['GET', 'POST']) diff --git a/backend/blueprints/printers.py b/backend/blueprints/printers.py index 43f9c529d..2387d6bed 100644 --- a/backend/blueprints/printers.py +++ b/backend/blueprints/printers.py @@ -18,7 +18,7 @@ from typing import Dict, List, Tuple, Any, Optional from models import Printer, User, Job, get_db_session from utils.logging_config import get_logger, measure_execution_time from utils.security_suite import require_permission, Permission, check_permission -from utils.hardware_integration import printer_monitor +from utils.hardware_integration import printer_monitor, tapo_controller from utils.drag_drop_system import drag_drop_manager # Logger initialisieren @@ -1047,4 +1047,527 @@ def get_drag_drop_config(): # ============================================================================= # ENDE DRAG & DROP API -# ============================================================================= \ No newline at end of file +# ============================================================================= + +@printers_blueprint.route("/tapo/status-check", methods=["POST"]) +@login_required +@require_permission(Permission.CONTROL_PRINTER) +@measure_execution_time(logger=printers_logger, task_name="API-Massenhafte-Tapo-Status-Prüfung") +def mass_tapo_status_check(): + """ + Führt eine vollständige Tapo-Status-Überprüfung für alle Drucker durch. + + Returns: + JSON mit detailliertem Status aller Tapo-Steckdosen + """ + printers_logger.info(f"Massenhafte Tapo-Status-Prüfung von Benutzer {current_user.name}") + + try: + db_session = get_db_session() + + # Alle Drucker laden + all_printers = db_session.query(Printer).all() + + # Tapo-Controller laden + try: + from utils.hardware_integration import tapo_controller + tapo_available = True + except Exception as e: + db_session.close() + return jsonify({ + "success": False, + "error": f"Tapo-Controller nicht verfügbar: {str(e)}", + "tapo_available": False + }), 500 + + printer_status = [] + summary = { + "total_printers": len(all_printers), + "printers_with_tapo": 0, + "printers_without_tapo": 0, + "tapo_online": 0, + "tapo_offline": 0, + "tapo_unreachable": 0, + "configuration_issues": 0 + } + + for printer in all_printers: + printer_info = { + "id": printer.id, + "name": printer.name, + "model": printer.model, + "location": printer.location, + "active": printer.active, + "has_tapo_config": bool(printer.plug_ip), + "plug_ip": printer.plug_ip, + "last_checked": datetime.now() + } + + if not printer.plug_ip: + # Drucker ohne Tapo-Konfiguration + summary["printers_without_tapo"] += 1 + printer_info.update({ + "tapo_status": "not_configured", + "tapo_reachable": False, + "power_status": None, + "recommendations": ["Tapo-Steckdose konfigurieren für automatische Steuerung"] + }) + else: + # Drucker mit Tapo-Konfiguration + summary["printers_with_tapo"] += 1 + + # Konfigurationsprüfung + config_issues = [] + if not printer.plug_username: + config_issues.append("Tapo-Benutzername fehlt") + if not printer.plug_password: + config_issues.append("Tapo-Passwort fehlt") + + if config_issues: + summary["configuration_issues"] += 1 + printer_info.update({ + "tapo_status": "configuration_error", + "tapo_reachable": False, + "power_status": None, + "config_issues": config_issues, + "recommendations": ["Tapo-Anmeldedaten vervollständigen"] + }) + else: + # Vollständige Konfiguration - Status prüfen + try: + reachable, status = tapo_controller.check_outlet_status( + printer.plug_ip, + printer_id=printer.id + ) + + if reachable: + if status == "on": + summary["tapo_online"] += 1 + status_type = "online" + recommendations = [] + else: + summary["tapo_offline"] += 1 + status_type = "offline" + recommendations = ["Steckdose kann bei Bedarf eingeschaltet werden"] + else: + summary["tapo_unreachable"] += 1 + status_type = "unreachable" + recommendations = ["Netzwerkverbindung prüfen", "IP-Adresse überprüfen"] + + printer_info.update({ + "tapo_status": status_type, + "tapo_reachable": reachable, + "power_status": status, + "recommendations": recommendations + }) + + # Drucker-Status in DB aktualisieren + if reachable: + printer.last_checked = datetime.now() + if status == "on": + printer.status = "online" + else: + printer.status = "offline" + else: + printer.status = "unreachable" + + except Exception as tapo_error: + summary["tapo_unreachable"] += 1 + printer_info.update({ + "tapo_status": "error", + "tapo_reachable": False, + "power_status": None, + "error": str(tapo_error), + "recommendations": ["Tapo-Verbindung prüfen", "Anmeldedaten überprüfen"] + }) + printers_logger.warning(f"Tapo-Fehler für {printer.name}: {str(tapo_error)}") + + # Aktuelle Jobs für zusätzliche Info + active_jobs = db_session.query(Job).filter( + Job.printer_id == printer.id, + Job.status.in_(["running", "printing", "active", "scheduled"]) + ).count() + + printer_info["active_jobs"] = active_jobs + if active_jobs > 0: + printer_info.setdefault("recommendations", []).append( + f"Vorsicht: {active_jobs} aktive Job(s) bei Steckdosen-Änderungen" + ) + + printer_status.append(printer_info) + + # Änderungen in DB speichern + db_session.commit() + db_session.close() + + # Übersicht der Ergebnisse + coverage_percentage = (summary["printers_with_tapo"] / summary["total_printers"] * 100) if summary["total_printers"] > 0 else 0 + health_score = ((summary["tapo_online"] + summary["tapo_offline"]) / summary["printers_with_tapo"] * 100) if summary["printers_with_tapo"] > 0 else 0 + + printers_logger.info(f"Tapo-Status-Check abgeschlossen: {summary['printers_with_tapo']} konfiguriert, " + f"{summary['tapo_online']} online, {summary['tapo_unreachable']} nicht erreichbar") + + return jsonify({ + "success": True, + "tapo_available": tapo_available, + "printers": printer_status, + "summary": summary, + "metrics": { + "coverage_percentage": round(coverage_percentage, 1), + "health_score": round(health_score, 1), + "needs_attention": summary["configuration_issues"] + summary["tapo_unreachable"] + }, + "timestamp": datetime.now().isoformat() + }) + + except Exception as e: + printers_logger.error(f"Unerwarteter Fehler bei Massenhafte-Tapo-Status-Prüfung: {str(e)}") + if 'db_session' in locals(): + db_session.close() + return jsonify({ + "success": False, + "error": f"Systemfehler: {str(e)}" + }), 500 + +@printers_blueprint.route("/tapo/configuration-wizard", methods=["POST"]) +@login_required +@require_permission(Permission.ADMIN) +@measure_execution_time(logger=printers_logger, task_name="API-Tapo-Konfigurationsassistent") +def tapo_configuration_wizard(): + """ + Automatischer Konfigurationsassistent für Tapo-Steckdosen. + Versucht automatisch verfügbare Steckdosen zu erkennen und zu konfigurieren. + """ + printers_logger.info(f"Tapo-Konfigurationsassistent von Admin {current_user.name}") + + try: + data = request.get_json() + auto_configure = data.get('auto_configure', True) + test_ips = data.get('test_ips', []) + + # Tapo-Controller laden + try: + from utils.hardware_integration import tapo_controller + except Exception as e: + return jsonify({ + "success": False, + "error": f"Tapo-Controller nicht verfügbar: {str(e)}" + }), 500 + + db_session = get_db_session() + + # Standard-IP-Bereich für Mercedes-Benz TBA (normalerweise 192.168.1.201-206) + if not test_ips: + test_ips = [f"192.168.1.{i}" for i in range(201, 207)] # 6 Standard-Arbeitsplätze + + discovery_results = { + "tested_ips": test_ips, + "discovered_devices": [], + "configured_printers": [], + "errors": [] + } + + printers_logger.info(f"Teste {len(test_ips)} IP-Adressen auf Tapo-Geräte...") + + # Discovery für jede IP-Adresse + for ip in test_ips: + try: + printers_logger.debug(f"Teste IP: {ip}") + + # Ping-Test + if not tapo_controller.ping_address(ip, timeout=3): + discovery_results["errors"].append(f"{ip}: Nicht erreichbar (Ping fehlgeschlagen)") + continue + + # Tapo-Verbindungstest + test_result = tapo_controller.test_connection(ip) + + if test_result["success"]: + device_info = test_result.get("device_info", {}) + + discovered_device = { + "ip": ip, + "device_info": device_info, + "nickname": device_info.get("nickname", f"Tapo Device {ip}"), + "model": device_info.get("model", "Unknown"), + "device_on": device_info.get("device_on", False) + } + + discovery_results["discovered_devices"].append(discovered_device) + printers_logger.info(f"✅ Tapo-Gerät gefunden: {ip} - {discovered_device['nickname']}") + + # Auto-Konfiguration wenn gewünscht + if auto_configure: + # Suche nach Drucker ohne Tapo-Konfiguration + unconfigured_printer = db_session.query(Printer).filter( + Printer.plug_ip.is_(None), + Printer.active == True + ).first() + + if unconfigured_printer: + # Konfiguriere den ersten verfügbaren Drucker + unconfigured_printer.plug_ip = ip + unconfigured_printer.plug_username = "admin" # Standard für Tapo + unconfigured_printer.plug_password = "admin" # Standard für Tapo + unconfigured_printer.last_checked = datetime.now() + + configured_info = { + "printer_id": unconfigured_printer.id, + "printer_name": unconfigured_printer.name, + "tapo_ip": ip, + "tapo_nickname": discovered_device['nickname'] + } + + discovery_results["configured_printers"].append(configured_info) + printers_logger.info(f"✅ Drucker '{unconfigured_printer.name}' automatisch mit {ip} verknüpft") + else: + discovery_results["errors"].append(f"{ip}: Tapo-Gerät gefunden, aber kein unkonfigurierter Drucker verfügbar") + + else: + discovery_results["errors"].append(f"{ip}: Erreichbar, aber kein Tapo-Gerät oder Authentifizierung fehlgeschlagen") + + except Exception as ip_error: + discovery_results["errors"].append(f"{ip}: Fehler beim Test - {str(ip_error)}") + printers_logger.warning(f"Fehler beim Testen von {ip}: {str(ip_error)}") + + # Änderungen speichern + db_session.commit() + db_session.close() + + # Zusammenfassung + summary = { + "tested_ips": len(test_ips), + "discovered_devices": len(discovery_results["discovered_devices"]), + "configured_printers": len(discovery_results["configured_printers"]), + "errors": len(discovery_results["errors"]) + } + + printers_logger.info(f"Tapo-Konfigurationsassistent abgeschlossen: {summary}") + + return jsonify({ + "success": True, + "message": f"Discovery abgeschlossen: {summary['discovered_devices']} Geräte gefunden, " + f"{summary['configured_printers']} Drucker konfiguriert", + "results": discovery_results, + "summary": summary, + "timestamp": datetime.now().isoformat() + }) + + except Exception as e: + printers_logger.error(f"Fehler beim Tapo-Konfigurationsassistent: {str(e)}") + if 'db_session' in locals(): + db_session.close() + return jsonify({ + "success": False, + "error": f"Systemfehler: {str(e)}" + }), 500 + +@printers_blueprint.route("/tapo/validate-configuration/", methods=["POST"]) +@login_required +@require_permission(Permission.ADMIN) +@measure_execution_time(logger=printers_logger, task_name="API-Tapo-Konfigurationsvalidierung") +def validate_tapo_configuration(printer_id): + """ + Validiert die Tapo-Konfiguration eines spezifischen Druckers. + Führt umfassende Tests durch: Ping, Authentifizierung, Funktionalität. + """ + printers_logger.info(f"Tapo-Konfigurationsvalidierung für Drucker {printer_id} von Admin {current_user.name}") + + try: + db_session = get_db_session() + printer = db_session.query(Printer).filter(Printer.id == printer_id).first() + + if not printer: + db_session.close() + return jsonify({ + "success": False, + "error": "Drucker nicht gefunden" + }), 404 + + # Tapo-Controller laden + try: + from utils.hardware_integration import tapo_controller + except Exception as e: + db_session.close() + return jsonify({ + "success": False, + "error": f"Tapo-Controller nicht verfügbar: {str(e)}" + }), 500 + + validation_results = { + "printer": { + "id": printer.id, + "name": printer.name, + "model": printer.model, + "location": printer.location + }, + "configuration": { + "has_ip": bool(printer.plug_ip), + "has_username": bool(printer.plug_username), + "has_password": bool(printer.plug_password), + "ip_address": printer.plug_ip + }, + "tests": { + "ping": {"status": "not_run", "message": ""}, + "authentication": {"status": "not_run", "message": ""}, + "functionality": {"status": "not_run", "message": ""}, + "device_info": {"status": "not_run", "message": ""} + }, + "overall_status": "unknown", + "recommendations": [] + } + + # Konfigurationsprüfung + if not printer.plug_ip: + validation_results["overall_status"] = "not_configured" + validation_results["recommendations"].append("IP-Adresse der Tapo-Steckdose eintragen") + elif not printer.plug_username or not printer.plug_password: + validation_results["overall_status"] = "incomplete_config" + validation_results["recommendations"].append("Benutzername und Passwort für Tapo-Steckdose eintragen") + else: + # Umfassende Tests durchführen + all_tests_passed = True + + # Test 1: Ping/Erreichbarkeit + try: + ping_success = tapo_controller.ping_address(printer.plug_ip, timeout=5) + if ping_success: + validation_results["tests"]["ping"] = { + "status": "passed", + "message": "Steckdose ist im Netzwerk erreichbar" + } + else: + validation_results["tests"]["ping"] = { + "status": "failed", + "message": "Steckdose nicht erreichbar - Netzwerkproblem oder falsche IP" + } + all_tests_passed = False + validation_results["recommendations"].append("IP-Adresse überprüfen") + validation_results["recommendations"].append("Netzwerkverbindung der Steckdose prüfen") + except Exception as ping_error: + validation_results["tests"]["ping"] = { + "status": "error", + "message": f"Ping-Test fehlgeschlagen: {str(ping_error)}" + } + all_tests_passed = False + + # Test 2: Authentifizierung (nur wenn Ping erfolgreich) + if validation_results["tests"]["ping"]["status"] == "passed": + try: + auth_result = tapo_controller.test_connection( + printer.plug_ip, + username=printer.plug_username, + password=printer.plug_password + ) + + if auth_result["success"]: + validation_results["tests"]["authentication"] = { + "status": "passed", + "message": "Authentifizierung erfolgreich" + } + + # Geräteinformationen extrahieren + device_info = auth_result.get("device_info", {}) + validation_results["tests"]["device_info"] = { + "status": "passed", + "message": "Geräteinformationen abgerufen", + "data": { + "nickname": device_info.get("nickname", "Unbekannt"), + "model": device_info.get("model", "Unbekannt"), + "device_on": device_info.get("device_on", False), + "signal_level": device_info.get("signal_level", 0) + } + } + else: + validation_results["tests"]["authentication"] = { + "status": "failed", + "message": f"Authentifizierung fehlgeschlagen: {auth_result.get('error', 'Unbekannt')}" + } + all_tests_passed = False + validation_results["recommendations"].append("Benutzername und Passwort überprüfen") + + except Exception as auth_error: + validation_results["tests"]["authentication"] = { + "status": "error", + "message": f"Authentifizierungstest fehlgeschlagen: {str(auth_error)}" + } + all_tests_passed = False + + # Test 3: Funktionalität (nur wenn Authentifizierung erfolgreich) + if validation_results["tests"]["authentication"]["status"] == "passed": + try: + reachable, status = tapo_controller.check_outlet_status( + printer.plug_ip, + printer_id=printer_id + ) + + if reachable: + validation_results["tests"]["functionality"] = { + "status": "passed", + "message": f"Status erfolgreich abgerufen: {status}", + "current_status": status + } + + # Drucker-Status in DB aktualisieren + printer.last_checked = datetime.now() + printer.status = "online" if status == "on" else "offline" + + else: + validation_results["tests"]["functionality"] = { + "status": "failed", + "message": "Status konnte nicht abgerufen werden" + } + all_tests_passed = False + + except Exception as func_error: + validation_results["tests"]["functionality"] = { + "status": "error", + "message": f"Funktionalitätstest fehlgeschlagen: {str(func_error)}" + } + all_tests_passed = False + + # Gesamtstatus bestimmen + if all_tests_passed: + validation_results["overall_status"] = "fully_functional" + validation_results["recommendations"].append("Konfiguration ist vollständig und funktional") + else: + failed_tests = [test for test, result in validation_results["tests"].items() + if result["status"] in ["failed", "error"]] + + if "ping" in failed_tests: + validation_results["overall_status"] = "network_issue" + elif "authentication" in failed_tests: + validation_results["overall_status"] = "auth_issue" + elif "functionality" in failed_tests: + validation_results["overall_status"] = "functionality_issue" + else: + validation_results["overall_status"] = "partial_failure" + + # Aktuelle Jobs als Sicherheitshinweis + active_jobs = db_session.query(Job).filter( + Job.printer_id == printer_id, + Job.status.in_(["running", "printing", "active"]) + ).count() + + if active_jobs > 0: + validation_results["safety_warning"] = f"{active_jobs} aktive Job(s) - Vorsicht bei Steckdosen-Tests" + + db_session.commit() + db_session.close() + + printers_logger.info(f"Tapo-Validierung für {printer.name} abgeschlossen: {validation_results['overall_status']}") + + return jsonify({ + "success": True, + "validation": validation_results, + "timestamp": datetime.now().isoformat() + }) + + except Exception as e: + printers_logger.error(f"Fehler bei Tapo-Konfigurationsvalidierung: {str(e)}") + if 'db_session' in locals(): + db_session.close() + return jsonify({ + "success": False, + "error": f"Systemfehler: {str(e)}" + }), 500 \ No newline at end of file diff --git a/backend/instance/sessions/00e0681de97456d4750dfce6a339ec57_activity.pkl b/backend/instance/sessions/00e0681de97456d4750dfce6a339ec57_activity.pkl new file mode 100644 index 000000000..da36587c0 Binary files /dev/null and b/backend/instance/sessions/00e0681de97456d4750dfce6a339ec57_activity.pkl differ diff --git a/backend/instance/sessions/099d8cb34320b32d01eb39f628988fbb_activity.pkl b/backend/instance/sessions/099d8cb34320b32d01eb39f628988fbb_activity.pkl new file mode 100644 index 000000000..38115f2d5 Binary files /dev/null and b/backend/instance/sessions/099d8cb34320b32d01eb39f628988fbb_activity.pkl differ diff --git a/backend/instance/sessions/0d7cd5770fc42b86d05cc92ccea7c2d6_activity.pkl b/backend/instance/sessions/0d7cd5770fc42b86d05cc92ccea7c2d6_activity.pkl new file mode 100644 index 000000000..9fa92991d Binary files /dev/null and b/backend/instance/sessions/0d7cd5770fc42b86d05cc92ccea7c2d6_activity.pkl differ diff --git a/backend/instance/sessions/10153a137daa641b93c3c4036fe80389_activity.pkl b/backend/instance/sessions/10153a137daa641b93c3c4036fe80389_activity.pkl new file mode 100644 index 000000000..6c019382d Binary files /dev/null and b/backend/instance/sessions/10153a137daa641b93c3c4036fe80389_activity.pkl differ diff --git a/backend/instance/sessions/11ea8993eb502006e1cb78f14b615c06_activity.pkl b/backend/instance/sessions/11ea8993eb502006e1cb78f14b615c06_activity.pkl new file mode 100644 index 000000000..4c8b2a13b Binary files /dev/null and b/backend/instance/sessions/11ea8993eb502006e1cb78f14b615c06_activity.pkl differ diff --git a/backend/instance/sessions/137dd0dcfbd1689f1e72f0c52559209f_activity.pkl b/backend/instance/sessions/137dd0dcfbd1689f1e72f0c52559209f_activity.pkl new file mode 100644 index 000000000..a4a7c5683 Binary files /dev/null and b/backend/instance/sessions/137dd0dcfbd1689f1e72f0c52559209f_activity.pkl differ diff --git a/backend/instance/sessions/1395680823c34dfb77556ec68f104a7c_activity.pkl b/backend/instance/sessions/1395680823c34dfb77556ec68f104a7c_activity.pkl new file mode 100644 index 000000000..92b99bc29 Binary files /dev/null and b/backend/instance/sessions/1395680823c34dfb77556ec68f104a7c_activity.pkl differ diff --git a/backend/instance/sessions/140cbcf64fb22173ee566e0fa12ca4aa_activity.pkl b/backend/instance/sessions/140cbcf64fb22173ee566e0fa12ca4aa_activity.pkl new file mode 100644 index 000000000..0f297b6df Binary files /dev/null and b/backend/instance/sessions/140cbcf64fb22173ee566e0fa12ca4aa_activity.pkl differ diff --git a/backend/instance/sessions/14b7a85245dcb5dc231ca2c0caf58d02_activity.pkl b/backend/instance/sessions/14b7a85245dcb5dc231ca2c0caf58d02_activity.pkl new file mode 100644 index 000000000..8c79633bd Binary files /dev/null and b/backend/instance/sessions/14b7a85245dcb5dc231ca2c0caf58d02_activity.pkl differ diff --git a/backend/instance/sessions/176919283878b35058352312389d0cfb_activity.pkl b/backend/instance/sessions/176919283878b35058352312389d0cfb_activity.pkl new file mode 100644 index 000000000..24c1427b0 Binary files /dev/null and b/backend/instance/sessions/176919283878b35058352312389d0cfb_activity.pkl differ diff --git a/backend/instance/sessions/19de68d89c081046d31b0ae67fd0bede_activity.pkl b/backend/instance/sessions/19de68d89c081046d31b0ae67fd0bede_activity.pkl new file mode 100644 index 000000000..dfd38f0f8 Binary files /dev/null and b/backend/instance/sessions/19de68d89c081046d31b0ae67fd0bede_activity.pkl differ diff --git a/backend/instance/sessions/2078b337b7bb31c6945eec16abb737f0_activity.pkl b/backend/instance/sessions/2078b337b7bb31c6945eec16abb737f0_activity.pkl new file mode 100644 index 000000000..ca5fadf21 Binary files /dev/null and b/backend/instance/sessions/2078b337b7bb31c6945eec16abb737f0_activity.pkl differ diff --git a/backend/instance/sessions/28a12369d8588d379dc941acd9c9b358_activity.pkl b/backend/instance/sessions/28a12369d8588d379dc941acd9c9b358_activity.pkl new file mode 100644 index 000000000..aa864892a Binary files /dev/null and b/backend/instance/sessions/28a12369d8588d379dc941acd9c9b358_activity.pkl differ diff --git a/backend/instance/sessions/2c96b1ef3587e838ad8da5bbb13bd5f0_activity.pkl b/backend/instance/sessions/2c96b1ef3587e838ad8da5bbb13bd5f0_activity.pkl new file mode 100644 index 000000000..3749f720d Binary files /dev/null and b/backend/instance/sessions/2c96b1ef3587e838ad8da5bbb13bd5f0_activity.pkl differ diff --git a/backend/instance/sessions/2d6ca9d50976534b7ec15a73966f84a0_activity.pkl b/backend/instance/sessions/2d6ca9d50976534b7ec15a73966f84a0_activity.pkl new file mode 100644 index 000000000..5c0cc8b3d Binary files /dev/null and b/backend/instance/sessions/2d6ca9d50976534b7ec15a73966f84a0_activity.pkl differ diff --git a/backend/instance/sessions/30c36d1b97d995d3378c84693e06f67d_activity.pkl b/backend/instance/sessions/30c36d1b97d995d3378c84693e06f67d_activity.pkl new file mode 100644 index 000000000..ae354c2a9 Binary files /dev/null and b/backend/instance/sessions/30c36d1b97d995d3378c84693e06f67d_activity.pkl differ diff --git a/backend/instance/sessions/30d00c69c54f655a39a421d7c62a9d7e_activity.pkl b/backend/instance/sessions/30d00c69c54f655a39a421d7c62a9d7e_activity.pkl new file mode 100644 index 000000000..05d379d2b Binary files /dev/null and b/backend/instance/sessions/30d00c69c54f655a39a421d7c62a9d7e_activity.pkl differ diff --git a/backend/instance/sessions/30ffffd0c92479bdaf75fd049a3db3c4_activity.pkl b/backend/instance/sessions/30ffffd0c92479bdaf75fd049a3db3c4_activity.pkl new file mode 100644 index 000000000..73edc3386 Binary files /dev/null and b/backend/instance/sessions/30ffffd0c92479bdaf75fd049a3db3c4_activity.pkl differ diff --git a/backend/instance/sessions/3418e2eb8938bbebb2dce6b2475a553a_activity.pkl b/backend/instance/sessions/3418e2eb8938bbebb2dce6b2475a553a_activity.pkl new file mode 100644 index 000000000..2777bf476 Binary files /dev/null and b/backend/instance/sessions/3418e2eb8938bbebb2dce6b2475a553a_activity.pkl differ diff --git a/backend/instance/sessions/379baf5c5702c9146cebb9236814639d_activity.pkl b/backend/instance/sessions/379baf5c5702c9146cebb9236814639d_activity.pkl new file mode 100644 index 000000000..2a0782329 Binary files /dev/null and b/backend/instance/sessions/379baf5c5702c9146cebb9236814639d_activity.pkl differ diff --git a/backend/instance/sessions/40192b82ed98615ffa745e8b5faf5a1d_activity.pkl b/backend/instance/sessions/40192b82ed98615ffa745e8b5faf5a1d_activity.pkl new file mode 100644 index 000000000..8969386f1 Binary files /dev/null and b/backend/instance/sessions/40192b82ed98615ffa745e8b5faf5a1d_activity.pkl differ diff --git a/backend/instance/sessions/42eeb01c3da1d29be3fd453e440d95b6_activity.pkl b/backend/instance/sessions/42eeb01c3da1d29be3fd453e440d95b6_activity.pkl new file mode 100644 index 000000000..32fdbefb5 Binary files /dev/null and b/backend/instance/sessions/42eeb01c3da1d29be3fd453e440d95b6_activity.pkl differ diff --git a/backend/instance/sessions/43efcb24d87ac3f3a8db4cdf4df4d31c_activity.pkl b/backend/instance/sessions/43efcb24d87ac3f3a8db4cdf4df4d31c_activity.pkl new file mode 100644 index 000000000..63fffc585 Binary files /dev/null and b/backend/instance/sessions/43efcb24d87ac3f3a8db4cdf4df4d31c_activity.pkl differ diff --git a/backend/instance/sessions/4963988d1056591d96436a026d442c0a_activity.pkl b/backend/instance/sessions/4963988d1056591d96436a026d442c0a_activity.pkl new file mode 100644 index 000000000..a2433e763 Binary files /dev/null and b/backend/instance/sessions/4963988d1056591d96436a026d442c0a_activity.pkl differ diff --git a/backend/instance/sessions/4a9766547ea872324ad0a2b7b40ae883_activity.pkl b/backend/instance/sessions/4a9766547ea872324ad0a2b7b40ae883_activity.pkl new file mode 100644 index 000000000..55e6614c0 Binary files /dev/null and b/backend/instance/sessions/4a9766547ea872324ad0a2b7b40ae883_activity.pkl differ diff --git a/backend/instance/sessions/4b974b5ea72b466e163a1822e494b515_activity.pkl b/backend/instance/sessions/4b974b5ea72b466e163a1822e494b515_activity.pkl new file mode 100644 index 000000000..52e571266 Binary files /dev/null and b/backend/instance/sessions/4b974b5ea72b466e163a1822e494b515_activity.pkl differ diff --git a/backend/instance/sessions/4bf34e610e4fc4498e4dd37b0e40c0a4_activity.pkl b/backend/instance/sessions/4bf34e610e4fc4498e4dd37b0e40c0a4_activity.pkl new file mode 100644 index 000000000..8e22ae9a2 Binary files /dev/null and b/backend/instance/sessions/4bf34e610e4fc4498e4dd37b0e40c0a4_activity.pkl differ diff --git a/backend/instance/sessions/4c8c4710bb2bb11516ef8f0a257e4bbc_activity.pkl b/backend/instance/sessions/4c8c4710bb2bb11516ef8f0a257e4bbc_activity.pkl new file mode 100644 index 000000000..0ba9e7b7c Binary files /dev/null and b/backend/instance/sessions/4c8c4710bb2bb11516ef8f0a257e4bbc_activity.pkl differ diff --git a/backend/instance/sessions/4c8d34999b97675dee2a6711de7c282c_activity.pkl b/backend/instance/sessions/4c8d34999b97675dee2a6711de7c282c_activity.pkl new file mode 100644 index 000000000..b56c01ba4 Binary files /dev/null and b/backend/instance/sessions/4c8d34999b97675dee2a6711de7c282c_activity.pkl differ diff --git a/backend/instance/sessions/4cafa0faa441e496f842f478adb47d05_activity.pkl b/backend/instance/sessions/4cafa0faa441e496f842f478adb47d05_activity.pkl new file mode 100644 index 000000000..90f086766 Binary files /dev/null and b/backend/instance/sessions/4cafa0faa441e496f842f478adb47d05_activity.pkl differ diff --git a/backend/instance/sessions/4e80591a65d68ecfea7ce16d66739ff6_activity.pkl b/backend/instance/sessions/4e80591a65d68ecfea7ce16d66739ff6_activity.pkl new file mode 100644 index 000000000..d67693cd8 Binary files /dev/null and b/backend/instance/sessions/4e80591a65d68ecfea7ce16d66739ff6_activity.pkl differ diff --git a/backend/instance/sessions/5192a1b3241cb017a35929ff09a165d0_activity.pkl b/backend/instance/sessions/5192a1b3241cb017a35929ff09a165d0_activity.pkl new file mode 100644 index 000000000..aa2628825 Binary files /dev/null and b/backend/instance/sessions/5192a1b3241cb017a35929ff09a165d0_activity.pkl differ diff --git a/backend/instance/sessions/533cb5973716affa36b34f5877849c39_activity.pkl b/backend/instance/sessions/533cb5973716affa36b34f5877849c39_activity.pkl new file mode 100644 index 000000000..04c8d1b81 Binary files /dev/null and b/backend/instance/sessions/533cb5973716affa36b34f5877849c39_activity.pkl differ diff --git a/backend/instance/sessions/581629c631554c4861cc8ce838ee1991_activity.pkl b/backend/instance/sessions/581629c631554c4861cc8ce838ee1991_activity.pkl new file mode 100644 index 000000000..eb36f1ee6 Binary files /dev/null and b/backend/instance/sessions/581629c631554c4861cc8ce838ee1991_activity.pkl differ diff --git a/backend/instance/sessions/59b9792e5ab731a70067f0813ff7aee1_activity.pkl b/backend/instance/sessions/59b9792e5ab731a70067f0813ff7aee1_activity.pkl new file mode 100644 index 000000000..46d380576 Binary files /dev/null and b/backend/instance/sessions/59b9792e5ab731a70067f0813ff7aee1_activity.pkl differ diff --git a/backend/instance/sessions/5b057a3e01c47707be36c5d08e3a8b57_activity.pkl b/backend/instance/sessions/5b057a3e01c47707be36c5d08e3a8b57_activity.pkl new file mode 100644 index 000000000..20cfda2d7 Binary files /dev/null and b/backend/instance/sessions/5b057a3e01c47707be36c5d08e3a8b57_activity.pkl differ diff --git a/backend/instance/sessions/5b1e65d11cbfd588a9cf3170bc96c490_activity.pkl b/backend/instance/sessions/5b1e65d11cbfd588a9cf3170bc96c490_activity.pkl new file mode 100644 index 000000000..6b6a3c059 Binary files /dev/null and b/backend/instance/sessions/5b1e65d11cbfd588a9cf3170bc96c490_activity.pkl differ diff --git a/backend/instance/sessions/5ee837e6528a39d7d53583bcbfef388d_activity.pkl b/backend/instance/sessions/5ee837e6528a39d7d53583bcbfef388d_activity.pkl new file mode 100644 index 000000000..0bb1c7fae Binary files /dev/null and b/backend/instance/sessions/5ee837e6528a39d7d53583bcbfef388d_activity.pkl differ diff --git a/backend/instance/sessions/609f066b85c6167ba3f614fb0ae9ecf9_activity.pkl b/backend/instance/sessions/609f066b85c6167ba3f614fb0ae9ecf9_activity.pkl new file mode 100644 index 000000000..5e8e2b3e7 Binary files /dev/null and b/backend/instance/sessions/609f066b85c6167ba3f614fb0ae9ecf9_activity.pkl differ diff --git a/backend/instance/sessions/61315e58f39a272af43ddcaf6ad667f5_activity.pkl b/backend/instance/sessions/61315e58f39a272af43ddcaf6ad667f5_activity.pkl new file mode 100644 index 000000000..6ee6242f8 Binary files /dev/null and b/backend/instance/sessions/61315e58f39a272af43ddcaf6ad667f5_activity.pkl differ diff --git a/backend/instance/sessions/665584367a4c7bb471da7afbb290df4c_activity.pkl b/backend/instance/sessions/665584367a4c7bb471da7afbb290df4c_activity.pkl new file mode 100644 index 000000000..7e960bbc2 Binary files /dev/null and b/backend/instance/sessions/665584367a4c7bb471da7afbb290df4c_activity.pkl differ diff --git a/backend/instance/sessions/6915903bfdb88bfe150816d0b8858492_activity.pkl b/backend/instance/sessions/6915903bfdb88bfe150816d0b8858492_activity.pkl new file mode 100644 index 000000000..4e76f1a50 Binary files /dev/null and b/backend/instance/sessions/6915903bfdb88bfe150816d0b8858492_activity.pkl differ diff --git a/backend/instance/sessions/6db3f507e2c2f6275ab5ecbe4d81d37b_activity.pkl b/backend/instance/sessions/6db3f507e2c2f6275ab5ecbe4d81d37b_activity.pkl new file mode 100644 index 000000000..2408423d3 Binary files /dev/null and b/backend/instance/sessions/6db3f507e2c2f6275ab5ecbe4d81d37b_activity.pkl differ diff --git a/backend/instance/sessions/6e274008e602222d737d1ca6fbf81b8a_activity.pkl b/backend/instance/sessions/6e274008e602222d737d1ca6fbf81b8a_activity.pkl new file mode 100644 index 000000000..8cb11952f Binary files /dev/null and b/backend/instance/sessions/6e274008e602222d737d1ca6fbf81b8a_activity.pkl differ diff --git a/backend/instance/sessions/77cf07985885a0edb3df34e138b4d27a_activity.pkl b/backend/instance/sessions/77cf07985885a0edb3df34e138b4d27a_activity.pkl new file mode 100644 index 000000000..e753881f4 Binary files /dev/null and b/backend/instance/sessions/77cf07985885a0edb3df34e138b4d27a_activity.pkl differ diff --git a/backend/instance/sessions/78fdda0cc094f4a1e0e018d4fa6cbb23_activity.pkl b/backend/instance/sessions/78fdda0cc094f4a1e0e018d4fa6cbb23_activity.pkl new file mode 100644 index 000000000..3fcbc1b4d Binary files /dev/null and b/backend/instance/sessions/78fdda0cc094f4a1e0e018d4fa6cbb23_activity.pkl differ diff --git a/backend/instance/sessions/796c42e3d8c0b2aad4a0b3ceb3a3b11a_activity.pkl b/backend/instance/sessions/796c42e3d8c0b2aad4a0b3ceb3a3b11a_activity.pkl new file mode 100644 index 000000000..49bc94ada Binary files /dev/null and b/backend/instance/sessions/796c42e3d8c0b2aad4a0b3ceb3a3b11a_activity.pkl differ diff --git a/backend/instance/sessions/7cf4716313644d4ed7de5e1d48e9499e_activity.pkl b/backend/instance/sessions/7cf4716313644d4ed7de5e1d48e9499e_activity.pkl new file mode 100644 index 000000000..41d5acab4 Binary files /dev/null and b/backend/instance/sessions/7cf4716313644d4ed7de5e1d48e9499e_activity.pkl differ diff --git a/backend/instance/sessions/7dde6069b5b66f1f252defb7bf09ed8c_activity.pkl b/backend/instance/sessions/7dde6069b5b66f1f252defb7bf09ed8c_activity.pkl new file mode 100644 index 000000000..bdde85438 Binary files /dev/null and b/backend/instance/sessions/7dde6069b5b66f1f252defb7bf09ed8c_activity.pkl differ diff --git a/backend/instance/sessions/7e2bd98accd4bc2b9137eb0d158fc2e2_activity.pkl b/backend/instance/sessions/7e2bd98accd4bc2b9137eb0d158fc2e2_activity.pkl new file mode 100644 index 000000000..1a66e0fca Binary files /dev/null and b/backend/instance/sessions/7e2bd98accd4bc2b9137eb0d158fc2e2_activity.pkl differ diff --git a/backend/instance/sessions/7ee94882179c55b6c3fbe657345033ec_activity.pkl b/backend/instance/sessions/7ee94882179c55b6c3fbe657345033ec_activity.pkl new file mode 100644 index 000000000..db975efed Binary files /dev/null and b/backend/instance/sessions/7ee94882179c55b6c3fbe657345033ec_activity.pkl differ diff --git a/backend/instance/sessions/86ffac4d3ed05b36becb73d15573ff26_activity.pkl b/backend/instance/sessions/86ffac4d3ed05b36becb73d15573ff26_activity.pkl new file mode 100644 index 000000000..b9cb56e45 Binary files /dev/null and b/backend/instance/sessions/86ffac4d3ed05b36becb73d15573ff26_activity.pkl differ diff --git a/backend/instance/sessions/880bf5fda42ff483ac005b4915e6eb14_activity.pkl b/backend/instance/sessions/880bf5fda42ff483ac005b4915e6eb14_activity.pkl new file mode 100644 index 000000000..8ac9b6209 Binary files /dev/null and b/backend/instance/sessions/880bf5fda42ff483ac005b4915e6eb14_activity.pkl differ diff --git a/backend/instance/sessions/8a375372419673f58d75336f6b8e84ef_activity.pkl b/backend/instance/sessions/8a375372419673f58d75336f6b8e84ef_activity.pkl new file mode 100644 index 000000000..5d41faf43 Binary files /dev/null and b/backend/instance/sessions/8a375372419673f58d75336f6b8e84ef_activity.pkl differ diff --git a/backend/instance/sessions/8ad2e0fb3762df5cf2d2948bb3a54a28_activity.pkl b/backend/instance/sessions/8ad2e0fb3762df5cf2d2948bb3a54a28_activity.pkl new file mode 100644 index 000000000..d3e51b532 Binary files /dev/null and b/backend/instance/sessions/8ad2e0fb3762df5cf2d2948bb3a54a28_activity.pkl differ diff --git a/backend/instance/sessions/8d009d13e495b753ff447d0ba3d76892_activity.pkl b/backend/instance/sessions/8d009d13e495b753ff447d0ba3d76892_activity.pkl new file mode 100644 index 000000000..7a5e131ae Binary files /dev/null and b/backend/instance/sessions/8d009d13e495b753ff447d0ba3d76892_activity.pkl differ diff --git a/backend/instance/sessions/8d923b3be570e8ab5074fadcdc573794_activity.pkl b/backend/instance/sessions/8d923b3be570e8ab5074fadcdc573794_activity.pkl new file mode 100644 index 000000000..e0da6d9d8 Binary files /dev/null and b/backend/instance/sessions/8d923b3be570e8ab5074fadcdc573794_activity.pkl differ diff --git a/backend/instance/sessions/907c02bc187a7fc36faedf28c01248de_activity.pkl b/backend/instance/sessions/907c02bc187a7fc36faedf28c01248de_activity.pkl new file mode 100644 index 000000000..1e90a9e39 Binary files /dev/null and b/backend/instance/sessions/907c02bc187a7fc36faedf28c01248de_activity.pkl differ diff --git a/backend/instance/sessions/94bcb89d1f9327db4b06843b38775c54_activity.pkl b/backend/instance/sessions/94bcb89d1f9327db4b06843b38775c54_activity.pkl new file mode 100644 index 000000000..9814bec1b Binary files /dev/null and b/backend/instance/sessions/94bcb89d1f9327db4b06843b38775c54_activity.pkl differ diff --git a/backend/instance/sessions/94f7b9c7b2888f4a4d96429716b300c8_activity.pkl b/backend/instance/sessions/94f7b9c7b2888f4a4d96429716b300c8_activity.pkl new file mode 100644 index 000000000..3eb65faeb Binary files /dev/null and b/backend/instance/sessions/94f7b9c7b2888f4a4d96429716b300c8_activity.pkl differ diff --git a/backend/instance/sessions/96da79332f7dfdba750d3336f41278a1_activity.pkl b/backend/instance/sessions/96da79332f7dfdba750d3336f41278a1_activity.pkl new file mode 100644 index 000000000..414c34d66 Binary files /dev/null and b/backend/instance/sessions/96da79332f7dfdba750d3336f41278a1_activity.pkl differ diff --git a/backend/instance/sessions/9f145e9658c6fd3db6ce9a2040bb3db0_activity.pkl b/backend/instance/sessions/9f145e9658c6fd3db6ce9a2040bb3db0_activity.pkl new file mode 100644 index 000000000..48348ca31 Binary files /dev/null and b/backend/instance/sessions/9f145e9658c6fd3db6ce9a2040bb3db0_activity.pkl differ diff --git a/backend/instance/sessions/9fc307393f2ca28a080571d363a88f15_activity.pkl b/backend/instance/sessions/9fc307393f2ca28a080571d363a88f15_activity.pkl new file mode 100644 index 000000000..16988de91 Binary files /dev/null and b/backend/instance/sessions/9fc307393f2ca28a080571d363a88f15_activity.pkl differ diff --git a/backend/instance/sessions/a017622f2c0a1879dd51bac6cc8bc42a_activity.pkl b/backend/instance/sessions/a017622f2c0a1879dd51bac6cc8bc42a_activity.pkl new file mode 100644 index 000000000..a58c85a53 Binary files /dev/null and b/backend/instance/sessions/a017622f2c0a1879dd51bac6cc8bc42a_activity.pkl differ diff --git a/backend/instance/sessions/a32384612067ea623e7f438931a3414f_activity.pkl b/backend/instance/sessions/a32384612067ea623e7f438931a3414f_activity.pkl new file mode 100644 index 000000000..8bfb7eedd Binary files /dev/null and b/backend/instance/sessions/a32384612067ea623e7f438931a3414f_activity.pkl differ diff --git a/backend/instance/sessions/a8b9cf8b874c1e3cea12cc86245d6278_activity.pkl b/backend/instance/sessions/a8b9cf8b874c1e3cea12cc86245d6278_activity.pkl new file mode 100644 index 000000000..3ce931dab Binary files /dev/null and b/backend/instance/sessions/a8b9cf8b874c1e3cea12cc86245d6278_activity.pkl differ diff --git a/backend/instance/sessions/a960cdcdab943dd4d04d55456a5e0a84_activity.pkl b/backend/instance/sessions/a960cdcdab943dd4d04d55456a5e0a84_activity.pkl new file mode 100644 index 000000000..c115719c8 Binary files /dev/null and b/backend/instance/sessions/a960cdcdab943dd4d04d55456a5e0a84_activity.pkl differ diff --git a/backend/instance/sessions/a9bedb38abeafff57fe03ce36ed9776b_activity.pkl b/backend/instance/sessions/a9bedb38abeafff57fe03ce36ed9776b_activity.pkl new file mode 100644 index 000000000..86ceec431 Binary files /dev/null and b/backend/instance/sessions/a9bedb38abeafff57fe03ce36ed9776b_activity.pkl differ diff --git a/backend/instance/sessions/b156e0fb01278c2a3debbb534f137242_activity.pkl b/backend/instance/sessions/b156e0fb01278c2a3debbb534f137242_activity.pkl new file mode 100644 index 000000000..3807a4fcb Binary files /dev/null and b/backend/instance/sessions/b156e0fb01278c2a3debbb534f137242_activity.pkl differ diff --git a/backend/instance/sessions/b4961e145928e200e6cc4761c7d663cc_activity.pkl b/backend/instance/sessions/b4961e145928e200e6cc4761c7d663cc_activity.pkl new file mode 100644 index 000000000..d78f17411 Binary files /dev/null and b/backend/instance/sessions/b4961e145928e200e6cc4761c7d663cc_activity.pkl differ diff --git a/backend/instance/sessions/b59a39aa36c9ef7fee744e93385f04f7_activity.pkl b/backend/instance/sessions/b59a39aa36c9ef7fee744e93385f04f7_activity.pkl new file mode 100644 index 000000000..d38b64f9c Binary files /dev/null and b/backend/instance/sessions/b59a39aa36c9ef7fee744e93385f04f7_activity.pkl differ diff --git a/backend/instance/sessions/b7ade564159e7ecdd0e96ff4d5a94166_activity.pkl b/backend/instance/sessions/b7ade564159e7ecdd0e96ff4d5a94166_activity.pkl new file mode 100644 index 000000000..94b45c1ad Binary files /dev/null and b/backend/instance/sessions/b7ade564159e7ecdd0e96ff4d5a94166_activity.pkl differ diff --git a/backend/instance/sessions/bf003ae2c2010c0d4b63e065634bf9da_activity.pkl b/backend/instance/sessions/bf003ae2c2010c0d4b63e065634bf9da_activity.pkl new file mode 100644 index 000000000..509b68e9d Binary files /dev/null and b/backend/instance/sessions/bf003ae2c2010c0d4b63e065634bf9da_activity.pkl differ diff --git a/backend/instance/sessions/c0ad6a921f458ac7243f5b0e5bd759f5_activity.pkl b/backend/instance/sessions/c0ad6a921f458ac7243f5b0e5bd759f5_activity.pkl new file mode 100644 index 000000000..90f9394bd Binary files /dev/null and b/backend/instance/sessions/c0ad6a921f458ac7243f5b0e5bd759f5_activity.pkl differ diff --git a/backend/instance/sessions/c276cef789d8f03b5ca8ed2f0e85bc2b_activity.pkl b/backend/instance/sessions/c276cef789d8f03b5ca8ed2f0e85bc2b_activity.pkl new file mode 100644 index 000000000..cafc678a1 Binary files /dev/null and b/backend/instance/sessions/c276cef789d8f03b5ca8ed2f0e85bc2b_activity.pkl differ diff --git a/backend/instance/sessions/c3c36415cc1621ec9485c46b2a650f59_activity.pkl b/backend/instance/sessions/c3c36415cc1621ec9485c46b2a650f59_activity.pkl new file mode 100644 index 000000000..94bf8bd59 Binary files /dev/null and b/backend/instance/sessions/c3c36415cc1621ec9485c46b2a650f59_activity.pkl differ diff --git a/backend/instance/sessions/cbeebe2c05a458bedcf998aec209651d_activity.pkl b/backend/instance/sessions/cbeebe2c05a458bedcf998aec209651d_activity.pkl new file mode 100644 index 000000000..8a1ca0b1f Binary files /dev/null and b/backend/instance/sessions/cbeebe2c05a458bedcf998aec209651d_activity.pkl differ diff --git a/backend/instance/sessions/ce3535e080b322f92e36923b4d237fc7_activity.pkl b/backend/instance/sessions/ce3535e080b322f92e36923b4d237fc7_activity.pkl new file mode 100644 index 000000000..fbcd7b912 Binary files /dev/null and b/backend/instance/sessions/ce3535e080b322f92e36923b4d237fc7_activity.pkl differ diff --git a/backend/instance/sessions/cf497ae9277476b998d4bd359eadcc9f_activity.pkl b/backend/instance/sessions/cf497ae9277476b998d4bd359eadcc9f_activity.pkl new file mode 100644 index 000000000..7984357f6 Binary files /dev/null and b/backend/instance/sessions/cf497ae9277476b998d4bd359eadcc9f_activity.pkl differ diff --git a/backend/instance/sessions/d3877fcfd1cac6adba9a617c3af5d0f9_activity.pkl b/backend/instance/sessions/d3877fcfd1cac6adba9a617c3af5d0f9_activity.pkl new file mode 100644 index 000000000..11f55f0ab Binary files /dev/null and b/backend/instance/sessions/d3877fcfd1cac6adba9a617c3af5d0f9_activity.pkl differ diff --git a/backend/instance/sessions/da5670bff0b14a9ad9d9258984a33db2_activity.pkl b/backend/instance/sessions/da5670bff0b14a9ad9d9258984a33db2_activity.pkl new file mode 100644 index 000000000..f1cce0eae Binary files /dev/null and b/backend/instance/sessions/da5670bff0b14a9ad9d9258984a33db2_activity.pkl differ diff --git a/backend/instance/sessions/db9d27f1e57cb6aa7f163d601f8a450d_activity.pkl b/backend/instance/sessions/db9d27f1e57cb6aa7f163d601f8a450d_activity.pkl new file mode 100644 index 000000000..719db8746 Binary files /dev/null and b/backend/instance/sessions/db9d27f1e57cb6aa7f163d601f8a450d_activity.pkl differ diff --git a/backend/instance/sessions/de87e659f7765bdb70f7e0e1ecca7953_activity.pkl b/backend/instance/sessions/de87e659f7765bdb70f7e0e1ecca7953_activity.pkl new file mode 100644 index 000000000..29aeec12c Binary files /dev/null and b/backend/instance/sessions/de87e659f7765bdb70f7e0e1ecca7953_activity.pkl differ diff --git a/backend/instance/sessions/deb3f85cb892a7acf770e655b84b47a8_activity.pkl b/backend/instance/sessions/deb3f85cb892a7acf770e655b84b47a8_activity.pkl new file mode 100644 index 000000000..a1640274c Binary files /dev/null and b/backend/instance/sessions/deb3f85cb892a7acf770e655b84b47a8_activity.pkl differ diff --git a/backend/instance/sessions/e0b15757d39769801046948c5bcc3288_activity.pkl b/backend/instance/sessions/e0b15757d39769801046948c5bcc3288_activity.pkl new file mode 100644 index 000000000..5b7bc9948 Binary files /dev/null and b/backend/instance/sessions/e0b15757d39769801046948c5bcc3288_activity.pkl differ diff --git a/backend/instance/sessions/e0be62281f61d2bf45c7d180010d1c0a_activity.pkl b/backend/instance/sessions/e0be62281f61d2bf45c7d180010d1c0a_activity.pkl new file mode 100644 index 000000000..6f8dd2d1d Binary files /dev/null and b/backend/instance/sessions/e0be62281f61d2bf45c7d180010d1c0a_activity.pkl differ diff --git a/backend/instance/sessions/e222360e75c920d8c2b83ba14361a960_activity.pkl b/backend/instance/sessions/e222360e75c920d8c2b83ba14361a960_activity.pkl new file mode 100644 index 000000000..65dca2890 Binary files /dev/null and b/backend/instance/sessions/e222360e75c920d8c2b83ba14361a960_activity.pkl differ diff --git a/backend/instance/sessions/e278a873667f58dfd0c39c507de66a1c_activity.pkl b/backend/instance/sessions/e278a873667f58dfd0c39c507de66a1c_activity.pkl new file mode 100644 index 000000000..52f952e6b Binary files /dev/null and b/backend/instance/sessions/e278a873667f58dfd0c39c507de66a1c_activity.pkl differ diff --git a/backend/instance/sessions/e8438a14d9051889f8a050feeebf1655_activity.pkl b/backend/instance/sessions/e8438a14d9051889f8a050feeebf1655_activity.pkl new file mode 100644 index 000000000..714280282 Binary files /dev/null and b/backend/instance/sessions/e8438a14d9051889f8a050feeebf1655_activity.pkl differ diff --git a/backend/instance/sessions/ebcc1be3ea31bcb6f6e00ac1dd7c8470_activity.pkl b/backend/instance/sessions/ebcc1be3ea31bcb6f6e00ac1dd7c8470_activity.pkl new file mode 100644 index 000000000..0500be63e Binary files /dev/null and b/backend/instance/sessions/ebcc1be3ea31bcb6f6e00ac1dd7c8470_activity.pkl differ diff --git a/backend/instance/sessions/eea2f28f8e13f9014b0258eaeecf1108_activity.pkl b/backend/instance/sessions/eea2f28f8e13f9014b0258eaeecf1108_activity.pkl new file mode 100644 index 000000000..2c8e852e9 Binary files /dev/null and b/backend/instance/sessions/eea2f28f8e13f9014b0258eaeecf1108_activity.pkl differ diff --git a/backend/instance/sessions/f08a624e9540bc22f1577b0cb190abb1_activity.pkl b/backend/instance/sessions/f08a624e9540bc22f1577b0cb190abb1_activity.pkl new file mode 100644 index 000000000..deb07ed04 Binary files /dev/null and b/backend/instance/sessions/f08a624e9540bc22f1577b0cb190abb1_activity.pkl differ diff --git a/backend/instance/sessions/f3829bbeda9981c2eebde7842f853fa9_activity.pkl b/backend/instance/sessions/f3829bbeda9981c2eebde7842f853fa9_activity.pkl new file mode 100644 index 000000000..4d8005d70 Binary files /dev/null and b/backend/instance/sessions/f3829bbeda9981c2eebde7842f853fa9_activity.pkl differ diff --git a/backend/instance/sessions/f53edb85637df7d64552a64c5ae69ddc_activity.pkl b/backend/instance/sessions/f53edb85637df7d64552a64c5ae69ddc_activity.pkl new file mode 100644 index 000000000..7d9a781be Binary files /dev/null and b/backend/instance/sessions/f53edb85637df7d64552a64c5ae69ddc_activity.pkl differ diff --git a/backend/instance/sessions/f7fa34beef983b36fb753cada44bfda1_activity.pkl b/backend/instance/sessions/f7fa34beef983b36fb753cada44bfda1_activity.pkl new file mode 100644 index 000000000..e807660d2 Binary files /dev/null and b/backend/instance/sessions/f7fa34beef983b36fb753cada44bfda1_activity.pkl differ diff --git a/backend/instance/sessions/fb793940b60226e99c67673988c2bfb7_activity.pkl b/backend/instance/sessions/fb793940b60226e99c67673988c2bfb7_activity.pkl new file mode 100644 index 000000000..caeddb24b Binary files /dev/null and b/backend/instance/sessions/fb793940b60226e99c67673988c2bfb7_activity.pkl differ diff --git a/backend/instance/sessions/fbf9ff0c21beef61d44db926003c8f61_activity.pkl b/backend/instance/sessions/fbf9ff0c21beef61d44db926003c8f61_activity.pkl new file mode 100644 index 000000000..05456e7c8 Binary files /dev/null and b/backend/instance/sessions/fbf9ff0c21beef61d44db926003c8f61_activity.pkl differ diff --git a/backend/instance/sessions/fd6919eb828c5fce25f9600067dc2e45_activity.pkl b/backend/instance/sessions/fd6919eb828c5fce25f9600067dc2e45_activity.pkl new file mode 100644 index 000000000..4767800ee Binary files /dev/null and b/backend/instance/sessions/fd6919eb828c5fce25f9600067dc2e45_activity.pkl differ diff --git a/backend/instance/sessions/ff5e32116d3e327e9fc01caa44436830_activity.pkl b/backend/instance/sessions/ff5e32116d3e327e9fc01caa44436830_activity.pkl new file mode 100644 index 000000000..bb26ea813 Binary files /dev/null and b/backend/instance/sessions/ff5e32116d3e327e9fc01caa44436830_activity.pkl differ diff --git a/backend/instance/sessions/ffe0495af3a3bbc21760b29b191c914b_activity.pkl b/backend/instance/sessions/ffe0495af3a3bbc21760b29b191c914b_activity.pkl new file mode 100644 index 000000000..22eead901 Binary files /dev/null and b/backend/instance/sessions/ffe0495af3a3bbc21760b29b191c914b_activity.pkl differ diff --git a/backend/logs/admin/admin.log b/backend/logs/admin/admin.log index 5d3b2c82c..beff764a1 100644 --- a/backend/logs/admin/admin.log +++ b/backend/logs/admin/admin.log @@ -42,3 +42,29 @@ 2025-06-13 06:57:25 - [admin] admin - [INFO] INFO - Admin-Check für Funktion admin_dashboard: User authenticated: True, User ID: 1, Is Admin: True 2025-06-13 06:57:25 - [admin] admin - [INFO] INFO - Admin-Dashboard geladen von admin 2025-06-13 06:57:25 - [admin] admin - [ERROR] ERROR - Fehler beim Laden des Admin-Dashboards: 'dict object' has no attribute 'online_printers' +2025-06-13 07:12:37 - [admin] admin - [INFO] INFO - Admin-Check für Funktion api_admin_error_recovery_status: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:12:37 - [admin] admin - [INFO] INFO - Admin-Check für Funktion api_admin_system_health_alias: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:12:37 - [admin] admin - [INFO] INFO - Admin-Check für Funktion api_admin_system_health: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:13:53 - [admin] admin - [INFO] INFO - Admin-Check für Funktion admin_dashboard: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:13:53 - [admin] admin - [INFO] INFO - Admin-Dashboard geladen von admin +2025-06-13 07:13:53 - [admin] admin - [ERROR] ERROR - Fehler beim Laden des Admin-Dashboards: 'dict object' has no attribute 'online_printers' +2025-06-13 07:13:53 - [admin] admin - [INFO] INFO - Admin-Check für Funktion api_admin_system_health_alias: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:13:53 - [admin] admin - [INFO] INFO - Admin-Check für Funktion api_admin_system_health: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:13:58 - [admin] admin - [INFO] INFO - Admin-Check für Funktion logs_overview: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:13:58 - [admin] admin - [INFO] INFO - Logs-Übersicht geladen von admin +2025-06-13 07:13:58 - [admin] admin - [ERROR] ERROR - Fehler beim Laden der Logs-Übersicht: 'dict object' has no attribute 'online_printers' +2025-06-13 07:13:59 - [admin] admin - [INFO] INFO - Admin-Check für Funktion api_admin_system_health_alias: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:13:59 - [admin] admin - [INFO] INFO - Admin-Check für Funktion api_admin_system_health: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:13:59 - [admin] admin - [INFO] INFO - Admin-Check für Funktion get_logs_api: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:13:59 - [admin] admin - [INFO] INFO - Logs abgerufen: 0 Einträge, Level: all +2025-06-13 07:14:00 - [admin] admin - [INFO] INFO - Admin-Check für Funktion get_logs_api: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:14:00 - [admin] admin - [INFO] INFO - Logs abgerufen: 0 Einträge, Level: all +2025-06-13 07:14:02 - [admin] admin - [INFO] INFO - Admin-Check für Funktion advanced_settings: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:14:28 - [admin] admin - [INFO] INFO - Admin-Check für Funktion admin_dashboard: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:14:28 - [admin] admin - [INFO] INFO - Admin-Dashboard geladen von admin +2025-06-13 07:14:28 - [admin] admin - [ERROR] ERROR - Fehler beim Laden des Admin-Dashboards: 'dict object' has no attribute 'online_printers' +2025-06-13 07:14:28 - [admin] admin - [INFO] INFO - Admin-Check für Funktion api_admin_system_health_alias: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:14:28 - [admin] admin - [INFO] INFO - Admin-Check für Funktion api_admin_system_health: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:14:31 - [admin] admin - [INFO] INFO - Admin-Check für Funktion tapo_monitoring: User authenticated: True, User ID: 1, Is Admin: True +2025-06-13 07:14:31 - [admin] admin - [INFO] INFO - Tapo-Monitoring aufgerufen von admin +2025-06-13 07:14:44 - [admin] admin - [INFO] INFO - Tapo-Monitoring geladen: 6 Steckdosen, 0 online diff --git a/backend/logs/admin_api/admin_api.log b/backend/logs/admin_api/admin_api.log index e69de29bb..3feb50a73 100644 --- a/backend/logs/admin_api/admin_api.log +++ b/backend/logs/admin_api/admin_api.log @@ -0,0 +1,15 @@ +2025-06-13 07:12:37 - [admin_api] admin_api - [INFO] INFO - Error-Recovery-Status angefordert von admin +2025-06-13 07:12:37 - [admin_api] admin_api - [ERROR] ERROR - Datenbank-Health-Check fehlgeschlagen: Textual SQL expression 'SELECT 1' should be explicitly declared as text('SELECT 1') +2025-06-13 07:12:37 - [admin_api] admin_api - [ERROR] ERROR - Speicherplatz-Check fehlgeschlagen: module 'os' has no attribute 'statvfs' +2025-06-13 07:12:37 - [admin_api] admin_api - [INFO] INFO - System-Health-Check durchgeführt: unhealthy +2025-06-13 07:12:38 - [admin_api] admin_api - [ERROR] ERROR - Datenbank-Health-Check für Error-Recovery fehlgeschlagen: Textual SQL expression 'SELECT 1' should be explicitly declared as text('SELECT 1') +2025-06-13 07:12:38 - [admin_api] admin_api - [INFO] INFO - Error-Recovery-Status abgerufen: critical +2025-06-13 07:13:53 - [admin_api] admin_api - [ERROR] ERROR - Datenbank-Health-Check fehlgeschlagen: Textual SQL expression 'SELECT 1' should be explicitly declared as text('SELECT 1') +2025-06-13 07:13:53 - [admin_api] admin_api - [ERROR] ERROR - Speicherplatz-Check fehlgeschlagen: module 'os' has no attribute 'statvfs' +2025-06-13 07:13:53 - [admin_api] admin_api - [INFO] INFO - System-Health-Check durchgeführt: unhealthy +2025-06-13 07:13:59 - [admin_api] admin_api - [ERROR] ERROR - Datenbank-Health-Check fehlgeschlagen: Textual SQL expression 'SELECT 1' should be explicitly declared as text('SELECT 1') +2025-06-13 07:13:59 - [admin_api] admin_api - [ERROR] ERROR - Speicherplatz-Check fehlgeschlagen: module 'os' has no attribute 'statvfs' +2025-06-13 07:13:59 - [admin_api] admin_api - [INFO] INFO - System-Health-Check durchgeführt: unhealthy +2025-06-13 07:14:28 - [admin_api] admin_api - [ERROR] ERROR - Datenbank-Health-Check fehlgeschlagen: Textual SQL expression 'SELECT 1' should be explicitly declared as text('SELECT 1') +2025-06-13 07:14:28 - [admin_api] admin_api - [ERROR] ERROR - Speicherplatz-Check fehlgeschlagen: module 'os' has no attribute 'statvfs' +2025-06-13 07:14:28 - [admin_api] admin_api - [INFO] INFO - System-Health-Check durchgeführt: unhealthy diff --git a/backend/logs/api/api.log b/backend/logs/api/api.log index e69de29bb..a6f8c74a8 100644 --- a/backend/logs/api/api.log +++ b/backend/logs/api/api.log @@ -0,0 +1,3 @@ +2025-06-13 07:13:53 - [api] api - [INFO] INFO - Statistiken abgerufen von Benutzer admin +2025-06-13 07:13:59 - [api] api - [INFO] INFO - Statistiken abgerufen von Benutzer admin +2025-06-13 07:14:28 - [api] api - [INFO] INFO - Statistiken abgerufen von Benutzer admin diff --git a/backend/logs/app/app.log b/backend/logs/app/app.log index 6724cfa60..f4d7c3a06 100644 --- a/backend/logs/app/app.log +++ b/backend/logs/app/app.log @@ -21792,3 +21792,311 @@ jinja2.exceptions.UndefinedError: 'stats' is undefined 2025-06-13 06:59:26 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/admin/error-recovery/status 2025-06-13 06:59:26 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/stats 2025-06-13 06:59:26 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/admin/system-health +2025-06-13 07:12:33 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: backend/database/myp.db +2025-06-13 07:12:34 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development +2025-06-13 07:12:34 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False +2025-06-13 07:12:34 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration +2025-06-13 07:12:34 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration +2025-06-13 07:12:34 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert +2025-06-13 07:12:34 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing +2025-06-13 07:12:34 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True +2025-06-13 07:12:34 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True +2025-06-13 07:12:34 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O) +2025-06-13 07:12:34 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 1 erstellt, 0 aktualisiert +2025-06-13 07:12:34 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung +2025-06-13 07:12:34 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde +2025-06-13 07:12:34 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True +2025-06-13 07:12:34 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank... +2025-06-13 07:12:34 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert +2025-06-13 07:12:34 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert +2025-06-13 07:12:34 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin... +2025-06-13 07:12:35 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt. +2025-06-13 07:12:35 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft +2025-06-13 07:12:35 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager... +2025-06-13 07:12:35 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet +2025-06-13 07:12:35 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler... +2025-06-13 07:12:35 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet +2025-06-13 07:12:35 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000 +2025-06-13 07:12:36 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: backend/database/myp.db +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True +2025-06-13 07:12:37 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O) +2025-06-13 07:12:37 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank... +2025-06-13 07:12:37 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin... +2025-06-13 07:12:37 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt. +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager... +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler... +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet +2025-06-13 07:12:37 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000 +2025-06-13 07:12:37 - [app] app - [ERROR] ERROR - Datenbank-Transaktion fehlgeschlagen: Textual SQL expression 'SELECT 1' should be explicitly declared as text('SELECT 1') +2025-06-13 07:12:37 - [app] app - [INFO] INFO - Locating template 'dashboard.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\dashboard.html') +2025-06-13 07:12:37 - [app] app - [INFO] INFO - Locating template 'base.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\base.html') +2025-06-13 07:12:37 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:12:38 - [app] app - [ERROR] ERROR - Datenbank-Transaktion fehlgeschlagen: Textual SQL expression 'SELECT 1' should be explicitly declared as text('SELECT 1') +2025-06-13 07:12:38 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:12:39 - [app] app - [DEBUG] DEBUG - Request: GET /dashboard +2025-06-13 07:12:39 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:12:49 - [app] app - [DEBUG] DEBUG - Request: GET /printers +2025-06-13 07:12:49 - [app] app - [INFO] INFO - Locating template 'printers.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\printers.html') +2025-06-13 07:12:49 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:12:49 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-13 07:12:49 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=True) +2025-06-13 07:12:49 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:12:49 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-13 07:12:49 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=True) +2025-06-13 07:12:49 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:12:54 - [app] app - [DEBUG] DEBUG - Request: GET /jobs +2025-06-13 07:12:54 - [app] app - [INFO] INFO - Locating template 'jobs.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\jobs.html') +2025-06-13 07:12:54 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:12:54 - [app] app - [DEBUG] DEBUG - Request: GET /api/jobs +2025-06-13 07:12:54 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:12:54 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-13 07:12:54 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=True) +2025-06-13 07:12:54 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:12:59 - [app] app - [DEBUG] DEBUG - Request: GET /calendar +2025-06-13 07:12:59 - [app] app - [INFO] INFO - Locating template 'calendar.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\calendar.html') +2025-06-13 07:12:59 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:12:59 - [app] app - [DEBUG] DEBUG - Request: GET /api/calendar/events +2025-06-13 07:12:59 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:06 - [app] app - [DEBUG] DEBUG - Request: GET /api/calendar/events +2025-06-13 07:13:06 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:12 - [app] app - [DEBUG] DEBUG - Request: GET /energy/ +2025-06-13 07:13:12 - [app] app - [INFO] INFO - Locating template 'energy_dashboard.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\energy_dashboard.html') +2025-06-13 07:13:12 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:12 - [app] app - [DEBUG] DEBUG - Request: GET /api/energy/dashboard +2025-06-13 07:13:12 - [app] app - [DEBUG] DEBUG - Request: GET /api/energy/statistics +2025-06-13 07:13:12 - [app] app - [DEBUG] DEBUG - Request: GET /api/energy/live +2025-06-13 07:13:12 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:12 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:12 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:17 - [app] app - [DEBUG] DEBUG - Request: GET /stats +2025-06-13 07:13:17 - [app] app - [INFO] INFO - Locating template 'stats.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\stats.html') +2025-06-13 07:13:17 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:21 - [app] app - [DEBUG] DEBUG - Request: GET /tapo/ +2025-06-13 07:13:33 - [app] app - [INFO] INFO - Locating template 'tapo_control.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\tapo_control.html') +2025-06-13 07:13:33 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:39 - [app] app - [DEBUG] DEBUG - Request: GET /request +2025-06-13 07:13:39 - [app] app - [INFO] INFO - Locating template 'guest_request.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\guest_request.html') +2025-06-13 07:13:39 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:42 - [app] app - [DEBUG] DEBUG - Request: POST /request +2025-06-13 07:13:42 - [app] app - [INFO] INFO - OTP generiert für Guest Request 2 +2025-06-13 07:13:42 - [app] app - [ERROR] ERROR - Datenbank-Transaktion fehlgeschlagen: (sqlite3.OperationalError) table notifications has no column named title +[SQL: INSERT INTO notifications (user_id, title, message, type, payload, created_at, is_read, read_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)] +[parameters: (1, None, None, 'guest_request', '{"request_id": 2, "name": "Till Tomczaktet", "created_at": "2025-06-13T07:13:42.749201", "status": "pending"}', '2025-06-13 07:13:42.954291', 0, None)] +(Background on this error at: https://sqlalche.me/e/20/e3q8) +2025-06-13 07:13:42 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:46 - [app] app - [DEBUG] DEBUG - Request: GET /guest/requests +2025-06-13 07:13:46 - [app] app - [DEBUG] DEBUG - Response: 302 +2025-06-13 07:13:46 - [app] app - [DEBUG] DEBUG - Request: GET /requests/overview +2025-06-13 07:13:46 - [app] app - [INFO] INFO - Locating template 'guest_requests_overview.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\guest_requests_overview.html') +2025-06-13 07:13:46 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:53 - [app] app - [DEBUG] DEBUG - Request: GET /admin/ +2025-06-13 07:13:53 - [app] app - [INFO] INFO - Locating template 'admin.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\admin.html') +2025-06-13 07:13:53 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:53 - [app] app - [DEBUG] DEBUG - Request: GET /api/stats +2025-06-13 07:13:53 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:53 - [app] app - [DEBUG] DEBUG - Request: GET /api/admin/system-health +2025-06-13 07:13:53 - [app] app - [ERROR] ERROR - Datenbank-Transaktion fehlgeschlagen: Textual SQL expression 'SELECT 1' should be explicitly declared as text('SELECT 1') +2025-06-13 07:13:53 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:58 - [app] app - [DEBUG] DEBUG - Request: GET /admin/logs +2025-06-13 07:13:58 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:59 - [app] app - [DEBUG] DEBUG - Request: GET /api/stats +2025-06-13 07:13:59 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:59 - [app] app - [DEBUG] DEBUG - Request: GET /api/admin/system-health +2025-06-13 07:13:59 - [app] app - [ERROR] ERROR - Datenbank-Transaktion fehlgeschlagen: Textual SQL expression 'SELECT 1' should be explicitly declared as text('SELECT 1') +2025-06-13 07:13:59 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:13:59 - [app] app - [DEBUG] DEBUG - Request: GET /admin/api/logs +2025-06-13 07:13:59 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:14:00 - [app] app - [DEBUG] DEBUG - Request: GET /admin/api/logs +2025-06-13 07:14:00 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:14:02 - [app] app - [DEBUG] DEBUG - Request: GET /admin/advanced-settings +2025-06-13 07:14:02 - [app] app - [INFO] INFO - Locating template 'admin_advanced_settings.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\admin_advanced_settings.html') +2025-06-13 07:14:02 - [app] app - [ERROR] ERROR - Unhandled Exception - ID: 20250613_071402 +2025-06-13 07:14:02 - [app] app - [ERROR] ERROR - URL: http://127.0.0.1:5000/admin/advanced-settings +2025-06-13 07:14:02 - [app] app - [ERROR] ERROR - Method: GET +2025-06-13 07:14:02 - [app] app - [ERROR] ERROR - User: admin +2025-06-13 07:14:02 - [app] app - [ERROR] ERROR - Exception Type: UndefinedError +2025-06-13 07:14:02 - [app] app - [ERROR] ERROR - Exception: 'stats' is undefined +2025-06-13 07:14:02 - [app] app - [ERROR] ERROR - Traceback: Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1484, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1469, in dispatch_request + return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask_login\utils.py", line 290, in decorated_view + return current_app.ensure_sync(func)(*args, **kwargs) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\blueprints\admin_unified.py", line 87, in decorated_function + return f(*args, **kwargs) + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\blueprints\admin_unified.py", line 287, in advanced_settings + return render_template('admin_advanced_settings.html') + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 151, in render_template + return _render(app, template, context) + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 132, in _render + rv = template.render(context) + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 1295, in render + self.environment.handle_exception() + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 942, in handle_exception + raise rewrite_traceback_stack(source=source) + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\admin_advanced_settings.html", line 1, in top-level template code + {% extends "base.html" %} + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\base.html", line 433, in top-level template code + {% block content %}{% endblock %} + ^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\admin_advanced_settings.html", line 388, in block 'content' +

{{ stats.total_users }}

+ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 490, in getattr + return getattr(obj, attribute) +jinja2.exceptions.UndefinedError: 'stats' is undefined + +2025-06-13 07:14:02 - [app] app - [INFO] INFO - Locating template 'errors/500.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\errors\\500.html') +2025-06-13 07:14:02 - [app] app - [DEBUG] DEBUG - Response: 500 +2025-06-13 07:14:11 - [app] app - [DEBUG] DEBUG - Request: GET /user/settings +2025-06-13 07:14:11 - [app] app - [INFO] INFO - Locating template 'settings.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\settings.html') +2025-06-13 07:14:11 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:14:11 - [app] app - [DEBUG] DEBUG - Request: GET /api/user/settings +2025-06-13 07:14:11 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:14:16 - [app] app - [DEBUG] DEBUG - Request: PATCH /api/user/setting +2025-06-13 07:14:16 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/user/setting +2025-06-13 07:14:16 - [app] app - [DEBUG] DEBUG - Response: 404 +2025-06-13 07:14:28 - [app] app - [DEBUG] DEBUG - Request: GET /admin/ +2025-06-13 07:14:28 - [app] app - [INFO] INFO - Locating template 'admin.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\admin.html') +2025-06-13 07:14:28 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:14:28 - [app] app - [DEBUG] DEBUG - Request: GET /api/stats +2025-06-13 07:14:28 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:14:28 - [app] app - [DEBUG] DEBUG - Request: GET /api/admin/system-health +2025-06-13 07:14:28 - [app] app - [ERROR] ERROR - Datenbank-Transaktion fehlgeschlagen: Textual SQL expression 'SELECT 1' should be explicitly declared as text('SELECT 1') +2025-06-13 07:14:28 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:14:31 - [app] app - [DEBUG] DEBUG - Request: GET /admin/tapo-monitoring +2025-06-13 07:14:44 - [app] app - [INFO] INFO - Locating template 'admin_tapo_monitoring.html': + 1: trying loader of application '__main__' + class: jinja2.loaders.FileSystemLoader + encoding: 'utf-8' + followlinks: False + searchpath: + - C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates + -> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\admin_tapo_monitoring.html') +2025-06-13 07:14:44 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 07:14:50 - [app] app - [DEBUG] DEBUG - Request: GET /dashboard +2025-06-13 07:14:50 - [app] app - [DEBUG] DEBUG - Response: 200 diff --git a/backend/logs/calendar/calendar.log b/backend/logs/calendar/calendar.log index 7882b0746..565598399 100644 --- a/backend/logs/calendar/calendar.log +++ b/backend/logs/calendar/calendar.log @@ -3,3 +3,5 @@ 2025-06-12 09:43:22 - [calendar] calendar - [INFO] INFO - 📅 Kalender-Events abgerufen: 0 Einträge für Zeitraum 2025-06-07 22:00:00+00:00 bis 2025-06-14 22:00:00+00:00 2025-06-12 20:59:54 - [calendar] calendar - [INFO] INFO - 📅 Kalender-Events abgerufen: 0 Einträge für Zeitraum 2025-06-07 22:00:00+00:00 bis 2025-06-14 22:00:00+00:00 2025-06-12 21:01:17 - [calendar] calendar - [INFO] INFO - 📅 Kalender-Events abgerufen: 0 Einträge für Zeitraum 2025-06-07 22:00:00+00:00 bis 2025-06-14 22:00:00+00:00 +2025-06-13 07:12:59 - [calendar] calendar - [INFO] INFO - 📅 Kalender-Events abgerufen: 0 Einträge für Zeitraum 2025-06-07 22:00:00+00:00 bis 2025-06-14 22:00:00+00:00 +2025-06-13 07:13:06 - [calendar] calendar - [INFO] INFO - 📅 Kalender-Events abgerufen: 44 Einträge für Zeitraum 2025-06-07 22:00:00+00:00 bis 2025-06-14 22:00:00+00:00 diff --git a/backend/logs/core_system/core_system.log b/backend/logs/core_system/core_system.log index e8ba748ea..f3b2a1e87 100644 --- a/backend/logs/core_system/core_system.log +++ b/backend/logs/core_system/core_system.log @@ -170,3 +170,7 @@ 2025-06-13 06:49:43 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion) 2025-06-13 06:57:16 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert 2025-06-13 06:57:16 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion) +2025-06-13 07:12:33 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert +2025-06-13 07:12:33 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion) +2025-06-13 07:12:36 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert +2025-06-13 07:12:36 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion) diff --git a/backend/logs/data_management/data_management.log b/backend/logs/data_management/data_management.log index 6a8e6604e..6c94a6420 100644 --- a/backend/logs/data_management/data_management.log +++ b/backend/logs/data_management/data_management.log @@ -194,3 +194,7 @@ 2025-06-13 06:49:44 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) 2025-06-13 06:57:17 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert 2025-06-13 06:57:17 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-13 07:12:33 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert +2025-06-13 07:12:33 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-13 07:12:36 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert +2025-06-13 07:12:36 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) diff --git a/backend/logs/energy_monitoring/energy_monitoring.log b/backend/logs/energy_monitoring/energy_monitoring.log index 8adf5932f..e5d2389c9 100644 --- a/backend/logs/energy_monitoring/energy_monitoring.log +++ b/backend/logs/energy_monitoring/energy_monitoring.log @@ -30,3 +30,13 @@ 2025-06-13 06:49:42 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert 2025-06-13 06:49:45 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert 2025-06-13 06:57:20 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert +2025-06-13 07:12:34 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert +2025-06-13 07:12:37 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert +2025-06-13 07:13:12 - [energy_monitoring] energy_monitoring - [INFO] INFO - 🔋 Energiemonitoring-Dashboard aufgerufen von admin +2025-06-13 07:13:12 - [energy_monitoring] energy_monitoring - [INFO] INFO - 📈 API-Energiestatistiken (today) von admin +2025-06-13 07:13:12 - [energy_monitoring] energy_monitoring - [INFO] INFO - 📊 API-Energiemonitoring-Dashboard von admin +2025-06-13 07:13:12 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiestatistiken erfolgreich erstellt für Zeitraum: today +2025-06-13 07:13:12 - [energy_monitoring] energy_monitoring - [INFO] INFO - [OK] API-Energiestatistiken 'api_energy_statistics' erfolgreich in 5.61ms +2025-06-13 07:13:12 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Dashboard-Daten erfolgreich erstellt: 0 Geräte online +2025-06-13 07:13:12 - [energy_monitoring] energy_monitoring - [INFO] INFO - [OK] API-Energiemonitoring-Dashboard 'api_energy_dashboard' erfolgreich in 7.50ms +2025-06-13 07:13:12 - [energy_monitoring] energy_monitoring - [INFO] INFO - [OK] API-Live-Energiedaten 'api_live_energy_data' erfolgreich in 5.26ms diff --git a/backend/logs/guest/guest.log b/backend/logs/guest/guest.log index b35fe9f34..d93215ae3 100644 --- a/backend/logs/guest/guest.log +++ b/backend/logs/guest/guest.log @@ -30,3 +30,7 @@ WHERE user_permissions.can_approve_jobs = 1] 2025-06-12 15:24:59 - [guest] guest - [ERROR] ERROR - Fehler beim Abrufen der Benachrichtigungen: Entity namespace for "notifications" has no property "read" 2025-06-12 15:25:29 - [guest] guest - [ERROR] ERROR - Fehler beim Abrufen der Benachrichtigungen: Entity namespace for "notifications" has no property "read" 2025-06-13 06:57:05 - [guest] guest - [INFO] INFO - Neue Gastanfrage erstellt: ID 1, Name: Till Tomczaktet, OTP generiert +2025-06-13 07:13:42 - [guest] guest - [ERROR] ERROR - Fehler beim Erstellen der Gastanfrage: (sqlite3.OperationalError) table notifications has no column named title +[SQL: INSERT INTO notifications (user_id, title, message, type, payload, created_at, is_read, read_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)] +[parameters: (1, None, None, 'guest_request', '{"request_id": 2, "name": "Till Tomczaktet", "created_at": "2025-06-13T07:13:42.749201", "status": "pending"}', '2025-06-13 07:13:42.954291', 0, None)] +(Background on this error at: https://sqlalche.me/e/20/e3q8) diff --git a/backend/logs/hardware_integration/hardware_integration.log b/backend/logs/hardware_integration/hardware_integration.log index f59fb6e3e..2e0a7688a 100644 --- a/backend/logs/hardware_integration/hardware_integration.log +++ b/backend/logs/hardware_integration/hardware_integration.log @@ -470,3 +470,47 @@ 2025-06-13 06:57:17 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor initialisiert 2025-06-13 06:57:17 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert 2025-06-13 06:57:17 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion) +2025-06-13 07:12:33 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ PyP100 (TP-Link Tapo) verfügbar +2025-06-13 07:12:33 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor initialisiert +2025-06-13 07:12:33 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert +2025-06-13 07:12:33 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion) +2025-06-13 07:12:36 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ PyP100 (TP-Link Tapo) verfügbar +2025-06-13 07:12:36 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor initialisiert +2025-06-13 07:12:36 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert +2025-06-13 07:12:36 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion) +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [INFO] INFO - 🔋 Sammle Energiestatistiken von allen P110 Steckdosen... +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 1 - Halle A nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 2 - Halle A nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 3 - Halle B nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 4 - Halle B nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 5 - Labor nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 6 - Werkstatt nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Energiestatistiken erfolgreich gesammelt: 0/6 Geräte online +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Gesamtverbrauch: 0.0W aktuell, 0.0Wh heute +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [INFO] INFO - 🔋 Sammle Energiestatistiken von allen P110 Steckdosen... +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [INFO] INFO - 🔋 Sammle Energiestatistiken von allen P110 Steckdosen... +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [INFO] INFO - 🔋 Sammle Energiestatistiken von allen P110 Steckdosen... +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 1 - Halle A nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 2 - Halle A nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 3 - Halle B nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 4 - Halle B nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 5 - Labor nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 6 - Werkstatt nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Energiestatistiken erfolgreich gesammelt: 0/6 Geräte online +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 1 - Halle A nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 1 - Halle A nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Gesamtverbrauch: 0.0W aktuell, 0.0Wh heute +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 2 - Halle A nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 2 - Halle A nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 3 - Halle B nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 3 - Halle B nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 4 - Halle B nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 4 - Halle B nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 5 - Labor nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 5 - Labor nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 6 - Werkstatt nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [WARNING] WARNING - ⚠️ Konnte Energiedaten für 3D-Drucker 6 - Werkstatt nicht abrufen: module 'PyP100.PyP100' has no attribute 'P110' +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Energiestatistiken erfolgreich gesammelt: 0/6 Geräte online +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Energiestatistiken erfolgreich gesammelt: 0/6 Geräte online +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Gesamtverbrauch: 0.0W aktuell, 0.0Wh heute +2025-06-13 07:13:12 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Gesamtverbrauch: 0.0W aktuell, 0.0Wh heute diff --git a/backend/logs/job_queue_system/job_queue_system.log b/backend/logs/job_queue_system/job_queue_system.log index 47eaf37cb..b4ca7fd51 100644 --- a/backend/logs/job_queue_system/job_queue_system.log +++ b/backend/logs/job_queue_system/job_queue_system.log @@ -370,3 +370,11 @@ 2025-06-13 06:57:20 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität) 2025-06-13 06:59:55 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität) 2025-06-13 06:59:55 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität) +2025-06-13 07:12:33 - [job_queue_system] job_queue_system - [INFO] INFO - ✅ Job & Queue System Module initialisiert +2025-06-13 07:12:33 - [job_queue_system] job_queue_system - [INFO] INFO - 📊 MASSIVE Konsolidierung: 4 Dateien → 1 Datei (75% Reduktion) +2025-06-13 07:12:35 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität) +2025-06-13 07:12:36 - [job_queue_system] job_queue_system - [INFO] INFO - ✅ Job & Queue System Module initialisiert +2025-06-13 07:12:36 - [job_queue_system] job_queue_system - [INFO] INFO - 📊 MASSIVE Konsolidierung: 4 Dateien → 1 Datei (75% Reduktion) +2025-06-13 07:12:37 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität) +2025-06-13 07:14:55 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität) +2025-06-13 07:14:55 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität) diff --git a/backend/logs/jobs/jobs.log b/backend/logs/jobs/jobs.log index cac9853c5..27d6a2264 100644 --- a/backend/logs/jobs/jobs.log +++ b/backend/logs/jobs/jobs.log @@ -565,3 +565,5 @@ IndexError: tuple index out of range 2025-06-12 21:00:27 - [jobs] jobs - [INFO] INFO - ✅ Jobs erfolgreich abgerufen: 0 von 0 (Seite 1) 2025-06-12 21:12:23 - [jobs] jobs - [INFO] INFO - 📋 Jobs-Abfrage gestartet von Benutzer 1 (Admin: True) 2025-06-12 21:12:23 - [jobs] jobs - [INFO] INFO - ✅ Jobs erfolgreich abgerufen: 0 von 0 (Seite 1) +2025-06-13 07:12:54 - [jobs] jobs - [INFO] INFO - 📋 Jobs-Abfrage gestartet von Benutzer 1 (Admin: True) +2025-06-13 07:12:54 - [jobs] jobs - [INFO] INFO - ✅ Jobs erfolgreich abgerufen: 0 von 0 (Seite 1) diff --git a/backend/logs/monitoring_analytics/monitoring_analytics.log b/backend/logs/monitoring_analytics/monitoring_analytics.log index 4c9fd6754..ce81668f1 100644 --- a/backend/logs/monitoring_analytics/monitoring_analytics.log +++ b/backend/logs/monitoring_analytics/monitoring_analytics.log @@ -194,3 +194,7 @@ 2025-06-13 06:49:45 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) 2025-06-13 06:57:20 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert 2025-06-13 06:57:20 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-13 07:12:34 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert +2025-06-13 07:12:34 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-13 07:12:37 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert +2025-06-13 07:12:37 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) diff --git a/backend/logs/permissions/permissions.log b/backend/logs/permissions/permissions.log new file mode 100644 index 000000000..c310890de --- /dev/null +++ b/backend/logs/permissions/permissions.log @@ -0,0 +1,3 @@ +2025-06-13 07:12:34 - [permissions] permissions - [INFO] INFO - UserPermission für Admin admin (ID: 1) erstellt +2025-06-13 07:12:34 - [permissions] permissions - [INFO] INFO - Admin-Berechtigungen korrigiert: 1 erstellt, 0 aktualisiert +2025-06-13 07:12:37 - [permissions] permissions - [INFO] INFO - Admin-Berechtigungen korrigiert: 0 erstellt, 0 aktualisiert diff --git a/backend/logs/scheduler/scheduler.log b/backend/logs/scheduler/scheduler.log index 5c00ee813..f8aa76d5c 100644 --- a/backend/logs/scheduler/scheduler.log +++ b/backend/logs/scheduler/scheduler.log @@ -272,3 +272,9 @@ 2025-06-13 06:57:17 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True 2025-06-13 06:57:20 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet 2025-06-13 06:57:20 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet +2025-06-13 07:12:33 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True +2025-06-13 07:12:35 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet +2025-06-13 07:12:35 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet +2025-06-13 07:12:36 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True +2025-06-13 07:12:37 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet +2025-06-13 07:12:37 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet diff --git a/backend/logs/security_suite/security_suite.log b/backend/logs/security_suite/security_suite.log index ace16fb79..18218c6fd 100644 --- a/backend/logs/security_suite/security_suite.log +++ b/backend/logs/security_suite/security_suite.log @@ -293,3 +293,9 @@ 2025-06-13 06:57:17 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert 2025-06-13 06:57:17 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) 2025-06-13 06:57:20 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert +2025-06-13 07:12:33 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert +2025-06-13 07:12:33 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-13 07:12:34 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert +2025-06-13 07:12:36 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert +2025-06-13 07:12:36 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-13 07:12:37 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert diff --git a/backend/logs/startup/startup.log b/backend/logs/startup/startup.log index e21e420e1..507221fcc 100644 --- a/backend/logs/startup/startup.log +++ b/backend/logs/startup/startup.log @@ -856,3 +856,21 @@ 2025-06-13 06:57:20 - [startup] startup - [INFO] INFO - 🪟 Windows-Modus: Aktiviert 2025-06-13 06:57:20 - [startup] startup - [INFO] INFO - 🔒 Windows-sichere Log-Rotation: Aktiviert 2025-06-13 06:57:20 - [startup] startup - [INFO] INFO - ================================================== +2025-06-13 07:12:34 - [startup] startup - [INFO] INFO - ================================================== +2025-06-13 07:12:34 - [startup] startup - [INFO] INFO - [START] MYP Platform Backend wird gestartet... +2025-06-13 07:12:34 - [startup] startup - [INFO] INFO - 🐍 Python Version: 3.13.3 (tags/v3.13.3:6280bb5, Apr 8 2025, 14:47:33) [MSC v.1943 64 bit (AMD64)] +2025-06-13 07:12:34 - [startup] startup - [INFO] INFO - 💻 Betriebssystem: nt (win32) +2025-06-13 07:12:34 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend +2025-06-13 07:12:34 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-13T07:12:34.859970 +2025-06-13 07:12:34 - [startup] startup - [INFO] INFO - 🪟 Windows-Modus: Aktiviert +2025-06-13 07:12:34 - [startup] startup - [INFO] INFO - 🔒 Windows-sichere Log-Rotation: Aktiviert +2025-06-13 07:12:34 - [startup] startup - [INFO] INFO - ================================================== +2025-06-13 07:12:37 - [startup] startup - [INFO] INFO - ================================================== +2025-06-13 07:12:37 - [startup] startup - [INFO] INFO - [START] MYP Platform Backend wird gestartet... +2025-06-13 07:12:37 - [startup] startup - [INFO] INFO - 🐍 Python Version: 3.13.3 (tags/v3.13.3:6280bb5, Apr 8 2025, 14:47:33) [MSC v.1943 64 bit (AMD64)] +2025-06-13 07:12:37 - [startup] startup - [INFO] INFO - 💻 Betriebssystem: nt (win32) +2025-06-13 07:12:37 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend +2025-06-13 07:12:37 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-13T07:12:37.315577 +2025-06-13 07:12:37 - [startup] startup - [INFO] INFO - 🪟 Windows-Modus: Aktiviert +2025-06-13 07:12:37 - [startup] startup - [INFO] INFO - 🔒 Windows-sichere Log-Rotation: Aktiviert +2025-06-13 07:12:37 - [startup] startup - [INFO] INFO - ================================================== diff --git a/backend/logs/tapo_control/tapo_control.log b/backend/logs/tapo_control/tapo_control.log index d83a6e4df..d4dde6a90 100644 --- a/backend/logs/tapo_control/tapo_control.log +++ b/backend/logs/tapo_control/tapo_control.log @@ -69,3 +69,11 @@ 2025-06-12 21:12:37 - [tapo_control] tapo_control - [WARNING] WARNING - ⚠️ Steckdose 5 (192.168.1.205) nicht erreichbar 2025-06-12 21:12:39 - [tapo_control] tapo_control - [WARNING] WARNING - ⚠️ Steckdose 6 (192.168.1.206) nicht erreichbar 2025-06-12 21:12:39 - [tapo_control] tapo_control - [INFO] INFO - Dashboard geladen: 6 Steckdosen konfiguriert, 0 online +2025-06-13 07:13:21 - [tapo_control] tapo_control - [INFO] INFO - Tapo Dashboard aufgerufen von Benutzer: Administrator +2025-06-13 07:13:23 - [tapo_control] tapo_control - [WARNING] WARNING - ⚠️ Steckdose 1 (192.168.1.201) nicht erreichbar +2025-06-13 07:13:25 - [tapo_control] tapo_control - [WARNING] WARNING - ⚠️ Steckdose 2 (192.168.1.202) nicht erreichbar +2025-06-13 07:13:27 - [tapo_control] tapo_control - [WARNING] WARNING - ⚠️ Steckdose 3 (192.168.1.203) nicht erreichbar +2025-06-13 07:13:29 - [tapo_control] tapo_control - [WARNING] WARNING - ⚠️ Steckdose 4 (192.168.1.204) nicht erreichbar +2025-06-13 07:13:31 - [tapo_control] tapo_control - [WARNING] WARNING - ⚠️ Steckdose 5 (192.168.1.205) nicht erreichbar +2025-06-13 07:13:33 - [tapo_control] tapo_control - [WARNING] WARNING - ⚠️ Steckdose 6 (192.168.1.206) nicht erreichbar +2025-06-13 07:13:33 - [tapo_control] tapo_control - [INFO] INFO - Dashboard geladen: 6 Steckdosen konfiguriert, 0 online diff --git a/backend/logs/tapo_controller/tapo_controller.log b/backend/logs/tapo_controller/tapo_controller.log index cdd7c9943..0e5470f1e 100644 --- a/backend/logs/tapo_controller/tapo_controller.log +++ b/backend/logs/tapo_controller/tapo_controller.log @@ -98,3 +98,5 @@ 2025-06-13 06:49:37 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert 2025-06-13 06:49:44 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert 2025-06-13 06:57:17 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert +2025-06-13 07:12:33 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert +2025-06-13 07:12:36 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert diff --git a/backend/logs/tapo_status_manager/tapo_status_manager.log b/backend/logs/tapo_status_manager/tapo_status_manager.log index 796fce71a..609521608 100644 --- a/backend/logs/tapo_status_manager/tapo_status_manager.log +++ b/backend/logs/tapo_status_manager/tapo_status_manager.log @@ -55,3 +55,5 @@ 2025-06-13 06:49:37 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager initialisiert 2025-06-13 06:49:44 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager initialisiert 2025-06-13 06:57:17 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager initialisiert +2025-06-13 07:12:33 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager initialisiert +2025-06-13 07:12:36 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager initialisiert diff --git a/backend/logs/user/user.log b/backend/logs/user/user.log index 0aa43ba29..421dd3603 100644 --- a/backend/logs/user/user.log +++ b/backend/logs/user/user.log @@ -82,3 +82,5 @@ 2025-06-12 21:00:49 - [user] user - [INFO] INFO - User admin accessed settings page 2025-06-12 21:00:49 - [user] user - [INFO] INFO - User admin retrieved settings via API 2025-06-12 21:01:00 - [user] user - [INFO] INFO - User admin updated settings via API +2025-06-13 07:14:11 - [user] user - [INFO] INFO - User admin accessed settings page +2025-06-13 07:14:11 - [user] user - [INFO] INFO - User admin retrieved settings via API diff --git a/backend/logs/utilities_collection/utilities_collection.log b/backend/logs/utilities_collection/utilities_collection.log index e4617289e..c05dad037 100644 --- a/backend/logs/utilities_collection/utilities_collection.log +++ b/backend/logs/utilities_collection/utilities_collection.log @@ -204,3 +204,7 @@ 2025-06-13 06:49:43 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) 2025-06-13 06:57:16 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert 2025-06-13 06:57:16 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) +2025-06-13 07:12:33 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert +2025-06-13 07:12:33 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) +2025-06-13 07:12:36 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert +2025-06-13 07:12:36 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) diff --git a/backend/logs/windows_fixes/windows_fixes.log b/backend/logs/windows_fixes/windows_fixes.log index 262637f04..106228fa9 100644 --- a/backend/logs/windows_fixes/windows_fixes.log +++ b/backend/logs/windows_fixes/windows_fixes.log @@ -173,3 +173,7 @@ 2025-06-13 06:49:43 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet 2025-06-13 06:57:16 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an... 2025-06-13 06:57:16 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet +2025-06-13 07:12:33 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an... +2025-06-13 07:12:33 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet +2025-06-13 07:12:36 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an... +2025-06-13 07:12:36 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet diff --git a/backend/templates/admin.html b/backend/templates/admin.html index c18b63351..274d4c7d5 100644 --- a/backend/templates/admin.html +++ b/backend/templates/admin.html @@ -278,6 +278,14 @@ document.addEventListener('DOMContentLoaded', function() { TBA-Anträge + + + + + + Tapo-Monitoring + diff --git a/backend/templates/admin_tapo_monitoring.html b/backend/templates/admin_tapo_monitoring.html new file mode 100644 index 000000000..bde62c6c7 --- /dev/null +++ b/backend/templates/admin_tapo_monitoring.html @@ -0,0 +1,585 @@ +{% extends "base.html" %} + +{% block title %}Tapo-Steckdosen-Monitoring - Admin | MYP Platform{% endblock %} + +{% block head %} +{{ super() }} + + + + + + + +{% endblock %} + +{% block content %} + +
+
+
+
+ Tapo-Steckdosen werden überprüft... +
+
+
+ + +
+
+
+
+ +
+ + + +
+ +

+ + Tapo-Steckdosen-Monitoring + +

+

+ Real-Time-Überwachung und Verwaltung aller TP-Link Tapo Smart Plugs im TBA Mercedes-Benz System +

+ + +
+
+
{{ stats.printers_with_tapo }}
+
Konfigurierte Steckdosen
+
+
+
{{ stats.online_count }}
+
Online
+
+
+
{{ stats.coverage_percentage }}%
+
Abdeckung
+
+
+
+
+
+ + +
+ +
+
+
+ + + +
+
+
{{ stats.printers_with_tapo }}
+
Smart Plugs
+
+
+
+
+ + {{ 'System verfügbar' if stats.tapo_available else 'System offline' }} + +
+
+ + +
+
+
+ + + +
+
+
{{ stats.online_count }}
+
Eingeschaltet
+
+
+
+
+
+
+ + +
+
+
+ + + +
+
+
{{ stats.offline_count }}
+
Ausgeschaltet
+
+
+
+
+
+
+ + +
+
+
+ + + +
+
+
{{ stats.error_count }}
+
Nicht erreichbar
+
+
+
+
+
+
+
+ + +
+
+

+ + + + Massensteuerung +

+ +
+ + + + + + + +
+
+ + +
+ + 0 Steckdosen ausgewählt +
+
+ + +
+
+

+ + + + Drucker-Steckdosen-Status +

+

+ Live-Status aller konfigurierten Tapo-Steckdosen (automatische Aktualisierung alle 30 Sekunden) +

+
+ +
+ {% if printer_status %} +
+ {% for printer in printer_status %} +
+ + +
+
+ +
+

{{ printer.name }}

+

{{ printer.model }}

+
+
+ + +
+
+
+ + {% if printer.plug_status == 'on' %} + Eingeschaltet + {% elif printer.plug_status == 'off' %} + Ausgeschaltet + {% else %} + Nicht erreichbar + {% endif %} + +
+ {{ printer.plug_ip }} +
+
+ + +
+
+ Standort: + {{ printer.location or 'Nicht angegeben' }} +
+
+ Aktive Jobs: + {{ printer.active_jobs }} +
+
+ Letzte Prüfung: + {{ printer.last_checked.strftime('%H:%M:%S') }} +
+
+ + + {% if printer.has_issues %} +
+
+ + + +
+

Achtung:

+
    + {% if not printer.plug_reachable %} +
  • Steckdose nicht erreichbar
  • + {% endif %} + {% if printer.active_jobs > 0 %} +
  • {{ printer.active_jobs }} aktive Job(s) - Vorsicht beim Ausschalten
  • + {% endif %} + {% if printer.error %} +
  • {{ printer.error }}
  • + {% endif %} +
+
+
+
+ {% endif %} + + +
+ {% if printer.plug_reachable %} + + {% else %} + + {% endif %} + + +
+
+ {% endfor %} +
+ {% else %} +
+ + + +

Keine Tapo-Steckdosen konfiguriert

+

+ Es wurden noch keine Drucker mit Tapo-Steckdosen eingerichtet. +

+ + + + + Drucker konfigurieren + +
+ {% endif %} +
+
+ + + +{% endblock %} diff --git a/backend/templates/base.html b/backend/templates/base.html index c84d809a9..682a5781d 100644 --- a/backend/templates/base.html +++ b/backend/templates/base.html @@ -187,7 +187,7 @@ {% if current_user.is_authenticated %}

- Professionelles 3D-Druck Management + 3D-Druck Management

diff --git a/backend/utils/__pycache__/permissions.cpython-313.pyc b/backend/utils/__pycache__/permissions.cpython-313.pyc index c468647fd..ea5e21653 100644 Binary files a/backend/utils/__pycache__/permissions.cpython-313.pyc and b/backend/utils/__pycache__/permissions.cpython-313.pyc differ