Overview: network status pill for the two NICs

A 'Network' pill next to 'Services' lists each physical NIC with its role
(imaging / GE network, from /etc/pxe-server/nic.conf or dnsmasq's
interface= pin), link, speed, addresses, and whether dnsmasq serves
DHCP/PXE on it. It reads pxe-nic-check's verdict file
(/run/pxe-nic-status.json) when present, and shows a red banner when the
imaging NIC is on the GE network or a network with another DHCP server,
or when dnsmasq answers DHCP on a non-imaging NIC. Without the file it
shows link and addresses only. Read-only.
This commit is contained in:
cproudlock
2026-10-14 16:49:32 -04:00
parent 63fafbfc73
commit 0d69222f85
4 changed files with 243 additions and 0 deletions

View File

@@ -39,6 +39,11 @@ BLANCCO_SERVER = os.environ.get("BLANCCO_SERVER", "172.16.9.1")
UPDATES_DIR = os.environ.get("UPDATES_DIR", "/var/lib/pxe-webapp/updates")
TFTP_ROOT = os.environ.get("TFTP_ROOT", "/srv/tftp")
DNSMASQ_CONF = os.environ.get("DNSMASQ_CONF", "/etc/dnsmasq.conf")
# Network interfaces (Overview): the pxe-nic-check verdict file, its config,
# and dnsmasq's NIC pin (the fallback for which NIC is the imaging one).
NIC_STATUS_FILE = os.environ.get("NIC_STATUS_FILE", "/run/pxe-nic-status.json")
NIC_CONF = os.environ.get("NIC_CONF", "/etc/pxe-server/nic.conf")
DNSMASQ_NIC_CONF = os.environ.get("DNSMASQ_NIC_CONF", "/etc/dnsmasq.d/pxe-nic-only.conf")
# Log sources used by services/imaging_log_tail.py to infer client progress
# when no /imaging/status push has arrived yet. Override per-host if any of