feat(admin): make dashboard live and disk-aware

Wire dashboard panels to real alerts, activity, boxes, and users data instead of static mock rows.

Enable working dashboard actions (close alerts, close low alerts, cleanup expired boxes, exports, and navigation).

Update storage overview to use real filesystem free/total space from the uploads volume.

Make top alert chip data-driven across admin pages.
This commit is contained in:
2026-05-04 10:54:44 +03:00
parent d7cbba1bf2
commit a2c80ac105
6 changed files with 600 additions and 205 deletions

View File

@@ -37,6 +37,7 @@ type adminBoxView struct {
CompleteFiles int `json:"complete_files"`
PendingFiles int `json:"pending_files"`
FailedFiles int `json:"failed_files"`
TotalSizeBytes int64 `json:"total_size_bytes"`
TotalSizeLabel string `json:"total_size_label"`
CreatedAtLabel string `json:"created_at_label"`
CreatedAtISO string `json:"created_at_iso"`
@@ -203,6 +204,7 @@ func (app *App) buildAdminBoxView(boxID string) (adminBoxView, error) {
boxView := adminBoxView{
ID: summary.ID,
FileCount: summary.FileCount,
TotalSizeBytes: summary.TotalSize,
TotalSizeLabel: summary.TotalSizeLabel,
CreatedAtLabel: adminTimeLabel(summary.CreatedAt),
CreatedAtISO: formatBrowserTime(summary.CreatedAt),