From 6dd612e1575749de7b3a552ea557fec7a869a717 Mon Sep 17 00:00:00 2001 From: Evan Jarrett Date: Sat, 3 Jan 2026 20:01:55 -0600 Subject: [PATCH] add helm badge to tags --- pkg/appview/static/css/style.css | 20 ++++++++++++++++++++ pkg/appview/storage/manifest_store.go | 8 +++++++- pkg/appview/templates/pages/repository.html | 4 +++- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/pkg/appview/static/css/style.css b/pkg/appview/static/css/style.css index 4e3c38b..9bf79c7 100644 --- a/pkg/appview/static/css/style.css +++ b/pkg/appview/static/css/style.css @@ -1569,6 +1569,26 @@ a.license-badge:hover { margin-left: 0.5rem; } +/* Helm chart badge */ +.badge-helm { + display: inline-flex; + align-items: center; + gap: 0.25rem; + padding: 0.25rem 0.6rem; + font-size: 0.75rem; + font-weight: 600; + border-radius: 12px; + background: #0f1689; + color: #fff; + white-space: nowrap; + margin-left: 0.5rem; +} + +.badge-helm svg { + width: 12px; + height: 12px; +} + .platform-badge { display: inline-flex; align-items: center; diff --git a/pkg/appview/storage/manifest_store.go b/pkg/appview/storage/manifest_store.go index a162821..b6abf4c 100644 --- a/pkg/appview/storage/manifest_store.go +++ b/pkg/appview/storage/manifest_store.go @@ -92,11 +92,17 @@ func (s *ManifestStore) Get(ctx context.Context, dgst digest.Digest, options ... } } + // Determine media type - prefer record field, fallback to blob mimeType for old records + mediaType := manifestRecord.MediaType + if mediaType == "" && manifestRecord.ManifestBlob != nil { + mediaType = manifestRecord.ManifestBlob.MimeType + } + // Parse the manifest based on media type // For now, we'll return the raw bytes wrapped in a manifest object // In a full implementation, you'd use distribution's manifest parsing return &rawManifest{ - mediaType: manifestRecord.MediaType, + mediaType: mediaType, payload: ociManifest, }, nil } diff --git a/pkg/appview/templates/pages/repository.html b/pkg/appview/templates/pages/repository.html index 69a4307..d87de0d 100644 --- a/pkg/appview/templates/pages/repository.html +++ b/pkg/appview/templates/pages/repository.html @@ -146,7 +146,9 @@
{{ .Tag.Tag }} - {{ if .IsMultiArch }} + {{ if eq .ArtifactType "helm-chart" }} + Helm + {{ else if .IsMultiArch }} Multi-arch {{ end }} {{ if .HasAttestations }}