From 5a44d3d4f477cb1d4eb07522e4445205de5bc986 Mon Sep 17 00:00:00 2001 From: Ein Anderssono Date: Thu, 15 Oct 2026 08:50:48 +0200 Subject: [PATCH] Show external service traces in admin player view --- index.html | 5 +++++ scripts/check-frontend.sh | 2 ++ 2 files changed, 7 insertions(+) diff --git a/index.html b/index.html index 37663a9..5f38ea0 100644 --- a/index.html +++ b/index.html @@ -180,6 +180,11 @@ for (const [index, entry] of entries.entries()) { const status = entry.data.execution_mode || entry.data.metadata?.decision || entry.data.outcome || 'status okänd'; adminJson(`${index + 1}. ${entry.kind} · ${status} · ${entry.at} · ${entry.order}`, entry.data); + if (entry.data.external_call && Object.keys(entry.data.external_call).length > 0) { + const call = entry.data.external_call; + const outcome = call.error || `HTTP ${call.response_status ?? 'okänt'}`; + adminJson(`Externt tjänsteanrop · ${call.service || 'okänd tjänst'} · ${outcome} · ${call.duration_ms ?? '?'} ms`, call); + } } } async function loadAdminPrompts() { diff --git a/scripts/check-frontend.sh b/scripts/check-frontend.sh index d324e4b..ccb5b66 100755 --- a/scripts/check-frontend.sh +++ b/scripts/check-frontend.sh @@ -17,6 +17,8 @@ grep -q '/api/admin/players?' index.html grep -q "request('/api/admin/prompts'" index.html grep -q "request('/api/admin/rules'" index.html grep -q '/api/admin/audit?limit=200' index.html +grep -q 'entry.data.external_call' index.html +grep -q 'Externt tjänsteanrop' index.html grep -q "request('/api/world/start'" index.html grep -q "request('/api/character'" index.html grep -q 'location = /healthz' nginx/default.conf