Primeros pasos en la pagina de estadisticas, para esto en index.js cree una nueva...
authorFelix <josuer08@gmail.com>
Wed, 23 Oct 2019 00:02:26 +0000 (01:02 +0100)
committerFelix <josuer08@gmail.com>
Wed, 23 Oct 2019 00:02:26 +0000 (01:02 +0100)
img/switch.svg [changed mode: 0755->0644]
js/topology/common.js
src/routes/index.js

old mode 100755 (executable)
new mode 100644 (file)
index 128a126..5c5cf6b
Binary files a/img/switch.svg and b/img/switch.svg differ
index b892a99ebc0df3d0fdcc51de508656f524cdc848..305294b4af9795503d772ff97ee667a736ffc438 100644 (file)
@@ -564,7 +564,7 @@ function hc(myString) {
 
 // Get information from datapaths
 function getSwitchData(request, f, g) {
-    $.get("/data", "list=switches")
+    $.get("/listswitch")
         .done(function (switches) {
             if ($.isEmptyObject(switches)) {
                 var msg = "No switches found!";
index a9299a95c374fc4f5ff5857a51cb6ceb889df32c..cbb21a373b5b46cd6a31b08084547ac0e36ffae0 100644 (file)
@@ -71,6 +71,18 @@ router.get('/gettopo', (req, res) => {
   });
 });
 
+router.get('/listswitch', (req, res) => {
+  var sys = require('sys')
+  var exec = require('child_process').exec;
+  var child;
+  child = exec("curl localhost:8080/data?list=switches", function(error, stdout, stderr) {
+    console.log("listswitch");
+    console.log(stdout);
+    res.send(stdout);
+  });
+});
+
+
 router.get('/startcontroller', (req, res) => {
   var sys = require('sys')
   var exec = require('child_process').exec;