aafdd46a4b
Server-rendered admin console in the backend at /_gm (internal/adminconsole), fronted on the gateway's public listener by Basic-Auth + a verbatim reverse proxy (mounted on the edge mux below the h2c wrap). A same-origin check guards its POSTs; no operator identity is tracked. This supersedes the Stage 6 gateway-fronts- /api/v1/admin model: GATEWAY_ADMIN_ADDR and the backend /api/v1/admin ping are dropped and gateway/internal/admin is repurposed to the verbatim proxy. - Complaints: migration 00008 (+ jetgen) adds disposition/resolution_note/ resolved_at/applied_in_version + the deferred status CHECK; resolution feeds a query-derived pending dictionary-change pipeline (marked applied after a reload). - Dictionary hot-reload: per-version subdir BACKEND_DICT_DIR/<version>/ via the new Registry.LoadAvailable; engine.OpenWithVersions restores resident versions on restart. Partially addresses TODO-2. - Broadcasts: a backend Telegram-connector client (internal/connector, BACKEND_CONNECTOR_ADDR) for SendToUser / SendToGameChannel (discharges the Stage 9 forward-note). - Admin reads: account.ListAccounts/CountAccounts/Identities and game.ListGames/CountGames/GameByID/ListComplaints/GetComplaint/CountComplaints/ ResolveComplaint/DictionaryChanges/MarkChangesApplied. - Tests: adminconsole render, engine reload, same-origin guard, gateway verbatim proxy + h2c console mount, inttest complaint pipeline + list/count + /_gm console. - Docs: PLAN (Stage 10 done + refinements + TODO-2), ARCHITECTURE §1/§5/§6/§12/§13, FUNCTIONAL (+_ru), TESTING, backend/gateway READMEs.
30 lines
1.1 KiB
Go Template
30 lines
1.1 KiB
Go Template
{{define "content" -}}
|
|
{{with .Data}}
|
|
<h1>Game {{.ID}}</h1>
|
|
<nav class="subnav"><a href="/_gm/games">« games</a></nav>
|
|
<section class="panel"><h2>Summary</h2>
|
|
<ul class="kv">
|
|
<li><b>Variant</b> {{.Variant}}</li>
|
|
<li><b>Dictionary</b> {{.DictVersion}}</li>
|
|
<li><b>Status</b> {{.Status}}{{if .EndReason}} ({{.EndReason}}){{end}}</li>
|
|
<li><b>Players</b> {{.Players}}</li>
|
|
<li><b>To move</b> seat {{.ToMove}}</li>
|
|
<li><b>Moves</b> {{.MoveCount}}</li>
|
|
<li><b>Created</b> {{.CreatedAt}}</li>
|
|
<li><b>Updated</b> {{.UpdatedAt}}</li>
|
|
{{if .FinishedAt}}<li><b>Finished</b> {{.FinishedAt}}</li>{{end}}
|
|
</ul>
|
|
</section>
|
|
<section class="panel"><h2>Seats</h2>
|
|
<table class="list">
|
|
<thead><tr><th class="num">Seat</th><th>Player</th><th class="num">Score</th><th class="num">Hints</th><th>Winner</th></tr></thead>
|
|
<tbody>
|
|
{{range .Seats}}
|
|
<tr><td class="num">{{.Seat}}</td><td><a href="/_gm/users/{{.AccountID}}">{{.DisplayName}}</a></td><td class="num">{{.Score}}</td><td class="num">{{.HintsUsed}}</td><td>{{if .Winner}}<span class="ok">winner</span>{{end}}</td></tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
{{end}}
|
|
{{- end}}
|