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

uat_us
DESKTOP-6C3NK6N\WXS 2024-09-06 13:36:25 +08:00
parent c618738725
commit 4f0f124378
4 changed files with 11 additions and 11 deletions

View File

@ -9,7 +9,7 @@ const getDefaultState = () => {
studyListQuery: null, studyListQuery: null,
unlock: false, unlock: false,
config: {}, config: {},
uploadTip: '0.00kb/s', uploadTip: '0.00KB/s',
timer: null, timer: null,
whiteList: [], whiteList: [],
checkTaskId: null checkTaskId: null

View File

@ -14,7 +14,7 @@ export function AWSclose() {
if (timer) { if (timer) {
clearInterval(timer); clearInterval(timer);
timer = null; timer = null;
store.state.trials.uploadTip = '0kb/s' store.state.trials.uploadTip = '0KB/s'
} }
bytesReceivedPerSecond = {}; bytesReceivedPerSecond = {};
} }
@ -440,10 +440,10 @@ function setTimer() {
let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b); let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b);
if (timeList.length > 0) { if (timeList.length > 0) {
let totalBytes = timeList.reduce((sum, bytes) => sum + bytesReceivedPerSecond[bytes], 0) / (5 * 1024); let totalBytes = timeList.reduce((sum, bytes) => sum + bytesReceivedPerSecond[bytes], 0) / (5 * 1024);
let unit = 'kb/s'; let unit = 'KB/s';
if (totalBytes > 1024) { if (totalBytes > 1024) {
totalBytes = totalBytes / 1024; totalBytes = totalBytes / 1024;
unit = "mb/s"; unit = "MB/s";
} }
store.state.trials.uploadTip = totalBytes.toFixed(2) + unit; store.state.trials.uploadTip = totalBytes.toFixed(2) + unit;
} }

View File

@ -8,7 +8,7 @@ export function OSSclose() {
if (timer) { if (timer) {
clearInterval(timer); clearInterval(timer);
timer = null; timer = null;
store.state.trials.uploadTip = '0kb/s' store.state.trials.uploadTip = '0KB/s'
} }
bytesReceivedPerSecond = {}; bytesReceivedPerSecond = {};
savaData = {}; savaData = {};
@ -140,10 +140,10 @@ function setTimer() {
let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b); let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b);
if (timeList.length > 0) { if (timeList.length > 0) {
let totalBytes = timeList.reduce((sum, bytes) => sum + bytesReceivedPerSecond[bytes], 0) / (5 * 1024); let totalBytes = timeList.reduce((sum, bytes) => sum + bytesReceivedPerSecond[bytes], 0) / (5 * 1024);
let unit = 'kb/s'; let unit = 'KB/s';
if (totalBytes > 1024) { if (totalBytes > 1024) {
totalBytes = totalBytes / 1024; totalBytes = totalBytes / 1024;
unit = "mb/s"; unit = "MB/s";
} }
store.state.trials.uploadTip = totalBytes.toFixed(2) + unit; store.state.trials.uploadTip = totalBytes.toFixed(2) + unit;
} }

View File

@ -24,10 +24,10 @@ module.exports = {
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
port: '8080', port: '8080',
headers: { // headers: {
'Cross-Origin-Opener-Policy': 'same-origin', // 'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp' // 'Cross-Origin-Embedder-Policy': 'require-corp'
}, // },
// open: true, // open: true,
overlay: { overlay: {
warnings: false, warnings: false,