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>
75 lines
1.6 KiB
HTML
75 lines
1.6 KiB
HTML
{{define "title"}}{{.Name}}{{end}}
|
|
|
|
{{define "content"}}
|
|
<h1>{{.Name}}</h1>
|
|
|
|
{{if .Error}}
|
|
<div class="error">{{.Error}}</div>
|
|
{{else}}
|
|
|
|
<div class="stats">
|
|
<div class="stat-card">
|
|
<div class="label">Total Size</div>
|
|
<div class="value">{{formatSize .TotalSize}}</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="label">Tags</div>
|
|
<div class="value">{{len .Tags}}</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="label">Manifests</div>
|
|
<div class="value">{{len .Manifests}}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2>Tags</h2>
|
|
{{if .Tags}}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Tag</th>
|
|
<th>Digest</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .Tags}}
|
|
<tr>
|
|
<td>{{.Name}}</td>
|
|
<td class="truncated"><a href="/repositories/{{$.Name}}/manifests/{{.Digest}}">{{truncate .Digest 24}}</a></td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{else}}
|
|
<p>No tags.</p>
|
|
{{end}}
|
|
|
|
<h2>Manifests</h2>
|
|
{{if .Manifests}}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Digest</th>
|
|
<th>Media Type</th>
|
|
<th>Size</th>
|
|
<th>Created</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .Manifests}}
|
|
<tr>
|
|
<td class="truncated"><a href="/repositories/{{$.Name}}/manifests/{{.Digest}}">{{truncate .Digest 24}}</a></td>
|
|
<td>{{.MediaType}}</td>
|
|
<td>{{formatSize .Size}}</td>
|
|
<td>{{formatTime .CreatedAt}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{else}}
|
|
<p>No manifests.</p>
|
|
{{end}}
|
|
|
|
{{end}}
|
|
{{end}}
|