修复总带宽显示错误的问题
This commit is contained in:
@@ -360,7 +360,7 @@ app.get('/api/metrics/overview', async (req, res) => {
|
|||||||
cpu: { used: 0, total: 0, percent: 0 },
|
cpu: { used: 0, total: 0, percent: 0 },
|
||||||
memory: { used: 0, total: 0, percent: 0 },
|
memory: { used: 0, total: 0, percent: 0 },
|
||||||
disk: { 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 },
|
traffic24h: { rx: 0, tx: 0, total: 0 },
|
||||||
servers: []
|
servers: []
|
||||||
});
|
});
|
||||||
@@ -433,7 +433,7 @@ app.get('/api/metrics/overview', async (req, res) => {
|
|||||||
percent: diskTotal > 0 ? (diskUsed / diskTotal * 100) : 0
|
percent: diskTotal > 0 ? (diskUsed / diskTotal * 100) : 0
|
||||||
},
|
},
|
||||||
network: {
|
network: {
|
||||||
totalBandwidth: netRx + netTx,
|
total: netRx + netTx,
|
||||||
rx: netRx,
|
rx: netRx,
|
||||||
tx: netTx
|
tx: netTx
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user