forked from rDrama/rDrama
tfdMerge branch 'frost' of https://github.com/Aevann1/Drama into frost
commit
0d89900f83
|
@ -141,10 +141,10 @@ def cached_chart(days):
|
|||
|
||||
if days > 31:
|
||||
file = "/weekly_chart.png"
|
||||
day_cutoffs = [today_cutoff - 86400 * 7 * i for i in range(35)][1:]
|
||||
day_cutoffs = [today_cutoff - 86400 * 7 * i for i in range(45)][1:]
|
||||
else:
|
||||
file = "/daily_chart.png"
|
||||
day_cutoffs = [today_cutoff - 86400 * i for i in range(35)][1:]
|
||||
day_cutoffs = [today_cutoff - 86400 * i for i in range(45)][1:]
|
||||
|
||||
day_cutoffs.insert(0, calendar.timegm(now))
|
||||
|
||||
|
@ -156,11 +156,11 @@ def cached_chart(days):
|
|||
|
||||
comment_stats = [g.db.query(Comment.id).filter(Comment.created_utc < day_cutoffs[i], Comment.created_utc > day_cutoffs[i + 1],Comment.is_banned == False, Comment.author_id.notin_((AUTOJANNY_ID,NOTIFICATIONS_ID))).count() for i in range(len(day_cutoffs) - 1)][::-1]
|
||||
|
||||
plt.rcParams["figure.figsize"] = (20,20)
|
||||
plt.rcParams["figure.figsize"] = (30, 20)
|
||||
|
||||
signup_chart = plt.subplot2grid((20, 4), (0, 0), rowspan=5, colspan=4)
|
||||
posts_chart = plt.subplot2grid((20, 4), (7, 0), rowspan=5, colspan=4)
|
||||
comments_chart = plt.subplot2grid((20, 4), (14, 0), rowspan=5, colspan=4)
|
||||
signup_chart = plt.subplot2grid((30, 20), (0, 0), rowspan=6, colspan=30)
|
||||
posts_chart = plt.subplot2grid((30, 20), (10, 0), rowspan=6, colspan=30)
|
||||
comments_chart = plt.subplot2grid((30, 20), (20, 0), rowspan=6, colspan=30)
|
||||
|
||||
signup_chart.grid(), posts_chart.grid(), comments_chart.grid()
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div id='message' class="d-none position-relative form-group d-flex mt-2">
|
||||
<div id='message' class="d-none position-relative form-group d-flex mt-3">
|
||||
<div class="position-absolute text-muted text-small" style="bottom: -1.5rem; line-height: 1;">
|
||||
<span id="typing-indicator"></span>
|
||||
<span id="loading-indicator" class="d-none"></span>
|
||||
|
|
Loading…
Reference in New Issue