feat: FEAT-05 — DTC history sync to remote server

- Server: dtc_events table (migrate_phase27_dtc.sql), db.py helpers
  (upsert_dtc_snapshot, list_dtc_events, delete_dtc_event)
- Server API: POST /api/v1/dtc/batch (device auth), GET/DELETE /api/v1/portal/dtc
- Server portal: /dtc page with code, description, MIL, status, timestamps, delete
- Server nav: DTC history in sidebar + mobile bottom nav
- Pi: _upload_dtc_snapshot() in app_upload.py — uploads when snapshot changes,
  skips when OBD disconnected or unchanged
This commit is contained in:
Mathieu Moran
2026-08-12 01:23:23 -04:00
parent 13cb8b4361
commit 3916f9879e
8 changed files with 302 additions and 14 deletions
+9
View File
@@ -49,6 +49,11 @@
<i class="fas fa-video fa-fw"></i><span>Dashcam archive</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link{% if request.endpoint == 'portal_dtc_page' %} active{% endif %}" href="{{ url_for('portal_dtc_page') }}">
<i class="fas fa-exclamation-triangle fa-fw"></i><span>DTC history</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link{% if request.endpoint == 'portal_device_settings_page' %} active{% endif %}" href="{{ url_for('portal_device_settings_page') }}">
<i class="fas fa-sliders-h fa-fw"></i><span>Device settings</span>
@@ -117,6 +122,10 @@
<i class="fas fa-sliders-h"></i>
<span>Device</span>
</a>
<a class="mobile-nav-item{% if request.endpoint == 'portal_dtc_page' %} active{% endif %}" href="{{ url_for('portal_dtc_page') }}">
<i class="fas fa-exclamation-triangle"></i>
<span>DTC</span>
</a>
<a class="mobile-nav-item" href="{{ url_for('logout') }}">
<i class="fas fa-sign-out-alt"></i>
<span>Logout</span>