feat: pagination totals, request logging, data retention

Add shared paginate() helper with total count to all list endpoints.
Add request logging middleware (method, path, status, duration, IP).
Add data retention service with configurable thresholds and CLI command.
This commit is contained in:
user
2026-02-06 09:58:20 +01:00
parent 2456194332
commit c1f580ba16
14 changed files with 380 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
.PHONY: help build run dev stop logs test migrate clean install start restart status oui
.PHONY: help build run dev stop logs test migrate clean install start restart status oui cleanup
APP_NAME := esp32-web
PORT := 5500
@@ -26,6 +26,7 @@ help:
@echo " make install Install with dev dependencies"
@echo " make test Run tests"
@echo " make oui Download OUI database"
@echo " make cleanup Delete expired data"
@echo " make clean Remove cache files"
@echo ""
@echo "Container:"
@@ -85,6 +86,9 @@ test:
oui:
flask --app src/esp32_web download-oui
cleanup:
flask --app src/esp32_web cleanup-data
migrate:
flask --app src/esp32_web db upgrade