v0.15.1: Backup page Részletek overhaul with per-drive tier sections
Replace Tároló section with collapsible Részletek containing 3 tiers: - Tier 1: per-drive restic repo stats with storage labels - Tier 2: cross-drive items grouped by destination, split by method - Tier 3: remote backup placeholder Restore UI now shows tier + drive labels in snapshot dropdown. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -451,17 +451,25 @@ func (r *Router) backupSnapshots(w http.ResponseWriter, req *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
snapshots, err := r.backupMgr.ListSnapshots(50)
|
||||
snapshots, err := r.backupMgr.ListAllSnapshots(50)
|
||||
if err != nil {
|
||||
writeJSON(w, http.StatusInternalServerError, apiResponse{OK: false, Error: err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
// All snapshots contain the stacks dir + DB dumps, so they're useful for
|
||||
// any app (config + DB restore). Apps with HDD data get user data restored
|
||||
// too — but only from snapshots that include those paths (post-v0.12.7).
|
||||
// We don't filter here because older snapshots still allow config+DB restore,
|
||||
// and the RestoreApp function extracts whatever paths are available.
|
||||
// Enrich snapshots with drive labels from storage paths
|
||||
if r.sett != nil {
|
||||
storagePaths := r.sett.GetStoragePaths()
|
||||
for i := range snapshots {
|
||||
repoPath := snapshots[i].RepoPath
|
||||
for _, sp := range storagePaths {
|
||||
if strings.HasPrefix(repoPath, sp.Path) {
|
||||
snapshots[i].DriveLabel = sp.Label
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if snapshots == nil {
|
||||
snapshots = []backup.SnapshotInfo{}
|
||||
|
||||
Reference in New Issue
Block a user