mirror of
https://github.com/woodchen-ink/nezha-dash-v1.git
synced 2025-07-18 09:31:55 +08:00
fix: update sorting logic to use formatted memory and disk values for accurate comparisons (#42)
This commit is contained in:
parent
20bba90a49
commit
8438bd4d6d
@ -200,10 +200,10 @@ export default function Servers() {
|
|||||||
comparison = (a.state?.cpu ?? 0) - (b.state?.cpu ?? 0)
|
comparison = (a.state?.cpu ?? 0) - (b.state?.cpu ?? 0)
|
||||||
break
|
break
|
||||||
case "mem":
|
case "mem":
|
||||||
comparison = (a.state?.mem_used ?? 0) - (b.state?.mem_used ?? 0)
|
comparison = (formatNezhaInfo(nezhaWsData.now, a).mem ?? 0) - (formatNezhaInfo(nezhaWsData.now, b).mem ?? 0)
|
||||||
break
|
break
|
||||||
case "disk":
|
case "disk":
|
||||||
comparison = (a.state?.disk_used ?? 0) - (b.state?.disk_used ?? 0)
|
comparison = (formatNezhaInfo(nezhaWsData.now, a).disk ?? 0) - (formatNezhaInfo(nezhaWsData.now, b).disk ?? 0)
|
||||||
break
|
break
|
||||||
case "up":
|
case "up":
|
||||||
comparison = (a.state?.net_out_speed ?? 0) - (b.state?.net_out_speed ?? 0)
|
comparison = (a.state?.net_out_speed ?? 0) - (b.state?.net_out_speed ?? 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user