Update status messages to improve user feedback during loading states

This commit is contained in:
Fabian Schieder 2026-03-01 16:34:34 +01:00
parent 8c0068ccbb
commit 82221d63ae
4 changed files with 4 additions and 4 deletions

View File

@ -154,6 +154,6 @@ document.querySelectorAll('.card').forEach(card => {
apply(payload.byUrlNormalized);
} catch (e) {
// keep "Unbekannt"
// keep "Lädt..."
}
})();

View File

@ -194,7 +194,7 @@ function check_http_request(string $url, string $method, float $timeoutSeconds =
}
if ($code === null && $error === null) {
$error = 'Unbekannter Fehler';
$error = 'Lädt...er Fehler';
}
$res = ['ok' => $ok, 'code' => $code, 'ms' => $ms, 'error' => $error];

View File

@ -96,7 +96,7 @@ foreach ($serverStatusByUrl as $__u => $__svc) {
$badgeText = null;
if (!$isNoStatusBadge && $category !== 'dienste') {
$badgeText = 'Unbekannt';
$badgeText = 'Lädt...';
if ($state === 'up') $badgeText = 'Online';
elseif ($state === 'down') $badgeText = 'Offline';
}

View File

@ -15,7 +15,7 @@ require_once __DIR__ . '/includes/lib/server_status.php';
require_once __DIR__ . '/includes/lib/view_helpers.php';
// ── Serverstatus ─────────────────────────────────────────────────────────
// Performance: initial sofort rendern (=> Unbekannt). Badges werden clientseitig nachgeladen.
// Performance: initial sofort rendern (=> Lädt...). Badges werden clientseitig nachgeladen.
$serverStatusByUrl = [];
require __DIR__ . '/includes/views/layout_head.php';