Commit Graph
8 Commits
Author SHA1 Message Date
jon dad34a71cc fix: address code review findings for rollover storage
- C1: Rewrite breakdown endpoint with JOIN queries (eliminates N+1)
- C2: Use getUnitSize() for consistent MiB/GiB display
- C3: Add retain_policy to global FrigateConfig TypeScript type
- I1: Only fetch breakdown data when rollover mode is active
- I2: Handle NULL end_time for in-progress events/reviews
- I5: Add model_validator warning when rollover + days are both set
- S4: Hide breakdown when total is 0
2026-03-01 16:32:25 -06:00
jon 154246331c feat: add storage breakdown display to metrics page
Shows recording storage split into three categories:
- Continuous (overwritable): footage eligible for rollover
- Events (aging out): recordings tied to active alerts/detections
- Protected (indefinite): recordings marked retain indefinitely
2026-03-01 16:25:29 -06:00
jon 914cc246a6 feat: add retain_policy to recording settings UI
Added retain_policy to field order, retention group, and
restartRequired list in the recording section config.
2026-03-01 16:24:33 -06:00
jon 1b95d02b7e feat: add retain_policy and StorageBreakdown frontend types 2026-03-01 16:22:39 -06:00
jon 02e92c7144 feat: add storage breakdown API endpoint
New GET /recordings/storage/breakdown endpoint returns storage usage
broken into three categories: overwritable (continuous recordings),
event_retention (active alerts/detections), and protected (indefinite).
2026-03-01 16:21:42 -06:00
jon 281e5a91c3 test: verify StorageMaintainer works in rollover mode 2026-03-01 16:20:37 -06:00
jon c9b208a255 Skip time-based recording expiry in continuous_rollover mode
In rollover mode, RecordingCleanup no longer deletes recordings based
on continuous.days / motion.days. Instead, StorageMaintainer handles
overflow by deleting oldest recordings when disk fills up. Deleted
cameras have their recordings removed immediately rather than waiting
for time-based expiry. Review segment expiry still runs normally.
2026-03-01 12:19:33 -06:00
jon aed3793ce1 Add RetainPolicyEnum and retain_policy config field for NVR-style storage
Introduce a new RetainPolicyEnum with 'time' (default, existing behavior)
and 'continuous_rollover' (fill disk, overwrite oldest) options. Add the
retain_policy field to RecordConfig and include unit tests for config
validation.
2026-03-01 12:17:06 -06:00