From 777f2058e203bedb244f5a0ee779f6d5177a334f Mon Sep 17 00:00:00 2001 From: Felix Date: Tue, 26 Nov 2019 19:22:17 +0000 Subject: [PATCH] bugs fixed --- npm-debug.log | 26 ++++++++++++++++++++++++++ src/routes/index.js | 19 ++++++++++++++----- src/views/index.ejs | 22 +++++++++++++++++++++- src/views/starter.ejs | 37 +++++-------------------------------- 4 files changed, 66 insertions(+), 38 deletions(-) create mode 100644 npm-debug.log diff --git a/npm-debug.log b/npm-debug.log new file mode 100644 index 0000000..a2cfa34 --- /dev/null +++ b/npm-debug.log @@ -0,0 +1,26 @@ +0 info it worked if it ends with ok +1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ] +2 info using npm@1.4.21 +3 info using node@v8.11.1 +4 verbose run-script [ 'prestart', 'start', 'poststart' ] +5 info prestart web@1.0.0 +6 info start web@1.0.0 +7 verbose unsafe-perm in lifecycle true +8 info web@1.0.0 Failed to exec start script +9 error web@1.0.0 start: `node src/index.js` +9 error Exit status 1 +10 error Failed at the web@1.0.0 start script. +10 error This is most likely a problem with the web package, +10 error not with npm itself. +10 error Tell the author that this fails on your system: +10 error node src/index.js +10 error You can get their info via: +10 error npm owner ls web +10 error There is likely additional logging output above. +11 error System Linux 4.19.57-v7+ +12 error command "/usr/bin/node" "/usr/bin/npm" "start" +13 error cwd /home/pi/VSoRC +14 error node -v v8.11.1 +15 error npm -v 1.4.21 +16 error code ELIFECYCLE +17 verbose exit [ 1, true ] diff --git a/src/routes/index.js b/src/routes/index.js index 51f8146..d4f9b59 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -61,6 +61,15 @@ router.get('/ifstat', (req, res) => { }); }); +router.get('/showtemp', (req, res) => { + var sys = require('sys') + var exec = require('child_process').exec; + var child; + child = exec("cd /home/pi/scripts && ./gettemp.sh", function(error, stdout, stderr) { + console.log("show temp"); + res.send(stdout); + }); +}); router.get('/gettopo', (req, res) => { var sys = require('sys') var exec = require('child_process').exec; @@ -76,7 +85,7 @@ router.get('/net', (req, res) => { var exec = require('child_process').exec; var child; child = exec("cd /home/pi/scripts && echo net > fifo", function(error, stdout, stderr) { - console.log("pingall"); + console.log("net"); res.send(stdout); }); }); @@ -86,17 +95,17 @@ router.get('/nodes', (req, res) => { var exec = require('child_process').exec; var child; child = exec("cd /home/pi/scripts && echo nodes > fifo", function(error, stdout, stderr) { - console.log("pingall"); + console.log("nodes"); res.send(stdout); }); }); -router.get('/status', (req, res) => { +router.get('/statusnodes', (req, res) => { var sys = require('sys') var exec = require('child_process').exec; var child; child = exec("cd /home/pi/scripts && echo status > fifo", function(error, stdout, stderr) { - console.log("pingall"); + console.log("status"); res.send(stdout); }); }); @@ -106,7 +115,7 @@ router.get('/intfs', (req, res) => { var exec = require('child_process').exec; var child; child = exec("cd /home/pi/scripts && echo intfs > fifo", function(error, stdout, stderr) { - console.log("pingall"); + console.log("interfaces"); res.send(stdout); }); }); diff --git a/src/views/index.ejs b/src/views/index.ejs index d0dfb92..4eeb92f 100644 --- a/src/views/index.ejs +++ b/src/views/index.ejs @@ -158,12 +158,32 @@ } xhr.send(); }, 500) +
-
+
+ +
+
diff --git a/src/views/starter.ejs b/src/views/starter.ejs index 0caa1f5..01aca3a 100644 --- a/src/views/starter.ejs +++ b/src/views/starter.ejs @@ -56,9 +56,9 @@
- -
- +
+ +
-- 2.25.1