From b03b00869391cd70ef1e40561f72dffbd2f47b29 Mon Sep 17 00:00:00 2001 From: Colin Wilk Date: Fri, 30 Oct 2026 10:04:02 +0100 Subject: Initial Commit --- templates/error.gohtml | 5 +++++ templates/layout.gohtml | 17 ++++++++++++++ templates/manifest.gohtml | 52 +++++++++++++++++++++++++++++++++++++++++++ templates/repositories.gohtml | 17 ++++++++++++++ templates/repository.gohtml | 22 ++++++++++++++++++ 5 files changed, 113 insertions(+) create mode 100644 templates/error.gohtml create mode 100644 templates/layout.gohtml create mode 100644 templates/manifest.gohtml create mode 100644 templates/repositories.gohtml create mode 100644 templates/repository.gohtml (limited to 'templates') diff --git a/templates/error.gohtml b/templates/error.gohtml new file mode 100644 index 0000000..9b7ba03 --- /dev/null +++ b/templates/error.gohtml @@ -0,0 +1,5 @@ +{{define "error"}}{{template "header" .}} +

{{.Status}}

+

{{.Message}}

+

Back to registry

+{{template "footer" .}}{{end}} diff --git a/templates/layout.gohtml b/templates/layout.gohtml new file mode 100644 index 0000000..cf6d839 --- /dev/null +++ b/templates/layout.gohtml @@ -0,0 +1,17 @@ +{{define "header"}} + + + + + {{.Title}} + + + +
+{{end}} + +{{define "footer"}} +
+ + +{{end}} 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" .}} +

Manifest in repository {{.Repository.Name}} in registry

+

Tags referencing manifest

+ + + + {{range .Manifest.Tags}} + + + + + {{else}} + + {{end}} + +
TagLast updated
{{if eq .ManifestDigest $.Manifest.Digest}}{{.Name}}{{else}}{{.Name}}{{end}}{{age .UpdatedAt .Age}}
No tags reference this manifest.
+
+

Pull address

+
{{pull .RegistryHost .Repository.Name .SelectedTag .Manifest.Digest}}
+
+ + {{if eq .Manifest.Kind "index"}} +

Manifests in list

+ + + + {{range .Manifest.Platforms}} + + + + + + {{else}} + + {{end}} + +
OS/ArchSizePull address
{{.Platform}}{{.Variant}}{{size .SizeBytes}}{{pull $.RegistryHost $.Repository.Name $.SelectedTag ""}}@{{.Digest}}
No platform manifests found.
+ {{else}} +

Layers in manifest

+ + + + {{range .Manifest.Layers}} + + {{else}} + + {{end}} + + +
DigestSize
{{.Digest}}{{size .SizeBytes}}
No layers found.
Total size{{size .Manifest.TotalSizeBytes}}
+ {{end}} +{{template "footer" .}}{{end}} diff --git a/templates/repositories.gohtml b/templates/repositories.gohtml new file mode 100644 index 0000000..09b5714 --- /dev/null +++ b/templates/repositories.gohtml @@ -0,0 +1,17 @@ +{{define "repositories"}}{{template "header" .}} +

This is a container registry.

+

Repositories

+ + + + {{range .Repositories}} + + + + + {{else}} + + {{end}} + +
NameLast updated
{{.Name}}{{age .UpdatedAt .Age}}
No repositories found.
+{{template "footer" .}}{{end}} diff --git a/templates/repository.gohtml b/templates/repository.gohtml new file mode 100644 index 0000000..5996684 --- /dev/null +++ b/templates/repository.gohtml @@ -0,0 +1,22 @@ +{{define "repository"}}{{template "header" .}} +

Tags for {{.Repository.Name}} in registry

+ + + + + + + {{range .Repository.Tags}} + + + + + + + + {{else}} + + {{end}} + +
TagAliasesLast updatedSize or platformsPull address
{{.Name}}{{join .Aliases " "}}{{age .UpdatedAt .Age}}{{if .Platforms}}{{.Platforms}}{{else}}{{size .SizeBytes}}{{end}}{{pull $.RegistryHost $.Repository.Name .Name ""}}
No tags found.
+{{template "footer" .}}{{end}} -- cgit v1.2.3