mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-26 04:04:15 +00:00
improvements to how scanning works, and helmchart ui
This commit is contained in:
@@ -9,13 +9,26 @@
|
||||
Anonymous users: saves to localStorage.
|
||||
*/}}
|
||||
{{ if eq .ArtifactType "helm-chart" }}
|
||||
<div class="space-y-2">
|
||||
<p class="text-sm font-medium text-base-content/70">Pull this chart</p>
|
||||
{{ if .Tag }}
|
||||
{{ template "docker-command" (print "helm pull oci://" .RegistryURL "/" .OwnerHandle "/" .RepoName " --version " .Tag) }}
|
||||
{{ else }}
|
||||
{{ template "docker-command" (print "helm pull oci://" .RegistryURL "/" .OwnerHandle "/" .RepoName) }}
|
||||
{{ end }}
|
||||
{{/* Helm chart: small install/pull toggle. JS in app.js wires the
|
||||
switcher and persists the choice in localStorage. Default = install. */}}
|
||||
{{ $versionFlag := "" }}
|
||||
{{ if .Tag }}{{ $versionFlag = print " --version " .Tag }}{{ end }}
|
||||
{{ $ociRef := print "oci://" .RegistryURL "/" .OwnerHandle "/" .RepoName }}
|
||||
<div class="space-y-2" id="helm-cmd-container"
|
||||
data-registry-url="{{ .RegistryURL }}"
|
||||
data-owner-handle="{{ .OwnerHandle }}"
|
||||
data-repo-name="{{ .RepoName }}"
|
||||
data-tag="{{ if .Tag }}{{ .Tag }}{{ end }}">
|
||||
<label for="helm-cmd-switcher" class="text-sm font-medium text-base-content/70">Use this chart</label>
|
||||
<div class="flex items-center gap-2">
|
||||
<select id="helm-cmd-switcher" class="select select-xs select-bordered w-auto">
|
||||
<option value="install" selected>helm install</option>
|
||||
<option value="pull">helm pull</option>
|
||||
</select>
|
||||
<div id="helm-cmd-display" class="flex-1 min-w-0" aria-live="polite">
|
||||
{{ template "docker-command" (print "helm install " .RepoName " " $ociRef $versionFlag) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="space-y-2" id="pull-cmd-container"
|
||||
|
||||
Reference in New Issue
Block a user