Die Dateien wurden wie folgt geändert und hinzugefügt:

1. backend/logs - 'admin', 'admin_api', 'app', 'calendar', 'data_management', 'drucker_steuerung', 'energy_monitoring', 'guest', 'hardware_integration', 'job_queue_system', 'jobs', 'models', 'monitoring_analytics', 'permissions', 'scheduler', 'security_suite', 'startup', '
This commit is contained in:
2025-06-20 01:06:37 +02:00
parent 0fcf04833f
commit 321626e9d3
754 changed files with 3013 additions and 174 deletions

View File

@ -182,7 +182,11 @@
/* === BUTTONS (Optimiert für beide Modi) === */
.btn, button {
@apply inline-flex items-center justify-center text-sm font-medium;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 0.875rem;
font-weight: 500;
background: var(--bg-card);
color: var(--text-primary);
border: 1px solid var(--border-primary);
@ -548,7 +552,7 @@
/* === FORM ELEMENTS (Optimiert für beide Modi) === */
.form-input, input:not([type="checkbox"]):not([type="radio"]), textarea, select {
@apply w-full;
width: 100%;
background: var(--bg-input);
border: 1px solid var(--border-primary);
color: var(--text-primary);
@ -605,7 +609,7 @@
/* Form Labels */
.form-label, label {
@apply block text-sm font-medium;
display: block; font-size: 0.875rem; font-weight: 500;
color: var(--text-secondary);
margin-bottom: 0.5rem;
margin-top: 1rem;
@ -729,7 +733,7 @@ select {
}
.nav-item {
@apply px-3 py-2;
padding: 0.5rem 0.75rem;
color: var(--text-secondary);
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
border-radius: 8px;
@ -823,7 +827,7 @@ select {
/* === ALERTS === */
.alert {
@apply border;
border: 1px solid var(--border-primary);
background: var(--bg-card);
border-color: var(--border-primary);
border-radius: 16px !important;
@ -862,14 +866,14 @@ select {
/* === TABLES === */
.table {
@apply w-full border-collapse;
width: 100%; border-collapse: collapse;
border-radius: 16px !important;
overflow: hidden;
margin: 1rem 0;
}
.table th {
@apply text-left text-sm font-medium uppercase tracking-wider;
text-align: left; font-size: 0.875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
background: var(--bg-tertiary);
color: var(--text-tertiary);
border-bottom: 1px solid var(--border-primary);
@ -877,7 +881,7 @@ select {
}
.table td {
@apply text-sm;
font-size: 0.875rem;
color: var(--text-secondary);
border-bottom: 1px solid var(--border-primary);
padding: 1rem 1.5rem;
@ -889,7 +893,7 @@ select {
/* === TOOLTIPS === */
.tooltip {
@apply absolute z-50 text-sm shadow-lg;
position: absolute; z-index: 50; font-size: 0.875rem; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
background: var(--bg-modal);
color: var(--text-primary);
border: 1px solid var(--border-primary);
@ -901,7 +905,7 @@ select {
/* === BADGES & STATUS === */
.badge {
@apply inline-flex items-center text-xs font-medium;
display: inline-flex; align-items: center; font-size: 0.75rem; font-weight: 500;
background: var(--bg-tertiary);
color: var(--text-secondary);
border-radius: 16px !important;
@ -931,12 +935,12 @@ select {
/* === LOADING STATES === */
.loading {
@apply animate-pulse;
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
background: var(--bg-tertiary);
}
.spinner {
@apply animate-spin rounded-full;
animation: spin 1s linear infinite; border-radius: 9999px;
border: 2px solid var(--border-primary);
border-top-color: var(--text-accent);
}
@ -956,7 +960,7 @@ select {
}
.btn {
@apply text-xs;
font-size: 0.75rem;
padding: 0.5rem 1rem;
margin: 0.125rem;
}
@ -1010,20 +1014,47 @@ select {
/* === LEGACY COMPATIBILITY === */
.glass-modal {
@extend .modal;
@extend .glass-card;
position: fixed;
inset: 0;
z-index: 50;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(4px);
background: var(--bg-modal);
border: 1px solid var(--border-primary);
border-radius: 1rem;
box-shadow: var(--shadow-card);
}
.mb-dashboard-card {
@extend .card;
background: var(--bg-card);
border: 1px solid var(--border-primary);
border-radius: 1rem;
padding: 1.5rem;
box-shadow: var(--shadow-card);
transition: all 0.3s ease;
}
.btn-professional {
@extend .btn-primary;
background: linear-gradient(135deg, var(--mb-primary), var(--mb-primary-dark));
color: var(--text-on-primary);
border: 1px solid var(--mb-primary);
padding: 0.75rem 1.5rem;
border-radius: 0.75rem;
font-weight: 600;
transition: all 0.3s ease;
cursor: pointer;
}
.input-professional {
@extend .form-input;
background: var(--bg-input);
border: 1px solid var(--border-primary);
border-radius: 0.75rem;
padding: 0.75rem 1rem;
color: var(--text-primary);
transition: all 0.3s ease;
}
/* === CSS CUSTOM PROPERTIES FALLBACKS === */
@ -1061,7 +1092,7 @@ body {
/* === TABLE OPTIMIERUNGEN === */
.table {
@apply w-full border-collapse;
width: 100%; border-collapse: collapse;
border-radius: 12px !important;
overflow: hidden;
margin: 1rem 0;
@ -1070,7 +1101,7 @@ body {
}
.table th {
@apply text-left text-sm font-medium uppercase tracking-wider;
text-align: left; font-size: 0.875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
background: var(--bg-tertiary);
color: var(--text-tertiary);
border-bottom: 1px solid var(--border-primary);
@ -1078,7 +1109,7 @@ body {
}
.table td {
@apply text-sm;
font-size: 0.875rem;
color: var(--text-secondary);
border-bottom: 1px solid var(--border-primary);
padding: 1rem 1.5rem;
@ -1103,7 +1134,7 @@ body {
/* === TOOLTIPS === */
.tooltip {
@apply absolute z-50 text-sm;
position: absolute; z-index: 50; font-size: 0.875rem;
background: var(--bg-modal);
color: var(--text-primary);
border: 1px solid var(--border-primary);
@ -1116,7 +1147,7 @@ body {
/* === BADGES & STATUS === */
.badge {
@apply inline-flex items-center text-xs font-medium;
display: inline-flex; align-items: center; font-size: 0.75rem; font-weight: 500;
background: var(--bg-tertiary);
color: var(--text-secondary);
border-radius: 12px !important;
@ -1145,7 +1176,7 @@ body {
}
.btn {
@apply text-sm;
font-size: 0.875rem;
padding: 0.625rem 1rem;
margin: 0.125rem;
border-radius: 8px;
@ -1286,13 +1317,13 @@ body {
/* === LOADING STATES === */
.loading {
@apply animate-pulse;
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
background: var(--bg-tertiary);
border-radius: 8px;
}
.spinner {
@apply animate-spin rounded-full;
animation: spin 1s linear infinite; border-radius: 9999px;
border: 2px solid var(--border-primary);
border-top-color: var(--text-accent);
width: 1.5rem;

File diff suppressed because one or more lines are too long

View File

@ -258,6 +258,14 @@ class AdminDashboard {
this.showPrinterSettings(printerId);
}
// Drucker-Konfiguration Button
if (e.target.closest('.configure-printer-btn')) {
e.preventDefault();
e.stopPropagation();
const printerId = e.target.closest('button').dataset.printerId;
this.showPrinterConfiguration(printerId);
}
// Smart-Plug Ein/Aus Toggle für Drucker
if (e.target.closest('.toggle-printer-power-btn')) {
e.preventDefault();
@ -1374,6 +1382,51 @@ class AdminDashboard {
window.location.href = `/admin/printers/${printerId}/settings`;
}
/**
* Drucker-Konfigurationsseite laden - Backend-Only-Architektur
* Implementiert die angeforderte function() für Drucker-Konfiguration
*/
showPrinterConfiguration(printerId) {
console.log(`🔧 Drucker-Konfiguration ${printerId} wird geöffnet (Backend-Only)`);
this.showNotification(`Konfiguration für Drucker ${printerId} wird geöffnet...`, 'info');
// Validierung der Drucker-ID
if (!printerId || isNaN(printerId)) {
this.showNotification('Ungültige Drucker-ID für Konfiguration', 'error');
return;
}
// Backend-Redirect zur erweiterten Konfigurationsseite
window.location.href = `/admin/printers/${printerId}/configure`;
}
/**
* Alternative Event-Handler-Funktion für data-printer-id Attribute
* Kann direkt an HTML-Elemente gebunden werden
*/
static handlePrinterConfiguration(event) {
const element = event.target.closest('[data-printer-id]');
if (!element) {
console.error('❌ Kein Element mit data-printer-id gefunden');
return;
}
const printerId = element.dataset.printerId;
if (!printerId) {
console.error('❌ Keine Drucker-ID im data-printer-id Attribut');
return;
}
// AdminDashboard-Instanz verwenden falls verfügbar
if (window.adminDashboard && typeof window.adminDashboard.showPrinterConfiguration === 'function') {
window.adminDashboard.showPrinterConfiguration(printerId);
} else {
// Fallback: Direkte Navigation
console.log(`🔧 Direkte Navigation zu Drucker-Konfiguration ${printerId}`);
window.location.href = `/admin/printers/${printerId}/configure`;
}
}
// Smart-Plug Ein/Aus Toggle für Drucker
async togglePrinterPower(printerId, printerName, button) {
console.log(`🔌 Smart-Plug Toggle für Drucker ${printerId} (${printerName})`);
@ -2009,4 +2062,83 @@ document.addEventListener('DOMContentLoaded', function() {
});
// Export für globalen Zugriff
window.AdminDashboard = AdminDashboard;
window.AdminDashboard = AdminDashboard;
// ===== GLOBALE FUNKTIONEN FÜR DIREKTE VERWENDUNG =====
/**
* Globale Funktion für Drucker-Konfiguration - Direkter Zugriff ohne AdminDashboard-Instanz
* Entspricht der angeforderten function() { showNotification... } Implementierung
*/
window.showPrinterConfiguration = function() {
const printerId = this.dataset.printerId;
if (!printerId) {
console.error('❌ Keine Drucker-ID im data-printer-id Attribut gefunden');
return;
}
// Notification anzeigen wie angefordert
showNotification(`Konfiguration für Drucker ${printerId} wird geöffnet...`, 'info');
// Backend-Redirect zur erweiterten Konfiguration
window.location.href = `/admin/printers/${printerId}/configure`;
};
/**
* Globale showNotification Funktion - falls sie nicht bereits existiert
*/
if (typeof window.showNotification !== 'function') {
window.showNotification = function(message, type = 'info') {
// Erstelle temporäre Notification mit Mercedes-Benz Design
const notification = document.createElement('div');
notification.className = `fixed top-6 right-6 z-50 p-4 rounded-xl shadow-2xl max-w-sm transition-all duration-500 transform translate-x-full opacity-0 backdrop-blur-xl border ${
type === 'success' ? 'bg-gradient-to-r from-green-500 to-green-600 text-white border-green-400' :
type === 'error' ? 'bg-gradient-to-r from-red-500 to-red-600 text-white border-red-400' :
type === 'warning' ? 'bg-gradient-to-r from-yellow-500 to-yellow-600 text-white border-yellow-400' :
'bg-gradient-to-r from-blue-500 to-blue-600 text-white border-blue-400'
}`;
notification.innerHTML = `
<div class="flex items-center space-x-3">
<div class="flex-shrink-0 p-1 rounded-lg bg-white/20">
${type === 'success' ?
'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/></svg>' :
type === 'error' ?
'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/></svg>' :
type === 'warning' ?
'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"/></svg>' :
'<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>'
}
</div>
<div class="text-sm font-semibold flex-1">${message}</div>
<button onclick="this.parentElement.parentElement.remove()" class="ml-auto p-1 rounded-lg hover:bg-white/20 transition-colors">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
`;
document.body.appendChild(notification);
// Animation einblenden
setTimeout(() => {
notification.style.transform = 'translateX(0)';
notification.style.opacity = '1';
}, 100);
// Automatisch entfernen nach 5 Sekunden
setTimeout(() => {
if (notification.parentNode) {
notification.style.transform = 'translateX(100%)';
notification.style.opacity = '0';
setTimeout(() => {
if (notification.parentNode) {
notification.parentNode.removeChild(notification);
}
}, 500);
}
}, 5000);
};
}