2020-10-27 19:46:14 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block content %}
|
2020-12-12 12:48:05 +00:00
|
|
|
|
2020-10-27 19:46:14 +00:00
|
|
|
<div class="container">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="panel panel-success">
|
|
|
|
<div class="panel-heading"><h3 class="panel-title">Today</h3></div>
|
|
|
|
<table class="datatable table table-striped table-bordered">
|
|
|
|
<theader>
|
|
|
|
<tr>
|
|
|
|
<th class="text-right">Senders</th>
|
|
|
|
<th class="text-right">Receivers</th>
|
|
|
|
<th class="text-right">Takeoffs</th>
|
|
|
|
<th class="text-right">Landings</th>
|
|
|
|
<th class="text-right">Sender Positions</th>
|
|
|
|
<th class="text-right">Sender Positions Total</th>
|
|
|
|
</tr>
|
|
|
|
</theader>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td class="text-right">{{ senders_today }}</td>
|
|
|
|
<td class="text-right">{{ receivers_today }}</td>
|
|
|
|
<td class="text-right">{{ takeoffs_today }}</td>
|
|
|
|
<td class="text-right">{{ landings_today }}</td>
|
|
|
|
<td class="text-right">{{ sender_positions_today }}</td>
|
|
|
|
<td class="text-right">{{ sender_positions_total }}</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="panel panel-success">
|
|
|
|
<div class="panel-heading"><h3 class="panel-title">Logbook</h3></div>
|
|
|
|
<table class="datatable table table-striped table-bordered">
|
|
|
|
<theader>
|
|
|
|
<tr>
|
|
|
|
<th></th>
|
|
|
|
<th></th>
|
2020-11-24 19:26:28 +00:00
|
|
|
<th colspan="2">Aircraft</th>
|
2020-10-27 19:46:14 +00:00
|
|
|
<th colspan="2">Airport</th>
|
|
|
|
<th colspan="2">Time UTC</th>
|
|
|
|
<th></th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>#</th>
|
|
|
|
<th>Date</th>
|
2020-11-24 19:26:28 +00:00
|
|
|
<th>Registration</th>
|
|
|
|
<th>Type</th>
|
2020-10-27 19:46:14 +00:00
|
|
|
<th>Takeoff</th>
|
|
|
|
<th>Landing</th>
|
|
|
|
<th>Takeoff</th>
|
|
|
|
<th>Landing</th>
|
|
|
|
<th>Duration</th>
|
|
|
|
<th>AGL</th>
|
|
|
|
</tr>
|
|
|
|
</theader>
|
|
|
|
<tbody>
|
|
|
|
{% set ns = namespace(mydate=none) %}
|
|
|
|
{% for entry in logbook %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ loop.index }}</td>
|
2020-11-17 13:58:23 +00:00
|
|
|
<td>{% if ns.mydate != entry.reference_timestamp.strftime('%Y-%m-%d') %}{% set ns.mydate = entry.reference_timestamp.strftime('%Y-%m-%d') %}{{ ns.mydate }}{% endif %}</td>
|
2020-12-12 12:48:05 +00:00
|
|
|
<td>{{ entry.sender|to_html_flag|safe }}{{ entry.sender|to_html_link|safe }}</td>
|
2020-11-24 19:26:28 +00:00
|
|
|
<td>{% if entry.sender.infos|length > 0 and entry.sender.infos[0].aircraft|length %}{{ entry.sender.infos[0].aircraft }}{% else %}-{% endif %}</td>
|
2020-11-17 13:58:23 +00:00
|
|
|
<td>{% if entry.takeoff_airport is not none %}<a href="{{ url_for('main.logbooks', country=entry.takeoff_airport.country_code, airport_id=entry.takeoff_airport.id, date=entry.reference_timestamp.strftime('%Y-%m-%d')) }}">{{ entry.takeoff_airport.name }}</a>{% endif %}</td>
|
|
|
|
<td>{% if entry.landing_airport is not none %}<a href="{{ url_for('main.logbooks', country=entry.landing_airport.country_code, airport_id=entry.landing_airport.id, date=entry.reference_timestamp.strftime('%Y-%m-%d')) }}">{{ entry.landing_airport.name }}</a>{% endif %}</td>
|
2020-10-27 19:46:14 +00:00
|
|
|
<td>{% if entry.takeoff_timestamp is not none %} {{ entry.takeoff_timestamp.strftime('%H:%M') }} {% endif %}</td>
|
|
|
|
<td>{% if entry.landing_timestamp is not none %} {{ entry.landing_timestamp.strftime('%H:%M') }} {% endif %}</td>
|
|
|
|
<td>{% if entry.duration is not none %}{{ entry.duration }}{% endif %}</td>
|
|
|
|
<td>{% if entry.max_altitude is not none %}{{ '%0.1f'|format(entry.max_altitude - entry.takeoff_airport.altitude) }} m{% endif %}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|