Open Caesarh97 opened 2 months ago
/bounty $40
/attempt #1026
with your implementation plan/claim #1026
in the PR body to claim the bountyThank you for contributing to aqualinkorg/aqualink-app!
Add a bounty • Share on socials
Attempt | Started (GMT+0) | Solution |
---|---|---|
🟢 @yaodingyd | Sep 18, 2024, 2:34:51 PM | #1049 |
/attempt #1026
Algora profile | Completed bounties | Tech | Active attempts | Options |
---|---|---|---|---|
@yaodingyd | 1 aqualinkorg bounty + 4 bounties from 1 project |
JavaScript, TypeScript, Python & more |
Cancel attempt |
Not sure if there's an easy way to do this. Right now we need to query forcastData
and latestData
two endpoints to find if there's any hui
or sonde
data, and these two endpoints require each specific site id, so we need to paginate through all sites and dispatch two endpoint for all of them to aggregate the collection of sites with water samplings. This seems rather inefficient.
I think to enable this feature, we would need to return
1) water quality data to the top level site
model, or
2) return ALL of latestData and forcastData
so we can process this in client side not sure the implication/feasibility of doing this in api
Indeed, I think we probably need to update the API /sites
endpoint to achieve this. We could maybe add a boolean flag to the site if it has received any water quality data in the past X weeks. Where X weeks
is the same metric we currently used on the site page to determined if we will display Water Quality data or not. Is that something you feel comfortable looking into @yaodingyd ?
sounds good, let me give it a go
@ericboucher is there a way to populate local db with some mock data? I'm doing development under api
, applied the migrations but need some data (ideally medium scale) to run it end-to-end
@yaodingyd unfortunately we don't have a great way to do this at the moment, but I could create a small extract of our staging DB for you. Which tables would you need? You can email me: eric at ovio.org
💡 @yaodingyd submitted a pull request that claims the bounty. You can visit your bounty board to reward.
On the /map page where we have a drop-down list where we filter sites, I’d like to add all the sites with water quality data. Would it be easy to add these? In this filter, all sites that have either {sonde} or {hui} can be added. Both are displaying water quality data and would fit in this filter. This issue is of low priority, so if it’s fast and easy, we could add it now. Otherwise, it can wait.