equinor / flotilla

Flotilla is the main point of access for operators to interact with multiple robots in a facility.
Eclipse Public License 2.0
16 stars 38 forks source link

Remove refresh interval from mission history page #1785

Open Eddasol opened 1 week ago

Eddasol commented 1 week ago

Describe the improvement you would like to see Mission history page uses a refresh interval while this has been removed and replaced with mission context in all other pages. Can it be removed here as well?

How will this change existing functionality? Only render when necessary and not at fixed intervals

How will this improvement affect the current Threat Model?

andchiind commented 1 week ago

It can be removed here, but it's difficult to do since if a mission is updated so that it is no longer included in the filter, we no longer know which mission should take its place. Realistically we would anyways need to call the API when the mission list updates in length as a result of a signalR message.

andchiind commented 5 days ago

Suggested solution: When we get a missionrun updated message, check if the given mission is allowed by the filter and that has a timestamp such that it would be displayed on the page (a timestamp within the current range of missionrun timestamps). If so, we can use the normal API call to fetch from the database again (using the updateFilteredMissions function in MissionHistoryView.tsx).

Doing this will reduce the number of API calls made to the database, but we will still need to rely on using the API to update the data instead of just SignalR, due to the way the pagination works.