diff --git a/app/utils/sendDeviceInfor.ts b/app/utils/sendDeviceInfor.ts index e592df4..f56b6e1 100644 --- a/app/utils/sendDeviceInfor.ts +++ b/app/utils/sendDeviceInfor.ts @@ -122,73 +122,58 @@ export const sendDeviceInfora = async () => { // let memory = if (index > 0) { if (PID !== "" && SN !== "") { - let RAM = - showVersion - .filter((line) => line.includes("bytes of memory")) - .join("
") - .match(regexMemory) !== null - ? ( - parseInt( - showVersion - .filter((line) => - line.includes("bytes of memory") - ) - .join("
") - .match(regexMemory)[0] - ) / - 1024 / - 1024 - ).toFixed(2) + "G" - : ""; + // let RAM = + // showVersion + // .filter((line) => line.includes("bytes of memory")) + // .join("
") + // .match(regexMemory) !== null + // ? ( + // parseInt( + // showVersion + // .filter((line) => + // line.includes("bytes of memory") + // ) + // .join("
") + // .match(regexMemory)[0] + // ) / + // 1024 / + // 1024 + // ).toFixed(2) + "G" + // : ""; - let flash = showVersion - .filter((line) => - line.toLocaleLowerCase().includes("compactflash") - ) - .join("
"); + // let flash = showVersion + // .filter((line) => + // line.toLocaleLowerCase().includes("compactflash") + // ) + // .join("
"); listInformation.push({ PID: PID, VID: VID, SN: SN, - RAM: RAM, - flash: - flash.match(regexMemory) !== null - ? ( - parseInt(flash.match(regexMemory)[0]) / - 1024 / - 1024 - ).toFixed(2) + "G" - : "", + RAM: "", + flash: "", extraItem: "yes", }); html += `${PID} ${VID} ${SN} - ${RAM} - ${ - flash.match(regexMemory) !== null - ? ( - parseInt(flash.match(regexMemory)[0]) / - 1024 / - 1024 - ).toFixed(2) + "G" - : "" - } + + yes`; } } else { if (PID !== "" && SN !== "") { let RAM = showVersion - .filter((line) => line.includes("bytes of memory")) + .filter((line) => line.includes("bytes of memory") || line.includes("bytes of physical memory")) .join("
") .match(regexMemory) !== null ? ( parseInt( showVersion .filter((line) => - line.includes("bytes of memory") + line.includes("bytes of memory") || line.includes("bytes of physical memory") ) .join("
") .match(regexMemory)[0]