dockerContainerStats() fix changed to as documented

This commit is contained in:
Sebastian Hildebrandt
2021-01-02 21:15:59 +01:00
parent 13b331850b
commit 825ab9f5f9
4 changed files with 11 additions and 5 deletions
+4 -4
View File
@@ -273,7 +273,7 @@ function docker_calcCPUPercent(cpu_stats, precpu_stats) {
function docker_calcNetworkIO(networks) {
let rx;
let tx;
let wx;
for (let key in networks) {
// skip loop if the property is from prototype
if (!{}.hasOwnProperty.call(networks, key)) continue;
@@ -285,11 +285,11 @@ function docker_calcNetworkIO(networks) {
*/
let obj = networks[key];
rx = +obj.rx_bytes;
tx = +obj.tx_bytes;
wx = +obj.tx_bytes;
}
return {
rx: rx,
tx: tx
rx,
wx
};
}