tre
This commit is contained in:
parent
d60ee252a0
commit
fbf86d553f
3 changed files with 9 additions and 9 deletions
|
@ -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():
|
||||
|
|
|
@ -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 %}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue