{% extends "layout.html" %}
{% block title %}{{title}}{% endblock %}
{% block content %}
<h1>{{title}}</h1>

<div class="table-responsive">
  <table class="table table-striped">
    <thead>
      <tr>
	<th>Property</th>
	<th>Units</th>
	<th>Value</th>
      </tr>
    </thead>
    <tbody>
      <tr>
	<td>Start time</td>
	<td>JD</td>
	<td>{{sess.start_time_jd}}</td>
      </tr>
      <tr>
	<td></td>
	<td>UTC date/time</td>
	<td>{{sess.start_time_iso_date_time}}</td>
      </tr>
      <tr>
	<td>Stop time</td>
	<td>JD</td>
	<td>{{sess.stop_time_jd}}</td>
      </tr>
      <tr>
	<td></td>
	<td>UTC date/time</td>
	<td>{{sess.stop_time_iso_date_time}}</td>
      </tr>
      <tr>
	<td>Duration</td>
	<td>day</td>
	<td>{{sess.duration}}</td>
      </tr>
      <tr>
	<td>Registered data files</td>
	<td>Total number</td>
	<td>{{sess.num_files}}</td>
      </tr>
      <tr>
	<td></td>
	<td>With instances</td>
	<td>{{sess.num_files_with_instances}}</td>
      </tr>
      <tr>
	<td></td>
	<td>Total size</td>
	<td>{{sess.total_size|filesizeformat}}</td>
      </tr>
    </tbody>
  </table>
</div>

{% if staging_available %}

<h2>Staging to {{staging_dest_displayed}}</h2>

<p>You can stage all of the files from this session to {{staging_dest_displayed}}.</p>

<form role="form" action="/" method="post"> <!-- note: POST method since non-idempotent op -->
  <input name="search" type="hidden" value="{&quot;session-id-is-exactly&quot;: {{sess.id}}}">
  {{macros.staging_form_ui(staging_username_placeholder, staging_dest_path)}}
</form>

<br><br><!-- hack for nicer spacing -->

{% endif %}

<h2>Observations</h2>

<p>Session {{sess.id}} contains {{obs|length}} observations.</p>

{{ macros.obs_listing(obs) }}

</div>
{% endblock %}
