piero-la-lune / FSE-Planner

FSEconomy map vizualisation application
MIT License
41 stars 15 forks source link

FSE API Hits Counter #178

Closed jsilva74 closed 11 months ago

jsilva74 commented 11 months ago

Use case

I, as an user, wanna to know how many requests was sent to FSE API in past 6 hours to stick with FSE User Guide related to the use of API.

Proposed solution

This PR implements a counter to accumulate the total quantity of requests sent to FSE API. Also, displays this information in Update screen with 3 levels of severities. Captura de Tela 2023-11-30 às 05 21 28 Total of requests to FSE API up to 24 requests in past 6 hours

Captura de Tela 2023-11-30 às 05 30 17 Total of requests to FSE API from 25 to 34 requests in past 6 hours

Captura de Tela 2023-11-30 às 05 30 52 Total of requests to FSE API with more than 34 requests in past 6 hours

piero-la-lune commented 11 months ago

Hi @jsilva74

Thank you very much for your contribution!

If I may, I would suggest that you update the hit counter when opening the "Load data" popup, because I can see a use case when a user has done 6 requests, then comes back to FSE Planner the next day and sees "6 requests in the last 6 hours" when opening the popup, it would be a bit confusing.

jsilva74 commented 11 months ago

Hey Piero.

Sure. I'll fix it. Thanks for the insight.

jsilva74 commented 11 months ago

@piero-la-lune, branch updated. Thanks.

piero-la-lune commented 11 months ago

Looks ok, thanks!