diff --git a/playbook/startnet.cmd b/playbook/startnet.cmd index 28ef75f..f53304c 100644 --- a/playbook/startnet.cmd +++ b/playbook/startnet.cmd @@ -254,6 +254,20 @@ if exist "Y:\scripts\winpe-status-push.ps1" ( powershell -NoProfile -ExecutionPolicy Bypass -File "Y:\scripts\winpe-status-push.ps1" ) +REM --- BIOS update sub-stage push --- +REM If check-bios.cmd actually applied or staged a firmware update, push +REM a second idx=1 status with a BIOS-specific stage string so the +REM dashboard friendly-label swaps to "Updating BIOS firmware". The "->" +REM marker is what check-bios writes for both "updated" and "STAGED" +REM cases. No-op states ("up to date", "no update in catalog", "Skipped", +REM "missing") never contain the arrow and stay on the default label. +echo %BIOS_STATUS% | findstr /C:"->" >NUL +if not errorlevel 1 ( + if exist "Y:\scripts\winpe-status-push.ps1" ( + powershell -NoProfile -ExecutionPolicy Bypass -File "Y:\scripts\winpe-status-push.ps1" -CurrentStage "WinPE: BIOS firmware update - %BIOS_STATUS%" + ) +) + echo Waiting for PESetup.exe to start... :wait_start ping -n 3 127.0.0.1 >NUL diff --git a/playbook/winpe-status-push.ps1 b/playbook/winpe-status-push.ps1 index 6d9eb9c..9fba978 100644 --- a/playbook/winpe-status-push.ps1 +++ b/playbook/winpe-status-push.ps1 @@ -13,7 +13,9 @@ param( [string]$PxeServer = '172.16.9.1', [int]$Port = 9009, [int]$TimeoutSec = 5, - [string]$PCType = $env:PCTYPE + [string]$PCType = $env:PCTYPE, + [string]$CurrentStage = 'WinPE: PESetup / WIM apply', + [int]$StageIndex = 1 ) $logFile = 'X:\Windows\Temp\winpe-status-push.log' @@ -54,8 +56,8 @@ if (-not $serial) { $payload = @{ serial = $serial pctype = $PCType - current_stage = 'WinPE: PESetup / WIM apply' - stage_index = 1 + current_stage = $CurrentStage + stage_index = $StageIndex stage_total = 8 status = 'in_progress' } diff --git a/webapp/templates/imaging.html b/webapp/templates/imaging.html index c58f177..6831ef1 100644 --- a/webapp/templates/imaging.html +++ b/webapp/templates/imaging.html @@ -63,6 +63,12 @@ window.addEventListener('DOMContentLoaded', scheduleImagingReload); {% 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, '')) %} + {# Stage 1 sub-phase: if WinPE pushed a BIOS update stage string, #} + {# show a BIOS-specific friendly label. Otherwise default idx=1. #} + {% if stage_idx == 1 and s.current_stage and 'bios' in s.current_stage|lower %} + {% set friendly = ('Updating BIOS firmware', + 'WinPE detected a firmware update for this model. Do NOT power off until the next reboot. Imaging continues afterward.') %} + {% endif %} {# Stage 7 fans out by sub-phase. Monitor pushes different stage #} {# strings as it crosses each Phase 1-4 boundary. Swap friendly #} {# label based on which keyword shows up. #}