biodiversitydata-se / biologging-sensor-client

SBDI Biologging Sensor project - Client
GNU General Public License v3.0
1 stars 0 forks source link

Fetching data from Dataset object. Previous was fetching Record object #56

Closed Khosiyat closed 3 months ago

Khosiyat commented 4 months ago

Fetching data from Dataset object. The previous was fetching Record object.

Slack Link

Khosiyat commented 4 months ago

@Khosiyat no, this is not a proper solution. What needs to be done is that when the dataset in visualisation page is selected, sensors are loaded from the API object for that dataset. Basically, chage needs to be done in SensorList.tsx by changing API call for the dataset detail call (so it is the same as in in dataset detal page) and instead of doing all the complicate dlogic in the useEffect in SensorList.tsx of traversing all events, the sensorTypes are directly taken from the dataset detail object.

@zrohacova, thanks for the guidance :) I passed selectedDataset as a prop to the component and then utilized useEffect hook to fetch sensor data whenever the selectedDataset prop changes. Do you think it is the right way to achieve the requirement?

zrohacova commented 3 months ago

@Khosiyat Yeah,I think that should be correct. Just please, delete the changes you did before that are not relevant for the PR now, so added fields from dataset object and LineGraph changes