geocode/templates/reports.html

71 lines
1.7 KiB
HTML
Raw Normal View History

2023-12-10 10:32:15 +00:00
{% extends "base.html" %}
{% block title %}Geocode to Commons: Reports{% endblock %}
{% block content %}
2023-12-22 12:18:28 +00:00
<div class="container-fluid m-3">
2023-12-10 10:32:15 +00:00
<h1>Geocode reports</h1>
<p><a href="{{ url_for("index") }}">Back to index</a></p>
<p>Logging started {{ log_start_time.strftime("%a %d %b %Y") }}</p>
<p>Total lookups processed: {{ "{:,d}".format(log_count) }}</p>
<p>Average response time: {{ average_response_time | int }} milliseconds</p>
2023-12-22 12:18:28 +00:00
<div class="row">
<div class="col">
<h4>requests per day</h4>
<table class="table table-hover w-auto">
{% for day, day_count in by_day %}
<tr>
<td class="text-end">{{ day.strftime("%a %d %b %Y") }}</td>
<td class="text-end">{{ "{:,d}".format(day_count) }}</td>
</tr>
{% endfor %}
</table>
2023-12-22 12:18:28 +00:00
</div>
<div class="col">
<h4>top places</h4>
<table class="table table-hover w-auto">
{% for place, place_count in top_places %}
<tr>
<td class="text-end">
{% if place %}
<a href="https://commons.wikimedia.org/wiki/Category:{{ place }}">{{ place }}</a>
{% else %}
<span class="badge bg-danger">no place found</span>
{% endif %}
</td>
<td class="text-end">{{ "{:,d}".format(place_count) }}</td>
</tr>
{% endfor %}
</table>
2023-12-22 12:18:28 +00:00
</div>
<div class="col">
<h4>missing places</h4>
<p>Recent queries that failed to resolve into a place with a category.</p>
<table class="table table-hover w-auto">
{% for log in missing_places %}
<tr>
<td class="text-end">{{ log.dt.strftime("%a %d %b %Y at %H:%M:%S") }}</td>
<td class="text-end">
<a href="{{ url_for("detail_page", lat=log.lat, lon=log.lon) }}">
2023-12-22 12:18:28 +00:00
{{ "{:.4f},{:.4f}".format(log.lat, log.lon) }}
</a>
</td>
</tr>
{% endfor %}
</table>
2023-12-22 12:18:28 +00:00
</div>
</div>
2023-12-10 10:32:15 +00:00
</div>
{% endblock %}