imaging: operator-friendly stage labels per bay card

Was showing the raw push label (e.g. "Run-ShopfloorSetup: handoff to
Monitor-IntuneProgress") which only makes sense if you know the
playbook internals. Added a stage_index -> (label, hint) lookup table:

  1  Booting from PXE                    WinPE loaded
  2  Configuring Windows                 First boot baseline scripts
  3  Installing apps                     09-Setup-<pctype>
  4  Apps installed                      preparing for enrollment
  5  Enrolling in Intune                 PPKG + AAD/Intune join
  6  Waiting on first Intune sync        post-PPKG settle (~120s)
  7  Registered - assign category        idx=7 with QR + set-category btn
  8  Imaging complete                    lockdown applied

Friendly label + one-line hint shown bold, raw stage string shown
underneath in small monospace for techs who want the playbook
breadcrumb. Stage index/total folded into a badge next to the
"Current stage" header so it doesn't need its own column.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-05-14 20:08:05 -04:00
parent 520d4aa791
commit 5f322d1110

View File

@@ -36,6 +36,17 @@ window.addEventListener('DOMContentLoaded', scheduleImagingReload);
</div>
{% 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) %}
@@ -43,6 +54,7 @@ window.addEventListener('DOMContentLoaded', scheduleImagingReload);
{% 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, '')) %}
<div class="card border-{{ border }} mb-3">
<div class="card-header d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center gap-3">
@@ -70,13 +82,11 @@ window.addEventListener('DOMContentLoaded', scheduleImagingReload);
</div>
<div class="card-body">
<div class="row g-3 mb-3 small">
<div class="col-md-3">
<div class="text-muted">Current stage</div>
<div><strong>{{ s.current_stage or '-' }}</strong></div>
</div>
<div class="col-md-2">
<div class="text-muted">Stage</div>
<div>{{ stage_idx }} / {{ stage_total or '?' }}</div>
<div class="col-md-5">
<div class="text-muted">Current stage <span class="badge bg-secondary ms-1">{{ stage_idx }}/{{ stage_total or '?' }}</span></div>
<div><strong>{{ friendly[0] }}</strong></div>
{% if friendly[1] %}<div class="small text-muted">{{ friendly[1] }}</div>{% endif %}
{% if s.current_stage %}<div class="text-muted" style="font-size:0.7rem;font-family:monospace;">{{ s.current_stage }}</div>{% endif %}
</div>
<div class="col-md-2">
<div class="text-muted">Started</div>