From ae95d82afcbd49c37544fe536e2ee821cd27250d Mon Sep 17 00:00:00 2001 From: Till Tomczak Date: Fri, 13 Jun 2025 07:05:57 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=89=20Improved=20session=20management?= =?UTF-8?q?=20system=20and=20logs=20organization=20=F0=9F=8E=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app.py | 61 ++++ backend/backend/database/myp.db | Bin 102400 -> 102400 bytes .../__pycache__/legal_pages.cpython-313.pyc | Bin 0 -> 2669 bytes backend/blueprints/api.py | 270 +++++++++++++++++- ...a4fb33ce7ae6fb8d967ccce4bd773_activity.pkl | Bin 0 -> 60 bytes ...ab3d7ae29442a41e5e626754a5a20_activity.pkl | Bin 0 -> 60 bytes ...3acfa92148ecd42a0014ad1c85d8e_activity.pkl | Bin 0 -> 60 bytes ...f3287be3ce1abf681ec8d56623a39_activity.pkl | Bin 0 -> 60 bytes ...18b9852a07b18b70e49b8ef5b6f91_activity.pkl | Bin 0 -> 60 bytes ...fe5f4b8ea97113ee10702686d9152_activity.pkl | Bin 0 -> 60 bytes ...559fb1d200c6295514bc50173918c_activity.pkl | Bin 0 -> 60 bytes ...540ad515918c2927314edd694eac9_activity.pkl | Bin 0 -> 60 bytes ...f73f7290957260a8031b793c6c77b_activity.pkl | Bin 0 -> 60 bytes ...a38102c3e1d7cd341f33c888f2790_activity.pkl | Bin 0 -> 60 bytes ...9a6af01ce6b81f9232c1a18d9c678_activity.pkl | Bin 0 -> 60 bytes ...94b657816f03e455ad655a7e44087_activity.pkl | Bin 0 -> 60 bytes ...e6cf4ce77e99e51f25a220f177f52_activity.pkl | Bin 0 -> 60 bytes ...92a26589a7644ed71800b5359d08c_activity.pkl | Bin 0 -> 60 bytes ...544b674cfae74d9365b7fcf6e9d87_activity.pkl | Bin 0 -> 60 bytes ...bc79b9e05a5b70c8b75e2e50479c3_activity.pkl | Bin 0 -> 60 bytes ...b8564fb13b32146277bb7f86427fb_activity.pkl | Bin 0 -> 60 bytes ...a23c5f56054244db2086b59da2eb8_activity.pkl | Bin 0 -> 60 bytes ...d7e95118a629021a3ba0e01ae63e4_activity.pkl | Bin 0 -> 60 bytes ...30b69051553484e59841dbd41509d_activity.pkl | Bin 0 -> 60 bytes ...16accfb0f0ac88f586c5f0c4185f0_activity.pkl | Bin 0 -> 60 bytes ...10d1c0743d247526ec97b314eba41_activity.pkl | Bin 0 -> 60 bytes ...1faf17a60f8db26b67c746c12dd76_activity.pkl | Bin 0 -> 60 bytes ...f3e283507cc253e464d89f0bf1743_activity.pkl | Bin 0 -> 60 bytes ...b0961897d23583d192fb145ec7b28_activity.pkl | Bin 0 -> 60 bytes ...18ea53ed298676bebc9bf87bdfced_activity.pkl | Bin 0 -> 60 bytes ...63b99fb11f35a1d5d30f6c48693fd_activity.pkl | Bin 0 -> 60 bytes ...a04edfccf40704473b4ea108bd25e_activity.pkl | Bin 0 -> 60 bytes ...c358daaabe206e30ba06aee465b8e_activity.pkl | Bin 0 -> 60 bytes ...c9350c4fcd749d212a866b172c26f_activity.pkl | Bin 0 -> 60 bytes ...66c63c21789a541073b50cc1140e8_activity.pkl | Bin 0 -> 60 bytes ...fd4f1d43bed0183c2d20e1b18c33e_activity.pkl | Bin 0 -> 60 bytes ...5fcbca78e94e127091f16e3590f06_activity.pkl | Bin 0 -> 60 bytes ...fa22233fe08a20bb73daffde21466_activity.pkl | Bin 0 -> 60 bytes ...6751d9239431b59d8e7336f8fa15d_activity.pkl | Bin 0 -> 60 bytes ...b7d4b5fb5dd3dd5c801b14e214783_activity.pkl | Bin 0 -> 60 bytes ...ad948116fccd6cc455771d5221c10_activity.pkl | Bin 0 -> 60 bytes ...818048092ae6e57f731f8b9df6d9e_activity.pkl | Bin 0 -> 60 bytes ...f47e54c85022c21cf4209b256fe84_activity.pkl | Bin 0 -> 60 bytes ...d38605a34a7157557bfe7964cde0d_activity.pkl | Bin 0 -> 60 bytes ...4d154433816fb49c36f1451379757_activity.pkl | Bin 0 -> 60 bytes ...1b95546212b258c14b75e06382fd8_activity.pkl | Bin 0 -> 60 bytes ...9da5bd2b26fefa9f1dc29129d2efb_activity.pkl | Bin 0 -> 60 bytes ...6628a33cf770ac31e192f28450a1d_activity.pkl | Bin 0 -> 60 bytes ...564c7280afa861814544c51a83e02_activity.pkl | Bin 0 -> 60 bytes ...54142289bf98b47e071b5f64bfbec_activity.pkl | Bin 0 -> 60 bytes ...5b0ee7132d3b4ad27c655a6d68b4b_activity.pkl | Bin 0 -> 60 bytes ...5be1643fceee584676df3f299eeb5_activity.pkl | Bin 0 -> 60 bytes ...c7c66d72fe0746e1bdcda2d8c544c_activity.pkl | Bin 0 -> 60 bytes ...c5f2641c4523440452775b459b870_activity.pkl | Bin 0 -> 60 bytes ...005394bb628e70ec351092af1a926_activity.pkl | Bin 0 -> 60 bytes ...e65bcd892f69881e1e0bb99333a0b_activity.pkl | Bin 0 -> 60 bytes ...e4d49dc3833c847c3fef9a1971954_activity.pkl | Bin 0 -> 60 bytes ...e779443112507925e4750ed2d1123_activity.pkl | Bin 0 -> 60 bytes ...065cdcc9d4b9035f26987087d4d73_activity.pkl | Bin 0 -> 60 bytes ...fedb64f5cf7164bf5038e7f6308c0_activity.pkl | Bin 0 -> 60 bytes ...f7e832c27751dc235e9bef076de3b_activity.pkl | Bin 0 -> 60 bytes ...ea1179c67751fd0c11f04381b8215_activity.pkl | Bin 0 -> 60 bytes backend/logs/admin/admin.log | 7 + backend/logs/app/app.log | 244 ++++++++++++++++ backend/logs/auth/auth.log | 2 + backend/logs/core_system/core_system.log | 6 + .../logs/data_management/data_management.log | 6 + .../energy_monitoring/energy_monitoring.log | 3 + backend/logs/guest/guest.log | 1 + .../hardware_integration.log | 12 + .../job_queue_system/job_queue_system.log | 12 + .../monitoring_analytics.log | 6 + backend/logs/scheduler/scheduler.log | 9 + .../logs/security_suite/security_suite.log | 9 + backend/logs/startup/startup.log | 27 ++ .../logs/tapo_controller/tapo_controller.log | 3 + .../tapo_status_manager.log | 3 + .../utilities_collection.log | 6 + backend/logs/windows_fixes/windows_fixes.log | 6 + backend/templates/base.html | 16 +- backend/utils/permissions.py | 252 ++++++++++++++++ 81 files changed, 950 insertions(+), 11 deletions(-) create mode 100644 backend/blueprints/__pycache__/legal_pages.cpython-313.pyc create mode 100644 backend/instance/sessions/00ca4fb33ce7ae6fb8d967ccce4bd773_activity.pkl create mode 100644 backend/instance/sessions/062ab3d7ae29442a41e5e626754a5a20_activity.pkl create mode 100644 backend/instance/sessions/0b63acfa92148ecd42a0014ad1c85d8e_activity.pkl create mode 100644 backend/instance/sessions/0e4f3287be3ce1abf681ec8d56623a39_activity.pkl create mode 100644 backend/instance/sessions/10718b9852a07b18b70e49b8ef5b6f91_activity.pkl create mode 100644 backend/instance/sessions/1aafe5f4b8ea97113ee10702686d9152_activity.pkl create mode 100644 backend/instance/sessions/222559fb1d200c6295514bc50173918c_activity.pkl create mode 100644 backend/instance/sessions/227540ad515918c2927314edd694eac9_activity.pkl create mode 100644 backend/instance/sessions/36af73f7290957260a8031b793c6c77b_activity.pkl create mode 100644 backend/instance/sessions/39ea38102c3e1d7cd341f33c888f2790_activity.pkl create mode 100644 backend/instance/sessions/3af9a6af01ce6b81f9232c1a18d9c678_activity.pkl create mode 100644 backend/instance/sessions/3f294b657816f03e455ad655a7e44087_activity.pkl create mode 100644 backend/instance/sessions/3f6e6cf4ce77e99e51f25a220f177f52_activity.pkl create mode 100644 backend/instance/sessions/41d92a26589a7644ed71800b5359d08c_activity.pkl create mode 100644 backend/instance/sessions/4f6544b674cfae74d9365b7fcf6e9d87_activity.pkl create mode 100644 backend/instance/sessions/507bc79b9e05a5b70c8b75e2e50479c3_activity.pkl create mode 100644 backend/instance/sessions/52eb8564fb13b32146277bb7f86427fb_activity.pkl create mode 100644 backend/instance/sessions/546a23c5f56054244db2086b59da2eb8_activity.pkl create mode 100644 backend/instance/sessions/54dd7e95118a629021a3ba0e01ae63e4_activity.pkl create mode 100644 backend/instance/sessions/59030b69051553484e59841dbd41509d_activity.pkl create mode 100644 backend/instance/sessions/59116accfb0f0ac88f586c5f0c4185f0_activity.pkl create mode 100644 backend/instance/sessions/62f10d1c0743d247526ec97b314eba41_activity.pkl create mode 100644 backend/instance/sessions/6381faf17a60f8db26b67c746c12dd76_activity.pkl create mode 100644 backend/instance/sessions/643f3e283507cc253e464d89f0bf1743_activity.pkl create mode 100644 backend/instance/sessions/668b0961897d23583d192fb145ec7b28_activity.pkl create mode 100644 backend/instance/sessions/68f18ea53ed298676bebc9bf87bdfced_activity.pkl create mode 100644 backend/instance/sessions/72f63b99fb11f35a1d5d30f6c48693fd_activity.pkl create mode 100644 backend/instance/sessions/736a04edfccf40704473b4ea108bd25e_activity.pkl create mode 100644 backend/instance/sessions/74ac358daaabe206e30ba06aee465b8e_activity.pkl create mode 100644 backend/instance/sessions/75ac9350c4fcd749d212a866b172c26f_activity.pkl create mode 100644 backend/instance/sessions/76866c63c21789a541073b50cc1140e8_activity.pkl create mode 100644 backend/instance/sessions/789fd4f1d43bed0183c2d20e1b18c33e_activity.pkl create mode 100644 backend/instance/sessions/7a95fcbca78e94e127091f16e3590f06_activity.pkl create mode 100644 backend/instance/sessions/802fa22233fe08a20bb73daffde21466_activity.pkl create mode 100644 backend/instance/sessions/8ea6751d9239431b59d8e7336f8fa15d_activity.pkl create mode 100644 backend/instance/sessions/905b7d4b5fb5dd3dd5c801b14e214783_activity.pkl create mode 100644 backend/instance/sessions/9fbad948116fccd6cc455771d5221c10_activity.pkl create mode 100644 backend/instance/sessions/a02818048092ae6e57f731f8b9df6d9e_activity.pkl create mode 100644 backend/instance/sessions/a34f47e54c85022c21cf4209b256fe84_activity.pkl create mode 100644 backend/instance/sessions/ad8d38605a34a7157557bfe7964cde0d_activity.pkl create mode 100644 backend/instance/sessions/b244d154433816fb49c36f1451379757_activity.pkl create mode 100644 backend/instance/sessions/b4d1b95546212b258c14b75e06382fd8_activity.pkl create mode 100644 backend/instance/sessions/bb09da5bd2b26fefa9f1dc29129d2efb_activity.pkl create mode 100644 backend/instance/sessions/c336628a33cf770ac31e192f28450a1d_activity.pkl create mode 100644 backend/instance/sessions/c4d564c7280afa861814544c51a83e02_activity.pkl create mode 100644 backend/instance/sessions/c9954142289bf98b47e071b5f64bfbec_activity.pkl create mode 100644 backend/instance/sessions/d425b0ee7132d3b4ad27c655a6d68b4b_activity.pkl create mode 100644 backend/instance/sessions/d465be1643fceee584676df3f299eeb5_activity.pkl create mode 100644 backend/instance/sessions/d4fc7c66d72fe0746e1bdcda2d8c544c_activity.pkl create mode 100644 backend/instance/sessions/d56c5f2641c4523440452775b459b870_activity.pkl create mode 100644 backend/instance/sessions/d7a005394bb628e70ec351092af1a926_activity.pkl create mode 100644 backend/instance/sessions/db7e65bcd892f69881e1e0bb99333a0b_activity.pkl create mode 100644 backend/instance/sessions/dcee4d49dc3833c847c3fef9a1971954_activity.pkl create mode 100644 backend/instance/sessions/dfae779443112507925e4750ed2d1123_activity.pkl create mode 100644 backend/instance/sessions/e05065cdcc9d4b9035f26987087d4d73_activity.pkl create mode 100644 backend/instance/sessions/e07fedb64f5cf7164bf5038e7f6308c0_activity.pkl create mode 100644 backend/instance/sessions/e81f7e832c27751dc235e9bef076de3b_activity.pkl create mode 100644 backend/instance/sessions/fb8ea1179c67751fd0c11f04381b8215_activity.pkl create mode 100644 backend/utils/permissions.py diff --git a/backend/app.py b/backend/app.py index 249b28212..54612e0c8 100644 --- a/backend/app.py +++ b/backend/app.py @@ -1082,6 +1082,67 @@ def api_version(): "environment": get_environment_type() }) +@app.route("/api/stats", methods=['GET']) +@login_required +def api_stats(): + """ + Allgemeine System-Statistiken API-Endpunkt. + + Stellt grundlegende Statistiken über das System zur Verfügung. + """ + try: + from models import get_db_session, User, Printer, Job + + with get_cached_session() as db_session: + # Grundlegende Counts + total_users = db_session.query(User).count() + total_printers = db_session.query(Printer).count() + total_jobs = db_session.query(Job).count() + + # Aktive Jobs + active_jobs = db_session.query(Job).filter( + Job.status.in_(['pending', 'printing', 'paused']) + ).count() + + # Abgeschlossene Jobs heute + from datetime import date + today = date.today() + completed_today = db_session.query(Job).filter( + Job.status == 'completed', + Job.updated_at >= today + ).count() + + # Online-Drucker (aktive Drucker) + online_printers = db_session.query(Printer).filter( + Printer.active == True + ).count() + + stats = { + 'total_users': total_users, + 'total_printers': total_printers, + 'total_jobs': total_jobs, + 'active_jobs': active_jobs, + 'completed_today': completed_today, + 'online_printers': online_printers, + 'timestamp': datetime.now().isoformat() + } + + app_logger.info(f"✅ API-Statistiken abgerufen von {current_user.username}") + + return jsonify({ + 'success': True, + 'stats': stats, + 'message': 'Statistiken erfolgreich geladen' + }) + + except Exception as e: + app_logger.error(f"❌ Fehler beim Abrufen der API-Statistiken: {str(e)}") + return jsonify({ + 'success': False, + 'error': 'Fehler beim Laden der Statistiken', + 'details': str(e) + }), 500 + # Statische Seiten @app.route("/privacy") def privacy(): diff --git a/backend/backend/database/myp.db b/backend/backend/database/myp.db index e0dca7060a92c1dc7da2c20be67bcb28d44ff9c6..e9ce12da766f80453d26e99a576929ad6d047ced 100644 GIT binary patch delta 546 zcmZvZL2uJA6vq=7-F9g}Aa+2aKJk3OY^gr6j3Iyd+K+JIa*H z#*SQ(*bVJ~(2hvs6M)2-8(#sw1s+ITK-ROL{r}1D`R}9C#?fix<7UfBlFH4U1ABMJ z^Y-;&T~&0lJM;#6T}*Q088x3K6E+x(Hu)YJ_q+MVV{VP-Ow$yM^DM0WL=Yk5Ru@_FAj*82>S3O3g)tC>3j$(F3NWXH6Y!{HiJ&?2 zQ!2i^7ocQwkd>SRLKy)OsVJ9JpB>hIoC2SLDWPFZ81Mr@7Ymt`nZ%f1g1Q6&;bB}5 z8p!j?=Rl$$^Cf@ppQl1gN65w|l6TB0i`queMn;>%bni(dSnzPfP~Cm$<_jH`D4u%5 zt!Vo>=8GJ80^@lU6#O8WPBy%$TOtGNP!9CJGF|9k*Zr&57r!9AmJLV+TKJQ?G`g{( zsfzYP`>egyUTcANSG%dH()gdvwd*TOcN8rurE{}_>|d-LwUY%+#-!O!LDF G75)PK9-hbm delta 169 zcmZozz}B#UZG)4%X;gq`m``?asI!ZcyJdNPs!wovQlg%IepOa}S&*@@kyn1GUxBZl zNv@+|g{huPgh_^fh2G?Hc~fm81tUW%10ySABRw+~>+L$HjYk(Gg| zo{^!ErJ?EO>+-r6HnSA`k>4i3$l@Tx&M(Hm|APMz|1|zC{v>`IezC=Z3j9ne?9=Vy T85O2m#4{daGPYQjz-Ryfd9^N{ diff --git a/backend/blueprints/__pycache__/legal_pages.cpython-313.pyc b/backend/blueprints/__pycache__/legal_pages.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5b3cef1c3c7534cb0ad25a2fb5a454a138d6ebc3 GIT binary patch literal 2669 zcmbVO&2JM&6rc5X)=mPAsj(5sly8e{oCr5NVK97RZqPo4N|XtvuishArdgsyq(?m=FR-xd-I#! z>+cs4wAOEP^%qfu{^l>87HSXnuz=7rBqN4oK@Q9bvjG;E4YJ^Dh=nl!7Mu&uMpy)+ zQs4}dL#61|fIpYTO0lJ(j>G+@9KH%Zd6Od&$Xq9m`I z7HNpL8%;(`({7C783l~YYTdS+Q9KXQrm9&XHI1q;B6JiJt2!qB!()^Ux_#5SO`1%j zmOID@tr1oRhfN*4xbdpZ;G0!en$4`>COWUSNthefiK^(1nA19ISKDFt9$}C{=zHIS zc!nOg(*p^Dl*_@1z&Vr+Ij6fD&-DPkrO_uuGl`SnzF}))b*rH}C%eX2;^6Tj>~h6m zjhBKOwlqs8F9pVn>?PU*iQMANYo&XzSF^OdyimOPC_h#x7V@PTvQ}DT#!qC`Qdk9o zDuJ_7MX9a={!*nA53}SUEH@REm}AX#H`?9}8wBTZ=qAUufj&e~;?(mS+anXZK_M}@ zgM{!T>j#yS$kq0<@#W#MPk@u2d=j>*zxkCx8l42hWlgEB`;p1?7#)ZW>jNK*@0KOF z;QL|&Alzu%1v?IJydQ)!$>B_KI8#2HWR4!Lr!R-)4t=659nm7JVfuK^e8S+fafLlc zED4BG(DzP)=p^a-_Q*|+svvM!1)-BB);(qBm*a8H=5<{q4Wdzk_dVg;lozLBX$B?K z5xr_^#zZ2;R{%}LH073r=`Y|^{8WZt$6UXO4)5IhZhXE#kJ4OFP|%R^fu z_yMWle6xu!Ek4L+oxvG}t>*4%YTd#`qeik}Hwv5N5p?5(u4&Am9JM>pT({~5Eq9dt zE4pH?c3)#FM6qmG!#U=cXqlI&e-yquoT~#TAsb-)pTdp!bF(4F>(h-?4Z5PKZcrtb z$NF$X#oO+IbrqA}IM}DU&Ud~ny8z$MLN_Uh4YU(O$y4uAXSPz=%~Wxy^L$)!^%ND?RsbAbvvJ zjUOM1Y|MSQ05`(hQ_}Xx^ftb{8xAC-9TW&l-a(zu4!Y5Dxn@+$WjE|ait*Fwf$*`# z{rKsIs!qm8KhJh7DZDZzGSxJ<9Xxfnz+#_p$2@sB@j%U=nC~ zbj;sD>;wft*bM}Q(0?Klu5F@;Khe3r;>o8Ep4VIPiyN``Lfe9ev?HQ`=qU$U!U$JRaV6%;sjl+vu?sEXBG(oKuD-<8z`%zl`)Y6YVRcH7Jm0$k I7= yesterday).count() + + # Gesamtdruckzeit berechnen + completed_jobs_with_duration = db_session.query(Job).filter( + Job.status == 'completed', + Job.duration_minutes.isnot(None) + ).all() + + total_print_hours = sum(job.duration_minutes for job in completed_jobs_with_duration) / 60.0 + + db_session.close() + + stats_data = { + 'success': True, + 'timestamp': datetime.now().isoformat(), + + # Grundlegende Zählungen + 'total_printers': total_printers, + 'active_printers': active_printers, + 'total_jobs': total_jobs, + 'total_users': total_users, + 'active_users': active_users, + + # Job-Statistiken + 'completed_jobs': completed_jobs, + 'running_jobs': running_jobs, + 'pending_jobs': pending_jobs, + 'failed_jobs': failed_jobs, + 'jobs_last_24h': jobs_last_24h, + + # Druckzeit-Statistiken + 'total_print_hours': round(total_print_hours, 2), + 'completion_rate': round((completed_jobs / total_jobs * 100), 2) if total_jobs > 0 else 0 + } + + api_logger.info(f"Statistiken abgerufen von Benutzer {current_user.username}") + return jsonify(stats_data) + + except Exception as e: + api_logger.error(f"Fehler beim Abrufen der Statistiken: {str(e)}") + return jsonify({ + 'success': False, + 'error': 'Fehler beim Laden der Statistiken', + 'message': str(e) + }), 500 + +@api_blueprint.route('/admin/system-health', methods=['GET']) +@admin_required +def get_system_health(): + """ + System-Gesundheitsstatus für Administratoren. + + Liefert detaillierte Informationen über den System-Zustand. + """ + try: + db_session = get_db_session() + + # Datenbankverbindung testen + db_healthy = True + try: + db_session.execute("SELECT 1") + except Exception as e: + db_healthy = False + api_logger.error(f"Datenbankfehler: {str(e)}") + + # Systemressourcen prüfen + import psutil + import os + + # CPU und Speicher + cpu_usage = psutil.cpu_percent(interval=1) + memory = psutil.virtual_memory() + disk = psutil.disk_usage('/') + + # Aktive Drucker prüfen + active_printers = db_session.query(Printer).filter(Printer.active == True).count() + total_printers = db_session.query(Printer).count() + + # Laufende Jobs prüfen + running_jobs = db_session.query(Job).filter(Job.status == 'running').count() + + db_session.close() + + # Gesamtstatus bestimmen + overall_status = 'healthy' + if not db_healthy or cpu_usage > 90 or memory.percent > 90: + overall_status = 'warning' + if not db_healthy or cpu_usage > 95 or memory.percent > 95: + overall_status = 'critical' + + health_data = { + 'success': True, + 'timestamp': datetime.now().isoformat(), + 'overall_status': overall_status, + + # System-Status + 'database': { + 'status': 'healthy' if db_healthy else 'error', + 'connection': db_healthy + }, + + # Systemressourcen + 'system': { + 'cpu_usage': cpu_usage, + 'memory_usage': memory.percent, + 'memory_available_gb': round(memory.available / (1024**3), 2), + 'disk_usage': disk.percent, + 'disk_free_gb': round(disk.free / (1024**3), 2) + }, + + # Drucker-Status + 'printers': { + 'total': total_printers, + 'active': active_printers, + 'inactive': total_printers - active_printers + }, + + # Job-Status + 'jobs': { + 'running': running_jobs + } + } + + api_logger.info(f"System-Health abgerufen von Admin {current_user.username}") + return jsonify(health_data) + + except ImportError: + # Fallback ohne psutil + health_data = { + 'success': True, + 'timestamp': datetime.now().isoformat(), + 'overall_status': 'healthy', + 'database': {'status': 'healthy', 'connection': True}, + 'system': {'cpu_usage': 0, 'memory_usage': 0, 'disk_usage': 0}, + 'printers': {'total': 0, 'active': 0, 'inactive': 0}, + 'jobs': {'running': 0}, + 'note': 'Eingeschränkte Systemüberwachung (psutil nicht verfügbar)' + } + return jsonify(health_data) + + except Exception as e: + api_logger.error(f"Fehler beim Abrufen des System-Health: {str(e)}") + return jsonify({ + 'success': False, + 'error': 'Fehler beim Laden des System-Status', + 'message': str(e) + }), 500 + +@api_blueprint.route('/admin/error-recovery/status', methods=['GET']) +@admin_required +def get_error_recovery_status(): + """ + Fehlerwiederherstellungs-Status für Administratoren. + + Liefert Informationen über System-Fehler und Wiederherstellungsoptionen. + """ + try: + db_session = get_db_session() + + # Fehlgeschlagene Jobs der letzten 24 Stunden + yesterday = datetime.now() - timedelta(days=1) + failed_jobs = db_session.query(Job).filter( + Job.status == 'failed', + Job.created_at >= yesterday + ).all() + + # Inaktive Drucker + inactive_printers = db_session.query(Printer).filter(Printer.active == False).all() + + # Hängende Jobs (länger als 6 Stunden im Status 'running') + six_hours_ago = datetime.now() - timedelta(hours=6) + stuck_jobs = db_session.query(Job).filter( + Job.status == 'running', + Job.start_time <= six_hours_ago + ).all() + + db_session.close() + + # Wiederherstellungsaktionen bestimmen + recovery_actions = [] + + if failed_jobs: + recovery_actions.append({ + 'type': 'restart_failed_jobs', + 'count': len(failed_jobs), + 'description': f'{len(failed_jobs)} fehlgeschlagene Jobs neu starten' + }) + + if inactive_printers: + recovery_actions.append({ + 'type': 'reactivate_printers', + 'count': len(inactive_printers), + 'description': f'{len(inactive_printers)} inaktive Drucker reaktivieren' + }) + + if stuck_jobs: + recovery_actions.append({ + 'type': 'reset_stuck_jobs', + 'count': len(stuck_jobs), + 'description': f'{len(stuck_jobs)} hängende Jobs zurücksetzen' + }) + + # Gesamtstatus bestimmen + status = 'healthy' + if failed_jobs or inactive_printers: + status = 'warning' + if stuck_jobs: + status = 'critical' + + recovery_data = { + 'success': True, + 'timestamp': datetime.now().isoformat(), + 'status': status, + + 'issues': { + 'failed_jobs': len(failed_jobs), + 'inactive_printers': len(inactive_printers), + 'stuck_jobs': len(stuck_jobs) + }, + + 'recovery_actions': recovery_actions, + + 'last_check': datetime.now().isoformat() + } + + api_logger.info(f"Error-Recovery-Status abgerufen von Admin {current_user.username}") + return jsonify(recovery_data) + + except Exception as e: + api_logger.error(f"Fehler beim Abrufen des Error-Recovery-Status: {str(e)}") + return jsonify({ + 'success': False, + 'error': 'Fehler beim Laden des Wiederherstellungs-Status', + 'message': str(e) }), 500 \ No newline at end of file diff --git a/backend/instance/sessions/00ca4fb33ce7ae6fb8d967ccce4bd773_activity.pkl b/backend/instance/sessions/00ca4fb33ce7ae6fb8d967ccce4bd773_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..66eb7bf8ae992f0c0ad3d5904429f97bb5eaf573 GIT binary patch literal 60 zcmZo*nQF)Y0ku8Db@o3@+J^G literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/1aafe5f4b8ea97113ee10702686d9152_activity.pkl b/backend/instance/sessions/1aafe5f4b8ea97113ee10702686d9152_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..45e9059bf2472220fa4e6f16c77f8fbd85c26f20 GIT binary patch literal 60 zcmZo*nQF)Y0kuRA|= L7#kQ)Db@o3@%<1m literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/227540ad515918c2927314edd694eac9_activity.pkl b/backend/instance/sessions/227540ad515918c2927314edd694eac9_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..237bc41d11d33cadbcbd318943c0513ae3b18826 GIT binary patch literal 60 zcmZo*nQF)Y0kuRB3_ Lo10orDb@o3@{$lq literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/36af73f7290957260a8031b793c6c77b_activity.pkl b/backend/instance/sessions/36af73f7290957260a8031b793c6c77b_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..7b28645962ac052af1966b8ce18bc395d77039fb GIT binary patch literal 60 zcmZo*nQF)Y0ku literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/4f6544b674cfae74d9365b7fcf6e9d87_activity.pkl b/backend/instance/sessions/4f6544b674cfae74d9365b7fcf6e9d87_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..5fe564f69e22fd170d53efcd35d65fe81f5a22cb GIT binary patch literal 60 zcmZo*nQF)Y0kuX{i^ LS{j&7Db@o3@|X}u literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/507bc79b9e05a5b70c8b75e2e50479c3_activity.pkl b/backend/instance/sessions/507bc79b9e05a5b70c8b75e2e50479c3_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..aed900d175b1d5238dbe4acf04a3ba386c45ec31 GIT binary patch literal 60 zcmZo*nQF)Y0kuy literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/546a23c5f56054244db2086b59da2eb8_activity.pkl b/backend/instance/sessions/546a23c5f56054244db2086b59da2eb8_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..8d5c9234249c87593e79b890010ea575799e1c08 GIT binary patch literal 60 zcmZo*nQF)Y0kuX}=b Ln3@<)Db@o3@>~!; literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/54dd7e95118a629021a3ba0e01ae63e4_activity.pkl b/backend/instance/sessions/54dd7e95118a629021a3ba0e01ae63e4_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..1895a88723c273adb03434887fde1c3538aaf987 GIT binary patch literal 60 zcmZo*nQF)Y0ku4nDb@o3@_`UY literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/59116accfb0f0ac88f586c5f0c4185f0_activity.pkl b/backend/instance/sessions/59116accfb0f0ac88f586c5f0c4185f0_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..b0289d98b8c70005a1725fbfa2150d2006042215 GIT binary patch literal 60 zcmZo*nQF)Y0ku L8e5o7Db@o3@Hg>RA|> L8CV)jDb@o3@>UQ$ literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/68f18ea53ed298676bebc9bf87bdfced_activity.pkl b/backend/instance/sessions/68f18ea53ed298676bebc9bf87bdfced_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..7b03ae9a8784a8a395a8ce998afb8e36488e5c92 GIT binary patch literal 60 zcmZo*nQF)Y0kuX{o` LTAG_rDb@o3^288N literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/72f63b99fb11f35a1d5d30f6c48693fd_activity.pkl b/backend/instance/sessions/72f63b99fb11f35a1d5d30f6c48693fd_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..3c2555aa6cd03ff48e597ab0e70c06865942fa4d GIT binary patch literal 60 zcmZo*nQF)Y0kuY14t Lo0=OKPlF Ln;RHUDb@o3@%0ch literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/789fd4f1d43bed0183c2d20e1b18c33e_activity.pkl b/backend/instance/sessions/789fd4f1d43bed0183c2d20e1b18c33e_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..0a3dae2190f019ae746b7dea436f707083557e19 GIT binary patch literal 60 zcmZo*nQF)Y0kuKRyA LniyD4Db@o3@=_2$ literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/802fa22233fe08a20bb73daffde21466_activity.pkl b/backend/instance/sessions/802fa22233fe08a20bb73daffde21466_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..a3905cfb9bb00ea2bd6d050e2725aae6ea51f3d8 GIT binary patch literal 60 zcmZo*nQF)Y0kuX{gt LS{fToDb@o3@>LK$ literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/8ea6751d9239431b59d8e7336f8fa15d_activity.pkl b/backend/instance/sessions/8ea6751d9239431b59d8e7336f8fa15d_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..dea35b334d58b2891fbcc9a53a3532156482a423 GIT binary patch literal 60 zcmZo*nQF)Y0kuX{pv Ln;2M5Db@o3@;?wg literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/905b7d4b5fb5dd3dd5c801b14e214783_activity.pkl b/backend/instance/sessions/905b7d4b5fb5dd3dd5c801b14e214783_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..f67c9ec37ba69fbc901577ed8a47e01a28590563 GIT binary patch literal 60 zcmZo*nQF)Y0kuX}%W LnVVWpDb@o3@~#j} literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/9fbad948116fccd6cc455771d5221c10_activity.pkl b/backend/instance/sessions/9fbad948116fccd6cc455771d5221c10_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..faf4ed01e6a2cb3bd2225661e8569df6a554a3a9 GIT binary patch literal 60 zcmZo*nQF)Y0kuX{pv Lnj08QDb@o3@*fa2 literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/a02818048092ae6e57f731f8b9df6d9e_activity.pkl b/backend/instance/sessions/a02818048092ae6e57f731f8b9df6d9e_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..c5c5cd0d25d3bdaeb55af7c3b27c480b1866162c GIT binary patch literal 60 zcmZo*nQF)Y0kuX}%W LT3DJ+Db@o3^05$1 literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/ad8d38605a34a7157557bfe7964cde0d_activity.pkl b/backend/instance/sessions/ad8d38605a34a7157557bfe7964cde0d_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..dc6595ef059a59634a7be7eadfef7f12141dd813 GIT binary patch literal 60 zcmZo*nQF)Y0kuHg>RA|> L8JikSDb@o3@>~!- literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/b244d154433816fb49c36f1451379757_activity.pkl b/backend/instance/sessions/b244d154433816fb49c36f1451379757_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..bfb2c6d24077ef831d12dbb674a6a57567a5ce64 GIT binary patch literal 60 zcmZo*nQF)Y0kuY1Av LnV6eSDb@o3@=p*y literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/b4d1b95546212b258c14b75e06382fd8_activity.pkl b/backend/instance/sessions/b4d1b95546212b258c14b75e06382fd8_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..d1a47adf6d5e5b55fe9d45befa3f7afa0195f337 GIT binary patch literal 60 zcmZo*nQF)Y0kuAnDb@o3@(2(( literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/c4d564c7280afa861814544c51a83e02_activity.pkl b/backend/instance/sessions/c4d564c7280afa861814544c51a83e02_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..6efe704aa01250bfec0216e09cc5fcdbcb24afda GIT binary patch literal 60 zcmZo*nQF)Y0kuKRxV L8kw3+Db@o3@$V2c literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/c9954142289bf98b47e071b5f64bfbec_activity.pkl b/backend/instance/sessions/c9954142289bf98b47e071b5f64bfbec_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..665832ef89f70f432810ba102bfdb00fd22d6dcb GIT binary patch literal 60 zcmZo*nQF)Y0kuHg>RA|> LSQ?s5Db@o3@@^18 literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/d425b0ee7132d3b4ad27c655a6d68b4b_activity.pkl b/backend/instance/sessions/d425b0ee7132d3b4ad27c655a6d68b4b_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..cf85a51b1dacc207d0569ac4060d4ce1f98cc96b GIT binary patch literal 60 zcmZo*nQF)Y0kuX{px Lo0^+WDb@o3@?a1` literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/d465be1643fceee584676df3f299eeb5_activity.pkl b/backend/instance/sessions/d465be1643fceee584676df3f299eeb5_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..26ed650339031b941a5afb105e5023e53ec17075 GIT binary patch literal 60 zcmZo*nQF)Y0kuRA|? L8d@4nDb@o3@;wkc literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/d4fc7c66d72fe0746e1bdcda2d8c544c_activity.pkl b/backend/instance/sessions/d4fc7c66d72fe0746e1bdcda2d8c544c_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..9d18e3b3dc186ed50bd0902730e4ecb71bf5cb9f GIT binary patch literal 60 zcmZo*nQF)Y0kuF|=vkN= Ln3@_)Db@o3@(U0& literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/d56c5f2641c4523440452775b459b870_activity.pkl b/backend/instance/sessions/d56c5f2641c4523440452775b459b870_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..f32440f81a9cde71d0f4d729f5839914eefddd87 GIT binary patch literal 60 zcmZo*nQF)Y0kuKPgv LT9}$nDb@o3@*EI3 literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/db7e65bcd892f69881e1e0bb99333a0b_activity.pkl b/backend/instance/sessions/db7e65bcd892f69881e1e0bb99333a0b_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..b005bafdeb7e83f8b59f6a0d143248f756c1c9d4 GIT binary patch literal 60 zcmZo*nQF)Y0kuHN(Db@o3@-GlL literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/e05065cdcc9d4b9035f26987087d4d73_activity.pkl b/backend/instance/sessions/e05065cdcc9d4b9035f26987087d4d73_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..6e03e6fe63572469239796af0ac1ff693a6793ad GIT binary patch literal 60 zcmZo*nQF)Y0kuKT|> L8k-wVDb@o3@*fa6 literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/e07fedb64f5cf7164bf5038e7f6308c0_activity.pkl b/backend/instance/sessions/e07fedb64f5cf7164bf5038e7f6308c0_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..f5749f455443893bff3d09b0cce2c4a57cbea179 GIT binary patch literal 60 zcmZo*nQF)Y0kuzlDb@o3@RB3_ L8=IL=Db@o3@^=tK literal 0 HcmV?d00001 diff --git a/backend/instance/sessions/fb8ea1179c67751fd0c11f04381b8215_activity.pkl b/backend/instance/sessions/fb8ea1179c67751fd0c11f04381b8215_activity.pkl new file mode 100644 index 0000000000000000000000000000000000000000..1c82ae3c39bc1242ba11c67f141ca8eed441972d GIT binary patch literal 60 zcmZo*nQF)Y0kuRB3_ Ln;95PDb@o3@=p*t literal 0 HcmV?d00001 diff --git a/backend/logs/admin/admin.log b/backend/logs/admin/admin.log index 2aae4b6ee..5d3b2c82c 100644 --- a/backend/logs/admin/admin.log +++ b/backend/logs/admin/admin.log @@ -35,3 +35,10 @@ 2025-06-12 21:13:41 - [admin] admin - [INFO] INFO - Admin-Check für Funktion admin_dashboard: User authenticated: True, User ID: 1, Is Admin: True 2025-06-12 21:13:41 - [admin] admin - [INFO] INFO - Admin-Dashboard geladen von admin 2025-06-12 21:13:41 - [admin] admin - [ERROR] ERROR - Fehler beim Laden des Admin-Dashboards: 'dict object' has no attribute 'online_printers' +2025-06-13 06:57:14 - [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:14 - [admin] admin - [INFO] INFO - Admin-Dashboard geladen von admin +2025-06-13 06:57:14 - [admin] admin - [ERROR] ERROR - Fehler beim Laden des Admin-Dashboards: 'dict object' has no attribute 'online_printers' +2025-06-13 06:57:20 - [admin] admin - [INFO] INFO - Admin-Check für Funktion guest_requests: User authenticated: True, User ID: 1, Is Admin: True +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' diff --git a/backend/logs/app/app.log b/backend/logs/app/app.log index 27caa62fa..6724cfa60 100644 --- a/backend/logs/app/app.log +++ b/backend/logs/app/app.log @@ -21548,3 +21548,247 @@ jinja2.exceptions.UndefinedError: 'stats' is undefined 2025-06-12 21:14:05 - [app] app - [DEBUG] DEBUG - Response: 200 2025-06-12 21:14:05 - [app] app - [DEBUG] DEBUG - Request: GET /auth/login 2025-06-12 21:14:05 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 06:49:36 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: backend/database/myp.db +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank... +2025-06-13 06:49:42 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O) +2025-06-13 06:49:42 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin... +2025-06-13 06:49:42 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt. +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager... +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler... +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet +2025-06-13 06:49:42 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000 +2025-06-13 06:49:44 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: backend/database/myp.db +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank... +2025-06-13 06:49:45 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O) +2025-06-13 06:49:45 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin... +2025-06-13 06:49:45 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt. +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager... +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler... +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet +2025-06-13 06:49:45 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000 +2025-06-13 06:49:45 - [app] app - [INFO] INFO - Locating template 'login.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\\login.html') +2025-06-13 06:49:45 - [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 06:49:46 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 06:49:48 - [app] app - [DEBUG] DEBUG - Request: POST /auth/login +2025-06-13 06:49:48 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 06:49:50 - [app] app - [DEBUG] DEBUG - Request: GET / +2025-06-13 06:49:50 - [app] app - [DEBUG] DEBUG - Response: 302 +2025-06-13 06:49:50 - [app] app - [DEBUG] DEBUG - Request: GET /dashboard +2025-06-13 06:49:50 - [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 06:49:50 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 06:56:49 - [app] app - [DEBUG] DEBUG - Request: GET /requests/overview +2025-06-13 06:56:49 - [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 06:56:49 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 06:56:51 - [app] app - [DEBUG] DEBUG - Request: GET /request +2025-06-13 06:56:51 - [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 06:56:51 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 06:57:05 - [app] app - [DEBUG] DEBUG - Request: POST /request +2025-06-13 06:57:05 - [app] app - [INFO] INFO - OTP generiert für Guest Request 1 +2025-06-13 06:57:05 - [app] app - [DEBUG] DEBUG - Response: 302 +2025-06-13 06:57:05 - [app] app - [DEBUG] DEBUG - Request: GET /request/1 +2025-06-13 06:57:05 - [app] app - [INFO] INFO - Locating template 'guest_status.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_status.html') +2025-06-13 06:57:05 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 06:57:08 - [app] app - [DEBUG] DEBUG - Request: GET /request/1 +2025-06-13 06:57:08 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 06:57:14 - [app] app - [DEBUG] DEBUG - Request: GET /admin/ +2025-06-13 06:57:14 - [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 06:57:14 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 06:57:14 - [app] app - [DEBUG] DEBUG - Request: GET /api/stats +2025-06-13 06:57:14 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/stats +2025-06-13 06:57:14 - [app] app - [INFO] INFO - Locating template 'errors/404.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\\404.html') +2025-06-13 06:57:15 - [app] app - [DEBUG] DEBUG - Request: GET /api/admin/system-health +2025-06-13 06:57:15 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/admin/system-health +2025-06-13 06:57:15 - [app] app - [INFO] INFO - [SHUTDOWN] 🧹 Cleanup wird ausgeführt... +2025-06-13 06:57:15 - [app] app - [INFO] INFO - [SHUTDOWN] ✅ Queue Manager gestoppt +2025-06-13 06:57:15 - [app] app - [ERROR] ERROR - [SHUTDOWN] ❌ Cleanup-Fehler: 'BackgroundTaskScheduler' object has no attribute 'shutdown' +2025-06-13 06:57:16 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: backend/database/myp.db +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank... +2025-06-13 06:57:20 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O) +2025-06-13 06:57:20 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin... +2025-06-13 06:57:20 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt. +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager... +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler... +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet +2025-06-13 06:57:20 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000 +2025-06-13 06:57:20 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/stats +2025-06-13 06:57:20 - [app] app - [INFO] INFO - Locating template 'admin_guest_requests.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_guest_requests.html') +2025-06-13 06:57:20 - [app] app - [INFO] INFO - Locating template 'errors/404.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\\404.html') +2025-06-13 06:57:20 - [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 06:57:20 - [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 06:57:20 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 06:57:20 - [app] app - [DEBUG] DEBUG - Request: GET /api/admin/requests +2025-06-13 06:57:20 - [app] app - [WARNING] WARNING - Forbidden (403): http://127.0.0.1:5000/api/admin/requests - User: admin +2025-06-13 06:57:20 - [app] app - [DEBUG] DEBUG - Response: 403 +2025-06-13 06:57:25 - [app] app - [DEBUG] DEBUG - Request: GET /admin/ +2025-06-13 06:57:25 - [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 06:57:25 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-13 06:57:25 - [app] app - [DEBUG] DEBUG - Request: GET /api/stats +2025-06-13 06:57:25 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/stats +2025-06-13 06:57:25 - [app] app - [DEBUG] DEBUG - Request: GET /api/admin/system-health +2025-06-13 06:57:25 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/admin/system-health +2025-06-13 06:57:30 - [app] app - [DEBUG] DEBUG - Request: GET /api/stats +2025-06-13 06:57:30 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/stats +2025-06-13 06:57:35 - [app] app - [DEBUG] DEBUG - Request: GET /api/stats +2025-06-13 06:57:35 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/stats +2025-06-13 06:57:40 - [app] app - [DEBUG] DEBUG - Request: GET /api/stats +2025-06-13 06:57:40 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/stats +2025-06-13 06:57:55 - [app] app - [DEBUG] DEBUG - Request: GET /api/admin/error-recovery/status +2025-06-13 06:57:55 - [app] app - [DEBUG] DEBUG - Request: GET /api/admin/system-health +2025-06-13 06:57:55 - [app] app - [DEBUG] DEBUG - Request: GET /api/stats +2025-06-13 06:57:55 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/admin/error-recovery/status +2025-06-13 06:57:55 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/admin/system-health +2025-06-13 06:57:55 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/stats +2025-06-13 06:58:25 - [app] app - [DEBUG] DEBUG - Request: GET /api/admin/error-recovery/status +2025-06-13 06:58:25 - [app] app - [DEBUG] DEBUG - Request: GET /api/stats +2025-06-13 06:58:25 - [app] app - [DEBUG] DEBUG - Request: GET /api/admin/system-health +2025-06-13 06:58:25 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/admin/system-health +2025-06-13 06:58:25 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/stats +2025-06-13 06:58:25 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/admin/error-recovery/status +2025-06-13 06:58:56 - [app] app - [DEBUG] DEBUG - Request: GET /api/stats +2025-06-13 06:58:56 - [app] app - [DEBUG] DEBUG - Request: GET /api/admin/error-recovery/status +2025-06-13 06:58:56 - [app] app - [DEBUG] DEBUG - Request: GET /api/admin/system-health +2025-06-13 06:58:56 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/admin/error-recovery/status +2025-06-13 06:58:56 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/admin/system-health +2025-06-13 06:58:56 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/api/stats +2025-06-13 06:59:26 - [app] app - [DEBUG] DEBUG - Request: GET /api/admin/error-recovery/status +2025-06-13 06:59:26 - [app] app - [DEBUG] DEBUG - Request: GET /api/stats +2025-06-13 06:59:26 - [app] app - [DEBUG] DEBUG - Request: GET /api/admin/system-health +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 diff --git a/backend/logs/auth/auth.log b/backend/logs/auth/auth.log index fb16bc7de..a407a952f 100644 --- a/backend/logs/auth/auth.log +++ b/backend/logs/auth/auth.log @@ -52,3 +52,5 @@ WHERE users.username = ? OR users.email = ? 2025-06-12 21:02:32 - [auth] auth - [WARNING] WARNING - JSON-Parsing fehlgeschlagen: 400 Bad Request: Failed to decode JSON object: Expecting value: line 1 column 1 (char 0) 2025-06-12 21:02:32 - [auth] auth - [INFO] INFO - Benutzer admin@mercedes-benz.com hat sich erfolgreich angemeldet 2025-06-12 21:13:48 - [auth] auth - [INFO] INFO - Benutzer admin@mercedes-benz.com hat sich abgemeldet +2025-06-13 06:49:48 - [auth] auth - [WARNING] WARNING - JSON-Parsing fehlgeschlagen: 400 Bad Request: Failed to decode JSON object: Expecting value: line 1 column 1 (char 0) +2025-06-13 06:49:48 - [auth] auth - [INFO] INFO - Benutzer admin@mercedes-benz.com hat sich erfolgreich angemeldet diff --git a/backend/logs/core_system/core_system.log b/backend/logs/core_system/core_system.log index 000ffcf08..e8ba748ea 100644 --- a/backend/logs/core_system/core_system.log +++ b/backend/logs/core_system/core_system.log @@ -164,3 +164,9 @@ 2025-06-12 15:24:09 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion) 2025-06-12 19:47:01 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert 2025-06-12 19:47:01 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion) +2025-06-13 06:49:36 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert +2025-06-13 06:49:36 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion) +2025-06-13 06:49:43 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert +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) diff --git a/backend/logs/data_management/data_management.log b/backend/logs/data_management/data_management.log index 8532ec025..6a8e6604e 100644 --- a/backend/logs/data_management/data_management.log +++ b/backend/logs/data_management/data_management.log @@ -188,3 +188,9 @@ 2025-06-12 21:12:01 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) 2025-06-12 21:12:03 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert 2025-06-12 21:12:03 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-13 06:49:37 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert +2025-06-13 06:49:37 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-13 06:49:44 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert +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) diff --git a/backend/logs/energy_monitoring/energy_monitoring.log b/backend/logs/energy_monitoring/energy_monitoring.log index 4ef5dc052..8adf5932f 100644 --- a/backend/logs/energy_monitoring/energy_monitoring.log +++ b/backend/logs/energy_monitoring/energy_monitoring.log @@ -27,3 +27,6 @@ 2025-06-12 21:10:31 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert 2025-06-12 21:12:02 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert 2025-06-12 21:12:04 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert +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 diff --git a/backend/logs/guest/guest.log b/backend/logs/guest/guest.log index 80f85c9a4..b35fe9f34 100644 --- a/backend/logs/guest/guest.log +++ b/backend/logs/guest/guest.log @@ -29,3 +29,4 @@ WHERE user_permissions.can_approve_jobs = 1] 2025-06-12 15:24:36 - [guest] guest - [ERROR] ERROR - Fehler beim Abrufen der Benachrichtigungen: Entity namespace for "notifications" has no property "read" 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 diff --git a/backend/logs/hardware_integration/hardware_integration.log b/backend/logs/hardware_integration/hardware_integration.log index b6980ed5d..f59fb6e3e 100644 --- a/backend/logs/hardware_integration/hardware_integration.log +++ b/backend/logs/hardware_integration/hardware_integration.log @@ -458,3 +458,15 @@ 2025-06-12 21:12:03 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor initialisiert 2025-06-12 21:12:03 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert 2025-06-12 21:12:03 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion) +2025-06-13 06:49:37 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ PyP100 (TP-Link Tapo) verfügbar +2025-06-13 06:49:37 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor initialisiert +2025-06-13 06:49:37 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert +2025-06-13 06:49:37 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion) +2025-06-13 06:49:44 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ PyP100 (TP-Link Tapo) verfügbar +2025-06-13 06:49:44 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor initialisiert +2025-06-13 06:49:44 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert +2025-06-13 06:49:44 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion) +2025-06-13 06:57:17 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ PyP100 (TP-Link Tapo) verfügbar +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) diff --git a/backend/logs/job_queue_system/job_queue_system.log b/backend/logs/job_queue_system/job_queue_system.log index 0dc93f7f3..47eaf37cb 100644 --- a/backend/logs/job_queue_system/job_queue_system.log +++ b/backend/logs/job_queue_system/job_queue_system.log @@ -358,3 +358,15 @@ 2025-06-12 21:12:05 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität) 2025-06-12 21:14:09 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität) 2025-06-12 21:14:09 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität) +2025-06-13 06:49:37 - [job_queue_system] job_queue_system - [INFO] INFO - ✅ Job & Queue System Module initialisiert +2025-06-13 06:49:37 - [job_queue_system] job_queue_system - [INFO] INFO - 📊 MASSIVE Konsolidierung: 4 Dateien → 1 Datei (75% Reduktion) +2025-06-13 06:49:42 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität) +2025-06-13 06:49:44 - [job_queue_system] job_queue_system - [INFO] INFO - ✅ Job & Queue System Module initialisiert +2025-06-13 06:49:44 - [job_queue_system] job_queue_system - [INFO] INFO - 📊 MASSIVE Konsolidierung: 4 Dateien → 1 Datei (75% Reduktion) +2025-06-13 06:49:45 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität) +2025-06-13 06:57:15 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität) +2025-06-13 06:57:17 - [job_queue_system] job_queue_system - [INFO] INFO - ✅ Job & Queue System Module initialisiert +2025-06-13 06:57:17 - [job_queue_system] job_queue_system - [INFO] INFO - 📊 MASSIVE Konsolidierung: 4 Dateien → 1 Datei (75% Reduktion) +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) diff --git a/backend/logs/monitoring_analytics/monitoring_analytics.log b/backend/logs/monitoring_analytics/monitoring_analytics.log index 8e4185ebf..4c9fd6754 100644 --- a/backend/logs/monitoring_analytics/monitoring_analytics.log +++ b/backend/logs/monitoring_analytics/monitoring_analytics.log @@ -188,3 +188,9 @@ 2025-06-12 21:12:02 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) 2025-06-12 21:12:04 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert 2025-06-12 21:12:04 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-13 06:49:42 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert +2025-06-13 06:49:42 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-13 06:49:45 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert +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) diff --git a/backend/logs/scheduler/scheduler.log b/backend/logs/scheduler/scheduler.log index 0b9218104..5c00ee813 100644 --- a/backend/logs/scheduler/scheduler.log +++ b/backend/logs/scheduler/scheduler.log @@ -263,3 +263,12 @@ 2025-06-12 21:12:03 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True 2025-06-12 21:12:05 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet 2025-06-12 21:12:05 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet +2025-06-13 06:49:37 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True +2025-06-13 06:49:42 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet +2025-06-13 06:49:42 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet +2025-06-13 06:49:44 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True +2025-06-13 06:49:45 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet +2025-06-13 06:49:45 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet +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 diff --git a/backend/logs/security_suite/security_suite.log b/backend/logs/security_suite/security_suite.log index a8dcadd0d..ace16fb79 100644 --- a/backend/logs/security_suite/security_suite.log +++ b/backend/logs/security_suite/security_suite.log @@ -284,3 +284,12 @@ 2025-06-12 21:12:03 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert 2025-06-12 21:12:03 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) 2025-06-12 21:12:04 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert +2025-06-13 06:49:37 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert +2025-06-13 06:49:37 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-13 06:49:42 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert +2025-06-13 06:49:44 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert +2025-06-13 06:49:44 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-13 06:49:45 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert +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 diff --git a/backend/logs/startup/startup.log b/backend/logs/startup/startup.log index 1cd9b9c21..e21e420e1 100644 --- a/backend/logs/startup/startup.log +++ b/backend/logs/startup/startup.log @@ -829,3 +829,30 @@ 2025-06-12 21:12:04 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: /cbin/C0S1-cernel/C02L2/Dateiverwaltung/nextcloud/core/files/3_Beruf_Ausbildung_und_Schule/IHK-Abschlussprüfung/Projektarbeit-MYP/backend 2025-06-12 21:12:04 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-12T21:12:04.861493 2025-06-12 21:12:04 - [startup] startup - [INFO] INFO - ================================================== +2025-06-13 06:49:42 - [startup] startup - [INFO] INFO - ================================================== +2025-06-13 06:49:42 - [startup] startup - [INFO] INFO - [START] MYP Platform Backend wird gestartet... +2025-06-13 06:49:42 - [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 06:49:42 - [startup] startup - [INFO] INFO - 💻 Betriebssystem: nt (win32) +2025-06-13 06:49:42 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend +2025-06-13 06:49:42 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-13T06:49:42.261850 +2025-06-13 06:49:42 - [startup] startup - [INFO] INFO - 🪟 Windows-Modus: Aktiviert +2025-06-13 06:49:42 - [startup] startup - [INFO] INFO - 🔒 Windows-sichere Log-Rotation: Aktiviert +2025-06-13 06:49:42 - [startup] startup - [INFO] INFO - ================================================== +2025-06-13 06:49:45 - [startup] startup - [INFO] INFO - ================================================== +2025-06-13 06:49:45 - [startup] startup - [INFO] INFO - [START] MYP Platform Backend wird gestartet... +2025-06-13 06:49:45 - [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 06:49:45 - [startup] startup - [INFO] INFO - 💻 Betriebssystem: nt (win32) +2025-06-13 06:49:45 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend +2025-06-13 06:49:45 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-13T06:49:45.398918 +2025-06-13 06:49:45 - [startup] startup - [INFO] INFO - 🪟 Windows-Modus: Aktiviert +2025-06-13 06:49:45 - [startup] startup - [INFO] INFO - 🔒 Windows-sichere Log-Rotation: Aktiviert +2025-06-13 06:49:45 - [startup] startup - [INFO] INFO - ================================================== +2025-06-13 06:57:20 - [startup] startup - [INFO] INFO - ================================================== +2025-06-13 06:57:20 - [startup] startup - [INFO] INFO - [START] MYP Platform Backend wird gestartet... +2025-06-13 06:57:20 - [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 06:57:20 - [startup] startup - [INFO] INFO - 💻 Betriebssystem: nt (win32) +2025-06-13 06:57:20 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend +2025-06-13 06:57:20 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-13T06:57:20.243618 +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 - ================================================== diff --git a/backend/logs/tapo_controller/tapo_controller.log b/backend/logs/tapo_controller/tapo_controller.log index 991d85d43..cdd7c9943 100644 --- a/backend/logs/tapo_controller/tapo_controller.log +++ b/backend/logs/tapo_controller/tapo_controller.log @@ -95,3 +95,6 @@ 2025-06-12 21:10:30 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert 2025-06-12 21:12:01 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert 2025-06-12 21:12:03 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert +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 diff --git a/backend/logs/tapo_status_manager/tapo_status_manager.log b/backend/logs/tapo_status_manager/tapo_status_manager.log index bd8f65f02..796fce71a 100644 --- a/backend/logs/tapo_status_manager/tapo_status_manager.log +++ b/backend/logs/tapo_status_manager/tapo_status_manager.log @@ -52,3 +52,6 @@ 2025-06-12 21:10:30 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager initialisiert 2025-06-12 21:12:01 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager initialisiert 2025-06-12 21:12:03 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager initialisiert +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 diff --git a/backend/logs/utilities_collection/utilities_collection.log b/backend/logs/utilities_collection/utilities_collection.log index baf84547d..e4617289e 100644 --- a/backend/logs/utilities_collection/utilities_collection.log +++ b/backend/logs/utilities_collection/utilities_collection.log @@ -198,3 +198,9 @@ 2025-06-12 21:12:01 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) 2025-06-12 21:12:03 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert 2025-06-12 21:12:03 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) +2025-06-13 06:49:36 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert +2025-06-13 06:49:36 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) +2025-06-13 06:49:43 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert +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) diff --git a/backend/logs/windows_fixes/windows_fixes.log b/backend/logs/windows_fixes/windows_fixes.log index 54244c5a6..262637f04 100644 --- a/backend/logs/windows_fixes/windows_fixes.log +++ b/backend/logs/windows_fixes/windows_fixes.log @@ -167,3 +167,9 @@ 2025-06-12 15:24:09 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet 2025-06-12 19:47:01 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an... 2025-06-12 19:47:01 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet +2025-06-13 06:49:36 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an... +2025-06-13 06:49:36 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet +2025-06-13 06:49:43 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an... +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 diff --git a/backend/templates/base.html b/backend/templates/base.html index 01bf2d230..c84d809a9 100644 --- a/backend/templates/base.html +++ b/backend/templates/base.html @@ -187,7 +187,7 @@ {% if current_user.is_authenticated %}