mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-26 17:28:48 +08:00
feat: optimization disk zie display (#10339)
This commit is contained in:
parent
ef2fb1c62e
commit
4e1a7bf42c
1 changed files with 11 additions and 4 deletions
|
|
@ -104,7 +104,7 @@ func parseLsblkOutput(output string) ([]response.DiskBasicInfo, error) {
|
|||
|
||||
if diskType == "lvm" {
|
||||
total, used, avail, usePercent, _ := getDiskUsageInfo("/dev/mapper/" + name)
|
||||
if total != "" {
|
||||
if total != "" && fsType != "" {
|
||||
size = total
|
||||
}
|
||||
|
||||
|
|
@ -139,10 +139,17 @@ func parseLsblkOutput(output string) ([]response.DiskBasicInfo, error) {
|
|||
tran := fields["TRAN"]
|
||||
rota := fields["ROTA"]
|
||||
|
||||
totalSize, used, avail, usePercent, _ := getDiskUsageInfo("/dev/" + name)
|
||||
if totalSize != "" && fsType != "" {
|
||||
size = totalSize
|
||||
var (
|
||||
used, avail, totalSize string
|
||||
usePercent int
|
||||
)
|
||||
if mountPoint != "" {
|
||||
totalSize, used, avail, usePercent, _ = getDiskUsageInfo("/dev/" + name)
|
||||
if totalSize != "" {
|
||||
size = totalSize
|
||||
}
|
||||
}
|
||||
|
||||
actualMountPoint := mountPoint
|
||||
actualFsType := fsType
|
||||
actualUsed := used
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue