diff --git a/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 b/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 index 8045c60..92d8ed4 100644 --- a/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 +++ b/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 @@ -188,16 +188,18 @@ $script:cache = @{ DeviceIdReported = $false } -# Lazy-load Send-PxeStatus so the dashboard can render a QR of the Intune -# device GUID as soon as it's captured. Dot-source path mirrors the helper -# usage in the 09-Setup-*.ps1 scripts. -$script:sendPxeStatusLoaded = $false +# Load Send-PxeStatus at SCRIPT scope (not inside a function). A dot-source +# inside a function defines the imported function in that function's local +# scope only, so callers from other functions can't see it and Get-Command +# Send-PxeStatus returns nothing. Loading at the top of the script puts +# Send-PxeStatus in script scope where every function can find it. +$pxeStatusLib = Join-Path $PSScriptRoot 'Send-PxeStatus.ps1' +if (Test-Path $pxeStatusLib) { + try { . $pxeStatusLib } catch { Write-Warning "Send-PxeStatus dot-source failed: $_" } +} function Ensure-SendPxeStatus { - if ($script:sendPxeStatusLoaded) { return } - $lib = Join-Path $PSScriptRoot 'Send-PxeStatus.ps1' - if (Test-Path $lib) { - try { . $lib; $script:sendPxeStatusLoaded = $true } catch { } - } + # Kept as a no-op shim for any callers that still invoke it. Real load + # happens at script init above. } function Get-Phase1 { diff --git a/webapp/templates/imaging.html b/webapp/templates/imaging.html index d3dd648..e7cac74 100644 --- a/webapp/templates/imaging.html +++ b/webapp/templates/imaging.html @@ -34,11 +34,18 @@ {% set border = 'danger' if is_failed else ('success' if is_done else 'primary') %}
{{ s.hostname_target }}{% endif %}
- {% if s.pctype %}{{ s.pctype }}{% endif %}
- {% if s.machinenumber %}#{{ s.machinenumber }}{% endif %}
+ {{ s.hostname_target }}{% endif %}
+ {% if s.pctype %}{{ s.pctype }}{% endif %}
+ {% if s.machinenumber %}#{{ s.machinenumber }}{% endif %}
+ {% if s.intune_device_id %}{{ s.intune_device_id }}