forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-05-02 20:50:43 +02:00
parent 63d344c2d0
commit dbe0bf076e
3 changed files with 9 additions and 9 deletions

View File

@ -66,13 +66,10 @@ def sidebar(v):
@app.get("/stats")
@auth_required
@cache.memoize(timeout=86400)
def participation_stats(v):
return render_template("admin/content_stats.html", v=v, title="Content Statistics", data=stats(site=SITE))
@cache.memoize(timeout=86400)
def stats(site=None):
day = int(time.time()) - 86400
week = int(time.time()) - 604800
@ -203,7 +200,8 @@ def stats(site=None):
g.db.commit()
return stats
return render_template("admin/content_stats.html", v=v, title="Content Statistics", data=stats)
@app.get("/chart")
def chart():

View File

@ -1,5 +1,6 @@
{% extends "default.html" %}
{% block content %}
<script src="/assets/js/sort_table.js?v=242"></script>
<pre>
@ -11,15 +12,16 @@
</pre>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<div class="overflow-x-auto">
<table id="sortable_table" class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Image</th>
<th>Description</th>
<th>#</th>
<th>Rarity</th>
<th role="button" onclick="sort_table(4)">#</th>
<th role="button" onclick="sort_table(5)">Rarity</th>
</tr>
</thead>
{% for badge in badges %}

View File

@ -15,7 +15,7 @@
<th>#</th>
<th>Name</th>
<th role="button" onclick="sort_table(2)">Posts</th>
<th role="button" onclick="sort_table(4)">Blockers</th>
<th role="button" onclick="sort_table(3)">Blockers</th>
</tr>
</thead>