feat: target matrix + reset scores/environment buttons

- /api/targets (admin): matrix of all teams' domain:port targets
- /api/reset/scores: wipe leaderboard (admin, confirm dialog)
- /api/reset/environment: stop all teams, remove containers+receivers+
  team dirs+systemd units, wipe scores, drop domains (admin, confirm)
- portal targets now only domain+port (no ssh/labels)
- UI: tab Target Matrix, header buttons Reset Skor / Reset Environment
  with confirm() alerts 'apakah anda yakin ingin mereset...'
This commit is contained in:
root
2026-09-23 17:14:42 +08:00
parent b66530e7fd
commit 44dc1ac852
4 changed files with 140 additions and 10 deletions
+1 -4
View File
@@ -264,10 +264,7 @@ async function loadTargets() {
if (!targets.length) { box.textContent = 'Belum ada tim musuh.'; return; }
let html = '=== TARGET MUSUH ===\n\n';
for (const t of targets) {
html += `[${esc(t.team)}] — ${esc(t.challenge)}\n`;
if (t.domain) html += ` domain : https://${esc(t.domain)}\n`;
html += ` service: ${esc(window.location.hostname)}:${t.port}\n`;
html += ` ssh : ${esc(window.location.hostname)}:${t.ssh}\n\n`;
html += `${esc(t.domain)}:${t.port}\n`;
}
box.textContent = html;
}