修复总带宽显示错误的问题

This commit is contained in:
CN-JS-HuiBai
2026-04-04 18:52:13 +08:00
parent 0200a00844
commit d2b3b94a56

View File

@@ -360,7 +360,7 @@ app.get('/api/metrics/overview', async (req, res) => {
cpu: { used: 0, total: 0, percent: 0 },
memory: { used: 0, total: 0, percent: 0 },
disk: { used: 0, total: 0, percent: 0 },
network: { totalBandwidth: 0, rx: 0, tx: 0 },
network: { total: 0, rx: 0, tx: 0 },
traffic24h: { rx: 0, tx: 0, total: 0 },
servers: []
});
@@ -433,7 +433,7 @@ app.get('/api/metrics/overview', async (req, res) => {
percent: diskTotal > 0 ? (diskUsed / diskTotal * 100) : 0
},
network: {
totalBandwidth: netRx + netTx,
total: netRx + netTx,
rx: netRx,
tx: netTx
},