Se trabajo mas en la vista de stats
authorVSORC <josuer08@gmail.com>
Wed, 23 Oct 2019 22:26:00 +0000 (18:26 -0400)
committerVSORC <josuer08@gmail.com>
Wed, 23 Oct 2019 22:26:00 +0000 (18:26 -0400)
img/switch.svg
img/switch2.svg [new file with mode: 0755]
img/switch3.svg [new file with mode: 0644]
npm-debug.log [new file with mode: 0644]
src/routes/index.js
src/views/stats.ejs

index 5c5cf6be97660b89b9ef241f007d366e9c1011c6..77371f98c0fde918c0aa3fc2492e4b0a88c9ff0d 100644 (file)
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 (executable)
index 0000000..128a126
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="38pt" height="26pt" viewBox="0 0 38 26" version="1.1">
+<defs>
+<clipPath id="clip1">
+  <path d="M 0.0585938 0.820312 L 37 0.820312 L 37 25.820312 L 0.0585938 25.820312 L 0.0585938 0.820312 Z M 0.0585938 0.820312 "/>
+</clipPath>
+<clipPath id="clip2">
+  <path d="M 0.0585938 0.820312 L 37 0.820312 L 37 25.820312 L 0.0585938 25.820312 L 0.0585938 0.820312 Z M 0.0585938 0.820312 "/>
+</clipPath>
+</defs>
+<g id="surface0">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0.784314%,42.352941%,60.784314%);fill-opacity:1;" d="M 36.984375 8.171875 C 36.984375 12.121094 28.75 15.324219 18.59375 15.324219 C 8.433594 15.324219 0.199219 12.121094 0.199219 8.171875 L 0.199219 18.648438 C 0.199219 22.597656 8.433594 25.800781 18.59375 25.800781 C 28.75 25.800781 36.984375 22.597656 36.984375 18.648438 L 36.984375 8.171875 "/>
+<g clip-path="url(#clip1)" clip-rule="nonzero">
+<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(100%,100%,100%);stroke-opacity:1;stroke-miterlimit:4;" d="M 36.984375 17.828125 C 36.984375 13.878906 28.75 10.675781 18.59375 10.675781 C 8.433594 10.675781 0.199219 13.878906 0.199219 17.828125 L 0.199219 7.351562 C 0.199219 3.402344 8.433594 0.199219 18.59375 0.199219 C 28.75 0.199219 36.984375 3.402344 36.984375 7.351562 L 36.984375 17.828125 Z M 36.984375 17.828125 " transform="matrix(1,0,0,-1,0,26)"/>
+</g>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0.784314%,42.352941%,60.784314%);fill-opacity:1;" d="M 18.59375 15.324219 C 28.75 15.324219 36.984375 12.121094 36.984375 8.171875 C 36.984375 4.222656 28.75 1.019531 18.59375 1.019531 C 8.433594 1.019531 0.199219 4.222656 0.199219 8.171875 C 0.199219 12.121094 8.433594 15.324219 18.59375 15.324219 "/>
+<g clip-path="url(#clip2)" clip-rule="nonzero">
+<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(100%,100%,100%);stroke-opacity:1;stroke-miterlimit:4;" d="M 18.59375 10.675781 C 28.75 10.675781 36.984375 13.878906 36.984375 17.828125 C 36.984375 21.777344 28.75 24.980469 18.59375 24.980469 C 8.433594 24.980469 0.199219 21.777344 0.199219 17.828125 C 0.199219 13.878906 8.433594 10.675781 18.59375 10.675781 Z M 18.59375 10.675781 " transform="matrix(1,0,0,-1,0,26)"/>
+</g>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 14.394531 5.375 L 15.910156 7.652344 L 10.167969 8.980469 L 11.425781 7.9375 L 2.550781 6.417969 L 4.773438 4.75 L 13.339844 6.199219 L 14.394531 5.375 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 22.472656 10.898438 L 21.4375 8.550781 L 26.617188 7.515625 L 25.71875 8.320312 L 34.351562 9.796875 L 32.277344 11.453125 L 23.699219 9.839844 L 22.472656 10.898438 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 19.640625 4.132812 L 25.441406 2.542969 L 25.511719 5.027344 L 24.058594 4.753906 L 21.230469 7.101562 L 18.527344 6.707031 L 21.449219 4.410156 L 19.640625 4.132812 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 17.152344 13.039062 L 11.628906 14.074219 L 11.421875 11.519531 L 13.011719 11.867188 L 16.050781 9.269531 L 18.742188 9.726562 L 15.496094 12.558594 L 17.152344 13.039062 "/>
+</g>
+</svg>
diff --git a/img/switch3.svg b/img/switch3.svg
new file mode 100644 (file)
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 (file)
index 0000000..a2cfa34
--- /dev/null
@@ -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 ]
index cbb21a373b5b46cd6a31b08084547ac0e36ffae0..40bcc30892e1a8113e37aee66e86182b6720df95 100644 (file)
@@ -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);
   });
 });
 
index e9903e1f09f873f6d34f075c72d23c0f3d5dc1e2..cf8b9470abd76446daac939c562e492cc0c97037 100644 (file)
@@ -9,8 +9,14 @@
        <link rel="stylesheet" type="text/css" href="styles\tabs.css?v1">
        <link rel="stylesheet" type="text/css" href="styles\menu.css?v2">
        <script src="js\topology\jquery-3.3.1.min.js"></script>
+       <title></title>
+       <link rel="stylesheet" type="text/css" href="/styles/main.css" />
+       <%include ../../partials/head%>
 </head>
 <body>
+       <header>
+               <%include ../../partials/header%>
+       </header>
 <div class="container_16">
        <!-- <div id="header" class="grid_16"> -->
                <h1>Flow Tables</h1>
@@ -25,4 +31,7 @@
 <script src="js\topology\common.js?v2"></script>
 <script src="js\topology\flowtables.js?v2"></script>
 </body>
+<footer>
+  <%include ../../partials/footer%>
+</footer>
 </html>