🎉 Große Änderungen vorgenommen! Die folgenden Dateien wurden aktualisiert:

- backend/logs/admin/admin.log
- backend/logs/admin_api/admin_api.log
- backend/logs/api/api.log
- backend/logs/app/app.log
- backend/logs/auth/auth.log
- backend/logs/calendar/calendar.log
- backend/
This commit is contained in:
2025-06-19 22:57:29 +02:00
parent e38b336c93
commit 48a9783ce2
559 changed files with 1603 additions and 148 deletions

View File

@ -181,18 +181,16 @@
<div class="relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
<div class="text-center">
<!-- Mercedes-Benz Logo -->
<div class="inline-flex items-center justify-center w-20 h-20 bg-white/10 backdrop-blur-sm rounded-full mb-6 border border-white/20">
<svg class="w-10 h-10 text-white" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/>
<div class="inline-flex items-center justify-center w-20 h-20 live-badge rounded-full mb-6 logo-adaptive">
<svg class="w-10 h-10" style="color: var(--text-primary);" viewBox="0 0 80 80" fill="currentColor">
<path d="M58.6,4.5C53,1.6,46.7,0,40,0c-6.7,0-13,1.6-18.6,4.5v0C8.7,11.2,0,24.6,0,40c0,15.4,8.7,28.8,21.5,35.5C27,78.3,33.3,80,40,80c6.7,0,12.9-1.7,18.5-4.6C71.3,68.8,80,55.4,80,40C80,24.6,71.3,11.2,58.6,4.5z M4,40c0-13.1,7-24.5,17.5-30.9v0C26.6,6,32.5,4.2,39,4l-4.5,32.7L21.5,46.8v0L8.3,57.1C5.6,52,4,46.2,4,40z M58.6,70.8C53.1,74.1,46.8,76,40,76c-6.8,0-13.2-1.9-18.6-5.2c-4.9-2.9-8.9-6.9-11.9-11.7l11.9-4.9v0L40,46.6l18.6,7.5v0l12,4.9C67.6,63.9,63.4,67.9,58.6,70.8z M58.6,46.8L58.6,46.8l-12.9-10L41.1,4c6.3,0.2,12.3,2,17.4,5.1v0C69,15.4,76,26.9,76,40c0,6.2-1.5,12-4.3,17.1L58.6,46.8z"/>
</svg>
</div>
<h1 class="text-5xl md:text-6xl font-bold mb-4 tracking-tight">
<span class="bg-gradient-to-r from-white to-blue-200 bg-clip-text text-transparent">
Energiemonitoring
</span>
<h1 class="text-5xl md:text-6xl font-bold mb-4 tracking-tight" style="color: var(--text-primary);">
Energiemonitoring
</h1>
<p class="text-xl md:text-2xl text-blue-100 max-w-3xl mx-auto leading-relaxed">
<p class="text-xl md:text-2xl max-w-3xl mx-auto leading-relaxed" style="color: var(--text-secondary);">
Überwachung des Energieverbrauchs aller 3D-Drucker mit TP-Link Tapo Smart Plugs
</p>
</div>
@ -204,14 +202,14 @@
{% if stats.error %}
<!-- Error State -->
<div class="bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-xl p-6 mb-8">
<div class="error-card rounded-xl p-6 mb-8">
<div class="flex items-center">
<svg class="w-6 h-6 text-red-500 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<svg class="w-6 h-6 mr-3" style="color: var(--text-error);" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.732-.833-2.464 0L4.35 16.5c-.77.833.192 2.5 1.732 2.5z"/>
</svg>
<div>
<h3 class="text-lg font-semibold text-red-800 dark:text-red-200">Energiemonitoring nicht verfügbar</h3>
<p class="text-red-600 dark:text-red-300 mt-1">{{ stats.error }}</p>
<h3 class="text-lg font-semibold" style="color: var(--text-error);">Energiemonitoring nicht verfügbar</h3>
<p class="mt-1" style="color: var(--text-error);">{{ stats.error }}</p>
</div>
</div>
</div>
@ -258,7 +256,7 @@
<!-- Power Consumption Over Time -->
<div class="energy-card p-6">
<h3 class="text-xl font-bold text-gray-900 dark:text-white mb-4">Verbrauch der letzten 24 Stunden</h3>
<h3 class="text-xl font-bold mb-4" style="color: var(--text-primary);">Verbrauch der letzten 24 Stunden</h3>
<div class="relative h-80">
<canvas id="powerChart"></canvas>
</div>
@ -266,7 +264,7 @@
<!-- Device Comparison -->
<div class="energy-card p-6">
<h3 class="text-xl font-bold text-gray-900 dark:text-white mb-4">Verbrauch nach Gerät</h3>
<h3 class="text-xl font-bold mb-4" style="color: var(--text-primary);">Verbrauch nach Gerät</h3>
<div class="relative h-80">
<canvas id="deviceChart"></canvas>
</div>
@ -275,20 +273,20 @@
<!-- Device List -->
<div class="energy-card p-6">
<h3 class="text-xl font-bold text-gray-900 dark:text-white mb-6">Geräteübersicht</h3>
<h3 class="text-xl font-bold mb-6" style="color: var(--text-primary);">Geräteübersicht</h3>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<thead class="bg-gray-50 dark:bg-gray-800">
<table class="energy-table min-w-full">
<thead>
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Gerät</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Status</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Aktuelle Leistung</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Tagesverbrauch</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Aktionen</th>
<th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">Gerät</th>
<th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">Status</th>
<th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">Aktuelle Leistung</th>
<th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">Tagesverbrauch</th>
<th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">Aktionen</th>
</tr>
</thead>
<tbody id="device-table-body" class="bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700">
<tbody id="device-table-body">
<!-- Dynamisch geladen via JavaScript -->
</tbody>
</table>
@ -446,7 +444,7 @@ function updateDeviceTable(devices) {
if (devices.length === 0) {
tbody.innerHTML = `
<tr>
<td colspan="5" class="px-6 py-4 text-center text-gray-500 dark:text-gray-400">
<td colspan="5" class="px-6 py-4 text-center" style="color: var(--text-muted);">
Keine Geräte gefunden
</td>
</tr>
@ -456,16 +454,19 @@ function updateDeviceTable(devices) {
devices.forEach(device => {
const row = document.createElement('tr');
row.className = 'hover:bg-gray-50 dark:hover:bg-gray-800';
row.className = '';
row.style.transition = 'background-color 0.2s ease';
row.addEventListener('mouseenter', () => row.style.backgroundColor = 'var(--hover-card)');
row.addEventListener('mouseleave', () => row.style.backgroundColor = 'transparent');
const statusClass = device.status === 'online' ? 'text-green-600' : 'text-red-600';
const statusClass = device.status === 'online' ? 'status-badge-online' : 'status-badge-offline';
const statusText = device.status === 'online' ? 'Online' : 'Offline';
row.innerHTML = `
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="text-sm font-medium text-gray-900 dark:text-white">${device.name}</div>
<div class="text-sm text-gray-500 dark:text-gray-400">${device.model || ''}</div>
<div class="text-sm font-medium" style="color: var(--text-primary);">${device.name}</div>
<div class="text-sm" style="color: var(--text-tertiary);">${device.model || ''}</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
@ -473,14 +474,14 @@ function updateDeviceTable(devices) {
${statusText}
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-white">
<td class="px-6 py-4 whitespace-nowrap text-sm" style="color: var(--text-primary);">
${device.current_power || '0.0'} W
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-white">
<td class="px-6 py-4 whitespace-nowrap text-sm" style="color: var(--text-primary);">
${device.daily_consumption || '0.0'} kWh
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="/energy/device/${device.id}" class="text-mercedes-blue hover:text-mercedes-blue/80">
<a href="/energy/device/${device.id}" style="color: var(--text-accent); transition: color 0.2s ease;" onmouseover="this.style.color='var(--text-link-hover)'" onmouseout="this.style.color='var(--text-accent)'">
Details anzeigen
</a>
</td>