fix: update sort type from 'stg' to 'disk' for accurate sorting in server context

This commit is contained in:
hamster1963 2025-04-25 10:26:15 +08:00
parent bc88a53170
commit 963765343b
2 changed files with 3 additions and 3 deletions

View File

@ -1,8 +1,8 @@
import { createContext } from "react"
export type SortType = "default" | "name" | "uptime" | "system" | "cpu" | "mem" | "stg" | "up" | "down" | "up total" | "down total"
export type SortType = "default" | "name" | "uptime" | "system" | "cpu" | "mem" | "disk" | "up" | "down" | "up total" | "down total"
export const SORT_TYPES: SortType[] = ["default", "name", "uptime", "system", "cpu", "mem", "stg", "up", "down", "up total", "down total"]
export const SORT_TYPES: SortType[] = ["default", "name", "uptime", "system", "cpu", "mem", "disk", "up", "down", "up total", "down total"]
export type SortOrder = "asc" | "desc"

View File

@ -202,7 +202,7 @@ export default function Servers() {
case "mem":
comparison = (a.state?.mem_used ?? 0) - (b.state?.mem_used ?? 0)
break
case "stg":
case "disk":
comparison = (a.state?.disk_used ?? 0) - (b.state?.disk_used ?? 0)
break
case "up":