change variable and fix time

master
Aevann 2024-01-23 16:06:29 +02:00
parent 29750ced42
commit 7f3ad289c1
2 changed files with 3 additions and 3 deletions

View File

@ -142,7 +142,7 @@ def participation_stats(v):
stats = statshelper.stats()
cache.set('stats', stats, timeout=172800)
if v.client: return stats
return render_template("stats.html", v=v, title="Statistics", data=stats)
return render_template("stats.html", v=v, title="Statistics", stats=stats)
@app.get("/chart")
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)

View File

@ -19,10 +19,10 @@
<th class="disable-sort-click">Value</th>
</tr>
</thead>
{% for key, value in data.items() %}
{% for key, value in stats.items() %}
<tr>
<td>{{key}}</td>
{% if key == 'time' -%}
{% if key == 'Time these stats were collected' -%}
<td data-time="{{value}}"></td>
{% else -%}
<td>{{value}}</td>