📝 "Refactor admin UI components for improved consistency and performance" 🌈

This commit is contained in:
2025-06-16 11:06:33 +02:00
parent 52da039da8
commit 4b2ff50f7a
5 changed files with 222 additions and 12 deletions

View File

@ -4,6 +4,28 @@
let dashboardData = {};
let updateInterval;
// API Base URL Detection
function detectApiBaseUrl() {
const currentPort = window.location.port;
const currentProtocol = window.location.protocol;
const currentHost = window.location.hostname;
// Development-Umgebung (Port 5000)
if (currentPort === '5000') {
return `${currentProtocol}//${currentHost}:${currentPort}`;
}
// Production-Umgebung (Port 443 oder kein Port)
if (currentPort === '443' || currentPort === '') {
return `${currentProtocol}//${currentHost}`;
}
// Fallback für andere Ports
return window.location.origin;
}
const API_BASE_URL = detectApiBaseUrl();
// DOM-Elemente
const elements = {
activeJobs: null,