mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-13 15:28:38 +00:00
fix: exclude ct templates and isos from backup tab (fixes #265)
- filter out vztmpl (container templates) from backup list - filter out iso files from backup list - only show actual vm/container backups in the backup tab - remove unnecessary checks for template/iso content types
This commit is contained in:
parent
0491abf885
commit
161bbf5ec4
1 changed files with 8 additions and 7 deletions
|
|
@ -1526,8 +1526,8 @@ func (m *Monitor) pollStorageBackups(ctx context.Context, instanceName string, c
|
|||
|
||||
// For each storage that can contain backups or templates
|
||||
for _, storage := range storages {
|
||||
// Check if storage supports backup or template content
|
||||
if !strings.Contains(storage.Content, "backup") && !strings.Contains(storage.Content, "vztmpl") && !strings.Contains(storage.Content, "iso") {
|
||||
// Check if storage supports backup content
|
||||
if !strings.Contains(storage.Content, "backup") {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
@ -1550,13 +1550,14 @@ func (m *Monitor) pollStorageBackups(ctx context.Context, instanceName string, c
|
|||
}
|
||||
seenVolids[content.Volid] = true
|
||||
|
||||
// Skip templates and ISOs - they're not backups
|
||||
if content.Content == "vztmpl" || content.Content == "iso" {
|
||||
continue
|
||||
}
|
||||
|
||||
// Determine type from content type and volid
|
||||
backupType := "unknown"
|
||||
if content.Content == "vztmpl" {
|
||||
backupType = "vztmpl"
|
||||
} else if content.Content == "iso" {
|
||||
backupType = "iso"
|
||||
} else if strings.Contains(content.Volid, "/vm/") || strings.Contains(content.Volid, "qemu") {
|
||||
if strings.Contains(content.Volid, "/vm/") || strings.Contains(content.Volid, "qemu") {
|
||||
backupType = "qemu"
|
||||
} else if strings.Contains(content.Volid, "/ct/") || strings.Contains(content.Volid, "lxc") {
|
||||
backupType = "lxc"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue