Merge pull request #278 from JokerQyou/fix/network-io-chart-not-rendering

Fix network I/O chart not rendering.
This commit is contained in:
Toby Chui 2024-08-07 13:49:02 +08:00 committed by GitHub
commit 87659b43bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -583,14 +583,14 @@
url: '/api/stats/netstatgraph?array=true',
success: function(data){
if (rxValues.length == 0){
rxValues = JSON.parse(JSON.stringify(data.Rx));
rxValues.push(...data.Rx);
}else{
rxValues.push(data.Rx[dataCount-1]);
rxValues.shift();
}
if (txValues.length == 0){
txValues = JSON.parse(JSON.stringify(data.Tx));
txValues.push(...data.Tx);
}else{
txValues.push(data.Tx[dataCount-1]);
txValues.shift();