UDStudio - Endpoints not picking up Id

Me again…

I’ve noticed in UDStudio that I’ve got a couple of endpoints which are not picking up their ID. For example

image

If I hover over it and click View Endpoint, the code is as follows:

    New-UDGrid  -NoFilter -Title " " -Id "oldestgrid" -AutoRefresh -RefreshInterval 230 -PageSize 10 -Endpoint {
        $Cache:oldesttickets |
        Out-UDGridData
    }

Specifying the Id with or without quotes does not make a difference. What am I doing wrong here?

Is this endpoint part of a session? Try expanding the sessions to see if it’s in that list of endpoints.

This is what I get:

Ouch. That’s a bug. Please file it on GitHub. You are running 2.8?

Indeed - Raised https://github.com/ironmansoftware/universal-dashboard/issues/1385

1 Like

Hi @adam,

I don’t know if it’s related but I’m having trouble with sync-udelement. I cannot seem to get the cards to refresh:

New-UDPage -Id 'agentspage' -Name "Agents" -Icon home -Content {
    New-UDRow -Columns {

        New-UDStyle -id 'style' -Style '
                    .card .card-title {
                    font-size: 30px }
                    .card .card-content {
                        font-size: 60px }
                    ' -Content {
            New-UDColumn -LargeSize 2 -Endpoint {
                New-UDElement -Tag 'div' -Id "available" -Endpoint {
                    New-UDCard -TitleAlignment center -Title "Ready" -TextAlignment center -text $Cache:aa
                }
            }
            New-UDColumn -LargeSize 2 -Endpoint {
                New-UDElement -Tag 'div' -Id "waiting" -Endpoint {
                    New-UDCard -TitleAlignment center -Title "Waiting" -TextAlignment center -text $Cache:cw
                }
            }
            New-UDColumn -LargeSize 2 -Endpoint {
                New-UDElement -Tag 'div'  -Id "averagewait" -Endpoint {
                    New-UDCard -TitleAlignment center -Title "Average Wait" -TextAlignment center -Text $Cache:asa
                }
            }
            New-UDColumn -LargeSize 2 -Endpoint {
                New-UDElement -Tag 'div' -Id "maxwait" -Endpoint {
                    New-UDCard -TitleAlignment center -Title "Maximum Wait" -TextAlignment center -text $Cache:oc
                }
            }
            New-UDColumn -LargeSize 2 -Endpoint {
                New-UDElement -Tag 'div'-Id "abandoned" -Endpoint {
                    New-UDCard -TitleAlignment center -Title "Abandoned" -TextAlignment center -Text $Cache:ca
                }
            }
            New-UDColumn -LargeSize 2 -Endpoint {
                New-UDElement -Tag 'div'  -Id "handled" -Endpoint {
                    New-UDCard -TitleAlignment center -Title "Handled" -TextAlignment center -text $Cache:ch
                }
            }
        }
    }
} 

Dashboard.ps1

$Schedule10s = New-UDEndpointSchedule -Every 10 -Second
$endpoint3 = New-UDEndpoint -Schedule $Schedule10s -Id 'endpoint2' -Endpoint {
    $temp = Invoke-WebRequest http://10.129.100.35/bsd/agentwb/BSD/aa.asp
    $Cache:aa = $temp.ParsedHtml.all.tags("h4") | ForEach-Object -MemberName innertext
    $temp = $null
    $temp = Invoke-WebRequest http://10.129.100.35/bsd/agentwb/BSD/cw.asp
    $Cache:cw = $temp.ParsedHtml.all.tags("h4") | ForEach-Object -MemberName innertext
    $temp = $null
    $temp = Invoke-WebRequest http://10.129.100.35/bsd/agentwb/BSD/asa.asp
    $Cache:asa = $temp.ParsedHtml.all.tags("h4") | ForEach-Object -MemberName innertext
    $temp = $null
    $temp = Invoke-WebRequest http://10.129.100.35/bsd/agentwb/BSD/oc.asp
    $Cache:oc = $temp.ParsedHtml.all.tags("h4") | ForEach-Object -MemberName innertext
    $temp = $null
    $temp = Invoke-WebRequest http://10.129.100.35/bsd/agentwb/BSD/ca.asp
    $Cache:ca = $temp.ParsedHtml.all.tags("h4") | ForEach-Object -MemberName innertext
    $temp = $null
    $temp = Invoke-WebRequest http://10.129.100.35/bsd/agentwb/BSD/ch.asp
    $Cache:ch = $temp.ParsedHtml.all.tags("h4") | ForEach-Object -MemberName innertext
    $temp = $null

    Sync-UDElement -id 'available' -Broadcast
    Sync-UDElement -id 'waiting' -Broadcast
    Sync-UDElement -id 'averagewait' -Broadcast
    Sync-UDElement -id 'maxwait' -Broadcast
    Sync-UDElement -id 'abandoned' -Broadcast
    Sync-UDElement -id 'handled' -Broadcast
}

$endpoint = $endpoint1, $endpoint2, $endpoint3

Start-UDDashboard -Port $ConfigurationFile.dashboard.port -Dashboard $MyDashboard -Name $ConfigurationFile.dashboard.title -Force -Endpoint  $endpoint  -AutoReload