mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-08-31 13:17:09 +00:00
67 lines
2.9 KiB
HTML
67 lines
2.9 KiB
HTML
{{ define "digest-content" }}
|
|
<!-- Layers + Vulnerabilities Side by Side -->
|
|
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
|
<!-- Layers (Left) -->
|
|
<div class="card bg-base-200 shadow-sm border border-base-300 p-6 space-y-4 min-w-0">
|
|
<div class="flex items-center justify-between">
|
|
<h2 class="text-lg font-semibold">Layers ({{ len .Layers }})</h2>
|
|
<label class="flex items-center gap-2 text-sm cursor-pointer">
|
|
<input type="checkbox" class="checkbox checkbox-xs show-empty-layers-cb" data-toggle-empty-layers>
|
|
<span>Show empty layers</span>
|
|
</label>
|
|
</div>
|
|
{{ if .Layers }}
|
|
<div class="overflow-x-auto">
|
|
<table class="table table-xs w-full layers-table">
|
|
<thead>
|
|
<tr class="text-xs">
|
|
<th class="w-8">#</th>
|
|
<th>Command</th>
|
|
<th class="text-right w-24">Size</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{ range .Layers }}
|
|
<tr data-empty="{{ .EmptyLayer }}" data-no-command="{{ and (not .Command) (not .EmptyLayer) }}">
|
|
<td class="font-mono text-xs">{{ .Index }}</td>
|
|
<td>
|
|
{{ if .Command }}
|
|
<code class="font-mono text-xs break-all line-clamp-2" title="{{ .Command }}">{{ .Command }}</code>
|
|
{{ end }}
|
|
</td>
|
|
<td class="text-right text-sm whitespace-nowrap" data-bytes="{{ .Size }}">{{ humanizeBytes .Size }}</td>
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{ else }}
|
|
<p class="text-base-content">No layer information available</p>
|
|
{{ end }}
|
|
</div>
|
|
|
|
<!-- Vulnerabilities + SBOM (Right) -->
|
|
<div class="card bg-base-200 shadow-sm border border-base-300 p-6 space-y-4 min-w-0">
|
|
<div role="tablist" class="tabs tabs-bordered">
|
|
<input type="radio" name="scan-tabs" role="tab" class="tab" aria-label="Vulnerabilities" checked="checked" />
|
|
<div role="tabpanel" class="tab-content pt-4">
|
|
{{ if .VulnData }}
|
|
{{ template "vuln-details" .VulnData }}
|
|
{{ else }}
|
|
<p class="text-base-content">No vulnerability scan data available</p>
|
|
{{ end }}
|
|
</div>
|
|
|
|
<input type="radio" name="scan-tabs" role="tab" class="tab" aria-label="SBOM" />
|
|
<div role="tabpanel" class="tab-content pt-4">
|
|
{{ if .SbomData }}
|
|
{{ template "sbom-details" .SbomData }}
|
|
{{ else }}
|
|
<p class="text-base-content">No SBOM data available</p>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ end }}
|