Use database fleet registry and gate RCON polling on container readiness

This commit is contained in:
2026-09-17 17:28:38 -04:00
parent 3b1c9bf3d9
commit 885abbdffe
19 changed files with 208 additions and 41 deletions
+3 -1
View File
@@ -23,7 +23,9 @@
}
</script>
{#if health === 'offline'}
{#if health === 'starting'}
<div class="state empty">Server starting</div>
{:else if health === 'offline'}
<div class="state offline">server unreachable</div>
{:else if !roster || roster.length === 0}
<div class="state empty">lobby is empty</div>
+6 -4
View File
@@ -63,7 +63,7 @@
.sort((a, b) => b.score - a.score)
.slice(0, 3)
);
let showRoster = $derived(health !== 'offline');
let showRoster = $derived(health === 'online' || health === 'stale');
let mapLabel = $derived(map ?? '—');
let gtLabel = $derived(gametypeLabel(gametype));
@@ -72,7 +72,7 @@
let gameInProgress = $derived(!!gameStartedAt && !gameEndedAt && !!activeSince);
let gameElapsed = $derived(gameInProgress ? elapsedSince(gameStartedAt, $uiNow) : null);
let showTiming = $derived(
health !== 'offline' && (activeElapsed !== null || inactiveElapsed !== null || gameElapsed !== null)
showRoster && (activeElapsed !== null || inactiveElapsed !== null || gameElapsed !== null)
);
// Shared-element transition to /servers/{name} — Chromium only, others
@@ -97,7 +97,9 @@
<StatusPip {health} />
<strong class="name">{name}</strong>
</div>
{#if health === 'offline'}
{#if health === 'starting'}
<Badge variant="info" uppercase>Starting</Badge>
{:else if health === 'offline'}
<Badge variant="danger" uppercase>offline</Badge>
{:else}
<div class="players" aria-live="polite">
@@ -119,7 +121,7 @@
{/if}
</div>
<RoundTelemetry {name} />
{#if showRoster}<RoundTelemetry {name} />{/if}
{#if showTiming}
<div class="timing">
+1 -1
View File
@@ -26,7 +26,7 @@
background: var(--spark-500);
animation: electric-pulse 1.6s ease-in-out infinite;
}
.dot-stale {
.dot-stale, .dot-starting {
background: var(--amber-500);
box-shadow: var(--amber-glow);
}
@@ -11,13 +11,14 @@
let toneClass = $derived(
health === 'online' ? 't-online' :
health === 'stale' ? 't-warning' :
health === 'stale' || health === 'starting' ? 't-warning' :
't-danger'
);
let announceLabel = $derived(
label ?? (
health === 'online' ? 'online' :
health === 'starting' ? 'starting' :
health === 'stale' ? 'stale' :
'offline'
)
+1 -1
View File
@@ -12,7 +12,7 @@ export interface RosterPlayer {
name: string;
}
export type Health = 'online' | 'stale' | 'offline';
export type Health = 'online' | 'stale' | 'offline' | 'starting';
export type RconFailure = 'no-config' | 'no-port' | 'send-error' | 'timeout' | 'bad-reply' | 'no-players';
export interface RconEndpoint {