diff --git a/backend/src/helpers/SchedulingNotifySendMessage.ts b/backend/src/helpers/SchedulingNotifySendMessage.ts index 78399d7..3ba8e8c 100644 --- a/backend/src/helpers/SchedulingNotifySendMessage.ts +++ b/backend/src/helpers/SchedulingNotifySendMessage.ts @@ -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) { - // console.log(`exec error: ${error.message}`); - // return; - // } - // if (stderr) { - // console.log(`exec stderr: ${stderr}`); - // return; - // } + if (error) { + console.log(`exec error: ${error.message}`); + return; + } + if (stderr) { + console.log(`exec stderr: ${stderr}`); + return; + } - // stdout = stdout.split(/\r?\n/) - // stdout = stdout[1].trim().split(/\s+/) + stdout = stdout.split(/\r?\n/) + stdout = stdout[1].trim().split(/\s+/) - // // DISK SPACE MONITORING - // const io = getIO(); - // io.emit("diskSpaceMonit", { - // action: "update", - // diskSpace: { - // size: stdout[1], - // used: stdout[2], - // available: stdout[3], - // use: stdout[4] - // } - // }); + // DISK SPACE MONITORING + const io = getIO(); + io.emit("diskSpaceMonit", { + action: "update", + diskSpace: { + size: stdout[1], + used: stdout[2], + available: stdout[3], + use: stdout[4] + } + }); - // }); + }); diff --git a/frontend/src/components/MessageInput/index.js b/frontend/src/components/MessageInput/index.js index 2d9f599..fb4370d 100644 --- a/frontend/src/components/MessageInput/index.js +++ b/frontend/src/components/MessageInput/index.js @@ -321,7 +321,6 @@ const MessageInput = ({ ticketStatus }) => { setTabOption('open') } - if (templateParams) { for (let key in templateParams) { if (templateParams.hasOwnProperty(key)) { @@ -331,7 +330,7 @@ const MessageInput = ({ ticketStatus }) => { if (key === '_reactName') { templateParams = null break - } + } } } } @@ -341,13 +340,13 @@ const MessageInput = ({ ticketStatus }) => { fromMe: true, mediaUrl: "", body: (signMessage && !templateParams) ? `*${user?.name}:*\n${inputMessage.trim()}` : inputMessage.trim(), - quotedMsg: replyingMessage + quotedMsg: replyingMessage } if (templateParams) { - message = { ...message, params: templateParams } + message = { ...message, params: templateParams } } - + try {