Update function check status for other system
This commit is contained in:
parent
b6f3fdbaad
commit
7caba66d37
|
|
@ -902,16 +902,20 @@ const checkMultipleRequest = async () => {
|
|||
}
|
||||
};
|
||||
|
||||
const runExec = (command) => {
|
||||
const runExec = (command, name) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
exec(command, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (stdout !== "") {
|
||||
if(name === "Test Log System"){
|
||||
if (stdout !== "") {
|
||||
resolve(stdout);
|
||||
} else {
|
||||
resolve(stderr);
|
||||
}
|
||||
}else{
|
||||
resolve(stdout);
|
||||
} else {
|
||||
resolve(stderr);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1026,7 +1030,7 @@ const checkMultipleRequest = async () => {
|
|||
}
|
||||
|
||||
if (req.method === "EXEC") {
|
||||
const stdout = await runExec(req.url);
|
||||
const stdout = await runExec(req.url, req.group);
|
||||
if (stdout !== "") {
|
||||
let responseDataString = JSON.stringify(stdout, null, 2);
|
||||
allResponse += `${req.name}\n${responseDataString}\n\n`;
|
||||
|
|
|
|||
Loading…
Reference in New Issue