🎉 Improved backend structure & documentation, optimized files for better performance. 🛠️ Removed unnecessary files: app_timer_routes.py, settings_copy.cpython-311.pyc, myp.db-shm, myp.db-wal. 📚 Added new files: STRG_C_SHUTDOWN.md, SSL_CONFIG.md.

This commit is contained in:
2025-06-01 03:52:58 +02:00
parent 99ba574223
commit 45d8d46556
77 changed files with 805 additions and 2934 deletions

View File

@@ -169,14 +169,26 @@
const data = await response.json();
this.jobs = data.jobs || [];
this.currentPage = data.current_page || 1;
this.totalPages = data.total_pages || 1;
// VERBESSERTE NULL-CHECKS für jobs-Daten
if (data && typeof data === 'object') {
// Sicherstellen, dass jobs immer ein Array ist
this.jobs = Array.isArray(data.jobs) ? data.jobs : [];
this.currentPage = Number(data.current_page) || 1;
this.totalPages = Number(data.total_pages) || 1;
console.log(`${this.jobs.length} Jobs erfolgreich geladen`, this.jobs);
} else {
console.warn('⚠️ Unerwartete API-Response-Struktur:', data);
this.jobs = [];
this.currentPage = 1;
this.totalPages = 1;
}
// Sichere Rendering-Aufrufe
this.renderJobs();
this.updatePagination();
console.log(`${this.jobs.length} Jobs erfolgreich geladen`);
console.log(`${this.jobs.length} Jobs erfolgreich geladen und gerendert`);
} catch (error) {
console.error('❌ Fehler beim Laden der Jobs:', error);
@@ -184,6 +196,8 @@
// Fallback: Leere Jobs-Liste anzeigen
this.jobs = [];
this.currentPage = 1;
this.totalPages = 1;
this.renderJobs();
} finally {
this.isLoading = false;