<!doctype html>
<!--
This is a webpage for showing a Lamport time diagram of an event trace.
It's useful for visually spotting the root causes of
race conditions and other nasty bugs.
-->
<html>
  <head>
    <link rel="stylesheet" href="./visualize.css">
    <link rel="stylesheet" href="./assets/d3-timeline/css/style.css">
    <script src="./assets/d3-timeline/lib/jquery-1.7.2.min.js"></script>
    <script src="./assets/d3-timeline/lib/d3.v3.min.js"></script>
    <script src="./assets/d3-timeline/src/d3-timeline.js"></script>
    <script src="./assets/Tooltip.js"></script>
    <script src="./visualize_lib.js"></script>
    <script type="text/javascript">

      $(function() {
        window.onload = function() {
          setTimelineType("2d");
          setInitialTraceCount(1);
          setTooltip();
          appendTimeline();
          for (var i=0; i<globals.initialTraceCount; i++) {
            appendFileUploader();
          }
        }
      });
    </script>

    <script type="text/javascript">
      // Draw an example event trace to show before the user has loaded their own:
      function read(textFile){
          var xhr=new XMLHttpRequest;
          xhr.open('GET',textFile);
          xhr.onload=drawRemoteFile;
          xhr.send()
      }

      function drawRemoteFile(){
        data = formatData2D(this.response);
        drawData(data);
      }

      read('events.trace');
    </script>
  </head>
  <body>
    <div id="welcome-container">
      <p id="title"> Welcome to STS Visualization Tool (2D)! </p>
      <p id="overview">
        This is a webpage for visualizing event traces. It's especially useful for debugging
        non-deterministic replays by comparing the timings of different replay runs.
      </p>
      <hr>
    </div>
    <div id="data-container">
      <div id="tuner-container"></div>
      <div id="uploader-container"></div>
      <div id="timeline-container"></div>
    </div>
  </body>
</html>


Add example tool to host remotely. Automatically loads a json file
Add example tool to host remotely. Automatically loads a json file
