You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.1 KiB

5 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style>
  5. body {
  6. background-color: black;
  7. }
  8. #globe, #traceout {
  9. display: inline-block;
  10. vertical-align: top;
  11. }
  12. #cmdout {
  13. color: white;
  14. }
  15. </style>
  16. </head>
  17. <body>
  18. <?php include "php/traceroute.php" ?>
  19. <div id="globe">
  20. <!-- This is where our renderer will attach the scene -->
  21. <canvas></canvas>
  22. </div>
  23. <script src="js/points.js"></script>
  24. <script src="js/external/three.js"></script>
  25. <script src="js/external/orbital-controls.js"></script>
  26. <script src="js/animations.js"></script>
  27. <div id="traceout">
  28. <button id="btnrun">Run Traceroute to tovijaeschke.xyz</button>
  29. <p id="cmdout"></p>
  30. </div>
  31. <script>
  32. init();
  33. var runTraceroute = function() {
  34. var rawout = '<?php traceroute(); raw_output() ?>';
  35. var tracepoints = '<?php json_output(); ?>';
  36. document.getElementById('cmdout').innerHTML += rawout;
  37. init.addTracePoints(JSON.parse(tracepoints));
  38. document.getElementById("btnrun").style.display = "none";
  39. };
  40. document.getElementById ("btnrun").addEventListener ("click", runTraceroute, false);
  41. </script>
  42. </body>
  43. </html>