{% extends "base.html" %} {% block title %}Imaging Progress - PXE Server Manager{% endblock %} {% block extra_head %} {% 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 %} {% 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') %}
{% 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 }}
{% endif %}
{{ s.status or 'in_progress' }}
Current stage
{{ s.current_stage or '-' }}
Stage
{{ stage_idx }} / {{ stage_total or '?' }}
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.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://10.9.100.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 %}