mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-08 22:46:51 +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"]
|
||||
|
||||
totalSize, used, avail, usePercent, _ := getDiskUsageInfo("/dev/" + name)
|
||||
if totalSize != "" {
|
||||
if totalSize != "" && fsType != "" {
|
||||
size = totalSize
|
||||
}
|
||||
actualMountPoint := mountPoint
|
||||
|
@ -167,7 +167,7 @@ func parseLsblkOutput(output string) ([]response.DiskBasicInfo, error) {
|
|||
}
|
||||
}
|
||||
|
||||
diskInfo := response.DiskBasicInfo{
|
||||
info := response.DiskBasicInfo{
|
||||
Device: name,
|
||||
Size: size,
|
||||
Model: model,
|
||||
|
@ -183,7 +183,7 @@ func parseLsblkOutput(output string) ([]response.DiskBasicInfo, error) {
|
|||
Serial: serial,
|
||||
}
|
||||
|
||||
diskInfos = append(diskInfos, diskInfo)
|
||||
diskInfos = append(diskInfos, info)
|
||||
}
|
||||
|
||||
return diskInfos, nil
|
||||
|
|
Loading…
Add table
Reference in a new issue