{% extends "ui/_layout.html" %} {% from "ui/_table_macros.html" import sort_header, pagination_inline, filter_form with context %} {% block title %}Catalog - withcache{% endblock %} {% block subnav %} {# Left: jump link to the entries table. Right: three inline actions -- Add ORAS URL, Add HTTPS URL, Fetch default catalog. The catalog source URL itself is edited on /ui/settings so the Catalog page stays focused on the entries data. #} {% endblock %} {% block intro %}
Operator-staged catalog entries. Add + Download here; the trio-facing GET /catalog API filters to entries whose bytes are already downloaded so bty + nbdmux never see a not-yet-ready entry. Configure the catalog source URL on Settings → Catalog source.
{% if catalog_last_error %}
{{ catalog_last_error }}
{% endif %} {% if catalog_last_info %}
{{ catalog_last_info }}
{% endif %} {% endblock %} {% block content %}
Catalog entries {{ filter_form(q, sort, page, per_page_choices, 'catalog-q', placeholder='Filter (name / URL / format)') }} {{ pagination_inline(page, preserved, label='entries') }}
{{ sort_header('Name', 'name', sort, preserved) }} {{ sort_header('Source', 'src', sort, preserved) }} {{ sort_header('Format', 'format', sort, preserved, 'style="width: 1%; white-space: nowrap;"') }} {{ sort_header('State', 'downloaded_at', sort, preserved, 'style="min-width: 12rem;" title="Cached / downloading / failed. Downloading shows a live progress bar."') }} {% for e in catalog_entries %} {% endfor %} {% if not catalog_entries %} {% endif %}
Size HitsActions
{{ e.get('name', '') }} {{ e.get('src') or e.get('url') or '' }} {% if e.get('format') %} {{ e.format }} {% else %} - {% endif %} {% if e.get('downloaded_size') %} {{ e.downloaded_size }} {% elif e.get('size_bytes') %} {{ e.size_bytes }} {% else %} - {% endif %} {{ e.get('hits', 0) }} {% if e.get('active_job_status') in ('queued', 'running') %} {% set st = e.active_job_status %} {{ st }} {% if e.get('active_job_bytes_total') and e.active_job_bytes_total > 0 %} {% set pct = (e.active_job_bytes_done * 100 / e.active_job_bytes_total) | round(1) %}
{{ pct }}% {% endif %} {% elif e.get('active_job_status') == 'failed' %} failed {% elif e.get('active_job_status') == 'cancelled' %} cancelled {% elif e.get('downloaded_at') %} cached {% else %} - {% endif %}
{% if e.get('active_job_status') in ('queued', 'running') %}
{% else %}
{% if e.get('downloaded_at') %} {% else %} {% endif %}
{% endif %}
{% if q %} No entries match {{ q }}. {% else %} No catalog entries yet. Add an ORAS or HTTPS URL on the subnav, or click Fetch default to populate from the configured source (Settings → Catalog source). {% endif %}
{% endblock %}