From 8bd25d906f766566ceee02d3d70e9890689a4c1a Mon Sep 17 00:00:00 2001 From: Felix Date: Wed, 4 Dec 2019 22:44:41 +0000 Subject: [PATCH] Documentacion agregada - previo a la presentacion --- js/topology/topology.js | 11 + npm-debug.log | 2 +- partials/header.ejs | 2 +- src/routes/index.js | 51 ++++- src/views/access.ejs | 453 ++++++++++++++++++++++++++++++++++++- src/views/index.ejs | 2 +- src/views/starter.ejs | 4 +- src/views/stats.ejs | 16 ++ src/views/stats.ejs.save | 58 +++++ src/views/topology.ejs | 2 +- styles/codeblock.dark.css | 113 +++++++++ styles/mermaid.dark.css | 283 +++++++++++++++++++++++ styles/sourcemode.dark.css | 38 ++++ styles/topology.css | 22 ++ 14 files changed, 1034 insertions(+), 23 deletions(-) create mode 100644 src/views/stats.ejs.save create mode 100644 styles/codeblock.dark.css create mode 100644 styles/mermaid.dark.css create mode 100644 styles/sourcemode.dark.css diff --git a/js/topology/topology.js b/js/topology/topology.js index ebd33a0..7808f33 100644 --- a/js/topology/topology.js +++ b/js/topology/topology.js @@ -43,6 +43,14 @@ $(function () { // "port": {"source": "00000003", "target": "00000002"}, "value": 4}, // ... // ]} +function displayMessage(msg) { + var $x = $("#snackbar"); + $x.text(msg) + $x.toggleClass("show"); + setTimeout(function () { $x.toggleClass("show"); }, 3000); +} + + function toGraph(top) { var nodes = []; var links = []; @@ -300,6 +308,9 @@ $(function () { xhr.onload = function() { if (xhr.status == 200) { //can use this.status instead //console.log(xhr.responseText);// para ver en la consola + if(xhr.response === null || xhr.response === ""){ + displayMessage("No response from controller") + } plotGraph(toGraph(JSON.parse(xhr.responseText))); } } diff --git a/npm-debug.log b/npm-debug.log index a2cfa34..54b150b 100644 --- a/npm-debug.log +++ b/npm-debug.log @@ -8,7 +8,7 @@ 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 +9 error Exit status 143 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. diff --git a/partials/header.ejs b/partials/header.ejs index d7e6f35..7188449 100644 --- a/partials/header.ejs +++ b/partials/header.ejs @@ -8,7 +8,7 @@