Closed tphakala closed 3 months ago
The recent changes introduce functionalities for retrieving hourly bird detections and displaying them via a new route and associated handler in the HTTP controller. A new GetHourlyDetections
method is added to the DataStore, and templates are created for rendering these detections. These changes enhance the user experience by enabling dynamic fetching and viewing of hourly bird detection data.
File(s) | Change Summary |
---|---|
internal/datastore/interfaces.go |
Added GetHourlyDetections method in the Interface interface and implemented it in DataStore . |
internal/httpcontroller/handlers.go |
Introduced hourlyDetectionsHandler function to process requests for hourly detections. |
internal/httpcontroller/routes.go |
Added a new route and handler for hourly detections to initRoutes function. |
views/fragments/birdsTableHTML.html |
Added hyperlinks for each hour in the table cells to fetch hourly detections dynamically. |
views/fragments/hourlyDetections.html |
Introduced a template for displaying hourly detection results with details like common name, time, etc. |
sequenceDiagram
participant User
participant Client
participant Server
participant DataStore
User->>Client: Clicks hour link
Client->>Server: Fetch "/hourly-detections?date=2024-06-20&hour=14"
Server->>DataStore: GetHourlyDetections("2024-06-20", "14")
DataStore->>Server: Returns detection data
Server->>Client: Renders hourlyDetections template
Client->>User: Displays hourly detections
In the realm of birds, an hour's flight,
Data captured in the soft twilight,
A new method sings, a handler replies,
Displaying detections beneath the skies.
With every click, the secrets unfold,
Stories of feathers in data retold.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
by clicking hour column you now see all results of that specific hour