Mathieu Moran
5713417f4f
Server: restore checkbox + batch-delete. Conditional ID (server only) and checkbox via data-show-id/data-batch-delete-url.
2026-08-11 15:11:12 -04:00
Mathieu Moran
2ee4862edd
Remove checkbox column and batch-delete from trip history
2026-08-11 15:05:40 -04:00
Mathieu Moran
23ac6c218b
feat: add trip ID column ( #18517 ) to history table on Pi and server
2026-08-11 14:58:25 -04:00
Mathieu Moran
bdc7a9afb7
fix(phase26): server trip delete persists across recompute + batch delete with checkboxes
2026-08-11 04:18:58 -04:00
Mathieu Moran
c5c478bef6
fix(phase26): add Pi trip deletion (BUG-08)
2026-08-11 02:07:59 -04:00
Mathieu Moran and Copilot
f90a5e5826
fix: switch server portal map tiles to CARTO (OSM was rate-limiting/blocking)
...
OSM tile.openstreetmap.org was returning grey tiles on the portal (likely
rate-limiting the Cloudflare tunnel egress IP). Switch to CARTO Voyager
tiles which are free, CDN-backed, and don't have the same restrictions.
Also add data-tile-subdomains attribute support in history.js so tile
provider subdomains can be configured per-deployment.
Co-authored-by: Copilot <[email protected] >
2026-08-10 05:51:18 -04:00
Mathieu Moran and Copilot
c287ab67a3
fix: map zoom limits configurable per-deployment via data attributes
...
Pi offline tiles only cover zoom 8-15; OSM live tiles support 0-19.
history.js now reads data-min-zoom/data-max-zoom from the #history-map div
instead of hardcoding 3/19. Pi template caps to 8-15 (prevents blank tiles
at extreme zooms), server template allows full 3-19 OSM range.
Co-authored-by: Copilot <[email protected] >
2026-08-10 05:42:04 -04:00
Mathieu Moran and Copilot
7aa9ffda16
Add delete with confirmation for trips and dashcam
...
- Confirmation modal in server base.html (window.confirmDelete promise helper)
- Trip delete: trash button in Replay column (server-only via data-deletable on
trip-list div), DELETE /api/v1/portal/trip/<id>, removes computed trip only
(raw tracking_points kept)
- Dashcam delete: trash button next to download, DELETE /api/v1/portal/dashcam/<id>,
removes from DB + disk (best-effort file removal)
- history.js: delete button gated on data-deletable='1' attribute; click handler
intercepts before replay logic
- db.py: delete_trip(), delete_dashcam_file() helpers
Co-authored-by: Copilot <[email protected] >
2026-08-10 04:40:22 -04:00
Mathieu Moran and Copilot
a13d74e18e
Fix remote portal map tiles and geocode
...
- history.js reads tile URL from data-tile-url attribute on #history-map div,
falling back to local offline tiles (Pi behavior unchanged)
- server history.html sets data-tile-url to live OSM tiles
- maxZoom raised to 19 (OSM supports it, local tiles were limited to 15)
- server geocode returns 'label' key to match what history.js/yaris.js expect
Co-authored-by: Copilot <[email protected] >
2026-08-10 04:34:49 -04:00
Mathieu Moran and Copilot
c4dfcbaf25
Phase 24: remote trip + dashcam portal
...
- Add Flask-Login browser session auth (separate from device X-Api-Key auth)
- modules/user_auth.py: User model, require_login decorator, bcrypt helpers
- /login with CSRF token, /logout
- scripts/create_user.py to provision admin user
- Add server-side trip computation from tracking_points
- db.compute_trips_for_device(): gap > 5 min = new trip, haversine distance,
upserts into trips table, auto-triggered in bg thread after each upload batch
- db.list_trips(), db.get_trip_route(): same JSON shape as Pi API
- db.get_overview_stats(): aggregated totals for overview page
- db.list_dashcam_files(), db.get_dashcam_file(): browse/stream helpers
- Add web portal to server/app.py
- Overview page (/): stat cards + recent trips + recent clips
- Trip history (/history): reuses Pi history.js + data-list.js unchanged
via /api/trips + /api/trip/<id> compatibility aliases
- Dashcam archive (/dashcam): file list + inline video player
- /api/v1/portal/dashcam/stream/<id>: Range-request streaming, path traversal guard
- /api/geocode: same Nominatim→reverse_geocoder offline fallback as Pi
- Add server templates (server/templates/)
- base.html: shared shell with 'Remote server' badge in sidebar + mobile topbar
- login.html, index.html, history.html, dashcam.html, components.html
- DB schema: users + trips tables added to init.sql (fresh deploys) +
migrate_phase24.sql (existing deployments)
- Infrastructure: Dockerfile uses repo-root build context to copy shared
static/ assets; docker-compose updated; SECRET_KEY + DEVICE_NAME in .env;
requirements: Flask-Login, bcrypt, reverse_geocoder
Co-authored-by: Copilot <[email protected] >
2026-08-10 03:58:45 -04:00