mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-25 03:34:14 +00:00
Artifacts filter had no empty state: filtering to zero matches left a blank panel, indistinguishable from something being broken. It now uses the existing state-empty partial, with no CTA since the filter input is right there. Rows appended by Load More now also obey the active filter, which is a change to existing behaviour but is required for the empty state to be truthful. The tag icon beside the tag selector computed to 5.44px by 24px on every repo page: the class was right, the flex parent was shrinking it. Adds shrink-0 to that instance only. 31 other icons are direct flex children without shrink-0 and are left alone, since a site-wide sweep found only this one squeezed. Digest-page scan tabs set role="tab" but never aria-selected, while the repo-page tabs do. Both are now set server-side so first paint is correct, with JS keeping them in sync afterwards, following switchRepoTab's pattern. The diff-content tabs had the identical defect and are fixed too, since the handler is generic over radio tabs and leaving them out would have meant attributes set by JS but never by the server. Includes the bundle rebuild for these and the two /auth/token-adjacent JS changes, since nothing in the dev loop keeps that artifact current on its own. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PDqoCE1j3njokkZ9b1C5n9
76 lines
3.6 KiB
HTML
76 lines
3.6 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">
|
|
<caption class="sr-only">Image layers</caption>
|
|
<thead>
|
|
<tr class="text-xs">
|
|
<th scope="col" class="w-8">#</th>
|
|
<th scope="col">Command</th>
|
|
<th scope="col" class="text-right">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 }}
|
|
{{ template "state-empty" (dict
|
|
"Icon" "history"
|
|
"Title" "No layer history"
|
|
"Subtext" "This manifest has no layer history recorded."
|
|
) }}
|
|
{{ 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" id="scan-tab-vulns" name="scan-tabs" role="tab" class="tab" aria-label="Vulnerabilities" aria-controls="scan-panel-vulns" aria-selected="true" checked="checked" />
|
|
<div id="scan-panel-vulns" role="tabpanel" aria-labelledby="scan-tab-vulns" class="tab-content pt-4">
|
|
{{ if .VulnData }}
|
|
{{ template "vuln-details" .VulnData }}
|
|
{{ else }}
|
|
{{ template "state-empty" (dict
|
|
"Icon" "shield-check"
|
|
"Title" "No scan data yet"
|
|
"Subtext" "The scanner hasn't reported results for this manifest."
|
|
) }}
|
|
{{ end }}
|
|
</div>
|
|
|
|
<input type="radio" id="scan-tab-sbom" name="scan-tabs" role="tab" class="tab" aria-label="SBOM" aria-controls="scan-panel-sbom" aria-selected="false" />
|
|
<div id="scan-panel-sbom" role="tabpanel" aria-labelledby="scan-tab-sbom" 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 }}
|