mirror of
https://github.com/woodchen-ink/nezha-dash-v1.git
synced 2025-07-18 09:31:55 +08:00
fix: update sort type from 'stg' to 'disk' for accurate sorting in server context
This commit is contained in:
parent
bc88a53170
commit
963765343b
@ -1,8 +1,8 @@
|
|||||||
import { createContext } from "react"
|
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"
|
export type SortOrder = "asc" | "desc"
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ export default function Servers() {
|
|||||||
case "mem":
|
case "mem":
|
||||||
comparison = (a.state?.mem_used ?? 0) - (b.state?.mem_used ?? 0)
|
comparison = (a.state?.mem_used ?? 0) - (b.state?.mem_used ?? 0)
|
||||||
break
|
break
|
||||||
case "stg":
|
case "disk":
|
||||||
comparison = (a.state?.disk_used ?? 0) - (b.state?.disk_used ?? 0)
|
comparison = (a.state?.disk_used ?? 0) - (b.state?.disk_used ?? 0)
|
||||||
break
|
break
|
||||||
case "up":
|
case "up":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user