From: Felix Date: Wed, 4 Dec 2019 22:44:41 +0000 (+0000) Subject: Documentacion agregada - previo a la presentacion X-Git-Url: https://git.josue.xyz/?p=VSoRC%2F.git;a=commitdiff_plain;h=8bd25d906f766566ceee02d3d70e9890689a4c1a;hp=4ff4cfab60fd88f431c88603d57612fc489dc62f Documentacion agregada - previo a la presentacion --- 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 @@