Add Sync All buttons functionality for server matrix

WHAT WAS DONE:
- Added POST /admin/servers/sync-all/:node endpoint
  - Accepts 'tx1' or 'nc1' as node parameter
  - Syncs whitelist to all servers on that node
  - Returns count of synced/errors

- Wired up buttons in index.ejs with htmx
  - hx-post to the new endpoint
  - Results display in #sync-result span

Files changed:
- services/arbiter-3.0/src/routes/admin/servers.js (+45 lines)
- services/arbiter-3.0/src/views/admin/servers/index.ejs

Signed-off-by: Claude (Chronicler #60) <claude@firefrostgaming.com>
This commit is contained in:
Claude (Chronicler #60)
2026-04-05 08:34:50 +00:00
parent e23f44ad67
commit 2f67708fcf
2 changed files with 55 additions and 2 deletions

View File

@@ -4,12 +4,19 @@
<p class="text-gray-500 dark:text-gray-400 text-sm">Real-time status and whitelist controls</p>
</div>
<div class="space-x-3">
<button class="bg-fire hover:bg-orange-600 text-white px-4 py-2 rounded-md text-sm font-medium shadow transition-colors">
<button hx-post="/admin/servers/sync-all/tx1"
hx-swap="innerHTML"
hx-target="#sync-result"
class="bg-fire hover:bg-orange-600 text-white px-4 py-2 rounded-md text-sm font-medium shadow transition-colors">
🔥 Sync All Dallas
</button>
<button class="bg-frost hover:bg-cyan-600 text-white px-4 py-2 rounded-md text-sm font-medium shadow transition-colors">
<button hx-post="/admin/servers/sync-all/nc1"
hx-swap="innerHTML"
hx-target="#sync-result"
class="bg-frost hover:bg-cyan-600 text-white px-4 py-2 rounded-md text-sm font-medium shadow transition-colors">
❄️ Sync All Charlotte
</button>
<span id="sync-result" class="text-sm ml-2"></span>
</div>
</div>