Skip to content

Add four csv exports#8400

Closed
kelseyhuss wants to merge 14 commits intonightscout:masterfrom
kelseyhuss:add-four-csv-exports
Closed

Add four csv exports#8400
kelseyhuss wants to merge 14 commits intonightscout:masterfrom
kelseyhuss:add-four-csv-exports

Conversation

@kelseyhuss
Copy link
Copy Markdown

No description provided.

kelseyhuss and others added 14 commits November 11, 2025 10:12
- Added export buttons to the main navigation menu (requires admin access)
- Implemented client-side exportData function with API_SECRET authentication
- Export buttons trigger CSV downloads for entries and treatments data
- Uses existing backend CSV export API endpoints with proper authentication
- Exports up to 10,000 records with timestamped filenames
- Only visible to authenticated admin users
- Added authenticatedExport() function to properly handle API secret validation
- Export buttons now check if user is authenticated before allowing data export
- If not authenticated, user is prompted to enter API secret via authentication dialog
- API secret hash is now properly appended to export URLs as query parameter
- Added proper URL encoding for all query parameters
- Improved code structure with reusable function for both entries and treatments exports

This fixes the issue where CSV exports were failing due to missing authentication,
ensuring that the API_SECRET is properly required and validated before allowing
data exports.
…ections

- Added export buttons for Profile, DeviceStatus, and Food to the reports page
- Implemented CSV format support in profile, devicestatus, and food API endpoints
- Added date range filtering support for all new exports
- All exports require API secret authentication
- Export buttons placed above 'Show' button for easy access
@kelseyhuss kelseyhuss closed this Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant