{% extends "ui/_layout.html" %} {% block title %}Images - bty-web{% endblock %} {% block content %}
{{ image_root }}
PUT /images/<name>. SHA-256 is auto-computed
in the background after upload completes.
.qcow2 /
.img / .img.zst / .img.xz
/ .img.gz / .img.bz2 file under
{{ image_root }} and refresh.
| Name(s) | {# Observed content sha (``disk_image_sha`` on the catalog row). Machines bind via ``bty_image_ref`` -- shown in the machine- detail picker, not here. #}Content SHA | Format | Sources | Cached | Action |
|---|---|---|---|---|---|
{% for n in u.names %}
{{ n }}{% if not loop.last %}, {% endif %}
{% endfor %}
|
{% if u.sha256 %}
{{ u.sha256[:12] }}...
{% else %}
unhashed
{% endif %}
|
{{ u.format or "?" }} |
{% for s in u.sources %}
{% if s.kind == "local" %}
{{ s.location }}
{% elif s.kind == "url" %}
{{ s.location }}
{% else %}
{{ s.location }}
{% endif %}
{% if not loop.last %}{% endif %} {% endfor %} |
{% if u.cached %} cached {% else %} available {% endif %} |
{# Dispatch by source shape, not just sha presence:
- Has a ``local`` source and no sha -> the file is
on disk and just needs hashing. Hash button.
- No local source -> bytes need fetching. Fetch
button. Works for un-sha'd URL / oras entries
(the DownloadManager downloads + computes sha +
back-fills catalog_entries.disk_image_sha) AND
for sha-pinned entries not yet in cache.
Previously every un-sha'd entry rendered the
Hash button, which 404'd on URL-only rows
because HashManager requires a local file. #}
{% set has_local = u.sources|selectattr('kind','equalto','local')|list|length > 0 %}
{% if not u.sha256 and has_local %}
{% elif not u.cached %}
{% endif %}
{# Evict cached bytes. Available for any entry
whose bytes are in the cache dir
(``$BTY_STATE_DIR/cache/ |
| Name | Status | Progress | Bytes | Action |
|---|---|---|---|---|
| No downloads yet. | ||||
| Name | Status | Progress | Bytes | Action |
|---|---|---|---|---|
| No hashes yet. | ||||