Hey all I am trying to call a function and have it print out the return with a UDHTML Markup to display it inside the tooltip.
Start-UdDashboard -Content {
$icon_Degraded = 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhE=='
$icon_Advisory = 'iVBORw0KGgoAAAANSUhEUgAAABIAA='
$icon_Unhealthy = 'iVBORw0KGgoAAAANSUhEUgAAAAElFTkSuQmCC'
$icon_Healthy = 'iVBORw0KGgoAAAANSUkJggg=='
New-UdDashboard -Title "Server Performance Dashboard" -Color '#FF050F7F' -Content {
New-UdRow {
New-UdColumn -Size 6 -Content {
New-UdRow {
New-UdColumn -Size 12 -Content {
New-UdTable -Title "Athena Status" -Headers @(" ", " ") -Endpoint {
@{'MX PAI Ingestion' =
New-UDTooltip -TooltipContent {
$EI = New-UDEndpointInitialization -Variable "testing" -Function "Test-It"
new-udhtml -markup $EI
} -content {
New-UDHTML -Markup "<img src='data:image/png;base64,$icon_Degraded' />"
}
}.GetEnumerator() | Out-UDTableData -Property @("Name", "Value")
}
}
}
}
}
}
function Test-It{
Return "HELLO TO YOU SIR"
}
}
This code works just fine and displays what it needs to but it never displays/calls the Test-It function. Though I do get this inside the tooltip when hovering:
I’ve also tried:
$EI = New-UDEndpointInitialization -Function “Test-It”
new-udhtml -markup $EI
$EI = New-UDEndpointInitialization -Function “Test-It”
New-UDCard -Title “The Title” -Endpoint {$EI}
So powershell gurus - what am I missing?