{% extends "layout.html" %} {% from "_partials/recent_events.html" import recent_events_card %} {% from "_partials/page_description.html" import page_description %} {% block title %}Overlays - pixie{% endblock %} {# State -> badge. Kept as a macro so the server render + the live- refresh JS below agree on colour + label for every state. #} {% macro state_badge(state) %} {% if state == 'active' %}Active {% elif state == 'idle' %}Idle {% elif state == 'orphaned' %}Orphaned {% else %}File missing{% endif %} {% endmacro %} {% block subnav %} {% endblock %} {% block content %} {{ page_description('layers', 'Persistent per-machine qcow2 overlays for nbdboot. Each is one machine\'s writable disk layered over a catalog base image; the disk-used + last-modified columns refresh every 5 s while the page is open. Reset wipes one back to the base image; Prune reclaims overlays whose file is gone or whose machine pixie no longer tracks.') }} {# ---- Summary strip ------------------------------------------------- Fleet-wide roll-up. The numbers poll live alongside the table so an operator watching an overlay grow sees the total tick without a reload. Prune sits with the reclaimable tile it acts on. #}
Overlays
{{ totals.count }}
Disk used
{{ totals.used_bytes | humanize_bytes }}
Serving now
{{ totals.running }}
{{ totals.active }} back a current binding
Reclaimable
{{ totals.reclaimable }} ({{ totals.reclaimable_bytes | humanize_bytes }})
Overlays
{% if overlays %}
{% for ov in overlays %} {% endfor %}
State Machine Profile Base image Disk used Last modified Created Last boot NBD Actions
{{ state_badge(ov.state) }} {{ ov.mac }} {% if not ov.machine_exists %} unregistered {% endif %} {% if ov.machine_labels %}
{% for lbl in ov.machine_labels %} {{ lbl }} {% endfor %}
{% endif %}
{{ ov.profile }} {% if ov.image_name %} {{ ov.image_name }} {% else %} {{ ov.image_sha[:12] }} {% endif %} {% if ov.base_bytes %}
over {{ ov.base_bytes | humanize_bytes }} base
{% endif %}
{% if ov.file_exists %} {{ ov.used_bytes | humanize_bytes }} {% else %} - {% endif %} {{ ov.mtime | fmt_ts if ov.mtime else '-' }} {{ ov.created_at | fmt_ts }} {{ ov.last_boot_at | fmt_ts if ov.last_boot_at else '-' }} {% if ov.running %} :{{ ov.nbd_port }} {% else %} idle {% endif %}
{% else %}

No overlays yet. An overlay is created the first time a machine bound to nbdboot with a persistent profile PXE-boots. Bind one on a machine's detail page.

{% endif %}
{{ recent_events_card(overlay_events, 'overlay', empty_message='No overlay events yet.') }}
{% endblock %}