mirror of
https://github.com/woodchen-ink/nezha-dash-v1.git
synced 2025-07-18 17:41:56 +08:00
fix: net transfer display error
This commit is contained in:
parent
7e259f22de
commit
f46dd8e479
@ -66,12 +66,18 @@ export default function Servers() {
|
|||||||
)?.length || 0;
|
)?.length || 0;
|
||||||
const up =
|
const up =
|
||||||
nezhaWsData?.servers?.reduce(
|
nezhaWsData?.servers?.reduce(
|
||||||
(total, server) => total + server.state.net_out_transfer,
|
(total, server) =>
|
||||||
|
formatNezhaInfo(nezhaWsData.now, server).online
|
||||||
|
? total + (server.state?.net_out_transfer ?? 0)
|
||||||
|
: total,
|
||||||
0,
|
0,
|
||||||
) || 0;
|
) || 0;
|
||||||
const down =
|
const down =
|
||||||
nezhaWsData?.servers?.reduce(
|
nezhaWsData?.servers?.reduce(
|
||||||
(total, server) => total + server.state.net_in_transfer,
|
(total, server) =>
|
||||||
|
formatNezhaInfo(nezhaWsData.now, server).online
|
||||||
|
? total + (server.state?.net_in_transfer ?? 0)
|
||||||
|
: total,
|
||||||
0,
|
0,
|
||||||
) || 0;
|
) || 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user