controls/job-progress.ps1
function New-UDJobProgress { param( $Job ) if ($Job.Status -eq 'Running' -and $null -ne $Job.Activity) { New-UDElement -Tag 'div' -Content { $Job.CurrentOperation } New-UDElement -Tag 'div' -Content { $Job.StatusDescription } if ($Job.PercentComplete -ne 0) { New-UDPreloader -BackgroundColor 'white' -ProgressColor '#3f51b5' -PercentComplete $Job.PercentComplete } else { New-UDPreloader -BackgroundColor 'white' -ProgressColor '#3f51b5' -PercentComplete $Job.PercentComplete } } } |