Closed lepeuvedic-natixar closed 4 weeks ago
Scale is hard-coded to a minute in the api request. This task needs to be split into two sections: implement the correct scale for the api request, then implement error checking to ensure the required number of points are not exceeded.
Problem: The back-end is specified to reject request that require more than 10000 time steps. This is significantly more than can be displayed with clarity on large high-res screens (imagine a bar chart with 10000 bars). The current front-end has no guard against requesting more than 10000 time steps, other than being locked on always requesting monthly data (and of course it's unlikely any client will have 10000 months of data any time soon).
Steps to Reproduce: The problem will show up as soon as the incorrect request issue #37 is corrected.
Desired Behavior: The number of time steps results from the start date, end date and the current time step(s). More than one time step can be current if the two charts, on the Dashboard, that allow the selection of the time step, are not on the same setting.
The front-end should cache data for any time step the user has already requested and received in the front-end.
The change of any of the three inputs, start date, end date and current time step, must be guarded in the following way:
With all three guards in place, the back-end should never need to reject the front-end request on the basis of too many steps, and it should not be too puzzling for the user either, when a small time step button suddenly becomes inactive.