New-UDEndpoint for processing data is not updating dashboard

First apologize for taking this from another thread and reposting. Hoping to get some guidance and wanting to demo this to managers this wednesday and get approval to purchase license.

***** New information at the bottom of this thread *****

Hoping somebody has some ideas what I might be doing wrong. I have a few dashboards that are set but just need them to re process data every so often.

My endpoint does not seem to be working.

Do I need to have the column and table and tab definitions in the endpoint?

How can I verify my endpoint is running per schedule?

Below is roughly the structure of the code

$variables set (some used inside endpoint)

$BuildRefresh = New-UDEndpointSchedule -Every 5  -Minute

New-UDEndpoint -Schedule $BuildRefresh -Endpoint {
     <Processing data into $Cache:datalist  >
}

$Columns = @(
  some columns defined
)

$gridapp = New-UDTable -Id 'gridapp' -Title "Release Information" -PageSize 40 -Columns $Columns -Data ($Cache:datalist | Where-Object -Property 'Type' -EQ "Applications")

$tabs =     New-UDTabs -Tabs {
    New-UDTab -Id "tabapps" -Text "Applications" -Content {
        New-UDElement -Tag 'div' -Content { 
            $gridapp
        }
    }
}


New-UDDashboard -Title 'Azure DevOps Build Versions' -Content { $tabs }

without the New-UDEndpoint wrapped around the processing code for Cache:datalist, the dashboard populated properly 1 time.

Thanks in advance.

So little more info. I put some outputs in the New-UDEndpoint and its definitely running on a clock. The data $Cache:datalist is also getting updated for sure.

i have a couple of out-file statements inside that show the datetime and this data and it is running on schedule and changing the $Cache:datalist.

however its not getting inside the dashboard. Is there something I need to do to sync the dashboard?

i tried to move the column and table, tab definitions inside the New-UDDashboard but that didnt help.

I also tried to add

Sync-UDElement -Id 'tabapps'   
Sync-UDElement -Id 'gridapp'   

inside the New-UDEndPoint but that also didnt help

Help…Any guidance or suggestions would help on this. I have 5 nice dashboards moved over from UD to PSU and they look great.

Data will show up the first time.

I just cant get the data that is updating in the New-UDEndpoint into the dashboard.

I am using the Cache:datalist to make it available.

Is there something else that I need to do to trigger the pages, tabs, tables, columns to update with the new data?

Can you try reproducing this with a simple dashboard like this? I want to understand whether it’s an issue with the rendering of the components or the actual storage of the cache data. The example below should show a new random number every second.

$EndpointSchedule = New-UDEndpointSchedule -Every 1 -Second
New-UDEndpoint -Schedule $EndpointSchedule -Endpoint {
    $Cache:Processes = Get-Random
} | Out-Null

New-UDDashboard -Title 'Test' -Content {
    New-UDDynamic -COntent {
        New-UDTypography $Cache:Processes
    } -AutoRefresh -AutoRefreshInterval 1
    
}

Hi Adam, This works even though there is some interaction someway with other dashboards I have where some of those starting cause this one to stop producing random numbers. A restart of this dashboard and its back to working when that happens.

Do I need to wrap all of my processing inside a New-UDDynamic? I tried to show approximately what we have as a script above without posting the entire thing.

thanks

If you want the data to update on an interval without reloading the page manually, you’ll need a New-UDDynamic with auto refresh enabled. Reloading the page manually should also always refresh the data since all pages in UDv3 are dynamic.

Ok so that might explain why the dashboards were not updating, although even on page refreshes in the browser, it didnt refresh the dashboard.

one last couple questions on this. I have columns defined (with $EventData being used) and UDTables using the columns (but with Cache:datalist being used) and then tabs with the UDTables. This is similar to my example at the top.

Do I wrap the UDDynamic only around the UDTables with the Cache:datalist or the entire set of columns, tables and tabs?

Any thoughts on why a page refresh doesnt update the dashboard?

thanks in advance.

No idea why a page refresh doesn’t refresh the data. It should be rerunning all the code within the dashboards -Content block. Does it matter if you do a Ctrl+F5?

It’s a matter of preference with the UDDynamic. You can wrap everything to reduce the number of HTTP requests to reload the data or you can make it more granular to load tables on different intervals. With a dynamic, the entire content block is reevaluated on the server and redrawn on the client based on what has changed.

I dont know if this makes since but it finally started working on just a page refresh once I put all the columns, tables, tabs inside the New-UDDashboard brackets. Now it does update on refresh of page and when the New-UDEndpoint Runs.

thanks for the help.