summaryrefslogtreecommitdiffstats
path: root/templates/manifest.gohtml
diff options
context:
space:
mode:
authorColin Wilk <colin@wilk.cx>2026-10-30 10:04:02 +0100
committerColin Wilk <colin@wilk.cx>2026-10-30 10:07:43 +0100
commitb03b00869391cd70ef1e40561f72dffbd2f47b29 (patch)
treefd1941854bea58ec464b81ac8b0d8627cbed2e74 /templates/manifest.gohtml
downloadcr-web-b03b00869391cd70ef1e40561f72dffbd2f47b29.tar.gz
cr-web-b03b00869391cd70ef1e40561f72dffbd2f47b29.zip
Initial Commit
Diffstat (limited to 'templates/manifest.gohtml')
-rw-r--r--templates/manifest.gohtml52
1 files changed, 52 insertions, 0 deletions
diff --git a/templates/manifest.gohtml b/templates/manifest.gohtml
new file mode 100644
index 0000000..93ebecc
--- /dev/null
+++ b/templates/manifest.gohtml
@@ -0,0 +1,52 @@
+{{define "manifest"}}{{template "header" .}}
+ <h1>Manifest in repository <a href="{{repoURL .Repository.Name}}">{{.Repository.Name}}</a> in <a href="/">registry</a></h1>
+ <h2>Tags referencing manifest</h2>
+ <table>
+ <thead><tr><th scope="col">Tag</th><th scope="col">Last updated</th></tr></thead>
+ <tbody>
+ {{range .Manifest.Tags}}
+ <tr>
+ <td>{{if eq .ManifestDigest $.Manifest.Digest}}{{.Name}}{{else}}<a href="{{manifestURL $.Repository.Name .ManifestDigest .Name}}">{{.Name}}</a>{{end}}</td>
+ <td title="{{timestamp .UpdatedAt}}">{{age .UpdatedAt .Age}}</td>
+ </tr>
+ {{else}}
+ <tr><td colspan="2">No tags reference this manifest.</td></tr>
+ {{end}}
+ </tbody>
+ </table>
+ <br>
+ <h2>Pull address</h2>
+ <div><pre class="literal" style="display: inline-block">{{pull .RegistryHost .Repository.Name .SelectedTag .Manifest.Digest}}</pre></div>
+ <br>
+
+ {{if eq .Manifest.Kind "index"}}
+ <h2>Manifests in list</h2>
+ <table>
+ <thead><tr><th scope="col" colspan="2">OS/Arch</th><th scope="col">Size</th><th scope="col">Pull address</th></tr></thead>
+ <tbody>
+ {{range .Manifest.Platforms}}
+ <tr>
+ <td>{{.Platform}}</td><td>{{.Variant}}</td>
+ <td style="text-align: right" title="{{.SizeBytes}} bytes">{{size .SizeBytes}}</td>
+ <td>{{pull $.RegistryHost $.Repository.Name $.SelectedTag ""}}@<a class="monospace" href="{{manifestURL $.Repository.Name .Digest $.SelectedTag}}">{{.Digest}}</a></td>
+ </tr>
+ {{else}}
+ <tr><td colspan="4">No platform manifests found.</td></tr>
+ {{end}}
+ </tbody>
+ </table>
+ {{else}}
+ <h2>Layers in manifest</h2>
+ <table>
+ <thead><tr><th scope="col">Digest</th><th scope="col">Size</th></tr></thead>
+ <tbody>
+ {{range .Manifest.Layers}}
+ <tr><td class="monospace">{{.Digest}}</td><td style="text-align: right" title="{{.SizeBytes}} bytes">{{size .SizeBytes}}</td></tr>
+ {{else}}
+ <tr><td colspan="2">No layers found.</td></tr>
+ {{end}}
+ </tbody>
+ <tfoot><tr><td><b>Total size</b></td><td style="text-align: right" title="{{.Manifest.TotalSizeBytes}} bytes"><b>{{size .Manifest.TotalSizeBytes}}</b></td></tr></tfoot>
+ </table>
+ {{end}}
+{{template "footer" .}}{{end}}