Files
mcr/web/templates/dashboard.html
Kyle Isom 593da3975d Phases 11, 12: mcrctl CLI tool and mcr-web UI
Phase 11 implements the admin CLI with dual REST/gRPC transport,
global flags (--server, --grpc, --token, --ca-cert, --json), and
all commands: status, repo list/delete, policy CRUD, audit tail,
gc trigger/status/reconcile, and snapshot.

Phase 12 implements the HTMX web UI with chi router, session-based
auth (HttpOnly/Secure/SameSite=Strict cookies), CSRF protection
(HMAC-SHA256 signed double-submit), and pages for dashboard,
repositories, manifest detail, policy management, and audit log.

Security: CSRF via signed double-submit cookie, session cookies
with HttpOnly/Secure/SameSite=Strict, TLS 1.3 minimum on all
connections, form body size limits via http.MaxBytesReader.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 10:14:38 -07:00

45 lines
980 B
HTML

{{define "title"}}Dashboard{{end}}
{{define "content"}}
<h1>Dashboard</h1>
<div class="stats">
<div class="stat-card">
<div class="label">Repositories</div>
<div class="value">{{.RepoCount}}</div>
</div>
<div class="stat-card">
<div class="label">Total Size</div>
<div class="value">{{.TotalSize}}</div>
</div>
</div>
<h2>Recent Activity</h2>
{{if .Events}}
<table>
<thead>
<tr>
<th>Time</th>
<th>Type</th>
<th>Actor</th>
<th>Repository</th>
<th>Digest</th>
</tr>
</thead>
<tbody>
{{range .Events}}
<tr>
<td>{{formatTime .EventTime}}</td>
<td>{{.EventType}}</td>
<td>{{.ActorId}}</td>
<td>{{.Repository}}</td>
<td class="truncated">{{truncate .Digest 24}}</td>
</tr>
{{end}}
</tbody>
</table>
{{else}}
<p>No recent activity.</p>
{{end}}
{{end}}