G92 > send-to-ESP
This commit is contained in:
@@ -187,6 +187,15 @@ const infoServer = https.createServer(httpsOptions, (req, res) => {
|
||||
res.writeHead(200, {'Content-Type': 'text/css'});
|
||||
res.end(data);
|
||||
}
|
||||
}); } else if (req.url === '/allApps.css') {
|
||||
fs.readFile('./public/allApps.css', (err, data) => {
|
||||
if (err) {
|
||||
res.writeHead(404);
|
||||
res.end('Not found');
|
||||
} else {
|
||||
res.writeHead(200, {'Content-Type': 'text/css'});
|
||||
res.end(data);
|
||||
}
|
||||
});
|
||||
} else if (req.url === '/api/status') {
|
||||
const status = {
|
||||
@@ -196,8 +205,8 @@ const infoServer = https.createServer(httpsOptions, (req, res) => {
|
||||
{name: 'Elbow', status: telnetSender2?.tSocket ? 'connected' : 'disconnected'},
|
||||
{name: 'Hand', status: telnetSender3?.tSocket ? 'connected' : 'disconnected'}
|
||||
],
|
||||
lastCommands: getLastLines('./logs/gcode_commands.log', 10),
|
||||
lastPings: getLastLines('./logs/pings.log', 10)
|
||||
lastCommands: getLastLines('./logs/gcode_commands.log', 15),
|
||||
lastPings: getLastLines('./logs/pings.log', 15)
|
||||
};
|
||||
res.writeHead(200, {'Content-Type': 'application/json'});
|
||||
res.end(JSON.stringify(status));
|
||||
|
||||
Reference in New Issue
Block a user