feat: Uncomment code to allow backend to send disk space information to frontend

pull/22/head
adriano 2024-02-08 09:13:19 -03:00
parent 7bab4bf6b9
commit c444012963
1 changed files with 23 additions and 23 deletions

View File

@ -90,33 +90,33 @@ const monitor = async () => {
} }
// exec("df -h /", (error: any, stdout: any, stderr: any) => { exec("df -h /", (error: any, stdout: any, stderr: any) => {
// if (error) { if (error) {
// console.log(`exec error: ${error.message}`); console.log(`exec error: ${error.message}`);
// return; return;
// } }
// if (stderr) { if (stderr) {
// console.log(`exec stderr: ${stderr}`); console.log(`exec stderr: ${stderr}`);
// return; return;
// } }
// stdout = stdout.split(/\r?\n/) stdout = stdout.split(/\r?\n/)
// stdout = stdout[1].trim().split(/\s+/) stdout = stdout[1].trim().split(/\s+/)
// // DISK SPACE MONITORING // DISK SPACE MONITORING
// const io = getIO(); const io = getIO();
// io.emit("diskSpaceMonit", { io.emit("diskSpaceMonit", {
// action: "update", action: "update",
// diskSpace: { diskSpace: {
// size: stdout[1], size: stdout[1],
// used: stdout[2], used: stdout[2],
// available: stdout[3], available: stdout[3],
// use: stdout[4] use: stdout[4]
// } }
// }); });
// }); });