{% extends "layout.html" %}
{% block title %}Results{% endblock %}
{% block head %}
  {{ super() }}
  <style type="text/css">
    p { color: #336699; }
    div.centered {
      margin: 10px 0px 10px 0px;
      text-align: center;
    }
  </style>
{% endblock %}
{% block content %}
  <h1>{{ job.sim.name }}:
    <small>{{ job.created.strftime('%Y-%m-%d %H:%M:%S') }}</small></h1>
  <pre>{% for p in params
    %}{{ p }} {% endfor %}(<a target="_blank" href="/job/{{ job.id }}">reconfigure</a>)</pre>

  <script language="javascript">
    var runid = "{{ runid }}";
    var sim   = "{{ job.sim.name }}";
    var compN = "{{ compN }}";
    var npoints = "{{ job.npoints }}";
  </script>
  <script type="text/javascript"
          src="{{ url_for('static', filename='status.js') }}"></script>
  <script language="javascript">
    $(document).ready(doInit);
  </script>

  <fieldset id="linFieldset">
    <legend id="linLegend">
      Data plots [LIN] (click here for logarithmic - or press 'L')</legend>
    <div id="linPlots" class="centered"></div>
  </fieldset>
  <fieldset id="logFieldset">
    <legend id="logLegend">
      Data plots [LOG] (click here for linear - or press 'L')</legend>
    <div id="logPlots" class="centered"></div>
  </fieldset>
  {% if compNs != 'None' %}
  <div><ul id="comps" class="inlinelist"></ul></div>
  {% endif %}

  <br />

  <fieldset>
    <legend>Instrument layout</legend>
    <div id="imgLayout" class="centered"></div>
    <div class="centered"><span id=vrml>layout.wrl</span></div>
  </fieldset>

  <br />

  <fieldset>
    <legend>Simulation output</legend>
    <div class="centered">
      <ul class="inlinelist">
        <li>
          <span id=mcstas>mcstas.tar.gz</span>
        </li>
        <li>
          <span id=instr>{{ job.sim.name }}.instr</span>
        </li>
        <li>
          <span id=out>stdout</span>
        </li>
        <li>
          <span id=err>stderr</span>
        </li>
      </ul>
    </div>
  </fieldset>


{% endblock %}
