Hi,
The code below is not working in version 4.2.21, but it works fine in version 3.10.3. I would appreciate any help you can provide.
Connect-PSUServer -ComputerName localhost -AppToken $AppToken
$Job = Invoke-PSUScript -Script 'script.ps1'
while ($Job.Status -ne 'Completed') {
Start-Sleep 1
$Output = (Get-PSUJobOutput -Job $Job).Data -join ([Environment]::NewLine)
Show-UDModal -Content {
New-UDTypography -Text "SCRIPT LOG" -Variant h4
New-UDCodeEditor -Id 'codeEditor' -ReadOnly -Height 500 -Width 1000 -Theme 'vs-dark'
New-UDButton -Text 'Close' -OnClick {
Hide-UDModal
}
Set-UDElement -Id 'codeEditor' -Properties @{
code = $Output
}
}
Set-UDElement -Id 'codeEditor' -Properties @{
code = $Output
}
$Job = Get-PSUJob -Id $Job.Id
}
Set-UDElement -Id 'button' -Properties @{
disabled = $false
text = "CLICK HERE"
}
} -Id 'button'