mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-09 23:17:21 +08:00
feat: optimization disk zie display (#10337)
This commit is contained in:
parent
291b594ad9
commit
766a2a0546
1 changed files with 3 additions and 3 deletions
|
@ -140,7 +140,7 @@ func parseLsblkOutput(output string) ([]response.DiskBasicInfo, error) {
|
||||||
rota := fields["ROTA"]
|
rota := fields["ROTA"]
|
||||||
|
|
||||||
totalSize, used, avail, usePercent, _ := getDiskUsageInfo("/dev/" + name)
|
totalSize, used, avail, usePercent, _ := getDiskUsageInfo("/dev/" + name)
|
||||||
if totalSize != "" {
|
if totalSize != "" && fsType != "" {
|
||||||
size = totalSize
|
size = totalSize
|
||||||
}
|
}
|
||||||
actualMountPoint := mountPoint
|
actualMountPoint := mountPoint
|
||||||
|
@ -167,7 +167,7 @@ func parseLsblkOutput(output string) ([]response.DiskBasicInfo, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
diskInfo := response.DiskBasicInfo{
|
info := response.DiskBasicInfo{
|
||||||
Device: name,
|
Device: name,
|
||||||
Size: size,
|
Size: size,
|
||||||
Model: model,
|
Model: model,
|
||||||
|
@ -183,7 +183,7 @@ func parseLsblkOutput(output string) ([]response.DiskBasicInfo, error) {
|
||||||
Serial: serial,
|
Serial: serial,
|
||||||
}
|
}
|
||||||
|
|
||||||
diskInfos = append(diskInfos, diskInfo)
|
diskInfos = append(diskInfos, info)
|
||||||
}
|
}
|
||||||
|
|
||||||
return diskInfos, nil
|
return diskInfos, nil
|
||||||
|
|
Loading…
Add table
Reference in a new issue