I would like something to notify the users when the page is pre-loading the SQL data behind the dashboard. Kind of like what has been done on this page https://coindashboard.azurewebsites.net a simple pre-loader with some text. However I cannot seem to figure out how this is being done, I cannot see New-UDLoadingScreen being used anywhere? I have been defining the New-UDLoadingScreen as a variable, then adding this to the -LoadingScreen parameter on New-UDDashboard cmdlet to try and initialise the loading screen, but I never see it, and the page is not fully loaded before it loads, as in not all the charts are displaying or a table might be empty waiting for data. Can anyone advise please. Thanks
Did you ever figure this out?
Nope…might have to ask the mighty @adamdriscoll for some input…I been hoping someone in this forum would be like…“thats easy you do x,y,z” but this post really isn’t getting a lot of views, but it would be nice to know how to do this loading screen
@adam can you please enlighten me on how to achieve a loading screen please
That loading screen appears when the client’s browser is waiting for the first response from the server. This is usually just the static structure of the dashboard and not actually loading the data.
You’ll see that with the coin dashboard that the charts begin to load after the preloader is already gone.
To make a preloader that actually responds to your data loading. You’ll need to likely load the data in the background and then show the preloader if there isn’t any data.
Something like
if ($Cache:Data -eq $null) {
New-UDPreloader
}
else {
New-UDChart -Endpoint { $Cache:Data ... }
}
That said, I think it would be nice to have some more control over that loading screen.
Thanks @adam still loving using universal dashboard finally got my first login page with active directory authentication working today, Now you have given me the key to how this preloader works, I will give it a go. Many thanks again
Sweet @adam I now have working pre-loaders on my semi-circle doughnut charts on the homepage. Thanks!