From: VSORC Date: Wed, 23 Oct 2019 22:26:00 +0000 (-0400) Subject: Se trabajo mas en la vista de stats X-Git-Url: https://git.josue.xyz/?p=VSoRC%2F.git;a=commitdiff_plain;h=851b2201f1e8f79aa865009f9d3131e361f48916 Se trabajo mas en la vista de stats --- diff --git a/img/switch.svg b/img/switch.svg index 5c5cf6b..77371f9 100644 Binary files a/img/switch.svg and b/img/switch.svg differ diff --git a/img/switch2.svg b/img/switch2.svg new file mode 100755 index 0000000..128a126 --- /dev/null +++ b/img/switch2.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/switch3.svg b/img/switch3.svg new file mode 100644 index 0000000..5c5cf6b Binary files /dev/null and b/img/switch3.svg differ 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 cbb21a3..40bcc30 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -78,7 +78,23 @@ router.get('/listswitch', (req, res) => { child = exec("curl localhost:8080/data?list=switches", function(error, stdout, stderr) { console.log("listswitch"); console.log(stdout); - res.send(stdout); + let value = JSON.parse(stdout) + + res.send(value); + }); +}); + +router.get('/status', (req, res) => { + var sys = require('sys') + var exec = require('child_process').exec; + var child; + console.log(req.query.status+req.query.dpid); + child = exec("curl \"localhost:8080/status?status="+req.query.status+"&dpid="+req.query.dpid+"\"", function(error, stdout, stderr) { + console.log("statusFlows"); + console.log(stdout); + let value = JSON.parse(stdout) + + res.send(value); }); }); diff --git a/src/views/stats.ejs b/src/views/stats.ejs index e9903e1..cf8b947 100644 --- a/src/views/stats.ejs +++ b/src/views/stats.ejs @@ -9,8 +9,14 @@ + + + <%include ../../partials/head%> +
+ <%include ../../partials/header%> +

Flow Tables

@@ -25,4 +31,7 @@ +