autorefresh in the stats and minor color changes
authorOscar J. Rodriguez B <josuer08@gmail.com>
Mon, 4 Nov 2019 15:57:16 +0000 (10:57 -0500)
committerOscar J. Rodriguez B <josuer08@gmail.com>
Mon, 4 Nov 2019 15:57:16 +0000 (10:57 -0500)
1 [deleted file]
adminlte [deleted file]
bootstrapbootswatch [deleted file]
ejsexpressnode [deleted file]
fifo [deleted file]
js/topology/flowtables.js
src/routes/index.js
src/views/starter.ejs
styles/colors.css
styles/main.css

diff --git a/1 b/1
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/adminlte b/adminlte
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/bootstrapbootswatch b/bootstrapbootswatch
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/ejsexpressnode b/ejsexpressnode
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/fifo b/fifo
deleted file mode 100644 (file)
index e69de29..0000000
index af4a22fc3afe406e5b1fd04b68cf3127ad8efaf2..99830aa9cbc362971a0e90fcb8d77340a1b60771 100644 (file)
@@ -95,12 +95,12 @@ $(function () {
     loadFlows();
 
 
     loadFlows();
 
 
-    // function startRefresh() {
-    //     setTimeout(startRefresh,10000);
-    //     loadFlows();
-    // }
+    function startRefresh() {
+        setTimeout(startRefresh,10000);
+        loadFlows();
+    }
 
 
-    // startRefresh()
+    startRefresh()
 
     // function autoRefreshPage() {
     //     loadFlows();
 
     // function autoRefreshPage() {
     //     loadFlows();
index d12f5341d7ca0a0768e26cc5ac62e7ecad16ede1..f8eca17aee1c990ade74e3a06198d736d6f574b9 100644 (file)
@@ -78,7 +78,16 @@ router.get('/listswitch', (req, res) => {
   child = exec("curl localhost:8080/data?list=switches", function(error, stdout, stderr) {
     console.log("listswitch");
     console.log(stdout);
   child = exec("curl localhost:8080/data?list=switches", function(error, stdout, stderr) {
     console.log("listswitch");
     console.log(stdout);
-    let value = JSON.parse(stdout)
+    let value = '';
+    try {
+      value = JSON.parse(stdout)
+    }
+    catch(error) {
+      console.error(error);
+      console.log("no response from server");
+      // expected output: ReferenceError: nonExistentFunction is not defined
+      // Note - error messages will vary depending on browser
+    }
 
     res.send(value);
   });
 
     res.send(value);
   });
index 57602b7b7ec21f64e3b8d89cc84732a0d031a048..01b83278f1dd3d2eb4a99485b82be695da6886a8 100644 (file)
@@ -6,36 +6,33 @@
   <!-- <link rel="stylesheet" type="text/css" href="/styles/main.css" /> -->
   <%include ../../partials/head%>
   <style media="screen">
   <!-- <link rel="stylesheet" type="text/css" href="/styles/main.css" /> -->
   <%include ../../partials/head%>
   <style media="screen">
-    body{
+    body {
       display: flex;
       flex-flow: row wrap;
     }
       display: flex;
       flex-flow: row wrap;
     }
-    main{
+
+    main {
       width: 100%;
       flex-grow: 2;
     }
       width: 100%;
       flex-grow: 2;
     }
-    aside{
+
+    aside {
       flex-grow: 1;
     }
       flex-grow: 1;
     }
-    footer{
+
+    footer {
       position: absolute;
       top: 100%;
     }
 
       position: absolute;
       top: 100%;
     }
 
-    input[type="text"]{
-      background-color: rgba(200,200,200,0.5);
-      border: 0;
-      border-bottom: 2px black solid;
-      overflow: hidden;
-      width: 15em;
-    }
-    .buttons{
-    display: flex;
-    width: 100%;
-    margin: 0;
-    padding: 0;
+    .buttons {
+      display: flex;
+      width: 100%;
+      margin: 0;
+      padding: 0;
     }
     }
-    button{
+
+    button {
       flex-grow: 1;
       border: 0;
       border-bottom: 2px black solid;
       flex-grow: 1;
       border: 0;
       border-bottom: 2px black solid;
       background-color: white;
       transition: background-color 0.3s ease-in, color 0.3s ease-in;
     }
       background-color: white;
       transition: background-color 0.3s ease-in, color 0.3s ease-in;
     }
-    button:hover{
+
+    button:hover {
       background-color: darkgrey;
       color: white
     }
       background-color: darkgrey;
       color: white
     }
-    textarea{
+
+    textarea {
       width: 25%;
       font-size: 1.5em;
       overflow: auto;
       width: 25%;
       font-size: 1.5em;
       overflow: auto;
-      height: 15em
+      height: 15em;
+      background-color: rgba(255, 255, 255, 0.8);
+      padding: 0;
+      margin: 0;
     }
   </style>
 </head>
 <header>
   <%include ../../partials/header%>
 </header>
     }
   </style>
 </head>
 <header>
   <%include ../../partials/header%>
 </header>
+
 <body>
 
   <main>
 <body>
 
   <main>
       <button type="button" name="button" onclick="startcontroller()">Iniciar controlador</button>
       <button type="button" name="button" onclick="stopcontroller()">Detener controlador</button>
     </div>
       <button type="button" name="button" onclick="startcontroller()">Iniciar controlador</button>
       <button type="button" name="button" onclick="stopcontroller()">Detener controlador</button>
     </div>
-      <textarea rows="20" cols="7" id="comandos"></textarea>
+    <textarea rows="20" cols="7" id="comandos"></textarea>
     <script type="text/javascript">
     <script type="text/javascript">
-    let topo = document.getElementById('comandos') //Donde van escrito el DSL
+      let topo = document.getElementById('comandos') //Donde van escrito el DSL
 
 
 
 
 
 
-    function stopcontroller() {
-      let xhr = new XMLHttpRequest();
-      xhr.open('GET', '/stopcontroller', true);
-      xhr.onload = function() {
-        if (xhr.status == 200) { //can use this.status instead
-          //console.log(xhr.responseText);// para ver en la consola
-          console.log("controller stoped");
+      function stopcontroller() {
+        let xhr = new XMLHttpRequest();
+        xhr.open('GET', '/stopcontroller', true);
+        xhr.onload = function() {
+          if (xhr.status == 200) { //can use this.status instead
+            //console.log(xhr.responseText);// para ver en la consola
+            console.log("controller stoped");
+          }
         }
         }
-      }
-      xhr.send();
+        xhr.send();
 
 
-    }
+      }
 
 
-    function startcontroller() {
-      let xhr = new XMLHttpRequest();
-      xhr.open('GET', '/startcontroller', true);
-      //console.log(xhr); //para ver en la consola
-      xhr.onload = function() {
-        if (xhr.status == 200) { //can use this.status instead
+      function startcontroller() {
+        let xhr = new XMLHttpRequest();
+        xhr.open('GET', '/startcontroller', true);
+        //console.log(xhr); //para ver en la consola
+        xhr.onload = function() {
+          if (xhr.status == 200) { //can use this.status instead
 
 
-          console.log("controller started");
+            console.log("controller started");
+          }
         }
         }
+        xhr.send();
       }
       }
-      xhr.send();
-    }
 
       function startvsorc() {
 
       function startvsorc() {
-          let xhr = new XMLHttpRequest();
-          topology = JSON.stringify(topo.value)
-          xhr.open('GET', '/startvsorc?topology='+topology, true);
-          xhr.onload = function() {
-            if (xhr.status == 200) { //can use this.status instead
-              //console.log(xhr.responseText);// para ver en la consola
-              console.log("vsorc started");
-            }
+        let xhr = new XMLHttpRequest();
+        topology = JSON.stringify(topo.value)
+        xhr.open('GET', '/startvsorc?topology=' + topology, true);
+        xhr.onload = function() {
+          if (xhr.status == 200) { //can use this.status instead
+            //console.log(xhr.responseText);// para ver en la consola
+            console.log("vsorc started");
           }
           }
+        }
 
 
-          xhr.send();
+        xhr.send();
 
 
-        }
-        function stopvsorc() {
-            let xhr = new XMLHttpRequest();
-            xhr.open('GET', '/stopvsorc', true);
-            xhr.onload = function() {
-              if (xhr.status == 200) { //can use this.status instead
-                //console.log(xhr.responseText);// para ver en la consola
-                console.log("vsorc stopped");
-              }
-            }
-            xhr.send();
+      }
+
+      function stopvsorc() {
+        let xhr = new XMLHttpRequest();
+        xhr.open('GET', '/stopvsorc', true);
+        xhr.onload = function() {
+          if (xhr.status == 200) { //can use this.status instead
+            //console.log(xhr.responseText);// para ver en la consola
+            console.log("vsorc stopped");
           }
           }
+        }
+        xhr.send();
+      }
     </script>
   </main>
   <aside class="">
     </script>
   </main>
   <aside class="">
 </footer>
 
 
 </footer>
 
 
-</html>
+</html>
\ No newline at end of file
index 0eefd88c825a4990ee402f349e574bd06b7aabc6..c5311d419bd8aa391e2343eaefb75c8d32eb1654 100644 (file)
     --tcolor-2: #FF5027;\r
     --tcolor-3: #BC2400;\r
     --tcolor-4: #921C00;\r
     --tcolor-2: #FF5027;\r
     --tcolor-3: #BC2400;\r
     --tcolor-4: #921C00;\r
-    \r
+\r
     --white: white;\r
     --text-color: var(--pcolor-4);\r
 }\r
 \r
 :root {\r
     --white: white;\r
     --text-color: var(--pcolor-4);\r
 }\r
 \r
 :root {\r
-    --pcolor-0: #246767;       /* Main Primary color */\r
-    --pcolor-1: #699A9A;\r
-    --pcolor-2: #428080;\r
-    --pcolor-3: #0F4F4F;\r
-    --pcolor-4: #013535;\r
-    \r
-    --scolor-0: #AC873C;       /* Main Secondary color (1) */\r
-    --scolor-1: #FFE4AE;\r
-    --scolor-2: #D5B36E;\r
-    --scolor-3: #84601A;\r
-    --scolor-4: #593C02;\r
-    \r
-    --tcolor-0: #AC3C3C;       /* Main Secondary color (2) */\r
-    --tcolor-1: #FFAEAE;\r
-    --tcolor-2: #D56E6E;\r
-    --tcolor-3: #841A1A;\r
-    --tcolor-4: #590202;\r
+    --pcolor-0: #28A744;       /* Main Primary color */\r
+    --pcolor-1: #6FD084;\r
+    --pcolor-2: #45B85F;\r
+    --pcolor-3: #128C2D;\r
+    --pcolor-4: #026F1A;\r
+\r
+    --scolor-0: #237888;       /* Main Secondary color (1) */\r
+    --scolor-1: #63A7B4;\r
+    --scolor-2: #3B8896;\r
+    --scolor-3: #116372;\r
+    --scolor-4: #044D5A;\r
+\r
+    --tcolor-0: #91CC31;       /* Main Secondary color (2) */\r
+    --tcolor-1: #C6F081;\r
+    --tcolor-2: #ABE155;\r
+    --tcolor-3: #72AB16;\r
+    --tcolor-4: #558803;\r
 \r
 --white: white;\r
 --text-color: var(--pcolor-4);\r
 \r
 --white: white;\r
 --text-color: var(--pcolor-4);\r
@@ -50,4 +50,4 @@
 \r
 \r
 /* Generated by Paletton.com Â© 2002-2014 */\r
 \r
 \r
 /* Generated by Paletton.com Â© 2002-2014 */\r
-/* http://paletton.com */
\ No newline at end of file
+/* http://paletton.com */\r
index a787ce694ac6a84268c00206894039a88debd9a9..d3e5ec4d656aff650c74d7b11ad0090dcbaab59a 100644 (file)
@@ -6,8 +6,7 @@ faltan los textbox y selects
 
 
 
 
 
 
-
-body {
+html{
   background:
     linear-gradient(238deg, rgba(70, 70, 70, 0.09) 0%, rgba(70, 70, 70, 0.09) 50%, rgba(214, 214, 214, 0.09) 50%, rgba(214, 214, 214, 0.09) 100%),
     linear-gradient(126deg, rgba(223, 223, 223, 0.05) 0%, rgba(223, 223, 223, 0.05) 50%, rgba(217, 217, 217, 0.05) 50%, rgba(217, 217, 217, 0.05) 100%),
   background:
     linear-gradient(238deg, rgba(70, 70, 70, 0.09) 0%, rgba(70, 70, 70, 0.09) 50%, rgba(214, 214, 214, 0.09) 50%, rgba(214, 214, 214, 0.09) 100%),
     linear-gradient(126deg, rgba(223, 223, 223, 0.05) 0%, rgba(223, 223, 223, 0.05) 50%, rgba(217, 217, 217, 0.05) 50%, rgba(217, 217, 217, 0.05) 100%),
@@ -17,7 +16,19 @@ body {
     linear-gradient(100deg, rgba(220, 220, 220, 0.07) 0%, rgba(220, 220, 220, 0.07) 50%, rgba(65, 65, 65, 0.07) 50%, rgba(65, 65, 65, 0.07) 100%),
     linear-gradient(190deg, rgba(194, 194, 194, 0.03) 0%, rgba(194, 194, 194, 0.03) 50%, rgba(206, 206, 206, 0.03) 50%, rgba(206, 206, 206, 0.03) 100%),
     linear-gradient(320deg, rgba(10, 10, 10, 0.08) 0%, rgba(10, 10, 10, 0.08) 50%, rgba(231, 231, 231, 0.08) 50%, rgba(231, 231, 231, 0.08) 100%),
     linear-gradient(100deg, rgba(220, 220, 220, 0.07) 0%, rgba(220, 220, 220, 0.07) 50%, rgba(65, 65, 65, 0.07) 50%, rgba(65, 65, 65, 0.07) 100%),
     linear-gradient(190deg, rgba(194, 194, 194, 0.03) 0%, rgba(194, 194, 194, 0.03) 50%, rgba(206, 206, 206, 0.03) 50%, rgba(206, 206, 206, 0.03) 100%),
     linear-gradient(320deg, rgba(10, 10, 10, 0.08) 0%, rgba(10, 10, 10, 0.08) 50%, rgba(231, 231, 231, 0.08) 50%, rgba(231, 231, 231, 0.08) 100%),
-    linear-gradient(90deg, rgb(10, 147, 39), rgb(235, 252, 123));\r
+    linear-gradient(90deg, rgb(10, 147, 39), rgb(235, 252, 123));
+}
+body {
+  /* background:
+    linear-gradient(238deg, rgba(70, 70, 70, 0.09) 0%, rgba(70, 70, 70, 0.09) 50%, rgba(214, 214, 214, 0.09) 50%, rgba(214, 214, 214, 0.09) 100%),
+    linear-gradient(126deg, rgba(223, 223, 223, 0.05) 0%, rgba(223, 223, 223, 0.05) 50%, rgba(217, 217, 217, 0.05) 50%, rgba(217, 217, 217, 0.05) 100%),
+    linear-gradient(152deg, rgba(116, 116, 116, 0.08) 0%, rgba(116, 116, 116, 0.08) 50%, rgba(248, 248, 248, 0.08) 50%, rgba(248, 248, 248, 0.08) 100%),
+    linear-gradient(225deg, rgba(1, 1, 1, 0.07) 0%, rgba(1, 1, 1, 0.07) 50%, rgba(5, 5, 5, 0.07) 50%, rgba(5, 5, 5, 0.07) 100%),
+    linear-gradient(194deg, rgba(14, 14, 14, 0.09) 0%, rgba(14, 14, 14, 0.09) 50%, rgba(206, 206, 206, 0.09) 50%, rgba(206, 206, 206, 0.09) 100%),
+    linear-gradient(100deg, rgba(220, 220, 220, 0.07) 0%, rgba(220, 220, 220, 0.07) 50%, rgba(65, 65, 65, 0.07) 50%, rgba(65, 65, 65, 0.07) 100%),
+    linear-gradient(190deg, rgba(194, 194, 194, 0.03) 0%, rgba(194, 194, 194, 0.03) 50%, rgba(206, 206, 206, 0.03) 50%, rgba(206, 206, 206, 0.03) 100%),
+    linear-gradient(320deg, rgba(10, 10, 10, 0.08) 0%, rgba(10, 10, 10, 0.08) 50%, rgba(231, 231, 231, 0.08) 50%, rgba(231, 231, 231, 0.08) 100%),
+    linear-gradient(90deg, rgb(10, 147, 39), rgb(235, 252, 123)); */\r
   display: flex;\r
   flex-direction: column;
   font-family: helvetica;
   display: flex;\r
   flex-direction: column;
   font-family: helvetica;