{% extends "base.html" %} {% block title %}Imaging Progress - PXE Server Manager{% endblock %} {% block extra_head %} {# JS-driven refresh instead of meta http-equiv so we can cancel it while a #} {# LAPS-password QR is showing (otherwise the 5s reload wipes the in-page #} {# state every cycle). #} {% endblock %} {% block content %}

Imaging Progress

Auto-refresh 5s. POST updates from imaging clients arrive at /imaging/status.
{{ sessions|length }} session{{ 's' if sessions|length != 1 }}
{% if not sessions %}

No imaging sessions yet.

A PC being imaged will post status here. Until then, nothing to show.

{% endif %} {% set stage_labels = { 1: ('Booting from PXE', 'WinPE loaded - applying Windows image to disk.'), 2: ('Configuring Windows', 'First boot. Running shopfloor setup baseline scripts.'), 3: ('Installing apps', 'Type-specific app installs (eDNC, UDC, NTLARS, etc).'), 4: ('Apps installed', 'Type-specific scripts complete. Preparing for Intune enrollment.'), 5: ('Enrolling in Intune', 'PPKG installing - device joining Azure AD + Intune. ~5-10 min, reboot to follow.'), 6: ('Waiting on first Intune sync','Post-PPKG settle (~120s). Triggering Schedule #3 sync repeatedly.'), 7: ('Registered - assign category','Device ID captured. Click "set category" to put bay in the right Intune group. Then wait for LAPS reboot.'), 8: ('Imaging complete', 'Lockdown applied. Bay rebooted into ShopFloor session. Ready for production.') } %} {% for s in sessions %} {% set stage_idx = s.stage_index | int(0) %} {% set stage_total = s.stage_total | int(0) %} {% set pct = 100 if s.status == 'succeeded' else ((stage_idx / stage_total * 100) | round(0, 'floor')) if stage_total > 0 else 0 %} {% set is_failed = s.status == 'failed' %} {% set is_done = s.status == 'succeeded' %} {% set border = 'danger' if is_failed else ('success' if is_done else 'primary') %} {% set friendly = stage_labels.get(stage_idx, ('Stage ' ~ stage_idx, '')) %}
{% if s.intune_device_id %}
{% endif %}
{{ s.serial or '(no serial)' }} {% if s.hostname_target %}{{ s.hostname_target }}{% endif %} {% if s.pctype %}{{ s.pctype }}{% endif %} {% if s.machinenumber %}#{{ s.machinenumber }}{% endif %} {% if s.intune_device_id %}
Intune: {{ s.intune_device_id }} set category
{% endif %}
{{ s.status or 'in_progress' }}
Current stage {{ stage_idx }}/{{ stage_total or '?' }}
{{ friendly[0] }}
{% if friendly[1] %}
{{ friendly[1] }}
{% endif %} {% if s.current_stage %}
{{ s.current_stage }}
{% endif %}
Started
{{ s.started_at or '-' }}
Last update
{{ s.last_updated or '-' }}
MAC
{{ s.mac or '-' }}
{{ pct }}%
{% if s.error %}
Error: {{ s.error }}
{% endif %} {% if s.intune_device_id %}
LAPS password QR (paste -> scan on bay)
{% endif %} {% if s.log_tail %}
Log tail ({{ s.log_tail | length }} line{{ 's' if s.log_tail | length != 1 }})
{% for line in s.log_tail %}{{ line }}
{% endfor %}
{% endif %}
{% endfor %}
How to push status from an imaging client:
POST http://172.16.9.1:9009/imaging/status
Content-Type: application/json

{
  "serial": "4HBLF33",
  "mac": "e4:54:e8:dc:b1:f0",
  "hostname_target": "EDNMG3D4",
  "pctype": "gea-shopfloor-keyence",
  "machinenumber": "9999",
  "current_stage": "Run-ShopfloorSetup: 09-Setup-Keyence",
  "stage_index": 7,
  "stage_total": 9,
  "status": "in_progress",
  "log_lines": ["last few log lines from the stage"]
}
{% endblock %} {% block extra_scripts %} {% endblock %}