ESA-VirES / WebClient-Framework

VirES for Swarm - web client
MIT License
3 stars 1 forks source link

Incorrect list of data sources #441

Closed lmar76 closed 3 years ago

lmar76 commented 3 years ago

Issue detected on staging.

Select: satellite A, Electric current data -> The GUI is updated with FAC data of satellite A. The list of data sources includes AOBAFAC_2F and FACATMS_2F products:

image

In the layers list, select satellite B -> The GUI is updated with FAC data of satellite B. The list of data sources includes AOBBFAC_2F and FACBTMS_2F products in addition to AOBAFAC_2F and FACATMS_2F:

image

In the layers list, select satellite C -> The GUI is updated with FAC data of satellite C. The list of data sources includes AOBCFAC_2F and FACCTMS_2F products in addition to AOBBFAC_2F and FACBTMS_2F:

image
pacesm commented 3 years ago

I am not able to reproduce the issue. When I select magnetic and electric current data for all A, B and C I see the correct list of products:

image

Could you please re-try and see if you get the same issue again? Thanks.

lmar76 commented 3 years ago

Sorry, I did not explain correctly. In all the 3 steps I selected only one satellite:

  1. Alpha (default)
  2. Selected Bravo and deselected Alpha
  3. Selected Charlie and deselected Bravo

At step 2 I was expecting only AOBBFAC_2F and FACBTMS_2F. At step 3 I was expecting only AOBCFAC_2F and FACCTMS_2F.

pacesm commented 3 years ago

Thanks for the explanation. I managed to reproduce the issue. It seems it is caused by a combination of timing and slow responses of the staging server. This is issue is not exclusive to the current CR V3.5 and it is present in the current production deployments as well though much harder to get as the responses are almost instant.

If you wait enough time to load the requested data and then you deselect the product then the list is correct. If you however change the selection while the previous one is still loading, the response to the previous one data requests arrives later and it is added to the list.

This is not a desired behavior and we will need to find a way how to "cancel" the on-going data requests when the selection is changed.

pacesm commented 3 years ago

The fix has been deployed on staging.

lmar76 commented 3 years ago

Testes. It works. Thank you