Problem with New-UDProgress

Hi there,

sorry for asking that many questions in the forum! But I still have a problem with New-UDProgress.
In this case, New-UDProgress shows nothing, but New-UDChip shows the values…
what am I doing wrong?

Thanks for help :slight_smile:

 New-UDGrid -Item -ExtraSmallSize 6 -Content {
    New-UDDynamic -Id 'Sync4ServerInfo' -Content {
        $Disks = Get-WMIObject -Class Win32_LogicalDisk -Computername "testserver" | Where-Object {$_.DriveType -eq "3"}   
        New-UDPaper -Content {  
            foreach($disk in $disks) {
                $DiskFreeSpace = ($Disk.FreeSpace /1GB)
                $DiskSize = ($Disk.Size / 1GB)
                $Percent = [Math]::Round(($DiskFreeSpace / $DiskSize) * 100)  
                New-UDProgress -PercentComplete $Percent
                New-UDChip -Label $Percent         
            }
	} -Elevation 2
}

Looks like a bug. When you put the progress within a paper element, it is 0 width so you don’t see the progress at all. I fixed it by putting a 100% width UDElement around it.

New-UDDashboard -Title "Hello, World!" -Content {
    New-UDPaper -Content {  
        New-UDElement -Attributes @{
            style = @{
                width = "100%"
            }
        } -Content {
            New-UDProgress -PercentComplete 50
        } -Tag 'div'
    }
}
2 Likes