v0.109.0: soft-quota gate + usage bar + offsite report status (SLICE 4)

QuotaGB rides the descriptor into OffboxTarget; RepoSizeBytes persisted
from restic stats. Pre-run gate: >=100% refuses NEW backups (Hungarian
notice + operator alert) but prune STILL runs (red-proofed) and restore is
never gated; >=80% warns. /backups usage bar (quota>0 only). The hub
report gains the non-secret offsite status object for the OffsiteChecker.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PSK5g6qYLknKj8u3QAFEr6
This commit is contained in:
2026-07-09 23:48:42 +02:00
parent 994e15896f
commit 8917014991
12 changed files with 326 additions and 23 deletions
+4 -1
View File
@@ -638,9 +638,12 @@ func (s *Server) backupsHandler(w http.ResponseWriter, r *http.Request) {
data["DBDumpTotalBytes"] = dbDumpTotalBytes
// Off-box (NAS) restic-SFTP backup (Part B): the target status + per-app off-box toggles.
data["Offbox"] = s.settings.GetOffboxTarget()
offboxTgt := s.settings.GetOffboxTarget()
data["Offbox"] = offboxTgt
data["OffboxConfigured"] = s.backupMgr.OffboxConfigured()
data["OffboxApps"] = s.buildOffboxApps()
// SLICE 4 soft-quota usage bar (rendered only when a quota is set — shared model).
data["OffboxQuotaPct"] = backup.OffboxQuotaPercent(offboxTgt)
} else {
data["Backup"] = nil
}