I have completed the migration of my 2.9 dashboard to 3.x I am however still struggling with some bugs that are causing issues that prevent me from putting it into production use. There is a confirmed bug with rendering icons using -render in tables based off this post
Issue with Icons used in -render
To get around this I am using the following code
$jData = $Body | ConvertFrom-Json
if($jData.OS.icon -eq 'windows'){
New-UDIcon -Icon windows -Size 2x #-Color $jData.OS.color
}
elseif($jData.OS.icon -eq 'linux'){
New-UDIcon -Icon linux -Size 2x #-Color $jData.OS.color
}
else {
New-UDIcon -Icon exclamation_triangle -Size 2x -Color red
}
}
This fixed the issue up until the latest update. 1.4.6 and the 1.5 nightly build. It now seems to be broken. When I output the data to a text file using $Data | ConvertTo-Json | Out-File “c:\temp\data.txt” the data looks the same as it did before , however using this code
New-UDTableColumn -Property os -Title ‘OS’ -Render {
$Data = $Body | ConvertFrom-Json
if($Data.os.icon -eq ‘Windows’){
New-UDElement -tag ‘div’ -Content { “Windows” }
New-UDIcon -Icon $Data.OS.icon -Size 2x -Color blue
}
$Data.OS.icon is now always null
Is there any documentation on how this was changed and how I can access to icon and button data using -render in tables?