Browse Source

fix: 概览页磁盘显示过滤 /snap (#5196)

pull/5198/head
ssongliu 6 months ago committed by GitHub
parent
commit
312c19e3cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      backend/app/service/dashboard.go

5
backend/app/service/dashboard.go

@ -222,7 +222,10 @@ func loadDiskInfo() []dto.DiskInfo {
if len(fields) < 7 { if len(fields) < 7 {
continue continue
} }
if fields[1] == "tmpfs" { if strings.HasPrefix(fields[6], "/snap") || len(strings.Split(fields[6], "/")) > 10 {
continue
}
if strings.TrimSpace(fields[1]) == "tmpfs" {
continue continue
} }
if strings.Contains(fields[2], "K") { if strings.Contains(fields[2], "K") {

Loading…
Cancel
Save