stats: Add stats page
* add stats_table_data() function on the backend * add stats HTML page and route Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
36
chanbans/templates/stats.html
Normal file
36
chanbans/templates/stats.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Stats{% endblock title %}
|
||||
|
||||
{% block main %}
|
||||
<h2>Statistics</h2>
|
||||
<div class="infobox">
|
||||
<h4>Histogram</h4>
|
||||
<p>
|
||||
<img src="{{static_url("histogram.svg")}}" width="33%" />
|
||||
</p>
|
||||
<p>
|
||||
<a target="_blank" href="{{static_url("histogram.svg")}}">Click here to see the full histogram view</a>
|
||||
</p>
|
||||
<hr/>
|
||||
<h4>Table</h4>
|
||||
<p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Board</th>
|
||||
<th>Bans</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in stats_table_data() %}
|
||||
<tr>
|
||||
<td>{{row['board']}}</td>
|
||||
<td>{{row["bans"]}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</p>
|
||||
</div>
|
||||
{% endblock main %}
|
||||
Reference in New Issue
Block a user