Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
Network Traffic Upload and Downlaod value (#850)
Browse files Browse the repository at this point in the history
  • Loading branch information
D4rkia authored Nov 6, 2020
1 parent c83d2aa commit 0b568fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/classes/conninfo.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Conninfo {
</div>
</div>`;

this.current = document.querySelector("#mod_conninfo_innercontainer > h1 > i");
this.total = document.querySelector("#mod_conninfo_innercontainer > h2 > i");
this._pb = require("pretty-bytes");

Expand Down Expand Up @@ -84,6 +85,7 @@ class Conninfo {
this.series[1].append(time, -data[0].rx_sec/125000);

this.total.innerText = `${this._pb(data[0].tx_bytes)} OUT, ${this._pb(data[0].rx_bytes)} IN`.toUpperCase();
this.current.innerText = "UP " + parseFloat(data[0].tx_sec/125000).toFixed(2) + " DOWN " + parseFloat(data[0].rx_sec/125000).toFixed(2);
});
}
}
Expand Down

0 comments on commit 0b568fa

Please sign in to comment.