Merge branch 'release/v8.12'
This commit is contained in:
@@ -254,6 +254,7 @@ def interactive_activitychart(workouts,startdate,enddate,stack='type'):
|
||||
dates.append(dd)
|
||||
dates_sorting.append(dd2)
|
||||
durations.append(du)
|
||||
|
||||
types.append(w.workouttype)
|
||||
try:
|
||||
rowers.append(w.user.user.first_name[0]+w.user.user.last_name[0])
|
||||
@@ -272,13 +273,17 @@ def interactive_activitychart(workouts,startdate,enddate,stack='type'):
|
||||
|
||||
# add dates with no activity
|
||||
while d<=enddate:
|
||||
dd = d.strftime('%d')
|
||||
dates.append(d.strftime('%m/%d'))
|
||||
|
||||
|
||||
dates_sorting.append(d.strftime('%Y/%m/%d'))
|
||||
durations.append(0)
|
||||
types.append('rower')
|
||||
rowers.append('Sander')
|
||||
d += datetime.timedelta(days=1)
|
||||
|
||||
|
||||
|
||||
df = pd.DataFrame({
|
||||
'date':dates,
|
||||
'date_sorting':dates_sorting,
|
||||
@@ -288,7 +293,8 @@ def interactive_activitychart(workouts,startdate,enddate,stack='type'):
|
||||
})
|
||||
|
||||
df.sort_values('date_sorting',inplace=True)
|
||||
|
||||
|
||||
|
||||
p = Bar(df,values='duration',
|
||||
label = CatAttr(columns=['date'], sort=False),
|
||||
xlabel='Date',
|
||||
|
||||
@@ -58,7 +58,17 @@ xo
|
||||
|
||||
|
||||
<ul class="main-content">
|
||||
<li>
|
||||
<li class="grid_2" style="min-height:200px;">
|
||||
<script type="text/javascript" src="/static/js/bokeh-0.12.3.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
{{ interactiveplot |safe }}
|
||||
|
||||
{{ the_div |safe }}
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<p>
|
||||
<form enctype="multipart/form-data" method="post">
|
||||
<table>
|
||||
@@ -81,18 +91,17 @@ xo
|
||||
</input>
|
||||
</form>
|
||||
</p>
|
||||
</li>
|
||||
<li style="min-height:200px;">
|
||||
<script type="text/javascript" src="/static/js/bokeh-0.12.3.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
{{ interactiveplot |safe }}
|
||||
|
||||
{{ the_div |safe }}
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
{% if rankingonly and not team %}
|
||||
<a href="/rowers/list-workouts">
|
||||
<i class="far fa-star"></i>Show All Workouts
|
||||
</a>
|
||||
{% elif not team %}
|
||||
<a href="/rowers/list-workouts/ranking">
|
||||
<i class="fas fa-star"></i>Show Only Ranking Pieces
|
||||
</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
<span>
|
||||
{% if workouts.has_previous %}
|
||||
@@ -139,19 +148,6 @@ xo
|
||||
</span>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
{% if rankingonly and not team %}
|
||||
<a href="/rowers/list-workouts">
|
||||
<i class="far fa-star"></i>Show All Workouts
|
||||
</a>
|
||||
{% elif not team %}
|
||||
<a href="/rowers/list-workouts/ranking">
|
||||
<i class="fas fa-star"></i>Show Only Ranking Pieces
|
||||
</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
</li>
|
||||
<li class="maxheight grid_4">
|
||||
|
||||
{% if workouts %}
|
||||
|
||||
Reference in New Issue
Block a user