OpenWaterFoundation / owf-app-snodas-ng

Open Water Foundation SNODAS snowpack user interface built with Angular
0 stars 0 forks source link

Auto-refresh the web application at least once a day? #30

Closed smalers closed 2 years ago

smalers commented 2 years ago

The SNODAS web application shows data for the current day. If the application is left open in a tab and the user does not manually refresh the page, then old data are shown in the interface and may cause a problem.

It would be good to autorefresh the page one or more times a day, especially to catch the data update in the morning. Is it easy to autorefresh the page? Is there any downside to doing it at specific times (in config file?).

What happens if dialogs are open and the page is refreshed?

I don't want to get into saving cookies (for example last basin selected) and resetting after a reload if this is going to take a lot of time. However, it may be worthwhile to talk to Catherine and/or Elizabeth and see how cookies are handled and implement that since they have done the homework. Then the map zoom and last selected basin will automatically be in place during auto-refresh.

Nightsphere commented 2 years ago

The app can now be updated twice a day (and any amount if supplied) by using the refreshTime property in the app-config file. An example can be found at Issue #29. The newly created refresh time tooltip has been implemented. This displays the SNODAS current day from the ListOfDates.txt file, the time the last refresh occurred on the page (whether automated through SNODAS or manually performed), and the time of the next automated refresh.

It will look something like the following on hover:

image

Closing this issue.