kopia lustrzana https://github.com/glidernet/ogn-python
Added duration to logbook
rodzic
a598a736d9
commit
5fa988a245
|
@ -8,19 +8,19 @@
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<table class="datatable table table-striped table-bordered">
|
<table class="datatable table table-striped table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Address</th>
|
<th>Address</th>
|
||||||
<th>Airport</th>
|
<th>Registration</th>
|
||||||
<th>Last takeoff/landing</th>
|
<th>Airport</th>
|
||||||
<th>Logbook</th>
|
<th>Last takeoff/landing</th>
|
||||||
<th>Software version</th>
|
<th>Software version</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{% for device in devices %}
|
{% for device in devices %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{ url_for('device_detail', id=device.id) }}">{{ device.address }}</a></td>
|
<td><a href="{{ url_for('device_detail', id=device.id) }}">{{ device.address }}</a></td>
|
||||||
|
<td>{% if device.info is not none %}{{ device.info.registration }}{% else %} - {% endif %}</td>
|
||||||
<td>{% if device.takeoff_landings %}{% set last_action = device.takeoff_landings|last %}{{ last_action.airport.name }}{% endif %}
|
<td>{% if device.takeoff_landings %}{% set last_action = device.takeoff_landings|last %}{{ last_action.airport.name }}{% endif %}
|
||||||
<td>{% if device.takeoff_landings %}{% set last_action = device.takeoff_landings|last %}{% if last_action.is_takeoff == True %}↗{% else %}↘{% endif %} @ {{ last_action.timestamp.strftime('%Y-%m-%d %H:%M:%S') }}{% endif %}
|
<td>{% if device.takeoff_landings %}{% set last_action = device.takeoff_landings|last %}{% if last_action.is_takeoff == True %}↗{% else %}↘{% endif %} @ {{ last_action.timestamp.strftime('%Y-%m-%d %H:%M:%S') }}{% endif %}
|
||||||
<td>{% if device.info is not none %}{{ device.info.registration }}{% else %} - {% endif %}</td>
|
|
||||||
<td>{% if device.software_version is not none %}{% if device.software_version < 6.6 %}<p class="text-danger">{{ device.software_version }}</p>{% else %}{{ device.software_version }}{% endif %}{% else %} - {% endif %}</td>
|
<td>{% if device.software_version is not none %}{% if device.software_version < 6.6 %}<p class="text-danger">{{ device.software_version }}</p>{% else %}{{ device.software_version }}{% endif %}{% else %} - {% endif %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th colspan="2">Takeoff</th>
|
<th colspan="2">Takeoff</th>
|
||||||
<th colspan="2">Landing</th>
|
<th colspan="2">Landing</th>
|
||||||
|
<th>Time</th>
|
||||||
<th>AGL</th>
|
<th>AGL</th>
|
||||||
<th>Remark</th>
|
<th>Remark</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -51,6 +52,7 @@
|
||||||
<td>{% if entry.takeoff_track is not none and entry.takeoff_airport.id|string() == sel_airport %} {{ '%02d' | format(entry.takeoff_track/10) }} {% endif %}</td>
|
<td>{% if entry.takeoff_track is not none and entry.takeoff_airport.id|string() == sel_airport %} {{ '%02d' | format(entry.takeoff_track/10) }} {% endif %}</td>
|
||||||
<td>{% if entry.landing_timestamp is not none and entry.landing_airport.id|string() == sel_airport %} {{ entry.landing_timestamp.strftime('%H:%M') }} {% endif %}</td>
|
<td>{% if entry.landing_timestamp is not none and entry.landing_airport.id|string() == sel_airport %} {{ entry.landing_timestamp.strftime('%H:%M') }} {% endif %}</td>
|
||||||
<td>{% if entry.landing_track is not none and entry.landing_airport.id|string() == sel_airport %} {{ '%02d' | format(entry.landing_track/10) }} {% endif %}</td>
|
<td>{% if entry.landing_track is not none and entry.landing_airport.id|string() == sel_airport %} {{ '%02d' | format(entry.landing_track/10) }} {% 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>
|
<td>{% if entry.max_altitude is not none %}{{ '%0.1f'|format(entry.max_altitude - entry.takeoff_airport.altitude) }} m{% endif %}</td>
|
||||||
<td>
|
<td>
|
||||||
{% if entry.takeoff_airport is not none and entry.takeoff_airport.id|string() != sel_airport %}Take Off: <a href="{{ url_for('logbook', airport=entry.takeoff_airport.id) }}">{{ entry.takeoff_airport.name }}</a>
|
{% if entry.takeoff_airport is not none and entry.takeoff_airport.id|string() != sel_airport %}Take Off: <a href="{{ url_for('logbook', airport=entry.takeoff_airport.id) }}">{{ entry.takeoff_airport.name }}</a>
|
||||||
|
|
Ładowanie…
Reference in New Issue