Skip to content

Commit

Permalink
Module Speedtest: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmccartney committed Dec 14, 2023
1 parent 1ec3f9f commit 6706d46
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/modules/speedtest-net/client/components/ResultsTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function ResultsTable({ panelId, limit = 10 }) {
minWidth: 60,
content: (item) => {
if (item.download?.bandwidth) {
return `${Math.round((item.download?.bandwidth / 10000000) * 100) / 100}Mb/s`;
return `${Math.round((item.download?.bandwidth / 100000) * 100) / 100}Mb/s`;
}
},
},
Expand All @@ -63,7 +63,7 @@ export default function ResultsTable({ panelId, limit = 10 }) {
minWidth: 60,
content: (item) => {
if (item.upload?.bandwidth) {
return `${Math.round((item.upload?.bandwidth / 10000000) * 100) / 100}Mb/s`;
return `${Math.round((item.upload?.bandwidth / 100000) * 100) / 100}Mb/s`;
}
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/modules/speedtest-net/client/components/SpeedCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function SpeedCard({
const getValue = (stats = []) => {
if (stats) {
if (stats.length > 0) {
return `${Math.round((stats[stats.length - 1][label] / 10000000) * 10) / 10}${units}`;
return `${Math.round((stats[stats.length - 1][label] / 100000) * 10) / 10}${units}`;
}
}
return "";
Expand Down
3 changes: 0 additions & 3 deletions src/modules/speedtest-net/container/utils/speedtest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
const speedTest = require("@phanmn/speedtest-net");
const mongoCollection = require("@core/mongo-collection");

let downloadProgress = 0;
let uploadProgress = 0;

module.exports = async () => {
try {
const downloadCollection = await mongoCollection("download-stats");
Expand Down

0 comments on commit 6706d46

Please sign in to comment.