{% extends "ui/_layout.html" %} {% from "ui/_table_macros.html" import sort_header, pagination_inline, copy_chip with context %} {% block title %}Images - bty-web{% endblock %} {% block subnav %} {# Left: in-page jump links. Right: the three add-paths (Add image / Upload catalog / Fetch catalog), moved here from the card header so the page-level actions live in the page chrome and the card-body stays focused on the catalog table. #} {% endblock %} {% block intro %} {% from "ui/_intro_box.html" import render as intro_box %} {% call intro_box() %} The image catalog. Each entry references a URL (https or oras) the live env flashes from. bty-web doesn't host image bytes -- withcache holds them when warm, the upstream origin serves them when cold. The header carries three add-paths: Add image (a single URL), Upload catalog (a catalog.toml), and Fetch latest catalog (pull the bty release catalog). {% endcall %} {% endblock %} {% block content %}
{# Card header: "Images | Filter: " flexes to fill the left side; pagination sits on the right. The three add-paths moved up into the subnav strip. #}
{% if sort.column != 'name' %}{% endif %} {% if sort.direction != 'asc' %}{% endif %} {% if page.per_page != per_page_choices[0] %}{% endif %} Images {% if q %} Clear {% endif %}
{{ pagination_inline(page, preserved, label='images') }}
{{ sort_header('Name', 'name', sort, preserved) }} {{ sort_header('Content SHA', 'sha256', sort, preserved) }} {{ sort_header('Format', 'format', sort, preserved) }} {{ sort_header('Arch', 'arch', sort, preserved) }} {{ sort_header('Source', 'ref', sort, preserved) }} {% for u in unified %} {% set entry_src = u.sources|map(attribute='location')|first %} {% endfor %} {% if not unified %} {% endif %}
Status Action
{{ u.names[0] }} {% if u.sha256 %} {{ copy_chip(u.sha256) }} {% else %} unset {% endif %} {{ u.format or "?" }} {% if u.arch %} {{ u.arch }} {% else %} {% endif %} {% if entry_src %} {% if entry_src.startswith('oras://') %} {% else %} {% endif %} {{ copy_chip(entry_src, shown=entry_src) }} {% endif %} {% if entry_src %} {% endif %}
No catalog entries yet. Use Add image, Upload catalog, or Fetch latest catalog in the header above.
{# Catalog event slice (entry adds / deletes / imports). #} {% with events=image_events, title="Last " + recent_events_limit|string + " Events", link_to_full="/ui/events?q=catalog", card_id="images-activity" %} {% include "ui/_events_card.html" %} {% endwith %} {% endblock %}