From c949498a7ddf9ca516abf642310f4668cdb260a3 Mon Sep 17 00:00:00 2001 From: Ray Andrew Date: Mon, 16 Feb 2026 00:54:44 -0600 Subject: [PATCH] fix(dashboard): update token refresh to target table body only --- .../internal/dashboard/templates/partials/tokens.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llm-gateway/internal/dashboard/templates/partials/tokens.html b/llm-gateway/internal/dashboard/templates/partials/tokens.html index 9324c2a..974f5e4 100644 --- a/llm-gateway/internal/dashboard/templates/partials/tokens.html +++ b/llm-gateway/internal/dashboard/templates/partials/tokens.html @@ -119,13 +119,13 @@ document.getElementById('modal-create-token').addEventListener('click', function if (e.target === this) closeModal(); }); -// After token creation: show key, close modal, refresh token list +// After token creation: show key, close modal, refresh token table only document.body.addEventListener('tokenCreated', function() { closeModal(); document.getElementById('new-token-display').style.display = 'block'; - // Refresh the token list after a short delay + // Refresh only the token table body, preserving the new-token-display setTimeout(function() { - htmx.ajax('GET', '/tokens', {target: '#content', swap: 'innerHTML'}); + htmx.ajax('GET', '/tokens', {target: '#tokens-tbody', select: '#tokens-tbody', swap: 'outerHTML'}); }, 100); });