网速监控大小写转换
continuous-integration/drone/push Build is passing

This commit is contained in:
DESKTOP-6C3NK6N\WXS
2024-09-06 13:36:25 +08:00
parent c618738725
commit 4f0f124378
4 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ const getDefaultState = () => {
studyListQuery: null,
unlock: false,
config: {},
uploadTip: '0.00kb/s',
uploadTip: '0.00KB/s',
timer: null,
whiteList: [],
checkTaskId: null
+3 -3
View File
@@ -14,7 +14,7 @@ export function AWSclose() {
if (timer) {
clearInterval(timer);
timer = null;
store.state.trials.uploadTip = '0kb/s'
store.state.trials.uploadTip = '0KB/s'
}
bytesReceivedPerSecond = {};
}
@@ -440,10 +440,10 @@ function setTimer() {
let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b);
if (timeList.length > 0) {
let totalBytes = timeList.reduce((sum, bytes) => sum + bytesReceivedPerSecond[bytes], 0) / (5 * 1024);
let unit = 'kb/s';
let unit = 'KB/s';
if (totalBytes > 1024) {
totalBytes = totalBytes / 1024;
unit = "mb/s";
unit = "MB/s";
}
store.state.trials.uploadTip = totalBytes.toFixed(2) + unit;
}
+3 -3
View File
@@ -8,7 +8,7 @@ export function OSSclose() {
if (timer) {
clearInterval(timer);
timer = null;
store.state.trials.uploadTip = '0kb/s'
store.state.trials.uploadTip = '0KB/s'
}
bytesReceivedPerSecond = {};
savaData = {};
@@ -140,10 +140,10 @@ function setTimer() {
let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b);
if (timeList.length > 0) {
let totalBytes = timeList.reduce((sum, bytes) => sum + bytesReceivedPerSecond[bytes], 0) / (5 * 1024);
let unit = 'kb/s';
let unit = 'KB/s';
if (totalBytes > 1024) {
totalBytes = totalBytes / 1024;
unit = "mb/s";
unit = "MB/s";
}
store.state.trials.uploadTip = totalBytes.toFixed(2) + unit;
}